Bug 1778030 - Remove clip_id_stack from wrench r=gfx-reviewers,lsalzman

Also update reftests to only specify rect / rounded-rect / mask per clip.

Differential Revision: https://phabricator.services.mozilla.com/D150984
This commit is contained in:
Glenn Watson 2022-07-05 20:52:31 +00:00
Родитель 63c59155b7
Коммит 5c3d556f14
73 изменённых файлов: 103 добавлений и 323 удалений

Просмотреть файл

@ -7,7 +7,6 @@ root:
-
bounds: [68, 431, 539, 805]
"clip-rect": [5, 390, 665, 932]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [68, 431, 539, 805]
@ -19,7 +18,6 @@ root:
-
bounds: [668, 431, 539, 805]
"clip-rect": [605, 390, 665, 932]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [668, 431, 539, 805]
@ -31,7 +29,6 @@ root:
-
bounds: [1268, 431, 540, 805]
"clip-rect": [1205, 390, 666, 932]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [1268, 431, 540, 805]
@ -43,7 +40,6 @@ root:
-
bounds: [68, 1284, 539, 771]
"clip-rect": [5, 1244, 665, 897]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [68, 1284, 539, 771]
@ -55,7 +51,6 @@ root:
-
bounds: [668, 1284, 539, 771]
"clip-rect": [605, 1244, 665, 897]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [668, 1284, 539, 771]
@ -67,7 +62,6 @@ root:
-
bounds: [1268, 1284, 540, 771]
"clip-rect": [1205, 1244, 666, 897]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [1268, 1284, 540, 771]
@ -79,7 +73,6 @@ root:
-
bounds: [68, 2103, 539, 839]
"clip-rect": [5, 2063, 665, 965]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [68, 2103, 539, 839]
@ -91,7 +84,6 @@ root:
-
bounds: [668, 2103, 539, 839]
"clip-rect": [605, 2063, 665, 965]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [668, 2103, 539, 839]
@ -103,7 +95,6 @@ root:
-
bounds: [1268, 2103, 540, 839]
"clip-rect": [1205, 2063, 666, 965]
"clip-and-scroll": 0
"backface-visible": true
type: "box-shadow"
"box-bounds": [1268, 2103, 540, 839]
@ -115,7 +106,6 @@ root:
-
bounds: [0, 0, 1875, 154]
"clip-rect": [-2, 0, 1879, 158]
"clip-and-scroll": 0
type: "box-shadow"
"box-bounds": [0, 0, 1875, 154]
offset: [0, 1.5]

Просмотреть файл

@ -17,7 +17,6 @@ root:
- type: clip
id: 2
bounds: [90, 0, 150, 150]
complex:
- rect: [90, 0, 150, 150]
radius: 8

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [20, 50, 100, 100]
complex:
- rect: [20, 50, 100, 100]
radius: 0
@ -17,7 +16,6 @@ root:
- type: clip
id: 3
bounds: [140, 50, 100, 100]
complex:
- rect: [140, 50, 100, 100]
radius: 0.001
@ -31,7 +29,6 @@ root:
- type: clip
id: 4
bounds: [260, 50, 100, 100]
complex:
- rect: [260, 50, 100, 100]
radius: 0.01
@ -45,7 +42,6 @@ root:
- type: clip
id: 5
bounds: [380, 50, 100, 100]
complex:
- rect: [380, 50, 100, 100]
radius: 0.1

Просмотреть файл

