1

Avoid calling updateCompositingLayers() more than once before each re… · WebKit/...

 4 weeks ago
source link: https://github.com/WebKit/WebKit/commit/b6b74556b8e6ecc165a8e1edb5fc73cc8e5853c2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Commit

Permalink

Avoid calling updateCompositingLayers() more than once before each re…

Browse files Browse the repository at this point in the history

…nder.

https://bugs.webkit.org/show_bug.cgi?id=84393
<rdar://11359525>

Reviewed by Simon Fraser.

Calling updateCompositingLayers after each layout causes unnecessary work, since
the layers might change again before rendering.

This change defers this work until Page::updateRendering if possible, and improves
performance on pages that force layout flushes outside of rendering.

* LayoutTests/compositing/overflow/scrolling-without-painting.html:
* LayoutTests/compositing/overflow/updating-scrolling-content.html:
* LayoutTests/compositing/scrolling/touch-scroll-to-clip.html:
* LayoutTests/compositing/updates/no-style-change-updates.html:
* LayoutTests/editing/editable-region/iframe-expected.txt:
* LayoutTests/fast/css/transform-function-perspective-crash.html:
* LayoutTests/fast/scrolling/iframe-scrollable-after-back.html:
* LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hit-test.html:
* LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hovered.html:
* LayoutTests/inspector/layers/layerTreeDidChange.html:
* LayoutTests/platform/gtk/compositing/scrolling/touch-scroll-to-clip-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/updating-scrolling-content-expected.txt.
* LayoutTests/platform/ios/compositing/overflow/updating-scrolling-content-expected.txt:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* LayoutTests/platform/wpe/fast/text/mark-matches-overflow-clip-expected.txt:
* LayoutTests/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html:
* LayoutTests/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html:
* LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-relative-inside-stacking-overflow-inside-transformed.html:
* LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed.html:
* LayoutTests/tiled-drawing/scrolling/clamp-out-of-bounds-scrolls.html:
* LayoutTests/tiled-drawing/scrolling/scrolling-tree-after-scroll.html:
* LayoutTests/tiled-drawing/scrolling/slow-scrolling.html:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::updateLayout):
(WebCore::Document::implicitClose):
* Source/WebCore/dom/Document.h:
(WebCore::Document::updateLayout):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::scrollTo):
(WebCore::Element::scrollByUnits):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::scrollTo const):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::updateCompositingLayersAfterLayout):
(WebCore::LocalFrameView::updateCompositingLayersAfterLayoutIfNeeded):
(WebCore::LocalFrameView::didLayout):
(WebCore::LocalFrameView::updateLayoutAndStyleIfNeededRecursive):
(WebCore::LocalFrameView::setTracksRepaints):
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::scrollingStateTreeAsText):
(WebCore::Page::setPageScaleFactor):
(WebCore::Page::layoutIfNeeded):
(WebCore::Page::updateRendering):
(WebCore::Page::doAfterUpdateRendering):
* Source/WebCore/page/Page.h:
(WebCore::Page::layoutIfNeeded):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewEventTrackingRegionsChanged):
(WebCore::AsyncScrollingCoordinator::setEventTrackingRegionsDirty): Deleted.
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingForLayerTreeAsTextDump):
* Source/WebCore/rendering/RenderTreeAsText.cpp:
(WebCore::externalRepresentation):
(WebCore::updateLayoutIgnoringPendingStylesheetsIncludingSubframes): Deleted.

Canonical link: https://commits.webkit.org/271261@main
mattwoodrow committed Nov 29, 2023
1 parent 7445f27 commit b6b7455

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK