Changeset 246725 in webkit
- Timestamp:
- Jun 23, 2019 8:09:40 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 32 added
- 77 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246721 r246725 1 2019-06-23 Simon Fraser <simon.fraser@apple.com> 2 3 [Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped 4 https://bugs.webkit.org/show_bug.cgi?id=199133 5 rdar://problem/43614439 6 7 Reviewed by Antti Koivisto. 8 9 New baselines for: 10 - clipping layers no longer have offsetFromRenderer(), which they didn't need. 11 - positioned nodes don't print scrollBehavior (they are always "Stationary") 12 - "Moves" positioned nodes are replaced with overflow scroll proxy nodes 13 14 * compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: 15 * compositing/geometry/clip-expected.txt: 16 * compositing/geometry/clip-inside-expected.txt: 17 * compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: 18 * compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt: 19 * compositing/layer-creation/clipping-scope/nested-scroller-overlap.html: 20 * compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt: 21 * compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt: 22 * compositing/overflow/clip-descendents-expected.txt: 23 * compositing/overflow/scrolling-content-clip-to-viewport-expected.txt: 24 * compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: 25 * compositing/rtl/rtl-scrolling-with-transformed-descendants.html: 26 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt: Added. 27 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html: Added. 28 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt: Added. 29 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt: Added. 30 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html: Added. 31 * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html: Added. 32 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt: Added. 33 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html: Added. 34 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt: Added. 35 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html: Added. 36 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt: Added. 37 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt: Added. 38 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html: Added. 39 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt: Added. 40 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html: Added. 41 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt: Added. 42 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html: Added. 43 * compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html: Added. 44 * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: 45 * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: 46 * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html: 47 * platform/ios-wk2/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt: 48 * platform/ios-wk2/compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt: 49 * platform/ios-wk2/compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt: 50 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt: Added. 51 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt: Added. 52 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt: Added. 53 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt: Added. 54 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt: Added. 55 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt: Added. 56 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt: Added. 57 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt: Added. 58 * platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt: Added. 59 * platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: 60 * platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: 61 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers-expected.txt: 62 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt: 63 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-expected.txt: Copied from LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt. 64 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested-expected.txt: Copied from LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt. 65 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt: 66 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: 67 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: 68 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: 69 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt: 70 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: 71 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: 72 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt: 73 * platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: 74 * platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: 75 * scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers-expected.txt: 76 * scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt: 77 * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-expected.txt: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt. 78 * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested-expected.txt: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt. 79 * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html: Added. 80 * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html: Added. 81 * scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt: 82 * scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: 83 * scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: 84 * scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: 85 * scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt: 86 * scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: 87 * scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: 88 * scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt: 89 1 90 2019-06-23 Antoine Quint <graouts@apple.com> 2 91 -
trunk/LayoutTests/compositing/backing/backing-store-attachment-empty-keyframe-expected.txt
r244800 r246725 10 10 (children 1 11 11 (GraphicsLayer 12 (offsetFromRenderer width=-501 height=0)13 12 (position 9.00 101.00) 14 13 (bounds 501.00 150.00) -
trunk/LayoutTests/compositing/geometry/clip-expected.txt
r225897 r246725 17 17 ) 18 18 (GraphicsLayer 19 (offsetFromRenderer width=5 height=5)20 19 (position 215.00 15.00) 21 20 (bounds 110.00 110.00) -
trunk/LayoutTests/compositing/geometry/clip-inside-expected.txt
r225897 r246725 18 18 ) 19 19 (GraphicsLayer 20 (offsetFromRenderer width=15 height=25)21 20 (position 225.00 35.00) 22 21 (bounds 90.00 80.00) -
trunk/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt
r245170 r246725 23 23 ) 24 24 (GraphicsLayer 25 (offsetFromRenderer width=0 height=100)26 25 (position 28.00 250.00) 27 26 (bounds 185.00 200.00) -
trunk/LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt
r245602 r246725 2 2 (anchor 0.00 0.00) 3 3 (bounds 800.00 600.00) 4 (clips 1) 4 5 (children 1 5 6 (GraphicsLayer … … 16 17 (position 1.00 1.00) 17 18 (bounds 385.00 350.00) 19 (clips 1) 18 20 (children 1 19 21 (GraphicsLayer … … 32 34 (position 1.00 1.00) 33 35 (bounds 285.00 200.00) 36 (clips 1) 34 37 (children 1 35 38 (GraphicsLayer … … 50 53 ) 51 54 (GraphicsLayer 52 (offsetFromRenderer width=-10 height=-10)53 55 (position 24.00 106.00) 54 56 (bounds 385.00 350.00) 57 (clips 1) 55 58 (children 1 56 59 (GraphicsLayer … … 66 69 ) 67 70 (GraphicsLayer 68 ( offsetFromRenderer width=-10 height=-10)69 ( position 45.00 217.00)70 ( bounds 285.00 200.00)71 (position 24.00 106.00) 72 (bounds 385.00 350.00) 73 (clips 1) 71 74 (children 1 72 75 (GraphicsLayer 73 (position 10.00 10.00) 74 (bounds 100.00 80.00) 75 (contentsOpaque 1) 76 (position 21.00 111.00) 77 (bounds 285.00 200.00) 78 (clips 1) 79 (children 1 80 (GraphicsLayer 81 (position 10.00 10.00) 82 (bounds 100.00 80.00) 83 (contentsOpaque 1) 84 ) 85 ) 76 86 ) 77 87 ) 78 88 ) 79 89 (GraphicsLayer 80 ( offsetFromRenderer width=-10 height=-100)81 ( position 45.00 217.00)82 ( bounds 285.00 200.00)90 (position 24.00 106.00) 91 (bounds 385.00 350.00) 92 (clips 1) 83 93 (children 1 84 94 (GraphicsLayer 85 (position 10.00 100.00) 86 (bounds 100.00 80.00) 87 (contentsOpaque 1) 95 (position 21.00 111.00) 96 (bounds 285.00 200.00) 97 (clips 1) 98 (children 1 99 (GraphicsLayer 100 (position 10.00 100.00) 101 (bounds 100.00 80.00) 102 (contentsOpaque 1) 103 ) 104 ) 88 105 ) 89 106 ) 90 107 ) 91 108 (GraphicsLayer 92 ( offsetFromRenderer width=-10 height=-190)93 ( position 45.00 217.00)94 ( bounds 285.00 200.00)109 (position 24.00 106.00) 110 (bounds 385.00 350.00) 111 (clips 1) 95 112 (children 1 96 113 (GraphicsLayer 97 (position 10.00 190.00) 98 (bounds 100.00 80.00) 99 (contentsOpaque 1) 114 (position 21.00 111.00) 115 (bounds 285.00 200.00) 116 (clips 1) 117 (children 1 118 (GraphicsLayer 119 (position 10.00 190.00) 120 (bounds 100.00 80.00) 121 (contentsOpaque 1) 122 ) 123 ) 100 124 ) 101 125 ) -
trunk/LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap.html
r245602 r246725 50 50 window.addEventListener('load', () => { 51 51 if (window.testRunner) 52 document.getElementById('layers').innerText = window.internals.layerTreeAsText(document );52 document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING); 53 53 }, false); 54 54 </script> -
trunk/LayoutTests/compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt
r245602 r246725 27 27 ) 28 28 (GraphicsLayer 29 (offsetFromRenderer width=-10 height=-10)30 29 (position 9.00 9.00) 31 30 (bounds 285.00 300.00) … … 39 38 ) 40 39 (GraphicsLayer 41 (offsetFromRenderer width=-40 height=-20)42 40 (position 9.00 9.00) 43 41 (bounds 285.00 300.00) … … 51 49 ) 52 50 (GraphicsLayer 53 (offsetFromRenderer width=-40 height=-140)54 51 (position 9.00 9.00) 55 52 (bounds 285.00 300.00) … … 63 60 ) 64 61 (GraphicsLayer 65 (offsetFromRenderer width=-40 height=-260)66 62 (position 9.00 9.00) 67 63 (bounds 285.00 300.00) -
trunk/LayoutTests/compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt
r245602 r246725 27 27 ) 28 28 (GraphicsLayer 29 (offsetFromRenderer width=-10 height=-10)30 29 (position 9.00 9.00) 31 30 (bounds 285.00 300.00) … … 39 38 ) 40 39 (GraphicsLayer 41 (offsetFromRenderer width=-40 height=-20)42 40 (position 9.00 9.00) 43 41 (bounds 285.00 300.00) … … 51 49 ) 52 50 (GraphicsLayer 53 (offsetFromRenderer width=-40 height=-260)54 51 (position 9.00 9.00) 55 52 (bounds 285.00 300.00) -
trunk/LayoutTests/compositing/overflow/clip-descendents-expected.txt
r225897 r246725 8 8 (children 4 9 9 (GraphicsLayer 10 (offsetFromRenderer width=-2 height=-12)11 10 (position 48.00 38.00) 12 11 (bounds 60.00 70.00) … … 21 20 ) 22 21 (GraphicsLayer 23 (offsetFromRenderer width=-2 height=-12)24 22 (position 240.00 38.00) 25 23 (bounds 60.00 70.00) -
trunk/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt
r243347 r246725 22 22 ) 23 23 (GraphicsLayer 24 (offsetFromRenderer width=-10 height=-10)25 24 (bounds 305.00 325.00) 26 25 (children 1 -
trunk/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt
r246538 r246725 3 3 (anchor 0.00 0.00) 4 4 (bounds 800.00 600.00) 5 (clips 1) 5 6 (children 1 6 7 (GraphicsLayer … … 18 19 (bounds origin 366.00 0.00) 19 20 (bounds 400.00 204.00) 21 (clips 1) 20 22 (children 1 21 23 (GraphicsLayer … … 31 33 ) 32 34 (GraphicsLayer 33 (offsetFromRenderer width=-96 height=0)34 35 (position 10.00 10.00) 36 (bounds origin 366.00 0.00) 35 37 (bounds 400.00 204.00) 38 (clips 1) 36 39 (children 1 37 40 (GraphicsLayer 38 (position 96.00 0.00)41 (position 462.00 0.00) 39 42 (anchor 0.00 0.00) 40 43 (bounds 150.00 200.00) … … 44 47 ) 45 48 (GraphicsLayer 46 (offsetFromRenderer width=58 height=0)47 49 (position 10.00 10.00) 50 (bounds origin 366.00 0.00) 48 51 (bounds 400.00 204.00) 52 (clips 1) 49 53 (children 1 50 54 (GraphicsLayer 51 (position -58.00 0.00)55 (position 308.00 0.00) 52 56 (bounds 150.00 200.00) 53 57 (contentsOpaque 1) -
trunk/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants.html
r244628 r246725 31 31 function dumpLayers() 32 32 { 33 document.getElementById('layertree').textContent = window.internals.layerTreeAsText(document );33 document.getElementById('layertree').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING); 34 34 } 35 35 window.addEventListener('load', dumpLayers, false); -
trunk/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt
r245170 r246725 28 28 ) 29 29 (GraphicsLayer 30 (offsetFromRenderer width=-34 height=-134)31 30 (position 10.00 10.00) 32 31 (bounds 385.00 400.00) -
trunk/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt
r245170 r246725 2 2 (anchor 0.00 0.00) 3 3 (bounds 800.00 600.00) 4 (clips 1) 4 5 (children 1 5 6 (GraphicsLayer … … 15 16 (position 2.00 2.00) 16 17 (bounds 320.00 320.00) 18 (clips 1) 17 19 (children 1 18 20 (GraphicsLayer … … 25 27 (position 2.00 2.00) 26 28 (bounds 281.00 296.00) 29 (clips 1) 27 30 (children 1 28 31 (GraphicsLayer … … 45 48 ) 46 49 (GraphicsLayer 47 ( offsetFromRenderer width=-20 height=-20)48 ( position 42.00 34.00)49 ( bounds 281.00 296.00)50 (position 30.00 22.00) 51 (bounds 320.00 320.00) 52 (clips 1) 50 53 (children 1 51 54 (GraphicsLayer 52 (position 20.00 20.00) 53 (bounds 241.00 24.00) 54 (drawsContent 1) 55 (position 12.00 12.00) 56 (bounds 281.00 296.00) 57 (clips 1) 58 (children 1 59 (GraphicsLayer 60 (position 20.00 20.00) 61 (bounds 241.00 24.00) 62 (drawsContent 1) 63 ) 64 ) 55 65 ) 56 66 ) -
trunk/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
r245170 r246725 48 48 window.addEventListener('load', () => { 49 49 if (window.internals) 50 document.getElementById('layers').textContent = internals.layerTreeAsText(document );50 document.getElementById('layers').textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING); 51 51 }, false); 52 52 </script> -
trunk/LayoutTests/legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe-expected.txt
r244800 r246725 10 10 (children 1 11 11 (GraphicsLayer 12 (offsetFromRenderer width=-501 height=0)13 12 (position 9.00 101.00) 14 13 (bounds 501.00 150.00) -
trunk/LayoutTests/platform/ios-wk2/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt
r245602 r246725 2 2 (anchor 0.00 0.00) 3 3 (bounds 800.00 600.00) 4 (clips 1) 4 5 (children 1 5 6 (GraphicsLayer … … 16 17 (position 1.00 1.00) 17 18 (bounds 400.00 350.00) 19 (clips 1) 18 20 (children 1 19 21 (GraphicsLayer … … 32 34 (position 1.00 1.00) 33 35 (bounds 300.00 200.00) 36 (clips 1) 34 37 (children 1 35 38 (GraphicsLayer … … 50 53 ) 51 54 (GraphicsLayer 52 (offsetFromRenderer width=-10 height=-10)53 55 (position 24.00 106.00) 54 56 (bounds 400.00 350.00) 57 (clips 1) 55 58 (children 1 56 59 (GraphicsLayer … … 66 69 ) 67 70 (GraphicsLayer 68 ( offsetFromRenderer width=-10 height=-10)69 ( position 45.00 217.00)70 ( bounds 300.00 200.00)71 (position 24.00 106.00) 72 (bounds 400.00 350.00) 73 (clips 1) 71 74 (children 1 72 75 (GraphicsLayer 73 (position 10.00 10.00) 74 (bounds 100.00 80.00) 75 (contentsOpaque 1) 76 (position 21.00 111.00) 77 (bounds 300.00 200.00) 78 (clips 1) 79 (children 1 80 (GraphicsLayer 81 (position 10.00 10.00) 82 (bounds 100.00 80.00) 83 (contentsOpaque 1) 84 ) 85 ) 76 86 ) 77 87 ) 78 88 ) 79 89 (GraphicsLayer 80 ( offsetFromRenderer width=-10 height=-100)81 ( position 45.00 217.00)82 ( bounds 300.00 200.00)90 (position 24.00 106.00) 91 (bounds 400.00 350.00) 92 (clips 1) 83 93 (children 1 84 94 (GraphicsLayer 85 (position 10.00 100.00) 86 (bounds 100.00 80.00) 87 (contentsOpaque 1) 95 (position 21.00 111.00) 96 (bounds 300.00 200.00) 97 (clips 1) 98 (children 1 99 (GraphicsLayer 100 (position 10.00 100.00) 101 (bounds 100.00 80.00) 102 (contentsOpaque 1) 103 ) 104 ) 88 105 ) 89 106 ) 90 107 ) 91 108 (GraphicsLayer 92 ( offsetFromRenderer width=-10 height=-190)93 ( position 45.00 217.00)94 ( bounds 300.00 200.00)109 (position 24.00 106.00) 110 (bounds 400.00 350.00) 111 (clips 1) 95 112 (children 1 96 113 (GraphicsLayer 97 (position 10.00 190.00) 98 (bounds 100.00 80.00) 99 (contentsOpaque 1) 114 (position 21.00 111.00) 115 (bounds 300.00 200.00) 116 (clips 1) 117 (children 1 118 (GraphicsLayer 119 (position 10.00 190.00) 120 (bounds 100.00 80.00) 121 (contentsOpaque 1) 122 ) 123 ) 100 124 ) 101 125 ) -
trunk/LayoutTests/platform/ios-wk2/compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt
r245602 r246725 27 27 ) 28 28 (GraphicsLayer 29 (offsetFromRenderer width=-10 height=-10)30 29 (position 9.00 9.00) 31 30 (bounds 300.00 300.00) … … 39 38 ) 40 39 (GraphicsLayer 41 (offsetFromRenderer width=-40 height=-20)42 40 (position 9.00 9.00) 43 41 (bounds 300.00 300.00) … … 51 49 ) 52 50 (GraphicsLayer 53 (offsetFromRenderer width=-40 height=-140)54 51 (position 9.00 9.00) 55 52 (bounds 300.00 300.00) … … 63 60 ) 64 61 (GraphicsLayer 65 (offsetFromRenderer width=-40 height=-260)66 62 (position 9.00 9.00) 67 63 (bounds 300.00 300.00) -
trunk/LayoutTests/platform/ios-wk2/compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt
r245602 r246725 27 27 ) 28 28 (GraphicsLayer 29 (offsetFromRenderer width=-10 height=-10)30 29 (position 9.00 9.00) 31 30 (bounds 300.00 300.00) … … 39 38 ) 40 39 (GraphicsLayer 41 (offsetFromRenderer width=-40 height=-20)42 40 (position 9.00 9.00) 43 41 (bounds 300.00 300.00) … … 51 49 ) 52 50 (GraphicsLayer 53 (offsetFromRenderer width=-40 height=-260)54 51 (position 9.00 9.00) 55 52 (bounds 300.00 300.00) -
trunk/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt
r245170 r246725 28 28 ) 29 29 (GraphicsLayer 30 (offsetFromRenderer width=-34 height=-134)31 30 (position 10.00 10.00) 32 31 (bounds 400.00 400.00) -
trunk/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt
r245170 r246725 2 2 (anchor 0.00 0.00) 3 3 (bounds 800.00 600.00) 4 (clips 1) 4 5 (children 1 5 6 (GraphicsLayer … … 15 16 (position 2.00 2.00) 16 17 (bounds 320.00 320.00) 18 (clips 1) 17 19 (children 1 18 20 (GraphicsLayer … … 25 27 (position 2.00 2.00) 26 28 (bounds 296.00 296.00) 29 (clips 1) 27 30 (children 1 28 31 (GraphicsLayer … … 45 48 ) 46 49 (GraphicsLayer 47 ( offsetFromRenderer width=-20 height=-20)48 ( position 42.00 34.00)49 ( bounds 296.00 296.00)50 (position 30.00 22.00) 51 (bounds 320.00 320.00) 52 (clips 1) 50 53 (children 1 51 54 (GraphicsLayer 52 (position 20.00 20.00) 53 (bounds 256.00 24.00) 54 (drawsContent 1) 55 (position 12.00 12.00) 56 (bounds 296.00 296.00) 57 (clips 1) 58 (children 1 59 (GraphicsLayer 60 (position 20.00 20.00) 61 (bounds 256.00 24.00) 62 (drawsContent 1) 63 ) 64 ) 55 65 ) 56 66 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers-expected.txt
r245656 r246725 38 38 (Positioned node 39 39 (layout constraints 40 (layer-position-at-last-layout (-2,6)) 41 (positioning-behavior stationary)) 40 (layer-position-at-last-layout (-2,6))) 42 41 (related overflow nodes 2) 43 42 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt
r245772 r246725 25 25 (has enabled vertical scrollbar 1)) 26 26 ) 27 (Positioned node 28 (layout constraints 29 (layer-position-at-last-layout (10,10)) 30 (positioning-behavior moves)) 31 (related overflow nodes 1) 27 (Overflow scroll proxy node 28 (related overflow scrolling node scroll position (0,0)) 32 29 (children 1 33 30 (Positioned node 34 31 (layout constraints 35 (layer-position-at-last-layout (71,22)) 36 (positioning-behavior stationary)) 32 (layer-position-at-last-layout (71,22))) 37 33 (related overflow nodes 1) 38 34 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-expected.txt
r246724 r246725 15 15 (children 2 16 16 (Overflow scrolling node 17 (scrollable area size 220 170) 18 (contents size 220 1020) 19 (parent relative scrollable rect at (19,11) size 220x170) 17 (scroll position 0 50) 18 (scrollable area size 316 316) 19 (contents size 316 540) 20 (requested scroll position 0 50) 21 (requested scroll position represents programmatic scroll 1) 22 (parent relative scrollable rect at (41,33) size 316x316) 20 23 (scrollable area parameters 21 24 (horizontal scroll elasticity 1) … … 25 28 (has enabled vertical scrollbar 1)) 26 29 ) 27 (Positioned node 28 (layout constraints 29 (layer-position-at-last-layout (10,10)) 30 (positioning-behavior moves)) 31 (related overflow nodes 1) 32 (children 1 33 (Positioned node 34 (layout constraints 35 (layer-position-at-last-layout (71,22)) 36 (positioning-behavior stationary)) 37 (related overflow nodes 1) 38 ) 39 ) 30 (Overflow scroll proxy node 31 (related overflow scrolling node scroll position (0,50)) 40 32 ) 41 33 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested-expected.txt
r246724 r246725 13 13 (max layout viewport origin (0,0)) 14 14 (behavior for fixed 0) 15 (children 215 (children 3 16 16 (Overflow scrolling node 17 (scrollable area size 300 300) 18 (contents size 300 464) 19 (parent relative scrollable rect at (30,22) size 300x300) 17 (scroll position 0 50) 18 (scrollable area size 316 316) 19 (contents size 316 640) 20 (requested scroll position 0 50) 21 (requested scroll position represents programmatic scroll 1) 22 (parent relative scrollable rect at (41,33) size 316x316) 20 23 (scrollable area parameters 21 24 (horizontal scroll elasticity 1) … … 24 27 (vertical scrollbar mode 0) 25 28 (has enabled vertical scrollbar 1)) 26 )27 (Positioned node28 (layout constraints29 (layer-position-at-last-layout (20,130))30 (positioning-behavior moves))31 (related overflow nodes 1)32 29 (children 1 33 30 (Overflow scrolling node 31 (scroll position 0 150) 34 32 (scrollable area size 200 200) 35 (contents size 200 520) 36 (parent relative scrollable rect at (2,2) size 200x200) 33 (contents size 200 554) 34 (requested scroll position 0 150) 35 (requested scroll position represents programmatic scroll 1) 36 (parent relative scrollable rect at (56,206) size 200x200) 37 37 (scrollable area parameters 38 38 (horizontal scroll elasticity 1) … … 44 44 ) 45 45 ) 46 (Overflow scroll proxy node 47 (related overflow scrolling node scroll position (0,50)) 48 ) 49 (Overflow scroll proxy node 50 (related overflow scrolling node scroll position (0,150)) 51 ) 46 52 ) 47 53 ) 48 54 55 -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt
r245682 r246725 27 27 (Positioned node 28 28 (layout constraints 29 (layer-position-at-last-layout (20,28)) 30 (positioning-behavior stationary)) 29 (layer-position-at-last-layout (20,28))) 31 30 (related overflow nodes 1) 32 31 ) 33 32 (Positioned node 34 33 (layout constraints 35 (layer-position-at-last-layout (40,48)) 36 (positioning-behavior stationary)) 34 (layer-position-at-last-layout (40,48))) 37 35 (related overflow nodes 1) 38 36 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt
r245170 r246725 28 28 (has enabled vertical scrollbar 1)) 29 29 ) 30 (Positioned node 31 (layout constraints 32 (layer-position-at-last-layout (10,10)) 33 (positioning-behavior moves)) 34 (related overflow nodes 1) 30 (Overflow scroll proxy node 31 (related overflow scrolling node scroll position (0,0)) 35 32 ) 36 (Positioned node 37 (layout constraints 38 (layer-position-at-last-layout (50,50)) 39 (positioning-behavior moves)) 40 (related overflow nodes 1) 33 (Overflow scroll proxy node 34 (related overflow scrolling node scroll position (0,0)) 41 35 ) 42 (Positioned node 43 (layout constraints 44 (layer-position-at-last-layout (62,82)) 45 (positioning-behavior moves)) 46 (related overflow nodes 1) 36 (Overflow scroll proxy node 37 (related overflow scrolling node scroll position (0,0)) 47 38 ) 48 (Positioned node 49 (layout constraints 50 (layer-position-at-last-layout (77,77)) 51 (positioning-behavior moves)) 52 (related overflow nodes 1) 39 (Overflow scroll proxy node 40 (related overflow scrolling node scroll position (0,0)) 53 41 ) 54 42 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt
r245170 r246725 27 27 (has enabled vertical scrollbar 1)) 28 28 ) 29 (Positioned node 30 (layout constraints 31 (layer-position-at-last-layout (10,10)) 32 (positioning-behavior moves)) 33 (related overflow nodes 1) 29 (Overflow scroll proxy node 30 (related overflow scrolling node scroll position (0,0)) 34 31 ) 35 (Positioned node 36 (layout constraints 37 (layer-position-at-last-layout (0,30)) 38 (positioning-behavior moves)) 39 (related overflow nodes 1) 32 (Overflow scroll proxy node 33 (related overflow scrolling node scroll position (0,0)) 40 34 ) 41 (Positioned node 42 (layout constraints 43 (layer-position-at-last-layout (13,43)) 44 (positioning-behavior moves)) 45 (related overflow nodes 1) 35 (Overflow scroll proxy node 36 (related overflow scrolling node scroll position (0,0)) 46 37 ) 47 (Positioned node 48 (layout constraints 49 (layer-position-at-last-layout (53,83)) 50 (positioning-behavior moves)) 51 (related overflow nodes 1) 38 (Overflow scroll proxy node 39 (related overflow scrolling node scroll position (0,0)) 52 40 ) 53 (Positioned node 54 (layout constraints 55 (layer-position-at-last-layout (65,115)) 56 (positioning-behavior moves)) 57 (related overflow nodes 1) 41 (Overflow scroll proxy node 42 (related overflow scrolling node scroll position (0,0)) 58 43 ) 59 (Positioned node 60 (layout constraints 61 (layer-position-at-last-layout (80,110)) 62 (positioning-behavior moves)) 63 (related overflow nodes 1) 44 (Overflow scroll proxy node 45 (related overflow scrolling node scroll position (0,0)) 64 46 ) 65 47 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt
r245682 r246725 29 29 (Positioned node 30 30 (layout constraints 31 (layer-position-at-last-layout (20,28)) 32 (positioning-behavior stationary)) 31 (layer-position-at-last-layout (20,28))) 33 32 (related overflow nodes 1) 34 33 ) 35 34 (Positioned node 36 35 (layout constraints 37 (layer-position-at-last-layout (32,60)) 38 (positioning-behavior stationary)) 36 (layer-position-at-last-layout (32,60))) 39 37 (related overflow nodes 1) 40 38 ) 41 39 (Positioned node 42 40 (layout constraints 43 (layer-position-at-last-layout (47,55)) 44 (positioning-behavior stationary)) 41 (layer-position-at-last-layout (47,55))) 45 42 (related overflow nodes 1) 46 43 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt
r245651 r246725 25 25 (has enabled vertical scrollbar 1)) 26 26 ) 27 (Positioned node 28 (layout constraints 29 (layer-position-at-last-layout (20,130)) 30 (positioning-behavior moves)) 31 (related overflow nodes 1) 27 (Overflow scroll proxy node 28 (related overflow scrolling node scroll position (0,0)) 32 29 (children 1 33 30 (Overflow scrolling node 34 31 (scrollable area size 200 200) 35 32 (contents size 200 520) 36 (parent relative scrollable rect at ( 2,2) size 200x200)33 (parent relative scrollable rect at (0,0) size 200x200) 37 34 (scrollable area parameters 38 35 (horizontal scroll elasticity 1) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt
r245170 r246725 39 39 (has enabled vertical scrollbar 1)) 40 40 ) 41 (Positioned node 42 (layout constraints 43 (layer-position-at-last-layout (20,40)) 44 (positioning-behavior moves)) 45 (related overflow nodes 1) 41 (Overflow scroll proxy node 42 (related overflow scrolling node scroll position (0,0)) 46 43 ) 47 (Positioned node 48 (layout constraints 49 (layer-position-at-last-layout (10,60)) 50 (positioning-behavior moves)) 51 (related overflow nodes 1) 44 (Overflow scroll proxy node 45 (related overflow scrolling node scroll position (0,0)) 52 46 ) 53 (Positioned node 54 (layout constraints 55 (layer-position-at-last-layout (10,80)) 56 (positioning-behavior moves)) 57 (related overflow nodes 1) 47 (Overflow scroll proxy node 48 (related overflow scrolling node scroll position (0,0)) 58 49 ) 59 50 (Overflow scrolling node … … 68 59 (has enabled vertical scrollbar 1)) 69 60 ) 70 (Positioned node 71 (layout constraints 72 (layer-position-at-last-layout (20,40)) 73 (positioning-behavior moves)) 74 (related overflow nodes 1) 61 (Overflow scroll proxy node 62 (related overflow scrolling node scroll position (0,0)) 75 63 ) 76 (Positioned node 77 (layout constraints 78 (layer-position-at-last-layout (10,60)) 79 (positioning-behavior moves)) 80 (related overflow nodes 1) 64 (Overflow scroll proxy node 65 (related overflow scrolling node scroll position (0,0)) 81 66 ) 82 67 (Overflow scrolling node … … 91 76 (has enabled vertical scrollbar 1)) 92 77 ) 93 (Positioned node 94 (layout constraints 95 (layer-position-at-last-layout (20,40)) 96 (positioning-behavior moves)) 97 (related overflow nodes 1) 78 (Overflow scroll proxy node 79 (related overflow scrolling node scroll position (0,0)) 98 80 ) 99 81 (Overflow scrolling node … … 108 90 (has enabled vertical scrollbar 1)) 109 91 ) 110 (Positioned node 111 (layout constraints 112 (layer-position-at-last-layout (20,40)) 113 (positioning-behavior moves)) 114 (related overflow nodes 1) 92 (Overflow scroll proxy node 93 (related overflow scrolling node scroll position (0,0)) 115 94 ) 116 95 (Overflow scrolling node … … 125 104 (has enabled vertical scrollbar 1)) 126 105 ) 127 (Positioned node 128 (layout constraints 129 (layer-position-at-last-layout (20,40)) 130 (positioning-behavior moves)) 131 (related overflow nodes 1) 106 (Overflow scroll proxy node 107 (related overflow scrolling node scroll position (0,0)) 132 108 ) 133 (Positioned node 134 (layout constraints 135 (layer-position-at-last-layout (10,60)) 136 (positioning-behavior moves)) 137 (related overflow nodes 1) 109 (Overflow scroll proxy node 110 (related overflow scrolling node scroll position (0,0)) 138 111 ) 139 (Positioned node 140 (layout constraints 141 (layer-position-at-last-layout (20,90)) 142 (positioning-behavior moves)) 143 (related overflow nodes 1) 112 (Overflow scroll proxy node 113 (related overflow scrolling node scroll position (0,0)) 144 114 ) 145 (Positioned node 146 (layout constraints 147 (layer-position-at-last-layout (110,110)) 148 (positioning-behavior moves)) 149 (related overflow nodes 1) 115 (Overflow scroll proxy node 116 (related overflow scrolling node scroll position (0,0)) 150 117 ) 151 118 (Overflow scrolling node … … 160 127 (has enabled vertical scrollbar 1)) 161 128 ) 162 (Positioned node 163 (layout constraints 164 (layer-position-at-last-layout (20,40)) 165 (positioning-behavior moves)) 166 (related overflow nodes 1) 129 (Overflow scroll proxy node 130 (related overflow scrolling node scroll position (0,0)) 167 131 ) 168 (Positioned node 169 (layout constraints 170 (layer-position-at-last-layout (10,60)) 171 (positioning-behavior moves)) 172 (related overflow nodes 1) 132 (Overflow scroll proxy node 133 (related overflow scrolling node scroll position (0,0)) 173 134 (children 1 174 135 (Positioned node 175 136 (layout constraints 176 (layer-position-at-last-layout (79,50)) 177 (positioning-behavior stationary)) 137 (layer-position-at-last-layout (79,50))) 178 138 (related overflow nodes 1) 179 139 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt
r243209 r246725 55 55 ) 56 56 ) 57 (Positioned node 58 (layout constraints 59 (layer-position-at-last-layout (10,30)) 60 (positioning-behavior moves)) 61 (related overflow nodes 1) 57 (Overflow scroll proxy node 58 (related overflow scrolling node scroll position (0,0)) 62 59 ) 63 60 (Overflow scrolling node … … 85 82 (Positioned node 86 83 (layout constraints 87 (layer-position-at-last-layout (81,30)) 88 (positioning-behavior stationary)) 84 (layer-position-at-last-layout (81,30))) 89 85 (related overflow nodes 1) 90 86 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt
r245854 r246725 26 26 (has enabled vertical scrollbar 1)) 27 27 ) 28 (Positioned node 29 (layout constraints 30 (layer-position-at-last-layout (50,50)) 31 (positioning-behavior moves)) 32 (related overflow nodes 1) 28 (Overflow scroll proxy node 29 (related overflow scrolling node scroll position (0,0)) 33 30 (children 1 34 31 (Sticky node -
trunk/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt
r245170 r246725 23 23 ) 24 24 (GraphicsLayer 25 (offsetFromRenderer width=0 height=100)26 25 (position 28.00 250.00) 27 26 (bounds 185.00 200.00) -
trunk/LayoutTests/platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt
r240941 r246725 3 3 (anchor 0.00 0.00) 4 4 (bounds 800.00 600.00) 5 (clips 1) 5 6 (children 1 6 7 (GraphicsLayer … … 18 19 (bounds origin 366.00 0.00) 19 20 (bounds 400.00 205.00) 21 (clips 1) 20 22 (children 1 21 23 (GraphicsLayer -
trunk/LayoutTests/platform/ios/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container-expected.txt
r240713 r246725 21 21 (children 1 22 22 (GraphicsLayer 23 (offsetFromRenderer width=-114 height=-300)24 23 (bounds 300.00 672.00) 25 24 (children 1 -
trunk/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt
r245170 r246725 8 8 (children 1 9 9 (GraphicsLayer 10 (offsetFromRenderer width=-10 height=-10)11 10 (bounds 305.00 325.00) 12 11 (children 1 -
trunk/LayoutTests/platform/mac-wk1/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt
r244628 r246725 3 3 (anchor 0.00 0.00) 4 4 (bounds 800.00 600.00) 5 (clips 1) 5 6 (children 1 6 7 (GraphicsLayer … … 9 10 (children 1 10 11 (GraphicsLayer 11 (offsetFromRenderer width=-96 height=0)12 12 (position 10.00 10.00) 13 13 (bounds 400.00 204.00) 14 (clips 1) 14 15 (children 1 15 16 (GraphicsLayer -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers-expected.txt
r245656 r246725 38 38 (Positioned node 39 39 (layout constraints 40 (layer-position-at-last-layout (-2,6)) 41 (positioning-behavior stationary)) 40 (layer-position-at-last-layout (-2,6))) 42 41 (related overflow nodes 2) 43 42 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller-expected.txt
r245772 r246725 25 25 (has enabled vertical scrollbar 1)) 26 26 ) 27 (Positioned node 28 (layout constraints 29 (layer-position-at-last-layout (10,10)) 30 (positioning-behavior moves)) 31 (related overflow nodes 1) 27 (Overflow scroll proxy node 28 (related overflow scrolling node scroll position (0,0)) 32 29 (children 1 33 30 (Positioned node 34 31 (layout constraints 35 (layer-position-at-last-layout (71,22)) 36 (positioning-behavior stationary)) 32 (layer-position-at-last-layout (71,22))) 37 33 (related overflow nodes 1) 38 34 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-expected.txt
r246724 r246725 15 15 (children 2 16 16 (Overflow scrolling node 17 (scrollable area size 205 155) 18 (contents size 205 1020) 19 (parent relative scrollable rect at (19,11) size 205x155) 17 (scroll position 0 50) 18 (scrollable area size 301 316) 19 (contents size 301 540) 20 (requested scroll position 0 50) 21 (requested scroll position represents programmatic scroll 1) 22 (parent relative scrollable rect at (41,33) size 301x316) 20 23 (scrollable area parameters 21 (horizontal scroll elasticity 0)24 (horizontal scroll elasticity 1) 22 25 (vertical scroll elasticity 0) 23 26 (horizontal scrollbar mode 0) … … 25 28 (has enabled vertical scrollbar 1)) 26 29 ) 27 (Positioned node 28 (layout constraints 29 (layer-position-at-last-layout (10,10)) 30 (positioning-behavior moves)) 31 (related overflow nodes 1) 32 (children 1 33 (Positioned node 34 (layout constraints 35 (layer-position-at-last-layout (71,22)) 36 (positioning-behavior stationary)) 37 (related overflow nodes 1) 38 ) 39 ) 30 (Overflow scroll proxy node 31 (related overflow scrolling node scroll position (0,50)) 40 32 ) 41 33 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested-expected.txt
r246724 r246725 13 13 (max layout viewport origin (0,0)) 14 14 (behavior for fixed 0) 15 (children 215 (children 3 16 16 (Overflow scrolling node 17 (scrollable area size 285 285) 18 (contents size 285 464) 19 (parent relative scrollable rect at (30,22) size 285x285) 17 (scroll position 0 50) 18 (scrollable area size 301 316) 19 (contents size 301 640) 20 (requested scroll position 0 50) 21 (requested scroll position represents programmatic scroll 1) 22 (parent relative scrollable rect at (41,33) size 301x316) 20 23 (scrollable area parameters 21 (horizontal scroll elasticity 0)24 (horizontal scroll elasticity 1) 22 25 (vertical scroll elasticity 0) 23 26 (horizontal scrollbar mode 0) 24 27 (vertical scrollbar mode 0) 25 28 (has enabled vertical scrollbar 1)) 26 )27 (Positioned node28 (layout constraints29 (layer-position-at-last-layout (20,130))30 (positioning-behavior moves))31 (related overflow nodes 1)32 29 (children 1 33 30 (Overflow scrolling node 34 (scrollable area size 185 185) 35 (contents size 185 520) 36 (parent relative scrollable rect at (2,2) size 185x185) 31 (scroll position 0 150) 32 (scrollable area size 185 200) 33 (contents size 185 554) 34 (requested scroll position 0 150) 35 (requested scroll position represents programmatic scroll 1) 36 (parent relative scrollable rect at (56,206) size 185x200) 37 37 (scrollable area parameters 38 (horizontal scroll elasticity 0)38 (horizontal scroll elasticity 1) 39 39 (vertical scroll elasticity 0) 40 40 (horizontal scrollbar mode 0) … … 44 44 ) 45 45 ) 46 (Overflow scroll proxy node 47 (related overflow scrolling node scroll position (0,50)) 48 ) 49 (Overflow scroll proxy node 50 (related overflow scrolling node scroll position (0,150)) 51 ) 46 52 ) 47 53 ) 48 54 55 -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt
r245682 r246725 27 27 (Positioned node 28 28 (layout constraints 29 (layer-position-at-last-layout (20,28)) 30 (positioning-behavior stationary)) 29 (layer-position-at-last-layout (20,28))) 31 30 (related overflow nodes 1) 32 31 ) 33 32 (Positioned node 34 33 (layout constraints 35 (layer-position-at-last-layout (40,48)) 36 (positioning-behavior stationary)) 34 (layer-position-at-last-layout (40,48))) 37 35 (related overflow nodes 1) 38 36 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt
r245170 r246725 28 28 (has enabled vertical scrollbar 1)) 29 29 ) 30 (Positioned node 31 (layout constraints 32 (layer-position-at-last-layout (10,10)) 33 (positioning-behavior moves)) 34 (related overflow nodes 1) 30 (Overflow scroll proxy node 31 (related overflow scrolling node scroll position (0,0)) 35 32 ) 36 (Positioned node 37 (layout constraints 38 (layer-position-at-last-layout (50,50)) 39 (positioning-behavior moves)) 40 (related overflow nodes 1) 33 (Overflow scroll proxy node 34 (related overflow scrolling node scroll position (0,0)) 41 35 ) 42 (Positioned node 43 (layout constraints 44 (layer-position-at-last-layout (62,80)) 45 (positioning-behavior moves)) 46 (related overflow nodes 1) 36 (Overflow scroll proxy node 37 (related overflow scrolling node scroll position (0,0)) 47 38 ) 48 (Positioned node 49 (layout constraints 50 (layer-position-at-last-layout (77,77)) 51 (positioning-behavior moves)) 52 (related overflow nodes 1) 39 (Overflow scroll proxy node 40 (related overflow scrolling node scroll position (0,0)) 53 41 ) 54 42 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt
r245170 r246725 27 27 (has enabled vertical scrollbar 1)) 28 28 ) 29 (Positioned node 30 (layout constraints 31 (layer-position-at-last-layout (10,10)) 32 (positioning-behavior moves)) 33 (related overflow nodes 1) 29 (Overflow scroll proxy node 30 (related overflow scrolling node scroll position (0,0)) 34 31 ) 35 (Positioned node 36 (layout constraints 37 (layer-position-at-last-layout (0,30)) 38 (positioning-behavior moves)) 39 (related overflow nodes 1) 32 (Overflow scroll proxy node 33 (related overflow scrolling node scroll position (0,0)) 40 34 ) 41 (Positioned node 42 (layout constraints 43 (layer-position-at-last-layout (13,43)) 44 (positioning-behavior moves)) 45 (related overflow nodes 1) 35 (Overflow scroll proxy node 36 (related overflow scrolling node scroll position (0,0)) 46 37 ) 47 (Positioned node 48 (layout constraints 49 (layer-position-at-last-layout (53,83)) 50 (positioning-behavior moves)) 51 (related overflow nodes 1) 38 (Overflow scroll proxy node 39 (related overflow scrolling node scroll position (0,0)) 52 40 ) 53 (Positioned node 54 (layout constraints 55 (layer-position-at-last-layout (65,113)) 56 (positioning-behavior moves)) 57 (related overflow nodes 1) 41 (Overflow scroll proxy node 42 (related overflow scrolling node scroll position (0,0)) 58 43 ) 59 (Positioned node 60 (layout constraints 61 (layer-position-at-last-layout (80,110)) 62 (positioning-behavior moves)) 63 (related overflow nodes 1) 44 (Overflow scroll proxy node 45 (related overflow scrolling node scroll position (0,0)) 64 46 ) 65 47 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt
r245682 r246725 29 29 (Positioned node 30 30 (layout constraints 31 (layer-position-at-last-layout (20,28)) 32 (positioning-behavior stationary)) 31 (layer-position-at-last-layout (20,28))) 33 32 (related overflow nodes 1) 34 33 ) 35 34 (Positioned node 36 35 (layout constraints 37 (layer-position-at-last-layout (32,58)) 38 (positioning-behavior stationary)) 36 (layer-position-at-last-layout (32,58))) 39 37 (related overflow nodes 1) 40 38 ) 41 39 (Positioned node 42 40 (layout constraints 43 (layer-position-at-last-layout (47,55)) 44 (positioning-behavior stationary)) 41 (layer-position-at-last-layout (47,55))) 45 42 (related overflow nodes 1) 46 43 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/nested-overflow-scroll-expected.txt
r245651 r246725 25 25 (has enabled vertical scrollbar 1)) 26 26 ) 27 (Positioned node 28 (layout constraints 29 (layer-position-at-last-layout (20,130)) 30 (positioning-behavior moves)) 31 (related overflow nodes 1) 27 (Overflow scroll proxy node 28 (related overflow scrolling node scroll position (0,0)) 32 29 (children 1 33 30 (Overflow scrolling node 34 31 (scrollable area size 185 185) 35 32 (contents size 185 520) 36 (parent relative scrollable rect at ( 2,2) size 185x185)33 (parent relative scrollable rect at (0,0) size 185x185) 37 34 (scrollable area parameters 38 35 (horizontal scroll elasticity 0) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt
r245170 r246725 41 41 (has enabled vertical scrollbar 1)) 42 42 ) 43 (Positioned node 44 (layout constraints 45 (layer-position-at-last-layout (20,38)) 46 (positioning-behavior moves)) 47 (related overflow nodes 1) 43 (Overflow scroll proxy node 44 (related overflow scrolling node scroll position (0,0)) 48 45 ) 49 (Positioned node 50 (layout constraints 51 (layer-position-at-last-layout (10,58)) 52 (positioning-behavior moves)) 53 (related overflow nodes 1) 46 (Overflow scroll proxy node 47 (related overflow scrolling node scroll position (0,0)) 54 48 ) 55 (Positioned node 56 (layout constraints 57 (layer-position-at-last-layout (10,76)) 58 (positioning-behavior moves)) 59 (related overflow nodes 1) 49 (Overflow scroll proxy node 50 (related overflow scrolling node scroll position (0,0)) 60 51 ) 61 52 (Overflow scrolling node … … 71 62 (has enabled vertical scrollbar 1)) 72 63 ) 73 (Positioned node 74 (layout constraints 75 (layer-position-at-last-layout (20,38)) 76 (positioning-behavior moves)) 77 (related overflow nodes 1) 64 (Overflow scroll proxy node 65 (related overflow scrolling node scroll position (0,0)) 78 66 ) 79 (Positioned node 80 (layout constraints 81 (layer-position-at-last-layout (10,58)) 82 (positioning-behavior moves)) 83 (related overflow nodes 1) 67 (Overflow scroll proxy node 68 (related overflow scrolling node scroll position (0,0)) 84 69 ) 85 70 (Overflow scrolling node … … 94 79 (has enabled vertical scrollbar 1)) 95 80 ) 96 (Positioned node 97 (layout constraints 98 (layer-position-at-last-layout (20,38)) 99 (positioning-behavior moves)) 100 (related overflow nodes 1) 81 (Overflow scroll proxy node 82 (related overflow scrolling node scroll position (0,0)) 101 83 ) 102 84 (Overflow scrolling node … … 111 93 (has enabled vertical scrollbar 1)) 112 94 ) 113 (Positioned node 114 (layout constraints 115 (layer-position-at-last-layout (20,38)) 116 (positioning-behavior moves)) 117 (related overflow nodes 1) 95 (Overflow scroll proxy node 96 (related overflow scrolling node scroll position (0,0)) 118 97 ) 119 98 (Overflow scrolling node … … 129 108 (has enabled vertical scrollbar 1)) 130 109 ) 131 (Positioned node 132 (layout constraints 133 (layer-position-at-last-layout (20,38)) 134 (positioning-behavior moves)) 135 (related overflow nodes 1) 110 (Overflow scroll proxy node 111 (related overflow scrolling node scroll position (0,0)) 136 112 ) 137 (Positioned node 138 (layout constraints 139 (layer-position-at-last-layout (10,58)) 140 (positioning-behavior moves)) 141 (related overflow nodes 1) 113 (Overflow scroll proxy node 114 (related overflow scrolling node scroll position (0,0)) 142 115 ) 143 (Positioned node 144 (layout constraints 145 (layer-position-at-last-layout (20,86)) 146 (positioning-behavior moves)) 147 (related overflow nodes 1) 116 (Overflow scroll proxy node 117 (related overflow scrolling node scroll position (0,0)) 148 118 ) 149 (Positioned node 150 (layout constraints 151 (layer-position-at-last-layout (110,106)) 152 (positioning-behavior moves)) 153 (related overflow nodes 1) 119 (Overflow scroll proxy node 120 (related overflow scrolling node scroll position (0,0)) 154 121 ) 155 122 (Overflow scrolling node … … 164 131 (has enabled vertical scrollbar 1)) 165 132 ) 166 (Positioned node 167 (layout constraints 168 (layer-position-at-last-layout (20,38)) 169 (positioning-behavior moves)) 170 (related overflow nodes 1) 133 (Overflow scroll proxy node 134 (related overflow scrolling node scroll position (0,0)) 171 135 ) 172 (Positioned node 173 (layout constraints 174 (layer-position-at-last-layout (10,58)) 175 (positioning-behavior moves)) 176 (related overflow nodes 1) 136 (Overflow scroll proxy node 137 (related overflow scrolling node scroll position (0,0)) 177 138 (children 1 178 139 (Positioned node 179 140 (layout constraints 180 (layer-position-at-last-layout (79,48)) 181 (positioning-behavior stationary)) 141 (layer-position-at-last-layout (79,48))) 182 142 (related overflow nodes 1) 183 143 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt
r243209 r246725 56 56 ) 57 57 ) 58 (Positioned node 59 (layout constraints 60 (layer-position-at-last-layout (10,28)) 61 (positioning-behavior moves)) 62 (related overflow nodes 1) 58 (Overflow scroll proxy node 59 (related overflow scrolling node scroll position (0,0)) 63 60 ) 64 61 (Overflow scrolling node … … 86 83 (Positioned node 87 84 (layout constraints 88 (layer-position-at-last-layout (81,28)) 89 (positioning-behavior stationary)) 85 (layer-position-at-last-layout (81,28))) 90 86 (related overflow nodes 1) 91 87 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt
r245854 r246725 26 26 (has enabled vertical scrollbar 1)) 27 27 ) 28 (Positioned node 29 (layout constraints 30 (layer-position-at-last-layout (50,50)) 31 (positioning-behavior moves)) 32 (related overflow nodes 1) 28 (Overflow scroll proxy node 29 (related overflow scrolling node scroll position (0,0)) 33 30 (children 1 34 31 (Sticky node -
trunk/Source/WebCore/ChangeLog
r246723 r246725 1 2019-06-23 Simon Fraser <simon.fraser@apple.com> 2 3 [Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped 4 https://bugs.webkit.org/show_bug.cgi?id=199133 5 rdar://problem/43614439 6 7 Reviewed by Antti Koivisto. 8 9 Currently a composited layer with an overflow:scroll ancestor (which is not a paint-order 10 ancestor) gets a single "ancestor clip layer" that represents the intersection of all the 11 clips provided by its containing-block ancestors with non-visible overflow (both scrolling 12 and non-scrolling ones). 13 14 To correctly update clips with async overflow scroll, this single clip layer needs to be 15 broken up into multiple clipping ancestors. We need a separate layer, and scrolling tree 16 node for each ancestor that is an overflow scroll, and layers that represent non-moving 17 clips (i.e. overflow:hidden and 'clip') between them. This patch adds 18 LayerAncestorClippingStack to represent this stack of clipping layers. For example with the 19 following content: 20 21 <div style="overflow:hidden"> <--- A 22 <div style="overflow:scroll"> <--- B 23 <div style="overflow:hidden"> <--- C 24 <div style="overflow:hidden"> <--- D 25 <div style="overflow:scroll"> <--- E 26 <div style="overflow:hidden"> <--- F 27 <div style="overflow:hidden"> <--- G 28 <div></div> <--- H 29 <div> 30 <div> 31 <div> 32 <div> 33 <div> 34 <div> 35 <div> 36 37 the composited RenderLayer for H owns a LayerAncestorClippingStack with the following contents: 38 [clip - A] 39 [scroller - B] 40 [clip - intersection of C and D] 41 [scroller - E] 42 [clip - intersection of F and G] 43 44 Each stack entry has a 'masksToBounds' GraphicsLayer for clipping. Entries representing 45 overflow:scroll clips have a ScrollingNodeID for their OverflowScrollProxy scrolling tree 46 node (which references the actual OverflowScrollingNode). The non-scroller clips in this 47 stack are computed unconstrained by the enclosing overflow:scroll. 48 49 When the OverflowScrollingNode is scrolled, the boundsOrigin of related OverflowScrollProxy nodes 50 is adjusted to move the descendant layers (other clipping layers, or composited layers). 51 52 OverflowScrollProxy nodes thus take over the role that "Moves" ScrollingTreePositionedNode had. 53 With this patch, ScrollingTreePositionedNode are purely for absolute position inside non-containing-block 54 stacking context overflow scroll. LayoutConstraints is renamed to AbsolutePositionConstraints accordingly. 55 56 Tests: compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html 57 compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html 58 compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html 59 compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html 60 compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html 61 compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html 62 compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html 63 compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html 64 compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html 65 scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html 66 scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html 67 68 * Sources.txt: 69 * WebCore.xcodeproj/project.pbxproj: 70 * page/scrolling/AsyncScrollingCoordinator.cpp: 71 (WebCore::AsyncScrollingCoordinator::setPositionedNodeConstraints): 72 (WebCore::AsyncScrollingCoordinator::setPositionedNodeGeometry): Deleted. 73 * page/scrolling/AsyncScrollingCoordinator.h: 74 * page/scrolling/ScrollingConstraints.cpp: 75 (WebCore::operator<<): 76 * page/scrolling/ScrollingConstraints.h: 77 (WebCore::AbsolutePositionConstraints::operator== const): 78 (WebCore::AbsolutePositionConstraints::operator!= const): 79 (WebCore::LayoutConstraints::operator== const): Deleted. 80 (WebCore::LayoutConstraints::operator!= const): Deleted. 81 (WebCore::LayoutConstraints::alignmentOffset const): Deleted. 82 (WebCore::LayoutConstraints::setAlignmentOffset): Deleted. 83 (WebCore::LayoutConstraints::layerPositionAtLastLayout const): Deleted. 84 (WebCore::LayoutConstraints::setLayerPositionAtLastLayout): Deleted. 85 (WebCore::LayoutConstraints::scrollPositioningBehavior const): Deleted. 86 (WebCore::LayoutConstraints::setScrollPositioningBehavior): Deleted. 87 * page/scrolling/ScrollingCoordinator.h: 88 (WebCore::ScrollingCoordinator::setPositionedNodeConstraints): 89 (WebCore::ScrollingCoordinator::setPositionedNodeGeometry): Deleted. 90 * page/scrolling/ScrollingStatePositionedNode.cpp: 91 (WebCore::ScrollingStatePositionedNode::updateConstraints): 92 * page/scrolling/ScrollingStatePositionedNode.h: 93 * page/scrolling/ScrollingTree.cpp: 94 (WebCore::ScrollingTree::commitTreeState): 95 * page/scrolling/ScrollingTree.h: 96 (WebCore::ScrollingTree::nodesWithRelatedOverflow): 97 (WebCore::ScrollingTree::positionedNodesWithRelatedOverflow): Deleted. 98 * page/scrolling/cocoa/ScrollingTreeFixedNode.mm: 99 (WebCore::ScrollingTreeFixedNode::applyLayerPositions): 100 * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: 101 (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren): 102 * page/scrolling/cocoa/ScrollingTreePositionedNode.h: 103 (WebCore::ScrollingTreePositionedNode::scrollPositioningBehavior const): Deleted. 104 * page/scrolling/cocoa/ScrollingTreePositionedNode.mm: 105 (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren): 106 (WebCore::ScrollingTreePositionedNode::scrollDeltaSinceLastCommit const): 107 * page/scrolling/cocoa/ScrollingTreeStickyNode.mm: 108 (WebCore::ScrollingTreeStickyNode::computeLayerPosition const): 109 * rendering/LayerAncestorClippingStack.cpp: Added. 110 (WebCore::LayerAncestorClippingStack::LayerAncestorClippingStack): 111 (WebCore::LayerAncestorClippingStack::equalToClipData const): 112 (WebCore::LayerAncestorClippingStack::hasAnyScrollingLayers const): 113 (WebCore::LayerAncestorClippingStack::clear): 114 (WebCore::LayerAncestorClippingStack::detachFromScrollingCoordinator): 115 (WebCore::LayerAncestorClippingStack::firstClippingLayer const): 116 (WebCore::LayerAncestorClippingStack::lastClippingLayer const): 117 (WebCore::LayerAncestorClippingStack::lastOverflowScrollProxyNodeID const): 118 (WebCore::LayerAncestorClippingStack::updateScrollingNodeLayers): 119 (WebCore::LayerAncestorClippingStack::updateWithClipData): 120 (WebCore::operator<<): 121 * rendering/LayerAncestorClippingStack.h: Added. 122 (WebCore::CompositedClipData::CompositedClipData): 123 (WebCore::CompositedClipData::operator== const): 124 (WebCore::CompositedClipData::operator!= const): 125 (WebCore::LayerAncestorClippingStack::stack): 126 (WebCore::LayerAncestorClippingStack::stack const): 127 * rendering/RenderLayerBacking.cpp: 128 (WebCore::RenderLayerBacking::~RenderLayerBacking): 129 (WebCore::RenderLayerBacking::updateDebugIndicators): 130 (WebCore::RenderLayerBacking::destroyGraphicsLayers): 131 (WebCore::RenderLayerBacking::updateTransform): 132 (WebCore::RenderLayerBacking::updateBlendMode): 133 (WebCore::RenderLayerBacking::updateAfterLayout): 134 (WebCore::RenderLayerBacking::updateConfiguration): 135 (WebCore::computeOffsetFromAncestorGraphicsLayer): 136 (WebCore::RenderLayerBacking::computePrimaryGraphicsLayerRect const): 137 (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const): 138 (WebCore::RenderLayerBacking::updateGeometry): 139 (WebCore::RenderLayerBacking::updateInternalHierarchy): 140 (WebCore::RenderLayerBacking::updateAncestorClippingStack): 141 (WebCore::RenderLayerBacking::updateAncestorClipping): 142 (WebCore::RenderLayerBacking::detachFromScrollingCoordinator): 143 (WebCore::RenderLayerBacking::scrollingNodeIDForChildren const): 144 (WebCore::RenderLayerBacking::childForSuperlayers const): 145 (WebCore::RenderLayerBacking::backingStoreMemoryEstimate const): 146 (WebCore::operator<<): 147 (WebCore::RenderLayerBacking::updateAncestorClippingLayer): Deleted. 148 (WebCore::RenderLayerBacking::coordinatedScrollingRoles const): Deleted. 149 * rendering/RenderLayerBacking.h: 150 * rendering/RenderLayerCompositor.cpp: 151 (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): 152 (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): 153 (WebCore::RenderLayerCompositor::layerStyleChanged): We need to run the checks for changed 154 clipping whether or not this layer has backing, because a non-composited layer with clipping can be 155 represented in the clipping stack of some other layer. 156 (WebCore::RenderLayerCompositor::clippedByAncestor const): 157 (WebCore::RenderLayerCompositor::updateAncestorClippingStack const): 158 (WebCore::RenderLayerCompositor::computeAncestorClippingStack const): The output of this function 159 is a Vector<CompositedClipData> which represents the ancestor clipping stack, but without the proxy node 160 and GraphicsLayer information. It's input to LayerAncestorClippingStack::updateWithClipData() which does 161 the merging of old and new states. 162 (WebCore::collectRelatedCoordinatedScrollingNodes): 163 (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): 164 (WebCore::scrollCoordinationRoleForNodeType): 165 (WebCore::RenderLayerCompositor::attachScrollingNode): 166 (WebCore::RenderLayerCompositor::registerScrollingNodeID): 167 (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole): 168 (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): 169 (WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const): Code moved from RenderLayerBacking. 170 (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer): 171 (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole): 172 (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole): 173 * rendering/RenderLayerCompositor.h: 174 (WebCore::allScrollCoordinationRoles): 175 1 176 2019-06-23 Simon Fraser <simon.fraser@apple.com> 2 177 -
trunk/Source/WebCore/Headers.cmake
r246644 r246725 1244 1244 rendering/InlineBox.h 1245 1245 rendering/InlineFlowBox.h 1246 rendering/LayerAncestorClippingStack.h 1246 1247 rendering/LayerFragment.h 1247 1248 rendering/MarkedText.h -
trunk/Source/WebCore/Sources.txt
r246723 r246725 1987 1987 rendering/InlineIterator.cpp 1988 1988 rendering/InlineTextBox.cpp 1989 rendering/LayerAncestorClippingStack.cpp 1989 1990 rendering/LayerOverlapMap.cpp 1990 1991 rendering/LayoutDisallowedScope.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r246723 r246725 368 368 0FEA3E84191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA3E82191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 369 369 0FEA3E88191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA3E86191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 370 0FEC120C22BF2CD2004E9D35 /* LayerAncestorClippingStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC120922BF2CC7004E9D35 /* LayerAncestorClippingStack.h */; settings = {ATTRIBUTES = (Private, ); }; }; 370 371 0FF3B9291EE3B6DE00B84144 /* JSDOMQuad.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF3B9251EE3B6DE00B84144 /* JSDOMQuad.h */; }; 371 372 0FF3B92B1EE3B6DE00B84144 /* JSDOMQuadInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF3B9271EE3B6DE00B84144 /* JSDOMQuadInit.h */; }; … … 5816 5817 0FEA3E85191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingTreeFrameScrollingNode.cpp; sourceTree = "<group>"; }; 5817 5818 0FEA3E86191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeFrameScrollingNode.h; sourceTree = "<group>"; }; 5819 0FEC120922BF2CC7004E9D35 /* LayerAncestorClippingStack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayerAncestorClippingStack.h; sourceTree = "<group>"; }; 5820 0FEC120B22BF2CC7004E9D35 /* LayerAncestorClippingStack.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayerAncestorClippingStack.cpp; sourceTree = "<group>"; }; 5818 5821 0FEF20CD1BD4A24100128E5D /* LengthSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthSize.cpp; sourceTree = "<group>"; }; 5819 5822 0FEF20CF1BD4A64F00128E5D /* RenderStyleConstants.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderStyleConstants.cpp; sourceTree = "<group>"; }; … … 26998 27001 BCEA481A097D93020094C9E4 /* InlineTextBox.cpp */, 26999 27002 BCEA481B097D93020094C9E4 /* InlineTextBox.h */, 27003 0FEC120B22BF2CC7004E9D35 /* LayerAncestorClippingStack.cpp */, 27004 0FEC120922BF2CC7004E9D35 /* LayerAncestorClippingStack.h */, 27000 27005 580371631A66F1D300BAF519 /* LayerFragment.h */, 27001 27006 0F69F2B7228B98FF008D3565 /* LayerOverlapMap.cpp */, … … 30511 30516 450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */, 30512 30517 A456FA2711AD4A830020B420 /* LabelsNodeList.h in Headers */, 30518 0FEC120C22BF2CD2004E9D35 /* LayerAncestorClippingStack.h in Headers */, 30513 30519 E4916FF7195DF6A0005AB349 /* LayerFlushThrottleState.h in Headers */, 30514 30520 580371641A66F1D300BAF519 /* LayerFragment.h in Headers */, -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r246723 r246725 695 695 } 696 696 697 void AsyncScrollingCoordinator::setPositionedNode Geometry(ScrollingNodeID nodeID, const LayoutConstraints& constraints)697 void AsyncScrollingCoordinator::setPositionedNodeConstraints(ScrollingNodeID nodeID, const AbsolutePositionConstraints& constraints) 698 698 { 699 699 auto* node = m_scrollingStateTree->stateNodeForID(nodeID); -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
r243926 r246725 116 116 WEBCORE_EXPORT void setFrameScrollingNodeState(ScrollingNodeID, const FrameView&) override; 117 117 WEBCORE_EXPORT void setViewportConstraintedNodeConstraints(ScrollingNodeID, const ViewportConstraints&) override; 118 WEBCORE_EXPORT void setPositionedNode Geometry(ScrollingNodeID, const LayoutConstraints&) override;118 WEBCORE_EXPORT void setPositionedNodeConstraints(ScrollingNodeID, const AbsolutePositionConstraints&) override; 119 119 WEBCORE_EXPORT void setRelatedOverflowScrollingNodes(ScrollingNodeID, Vector<ScrollingNodeID>&&) override; 120 120 -
trunk/Source/WebCore/page/scrolling/ScrollingConstraints.cpp
r242913 r246725 111 111 } 112 112 113 TextStream& operator<<(TextStream& ts, const LayoutConstraints& constraints)113 TextStream& operator<<(TextStream& ts, const AbsolutePositionConstraints& constraints) 114 114 { 115 115 ts.dumpProperty("layer-position-at-last-layout", constraints.layerPositionAtLastLayout()); 116 ts.dumpProperty("positioning-behavior", constraints.scrollPositioningBehavior());117 116 118 117 return ts; -
trunk/Source/WebCore/page/scrolling/ScrollingConstraints.h
r243163 r246725 31 31 namespace WebCore { 32 32 33 // LayoutConstraints classes encapsulate data and logic required to reposition elements whose layout 34 // depends on the scroll position of ancestor elements. 35 class LayoutConstraints { 33 class AbsolutePositionConstraints { 36 34 WTF_MAKE_FAST_ALLOCATED; 37 35 public: 38 LayoutConstraints() = default;39 40 bool operator==(const LayoutConstraints& other) const36 AbsolutePositionConstraints() = default; 37 38 bool operator==(const AbsolutePositionConstraints& other) const 41 39 { 42 40 return alignmentOffset() == other.alignmentOffset() 43 && layerPositionAtLastLayout() == other.layerPositionAtLastLayout() 44 && scrollPositioningBehavior() == other.scrollPositioningBehavior(); 41 && layerPositionAtLastLayout() == other.layerPositionAtLastLayout(); 45 42 } 46 43 47 bool operator!=(const LayoutConstraints& other) const { return !(*this == other); }44 bool operator!=(const AbsolutePositionConstraints& other) const { return !(*this == other); } 48 45 49 46 FloatSize alignmentOffset() const { return m_alignmentOffset; } … … 53 50 void setLayerPositionAtLastLayout(FloatPoint position) { m_layerPositionAtLastLayout = position; } 54 51 55 ScrollPositioningBehavior scrollPositioningBehavior() const { return m_scrollPositioningBehavior; }56 void setScrollPositioningBehavior(ScrollPositioningBehavior behavior) { m_scrollPositioningBehavior = behavior; }57 58 52 private: 59 53 FloatSize m_alignmentOffset; 60 54 FloatPoint m_layerPositionAtLastLayout; 61 ScrollPositioningBehavior m_scrollPositioningBehavior { ScrollPositioningBehavior::None };62 55 }; 63 56 … … 206 199 207 200 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, ScrollPositioningBehavior); 208 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const LayoutConstraints&);201 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const AbsolutePositionConstraints&); 209 202 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const FixedPositionViewportConstraints&); 210 203 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const StickyPositionViewportConstraints&); -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r243926 r246725 53 53 namespace WebCore { 54 54 55 class AbsolutePositionConstraints; 55 56 class Document; 56 57 class Frame; 57 58 class FrameView; 58 59 class GraphicsLayer; 59 class LayoutConstraints;60 60 class Page; 61 61 class Region; … … 150 150 virtual void setFrameScrollingNodeState(ScrollingNodeID, const FrameView&) { } 151 151 virtual void setViewportConstraintedNodeConstraints(ScrollingNodeID, const ViewportConstraints&) { } 152 virtual void setPositionedNode Geometry(ScrollingNodeID, const LayoutConstraints&) { }152 virtual void setPositionedNodeConstraints(ScrollingNodeID, const AbsolutePositionConstraints&) { } 153 153 virtual void setRelatedOverflowScrollingNodes(ScrollingNodeID, Vector<ScrollingNodeID>&&) { } 154 154 -
trunk/Source/WebCore/page/scrolling/ScrollingStatePositionedNode.cpp
r246593 r246725 76 76 } 77 77 78 void ScrollingStatePositionedNode::updateConstraints(const LayoutConstraints& constraints)78 void ScrollingStatePositionedNode::updateConstraints(const AbsolutePositionConstraints& constraints) 79 79 { 80 80 if (m_constraints == constraints) -
trunk/Source/WebCore/page/scrolling/ScrollingStatePositionedNode.h
r246593 r246725 36 36 37 37 // ScrollingStatePositionedNode is used to manage the layers for z-order composited descendants of overflow:scroll 38 // which are not containing block descendants . These layers must have their position inside their ancestor clipping38 // which are not containing block descendants (i.e. position:absolute). These layers must have their position inside their ancestor clipping 39 39 // layer adjusted on the scrolling thread. 40 40 class ScrollingStatePositionedNode final : public ScrollingStateNode { … … 55 55 WEBCORE_EXPORT void setRelatedOverflowScrollingNodes(Vector<ScrollingNodeID>&&); 56 56 57 WEBCORE_EXPORT void updateConstraints(const LayoutConstraints&);58 const LayoutConstraints& layoutConstraints() const { return m_constraints; }57 WEBCORE_EXPORT void updateConstraints(const AbsolutePositionConstraints&); 58 const AbsolutePositionConstraints& layoutConstraints() const { return m_constraints; } 59 59 60 60 private: … … 67 67 68 68 Vector<ScrollingNodeID> m_relatedOverflowScrollingNodes; 69 LayoutConstraints m_constraints;69 AbsolutePositionConstraints m_constraints; 70 70 }; 71 71 -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r246490 r246725 170 170 171 171 m_overflowRelatedNodesMap.clear(); 172 m_ positionedNodesWithRelatedOverflow.clear();172 m_nodesWithRelatedOverflow.clear(); 173 173 174 174 // orphanNodes keeps child nodes alive while we rebuild child lists. -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r246490 r246725 155 155 RelatedNodesMap& overflowRelatedNodes() { return m_overflowRelatedNodesMap; } 156 156 157 HashSet<ScrollingNodeID>& positionedNodesWithRelatedOverflow() { return m_positionedNodesWithRelatedOverflow; }157 HashSet<ScrollingNodeID>& nodesWithRelatedOverflow() { return m_nodesWithRelatedOverflow; } 158 158 159 159 WEBCORE_EXPORT String scrollingTreeAsText(ScrollingStateTreeAsTextBehavior = ScrollingStateTreeAsTextBehaviorNormal); … … 180 180 181 181 RelatedNodesMap m_overflowRelatedNodesMap; 182 HashSet<ScrollingNodeID> m_ positionedNodesWithRelatedOverflow;182 HashSet<ScrollingNodeID> m_nodesWithRelatedOverflow; 183 183 184 184 struct TreeState { -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeFixedNode.mm
r246367 r246725 33 33 #import "ScrollingTree.h" 34 34 #import "ScrollingTreeFrameScrollingNode.h" 35 #import "ScrollingTreeOverflowScrollProxyNode.h" 35 36 #import "ScrollingTreeOverflowScrollingNode.h" 36 37 #import "ScrollingTreePositionedNode.h" … … 84 85 // To keep the layer still during async scrolling we adjust by how much the position has changed since layout. 85 86 auto& overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(*ancestor); 87 overflowScrollDelta -= overflowNode.scrollDeltaSinceLastCommit(); 88 continue; 89 } 90 91 if (is<ScrollingTreeOverflowScrollProxyNode>(*ancestor)) { 92 // To keep the layer still during async scrolling we adjust by how much the position has changed since layout. 93 auto& overflowNode = downcast<ScrollingTreeOverflowScrollProxyNode>(*ancestor); 86 94 overflowScrollDelta -= overflowNode.scrollDeltaSinceLastCommit(); 87 95 continue; -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm
r246723 r246725 63 63 }).iterator->value.append(scrollingNodeID()); 64 64 65 scrollingTree(). positionedNodesWithRelatedOverflow().add(scrollingNodeID());65 scrollingTree().nodesWithRelatedOverflow().add(scrollingNodeID()); 66 66 } 67 67 -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.h
r246197 r246725 44 44 CALayer *layer() const { return m_layer.get(); } 45 45 46 ScrollPositioningBehavior scrollPositioningBehavior() const { return m_constraints.scrollPositioningBehavior(); }47 46 const Vector<ScrollingNodeID>& relatedOverflowScrollingNodes() const { return m_relatedOverflowScrollingNodes; } 48 47 … … 59 58 60 59 Vector<ScrollingNodeID> m_relatedOverflowScrollingNodes; 61 LayoutConstraints m_constraints;60 AbsolutePositionConstraints m_constraints; 62 61 RetainPtr<CALayer> m_layer; 63 62 }; -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm
r246723 r246725 64 64 m_constraints = positionedStateNode.layoutConstraints(); 65 65 66 // Tell the ScrollingTree about non-ancestor overflow nodes which affect this node. 67 if (m_constraints.scrollPositioningBehavior() == ScrollPositioningBehavior::Moves) { 68 auto& relatedNodes = scrollingTree().overflowRelatedNodes(); 69 for (auto overflowNodeID : m_relatedOverflowScrollingNodes) { 70 relatedNodes.ensure(overflowNodeID, [] { 71 return Vector<ScrollingNodeID>(); 72 }).iterator->value.append(scrollingNodeID()); 73 } 74 } 75 if (!m_relatedOverflowScrollingNodes.isEmpty() && m_constraints.scrollPositioningBehavior() != ScrollPositioningBehavior::None) 76 scrollingTree().positionedNodesWithRelatedOverflow().add(scrollingNodeID()); 66 if (!m_relatedOverflowScrollingNodes.isEmpty()) 67 scrollingTree().nodesWithRelatedOverflow().add(scrollingNodeID()); 77 68 } 78 69 … … 88 79 } 89 80 } 90 if (m_constraints.scrollPositioningBehavior() == ScrollPositioningBehavior::Stationary) { 91 // Stationary nodes move in the opposite direction. 92 return -delta; 93 } 94 95 return delta; 81 82 // Positioned nodes compensate for scrolling, so negate the scroll delta. 83 return -delta; 96 84 } 97 85 -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNode.mm
r246367 r246725 34 34 #import "ScrollingTreeFixedNode.h" 35 35 #import "ScrollingTreeFrameScrollingNode.h" 36 #import "ScrollingTreeOverflowScrollProxyNode.h" 36 37 #import "ScrollingTreeOverflowScrollingNode.h" 37 38 #import "WebCoreCALayerExtras.h" … … 82 83 83 84 for (auto* ancestor = parent(); ancestor; ancestor = ancestor->parent()) { 84 if (is<ScrollingTreePositionedNode>(*ancestor)) { 85 auto& positioningAncestor = downcast<ScrollingTreePositionedNode>(*ancestor); 85 if (is<ScrollingTreeOverflowScrollProxyNode>(*ancestor)) { 86 auto& overflowProxyNode = downcast<ScrollingTreeOverflowScrollProxyNode>(*ancestor); 87 auto overflowNode = scrollingTree().nodeForID(overflowProxyNode.overflowScrollingNodeID()); 88 if (!overflowNode) 89 break; 86 90 87 // FIXME: Do we need to do anything for ScrollPositioningBehavior::Stationary? 88 if (positioningAncestor.scrollPositioningBehavior() == ScrollPositioningBehavior::Moves) { 89 if (positioningAncestor.relatedOverflowScrollingNodes().isEmpty()) 90 break; 91 auto overflowNode = scrollingTree().nodeForID(positioningAncestor.relatedOverflowScrollingNodes()[0]); 92 if (!overflowNode) 93 break; 91 return computeLayerPositionForScrollingNode(*overflowNode); 92 } 94 93 95 auto position = computeLayerPositionForScrollingNode(*overflowNode);96 97 if (positioningAncestor.layer() == m_layer) {98 // We'll also do the adjustment the positioning node would do.99 position -= positioningAncestor.scrollDeltaSinceLastCommit();100 }101 102 return position;103 }104 }105 94 if (is<ScrollingTreeScrollingNode>(*ancestor)) 106 95 return computeLayerPositionForScrollingNode(*ancestor); -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r246490 r246725 355 355 WEBCORE_EXPORT void save(); 356 356 WEBCORE_EXPORT void restore(); 357 358 unsigned stackSize() const { return m_stack.size(); } 357 359 358 360 // These draw methods will do both stroking and filling. … … 698 700 }; 699 701 702 703 class GraphicsContextStateStackChecker { 704 public: 705 GraphicsContextStateStackChecker(GraphicsContext& context) 706 : m_context(context) 707 , m_stackSize(context.stackSize()) 708 { } 709 710 ~GraphicsContextStateStackChecker() 711 { 712 if (m_context.stackSize() != m_stackSize) 713 WTFLogAlways("GraphicsContext %p stack changed by %d", this, (int)m_context.stackSize() - (int)m_stackSize); 714 } 715 716 private: 717 GraphicsContext& m_context; 718 unsigned m_stackSize; 719 }; 720 721 722 700 723 class InterpolationQualityMaintainer { 701 724 public: -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r246488 r246725 4390 4390 return; 4391 4391 4392 GraphicsContextStateStackChecker checker(context); 4393 4392 4394 updateLayerListsIfNeeded(); 4393 4395 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r246538 r246725 48 48 #include "InspectorInstrumentation.h" 49 49 #include "KeyframeList.h" 50 #include "LayerAncestorClippingStack.h" 50 51 #include "Logging.h" 51 52 #include "Page.h" … … 239 240 { 240 241 // Note that m_owningLayer->backing() is null here. 241 updateAncestorClipping Layer(false);242 updateAncestorClipping(false, nullptr); 242 243 updateChildClippingStrategy(false); 243 244 updateDescendantClippingLayer(false); … … 425 426 m_graphicsLayer->setShowRepaintCounter(showRepaintCounter); 426 427 427 if (m_ancestorClippingLayer) 428 m_ancestorClippingLayer->setShowDebugBorder(showBorder); 428 if (m_ancestorClippingStack) { 429 for (auto& entry : m_ancestorClippingStack->stack()) 430 entry.clippingLayer->setShowDebugBorder(showBorder); 431 } 429 432 430 433 if (m_foregroundLayer) { … … 540 543 GraphicsLayer::clear(m_maskLayer); 541 544 542 GraphicsLayer::unparentAndClear(m_ancestorClippingLayer); 545 if (m_ancestorClippingStack) { 546 for (auto& entry : m_ancestorClippingStack->stack()) 547 GraphicsLayer::unparentAndClear(entry.clippingLayer); 548 } 549 543 550 GraphicsLayer::unparentAndClear(m_contentsContainmentLayer); 544 551 GraphicsLayer::unparentAndClear(m_foregroundLayer); … … 569 576 if (m_contentsContainmentLayer) { 570 577 m_contentsContainmentLayer->setTransform(t); 571 m_graphicsLayer->setTransform( TransformationMatrix());578 m_graphicsLayer->setTransform({ }); 572 579 } else 573 580 m_graphicsLayer->setTransform(t); … … 612 619 void RenderLayerBacking::updateBlendMode(const RenderStyle& style) 613 620 { 614 // FIXME: where is the blend mode updated when m_ancestorClipping Layers come and go?615 if (m_ancestorClipping Layer) {616 m_ancestorClipping Layer->setBlendMode(style.blendMode());621 // FIXME: where is the blend mode updated when m_ancestorClippingStacks come and go? 622 if (m_ancestorClippingStack) { 623 m_ancestorClippingStack->stack().first().clippingLayer->setBlendMode(style.blendMode()); 617 624 m_graphicsLayer->setBlendMode(BlendMode::Normal); 618 625 } else … … 737 744 // This layer's geometry affects those of its children. 738 745 m_owningLayer.setChildrenNeedCompositingGeometryUpdate(); 739 } else if (needsClippingUpdate) 746 } else if (needsClippingUpdate) { 747 m_owningLayer.setNeedsCompositingConfigurationUpdate(); 740 748 m_owningLayer.setNeedsCompositingGeometryUpdate(); 749 } 741 750 742 751 if (needsFullRepaint && canIssueSetNeedsDisplay()) … … 805 814 layerConfigChanged = true; 806 815 807 // clippedByAncestor() does a tree walk.808 if (updateAncestorClipping Layer(compositor.clippedByAncestor(m_owningLayer)))816 auto* compositingAncestor = m_owningLayer.ancestorCompositingLayer(); 817 if (updateAncestorClipping(compositor.clippedByAncestor(m_owningLayer, compositingAncestor), compositingAncestor)) 809 818 layerConfigChanged = true; 810 819 … … 950 959 } 951 960 952 static LayoutSize computeOffsetFromAncestorGraphicsLayer( RenderLayer* compositedAncestor, const LayoutPoint& location, float deviceScaleFactor)961 static LayoutSize computeOffsetFromAncestorGraphicsLayer(const RenderLayer* compositedAncestor, const LayoutPoint& location, float deviceScaleFactor) 953 962 { 954 963 if (!compositedAncestor) … … 1014 1023 LayoutRect RenderLayerBacking::computePrimaryGraphicsLayerRect(const LayoutRect& parentGraphicsLayerRect) const 1015 1024 { 1016 ComputedOffsets compositedBoundsOffset(m_owningLayer, compositedBounds(), parentGraphicsLayerRect, LayoutRect());1025 ComputedOffsets compositedBoundsOffset(m_owningLayer, compositedBounds(), parentGraphicsLayerRect, { }); 1017 1026 return LayoutRect(encloseRectToDevicePixels(LayoutRect(toLayoutPoint(compositedBoundsOffset.fromParentGraphicsLayer()), compositedBounds().size()), 1018 1027 deviceScaleFactor())); … … 1020 1029 1021 1030 // FIXME: See if we need this now that updateGeometry() is always called in post-order traversal. 1022 LayoutRect RenderLayerBacking::computeParentGraphicsLayerRect( RenderLayer* compositedAncestor, LayoutSize& ancestorClippingLayerOffset) const1031 LayoutRect RenderLayerBacking::computeParentGraphicsLayerRect(const RenderLayer* compositedAncestor) const 1023 1032 { 1024 1033 if (!compositedAncestor || !compositedAncestor->backing()) … … 1049 1058 } 1050 1059 1051 if (m_ancestorClippingLayer) {1052 // Call calculateRects to get the backgroundRect which is what is used to clip the contents of this1053 // layer. Note that we call it with temporaryClipRects = true because normally when computing clip rects1054 // for a compositing layer, rootLayer is the layer itself.1055 ShouldRespectOverflowClip shouldRespectOverflowClip = compositedAncestor->isolatesCompositedBlending() ? RespectOverflowClip : IgnoreOverflowClip;1056 RenderLayer::ClipRectsContext clipRectsContext(compositedAncestor, TemporaryClipRects, IgnoreOverlayScrollbarSize, shouldRespectOverflowClip);1057 LayoutRect parentClipRect = m_owningLayer.backgroundClipRect(clipRectsContext).rect(); // FIXME: Incorrect for CSS regions.1058 ASSERT(!parentClipRect.isInfinite());1059 LayoutSize clippingOffset = computeOffsetFromAncestorGraphicsLayer(compositedAncestor, parentClipRect.location(), deviceScaleFactor());1060 LayoutRect snappedClippingLayerRect = snappedGraphicsLayer(clippingOffset, parentClipRect.size(), deviceScaleFactor()).m_snappedRect;1061 // The primary layer is then parented in, and positioned relative to this clipping layer.1062 ancestorClippingLayerOffset = snappedClippingLayerRect.location() - parentGraphicsLayerRect.location();1063 parentGraphicsLayerRect = snappedClippingLayerRect;1064 }1065 1060 return parentGraphicsLayerRect; 1066 1061 } … … 1092 1087 #endif 1093 1088 1089 auto* compositedAncestor = m_owningLayer.ancestorCompositingLayer(); 1090 LayoutRect parentGraphicsLayerRect = computeParentGraphicsLayerRect(compositedAncestor); 1091 1092 if (m_ancestorClippingStack) { 1093 // All clipRects in the stack are computed relative to m_owningLayer, so convert them back to compositedAncestor. 1094 auto offsetFromCompositedAncestor = toLayoutSize(m_owningLayer.convertToLayerCoords(compositedAncestor, { }, RenderLayer::AdjustForColumns)); 1095 LayoutRect lastClipLayerRect = parentGraphicsLayerRect; 1096 1097 for (auto& entry : m_ancestorClippingStack->stack()) { 1098 auto clipRect = entry.clipData.clipRect; 1099 LayoutSize clippingOffset = computeOffsetFromAncestorGraphicsLayer(compositedAncestor, clipRect.location() + offsetFromCompositedAncestor, deviceScaleFactor()); 1100 LayoutRect snappedClippingLayerRect = snappedGraphicsLayer(clippingOffset, clipRect.size(), deviceScaleFactor()).m_snappedRect; 1101 1102 entry.clippingLayer->setPosition(toLayoutPoint(snappedClippingLayerRect.location() - lastClipLayerRect.location())); 1103 lastClipLayerRect = snappedClippingLayerRect; 1104 1105 entry.clippingLayer->setSize(snappedClippingLayerRect.size()); 1106 1107 if (entry.clipData.isOverflowScroll) { 1108 ScrollOffset scrollOffset = entry.clipData.clippingLayer->scrollOffset(); 1109 1110 entry.clippingLayer->setBoundsOrigin(scrollOffset); 1111 lastClipLayerRect.moveBy(-scrollOffset); 1112 } 1113 } 1114 1115 parentGraphicsLayerRect = lastClipLayerRect; 1116 } 1117 1118 LayoutRect primaryGraphicsLayerRect = computePrimaryGraphicsLayerRect(parentGraphicsLayerRect); 1119 1120 ComputedOffsets compositedBoundsOffset(m_owningLayer, compositedBounds(), parentGraphicsLayerRect, primaryGraphicsLayerRect); 1121 ComputedOffsets rendererOffset(m_owningLayer, { }, parentGraphicsLayerRect, primaryGraphicsLayerRect); 1122 1123 m_compositedBoundsOffsetFromGraphicsLayer = compositedBoundsOffset.fromPrimaryGraphicsLayer(); 1124 1125 auto primaryLayerPosition = primaryGraphicsLayerRect.location(); 1126 1094 1127 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959 1095 1128 bool preserves3D = style.transformStyle3D() == TransformStyle3D::Preserve3D && !renderer().hasReflection(); 1096 m_graphicsLayer->setPreserves3D(preserves3D); 1097 m_graphicsLayer->setBackfaceVisibility(style.backfaceVisibility() == BackfaceVisibility::Visible); 1098 1099 auto* compositedAncestor = m_owningLayer.ancestorCompositingLayer(); 1100 LayoutSize ancestorClippingLayerOffset; 1101 LayoutRect parentGraphicsLayerRect = computeParentGraphicsLayerRect(compositedAncestor, ancestorClippingLayerOffset); 1102 LayoutRect primaryGraphicsLayerRect = computePrimaryGraphicsLayerRect(parentGraphicsLayerRect); 1103 1104 ComputedOffsets compositedBoundsOffset(m_owningLayer, compositedBounds(), parentGraphicsLayerRect, primaryGraphicsLayerRect); 1105 m_compositedBoundsOffsetFromGraphicsLayer = compositedBoundsOffset.fromPrimaryGraphicsLayer(); 1106 m_graphicsLayer->setPosition(primaryGraphicsLayerRect.location()); 1107 m_graphicsLayer->setSize(primaryGraphicsLayerRect.size()); 1129 if (m_contentsContainmentLayer) { 1130 m_contentsContainmentLayer->setPreserves3D(preserves3D); 1131 m_contentsContainmentLayer->setPosition(primaryLayerPosition); 1132 primaryLayerPosition = { }; 1133 // Use the same size as m_graphicsLayer so transforms behave correctly. 1134 m_contentsContainmentLayer->setSize(primaryGraphicsLayerRect.size()); 1135 } 1108 1136 1109 1137 auto computeAnimationExtent = [&] () -> Optional<FloatRect> { … … 1114 1142 }; 1115 1143 m_graphicsLayer->setAnimationExtent(computeAnimationExtent()); 1116 1117 ComputedOffsets rendererOffset(m_owningLayer, LayoutRect(), parentGraphicsLayerRect, primaryGraphicsLayerRect); 1118 if (m_ancestorClippingLayer) { 1119 // Clipping layer is parented in the ancestor layer. 1120 m_ancestorClippingLayer->setPosition(toLayoutPoint(ancestorClippingLayerOffset)); 1121 m_ancestorClippingLayer->setSize(parentGraphicsLayerRect.size()); 1122 m_ancestorClippingLayer->setOffsetFromRenderer(-rendererOffset.fromParentGraphicsLayer()); 1123 } 1124 1125 if (m_contentsContainmentLayer) { 1126 m_contentsContainmentLayer->setPreserves3D(preserves3D); 1127 m_contentsContainmentLayer->setPosition(primaryGraphicsLayerRect.location()); 1128 m_graphicsLayer->setPosition(FloatPoint()); 1129 // Use the same size as m_graphicsLayer so transforms behave correctly. 1130 m_contentsContainmentLayer->setSize(primaryGraphicsLayerRect.size()); 1131 } 1144 m_graphicsLayer->setPreserves3D(preserves3D); 1145 m_graphicsLayer->setBackfaceVisibility(style.backfaceVisibility() == BackfaceVisibility::Visible); 1146 1147 m_graphicsLayer->setPosition(primaryLayerPosition); 1148 m_graphicsLayer->setSize(primaryGraphicsLayerRect.size()); 1132 1149 1133 1150 // Compute renderer offset from primary graphics layer. Note that primaryGraphicsLayerRect is in parentGraphicsLayer's coordinate system which is not necessarily … … 1396 1413 // m_foregroundLayer has to be inserted in the correct order with child layers, 1397 1414 // so it's not inserted here. 1398 if (m_ancestorClippingLayer) 1399 m_ancestorClippingLayer->removeAllChildren(); 1415 GraphicsLayer* lastClippingLayer = nullptr; 1416 if (m_ancestorClippingStack) { 1417 auto& clippingStack = m_ancestorClippingStack->stack(); 1418 for (unsigned i = 0; i < clippingStack.size() - 1; ++i) { 1419 auto& entry = clippingStack.at(i); 1420 Vector<Ref<GraphicsLayer>> children; 1421 children.append(*clippingStack.at(i + 1).clippingLayer); 1422 entry.clippingLayer->setChildren(WTFMove(children)); 1423 } 1424 1425 lastClippingLayer = clippingStack.last().clippingLayer.get(); 1426 lastClippingLayer->removeAllChildren(); 1427 } 1400 1428 1401 1429 if (m_contentsContainmentLayer) { 1402 1430 m_contentsContainmentLayer->removeAllChildren(); 1403 if ( m_ancestorClippingLayer)1404 m_ancestorClippingLayer->addChild(*m_contentsContainmentLayer);1431 if (lastClippingLayer) 1432 lastClippingLayer->addChild(*m_contentsContainmentLayer); 1405 1433 } 1406 1434 … … 1410 1438 if (m_contentsContainmentLayer) 1411 1439 m_contentsContainmentLayer->addChild(*m_graphicsLayer); 1412 else if ( m_ancestorClippingLayer)1413 m_ancestorClippingLayer->addChild(*m_graphicsLayer);1440 else if (lastClippingLayer) 1441 lastClippingLayer->addChild(*m_graphicsLayer); 1414 1442 1415 1443 if (m_childContainmentLayer) … … 1526 1554 } 1527 1555 1556 bool RenderLayerBacking::updateAncestorClippingStack(Vector<CompositedClipData>&& clippingData) 1557 { 1558 if (!m_ancestorClippingStack && clippingData.isEmpty()) 1559 return false; 1560 1561 auto* scrollingCoordinator = m_owningLayer.page().scrollingCoordinator(); 1562 1563 if (m_ancestorClippingStack && clippingData.isEmpty()) { 1564 m_ancestorClippingStack->clear(scrollingCoordinator); 1565 m_ancestorClippingStack = nullptr; 1566 return true; 1567 } 1568 1569 if (!m_ancestorClippingStack) { 1570 m_ancestorClippingStack = std::make_unique<LayerAncestorClippingStack>(WTFMove(clippingData)); 1571 LOG_WITH_STREAM(Compositing, stream << "layer " << &m_owningLayer << " ancestorClippingStack " << *m_ancestorClippingStack); 1572 return true; 1573 } 1574 1575 if (m_ancestorClippingStack->equalToClipData(clippingData)) { 1576 LOG_WITH_STREAM(Compositing, stream << "layer " << &m_owningLayer << " ancestorClippingStack " << *m_ancestorClippingStack); 1577 return false; 1578 } 1579 1580 m_ancestorClippingStack->updateWithClipData(scrollingCoordinator, WTFMove(clippingData)); 1581 LOG_WITH_STREAM(Compositing, stream << "layer " << &m_owningLayer << " ancestorClippingStack " << *m_ancestorClippingStack); 1582 return true; 1583 } 1584 1528 1585 // Return true if the layer changed. 1529 bool RenderLayerBacking::updateAncestorClipping Layer(bool needsAncestorClip)1586 bool RenderLayerBacking::updateAncestorClipping(bool needsAncestorClip, const RenderLayer* compositingAncestor) 1530 1587 { 1531 1588 bool layersChanged = false; 1532 1589 1533 1590 if (needsAncestorClip) { 1534 if (!m_ancestorClippingLayer) { 1535 m_ancestorClippingLayer = createGraphicsLayer("ancestor clipping"); 1536 m_ancestorClippingLayer->setMasksToBounds(true); 1591 if (compositor().updateAncestorClippingStack(m_owningLayer, compositingAncestor)) { 1592 // Make any layers we don't have. 1593 if (m_ancestorClippingStack) { 1594 for (auto& entry : m_ancestorClippingStack->stack()) { 1595 if (!entry.clippingLayer) { 1596 entry.clippingLayer = createGraphicsLayer(entry.clipData.isOverflowScroll ? "clip for scroller" : "ancestor clipping"); 1597 entry.clippingLayer->setMasksToBounds(true); 1598 entry.clippingLayer->setPaintingPhase({ }); 1599 } 1600 } 1601 } 1602 1537 1603 layersChanged = true; 1538 1604 } 1539 } else if (hasAncestorClippingLayer()) { 1540 willDestroyLayer(m_ancestorClippingLayer.get()); 1541 GraphicsLayer::unparentAndClear(m_ancestorClippingLayer); 1605 } else if (m_ancestorClippingStack) { 1606 for (auto& entry : m_ancestorClippingStack->stack()) 1607 GraphicsLayer::unparentAndClear(entry.clippingLayer); 1608 1609 m_ancestorClippingStack = nullptr; 1542 1610 layersChanged = true; 1543 1611 } … … 1861 1929 } 1862 1930 1863 OptionSet<ScrollCoordinationRole> RenderLayerBacking::coordinatedScrollingRoles() const1864 {1865 auto& compositor = this->compositor();1866 1867 OptionSet<ScrollCoordinationRole> coordinationRoles;1868 if (compositor.isViewportConstrainedFixedOrStickyLayer(m_owningLayer))1869 coordinationRoles.add(ScrollCoordinationRole::ViewportConstrained);1870 1871 if (compositor.useCoordinatedScrollingForLayer(m_owningLayer))1872 coordinationRoles.add(ScrollCoordinationRole::Scrolling);1873 1874 if (compositor.isLayerForIFrameWithScrollCoordinatedContents(m_owningLayer))1875 coordinationRoles.add(ScrollCoordinationRole::FrameHosting);1876 1877 if (compositor.computeCoordinatedPositioningForLayer(m_owningLayer) != ScrollPositioningBehavior::None)1878 coordinationRoles.add(ScrollCoordinationRole::Positioning);1879 1880 return coordinationRoles;1881 }1882 1883 1931 void RenderLayerBacking::detachFromScrollingCoordinator(OptionSet<ScrollCoordinationRole> roles) 1884 1932 { 1885 if (!m_scrollingNodeID && !m_ frameHostingNodeID && !m_viewportConstrainedNodeID && !m_positioningNodeID)1933 if (!m_scrollingNodeID && !m_ancestorClippingStack && !m_frameHostingNodeID && !m_viewportConstrainedNodeID && !m_positioningNodeID) 1886 1934 return; 1887 1935 … … 1891 1939 1892 1940 if (roles.contains(ScrollCoordinationRole::Scrolling) && m_scrollingNodeID) { 1893 LOG (Compositing, "Detaching Scrolling node %" PRIu64,m_scrollingNodeID);1941 LOG_WITH_STREAM(Compositing, stream << "Detaching Scrolling node " << m_scrollingNodeID); 1894 1942 scrollingCoordinator->unparentChildrenAndDestroyNode(m_scrollingNodeID); 1895 1943 m_scrollingNodeID = 0; 1896 1944 } 1897 1945 1946 if (roles.contains(ScrollCoordinationRole::ScrollingProxy) && m_ancestorClippingStack) { 1947 m_ancestorClippingStack->detachFromScrollingCoordinator(*scrollingCoordinator); 1948 LOG_WITH_STREAM(Compositing, stream << "Detaching nodes in ancestor clipping stack"); 1949 } 1950 1898 1951 if (roles.contains(ScrollCoordinationRole::FrameHosting) && m_frameHostingNodeID) { 1899 LOG (Compositing, "Detaching FrameHosting node %" PRIu64,m_frameHostingNodeID);1952 LOG_WITH_STREAM(Compositing, stream << "Detaching FrameHosting node " << m_frameHostingNodeID); 1900 1953 scrollingCoordinator->unparentChildrenAndDestroyNode(m_frameHostingNodeID); 1901 1954 m_frameHostingNodeID = 0; … … 1903 1956 1904 1957 if (roles.contains(ScrollCoordinationRole::ViewportConstrained) && m_viewportConstrainedNodeID) { 1905 LOG (Compositing, "Detaching ViewportConstrained node %" PRIu64,m_viewportConstrainedNodeID);1958 LOG_WITH_STREAM(Compositing, stream << "Detaching ViewportConstrained node " << m_viewportConstrainedNodeID); 1906 1959 scrollingCoordinator->unparentChildrenAndDestroyNode(m_viewportConstrainedNodeID); 1907 1960 m_viewportConstrainedNodeID = 0; … … 1909 1962 1910 1963 if (roles.contains(ScrollCoordinationRole::Positioning) && m_positioningNodeID) { 1911 LOG (Compositing, "Detaching Positioned node %" PRIu64,m_positioningNodeID);1964 LOG_WITH_STREAM(Compositing, stream << "Detaching Positioned node " << m_positioningNodeID); 1912 1965 scrollingCoordinator->unparentChildrenAndDestroyNode(m_positioningNodeID); 1913 1966 m_positioningNodeID = 0; 1914 1967 } 1968 } 1969 1970 ScrollingNodeID RenderLayerBacking::scrollingNodeIDForChildren() const 1971 { 1972 if (m_frameHostingNodeID) 1973 return m_frameHostingNodeID; 1974 1975 if (m_scrollingNodeID) 1976 return m_scrollingNodeID; 1977 1978 if (m_viewportConstrainedNodeID) 1979 return m_viewportConstrainedNodeID; 1980 1981 if (m_ancestorClippingStack) { 1982 if (auto lastOverflowScrollProxyNode = m_ancestorClippingStack->lastOverflowScrollProxyNodeID()) 1983 return lastOverflowScrollProxyNode; 1984 } 1985 1986 return m_positioningNodeID; 1915 1987 } 1916 1988 … … 2499 2571 GraphicsLayer* RenderLayerBacking::childForSuperlayers() const 2500 2572 { 2501 if (m_ancestorClipping Layer)2502 return m_ancestorClipping Layer.get();2573 if (m_ancestorClippingStack) 2574 return m_ancestorClippingStack->firstClippingLayer(); 2503 2575 2504 2576 if (m_contentsContainmentLayer) … … 2655 2727 return; 2656 2728 } 2729 2730 GraphicsContextStateStackChecker checker(context); 2657 2731 2658 2732 OptionSet<RenderLayer::PaintLayerFlag> paintFlags; … … 3312 3386 double backingMemory; 3313 3387 3314 // m_ancestorClippingLayer, m_contentsContainmentLayer and m_childContainmentLayer are just used for masking or containment, so have no backing.3388 // Layers in m_ancestorClippingStack, m_contentsContainmentLayer and m_childContainmentLayer are just used for masking or containment, so have no backing. 3315 3389 backingMemory = m_graphicsLayer->backingStoreMemoryEstimate(); 3316 3390 if (m_foregroundLayer) … … 3354 3428 if (auto nodeID = backing.scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling)) 3355 3429 ts << " scrolling node " << nodeID; 3430 3431 if (backing.ancestorClippingStack()) 3432 ts << " ancestor clip stack " << *backing.ancestorClippingStack(); 3433 3356 3434 if (auto nodeID = backing.scrollingNodeIDForRole(ScrollCoordinationRole::FrameHosting)) 3357 3435 ts << " frame hosting node " << nodeID; -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r246301 r246725 45 45 NormalCompositingLayer, // non-tiled layer with backing store 46 46 TiledCompositingLayer, // tiled layer (always has backing store) 47 MediaCompositingLayer, // layer that contains an image, video, webGL or plugin47 MediaCompositingLayer, // layer that contains an image, video, WebGL or plugin 48 48 ContainerCompositingLayer // layer with no backing store 49 49 }; … … 101 101 GraphicsLayer* clippingLayer() const { return !m_isFrameLayerWithTiledBacking ? m_childContainmentLayer.get() : nullptr; } 102 102 103 // Layer to get clipped by ancestor104 bool hasAncestorClippingLayer() const { return m_ancestorClippingLayer != nullptr; }105 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLayer.get(); }103 bool hasAncestorClippingLayers() const { return !!m_ancestorClippingStack; } 104 LayerAncestorClippingStack* ancestorClippingStack() const { return m_ancestorClippingStack.get(); } 105 bool updateAncestorClippingStack(Vector<CompositedClipData>&&); 106 106 107 107 GraphicsLayer* contentsContainmentLayer() const { return m_contentsContainmentLayer.get(); } … … 117 117 GraphicsLayer* scrollContainerLayer() const { return m_scrollContainerLayer.get(); } 118 118 GraphicsLayer* scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); } 119 120 OptionSet<ScrollCoordinationRole> coordinatedScrollingRoles() const;121 119 122 120 void detachFromScrollingCoordinator(OptionSet<ScrollCoordinationRole>); … … 127 125 case ScrollCoordinationRole::Scrolling: 128 126 return m_scrollingNodeID; 127 case ScrollCoordinationRole::ScrollingProxy: 128 // These nodeIDs are stored in m_ancestorClippingStack. 129 ASSERT_NOT_REACHED(); 130 return 0; 129 131 case ScrollCoordinationRole::FrameHosting: 130 132 return m_frameHostingNodeID; … … 142 144 case ScrollCoordinationRole::Scrolling: 143 145 m_scrollingNodeID = nodeID; 146 break; 147 case ScrollCoordinationRole::ScrollingProxy: 148 // These nodeIDs are stored in m_ancestorClippingStack. 149 ASSERT_NOT_REACHED(); 144 150 break; 145 151 case ScrollCoordinationRole::FrameHosting: … … 156 162 } 157 163 158 ScrollingNodeID scrollingNodeIDForChildren() const 159 { 160 if (m_frameHostingNodeID) 161 return m_frameHostingNodeID; 162 163 if (m_scrollingNodeID) 164 return m_scrollingNodeID; 165 166 if (m_viewportConstrainedNodeID) 167 return m_viewportConstrainedNodeID; 168 169 return m_positioningNodeID; 170 } 171 164 ScrollingNodeID scrollingNodeIDForChildren() const; 172 165 void setIsScrollCoordinatedWithViewportConstrainedRole(bool); 173 166 … … 314 307 315 308 void updateInternalHierarchy(); 316 bool updateAncestorClipping Layer(bool needsAncestorClip);309 bool updateAncestorClipping(bool needsAncestorClip, const RenderLayer* compositingAncestor); 317 310 bool updateDescendantClippingLayer(bool needsDescendantClip); 318 311 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool needsVerticalScrollbarLayer, bool needsScrollCornerLayer); … … 392 385 393 386 bool canIssueSetNeedsDisplay() const { return !paintsIntoWindow() && !paintsIntoCompositedAncestor(); } 394 LayoutRect computeParentGraphicsLayerRect( RenderLayer* compositedAncestor, LayoutSize& ancestorClippingLayerOffset) const;387 LayoutRect computeParentGraphicsLayerRect(const RenderLayer* compositedAncestor) const; 395 388 LayoutRect computePrimaryGraphicsLayerRect(const LayoutRect& parentGraphicsLayerRect) const; 396 389 397 390 RenderLayer& m_owningLayer; 398 391 399 392 // A list other layers that paint into this backing store, later than m_owningLayer in paint order. 400 393 Vector<WeakPtr<RenderLayer>> m_backingSharingLayers; 401 394 402 RefPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clipped by an ancestor which is not a stacking context. 395 std::unique_ptr<LayerAncestorClippingStack> m_ancestorClippingStack; // Only used if we are clipped by an ancestor which is not a stacking context. 396 403 397 RefPtr<GraphicsLayer> m_contentsContainmentLayer; // Only used if we have a background layer; takes the transform. 404 398 RefPtr<GraphicsLayer> m_graphicsLayer; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r246723 r246725 43 43 #include "HitTestResult.h" 44 44 #include "InspectorInstrumentation.h" 45 #include "LayerAncestorClippingStack.h" 45 46 #include "LayerOverlapMap.h" 46 47 #include "Logging.h" … … 577 578 updateScrollingNodeLayers(nodeID, layer, *scrollingCoordinator); 578 579 580 if (auto* clippingStack = layer.backing()->ancestorClippingStack()) 581 clippingStack->updateScrollingNodeLayers(*scrollingCoordinator); 582 579 583 if (auto nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::ViewportConstrained)) 580 584 scrollingCoordinator->setNodeLayers(nodeID, { backing->graphicsLayer() }); … … 1229 1233 // FIXME: do based on dirty flags. Need to do this for changes of geometry, configuration and hierarchy. 1230 1234 // Need to be careful to do the right thing when a scroll-coordinated layer loses a scroll-coordinated ancestor. 1231 stateForDescendants.parentNodeID = updateScrollCoordinationForLayer(layer, scrollingTreeState, layerBacking->coordinatedScrollingRoles(),scrollingNodeChanges);1235 stateForDescendants.parentNodeID = updateScrollCoordinationForLayer(layer, scrollingTreeState, scrollingNodeChanges); 1232 1236 stateForDescendants.nextChildIndex = 0; 1233 1237 … … 1470 1474 layer.setNeedsPostLayoutCompositingUpdate(); 1471 1475 1472 if (diff >= StyleDifference::LayoutPositionedMovementOnly && hasContentCompositingLayers()) { 1473 layer.setNeedsPostLayoutCompositingUpdate(); 1474 layer.setNeedsCompositingGeometryUpdate(); 1476 const auto& newStyle = layer.renderer().style(); 1477 1478 if (hasContentCompositingLayers()) { 1479 if (diff >= StyleDifference::LayoutPositionedMovementOnly) { 1480 layer.setNeedsPostLayoutCompositingUpdate(); 1481 layer.setNeedsCompositingGeometryUpdate(); 1482 } 1483 1484 if (diff >= StyleDifference::Layout) { 1485 // FIXME: only set flags here if we know we have a composited descendant, but we might not know at this point. 1486 if (oldStyle && clippingChanged(*oldStyle, newStyle)) { 1487 if (layer.isStackingContext()) { 1488 layer.setNeedsPostLayoutCompositingUpdate(); // Layer needs to become composited if it has composited descendants. 1489 layer.setNeedsCompositingConfigurationUpdate(); // If already composited, layer needs to create/destroy clipping layer. 1490 } else { 1491 // Descendant (in containing block order) compositing layers need to re-evaluate their clipping, 1492 // but they might be siblings in z-order so go up to our stacking context. 1493 if (auto* stackingContext = layer.stackingContext()) 1494 stackingContext->setDescendantsNeedUpdateBackingAndHierarchyTraversal(); 1495 } 1496 } 1497 1498 // These properties trigger compositing if some descendant is composited. 1499 if (oldStyle && styleChangeMayAffectIndirectCompositingReasons(*oldStyle, newStyle)) 1500 layer.setNeedsPostLayoutCompositingUpdate(); 1501 1502 layer.setNeedsCompositingGeometryUpdate(); 1503 } 1475 1504 } 1476 1505 … … 1480 1509 1481 1510 backing->updateConfigurationAfterStyleChange(); 1482 1483 const auto& newStyle = layer.renderer().style();1484 1511 1485 1512 if (diff >= StyleDifference::Repaint) { … … 1502 1529 // FIXME: transform changes really need to trigger layout. See RenderElement::adjustStyleDifference(). 1503 1530 layer.setNeedsPostLayoutCompositingUpdate(); 1504 layer.setNeedsCompositingGeometryUpdate();1505 }1506 1507 if (diff >= StyleDifference::Layout) {1508 // FIXME: only set flags here if we know we have a composited descendant, but we might not know at this point.1509 if (oldStyle && clippingChanged(*oldStyle, newStyle)) {1510 if (layer.isStackingContext()) {1511 layer.setNeedsPostLayoutCompositingUpdate(); // Layer needs to become composited if it has composited descendants.1512 layer.setNeedsCompositingConfigurationUpdate(); // If already composited, layer needs to create/destroy clipping layer.1513 } else {1514 // Descendant (in containing block order) compositing layers need to re-evaluate their clipping,1515 // but they might be siblings in z-order so go up to our stacking context.1516 if (auto* stackingContext = layer.stackingContext())1517 stackingContext->setDescendantsNeedUpdateBackingAndHierarchyTraversal();1518 }1519 }1520 1521 // These properties trigger compositing if some descendant is composited.1522 if (oldStyle && styleChangeMayAffectIndirectCompositingReasons(*oldStyle, newStyle))1523 layer.setNeedsPostLayoutCompositingUpdate();1524 1525 1531 layer.setNeedsCompositingGeometryUpdate(); 1526 1532 } … … 2587 2593 // but a sibling in the z-order hierarchy. 2588 2594 // FIXME: can we do this without a tree walk? 2589 bool RenderLayerCompositor::clippedByAncestor(RenderLayer& layer ) const2595 bool RenderLayerCompositor::clippedByAncestor(RenderLayer& layer, const RenderLayer* compositingAncestor) const 2590 2596 { 2591 2597 ASSERT(layer.isComposited()); 2592 if (!layer.parent())2593 return false;2594 2595 // On first pass in WK1, the root may not have become composited yet.2596 auto* compositingAncestor = layer.ancestorCompositingLayer();2597 2598 if (!compositingAncestor) 2598 2599 return false; … … 2623 2624 } 2624 2625 2626 bool RenderLayerCompositor::updateAncestorClippingStack(const RenderLayer& layer, const RenderLayer* compositingAncestor) const 2627 { 2628 ASSERT(layer.isComposited()); 2629 2630 auto clippingStack = computeAncestorClippingStack(layer, compositingAncestor); 2631 return layer.backing()->updateAncestorClippingStack(WTFMove(clippingStack)); 2632 } 2633 2634 Vector<CompositedClipData> RenderLayerCompositor::computeAncestorClippingStack(const RenderLayer& layer, const RenderLayer* compositingAncestor) const 2635 { 2636 // On first pass in WK1, the root may not have become composited yet. 2637 if (!compositingAncestor) 2638 return { }; 2639 2640 // We'll start by building a child-to-ancestors stack. 2641 Vector<CompositedClipData> newStack; 2642 2643 // Walk up the containing block chain to composited ancestor, prepending an entry to the clip stack for: 2644 // * each composited scrolling layer 2645 // * each set of RenderLayers which contribute a clip. 2646 bool haveNonScrollableClippingIntermediateLayer = false; 2647 const RenderLayer* currentClippedLayer = &layer; 2648 2649 auto pushNonScrollableClip = [&](const RenderLayer& clippedLayer, const RenderLayer& clippingRoot, ShouldRespectOverflowClip respectClip = IgnoreOverflowClip) { 2650 // Pass IgnoreOverflowClip to ignore overflow contributed by clippingRoot (which may be a scroller). 2651 auto clipRect = clippedLayer.backgroundClipRect(RenderLayer::ClipRectsContext(&clippingRoot, TemporaryClipRects, IgnoreOverlayScrollbarSize, respectClip)).rect(); 2652 auto offset = layer.convertToLayerCoords(&clippingRoot, { }, RenderLayer::AdjustForColumns); 2653 clipRect.moveBy(-offset); 2654 2655 CompositedClipData clipData { const_cast<RenderLayer*>(&clippedLayer), clipRect, false }; 2656 newStack.insert(0, WTFMove(clipData)); 2657 }; 2658 2659 traverseAncestorLayers(layer, [&](const RenderLayer& ancestorLayer, bool isContainingBlockChain, bool /*isPaintOrderAncestor*/) { 2660 if (&ancestorLayer == compositingAncestor) { 2661 2662 if (haveNonScrollableClippingIntermediateLayer) 2663 pushNonScrollableClip(*currentClippedLayer, ancestorLayer, ancestorLayer.isolatesCompositedBlending() ? RespectOverflowClip : IgnoreOverflowClip); 2664 else if (ancestorLayer.isolatesCompositedBlending() && newStack.isEmpty()) 2665 pushNonScrollableClip(*currentClippedLayer, ancestorLayer, RespectOverflowClip); 2666 2667 return AncestorTraversal::Stop; 2668 } 2669 2670 if (isContainingBlockChain && ancestorLayer.renderer().hasClipOrOverflowClip()) { 2671 if (ancestorLayer.hasCompositedScrollableOverflow()) { 2672 if (haveNonScrollableClippingIntermediateLayer) { 2673 pushNonScrollableClip(*currentClippedLayer, ancestorLayer); 2674 haveNonScrollableClippingIntermediateLayer = false; 2675 } 2676 2677 auto clipRect = parentRelativeScrollableRect(ancestorLayer, &ancestorLayer); 2678 auto offset = layer.convertToLayerCoords(&ancestorLayer, { }, RenderLayer::AdjustForColumns); 2679 clipRect.moveBy(-offset); 2680 2681 CompositedClipData clipData { const_cast<RenderLayer*>(&ancestorLayer), clipRect, true }; 2682 newStack.insert(0, WTFMove(clipData)); 2683 currentClippedLayer = &ancestorLayer; 2684 } else 2685 haveNonScrollableClippingIntermediateLayer = true; 2686 } 2687 2688 return AncestorTraversal::Continue; 2689 }); 2690 2691 return newStack; 2692 } 2693 2625 2694 // Return true if the given layer is a stacking context and has compositing child 2626 2695 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer … … 3184 3253 static Vector<ScrollingNodeID> collectRelatedCoordinatedScrollingNodes(const RenderLayer& layer, ScrollPositioningBehavior positioningBehavior) 3185 3254 { 3186 Vector<ScrollingNodeID> overflowNode Data;3255 Vector<ScrollingNodeID> overflowNodeIDs; 3187 3256 3188 3257 switch (positioningBehavior) { 3189 case ScrollPositioningBehavior::Moves: {3190 // Collect all the composited scrollers between this layer and its composited ancestor.3191 auto* compositedAncestor = layer.ancestorCompositingLayer();3192 for (const auto* currLayer = layer.parent(); currLayer != compositedAncestor; currLayer = currLayer->parent()) {3193 if (currLayer->hasCompositedScrollableOverflow()) {3194 auto scrollingNodeID = currLayer->isComposited() ? currLayer->backing()->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling) : 0;3195 if (scrollingNodeID)3196 overflowNodeData.append(scrollingNodeID);3197 else3198 LOG(Scrolling, "Layer %p isn't composited or doesn't have scrolling node ID yet", &layer);3199 }3200 }3201 break;3202 }3203 3258 case ScrollPositioningBehavior::Stationary: { 3204 3259 auto* compositedAncestor = layer.ancestorCompositingLayer(); 3205 3260 if (!compositedAncestor) 3206 return overflowNode Data;3207 collectStationaryLayerRelatedOverflowNodes(layer, *compositedAncestor, overflowNode Data);3261 return overflowNodeIDs; 3262 collectStationaryLayerRelatedOverflowNodes(layer, *compositedAncestor, overflowNodeIDs); 3208 3263 break; 3209 3264 } 3265 case ScrollPositioningBehavior::Moves: 3210 3266 case ScrollPositioningBehavior::None: 3211 3267 ASSERT_NOT_REACHED(); … … 3213 3269 } 3214 3270 3215 return overflowNode Data;3271 return overflowNodeIDs; 3216 3272 } 3217 3273 … … 4048 4104 #endif 4049 4105 4050 detachScrollCoordinatedLayer(layer, { ScrollCoordinationRole::Scrolling, ScrollCoordinationRole::ViewportConstrained, ScrollCoordinationRole::FrameHosting, ScrollCoordinationRole::Positioning });4106 detachScrollCoordinatedLayer(layer, allScrollCoordinationRoles()); 4051 4107 } 4052 4108 … … 4110 4166 case ScrollingNodeType::Overflow: 4111 4167 return ScrollCoordinationRole::Scrolling; 4168 case ScrollingNodeType::OverflowProxy: 4169 return ScrollCoordinationRole::ScrollingProxy; 4112 4170 case ScrollingNodeType::FrameHosting: 4113 4171 return ScrollCoordinationRole::FrameHosting; … … 4117 4175 case ScrollingNodeType::Positioned: 4118 4176 return ScrollCoordinationRole::Positioning; 4119 case ScrollingNodeType::OverflowProxy:4120 break;4121 4177 } 4122 4178 ASSERT_NOT_REACHED(); … … 4138 4194 ScrollCoordinationRole role = scrollCoordinationRoleForNodeType(nodeType); 4139 4195 ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(role); 4196 4197 nodeID = registerScrollingNodeID(*scrollingCoordinator, nodeID, nodeType, treeState); 4198 4199 LOG_WITH_STREAM(Scrolling, stream << "RenderLayerCompositor " << this << " attachScrollingNode " << nodeID << " (layer " << backing->graphicsLayer()->primaryLayerID() << ") type " << nodeType << " parent " << treeState.parentNodeID.valueOr(0)); 4200 4140 4201 if (!nodeID) 4141 nodeID = scrollingCoordinator->uniqueScrollingNodeID(); 4142 4143 LOG_WITH_STREAM(Scrolling, stream << "RenderLayerCompositor " << this << " attachScrollingNode " << nodeID << " (layer " << backing->graphicsLayer()->primaryLayerID() << ") type " << nodeType << " parent " << treeState.parentNodeID.valueOr(0)); 4202 return 0; 4203 4204 backing->setScrollingNodeIDForRole(nodeID, role); 4205 m_scrollingNodeToLayerMap.add(nodeID, &layer); 4206 4207 return nodeID; 4208 } 4209 4210 ScrollingNodeID RenderLayerCompositor::registerScrollingNodeID(ScrollingCoordinator& scrollingCoordinator, ScrollingNodeID nodeID, ScrollingNodeType nodeType, struct ScrollingTreeState& treeState) 4211 { 4212 if (!nodeID) 4213 nodeID = scrollingCoordinator.uniqueScrollingNodeID(); 4144 4214 4145 4215 if (nodeType == ScrollingNodeType::Subframe && !treeState.parentNodeID) 4146 nodeID = scrollingCoordinator ->createNode(nodeType, nodeID);4216 nodeID = scrollingCoordinator.createNode(nodeType, nodeID); 4147 4217 else { 4148 auto newNodeID = scrollingCoordinator ->insertNode(nodeType, nodeID, treeState.parentNodeID.valueOr(0), treeState.nextChildIndex);4218 auto newNodeID = scrollingCoordinator.insertNode(nodeType, nodeID, treeState.parentNodeID.valueOr(0), treeState.nextChildIndex); 4149 4219 if (newNodeID != nodeID) { 4150 4220 // We'll get a new nodeID if the type changed (and not if the node is new). 4151 scrollingCoordinator ->unparentChildrenAndDestroyNode(nodeID);4221 scrollingCoordinator.unparentChildrenAndDestroyNode(nodeID); 4152 4222 m_scrollingNodeToLayerMap.remove(nodeID); 4153 4223 } … … 4159 4229 return 0; 4160 4230 4161 backing->setScrollingNodeIDForRole(nodeID, role);4162 m_scrollingNodeToLayerMap.add(nodeID, &layer);4163 4164 4231 ++treeState.nextChildIndex; 4165 4232 return nodeID; … … 4168 4235 void RenderLayerCompositor::detachScrollCoordinatedLayerWithRole(RenderLayer& layer, ScrollingCoordinator& scrollingCoordinator, ScrollCoordinationRole role) 4169 4236 { 4237 auto unregisterNode = [&](ScrollingNodeID nodeID) { 4238 auto childNodes = scrollingCoordinator.childrenOfNode(nodeID); 4239 for (auto childNodeID : childNodes) { 4240 if (auto* layer = m_scrollingNodeToLayerMap.get(childNodeID)) 4241 layer->setNeedsScrollingTreeUpdate(); 4242 } 4243 4244 m_scrollingNodeToLayerMap.remove(nodeID); 4245 }; 4246 4247 if (role == ScrollCoordinationRole::ScrollingProxy) { 4248 ASSERT(layer.isComposited()); 4249 auto* clippingStack = layer.backing()->ancestorClippingStack(); 4250 if (!clippingStack) 4251 return; 4252 4253 auto& stack = clippingStack->stack(); 4254 for (auto& entry : stack) { 4255 if (entry.overflowScrollProxyNodeID) 4256 unregisterNode(entry.overflowScrollProxyNodeID); 4257 } 4258 return; 4259 } 4260 4170 4261 auto nodeID = layer.backing()->scrollingNodeIDForRole(role); 4171 4262 if (!nodeID) 4172 4263 return; 4173 4264 4174 auto childNodes = scrollingCoordinator.childrenOfNode(nodeID); 4175 for (auto childNodeID : childNodes) { 4176 // FIXME: The child might be in a child frame. Need to do something that crosses frame boundaries. 4177 if (auto* layer = m_scrollingNodeToLayerMap.get(childNodeID)) 4178 layer->setNeedsScrollingTreeUpdate(); 4179 } 4180 4181 m_scrollingNodeToLayerMap.remove(nodeID); 4265 unregisterNode(nodeID); 4182 4266 } 4183 4267 … … 4193 4277 detachScrollCoordinatedLayerWithRole(layer, *scrollingCoordinator, ScrollCoordinationRole::Scrolling); 4194 4278 4279 if (roles.contains(ScrollCoordinationRole::ScrollingProxy)) 4280 detachScrollCoordinatedLayerWithRole(layer, *scrollingCoordinator, ScrollCoordinationRole::ScrollingProxy); 4281 4195 4282 if (roles.contains(ScrollCoordinationRole::FrameHosting)) 4196 4283 detachScrollCoordinatedLayerWithRole(layer, *scrollingCoordinator, ScrollCoordinationRole::FrameHosting); … … 4205 4292 } 4206 4293 4207 ScrollingNodeID RenderLayerCompositor::updateScrollCoordinationForLayer(RenderLayer& layer, ScrollingTreeState& treeState, OptionSet<ScrollCoordinationRole> roles, OptionSet<ScrollingNodeChangeFlags> changes) 4208 { 4294 OptionSet<ScrollCoordinationRole> RenderLayerCompositor::coordinatedScrollingRolesForLayer(const RenderLayer& layer) const 4295 { 4296 OptionSet<ScrollCoordinationRole> coordinationRoles; 4297 if (isViewportConstrainedFixedOrStickyLayer(layer)) 4298 coordinationRoles.add(ScrollCoordinationRole::ViewportConstrained); 4299 4300 if (useCoordinatedScrollingForLayer(layer)) 4301 coordinationRoles.add(ScrollCoordinationRole::Scrolling); 4302 4303 auto coordinatedPositioning = computeCoordinatedPositioningForLayer(layer); 4304 switch (coordinatedPositioning) { 4305 case ScrollPositioningBehavior::Moves: 4306 coordinationRoles.add(ScrollCoordinationRole::ScrollingProxy); 4307 break; 4308 case ScrollPositioningBehavior::Stationary: 4309 coordinationRoles.add(ScrollCoordinationRole::Positioning); 4310 break; 4311 case ScrollPositioningBehavior::None: 4312 break; 4313 } 4314 4315 if (isLayerForIFrameWithScrollCoordinatedContents(layer)) 4316 coordinationRoles.add(ScrollCoordinationRole::FrameHosting); 4317 4318 return coordinationRoles; 4319 } 4320 4321 ScrollingNodeID RenderLayerCompositor::updateScrollCoordinationForLayer(RenderLayer& layer, ScrollingTreeState& treeState, OptionSet<ScrollingNodeChangeFlags> changes) 4322 { 4323 auto roles = coordinatedScrollingRolesForLayer(layer); 4324 4209 4325 bool isViewportConstrained = roles.contains(ScrollCoordinationRole::ViewportConstrained); 4210 4326 #if PLATFORM(IOS_FAMILY) … … 4237 4353 } else 4238 4354 detachScrollCoordinatedLayer(layer, ScrollCoordinationRole::Positioning); 4355 4356 // If there's a scrolling proxy node, it's the parent scrolling node for fixed/sticky/scrolling/frame hosting. 4357 if (roles.contains(ScrollCoordinationRole::ScrollingProxy)) { 4358 newNodeID = updateScrollingNodeForScrollingProxyRole(layer, *currentTreeState, changes); 4359 childTreeState.parentNodeID = newNodeID; 4360 currentTreeState = &childTreeState; 4361 } else 4362 detachScrollCoordinatedLayer(layer, ScrollCoordinationRole::ScrollingProxy); 4239 4363 4240 4364 // If is fixed or sticky, it's the parent scrolling node for scrolling/frame hosting. … … 4384 4508 } 4385 4509 4510 ScrollingNodeID RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole(RenderLayer& layer, ScrollingTreeState& treeState, OptionSet<ScrollingNodeChangeFlags> changes) 4511 { 4512 auto* scrollingCoordinator = this->scrollingCoordinator(); 4513 auto* clippingStack = layer.backing()->ancestorClippingStack(); 4514 if (!clippingStack) 4515 return 0; 4516 4517 ScrollingNodeID nodeID = 0; 4518 for (auto& entry : clippingStack->stack()) { 4519 if (!entry.clipData.isOverflowScroll) 4520 continue; 4521 4522 nodeID = registerScrollingNodeID(*scrollingCoordinator, entry.overflowScrollProxyNodeID, ScrollingNodeType::OverflowProxy, treeState); 4523 if (!nodeID) { 4524 ASSERT_NOT_REACHED(); 4525 return treeState.parentNodeID.valueOr(0); 4526 } 4527 entry.overflowScrollProxyNodeID = nodeID; 4528 4529 if (changes & ScrollingNodeChangeFlags::Layer) 4530 scrollingCoordinator->setNodeLayers(entry.overflowScrollProxyNodeID, { entry.clippingLayer.get() }); 4531 4532 if (changes & ScrollingNodeChangeFlags::LayerGeometry) { 4533 ASSERT(entry.clipData.clippingLayer); 4534 ASSERT(entry.clipData.clippingLayer->isComposited()); 4535 4536 auto overflowScrollNodeID = 0; 4537 if (auto* backing = entry.clipData.clippingLayer->backing()) 4538 overflowScrollNodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling); 4539 4540 Vector<ScrollingNodeID> scrollingNodeIDs; 4541 if (overflowScrollNodeID) 4542 scrollingNodeIDs.append(overflowScrollNodeID); 4543 scrollingCoordinator->setRelatedOverflowScrollingNodes(entry.overflowScrollProxyNodeID, WTFMove(scrollingNodeIDs)); 4544 } 4545 } 4546 4547 return nodeID; 4548 } 4549 4386 4550 ScrollingNodeID RenderLayerCompositor::updateScrollingNodeForFrameHostingRole(RenderLayer& layer, ScrollingTreeState& treeState, OptionSet<ScrollingNodeChangeFlags> changes) 4387 4551 { … … 4427 4591 4428 4592 auto* graphicsLayer = layer.backing()->graphicsLayer(); 4429 LayoutConstraints constraints;4593 AbsolutePositionConstraints constraints; 4430 4594 constraints.setAlignmentOffset(graphicsLayer->pixelAlignmentOffset()); 4431 4595 constraints.setLayerPositionAtLastLayout(graphicsLayer->position()); 4432 constraints.setScrollPositioningBehavior(positioningBehavior); 4433 scrollingCoordinator->setPositionedNodeGeometry(newNodeID, constraints); 4596 scrollingCoordinator->setPositionedNodeConstraints(newNodeID, constraints); 4434 4597 } 4435 4598 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r246612 r246725 29 29 #include "GraphicsLayerClient.h" 30 30 #include "GraphicsLayerUpdater.h" 31 #include "LayerAncestorClippingStack.h" 31 32 #include "RenderLayer.h" 32 33 #include <wtf/HashMap.h> … … 89 90 ViewportConstrained = 1 << 0, 90 91 Scrolling = 1 << 1, 91 FrameHosting = 1 << 2, 92 Positioning = 1 << 3, 92 ScrollingProxy = 1 << 2, 93 FrameHosting = 1 << 3, 94 Positioning = 1 << 4, 93 95 }; 96 97 static constexpr OptionSet<ScrollCoordinationRole> allScrollCoordinationRoles() 98 { 99 return { 100 ScrollCoordinationRole::Scrolling, 101 ScrollCoordinationRole::ScrollingProxy, 102 ScrollCoordinationRole::ViewportConstrained, 103 ScrollCoordinationRole::FrameHosting, 104 ScrollCoordinationRole::Positioning 105 }; 106 } 94 107 95 108 #if PLATFORM(IOS_FAMILY) … … 202 215 203 216 // Whether layer's backing needs a graphics layer to do clipping by an ancestor (non-stacking-context parent with overflow). 204 bool clippedByAncestor(RenderLayer&) const; 217 bool clippedByAncestor(RenderLayer&, const RenderLayer* compositingAncestor) const; 218 219 bool updateAncestorClippingStack(const RenderLayer&, const RenderLayer* compositingAncestor) const; 220 205 221 // Whether layer's backing needs a graphics layer to clip z-order children of the given layer. 206 222 static bool clipsCompositingDescendants(const RenderLayer&); … … 492 508 493 509 ScrollingNodeID attachScrollingNode(RenderLayer&, ScrollingNodeType, struct ScrollingTreeState&); 510 ScrollingNodeID registerScrollingNodeID(ScrollingCoordinator&, ScrollingNodeID, ScrollingNodeType, struct ScrollingTreeState&); 511 512 OptionSet<ScrollCoordinationRole> coordinatedScrollingRolesForLayer(const RenderLayer&) const; 494 513 495 514 // Returns the ScrollingNodeID which acts as the parent for children. 496 ScrollingNodeID updateScrollCoordinationForLayer(RenderLayer&, struct ScrollingTreeState&, OptionSet<Scroll CoordinationRole>, OptionSet<ScrollingNodeChangeFlags>);515 ScrollingNodeID updateScrollCoordinationForLayer(RenderLayer&, struct ScrollingTreeState&, OptionSet<ScrollingNodeChangeFlags>); 497 516 498 517 // These return the ScrollingNodeID which acts as the parent for children. 499 518 ScrollingNodeID updateScrollingNodeForViewportConstrainedRole(RenderLayer&, struct ScrollingTreeState&, OptionSet<ScrollingNodeChangeFlags>); 500 519 ScrollingNodeID updateScrollingNodeForScrollingRole(RenderLayer&, struct ScrollingTreeState&, OptionSet<ScrollingNodeChangeFlags>); 520 ScrollingNodeID updateScrollingNodeForScrollingProxyRole(RenderLayer&, struct ScrollingTreeState&, OptionSet<ScrollingNodeChangeFlags>); 501 521 ScrollingNodeID updateScrollingNodeForFrameHostingRole(RenderLayer&, struct ScrollingTreeState&, OptionSet<ScrollingNodeChangeFlags>); 502 522 ScrollingNodeID updateScrollingNodeForPositioningRole(RenderLayer&, struct ScrollingTreeState&, OptionSet<ScrollingNodeChangeFlags>); … … 512 532 LayoutRect rootParentRelativeScrollableRect() const; 513 533 LayoutRect parentRelativeScrollableRect(const RenderLayer&, const RenderLayer* ancestorLayer) const; 534 535 // Returns list of layers and their clip rects required to clip the given layer, which include clips in the 536 // containing block chain between the given layer and its composited ancestor. 537 Vector<CompositedClipData> computeAncestorClippingStack(const RenderLayer&, const RenderLayer* compositingAncestor) const; 514 538 515 539 bool requiresScrollLayer(RootLayerAttachment) const; -
trunk/Source/WebKit/ChangeLog
r246723 r246725 1 2019-06-23 Simon Fraser <simon.fraser@apple.com> 2 3 [Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped 4 https://bugs.webkit.org/show_bug.cgi?id=199133 5 rdar://problem/43614439 6 7 Reviewed by Antti Koivisto. 8 9 LayoutConstraints -> AbsolutePositionConstraints rename. 10 11 * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: 12 (ArgumentCoder<ScrollingStatePositionedNode>::decode): 13 * Shared/WebCoreArgumentCoders.cpp: 14 (IPC::ArgumentCoder<AbsolutePositionConstraints>::encode): 15 (IPC::ArgumentCoder<AbsolutePositionConstraints>::decode): 16 (IPC::ArgumentCoder<LayoutConstraints>::encode): Deleted. 17 (IPC::ArgumentCoder<LayoutConstraints>::decode): Deleted. 18 * Shared/WebCoreArgumentCoders.h: 19 * Shared/WebRenderLayer.cpp: 20 (WebKit::WebRenderLayer::WebRenderLayer): 21 * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: 22 (WebKit::RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations): ScrollingTreeOverflowScrollProxyNode 23 have overflow scroll relations now too. 24 1 25 2019-06-23 Simon Fraser <simon.fraser@apple.com> 2 26 -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
r246723 r246725 437 437 438 438 if (node.hasChangedProperty(ScrollingStatePositionedNode::LayoutConstraintData)) { 439 LayoutConstraints decodedValue;439 AbsolutePositionConstraints decodedValue; 440 440 if (!decoder.decode(decodedValue)) 441 441 return false; -
trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
r245787 r246725 2202 2202 } 2203 2203 2204 void ArgumentCoder< LayoutConstraints>::encode(Encoder& encoder, const LayoutConstraints& layoutConstraints)2204 void ArgumentCoder<AbsolutePositionConstraints>::encode(Encoder& encoder, const AbsolutePositionConstraints& layoutConstraints) 2205 2205 { 2206 2206 encoder << layoutConstraints.alignmentOffset(); 2207 2207 encoder << layoutConstraints.layerPositionAtLastLayout(); 2208 encoder.encodeEnum(layoutConstraints.scrollPositioningBehavior()); 2209 } 2210 2211 bool ArgumentCoder<LayoutConstraints>::decode(Decoder& decoder, LayoutConstraints& layoutConstraints) 2208 } 2209 2210 bool ArgumentCoder<AbsolutePositionConstraints>::decode(Decoder& decoder, AbsolutePositionConstraints& layoutConstraints) 2212 2211 { 2213 2212 FloatSize alignmentOffset; … … 2217 2216 FloatPoint layerPosition; 2218 2217 if (!decoder.decode(layerPosition)) 2219 return false;2220 2221 ScrollPositioningBehavior positioningBehavior;2222 if (!decoder.decodeEnum(positioningBehavior))2223 2218 return false; 2224 2219 … … 2226 2221 layoutConstraints.setAlignmentOffset(alignmentOffset); 2227 2222 layoutConstraints.setLayerPositionAtLastLayout(layerPosition); 2228 layoutConstraints.setScrollPositioningBehavior(positioningBehavior);2229 2223 return true; 2230 2224 } -
trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h
r245787 r246725 58 58 59 59 namespace WebCore { 60 class AbsolutePositionConstraints; 60 61 class AffineTransform; 61 62 class AuthenticationChallenge; … … 83 84 class LayoutSize; 84 85 class LayoutPoint; 85 class LayoutConstraints;86 86 class LinearTimingFunction; 87 87 class Notification; … … 545 545 }; 546 546 547 template<> struct ArgumentCoder<WebCore:: LayoutConstraints> {548 static void encode(Encoder&, const WebCore:: LayoutConstraints&);549 static bool decode(Decoder&, WebCore:: LayoutConstraints&);547 template<> struct ArgumentCoder<WebCore::AbsolutePositionConstraints> { 548 static void encode(Encoder&, const WebCore::AbsolutePositionConstraints&); 549 static bool decode(Decoder&, WebCore::AbsolutePositionConstraints&); 550 550 }; 551 551 -
trunk/Source/WebKit/Shared/WebRenderLayer.cpp
r237058 r246725 74 74 WebCore::RenderLayerBacking* backing = layer->backing(); 75 75 m_isClipping = backing->hasClippingLayer(); 76 m_isClipped = backing->hasAncestorClippingLayer ();76 m_isClipped = backing->hasAncestorClippingLayers(); 77 77 switch (backing->compositingLayerType()) { 78 78 case WebCore::NormalCompositingLayer: -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
r246723 r246725 133 133 // Usually a scroll view scrolls its descendant layers. In some positioning cases it also controls non-descendants, or doesn't control a descendant. 134 134 // To do overlap hit testing correctly we tell layers about such relations. 135 for (auto positionedNodeID : m_scrollingTree->positionedNodesWithRelatedOverflow()) { 136 auto* positionedNode = downcast<ScrollingTreePositionedNode>(m_scrollingTree->nodeForID(positionedNodeID)); 137 if (!positionedNode) { 135 136 for (auto nodeID : m_scrollingTree->nodesWithRelatedOverflow()) { 137 auto* node = m_scrollingTree->nodeForID(nodeID); 138 if (!node) { 138 139 ASSERT_NOT_REACHED(); 139 140 continue; 140 141 } 142 141 143 Vector<GraphicsLayer::PlatformLayerID> scrollContainerLayerIDs; 142 143 for (auto overflowNodeID : positionedNode->relatedOverflowScrollingNodes()) { 144 auto* overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(m_scrollingTree->nodeForID(overflowNodeID)); 144 RemoteLayerTreeNode* layerNode = nullptr; 145 ScrollPositioningBehavior behavior = ScrollPositioningBehavior::None; 146 147 if (is<ScrollingTreePositionedNode>(*node)) { 148 auto& positionedNode = downcast<ScrollingTreePositionedNode>(*node); 149 for (auto overflowNodeID : positionedNode.relatedOverflowScrollingNodes()) { 150 auto* overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(m_scrollingTree->nodeForID(overflowNodeID)); 151 if (!overflowNode) { 152 ASSERT_NOT_REACHED(); 153 continue; 154 } 155 scrollContainerLayerIDs.append(RemoteLayerTreeNode::layerID(overflowNode->scrollContainerLayer())); 156 } 157 layerNode = RemoteLayerTreeNode::forCALayer(positionedNode.layer()); 158 behavior = ScrollPositioningBehavior::Stationary; 159 } else if (is<ScrollingTreeOverflowScrollProxyNode>(*node)) { 160 auto& scrollProxyNode = downcast<ScrollingTreeOverflowScrollProxyNode>(*node); 161 auto* overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(m_scrollingTree->nodeForID(scrollProxyNode.overflowScrollingNodeID())); 145 162 if (!overflowNode) { 146 163 ASSERT_NOT_REACHED(); … … 148 165 } 149 166 scrollContainerLayerIDs.append(RemoteLayerTreeNode::layerID(overflowNode->scrollContainerLayer())); 150 } 151 152 auto* positionedLayerNode = RemoteLayerTreeNode::forCALayer(positionedNode->layer()); 153 if (!positionedLayerNode) { 167 layerNode = RemoteLayerTreeNode::forCALayer(scrollProxyNode.layer()); 168 behavior = ScrollPositioningBehavior::Moves; 169 } 170 171 if (!layerNode) { 154 172 ASSERT_NOT_REACHED(); 155 173 continue; 156 174 } 157 positionedLayerNode->setRelatedScrollContainerBehaviorAndIDs(positionedNode->scrollPositioningBehavior(), WTFMove(scrollContainerLayerIDs));158 159 m_layersWithScrollingRelations.add( positionedLayerNode->layerID());175 layerNode->setRelatedScrollContainerBehaviorAndIDs(behavior, WTFMove(scrollContainerLayerIDs)); 176 177 m_layersWithScrollingRelations.add(layerNode->layerID()); 160 178 } 161 179 }
Note: See TracChangeset
for help on using the changeset viewer.