@ -7,7 +7,6 @@ root:
items:
- type: clip
id: 3
bounds: [50, 50, 200, 200]
complex:
- rect: [50, 50, 200, 200]
radius: 8
@ -23,7 +22,6 @@ root:
- type: clip
id: 4
bounds: [270, 50, 200, 200]
complex:
- rect: [270, 50, 200, 200]
radius: [16, 32, 48, 64]
@ -39,7 +37,6 @@ root:
- type: clip
id: 5
bounds: [490, 50, 500, 500]
complex:
- rect: [490, 50, 500, 500]
radius: {

Просмотреть файл

@ -6,7 +6,6 @@ root:
items:
- type: clip
id: 2
bounds: [ 0, 0, 200, 200 ]
complex:
- rect: [ 10, 10, 180, 180 ]
radius:

Просмотреть файл

@ -9,7 +9,6 @@ root:
items:
- type: clip
id: 2
bounds: [28, 18, 144, 122]
complex:
- rect: [28, 18, 144, 122]
radius:
@ -42,7 +41,6 @@ root:
"bottom-right": [61, 61]
- type: clip
id: 3
bounds: [28, 160, 144, 122]
complex:
- rect: [28, 160, 144, 122]
radius: [61, 61]
@ -68,7 +66,6 @@ root:
radius: [61, 61]
- type: clip
id: 4
bounds: [28, 302, 154, 122]
complex:
- rect: [28, 302, 154, 122]
radius:
@ -105,7 +102,6 @@ root:
"bottom-right": [61, 61]
- type: clip
id: 5
bounds: [202, 18, 145, 122]
complex:
- rect: [202, 18, 144.03334, 122]
radius:
@ -138,7 +134,6 @@ root:
"bottom-right": [61, 61]
- type: clip
id: 6
bounds: [202, 160, 144, 122]
complex:
- rect: [202, 160, 144, 122]
radius: [61, 61]
@ -163,7 +158,6 @@ root:
radius: [61, 61]
- type: clip
id: 7
bounds: [202, 302, 154, 122]
complex:
- rect: [202, 302, 154, 122]
radius:
@ -201,7 +195,6 @@ root:
"bottom-right": [0, 0]
- type: clip
id: 8
bounds: [376, 18, 144, 122]
complex:
- rect: [376, 18, 144, 122]
radius: [61, 61]
@ -231,7 +224,6 @@ root:
radius: [61, 61]
- type: clip
id: 9
bounds: [376, 160, 144, 122]
complex:
- rect: [376, 160, 144, 122]
radius: [61, 61]
@ -262,7 +254,6 @@ root:
radius: [61, 61]
- type: clip
id: 10
bounds: [376, 302, 144, 122]
complex:
- rect: [376, 302, 144, 122]
radius:

Просмотреть файл

@ -6,7 +6,6 @@ root:
items:
- type: clip
id: 2
bounds: [ 0, 0, 200, 200 ]
complex:
- rect: [ 0, 0, 200, 200 ]
radius:

Просмотреть файл

@ -41,7 +41,6 @@ root:
"bottom-right": [0, 0]
"clip-mode": outset
-
bounds: [16, 164, 1352, 200]
"clip-rect": [16, 164, 1352, 200]
"backface-visible": true
type: clip
@ -89,7 +88,6 @@ root:
"bottom-right": [0, 0]
"clip-mode": outset
-
bounds: [16, 402, 200, 200]
"clip-rect": [16, 402, 200, 200]
"backface-visible": true
type: clip

Просмотреть файл

@ -2,7 +2,6 @@
root:
items:
-
bounds: [10, 10, 938, 200]
clip-rect: [10, 10, 938, 200]
type: clip
id: 2

Просмотреть файл

@ -20,9 +20,6 @@ root:
type: "clip-chain"
id: 3
clips: [2]
# note it's important that we use clip-chain here; clip-and-scroll in yaml
# defaults to push/pop, but we want to specifically attach this clip-chain
# to the stacking context and not the children (as gecko does in the bug)
-
bounds: [0, 0, 0, 0]
clip-chain: 3

Просмотреть файл

@ -6,7 +6,6 @@ root:
items:
- type: clip
id: 2
bounds: [ 50, 50, 200, 100 ]
complex:
- rect: [ 50, 50, 200, 100 ]
radius:
@ -21,7 +20,6 @@ root:
- type: clip
id: 3
bounds: [ 50, 150, 200, 100 ]
complex:
- rect: [ 50, 150, 200, 100 ]
radius:
@ -36,7 +34,6 @@ root:
- type: clip
id: 4
bounds: [ 300, 50, 100, 200 ]
complex:
- rect: [ 300, 50, 100, 200 ]
radius:
@ -51,7 +48,6 @@ root:
- type: clip
id: 5
bounds: [ 400, 50, 100, 200 ]
complex:
- rect: [ 400, 50, 100, 200 ]
radius:
@ -66,7 +62,6 @@ root:
- type: clip
id: 6
bounds: [ 50, 300, 200, 100 ]
complex:
- rect: [ 50, 300, 200, 100 ]
radius:
@ -81,7 +76,6 @@ root:
- type: clip
id: 7
bounds: [ 50, 400, 200, 100 ]
complex:
- rect: [ 50, 400, 200, 100 ]
radius:
@ -96,7 +90,6 @@ root:
- type: clip
id: 8
bounds: [ 300, 300, 100, 200 ]
complex:
- rect: [ 300, 300, 100, 200 ]
radius:
@ -111,7 +104,6 @@ root:
- type: clip
id: 9
bounds: [ 400, 300, 100, 200 ]
complex:
- rect: [ 400, 300, 100, 200 ]
radius:

Просмотреть файл

@ -6,7 +6,6 @@ root:
items:
- type: clip
id: 2
bounds: [ 50, 50, 200, 200 ]
complex:
- rect: [ 50, 50, 200, 200 ]
radius:
@ -21,7 +20,6 @@ root:
- type: clip
id: 3
bounds: [ 300, 50, 200, 200 ]
complex:
- rect: [ 300, 50, 200, 200 ]
radius:
@ -36,7 +34,6 @@ root:
- type: clip
id: 4
bounds: [ 50, 300, 200, 200 ]
complex:
- rect: [ 50, 300, 200, 200 ]
radius:
@ -51,7 +48,6 @@ root:
- type: clip
id: 5
bounds: [ 300, 300, 200, 200 ]
complex:
- rect: [ 300, 300, 200, 200 ]
radius:

Просмотреть файл

@ -11,7 +11,6 @@ root:
-
type: clip
id: 2
bounds: [0, 0, 200, 200]
complex:
- rect: [ 0, 0, 200, 200 ]
radius: 100

Просмотреть файл

@ -11,7 +11,6 @@ root:
-
type: clip
id: 2
bounds: [0, 0, 200, 200]
complex:
- rect: [ 0, 0, 200, 200 ]
radius: 100
@ -28,4 +27,3 @@ root:
bounds: [0, 0, 25, 25]
color: blue
clip-chain: [2]

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [20, 20, 100, 100]
complex:
- rect: [20, 20, 100, 100]
radius: 32
@ -17,7 +16,6 @@ root:
- type: clip
id: 3
bounds: [130, 20, 100, 100]
complex:
- rect: [130, 20, 100, 100]
radius: 32

Просмотреть файл

@ -10,7 +10,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 8, 2048]
image-mask:
image: solid-color(128,0,0,0,8,1024)
rect: [0, 0, 8, 2048]

