Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8ff57ddb452aaa28d0d425aea6dc22b5ee3fb2e3
https://github.com/WebKit/WebKit/commit/8ff57ddb452aaa28d0d425aea6dc22b5ee3fb2e3
Author: Kristian Monsen <[email protected]>
Date: 2026-09-08 (Tue, 08 Sep 2026)
Changed paths:
A
LayoutTests/compositing/reflections/assert-on-sticky-position-with-reflection-expected.txt
A
LayoutTests/compositing/reflections/assert-on-sticky-position-with-reflection.html
M Source/WebCore/rendering/RenderLayerCompositor.cpp
Log Message:
-----------
ASSERTION FAILED: layer.renderer().isStickilyPositioned() with
-webkit-box-reflect on a position:sticky element
https://bugs.webkit.org/show_bug.cgi?id=323569
rdar://186812790
Reviewed by Matt Woodrow.
rendererForCompositingTests() substitutes the reflected renderer for a
RenderReplica, so requiresCompositingForPosition() can read position:sticky off
the reflected element while `layer` is the replica's layer. It then passes that
layer to isAsyncScrollableStickyLayer(), whose ASSERT is about
layer.renderer().isStickilyPositioned() - and a RenderReplica is statically
positioned. In release builds the assert compiles out and the wrong layer is
walked, which can only produce a wrong compositing decision for the reflection.
Ask about the sticky renderer's own layer instead, matching what the other two
users of rendererForCompositingTests() already do: requiresCompositingLayer()
and reasonsForCompositing() both pass *renderer.layer() rather than the layer
they were given. For every other caller renderer.layer() == &layer, so there is
no behavior change.
Test: compositing/reflections/assert-on-sticky-position-with-reflection.html
*
LayoutTests/compositing/reflections/assert-on-sticky-position-with-reflection-expected.txt:
Added.
*
LayoutTests/compositing/reflections/assert-on-sticky-position-with-reflection.html:
Added.
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
Canonical link: https://commits.webkit.org/320712@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications