[webkit-changes] [WebKit/WebKit] 2f33fa: A fixed header inside overflow scroll with a trans...
Simon Fraser
noreply at github.com
Sat Jan 21 15:28:00 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f33fa54c40506def565e6af8f393614d02b2804
https://github.com/WebKit/WebKit/commit/2f33fa54c40506def565e6af8f393614d02b2804
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-01-21 (Sat, 21 Jan 2023)
Changed paths:
A LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed-expected.txt
A LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed-expected.txt
A LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed.html
M Source/WebCore/rendering/RenderLayerCompositor.cpp
Log Message:
-----------
A fixed header inside overflow scroll with a transformed ancestor stutters on scrolling (affects Libby app)
https://bugs.webkit.org/show_bug.cgi?id=250652
rdar://104095908
Reviewed by Alan Baradlay.
The Libby app has content which uses a stacking-context overflow:scroll with a position:fixed
descendant, and a CSS transform on an ancestor of the scroller. In this situation, we treat the
position:fixed as if it has position:absolute, but still need to use the correct containing block
for it (which is the enclosing transformed box).
Two fixes are required here. First, `RenderLayerCompositor::computeCoordinatedPositioningForLayer()`
needs to check if the position:fixed layer actually has fixed behavior (i.e. no transformed
ancestor) before the early return.
Second, the `traverseAncestorLayers()` helper only handled position:absolute containing block logic;
we need to fix it to also compute the correct containing block for position:fixed (which allows it
to find transformed ancestors of fixed).
Fixing `traverseAncestorLayers()` to have the correct containingBlock behavior for fixed layers
revealed a surprising behavior, which is that the deprecated CSS `clip` property on a
position:absolute element clips position:fixed descendants, which is odd because it's different from
how overflow works (https://github.com/w3c/csswg-drafts/issues/8336). So
RenderLayerCompositor::computeAncestorClippingStack() needs some special case code to detect this
case. This is tested by imported/blink/fast/css/fixed-overlaps-absolute-in-clip.html.
* LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed-expected.txt: Added.
* LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed-expected.txt: Added.
* LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-stacking-overflow-inside-transformed.html: Added.
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::traverseAncestorLayers):
(WebCore::RenderLayerCompositor::computeAncestorClippingStack const):
(WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
Canonical link: https://commits.webkit.org/259175@main
More information about the webkit-changes
mailing list