Changeset 240553 in webkit
- Timestamp:
- Jan 27, 2019 8:58:48 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r240550 r240553 1 2019-01-26 Simon Fraser <simon.fraser@apple.com> 2 3 Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node 4 https://bugs.webkit.org/show_bug.cgi?id=193879 5 6 Reviewed by Antti Koivisto. 7 8 New test results with FrameHosting nodes. 9 10 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt: 11 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt: 12 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt: 13 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt: 14 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: 15 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt: 16 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: 17 * scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt: 18 * scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt: 19 * scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt: 20 * scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt: 21 * scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: 22 * scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt: 23 * scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: 24 1 25 2019-01-26 Devin Rousso <drousso@apple.com> 2 26 -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt
r240505 r240553 14 14 (behavior for fixed 0) 15 15 (children 1 16 (Frame scrolling node 17 (scrollable area size 500 300) 18 (contents size 500 420) 19 (scrollable area parameters 20 (horizontal scroll elasticity 1) 21 (vertical scroll elasticity 1) 22 (horizontal scrollbar mode 0) 23 (vertical scrollbar mode 0)) 24 (visual viewport enabled 1) 25 (layout viewport at (0,0) size 500x300) 26 (min layout viewport origin (0,0)) 27 (max layout viewport origin (0,120)) 28 (behavior for fixed 0) 29 (children 2 30 (Overflow scrolling node 31 (scrollable area size 400 300) 32 (contents size 400 1760) 16 (Frame hosting node 17 (children 1 18 (Frame scrolling node 19 (scrollable area size 500 300) 20 (contents size 500 420) 33 21 (scrollable area parameters 34 22 (horizontal scroll elasticity 1) … … 36 24 (horizontal scrollbar mode 0) 37 25 (vertical scrollbar mode 0)) 38 (children 1 26 (visual viewport enabled 1) 27 (layout viewport at (0,0) size 500x300) 28 (min layout viewport origin (0,0)) 29 (max layout viewport origin (0,120)) 30 (behavior for fixed 0) 31 (children 2 32 (Overflow scrolling node 33 (scrollable area size 400 300) 34 (contents size 400 1760) 35 (scrollable area parameters 36 (horizontal scroll elasticity 1) 37 (vertical scroll elasticity 1) 38 (horizontal scrollbar mode 0) 39 (vertical scrollbar mode 0)) 40 (children 1 41 (Sticky node 42 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 43 (top offset 10.00) 44 (bottom offset 10.00) 45 (containing block rect at (2,2) size 400x1760) 46 (sticky box rect at (0,830) size 100x100) 47 (constraining rect at (0,0) size 400x300) 48 (sticky offset at last layout width=0 height=-640) 49 (layer position at last layout (0,190)) 50 ) 51 ) 52 ) 39 53 (Sticky node 40 54 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 41 55 (top offset 10.00) 42 56 (bottom offset 10.00) 43 (containing block rect at ( 2,2) size 400x1760)44 (sticky box rect at ( 0,830) size 100x100)45 (constraining rect at (0,0) size 400x300)46 (sticky offset at last layout width=0 height=- 640)47 (layer position at last layout ( 0,190))57 (containing block rect at (8,8) size 484x404) 58 (sticky box rect at (8,312) size 100x100) 59 (constraining rect at (0,0) size 500x300) 60 (sticky offset at last layout width=0 height=-122) 61 (layer position at last layout (8,190)) 48 62 ) 49 63 ) 50 )51 (Sticky node52 (anchor edges: AnchorEdgeTop AnchorEdgeBottom)53 (top offset 10.00)54 (bottom offset 10.00)55 (containing block rect at (8,8) size 484x404)56 (sticky box rect at (8,312) size 100x100)57 (constraining rect at (0,0) size 500x300)58 (sticky offset at last layout width=0 height=-122)59 (layer position at last layout (8,190))60 64 ) 61 65 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt
r240505 r240553 19 19 (layer position at last layout (8,10)) 20 20 (children 1 21 (Frame scrolling node 22 (scrollable area size 500 300) 23 (contents size 500 420) 24 (scrollable area parameters 25 (horizontal scroll elasticity 1) 26 (vertical scroll elasticity 1) 27 (horizontal scrollbar mode 1) 28 (vertical scrollbar mode 1)) 29 (visual viewport enabled 1) 30 (layout viewport at (0,0) size 500x300) 31 (min layout viewport origin (0,0)) 32 (max layout viewport origin (0,120)) 33 (behavior for fixed 0) 34 (children 2 35 (Overflow scrolling node 36 (scrollable area size 400 300) 37 (contents size 400 1760) 21 (Frame hosting node 22 (children 1 23 (Frame scrolling node 24 (scrollable area size 500 300) 25 (contents size 500 420) 38 26 (scrollable area parameters 39 27 (horizontal scroll elasticity 1) 40 28 (vertical scroll elasticity 1) 41 (horizontal scrollbar mode 0) 42 (vertical scrollbar mode 0)) 43 (children 1 29 (horizontal scrollbar mode 1) 30 (vertical scrollbar mode 1)) 31 (visual viewport enabled 1) 32 (layout viewport at (0,0) size 500x300) 33 (min layout viewport origin (0,0)) 34 (max layout viewport origin (0,120)) 35 (behavior for fixed 0) 36 (children 2 37 (Overflow scrolling node 38 (scrollable area size 400 300) 39 (contents size 400 1760) 40 (scrollable area parameters 41 (horizontal scroll elasticity 1) 42 (vertical scroll elasticity 1) 43 (horizontal scrollbar mode 0) 44 (vertical scrollbar mode 0)) 45 (children 1 46 (Sticky node 47 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 48 (top offset 10.00) 49 (bottom offset 10.00) 50 (containing block rect at (2,2) size 400x1760) 51 (sticky box rect at (0,830) size 100x100) 52 (constraining rect at (0,0) size 400x300) 53 (sticky offset at last layout width=0 height=-640) 54 (layer position at last layout (0,190)) 55 ) 56 ) 57 ) 44 58 (Sticky node 45 59 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 46 60 (top offset 10.00) 47 61 (bottom offset 10.00) 48 (containing block rect at ( 2,2) size 400x1760)49 (sticky box rect at ( 0,830) size 100x100)50 (constraining rect at (0,0) size 400x300)51 (sticky offset at last layout width=0 height=- 640)52 (layer position at last layout ( 0,190))62 (containing block rect at (8,8) size 484x404) 63 (sticky box rect at (8,312) size 100x100) 64 (constraining rect at (0,0) size 500x300) 65 (sticky offset at last layout width=0 height=-122) 66 (layer position at last layout (8,190)) 53 67 ) 54 68 ) 55 )56 (Sticky node57 (anchor edges: AnchorEdgeTop AnchorEdgeBottom)58 (top offset 10.00)59 (bottom offset 10.00)60 (containing block rect at (8,8) size 484x404)61 (sticky box rect at (8,312) size 100x100)62 (constraining rect at (0,0) size 500x300)63 (sticky offset at last layout width=0 height=-122)64 (layer position at last layout (8,190))65 69 ) 66 70 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt
r240505 r240553 19 19 (layer position at last layout (8,0)) 20 20 (children 1 21 (Frame scrolling node 22 (scrollable area size 500 300) 23 (contents size 500 420) 24 (scrollable area parameters 25 (horizontal scroll elasticity 1) 26 (vertical scroll elasticity 1) 27 (horizontal scrollbar mode 0) 28 (vertical scrollbar mode 0)) 29 (visual viewport enabled 1) 30 (layout viewport at (0,0) size 500x300) 31 (min layout viewport origin (0,0)) 32 (max layout viewport origin (0,120)) 33 (behavior for fixed 0) 34 (children 2 35 (Overflow scrolling node 36 (scrollable area size 400 300) 37 (contents size 400 1760) 21 (Frame hosting node 22 (children 1 23 (Frame scrolling node 24 (scrollable area size 500 300) 25 (contents size 500 420) 38 26 (scrollable area parameters 39 27 (horizontal scroll elasticity 1) … … 41 29 (horizontal scrollbar mode 0) 42 30 (vertical scrollbar mode 0)) 43 (children 1 31 (visual viewport enabled 1) 32 (layout viewport at (0,0) size 500x300) 33 (min layout viewport origin (0,0)) 34 (max layout viewport origin (0,120)) 35 (behavior for fixed 0) 36 (children 2 37 (Overflow scrolling node 38 (scrollable area size 400 300) 39 (contents size 400 1760) 40 (scrollable area parameters 41 (horizontal scroll elasticity 1) 42 (vertical scroll elasticity 1) 43 (horizontal scrollbar mode 0) 44 (vertical scrollbar mode 0)) 45 (children 1 46 (Sticky node 47 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 48 (top offset 10.00) 49 (bottom offset 10.00) 50 (containing block rect at (2,2) size 400x1760) 51 (sticky box rect at (0,830) size 100x100) 52 (constraining rect at (0,0) size 400x300) 53 (sticky offset at last layout width=0 height=-640) 54 (layer position at last layout (0,190)) 55 ) 56 ) 57 ) 44 58 (Sticky node 45 59 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 46 60 (top offset 10.00) 47 61 (bottom offset 10.00) 48 (containing block rect at ( 2,2) size 400x1760)49 (sticky box rect at ( 0,830) size 100x100)50 (constraining rect at (0,0) size 400x300)51 (sticky offset at last layout width=0 height=- 640)52 (layer position at last layout ( 0,190))62 (containing block rect at (8,8) size 484x404) 63 (sticky box rect at (8,312) size 100x100) 64 (constraining rect at (0,0) size 500x300) 65 (sticky offset at last layout width=0 height=-122) 66 (layer position at last layout (8,190)) 53 67 ) 54 68 ) 55 )56 (Sticky node57 (anchor edges: AnchorEdgeTop AnchorEdgeBottom)58 (top offset 10.00)59 (bottom offset 10.00)60 (containing block rect at (8,8) size 484x404)61 (sticky box rect at (8,312) size 100x100)62 (constraining rect at (0,0) size 500x300)63 (sticky offset at last layout width=0 height=-122)64 (layer position at last layout (8,190))65 69 ) 66 70 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt
r240505 r240553 14 14 (behavior for fixed 0) 15 15 (children 1 16 (Frame scrolling node 17 (scrollable area size 500 300) 18 (contents size 500 420) 19 (scrollable area parameters 20 (horizontal scroll elasticity 1) 21 (vertical scroll elasticity 1) 22 (horizontal scrollbar mode 1) 23 (vertical scrollbar mode 1)) 24 (visual viewport enabled 1) 25 (layout viewport at (0,0) size 500x300) 26 (min layout viewport origin (0,0)) 27 (max layout viewport origin (0,120)) 28 (behavior for fixed 0) 29 (children 2 30 (Overflow scrolling node 31 (scrollable area size 400 300) 32 (contents size 400 1760) 16 (Frame hosting node 17 (children 1 18 (Frame scrolling node 19 (scrollable area size 500 300) 20 (contents size 500 420) 33 21 (scrollable area parameters 34 22 (horizontal scroll elasticity 1) 35 23 (vertical scroll elasticity 1) 36 (horizontal scrollbar mode 0) 37 (vertical scrollbar mode 0)) 38 (children 1 24 (horizontal scrollbar mode 1) 25 (vertical scrollbar mode 1)) 26 (visual viewport enabled 1) 27 (layout viewport at (0,0) size 500x300) 28 (min layout viewport origin (0,0)) 29 (max layout viewport origin (0,120)) 30 (behavior for fixed 0) 31 (children 2 32 (Overflow scrolling node 33 (scrollable area size 400 300) 34 (contents size 400 1760) 35 (scrollable area parameters 36 (horizontal scroll elasticity 1) 37 (vertical scroll elasticity 1) 38 (horizontal scrollbar mode 0) 39 (vertical scrollbar mode 0)) 40 (children 1 41 (Sticky node 42 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 43 (top offset 10.00) 44 (bottom offset 10.00) 45 (containing block rect at (2,2) size 400x1760) 46 (sticky box rect at (0,830) size 100x100) 47 (constraining rect at (0,0) size 400x300) 48 (sticky offset at last layout width=0 height=-640) 49 (layer position at last layout (0,190)) 50 ) 51 ) 52 ) 39 53 (Sticky node 40 54 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 41 55 (top offset 10.00) 42 56 (bottom offset 10.00) 43 (containing block rect at ( 2,2) size 400x1760)44 (sticky box rect at ( 0,830) size 100x100)45 (constraining rect at (0,0) size 400x300)46 (sticky offset at last layout width=0 height=- 640)47 (layer position at last layout ( 0,190))57 (containing block rect at (8,8) size 484x404) 58 (sticky box rect at (8,312) size 100x100) 59 (constraining rect at (0,0) size 500x300) 60 (sticky offset at last layout width=0 height=-122) 61 (layer position at last layout (8,190)) 48 62 ) 49 63 ) 50 )51 (Sticky node52 (anchor edges: AnchorEdgeTop AnchorEdgeBottom)53 (top offset 10.00)54 (bottom offset 10.00)55 (containing block rect at (8,8) size 484x404)56 (sticky box rect at (8,312) size 100x100)57 (constraining rect at (0,0) size 500x300)58 (sticky offset at last layout width=0 height=-122)59 (layer position at last layout (8,190))60 64 ) 61 65 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
r240548 r240553 15 15 (behavior for fixed 0) 16 16 (children 1 17 (Frame scrolling node 18 (scrollable area size 480 400) 19 (contents size 480 1016) 20 (requested scroll position 0 120) 21 (requested scroll position represents programmatic scroll 1) 22 (scrollable area parameters 23 (horizontal scroll elasticity 1) 24 (vertical scroll elasticity 1) 25 (horizontal scrollbar mode 0) 26 (vertical scrollbar mode 0)) 27 (visual viewport enabled 1) 28 (layout viewport at (0,120) size 480x400) 29 (min layout viewport origin (0,0)) 30 (max layout viewport origin (0,616)) 31 (behavior for fixed 0) 17 (Frame hosting node 32 18 (children 1 33 (Fixed node 34 (anchor edges: AnchorEdgeLeft AnchorEdgeTop) 35 (viewport rect at last layout at (0,120) size 480x400) 36 (layer position at last layout (10,130)) 19 (Frame scrolling node 20 (scrollable area size 480 400) 21 (contents size 480 1016) 22 (requested scroll position 0 120) 23 (requested scroll position represents programmatic scroll 1) 24 (scrollable area parameters 25 (horizontal scroll elasticity 1) 26 (vertical scroll elasticity 1) 27 (horizontal scrollbar mode 0) 28 (vertical scrollbar mode 0)) 29 (visual viewport enabled 1) 30 (layout viewport at (0,120) size 480x400) 31 (min layout viewport origin (0,0)) 32 (max layout viewport origin (0,616)) 33 (behavior for fixed 0) 34 (children 1 35 (Fixed node 36 (anchor edges: AnchorEdgeLeft AnchorEdgeTop) 37 (viewport rect at last layout at (0,120) size 480x400) 38 (layer position at last layout (10,130)) 39 ) 40 ) 37 41 ) 38 42 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt
r240505 r240553 15 15 (behavior for fixed 0) 16 16 (children 1 17 (Frame scrolling node 18 (scrollable area size 100 200) 19 (contents size 308 416) 20 (scrollable area parameters 21 (horizontal scroll elasticity 1) 22 (vertical scroll elasticity 1) 23 (horizontal scrollbar mode 0) 24 (vertical scrollbar mode 0)) 25 (visual viewport enabled 1) 26 (layout viewport at (0,0) size 100x200) 27 (min layout viewport origin (0,0)) 28 (max layout viewport origin (208,216)) 29 (behavior for fixed 0) 17 (Frame hosting node 18 (children 1 19 (Frame scrolling node 20 (scrollable area size 100 200) 21 (contents size 308 416) 22 (scrollable area parameters 23 (horizontal scroll elasticity 1) 24 (vertical scroll elasticity 1) 25 (horizontal scrollbar mode 0) 26 (vertical scrollbar mode 0)) 27 (visual viewport enabled 1) 28 (layout viewport at (0,0) size 100x200) 29 (min layout viewport origin (0,0)) 30 (max layout viewport origin (208,216)) 31 (behavior for fixed 0) 32 ) 33 ) 30 34 ) 31 35 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt
r240535 r240553 17 17 (behavior for fixed 0) 18 18 (children 1 19 (Frame scrolling node 20 (scrollable area size 600 500) 21 (contents size 600 1024) 22 (scrollable area parameters 23 (horizontal scroll elasticity 1) 24 (vertical scroll elasticity 1) 25 (horizontal scrollbar mode 0) 26 (vertical scrollbar mode 0)) 27 (visual viewport enabled 1) 28 (layout viewport at (0,0) size 600x500) 29 (min layout viewport origin (0,0)) 30 (max layout viewport origin (0,524)) 31 (behavior for fixed 0) 19 (Frame hosting node 32 20 (children 1 33 21 (Frame scrolling node 34 (scrollable area size 500 400)35 (contents size 500 1024)22 (scrollable area size 600 500) 23 (contents size 600 1024) 36 24 (scrollable area parameters 37 25 (horizontal scroll elasticity 1) … … 40 28 (vertical scrollbar mode 0)) 41 29 (visual viewport enabled 1) 42 (layout viewport at (0,0) size 500x400)30 (layout viewport at (0,0) size 600x500) 43 31 (min layout viewport origin (0,0)) 44 (max layout viewport origin (0, 624))32 (max layout viewport origin (0,524)) 45 33 (behavior for fixed 0) 34 (children 1 35 (Frame hosting node 36 (children 1 37 (Frame scrolling node 38 (scrollable area size 500 400) 39 (contents size 500 1024) 40 (scrollable area parameters 41 (horizontal scroll elasticity 1) 42 (vertical scroll elasticity 1) 43 (horizontal scrollbar mode 0) 44 (vertical scrollbar mode 0)) 45 (visual viewport enabled 1) 46 (layout viewport at (0,0) size 500x400) 47 (min layout viewport origin (0,0)) 48 (max layout viewport origin (0,624)) 49 (behavior for fixed 0) 50 ) 51 ) 52 ) 53 ) 46 54 ) 47 55 ) … … 55 63 (Frame scrolling node 56 64 (scrollable area size 800 600) 57 (contents size 800 1 333)65 (contents size 800 1445) 58 66 (scrollable area parameters 59 67 (horizontal scroll elasticity 1) … … 64 72 (layout viewport at (0,0) size 800x600) 65 73 (min layout viewport origin (0,0)) 66 (max layout viewport origin (0, 733))74 (max layout viewport origin (0,845)) 67 75 (behavior for fixed 0) 68 76 (children 1 69 (Frame scrolling node 70 (scrollable area size 600 500) 71 (contents size 600 500) 72 (scrollable area parameters 73 (horizontal scroll elasticity 1) 74 (vertical scroll elasticity 1) 75 (horizontal scrollbar mode 0) 76 (vertical scrollbar mode 0)) 77 (visual viewport enabled 1) 78 (layout viewport at (0,0) size 600x500) 79 (min layout viewport origin (0,0)) 80 (max layout viewport origin (0,0)) 81 (behavior for fixed 0) 77 (Frame hosting node 82 78 (children 1 83 79 (Frame scrolling node 84 (scrollable area size 500 400)85 (contents size 500 1024)80 (scrollable area size 600 500) 81 (contents size 600 500) 86 82 (scrollable area parameters 87 83 (horizontal scroll elasticity 1) … … 90 86 (vertical scrollbar mode 0)) 91 87 (visual viewport enabled 1) 92 (layout viewport at (0,0) size 500x400)88 (layout viewport at (0,0) size 600x500) 93 89 (min layout viewport origin (0,0)) 94 (max layout viewport origin (0, 624))90 (max layout viewport origin (0,0)) 95 91 (behavior for fixed 0) 92 (children 1 93 (Frame hosting node 94 (children 1 95 (Frame scrolling node 96 (scrollable area size 500 400) 97 (contents size 500 1024) 98 (scrollable area parameters 99 (horizontal scroll elasticity 1) 100 (vertical scroll elasticity 1) 101 (horizontal scrollbar mode 0) 102 (vertical scrollbar mode 0)) 103 (visual viewport enabled 1) 104 (layout viewport at (0,0) size 500x400) 105 (min layout viewport origin (0,0)) 106 (max layout viewport origin (0,624)) 107 (behavior for fixed 0) 108 ) 109 ) 110 ) 111 ) 96 112 ) 97 113 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt
r240505 r240553 17 17 (behavior for fixed 0) 18 18 (children 1 19 (Frame scrolling node 20 (scrollable area size 485 300) 21 (contents size 485 420) 22 (scrollable area parameters 23 (horizontal scroll elasticity 0) 24 (vertical scroll elasticity 0) 25 (horizontal scrollbar mode 0) 26 (vertical scrollbar mode 0) 27 (has enabled vertical scrollbar 1)) 28 (visual viewport enabled 1) 29 (layout viewport at (0,0) size 485x300) 30 (min layout viewport origin (0,0)) 31 (max layout viewport origin (0,120)) 32 (behavior for fixed 0) 19 (Frame hosting node 33 20 (children 1 34 (Sticky node 35 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 36 (top offset 10.00) 37 (bottom offset 10.00) 38 (containing block rect at (8,8) size 469x404) 39 (sticky box rect at (8,312) size 100x100) 40 (constraining rect at (0,0) size 485x300) 41 (sticky offset at last layout width=0 height=-122) 42 (layer position at last layout (8,190)) 21 (Frame scrolling node 22 (scrollable area size 485 300) 23 (contents size 485 420) 24 (scrollable area parameters 25 (horizontal scroll elasticity 0) 26 (vertical scroll elasticity 0) 27 (horizontal scrollbar mode 0) 28 (vertical scrollbar mode 0) 29 (has enabled vertical scrollbar 1)) 30 (visual viewport enabled 1) 31 (layout viewport at (0,0) size 485x300) 32 (min layout viewport origin (0,0)) 33 (max layout viewport origin (0,120)) 34 (behavior for fixed 0) 35 (children 1 36 (Sticky node 37 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 38 (top offset 10.00) 39 (bottom offset 10.00) 40 (containing block rect at (8,8) size 469x404) 41 (sticky box rect at (8,312) size 100x100) 42 (constraining rect at (0,0) size 485x300) 43 (sticky offset at last layout width=0 height=-122) 44 (layer position at last layout (8,190)) 45 ) 46 ) 43 47 ) 44 48 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt
r240505 r240553 22 22 (layer position at last layout (8,10)) 23 23 (children 1 24 (Frame scrolling node 25 (scrollable area size 500 300) 26 (contents size 500 420) 27 (scrollable area parameters 28 (horizontal scroll elasticity 0) 29 (vertical scroll elasticity 0) 30 (horizontal scrollbar mode 1) 31 (vertical scrollbar mode 1)) 32 (visual viewport enabled 1) 33 (layout viewport at (0,0) size 500x300) 34 (min layout viewport origin (0,0)) 35 (max layout viewport origin (0,120)) 36 (behavior for fixed 0) 24 (Frame hosting node 37 25 (children 1 38 (Sticky node 39 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 40 (top offset 10.00) 41 (bottom offset 10.00) 42 (containing block rect at (8,8) size 484x404) 43 (sticky box rect at (8,312) size 100x100) 44 (constraining rect at (0,0) size 500x300) 45 (sticky offset at last layout width=0 height=-122) 46 (layer position at last layout (8,190)) 26 (Frame scrolling node 27 (scrollable area size 500 300) 28 (contents size 500 420) 29 (scrollable area parameters 30 (horizontal scroll elasticity 0) 31 (vertical scroll elasticity 0) 32 (horizontal scrollbar mode 1) 33 (vertical scrollbar mode 1)) 34 (visual viewport enabled 1) 35 (layout viewport at (0,0) size 500x300) 36 (min layout viewport origin (0,0)) 37 (max layout viewport origin (0,120)) 38 (behavior for fixed 0) 39 (children 1 40 (Sticky node 41 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 42 (top offset 10.00) 43 (bottom offset 10.00) 44 (containing block rect at (8,8) size 484x404) 45 (sticky box rect at (8,312) size 100x100) 46 (constraining rect at (0,0) size 500x300) 47 (sticky offset at last layout width=0 height=-122) 48 (layer position at last layout (8,190)) 49 ) 50 ) 47 51 ) 48 52 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt
r240505 r240553 22 22 (layer position at last layout (8,0)) 23 23 (children 1 24 (Frame scrolling node 25 (scrollable area size 485 300) 26 (contents size 485 420) 27 (scrollable area parameters 28 (horizontal scroll elasticity 0) 29 (vertical scroll elasticity 0) 30 (horizontal scrollbar mode 0) 31 (vertical scrollbar mode 0) 32 (has enabled vertical scrollbar 1)) 33 (visual viewport enabled 1) 34 (layout viewport at (0,0) size 485x300) 35 (min layout viewport origin (0,0)) 36 (max layout viewport origin (0,120)) 37 (behavior for fixed 0) 24 (Frame hosting node 38 25 (children 1 39 (Sticky node 40 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 41 (top offset 10.00) 42 (bottom offset 10.00) 43 (containing block rect at (8,8) size 469x404) 44 (sticky box rect at (8,312) size 100x100) 45 (constraining rect at (0,0) size 485x300) 46 (sticky offset at last layout width=0 height=-122) 47 (layer position at last layout (8,190)) 26 (Frame scrolling node 27 (scrollable area size 485 300) 28 (contents size 485 420) 29 (scrollable area parameters 30 (horizontal scroll elasticity 0) 31 (vertical scroll elasticity 0) 32 (horizontal scrollbar mode 0) 33 (vertical scrollbar mode 0) 34 (has enabled vertical scrollbar 1)) 35 (visual viewport enabled 1) 36 (layout viewport at (0,0) size 485x300) 37 (min layout viewport origin (0,0)) 38 (max layout viewport origin (0,120)) 39 (behavior for fixed 0) 40 (children 1 41 (Sticky node 42 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 43 (top offset 10.00) 44 (bottom offset 10.00) 45 (containing block rect at (8,8) size 469x404) 46 (sticky box rect at (8,312) size 100x100) 47 (constraining rect at (0,0) size 485x300) 48 (sticky offset at last layout width=0 height=-122) 49 (layer position at last layout (8,190)) 50 ) 51 ) 48 52 ) 49 53 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt
r240505 r240553 17 17 (behavior for fixed 0) 18 18 (children 1 19 (Frame scrolling node 20 (scrollable area size 500 300) 21 (contents size 500 420) 22 (scrollable area parameters 23 (horizontal scroll elasticity 0) 24 (vertical scroll elasticity 0) 25 (horizontal scrollbar mode 1) 26 (vertical scrollbar mode 1)) 27 (visual viewport enabled 1) 28 (layout viewport at (0,0) size 500x300) 29 (min layout viewport origin (0,0)) 30 (max layout viewport origin (0,120)) 31 (behavior for fixed 0) 19 (Frame hosting node 32 20 (children 1 33 (Sticky node 34 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 35 (top offset 10.00) 36 (bottom offset 10.00) 37 (containing block rect at (8,8) size 484x404) 38 (sticky box rect at (8,312) size 100x100) 39 (constraining rect at (0,0) size 500x300) 40 (sticky offset at last layout width=0 height=-122) 41 (layer position at last layout (8,190)) 21 (Frame scrolling node 22 (scrollable area size 500 300) 23 (contents size 500 420) 24 (scrollable area parameters 25 (horizontal scroll elasticity 0) 26 (vertical scroll elasticity 0) 27 (horizontal scrollbar mode 1) 28 (vertical scrollbar mode 1)) 29 (visual viewport enabled 1) 30 (layout viewport at (0,0) size 500x300) 31 (min layout viewport origin (0,0)) 32 (max layout viewport origin (0,120)) 33 (behavior for fixed 0) 34 (children 1 35 (Sticky node 36 (anchor edges: AnchorEdgeTop AnchorEdgeBottom) 37 (top offset 10.00) 38 (bottom offset 10.00) 39 (containing block rect at (8,8) size 484x404) 40 (sticky box rect at (8,312) size 100x100) 41 (constraining rect at (0,0) size 500x300) 42 (sticky offset at last layout width=0 height=-122) 43 (layer position at last layout (8,190)) 44 ) 45 ) 42 46 ) 43 47 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
r240548 r240553 16 16 (behavior for fixed 0) 17 17 (children 1 18 (Frame scrolling node 19 (scrollable area size 465 400) 20 (contents size 465 1016) 21 (requested scroll position 0 120) 22 (requested scroll position represents programmatic scroll 1) 23 (scrollable area parameters 24 (horizontal scroll elasticity 0) 25 (vertical scroll elasticity 0) 26 (horizontal scrollbar mode 0) 27 (vertical scrollbar mode 0) 28 (has enabled vertical scrollbar 1)) 29 (visual viewport enabled 1) 30 (layout viewport at (0,120) size 465x400) 31 (min layout viewport origin (0,0)) 32 (max layout viewport origin (0,616)) 33 (behavior for fixed 0) 18 (Frame hosting node 34 19 (children 1 35 (Fixed node 36 (anchor edges: AnchorEdgeLeft AnchorEdgeTop) 37 (viewport rect at last layout at (0,120) size 465x400) 38 (layer position at last layout (10,130)) 20 (Frame scrolling node 21 (scrollable area size 465 400) 22 (contents size 465 1016) 23 (requested scroll position 0 120) 24 (requested scroll position represents programmatic scroll 1) 25 (scrollable area parameters 26 (horizontal scroll elasticity 0) 27 (vertical scroll elasticity 0) 28 (horizontal scrollbar mode 0) 29 (vertical scrollbar mode 0) 30 (has enabled vertical scrollbar 1)) 31 (visual viewport enabled 1) 32 (layout viewport at (0,120) size 465x400) 33 (min layout viewport origin (0,0)) 34 (max layout viewport origin (0,616)) 35 (behavior for fixed 0) 36 (children 1 37 (Fixed node 38 (anchor edges: AnchorEdgeLeft AnchorEdgeTop) 39 (viewport rect at last layout at (0,120) size 465x400) 40 (layer position at last layout (10,130)) 41 ) 42 ) 39 43 ) 40 44 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt
r240505 r240553 15 15 (behavior for fixed 0) 16 16 (children 1 17 (Frame scrolling node 18 (scrollable area size 85 185) 19 (contents size 308 416) 20 (scrollable area parameters 21 (horizontal scroll elasticity 0) 22 (vertical scroll elasticity 0) 23 (horizontal scrollbar mode 0) 24 (vertical scrollbar mode 0) 25 (has enabled horizontal scrollbar 1) 26 (has enabled vertical scrollbar 1)) 27 (visual viewport enabled 1) 28 (layout viewport at (0,0) size 85x185) 29 (min layout viewport origin (0,0)) 30 (max layout viewport origin (223,231)) 31 (behavior for fixed 0) 17 (Frame hosting node 18 (children 1 19 (Frame scrolling node 20 (scrollable area size 85 185) 21 (contents size 308 416) 22 (scrollable area parameters 23 (horizontal scroll elasticity 0) 24 (vertical scroll elasticity 0) 25 (horizontal scrollbar mode 0) 26 (vertical scrollbar mode 0) 27 (has enabled horizontal scrollbar 1) 28 (has enabled vertical scrollbar 1)) 29 (visual viewport enabled 1) 30 (layout viewport at (0,0) size 85x185) 31 (min layout viewport origin (0,0)) 32 (max layout viewport origin (223,231)) 33 (behavior for fixed 0) 34 ) 35 ) 32 36 ) 33 37 ) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt
r240535 r240553 18 18 (behavior for fixed 0) 19 19 (children 1 20 (Frame scrolling node 21 (scrollable area size 585 500) 22 (contents size 585 1024) 23 (scrollable area parameters 24 (horizontal scroll elasticity 0) 25 (vertical scroll elasticity 0) 26 (horizontal scrollbar mode 0) 27 (vertical scrollbar mode 0) 28 (has enabled vertical scrollbar 1)) 29 (visual viewport enabled 1) 30 (layout viewport at (0,0) size 585x500) 31 (min layout viewport origin (0,0)) 32 (max layout viewport origin (0,524)) 33 (behavior for fixed 0) 20 (Frame hosting node 34 21 (children 1 35 22 (Frame scrolling node 36 (scrollable area size 485 400)37 (contents size 485 1024)23 (scrollable area size 585 500) 24 (contents size 585 1024) 38 25 (scrollable area parameters 39 26 (horizontal scroll elasticity 0) … … 43 30 (has enabled vertical scrollbar 1)) 44 31 (visual viewport enabled 1) 45 (layout viewport at (0,0) size 485x400)32 (layout viewport at (0,0) size 585x500) 46 33 (min layout viewport origin (0,0)) 47 (max layout viewport origin (0, 624))34 (max layout viewport origin (0,524)) 48 35 (behavior for fixed 0) 36 (children 1 37 (Frame hosting node 38 (children 1 39 (Frame scrolling node 40 (scrollable area size 485 400) 41 (contents size 485 1024) 42 (scrollable area parameters 43 (horizontal scroll elasticity 0) 44 (vertical scroll elasticity 0) 45 (horizontal scrollbar mode 0) 46 (vertical scrollbar mode 0) 47 (has enabled vertical scrollbar 1)) 48 (visual viewport enabled 1) 49 (layout viewport at (0,0) size 485x400) 50 (min layout viewport origin (0,0)) 51 (max layout viewport origin (0,624)) 52 (behavior for fixed 0) 53 ) 54 ) 55 ) 56 ) 49 57 ) 50 58 ) … … 58 66 (Frame scrolling node 59 67 (scrollable area size 785 600) 60 (contents size 785 1 421)68 (contents size 785 1541) 61 69 (scrollable area parameters 62 70 (horizontal scroll elasticity 2) … … 68 76 (layout viewport at (0,0) size 785x600) 69 77 (min layout viewport origin (0,0)) 70 (max layout viewport origin (0, 821))78 (max layout viewport origin (0,941)) 71 79 (behavior for fixed 0) 72 80 (children 1 73 (Frame scrolling node 74 (scrollable area size 600 500) 75 (contents size 600 500) 76 (scrollable area parameters 77 (horizontal scroll elasticity 0) 78 (vertical scroll elasticity 0) 79 (horizontal scrollbar mode 0) 80 (vertical scrollbar mode 0)) 81 (visual viewport enabled 1) 82 (layout viewport at (0,0) size 600x500) 83 (min layout viewport origin (0,0)) 84 (max layout viewport origin (0,0)) 85 (behavior for fixed 0) 81 (Frame hosting node 86 82 (children 1 87 83 (Frame scrolling node 88 (scrollable area size 485 400)89 (contents size 485 1024)84 (scrollable area size 600 500) 85 (contents size 600 500) 90 86 (scrollable area parameters 91 87 (horizontal scroll elasticity 0) 92 88 (vertical scroll elasticity 0) 93 89 (horizontal scrollbar mode 0) 94 (vertical scrollbar mode 0) 95 (has enabled vertical scrollbar 1)) 90 (vertical scrollbar mode 0)) 96 91 (visual viewport enabled 1) 97 (layout viewport at (0,0) size 485x400)92 (layout viewport at (0,0) size 600x500) 98 93 (min layout viewport origin (0,0)) 99 (max layout viewport origin (0, 624))94 (max layout viewport origin (0,0)) 100 95 (behavior for fixed 0) 96 (children 1 97 (Frame hosting node 98 (children 1 99 (Frame scrolling node 100 (scrollable area size 485 400) 101 (contents size 485 1024) 102 (scrollable area parameters 103 (horizontal scroll elasticity 0) 104 (vertical scroll elasticity 0) 105 (horizontal scrollbar mode 0) 106 (vertical scrollbar mode 0) 107 (has enabled vertical scrollbar 1)) 108 (visual viewport enabled 1) 109 (layout viewport at (0,0) size 485x400) 110 (min layout viewport origin (0,0)) 111 (max layout viewport origin (0,624)) 112 (behavior for fixed 0) 113 ) 114 ) 115 ) 116 ) 101 117 ) 102 118 ) -
trunk/Source/WebCore/ChangeLog
r240552 r240553 1 2019-01-26 Simon Fraser <simon.fraser@apple.com> 2 3 Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node 4 https://bugs.webkit.org/show_bug.cgi?id=193879 5 6 Reviewed by Antti Koivisto. 7 8 Currently we parent iframe scrolling tree nodes by finding the closest ancestor layer with a scrolling tree node. 9 This results in scrolling tree nodes being connected across iframe boundaries in some arbitrary ancestor. This 10 makes updating scrolling tree geometry very error-prone, since changes in the parent document will need to trigger 11 updates of the scrolling tree node in an iframe. 12 13 To address this, I already added a new "FrameHosting" scrolling node type. This patch actually instantiates these 14 nodes, which are owned by the RenderIFrame's composited layer. Connecting across frame boundaries is theforefore 15 simply a case of getting the FrameHosting node from the ownerElement's renderer; this is very similar to how we 16 connect GraphicsLayers together. 17 18 RenderLayerBacking gains another scrolling role for FrameHosting and ScrollingNodeID. 19 20 Tested by existing tests. 21 22 * page/FrameView.h: 23 * rendering/RenderLayer.cpp: 24 (WebCore::outputPaintOrderTreeRecursive): 25 * rendering/RenderLayerBacking.cpp: 26 (WebCore::RenderLayerBacking::updateConfiguration): 27 (WebCore::RenderLayerBacking::detachFromScrollingCoordinator): 28 * rendering/RenderLayerCompositor.cpp: 29 (WebCore::frameContentsRenderView): 30 (WebCore::RenderLayerCompositor::frameContentsCompositor): 31 (WebCore::RenderLayerCompositor::parentFrameContentLayers): 32 (WebCore::RenderLayerCompositor::isLayerForIFrameWithScrollCoordinatedContents const): 33 (WebCore::RenderLayerCompositor::detachRootLayer): 34 (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus): 35 (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): 36 (WebCore::scrollCoordinatedAncestorInParentOfFrame): 37 (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers): 38 (WebCore::RenderLayerCompositor::attachScrollingNode): 39 (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame): 40 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): 41 * rendering/RenderLayerCompositor.h: 42 * testing/Internals.cpp: 43 (WebCore::Internals::scrollingStateTreeAsText const): 44 1 45 2019-01-27 Chris Fleizach <cfleizach@apple.com> 2 46 -
trunk/Source/WebCore/page/FrameView.h
r240519 r240553 153 153 WEBCORE_EXPORT TiledBacking* tiledBacking() const final; 154 154 155 // In the future when any ScrollableArea can have a node in th ScrollingTree, this should156 // become a virtual function on ScrollableArea.157 155 uint64_t scrollLayerID() const override; 158 156 ScrollableArea* scrollableAreaForScrollLayerID(uint64_t) const; 157 bool usesAsyncScrolling() const final; 159 158 160 159 WEBCORE_EXPORT void enterCompositingMode(); … … 747 746 748 747 bool usesCompositedScrolling() const final; 749 bool usesAsyncScrolling() const final;750 748 bool usesMockScrollAnimator() const final; 751 749 void logMockScrollAnimatorMessage(const String&) const final; -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp
r240551 r240553 118 118 119 119 m_parent->removeChild(*this); 120 m_parent = nullptr; 120 121 } 121 122 -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
r240551 r240553 214 214 return; 215 215 216 LOG_WITH_STREAM(Scrolling, stream << "ScrollingStateTree " << this << " unparentChildrenAndDestroyNode " << nodeID); 217 216 218 // The node may not be found if clear() was recently called. 217 219 RefPtr<ScrollingStateNode> protectedNode = m_stateNodeMap.take(nodeID); … … 222 224 for (auto child : *children) { 223 225 child->removeFromParent(); 226 LOG_WITH_STREAM(Scrolling, stream << " moving " << child->scrollingNodeID() << " to unparented nodes"); 224 227 m_unparentedNodes.add(child->scrollingNodeID(), WTFMove(child)); 225 228 } … … 235 238 if (!nodeID) 236 239 return; 240 241 LOG_WITH_STREAM(Scrolling, stream << "ScrollingStateTree " << this << " detachAndDestroySubtree " << nodeID); 237 242 238 243 // The node may not be found if clear() was recently called. -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r240336 r240553 6691 6691 6692 6692 stream << &layer << " " << layerRect; 6693 if (layer.isComposited()) 6694 stream << " (layerID " << layer.backing()->graphicsLayer()->primaryLayerID() << ")"; 6693 if (layer.isComposited()) { 6694 auto& backing = *layer.backing(); 6695 stream << " (layerID " << backing.graphicsLayer()->primaryLayerID() << ")"; 6696 6697 auto scrollingNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::Scrolling); 6698 auto frameHostingNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::FrameHosting); 6699 auto viewportConstrainedNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::ViewportConstrained); 6700 6701 if (scrollingNodeID || frameHostingNodeID || viewportConstrainedNodeID) { 6702 stream << " {"; 6703 bool first = true; 6704 if (scrollingNodeID) { 6705 stream << "sc " << scrollingNodeID; 6706 first = false; 6707 } 6708 6709 if (frameHostingNodeID) { 6710 if (!first) 6711 stream << ", "; 6712 stream << "fh " << frameHostingNodeID; 6713 first = false; 6714 } 6715 6716 if (viewportConstrainedNodeID) { 6717 if (!first) 6718 stream << ", "; 6719 stream << "vc " << viewportConstrainedNodeID; 6720 } 6721 6722 stream << "}"; 6723 } 6724 } 6695 6725 stream << " " << layer.name(); 6696 6726 stream.nextLine(); -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r240551 r240553 784 784 } 785 785 #endif 786 if (is<RenderWidget>(renderer()) && RenderLayerCompositor::parentFrameContentLayers(downcast<RenderWidget>(renderer()))) {786 if (is<RenderWidget>(renderer()) && compositor().parentFrameContentLayers(downcast<RenderWidget>(renderer()))) { 787 787 m_owningLayer.setNeedsCompositingGeometryUpdate(); 788 788 layerConfigChanged = true; … … 1770 1770 void RenderLayerBacking::detachFromScrollingCoordinator(OptionSet<ScrollCoordinationRole> roles) 1771 1771 { 1772 if (!m_scrollingNodeID && !m_ viewportConstrainedNodeID)1772 if (!m_scrollingNodeID && !m_frameHostingNodeID && !m_viewportConstrainedNodeID) 1773 1773 return; 1774 1774 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r240551 r240553 1929 1929 } 1930 1930 1931 static RenderView* frameContentsRenderView(RenderWidget& renderer) 1932 { 1933 if (auto* contentDocument = renderer.frameOwnerElement().contentDocument()) 1934 return contentDocument->renderView(); 1935 1936 return nullptr; 1937 } 1938 1931 1939 RenderLayerCompositor* RenderLayerCompositor::frameContentsCompositor(RenderWidget& renderer) 1932 1940 { 1933 if (auto* contentDocument = renderer.frameOwnerElement().contentDocument()) { 1934 if (auto* view = contentDocument->renderView()) 1935 return &view->compositor(); 1936 } 1941 if (auto* view = frameContentsRenderView(renderer)) 1942 return &view->compositor(); 1943 1937 1944 return nullptr; 1938 1945 } … … 1955 1962 hostingLayer->addChild(*rootLayer); 1956 1963 } 1964 1965 if (auto frameHostingNodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::FrameHosting)) { 1966 auto* contentsRenderView = frameContentsRenderView(renderer); 1967 if (auto frameRootScrollingNodeID = contentsRenderView->frameView().scrollLayerID()) { 1968 if (auto* scrollingCoordinator = this->scrollingCoordinator()) 1969 scrollingCoordinator->insertNode(ScrollingNodeType::Subframe, frameRootScrollingNodeID, frameHostingNodeID, 0); 1970 } 1971 } 1972 1957 1973 // FIXME: Why always return true and not just when the layers changed? 1958 1974 return true; … … 2844 2860 } 2845 2861 2862 bool RenderLayerCompositor::isLayerForIFrameWithScrollCoordinatedContents(const RenderLayer& layer) const 2863 { 2864 if (!is<RenderWidget>(layer.renderer())) 2865 return false; 2866 2867 auto* contentDocument = downcast<RenderWidget>(layer.renderer()).frameOwnerElement().contentDocument(); 2868 if (!contentDocument) 2869 return false; 2870 2871 auto* view = contentDocument->renderView(); 2872 if (!view) 2873 return false; 2874 2875 if (auto* scrollingCoordinator = this->scrollingCoordinator()) 2876 return scrollingCoordinator->coordinatesScrollingForFrameView(view->frameView()); 2877 2878 return false; 2879 } 2880 2846 2881 bool RenderLayerCompositor::isRunningTransformAnimation(RenderLayerModelObject& renderer) const 2847 2882 { … … 2860 2895 2861 2896 // If an element has negative z-index children, those children render in front of the 2862 // layer background, so we need an extra 'contents' layer for the foreground of the layer 2863 // object. 2897 // layer background, so we need an extra 'contents' layer for the foreground of the layer object. 2864 2898 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer& layer) const 2865 2899 { … … 3535 3569 switch (m_rootLayerAttachment) { 3536 3570 case RootLayerAttachedViaEnclosingFrame: { 3537 // The layer will get unhooked up via RenderLayerBacking::update GraphicsLayerConfiguration()3571 // The layer will get unhooked up via RenderLayerBacking::updateConfiguration() 3538 3572 // for the frame's renderer in the parent document. 3539 3573 if (m_overflowControlsHostLayer) … … 3544 3578 if (auto* ownerElement = m_renderView.document().ownerElement()) 3545 3579 ownerElement->scheduleInvalidateStyleAndLayerComposition(); 3580 3581 if (auto frameRootScrollingNodeID = m_renderView.frameView().scrollLayerID()) { 3582 if (auto* scrollingCoordinator = this->scrollingCoordinator()) 3583 scrollingCoordinator->unparentNode(frameRootScrollingNodeID); 3584 } 3546 3585 break; 3547 3586 } … … 3652 3691 coordinationRoles.add(ScrollCoordinationRole::Scrolling); 3653 3692 3693 if (isLayerForIFrameWithScrollCoordinatedContents(layer)) { 3694 // We never expect a RenderIFrame to have scrollable overflow. 3695 ASSERT(!coordinationRoles.contains(ScrollCoordinationRole::Scrolling)); 3696 coordinationRoles.add(ScrollCoordinationRole::FrameHosting); 3697 } 3698 3654 3699 if (layer.isComposited()) 3655 3700 layer.backing()->setIsScrollCoordinatedWithViewportConstrainedRole(coordinationRoles.contains(ScrollCoordinationRole::ViewportConstrained)); … … 3674 3719 m_scrollCoordinatedLayersNeedingUpdate.remove(&layer); 3675 3720 3676 detachScrollCoordinatedLayer(layer, { ScrollCoordinationRole::Scrolling, ScrollCoordinationRole::ViewportConstrained });3721 detachScrollCoordinatedLayer(layer, { ScrollCoordinationRole::Scrolling, ScrollCoordinationRole::ViewportConstrained, ScrollCoordinationRole::FrameHosting }); 3677 3722 } 3678 3723 … … 3748 3793 } 3749 3794 3750 static ScrollingNodeIDscrollCoordinatedAncestorInParentOfFrame(Frame& frame)3795 static Optional<ScrollingNodeID> scrollCoordinatedAncestorInParentOfFrame(Frame& frame) 3751 3796 { 3752 3797 if (!frame.document() || !frame.view()) 3753 return 0;3798 return { }; 3754 3799 3755 3800 // Find the frame's enclosing layer in our render tree. 3756 3801 auto* ownerElement = frame.document()->ownerElement(); 3757 3802 auto* frameRenderer = ownerElement ? ownerElement->renderer() : nullptr; 3758 if (!frameRenderer) 3759 return 0; 3760 3761 auto* layerInParentDocument = frameRenderer->enclosingLayer(); 3762 if (!layerInParentDocument) 3763 return 0; 3764 3765 return enclosingScrollingNodeID(*layerInParentDocument, IncludeSelf); 3803 if (!frameRenderer || !is<RenderWidget>(frameRenderer)) 3804 return { }; 3805 3806 auto& widgetRenderer = downcast<RenderWidget>(*frameRenderer); 3807 if (!widgetRenderer.hasLayer() || !widgetRenderer.layer()->isComposited()) { 3808 LOG(Scrolling, "scrollCoordinatedAncestorInParentOfFrame: frame renderer has no layer or is not composited."); 3809 return { }; 3810 } 3811 3812 if (auto frameHostingNodeID = widgetRenderer.layer()->backing()->scrollingNodeIDForRole(ScrollCoordinationRole::FrameHosting)) 3813 return frameHostingNodeID; 3814 3815 return { }; 3766 3816 } 3767 3817 … … 3785 3835 continue; 3786 3836 3787 ScrollingNodeID parentNodeID = scrollCoordinatedAncestorInParentOfFrame(*child); 3788 if (!parentNodeID) 3837 auto parentNodeID = scrollCoordinatedAncestorInParentOfFrame(*child); 3838 if (!parentNodeID) { 3839 LOG(Scrolling, "RenderLayerCompositor %p reattachSubframeScrollLayers: failed to find scrolling node parent for frame with nodeID %llu.", this, frameScrollingNodeID); 3789 3840 continue; 3790 3791 scrollingCoordinator->insertNode(child->isMainFrame() ? ScrollingNodeType::MainFrame : ScrollingNodeType::Subframe, frameScrollingNodeID, parentNodeID); 3841 } 3842 3843 scrollingCoordinator->insertNode(child->isMainFrame() ? ScrollingNodeType::MainFrame : ScrollingNodeType::Subframe, frameScrollingNodeID, parentNodeID.value()); 3792 3844 } 3793 3845 } … … 3810 3862 } 3811 3863 3812 ScrollingNodeID RenderLayerCompositor::attachScrollingNode(RenderLayer& layer, ScrollingNodeType nodeType, ScrollingNodeIDparentNodeID)3864 ScrollingNodeID RenderLayerCompositor::attachScrollingNode(RenderLayer& layer, ScrollingNodeType nodeType, Optional<ScrollingNodeID> parentNodeID) 3813 3865 { 3814 3866 auto* scrollingCoordinator = this->scrollingCoordinator(); … … 3824 3876 nodeID = scrollingCoordinator->uniqueScrollingNodeID(); 3825 3877 3826 nodeID = scrollingCoordinator->insertNode(nodeType, nodeID, parentNodeID); 3878 LOG_WITH_STREAM(Scrolling, stream << "RenderLayerCompositor " << this << " attachScrollingNode " << nodeID << " type " << nodeType << " parent " << parentNodeID.valueOr(0)); 3879 3880 if (nodeType == ScrollingNodeType::Subframe && !parentNodeID) 3881 nodeID = scrollingCoordinator->createNode(nodeType, nodeID); 3882 else 3883 nodeID = scrollingCoordinator->insertNode(nodeType, nodeID, parentNodeID.valueOr(0)); 3884 3827 3885 if (!nodeID) 3828 3886 return 0; … … 3830 3888 backing->setScrollingNodeIDForRole(nodeID, role); 3831 3889 m_scrollingNodeToLayerMap.add(nodeID, &layer); 3832 3890 3833 3891 return nodeID; 3834 3892 } … … 3870 3928 } 3871 3929 3872 void RenderLayerCompositor::updateScrollCoordinationForThisFrame( ScrollingNodeIDparentNodeID, OptionSet<ScrollingNodeChangeFlags> changes)3930 void RenderLayerCompositor::updateScrollCoordinationForThisFrame(Optional<ScrollingNodeID> parentNodeID, OptionSet<ScrollingNodeChangeFlags> changes) 3873 3931 { 3874 3932 auto* scrollingCoordinator = this->scrollingCoordinator(); … … 3908 3966 3909 3967 if (!m_renderView.frame().isMainFrame()) { 3910 ScrollingNodeID parentDocumentHostingNodeID = scrollCoordinatedAncestorInParentOfFrame(m_renderView.frame()); 3911 if (!parentDocumentHostingNodeID) 3912 return; 3913 3968 auto parentDocumentHostingNodeID = scrollCoordinatedAncestorInParentOfFrame(m_renderView.frame()); 3914 3969 updateScrollCoordinationForThisFrame(parentDocumentHostingNodeID, changes); 3915 3970 if (!(roles.contains(ScrollCoordinationRole::ViewportConstrained)) && isRenderViewLayer) -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r240435 r240553 273 273 static RenderLayerCompositor* frameContentsCompositor(RenderWidget&); 274 274 // Return true if the layers changed. 275 staticbool parentFrameContentLayers(RenderWidget&);275 bool parentFrameContentLayers(RenderWidget&); 276 276 277 277 // Update the geometry of the layers used for clipping and scrolling in frames. … … 327 327 328 328 bool useCoordinatedScrollingForLayer(const RenderLayer&) const; 329 bool isLayerForIFrameWithScrollCoordinatedContents(const RenderLayer&) const; 329 330 330 331 void willRemoveScrollingLayerWithBacking(RenderLayer&, RenderLayerBacking&); … … 477 478 void updateCustomLayersAfterFlush(); 478 479 479 void updateScrollCoordinationForThisFrame( ScrollingNodeID, OptionSet<ScrollingNodeChangeFlags>);480 ScrollingNodeID attachScrollingNode(RenderLayer&, ScrollingNodeType, ScrollingNodeIDparentNodeID);480 void updateScrollCoordinationForThisFrame(Optional<ScrollingNodeID>, OptionSet<ScrollingNodeChangeFlags>); 481 ScrollingNodeID attachScrollingNode(RenderLayer&, ScrollingNodeType, Optional<ScrollingNodeID> parentNodeID); 481 482 void updateScrollCoordinatedLayer(RenderLayer&, OptionSet<ScrollCoordinationRole>, OptionSet<ScrollingNodeChangeFlags>); 482 483 void detachScrollCoordinatedLayer(RenderLayer&, OptionSet<ScrollCoordinationRole>); -
trunk/Source/WebCore/testing/Internals.cpp
r240237 r240553 2569 2569 return Exception { InvalidAccessError }; 2570 2570 2571 document->updateLayoutIgnorePendingStylesheets(); 2572 2571 2573 Page* page = document->page(); 2572 2574 if (!page) -
trunk/Source/WebKit/ChangeLog
r240552 r240553 1 2019-01-26 Simon Fraser <simon.fraser@apple.com> 2 3 Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node 4 https://bugs.webkit.org/show_bug.cgi?id=193879 5 6 Reviewed by Antti Koivisto. 7 8 Need a specialization of dump() for ScrollingStateFrameHostingNode to avoid infinite recursion. 9 10 * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: 11 (WebKit::dump): 12 1 13 2019-01-27 Chris Fleizach <cfleizach@apple.com> 2 14 -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
r240551 r240553 525 525 ts.dumpProperty("scrolled-contents-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer())); 526 526 } 527 527 528 static void dump(TextStream& ts, const ScrollingStateFrameHostingNode& node, bool changedPropertiesOnly) 529 { 530 } 531 528 532 static void dump(TextStream& ts, const ScrollingStateFrameScrollingNode& node, bool changedPropertiesOnly) 529 533 {
Note: See TracChangeset
for help on using the changeset viewer.