[LFC] Introduce LayoutContext class
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2019 13:36:00 +0000 (13:36 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2019 13:36:00 +0000 (13:36 +0000)
commit194f951f352f48f2a5e04c523c5c763ab837fe17
tree67db9c5124dc213fbe67771aa5dc330e624bfe6b
parent6d3fe48f23abed78a27833b865a0aab8f7cdc1c2
[LFC] Introduce LayoutContext class
https://bugs.webkit.org/show_bug.cgi?id=202026
<rdar://problem/55546622>

Reviewed by Antti Koivisto.

Move context related functionality from LayoutState to LayoutContext.
To initiate a layout, create a LayoutContext, pass the current LayoutState object in and call layout().

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
* layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
(WebCore::Layout::LayoutState::updateLayout): Deleted.
(WebCore::Layout::LayoutState::layoutFormattingContextSubtree): Deleted.
(WebCore::Layout::LayoutState::styleChanged): Deleted.
(WebCore::Layout::LayoutState::markNeedsUpdate): Deleted.
(WebCore::Layout::LayoutState::createFormattingContext): Deleted.
(WebCore::Layout::LayoutState::run): Deleted.
* layout/LayoutState.h:
(WebCore::Layout::LayoutState::hasFormattingState const):
(WebCore::Layout::LayoutState::setQuirksMode):
(WebCore::Layout::LayoutState::inNoQuirksMode const):
(WebCore::Layout::LayoutState::updateAll): Deleted.
* layout/Verification.cpp:
(WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
(WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const): Deleted.
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
* layout/blockformatting/BlockInvalidation.cpp:
(WebCore::Layout::computeUpdateType):
(WebCore::Layout::computeUpdateTypeForAncestor):
(WebCore::Layout::BlockInvalidation::invalidate):
* layout/blockformatting/BlockInvalidation.h:
* layout/displaytree/DisplayBox.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
* layout/inlineformatting/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::invalidate):
* layout/inlineformatting/InlineInvalidation.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::printLayoutTreeForLiveDocuments):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::layoutTableCellBox):
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
* layout/tableformatting/TableInvalidation.cpp:
(WebCore::Layout::TableInvalidation::invalidate):
* layout/tableformatting/TableInvalidation.h:
* page/FrameViewLayoutContext.cpp:
(WebCore::layoutUsingFormattingContext):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/layout/FormattingContext.cpp
Source/WebCore/layout/FormattingContext.h
Source/WebCore/layout/FormattingContextGeometry.cpp
Source/WebCore/layout/LayoutContext.cpp [new file with mode: 0644]
Source/WebCore/layout/LayoutContext.h [new file with mode: 0644]
Source/WebCore/layout/LayoutState.cpp
Source/WebCore/layout/LayoutState.h
Source/WebCore/layout/Verification.cpp
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
Source/WebCore/layout/blockformatting/BlockInvalidation.cpp
Source/WebCore/layout/blockformatting/BlockInvalidation.h
Source/WebCore/layout/displaytree/DisplayBox.h
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineInvalidation.cpp
Source/WebCore/layout/inlineformatting/InlineInvalidation.h
Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
Source/WebCore/layout/tableformatting/TableFormattingContext.cpp
Source/WebCore/layout/tableformatting/TableInvalidation.cpp
Source/WebCore/layout/tableformatting/TableInvalidation.h
Source/WebCore/page/FrameViewLayoutContext.cpp