Skip to content
Permalink
Browse files
[FrameView::layout cleanup] Move core layout logic to a separate class.
https://bugs.webkit.org/show_bug.cgi?id=178771
<rdar://problem/35166542>

Reviewed by Simon Fraser.

Move layout code out from FrameView to LayoutContext.

Source/WebCore:

LayoutContext holds all the layout related logic (scheduling, needsLayout, handling layout states),
while scrolling, view sizing methods stay in FrameView.
Having a dedicated LayoutContext allows to structure the code better.

Covered by existing tests.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::rendererNeedsDeferredUpdate):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::updateBackingStore):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement const):
(WebCore::AccessibilityRenderObject::layoutCount const):
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::resolveStyle):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayout):
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
(WebCore::Document::implicitClose):
(WebCore::Document::isLayoutTimerActive):
* dom/Element.cpp:
(WebCore::Element::absoluteEventHandlerBounds):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin const):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didAttachRenderers):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopForUserCancel):
* page/Frame.cpp:
(WebCore::Frame::setView):
(WebCore::Frame::clearTimers):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::~FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::resetScrollbars):
(WebCore::FrameView::didFirstLayout const):
(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree):
(WebCore::FrameView::setContentsSize):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::updateCompositingLayersAfterStyleChange):
(WebCore::FrameView::topContentInsetDidChange):
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
(WebCore::FrameView::adjustScrollbarsForLayout):
(WebCore::FrameView::willDoLayout): This takes care of the view related task right before entering render tree layout.
(WebCore::FrameView::didLayout): post layout tasks.
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange):
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::maintainScrollPositionAtAnchor):
(WebCore::FrameView::updateLayerPositionsAfterScrolling):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::availableContentSizeChanged):
(WebCore::FrameView::updateContentsSize):
(WebCore::FrameView::needsLayout const):
(WebCore::FrameView::setNeedsLayout):
(WebCore::FrameView::scheduleSelectionUpdate):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::flushPostLayoutTasksQueue):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::paintControlTints):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
(WebCore::FrameView::enableAutoSizeMode):
(WebCore::FrameView::forceLayout):
(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer): Deleted.
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer): Deleted.
(WebCore::SubtreeLayoutStateMaintainer::shouldDisableLayoutStateForSubtree): Deleted.
(): Deleted.
(WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker): Deleted.
(WebCore::applyTextSizingIfNeeded): Deleted.
(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded): Deleted.
(WebCore::FrameView::updateStyleForLayout): Deleted.
(WebCore::FrameView::canPerformLayout const): Deleted.
(WebCore::FrameView::layout): Deleted.
(WebCore::FrameView::runOrSchedulePostLayoutTasks): Deleted.
(WebCore::FrameView::convertSubtreeLayoutToFullLayout): Deleted.
(WebCore::FrameView::layoutTimerFired): Deleted.
(WebCore::FrameView::scheduleRelayout): Deleted.
(WebCore::isObjectAncestorContainerOf): Deleted.
(WebCore::FrameView::scheduleRelayoutOfSubtree): Deleted.
(WebCore::FrameView::layoutPending const): Deleted.
(WebCore::FrameView::unscheduleRelayout): Deleted.
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded): Deleted.
* page/FrameView.h:
* page/LayoutContext.cpp: Added.
(WebCore::isObjectAncestorContainerOf):
(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::shouldDisableLayoutStateForSubtree):
(WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker):
(WebCore::LayoutScope::LayoutScope):
(WebCore::LayoutScope::~LayoutScope):
(WebCore::LayoutContext::LayoutContext):
(WebCore::LayoutContext::layout):
(WebCore::LayoutContext::runOrScheduleAsynchronousTasks):
(WebCore::LayoutContext::runAsynchronousTasks):
(WebCore::LayoutContext::flushAsynchronousTasks):
(WebCore::LayoutContext::reset):
(WebCore::LayoutContext::needsLayout const):
(WebCore::LayoutContext::setNeedsLayout):
(WebCore::LayoutContext::enableSetNeedsLayout):
(WebCore::LayoutContext::disableSetNeedsLayout):
(WebCore::LayoutContext::scheduleLayout):
(WebCore::LayoutContext::unscheduleLayout):
(WebCore::LayoutContext::scheduleSubtreeLayout):
(WebCore::LayoutContext::layoutTimerFired):
(WebCore::LayoutContext::convertSubtreeLayoutToFullLayout):
(WebCore::LayoutContext::setSubtreeLayoutRoot):
(WebCore::LayoutContext::canPerformLayout const):
(WebCore::LayoutContext::applyTextSizingIfNeeded):
(WebCore::LayoutContext::updateStyleForLayout):
(WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::LayoutContext::startLayoutAtMainFrameViewIfNeeded):
(WebCore::LayoutContext::frame const):
(WebCore::LayoutContext::view const):
(WebCore::LayoutContext::renderView const):
(WebCore::LayoutContext::document const):
* page/LayoutContext.h: Added.
(WebCore::LayoutContext::startDisallowingLayout):
(WebCore::LayoutContext::endDisallowingLayout):
(WebCore::LayoutContext::layoutPhase const):
(WebCore::LayoutContext::isLayoutNested const):
(WebCore::LayoutContext::layoutCount const):
(WebCore::LayoutContext::isLayoutPending const):
(WebCore::LayoutContext::isInLayout const):
(WebCore::LayoutContext::isInRenderTreeLayout const):
(WebCore::LayoutContext::inPaintableState const):
(WebCore::LayoutContext::subtreeLayoutRoot const):
(WebCore::LayoutContext::clearSubtreeLayoutRoot):
(WebCore::LayoutContext::resetFirstLayoutFlag):
(WebCore::LayoutContext::didFirstLayout const):
(WebCore::LayoutContext::setNeedsFullRepaint):
(WebCore::LayoutContext::needsFullRepaint const):
(WebCore::LayoutContext::layoutDisallowed const):
(WebCore::LayoutContext::isLayoutSchedulingEnabled const):
(WebCore::LayoutContext::inAsynchronousTasks const):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::insertPositionedObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::imageChanged):
(WebCore::RenderBox::computeLogicalWidthInFragment const):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::clearSubtreeLayoutRootIfNeeded const):
(WebCore::RenderElement::checkForRepaintDuringLayout const):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::performLayoutWithFlattening):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* rendering/RenderObject.cpp:
(WebCore::scheduleRelayoutForSubtree):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updatePlayer):
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::updateWidgetPosition):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
* testing/Internals.cpp:
(WebCore::Internals::layoutCount const):

