[LFC][Floating] Add basic left/right floating positioning.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2018 15:02:18 +0000 (15:02 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2018 15:02:18 +0000 (15:02 +0000)
commite4b2475fa360ad9c6d3aa00640ea604294870944
tree3014acaf8956f25dc1f562411ea5cc765c34b131
parent95301491b34412e7677b050201ba7a2e67255fbd
[LFC][Floating] Add basic left/right floating positioning.
https://bugs.webkit.org/show_bug.cgi?id=188148

Reviewed by Antti Koivisto.

This patch implements simple floating positioning.
(Floatings with different containing blocks do not work yet.)

* layout/FloatingContext.cpp:
(WebCore::Layout::FloatingPair::isEmpty const):
(WebCore::Layout::Iterator::current const):
(WebCore::Layout::Iterator::verticalPosition const):
(WebCore::Layout::FloatingContext::FloatingContext):
(WebCore::Layout::FloatingContext::computePosition const):
(WebCore::Layout::FloatingContext::floatingPosition const):
(WebCore::Layout::FloatingContext::initialVerticalPosition const):
(WebCore::Layout::FloatingContext::alignWithContainingBlock const):
(WebCore::Layout::FloatingContext::alignWithFloatings const):
(WebCore::Layout::floatingDisplayBox):
(WebCore::Layout::FloatingPair::FloatingPair):
(WebCore::Layout::FloatingPair::left const):
(WebCore::Layout::FloatingPair::right const):
(WebCore::Layout::FloatingPair::intersects const):
(WebCore::Layout::Iterator::Iterator):
(WebCore::Layout::Iterator::operator++):
(WebCore::Layout::Iterator::set):
(WebCore::Layout::FloatingContext::computePosition): Deleted.
* layout/FloatingContext.h:
* layout/FloatingState.cpp:
(WebCore::Layout::FloatingState::append):
* layout/FloatingState.h:
(WebCore::Layout::FloatingState::floatings const):
(WebCore::Layout::FloatingState::last const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
* layout/displaytree/DisplayBox.cpp:
(WebCore::Display::Box::Rect::Rect):
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::Rect::intersects const):
(WebCore::Display::Box::rect const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/FloatingContext.cpp
Source/WebCore/layout/FloatingContext.h
Source/WebCore/layout/FloatingState.cpp
Source/WebCore/layout/FloatingState.h
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Source/WebCore/layout/displaytree/DisplayBox.cpp
Source/WebCore/layout/displaytree/DisplayBox.h