[LFC][Floating] Introduce FloatBox, a FloatAvoider subclass.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2018 14:49:35 +0000 (14:49 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2018 14:49:35 +0000 (14:49 +0000)
commit2520f073e96e76abe1d7e4cc7675c682dcbd26c1
tree9102c4e5b8938d0ba75e75336095bf9f7f0fbdd7
parentcceb6b6ab98bd623bf942c800a4f0b15ca4fd732
[LFC][Floating] Introduce FloatBox, a FloatAvoider subclass.
https://bugs.webkit.org/show_bug.cgi?id=189074

Reviewed by Antti Koivisto.

FloatBox is a float avoider and a float positioned box as well.
This is in preparation for the float avoidance feature where formatting context root boxes avoid existing floats.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/displaytree/DisplayBox.h:
* layout/floats/FloatAvoider.cpp:
(WebCore::Layout::FloatAvoider::FloatAvoider):
(WebCore::Layout::FloatAvoider::setHorizontalConstraints):
(WebCore::Layout::FloatAvoider::setVerticalConstraint):
(WebCore::Layout::FloatAvoider::horizontalPositionCandidate):
(WebCore::Layout::FloatAvoider::verticalPositionCandidate):
(WebCore::Layout::FloatAvoider::resetPosition):
(WebCore::Layout::FloatAvoider::rectInContainingBlock const):
(WebCore::Layout::FloatAvoider::initializePosition): Deleted.
(WebCore::Layout::FloatAvoider::isLeftAligned const): Deleted.
(WebCore::Layout::FloatAvoider::rect const): Deleted.
(WebCore::Layout::FloatAvoider::resetHorizontalConstraints): Deleted.
(WebCore::Layout::FloatAvoider::initialVerticalPosition const): Deleted.
* layout/floats/FloatAvoider.h:
(WebCore::Layout::FloatAvoider::rect const):
(WebCore::Layout::FloatAvoider::isLeftAligned const):
(WebCore::Layout::FloatAvoider::initialVerticalPosition const):
(WebCore::Layout::FloatAvoider::floatingState const):
(WebCore::Layout::FloatAvoider::layoutBox const):
(WebCore::Layout::FloatAvoider::displayBox const):
* layout/floats/FloatBox.cpp: Copied from Source/WebCore/layout/floats/FloatAvoider.h.
(WebCore::Layout::FloatBox::FloatBox):
(WebCore::Layout::FloatBox::horizontalPositionCandidate):
(WebCore::Layout::FloatBox::verticalPositionCandidate):
(WebCore::Layout::FloatBox::initialVerticalPosition const):
* layout/floats/FloatBox.h: Copied from Source/WebCore/layout/floats/FloatAvoider.h.
* layout/floats/FloatingContext.cpp:
(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::floatingPosition const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/layout/displaytree/DisplayBox.h
Source/WebCore/layout/floats/FloatAvoider.cpp
Source/WebCore/layout/floats/FloatAvoider.h
Source/WebCore/layout/floats/FloatBox.cpp [new file with mode: 0644]
Source/WebCore/layout/floats/FloatBox.h [new file with mode: 0644]
Source/WebCore/layout/floats/FloatingContext.cpp