[LFC] Implement LayoutContext::createDisplayBox
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 May 2018 03:19:33 +0000 (03:19 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 May 2018 03:19:33 +0000 (03:19 +0000)
commit69d8b0290ea825a1cc6912c16696a20674f0d3dd
tree7ab6a1223fd487bae25a27d8283da8e996ef77e7
parent4584fbe3c1dbf1db57de689909701eee67138ba8
[LFC] Implement LayoutContext::createDisplayBox
https://bugs.webkit.org/show_bug.cgi?id=185158

Reviewed by Antti Koivisto.

Now compute*() functions take both the const layout and the corresponding non-const display boxes.
Display boxes are owned by the LayoutContext and they don't form a tree structure (only implicitly through the layout tree).
(This might need to change in the future if we decide to arrange them in some sort of painting order)

* layout/FloatingContext.cpp:
(WebCore::Layout::FloatingContext::computePosition):
* layout/FloatingContext.h:
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeStaticPosition const):
(WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const):
(WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
(WebCore::Layout::FormattingContext::computeWidth const):
(WebCore::Layout::FormattingContext::computeHeight const):
(WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
(WebCore::Layout::FormattingContext::computeFloatingWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
(WebCore::Layout::FormattingContext::computeFloatingHeight const):
* layout/FormattingContext.h:
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::createDisplayBox):
* layout/LayoutContext.h:
(WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
(WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
(WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
* layout/blockformatting/BlockFormattingContext.h:
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::parent const): Deleted.
(WebCore::Display::Box::nextSibling const): Deleted.
(WebCore::Display::Box::previousSibling const): Deleted.
(WebCore::Display::Box::firstChild const): Deleted.
(WebCore::Display::Box::lastChild const): Deleted.
(WebCore::Display::Box::setParent): Deleted.
(WebCore::Display::Box::setNextSibling): Deleted.
(WebCore::Display::Box::setPreviousSibling): Deleted.
(WebCore::Display::Box::setFirstChild): Deleted.
(WebCore::Display::Box::setLastChild): Deleted.
(): Deleted.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeInFlowWidth const):
(WebCore::Layout::InlineFormattingContext::computeInFlowHeight const):
* layout/inlineformatting/InlineFormattingContext.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/layout/FloatingContext.cpp
Source/WebCore/layout/FloatingContext.h
Source/WebCore/layout/FormattingContext.cpp
Source/WebCore/layout/FormattingContext.h
Source/WebCore/layout/LayoutContext.cpp
Source/WebCore/layout/LayoutContext.h
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Source/WebCore/layout/blockformatting/BlockFormattingContext.h
Source/WebCore/layout/displaytree/DisplayBox.h
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.h