Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d4529857cdb245efa263d39ceac1fcdabcb92786
https://github.com/WebKit/WebKit/commit/d4529857cdb245efa263d39ceac1fcdabcb92786
Author: Wenson Hsieh <[email protected]>
Date: 2025-04-07 (Mon, 07 Apr 2025)
Changed paths:
A
LayoutTests/fast/page-color-sampling/color-sampling-fixed-container-under-subscroller-expected.txt
A
LayoutTests/fast/page-color-sampling/color-sampling-fixed-container-under-subscroller.html
A
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers-expected.txt
A
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers.html
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/rendering/HitTestRequest.h
M Source/WebCore/rendering/RenderLayer.cpp
Log Message:
-----------
[Page color sampling] instagram.com: avoid excessive hit-testing in Instagram
reels
https://bugs.webkit.org/show_bug.cgi?id=291246
rdar://148785149
Reviewed by Abrar Rahman Protyasha.
To further reduce overhead from fixed container edge detection and sampling,
bail from hit-testing
subscrollable containers that don't have backgrounds. This dramatically reduces
the overhead
introduced by page color sampling when scrolling through Instagram Reels, due
to the fact that all
of the videos and content (except for the bottom fixed nav bar) is inside of a
scrollable, fixed-
position container. As such, the existing optimization to avoid sampling
non-viewport-constrained
content does not help us avoid any hit-testing.
*
LayoutTests/fast/page-color-sampling/color-sampling-fixed-container-under-subscroller-expected.txt:
Added.
*
LayoutTests/fast/page-color-sampling/color-sampling-fixed-container-under-subscroller.html:
Added.
Add a test to verify that a fixed-positioned container in the DOM subtree of a
subscrollable
container is still detected and sampled.
*
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers-expected.txt:
Added.
*
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers.html:
Added.
Add a test to verify that viewport-constrained subscrollable containers without
opaque backgrounds
are not sampled.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::fixedContainerEdges const):
* Source/WebCore/rendering/HitTestRequest.h:
Rename `ViewportConstrainedLayersOnly` to `ForFixedContainerSampling`, now that
this flag does more
than just skip non-viewport-constrained content during hit-testing.
(WebCore::HitTestRequest::isForFixedContainerSampling const):
(WebCore::HitTestRequest::viewportConstrainedLayersOnly const): Deleted.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTestLayer):
Canonical link: https://commits.webkit.org/293390@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes