haikuwebkit/LayoutTests/scrollingcoordinator
Cameron McCormack f7dff2cb78 Prevent background-attachment:fixed from causing slow scrolling when in a position:fixed layer
https://bugs.webkit.org/show_bug.cgi?id=226399

Reviewed by Simon Fraser.

Source/WebCore:

Tests: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async.html
       scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync.html

We move responsbility for managing the HasSlowRepaintObjects
synchronous scrolling reason on the root scrolling node from
ScrollingCoordinator to RenderLayerCompositor, which is where it's
handled for all other scrolling nodes.

If a slow repaint object (i.e. a background-attachment:fixed element) is
present in a non-root async scrolling layer, then it continues to add
HasSlowRepaintObjects to the scrolling node's synchronous scrolling
reasons. But we now no longer add HasSlowRepaintObjects to the root
scrolling node's synchronous scrolling reasons if its containing async
scrolling layer "behaves as fixed", i.e. won't move while scrolling the
viewport.

* page/FrameView.cpp:
(WebCore::FrameView::addSlowRepaintObject): No longer need to inform
the ScrollingCoordinator since the RenderLayerCompositor now handles
HasSlowRepaintObjects synchronous scroling reason updates for the root.
(WebCore::FrameView::removeSlowRepaintObject): Ditto.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::synchronousScrollingReasons const):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
Preserve the current value of HasSlowRepaintObjects when updating
synchronous scrolling reasons.
(WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously const):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText const):
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::synchronousScrollingReasons const):
(WebCore::ScrollingCoordinator::hasSynchronousScrollingReasons const):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::propagateSynchronousScrollingReasons):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateSynchronousScrollingNodes):
Take responsibility for managing HasSlowRepaintObjects on the root
scroll tree node. Only add HasSlowRepaintObjects on the root if not
in a fixed position layer.

LayoutTests:

* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe-expected.txt:
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async.html: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync-expected.txt: Added.
* scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync.html: Added.


Canonical link: https://commits.webkit.org/238443@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-03 21:26:29 +00:00
..
ios Use will-change: opacity instead of will-change: transform in fixed-inside-sticky-no-stacking-context-2.html 2021-04-28 15:44:59 +00:00
mac Prevent background-attachment:fixed from causing slow scrolling when in a position:fixed layer 2021-06-03 21:26:29 +00:00
resources
scrolling-tree REGRESSION (Big Sur): position:absolute elements inside nested overflow:scroll don't track scrolling 2021-01-20 18:34:10 +00:00
fixed-node-reattach-expected.html REGRESSION (r269458): yahoo.com social / comments bar shows as transparent when scrolling page 2021-02-09 05:37:44 +00:00
fixed-node-reattach.html REGRESSION (r269458): yahoo.com social / comments bar shows as transparent when scrolling page 2021-02-09 05:37:44 +00:00
non-fast-scrollable-region-scaled-iframe-expected.png
non-fast-scrollable-region-scaled-iframe-expected.txt
non-fast-scrollable-region-scaled-iframe.html
non-fast-scrollable-region-transformed-iframe-expected.png
non-fast-scrollable-region-transformed-iframe-expected.txt RenderIFrame should display its name correctly in DRT output. 2013-11-10 07:26:00 +00:00
non-fast-scrollable-region-transformed-iframe.html
overflow-proxy-reattach-expected.html Remove experimental: and internal: prefixes from test header commands 2020-11-04 15:56:26 +00:00
overflow-proxy-reattach.html Remove experimental: and internal: prefixes from test header commands 2020-11-04 15:56:26 +00:00