Rename LayoutCtx.h/cpp to LayoutContext.h/cpp
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2018 19:48:53 +0000 (19:48 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2018 19:48:53 +0000 (19:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184922

Reviewed by Zalan Bujtas.

To achieve this the existing LayoutContext class is renamed to FrameViewLayoutContext.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/LayoutContext.cpp: Copied from Source/WebCore/layout/LayoutCtx.cpp.
* layout/LayoutContext.h: Copied from Source/WebCore/layout/LayoutCtx.h.
* layout/LayoutCtx.cpp: Removed.
* layout/LayoutCtx.h: Removed.
* page/FrameView.cpp:
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange):
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::updateLayerPositionsAfterScrolling):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::availableContentSizeChanged):
* page/FrameView.h:
* page/FrameViewLayoutContext.cpp: Copied from Source/WebCore/page/LayoutContext.cpp.
(WebCore::LayoutScope::LayoutScope):
(WebCore::FrameViewLayoutContext::FrameViewLayoutContext):
(WebCore::FrameViewLayoutContext::~FrameViewLayoutContext):
(WebCore::FrameViewLayoutContext::layout):
(WebCore::FrameViewLayoutContext::runOrScheduleAsynchronousTasks):
(WebCore::FrameViewLayoutContext::runAsynchronousTasks):
(WebCore::FrameViewLayoutContext::flushAsynchronousTasks):
(WebCore::FrameViewLayoutContext::reset):
(WebCore::FrameViewLayoutContext::needsLayout const):
(WebCore::FrameViewLayoutContext::setNeedsLayout):
(WebCore::FrameViewLayoutContext::enableSetNeedsLayout):
(WebCore::FrameViewLayoutContext::disableSetNeedsLayout):
(WebCore::FrameViewLayoutContext::scheduleLayout):
(WebCore::FrameViewLayoutContext::unscheduleLayout):
(WebCore::FrameViewLayoutContext::scheduleSubtreeLayout):
(WebCore::FrameViewLayoutContext::layoutTimerFired):
(WebCore::FrameViewLayoutContext::convertSubtreeLayoutToFullLayout):
(WebCore::FrameViewLayoutContext::setSubtreeLayoutRoot):
(WebCore::FrameViewLayoutContext::canPerformLayout const):
(WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
(WebCore::FrameViewLayoutContext::updateStyleForLayout):
(WebCore::FrameViewLayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameViewLayoutContext::startLayoutAtMainFrameViewIfNeeded):
(WebCore::FrameViewLayoutContext::layoutDelta const):
(WebCore::FrameViewLayoutContext::addLayoutDelta):
(WebCore::FrameViewLayoutContext::layoutDeltaMatches):
(WebCore::FrameViewLayoutContext::layoutState const):
(WebCore::FrameViewLayoutContext::pushLayoutState):
(WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
(WebCore::FrameViewLayoutContext::popLayoutState):
(WebCore::FrameViewLayoutContext::checkLayoutState):
(WebCore::FrameViewLayoutContext::frame const):
(WebCore::FrameViewLayoutContext::view const):
(WebCore::FrameViewLayoutContext::renderView const):
(WebCore::FrameViewLayoutContext::document const):
(WebCore::LayoutContext::LayoutContext): Deleted.
(WebCore::LayoutContext::~LayoutContext): Deleted.
(WebCore::LayoutContext::layout): Deleted.
(WebCore::LayoutContext::runOrScheduleAsynchronousTasks): Deleted.
(WebCore::LayoutContext::runAsynchronousTasks): Deleted.
(WebCore::LayoutContext::flushAsynchronousTasks): Deleted.
(WebCore::LayoutContext::reset): Deleted.
(WebCore::LayoutContext::needsLayout const): Deleted.
(WebCore::LayoutContext::setNeedsLayout): Deleted.
(WebCore::LayoutContext::enableSetNeedsLayout): Deleted.
(WebCore::LayoutContext::disableSetNeedsLayout): Deleted.
(WebCore::LayoutContext::scheduleLayout): Deleted.
(WebCore::LayoutContext::unscheduleLayout): Deleted.
(WebCore::LayoutContext::scheduleSubtreeLayout): Deleted.
(WebCore::LayoutContext::layoutTimerFired): Deleted.
(WebCore::LayoutContext::convertSubtreeLayoutToFullLayout): Deleted.
(WebCore::LayoutContext::setSubtreeLayoutRoot): Deleted.
(WebCore::LayoutContext::canPerformLayout const): Deleted.
(WebCore::LayoutContext::applyTextSizingIfNeeded): Deleted.
(WebCore::LayoutContext::updateStyleForLayout): Deleted.
(WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded): Deleted.
(WebCore::LayoutContext::startLayoutAtMainFrameViewIfNeeded): Deleted.
(WebCore::LayoutContext::layoutDelta const): Deleted.
(WebCore::LayoutContext::addLayoutDelta): Deleted.
(WebCore::LayoutContext::layoutDeltaMatches): Deleted.
(WebCore::LayoutContext::layoutState const): Deleted.
(WebCore::LayoutContext::pushLayoutState): Deleted.
(WebCore::LayoutContext::pushLayoutStateForPaginationIfNeeded): Deleted.
(WebCore::LayoutContext::popLayoutState): Deleted.
(WebCore::LayoutContext::checkLayoutState): Deleted.
(WebCore::LayoutContext::frame const): Deleted.
(WebCore::LayoutContext::view const): Deleted.
(WebCore::LayoutContext::renderView const): Deleted.
(WebCore::LayoutContext::document const): Deleted.
* page/FrameViewLayoutContext.h: Copied from Source/WebCore/page/LayoutContext.h.
(WebCore::LayoutContext::startDisallowingLayout): Deleted.
(WebCore::LayoutContext::endDisallowingLayout): Deleted.
(WebCore::LayoutContext::layoutPhase const): Deleted.
(WebCore::LayoutContext::isLayoutNested const): Deleted.
(WebCore::LayoutContext::isLayoutPending const): Deleted.
(WebCore::LayoutContext::isInLayout const): Deleted.
(WebCore::LayoutContext::isInRenderTreeLayout const): Deleted.
(WebCore::LayoutContext::inPaintableState const): Deleted.
(WebCore::LayoutContext::layoutCount const): Deleted.
(WebCore::LayoutContext::subtreeLayoutRoot const): Deleted.
(WebCore::LayoutContext::clearSubtreeLayoutRoot): Deleted.
(WebCore::LayoutContext::resetFirstLayoutFlag): Deleted.
(WebCore::LayoutContext::didFirstLayout const): Deleted.
(WebCore::LayoutContext::setNeedsFullRepaint): Deleted.
(WebCore::LayoutContext::needsFullRepaint const): Deleted.
(WebCore::LayoutContext::isPaintOffsetCacheEnabled const): Deleted.
(WebCore::LayoutContext::layoutDisallowed const): Deleted.
(WebCore::LayoutContext::isLayoutSchedulingEnabled const): Deleted.
(WebCore::LayoutContext::inAsynchronousTasks const): Deleted.
(WebCore::LayoutContext::disablePaintOffsetCache): Deleted.
(WebCore::LayoutContext::enablePaintOffsetCache): Deleted.
* page/LayoutContext.cpp: Removed.
* page/LayoutContext.h: Removed.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::computePaginationInformation):
(WebCore::LayoutState::establishLineGrid):
(WebCore::LayoutStateDisabler::LayoutStateDisabler):
* rendering/LayoutState.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/layout/LayoutContext.cpp [moved from Source/WebCore/layout/LayoutCtx.cpp with 98% similarity]
Source/WebCore/layout/LayoutContext.h [moved from Source/WebCore/layout/LayoutCtx.h with 100% similarity]
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/FrameViewLayoutContext.cpp [moved from Source/WebCore/page/LayoutContext.cpp with 87% similarity]
Source/WebCore/page/FrameViewLayoutContext.h [moved from Source/WebCore/page/LayoutContext.h with 98% similarity]
Source/WebCore/rendering/LayoutState.cpp
Source/WebCore/rendering/LayoutState.h

index 8ca0bf6..5debef0 100644 (file)
@@ -1,3 +1,126 @@
+2018-04-24  Antti Koivisto  <antti@apple.com>
+
+        Rename LayoutCtx.h/cpp to LayoutContext.h/cpp
+        https://bugs.webkit.org/show_bug.cgi?id=184922
+
+        Reviewed by Zalan Bujtas.
+
+        To achieve this the existing LayoutContext class is renamed to FrameViewLayoutContext.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * layout/LayoutContext.cpp: Copied from Source/WebCore/layout/LayoutCtx.cpp.
+        * layout/LayoutContext.h: Copied from Source/WebCore/layout/LayoutCtx.h.
+        * layout/LayoutCtx.cpp: Removed.
+        * layout/LayoutCtx.h: Removed.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange):
+        (WebCore::FrameView::updateLayoutViewport):
+        (WebCore::FrameView::updateLayerPositionsAfterScrolling):
+        (WebCore::FrameView::updateCompositingLayersAfterScrolling):
+        (WebCore::FrameView::availableContentSizeChanged):
+        * page/FrameView.h:
+        * page/FrameViewLayoutContext.cpp: Copied from Source/WebCore/page/LayoutContext.cpp.
+        (WebCore::LayoutScope::LayoutScope):
+        (WebCore::FrameViewLayoutContext::FrameViewLayoutContext):
+        (WebCore::FrameViewLayoutContext::~FrameViewLayoutContext):
+        (WebCore::FrameViewLayoutContext::layout):
+        (WebCore::FrameViewLayoutContext::runOrScheduleAsynchronousTasks):
+        (WebCore::FrameViewLayoutContext::runAsynchronousTasks):
+        (WebCore::FrameViewLayoutContext::flushAsynchronousTasks):
+        (WebCore::FrameViewLayoutContext::reset):
+        (WebCore::FrameViewLayoutContext::needsLayout const):
+        (WebCore::FrameViewLayoutContext::setNeedsLayout):
+        (WebCore::FrameViewLayoutContext::enableSetNeedsLayout):
+        (WebCore::FrameViewLayoutContext::disableSetNeedsLayout):
+        (WebCore::FrameViewLayoutContext::scheduleLayout):
+        (WebCore::FrameViewLayoutContext::unscheduleLayout):
+        (WebCore::FrameViewLayoutContext::scheduleSubtreeLayout):
+        (WebCore::FrameViewLayoutContext::layoutTimerFired):
+        (WebCore::FrameViewLayoutContext::convertSubtreeLayoutToFullLayout):
+        (WebCore::FrameViewLayoutContext::setSubtreeLayoutRoot):
+        (WebCore::FrameViewLayoutContext::canPerformLayout const):
+        (WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
+        (WebCore::FrameViewLayoutContext::updateStyleForLayout):
+        (WebCore::FrameViewLayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
+        (WebCore::FrameViewLayoutContext::startLayoutAtMainFrameViewIfNeeded):
+        (WebCore::FrameViewLayoutContext::layoutDelta const):
+        (WebCore::FrameViewLayoutContext::addLayoutDelta):
+        (WebCore::FrameViewLayoutContext::layoutDeltaMatches):
+        (WebCore::FrameViewLayoutContext::layoutState const):
+        (WebCore::FrameViewLayoutContext::pushLayoutState):
+        (WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
+        (WebCore::FrameViewLayoutContext::popLayoutState):
+        (WebCore::FrameViewLayoutContext::checkLayoutState):
+        (WebCore::FrameViewLayoutContext::frame const):
+        (WebCore::FrameViewLayoutContext::view const):
+        (WebCore::FrameViewLayoutContext::renderView const):
+        (WebCore::FrameViewLayoutContext::document const):
+        (WebCore::LayoutContext::LayoutContext): Deleted.
+        (WebCore::LayoutContext::~LayoutContext): Deleted.
+        (WebCore::LayoutContext::layout): Deleted.
+        (WebCore::LayoutContext::runOrScheduleAsynchronousTasks): Deleted.
+        (WebCore::LayoutContext::runAsynchronousTasks): Deleted.
+        (WebCore::LayoutContext::flushAsynchronousTasks): Deleted.
+        (WebCore::LayoutContext::reset): Deleted.
+        (WebCore::LayoutContext::needsLayout const): Deleted.
+        (WebCore::LayoutContext::setNeedsLayout): Deleted.
+        (WebCore::LayoutContext::enableSetNeedsLayout): Deleted.
+        (WebCore::LayoutContext::disableSetNeedsLayout): Deleted.
+        (WebCore::LayoutContext::scheduleLayout): Deleted.
+        (WebCore::LayoutContext::unscheduleLayout): Deleted.
+        (WebCore::LayoutContext::scheduleSubtreeLayout): Deleted.
+        (WebCore::LayoutContext::layoutTimerFired): Deleted.
+        (WebCore::LayoutContext::convertSubtreeLayoutToFullLayout): Deleted.
+        (WebCore::LayoutContext::setSubtreeLayoutRoot): Deleted.
+        (WebCore::LayoutContext::canPerformLayout const): Deleted.
+        (WebCore::LayoutContext::applyTextSizingIfNeeded): Deleted.
+        (WebCore::LayoutContext::updateStyleForLayout): Deleted.
+        (WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded): Deleted.
+        (WebCore::LayoutContext::startLayoutAtMainFrameViewIfNeeded): Deleted.
+        (WebCore::LayoutContext::layoutDelta const): Deleted.
+        (WebCore::LayoutContext::addLayoutDelta): Deleted.
+        (WebCore::LayoutContext::layoutDeltaMatches): Deleted.
+        (WebCore::LayoutContext::layoutState const): Deleted.
+        (WebCore::LayoutContext::pushLayoutState): Deleted.
+        (WebCore::LayoutContext::pushLayoutStateForPaginationIfNeeded): Deleted.
+        (WebCore::LayoutContext::popLayoutState): Deleted.
+        (WebCore::LayoutContext::checkLayoutState): Deleted.
+        (WebCore::LayoutContext::frame const): Deleted.
+        (WebCore::LayoutContext::view const): Deleted.
+        (WebCore::LayoutContext::renderView const): Deleted.
+        (WebCore::LayoutContext::document const): Deleted.
+        * page/FrameViewLayoutContext.h: Copied from Source/WebCore/page/LayoutContext.h.
+        (WebCore::LayoutContext::startDisallowingLayout): Deleted.
+        (WebCore::LayoutContext::endDisallowingLayout): Deleted.
+        (WebCore::LayoutContext::layoutPhase const): Deleted.
+        (WebCore::LayoutContext::isLayoutNested const): Deleted.
+        (WebCore::LayoutContext::isLayoutPending const): Deleted.
+        (WebCore::LayoutContext::isInLayout const): Deleted.
+        (WebCore::LayoutContext::isInRenderTreeLayout const): Deleted.
+        (WebCore::LayoutContext::inPaintableState const): Deleted.
+        (WebCore::LayoutContext::layoutCount const): Deleted.
+        (WebCore::LayoutContext::subtreeLayoutRoot const): Deleted.
+        (WebCore::LayoutContext::clearSubtreeLayoutRoot): Deleted.
+        (WebCore::LayoutContext::resetFirstLayoutFlag): Deleted.
+        (WebCore::LayoutContext::didFirstLayout const): Deleted.
+        (WebCore::LayoutContext::setNeedsFullRepaint): Deleted.
+        (WebCore::LayoutContext::needsFullRepaint const): Deleted.
+        (WebCore::LayoutContext::isPaintOffsetCacheEnabled const): Deleted.
+        (WebCore::LayoutContext::layoutDisallowed const): Deleted.
+        (WebCore::LayoutContext::isLayoutSchedulingEnabled const): Deleted.
+        (WebCore::LayoutContext::inAsynchronousTasks const): Deleted.
+        (WebCore::LayoutContext::disablePaintOffsetCache): Deleted.
+        (WebCore::LayoutContext::enablePaintOffsetCache): Deleted.
+        * page/LayoutContext.cpp: Removed.
+        * page/LayoutContext.h: Removed.
+        * rendering/LayoutState.cpp:
+        (WebCore::LayoutState::LayoutState):
+        (WebCore::LayoutState::computePaginationInformation):
+        (WebCore::LayoutState::establishLineGrid):
+        (WebCore::LayoutStateDisabler::LayoutStateDisabler):
+        * rendering/LayoutState.h:
+
 2018-04-24  Mark Lam  <mark.lam@apple.com>
 
         Need to acquire the VM lock before calling toNumber on a JSValue.
index 47fe08a..038853e 100644 (file)
@@ -1217,7 +1217,7 @@ layout/FloatingContext.cpp
 layout/FloatingState.cpp
 layout/FormattingContext.cpp
 layout/FormattingState.cpp
-layout/LayoutCtx.cpp
+layout/LayoutContext.cpp
 layout/blockformatting/BlockFormattingContext.cpp
 layout/blockformatting/BlockFormattingState.cpp
 layout/blockformatting/BlockMarginCollapse.cpp
@@ -1361,10 +1361,10 @@ page/FrameDestructionObserver.cpp
 page/FrameSnapshotting.cpp
 page/FrameTree.cpp
 page/FrameView.cpp
+page/FrameViewLayoutContext.cpp
 page/History.cpp
 page/IntersectionObserver.cpp
 page/IntersectionObserverEntry.cpp
-page/LayoutContext.cpp
 page/Location.cpp
 page/MemoryRelease.cpp
 page/MouseEventWithHitTestResults.cpp
index 0e809d3..555e857 100644 (file)
                10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */; };
                112B34D51E60B98300BB310A /* SimpleLineLayoutPagination.h in Headers */ = {isa = PBXBuildFile; fileRef = 112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */; };
                113409DA203E038000C66915 /* RenderTreeBuilderContinuation.h in Headers */ = {isa = PBXBuildFile; fileRef = 113409D8203E038000C66915 /* RenderTreeBuilderContinuation.h */; };
-               113D0B521F9FDD2B00F611BB /* LayoutContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 113D0B501F9FDD2B00F611BB /* LayoutContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               113D0B521F9FDD2B00F611BB /* FrameViewLayoutContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 113D0B501F9FDD2B00F611BB /* FrameViewLayoutContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
                115CFA6A208AF7D0001E6991 /* FormattingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA68208AF7D0001E6991 /* FormattingContext.h */; };
                115CFA6E208AFAB7001E6991 /* BlockFormattingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA6C208AFAB6001E6991 /* BlockFormattingContext.h */; };
                115CFA76208AFE30001E6991 /* FormattingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA74208AFE30001E6991 /* FormattingState.h */; };
                6ED8C37A183BFF8C009E53BD /* BoxShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ED8C378183BFF8C009E53BD /* BoxShape.h */; settings = {ATTRIBUTES = (Private, ); }; };
                6EE8A77310F803F3005A4A24 /* JSWebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */; };
                6F222B761AB52D8A0094651A /* WebGLVertexArrayObjectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6F222B751AB52D8A0094651A /* WebGLVertexArrayObjectBase.cpp */; };