Source/WebKitLegacy/mac:

* WebView/WebClipView.mm:
(-[WebClipView _immediateScrollToPoint:]):
* WebView/WebFrame.mm:
(-[WebFrame layoutCount]):

Source/WebKitLegacy/win:

* WebFrame.cpp:
(WebFrame::layout):


Canonical link: https://commits.webkit.org/195119@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
alanbujtas committed Oct 28, 2017
1 parent 70c4c83 commit 8421bc7ac25b99f393f654a8dd4ca49671fe7f59
Showing 36 changed files with 1,096 additions and 657 deletions.
@@ -1,3 +1,190 @@
2017-10-28 Zalan Bujtas <zalan@apple.com>

[FrameView::layout cleanup] Move core layout logic to a separate class.
https://bugs.webkit.org/show_bug.cgi?id=178771
<rdar://problem/35166542>

Reviewed by Simon Fraser.

Move layout code out from FrameView to LayoutContext.

LayoutContext holds all the layout related logic (scheduling, needsLayout, handling layout states),
while scrolling, view sizing methods stay in FrameView.
Having a dedicated LayoutContext allows to structure the code better.

Covered by existing tests.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::rendererNeedsDeferredUpdate):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::updateBackingStore):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement const):
(WebCore::AccessibilityRenderObject::layoutCount const):
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::resolveStyle):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayout):
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
(WebCore::Document::implicitClose):
(WebCore::Document::isLayoutTimerActive):
* dom/Element.cpp:
(WebCore::Element::absoluteEventHandlerBounds):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin const):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didAttachRenderers):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopForUserCancel):
* page/Frame.cpp:
(WebCore::Frame::setView):
(WebCore::Frame::clearTimers):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::~FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::resetScrollbars):
(WebCore::FrameView::didFirstLayout const):
(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree):
(WebCore::FrameView::setContentsSize):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::updateCompositingLayersAfterStyleChange):
(WebCore::FrameView::topContentInsetDidChange):
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
(WebCore::FrameView::adjustScrollbarsForLayout):
(WebCore::FrameView::willDoLayout): This takes care of the view related task right before entering render tree layout.
(WebCore::FrameView::didLayout): post layout tasks.
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange):
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::maintainScrollPositionAtAnchor):
(WebCore::FrameView::updateLayerPositionsAfterScrolling):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::availableContentSizeChanged):
(WebCore::FrameView::updateContentsSize):
(WebCore::FrameView::needsLayout const):
(WebCore::FrameView::setNeedsLayout):
(WebCore::FrameView::scheduleSelectionUpdate):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::flushPostLayoutTasksQueue):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::paintControlTints):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
(WebCore::FrameView::enableAutoSizeMode):
(WebCore::FrameView::forceLayout):
(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer): Deleted.
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer): Deleted.
(WebCore::SubtreeLayoutStateMaintainer::shouldDisableLayoutStateForSubtree): Deleted.
(): Deleted.
(WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker): Deleted.
(WebCore::applyTextSizingIfNeeded): Deleted.
(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded): Deleted.
(WebCore::FrameView::updateStyleForLayout): Deleted.
(WebCore::FrameView::canPerformLayout const): Deleted.
(WebCore::FrameView::layout): Deleted.
(WebCore::FrameView::runOrSchedulePostLayoutTasks): Deleted.
(WebCore::FrameView::convertSubtreeLayoutToFullLayout): Deleted.
(WebCore::FrameView::layoutTimerFired): Deleted.
(WebCore::FrameView::scheduleRelayout): Deleted.
(WebCore::isObjectAncestorContainerOf): Deleted.
(WebCore::FrameView::scheduleRelayoutOfSubtree): Deleted.
(WebCore::FrameView::layoutPending const): Deleted.
(WebCore::FrameView::unscheduleRelayout): Deleted.
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded): Deleted.
* page/FrameView.h:
* page/LayoutContext.cpp: Added.
(WebCore::isObjectAncestorContainerOf):
(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::shouldDisableLayoutStateForSubtree):
(WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker):
(WebCore::LayoutScope::LayoutScope):
(WebCore::LayoutScope::~LayoutScope):
(WebCore::LayoutContext::LayoutContext):
(WebCore::LayoutContext::layout):
(WebCore::LayoutContext::runOrScheduleAsynchronousTasks):
(WebCore::LayoutContext::runAsynchronousTasks):
(WebCore::LayoutContext::flushAsynchronousTasks):
(WebCore::LayoutContext::reset):
(WebCore::LayoutContext::needsLayout const):
(WebCore::LayoutContext::setNeedsLayout):
(WebCore::LayoutContext::enableSetNeedsLayout):
(WebCore::LayoutContext::disableSetNeedsLayout):
(WebCore::LayoutContext::scheduleLayout):
(WebCore::LayoutContext::unscheduleLayout):
(WebCore::LayoutContext::scheduleSubtreeLayout):
(WebCore::LayoutContext::layoutTimerFired):
(WebCore::LayoutContext::convertSubtreeLayoutToFullLayout):
(WebCore::LayoutContext::setSubtreeLayoutRoot):
(WebCore::LayoutContext::canPerformLayout const):
(WebCore::LayoutContext::applyTextSizingIfNeeded):
(WebCore::LayoutContext::updateStyleForLayout):
(WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::LayoutContext::startLayoutAtMainFrameViewIfNeeded):
(WebCore::LayoutContext::frame const):
(WebCore::LayoutContext::view const):
(WebCore::LayoutContext::renderView const):
(WebCore::LayoutContext::document const):
* page/LayoutContext.h: Added.
(WebCore::LayoutContext::startDisallowingLayout):
(WebCore::LayoutContext::endDisallowingLayout):
(WebCore::LayoutContext::layoutPhase const):
(WebCore::LayoutContext::isLayoutNested const):
(WebCore::LayoutContext::layoutCount const):
(WebCore::LayoutContext::isLayoutPending const):
(WebCore::LayoutContext::isInLayout const):
(WebCore::LayoutContext::isInRenderTreeLayout const):
(WebCore::LayoutContext::inPaintableState const):
(WebCore::LayoutContext::subtreeLayoutRoot const):
(WebCore::LayoutContext::clearSubtreeLayoutRoot):
(WebCore::LayoutContext::resetFirstLayoutFlag):
(WebCore::LayoutContext::didFirstLayout const):
(WebCore::LayoutContext::setNeedsFullRepaint):
(WebCore::LayoutContext::needsFullRepaint const):
(WebCore::LayoutContext::layoutDisallowed const):
(WebCore::LayoutContext::isLayoutSchedulingEnabled const):
(WebCore::LayoutContext::inAsynchronousTasks const):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::insertPositionedObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::imageChanged):
(WebCore::RenderBox::computeLogicalWidthInFragment const):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::clearSubtreeLayoutRootIfNeeded const):
(WebCore::RenderElement::checkForRepaintDuringLayout const):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::performLayoutWithFlattening):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* rendering/RenderObject.cpp:
(WebCore::scheduleRelayoutForSubtree):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updatePlayer):
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::updateWidgetPosition):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
* testing/Internals.cpp:
(WebCore::Internals::layoutCount const):

