blob: 27eeabcd66975a5aca84a5140f7acd88e1bfb22a [file] [log] [blame]
Test that layers can be nicely added or removed from a squashed layer, without unnecessary repaints on any layer. Click anywhere to test interactively; keep clicking to proceed through the test.
CASE 1, original layer tree with overlap1 and overlap2:
{
"layers": [
{
"name": "Scrolling Contents Layer",
"bounds": [1200, 900],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV class='composited'",
"bounds": [600, 600],
"contentsOpaque": true,
"backgroundColor": "#808080",
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (positioned) DIV id='A' class='overlap1')",
"position": [120, 120],
"bounds": [270, 270],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[90, 90, 0, 1]
]
}
]
}
CASE 2, overlap3 gets added:
{
"layers": [
{
"name": "Scrolling Contents Layer",
"bounds": [1200, 900],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV class='composited'",
"bounds": [600, 600],
"contentsOpaque": true,
"backgroundColor": "#808080",
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (positioned) DIV id='A' class='overlap1')",
"position": [120, 120],
"bounds": [390, 390],
"invalidations": [
[240, 240, 150, 150]
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[90, 90, 0, 1]
]
}
]
}
CASE 3, overlap2 gets removed. Since this does not resize the layer, there should only be a repaint of overlap2:
{
"layers": [
{
"name": "Scrolling Contents Layer",
"bounds": [1200, 900],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV class='composited'",
"bounds": [600, 600],
"contentsOpaque": true,
"backgroundColor": "#808080",
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (positioned) DIV id='A' class='overlap1')",
"position": [120, 120],
"bounds": [390, 390],
"invalidations": [
[120, 120, 150, 150]
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[90, 90, 0, 1]
]
}
]
}
CASE 4, overlap1 gets removed:
{
"layers": [
{
"name": "Scrolling Contents Layer",
"bounds": [1200, 900],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV class='composited'",
"bounds": [600, 600],
"contentsOpaque": true,
"backgroundColor": "#808080",
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (positioned) DIV id='C' class='overlap3')",
"position": [360, 360],
"bounds": [150, 150],
"invalidations": [
[0, 0, 150, 150]
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[90, 90, 0, 1]
]
}
]
}
CASE 5, overlap2 gets added back:
{
"layers": [
{
"name": "Scrolling Contents Layer",
"bounds": [1200, 900],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV class='composited'",
"bounds": [600, 600],
"contentsOpaque": true,
"backgroundColor": "#808080",
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (positioned) DIV id='B' class='overlap2')",
"position": [240, 240],
"bounds": [270, 270],
"invalidations": [
[120, 120, 150, 150],
[0, 0, 150, 150]
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[90, 90, 0, 1]
]
}
]
}
CASE 6, overlap1 gets added back, and overlap3 gets removed:
{
"layers": [
{
"name": "Scrolling Contents Layer",
"bounds": [1200, 900],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV class='composited'",
"bounds": [600, 600],
"contentsOpaque": true,
"backgroundColor": "#808080",
"transform": 1
},
{
"name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (positioned) DIV id='A' class='overlap1')",
"position": [120, 120],
"bounds": [270, 270],
"invalidations": [
[120, 120, 150, 150],
[0, 0, 150, 150]
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[90, 90, 0, 1]
]
}
]
}