-               6F7CA3C6208C2957002F29AB /* LayoutCtx.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F7CA3C4208C2956002F29AB /* LayoutCtx.h */; };
-               6F7CA3C7208C2957002F29AB /* LayoutCtx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6F7CA3C5208C2956002F29AB /* LayoutCtx.cpp */; };
+               6F7CA3C6208C2957002F29AB /* LayoutContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F7CA3C4208C2956002F29AB /* LayoutContext.h */; };
+               6F7CA3C7208C2957002F29AB /* LayoutContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6F7CA3C5208C2956002F29AB /* LayoutContext.cpp */; };
                6F7CA3CA208C2B2E002F29AB /* InlineFormattingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F7CA3C8208C2B2E002F29AB /* InlineFormattingContext.h */; };
                6F7CA3CB208C2B2E002F29AB /* InlineFormattingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6F7CA3C9208C2B2E002F29AB /* InlineFormattingContext.cpp */; };
                6F995A151A70756200A735F4 /* WebGLSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6F995A131A70756200A735F4 /* WebGLSync.cpp */; };
                112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutPagination.h; sourceTree = "<group>"; };
                113409D7203E038000C66915 /* RenderTreeBuilderContinuation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeBuilderContinuation.cpp; sourceTree = "<group>"; };
                113409D8203E038000C66915 /* RenderTreeBuilderContinuation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderTreeBuilderContinuation.h; sourceTree = "<group>"; };
-               113D0B4F1F9FDD2B00F611BB /* LayoutContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutContext.cpp; sourceTree = "<group>"; };
-               113D0B501F9FDD2B00F611BB /* LayoutContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutContext.h; sourceTree = "<group>"; };
+               113D0B4F1F9FDD2B00F611BB /* FrameViewLayoutContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FrameViewLayoutContext.cpp; sourceTree = "<group>"; };
+               113D0B501F9FDD2B00F611BB /* FrameViewLayoutContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FrameViewLayoutContext.h; sourceTree = "<group>"; };
                115CFA68208AF7D0001E6991 /* FormattingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FormattingContext.h; sourceTree = "<group>"; };
                115CFA69208AF7D0001E6991 /* FormattingContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FormattingContext.cpp; sourceTree = "<group>"; };
                115CFA6C208AFAB6001E6991 /* BlockFormattingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BlockFormattingContext.h; sourceTree = "<group>"; };
                6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLContextAttributes.h; sourceTree = "<group>"; };
                6F222B741AB52D640094651A /* WebGLVertexArrayObjectBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGLVertexArrayObjectBase.h; sourceTree = "<group>"; };
                6F222B751AB52D8A0094651A /* WebGLVertexArrayObjectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLVertexArrayObjectBase.cpp; sourceTree = "<group>"; };
-               6F7CA3C4208C2956002F29AB /* LayoutCtx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutCtx.h; sourceTree = "<group>"; };
-               6F7CA3C5208C2956002F29AB /* LayoutCtx.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutCtx.cpp; sourceTree = "<group>"; };
+               6F7CA3C4208C2956002F29AB /* LayoutContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutContext.h; sourceTree = "<group>"; };
+               6F7CA3C5208C2956002F29AB /* LayoutContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutContext.cpp; sourceTree = "<group>"; };
                6F7CA3C8208C2B2E002F29AB /* InlineFormattingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InlineFormattingContext.h; sourceTree = "<group>"; };
                6F7CA3C9208C2B2E002F29AB /* InlineFormattingContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InlineFormattingContext.cpp; sourceTree = "<group>"; };
                6F995A091A7070E600A735F4 /* WebGLQuery.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLQuery.idl; sourceTree = "<group>"; };
                                115CFA68208AF7D0001E6991 /* FormattingContext.h */,
                                115CFA75208AFE30001E6991 /* FormattingState.cpp */,
                                115CFA74208AFE30001E6991 /* FormattingState.h */,
