Commit 2f33fa5
committed
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 (w3c/csswg-drafts#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@main1 parent 485c3b2 commit 2f33fa5
File tree
4 files changed
+183
-7
lines changed- LayoutTests
- platform/ios-wk2/scrollingcoordinator/scrolling-tree
- scrollingcoordinator/scrolling-tree
- Source/WebCore/rendering
4 files changed
+183
-7
lines changedLines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
Lines changed: 77 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2060 | 2060 | | |
2061 | 2061 | | |
2062 | 2062 | | |
2063 | | - | |
| 2063 | + | |
2064 | 2064 | | |
2065 | 2065 | | |
2066 | 2066 | | |
2067 | | - | |
| 2067 | + | |
2068 | 2068 | | |
2069 | | - | |
| 2069 | + | |
2070 | 2070 | | |
2071 | 2071 | | |
2072 | 2072 | | |
2073 | | - | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
2074 | 2079 | | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
2075 | 2085 | | |
2076 | 2086 | | |
2077 | 2087 | | |
2078 | 2088 | | |
2079 | 2089 | | |
2080 | | - | |
| 2090 | + | |
2081 | 2091 | | |
2082 | 2092 | | |
2083 | 2093 | | |
| |||
3001 | 3011 | | |
3002 | 3012 | | |
3003 | 3013 | | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
3004 | 3017 | | |
3005 | 3018 | | |
3006 | 3019 | | |
| |||
3012 | 3025 | | |
3013 | 3026 | | |
3014 | 3027 | | |
3015 | | - | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
3016 | 3036 | | |
3017 | 3037 | | |
3018 | 3038 | | |
| |||
3616 | 3636 | | |
3617 | 3637 | | |
3618 | 3638 | | |
3619 | | - | |
| 3639 | + | |
3620 | 3640 | | |
3621 | 3641 | | |
3622 | 3642 | | |
| |||
0 commit comments