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 (GraphicsLayer | 6 (GraphicsLayer |
7 (bounds 785.00 4100.00) | 7 (bounds 785.00 4100.00) |
8 (children 1 | 8 (children 1 |
9 (GraphicsLayer | 9 (GraphicsLayer |
10 (bounds 785.00 4100.00) | 10 (bounds 785.00 4100.00) |
11 (contentsOpaque 1) | 11 (contentsOpaque 1) |
12 (drawsContent 1) | 12 (drawsContent 1) |
13 (children 2 | 13 (children 2 |
14 (GraphicsLayer | 14 (GraphicsLayer |
15 (bounds 400.00 400.00) | 15 (bounds 400.00 400.00) |
16 (contentsOpaque 1) | 16 (contentsOpaque 1) |
| 17 (drawsContent 1) |
| 18 (backgroundColor #808080) |
17 ) | 19 ) |
18 (GraphicsLayer | 20 (GraphicsLayer |
19 (position 100.00 100.00) | 21 (position 100.00 100.00) |
20 (bounds 100.00 4000.00) | 22 (bounds 100.00 4000.00) |
21 (contentsOpaque 1) | 23 (contentsOpaque 1) |
| 24 (drawsContent 1) |
| 25 (backgroundColor #008000) |
22 (children 2 | 26 (children 2 |
23 (GraphicsLayer | 27 (GraphicsLayer |
24 (position 0.00 50.00) | 28 (position 0.00 50.00) |
25 (bounds 200.00 100.00) | 29 (bounds 200.00 100.00) |
26 (contentsOpaque 1) | 30 (contentsOpaque 1) |
| 31 (drawsContent 1) |
| 32 (backgroundColor #0000FF) |
27 ) | 33 ) |
28 (GraphicsLayer | 34 (GraphicsLayer |
29 (position 100.00 0.00) | 35 (position 100.00 0.00) |
30 (bounds 100.00 100.00) | 36 (bounds 100.00 100.00) |
31 (contentsOpaque 1) | 37 (contentsOpaque 1) |
| 38 (drawsContent 1) |
| 39 (backgroundColor #00FF00) |
32 ) | 40 ) |
33 ) | 41 ) |
34 ) | 42 ) |
35 ) | 43 ) |
36 ) | 44 ) |
37 ) | 45 ) |
38 ) | 46 ) |
39 CASE 2, scrolling y by 10 pixels, both the "container" and "inner" should scroll
properly. | 47 CASE 2, scrolling y by 10 pixels, both the "container" and "inner" should scroll
properly. |
40 (GraphicsLayer | 48 (GraphicsLayer |
41 (bounds 785.00 4100.00) | 49 (bounds 785.00 4100.00) |
42 (children 1 | 50 (children 1 |
43 (GraphicsLayer | 51 (GraphicsLayer |
44 (bounds 785.00 4100.00) | 52 (bounds 785.00 4100.00) |
45 (contentsOpaque 1) | 53 (contentsOpaque 1) |
46 (drawsContent 1) | 54 (drawsContent 1) |
47 (children 2 | 55 (children 2 |
48 (GraphicsLayer | 56 (GraphicsLayer |
49 (position 0.00 10.00) | 57 (position 0.00 10.00) |
50 (bounds 400.00 400.00) | 58 (bounds 400.00 400.00) |
51 (contentsOpaque 1) | 59 (contentsOpaque 1) |
| 60 (drawsContent 1) |
| 61 (backgroundColor #808080) |
52 ) | 62 ) |
53 (GraphicsLayer | 63 (GraphicsLayer |
54 (position 100.00 100.00) | 64 (position 100.00 100.00) |
55 (bounds 100.00 4000.00) | 65 (bounds 100.00 4000.00) |
56 (contentsOpaque 1) | 66 (contentsOpaque 1) |
| 67 (drawsContent 1) |
| 68 (backgroundColor #008000) |
57 (children 2 | 69 (children 2 |
58 (GraphicsLayer | 70 (GraphicsLayer |
59 (position 0.00 60.00) | 71 (position 0.00 60.00) |
60 (bounds 200.00 100.00) | 72 (bounds 200.00 100.00) |
61 (contentsOpaque 1) | 73 (contentsOpaque 1) |
| 74 (drawsContent 1) |
| 75 (backgroundColor #0000FF) |
62 ) | 76 ) |
63 (GraphicsLayer | 77 (GraphicsLayer |
64 (position 100.00 0.00) | 78 (position 100.00 0.00) |
65 (bounds 100.00 100.00) | 79 (bounds 100.00 100.00) |
66 (contentsOpaque 1) | 80 (contentsOpaque 1) |
| 81 (drawsContent 1) |
| 82 (backgroundColor #00FF00) |
67 ) | 83 ) |
68 ) | 84 ) |
69 ) | 85 ) |
70 ) | 86 ) |
71 ) | 87 ) |
72 ) | 88 ) |
73 ) | 89 ) |
74 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: | 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: |
75 (GraphicsLayer | 91 (GraphicsLayer |
76 (bounds 785.00 4100.00) | 92 (bounds 785.00 4100.00) |
77 (children 1 | 93 (children 1 |
78 (GraphicsLayer | 94 (GraphicsLayer |
79 (bounds 785.00 4100.00) | 95 (bounds 785.00 4100.00) |
80 (contentsOpaque 1) | 96 (contentsOpaque 1) |
81 (drawsContent 1) | 97 (drawsContent 1) |
82 (children 2 | 98 (children 2 |
83 (GraphicsLayer | 99 (GraphicsLayer |
84 (position 0.00 110.00) | 100 (position 0.00 110.00) |
85 (bounds 400.00 400.00) | 101 (bounds 400.00 400.00) |
86 (contentsOpaque 1) | 102 (contentsOpaque 1) |
| 103 (drawsContent 1) |
| 104 (backgroundColor #808080) |
87 ) | 105 ) |
88 (GraphicsLayer | 106 (GraphicsLayer |
89 (position 100.00 100.00) | 107 (position 100.00 100.00) |
90 (bounds 200.00 4000.00) | 108 (bounds 200.00 4000.00) |
91 (drawsContent 1) | 109 (drawsContent 1) |
92 (backgroundColor #008000) | 110 (backgroundColor #008000) |
| 111 (repaint rects |
| 112 ) |
93 (children 1 | 113 (children 1 |
94 (GraphicsLayer | 114 (GraphicsLayer |
95 (position 0.00 160.00) | 115 (position 0.00 160.00) |
96 (bounds 200.00 100.00) | 116 (bounds 200.00 100.00) |
97 (contentsOpaque 1) | 117 (contentsOpaque 1) |
| 118 (drawsContent 1) |
| 119 (backgroundColor #0000FF) |
98 ) | 120 ) |
99 ) | 121 ) |
100 ) | 122 ) |
101 ) | 123 ) |
102 ) | 124 ) |
103 ) | 125 ) |
104 ) | 126 ) |
105 | 127 |
OLD | NEW |