-                               6F7CA3C5208C2956002F29AB /* LayoutCtx.cpp */,
-                               6F7CA3C4208C2956002F29AB /* LayoutCtx.h */,
+                               6F7CA3C5208C2956002F29AB /* LayoutContext.cpp */,
+                               6F7CA3C4208C2956002F29AB /* LayoutContext.h */,
                        );
                        path = layout;
                        sourceTree = "<group>";
                                65A21483097A3F5300B9050A /* FrameTree.h */,
                                65CBFEF70974F607001DAC25 /* FrameView.cpp */,
                                65CBFEF80974F607001DAC25 /* FrameView.h */,
+                               113D0B4F1F9FDD2B00F611BB /* FrameViewLayoutContext.cpp */,
+                               113D0B501F9FDD2B00F611BB /* FrameViewLayoutContext.h */,
                                574D42791D594FF6002CF50E /* GlobalCrypto.idl */,
                                46B95191207D632D00A7D2DD /* GlobalFrameIdentifier.h */,
                                7C9892451F5A07650091DC70 /* GlobalPerformance.idl */,
                                0F4710D91DB6FE22002DCEC3 /* IntersectionObserverEntry.h */,
                                0F4710DA1DB6FE22002DCEC3 /* IntersectionObserverEntry.idl */,
                                E4916FF6195DF6A0005AB349 /* LayerFlushThrottleState.h */,