Просмотреть файл

@ -17,7 +17,6 @@ root:
transform: rotate(0.25)
items:
- type: clip
bounds: [0, 0, 2400, 900]
id: 3
complex:
- rect: [ 0, 0, 2400, 900 ]

Просмотреть файл

@ -12,38 +12,37 @@ root:
bounds: [0, 0, 100, 100]
"clip-rect": [0, 0, 100, 100]
type: clip
-
type: "stacking-context"
transform: [0.98883086, 0.14904226, 0, 0, -0.14904226, 0.98883086, 0, 0, 0, 0, 1, 0, 1533.3134, 109.21605, 0, 1]
items:
-
type: "stacking-context"
transform: [0.98883086, 0.14904226, 0, 0, -0.14904226, 0.98883086, 0, 0, 0, 0, 1, 0, 1533.3134, 109.21605, 0, 1]
transform: [0.7818315, 0.6234898, 0, 0, -0.6234898, 0.7818315, 0, 0, 0, 0, 1, 0, 132.98201, -64.04077, 0, 1]
items:
-
type: "stacking-context"
transform: [0.7818315, 0.6234898, 0, 0, -0.6234898, 0.7818315, 0, 0, 0, 0, 1, 0, 132.98201, -64.04077, 0, 1]
transform: [0.93087375, 0.36534107, 0, 0, -0.36534107, 0.93087375, 0, 0, 0, 0, 1, 0, 68.64584, -46.80194, 0, 1]
items:
-
type: "stacking-context"
transform: [0.93087375, 0.36534107, 0, 0, -0.36534107, 0.93087375, 0, 0, 0, 0, 1, 0, 68.64584, -46.80194, 0, 1]
transform: [0.8262389, 0.56332004, 0, 0, -0.56332004, 0.8262389, 0, 0, 0, 0, 1, 0, 116.458824, -61.550323, 0, 1]
items:
-
type: "stacking-context"
transform: [0.8262389, 0.56332004, 0, 0, -0.56332004, 0.8262389, 0, 0, 0, 0, 1, 0, 116.458824, -61.550323, 0, 1]
transform: [0.90096885, 0.43388373, 0, 0, -0.43388373, 0.90096885, 0, 0, 0, 0, 1, 0, 84.200554, -52.906708, 0, 1]
items:
-
type: "stacking-context"
transform: [0.90096885, 0.43388373, 0, 0, -0.43388373, 0.90096885, 0, 0, 0, 0, 1, 0, 84.200554, -52.906708, 0, 1]
transform: [0.98883086, 0.14904226, 0, 0, -0.14904226, 0.98883086, 0, 0, 0, 0, 1, 0, 25.3134, -21.78395, 0, 1]
items:
-
type: "stacking-context"
transform: [0.98883086, 0.14904226, 0, 0, -0.14904226, 0.98883086, 0, 0, 0, 0, 1, 0, 25.3134, -21.78395, 0, 1]
transform: [0.73305184, 0.68017274, 0, 0, -0.68017274, 0.73305184, 0, 0, 0, 0, 1, 0, 149.64511, -65.28949, 0, 1]
items:
-
type: "stacking-context"
transform: [0.73305184, 0.68017274, 0, 0, -0.68017274, 0.73305184, 0, 0, 0, 0, 1, 0, 149.64511, -65.28949, 0, 1]
items:
-
bounds: [1000, 0, 1000, 1000]
"clip-rect": [1000, 0, 1000, 1000]
type: rect
color: green
clip-chain: [2]
bounds: [1000, 0, 1000, 1000]
"clip-rect": [1000, 0, 1000, 1000]
type: rect
color: green
clip-chain: [2]

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 1000, 1000]
complex:
- rect: [50, 50, 100, 100]
radius: 16

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 1000, 1000]
complex:
- rect: [50.3, 50.3, 100, 100]
radius: 16

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 100, 100]
complex:
- rect: [0, 0, 100, 100]
radius: {

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 100, 100]
complex:
- rect: [0, 0, 100, 100]
radius: {

Просмотреть файл

@ -4,112 +4,96 @@
root:
items:
-
bounds: [128, 128, 632, 632]
type: clip
complex:
- rect: [128, 128, 632, 632]
radius: 300
id: 2
-
bounds: [126, 126, 628, 628]
type: clip
complex:
- rect: [126, 126, 628, 628]
radius: 300
id: 3
-
bounds: [123, 123, 624, 624]
type: clip
complex:
- rect: [123, 123, 624, 624]
radius: 300
id: 4
-
bounds: [120, 120, 626, 626]
type: clip
complex:
- rect: [120, 120, 626, 626]
radius: 300
id: 5
-
bounds: [117, 117, 622, 622]
type: clip
complex:
- rect: [117, 117, 622, 622]
radius: 300
id: 6
-
bounds: [114, 114, 619, 619]
type: clip
complex:
- rect: [114, 114, 619, 619]
radius: 300
id: 7
-
bounds: [111, 111, 615, 615]
type: clip
complex:
- rect: [111, 111, 615, 615]
radius: 300
id: 8
-
bounds: [108, 108, 612, 612]
type: clip
complex:
- rect: [108, 108, 612, 612]
radius: 300
id: 9
-
bounds: [105, 105, 609, 609]
type: clip
complex:
- rect: [105, 105, 609, 609]
radius: 300
id: 10
-
bounds: [102, 102, 606, 606]
type: clip
complex:
- rect: [102, 102, 606, 606]
radius: 300
id: 11
-
bounds: [99, 99, 603, 603]
type: clip
complex:
- rect: [99, 99, 603, 603]
radius: 300
id: 12
-
bounds: [96, 96, 600, 600]
type: clip
complex:
- rect: [96, 96, 600, 600]
radius: 300
id: 13
-
bounds: [93, 93, 612, 612]
type: clip
complex:
- rect: [93, 93, 612, 612]
radius: 300
id: 14
-
bounds: [90, 90, 609, 609]
type: clip
complex:
- rect: [90, 90, 609, 609]
radius: 300
id: 15
-
bounds: [87, 87, 606, 606]
type: clip
complex:
- rect: [87, 87, 606, 606]
radius: 300
id: 16
-
bounds: [84, 84, 603, 603]
type: clip
complex:
- rect: [84, 84, 603, 603]

Просмотреть файл

@ -4,7 +4,6 @@
root:
items:
- type: clip
bounds: [64, 64, 128, 128]
id: 2
image-mask:
image: solid-color(255,255,255,255,128,128)

Просмотреть файл

@ -7,7 +7,6 @@
root:
items:
- type: clip
bounds: [0, 0, 100, 100]
id: 2
image-mask:
image: solid-color(255,255,255,255,100,100)

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 3
bounds: [0, 0, 256, 256]
complex:
- rect: [0, 0, 256, 256]
radius: 16

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [10, 10, 256, 256]
complex:
- rect: [10, 10, 256, 256]
radius: 16

Просмотреть файл

@ -6,7 +6,6 @@ root:
items:
- type: clip
id: 2
bounds: [10, 10, 256, 256]
complex:
- rect: [10, 10, 256, 256]
radius: 16

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [50, 50, 300, 300]
complex:
- rect: [50, 50, 300, 300]
radius: 300

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [20, 20, 100, 100]
complex:
- rect: [20, 20, 100, 100]
radius: 32
@ -20,7 +19,6 @@ root:
- type: clip
id: 3
bounds: [140, 20, 100, 100]
complex:
- rect: [140, 20, 100, 100]
radius: 32
@ -37,7 +35,6 @@ root:
- type: clip
id: 4
bounds: [270, 20, 100, 100]
complex:
- rect: [270, 20, 100, 100]
radius: 32

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [20, 20, 100, 100]
complex:
- rect: [20, 20, 100, 100]
radius: 32
@ -21,7 +20,6 @@ root:
- type: clip
id: 3
bounds: [140, 20, 100, 100]
complex:
- rect: [140, 20, 100, 100]
radius: 32
@ -38,7 +36,6 @@ root:
- type: clip
id: 4
bounds: [270, 20, 100, 100]
complex:
- rect: [270, 20, 100, 100]
radius: 32
@ -51,7 +48,6 @@ root:
- type: clip
id: 5
bounds: [20, 160, 100, 100]
complex:
- rect: [20, 160, 100, 100]
radius: 32
@ -68,7 +64,6 @@ root:
- type: clip
id: 6
bounds: [140, 160, 100, 100]
complex:
- rect: [140, 160, 100, 100]
radius: 32
@ -85,7 +80,6 @@ root:
- type: clip
id: 7
bounds: [270, 160, 100, 100]
complex:
- rect: [270, 160, 100, 100]
radius: 32
@ -98,7 +92,6 @@ root:
- type: clip
id: 8
bounds: [20, 300, 100, 100]
complex:
- rect: [20, 300, 100, 100]
radius: 32
@ -116,7 +109,6 @@ root:
- type: clip
id: 9
bounds: [140, 300, 100, 100]
complex:
- rect: [140, 300, 100, 100]
radius: 32
@ -133,7 +125,6 @@ root:
- type: clip
id: 10
bounds: [270, 300, 100, 100]
complex:
- rect: [270, 300, 100, 100]
radius: 32

Просмотреть файл

@ -5,7 +5,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 350, 90]
image-mask:
image: "firefox.png"
rect: [0, 0, 350, 90]

