OLD | NEW |
1 This scenario verifies that the green "container" element and lime "innerScrolli
ng" element scroll properly even though there is a blue fixed-position element l
ayered in between them. | 1 This scenario verifies that the green "container" element and lime "innerScrolli
ng" element scroll properly even though there is a blue fixed-position element l
ayered in between them. |
2 | 2 |
3 The catch is that the squashing requirements should be computed in correct paint
order, so that the green container does not accidentally position itself with r
espect to the wrong layer and not scroll. | 3 The catch is that the squashing requirements should be computed in correct paint
order, so that the green container does not accidentally position itself with r
espect to the wrong layer and not scroll. |
4 | 4 |
5 CASE 1, original layer tree: | 5 CASE 1, original layer tree: |
6 { | 6 { |
| 7 "name": "Content Root Layer", |
7 "bounds": [785, 4100], | 8 "bounds": [785, 4100], |
8 "children": [ | 9 "children": [ |
9 { | 10 { |
| 11 "name": "LayoutView #document", |
10 "bounds": [785, 4100], | 12 "bounds": [785, 4100], |
11 "contentsOpaque": true, | 13 "contentsOpaque": true, |
12 "drawsContent": true, | 14 "drawsContent": true, |
13 "children": [ | 15 "children": [ |
14 { | 16 { |
| 17 "name": "LayoutBlockFlow (positioned) DIV id='backgroundFixed'", |
15 "bounds": [400, 400], | 18 "bounds": [400, 400], |
16 "contentsOpaque": true, | 19 "contentsOpaque": true, |
17 "drawsContent": true, | 20 "drawsContent": true, |
18 "backgroundColor": "#808080" | 21 "backgroundColor": "#808080" |
19 }, | 22 }, |
20 { | 23 { |
| 24 "name": "LayoutBlockFlow (positioned) DIV id='container'", |
21 "position": [100, 100], | 25 "position": [100, 100], |
22 "bounds": [100, 4000], | 26 "bounds": [100, 4000], |
23 "contentsOpaque": true, | 27 "contentsOpaque": true, |
24 "drawsContent": true, | 28 "drawsContent": true, |
25 "backgroundColor": "#008000", | 29 "backgroundColor": "#008000", |
26 "children": [ | 30 "children": [ |
27 { | 31 { |
| 32 "name": "LayoutBlockFlow (positioned) DIV id='innerFixed'", |
28 "position": [0, 50], | 33 "position": [0, 50], |
29 "bounds": [200, 100], | 34 "bounds": [200, 100], |
30 "contentsOpaque": true, | 35 "contentsOpaque": true, |
31 "drawsContent": true, | 36 "drawsContent": true, |
32 "backgroundColor": "#0000FF" | 37 "backgroundColor": "#0000FF" |
33 }, | 38 }, |
34 { | 39 { |
| 40 "name": "LayoutBlockFlow (positioned) DIV id='innerScrolling'", |
35 "position": [100, 0], | 41 "position": [100, 0], |
36 "bounds": [100, 100], | 42 "bounds": [100, 100], |
37 "contentsOpaque": true, | 43 "contentsOpaque": true, |
38 "drawsContent": true, | 44 "drawsContent": true, |
39 "backgroundColor": "#00FF00" | 45 "backgroundColor": "#00FF00" |
40 } | 46 } |
41 ] | 47 ] |
42 } | 48 } |
43 ] | 49 ] |
44 } | 50 } |
45 ] | 51 ] |
46 } | 52 } |
47 CASE 2, scrolling y by 10 pixels, both the "container" and "inner" should scroll
properly. | 53 CASE 2, scrolling y by 10 pixels, both the "container" and "inner" should scroll
properly. |
48 { | 54 { |
| 55 "name": "Content Root Layer", |
49 "bounds": [785, 4100], | 56 "bounds": [785, 4100], |
50 "children": [ | 57 "children": [ |
51 { | 58 { |
| 59 "name": "LayoutView #document", |
52 "bounds": [785, 4100], | 60 "bounds": [785, 4100], |
53 "contentsOpaque": true, | 61 "contentsOpaque": true, |
54 "drawsContent": true, | 62 "drawsContent": true, |
55 "children": [ | 63 "children": [ |
56 { | 64 { |
| 65 "name": "LayoutBlockFlow (positioned) DIV id='backgroundFixed'", |
57 "position": [0, 10], | 66 "position": [0, 10], |
58 "bounds": [400, 400], | 67 "bounds": [400, 400], |
59 "contentsOpaque": true, | 68 "contentsOpaque": true, |
60 "drawsContent": true, | 69 "drawsContent": true, |
61 "backgroundColor": "#808080" | 70 "backgroundColor": "#808080" |
62 }, | 71 }, |
63 { | 72 { |
| 73 "name": "LayoutBlockFlow (positioned) DIV id='container'", |
64 "position": [100, 100], | 74 "position": [100, 100], |
65 "bounds": [100, 4000], | 75 "bounds": [100, 4000], |
66 "contentsOpaque": true, | 76 "contentsOpaque": true, |
67 "drawsContent": true, | 77 "drawsContent": true, |
68 "backgroundColor": "#008000", | 78 "backgroundColor": "#008000", |
69 "children": [ | 79 "children": [ |
70 { | 80 { |
| 81 "name": "LayoutBlockFlow (positioned) DIV id='innerFixed'", |
71 "position": [0, 60], | 82 "position": [0, 60], |
72 "bounds": [200, 100], | 83 "bounds": [200, 100], |
73 "contentsOpaque": true, | 84 "contentsOpaque": true, |
74 "drawsContent": true, | 85 "drawsContent": true, |
75 "backgroundColor": "#0000FF" | 86 "backgroundColor": "#0000FF" |
76 }, | 87 }, |
77 { | 88 { |
| 89 "name": "LayoutBlockFlow (positioned) DIV id='innerScrolling'", |
78 "position": [100, 0], | 90 "position": [100, 0], |
79 "bounds": [100, 100], | 91 "bounds": [100, 100], |
80 "contentsOpaque": true, | 92 "contentsOpaque": true, |
81 "drawsContent": true, | 93 "drawsContent": true, |
82 "backgroundColor": "#00FF00" | 94 "backgroundColor": "#00FF00" |
83 } | 95 } |
84 ] | 96 ] |
85 } | 97 } |
86 ] | 98 ] |
87 } | 99 } |
88 ] | 100 ] |
89 } | 101 } |
90 CASE 3, scrolling y further so that "inner" no longer overlaps the fixed-pos lay
er, then the stacking context of "container" includes the "innerScrolling" layer
, and doubles in width: | 102 CASE 3, scrolling y further so that "inner" no longer overlaps the fixed-pos lay
er, then the stacking context of "container" includes the "innerScrolling" layer
, and doubles in width: |
91 { | 103 { |
| 104 "name": "Content Root Layer", |
92 "bounds": [785, 4100], | 105 "bounds": [785, 4100], |
93 "children": [ | 106 "children": [ |
94 { | 107 { |
| 108 "name": "LayoutView #document", |
95 "bounds": [785, 4100], | 109 "bounds": [785, 4100], |
96 "contentsOpaque": true, | 110 "contentsOpaque": true, |
97 "drawsContent": true, | 111 "drawsContent": true, |
98 "children": [ | 112 "children": [ |
99 { | 113 { |
| 114 "name": "LayoutBlockFlow (positioned) DIV id='backgroundFixed'", |
100 "position": [0, 110], | 115 "position": [0, 110], |
101 "bounds": [400, 400], | 116 "bounds": [400, 400], |
102 "contentsOpaque": true, | 117 "contentsOpaque": true, |
103 "drawsContent": true, | 118 "drawsContent": true, |
104 "backgroundColor": "#808080" | 119 "backgroundColor": "#808080" |
105 }, | 120 }, |
106 { | 121 { |
| 122 "name": "LayoutBlockFlow (positioned) DIV id='container'", |
107 "position": [100, 100], | 123 "position": [100, 100], |
108 "bounds": [200, 4000], | 124 "bounds": [200, 4000], |
109 "drawsContent": true, | 125 "drawsContent": true, |
110 "backgroundColor": "#008000", | 126 "backgroundColor": "#008000", |
111 "paintInvalidations": [ | 127 "paintInvalidations": [ |
112 { | 128 { |
113 "object": "LayoutBlockFlow (positioned) DIV id='innerScrolling'", | 129 "object": "LayoutBlockFlow (positioned) DIV id='innerScrolling'", |
114 "rect": [100, 0, 100, 100], | 130 "rect": [100, 0, 100, 100], |
115 "reason": "compositing update" | 131 "reason": "compositing update" |
116 } | 132 } |
117 ], | 133 ], |
118 "children": [ | 134 "children": [ |
119 { | 135 { |
| 136 "name": "LayoutBlockFlow (positioned) DIV id='innerFixed'", |
120 "position": [0, 160], | 137 "position": [0, 160], |
121 "bounds": [200, 100], | 138 "bounds": [200, 100], |
122 "contentsOpaque": true, | 139 "contentsOpaque": true, |
123 "drawsContent": true, | 140 "drawsContent": true, |
124 "backgroundColor": "#0000FF" | 141 "backgroundColor": "#0000FF" |
125 } | 142 } |
126 ] | 143 ] |
127 } | 144 } |
128 ] | 145 ] |
129 } | 146 } |
| 147 ], |
| 148 "objectPaintInvalidations": [ |
| 149 { |
| 150 "object": "LayoutBlockFlow (positioned) DIV id='innerScrolling'", |
| 151 "reason": "compositing update" |
| 152 } |
130 ] | 153 ] |
131 } | 154 } |
132 | 155 |
OLD | NEW |