-                               113D0B4F1F9FDD2B00F611BB /* LayoutContext.cpp */,
-                               113D0B501F9FDD2B00F611BB /* LayoutContext.h */,
                                931D72F515FE695300C4C07E /* LayoutMilestones.h */,
                                BCE1C41A0D982980003B02F2 /* Location.cpp */,
                                BCE1C4190D982980003B02F2 /* Location.h */,
                                1199FA4B208E37B6002358CC /* LayoutBlockContainer.h in Headers */,
                                115CFA97208B952B001E6991 /* LayoutBox.h in Headers */,
                                1199FA46208E35A3002358CC /* LayoutContainer.h in Headers */,
-                               113D0B521F9FDD2B00F611BB /* LayoutContext.h in Headers */,
-                               6F7CA3C6208C2957002F29AB /* LayoutCtx.h in Headers */,
+                               113D0B521F9FDD2B00F611BB /* FrameViewLayoutContext.h in Headers */,
+                               6F7CA3C6208C2957002F29AB /* LayoutContext.h in Headers */,
                                1199FA53208E38D3002358CC /* LayoutInlineBox.h in Headers */,
                                1199FA4F208E3899002358CC /* LayoutInlineContainer.h in Headers */,
                                931D72F615FE695300C4C07E /* LayoutMilestones.h in Headers */,
                                6F7CA3CB208C2B2E002F29AB /* InlineFormattingContext.cpp in Sources */,
                                538EC93E1F99BF5A004D22A8 /* JSQuickTimePluginReplacement.cpp in Sources */,
                                935C477009AC4D7300A6AAB4 /* KeyEventMac.mm in Sources */,
