1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
This scenario verifies that the cyan "container" element scrolls properly with squashing enabled. The "container" element should not squash into a composited layer mapping owned by the fixed position layer or its descendant, since this would make it behave like a fixed position element during composited scrolling.
CASE 1, original layer tree:
{
"bounds": [785, 4050],
"children": [
{
"bounds": [785, 4050],
"contentsOpaque": true,
"drawsContent": true,
"children": [
{
"bounds": [400, 200],
"contentsOpaque": true,
"drawsContent": true,
"backfaceVisibility": "hidden",
"backgroundColor": "#0000FF",
"children": [
{
"bounds": [50, 50],
"contentsOpaque": true,
"drawsContent": true,
"backfaceVisibility": "hidden",
"backgroundColor": "#FF0000"
}
]
},
{
"position": [100, 50],
"bounds": [200, 4000],
"contentsOpaque": true,
"drawsContent": true,
"backgroundColor": "#00FFFF"
}
]
}
]
}
CASE 2, scrolling y to 80, the "container" element should remain positioned with respect to the scrolled document, the fixed-pos layer compensates for the new scroll position:
{
"bounds": [785, 4050],
"children": [
{
"bounds": [785, 4050],
"contentsOpaque": true,
"drawsContent": true,
"children": [
{
"position": [0, 80],
"bounds": [400, 200],
"contentsOpaque": true,
"drawsContent": true,
"backfaceVisibility": "hidden",
"backgroundColor": "#0000FF",
"children": [
{
"bounds": [50, 50],
"contentsOpaque": true,
"drawsContent": true,
"backfaceVisibility": "hidden",
"backgroundColor": "#FF0000"
}
]
},
{
"position": [100, 50],
"bounds": [200, 4000],
"contentsOpaque": true,
"drawsContent": true,
"backgroundColor": "#00FFFF"
}
]
}
]
}
|