Changeset 266825 in webkit
- Timestamp:
- Sep 10, 2020, 8:22:05 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 25 edited
- 1 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt (modified) (3 diffs)
-
LayoutTests/compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt (modified) (3 diffs)
-
LayoutTests/compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt (modified) (3 diffs)
-
LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt (modified) (3 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-dynamic-expected.txt (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-dynamic.html (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-expected.txt (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-inside-hidden-expected.txt (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-inside-hidden.html (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-nested-expected.txt (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-nested.html (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar.html (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position-expected.txt (copied) (copied from trunk/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt ) (3 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position.html (added)
-
LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt (modified) (3 diffs)
-
LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/Logging.cpp (modified) (1 diff)
-
Source/WebCore/rendering/LayerAncestorClippingStack.cpp (modified) (1 diff)
-
Source/WebCore/rendering/LayerAncestorClippingStack.h (modified) (2 diffs)
-
Source/WebCore/rendering/RenderLayerBacking.cpp (modified) (9 diffs)
-
Source/WebCore/rendering/RenderLayerBacking.h (modified) (4 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (8 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r266822 r266825 1 2020-09-10 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (Async overflow scroll): Truncated scrollbars in facebook chat 4 https://bugs.webkit.org/show_bug.cgi?id=216294 5 <rdar://problem/61918702> 6 7 Reviewed by Antti Koivisto. 8 9 Some new tests, and new baselines for tests that have different layer trees now. 10 11 * compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt: 12 * compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt: 13 * compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt: 14 * compositing/overflow/scrolling-content-clip-to-viewport-expected.txt: 15 * compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: 16 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt: 17 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt: 18 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt: 19 * compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt: 20 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt: 21 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt: 22 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt: 23 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt: 24 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt: 25 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt: 26 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-dynamic-expected.txt: Added. 27 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-dynamic.html: Added. 28 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-expected.txt: Added. 29 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-inside-hidden-expected.txt: Added. 30 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-inside-hidden.html: Added. 31 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-nested-expected.txt: Added. 32 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-nested.html: Added. 33 * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar.html: Added. 34 * compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position-expected.txt: Added. 35 * compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position.html: Added. 36 * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: 37 * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: 38 1 39 2020-09-10 Diego Pino Garcia <dpino@igalia.com> 2 40 -
trunk/LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 79 (children 8 10 10 (GraphicsLayer 11 11 (position 23.00 105.00) 12 12 (bounds 402.00 352.00) 13 13 (drawsContent 1) 14 (children 214 (children 1 15 15 (GraphicsLayer 16 16 (offsetFromRenderer width=1 height=1) … … 58 58 ) 59 59 ) 60 )61 )62 )63 (GraphicsLayer64 (position 1.00 1.00)65 (bounds 400.00 350.00)66 (children 167 (GraphicsLayer68 (position 385.00 0.00)69 (bounds 15.00 350.00)70 (drawsContent 1)71 60 ) 72 61 ) … … 148 137 ) 149 138 (GraphicsLayer 139 (position 24.00 106.00) 140 (bounds 400.00 350.00) 141 (children 1 142 (GraphicsLayer 143 (position 385.00 0.00) 144 (bounds 15.00 350.00) 145 (drawsContent 1) 146 ) 147 ) 148 ) 149 (GraphicsLayer 150 150 (position 18.00 472.00) 151 151 (bounds 100.00 80.00) -
trunk/LayoutTests/compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt
r260305 r266825 6 6 (bounds 800.00 600.00) 7 7 (contentsOpaque 1) 8 (children 68 (children 7 9 9 (GraphicsLayer 10 10 (position 8.00 8.00) 11 11 (bounds 302.00 302.00) 12 12 (drawsContent 1) 13 (children 213 (children 1 14 14 (GraphicsLayer 15 15 (offsetFromRenderer width=1 height=1) … … 21 21 (anchor 0.00 0.00) 22 22 (bounds 285.00 500.00) 23 )24 )25 )26 (GraphicsLayer27 (position 1.00 1.00)28 (bounds 300.00 300.00)29 (children 130 (GraphicsLayer31 (position 285.00 0.00)32 (bounds 15.00 300.00)33 (drawsContent 1)34 23 ) 35 24 ) … … 92 81 ) 93 82 ) 83 (GraphicsLayer 84 (position 9.00 9.00) 85 (bounds 300.00 300.00) 86 (children 1 87 (GraphicsLayer 88 (position 285.00 0.00) 89 (bounds 15.00 300.00) 90 (drawsContent 1) 91 ) 92 ) 93 ) 94 94 ) 95 95 ) -
trunk/LayoutTests/compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt
r260305 r266825 10 10 (bounds 800.00 600.00) 11 11 (drawsContent 1) 12 (children 712 (children 8 13 13 (GraphicsLayer 14 14 (position 9.00 9.00) … … 30 30 (bounds 302.00 302.00) 31 31 (drawsContent 1) 32 (children 232 (children 1 33 33 (GraphicsLayer 34 34 (offsetFromRenderer width=1 height=1) … … 40 40 (anchor 0.00 0.00) 41 41 (bounds 285.00 500.00) 42 )43 )44 )45 (GraphicsLayer46 (position 1.00 1.00)47 (bounds 300.00 300.00)48 (children 149 (GraphicsLayer50 (position 285.00 0.00)51 (bounds 15.00 300.00)52 (drawsContent 1)53 42 ) 54 43 ) … … 100 89 ) 101 90 ) 91 (GraphicsLayer 92 (position 9.00 9.00) 93 (bounds 300.00 300.00) 94 (children 1 95 (GraphicsLayer 96 (position 285.00 0.00) 97 (bounds 15.00 300.00) 98 (drawsContent 1) 99 ) 100 ) 101 ) 102 102 ) 103 103 ) -
trunk/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt
r260305 r266825 6 6 (bounds 800.00 600.00) 7 7 (contentsOpaque 1) 8 (children 28 (children 3 9 9 (GraphicsLayer 10 10 (bounds 320.00 340.00) 11 (children 211 (children 1 12 12 (GraphicsLayer 13 13 (bounds 305.00 325.00) … … 16 16 (anchor 0.00 0.00) 17 17 (bounds 305.00 1224.00) 18 )19 )20 )21 (GraphicsLayer22 (bounds 320.00 340.00)23 (children 324 (GraphicsLayer25 (position 0.00 325.00)26 (bounds 305.00 15.00)27 (drawsContent 1)28 )29 (GraphicsLayer30 (position 305.00 0.00)31 (bounds 15.00 325.00)32 (drawsContent 1)33 )34 (GraphicsLayer35 (position 305.00 325.00)36 (bounds 15.00 15.00)37 (drawsContent 1)38 18 ) 39 19 ) … … 52 32 ) 53 33 ) 34 (GraphicsLayer 35 (bounds 320.00 340.00) 36 (children 3 37 (GraphicsLayer 38 (position 0.00 325.00) 39 (bounds 305.00 15.00) 40 (drawsContent 1) 41 ) 42 (GraphicsLayer 43 (position 305.00 0.00) 44 (bounds 15.00 325.00) 45 (drawsContent 1) 46 ) 47 (GraphicsLayer 48 (position 305.00 325.00) 49 (bounds 15.00 15.00) 50 (drawsContent 1) 51 ) 52 ) 53 ) 54 54 ) 55 55 ) -
trunk/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt
r260305 r266825 8 8 (bounds 800.00 600.00) 9 9 (contentsOpaque 1) 10 (children 510 (children 6 11 11 (GraphicsLayer 12 12 (position 8.00 8.00) 13 13 (bounds 404.00 223.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=2 height=2) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 766.00 204.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 2.00 2.00)34 (bounds 400.00 219.00)35 (children 136 (GraphicsLayer37 (position 0.00 204.00)38 (bounds 400.00 15.00)39 28 (drawsContent 1) 40 29 ) … … 95 84 ) 96 85 ) 86 (GraphicsLayer 87 (position 10.00 10.00) 88 (bounds 400.00 219.00) 89 (children 1 90 (GraphicsLayer 91 (position 0.00 204.00) 92 (bounds 400.00 15.00) 93 (drawsContent 1) 94 ) 95 ) 96 ) 97 97 ) 98 98 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 301.00 640.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 23.00 23.00)34 (bounds 316.00 316.00)35 (children 136 (GraphicsLayer37 (position 301.00 0.00)38 (bounds 15.00 316.00)39 28 (drawsContent 1) 40 29 ) … … 64 53 ) 65 54 ) 55 (GraphicsLayer 56 (position 41.00 33.00) 57 (bounds 316.00 316.00) 58 (children 1 59 (GraphicsLayer 60 (position 301.00 0.00) 61 (bounds 15.00 316.00) 62 (drawsContent 1) 63 ) 64 ) 65 ) 66 66 ) 67 67 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 301.00 540.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 23.00 23.00)34 (bounds 316.00 316.00)35 (children 136 (GraphicsLayer37 (position 301.00 0.00)38 (bounds 15.00 316.00)39 28 (drawsContent 1) 40 29 ) … … 64 53 ) 65 54 ) 55 (GraphicsLayer 56 (position 41.00 33.00) 57 (bounds 316.00 316.00) 58 (children 1 59 (GraphicsLayer 60 (position 301.00 0.00) 61 (bounds 15.00 316.00) 62 (drawsContent 1) 63 ) 64 ) 65 ) 66 66 ) 67 67 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 73 73 ) 74 74 ) 75 (GraphicsLayer76 (position 23.00 23.00)77 (bounds 316.00 316.00)78 (children 179 (GraphicsLayer80 (position 301.00 0.00)81 (bounds 15.00 316.00)82 (drawsContent 1)83 )84 )85 )86 75 ) 87 76 ) … … 121 110 ) 122 111 ) 112 (GraphicsLayer 113 (position 41.00 33.00) 114 (bounds 316.00 316.00) 115 (children 1 116 (GraphicsLayer 117 (position 301.00 0.00) 118 (bounds 15.00 316.00) 119 (drawsContent 1) 120 ) 121 ) 122 ) 123 123 ) 124 124 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt
r260305 r266825 10 10 (GraphicsLayer 11 11 (bounds 800.00 600.00) 12 (children 312 (children 4 13 13 (GraphicsLayer 14 14 (position 9.00 9.00) … … 24 24 ) 25 25 (GraphicsLayer 26 (position 9.00 9.00) 27 (bounds 300.00 300.00) 28 (children 1 29 (GraphicsLayer 30 (position 285.00 0.00) 31 (bounds 15.00 300.00) 32 (drawsContent 1) 33 ) 34 ) 35 ) 36 (GraphicsLayer 26 37 (bounds 800.00 600.00) 27 38 ) … … 30 41 (bounds 302.00 302.00) 31 42 (drawsContent 1) 32 (children 243 (children 1 33 44 (GraphicsLayer 34 45 (offsetFromRenderer width=1 height=1) … … 45 56 ) 46 57 ) 47 (GraphicsLayer48 (position 1.00 1.00)49 (bounds 300.00 300.00)50 (children 151 (GraphicsLayer52 (position 285.00 0.00)53 (bounds 15.00 300.00)54 (drawsContent 1)55 )56 )57 )58 58 ) 59 59 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 301.00 540.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 23.00 23.00)34 (bounds 316.00 316.00)35 (children 136 (GraphicsLayer37 (position 301.00 0.00)38 (bounds 15.00 316.00)39 28 (drawsContent 1) 40 29 ) … … 64 53 ) 65 54 ) 55 (GraphicsLayer 56 (position 41.00 33.00) 57 (bounds 316.00 316.00) 58 (children 1 59 (GraphicsLayer 60 (position 301.00 0.00) 61 (bounds 15.00 316.00) 62 (drawsContent 1) 63 ) 64 ) 65 ) 66 66 ) 67 67 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 301.00 540.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 23.00 23.00)34 (bounds 316.00 316.00)35 (children 136 (GraphicsLayer37 (position 301.00 0.00)38 (bounds 15.00 316.00)39 28 (drawsContent 1) 40 29 ) … … 57 46 ) 58 47 ) 48 (GraphicsLayer 49 (position 41.00 33.00) 50 (bounds 316.00 316.00) 51 (children 1 52 (GraphicsLayer 53 (position 301.00 0.00) 54 (bounds 15.00 316.00) 55 (drawsContent 1) 56 ) 57 ) 58 ) 59 59 ) 60 60 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 301.00 516.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 23.00 23.00)34 (bounds 316.00 316.00)35 (children 136 (GraphicsLayer37 (position 301.00 0.00)38 (bounds 15.00 316.00)39 28 (drawsContent 1) 40 29 ) … … 57 46 ) 58 47 ) 48 (GraphicsLayer 49 (position 41.00 33.00) 50 (bounds 316.00 316.00) 51 (children 1 52 (GraphicsLayer 53 (position 301.00 0.00) 54 (bounds 15.00 316.00) 55 (drawsContent 1) 56 ) 57 ) 58 ) 59 59 ) 60 60 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 301.00 540.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 23.00 23.00)34 (bounds 316.00 316.00)35 (children 136 (GraphicsLayer37 (position 301.00 0.00)38 (bounds 15.00 316.00)39 28 (drawsContent 1) 40 29 ) … … 64 53 ) 65 54 ) 55 (GraphicsLayer 56 (position 41.00 33.00) 57 (bounds 316.00 316.00) 58 (children 1 59 (GraphicsLayer 60 (position 301.00 0.00) 61 (bounds 15.00 316.00) 62 (drawsContent 1) 63 ) 64 ) 65 ) 66 66 ) 67 67 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (position 33.00 25.00) … … 18 18 (bounds 362.00 362.00) 19 19 (drawsContent 1) 20 (children 220 (children 1 21 21 (GraphicsLayer 22 22 (offsetFromRenderer width=13 height=13) … … 31 31 (anchor 0.00 0.00) 32 32 (bounds 301.00 516.00) 33 (drawsContent 1)34 )35 )36 )37 (GraphicsLayer38 (position 23.00 23.00)39 (bounds 316.00 316.00)40 (children 141 (GraphicsLayer42 (position 301.00 0.00)43 (bounds 15.00 316.00)44 33 (drawsContent 1) 45 34 ) … … 71 60 ) 72 61 ) 62 (GraphicsLayer 63 (position 33.00 25.00) 64 (bounds 312.00 212.00) 65 (clips 1) 66 (children 1 67 (GraphicsLayer 68 (position 39.00 39.00) 69 (bounds 316.00 316.00) 70 (children 1 71 (GraphicsLayer 72 (position 301.00 0.00) 73 (bounds 15.00 316.00) 74 (drawsContent 1) 75 ) 76 ) 77 ) 78 ) 79 ) 73 80 ) 74 81 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt
r260305 r266825 7 7 (bounds 800.00 600.00) 8 8 (contentsOpaque 1) 9 (children 29 (children 3 10 10 (GraphicsLayer 11 11 (offsetFromRenderer width=-10 height=-10) … … 13 13 (bounds 362.00 362.00) 14 14 (drawsContent 1) 15 (children 215 (children 1 16 16 (GraphicsLayer 17 17 (offsetFromRenderer width=13 height=13) … … 26 26 (anchor 0.00 0.00) 27 27 (bounds 301.00 540.00) 28 (drawsContent 1)29 )30 )31 )32 (GraphicsLayer33 (position 23.00 23.00)34 (bounds 316.00 316.00)35 (children 136 (GraphicsLayer37 (position 301.00 0.00)38 (bounds 15.00 316.00)39 28 (drawsContent 1) 40 29 ) … … 57 46 ) 58 47 ) 48 (GraphicsLayer 49 (position 41.00 33.00) 50 (bounds 316.00 316.00) 51 (children 1 52 (GraphicsLayer 53 (position 301.00 0.00) 54 (bounds 15.00 316.00) 55 (drawsContent 1) 56 ) 57 ) 58 ) 59 59 ) 60 60 ) -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position-expected.txt
r266824 r266825 1 2 1 3 (GraphicsLayer 2 4 (anchor 0.00 0.00) 3 5 (bounds 800.00 600.00) 6 (clips 1) 4 7 (children 1 5 8 (GraphicsLayer 6 9 (bounds 800.00 600.00) 7 10 (contentsOpaque 1) 8 (children 211 (children 1 9 12 (GraphicsLayer 10 (position 8.00 8.00)11 (bounds 404.00 404.00)13 (position 58.00 50.00) 14 (bounds 524.00 424.00) 12 15 (drawsContent 1) 13 16 (children 2 … … 15 18 (offsetFromRenderer width=2 height=2) 16 19 (position 2.00 2.00) 17 (bounds 385.00 400.00) 20 (bounds 520.00 405.00) 21 (clips 1) 18 22 (children 1 19 23 (GraphicsLayer 20 24 (offsetFromRenderer width=2 height=2) 21 25 (anchor 0.00 0.00) 22 (bounds 385.00 1044.00)26 (bounds 2050.00 405.00) 23 27 (drawsContent 1) 24 28 ) … … 27 31 (GraphicsLayer 28 32 (position 2.00 2.00) 29 (bounds 400.00 400.00)33 (bounds 520.00 420.00) 30 34 (children 1 31 35 (GraphicsLayer 32 (position 385.00 0.00)33 (bounds 15.00 400.00)36 (position 0.00 405.00) 37 (bounds 520.00 15.00) 34 38 (drawsContent 1) 35 39 ) 36 40 ) 37 )38 )39 )40 (GraphicsLayer41 (position 10.00 10.00)42 (bounds 385.00 400.00)43 (children 144 (GraphicsLayer45 (position 34.00 134.00)46 (bounds 220.00 220.00)47 (contentsOpaque 1)48 41 ) 49 42 ) -
trunk/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt
r260305 r266825 6 6 (bounds 800.00 600.00) 7 7 (contentsOpaque 1) 8 (children 28 (children 3 9 9 (GraphicsLayer 10 10 (position 8.00 8.00) 11 11 (bounds 404.00 404.00) 12 12 (drawsContent 1) 13 (children 213 (children 1 14 14 (GraphicsLayer 15 15 (offsetFromRenderer width=2 height=2) … … 21 21 (anchor 0.00 0.00) 22 22 (bounds 385.00 1044.00) 23 (drawsContent 1)24 )25 )26 )27 (GraphicsLayer28 (position 2.00 2.00)29 (bounds 400.00 400.00)30 (children 131 (GraphicsLayer32 (position 385.00 0.00)33 (bounds 15.00 400.00)34 23 (drawsContent 1) 35 24 ) … … 49 38 ) 50 39 ) 40 (GraphicsLayer 41 (position 10.00 10.00) 42 (bounds 400.00 400.00) 43 (children 1 44 (GraphicsLayer 45 (position 385.00 0.00) 46 (bounds 15.00 400.00) 47 (drawsContent 1) 48 ) 49 ) 50 ) 51 51 ) 52 52 ) -
trunk/Source/WebCore/ChangeLog
r266824 r266825 1 2020-09-10 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (Async overflow scroll): Truncated scrollbars in facebook chat 4 https://bugs.webkit.org/show_bug.cgi?id=216294 5 <rdar://problem/61918702> 6 7 Reviewed by Antti Koivisto. 8 9 When both async overflow scroll and overlay scrollbars are enabled, it's possible for 10 composited layers that are later in z-order than the overflow to overlap the scrollbars 11 (overflow does not create stacking context, so they are later siblings to the overflow). 12 13 To fix this we have to hoist the layer that hosts the overflow controls above all later layers 14 which belong to contents scrolled by this overflow. We know which layers these are; they have 15 ancestor clippings stacks that reference the overflow layer. 16 17 This overflow controls layer hoisting happens in the context of the enclosing composited layer. 18 19 So to fix this RenderLayerCompositor::updateBackingAndHierarchy() tracks these layers that belong to 20 an overflow scroll. RenderLayerCompositor::adjustOverflowScrollbarContainerLayers() uses them to find 21 the overflow scroll layers whose controls need hoisting, and where to insert those overflow controls 22 hosting layers in the sublayers list of the enclosing composited layer. 23 24 An additional source of complexity occurs with overflow scroll nested inside another scroller or 25 overflow:hidden (in the same composited stacking context): the overflow controls reparenting is hoisting 26 that layer up, so that layer itself needs additional layers to clip it (essentially the overflow control 27 layer behaves like a later sibling that needs its own ancestor clipping stack). When this occurs, 28 RenderLayerBacking creates an additional "ancestor clipping stack" in m_overflowControlsHostLayerAncestorClippingStack 29 which is a parallel stack to m_ancestorClippingStack, but with its own set of clipping layers. At some point 30 this will also need scrolling tree nodes created for it. Some minor refactoring helps share code for 31 the two LayerAncestorClippingStacks. 32 33 This new code all runs late in the compositing update for a given layer, which is not ideal; we replicate 34 some code from updateGeometry() and updateInternalHierarchy(). Ideally we'd be able to know at 35 computeCompositingRequirements() time if we need to do layer hoisting and ancestor clipping stack duplication, 36 but that proves hard because of ordering dependencies. 37 38 Tests: compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-dynamic.html 39 compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-inside-hidden.html 40 compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-nested.html 41 compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar.html 42 compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position.html 43 44 * rendering/LayerAncestorClippingStack.cpp: 45 (WebCore::LayerAncestorClippingStack::compositedClipData const): 46 * rendering/LayerAncestorClippingStack.h: 47 * rendering/RenderLayerBacking.cpp: 48 (WebCore::RenderLayerBacking::updateConfiguration): 49 (WebCore::RenderLayerBacking::updateGeometry): 50 (WebCore::RenderLayerBacking::adjustOverflowControlsPositionRelativeToAncestor): 51 (WebCore::RenderLayerBacking::updateInternalHierarchy): 52 (WebCore::RenderLayerBacking::updateAncestorClippingStack): 53 (WebCore::RenderLayerBacking::ensureOverflowControlsHostLayerAncestorClippingStack): 54 (WebCore::RenderLayerBacking::ensureClippingStackLayers): 55 (WebCore::RenderLayerBacking::removeClippingStackLayers): 56 (WebCore::RenderLayerBacking::connectClippingStackLayers): 57 (WebCore::RenderLayerBacking::updateClippingStackLayerGeometry): 58 (WebCore::RenderLayerBacking::updateAncestorClipping): 59 (WebCore::RenderLayerBacking::offsetRelativeToRendererOriginForDescendantLayers const): 60 * rendering/RenderLayerBacking.h: 61 * rendering/RenderLayerCompositor.cpp: 62 (WebCore::RenderLayerCompositor::UpdateBackingTraversalState::UpdateBackingTraversalState): 63 (WebCore::RenderLayerCompositor::UpdateBackingTraversalState::stateForDescendants const): 64 (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): 65 (WebCore::RenderLayerCompositor::adjustOverflowScrollbarContainerLayers): 66 (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole): 67 * rendering/RenderLayerCompositor.h: 68 1 69 2020-09-10 Aditya Keerthi <akeerthi@apple.com> 2 70 -
trunk/Source/WebCore/platform/Logging.cpp
r251193 r266825 91 91 String enabledChannelsString = logChannelString ? logChannelString.value() : logLevelString(); 92 92 WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, enabledChannelsString.utf8().data()); 93 LogCompositing.state = WTFLogChannelState::On; 93 94 } 94 95 -
trunk/Source/WebCore/rendering/LayerAncestorClippingStack.cpp
r246725 r266825 164 164 } 165 165 166 Vector<CompositedClipData> LayerAncestorClippingStack::compositedClipData() const 167 { 168 Vector<CompositedClipData> clipData; 169 clipData.reserveInitialCapacity(m_stack.size()); 170 171 for (const auto& entry : m_stack) 172 clipData.uncheckedAppend(entry.clipData); 173 174 return clipData; 175 } 176 166 177 static TextStream& operator<<(TextStream& ts, const LayerAncestorClippingStack::ClippingStackEntry& entry) 167 178 { -
trunk/Source/WebCore/rendering/LayerAncestorClippingStack.h
r246734 r266825 78 78 bool equalToClipData(const Vector<CompositedClipData>&) const; 79 79 bool updateWithClipData(ScrollingCoordinator*, Vector<CompositedClipData>&&); 80 81 Vector<CompositedClipData> compositedClipData() const; 80 82 81 83 void clear(ScrollingCoordinator*); … … 87 89 GraphicsLayer* lastClippingLayer() const; 88 90 ScrollingNodeID lastOverflowScrollProxyNodeID() const; 89 90 bool update(LayerAncestorClippingStack&&); 91 91 92 92 struct ClippingStackEntry { 93 93 CompositedClipData clipData; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r266363 r266825 1001 1001 updateInternalHierarchy(); 1002 1002 1003 // RenderLayerCompositor::adjustOverflowScrollbarContainerLayers() may have reparented the overflowControlsContainer 1004 // in an earlier update, so always put it back here. We don't yet know if it will get reparented again. 1005 if (m_overflowControlsContainer && m_overflowControlsContainer->parent() != m_graphicsLayer.get()) { 1006 m_graphicsLayer->addChild(*m_overflowControlsContainer); 1007 // Ensure that we fix up the position of m_overflowControlsContainer. 1008 m_owningLayer.setNeedsCompositingGeometryUpdate(); 1009 } 1010 1011 // FIXME: Overlow controls need to be above the flattening layer? 1003 1012 if (auto* flatteningLayer = tileCacheFlatteningLayer()) { 1004 1013 if (layerConfigChanged || flatteningLayer->parent() != m_graphicsLayer.get()) … … 1262 1271 LayoutRect parentGraphicsLayerRect = computeParentGraphicsLayerRect(compositedAncestor); 1263 1272 1264 if (m_ancestorClippingStack) { 1265 // All clipRects in the stack are computed relative to m_owningLayer, so convert them back to compositedAncestor. 1266 auto offsetFromCompositedAncestor = toLayoutSize(m_owningLayer.convertToLayerCoords(compositedAncestor, { }, RenderLayer::AdjustForColumns)); 1267 LayoutRect lastClipLayerRect = parentGraphicsLayerRect; 1268 1269 for (auto& entry : m_ancestorClippingStack->stack()) { 1270 auto clipRect = entry.clipData.clipRect; 1271 LayoutSize clippingOffset = computeOffsetFromAncestorGraphicsLayer(compositedAncestor, clipRect.location() + offsetFromCompositedAncestor, deviceScaleFactor); 1272 LayoutRect snappedClippingLayerRect = snappedGraphicsLayer(clippingOffset, clipRect.size(), deviceScaleFactor).m_snappedRect; 1273 1274 entry.clippingLayer->setPosition(toLayoutPoint(snappedClippingLayerRect.location() - lastClipLayerRect.location())); 1275 lastClipLayerRect = snappedClippingLayerRect; 1276 1277 entry.clippingLayer->setSize(snappedClippingLayerRect.size()); 1278 1279 if (entry.clipData.isOverflowScroll) { 1280 ScrollOffset scrollOffset = entry.clipData.clippingLayer->scrollOffset(); 1281 1282 entry.clippingLayer->setBoundsOrigin(scrollOffset); 1283 lastClipLayerRect.moveBy(-scrollOffset); 1284 } else 1285 entry.clippingLayer->setBoundsOrigin({ }); 1286 } 1287 1288 parentGraphicsLayerRect = lastClipLayerRect; 1289 } 1273 if (m_ancestorClippingStack) 1274 updateClippingStackLayerGeometry(*m_ancestorClippingStack, compositedAncestor, parentGraphicsLayerRect); 1290 1275 1291 1276 LayoutRect primaryGraphicsLayerRect = computePrimaryGraphicsLayerRect(compositedAncestor, parentGraphicsLayerRect); … … 1472 1457 } 1473 1458 1459 void RenderLayerBacking::adjustOverflowControlsPositionRelativeToAncestor(const RenderLayer& ancestorLayer) 1460 { 1461 ASSERT(m_overflowControlsContainer); 1462 ASSERT(ancestorLayer.isComposited()); 1463 auto ancestorBacking = ancestorLayer.backing(); 1464 if (!ancestorBacking) 1465 return; 1466 1467 LayoutRect parentGraphicsLayerRect = computeParentGraphicsLayerRect(&ancestorLayer); 1468 LayoutRect primaryGraphicsLayerRect = computePrimaryGraphicsLayerRect(&ancestorLayer, parentGraphicsLayerRect); 1469 1470 auto overflowControlsRect = overflowControlsHostLayerRect(downcast<RenderBox>(renderer())); 1471 1472 if (overflowControlsHostLayerAncestorClippingStack()) 1473 updateClippingStackLayerGeometry(*m_overflowControlsHostLayerAncestorClippingStack, &ancestorLayer, parentGraphicsLayerRect); 1474 1475 ComputedOffsets rendererOffset(m_owningLayer, &ancestorLayer, { }, parentGraphicsLayerRect, primaryGraphicsLayerRect); 1476 1477 LayoutSize boxOffsetFromGraphicsLayer = toLayoutSize(overflowControlsRect.location()) + rendererOffset.fromParentGraphicsLayer(); 1478 SnappedRectInfo snappedBoxInfo = snappedGraphicsLayer(boxOffsetFromGraphicsLayer, overflowControlsRect.size(), deviceScaleFactor()); 1479 1480 m_overflowControlsContainer->setPosition(snappedBoxInfo.m_snappedRect.location()); 1481 } 1482 1474 1483 void RenderLayerBacking::setLocationOfScrolledContents(ScrollOffset scrollOffset, ScrollingLayerPositionAction setOrSync) 1475 1484 { … … 1573 1582 GraphicsLayer* lastClippingLayer = nullptr; 1574 1583 if (m_ancestorClippingStack) { 1575 auto& clippingStack = m_ancestorClippingStack->stack(); 1576 for (unsigned i = 0; i < clippingStack.size() - 1; ++i) { 1577 auto& entry = clippingStack.at(i); 1578 Vector<Ref<GraphicsLayer>> children; 1579 children.append(*clippingStack.at(i + 1).clippingLayer); 1580 entry.clippingLayer->setChildren(WTFMove(children)); 1581 } 1582 1583 lastClippingLayer = clippingStack.last().clippingLayer.get(); 1584 lastClippingLayer->removeAllChildren(); 1585 } 1586 1584 connectClippingStackLayers(*m_ancestorClippingStack); 1585 lastClippingLayer = m_ancestorClippingStack->lastClippingLayer(); 1586 } 1587 1587 1588 if (m_contentsContainmentLayer) { 1588 1589 m_contentsContainmentLayer->removeAllChildren(); … … 1620 1621 m_overflowControlsContainer->addChild(*m_layerForScrollCorner); 1621 1622 1623 // m_overflowControlsContainer may get reparented later. 1622 1624 m_graphicsLayer->addChild(*m_overflowControlsContainer); 1623 1625 } … … 1790 1792 m_ancestorClippingStack->clear(scrollingCoordinator); 1791 1793 m_ancestorClippingStack = nullptr; 1794 1795 if (m_overflowControlsHostLayerAncestorClippingStack) { 1796 m_overflowControlsHostLayerAncestorClippingStack->clear(scrollingCoordinator); 1797 m_overflowControlsHostLayerAncestorClippingStack = nullptr; 1798 } 1792 1799 return true; 1793 1800 } … … 1806 1813 m_ancestorClippingStack->updateWithClipData(scrollingCoordinator, WTFMove(clippingData)); 1807 1814 LOG_WITH_STREAM(Compositing, stream << "layer " << &m_owningLayer << " ancestorClippingStack " << *m_ancestorClippingStack); 1815 if (m_overflowControlsHostLayerAncestorClippingStack) 1816 m_overflowControlsHostLayerAncestorClippingStack->updateWithClipData(scrollingCoordinator, WTFMove(clippingData)); 1808 1817 return true; 1818 } 1819 1820 void RenderLayerBacking::ensureOverflowControlsHostLayerAncestorClippingStack(const RenderLayer* compositedAncestor) 1821 { 1822 auto* scrollingCoordinator = m_owningLayer.page().scrollingCoordinator(); 1823 auto clippingData = m_ancestorClippingStack->compositedClipData(); 1824 1825 if (m_overflowControlsHostLayerAncestorClippingStack) 1826 m_overflowControlsHostLayerAncestorClippingStack->updateWithClipData(scrollingCoordinator, WTFMove(clippingData)); 1827 else 1828 m_overflowControlsHostLayerAncestorClippingStack = makeUnique<LayerAncestorClippingStack>(WTFMove(clippingData)); 1829 1830 ensureClippingStackLayers(*m_overflowControlsHostLayerAncestorClippingStack); 1831 1832 LayoutRect parentGraphicsLayerRect = computeParentGraphicsLayerRect(compositedAncestor); 1833 updateClippingStackLayerGeometry(*m_overflowControlsHostLayerAncestorClippingStack, compositedAncestor, parentGraphicsLayerRect); 1834 1835 connectClippingStackLayers(*m_overflowControlsHostLayerAncestorClippingStack); 1836 } 1837 1838 void RenderLayerBacking::ensureClippingStackLayers(LayerAncestorClippingStack& clippingStack) 1839 { 1840 for (auto& entry : clippingStack.stack()) { 1841 if (!entry.clippingLayer) { 1842 entry.clippingLayer = createGraphicsLayer(entry.clipData.isOverflowScroll ? "clip for scroller" : "ancestor clipping"); 1843 entry.clippingLayer->setMasksToBounds(true); 1844 entry.clippingLayer->setPaintingPhase({ }); 1845 } 1846 } 1847 } 1848 1849 void RenderLayerBacking::removeClippingStackLayers(LayerAncestorClippingStack& clippingStack) 1850 { 1851 for (auto& entry : clippingStack.stack()) 1852 GraphicsLayer::unparentAndClear(entry.clippingLayer); 1853 } 1854 1855 void RenderLayerBacking::connectClippingStackLayers(LayerAncestorClippingStack& clippingStack) 1856 { 1857 auto& clippingEntryStack = clippingStack.stack(); 1858 for (unsigned i = 0; i < clippingEntryStack.size() - 1; ++i) { 1859 auto& entry = clippingEntryStack.at(i); 1860 Vector<Ref<GraphicsLayer>> children; 1861 children.append(*clippingEntryStack.at(i + 1).clippingLayer); 1862 entry.clippingLayer->setChildren(WTFMove(children)); 1863 } 1864 1865 clippingEntryStack.last().clippingLayer->removeAllChildren(); 1866 } 1867 1868 void RenderLayerBacking::updateClippingStackLayerGeometry(LayerAncestorClippingStack& clippingStack, const RenderLayer* compositedAncestor, LayoutRect& parentGraphicsLayerRect) 1869 { 1870 // All clipRects in the stack are computed relative to m_owningLayer, so convert them back to compositedAncestor. 1871 auto offsetFromCompositedAncestor = toLayoutSize(m_owningLayer.convertToLayerCoords(compositedAncestor, { }, RenderLayer::AdjustForColumns)); 1872 LayoutRect lastClipLayerRect = parentGraphicsLayerRect; 1873 1874 auto deviceScaleFactor = this->deviceScaleFactor(); 1875 for (auto& entry : clippingStack.stack()) { 1876 auto clipRect = entry.clipData.clipRect; 1877 LayoutSize clippingOffset = computeOffsetFromAncestorGraphicsLayer(compositedAncestor, clipRect.location() + offsetFromCompositedAncestor, deviceScaleFactor); 1878 LayoutRect snappedClippingLayerRect = snappedGraphicsLayer(clippingOffset, clipRect.size(), deviceScaleFactor).m_snappedRect; 1879 1880 entry.clippingLayer->setPosition(toLayoutPoint(snappedClippingLayerRect.location() - lastClipLayerRect.location())); 1881 lastClipLayerRect = snappedClippingLayerRect; 1882 1883 entry.clippingLayer->setSize(snappedClippingLayerRect.size()); 1884 1885 if (entry.clipData.isOverflowScroll) { 1886 ScrollOffset scrollOffset = entry.clipData.clippingLayer->scrollOffset(); 1887 1888 entry.clippingLayer->setBoundsOrigin(scrollOffset); 1889 lastClipLayerRect.moveBy(-scrollOffset); 1890 } else 1891 entry.clippingLayer->setBoundsOrigin({ }); 1892 } 1893 1894 parentGraphicsLayerRect = lastClipLayerRect; 1809 1895 } 1810 1896 … … 1816 1902 if (needsAncestorClip) { 1817 1903 if (compositor().updateAncestorClippingStack(m_owningLayer, compositingAncestor)) { 1818 // Make any layers we don't have. 1819 if (m_ancestorClippingStack) { 1820 for (auto& entry : m_ancestorClippingStack->stack()) { 1821 if (!entry.clippingLayer) { 1822 entry.clippingLayer = createGraphicsLayer(entry.clipData.isOverflowScroll ? "clip for scroller" : "ancestor clipping"); 1823 entry.clippingLayer->setMasksToBounds(true); 1824 entry.clippingLayer->setPaintingPhase({ }); 1825 } 1826 } 1827 } 1904 if (m_ancestorClippingStack) 1905 ensureClippingStackLayers(*m_ancestorClippingStack); 1828 1906 1829 1907 layersChanged = true; 1830 1908 } 1831 1909 } else if (m_ancestorClippingStack) { 1832 for (auto& entry : m_ancestorClippingStack->stack()) 1833 GraphicsLayer::unparentAndClear(entry.clippingLayer); 1910 removeClippingStackLayers(*m_ancestorClippingStack); 1834 1911 1835 1912 m_ancestorClippingStack = nullptr; … … 2853 2930 2854 2931 return m_graphicsLayer.get(); 2932 } 2933 2934 LayoutSize RenderLayerBacking::offsetRelativeToRendererOriginForDescendantLayers() const 2935 { 2936 if (m_scrolledContentsLayer) 2937 return toLayoutSize(scrollContainerLayerBox(downcast<RenderBox>(renderer())).location()); 2938 2939 if (hasClippingLayer()) 2940 return toLayoutSize(clippingLayerBox(downcast<RenderBox>(renderer())).location()); 2941 2942 return { }; 2855 2943 } 2856 2944 -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r265289 r266825 115 115 bool updateAncestorClippingStack(Vector<CompositedClipData>&&); 116 116 117 void ensureOverflowControlsHostLayerAncestorClippingStack(const RenderLayer* compositedAncestor); 118 LayerAncestorClippingStack* overflowControlsHostLayerAncestorClippingStack() const { return m_overflowControlsHostLayerAncestorClippingStack.get(); } 119 117 120 GraphicsLayer* contentsContainmentLayer() const { return m_contentsContainmentLayer.get(); } 118 121 … … 271 274 GraphicsLayer* overflowControlsContainer() const { return m_overflowControlsContainer.get(); } 272 275 276 void adjustOverflowControlsPositionRelativeToAncestor(const RenderLayer&); 277 273 278 bool canCompositeFilters() const { return m_canCompositeFilters; } 274 279 #if ENABLE(FILTERS_LEVEL_2) … … 332 337 FloatPoint3D computeTransformOriginForPainting(const LayoutRect& borderBox) const; 333 338 339 LayoutSize offsetRelativeToRendererOriginForDescendantLayers() const; 340 341 void ensureClippingStackLayers(LayerAncestorClippingStack&); 342 void removeClippingStackLayers(LayerAncestorClippingStack&); 343 344 void updateClippingStackLayerGeometry(LayerAncestorClippingStack&, const RenderLayer* compositedAncestor, LayoutRect& parentGraphicsLayerRect); 345 346 void connectClippingStackLayers(LayerAncestorClippingStack&); 347 334 348 void updateOpacity(const RenderStyle&); 335 349 void updateTransform(const RenderStyle&); … … 400 414 401 415 std::unique_ptr<LayerAncestorClippingStack> m_ancestorClippingStack; // Only used if we are clipped by an ancestor which is not a stacking context. 416 std::unique_ptr<LayerAncestorClippingStack> m_overflowControlsHostLayerAncestorClippingStack; // Used when we have an overflow controls host layer which was reparented, and needs clipping by ancestors. 402 417 403 418 RefPtr<GraphicsLayer> m_contentsContainmentLayer; // Only used if we have a background layer; takes the transform. -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r266342 r266825 212 212 213 213 struct RenderLayerCompositor::UpdateBackingTraversalState { 214 215 UpdateBackingTraversalState(RenderLayer* compAncestor = nullptr) 214 UpdateBackingTraversalState(RenderLayer* compAncestor = nullptr, Vector<RenderLayer*>* clippedLayers = nullptr, Vector<RenderLayer*>* overflowScrollers = nullptr) 216 215 : compositingAncestor(compAncestor) 216 , layersClippedByScrollers(clippedLayers) 217 , overflowScrollLayers(overflowScrollers) 217 218 { 218 219 } … … 220 221 UpdateBackingTraversalState stateForDescendants() const 221 222 { 222 UpdateBackingTraversalState state(compositingAncestor );223 UpdateBackingTraversalState state(compositingAncestor, layersClippedByScrollers, overflowScrollLayers); 223 224 #if !LOG_DISABLED 224 225 state.depth = depth + 1; … … 228 229 229 230 RenderLayer* compositingAncestor; 231 232 // List of layers in the current stacking context that are clipped by ancestor scrollers. 233 Vector<RenderLayer*>* layersClippedByScrollers; 234 // List of layers with composited overflow:scroll. 235 Vector<RenderLayer*>* overflowScrollLayers; 236 230 237 #if !LOG_DISABLED 231 238 unsigned depth { 0 }; … … 1263 1270 ScrollingTreeState scrollingStateForDescendants = scrollingTreeState; 1264 1271 UpdateBackingTraversalState traversalStateForDescendants = traversalState.stateForDescendants(); 1265 1272 Vector<RenderLayer*> layersClippedByScrollers; 1273 Vector<RenderLayer*> compositedOverflowScrollLayers; 1274 1266 1275 if (layer.needsScrollingTreeUpdate()) 1267 1276 scrollingTreeState.needSynchronousScrollingReasonsUpdate = true; … … 1312 1321 1313 1322 traversalStateForDescendants.compositingAncestor = &layer; 1323 traversalStateForDescendants.layersClippedByScrollers = &layersClippedByScrollers; 1324 traversalStateForDescendants.overflowScrollLayers = &compositedOverflowScrollLayers; 1314 1325 1315 1326 #if !LOG_DISABLED … … 1377 1388 } 1378 1389 1390 adjustOverflowScrollbarContainerLayers(layer, compositedOverflowScrollLayers, layersClippedByScrollers, layerChildren); 1379 1391 layerBacking->parentForSublayers()->setChildren(WTFMove(layerChildren)); 1380 1392 } … … 1383 1395 childLayersOfEnclosingLayer.append(*layerBacking->childForSuperlayers()); 1384 1396 1397 if (layerBacking->hasAncestorClippingLayers() && layerBacking->ancestorClippingStack()->hasAnyScrollingLayers()) 1398 traversalState.layersClippedByScrollers->append(&layer); 1399 1400 if (layer.hasCompositedScrollableOverflow()) 1401 traversalState.overflowScrollLayers->append(&layer); 1402 1385 1403 layerBacking->updateAfterDescendants(); 1386 1404 } 1387 1405 1388 1406 layer.clearUpdateBackingOrHierarchyTraversalState(); 1407 } 1408 1409 // Finds the set of overflow:scroll layers whose overflow controls hosting layer needs to be reparented, 1410 // to ensure that the scrollbars show on top of positioned content inside the scroller. 1411 void RenderLayerCompositor::adjustOverflowScrollbarContainerLayers(RenderLayer& stackingContextLayer, const Vector<RenderLayer*>& overflowScrollLayers, const Vector<RenderLayer*>& layersClippedByScrollers, Vector<Ref<GraphicsLayer>>& layerChildren) 1412 { 1413 if (layersClippedByScrollers.isEmpty()) 1414 return; 1415 1416 HashMap<RenderLayer*, RenderLayer*> overflowScrollToLastContainedLayerMap; 1417 1418 for (auto* clippedLayer : layersClippedByScrollers) { 1419 auto* clippingStack = clippedLayer->backing()->ancestorClippingStack(); 1420 1421 for (const auto& stackEntry : clippingStack->stack()) { 1422 if (!stackEntry.clipData.isOverflowScroll) 1423 continue; 1424 1425 if (auto* layer = stackEntry.clipData.clippingLayer.get()) 1426 overflowScrollToLastContainedLayerMap.set(layer, clippedLayer); 1427 } 1428 } 1429 1430 for (auto* overflowScrollingLayer : overflowScrollLayers) { 1431 auto it = overflowScrollToLastContainedLayerMap.find(overflowScrollingLayer); 1432 if (it == overflowScrollToLastContainedLayerMap.end()) 1433 continue; 1434 1435 auto* lastContainedDescendant = it->value; 1436 if (!lastContainedDescendant || !lastContainedDescendant->isComposited()) 1437 continue; 1438 1439 auto* lastContainedDescendantBacking = lastContainedDescendant->backing(); 1440 auto* overflowBacking = overflowScrollingLayer->backing(); 1441 if (!overflowBacking) 1442 continue; 1443 1444 auto* overflowContainerLayer = overflowBacking->overflowControlsContainer(); 1445 if (!overflowContainerLayer) 1446 continue; 1447 1448 LOG_WITH_STREAM(Compositing, stream << "Moving overflow controls layer for " << overflowScrollingLayer << " to appear after " << lastContainedDescendant); 1449 1450 overflowContainerLayer->removeFromParent(); 1451 1452 if (overflowBacking->hasAncestorClippingLayers()) 1453 overflowBacking->ensureOverflowControlsHostLayerAncestorClippingStack(&stackingContextLayer); 1454 1455 if (auto* overflowControlsAncestorClippingStack = overflowBacking->overflowControlsHostLayerAncestorClippingStack()) { 1456 Vector<Ref<GraphicsLayer>> children; 1457 children.append(*overflowContainerLayer); 1458 overflowControlsAncestorClippingStack->lastClippingLayer()->setChildren(WTFMove(children)); 1459 overflowContainerLayer = overflowControlsAncestorClippingStack->firstClippingLayer(); 1460 } 1461 1462 auto* lastDescendantGraphicsLayer = lastContainedDescendantBacking->childForSuperlayers(); 1463 auto lastDescendantIndex = layerChildren.findMatching([&](auto& item) { 1464 return item.ptr() == lastDescendantGraphicsLayer; 1465 }); 1466 1467 if (lastDescendantIndex != notFound) 1468 layerChildren.insert(lastDescendantIndex + 1, *overflowContainerLayer); 1469 1470 overflowBacking->adjustOverflowControlsPositionRelativeToAncestor(stackingContextLayer); 1471 } 1389 1472 } 1390 1473 … … 4664 4747 } 4665 4748 } 4749 4750 // FIXME: also m_overflowControlsHostLayerAncestorClippingStack 4666 4751 4667 4752 if (!nodeID) -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r266342 r266825 445 445 void updateBackingAndHierarchy(RenderLayer&, Vector<Ref<GraphicsLayer>>& childGraphicsLayersOfEnclosingLayer, struct UpdateBackingTraversalState&, struct ScrollingTreeState&, OptionSet<UpdateLevel> = { }); 446 446 447 void adjustOverflowScrollbarContainerLayers(RenderLayer& stackingContextLayer, const Vector<RenderLayer*>& overflowScrollLayers, const Vector<RenderLayer*>& layersClippedByScrollers, Vector<Ref<GraphicsLayer>>&); 448 447 449 bool layerHas3DContent(const RenderLayer&) const; 448 450 bool isRunningTransformAnimation(RenderLayerModelObject&) const;
Note:
See TracChangeset
for help on using the changeset viewer.