-                               6F7CA3C7208C2957002F29AB /* LayoutCtx.cpp in Sources */,
+                               6F7CA3C7208C2957002F29AB /* LayoutContext.cpp in Sources */,
                                CDA98E0B1603CD6000FEA3B1 /* LegacyCDM.cpp in Sources */,
                                CDE8B5EC1A69777300B4B66A /* LegacyCDMPrivateClearKey.cpp in Sources */,
                                CDCA98EB18B2C8EB00C12FF9 /* LegacyCDMPrivateMediaPlayer.cpp in Sources */,
similarity index 98%
rename from Source/WebCore/layout/LayoutCtx.cpp
rename to Source/WebCore/layout/LayoutContext.cpp
index 3763f07..386b85c 100644 (file)
@@ -24,4 +24,4 @@
  */
 
 #include "config.h"
-#include "LayoutCtx.h"
+#include "LayoutContext.h"
index e5c6a3c..ff3b8aa 100644 (file)
@@ -1309,7 +1309,7 @@ void FrameView::didLayout(WeakPtr<RenderElement> layoutRoot)
 
 bool FrameView::shouldDeferScrollUpdateAfterContentSizeChange()
 {
-    return (layoutContext().layoutPhase() < LayoutContext::LayoutPhase::InPostLayout) && (layoutContext().layoutPhase() != LayoutContext::LayoutPhase::OutsideLayout);
+    return (layoutContext().layoutPhase() < FrameViewLayoutContext::LayoutPhase::InPostLayout) && (layoutContext().layoutPhase() != FrameViewLayoutContext::LayoutPhase::OutsideLayout);
 }
 
 RenderBox* FrameView::embeddedContentBox() const
@@ -1677,7 +1677,7 @@ void FrameView::updateLayoutViewport()
     
     // Don't update the layout viewport if we're in the middle of adjusting scrollbars. We'll get another call
     // as a post-layout task.
-    if (layoutContext().layoutPhase() == LayoutContext::LayoutPhase::InViewSizeAdjust)
+    if (layoutContext().layoutPhase() == FrameViewLayoutContext::LayoutPhase::InViewSizeAdjust)
         return;
 
     LayoutRect layoutViewport = layoutViewportRect();