Просмотреть файл

@ -2,7 +2,6 @@ root:
items:
- type: clip
id: 2
bounds: [10, 10, 260, 260]
complex:
- rect: [10, 10, 260, 260]
radius: 32

Просмотреть файл

@ -2,7 +2,6 @@ root:
items:
- type: clip
id: 2
bounds: [10, 10, 100, 100]
complex:
- rect: [10, 10, 100, 100]
radius: 32

Просмотреть файл

@ -4,7 +4,6 @@ root:
items:
- type: clip
id: 2
bounds: [10, 10, 100, 100]
complex:
- rect: [10, 10, 100, 100]
radius: 32

Просмотреть файл

@ -2,7 +2,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 1314, 650]
complex:
- rect: [0, 0, 1314, 650]
- type: yuv-image

Просмотреть файл

@ -4,7 +4,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 200, 200]
image-mask:
image: transparent-checkerboard(2, 16, 16)
rect: [0, 0, 200, 200]

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 200, 200]
image-mask:
image: transparent-checkerboard(2, 16, 16)
rect: [0, 0, 200, 200]

Просмотреть файл

@ -5,7 +5,6 @@ root:
bounds: [25, 25, 100, 100]
color: red
- type: clip
bounds: [0, 0, 200, 200]
id: 2
image-mask:
# premultiplied 0.5 alpha white(??)

