[webkit-changes] [WebKit/WebKit] b6b745: Avoid calling updateCompositingLayers() more than ...

mattwoodrow noreply at github.com
Tue Nov 28 20:37:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b6b74556b8e6ecc165a8e1edb5fc73cc8e5853c2
      https://github.com/WebKit/WebKit/commit/b6b74556b8e6ecc165a8e1edb5fc73cc8e5853c2
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M LayoutTests/compositing/overflow/scrolling-without-painting.html
    M LayoutTests/compositing/overflow/updating-scrolling-content.html
    M LayoutTests/compositing/scrolling/touch-scroll-to-clip.html
    M LayoutTests/compositing/updates/no-style-change-updates.html
    M LayoutTests/editing/editable-region/iframe-expected.txt
    M LayoutTests/fast/css/transform-function-perspective-crash.html
    M LayoutTests/fast/scrolling/iframe-scrollable-after-back.html
    M LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hit-test.html
    M LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hovered.html
    M LayoutTests/inspector/layers/layerTreeDidChange.html
    M LayoutTests/platform/ios/compositing/overflow/updating-scrolling-content-expected.txt
    M LayoutTests/platform/mac-wk1/TestExpectations
    M LayoutTests/platform/wpe/TestExpectations
    M LayoutTests/platform/wpe/fast/text/mark-matches-overflow-clip-expected.txt
    M LayoutTests/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html
    M LayoutTests/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html
    M LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-relative-inside-stacking-overflow-inside-transformed.html
    M LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed.html
    M LayoutTests/tiled-drawing/scrolling/clamp-out-of-bounds-scrolls.html
    M LayoutTests/tiled-drawing/scrolling/scrolling-tree-after-scroll.html
    M LayoutTests/tiled-drawing/scrolling/slow-scrolling.html
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/page/LocalDOMWindow.cpp
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/Page.h
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderTreeAsText.cpp

  Log Message:
  -----------
  Avoid calling updateCompositingLayers() more than once before each render.
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




More information about the webkit-changes mailing list