2017-10-28 Joseph Pecoraro <pecoraro@apple.com>

Cleanup PageDebuggable
@@ -1280,6 +1280,7 @@ page/FrameView.cpp
page/History.cpp
page/IntersectionObserver.cpp
page/IntersectionObserverEntry.cpp
page/LayoutContext.cpp
page/Location.cpp
page/MainFrame.cpp
page/MemoryRelease.cpp
@@ -388,6 +388,7 @@
0FFD4D6118651FA300512F6E /* AsyncScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FFD4D5F18651FA300512F6E /* AsyncScrollingCoordinator.h */; settings = {ATTRIBUTES = (Private, ); }; };
10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */; };
112B34D51E60B98300BB310A /* SimpleLineLayoutPagination.h in Headers */ = {isa = PBXBuildFile; fileRef = 112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */; };
113D0B521F9FDD2B00F611BB /* LayoutContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 113D0B501F9FDD2B00F611BB /* LayoutContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
11E067EE1E6246E500162D16 /* SimpleLineLayoutCoverage.h in Headers */ = {isa = PBXBuildFile; fileRef = 11E067ED1E6246E500162D16 /* SimpleLineLayoutCoverage.h */; settings = {ATTRIBUTES = (Private, ); }; };
1400D7A817136EA70077CE05 /* ScriptWrappableInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 1400D7A717136EA70077CE05 /* ScriptWrappableInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1403B99509EB13AF00797C7F /* DOMWindow.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -5523,6 +5524,8 @@
10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublicURLManager.h; sourceTree = "<group>"; };
112B34D01E60B8A700BB310A /* SimpleLineLayoutPagination.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleLineLayoutPagination.cpp; sourceTree = "<group>"; };
112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutPagination.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>"; };
11E067EB1E62461300162D16 /* SimpleLineLayoutCoverage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleLineLayoutCoverage.cpp; sourceTree = "<group>"; };
11E067ED1E6246E500162D16 /* SimpleLineLayoutCoverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutCoverage.h; sourceTree = "<group>"; };
1400D7A717136EA70077CE05 /* ScriptWrappableInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptWrappableInlines.h; sourceTree = "<group>"; };
@@ -18452,6 +18455,8 @@
0F4710D91DB6FE22002DCEC3 /* IntersectionObserverEntry.h */,
0F4710DA1DB6FE22002DCEC3 /* IntersectionObserverEntry.idl */,
E4916FF6195DF6A0005AB349 /* LayerFlushThrottleState.h */,
113D0B4F1F9FDD2B00F611BB /* LayoutContext.cpp */,
113D0B501F9FDD2B00F611BB /* LayoutContext.h */,
931D72F515FE695300C4C07E /* LayoutMilestones.h */,
BCE1C41A0D982980003B02F2 /* Location.cpp */,
BCE1C4190D982980003B02F2 /* Location.h */,
@@ -27985,6 +27990,7 @@
E4916FF7195DF6A0005AB349 /* LayerFlushThrottleState.h in Headers */,
580371641A66F1D300BAF519 /* LayerFragment.h in Headers */,
7AA3A6A0194B59B6001CBD24 /* LayerPool.h in Headers */,
113D0B521F9FDD2B00F611BB /* LayoutContext.h in Headers */,
931D72F615FE695300C4C07E /* LayoutMilestones.h in Headers */,
141DC051164834B900371E5A /* LayoutPoint.h in Headers */,
141DC053164834B900371E5A /* LayoutRect.h in Headers */,
@@ -2807,7 +2807,7 @@ static bool rendererNeedsDeferredUpdate(RenderObject& renderer)
{
ASSERT(!renderer.beingDestroyed());
auto& document = renderer.document();
return renderer.needsLayout() || document.needsStyleRecalc() || document.inRenderTreeUpdate() || (document.view() && document.view()->isInRenderTreeLayout());
return renderer.needsLayout() || document.needsStyleRecalc() || document.inRenderTreeUpdate() || (document.view() && document.view()->layoutContext().isInRenderTreeLayout());
}