Просмотреть файл

@ -5,7 +5,6 @@ root:
bounds: [25, 25, 100, 100]
color: red
- type: clip
bounds: [0, 0, 200, 200]
id: 2
image-mask:
# premultiplied 0.5 alpha white(??)

Просмотреть файл

@ -12,7 +12,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 95, 88]
image-mask:
image: "mask.png"
rect: [0, 0, 35, 35]

Просмотреть файл

@ -12,7 +12,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 95, 88]
image-mask:
image: "mask.png"
rect: [0, 0, 35, 35]

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 95, 88]
image-mask:
image: "mask.png"
rect: [0, 0, 35, 35]

Просмотреть файл

@ -8,7 +8,6 @@ root:
transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 150, -150, 1]
items:
- type: clip
bounds: [0, 0, 300, 300]
# This image mask here assures that we will be forced to try to
# mask instead of skipping it due to the mask rect becoming a
# zero rect.

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 95, 88]
image-mask:
image: "mask.png"
rect: [0, 0, 35, 35]

Просмотреть файл

@ -4,7 +4,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 95, 88]
image-mask:
image: invalid
rect: [0, 0, 35, 35]

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 95, 88]
image-mask:
image: "mask.png"
rect: [0, 0, 35, 35]
@ -11,7 +10,6 @@ root:
tile-size: 5
- type: clip
id: 3
bounds: [0, 0, 95, 88]
image-mask:
image: "mask.png"
rect: [4, 4, 35, 35]

Просмотреть файл

@ -2,14 +2,12 @@
root:
items:
- type: clip
bounds: [0, 0, 95, 88]
id: 2
image-mask:
image: "mask.png"
rect: [0, 0, 35, 35]
repeat: false
- type: clip
bounds: [0, 0, 95, 88]
id: 3
image-mask:
image: "mask.png"

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 10000, 10000]
complex:
- rect: [0, 0, 10000, 10000]
radius:

Просмотреть файл

@ -2,7 +2,6 @@
root:
items:
- type: clip
bounds: [0, 0, 100, 100]
id: 2
complex:
- rect: [0, 0, 100, 100]

Просмотреть файл

@ -9,7 +9,6 @@ root:
transform: scale(20)
items:
- type: clip
bounds: [10, 10, 10, 10]
id: 2
image-mask:
image: "circle.png"

Просмотреть файл

@ -13,7 +13,7 @@ root:
- type: clip-chain
id: 12
clips: [2]
# Here we are testing that the clip-and-scroll property applies to
# Here we are testing that the clip-chain property applies to
# both stacking contexts and items.
-
bounds: [0, 0, 0, 0]

Просмотреть файл

