Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 02b59bf3c484b930566dbde1553b8b8c5ac6d5eb
https://github.com/WebKit/WebKit/commit/02b59bf3c484b930566dbde1553b8b8c5ac6d5eb
Author: Kishore Sri Venkata Ganesh Bolisetty <[email protected]>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderLayerCompositor.cpp
M Source/WebCore/rendering/RenderLayerCompositor.h
Log Message:
-----------
Avoid compositing requirements traversals when scrolling only changes a
sticky layer's offset
https://bugs.webkit.org/show_bug.cgi?id=326600
rdar://189349958
Reviewed by Simon Fraser.
Scrolling a page with a stuck sticky element runs a full
computeCompositingRequirements()
traversal after every scroll step, even though no compositing decision can
change.
RenderLayer::updateLayerPosition() marks the stacking context for a requirements
traversal whenever a layer moves, including a sticky layer whose sticky offset
changed
during a scroll. computeExtent() gives sticky layers the union of all their
sticky
positions so that such moves do not require recomputing overlap, but it placed
that
union relative to the layer's current position, which includes the sticky
offset, so
the union moved with the scroll position.
Place the union relative to the position without the sticky offset instead.
With that,
an offset-only change of a composited sticky layer that the frame's scrolling
tree moves
cannot affect overlap, so skip the traversal for it; the layer still gets a
geometry
update.
No new tests. Covered by existing compositing and sticky position tests.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeExtent const):
(WebCore::RenderLayerCompositor::canSkipRequirementsTraversalForStickyOffsetChange
const):
* Source/WebCore/rendering/RenderLayerCompositor.h:
Canonical link: https://commits.webkit.org/323038@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications