blob: c4b5373a5df89d6fc2ee23d126cb4454f9ccdb30 [file] [log] [blame]
The gray div is a composited fixed-position element, and the cyan/lime elements should be squashed together on top. When scrolling, paragraphs may pop in-and-out of the squashing layer when they change overlapping status with respect to the composited layer underneath.
This scenario tests (1) that content repaints correctly as layers pop in and out of squashing, and (2) that the positioning of the squashing layer remains correct (i.e. scrolls properly) when the squashing layer is on top of a fixed-position composited layer.
CASE 1, original layer tree:
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"backgroundColor": "#FFFFFF"
},
{
"name": "Scrolling Layer",
"bounds": [785, 600],
"drawsContent": false
},
{
"name": "Scrolling Contents Layer",
"bounds": [785, 1400],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutBlockFlow (positioned) DIV class='composited background'",
"bounds": [300, 300],
"contentsOpaque": true,
"backgroundColor": "#D3D3D3",
"transform": 1
},
{
"name": "Squashing Containment Layer",
"drawsContent": false
},
{
"name": "LayoutBlockFlow (relative positioned) DIV id='paragraph-b' class='overlapping lime'",
"position": [0, 100],
"bounds": [200, 100],
"contentsOpaque": true,
"backgroundColor": "#00FF00"
},
{
"name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan')",
"position": [0, 200],
"bounds": [200, 300]
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[100, 150, 0, 1]
]
}
]
}
CASE 2, scrolling y to 80, new layers will be squashed, so things repaint:
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"backgroundColor": "#FFFFFF"
},
{
"name": "Scrolling Layer",
"bounds": [785, 600],
"drawsContent": false
},
{
"name": "Scrolling Contents Layer",
"bounds": [785, 1400],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
"rect": [0, 500, 200, 100],
"reason": "disappeared"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-b' class='overlapping lime'",
"rect": [0, 100, 200, 100],
"reason": "appeared"
}
],
"transform": 1
},
{
"name": "LayoutBlockFlow (positioned) DIV class='composited background'",
"bounds": [300, 300],
"contentsOpaque": true,
"backgroundColor": "#D3D3D3",
"transform": 2
},
{
"name": "Squashing Containment Layer",
"drawsContent": false,
"transform": 1
},
{
"name": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
"position": [0, 200],
"bounds": [200, 100],
"contentsOpaque": true,
"backgroundColor": "#00FFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
"rect": [0, 0, 200, 100],
"reason": "full"
}
],
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime')",
"position": [0, 300],
"bounds": [200, 300],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -80, 0, 1]
],
"flattenInheritedTransform": false
},
{
"id": 2,
"parent": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[100, 230, 0, 1]
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-b' class='overlapping lime'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-e' class='overlapping cyan'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
"reason": "compositing update"
}
]
}
CASE 3, scrolling y to 120, no repaints expected:
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"backgroundColor": "#FFFFFF"
},
{
"name": "Scrolling Layer",
"bounds": [785, 600],
"drawsContent": false
},
{
"name": "Scrolling Contents Layer",
"bounds": [785, 1400],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"transform": 1
},
{
"name": "LayoutBlockFlow (positioned) DIV class='composited background'",
"bounds": [300, 300],
"contentsOpaque": true,
"backgroundColor": "#D3D3D3",
"transform": 2
},
{
"name": "Squashing Containment Layer",
"drawsContent": false,
"transform": 1
},
{
"name": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
"position": [0, 200],
"bounds": [200, 100],
"contentsOpaque": true,
"backgroundColor": "#00FFFF",
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime')",
"position": [0, 300],
"bounds": [200, 300],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -120, 0, 1]
],
"flattenInheritedTransform": false
},
{
"id": 2,
"parent": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[100, 270, 0, 1]
]
}
]
}
CASE 4, scrolling y to 170 new layers will be squashed, so things repaint:
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"backgroundColor": "#FFFFFF"
},
{
"name": "Scrolling Layer",
"bounds": [785, 600],
"drawsContent": false
},
{
"name": "Scrolling Contents Layer",
"bounds": [785, 1400],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-g' class='overlapping cyan'",
"rect": [0, 600, 200, 100],
"reason": "disappeared"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
"rect": [0, 200, 200, 100],
"reason": "appeared"
}
],
"transform": 1
},
{
"name": "LayoutBlockFlow (positioned) DIV class='composited background'",
"bounds": [300, 300],
"contentsOpaque": true,
"backgroundColor": "#D3D3D3",
"transform": 2
},
{
"name": "Squashing Containment Layer",
"drawsContent": false,
"transform": 1
},
{
"name": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
"position": [0, 300],
"bounds": [200, 100],
"contentsOpaque": true,
"backgroundColor": "#00FF00",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
"rect": [0, 0, 200, 100],
"reason": "full"
}
],
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV id='paragraph-e' class='overlapping cyan')",
"position": [0, 400],
"bounds": [200, 300],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -170, 0, 1]
],
"flattenInheritedTransform": false
},
{
"id": 2,
"parent": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[100, 320, 0, 1]
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-d' class='overlapping lime'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-e' class='overlapping cyan'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'",
"reason": "compositing update"
},
{
"object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-g' class='overlapping cyan'",
"reason": "compositing update"
}
]
}