@ -17,11 +17,10 @@ root:
id: 22
bounds: [10, 60, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [10, 60, 50, 50]
color: green
clip-chain: [2, 22]
- type: rect
bounds: [10, 60, 50, 50]
color: green
clip-chain: [2, 22]
# Do the same thing, but now for the "top" constraint.
- type: scroll-frame
id: 3
@ -39,11 +38,10 @@ root:
id: 23
bounds: [70, 10, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [70, 10, 50, 50]
color: green
clip-chain: [3, 23]
- type: rect
bounds: [70, 10, 50, 50]
color: green
clip-chain: [3, 23]
# Do the same thing, but now for the "right" constraint.
- type: scroll-frame
id: 4
@ -60,11 +58,10 @@ root:
id: 24
bounds: [60, 70, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [60, 70, 50, 50]
color: green
clip-chain: [4, 24]
- type: rect
bounds: [60, 70, 50, 50]
color: green
clip-chain: [4, 24]
# Do the same thing, but now for the "left" constraint.
- type: scroll-frame
id: 5
@ -82,11 +79,10 @@ root:
id: 25
bounds: [70, 70, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [70, 70, 50, 50]
color: green
clip-chain: [5, 25]
- type: rect
bounds: [70, 70, 50, 50]
color: green
clip-chain: [5, 25]
# The same tests, but this time with a margin.
- type: scroll-frame
@ -104,11 +100,10 @@ root:
id: 26
bounds: [130, 60, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [130, 60, 50, 50]
color: green
clip-chain: [6, 26]
- type: rect
bounds: [130, 60, 50, 50]
color: green
clip-chain: [6, 26]
# Do the same thing, but now for the "top" constraint.
- type: scroll-frame
@ -127,11 +122,10 @@ root:
id: 27
bounds: [190, 10, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [190, 10, 50, 50]
color: green
clip-chain: [7, 27]
- type: rect
bounds: [190, 10, 50, 50]
color: green
clip-chain: [7, 27]
# Do the same thing, but now for the "right" constraint.
- type: scroll-frame
@ -149,11 +143,10 @@ root:
id: 28
bounds: [180, 70, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [180, 70, 50, 50]
color: green
clip-chain: [8, 28]
- type: rect
bounds: [180, 70, 50, 50]
color: green
clip-chain: [8, 28]
# Do the same thing, but now for the "left" constraint.
- type: scroll-frame
@ -172,11 +165,10 @@ root:
id: 29
bounds: [190, 70, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [190, 70, 50, 50]
color: green
clip-chain: [9, 29]
- type: rect
bounds: [190, 70, 50, 50]
color: green
clip-chain: [9, 29]
# The same tests, but this time with a limit.
- type: scroll-frame
@ -194,11 +186,10 @@ root:
id: 30
bounds: [250, 60, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [250, 60, 50, 50]
color: green
clip-chain: [10, 30]
- type: rect
bounds: [250, 60, 50, 50]
color: green
clip-chain: [10, 30]
# Do the same thing, but now for the "top" constraint.
- type: scroll-frame
@ -217,11 +208,10 @@ root:
bounds: [310, 10, 50, 50]
content-size: [100, 100]
id: 31
items:
- type: rect
bounds: [310, 10, 50, 50]
color: green
clip-chain: [11, 31]
- type: rect
bounds: [310, 10, 50, 50]
color: green
clip-chain: [11, 31]
# Do the same thing, but now for the "right" constraint.
- type: scroll-frame
@ -239,11 +229,10 @@ root:
id: 32
bounds: [300, 70, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [300, 70, 50, 50]
color: green
clip-chain: [12, 32]
- type: rect
bounds: [300, 70, 50, 50]
color: green
clip-chain: [12, 32]
# Do the same thing, but now for the "left" constraint.
- type: scroll-frame
@ -262,8 +251,7 @@ root:
id: 33
bounds: [310, 70, 50, 50]
content-size: [100, 100]
items:
- type: rect
bounds: [310, 70, 50, 50]
color: green
clip-chain: [13, 33]
- type: rect
bounds: [310, 70, 50, 50]
color: green
clip-chain: [13, 33]

Просмотреть файл

@ -18,7 +18,6 @@ root:
transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -110, 0, 0, 1]
items:
-
bounds: [24, 539, 24, 24]
type: clip
id: 2
complex:
@ -31,7 +30,6 @@ root:
color: black
clip-chain: [2]
-
bounds: [24, 770, 24, 24]
type: clip
id: 3
complex:
@ -44,7 +42,6 @@ root:
color: black
clip-chain: [3]
-
bounds: [24, 847, 24, 24]
type: clip
id: 4
complex:

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [20, 20, 100, 100]
complex:
- rect: [20, 20, 100, 100]
radius: 32

Просмотреть файл

@ -12,7 +12,6 @@ root:
items:
- type: clip
id: 2
bounds: [50, 50, 200, 200]
complex:
- rect: [50, 50, 200, 200]
radius: 8

Просмотреть файл

@ -3,7 +3,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 400, 30]
complex:
- rect: [0, 0, 400, 30]
radius: {

Просмотреть файл

@ -4,7 +4,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 400, 30]
complex:
- rect: [0, 0, 400, 30]
radius: {

Просмотреть файл

@ -13,7 +13,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 200, 200]
complex:
- rect: [0, 0, 200, 200]
radius: 4

Просмотреть файл

@ -5,9 +5,8 @@ root:
"clip-rect": [0, 0, 750, 100]
type: rect
color: [180, 180, 180]
- bounds: [0, 0, 750, 100]
- type: clip
"clip-rect": [0, 0, 750, 100]
type: clip
id: 2
"content-size": [750, 100]
"image-mask":

Просмотреть файл

@ -21,17 +21,18 @@ pipelines:
bounds: [0, 0, 1887, 1971]
clip-to-frame: true
-
"clip-and-scroll": 2
spatial-id: 2
type: "stacking-context"
items:
-
bounds: [0, -186, 1887, 239]
"clip-and-scroll": 2
spatial-id: 2
type: clip
id: 4
-
bounds: [-660.45, -186, 0, 0]
"clip-and-scroll": 4
spatial-id: 2
clip-chain: [4]
type: "stacking-context"
transform: [1, 0, 0, 0, -0.57735026, 1, 0, 0, 0, 0, 1, 0, 68.849, 0, 0, 1]
items:
@ -40,4 +41,3 @@ pipelines:
type: rect
color: blue
clip-chain: [2, 4]

Просмотреть файл

@ -11,7 +11,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 24, 24]
image-mask:
image: solid-color(255, 0, 0, 255, 24, 24)
rect: [0, 0, 24, 24]

Просмотреть файл

@ -13,7 +13,7 @@ root:
-
bounds: [0, 0, 1024, 200]
"clip-rect": [0, 0, 1024, 200]
"clip-and-scroll": 2
spatial-id: 2
type: "stacking-context"
transform: [0.70710677, 0, -0.70710677, 0, 0, 1, 0, 0, 0.70710677, 0, 0.70710677, 0, 149.96133, 0, -937.9613, 1]
items:

Просмотреть файл

@ -14,7 +14,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 100, 100]
complex:
- rect: [0, 0, 100, 100]
radius: 10

Просмотреть файл

@ -15,7 +15,6 @@ root:
items:
- type: clip
id: 2
bounds: [0, 0, 100, 100]
complex:
- rect: [0, 0, 100, 100]
radius: 10

Просмотреть файл

@ -5,7 +5,6 @@ root:
items:
- type: clip
id: 2
bounds: [225, 200, 150, 200]
complex:
- rect: [225, 200, 150, 200]
radius: 32

Просмотреть файл

@ -15,7 +15,6 @@ root:
transform-style: preserve-3d
items:
- type: clip
bounds: [0, 0, 60000, 60000]
clip-rect: [0, 0, 60000, 60000]
id: 2
complex:

Просмотреть файл

@ -13,7 +13,6 @@ root:
transform: ["scale(0.001667, 0.001667)"]
items:
- type: clip
bounds: [10, 10, 60000, 60000]
clip-rect: [10, 10, 60000, 60000]
id: 2
complex:

Просмотреть файл

@ -6,7 +6,6 @@ root:
items:
- type: clip
id: 2
bounds: [20, 20, 200, 200]
complex:
- rect: [20, 20, 200, 200]
radius: 32

Просмотреть файл

@ -6,7 +6,6 @@ root:
items:
- type: clip
id: 2
bounds: [20, 20, 100, 100]
complex:
- rect: [20, 20, 100, 100]
radius: 32

Просмотреть файл

@ -5,7 +5,6 @@ root:
type: "stacking-context"
items:
-
bounds: [12, 12, 130, 130]
type: clip
id: 4
complex:

Просмотреть файл

@ -8,7 +8,6 @@ root:
type: "stacking-context"
items:
-
bounds: [12, 12, 130, 130]
type: clip
id: 4
complex:

Просмотреть файл

@ -339,7 +339,6 @@ pub struct YamlFrameReader {
user_clip_id_map: HashMap<u64, ClipId>,
user_spatial_id_map: HashMap<u64, SpatialId>,
clip_id_stack: Vec<ClipId>,
spatial_id_stack: Vec<SpatialId>,
requested_frame: usize,
@ -370,7 +369,6 @@ impl YamlFrameReader {
image_map: HashMap::new(),
user_clip_id_map: HashMap::new(),
user_spatial_id_map: HashMap::new(),
clip_id_stack: Vec::new(),
spatial_id_stack: Vec::new(),
yaml_string: String::new(),
requested_frame: 0,
@ -396,11 +394,8 @@ impl YamlFrameReader {
wrench.api.send_transaction(wrench.document_id, txn);
}
fn top_space_and_clip(&self) -> SpaceAndClipInfo {
SpaceAndClipInfo {
spatial_id: *self.spatial_id_stack.last().unwrap(),
clip_id: *self.clip_id_stack.last().unwrap(),
}
fn top_space(&self) -> SpatialId {
*self.spatial_id_stack.last().unwrap()
}
pub fn yaml_path(&self) -> &PathBuf {
@ -467,8 +462,6 @@ impl YamlFrameReader {
// Don't allow referencing clips between pipelines for now.
self.user_clip_id_map.clear();
self.user_spatial_id_map.clear();
self.clip_id_stack.clear();
self.clip_id_stack.push(ClipId::root(pipeline_id));
self.spatial_id_stack.clear();
self.spatial_id_stack.push(SpatialId::root_scroll_node(pipeline_id));
@ -483,7 +476,6 @@ impl YamlFrameReader {
self.add_stacking_context_from_yaml(&mut builder, wrench, yaml, IsRoot(true), &mut info);
self.display_lists.push(builder.end());
assert_eq!(self.clip_id_stack.len(), 1);
assert_eq!(self.spatial_id_stack.len(), 1);
}
@ -550,53 +542,6 @@ impl YamlFrameReader {
self.user_spatial_id_map.insert(numeric_id, real_id);
}
fn to_clip_and_scroll_info(
&self,
item: &Yaml,
pipeline_id: PipelineId
) -> (Option<ClipId>, Option<SpatialId>) {
// Note: this is tricky. In the old code the single ID could be used either way
// for clip/scroll. In the new code we are trying to reflect that and not break
// all the reftests. Ultimately we'd want the clip and scroll nodes to be
// provided separately in YAML.
match *item {
Yaml::BadValue => (None, None),
Yaml::Array(ref array) if array.len() == 2 => {
let scroll_id = self.to_spatial_id(&array[0], pipeline_id).expect("unknown spatial id");
let clip_id = self.to_clip_id(&array[1], pipeline_id);
(clip_id, Some(scroll_id))
}
Yaml::String(ref id_string) if id_string == "root-reference-frame" => {
let scroll_id = SpatialId::root_reference_frame(pipeline_id);
let clip_id = ClipId::root(pipeline_id);
(Some(clip_id), Some(scroll_id))
}
Yaml::String(ref id_string) if id_string == "root-scroll-node" => {
let scroll_id = SpatialId::root_scroll_node(pipeline_id);
(None, Some(scroll_id))
}
Yaml::String(ref id_string) if id_string == "root_clip" => {
let clip_id = ClipId::root(pipeline_id);
(Some(clip_id), None)
}
Yaml::Integer(value) => {
let scroll_id = self.user_spatial_id_map
.get(&(value as u64))
.cloned();
let clip_id = self.user_clip_id_map
.get(&(value as u64))
.cloned();
assert!(scroll_id.is_some() || clip_id.is_some(),
"clip-and-scroll index not found: {}", value);
(clip_id, scroll_id)
}
_ => {
println!("Unable to parse clip/scroll {:?}", item);
(None, None)
}
}
}
fn to_hit_testing_tag(&self, item: &Yaml) -> Option<ItemTag> {
match *item {
Yaml::Array(ref array) if array.len() == 2 => {
@ -1593,32 +1538,14 @@ impl YamlFrameReader {
for item in yaml_items {
let item_type = Self::get_item_type_from_yaml(item);
let (set_clip_id, mut set_scroll_id) = self.to_clip_and_scroll_info(
&item["clip-and-scroll"],
dl.pipeline_id
);
let spatial_id = self.to_spatial_id(&item["spatial-id"], dl.pipeline_id);
if let Some(id) = self.to_spatial_id(&item["spatial-id"], dl.pipeline_id) {
set_scroll_id = Some(id);
}
if let Some(clip_id) = set_clip_id {
self.clip_id_stack.push(clip_id);
}
if let Some(scroll_id) = set_scroll_id {
self.spatial_id_stack.push(scroll_id);
if let Some(spatial_id) = spatial_id {
self.spatial_id_stack.push(spatial_id);
}
let clip_rect = item["clip-rect"].as_rect().unwrap_or(full_clip);
let SpaceAndClipInfo {
spatial_id,
mut clip_id,
} = self.top_space_and_clip();
if let Some(clip_chain_id) = self.to_clip_chain_id(&item["clip-chain"], dl) {
clip_id = ClipId::ClipChain(clip_chain_id);
}
let clip_chain_id = self.to_clip_chain_id(&item["clip-chain"], dl).unwrap_or(ClipChainId::INVALID);
let mut flags = PrimitiveFlags::default();
for (key, flag) in [
@ -1634,8 +1561,8 @@ impl YamlFrameReader {
let mut info = CommonItemProperties {
clip_rect,
clip_id,
spatial_id,
clip_id: ClipId::ClipChain(clip_chain_id),
spatial_id: self.top_space(),
flags,
};
@ -1667,10 +1594,7 @@ impl YamlFrameReader {
_ => println!("Skipping unknown item type: {:?}", item),
}
if set_clip_id.is_some() {
self.clip_id_stack.pop().unwrap();
}
if set_scroll_id.is_some() {
if spatial_id.is_some() {
self.spatial_id_stack.pop().unwrap();
}
}
@ -1729,7 +1653,7 @@ impl YamlFrameReader {
let clip_id = if clip_to_frame {
Some(dl.define_clip_rect(
self.top_space_and_clip().spatial_id,
self.top_space(),
clip_rect,
))
} else {
@ -1737,7 +1661,7 @@ impl YamlFrameReader {
};
let spatial_id = dl.define_scroll_frame(
self.top_space_and_clip().spatial_id,
self.top_space(),
external_id,
content_rect,
clip_rect,
@ -1886,41 +1810,43 @@ impl YamlFrameReader {
fn handle_clip(&mut self, dl: &mut DisplayListBuilder, wrench: &mut Wrench, yaml: &Yaml) {
let numeric_id = yaml["id"].as_i64();
let spatial_id = self.top_space();
let complex_clips = yaml["complex"].as_complex_clip_regions();
let mut space_and_clip = self.top_space_and_clip();
let mut clip_id = None;
if let Some(clip_rect) = yaml["bounds"].as_rect() {
space_and_clip.clip_id = dl.define_clip_rect(
space_and_clip.spatial_id,
clip_id = Some(dl.define_clip_rect(
spatial_id,
clip_rect,
);
));
}
if let Some(image_mask) = self.as_image_mask(&yaml["image-mask"], wrench) {
space_and_clip.clip_id = dl.define_clip_image_mask(
space_and_clip.spatial_id,
assert!(clip_id.is_none(), "invalid clip definition");
clip_id = Some(dl.define_clip_image_mask(
spatial_id,
image_mask,
&[],
FillRule::Nonzero,
);
));
}
for complex_clip in complex_clips {
space_and_clip.clip_id = dl.define_clip_rounded_rect(
space_and_clip.spatial_id,
complex_clip,
);
if !complex_clips.is_empty() {
// Only 1 complex clip is supported per clip (todo: change yaml format)
assert_eq!(complex_clips.len(), 1);
assert!(clip_id.is_none(), "invalid clip definition");
clip_id = Some(dl.define_clip_rounded_rect(
spatial_id,
complex_clips[0],
));
}
if let Some(numeric_id) = numeric_id {
self.add_clip_id_mapping(numeric_id as u64, space_and_clip.clip_id);
self.add_spatial_id_mapping(numeric_id as u64, space_and_clip.spatial_id);
}
if let Some(yaml_items) = yaml["items"].as_vec() {
self.clip_id_stack.push(space_and_clip.clip_id);
self.add_display_list_items_from_yaml(dl, wrench, yaml_items);
self.clip_id_stack.pop().unwrap();
if let Some(clip_id) = clip_id {
if let Some(numeric_id) = numeric_id {
self.add_clip_id_mapping(numeric_id as u64, clip_id);
}
}
}