void AXObjectCache::deferRecomputeIsIgnoredIfNeeded(Element* element)
@@ -1770,7 +1770,7 @@ void AccessibilityObject::updateBackingStore()
RefPtr<AccessibilityObject> protectedThis(this);

if (Document* document = this->document()) {
if (!document->view()->isInRenderTreeLayout())
if (!document->view()->layoutContext().isInRenderTreeLayout())
document->updateLayoutIgnorePendingStylesheets();
}

@@ -674,7 +674,7 @@ String AccessibilityRenderObject::textUnderElement(AccessibilityTextUnderElement
// Renders referenced by accessibility objects could get destroyed, if TextIterator ends up triggering
// style update/layout here. See also AXObjectCache::deferTextChangedIfNeeded().
ASSERT_WITH_SECURITY_IMPLICATION(!nodeDocument->childNeedsStyleRecalc());
ASSERT_WITH_SECURITY_IMPLICATION(!nodeDocument->view()->isInRenderTreeLayout());
ASSERT_WITH_SECURITY_IMPLICATION(!nodeDocument->view()->layoutContext().isInRenderTreeLayout());
return plainText(textRange.get(), textIteratorBehaviorForTextRange());
}
}
@@ -1446,7 +1446,7 @@ int AccessibilityRenderObject::layoutCount() const
{
if (!is<RenderView>(*m_renderer))
return 0;
return downcast<RenderView>(*m_renderer).frameView().layoutCount();
return downcast<RenderView>(*m_renderer).frameView().layoutContext().layoutCount();
}

String AccessibilityRenderObject::text() const

0 comments on commit 8421bc7

Please sign in to comment.