@@ -2470,7 +2470,7 @@ void FrameView::resumeVisibleImageAnimationsIncludingSubframes()
 void FrameView::updateLayerPositionsAfterScrolling()
 {
     // If we're scrolling as a result of updating the view size after layout, we'll update widgets and layer positions soon anyway.
-    if (layoutContext().layoutPhase() == LayoutContext::LayoutPhase::InViewSizeAdjust)
+    if (layoutContext().layoutPhase() == FrameViewLayoutContext::LayoutPhase::InViewSizeAdjust)
         return;
 
     if (!layoutContext().isLayoutNested() && hasViewportConstrainedObjects()) {
@@ -2510,7 +2510,7 @@ bool FrameView::shouldUpdateCompositingLayersAfterScrolling() const
 
 void FrameView::updateCompositingLayersAfterScrolling()
 {
-    ASSERT(layoutContext().layoutPhase() >= LayoutContext::LayoutPhase::InPostLayout || layoutContext().layoutPhase() == LayoutContext::LayoutPhase::OutsideLayout);
+    ASSERT(layoutContext().layoutPhase() >= FrameViewLayoutContext::LayoutPhase::InPostLayout || layoutContext().layoutPhase() == FrameViewLayoutContext::LayoutPhase::OutsideLayout);
 
     if (!shouldUpdateCompositingLayersAfterScrolling())
         return;
@@ -2618,7 +2618,7 @@ void FrameView::availableContentSizeChanged(AvailableSizeChangeReason reason)
         // FIXME: Merge this logic with m_setNeedsLayoutWasDeferred and find a more appropriate
         // way of handling potential recursive layouts when the viewport is resized to accomodate
         // the content but the content always overflows the viewport. See webkit.org/b/165781.
-        if (!(layoutContext().layoutPhase() == LayoutContext::LayoutPhase::InViewSizeAdjust && useFixedLayout()))
+        if (!(layoutContext().layoutPhase() == FrameViewLayoutContext::LayoutPhase::InViewSizeAdjust && useFixedLayout()))
             document->updateViewportUnitsOnResize();
     }
 
index ec9c902..70e0674 100644 (file)
@@ -27,7 +27,7 @@
 #include "AdjustViewSizeOrNot.h"
 #include "Color.h"
 #include "ContainerNode.h"
-#include "LayoutContext.h"
+#include "FrameViewLayoutContext.h"
 #include "LayoutMilestones.h"
 #include "LayoutRect.h"
 #include "Pagination.h"
@@ -73,7 +73,7 @@ class FrameView final : public ScrollView {
 public:
     friend class RenderView;
     friend class Internals;
-    friend class LayoutContext;
+    friend class FrameViewLayoutContext;
 
     WEBCORE_EXPORT static Ref<FrameView> create(Frame&);
     static Ref<FrameView> create(Frame&, const IntSize& initialSize);
@@ -109,8 +109,8 @@ public:
     void setContentsSize(const IntSize&) final;
     void updateContentsSize() final;
 
-    const LayoutContext& layoutContext() const { return m_layoutContext; }
-    LayoutContext& layoutContext() { return m_layoutContext; }
+    const FrameViewLayoutContext& layoutContext() const { return m_layoutContext; }
+    FrameViewLayoutContext& layoutContext() { return m_layoutContext; }
 
     WEBCORE_EXPORT bool didFirstLayout() const;
     void queuePostLayoutCallback(WTF::Function<void ()>&&);
@@ -912,7 +912,7 @@ private:
     IntRect* m_cachedWindowClipRect { nullptr };
     Vector<WTF::Function<void ()>> m_postLayoutCallbackQueue;
 
-    LayoutContext m_layoutContext;
+    FrameViewLayoutContext m_layoutContext;
 };
 
 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
similarity index 87%
rename from Source/WebCore/page/LayoutContext.cpp
rename to Source/WebCore/page/FrameViewLayoutContext.cpp
index 0d681df..a1d5d12 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "LayoutContext.h"
+#include "FrameViewLayoutContext.h"
 
 #include "CSSAnimationController.h"
 #include "DebugPageOverlays.h"
@@ -91,9 +91,9 @@ private:
 
 class LayoutScope {
 public:
-    LayoutScope(LayoutContext& layoutContext)
+    LayoutScope(FrameViewLayoutContext& layoutContext)
         : m_view(layoutContext.view())
-        , m_nestedState(layoutContext.m_layoutNestedState, layoutContext.m_layoutNestedState == LayoutContext::LayoutNestedState::NotInLayout ? LayoutContext::LayoutNestedState::NotNested : LayoutContext::LayoutNestedState::Nested)
+        , m_nestedState(layoutContext.m_layoutNestedState, layoutContext.m_layoutNestedState == FrameViewLayoutContext::LayoutNestedState::NotInLayout ? FrameViewLayoutContext::LayoutNestedState::NotNested : FrameViewLayoutContext::LayoutNestedState::Nested)
         , m_schedulingIsEnabled(layoutContext.m_layoutSchedulingIsEnabled, false)
         , m_inProgrammaticScroll(layoutContext.view().inProgrammaticScroll())
     {
@@ -107,25 +107,25 @@ public:
         
 private:
     FrameView& m_view;
-    SetForScope<LayoutContext::LayoutNestedState> m_nestedState;
+    SetForScope<FrameViewLayoutContext::LayoutNestedState> m_nestedState;
     SetForScope<bool> m_schedulingIsEnabled;
     bool m_inProgrammaticScroll { false };
 };
 
-LayoutContext::LayoutContext(FrameView& frameView)
+FrameViewLayoutContext::FrameViewLayoutContext(FrameView& frameView)
     : m_frameView(frameView)
-    , m_layoutTimer(*this, &LayoutContext::layoutTimerFired)
-    , m_asynchronousTasksTimer(*this, &LayoutContext::runAsynchronousTasks)
+    , m_layoutTimer(*this, &FrameViewLayoutContext::layoutTimerFired)
+    , m_asynchronousTasksTimer(*this, &FrameViewLayoutContext::runAsynchronousTasks)
 {
 }
 
-LayoutContext::~LayoutContext()
+FrameViewLayoutContext::~FrameViewLayoutContext()
 {
 }
 
-void LayoutContext::layout()
+void FrameViewLayoutContext::layout()
 {
-    LOG_WITH_STREAM(Layout, stream << "FrameView " << &view() << " LayoutContext::layout() with size " << view().layoutSize());
+    LOG_WITH_STREAM(Layout, stream << "FrameView " << &view() << " FrameViewLayoutContext::layout() with size " << view().layoutSize());
 
     RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!frame().document()->inRenderTreeUpdate() || ScriptDisallowedScope::LayoutAssertionDisableScope::shouldDisable());
     ASSERT(LayoutDisallowedScope::isLayoutAllowed());
@@ -219,7 +219,7 @@ void LayoutContext::layout()
     DebugPageOverlays::didLayout(view().frame());
 }
 
-void LayoutContext::runOrScheduleAsynchronousTasks()
+void FrameViewLayoutContext::runOrScheduleAsynchronousTasks()
 {
     if (m_asynchronousTasksTimer.isActive())
         return;
@@ -248,7 +248,7 @@ void LayoutContext::runOrScheduleAsynchronousTasks()
     }
 }
 
-void LayoutContext::runAsynchronousTasks()
+void FrameViewLayoutContext::runAsynchronousTasks()
 {
     m_asynchronousTasksTimer.stop();
     if (m_inAsynchronousTasks)
@@ -257,14 +257,14 @@ void LayoutContext::runAsynchronousTasks()
     view().performPostLayoutTasks();
 }
 
-void LayoutContext::flushAsynchronousTasks()
+void FrameViewLayoutContext::flushAsynchronousTasks()
 {
     if (!m_asynchronousTasksTimer.isActive())
         return;
     runAsynchronousTasks();
 }
 
-void LayoutContext::reset()
+void FrameViewLayoutContext::reset()
 {
     m_layoutPhase = LayoutPhase::OutsideLayout;
     clearSubtreeLayoutRoot();
@@ -277,7 +277,7 @@ void LayoutContext::reset()
     m_needsFullRepaint = true;
 }
 
-bool LayoutContext::needsLayout() const
+bool FrameViewLayoutContext::needsLayout() const
 {
     // This can return true in cases where the document does not have a body yet.
     // Document::shouldScheduleLayout takes care of preventing us from scheduling
@@ -289,7 +289,7 @@ bool LayoutContext::needsLayout() const
         || (m_disableSetNeedsLayoutCount && m_setNeedsLayoutWasDeferred);
 }
 
-void LayoutContext::setNeedsLayout()
+void FrameViewLayoutContext::setNeedsLayout()
 {
     if (m_disableSetNeedsLayoutCount) {
         m_setNeedsLayoutWasDeferred = true;
@@ -302,19 +302,19 @@ void LayoutContext::setNeedsLayout()
     }
 }
 
-void LayoutContext::enableSetNeedsLayout()
+void FrameViewLayoutContext::enableSetNeedsLayout()
 {
     ASSERT(m_disableSetNeedsLayoutCount);
     if (!--m_disableSetNeedsLayoutCount)
         m_setNeedsLayoutWasDeferred = false; // FIXME: Find a way to make the deferred layout actually happen.
 }
 
-void LayoutContext::disableSetNeedsLayout()
+void FrameViewLayoutContext::disableSetNeedsLayout()
 {
     ++m_disableSetNeedsLayoutCount;
 }
 
-void LayoutContext::scheduleLayout()
+void FrameViewLayoutContext::scheduleLayout()
 {
     // FIXME: We should assert the page is not in the page cache, but that is causing
     // too many false assertions. See <rdar://problem/7218118>.
@@ -351,7 +351,7 @@ void LayoutContext::scheduleLayout()
     m_layoutTimer.startOneShot(delay);
 }
 
-void LayoutContext::unscheduleLayout()
+void FrameViewLayoutContext::unscheduleLayout()
 {
     if (m_asynchronousTasksTimer.isActive())
         m_asynchronousTasksTimer.stop();
@@ -368,7 +368,7 @@ void LayoutContext::unscheduleLayout()
     m_delayedLayout = false;
 }
 
-void LayoutContext::scheduleSubtreeLayout(RenderElement& layoutRoot)
+void FrameViewLayoutContext::scheduleSubtreeLayout(RenderElement& layoutRoot)
 {
     ASSERT(renderView());
     auto& renderView = *this->renderView();
@@ -424,7 +424,7 @@ void LayoutContext::scheduleSubtreeLayout(RenderElement& layoutRoot)
     InspectorInstrumentation::didInvalidateLayout(frame());
 }
 
-void LayoutContext::layoutTimerFired()
+void FrameViewLayoutContext::layoutTimerFired()
 {
 #if !LOG_DISABLED
     if (!frame().document()->ownerElement())
@@ -433,19 +433,19 @@ void LayoutContext::layoutTimerFired()
     layout();
 }
 
-void LayoutContext::convertSubtreeLayoutToFullLayout()
+void FrameViewLayoutContext::convertSubtreeLayoutToFullLayout()
 {
     ASSERT(subtreeLayoutRoot());
     subtreeLayoutRoot()->markContainingBlocksForLayout(ScheduleRelayout::No);
     clearSubtreeLayoutRoot();
 }
 
-void LayoutContext::setSubtreeLayoutRoot(RenderElement& layoutRoot)
+void FrameViewLayoutContext::setSubtreeLayoutRoot(RenderElement& layoutRoot)
 {
     m_subtreeLayoutRoot = makeWeakPtr(layoutRoot);
 }
 
-bool LayoutContext::canPerformLayout() const
+bool FrameViewLayoutContext::canPerformLayout() const
 {
     if (isInRenderTreeLayout())
         return false;
@@ -463,7 +463,7 @@ bool LayoutContext::canPerformLayout() const
 }
 
 #if ENABLE(TEXT_AUTOSIZING)
-void LayoutContext::applyTextSizingIfNeeded(RenderElement& layoutRoot)
+void FrameViewLayoutContext::applyTextSizingIfNeeded(RenderElement& layoutRoot)
 {
     auto& settings = layoutRoot.settings();
     if (!settings.textAutosizingEnabled() || renderView()->printing())
@@ -484,7 +484,7 @@ void LayoutContext::applyTextSizingIfNeeded(RenderElement& layoutRoot)
 }
 #endif
 
-void LayoutContext::updateStyleForLayout()
+void FrameViewLayoutContext::updateStyleForLayout()
 {
     Document& document = *frame().document();
 
@@ -504,7 +504,7 @@ void LayoutContext::updateStyleForLayout()
     document.updateStyleIfNeeded();
 }
 
-bool LayoutContext::handleLayoutWithFrameFlatteningIfNeeded()
+bool FrameViewLayoutContext::handleLayoutWithFrameFlatteningIfNeeded()
 {
     if (!view().isInChildFrameWithFrameFlattening())
         return false;
@@ -514,7 +514,7 @@ bool LayoutContext::handleLayoutWithFrameFlatteningIfNeeded()
     return !layoutRoot || !layoutRoot->needsLayout();
 }
 
-void LayoutContext::startLayoutAtMainFrameViewIfNeeded()
+void FrameViewLayoutContext::startLayoutAtMainFrameViewIfNeeded()
 {
     // When we start a layout at the child level as opposed to the topmost frame view and this child
     // frame requires flattening, we need to re-initiate the layout at the topmost view. Layout
@@ -538,21 +538,21 @@ void LayoutContext::startLayoutAtMainFrameViewIfNeeded()
     parentView->layoutContext().layout();
 }
 
-LayoutSize LayoutContext::layoutDelta() const
+LayoutSize FrameViewLayoutContext::layoutDelta() const
 {
     if (auto* layoutState = this->layoutState())
         return layoutState->layoutDelta();
     return { };
 }
     
-void LayoutContext::addLayoutDelta(const LayoutSize& delta)
+void FrameViewLayoutContext::addLayoutDelta(const LayoutSize& delta)
 {
     if (auto* layoutState = this->layoutState())
         layoutState->addLayoutDelta(delta);
 }
     
 #if !ASSERT_DISABLED
-bool LayoutContext::layoutDeltaMatches(const LayoutSize& delta)
+bool FrameViewLayoutContext::layoutDeltaMatches(const LayoutSize& delta)
 {
     if (auto* layoutState = this->layoutState())
         return layoutState->layoutDeltaMatches(delta);
@@ -560,14 +560,14 @@ bool LayoutContext::layoutDeltaMatches(const LayoutSize& delta)
 }
 #endif
 
-LayoutState* LayoutContext::layoutState() const
+LayoutState* FrameViewLayoutContext::layoutState() const
 {
     if (m_layoutStateStack.isEmpty())
         return nullptr;
     return m_layoutStateStack.last().get();
 }
 
-void LayoutContext::pushLayoutState(RenderElement& root)
+void FrameViewLayoutContext::pushLayoutState(RenderElement& root)
 {
     ASSERT(!m_paintOffsetCacheDisableCount);
     ASSERT(!layoutState());
@@ -575,7 +575,7 @@ void LayoutContext::pushLayoutState(RenderElement& root)
     m_layoutStateStack.append(std::make_unique<LayoutState>(root));
 }
 
-bool LayoutContext::pushLayoutStateForPaginationIfNeeded(RenderBlockFlow& layoutRoot)
+bool FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded(RenderBlockFlow& layoutRoot)
 {
     if (layoutState())
         return false;
@@ -583,7 +583,7 @@ bool LayoutContext::pushLayoutStateForPaginationIfNeeded(RenderBlockFlow& layout
     return true;
 }
     
-bool LayoutContext::pushLayoutState(RenderBox& renderer, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged)
+bool FrameViewLayoutContext::pushLayoutState(RenderBox& renderer, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged)
 {
     // We push LayoutState even if layoutState is disabled because it stores layoutDelta too.
     auto* layoutState = this->layoutState();
@@ -595,35 +595,35 @@ bool LayoutContext::pushLayoutState(RenderBox& renderer, const LayoutSize& offse
     return false;
 }
     
-void LayoutContext::popLayoutState()
+void FrameViewLayoutContext::popLayoutState()
 {
     m_layoutStateStack.removeLast();
 }
     
 #ifndef NDEBUG
-void LayoutContext::checkLayoutState()
+void FrameViewLayoutContext::checkLayoutState()
 {
     ASSERT(layoutDeltaMatches(LayoutSize()));
     ASSERT(!m_paintOffsetCacheDisableCount);
 }
 #endif
 
-Frame& LayoutContext::frame() const
+Frame& FrameViewLayoutContext::frame() const
 {
     return view().frame();
 }
 
-FrameView& LayoutContext::view() const
+FrameView& FrameViewLayoutContext::view() const
 {
     return m_frameView;
 }
 
-RenderView* LayoutContext::renderView() const
+RenderView* FrameViewLayoutContext::renderView() const
 {
     return view().renderView();
 }
 
-Document* LayoutContext::document() const
+Document* FrameViewLayoutContext::document() const
 {
     return frame().document();
 }
similarity index 98%
rename from Source/WebCore/page/LayoutContext.h
rename to Source/WebCore/page/FrameViewLayoutContext.h
index 52b01ca..394276a 100644 (file)
@@ -44,10 +44,10 @@ class RenderObject;
 class RenderElement;
 class RenderView;
     
-class LayoutContext {
+class FrameViewLayoutContext {
 public:
-    LayoutContext(FrameView&);
-    ~LayoutContext();
+    FrameViewLayoutContext(FrameView&);
+    ~FrameViewLayoutContext();
 
     void layout();
 
index c74e72d..879022e 100644 (file)
@@ -64,7 +64,7 @@ LayoutState::LayoutState(RenderElement& renderer, IsPaginated isPaginated)
     }
 }
 
-LayoutState::LayoutState(const LayoutContext::LayoutStateStack& layoutStateStack, RenderBox& renderer, const LayoutSize& offset, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged)
+LayoutState::LayoutState(const FrameViewLayoutContext::LayoutStateStack& layoutStateStack, RenderBox& renderer, const LayoutSize& offset, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged)
     : m_clipped(false)
     , m_isPaginated(false)
     , m_pageLogicalHeightChanged(false)
@@ -133,7 +133,7 @@ void LayoutState::computeClipRect(const LayoutState& ancestor, RenderBox& render
     // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
 }
 
-void LayoutState::computePaginationInformation(const LayoutContext::LayoutStateStack& layoutStateStack, RenderBox& renderer, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged)
+void LayoutState::computePaginationInformation(const FrameViewLayoutContext::LayoutStateStack& layoutStateStack, RenderBox& renderer, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged)
 {
     auto* ancestor = layoutStateStack.isEmpty() ? nullptr : layoutStateStack.last().get();
     // If we establish a new page height, then cache the offset to the top of the first page.
@@ -230,7 +230,7 @@ void LayoutState::propagateLineGridInfo(const LayoutState& ancestor, RenderBox&
     m_lineGridPaginationOrigin = ancestor.lineGridPaginationOrigin();
 }
 
-void LayoutState::establishLineGrid(const LayoutContext::LayoutStateStack& layoutStateStack, RenderBlockFlow& renderer)
+void LayoutState::establishLineGrid(const FrameViewLayoutContext::LayoutStateStack& layoutStateStack, RenderBlockFlow& renderer)
 {
     // First check to see if this grid has been established already.
     if (m_lineGrid) {
@@ -291,7 +291,7 @@ LayoutStateMaintainer::~LayoutStateMaintainer()
         m_context.enablePaintOffsetCache();
 }
 
-LayoutStateDisabler::LayoutStateDisabler(LayoutContext& context)
+LayoutStateDisabler::LayoutStateDisabler(FrameViewLayoutContext& context)
     : m_context(context)
 {
     m_context.disablePaintOffsetCache();
index 3d3c973..8a430b0 100644 (file)
 
 #pragma once
 
-#include "LayoutContext.h"
+#include "FrameViewLayoutContext.h"
 #include "LayoutRect.h"
 #include <wtf/Noncopyable.h>
 
 namespace WebCore {
 
-class LayoutContext;
 class RenderBlockFlow;
 class RenderBox;
 class RenderElement;
@@ -53,7 +52,7 @@ public:
 #endif
     {
     }
-    LayoutState(const LayoutContext::LayoutStateStack&, RenderBox&, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged);
+    LayoutState(const FrameViewLayoutContext::LayoutStateStack&, RenderBox&, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged);
     enum class IsPaginated { No, Yes };
     explicit LayoutState(RenderElement&, IsPaginated = IsPaginated::No);
 
@@ -92,10 +91,10 @@ public:
 private:
     void computeOffsets(const LayoutState& ancestor, RenderBox&, LayoutSize offset);
     void computeClipRect(const LayoutState& ancestor, RenderBox&);
-    // FIXME: webkit.org/b/179440 these functions should be part of the pagination code/LayoutContext.
-    void computePaginationInformation(const LayoutContext::LayoutStateStack&, RenderBox&, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged);
+    // FIXME: webkit.org/b/179440 these functions should be part of the pagination code/FrameViewLayoutContext.
+    void computePaginationInformation(const FrameViewLayoutContext::LayoutStateStack&, RenderBox&, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged);
     void propagateLineGridInfo(const LayoutState& ancestor, RenderBox&);
-    void establishLineGrid(const LayoutContext::LayoutStateStack&, RenderBlockFlow&);
+    void establishLineGrid(const FrameViewLayoutContext::LayoutStateStack&, RenderBlockFlow&);
     void computeLineGridPaginationOrigin(const RenderMultiColumnFlow&);
 
     // Do not add anything apart from bitfields. See https://bugs.webkit.org/show_bug.cgi?id=100173
@@ -142,7 +141,7 @@ public:
     ~LayoutStateMaintainer();
 
 private:
-    LayoutContext& m_context;
+    FrameViewLayoutContext& m_context;
     bool m_paintOffsetCacheIsDisabled { false };
     bool m_didPushLayoutState { false };
 };
@@ -153,18 +152,18 @@ public:
     ~SubtreeLayoutStateMaintainer();
 
 private:
-    LayoutContext* m_context { nullptr };
+    FrameViewLayoutContext* m_context { nullptr };
     bool m_didDisablePaintOffsetCache { false };
 };
 
 class LayoutStateDisabler {
     WTF_MAKE_NONCOPYABLE(LayoutStateDisabler);
 public:
-    LayoutStateDisabler(LayoutContext&);
+    LayoutStateDisabler(FrameViewLayoutContext&);
     ~LayoutStateDisabler();
 
 private:
-    LayoutContext& m_context;
+    FrameViewLayoutContext& m_context;
 };
 
 class PaginatedLayoutStateMaintainer {
@@ -173,7 +172,7 @@ public:
     ~PaginatedLayoutStateMaintainer();
 
 private:
-    LayoutContext& m_context;
+    FrameViewLayoutContext& m_context;
     bool m_pushed { false };
 };