summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wrench/reftests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml48
-rw-r--r--gfx/wr/wrench/reftests/aa/fractional-nine-patch.pngbin0 -> 2026 bytes
-rw-r--r--gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml21
-rw-r--r--gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/aa/fractional-radii.yaml54
-rw-r--r--gfx/wr/wrench/reftests/aa/indirect-rotate.pngbin0 -> 1472 bytes
-rw-r--r--gfx/wr/wrench/reftests/aa/indirect-rotate.yaml16
-rw-r--r--gfx/wr/wrench/reftests/aa/reftest.list6
-rw-r--r--gfx/wr/wrench/reftests/aa/rotated-line.pngbin0 -> 1930 bytes
-rw-r--r--gfx/wr/wrench/reftests/aa/rotated-line.yaml13
-rw-r--r--gfx/wr/wrench/reftests/aa/rounded-rects-ref.pngbin0 -> 10886 bytes
-rw-r--r--gfx/wr/wrench/reftests/aa/rounded-rects.yaml56
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml18
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-both-sides-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-both-sides.yaml25
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-double-flip.yaml21
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-flatten.yaml31
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-hidden.yaml18
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-leaf-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-leaf.yaml16
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-perspective-ref.yaml16
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-perspective.yaml20
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-picture-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-picture.yaml21
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-sc.yaml17
-rw-r--r--gfx/wr/wrench/reftests/backface/backface-vis-3d.yaml16
-rw-r--r--gfx/wr/wrench/reftests/backface/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/backface/reftest.list10
-rw-r--r--gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container.yaml21
-rw-r--r--gfx/wr/wrench/reftests/blend/backdrop-filter-preceding-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/blend/backdrop-filter-preceding.yaml24
-rw-r--r--gfx/wr/wrench/reftests/blend/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/blend/blend-overflow-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/blend/blend-overflow.yaml18
-rw-r--r--gfx/wr/wrench/reftests/blend/child-surface-ref.yaml17
-rw-r--r--gfx/wr/wrench/reftests/blend/child-surface.yaml22
-rw-r--r--gfx/wr/wrench/reftests/blend/darken-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/darken.yaml16
-rw-r--r--gfx/wr/wrench/reftests/blend/difference-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/difference-transparent-ref.yaml23
-rw-r--r--gfx/wr/wrench/reftests/blend/difference-transparent.yaml22
-rw-r--r--gfx/wr/wrench/reftests/blend/difference.yaml16
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated-2-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated-2.yaml25
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated-premultiplied-2.yaml14
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated-premultiplied.yaml24
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated-with-filter.yaml19
-rw-r--r--gfx/wr/wrench/reftests/blend/isolated.yaml19
-rw-r--r--gfx/wr/wrench/reftests/blend/large-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/blend/large.yaml14
-rw-r--r--gfx/wr/wrench/reftests/blend/lighten-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/lighten.yaml16
-rw-r--r--gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.pngbin0 -> 34482 bytes
-rw-r--r--gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.yaml56
-rw-r--r--gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop.yaml33
-rw-r--r--gfx/wr/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/blend/multi-mix-blend-mode.yaml25
-rw-r--r--gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/multiply-2.yaml16
-rw-r--r--gfx/wr/wrench/reftests/blend/multiply-3.yaml20
-rw-r--r--gfx/wr/wrench/reftests/blend/multiply-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/multiply.yaml16
-rw-r--r--gfx/wr/wrench/reftests/blend/raster-roots-1-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/blend/raster-roots-1.yaml32
-rw-r--r--gfx/wr/wrench/reftests/blend/reftest.list32
-rw-r--r--gfx/wr/wrench/reftests/blend/repeated-difference-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/blend/repeated-difference.yaml31
-rw-r--r--gfx/wr/wrench/reftests/blend/transparent-composite-1-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/blend/transparent-composite-1.yaml12
-rw-r--r--gfx/wr/wrench/reftests/blend/transparent-composite-2-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/blend/transparent-composite-2.yaml16
-rw-r--r--gfx/wr/wrench/reftests/blend/transparent-white.pngbin0 -> 303 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/blank.yaml3
-rw-r--r--gfx/wr/wrench/reftests/border/border-clamp-corner-radius.pngbin0 -> 12265 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-clamp-corner-radius.yaml24
-rw-r--r--gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.pngbin0 -> 6793 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.yaml76
-rw-r--r--gfx/wr/wrench/reftests/border/border-double-1px-ref.yaml17
-rw-r--r--gfx/wr/wrench/reftests/border/border-double-1px.yaml11
-rw-r--r--gfx/wr/wrench/reftests/border/border-double-simple-2-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/border-double-simple-2.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/border-double-simple-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/border/border-double-simple.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/border-gradient-nine-patch.pngbin0 -> 1283 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-gradient-nine-patch.yaml11
-rw-r--r--gfx/wr/wrench/reftests/border/border-gradient-simple-ref.yaml55
-rw-r--r--gfx/wr/wrench/reftests/border/border-gradient-simple.yaml13
-rw-r--r--gfx/wr/wrench/reftests/border/border-groove-simple-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/border/border-groove-simple.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-crash-ref.yaml20
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-crash.yaml20
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-empty-slice-ref.pngbin0 -> 9635 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-empty-slice.yaml46
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-fill-2-ref.pngbin0 -> 26585 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-fill-2.yaml51
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-fill-ref.pngbin0 -> 22557 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-fill.yaml50
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-ref.pngbin0 -> 5519 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-round-ref.pngbin0 -> 14815 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-round.yaml39
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-src-2.pngbin0 -> 2215 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-image-src.pngbin0 -> 1247 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-image.yaml16
-rw-r--r--gfx/wr/wrench/reftests/border/border-invisible-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/border/border-invisible.yaml17
-rw-r--r--gfx/wr/wrench/reftests/border/border-no-bogus-line-ref.pngbin0 -> 2294 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-no-bogus-line.yaml13
-rw-r--r--gfx/wr/wrench/reftests/border/border-none-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/border/border-none.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/border-overlapping-corner-ref.yaml22
-rw-r--r--gfx/wr/wrench/reftests/border/border-overlapping-corner.yaml17
-rw-r--r--gfx/wr/wrench/reftests/border/border-overlapping-edge-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/border/border-overlapping-edge.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.pngbin0 -> 2394 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.yaml11
-rw-r--r--gfx/wr/wrench/reftests/border/border-radial-gradient-simple-ref.yaml54
-rw-r--r--gfx/wr/wrench/reftests/border/border-radial-gradient-simple.yaml13
-rw-r--r--gfx/wr/wrench/reftests/border/border-radii.pngbin0 -> 1035 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-radii.yaml17
-rw-r--r--gfx/wr/wrench/reftests/border/border-ridge-simple-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/border/border-ridge-simple.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/border-suite-2.pngbin0 -> 48233 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-suite-2.yaml171
-rw-r--r--gfx/wr/wrench/reftests/border/border-suite-3.pngbin0 -> 25873 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-suite-3.yaml57
-rw-r--r--gfx/wr/wrench/reftests/border/border-suite.pngbin0 -> 64319 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/border-suite.yaml351
-rw-r--r--gfx/wr/wrench/reftests/border/degenerate-curve.pngbin0 -> 20780 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/degenerate-curve.yaml293
-rw-r--r--gfx/wr/wrench/reftests/border/discontinued-dash.pngbin0 -> 1915 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/discontinued-dash.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/dotted-corner-small-radius.pngbin0 -> 8741 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/dotted-corner-small-radius.yaml11
-rw-r--r--gfx/wr/wrench/reftests/border/green-square.yaml9
-rw-r--r--gfx/wr/wrench/reftests/border/max-scale-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/border/max-scale.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/no-aa.yaml20
-rw-r--r--gfx/wr/wrench/reftests/border/overlapping.pngbin0 -> 4074 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/overlapping.yaml22
-rw-r--r--gfx/wr/wrench/reftests/border/reftest.list35
-rw-r--r--gfx/wr/wrench/reftests/border/small-dotted-border.pngbin0 -> 1551 bytes
-rw-r--r--gfx/wr/wrench/reftests/border/small-dotted-border.yaml19
-rw-r--r--gfx/wr/wrench/reftests/border/small-inset-outset-notref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/small-inset-outset.yaml12
-rw-r--r--gfx/wr/wrench/reftests/border/zero-width.yaml12
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml20
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml19
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.pngbin0 -> 11567 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.yaml36
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.pngbin0 -> 33603 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.yaml98
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml59
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-clip.yaml32
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners.yaml16
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-empty.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.pngbin0 -> 15792 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml120
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.pngbin0 -> 125598 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml14
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.pngbin0 -> 56821 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml14
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.pngbin0 -> 2018 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.yaml12
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml18
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.pngbin0 -> 7573 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.yaml68
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.pngbin0 -> 13529 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml8
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.pngbin0 -> 5612 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml9
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.pngbin0 -> 86873 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml154
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.pngbin0 -> 21209 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml134
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.pngbin0 -> 19562 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-alpha.pngbin0 -> 1619 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-alpha.yaml14
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-border-radius-ref.yaml16
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-border-radius.pngbin0 -> 3016 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-border-radius.yaml11
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-downscale.pngbin0 -> 12980 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-downscale.yaml10
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-empty.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-large-offset-ref.pngbin0 -> 4086 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-large-offset.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-mask-region.pngbin0 -> 24233 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-mask-region.yaml11
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.pngbin0 -> 3048 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.yaml18
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius-ref.pngbin0 -> 672 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-offset.pngbin0 -> 3114 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-offset.yaml18
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-simple-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-simple.yaml13
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-spread-large-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-spread-large.yaml12
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-spread-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-spread.yaml12
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-subpx.pngbin0 -> 1809 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/inset-subpx.yaml12
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/invalid-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/invalid.yaml12
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/no-stretch.pngbin0 -> 4020 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/no-stretch.yaml21
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/overlap1.pngbin0 -> 10907 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/overlap1.yaml18
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/overlap2.pngbin0 -> 8491 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/overlap2.yaml19
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/reftest.list39
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/rounding-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/rounding.yaml15
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/scale.pngbin0 -> 13662 bytes
-rw-r--r--gfx/wr/wrench/reftests/boxshadow/scale.yaml183
-rw-r--r--gfx/wr/wrench/reftests/clip/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/clip/blend-container-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/clip/blend-container.yaml19
-rw-r--r--gfx/wr/wrench/reftests/clip/border-with-rounded-clip.pngbin0 -> 1846 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/border-with-rounded-clip.yaml23
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.pngbin0 -> 2241 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.yaml22
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-3d-transform-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-3d-transform.yaml33
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.pngbin0 -> 13235 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-45-degree-rotation.yaml35
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation.yaml36
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.pngbin0 -> 1633 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.yaml29
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-corner-overlap-ref.yaml117
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-corner-overlap.yaml61
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-ellipse.pngbin0 -> 9542 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-ellipse.yaml110
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml20
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-empty-inner-rect.yaml29
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-filter-raster-root-ref.yaml16
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-filter-raster-root.yaml27
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-mode.pngbin0 -> 2783 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-mode.yaml29
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc.yaml20
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-thin-rotated-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/clip/clip-thin-rotated.yaml41
-rw-r--r--gfx/wr/wrench/reftests/clip/clipped-occlusion-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/clip/clipped-occlusion.yaml25
-rw-r--r--gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml31
-rw-r--r--gfx/wr/wrench/reftests/clip/fixed-position-clipping-ref.yaml15
-rw-r--r--gfx/wr/wrench/reftests/clip/fixed-position-clipping.yaml45
-rw-r--r--gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml27
-rw-r--r--gfx/wr/wrench/reftests/clip/inverted-ellipse.pngbin0 -> 4035 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/inverted-ellipse.yaml15
-rw-r--r--gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask.yaml22
-rw-r--r--gfx/wr/wrench/reftests/clip/reftest.list24
-rw-r--r--gfx/wr/wrench/reftests/clip/sc-mask-with-blur.pngbin0 -> 2615 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/sc-mask-with-blur.yaml18
-rw-r--r--gfx/wr/wrench/reftests/clip/segmentation-across-rotation-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/clip/segmentation-across-rotation.yaml31
-rw-r--r--gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.pngbin0 -> 763 bytes
-rw-r--r--gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml48
-rw-r--r--gfx/wr/wrench/reftests/clip/snapping-ref.yaml17
-rw-r--r--gfx/wr/wrench/reftests/clip/snapping.yaml17
-rw-r--r--gfx/wr/wrench/reftests/clip/stacking-context-clip-ref.yaml37
-rw-r--r--gfx/wr/wrench/reftests/clip/stacking-context-clip.yaml43
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/FreeSans.ttfbin0 -> 714456 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/barn-u.pngbin0 -> 18787 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/barn-v.pngbin0 -> 14845 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/barn-y.pngbin0 -> 93179 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/basic.yaml22
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml17
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml15
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/mask.pngbin0 -> 8517 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/mask.yaml20
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml17
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml20
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.pngbin0 -> 196566 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.yaml28
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml15
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/reftest.list11
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml31
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml39
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image.yaml14
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.pngbin0 -> 264965 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.yaml24
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/underlay.pngbin0 -> 222330 bytes
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/underlay.yaml30
-rw-r--r--gfx/wr/wrench/reftests/crash/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/crash/iframe-dup.yaml21
-rw-r--r--gfx/wr/wrench/reftests/crash/many-segments.yaml112
-rw-r--r--gfx/wr/wrench/reftests/crash/reftest.list2
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.pngbin0 -> 9964 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.yaml12
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-basic-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-basic.yaml21
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.pngbin0 -> 111826 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.yaml19
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-chain.pngbin0 -> 53393 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-chain.yaml12
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask.yaml28
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter.yaml25
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.pngbin0 -> 2866 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-isolation-ref.yaml20
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-isolation.yaml20
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-nested.yaml31
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface.yaml14
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.pngbin0 -> 1250 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.yaml15
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.pngbin0 -> 60136 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.yaml32
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.pngbin0 -> 7827 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.pngbin0 -> 17505 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.yaml26
-rw-r--r--gfx/wr/wrench/reftests/filters/blend-clipped.pngbin0 -> 2623 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/blend-clipped.yaml103
-rw-r--r--gfx/wr/wrench/reftests/filters/drop-shadow-inverse-scale.yaml14
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-clamping-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-clamping.yaml30
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.pngbin0 -> 43832 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-huge.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-scaled-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.pngbin0 -> 3364 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.yaml16
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur-scaled.yaml15
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur.pngbin0 -> 55138 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-blur.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness-2-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness-2.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness-3-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness-3.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness-4-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness-4.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-brightness.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-color-matrix-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-color-matrix.yaml53
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-component-transfer-ref.yaml51
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-component-transfer.yaml352
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml30
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.pngbin0 -> 3131 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml21
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.pngbin0 -> 46591 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml37
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.pngbin0 -> 12165 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.yaml27
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.pngbin0 -> 1649 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-huge.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.pngbin0 -> 11337 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled.yaml15
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow.pngbin0 -> 78605 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-drop-shadow.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-grayscale-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-grayscale.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-hue-rotate-1.yaml37
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml37
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-invert-2-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-invert-2.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-invert-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-invert.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-large-blur-radius.pngbin0 -> 108646 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-large-blur-radius.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-long-chain.pngbin0 -> 23150 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-long-chain.yaml19
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-mix-blend-mode.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling.yaml23
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-1.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-2.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-3.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-1-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-1.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-2-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-2.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-3-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-3.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-1-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-1.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-2-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-2.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-3-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-3.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-segments-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-segments.yaml24
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-small-blur-radius.pngbin0 -> 17400 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/filter-small-blur-radius.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/firefox.pngbin0 -> 45376 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/iframe-dropshadow-ref.yaml22
-rw-r--r--gfx/wr/wrench/reftests/filters/iframe-dropshadow.yaml34
-rw-r--r--gfx/wr/wrench/reftests/filters/invisible-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/filters/invisible.yaml27
-rw-r--r--gfx/wr/wrench/reftests/filters/isolated-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/filters/isolated.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/opacity-combined-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/opacity-combined.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/opacity-overlap-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/filters/opacity-overlap.yaml16
-rw-r--r--gfx/wr/wrench/reftests/filters/opacity-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/filters/opacity.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/reftest.list85
-rw-r--r--gfx/wr/wrench/reftests/filters/srgb-to-linear-2.yaml16
-rw-r--r--gfx/wr/wrench/reftests/filters/srgb-to-linear-ref.yaml15
-rw-r--r--gfx/wr/wrench/reftests/filters/srgb-to-linear.yaml16
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-blend-ref.yaml21
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-blend.yaml83
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.pngbin0 -> 5728 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.yaml16
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-blur.yaml14
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-color-matrix.yaml69
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-component-transfer.yaml382
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-composite-ref.yaml73
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-composite.yaml124
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.pngbin0 -> 11337 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml16
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.pngbin0 -> 12691 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml22
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml17
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.pngbin0 -> 79321 bytes
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.yaml16
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml10
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-offset-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-filter-offset.yaml15
-rw-r--r--gfx/wr/wrench/reftests/filters/svg-srgb-to-linear.yaml20
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-angle-wraparound.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-angle.pngbin0 -> 24700 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-angle.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-backdrop-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml18
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-backdrop.yaml16
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-center.pngbin0 -> 1695 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-center.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-color-wheel.pngbin0 -> 35963 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-color-wheel.yaml14
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-large-hard-stop-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-large-hard-stop.yaml14
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-large-ref.yaml16
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-large.yaml12
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-nan.yaml41
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-simple.pngbin0 -> 24158 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic-simple.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/conic.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_5stops.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_clamp.yaml20
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml30
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop.yaml19
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml41
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml24
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_repeat.yaml119
-rw-r--r--gfx/wr/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml119
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size.yaml10
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.pngbin0 -> 6851 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.yaml46
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-aligned-clip-ref.yaml16
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-aligned-clip.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-backdrop-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml18
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-backdrop.yaml16
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-bug-1703141.yaml12
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-clamp-1-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-clamp-1a.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-clamp-1b.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-clamp-2-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-clamp-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-double.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-far-endpoints.yaml10
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-hard-stop-ref.pngbin0 -> 2031 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large.yaml14
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-hard-stop.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-large-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-large.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-nan.yaml213
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-ref.pngbin0 -> 3227 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-repeat-clip-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-repeat-clip.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-reverse-2-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-reverse-2.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-reverse-3-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-reverse-3.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-reverse.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-stops-ref.pngbin0 -> 7360 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear-stops.yaml7
-rw-r--r--gfx/wr/wrench/reftests/gradient/linear.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-1-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-1.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-2-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-2.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-3-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-3.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-4-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-4.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-conic-degenerate.yaml14
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-1-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-1.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-2-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-2.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-3-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-3.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-4-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-4.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-linear-degenerate.yaml14
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-1-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-1.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-2-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-3-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-3.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/norm-radial-degenerate.yaml14
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.pngbin0 -> 10340 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-aligned.pngbin0 -> 11635 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-aligned.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.pngbin0 -> 19390 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-angle.pngbin0 -> 18487 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-angle.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.pngbin0 -> 14475 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-conic.pngbin0 -> 16782 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-conic.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.pngbin0 -> 14593 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-radial.pngbin0 -> 18857 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/premultiplied-radial.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-backdrop-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml18
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-backdrop.yaml16
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-circle-ref.pngbin0 -> 27523 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-circle.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-ellipse-ref.pngbin0 -> 22812 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-ellipse.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-large-ref.pngbin0 -> 36904 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-large.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-nan.yaml35
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-optimized-2-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-optimized-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-optimized-ref.yaml33
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-optimized.yaml12
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-tiling-optimized-ref.yaml24
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-tiling-optimized.yaml13
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-zero-size-1.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-zero-size-2.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-zero-size-3.yaml6
-rw-r--r--gfx/wr/wrench/reftests/gradient/radial-zero-size-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/gradient/reftest.list128
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-border-radius.pngbin0 -> 31999 bytes
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-border-radius.yaml136
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-conic-negative.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-conic-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-conic.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-linear-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-linear-reverse.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-linear.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-radial-negative.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-radial-ref.yaml38
-rw-r--r--gfx/wr/wrench/reftests/gradient/repeat-radial.yaml9
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-conic-1-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-conic-1.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-conic-2-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-conic-2.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-conic-3-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-conic-3.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-linear-1-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-linear-1.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-linear-2-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-linear-2.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-linear-3-ref.yaml15
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-linear-3.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-1-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-1.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-2-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-2.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-3-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-3.yaml11
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-4-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/gradient/tiling-radial-4.yaml11
-rw-r--r--gfx/wr/wrench/reftests/image/colorrect.pngbin0 -> 256 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/downscale.pngbin0 -> 10613 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/downscale.yaml18
-rw-r--r--gfx/wr/wrench/reftests/image/firefox.pngbin0 -> 25927 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/green-alpha-ref.yaml4
-rw-r--r--gfx/wr/wrench/reftests/image/image-alpha-stretch-tile.yaml8
-rw-r--r--gfx/wr/wrench/reftests/image/image-alpha-stretch.yaml6
-rw-r--r--gfx/wr/wrench/reftests/image/image-filter-stretch-tile.yaml10
-rw-r--r--gfx/wr/wrench/reftests/image/image-filter-stretch.yaml8
-rw-r--r--gfx/wr/wrench/reftests/image/occlusion.pngbin0 -> 57660 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/occlusion.yaml15
-rw-r--r--gfx/wr/wrench/reftests/image/reftest.list19
-rw-r--r--gfx/wr/wrench/reftests/image/rgb_composite.yaml10
-rw-r--r--gfx/wr/wrench/reftests/image/rgb_composite_ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/image/segments.pngbin0 -> 7200 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/segments.yaml12
-rw-r--r--gfx/wr/wrench/reftests/image/spacex-u.pngbin0 -> 81302 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/spacex-uv.pngbin0 -> 202309 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/spacex-v.pngbin0 -> 97851 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/spacex-y.pngbin0 -> 128761 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/spacex-yuv.pngbin0 -> 310131 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/texture-rect-ref.yaml15
-rw-r--r--gfx/wr/wrench/reftests/image/texture-rect.yaml7
-rw-r--r--gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml17
-rw-r--r--gfx/wr/wrench/reftests/image/tile-size-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/image/tile-size.yaml19
-rw-r--r--gfx/wr/wrench/reftests/image/tile-with-spacing-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/image/tile-with-spacing.yaml12
-rw-r--r--gfx/wr/wrench/reftests/image/tiled-clip-chain-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/image/tiled-clip-chain.yaml11
-rw-r--r--gfx/wr/wrench/reftests/image/tiled-complex-clip-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/image/tiled-complex-clip.yaml13
-rw-r--r--gfx/wr/wrench/reftests/image/very-big-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/image/very-big-tile-size-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/image/very-big-tile-size.yaml9
-rw-r--r--gfx/wr/wrench/reftests/image/very-big.yaml5
-rw-r--r--gfx/wr/wrench/reftests/image/yuv-clip.yaml26
-rw-r--r--gfx/wr/wrench/reftests/image/yuv.pngbin0 -> 620802 bytes
-rw-r--r--gfx/wr/wrench/reftests/image/yuv.yaml19
-rw-r--r--gfx/wr/wrench/reftests/mask/aligned-layer-rect-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/mask/aligned-layer-rect.yaml17
-rw-r--r--gfx/wr/wrench/reftests/mask/checkerboard-tiling.yaml18
-rw-r--r--gfx/wr/wrench/reftests/mask/checkerboard.pngbin0 -> 4958 bytes
-rw-r--r--gfx/wr/wrench/reftests/mask/checkerboard.yaml15
-rw-r--r--gfx/wr/wrench/reftests/mask/circle.pngbin0 -> 4928 bytes
-rw-r--r--gfx/wr/wrench/reftests/mask/green.yaml6
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-atomicity-ref.yaml17
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-atomicity-tiling.yaml28
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-atomicity.yaml27
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.pngbin0 -> 2694 bytes
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.yaml26
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-perspective-tiling.yaml25
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-perspective.pngbin0 -> 279 bytes
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-perspective.yaml24
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-tiling.yaml16
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml25
-rw-r--r--gfx/wr/wrench/reftests/mask/mask.pngbin0 -> 187 bytes
-rw-r--r--gfx/wr/wrench/reftests/mask/mask.yaml15
-rw-r--r--gfx/wr/wrench/reftests/mask/missing-mask-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/mask/missing-mask.yaml14
-rw-r--r--gfx/wr/wrench/reftests/mask/nested-mask-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/mask/nested-mask-tiling.yaml23
-rw-r--r--gfx/wr/wrench/reftests/mask/nested-mask.yaml21
-rw-r--r--gfx/wr/wrench/reftests/mask/out-of-bounds.yaml16
-rw-r--r--gfx/wr/wrench/reftests/mask/reftest.list18
-rw-r--r--gfx/wr/wrench/reftests/mask/rounded-corners.pngbin0 -> 1697 bytes
-rw-r--r--gfx/wr/wrench/reftests/mask/rounded-corners.yaml24
-rw-r--r--gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.pngbin0 -> 5314 bytes
-rw-r--r--gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.yaml30
-rw-r--r--gfx/wr/wrench/reftests/mask/tiny-check-mask.pngbin0 -> 138 bytes
-rw-r--r--gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice.yaml10
-rw-r--r--gfx/wr/wrench/reftests/performance/no-clip-mask.pngbin0 -> 3201 bytes
-rw-r--r--gfx/wr/wrench/reftests/performance/no-clip-mask.yaml24
-rw-r--r--gfx/wr/wrench/reftests/performance/reftest.list2
-rw-r--r--gfx/wr/wrench/reftests/reftest.list19
-rw-r--r--gfx/wr/wrench/reftests/scrolling/ancestor-scroll-frames.yaml37
-rw-r--r--gfx/wr/wrench/reftests/scrolling/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property.yaml33
-rw-r--r--gfx/wr/wrench/reftests/scrolling/empty-mask-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/empty-mask.yaml20
-rw-r--r--gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1.yaml14
-rw-r--r--gfx/wr/wrench/reftests/scrolling/fixed-position-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml33
-rw-r--r--gfx/wr/wrench/reftests/scrolling/fixed-position.yaml52
-rw-r--r--gfx/wr/wrench/reftests/scrolling/mask.pngbin0 -> 282 bytes
-rw-r--r--gfx/wr/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/nested-scroll-offset.yaml16
-rw-r--r--gfx/wr/wrench/reftests/scrolling/nested-stickys-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/scrolling/nested-stickys.yaml20
-rw-r--r--gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll.yaml10
-rw-r--r--gfx/wr/wrench/reftests/scrolling/reftest.list25
-rw-r--r--gfx/wr/wrench/reftests/scrolling/root-scroll-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/scrolling/root-scroll.yaml7
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scale-offsets-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scale-offsets.yaml18
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-frame-order-ref.yaml34
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-frame-order.yaml35
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-generation-1.yaml18
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-generation-2.yaml19
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-generation-3.yaml20
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-generation-4.yaml13
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-generation-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-layer-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/scroll-layer.yaml10
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip.yaml23
-rw-r--r--gfx/wr/wrench/reftests/scrolling/simple-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/scrolling/simple.yaml22
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky-applied-ref.yaml70
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky-applied.yaml367
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml257
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky-ref.yaml40
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky-transformed-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky-transformed.yaml21
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky.yaml203
-rw-r--r--gfx/wr/wrench/reftests/scrolling/translate-nested-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/scrolling/translate-nested.yaml29
-rw-r--r--gfx/wr/wrench/reftests/scrolling/viewport-offset-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/scrolling/viewport-offset.yaml23
-rw-r--r--gfx/wr/wrench/reftests/snap/1761299-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/snap/1761299.yaml12
-rw-r--r--gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/snap/fractional-filter.yaml14
-rw-r--r--gfx/wr/wrench/reftests/snap/preserve-3d.pngbin0 -> 6833 bytes
-rw-r--r--gfx/wr/wrench/reftests/snap/preserve-3d.yaml55
-rw-r--r--gfx/wr/wrench/reftests/snap/reftest.list6
-rw-r--r--gfx/wr/wrench/reftests/snap/snap.pngbin0 -> 164 bytes
-rw-r--r--gfx/wr/wrench/reftests/snap/snap.yaml15
-rw-r--r--gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml13
-rw-r--r--gfx/wr/wrench/reftests/snap/transform.pngbin0 -> 412 bytes
-rw-r--r--gfx/wr/wrench/reftests/snap/transform.yaml19
-rw-r--r--gfx/wr/wrench/reftests/split/cross-ref.yaml36
-rw-r--r--gfx/wr/wrench/reftests/split/cross.yaml24
-rw-r--r--gfx/wr/wrench/reftests/split/filter-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/split/filter.yaml21
-rw-r--r--gfx/wr/wrench/reftests/split/gradient-ref.yaml39
-rw-r--r--gfx/wr/wrench/reftests/split/gradient.yaml42
-rw-r--r--gfx/wr/wrench/reftests/split/intermediate-1-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/split/intermediate-1.yaml38
-rw-r--r--gfx/wr/wrench/reftests/split/intermediate-2.yaml34
-rw-r--r--gfx/wr/wrench/reftests/split/mixed-order-ref.yaml22
-rw-r--r--gfx/wr/wrench/reftests/split/mixed-order.yaml25
-rw-r--r--gfx/wr/wrench/reftests/split/near-plane.pngbin0 -> 3210 bytes
-rw-r--r--gfx/wr/wrench/reftests/split/near-plane.yaml16
-rw-r--r--gfx/wr/wrench/reftests/split/nested-coord-systems-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/split/nested-coord-systems.yaml28
-rw-r--r--gfx/wr/wrench/reftests/split/nested-preserve3d-crash.yaml37
-rw-r--r--gfx/wr/wrench/reftests/split/nested-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/split/nested.yaml25
-rw-r--r--gfx/wr/wrench/reftests/split/order-1-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/split/order-1.yaml20
-rw-r--r--gfx/wr/wrench/reftests/split/order-2-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/split/order-2.yaml27
-rw-r--r--gfx/wr/wrench/reftests/split/order-3-ref.yaml15
-rw-r--r--gfx/wr/wrench/reftests/split/order-3.yaml31
-rw-r--r--gfx/wr/wrench/reftests/split/ordering-ref.yaml15
-rw-r--r--gfx/wr/wrench/reftests/split/ordering.yaml25
-rw-r--r--gfx/wr/wrench/reftests/split/perspective-clipping-ref.yaml9
-rw-r--r--gfx/wr/wrench/reftests/split/perspective-clipping.yaml23
-rw-r--r--gfx/wr/wrench/reftests/split/reftest.list22
-rw-r--r--gfx/wr/wrench/reftests/split/same-plane.pngbin0 -> 4279 bytes
-rw-r--r--gfx/wr/wrench/reftests/split/same-plane.yaml33
-rw-r--r--gfx/wr/wrench/reftests/split/simple-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/split/simple.yaml24
-rw-r--r--gfx/wr/wrench/reftests/split/split-intersect1-ref.yaml15
-rw-r--r--gfx/wr/wrench/reftests/split/split-intersect1.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/1658-ref.yaml26
-rw-r--r--gfx/wr/wrench/reftests/text/1658.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/Ahem.ttfbin0 -> 21768 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/FreeSans.ttfbin0 -> 714456 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/Proggy-License.txt10
-rw-r--r--gfx/wr/wrench/reftests/text/Proggy.ttfbin0 -> 5284 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/VeraBd.ttfbin0 -> 58716 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/ahem-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/ahem.yaml219
-rw-r--r--gfx/wr/wrench/reftests/text/allow-subpixel-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/text/allow-subpixel.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/alpha-transform.pngbin0 -> 23933 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/alpha-transform.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.pngbin0 -> 19462 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml48
-rw-r--r--gfx/wr/wrench/reftests/text/border-radius-alpha.pngbin0 -> 14077 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/border-radius-subpx.pngbin0 -> 14413 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/border-radius.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/clipped-transform.pngbin0 -> 1790 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/clipped-transform.yaml12
-rw-r--r--gfx/wr/wrench/reftests/text/color-bitmap-shadow-ref.yaml30
-rw-r--r--gfx/wr/wrench/reftests/text/color-bitmap-shadow.yaml34
-rw-r--r--gfx/wr/wrench/reftests/text/colors-alpha.pngbin0 -> 101403 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/colors-subpx.pngbin0 -> 133545 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/colors.yaml211
-rw-r--r--gfx/wr/wrench/reftests/text/decorations-ref.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/decorations-suite.pngbin0 -> 23790 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/decorations-suite.yaml348
-rw-r--r--gfx/wr/wrench/reftests/text/decorations.yaml36
-rw-r--r--gfx/wr/wrench/reftests/text/diacritics-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/text/diacritics.yaml6
-rw-r--r--gfx/wr/wrench/reftests/text/embedded-bitmaps.pngbin0 -> 2288 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/embedded-bitmaps.yaml9
-rw-r--r--gfx/wr/wrench/reftests/text/intermediate-transform.yaml54
-rw-r--r--gfx/wr/wrench/reftests/text/isolated-text.pngbin0 -> 7159 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/isolated-text.yaml14
-rw-r--r--gfx/wr/wrench/reftests/text/large-glyphs.yaml8
-rw-r--r--gfx/wr/wrench/reftests/text/large-line-decoration.yaml43
-rw-r--r--gfx/wr/wrench/reftests/text/long-text.yaml610
-rw-r--r--gfx/wr/wrench/reftests/text/mix-blend-layers-ref.yaml50
-rw-r--r--gfx/wr/wrench/reftests/text/mix-blend-layers.yaml53
-rw-r--r--gfx/wr/wrench/reftests/text/negative-pos.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/non-opaque-notref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/non-opaque.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/perspective-clip.pngbin0 -> 1701 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/perspective-clip.yaml28
-rw-r--r--gfx/wr/wrench/reftests/text/raster-space-snap-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/raster-space-snap.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/raster-space.pngbin0 -> 62107 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/raster-space.yaml29
-rw-r--r--gfx/wr/wrench/reftests/text/raster_root_C_8192.yaml391
-rw-r--r--gfx/wr/wrench/reftests/text/raster_root_C_ref.yaml391
-rw-r--r--gfx/wr/wrench/reftests/text/reftest.list82
-rw-r--r--gfx/wr/wrench/reftests/text/rotate-snap-clip-ref.yaml26
-rw-r--r--gfx/wr/wrench/reftests/text/rotate-snap-clip.yaml29
-rw-r--r--gfx/wr/wrench/reftests/text/rotate-snap-filter-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/text/rotate-snap-filter.yaml16
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-atomic-ref.yaml81
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-atomic.yaml42
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-border.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-clip-rect.yaml45
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-clip-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-clip.yaml26
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-clipped-text.yaml24
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-complex.yaml46
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-cover-1.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-cover-2.yaml26
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-fast-clip-ref.yaml23
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-fast-clip.yaml24
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-grey-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-grey-transparent.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-grey.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-huge-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-huge.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-image.yaml14
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-many.yaml30
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-ordering-ref.yaml131
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-ordering.yaml48
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-partial-glyph-ref.yaml50
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-partial-glyph.yaml43
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-red-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-red.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-ref.yaml25
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-rotate.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-single.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-solid-ref.yaml16
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-transforms.pngbin0 -> 94776 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/shadow-transforms.yaml58
-rw-r--r--gfx/wr/wrench/reftests/text/shadow.yaml33
-rw-r--r--gfx/wr/wrench/reftests/text/snap-clip-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/text/snap-clip.yaml8
-rw-r--r--gfx/wr/wrench/reftests/text/snap-text-offset-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/text/snap-text-offset.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/split-batch-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/split-batch.yaml18
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-rotate.pngbin0 -> 19021 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-rotate.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-scale.pngbin0 -> 14069 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-scale.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-skew.pngbin0 -> 15332 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-skew.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-translate-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/text/subpixel-translate.yaml13
-rw-r--r--gfx/wr/wrench/reftests/text/subpx-bg-mask-ref.yaml8
-rw-r--r--gfx/wr/wrench/reftests/text/subpx-bg-mask.yaml28
-rw-r--r--gfx/wr/wrench/reftests/text/subtle-shadow-ref.yaml27
-rw-r--r--gfx/wr/wrench/reftests/text/subtle-shadow.yaml21
-rw-r--r--gfx/wr/wrench/reftests/text/synthetic-bold-not-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/text/synthetic-bold-transparent-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/synthetic-bold-transparent.yaml7
-rw-r--r--gfx/wr/wrench/reftests/text/synthetic-bold.yaml6
-rw-r--r--gfx/wr/wrench/reftests/text/synthetic-italics-custom.yaml7
-rw-r--r--gfx/wr/wrench/reftests/text/synthetic-italics-ref.yaml5
-rw-r--r--gfx/wr/wrench/reftests/text/synthetic-italics.yaml7
-rw-r--r--gfx/wr/wrench/reftests/text/text-fixed-slice-fast.pngbin0 -> 5353 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/text-fixed-slice-slow.pngbin0 -> 7081 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/text-fixed-slice.yaml27
-rw-r--r--gfx/wr/wrench/reftests/text/text.yaml10
-rw-r--r--gfx/wr/wrench/reftests/text/transparent-no-aa-ref.yaml17
-rw-r--r--gfx/wr/wrench/reftests/text/transparent-no-aa.yaml9
-rw-r--r--gfx/wr/wrench/reftests/text/two-shadows.pngbin0 -> 11313 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/two-shadows.yaml24
-rw-r--r--gfx/wr/wrench/reftests/text/white-opacity.pngbin0 -> 8266 bytes
-rw-r--r--gfx/wr/wrench/reftests/text/white-opacity.yaml17
-rw-r--r--gfx/wr/wrench/reftests/text/writing-modes-ref.yaml19
-rw-r--r--gfx/wr/wrench/reftests/text/writing-modes.yaml15
-rw-r--r--gfx/wr/wrench/reftests/tiles/complex-shared-clip-root-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/tiles/complex-shared-clip-root.yaml25
-rw-r--r--gfx/wr/wrench/reftests/tiles/mix-blend-clip-ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/tiles/mix-blend-clip.yaml31
-rw-r--r--gfx/wr/wrench/reftests/tiles/prim-suite.yaml45
-rw-r--r--gfx/wr/wrench/reftests/tiles/rect.yaml6
-rw-r--r--gfx/wr/wrench/reftests/tiles/reftest.list7
-rw-r--r--gfx/wr/wrench/reftests/tiles/simple-gradient.yaml9
-rw-r--r--gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.pngbin0 -> 11245 bytes
-rw-r--r--gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.yaml43
-rw-r--r--gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml10
-rw-r--r--gfx/wr/wrench/reftests/transforms/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale-2.pngbin0 -> 4234 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale-2.yaml19
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale-3.pngbin0 -> 4058 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale-3.yaml19
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale-4.pngbin0 -> 4064 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale-4.yaml19
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale.pngbin0 -> 4879 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-scale.yaml19
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-zoom.pngbin0 -> 26360 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/border-zoom.yaml22
-rw-r--r--gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/transforms/clip-translate.yaml23
-rw-r--r--gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml24
-rw-r--r--gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.pngbin0 -> 36363 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml17
-rw-r--r--gfx/wr/wrench/reftests/transforms/content-offset.pngbin0 -> 2121 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/content-offset.yaml18
-rw-r--r--gfx/wr/wrench/reftests/transforms/coord-system.pngbin0 -> 3400 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/coord-system.yaml24
-rw-r--r--gfx/wr/wrench/reftests/transforms/firefox.pngbin0 -> 45376 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml20
-rw-r--r--gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml23
-rw-r--r--gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/transforms/flatten-twice.yaml21
-rw-r--r--gfx/wr/wrench/reftests/transforms/image-rotated-clip.pngbin0 -> 3816 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml19
-rw-r--r--gfx/wr/wrench/reftests/transforms/image.pngbin0 -> 528 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/large-raster-root.yaml14
-rw-r--r--gfx/wr/wrench/reftests/transforms/local-clip.pngbin0 -> 2167 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/local-clip.yaml26
-rw-r--r--gfx/wr/wrench/reftests/transforms/near-plane-clip.pngbin0 -> 70226 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml18
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml23
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml24
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-preserve-3d.pngbin0 -> 3793 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml28
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.pngbin0 -> 4539 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml27
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-rotate-x.pngbin0 -> 3789 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml27
-rw-r--r--gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml23
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-border-radius.pngbin0 -> 12013 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml26
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml24
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml23
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-clip-1.pngbin0 -> 2023 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml30
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-clip.pngbin0 -> 17216 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-clip.yaml27
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-mask.pngbin0 -> 2159 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-mask.yaml24
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-origin.pngbin0 -> 46673 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-origin.yaml16
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-shadow.pngbin0 -> 9496 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml27
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-surface-scale.pngbin0 -> 40725 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml14
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective.pngbin0 -> 127232 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/perspective.yaml54
-rw-r--r--gfx/wr/wrench/reftests/transforms/prim-suite.pngbin0 -> 51496 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/prim-suite.yaml45
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml35
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml28
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml20
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml10
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml14
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml26
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml26
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml14
-rw-r--r--gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml14
-rw-r--r--gfx/wr/wrench/reftests/transforms/reftest.list59
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotate-clip.yaml19
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotated-clip-large.pngbin0 -> 7414 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml17
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotated-clip.pngbin0 -> 3783 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotated-clip.yaml17
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotated-image.pngbin0 -> 7396 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/rotated-image.yaml72
-rw-r--r--gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.pngbin0 -> 74583 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml22
-rw-r--r--gfx/wr/wrench/reftests/transforms/screen-space-blit.pngbin0 -> 73794 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml22
-rw-r--r--gfx/wr/wrench/reftests/transforms/screen-space-blur.pngbin0 -> 230748 bytes
-rw-r--r--gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml20
-rw-r--r--gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml22
-rw-r--r--gfx/wr/wrench/reftests/transforms/segments-bug.yaml26
-rw-r--r--gfx/wr/wrench/reftests/transforms/singular-ref.yaml28
-rw-r--r--gfx/wr/wrench/reftests/transforms/singular.yaml39
-rw-r--r--gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml19
-rw-r--r--gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml21
-rw-r--r--gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml12
-rw-r--r--gfx/wr/wrench/reftests/transforms/strange-w.yaml15
1050 files changed, 21617 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml b/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml
new file mode 100644
index 0000000000..c83fff2a0b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: [340, 184, 50, 20]
diff --git a/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml b/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml
new file mode 100644
index 0000000000..bac51368e9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml
@@ -0,0 +1,48 @@
+# Test that when the AA range is > 1, the AA is correctly applied to
+# an ellipse clip. This is a regression test for issue #2576.
+# The rectangles below mask out most of the box shadow and rounded
+# corners, which are not relevant to what is being tested here.
+---
+root:
+ items:
+ - type: stacking-context
+ transform: rotate-z(-45) rotate-x(-60)
+ transform-origin: 300 300
+ items:
+ - type: box-shadow
+ bounds: [0, 0, 150, 150]
+ color: black
+ offset: [150, 50]
+ border-radius: 8
+
+ - type: clip
+ id: 2
+ complex:
+ - rect: [90, 0, 150, 150]
+ radius: 8
+
+ - type: clip-chain
+ id: 10
+ clips: [2]
+
+ - type: rect
+ color: red
+ border-radius: 8
+ bounds: [90, 0, 150, 150]
+ clip-chain: 10
+
+ - type: rect
+ color: white
+ bounds: [250, 100, 240, 84]
+
+ - type: rect
+ color: white
+ bounds: [250, 204, 240, 70]
+
+ - type: rect
+ color: white
+ bounds: [240, 100, 100, 150]
+
+ - type: rect
+ color: white
+ bounds: [390, 100, 100, 150]
diff --git a/gfx/wr/wrench/reftests/aa/fractional-nine-patch.png b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.png
new file mode 100644
index 0000000000..37e1e80496
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml
new file mode 100644
index 0000000000..3fe5d9cb52
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - bounds: 0 0 450 400
+ type: rect
+ color: white
+ - type: stacking-context
+ bounds: 50.0 50.0 0 0
+ transform: [0.9999767, 8.142047e-6, 0.0, 0.0, 1.6284093e-5, 0.9999767, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0019226074, 0.0019683838, 0.0, 1.0]
+ items:
+ - type: stacking-context
+ items:
+ - type: clip
+ id: 3
+ complex:
+ - rect: [0, 0, 375, 300]
+ radius: 12
+ - type: rect
+ bounds: 0 0 375 300
+ color: red
+ clip-chain: [3]
diff --git a/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml b/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml
new file mode 100644
index 0000000000..364d6e7529
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 20 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 140 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 260 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 380 50 100 100
+ color: blue
diff --git a/gfx/wr/wrench/reftests/aa/fractional-radii.yaml b/gfx/wr/wrench/reftests/aa/fractional-radii.yaml
new file mode 100644
index 0000000000..cf61cd27b6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/fractional-radii.yaml
@@ -0,0 +1,54 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [20, 50, 100, 100]
+ radius: 0
+ - type: clip-chain
+ id: 10
+ clips: [2]
+ - type: rect
+ bounds: 20 50 100 100
+ color: blue
+ clip-chain: 10
+
+ - type: clip
+ id: 3
+ complex:
+ - rect: [140, 50, 100, 100]
+ radius: 0.001
+ - type: clip-chain
+ id: 11
+ clips: [3]
+ - type: rect
+ bounds: 140 50 100 100
+ color: blue
+ clip-chain: 11
+
+ - type: clip
+ id: 4
+ complex:
+ - rect: [260, 50, 100, 100]
+ radius: 0.01
+ - type: clip-chain
+ id: 12
+ clips: [4]
+ - type: rect
+ bounds: 260 50 100 100
+ color: blue
+ clip-chain: 12
+
+ - type: clip
+ id: 5
+ complex:
+ - rect: [380, 50, 100, 100]
+ radius: 0.1
+ - type: clip-chain
+ id: 13
+ clips: [5]
+ - type: rect
+ bounds: 380 50 100 100
+ color: blue
+ clip-chain: 13
diff --git a/gfx/wr/wrench/reftests/aa/indirect-rotate.png b/gfx/wr/wrench/reftests/aa/indirect-rotate.png
new file mode 100644
index 0000000000..2110c35e15
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/indirect-rotate.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/aa/indirect-rotate.yaml b/gfx/wr/wrench/reftests/aa/indirect-rotate.yaml
new file mode 100644
index 0000000000..1478c613aa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/indirect-rotate.yaml
@@ -0,0 +1,16 @@
+# Verify that we select correct blend mode for indirect rotated primitives with an
+# axis-aligned clip. This allows SWGL to correctly apply the native AA.
+---
+root:
+ items:
+ - type: clip
+ bounds: 110 100 180 200
+ id: 3
+ - bounds: 100 100 200 100
+ type: stacking-context
+ transform: rotate-y(10) rotate-x(30)
+ clip-chain: [3]
+ items:
+ - type: rect
+ bounds: 0 0 200 100
+ color: blue
diff --git a/gfx/wr/wrench/reftests/aa/reftest.list b/gfx/wr/wrench/reftests/aa/reftest.list
new file mode 100644
index 0000000000..77a05f4f6d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/reftest.list
@@ -0,0 +1,6 @@
+skip_on(android) fuzzy(1,1) fuzzy-if(platform(swgl),4,27) == rounded-rects.yaml rounded-rects-ref.png # Too wide for Android
+== aa-dist-bug.yaml aa-dist-bug-ref.yaml
+fuzzy-if(env(android,device),6,792) == fractional-radii.yaml fractional-radii-ref.yaml
+platform(linux) == fractional-nine-patch.yaml fractional-nine-patch.png
+platform(linux) == indirect-rotate.yaml indirect-rotate.png
+platform(linux) == rotated-line.yaml rotated-line.png
diff --git a/gfx/wr/wrench/reftests/aa/rotated-line.png b/gfx/wr/wrench/reftests/aa/rotated-line.png
new file mode 100644
index 0000000000..054ccfda58
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/rotated-line.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/aa/rotated-line.yaml b/gfx/wr/wrench/reftests/aa/rotated-line.yaml
new file mode 100644
index 0000000000..19f1c2c57f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/rotated-line.yaml
@@ -0,0 +1,13 @@
+# Ensure that under certain transformations with single pixel width
+# lines, the AA is applied correctly along the primitive
+---
+root:
+ items:
+ -
+ type: stacking-context
+ transform-origin: 200 200
+ transform: rotate(45)
+ items:
+ - type: rect
+ bounds: 200 200 1 200
+ color: black
diff --git a/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png b/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png
new file mode 100644
index 0000000000..73fb98446b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/aa/rounded-rects.yaml b/gfx/wr/wrench/reftests/aa/rounded-rects.yaml
new file mode 100644
index 0000000000..9554707e31
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/rounded-rects.yaml
@@ -0,0 +1,56 @@
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ items:
+ - type: clip
+ id: 3
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ -
+ type: "clip-chain"
+ id: 10
+ clips: [3]
+
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
+ clip-chain: 10
+
+ - type: clip
+ id: 4
+ complex:
+ - rect: [270, 50, 200, 200]
+ radius: [16, 32, 48, 64]
+ -
+ type: "clip-chain"
+ id: 11
+ clips: [4]
+
+ - type: rect
+ bounds: 270 50 200 200
+ color: green
+ clip-chain: 11
+
+ - type: clip
+ id: 5
+ complex:
+ - rect: [490, 50, 500, 500]
+ radius: {
+ top-left: [32, 16],
+ top-right: [40, 24],
+ bottom-left: [48, 64],
+ bottom-right: [52, 80],
+ }
+ -
+ type: "clip-chain"
+ id: 12
+ clips: [5]
+
+ - type: rect
+ bounds: 490 50 500 500
+ color: blue
+ clip-chain: 12 \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml b/gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml
new file mode 100644
index 0000000000..1a7be55eae
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml
@@ -0,0 +1,18 @@
+# In this test, the leaf green rectangle has only its back visible
+# due to rotate-x(180) transformation, preserve-3d style,
+# and "backface-visible = false", so it's completely hidden.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ backface-visible: false
diff --git a/gfx/wr/wrench/reftests/backface/backface-both-sides-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-both-sides-ref.yaml
new file mode 100644
index 0000000000..aa0bd8e57c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-both-sides-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ color: red
+ bounds: 100 0 100 100
diff --git a/gfx/wr/wrench/reftests/backface/backface-both-sides.yaml b/gfx/wr/wrench/reftests/backface/backface-both-sides.yaml
new file mode 100644
index 0000000000..0212c3002d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-both-sides.yaml
@@ -0,0 +1,25 @@
+# In this test, both rectangles have invisible back faces and are
+# parented to a preserve-3d context that is rotated by 180 degrees.
+# The red one is also rotated 180 degrees, and should be visible.
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-style: preserve-3d
+ transform-origin: 50 50
+ items:
+ - type: rect
+ color: green
+ bounds: 0 0 100 100
+ backface-visible: false
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-origin: 0 0
+ backface-visible: false
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 100 100
diff --git a/gfx/wr/wrench/reftests/backface/backface-double-flip.yaml b/gfx/wr/wrench/reftests/backface/backface-double-flip.yaml
new file mode 100644
index 0000000000..b242e95627
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-double-flip.yaml
@@ -0,0 +1,21 @@
+# In this test, the red rectangle has backface visibility turned off.
+# However its world transformation makes it front-facing.
+# However it's still invisible because it's back-facing in the picture space
+# of the transformed stacking context.
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-style: preserve-3d
+ transform-origin: 50 50
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ items:
+ - type: rect
+ color: red
+ backface-visible: false
+ bounds: 0 0 100 100
diff --git a/gfx/wr/wrench/reftests/backface/backface-flatten.yaml b/gfx/wr/wrench/reftests/backface/backface-flatten.yaml
new file mode 100644
index 0000000000..e754d45bc9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-flatten.yaml
@@ -0,0 +1,31 @@
+# In this test, there is a flattened ref frame between an element
+# and the picture it's rendered into. The element should be considered
+# invisible as it's back face oriented at this flattening step.
+# If WR only checks the "final" transform, it will consider it visible.
+
+---
+root:
+ transform: rotate-x(1)
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ #transform: rotate-x(1)
+ items:
+ - type: stacking-context
+ bounds: 0 0 200 200
+ transform: rotate-y(30)
+ transform-style: flat
+ items:
+ - type: stacking-context
+ bounds: 0 0 200 200
+ transform: rotate-y(-100)
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ #transform: rotate-x(1)
+ transform-style: flat
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ backface-visible: false
diff --git a/gfx/wr/wrench/reftests/backface/backface-hidden.yaml b/gfx/wr/wrench/reftests/backface/backface-hidden.yaml
new file mode 100644
index 0000000000..afa9d653b8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-hidden.yaml
@@ -0,0 +1,18 @@
+# In this test, the leaf green rectangle has only its back visible
+# due to rotate-x(180) transformation,
+# and "backface-visible = false", so it's completely hidden.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform: rotate-x(180)
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: green
+ backface-visible: false
diff --git a/gfx/wr/wrench/reftests/backface/backface-leaf-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-leaf-ref.yaml
new file mode 100644
index 0000000000..17d39b4d61
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-leaf-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 568 200 200
+ color: green
diff --git a/gfx/wr/wrench/reftests/backface/backface-leaf.yaml b/gfx/wr/wrench/reftests/backface/backface-leaf.yaml
new file mode 100644
index 0000000000..d1c1b893be
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-leaf.yaml
@@ -0,0 +1,16 @@
+# In this test, the leaf green rectangle "backface-visible = false" which is ignored
+# because it doesn't have any transform, and it's not in preserve-3d context.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ backface-visible: false
diff --git a/gfx/wr/wrench/reftests/backface/backface-perspective-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-perspective-ref.yaml
new file mode 100644
index 0000000000..1427b57dd9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-perspective-ref.yaml
@@ -0,0 +1,16 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 300 100
+ transform-style: flat
+ perspective: 100
+ items:
+ - type: stacking-context
+ bounds: 0 0 100 100
+ transform-style: flat
+ transform: rotate-y(-120)
+ backface-visible: true
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
diff --git a/gfx/wr/wrench/reftests/backface/backface-perspective.yaml b/gfx/wr/wrench/reftests/backface/backface-perspective.yaml
new file mode 100644
index 0000000000..cb52c9a584
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-perspective.yaml
@@ -0,0 +1,20 @@
+# Checks a special case where CSS has both perspective and a transform.
+# In this case, the backface visibility should be computed based on the perspective
+# parent, not the immediate parent.
+# The immediate parent is `rotate-y(-120)`, which is obviously back facing.
+# But perspective transform makes it front-facing (since the frustum side panels are rotated even more).
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 300 100
+ perspective: 100
+ items:
+ - type: stacking-context
+ bounds: 0 0 100 100
+ transform: rotate-y(-120)
+ paired-with-perspective: true
+ backface-visible: false
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
diff --git a/gfx/wr/wrench/reftests/backface/backface-picture-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-picture-ref.yaml
new file mode 100644
index 0000000000..3013f72f20
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-picture-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 100 100
diff --git a/gfx/wr/wrench/reftests/backface/backface-picture.yaml b/gfx/wr/wrench/reftests/backface/backface-picture.yaml
new file mode 100644
index 0000000000..189c23d5b5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-picture.yaml
@@ -0,0 +1,21 @@
+# In this test we ensure that "backface-visiblity" property
+# is not inherited, and the red rect rotated by 180 degrees
+# is still rendered.
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ backface-visible: false
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-origin: 50 50
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 100 100
diff --git a/gfx/wr/wrench/reftests/backface/backface-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-ref.yaml
new file mode 100644
index 0000000000..614cf5f465
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
diff --git a/gfx/wr/wrench/reftests/backface/backface-sc.yaml b/gfx/wr/wrench/reftests/backface/backface-sc.yaml
new file mode 100644
index 0000000000..350baca592
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-sc.yaml
@@ -0,0 +1,17 @@
+# This test is similar to "backface-leaf.yaml" but with the whole
+# stacking context (containing a green rect) turning invisible
+# because of the "rotate-x(180)" transform.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform: rotate-x(180)
+ backface-visible: false
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
diff --git a/gfx/wr/wrench/reftests/backface/backface-vis-3d.yaml b/gfx/wr/wrench/reftests/backface/backface-vis-3d.yaml
new file mode 100644
index 0000000000..c58026a5cc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/backface-vis-3d.yaml
@@ -0,0 +1,16 @@
+# Verifies that a 3d context selects the correct reference (containing block) spatial node.
+root:
+ items:
+ - type: stacking-context
+ bounds: 100 0 100 100
+ transform: scale-x(-1)
+ items:
+ - type: stacking-context
+ bounds: 0 0 100 100
+ transform: rotate-y(180)
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
+ backface-visible: false
diff --git a/gfx/wr/wrench/reftests/backface/blank.yaml b/gfx/wr/wrench/reftests/backface/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/backface/reftest.list b/gfx/wr/wrench/reftests/backface/reftest.list
new file mode 100644
index 0000000000..21a5e53d0c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/backface/reftest.list
@@ -0,0 +1,10 @@
+== backface-leaf.yaml backface-leaf-ref.yaml
+== backface-3d-leaf.yaml backface-ref.yaml
+== backface-hidden.yaml backface-ref.yaml
+== backface-sc.yaml backface-ref.yaml
+== backface-picture.yaml backface-picture-ref.yaml
+== backface-double-flip.yaml blank.yaml
+== backface-both-sides.yaml backface-both-sides-ref.yaml
+== backface-vis-3d.yaml blank.yaml
+== backface-flatten.yaml blank.yaml
+fuzzy(1,19) == backface-perspective.yaml backface-perspective-ref.yaml
diff --git a/gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container-ref.yaml b/gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container-ref.yaml
new file mode 100644
index 0000000000..108bdec453
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container-ref.yaml
@@ -0,0 +1,8 @@
+# verify that the results of a root-level mix-blend are available as
+# input to a backdrop-filter following that follows the blend container
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: cyan
diff --git a/gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container.yaml b/gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container.yaml
new file mode 100644
index 0000000000..899e39ab2e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/backdrop-filter-blend-container.yaml
@@ -0,0 +1,21 @@
+# verify that the results of a root-level mix-blend are available as
+# input to a backdrop-filter following that follows the blend container
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
+ - type: stacking-context
+ bounds: 0 0 100 100
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
+ - type: backdrop-filter
+ bounds: 0 0 100 100
+ filters: invert(1)
diff --git a/gfx/wr/wrench/reftests/blend/backdrop-filter-preceding-ref.yaml b/gfx/wr/wrench/reftests/blend/backdrop-filter-preceding-ref.yaml
new file mode 100644
index 0000000000..25069e8bb0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/backdrop-filter-preceding-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: cyan
+ - type: rect
+ bounds: 100 0 100 100
+ color: magenta
diff --git a/gfx/wr/wrench/reftests/blend/backdrop-filter-preceding.yaml b/gfx/wr/wrench/reftests/blend/backdrop-filter-preceding.yaml
new file mode 100644
index 0000000000..74753c2f2d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/backdrop-filter-preceding.yaml
@@ -0,0 +1,24 @@
+# verify that content preceding a root level mix-blend container is still
+# available as part of the backdrop root for subsequent backdrop-filters
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: 100 0 100 100
+ color: green
+ - type: stacking-context
+ bounds: 100 0 100 100
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
+ - type: backdrop-filter
+ bounds: 0 0 200 100
+ filters: invert(1)
diff --git a/gfx/wr/wrench/reftests/blend/blank.yaml b/gfx/wr/wrench/reftests/blend/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/blend/blend-overflow-ref.yaml b/gfx/wr/wrench/reftests/blend/blend-overflow-ref.yaml
new file mode 100644
index 0000000000..6c0c71f53f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/blend-overflow-ref.yaml
@@ -0,0 +1,14 @@
+# Ensure that we correctly calculate the UV sampling rect for the backdrop
+# Similar to the mix-blend-mode-overflowing-child.html test in Gecko
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: green
+ - type: rect
+ bounds: [50, 50, 50, 50]
+ color: black
diff --git a/gfx/wr/wrench/reftests/blend/blend-overflow.yaml b/gfx/wr/wrench/reftests/blend/blend-overflow.yaml
new file mode 100644
index 0000000000..a0a0aa53b1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/blend-overflow.yaml
@@ -0,0 +1,18 @@
+# Ensure that we correctly calculate the UV sampling rect for the backdrop
+# Similar to the mix-blend-mode-overflowing-child.html test in Gecko
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/blend/child-surface-ref.yaml b/gfx/wr/wrench/reftests/blend/child-surface-ref.yaml
new file mode 100644
index 0000000000..28e8c042d9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/child-surface-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: hue
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/gfx/wr/wrench/reftests/blend/child-surface.yaml b/gfx/wr/wrench/reftests/blend/child-surface.yaml
new file mode 100644
index 0000000000..983ecc17c1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/child-surface.yaml
@@ -0,0 +1,22 @@
+# verify that the clipping_rect of a child surface (caused by the identity filter)
+# is corrected used to select the backdrop for a mix-blend child surface
+---
+root:
+ items:
+ - type: stacking-context
+ filters: [identity]
+ items:
+ - type: stacking-context
+ blend-container: true
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: hue
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/gfx/wr/wrench/reftests/blend/darken-ref.yaml b/gfx/wr/wrench/reftests/blend/darken-ref.yaml
new file mode 100644
index 0000000000..a83cf68244
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/darken-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [10, 20, 10]
diff --git a/gfx/wr/wrench/reftests/blend/darken.yaml b/gfx/wr/wrench/reftests/blend/darken.yaml
new file mode 100644
index 0000000000..2de68d8724
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/darken.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [10, 20, 30]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [30, 20, 10]
diff --git a/gfx/wr/wrench/reftests/blend/difference-ref.yaml b/gfx/wr/wrench/reftests/blend/difference-ref.yaml
new file mode 100644
index 0000000000..b913384f24
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/difference-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 0]
diff --git a/gfx/wr/wrench/reftests/blend/difference-transparent-ref.yaml b/gfx/wr/wrench/reftests/blend/difference-transparent-ref.yaml
new file mode 100644
index 0000000000..8ed801fb15
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/difference-transparent-ref.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+
+ # First blend black rect with green in place
+ # Cs = (1 - αb) x Cs + αb x B(Cb, Cs)
+ # B(Cb, Cs) = | Cb - Cs | = (0, 0, 0)
+ # 0.5 * (0, 255, 0) + 0.5 * (0, 0, 0) = (0, 127.5, 0)
+ #
+ # Now, composite the resulting color with src-over; the alpha is the original alpha for the top layer
+ # while the color is the blending result
+ # co = αs x Fa x Cs + αb x Fb x Cb - this is premultiplied
+ # αo = αs + αb x (1 – αs)
+ # Source over: Fa = 1; Fb = 1 – αs
+ # co = 0.5 * 1 * (0, 127.5, 0) + 0.5 * 0.5 * (0, 255, 0) = (0, 63.5, 0) + 0.25 * (0, 255, 0) = (0, 127.5, 0)
+ # ao = 0.5 + 0.5 * 0.5 = 0.75
+ # Co = co/ao = (0, 127.5, 0) / 0.75
+ #
+ # Now alpha composite on white background
+ # co = 0.75 * 1 * (0, 127.5, 0) / 0.75 + 1 * 0.25 * (255, 255, 255) = (0, 127.5, 0) + (63.75, 63.75, 63.75) = (63.75, 159, 63.75) = (64, 191, 64)
+ color: [64, 191, 64]
diff --git a/gfx/wr/wrench/reftests/blend/difference-transparent.yaml b/gfx/wr/wrench/reftests/blend/difference-transparent.yaml
new file mode 100644
index 0000000000..bd828d454a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/difference-transparent.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: white
+ # this stacking context should create an isolated group for its children
+ # causing the yellow rect to not blend with the green backdrop
+ - type: stacking-context
+ blend-container: true
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/blend/difference.yaml b/gfx/wr/wrench/reftests/blend/difference.yaml
new file mode 100644
index 0000000000..0c8d0fcd02
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/difference.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/blend/isolated-2-ref.yaml b/gfx/wr/wrench/reftests/blend/isolated-2-ref.yaml
new file mode 100644
index 0000000000..3226b6edda
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated-2-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 130, 130]
+ color: [255, 255, 0]
+ - type: stacking-context
+ bounds: [10, 10, 130, 130]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [20, 20, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ - type: rect
+ bounds: [0, 0, 80, 80]
+ color: [0, 0, 0]
diff --git a/gfx/wr/wrench/reftests/blend/isolated-2.yaml b/gfx/wr/wrench/reftests/blend/isolated-2.yaml
new file mode 100644
index 0000000000..87bbac3caa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated-2.yaml
@@ -0,0 +1,25 @@
+# translation of wpt/css-tests/compositing-1_dev/html/mix-blend-mode-stacking-context-creates-isolation.htm
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 130, 130]
+ color: [255, 255, 0]
+ # this stacking context should create an isolated group for its children
+ # inside there should be overlapping red and green rects
+ # where they intersect should be a black rect
+ # the rects should not blend with the yellow backdrop
+ - type: stacking-context
+ blend-container: true
+ bounds: [10, 10, 130, 130]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [20, 20, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml b/gfx/wr/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml
new file mode 100644
index 0000000000..f5de6dc33d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [229, 239, 229]
diff --git a/gfx/wr/wrench/reftests/blend/isolated-premultiplied-2.yaml b/gfx/wr/wrench/reftests/blend/isolated-premultiplied-2.yaml
new file mode 100644
index 0000000000..6836fedd84
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated-premultiplied-2.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ blend-container: true
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 100, 0, 0.1]
diff --git a/gfx/wr/wrench/reftests/blend/isolated-premultiplied.yaml b/gfx/wr/wrench/reftests/blend/isolated-premultiplied.yaml
new file mode 100644
index 0000000000..a8d738a389
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated-premultiplied.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ # this stacking context should force its parent to be an isolated group
+ # we don't want it to actually draw anything so just make it draw a white rect
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [500, 500, 100, 100]
+ color: [255, 255, 255]
+
+ # transparent white, should be invisible
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 255, 0.5]
+ # transparent white, should be invisible
+ - type: image
+ bounds: [200, 0, 100, 100]
+ src: "transparent-white.png"
diff --git a/gfx/wr/wrench/reftests/blend/isolated-ref.yaml b/gfx/wr/wrench/reftests/blend/isolated-ref.yaml
new file mode 100644
index 0000000000..0f9061997a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/gfx/wr/wrench/reftests/blend/isolated-with-filter.yaml b/gfx/wr/wrench/reftests/blend/isolated-with-filter.yaml
new file mode 100644
index 0000000000..0635b15c5e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated-with-filter.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ # the presence of this filter shouldn't break isolated groups
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(1.0)
+ blend-container: true
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/gfx/wr/wrench/reftests/blend/isolated.yaml b/gfx/wr/wrench/reftests/blend/isolated.yaml
new file mode 100644
index 0000000000..fcfd0676d7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/isolated.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ # this stacking context should create an isolated group for its children
+ # causing the yellow rect to not blend with the green backdrop
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ blend-container: true
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/gfx/wr/wrench/reftests/blend/large-ref.yaml b/gfx/wr/wrench/reftests/blend/large-ref.yaml
new file mode 100644
index 0000000000..c7e8433414
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/large-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 2000 2000
+ items:
+ - type: rect
+ bounds: 0 0 2000 2000
+ color: [0, 128, 0, 1]
diff --git a/gfx/wr/wrench/reftests/blend/large.yaml b/gfx/wr/wrench/reftests/blend/large.yaml
new file mode 100644
index 0000000000..5f15cfe332
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/large.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 2000 2000
+ blend-container: true
+ items:
+ - type: stacking-context
+ bounds: 0 0 2000 2000
+ mix-blend-mode: screen
+ items:
+ - type: rect
+ bounds: 0 0 2000 2000
+ color: [0, 128, 0, 1]
diff --git a/gfx/wr/wrench/reftests/blend/lighten-ref.yaml b/gfx/wr/wrench/reftests/blend/lighten-ref.yaml
new file mode 100644
index 0000000000..5720f140a6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/lighten-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [30, 20, 30]
diff --git a/gfx/wr/wrench/reftests/blend/lighten.yaml b/gfx/wr/wrench/reftests/blend/lighten.yaml
new file mode 100644
index 0000000000..426e2323b9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/lighten.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [10, 20, 30]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [30, 20, 10]
diff --git a/gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.png b/gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.png
new file mode 100644
index 0000000000..299f695cb5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.yaml b/gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.yaml
new file mode 100644
index 0000000000..b713e96c75
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/mix-blend-complex-transform.yaml
@@ -0,0 +1,56 @@
+---
+root:
+ items:
+ - type: stacking-context
+ transform: [
+ 1, 0, 0, 0,
+ 0.3443276, 1, 0, 0,
+ 0, 0, 1, 0,
+ -1822.09131, 0, 0, 1
+ ]
+ bounds: 12 12 0 0
+ items:
+ - type: clip
+ bounds: 0 0 1884 1290
+ id: 2
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ transform: [
+ 1, 0, 0, 0,
+ -0.3443276, 1, 0, 0,
+ 0, 0, 1, 0,
+ 444.18262, 0, 0, 1
+ ]
+ items:
+ - type: stacking-context
+ clip-chain: 3
+ transform: [
+ 1, 0, 0, 0,
+ 0.3443276, 1, 0, 0,
+ 0, 0, 1, 0,
+ -444.18262, 0, 0, 1
+ ]
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: stacking-context
+ mix-blend-mode: multiply
+ items:
+ - type: stacking-context
+ bounds: 1436 0 0 0
+ transform: [
+ 1, 0, 0, 0,
+ -0.3443276, 1, 0, 0,
+ 0, 0, 1, 0,
+ 444.18262, 0, 0, 1
+ ]
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 113.025 1290
diff --git a/gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop-ref.yaml b/gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop-ref.yaml
new file mode 100644
index 0000000000..1e204cb338
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
diff --git a/gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop.yaml b/gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop.yaml
new file mode 100644
index 0000000000..4a5f97f381
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/mix-blend-invalid-backdrop.yaml
@@ -0,0 +1,33 @@
+# Test that if the parent surface is clipped such that there
+# is no backdrop rect available, no crash occurs and output
+# is as expected (a no-op mix-blend)
+---
+root:
+ items:
+ # Ensure a filter is placed here to force this mix-blend to isolate from
+ # the tile cache backdrop - otherwise the surface won't get clipped, which
+ # is what we're trying to test.
+ - type: stacking-context
+ filters: [identity]
+ items:
+ - type: clip
+ id: 2
+ bounds: [0, 0, 100, 100]
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ blend-container: true
+ clip-chain: 3
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: stacking-context
+ bounds: [100, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml b/gfx/wr/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml
new file mode 100644
index 0000000000..ae366a09e0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 200
+ color: [255, 0, 0, 1]
+
+ - type: rect
+ bounds: 50 50 100 100
+ color: [255, 255, 0, 1]
+
+ - type: rect
+ bounds: 300 50 400 100
+ color: [255, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/blend/multi-mix-blend-mode.yaml b/gfx/wr/wrench/reftests/blend/multi-mix-blend-mode.yaml
new file mode 100644
index 0000000000..d3ba8fcaf0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/multi-mix-blend-mode.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: 0 0 800 200
+ color: [255, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: 50 50 100 100
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: [0, 255, 0, 1]
+
+ - type: stacking-context
+ bounds: 300 50 100 100
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: 0 0 400 100
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml b/gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml
new file mode 100644
index 0000000000..6d4679a79d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 128, 0]
diff --git a/gfx/wr/wrench/reftests/blend/multiply-2.yaml b/gfx/wr/wrench/reftests/blend/multiply-2.yaml
new file mode 100644
index 0000000000..0ad1ef35d6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/multiply-2.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 128, 0]
diff --git a/gfx/wr/wrench/reftests/blend/multiply-3.yaml b/gfx/wr/wrench/reftests/blend/multiply-3.yaml
new file mode 100644
index 0000000000..05e1aa20f6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/multiply-3.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 128, 0]
diff --git a/gfx/wr/wrench/reftests/blend/multiply-ref.yaml b/gfx/wr/wrench/reftests/blend/multiply-ref.yaml
new file mode 100644
index 0000000000..0b9aeed906
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/multiply-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/blend/multiply.yaml b/gfx/wr/wrench/reftests/blend/multiply.yaml
new file mode 100644
index 0000000000..f9fa6cbb75
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/multiply.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [25, 25, 50, 50]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/blend/raster-roots-1-ref.yaml b/gfx/wr/wrench/reftests/blend/raster-roots-1-ref.yaml
new file mode 100644
index 0000000000..1b0727ccee
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/raster-roots-1-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: black
+ bounds: [0, 100, 100, 100]
diff --git a/gfx/wr/wrench/reftests/blend/raster-roots-1.yaml b/gfx/wr/wrench/reftests/blend/raster-roots-1.yaml
new file mode 100644
index 0000000000..fabb7c5471
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/raster-roots-1.yaml
@@ -0,0 +1,32 @@
+# Verify that when a picture cache is both a raster root and also a blend container,
+# the readback correctly maps to local raster-space, not final device-space.
+---
+root:
+ items:
+ - type: iframe
+ id: [1, 2]
+ bounds: [0, 100, 1000, 1000]
+
+pipelines:
+ - id: [1, 2]
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 1000, 1000]
+ content-size: [1000, 10000]
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [100, 0]
+ stops: [0.0, [255, 0, 0, 1], 1.0, [0, 255, 0, 1]]
+ - type: stacking-context
+ mix-blend-mode: difference
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [100, 0]
+ stops: [0.0, [255, 0, 0, 1], 1.0, [0, 255, 0, 1]]
diff --git a/gfx/wr/wrench/reftests/blend/reftest.list b/gfx/wr/wrench/reftests/blend/reftest.list
new file mode 100644
index 0000000000..eee8cc3a01
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/reftest.list
@@ -0,0 +1,32 @@
+== multiply.yaml multiply-ref.yaml
+fuzzy(1,32) == multiply-2.yaml multiply-2-ref.yaml
+fuzzy(1,32) == color_targets(3) alpha_targets(0) multiply-3.yaml multiply-2-ref.yaml
+== difference.yaml difference-ref.yaml
+fuzzy(1,30000) == difference-transparent.yaml difference-transparent-ref.yaml
+fuzzy-if(platform(swgl),1,10000) == darken.yaml darken-ref.yaml
+fuzzy-if(platform(swgl),1,10000) == lighten.yaml lighten-ref.yaml
+
+fuzzy(1,32) == repeated-difference.yaml repeated-difference-ref.yaml
+
+== isolated.yaml isolated-ref.yaml
+fuzzy(3,397) == isolated-2.yaml isolated-2-ref.yaml
+== isolated-with-filter.yaml isolated-ref.yaml
+== isolated-premultiplied.yaml blank.yaml
+== isolated-premultiplied-2.yaml isolated-premultiplied-2-ref.yaml
+
+== large.yaml large-ref.yaml
+
+# fuzzy because dithering is different for gradients
+# drawn in different render targets
+fuzzy(1,2502) == transparent-composite-1.yaml transparent-composite-1-ref.yaml
+fuzzy(1,2502) == transparent-composite-2.yaml transparent-composite-2-ref.yaml
+
+fuzzy(2,420) == multi-mix-blend-mode.yaml multi-mix-blend-mode-ref.yaml
+== mix-blend-invalid-backdrop.yaml mix-blend-invalid-backdrop-ref.yaml
+platform(linux) == mix-blend-complex-transform.yaml mix-blend-complex-transform.png
+== raster-roots-1.yaml raster-roots-1-ref.yaml
+== child-surface.yaml child-surface-ref.yaml
+== blend-overflow.yaml blend-overflow-ref.yaml
+
+== backdrop-filter-blend-container.yaml backdrop-filter-blend-container-ref.yaml
+== backdrop-filter-preceding.yaml backdrop-filter-preceding-ref.yaml
diff --git a/gfx/wr/wrench/reftests/blend/repeated-difference-ref.yaml b/gfx/wr/wrench/reftests/blend/repeated-difference-ref.yaml
new file mode 100644
index 0000000000..30d53325ba
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/repeated-difference-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/blend/repeated-difference.yaml b/gfx/wr/wrench/reftests/blend/repeated-difference.yaml
new file mode 100644
index 0000000000..a04e6cb274
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/repeated-difference.yaml
@@ -0,0 +1,31 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [255, 255, 255]
+ - type: stacking-context
+ blend-container: true
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: stacking-context
+ mix-blend-mode: difference
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [255, 255, 255]
+ - type: stacking-context
+ blend-container: true
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: stacking-context
+ mix-blend-mode: difference
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/blend/transparent-composite-1-ref.yaml b/gfx/wr/wrench/reftests/blend/transparent-composite-1-ref.yaml
new file mode 100644
index 0000000000..235801c5e1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/transparent-composite-1-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/blend/transparent-composite-1.yaml b/gfx/wr/wrench/reftests/blend/transparent-composite-1.yaml
new file mode 100644
index 0000000000..319b636843
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/transparent-composite-1.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/blend/transparent-composite-2-ref.yaml b/gfx/wr/wrench/reftests/blend/transparent-composite-2-ref.yaml
new file mode 100644
index 0000000000..235801c5e1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/transparent-composite-2-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/blend/transparent-composite-2.yaml b/gfx/wr/wrench/reftests/blend/transparent-composite-2.yaml
new file mode 100644
index 0000000000..e064f68f95
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/transparent-composite-2.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/blend/transparent-white.png b/gfx/wr/wrench/reftests/blend/transparent-white.png
new file mode 100644
index 0000000000..6019b2b817
--- /dev/null
+++ b/gfx/wr/wrench/reftests/blend/transparent-white.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/blank.yaml b/gfx/wr/wrench/reftests/border/blank.yaml
new file mode 100644
index 0000000000..e3b000bcb2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/blank.yaml
@@ -0,0 +1,3 @@
+---
+root:
+
diff --git a/gfx/wr/wrench/reftests/border/border-clamp-corner-radius.png b/gfx/wr/wrench/reftests/border/border-clamp-corner-radius.png
new file mode 100644
index 0000000000..cf20fb5990
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-clamp-corner-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-clamp-corner-radius.yaml b/gfx/wr/wrench/reftests/border/border-clamp-corner-radius.yaml
new file mode 100644
index 0000000000..10859274c7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-clamp-corner-radius.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 420, 250]
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: solid
+ radius: 180
+ color: blue
+ - type: border
+ bounds: [ 200, 0, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: solid
+ radius:
+ top-left: [180, 180]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [180, 180]
+ color: blue \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.png b/gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.png
new file mode 100644
index 0000000000..14a79cd475
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.yaml b/gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.yaml
new file mode 100644
index 0000000000..ca224852fd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-dashed-dotted-caching.yaml
@@ -0,0 +1,76 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+
+ - type: border
+ bounds: [ 0, 10, 25, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 60, 200, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 110, 300, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 160, 400, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 210, 500, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 260, 25, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 310, 200, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 360, 300, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 410, 400, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 460, 500, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
diff --git a/gfx/wr/wrench/reftests/border/border-double-1px-ref.yaml b/gfx/wr/wrench/reftests/border/border-double-1px-ref.yaml
new file mode 100644
index 0000000000..f0c9eca1ca
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-double-1px-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 20 ]
+ width: 1
+ border-type: normal
+ style: solid
+ color: red
+ - type: border
+ bounds: [ 12, 12, 96, 16 ]
+ width: 1
+ border-type: normal
+ style: solid
+ color: red
diff --git a/gfx/wr/wrench/reftests/border/border-double-1px.yaml b/gfx/wr/wrench/reftests/border/border-double-1px.yaml
new file mode 100644
index 0000000000..3a5f084108
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-double-1px.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 20 ]
+ width: 3
+ border-type: normal
+ style: double
+ color: red
diff --git a/gfx/wr/wrench/reftests/border/border-double-simple-2-ref.yaml b/gfx/wr/wrench/reftests/border/border-double-simple-2-ref.yaml
new file mode 100644
index 0000000000..e7fa39f125
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-double-simple-2-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 500, 500 ]
+ width: [ 1 ]
+ border-type: normal
+ style: [ solid ]
+ color: [ black ]
diff --git a/gfx/wr/wrench/reftests/border/border-double-simple-2.yaml b/gfx/wr/wrench/reftests/border/border-double-simple-2.yaml
new file mode 100644
index 0000000000..6fa6d634cd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-double-simple-2.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 500, 500 ]
+ width: [ 1 ]
+ border-type: normal
+ style: [ double ]
+ color: [ black ]
diff --git a/gfx/wr/wrench/reftests/border/border-double-simple-ref.yaml b/gfx/wr/wrench/reftests/border/border-double-simple-ref.yaml
new file mode 100644
index 0000000000..564e4df163
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-double-simple-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 4, 4, 4, 4 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ blue, blue, blue, blue ]
+ - type: stacking-context
+ bounds: [8, 8, 34, 34]
+ items:
+ - type: border
+ bounds: [ 0, 0, 34, 34 ]
+ width: [ 4, 4, 4, 4 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ blue, blue, blue, blue ]
diff --git a/gfx/wr/wrench/reftests/border/border-double-simple.yaml b/gfx/wr/wrench/reftests/border/border-double-simple.yaml
new file mode 100644
index 0000000000..4830485a8f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-double-simple.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ double, double, double, double ]
+ color: [ blue, blue, blue, blue ]
diff --git a/gfx/wr/wrench/reftests/border/border-gradient-nine-patch.png b/gfx/wr/wrench/reftests/border/border-gradient-nine-patch.png
new file mode 100644
index 0000000000..c984cf9015
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-gradient-nine-patch.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-gradient-nine-patch.yaml b/gfx/wr/wrench/reftests/border/border-gradient-nine-patch.yaml
new file mode 100644
index 0000000000..667fb701e3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-gradient-nine-patch.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 30
+ border-type: gradient
+ start: [ 0, 200 ]
+ end: [ 200, 0 ]
+ stops: [ 0.0, red, 0.177, red, 0.177, yellow, 0.50, yellow, 0.50, red ]
+ slice: [ 50 ]
diff --git a/gfx/wr/wrench/reftests/border/border-gradient-simple-ref.yaml b/gfx/wr/wrench/reftests/border/border-gradient-simple-ref.yaml
new file mode 100644
index 0000000000..d961c12041
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-gradient-simple-ref.yaml
@@ -0,0 +1,55 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: gradient # top left
+ bounds: [ 0, 0, 10, 10]
+ start: [ 25, 0 ]
+ end: [ 25, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # top right
+ bounds: [ 40, 0, 10, 10]
+ start: [ -15, 0 ]
+ end: [ -15, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # bottom left
+ bounds: [ 0, 40, 10, 10]
+ start: [ 25, -40 ]
+ end: [ 25, 10 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # bottom right
+ bounds: [ 40, 40, 10, 10]
+ start: [ -15, -40 ]
+ end: [ -15, 10 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # top
+ bounds: [ 10, 0, 30, 10]
+ start: [ 15, 0 ]
+ end: [ 15, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # right
+ bounds: [ 40, 10, 10, 30]
+ start: [ -15, -10 ]
+ end: [ -15, 40 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # bottom
+ bounds: [ 10, 40, 30, 10]
+ start: [ 15, -40 ]
+ end: [ 15, 10 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # left
+ bounds: [ 0, 10, 10, 30]
+ start: [ 25, -10 ]
+ end: [ 25, 40 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+
diff --git a/gfx/wr/wrench/reftests/border/border-gradient-simple.yaml b/gfx/wr/wrench/reftests/border/border-gradient-simple.yaml
new file mode 100644
index 0000000000..6ff94e8a89
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-gradient-simple.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: gradient
+ start: [ 25, 0 ]
+ end: [ 25, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
diff --git a/gfx/wr/wrench/reftests/border/border-groove-simple-ref.yaml b/gfx/wr/wrench/reftests/border/border-groove-simple-ref.yaml
new file mode 100644
index 0000000000..9dfe5f3358
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-groove-simple-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 170 1.0, 0 0 255 1.0, 0 0 255 1.0, 0 0 170 1.0 ]
+ - type: stacking-context
+ bounds: [6, 6, 38, 38]
+ items:
+ - type: border
+ bounds: [ 0, 0, 38, 38 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 255 1.0, 0 0 170 1.0, 0 0 170 1.0, 0 0 255 1.0 ]
diff --git a/gfx/wr/wrench/reftests/border/border-groove-simple.yaml b/gfx/wr/wrench/reftests/border/border-groove-simple.yaml
new file mode 100644
index 0000000000..0d992d5dc6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-groove-simple.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ groove, groove, groove, groove ]
+ color: [ blue, blue, blue, blue ]
diff --git a/gfx/wr/wrench/reftests/border/border-image-crash-ref.yaml b/gfx/wr/wrench/reftests/border/border-image-crash-ref.yaml
new file mode 100644
index 0000000000..b561863130
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-crash-ref.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 32
+ image-height: 32
+ slice: [ 3, 0, 1, 36 ]
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
+ fill: true
+ - type: rect
+ bounds: [ 100, 100, 192, 192 ]
+ color: white
diff --git a/gfx/wr/wrench/reftests/border/border-image-crash.yaml b/gfx/wr/wrench/reftests/border/border-image-crash.yaml
new file mode 100644
index 0000000000..b561863130
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-crash.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 32
+ image-height: 32
+ slice: [ 3, 0, 1, 36 ]
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
+ fill: true
+ - type: rect
+ bounds: [ 100, 100, 192, 192 ]
+ color: white
diff --git a/gfx/wr/wrench/reftests/border/border-image-empty-slice-ref.png b/gfx/wr/wrench/reftests/border/border-image-empty-slice-ref.png
new file mode 100644
index 0000000000..8ba6808ac9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-empty-slice-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-image-empty-slice.yaml b/gfx/wr/wrench/reftests/border/border-image-empty-slice.yaml
new file mode 100644
index 0000000000..a001038878
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-empty-slice.yaml
@@ -0,0 +1,46 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 20, 20, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32, 0, 32, 0 ]
+ repeat-vertical: round
+ repeat-horizontal: round
+ - type: border
+ bounds: [ 240, 20, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 0, 32, 0, 32 ]
+ repeat-vertical: round
+ repeat-horizontal: round
+ - type: border
+ bounds: [ 20, 240, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32, 0, 0, 32 ]
+ repeat-vertical: round
+ repeat-horizontal: round
+ - type: border
+ bounds: [ 240, 240, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 0, 32, 32, 0 ]
+ repeat-vertical: round
+ repeat-horizontal: round
diff --git a/gfx/wr/wrench/reftests/border/border-image-fill-2-ref.png b/gfx/wr/wrench/reftests/border/border-image-fill-2-ref.png
new file mode 100644
index 0000000000..f3d7fd329a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-fill-2-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-image-fill-2.yaml b/gfx/wr/wrench/reftests/border/border-image-fill-2.yaml
new file mode 100644
index 0000000000..be7081fb52
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-fill-2.yaml
@@ -0,0 +1,51 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 20, 20, 200, 200 ]
+ width: [20, 40]
+ border-type: image
+ image-source: "border-image-src-2.png"
+ image-width: 100
+ image-height: 50
+ slice: [ 20, 40 ]
+ repeat-vertical: repeat
+ repeat-horizontal: repeat
+ fill: true
+ - type: border
+ bounds: [ 240, 20, 200, 200 ]
+ width: [20, 40]
+ slice: [ 20, 40 ]
+ border-type: image
+ image-source: "border-image-src-2.png"
+ image-width: 100
+ image-height: 50
+ slice: [ 20, 40 ]
+ repeat-vertical: stretch
+ repeat-horizontal: repeat
+ fill: true
+ - type: border
+ bounds: [ 20, 240, 200, 200 ]
+ width: [20, 40]
+ border-type: image
+ image-source: "border-image-src-2.png"
+ image-width: 100
+ image-height: 50
+ slice: [ 20, 40 ]
+ repeat-vertical: repeat
+ repeat-horizontal: stretch
+ fill: true
+ - type: border
+ bounds: [ 240, 240, 200, 200 ]
+ width: [20, 40]
+ border-type: image
+ image-source: "border-image-src-2.png"
+ image-width: 100
+ image-height: 50
+ slice: [ 20, 40 ]
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
+ fill: true
diff --git a/gfx/wr/wrench/reftests/border/border-image-fill-ref.png b/gfx/wr/wrench/reftests/border/border-image-fill-ref.png
new file mode 100644
index 0000000000..b02118c64a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-fill-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-image-fill.yaml b/gfx/wr/wrench/reftests/border/border-image-fill.yaml
new file mode 100644
index 0000000000..62ea0493f5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-fill.yaml
@@ -0,0 +1,50 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: repeat
+ repeat-horizontal: repeat
+ fill: true
+ - type: border
+ bounds: [ 300, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: stretch
+ repeat-horizontal: repeat
+ fill: true
+ - type: border
+ bounds: [ 100, 300, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: repeat
+ repeat-horizontal: stretch
+ fill: true
+ - type: border
+ bounds: [ 300, 300, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
+ fill: true
diff --git a/gfx/wr/wrench/reftests/border/border-image-ref.png b/gfx/wr/wrench/reftests/border/border-image-ref.png
new file mode 100644
index 0000000000..73e4eb5256
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-image-round-ref.png b/gfx/wr/wrench/reftests/border/border-image-round-ref.png
new file mode 100644
index 0000000000..62a18fbba9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-round-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-image-round.yaml b/gfx/wr/wrench/reftests/border/border-image-round.yaml
new file mode 100644
index 0000000000..7bd9b4b7c7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-round.yaml
@@ -0,0 +1,39 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ # The pattern fits exactly a whole number of times in the border.
+ - type: border
+ bounds: [ 50, 50, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: round
+ repeat-horizontal: round
+ # The pattern has to be stretched to fit.
+ - type: border
+ bounds: [ 300, 50, 200, 200 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: round
+ repeat-horizontal: round
+ # The pattern has to be shrunk to fit.
+ - type: border
+ bounds: [ 550, 50, 180, 180 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: round
+ repeat-horizontal: round
diff --git a/gfx/wr/wrench/reftests/border/border-image-src-2.png b/gfx/wr/wrench/reftests/border/border-image-src-2.png
new file mode 100644
index 0000000000..5ebebaf21f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-src-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-image-src.png b/gfx/wr/wrench/reftests/border/border-image-src.png
new file mode 100644
index 0000000000..128e560d90
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image-src.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-image.yaml b/gfx/wr/wrench/reftests/border/border-image.yaml
new file mode 100644
index 0000000000..3ed969f7c5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-image.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
diff --git a/gfx/wr/wrench/reftests/border/border-invisible-ref.yaml b/gfx/wr/wrench/reftests/border/border-invisible-ref.yaml
new file mode 100644
index 0000000000..949868c9b2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-invisible-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [99, 10, 1, 90]
+ color: black
diff --git a/gfx/wr/wrench/reftests/border/border-invisible.yaml b/gfx/wr/wrench/reftests/border/border-invisible.yaml
new file mode 100644
index 0000000000..4838786299
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-invisible.yaml
@@ -0,0 +1,17 @@
+--- # checks that invisible border corners don't render
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: border
+ bounds: [ 10, 10, 90, 90 ]
+ width: [0, 0, 0, 1]
+ border-type: normal
+ style: solid
+ radius:
+ top-left: 10
+ bottom-right: 0
+ top-right: 0
+ bottom-left: 3
+ color: [red, black, red, red]
diff --git a/gfx/wr/wrench/reftests/border/border-no-bogus-line-ref.png b/gfx/wr/wrench/reftests/border/border-no-bogus-line-ref.png
new file mode 100644
index 0000000000..1310e99f79
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-no-bogus-line-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-no-bogus-line.yaml b/gfx/wr/wrench/reftests/border/border-no-bogus-line.yaml
new file mode 100644
index 0000000000..a030211da9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-no-bogus-line.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: border
+ bounds: [ 10, 10, 90, 80 ]
+ width: 3
+ border-type: normal
+ style: solid
+ color: [ black, black, black, black ]
+ radius: 40.5
diff --git a/gfx/wr/wrench/reftests/border/border-none-ref.yaml b/gfx/wr/wrench/reftests/border/border-none-ref.yaml
new file mode 100644
index 0000000000..e011c78eb5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-none-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 500, 12 ]
+ color: black
diff --git a/gfx/wr/wrench/reftests/border/border-none.yaml b/gfx/wr/wrench/reftests/border/border-none.yaml
new file mode 100644
index 0000000000..4b423c7da5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-none.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 500, 500 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ solid, none, none, none ]
+ color: [ black ]
diff --git a/gfx/wr/wrench/reftests/border/border-overlapping-corner-ref.yaml b/gfx/wr/wrench/reftests/border/border-overlapping-corner-ref.yaml
new file mode 100644
index 0000000000..b985704376
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-overlapping-corner-ref.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [ 10, 10, 180, 180 ]
+ radius:
+ top-left: [180, 180]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [180, 180]
+ - type: clip-chain
+ id: 3
+ clips: [2]
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: [ 0, 0, 255, 0.5 ]
+ clip-chain: 3
diff --git a/gfx/wr/wrench/reftests/border/border-overlapping-corner.yaml b/gfx/wr/wrench/reftests/border/border-overlapping-corner.yaml
new file mode 100644
index 0000000000..08e71fabef
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-overlapping-corner.yaml
@@ -0,0 +1,17 @@
+--- # Checks that corners are clipped correctly when they overlap with an adjacent corner
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ items:
+ - type: border
+ bounds: [ 10, 10, 180, 180 ]
+ width: 90
+ border-type: normal
+ style: solid
+ radius:
+ top-left: 180
+ bottom-right: 180
+ top-right: 0
+ bottom-left: 0
+ color: [ [0, 0, 255, 0.5] ]
diff --git a/gfx/wr/wrench/reftests/border/border-overlapping-edge-ref.yaml b/gfx/wr/wrench/reftests/border/border-overlapping-edge-ref.yaml
new file mode 100644
index 0000000000..5cb34e5ae2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-overlapping-edge-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 40]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 100, 20 ]
+ color: [ 0, 0, 255, 0.5 ]
diff --git a/gfx/wr/wrench/reftests/border/border-overlapping-edge.yaml b/gfx/wr/wrench/reftests/border/border-overlapping-edge.yaml
new file mode 100644
index 0000000000..e39e06fddc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-overlapping-edge.yaml
@@ -0,0 +1,12 @@
+--- # Checks that segments are clipped correctly when opposite edges of the border overlap
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 40]
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 20 ]
+ width: 15
+ border-type: normal
+ style: solid
+ color: [ [0, 0, 255, 0.5] ]
diff --git a/gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.png b/gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.png
new file mode 100644
index 0000000000..9fa19d215b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.yaml b/gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.yaml
new file mode 100644
index 0000000000..06ba64e3ab
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-radial-gradient-nine-patch.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 20
+ border-type: radial-gradient
+ center: [ 100, 100 ]
+ radius: [ 200, 200 ]
+ stops: [ 0.0, red, 0.5, red, 0.5, green ]
+ slice: [ 50 ]
diff --git a/gfx/wr/wrench/reftests/border/border-radial-gradient-simple-ref.yaml b/gfx/wr/wrench/reftests/border/border-radial-gradient-simple-ref.yaml
new file mode 100644
index 0000000000..7c3e93fd76
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-radial-gradient-simple-ref.yaml
@@ -0,0 +1,54 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: radial-gradient # top left
+ bounds: [ 0, 0, 10, 10]
+ center: [ 25, 25 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # top right
+ bounds: [ 40, 0, 10, 10]
+ center: [ -15, 25 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # bottom left
+ bounds: [ 0, 40, 10, 10]
+ center: [ 25, -15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # bottom right
+ bounds: [ 40, 40, 10, 10]
+ center: [ -15, -15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # top
+ bounds: [ 10, 0, 30, 10]
+ center: [ 15, 25 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # right
+ bounds: [ 40, 10, 10, 30]
+ center: [ -15, 15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # bottom
+ bounds: [ 10, 40, 30, 10]
+ center: [ 15, -15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # left
+ bounds: [ 0, 10, 10, 30]
+ center: [ 25, 15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
diff --git a/gfx/wr/wrench/reftests/border/border-radial-gradient-simple.yaml b/gfx/wr/wrench/reftests/border/border-radial-gradient-simple.yaml
new file mode 100644
index 0000000000..11dded8a04
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-radial-gradient-simple.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: radial-gradient
+ center: [ 25, 25 ]
+ radius: [ 50, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
diff --git a/gfx/wr/wrench/reftests/border/border-radii.png b/gfx/wr/wrench/reftests/border/border-radii.png
new file mode 100644
index 0000000000..7a4bc340eb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-radii.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-radii.yaml b/gfx/wr/wrench/reftests/border/border-radii.yaml
new file mode 100644
index 0000000000..c0b2fda968
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-radii.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: border
+ bounds: [ 10, 10, 90, 90 ]
+ width: 10
+ border-type: normal
+ style: solid
+ radius:
+ top-left: 16
+ bottom-right: 16
+ top-right: 8
+ bottom-left: 8
+ color: [ blue, blue, blue, blue ]
diff --git a/gfx/wr/wrench/reftests/border/border-ridge-simple-ref.yaml b/gfx/wr/wrench/reftests/border/border-ridge-simple-ref.yaml
new file mode 100644
index 0000000000..b940962d45
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-ridge-simple-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 255 1.0, 0 0 170 1.0, 0 0 170 1.0, 0 0 255 1.0 ]
+ - type: stacking-context
+ bounds: [6, 6, 38, 38]
+ items:
+ - type: border
+ bounds: [ 0, 0, 38, 38 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 170 1.0, 0 0 255 1.0, 0 0 255 1.0, 0 0 170 1.0 ]
diff --git a/gfx/wr/wrench/reftests/border/border-ridge-simple.yaml b/gfx/wr/wrench/reftests/border/border-ridge-simple.yaml
new file mode 100644
index 0000000000..906b40fa42
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-ridge-simple.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ ridge, ridge, ridge, ridge ]
+ color: [ blue, blue, blue, blue ]
diff --git a/gfx/wr/wrench/reftests/border/border-suite-2.png b/gfx/wr/wrench/reftests/border/border-suite-2.png
new file mode 100644
index 0000000000..cb43146c82
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-suite-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-suite-2.yaml b/gfx/wr/wrench/reftests/border/border-suite-2.yaml
new file mode 100644
index 0000000000..f86b20da30
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-suite-2.yaml
@@ -0,0 +1,171 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 230, 100, 100 ]
+ width: 1
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 16
+ - type: border
+ bounds: [ 120, 230, 100, 100 ]
+ width: 2
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 230, 230, 100, 100 ]
+ width: 3
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 340, 230, 100, 100 ]
+ width: 8
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 450, 230, 200, 100 ]
+ width: 4
+ border-type: normal
+ style: dotted
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 48],
+ top-right: [64, 32],
+ bottom-left: [10, 40],
+ bottom-right: [48, 48],
+ }
+
+ - type: border
+ bounds: [ 10, 340, 200, 200 ]
+ width: [4, 8, 16, 8]
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 64],
+ top-right: [32, 32],
+ bottom-left: [64, 32],
+ bottom-right: [32, 32],
+ }
+ - type: border
+ bounds: [ 230, 340, 200, 200 ]
+ width: 4
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [64, 128],
+ top-right: [16, 32],
+ bottom-left: [40, 18],
+ bottom-right: [100, 50],
+ }
+ - type: border
+ bounds: [ 450, 340, 200, 100 ]
+ width: 8
+ border-type: normal
+ style: dotted
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 450, 450, 200, 100 ]
+ width: [8, 8, 12, 12]
+ border-type: normal
+ style: dotted
+ color: [ red, green, blue, black ]
+ radius: 40
diff --git a/gfx/wr/wrench/reftests/border/border-suite-3.png b/gfx/wr/wrench/reftests/border/border-suite-3.png
new file mode 100644
index 0000000000..b2b7d7347c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-suite-3.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-suite-3.yaml b/gfx/wr/wrench/reftests/border/border-suite-3.yaml
new file mode 100644
index 0000000000..2deb821071
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-suite-3.yaml
@@ -0,0 +1,57 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: border
+ bounds: [ 10, 10, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: [ solid, double, solid, double ]
+ color: [ red, green, blue, black ]
+ radius: 16
+ - type: border
+ bounds: [ 230, 10, 200, 200 ]
+ width: 16
+ border-type: normal
+ style: [ solid, double, solid, double ]
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 450, 10, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: [ solid, double, solid, double ]
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 48],
+ top-right: [64, 32],
+ bottom-left: [10, 40],
+ bottom-right: [48, 48],
+ }
+
+ - type: border
+ bounds: [ 10, 230, 200, 200 ]
+ width: 24
+ border-type: normal
+ style: [ inset, double, ridge, groove ]
+ color: [ red, green, blue, black ]
+ radius: 16
+ - type: border
+ bounds: [ 230, 230, 200, 200 ]
+ width: 32
+ border-type: normal
+ style: [ outset, double, ridge, groove ]
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 450, 230, 200, 200 ]
+ width: 18
+ border-type: normal
+ style: [ outset, double, ridge, groove ]
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 48],
+ top-right: [64, 32],
+ bottom-left: [10, 40],
+ bottom-right: [48, 48],
+ }
diff --git a/gfx/wr/wrench/reftests/border/border-suite.png b/gfx/wr/wrench/reftests/border/border-suite.png
new file mode 100644
index 0000000000..8e8870afdf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-suite.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/border-suite.yaml b/gfx/wr/wrench/reftests/border/border-suite.yaml
new file mode 100644
index 0000000000..5c74679a0a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/border-suite.yaml
@@ -0,0 +1,351 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 100 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 120, 10, 100, 100 ]
+ width: [ 2, 2, 2, 2 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 230, 10, 100, 100 ]
+ width: [ 3, 3, 3, 3 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 340, 10, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 450, 10, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 560, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: border
+ bounds: [ 10, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: inset
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 120, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 230, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: inset
+ color: [ red, green, blue, black ]
+ radius: 10
+ - type: border
+ bounds: [ 340, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ radius: 20
+ - type: border
+ bounds: [ 450, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ radius: 35
+ - type: border
+ bounds: [ 560, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 230, 100, 100 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 120, 230, 100, 100 ]
+ width: [ 2, 2, 2, 2 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 230, 230, 100, 100 ]
+ width: [ 3, 3, 3, 3 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 340, 230, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 450, 230, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 560, 230, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+
+ - type: border
+ bounds: [ 10, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 120, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 230, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 340, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 450, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 560, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+
+ - type: border
+ bounds: [ 10, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 50
diff --git a/gfx/wr/wrench/reftests/border/degenerate-curve.png b/gfx/wr/wrench/reftests/border/degenerate-curve.png
new file mode 100644
index 0000000000..8fc5683935
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/degenerate-curve.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/degenerate-curve.yaml b/gfx/wr/wrench/reftests/border/degenerate-curve.yaml
new file mode 100644
index 0000000000..d5ee02ba4f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/degenerate-curve.yaml
@@ -0,0 +1,293 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1024, 740]
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ "transform-style": flat
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [28, 18, 144, 122]
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip-chain
+ id: 20
+ clips: [2]
+ - type: rect
+ color: 255 0 0 1.0000
+ bounds: [28, 18, 144, 122]
+ clip-chain: 20
+ -
+ bounds: [28, 18, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - none
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip
+ id: 3
+ complex:
+ - rect: [28, 160, 144, 122]
+ radius: [61, 61]
+ - type: clip-chain
+ id: 21
+ clips: [3]
+ - type: rect
+ bounds: [28, 160, 144, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 21
+
+ -
+ bounds: [28, 160, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - none
+ radius: [61, 61]
+ - type: clip
+ id: 4
+ complex:
+ - rect: [28, 302, 154, 122]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip-chain
+ id: 22
+ clips: [4]
+ - type: rect
+ bounds: [28, 302, 154, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 22
+
+ - type: border
+ bounds: [28, 302, 154, 122]
+ width: [18, 0, 18, 10]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - solid
+ radius:
+ "top-left": [0, 0]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip
+ id: 5
+ complex:
+ - rect: [202, 18, 144.03334, 122]
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip-chain
+ id: 23
+ clips: [5]
+ - type: rect
+ bounds: [202, 18, 144.03334, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 23
+
+ - type: border
+ bounds: [202, 18, 144.03334, 122]
+ width: [18, 0.016666668, 18, 0.016666668]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style: solid
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip
+ id: 6
+ complex:
+ - rect: [202, 160, 144, 122]
+ radius: [61, 61]
+ - type: clip-chain
+ id: 24
+ clips: [6]
+ - type: rect
+ bounds: [202, 160, 144, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 24
+
+ - type: border
+ bounds: [202, 160, 144, 122]
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style: solid
+ radius: [61, 61]
+ - type: clip
+ id: 7
+ complex:
+ - rect: [202, 302, 154, 122]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ - type: clip-chain
+ id: 25
+ clips: [7]
+ - type: rect
+ bounds: [202, 302, 154, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 25
+
+ -
+ bounds: [202, 302, 154, 122]
+ type: border
+ width: [18, 0, 18, 10]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - solid
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ - type: clip
+ id: 8
+ complex:
+ - rect: [376, 18, 144, 122]
+ radius: [61, 61]
+ - type: clip-chain
+ id: 26
+ clips: [8]
+ - type: rect
+ bounds: [376, 18, 144, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 26
+
+ -
+ bounds: [376, 18, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style:
+ - solid
+ - hidden
+ - solid
+ - hidden
+ radius: [61, 61]
+ - type: clip
+ id: 9
+ complex:
+ - rect: [376, 160, 144, 122]
+ radius: [61, 61]
+ - type: clip-chain
+ id: 27
+ clips: [9]
+ - type: rect
+ bounds: [376, 160, 144, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 27
+
+ -
+ bounds: [376, 160, 144, 122]
+ clip: [-17895698, -17895698, 35791396, 35791396]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - none
+ radius: [61, 61]
+ - type: clip
+ id: 10
+ complex:
+ - rect: [376, 302, 144, 122]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [72, 72]
+ "bottom-right": [0, 0]
+ - type: clip-chain
+ id: 28
+ clips: [10]
+ - type: rect
+ bounds: [376, 302, 144, 122]
+ color: 255 0 0 1.0000
+ clip-chain: 28
+
+ -
+ bounds: [376, 302, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - hidden
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [72, 72]
+ "bottom-right": [0, 0]
+ id: [0, 1]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/border/discontinued-dash.png b/gfx/wr/wrench/reftests/border/discontinued-dash.png
new file mode 100644
index 0000000000..67625e1928
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/discontinued-dash.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/discontinued-dash.yaml b/gfx/wr/wrench/reftests/border/discontinued-dash.yaml
new file mode 100644
index 0000000000..886f9cfe59
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/discontinued-dash.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 10, 10, 300, 300]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: [ dashed, solid, solid, solid ]
+ color: [ black, black, black, black ]
diff --git a/gfx/wr/wrench/reftests/border/dotted-corner-small-radius.png b/gfx/wr/wrench/reftests/border/dotted-corner-small-radius.png
new file mode 100644
index 0000000000..99405da1a3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/dotted-corner-small-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/dotted-corner-small-radius.yaml b/gfx/wr/wrench/reftests/border/dotted-corner-small-radius.yaml
new file mode 100644
index 0000000000..4e40c251e4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/dotted-corner-small-radius.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - bounds: [5, 5, 490, 490]
+ "clip-rect": [5, 5, 490, 490]
+ "backface-visible": true
+ type: border
+ width: 25
+ "border-type": normal
+ color: black
+ style: dotted
diff --git a/gfx/wr/wrench/reftests/border/green-square.yaml b/gfx/wr/wrench/reftests/border/green-square.yaml
new file mode 100644
index 0000000000..2f13625928
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/green-square.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 400, 400 ]
+ color: green
diff --git a/gfx/wr/wrench/reftests/border/max-scale-ref.yaml b/gfx/wr/wrench/reftests/border/max-scale-ref.yaml
new file mode 100644
index 0000000000..0647a7a864
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/max-scale-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: border
+ bounds: [ 0, 0, 4000, 1 ]
+ width: [ 1, 0, 0, 0 ]
+ border-type: normal
+ style: solid
+ color: red
diff --git a/gfx/wr/wrench/reftests/border/max-scale.yaml b/gfx/wr/wrench/reftests/border/max-scale.yaml
new file mode 100644
index 0000000000..cf292d5798
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/max-scale.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ transform: scale(3000, 1)
+ items:
+ - type: border
+ bounds: [ 0, 0, 100, 100 ]
+ width: [ 1, 0, 0, 0 ]
+ border-type: normal
+ style: solid
+ color: red
diff --git a/gfx/wr/wrench/reftests/border/no-aa.yaml b/gfx/wr/wrench/reftests/border/no-aa.yaml
new file mode 100644
index 0000000000..f937a865f4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/no-aa.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 400, 400 ]
+ width: [ 200, 200, 200, 200 ]
+ border-type: normal
+ style: solid
+ color: [ green, green, transparent, transparent ]
+ do_aa: false
+ - type: border
+ bounds: [ 0, 0, 400, 400 ]
+ width: [ 200, 200, 200, 200 ]
+ border-type: normal
+ style: solid
+ color: [ transparent, transparent, green, green ]
+ do_aa: false
diff --git a/gfx/wr/wrench/reftests/border/overlapping.png b/gfx/wr/wrench/reftests/border/overlapping.png
new file mode 100644
index 0000000000..bf12c8d81a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/overlapping.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/overlapping.yaml b/gfx/wr/wrench/reftests/border/overlapping.yaml
new file mode 100644
index 0000000000..2a2b3dfb30
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/overlapping.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [ 0, 0, 200, 200 ]
+ radius:
+ top-left: [180, 180]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [180, 180]
+ - type: clip-chain
+ id: 10
+ clips: [2]
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: blue
+ clip-chain: 10
diff --git a/gfx/wr/wrench/reftests/border/reftest.list b/gfx/wr/wrench/reftests/border/reftest.list
new file mode 100644
index 0000000000..a5551e8270
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/reftest.list
@@ -0,0 +1,35 @@
+platform(linux,mac) == border-clamp-corner-radius.yaml border-clamp-corner-radius.png
+fuzzy(1,840) == border-gradient-simple.yaml border-gradient-simple-ref.yaml
+platform(linux,mac) == border-gradient-nine-patch.yaml border-gradient-nine-patch.png
+fuzzy-if(platform(swgl),1,4) == border-radial-gradient-simple.yaml border-radial-gradient-simple-ref.yaml
+platform(linux,mac) == border-radial-gradient-nine-patch.yaml border-radial-gradient-nine-patch.png
+== fuzzy(1,10) border-radii.yaml border-radii.png
+== border-none.yaml border-none-ref.yaml
+fuzzy(128,69) fuzzy-if(platform(swgl),2,118) == border-overlapping-corner.yaml border-overlapping-corner-ref.yaml
+== border-overlapping-edge.yaml border-overlapping-edge-ref.yaml
+== border-invisible.yaml border-invisible-ref.yaml
+platform(linux,mac) fuzzy(3,80) == border-suite.yaml border-suite.png
+platform(linux,mac) fuzzy(8,105) == border-suite-2.yaml border-suite-2.png
+platform(linux,mac) fuzzy(1,10) == border-suite-3.yaml border-suite-3.png
+skip_on(android,device) == border-double-simple.yaml border-double-simple-ref.yaml # Fails on Pixel2
+== border-double-simple-2.yaml border-double-simple-2-ref.yaml
+skip_on(android,device) fuzzy(64,24) == border-groove-simple.yaml border-groove-simple-ref.yaml # Fails on Pixel2
+skip_on(android,device) fuzzy(64,24) == border-ridge-simple.yaml border-ridge-simple-ref.yaml # Fails on Pixel2
+platform(linux,mac) fuzzy(1,26) == degenerate-curve.yaml degenerate-curve.png
+platform(linux,mac) == border-image.yaml border-image-ref.png
+platform(linux,mac) == border-image-empty-slice.yaml border-image-empty-slice-ref.png
+platform(linux,mac) == border-image-round.yaml border-image-round-ref.png
+== border-image-crash.yaml border-image-crash-ref.yaml
+fuzzy(1,5000) == border-image-fill.yaml border-image-fill-ref.png
+fuzzy(2,25360) == border-image-fill-2.yaml border-image-fill-2-ref.png
+fuzzy-if(platform(swgl),1,8) == border-no-bogus-line.yaml border-no-bogus-line-ref.png
+platform(linux,mac) fuzzy(1,130) == dotted-corner-small-radius.yaml dotted-corner-small-radius.png
+fuzzy-if(platform(swgl),1,20) == overlapping.yaml overlapping.png
+== zero-width.yaml blank.yaml
+platform(linux,mac) == small-dotted-border.yaml small-dotted-border.png
+fuzzy(1,30) == discontinued-dash.yaml discontinued-dash.png
+platform(linux,mac) == border-dashed-dotted-caching.yaml border-dashed-dotted-caching.png
+!= small-inset-outset.yaml small-inset-outset-notref.yaml
+fuzzy(1,90) == no-aa.yaml green-square.yaml
+skip_on(android,device) == border-double-1px.yaml border-double-1px-ref.yaml # Fails on Pixel2
+== max-scale.yaml max-scale-ref.yaml
diff --git a/gfx/wr/wrench/reftests/border/small-dotted-border.png b/gfx/wr/wrench/reftests/border/small-dotted-border.png
new file mode 100644
index 0000000000..b867b04c2b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/small-dotted-border.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/border/small-dotted-border.yaml b/gfx/wr/wrench/reftests/border/small-dotted-border.yaml
new file mode 100644
index 0000000000..2fb189bce2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/small-dotted-border.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 100, 20 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: [ dotted, dotted, dotted, dotted ]
+ color: [ black, black, black, black ]
+
+ - type: border
+ bounds: [ 0, 30, 100, 20 ]
+ width: [ 2, 2, 2, 2 ]
+ border-type: normal
+ style: [ dotted, dotted, dotted, dotted ]
+ color: [ black, black, black, black ]
diff --git a/gfx/wr/wrench/reftests/border/small-inset-outset-notref.yaml b/gfx/wr/wrench/reftests/border/small-inset-outset-notref.yaml
new file mode 100644
index 0000000000..e55bdc84c6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/small-inset-outset-notref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 1
+ border-type: normal
+ style: solid
+ color: black
diff --git a/gfx/wr/wrench/reftests/border/small-inset-outset.yaml b/gfx/wr/wrench/reftests/border/small-inset-outset.yaml
new file mode 100644
index 0000000000..f7bc42807b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/small-inset-outset.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 1
+ border-type: normal
+ style: inset
+ color: black
diff --git a/gfx/wr/wrench/reftests/border/zero-width.yaml b/gfx/wr/wrench/reftests/border/zero-width.yaml
new file mode 100644
index 0000000000..6d12d05bf8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/border/zero-width.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 0, 0, 0, 0 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ blue, blue, blue, blue ]
+
diff --git a/gfx/wr/wrench/reftests/boxshadow/blank.yaml b/gfx/wr/wrench/reftests/boxshadow/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml
new file mode 100644
index 0000000000..5e2da4fa8a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml
@@ -0,0 +1,20 @@
+
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 1, 265, 265 ]
+ color: red
+ clip-mode: outset
+ offset: 350 -1
+ blur-radius: 1
+ spread-radius: -80
+ border-radius:
+ top-left: [185, 185]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [185, 185]
+
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml
new file mode 100644
index 0000000000..ebc4b263a1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml
@@ -0,0 +1,19 @@
+
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 1, 265, 265 ]
+ color: red
+ clip-mode: outset
+ offset: 350 -1
+ blur-radius: 1
+ spread-radius: -80
+ border-radius:
+ top-left: [250, 250]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [250, 250]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.png
new file mode 100644
index 0000000000..0741826160
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.yaml
new file mode 100644
index 0000000000..d52601e019
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-border-radii.yaml
@@ -0,0 +1,36 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.png
new file mode 100644
index 0000000000..96d2c7fed3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.yaml
new file mode 100644
index 0000000000..721c6fe4e0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-cache.yaml
@@ -0,0 +1,98 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 50, 200, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 50, 350, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 200, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 350, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
+
+ - type: box-shadow
+ bounds: [ 350, 200, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
+
+ - type: box-shadow
+ bounds: [ 350, 350, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml
new file mode 100644
index 0000000000..cda90245c9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml
@@ -0,0 +1,59 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ id: 2
+ bounds: [0, 0, 100, 200]
+ - type: clip-chain
+ id: 10
+ clips: [2]
+ - type: box-shadow
+ bounds: [ 20, 20, 200, 80 ]
+ color: blue
+ offset: [10, 20]
+ clip-mode: outset
+ clip-chain: 10
+
+ - type: clip
+ id: 3
+ bounds: [200, 0, 100, 200]
+ - type: clip-chain
+ id: 11
+ clips: [3]
+ - type: box-shadow
+ bounds: [ 220, 20, 200, 80 ]
+ color: red
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: outset
+ clip-chain: 11
+
+ - type: clip
+ id: 4
+ bounds: [0, 200, 100, 200]
+ - type: clip-chain
+ id: 12
+ clips: [4]
+ - type: box-shadow
+ bounds: [ 20, 220, 200, 80 ]
+ color: green
+ offset: [10, 20]
+ clip-mode: inset
+ clip-chain: 12
+
+ - type: clip
+ id: 5
+ bounds: [200, 200, 100, 200]
+ - type: clip-chain
+ id: 13
+ clips: [5]
+ - type: box-shadow
+ bounds: [ 220, 220, 200, 80 ]
+ color: yellow
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: inset
+ clip-chain: 13
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-clip.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clip.yaml
new file mode 100644
index 0000000000..c027b54379
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clip.yaml
@@ -0,0 +1,32 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 20, 20, 200, 80 ]
+ clip-rect: [0, 0, 100, 200]
+ color: blue
+ offset: [10, 20]
+ clip-mode: outset
+ - type: box-shadow
+ bounds: [ 220, 20, 200, 80 ]
+ clip-rect: [200, 0, 100, 200]
+ color: red
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: outset
+ - type: box-shadow
+ bounds: [ 20, 220, 200, 80 ]
+ clip-rect: [0, 200, 100, 200]
+ color: green
+ offset: [10, 20]
+ clip-mode: inset
+ - type: box-shadow
+ bounds: [ 220, 220, 200, 80 ]
+ clip-rect: [200, 200, 100, 200]
+ color: yellow
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: inset
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners-ref.yaml
new file mode 100644
index 0000000000..ce0bd28a5d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 40, 100, 10, 100 ]
+ color: red
+ - type: rect
+ bounds: [ 250, 100, 10, 100 ]
+ color: red
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners.yaml
new file mode 100644
index 0000000000..dd457e7e4a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-clipped-corners.yaml
@@ -0,0 +1,16 @@
+# Verify that if a clip results in all the corner segments of a box-shadow
+# (clip-out) primitive being culled, we still correctly clip-out and render
+# the inner segments
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [ 0, 100, 300, 100 ]
+
+ - type: box-shadow
+ bounds: [ 50, 50, 200, 200 ]
+ clip-chain: [2]
+ color: red
+ spread-radius: 10
+ border-radius: 10
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-empty.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-empty.yaml
new file mode 100644
index 0000000000..d3640d53f5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-empty.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 0
+ clip-mode: outset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.png
new file mode 100644
index 0000000000..f2be685139
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml
new file mode 100644
index 0000000000..28ac4a62a3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml
@@ -0,0 +1,120 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
+ type: "stacking-context"
+ "transform-style": flat
+ "raster-space": screen
+ filters: []
+ items:
+ -
+ bounds: [0, 148, 1368, 588]
+ "clip-rect": [0, 148, 1368, 588]
+ "backface-visible": true
+ type: clip
+ id: 2
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ -
+ bounds: [16, 164, 16200, 200]
+ "clip-rect": [40, 188, 1328, 216]
+ clip-chain: 3
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [16, 164, 16200, 200]
+ offset: [32, 32]
+ color: 0 0 255 1.0000
+ "blur-radius": 6
+ "spread-radius": 0
+ "border-radius":
+ "top-left": [16200, 200]
+ "top-right": [0, 0]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": outset
+ -
+ "clip-rect": [16, 164, 1352, 200]
+ "backface-visible": true
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [16, 164, 16200, 200]
+ radius:
+ "top-left": [16200, 200]
+ "top-right": [0, 0]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": clip
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ clip-chain: 3
+ "backface-visible": true
+ type: "clip-chain"
+ id: 5
+ clips: [4]
+ parent: 3
+ -
+ bounds: [16, 164, 16200, 200]
+ "clip-rect": [16, 164, 16200, 200]
+ clip-chain: 5
+ "backface-visible": true
+ type: rect
+ color: 255 0 255 1.0000
+ -
+ bounds: [16, 402, 200, 200]
+ "clip-rect": [40, 426, 216, 216]
+ clip-chain: 3
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [16, 402, 200, 200]
+ offset: [32, 32]
+ color: 0 255 255 1.0000
+ "blur-radius": 6
+ "spread-radius": 0
+ "border-radius":
+ "top-left": [0, 0]
+ "top-right": [200, 200]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": outset
+ -
+ "clip-rect": [16, 402, 200, 200]
+ "backface-visible": true
+ type: clip
+ id: 6
+ complex:
+ -
+ rect: [16, 402, 200, 200]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [200, 200]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": clip
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
+ type: "clip-chain"
+ id: 7
+ clips: [6]
+ parent: 3
+ -
+ bounds: [16, 402, 200, 200]
+ "clip-rect": [16, 402, 200, 200]
+ clip-chain: 7
+ "backface-visible": true
+ type: rect
+ color: 0 128 0 1.0000
+ id: [0, 0]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png
new file mode 100644
index 0000000000..9111ca4413
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml
new file mode 100644
index 0000000000..0a82cb5bee
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 1500, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 900, 900 ]
+ blur-radius: 5000
+ clip-mode: outset
+ offset: [10, 10]
+ spread-radius: 10
+ color: [255, 0, 0]
+ border-radius: 10
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png
new file mode 100644
index 0000000000..2b95442280
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml
new file mode 100644
index 0000000000..49d53e721f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 1500, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 1500, 100 ]
+ blur-radius: 200
+ clip-mode: outset
+ offset: [10, 100]
+ spread-radius: 10
+ color: [255, 0, 0]
+ border-radius: 10
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml
new file mode 100644
index 0000000000..29555c8f1d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 300
+ clip-mode: outset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml
new file mode 100644
index 0000000000..13b2239658
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 2000
+ clip-mode: outset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.png
new file mode 100644
index 0000000000..84d7af5164
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.yaml
new file mode 100644
index 0000000000..2dd7175d17
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-non-uniform-corner.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 500, 200 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 0
+ spread-radius: 10
+ border-radius: {
+ top-left: 32,
+ }
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml
new file mode 100644
index 0000000000..e44008fcb5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml
@@ -0,0 +1,21 @@
+# This emulates the result of box-shadow-spread.yaml without with a spread
+# amount of 0 compensated by manually inflating and offsetting the rectangle
+# and border radii.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 280, 280 ]
+ color: blue
+ clip-mode: outset
+ offset: 300 20
+ blur-radius: 4
+ spread-radius: 0
+ border-radius:
+ top-left: [0, 0]
+ top-right: [140, 140]
+ bottom-left: [140, 140]
+ bottom-right: [0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml
new file mode 100644
index 0000000000..902c7d089b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 200, 200 ]
+ color: blue
+ clip-mode: outset
+ offset: 340 60
+ blur-radius: 4
+ spread-radius: 40
+ border-radius:
+ top-left: [0, 0]
+ top-right: [100, 100]
+ bottom-left: [100, 100]
+ bottom-right: [0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.png
new file mode 100644
index 0000000000..7c1910aba4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.yaml
new file mode 100644
index 0000000000..0add751910
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-spread.yaml
@@ -0,0 +1,68 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 20, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 20
+
+ - type: box-shadow
+ bounds: [ 120, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 25
+
+ - type: box-shadow
+ bounds: [ 220, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 10
+
+ - type: box-shadow
+ bounds: [ 320, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 9
+
+ - type: box-shadow
+ bounds: [ 420, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 8
+
+ - type: box-shadow
+ bounds: [ 520, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 7
+
+ - type: box-shadow
+ bounds: [ 620, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 6
+
+ - type: box-shadow
+ bounds: [ 720, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 5
+
+ - type: box-shadow
+ bounds: [ 820, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 4
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png
new file mode 100644
index 0000000000..5d631c182b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml
new file mode 100644
index 0000000000..225433e4fe
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 800 ]
+ color: red
+ blur-radius: 16
+ border-radius: 32
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png
new file mode 100644
index 0000000000..d76f58e170
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml
new file mode 100644
index 0000000000..f90366b79f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 800, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 16
+ border-radius: 32
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.png
new file mode 100644
index 0000000000..67b46a609e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml
new file mode 100644
index 0000000000..29ab5a2a43
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml
@@ -0,0 +1,154 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ # 1st row
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 20 0
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 0 -40
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+ offset: 50 -10
+ blur-radius: 5
+
+ # 2nd row
+ - type: box-shadow
+ bounds: [ 50, 250, 100, 100 ]
+ color: green
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 250, 100, 100 ]
+ color: green
+ offset: 20 0
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 250, 100, 100 ]
+ color: green
+ offset: 0 -40
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
+ blur-radius: 5
+
+ # 3rd row
+ - type: box-shadow
+ bounds: [ 50, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+ blur-radius: 5
+
+ # 4th row
+ - type: box-shadow
+ bounds: [ 50, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
+ blur-radius: 5
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.png
new file mode 100644
index 0000000000..66e6dd9c38
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml
new file mode 100644
index 0000000000..8544da8ccc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml
@@ -0,0 +1,134 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ # 1st row
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 20 0
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 0 -40
+
+ - type: box-shadow
+ bounds: [ 500, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+
+ - type: box-shadow
+ bounds: [ 650, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+ offset: 50 -10
+
+ # 2nd row
+ - type: box-shadow
+ bounds: [ 50, 250, 100, 100 ]
+ color: green
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 200, 250, 100, 100 ]
+ color: green
+ offset: 20 0
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 350, 250, 100, 100 ]
+ color: green
+ offset: 0 -40
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 500, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 650, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
+
+ # 3rd row
+ - type: box-shadow
+ bounds: [ 50, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+
+ - type: box-shadow
+ bounds: [ 200, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+
+ - type: box-shadow
+ bounds: [ 350, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+
+ - type: box-shadow
+ bounds: [ 500, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+
+ - type: box-shadow
+ bounds: [ 650, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+
+ # 4th row
+ - type: box-shadow
+ bounds: [ 50, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 200, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 350, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 500, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 650, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
diff --git a/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png b/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png
new file mode 100644
index 0000000000..314b17f963
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only.yaml b/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only.yaml
new file mode 100644
index 0000000000..d8dabde293
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ items:
+ - type: box-shadow
+ bounds: [ 40, 40, 400, 400 ]
+ blur-radius: 0
+ spread-radius: 20
+ clip-mode: outset
+ border-radius: 200
+ color: black
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-alpha.png b/gfx/wr/wrench/reftests/boxshadow/inset-alpha.png
new file mode 100644
index 0000000000..bc4c0a1f37
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-alpha.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-alpha.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-alpha.yaml
new file mode 100644
index 0000000000..7764f0a276
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-alpha.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 0, 0, 100, 100 ]
+ clip-mode: inset
+ color: [255, 255, 255, 0.1]
+ blur-radius: 100
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-border-radius-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-border-radius-ref.yaml
new file mode 100644
index 0000000000..62d5dd10c9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-border-radius-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: clip
+ bounds: [0, 0, 100, 100]
+ complex:
+ - rect: [ 10, 10, 80, 80 ]
+ radius: 10
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-border-radius.png b/gfx/wr/wrench/reftests/boxshadow/inset-border-radius.png
new file mode 100644
index 0000000000..1572de5b77
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-border-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-border-radius.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-border-radius.yaml
new file mode 100644
index 0000000000..cb5c274f5a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-border-radius.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
+ border-radius: 10
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-downscale.png b/gfx/wr/wrench/reftests/boxshadow/inset-downscale.png
new file mode 100644
index 0000000000..aef7968600
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-downscale.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-downscale.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-downscale.yaml
new file mode 100644
index 0000000000..dd0c3abc2d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-downscale.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 400, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 200 ]
+ blur-radius: 50
+ clip-mode: inset
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-empty.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-empty.yaml
new file mode 100644
index 0000000000..85d2840546
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-empty.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 0
+ clip-mode: inset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-large-offset-ref.png b/gfx/wr/wrench/reftests/boxshadow/inset-large-offset-ref.png
new file mode 100644
index 0000000000..e1d189eaa0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-large-offset-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-large-offset.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-large-offset.yaml
new file mode 100644
index 0000000000..1cc2355d02
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-large-offset.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 1
+ clip-mode: inset
+ offset: [0, 200]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.png b/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.png
new file mode 100644
index 0000000000..b696cbfd41
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.yaml
new file mode 100644
index 0000000000..08f52af181
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 400.1, 400.1 ]
+ color: red
+ blur-radius: 10
+ clip-mode: inset
+ border-radius: 185
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.png b/gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.png
new file mode 100644
index 0000000000..b6b232a1d0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.yaml
new file mode 100644
index 0000000000..9fe63176c0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-neg-offset.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 22, 22, 200, 80 ]
+ color: blue
+ clip-mode: inset
+ offset: -2 -2
+ blur-radius: 20
+ spread-radius: 0
+ border-radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius-ref.png b/gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius-ref.png
new file mode 100644
index 0000000000..9c6a8d4bcf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius.yaml
new file mode 100644
index 0000000000..eb9c783718
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-no-blur-radius.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 0
+ clip-mode: inset
+ border-radius: 10
+ offset: 10 10
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-offset.png b/gfx/wr/wrench/reftests/boxshadow/inset-offset.png
new file mode 100644
index 0000000000..d5f41456fe
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-offset.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-offset.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-offset.yaml
new file mode 100644
index 0000000000..17fa232f3a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-offset.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 22, 22, 200, 80 ]
+ color: blue
+ clip-mode: inset
+ offset: 5 5
+ blur-radius: 20
+ spread-radius: 0
+ border-radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-simple-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-simple-ref.yaml
new file mode 100644
index 0000000000..526a1fa4e0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-simple-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-simple.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-simple.yaml
new file mode 100644
index 0000000000..78f6ef18c1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-simple.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-spread-large-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-spread-large-ref.yaml
new file mode 100644
index 0000000000..bdeec79e35
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-spread-large-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-spread-large.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-spread-large.yaml
new file mode 100644
index 0000000000..05cc5e40f2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-spread-large.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 5
+ clip-mode: inset
+ spread-radius: 200
+ color: [255, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-spread-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-spread-ref.yaml
new file mode 100644
index 0000000000..76802f9db0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-spread-ref.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [255, 255, 255]
+
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-spread.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-spread.yaml
new file mode 100644
index 0000000000..de09797dcf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-spread.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 5
+ clip-mode: inset
+ spread-radius: 20
+ color: [0, 0, 0]
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-subpx.png b/gfx/wr/wrench/reftests/boxshadow/inset-subpx.png
new file mode 100644
index 0000000000..89ca1e44b1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-subpx.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-subpx.yaml b/gfx/wr/wrench/reftests/boxshadow/inset-subpx.yaml
new file mode 100644
index 0000000000..22dc3f0959
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/inset-subpx.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 76, 67.5, 59.016666, 39 ]
+ offset: [30, 9]
+ blur-radius: 7
+ color: blue
+ clip-mode: inset
diff --git a/gfx/wr/wrench/reftests/boxshadow/invalid-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/invalid-ref.yaml
new file mode 100644
index 0000000000..4f2245ccaa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/invalid-ref.yaml
@@ -0,0 +1,5 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
diff --git a/gfx/wr/wrench/reftests/boxshadow/invalid.yaml b/gfx/wr/wrench/reftests/boxshadow/invalid.yaml
new file mode 100644
index 0000000000..6c1fecb995
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/invalid.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 100, 100, 200, 10 ]
+ blur-radius: 10.5
+ offset: [15, 15]
+ spread-radius: -15
+ color: red
diff --git a/gfx/wr/wrench/reftests/boxshadow/no-stretch.png b/gfx/wr/wrench/reftests/boxshadow/no-stretch.png
new file mode 100644
index 0000000000..e916a7d382
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/no-stretch.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/no-stretch.yaml b/gfx/wr/wrench/reftests/boxshadow/no-stretch.yaml
new file mode 100644
index 0000000000..4276ffa929
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/no-stretch.yaml
@@ -0,0 +1,21 @@
+# Test that box-shadows with overlapping corners
+# are drawn with simple mode (not stretched).
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 150, 150 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 2.4
+ offset: [100, 0]
+ spread-radius: -40
+ border-radius: {
+ top-left: 112,
+ top-right: 48,
+ bottom-left: 48,
+ bottom-right: 112,
+ }
diff --git a/gfx/wr/wrench/reftests/boxshadow/overlap1.png b/gfx/wr/wrench/reftests/boxshadow/overlap1.png
new file mode 100644
index 0000000000..a47c3ad696
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/overlap1.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/overlap1.yaml b/gfx/wr/wrench/reftests/boxshadow/overlap1.yaml
new file mode 100644
index 0000000000..1744983da6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/overlap1.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 10, 200, 80 ]
+ color: black
+ clip-mode: outset
+ offset: 0 150
+ blur-radius: 20
+ border-radius:
+ top-left: [100, 40]
+ top-right: [0, 0]
+ bottom-left: [100, 40]
+ bottom-right: [0, 0]
+
diff --git a/gfx/wr/wrench/reftests/boxshadow/overlap2.png b/gfx/wr/wrench/reftests/boxshadow/overlap2.png
new file mode 100644
index 0000000000..6b7b176011
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/overlap2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/overlap2.yaml b/gfx/wr/wrench/reftests/boxshadow/overlap2.yaml
new file mode 100644
index 0000000000..59ffb2c438
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/overlap2.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 200, 200 ]
+ color: red
+ clip-mode: outset
+ offset: 200 0
+ blur-radius: 1
+ spread-radius: 0
+ border-radius:
+ top-left: [100, 100]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [150, 150]
+
diff --git a/gfx/wr/wrench/reftests/boxshadow/reftest.list b/gfx/wr/wrench/reftests/boxshadow/reftest.list
new file mode 100644
index 0000000000..279b9fb59a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/reftest.list
@@ -0,0 +1,39 @@
+!= inset-simple.yaml inset-simple-ref.yaml
+!= inset-spread.yaml inset-spread-ref.yaml
+fuzzy-if(platform(swgl),3,2) == inset-no-blur-radius.yaml inset-no-blur-radius-ref.png
+== inset-spread-large.yaml inset-spread-large-ref.yaml
+platform(linux,mac) == inset-alpha.yaml inset-alpha.png
+platform(linux,mac) == boxshadow-spread-only.yaml boxshadow-spread-only-ref.png
+== box-shadow-clip.yaml box-shadow-clip-ref.yaml
+fuzzy(1,402) fuzzy-if(platform(swgl),2,1208) fuzzy-if(env(android,device),6,399) == inset-large-offset.yaml inset-large-offset-ref.png
+platform(linux,mac) == inset-border-radius.yaml inset-border-radius.png
+platform(linux,mac) == inset-offset.yaml inset-offset.png
+platform(linux,mac) == inset-neg-offset.yaml inset-neg-offset.png
+== box-shadow-empty.yaml blank.yaml
+platform(linux,mac) == box-shadow-suite-no-blur.yaml box-shadow-suite-no-blur.png
+platform(linux,mac) fuzzy(1,84) == box-shadow-suite-blur.yaml box-shadow-suite-blur.png
+fuzzy(1,8) == box-shadow-large-blur-radius.yaml box-shadow-large-blur-radius-ref.yaml
+fuzzy(1,6388) == rounding.yaml rounding-ref.yaml
+platform(linux,mac) == box-shadow-border-radii.yaml box-shadow-border-radii.png
+skip_on(android) fuzzy-if(platform(swgl),9,34) == box-shadow-spread.yaml box-shadow-spread.png # Too wide for Android
+== box-shadow-spread-radii.yaml box-shadow-spread-radii-ref.yaml
+== invalid.yaml invalid-ref.yaml
+== inset-empty.yaml blank.yaml
+platform(linux,mac) == inset-subpx.yaml inset-subpx.png
+platform(linux,mac) fuzzy(1,4) == inset-downscale.yaml inset-downscale.png
+platform(linux,mac) fuzzy(1,979) == box-shadow-cache.yaml box-shadow-cache.png
+platform(linux,mac) fuzzy(1,685) == overlap1.yaml overlap1.png
+fuzzy(2,757) fuzzy-if(platform(swgl),2,2414) == overlap2.yaml overlap2.png
+platform(linux,mac) fuzzy(1,48) == no-stretch.yaml no-stretch.png
+platform(linux,mac) fuzzy(1,9) == box-shadow-stretch-mode-x.yaml box-shadow-stretch-mode-x.png
+platform(linux,mac) fuzzy(1,41) == box-shadow-stretch-mode-y.yaml box-shadow-stretch-mode-y.png
+platform(linux,mac) fuzzy(1,14) == inset-mask-region.yaml inset-mask-region.png
+== box-shadow-blurred-overlapping-radii.yaml box-shadow-blurred-overlapping-radii-ref.yaml
+
+fuzzy(1,5) platform(linux,mac) == box-shadow-huge-radius.yaml box-shadow-huge-radius.png
+
+platform(linux,mac) == box-shadow-large-blur-radius-2.yaml box-shadow-large-blur-radius-2.png
+platform(linux,mac) fuzzy(1,8) == box-shadow-large-blur-radius-3.yaml box-shadow-large-blur-radius-3.png
+platform(linux,mac) fuzzy(1,79) == scale.yaml scale.png
+platform(linux,mac) fuzzy(1,4) == box-shadow-non-uniform-corner.yaml box-shadow-non-uniform-corner.png
+== box-shadow-clipped-corners.yaml box-shadow-clipped-corners-ref.yaml
diff --git a/gfx/wr/wrench/reftests/boxshadow/rounding-ref.yaml b/gfx/wr/wrench/reftests/boxshadow/rounding-ref.yaml
new file mode 100644
index 0000000000..e6e2fb8464
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/rounding-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: rect
+ bounds: [100, 100, 500, 500]
+ color: green
+ - type: rect
+ bounds: [200, 200, 300, 300]
+ color: black
+ - type: box-shadow
+ bounds: [200, 200, 300, 300]
+ blur-radius: 20
+ clip-mode: inset
+ spread-radius: 100
+ color: green
diff --git a/gfx/wr/wrench/reftests/boxshadow/rounding.yaml b/gfx/wr/wrench/reftests/boxshadow/rounding.yaml
new file mode 100644
index 0000000000..8078b2e1d6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/rounding.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: rect
+ bounds: [100, 100, 500, 500]
+ color: black
+ - type: box-shadow
+ bounds: [100, 100, 500, 500]
+ blur-radius: 20
+ clip-mode: inset
+ spread-radius: 200
+ color: green
diff --git a/gfx/wr/wrench/reftests/boxshadow/scale.png b/gfx/wr/wrench/reftests/boxshadow/scale.png
new file mode 100644
index 0000000000..58505f2845
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/scale.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/boxshadow/scale.yaml b/gfx/wr/wrench/reftests/boxshadow/scale.yaml
new file mode 100644
index 0000000000..12263b4eb9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/boxshadow/scale.yaml
@@ -0,0 +1,183 @@
+# Test that box shadows are drawn with correct symmetry in
+# a variety of cases. This test checks for various scale
+# factors, in combination with box shadows clipped by the
+# screen rect. It also has come large box shadows that check
+# the symmetry still works with segmentation enabled.
+---
+root:
+ items:
+ - type: stacking-context
+ transform: scale(0.3)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 50, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.4)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 150, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.5)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 250, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.6)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 350, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.7)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 450, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.73)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 550, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.75)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 650, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.77)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 750, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.8)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 850, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ -70, 800, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+
+ - type: stacking-context
+ transform: scale(0.3)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.4)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 150, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.5)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 250, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.6)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 350, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.7)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 450, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.73)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 550, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.75)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 650, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.77)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 750, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.8)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 850, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 50, 800, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 200, -100, 600, 200 ]
+ color: black
+ blur-radius: 5
+ clip-mode: inset
+
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 200, 200, 600, 200 ]
+ color: black
+ blur-radius: 5
+ clip-mode: outset
diff --git a/gfx/wr/wrench/reftests/clip/blank.yaml b/gfx/wr/wrench/reftests/clip/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/clip/blend-container-ref.yaml b/gfx/wr/wrench/reftests/clip/blend-container-ref.yaml
new file mode 100644
index 0000000000..2d3464959d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/blend-container-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 50, 50, 100, 100 ]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/clip/blend-container.yaml b/gfx/wr/wrench/reftests/clip/blend-container.yaml
new file mode 100644
index 0000000000..5506f2d25b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/blend-container.yaml
@@ -0,0 +1,19 @@
+# Verify that clip-chains are correctly applied to root level blend containers (which get
+# optimized to be tile caches).
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [ 50, 50, 100, 100 ]
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ blend-container: true
+ clip-chain: 3
+ items:
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/clip/border-with-rounded-clip.png b/gfx/wr/wrench/reftests/clip/border-with-rounded-clip.png
new file mode 100644
index 0000000000..120b21b6cc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/border-with-rounded-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/border-with-rounded-clip.yaml b/gfx/wr/wrench/reftests/clip/border-with-rounded-clip.yaml
new file mode 100644
index 0000000000..a41f9aeea7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/border-with-rounded-clip.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ -
+ clip-rect: [10, 10, 938, 200]
+ type: clip
+ id: 2
+ complex:
+ -
+ rect: [10, 10, 938, 200]
+ radius: [97, 97]
+ "clip-mode": clip
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ -
+ bounds: [10, 10, 100, 200]
+ type: border
+ width: [100, 50, 100, 50]
+ border-type: normal
+ color: green
+ style: solid
+ clip-chain: 12
diff --git a/gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.png b/gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.png
new file mode 100644
index 0000000000..9d28a88ed7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.yaml b/gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.yaml
new file mode 100644
index 0000000000..6c2c7a11e2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-2d-z-rotations.yaml
@@ -0,0 +1,22 @@
+# Ensure that we correctly handle clips that are 2d axis-aligned but
+# fiddle with the z-coordinate of the primitive without preserve-3d
+---
+root:
+ items:
+ - type: stacking-context
+ transform: rotate-x(45) rotate-z(45) translate(200, 200)
+ transform-origin: 100 100
+ items:
+ - type: stacking-context
+ transform: rotate-z(-45) rotate-y(45) translate(20, 0)
+ transform-origin: 100 100
+ items:
+ - type: clip
+ id: 3
+ complex:
+ - rect: [0, 0, 200, 100]
+ radius: 16
+ - bounds: [0, 0, 200, 100]
+ type: rect
+ color: red
+ clip-chain: [3]
diff --git a/gfx/wr/wrench/reftests/clip/clip-3d-transform-ref.yaml b/gfx/wr/wrench/reftests/clip/clip-3d-transform-ref.yaml
new file mode 100644
index 0000000000..58d66bec5a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-3d-transform-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ "clip-rect": [0, 0, 200, 200]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/clip/clip-3d-transform.yaml b/gfx/wr/wrench/reftests/clip/clip-3d-transform.yaml
new file mode 100644
index 0000000000..c40780ca22
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-3d-transform.yaml
@@ -0,0 +1,33 @@
+# This tests that clipping works well inside of a transformation with a 3d component that
+# is still axis-aligned and lacking a perspective component. These two spaces should exist
+# within a compatible coordinate system for local clipping (no masking).
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ transform: [0.5, 0, -0.8660254, 0, 0, 1, 0, 0, 0.8660254, 0, 0.5, 0, 0, 0, 0, 1]
+ "transform-style": flat
+ filters: []
+ items:
+ -
+ bounds: [0, 0, 800, 400]
+ "clip-rect": [0, 0, 800, 400]
+ "backface-visible": true
+ type: clip
+ id: 2
+ "content-size": [800, 400]
+ - type: clip-chain
+ id: 3
+ clips: [2]
+ -
+ bounds: [0, 0, 400, 200]
+ "clip-rect": [0, 0, 400, 200]
+ "backface-visible": true
+ type: rect
+ clip-chain: 3
+ color: green
diff --git a/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.png b/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.png
new file mode 100644
index 0000000000..b06e36cc43
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation.yaml b/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation.yaml
new file mode 100644
index 0000000000..018a8a1d78
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation.yaml
@@ -0,0 +1,35 @@
+# Test that transformed content is clipped properly by clips with a different transform.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ type: "stacking-context"
+ transform: rotate(-45) translate(200, 0)
+ items:
+ -
+ bounds: [0, 0, 300, 300]
+ "clip-rect": [0, 0, 300, 300]
+ type: rect
+ color: red
+ -
+ bounds: [0, 0, 300, 300]
+ "clip-rect": [0, 0, 300, 300]
+ type: clip
+ id: 5
+ - type: clip-chain
+ id: 10
+ clips: [5]
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ type: "stacking-context"
+ transform: rotate(45) translate(-300, 0)
+ clip-chain: 10
+ items:
+ -
+ bounds: [0, 0, 1598, 1200]
+ "clip-rect": [0, 0, 1598, 1200]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml b/gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml
new file mode 100644
index 0000000000..c092030714
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml
@@ -0,0 +1,18 @@
+# Test that filtered content is clipped properly in a rotated context
+---
+root:
+ items:
+ -
+ bounds: [16, 16, 0, 0]
+ type: "reference-frame"
+ transform: rotate(10)
+ id: 7
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 324, 295]
+ type: rect
+ color: red
diff --git a/gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation.yaml b/gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation.yaml
new file mode 100644
index 0000000000..dcd2668220
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-and-filter-with-rotation.yaml
@@ -0,0 +1,36 @@
+# Test that filtered content is clipped properly in a rotated context
+---
+root:
+ items:
+ -
+ bounds: [16, 16, 0, 0]
+ type: "reference-frame"
+ transform: rotate(10)
+ id: 7
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 324, 295]
+ type: clip
+ id: 2
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ -
+ bounds: [0, 0, 0, 0]
+ clip-chain: 3
+ type: "stacking-context"
+ filters: ["contrast(1.1)"] # any blend-style filter will do
+ items:
+ -
+ bounds: [-150, -150, 624, 624]
+ type: rect
+ color: blue
+ -
+ bounds: [-2, -2, 328, 299]
+ type: rect
+ color: red
diff --git a/gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.png b/gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.png
new file mode 100644
index 0000000000..e6e2a3bf01
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.yaml b/gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.yaml
new file mode 100644
index 0000000000..aa042a4488
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-between-picclip-and-lca.yaml
@@ -0,0 +1,29 @@
+---
+root:
+ items:
+ - type: clip
+ id: 1
+ bounds: [0, 0, 40, 40]
+ - type: clip-chain
+ id: 2
+ clips: [1]
+ - type: stacking-context
+ filters: brightness(0.5)
+ clip-chain: 2
+ items:
+ - type: clip
+ id: 3
+ bounds: [0, 0, 40, 40]
+ - type: clip
+ id: 4
+ complex:
+ - rect: [0, 0, 40, 40]
+ radius: [20, 20, 20, 20]
+ clip-mode: clip
+ - type: clip-chain
+ id: 5
+ clips: [3, 4]
+ - type: rect
+ bounds: [0, 0, 40, 40]
+ color: [255, 0, 0, 1.0]
+ clip-chain: 5
diff --git a/gfx/wr/wrench/reftests/clip/clip-corner-overlap-ref.yaml b/gfx/wr/wrench/reftests/clip/clip-corner-overlap-ref.yaml
new file mode 100644
index 0000000000..9f395a9836
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-corner-overlap-ref.yaml
@@ -0,0 +1,117 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [ 50, 50, 200, 100 ]
+ radius:
+ top-left: [200, 100]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 50, 50, 200, 100 ]
+ color: blue
+ clip-chain: [2]
+
+ - type: clip
+ id: 3
+ complex:
+ - rect: [ 50, 150, 200, 100 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [200, 100]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 50, 150, 200, 100 ]
+ color: blue
+ clip-chain: [3]
+
+ - type: clip
+ id: 4
+ complex:
+ - rect: [ 300, 50, 100, 200 ]
+ radius:
+ top-left: [100, 200]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 300, 50, 100, 200 ]
+ color: green
+ clip-chain: [4]
+
+ - type: clip
+ id: 5
+ complex:
+ - rect: [ 400, 50, 100, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [100, 200]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 400, 50, 100, 200 ]
+ color: green
+ clip-chain: [5]
+
+ - type: clip
+ id: 6
+ complex:
+ - rect: [ 50, 300, 200, 100 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [200, 100]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 50, 300, 200, 100 ]
+ color: red
+ clip-chain: [6]
+
+ - type: clip
+ id: 7
+ complex:
+ - rect: [ 50, 400, 200, 100 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [200, 100]
+ - type: rect
+ bounds: [ 50, 400, 200, 100 ]
+ color: red
+ clip-chain: [7]
+
+ - type: clip
+ id: 8
+ complex:
+ - rect: [ 300, 300, 100, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [100, 200]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 300, 300, 100, 200 ]
+ color: yellow
+ clip-chain: [8]
+
+ - type: clip
+ id: 9
+ complex:
+ - rect: [ 400, 300, 100, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [100, 200]
+ - type: rect
+ bounds: [ 400, 300, 100, 200 ]
+ color: yellow
+ clip-chain: [9]
diff --git a/gfx/wr/wrench/reftests/clip/clip-corner-overlap.yaml b/gfx/wr/wrench/reftests/clip/clip-corner-overlap.yaml
new file mode 100644
index 0000000000..46b562eba5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-corner-overlap.yaml
@@ -0,0 +1,61 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [ 50, 50, 200, 200 ]
+ radius:
+ top-left: [200, 100]
+ top-right: [0, 0]
+ bottom-left: [200, 100]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 50, 50, 200, 200 ]
+ color: blue
+ clip-chain: [2]
+
+ - type: clip
+ id: 3
+ complex:
+ - rect: [ 300, 50, 200, 200 ]
+ radius:
+ top-left: [100, 200]
+ top-right: [100, 200]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ - type: rect
+ bounds: [ 300, 50, 200, 200 ]
+ color: green
+ clip-chain: [3]
+
+ - type: clip
+ id: 4
+ complex:
+ - rect: [ 50, 300, 200, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [200, 100]
+ bottom-left: [0, 0]
+ bottom-right: [200, 100]
+ - type: rect
+ bounds: [ 50, 300, 200, 200 ]
+ color: red
+ clip-chain: [4]
+
+ - type: clip
+ id: 5
+ complex:
+ - rect: [ 300, 300, 200, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [100, 200]
+ bottom-right: [100, 200]
+ - type: rect
+ bounds: [ 300, 300, 200, 200 ]
+ color: yellow
+ clip-chain: [5]
diff --git a/gfx/wr/wrench/reftests/clip/clip-ellipse.png b/gfx/wr/wrench/reftests/clip/clip-ellipse.png
new file mode 100644
index 0000000000..49570d0359
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-ellipse.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/clip-ellipse.yaml b/gfx/wr/wrench/reftests/clip/clip-ellipse.yaml
new file mode 100644
index 0000000000..846fefae89
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-ellipse.yaml
@@ -0,0 +1,110 @@
+---
+root:
+ items:
+ - type: clip
+ id: 100
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: [32, 16]
+ - type: clip-chain
+ id: 200
+ clips: [100]
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: red
+ clip-chain: 200
+
+ - type: clip
+ id: 101
+ complex:
+ - rect: [130, 20, 100, 100]
+ radius: [32, 16]
+ clip-mode: clip-out
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ - type: rect
+ bounds: [130, 20, 100, 100]
+ color: green
+ clip-chain: 201
+
+ - type: clip
+ id: 102
+ complex:
+ - rect: [20, 130, 100, 100]
+ radius: [16, 32]
+ - type: clip-chain
+ id: 202
+ clips: [102]
+ - type: rect
+ bounds: [20, 130, 100, 100]
+ color: red
+ clip-chain: 202
+
+ - type: clip
+ id: 103
+ complex:
+ - rect: [130, 130, 100, 100]
+ radius: [16, 32]
+ clip-mode: clip-out
+ - type: clip-chain
+ id: 203
+ clips: [103]
+ - type: rect
+ bounds: [130, 130, 100, 100]
+ color: green
+ clip-chain: 203
+
+ - type: clip
+ id: 104
+ complex:
+ - rect: [20, 240, 100, 100]
+ radius: [128, 32]
+ - type: clip-chain
+ id: 204
+ clips: [104]
+ - type: rect
+ bounds: [20, 240, 100, 100]
+ color: red
+ clip-chain: 204
+
+ - type: clip
+ id: 105
+ complex:
+ - rect: [130, 240, 100, 100]
+ radius: [128, 32]
+ clip-mode: clip-out
+ - type: clip-chain
+ id: 205
+ clips: [105]
+ - type: rect
+ bounds: [130, 240, 100, 100]
+ color: green
+ clip-chain: 205
+
+ - type: clip
+ id: 106
+ complex:
+ - rect: [20, 350, 100, 100]
+ radius: [32, 128]
+ - type: clip-chain
+ id: 206
+ clips: [106]
+ - type: rect
+ bounds: [20, 350, 100, 100]
+ color: red
+ clip-chain: 206
+
+ - type: clip
+ id: 107
+ complex:
+ - rect: [130, 350, 100, 100]
+ radius: [32, 128]
+ clip-mode: clip-out
+ - type: clip-chain
+ id: 207
+ clips: [107]
+ - type: rect
+ bounds: [130, 350, 100, 100]
+ color: green
+ clip-chain: 207
diff --git a/gfx/wr/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml b/gfx/wr/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml
new file mode 100644
index 0000000000..c41bcee382
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml
@@ -0,0 +1,20 @@
+# In this case, the inner rectangle of the clip is empty, because
+# the size is 200 and each corner radius is 100.
+# The blue rect should be fully invisible
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 0, 0, 0]
+ items:
+ -
+ type: clip
+ id: 2
+ complex:
+ - rect: [ 0, 0, 200, 200 ]
+ radius: 100
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: red
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/clip/clip-empty-inner-rect.yaml b/gfx/wr/wrench/reftests/clip/clip-empty-inner-rect.yaml
new file mode 100644
index 0000000000..a57c816223
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-empty-inner-rect.yaml
@@ -0,0 +1,29 @@
+# In this case, the inner rectangle of the clip is empty, because
+# the size is 200 and each corner radius is 100.
+# The blue rect should be fully invisible
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 0, 0, 0]
+ items:
+ -
+ type: clip
+ id: 2
+ complex:
+ - rect: [ 0, 0, 200, 200 ]
+ radius: 100
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: red
+ clip-chain: [2]
+ - type: "stacking-context"
+ bounds: [0, 0, 0, 0]
+ transform: translate(0, 0, 1)
+ items:
+ -
+ type: rect
+ bounds: [0, 0, 25, 25]
+ color: blue
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/clip/clip-filter-raster-root-ref.yaml b/gfx/wr/wrench/reftests/clip/clip-filter-raster-root-ref.yaml
new file mode 100644
index 0000000000..7fde17f184
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-filter-raster-root-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ -
+ type: "reference-frame"
+ transform: [perspective(10), rotate(45)]
+ transform-origin: 500 100
+ items:
+ -
+ type: "stacking-context"
+ filters: [identity]
+ items:
+ -
+ bounds: [100, 100, 200, 200]
+ type: rect
+ color: red
diff --git a/gfx/wr/wrench/reftests/clip/clip-filter-raster-root.yaml b/gfx/wr/wrench/reftests/clip/clip-filter-raster-root.yaml
new file mode 100644
index 0000000000..688b832016
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-filter-raster-root.yaml
@@ -0,0 +1,27 @@
+# Test that a local-space clip when applied to a surface (due to the filter) that is also
+# a raster root (due to the perspective) is correctly applied.
+---
+root:
+ items:
+ -
+ type: "reference-frame"
+ transform: [perspective(10), rotate(45)]
+ transform-origin: 500 100
+ items:
+ -
+ bounds: [100, 100, 200, 200]
+ type: clip
+ id: 2
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ -
+ clip-chain: 3
+ type: "stacking-context"
+ filters: [identity]
+ items:
+ -
+ bounds: [0, 0, 400, 400]
+ type: rect
+ color: red
diff --git a/gfx/wr/wrench/reftests/clip/clip-mode.png b/gfx/wr/wrench/reftests/clip/clip-mode.png
new file mode 100644
index 0000000000..e40a9db215
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-mode.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/clip-mode.yaml b/gfx/wr/wrench/reftests/clip/clip-mode.yaml
new file mode 100644
index 0000000000..d20e53668f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-mode.yaml
@@ -0,0 +1,29 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: red
+ clip-chain: 12
+
+ - type: clip
+ id: 3
+ complex:
+ - rect: [130, 20, 100, 100]
+ radius: 32
+ clip-mode: clip-out
+ - type: clip-chain
+ id: 13
+ clips: [3]
+ - type: rect
+ bounds: [130, 20, 100, 100]
+ color: green
+ clip-chain: 13
diff --git a/gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc-ref.yaml b/gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc-ref.yaml
new file mode 100644
index 0000000000..5946aeedae
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: blue
diff --git a/gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc.yaml b/gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc.yaml
new file mode 100644
index 0000000000..eb0493a81d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-rectangle-redundant-sc.yaml
@@ -0,0 +1,20 @@
+# Test that rect clips on redundant stacking contexts are applied to child prims
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: clip
+ id: 2
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ -
+ clip-chain: 3
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: blue
diff --git a/gfx/wr/wrench/reftests/clip/clip-thin-rotated-ref.yaml b/gfx/wr/wrench/reftests/clip/clip-thin-rotated-ref.yaml
new file mode 100644
index 0000000000..e09079424d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-thin-rotated-ref.yaml
@@ -0,0 +1,13 @@
+# Test checks if a rotated clip with a long and thin rectangle would still
+# correctly affect the primitive with regards to the inner bounds.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [100, 100, 14, 14]
+ type: rect
+ color: blue
diff --git a/gfx/wr/wrench/reftests/clip/clip-thin-rotated.yaml b/gfx/wr/wrench/reftests/clip/clip-thin-rotated.yaml
new file mode 100644
index 0000000000..d0e626af91
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clip-thin-rotated.yaml
@@ -0,0 +1,41 @@
+# Test checks if a rotated clip with a long and thin rectangle would still
+# correctly affect the primitive with regards to the inner bounds.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "reference-frame"
+ id: 2
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ transform: rotate(45) translate(200, 0)
+ items:
+ -
+ bounds: [0, 0, 20, 1000]
+ type: clip
+ id: 5
+ # uncomment this to see the clip area
+ #-
+ # bounds: [0, 0, 20, 1000]
+ # type: rect
+ # color: green
+ - # we aren't supposed to see this one
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ clip-and-scroll: [2, 5]
+ items:
+ -
+ bounds: [120, 120, 10, 10]
+ type: rect
+ color: red
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ clip-and-scroll: [2, 5]
+ items:
+ -
+ bounds: [100, 100, 14, 14]
+ type: rect
+ color: blue
diff --git a/gfx/wr/wrench/reftests/clip/clipped-occlusion-ref.yaml b/gfx/wr/wrench/reftests/clip/clipped-occlusion-ref.yaml
new file mode 100644
index 0000000000..69a5fb0624
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clipped-occlusion-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ type: rect
+ bounds: [0, 0, 500, 500]
+ color: red
diff --git a/gfx/wr/wrench/reftests/clip/clipped-occlusion.yaml b/gfx/wr/wrench/reftests/clip/clipped-occlusion.yaml
new file mode 100644
index 0000000000..8f47d2837e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/clipped-occlusion.yaml
@@ -0,0 +1,25 @@
+# This is a regression test for https://bugzilla.mozilla.org/show_bug.cgi?id=1594567
+# The single clip node from the primitive inside the scroll frame will be promoted
+# to a 'shared clip' in the picture cache for the scroll frame. Ensure that this clip
+# (zero sized in this test) is included in the tile occlusion culling.
+---
+root:
+ items:
+ -
+ type: rect
+ bounds: [0, 0, 500, 500]
+ color: red
+ -
+ type: scroll-frame
+ content-size: [1000, 10000]
+ bounds: [0, -5000, 1000, 10000]
+ items:
+ - type: clip
+ id: 2
+ bounds: [0, 0, 0, 0]
+ -
+ bounds: [0, -5000, 1000, 10000]
+ type: rect
+ color: green
+ clip-chain: [2]
+ \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml b/gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml
new file mode 100644
index 0000000000..c84fe7a612
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ -
+ bounds: [10, 10, 100, 100]
+ "clip-rect": [10, 10, 100, 100]
+ "backface-visible": true
+ type: rect
+ color: 0 255 0 1
diff --git a/gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml b/gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml
new file mode 100644
index 0000000000..e2cf3c9177
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml
@@ -0,0 +1,31 @@
+# This test ensures that custom clip chains are not affected by the ancestors
+# of their clipping nodes. In this case the node, 3, will probably be optimized
+# away since its ancestor 2 has a tighter bounding rect. On the other hand, a
+# clip chain which includes 3 should only get the rectangle specified by that
+# node and not be affected by 2 at all.
+---
+root:
+ items:
+ -
+ bounds: [25, 25, 50, 50]
+ "clip-rect": [25, 25, 50, 50]
+ type: clip
+ id: 2
+ -
+ bounds: [10, 10, 100, 100]
+ clip-rect: [10, 10, 100, 100]
+ type: clip
+ id: 3
+ "content-size": [800, 1000]
+ -
+ bounds: [0, 0, 0, 0]
+ clip-rect: [0, 0, 0, 0]
+ type: "clip-chain"
+ id: 10
+ clips: [3]
+ -
+ bounds: [0, 0, 200, 200]
+ clip-rect: [0, 0, 200, 200]
+ clip-chain: 10
+ type: rect
+ color: 0 255 0 1
diff --git a/gfx/wr/wrench/reftests/clip/fixed-position-clipping-ref.yaml b/gfx/wr/wrench/reftests/clip/fixed-position-clipping-ref.yaml
new file mode 100644
index 0000000000..abbc91f897
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/fixed-position-clipping-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ -
+ bounds: [10, 10, 100, 100]
+ clip-rect: [10, 10, 100, 100]
+ type: rect
+ color: 0 255 0 1.0
+ -
+ bounds: [110, 10, 100, 100]
+ clip-rect: [110, 10, 100, 100]
+ type: rect
+ color: 0 255 0 1.0
+ id: [0, 1]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/clip/fixed-position-clipping.yaml b/gfx/wr/wrench/reftests/clip/fixed-position-clipping.yaml
new file mode 100644
index 0000000000..e6e27ea857
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/fixed-position-clipping.yaml
@@ -0,0 +1,45 @@
+# This test ensures that children of fixed position stacking contexts are not
+# clipped by parent clipping nodes. The contents of the fixed position stacking
+# contexts below should not be clipped by their parent clipping nodes, but
+# instead should be promoted to be children of the top-level reference frame.
+---
+root:
+ items:
+ -
+ clip-rect: [15, 15, 30, 30]
+ type: scroll-frame
+ content-size: [60, 60]
+ bounds: [15, 15, 30, 30]
+ items:
+ -
+ bounds: [10, 10, 100, 100]
+ clip-rect: [10, 10, 100, 100]
+ type: stacking-context
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ clip-rect: [0, 0, 100, 100]
+ type: rect
+ color: 0 255 0 1.0
+ # The same test as above, except this time the stacking context also starts its
+ # own reference frame.
+ -
+ clip-rect: [115, 15, 30, 30]
+ type: scroll-frame
+ content-size: [60, 60]
+ bounds: [115, 15, 30, 30]
+ items:
+ -
+ bounds: [110, 10, 100, 100]
+ clip-rect: [110, 10, 100, 100]
+ id: 4
+ type: stacking-context
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ clip-rect: [0, 0, 100, 100]
+ type: rect
+ color: 0 255 0 1.0
+ id: [0, 1]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml b/gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml
new file mode 100644
index 0000000000..c8f3148ea5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 50, 100]
+ color: red
diff --git a/gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml b/gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml
new file mode 100644
index 0000000000..7c1dd4336b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml
@@ -0,0 +1,27 @@
+# Ensure that a stacking context with a simple clip that encloses
+# an iframe correctly propagates the stacking context clip to the
+# clip on the iframe.
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [50, 50, 50, 100]
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ clip-chain: 3
+ items:
+ - type: iframe
+ id: [1, 3]
+ bounds: [0, 0, 100, 100]
+pipelines:
+ -
+ id: [1, 3]
+ items:
+ - type: rect
+ color: red
+ bounds: [0, 0, 100, 100]
diff --git a/gfx/wr/wrench/reftests/clip/inverted-ellipse.png b/gfx/wr/wrench/reftests/clip/inverted-ellipse.png
new file mode 100644
index 0000000000..dcddd1c614
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/inverted-ellipse.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/inverted-ellipse.yaml b/gfx/wr/wrench/reftests/clip/inverted-ellipse.yaml
new file mode 100644
index 0000000000..7e98d88cee
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/inverted-ellipse.yaml
@@ -0,0 +1,15 @@
+# Ensure that nine-patch clip-mask rendering works correctly when
+# the shape forms an ellipse where the ratio of the corner size
+# is inverted from the ratio of the primitive size
+---
+root:
+ items:
+ - type: clip
+ id: 3
+ complex:
+ - rect: [50, 50, 225, 150]
+ radius: [112.5, 75]
+ - type: rect
+ bounds: 50 50 225 150
+ color: red
+ clip-chain: [3]
diff --git a/gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask-ref.yaml b/gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask-ref.yaml
new file mode 100644
index 0000000000..6fdde50513
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 8, 128]
+ color: [255, 0, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask.yaml b/gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask.yaml
new file mode 100644
index 0000000000..b7f513719b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/raster-roots-tiled-mask.yaml
@@ -0,0 +1,22 @@
+# Verify that tiled image clip masks are correctly positioned when the
+# underlying surface has established a raster root
+---
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 8, 1024]
+ content-size: [8, 2048]
+ scroll-offset: [0, 1024]
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: solid-color(128,0,0,0,8,1024)
+ rect: [0, 0, 8, 2048]
+ repeat: false
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 1024, 8, 128]
+ color: red
diff --git a/gfx/wr/wrench/reftests/clip/reftest.list b/gfx/wr/wrench/reftests/clip/reftest.list
new file mode 100644
index 0000000000..3410425635
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/reftest.list
@@ -0,0 +1,24 @@
+platform(linux,mac) == border-with-rounded-clip.yaml border-with-rounded-clip.png
+fuzzy-if(platform(swgl),1,4) == clip-mode.yaml clip-mode.png
+fuzzy-if(platform(swgl),1,80) == clip-ellipse.yaml clip-ellipse.png
+platform(linux,mac) == clip-45-degree-rotation.yaml clip-45-degree-rotation-ref.png
+== clip-3d-transform.yaml clip-3d-transform-ref.yaml
+fuzzy(1,4) == clip-corner-overlap.yaml clip-corner-overlap-ref.yaml
+== custom-clip-chain-node-ancestors.yaml custom-clip-chain-node-ancestors-ref.yaml
+== fixed-position-clipping.yaml fixed-position-clipping-ref.yaml
+platform(linux,mac) == segmentation-with-other-coordinate-system-clip.yaml segmentation-with-other-coordinate-system-clip.png
+== segmentation-across-rotation.yaml segmentation-across-rotation-ref.yaml
+skip_on(android,device) fuzzy(1,2) == color_targets(3) alpha_targets(0) stacking-context-clip.yaml stacking-context-clip-ref.yaml
+== snapping.yaml snapping-ref.yaml
+fuzzy(198,1055) == clip-and-filter-with-rotation.yaml clip-and-filter-with-rotation-ref.yaml
+== clipped-occlusion.yaml clipped-occlusion-ref.yaml
+== clip-empty-inner-rect.yaml clip-empty-inner-rect-ref.yaml
+== iframe-nested-in-stacking-context.yaml iframe-nested-in-stacking-context-ref.yaml
+== clip-rectangle-redundant-sc.yaml clip-rectangle-redundant-sc-ref.yaml
+fuzzy(128,707) == clip-filter-raster-root.yaml clip-filter-raster-root-ref.yaml
+== blend-container.yaml blend-container-ref.yaml
+== raster-roots-tiled-mask.yaml raster-roots-tiled-mask-ref.yaml
+platform(linux,mac) == inverted-ellipse.yaml inverted-ellipse.png
+platform(linux,mac) == clip-2d-z-rotations.yaml clip-2d-z-rotations.png
+platform(linux,mac) == sc-mask-with-blur.yaml sc-mask-with-blur.png
+platform(linux,mac) == clip-between-picclip-and-lca.yaml clip-between-picclip-and-lca.png
diff --git a/gfx/wr/wrench/reftests/clip/sc-mask-with-blur.png b/gfx/wr/wrench/reftests/clip/sc-mask-with-blur.png
new file mode 100644
index 0000000000..8c03d977ba
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/sc-mask-with-blur.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/sc-mask-with-blur.yaml b/gfx/wr/wrench/reftests/clip/sc-mask-with-blur.yaml
new file mode 100644
index 0000000000..df11a0192f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/sc-mask-with-blur.yaml
@@ -0,0 +1,18 @@
+# Verify that a complex clip mask on a stacking content with a blur filter is correctly
+# handled, since the downscaled target size may differ from the picture content
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [100, 100, 100, 100]
+ radius: 32
+ - type: stacking-context
+ bounds: [100, 100, 100, 100]
+ filters: blur(8, 8)
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/clip/segmentation-across-rotation-ref.yaml b/gfx/wr/wrench/reftests/clip/segmentation-across-rotation-ref.yaml
new file mode 100644
index 0000000000..6d14bab91c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/segmentation-across-rotation-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: [0, 255, 0, 1]
+ bounds: [100, 100, 100, 100]
diff --git a/gfx/wr/wrench/reftests/clip/segmentation-across-rotation.yaml b/gfx/wr/wrench/reftests/clip/segmentation-across-rotation.yaml
new file mode 100644
index 0000000000..6d9ea31708
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/segmentation-across-rotation.yaml
@@ -0,0 +1,31 @@
+# This test ensures that a clip that is segmented, with segments
+# that have no intersection with the world-space outer bounds of
+# the clip rectangle render correctly. In this case the first clip
+# defines the outer bounds of the clip rectangle and the rotation
+# ensures that the inner clip isn't optimized away completely. The
+# segments of the rounded corner clip don't have any intersection at
+# all with the clip in area from the outer clip, so they shouldn't
+# affect the rendering of the green square.
+---
+root:
+ items:
+ - type: clip
+ bounds: [100, 100, 100, 100]
+ id: 2
+ -
+ type: stacking-context
+ transform: rotate(0.25)
+ items:
+ - type: clip
+ id: 3
+ complex:
+ - rect: [ 0, 0, 2400, 900 ]
+ radius: 50
+ - type: clip-chain
+ id: 4
+ clips: [2, 3]
+ - type: rect
+ color: [0, 255, 0, 1]
+ bounds: [0, 0, 2400, 900]
+ clip-chain: 4
+
diff --git a/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml b/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml
new file mode 100644
index 0000000000..8627d2ed74
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ -
+ type: rect
+ color: green
+ bounds: [0, 0, 100, 100]
+ "clip-rect": [0, 0, 100, 100]
diff --git a/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png b/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png
new file mode 100644
index 0000000000..67507a2573
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml b/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml
new file mode 100644
index 0000000000..9cf73988a8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml
@@ -0,0 +1,48 @@
+# This is testing whether a clip properly clips a primitive in another
+# coordinate system that is segmented.
+# See https://github.com/servo/webrender/issues/2294
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ id: 2
+ 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.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.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.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.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.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.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]
diff --git a/gfx/wr/wrench/reftests/clip/snapping-ref.yaml b/gfx/wr/wrench/reftests/clip/snapping-ref.yaml
new file mode 100644
index 0000000000..003f7b3e6f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/snapping-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [50, 50, 100, 100]
+ radius: 16
+ - type: rect
+ bounds: 50 50 100 100
+ color: red
+ clip-chain: [2]
+
+ - type: rect
+ bounds: 200 50 100 100
+ color: green
+
diff --git a/gfx/wr/wrench/reftests/clip/snapping.yaml b/gfx/wr/wrench/reftests/clip/snapping.yaml
new file mode 100644
index 0000000000..0658885a2e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/snapping.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [50.3, 50.3, 100, 100]
+ radius: 16
+ - type: rect
+ bounds: 50.3 50.3 100 100
+ color: red
+ clip-chain: [2]
+
+ - type: rect
+ bounds: 200.3 50.3 100 100
+ color: green
+
diff --git a/gfx/wr/wrench/reftests/clip/stacking-context-clip-ref.yaml b/gfx/wr/wrench/reftests/clip/stacking-context-clip-ref.yaml
new file mode 100644
index 0000000000..412309ccda
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/stacking-context-clip-ref.yaml
@@ -0,0 +1,37 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: {
+ top-left: 50,
+ top-right: 50,
+ bottom-left: 50,
+ bottom-right: 50,
+ }
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ clip-chain: 12
+ - type: clip
+ id: 3
+ bounds: [120, 0, 50, 50]
+ - type: clip-chain
+ id: 13
+ clips: [3]
+ - type: stacking-context
+ bounds: [100, 0, 100, 100]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ clip-chain: 13
diff --git a/gfx/wr/wrench/reftests/clip/stacking-context-clip.yaml b/gfx/wr/wrench/reftests/clip/stacking-context-clip.yaml
new file mode 100644
index 0000000000..e4a9618204
--- /dev/null
+++ b/gfx/wr/wrench/reftests/clip/stacking-context-clip.yaml
@@ -0,0 +1,43 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: {
+ top-left: 50,
+ top-right: 50,
+ bottom-left: 50,
+ bottom-right: 50,
+ }
+ -
+ type: "clip-chain"
+ id: 4
+ clips: [2]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ clip-chain: 4
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ # The same test, but this time with hue rotation, which means that the stacking
+ # context is rendered to an intermediate surface first. Unfortunately, we cannot
+ # use a rounded clip here because we want to avoid subpixel differences and avoid
+ # relying on a PNG reference image.
+ - type: clip
+ id: 3
+ bounds: [120, 0, 50, 50]
+ -
+ type: "clip-chain"
+ id: 5
+ clips: [3]
+ - type: stacking-context
+ bounds: [100, 0, 100, 100]
+ filters: hue-rotate(90)
+ clip-chain: 5
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/FreeSans.ttf b/gfx/wr/wrench/reftests/compositor-surface/FreeSans.ttf
new file mode 100644
index 0000000000..9db958532c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/FreeSans.ttf
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/barn-u.png b/gfx/wr/wrench/reftests/compositor-surface/barn-u.png
new file mode 100644
index 0000000000..a0fc2ec8fe
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/barn-u.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/barn-v.png b/gfx/wr/wrench/reftests/compositor-surface/barn-v.png
new file mode 100644
index 0000000000..7ee1fc18e8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/barn-v.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/barn-y.png b/gfx/wr/wrench/reftests/compositor-surface/barn-y.png
new file mode 100644
index 0000000000..595442643b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/barn-y.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml
new file mode 100644
index 0000000000..1a567dd9e6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 462, 462]
+ color: green
+ - type: rect
+ bounds: [125, 125, 312, 312]
+ color: [128, 128, 128, 0.5]
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [150, 150, 262, 262]
+ - type: rect
+ bounds: [200, 200, 162, 162]
+ color: [0, 0, 255, 0.5]
+ - text: "Subpixel AA Text"
+ origin: 80 100
+ size: 20
+ color: black
diff --git a/gfx/wr/wrench/reftests/compositor-surface/basic.yaml b/gfx/wr/wrench/reftests/compositor-surface/basic.yaml
new file mode 100644
index 0000000000..0ea9b8a394
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/basic.yaml
@@ -0,0 +1,22 @@
+# Test that basic functionality of non-opaque compositor surfaces
+# is blending correctly, and that subpixel AA is used outside the
+# compositor surface region.
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 462, 462]
+ color: green
+ - type: rect
+ bounds: [125, 125, 312, 312]
+ color: [128, 128, 128, 0.5]
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [150, 150, 262, 262]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [200, 200, 162, 162]
+ color: [0, 0, 255, 0.5]
+ - text: "Subpixel AA Text"
+ origin: 80 100
+ size: 20
+ color: black
diff --git a/gfx/wr/wrench/reftests/compositor-surface/blank.yaml b/gfx/wr/wrench/reftests/compositor-surface/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml b/gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml
new file mode 100644
index 0000000000..7cc2b77710
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml
@@ -0,0 +1,17 @@
+# Regression test - ensure we don't crash when we encounter a
+# transform hierarchy that has different coordinate systems but
+# results in a final transform that is 2d-axis-aligned
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 262, 262]
+ transform: rotate(45)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 262, 262]
+ transform: rotate(-45)
+ items:
+ - image: checkerboard(2,16,16)
+ bounds: [0, 0, 262, 262]
+ prefer-compositor-surface: true
diff --git a/gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml
new file mode 100644
index 0000000000..c5475c9814
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - image: checkerboard(2,16,16)
+ bounds: [50, 50, 262, 262]
+ - type: stacking-context
+ filters: [opacity(0.5)]
+ items:
+ - type: rect
+ bounds: [100, 100, 162, 162]
+ color: green
diff --git a/gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml
new file mode 100644
index 0000000000..514225363a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml
@@ -0,0 +1,15 @@
+# Verify that an off-screen surface that is placed over top
+# of a compositor surface selects the correct sub-slice when
+# adding to command buffers.
+---
+root:
+ items:
+ - image: checkerboard(2,16,16)
+ bounds: [50, 50, 262, 262]
+ prefer-compositor-surface: true
+ - type: stacking-context
+ filters: [opacity(0.5)]
+ items:
+ - type: rect
+ bounds: [100, 100, 162, 162]
+ color: green
diff --git a/gfx/wr/wrench/reftests/compositor-surface/mask.png b/gfx/wr/wrench/reftests/compositor-surface/mask.png
new file mode 100644
index 0000000000..32cb21bc58
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/mask.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/mask.yaml b/gfx/wr/wrench/reftests/compositor-surface/mask.yaml
new file mode 100644
index 0000000000..057283e727
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/mask.yaml
@@ -0,0 +1,20 @@
+# Test that basic functionality of opaque compositor surfaces with
+# clip mask is blending correctly.
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 462, 462]
+ color: green
+ - type: clip
+ id: 3
+ complex:
+ - rect: [150, 150, 262, 262]
+ radius: 32
+ - image: checkerboard(2,16,16)
+ bounds: [150, 150, 262, 262]
+ prefer-compositor-surface: true
+ clip-chain: [3]
+ - type: rect
+ bounds: [200, 200, 162, 162]
+ color: [0, 0, 255, 0.5]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml
new file mode 100644
index 0000000000..c8ce2fb444
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [50, 50, 362, 362]
+ color: green
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [100, 100, 262, 262]
+ - type: stacking-context
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [150, 150, 162, 162]
+ color: red
diff --git a/gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml b/gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml
new file mode 100644
index 0000000000..fb8afe312d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml
@@ -0,0 +1,20 @@
+# Verify that we don't promote compositor surfaces within a root level blend container,
+# as that can prevent correct blending with the compositor surface.
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [50, 50, 362, 362]
+ color: green
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [100, 100, 262, 262]
+ prefer-compositor-surface: true
+ - type: stacking-context
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [150, 150, 162, 162]
+ color: red
diff --git a/gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.png b/gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.png
new file mode 100644
index 0000000000..f6ab9b4473
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.yaml b/gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.yaml
new file mode 100644
index 0000000000..cffc48299a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/multiple-underlays-with-mask.yaml
@@ -0,0 +1,28 @@
+# Verify that we correctly handle multiple underlays where subsequent underlays have masks
+# Reference image is public-domain - https://en.wikipedia.org/wiki/File:Barn-yuv.png
+---
+root:
+ items:
+ - type: rect
+ color: white
+ bounds: [0, 0, 500, 500]
+ - type: clip
+ id: 3
+ complex:
+ - rect: [150, 150, 199, 199]
+ radius: 32
+ - type: yuv-image
+ format: planar
+ src-y: barn-y.png
+ src-u: barn-u.png
+ src-v: barn-v.png
+ bounds: [100, 100, 299, 299]
+ prefer-compositor-surface: true
+ - type: yuv-image
+ format: planar
+ src-y: barn-y.png
+ src-u: barn-u.png
+ src-v: barn-v.png
+ bounds: [150, 150, 199, 199]
+ prefer-compositor-surface: true
+ clip-chain: [3]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml b/gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml
new file mode 100644
index 0000000000..cfe73293d2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml
@@ -0,0 +1,15 @@
+# Ensure that compositor surfaces which exist in child pictures with
+# None for composite mode don't get promoted to a compositor surface,
+# as we don't currently account for these in `compositor_surface_count`.
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 256 256
+ filters: invert(1)
+ - image: checkerboard(2,16,16)
+ bounds: [150, 150, 262, 262]
+ prefer-compositor-surface: true
diff --git a/gfx/wr/wrench/reftests/compositor-surface/reftest.list b/gfx/wr/wrench/reftests/compositor-surface/reftest.list
new file mode 100644
index 0000000000..fa4e93f1a2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/reftest.list
@@ -0,0 +1,11 @@
+skip_on(android) fuzzy(2,500) == basic.yaml basic-ref.yaml
+== too-many-surfaces.yaml too-many-surfaces-ref.yaml
+!= picture-passthrough.yaml blank.yaml
+fuzzy(2,1000) == mix-blend.yaml mix-blend-ref.yaml
+!= coord-systems.yaml blank.yaml
+fuzzy(2,2500) == filter-overlay.yaml filter-overlay-ref.yaml
+platform(linux,mac) == mask.yaml mask.png
+platform(linux) fuzzy(7,86000) == underlay.yaml underlay.png
+fuzzy(2,2600) == transparent-opaque-image.yaml transparent-opaque-image-ref.yaml
+platform(linux) == underlay-mask-on-translucent-slice.yaml underlay-mask-on-translucent-slice.png
+fuzzy(2,100) platform(linux) == multiple-underlays-with-mask.yaml multiple-underlays-with-mask.png
diff --git a/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml
new file mode 100644
index 0000000000..00f9f7da6b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml
@@ -0,0 +1,31 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 400, 88]
+ color: green
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [60, 60, 68, 68]
+ - type: rect
+ bounds: [55, 70, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [138, 60, 68, 68]
+ - type: rect
+ bounds: [55, 80, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [216, 60, 68, 68]
+ - type: rect
+ bounds: [55, 90, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [294, 60, 68, 68]
+ - type: rect
+ bounds: [55, 100, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [372, 60, 68, 68]
+ - type: rect
+ bounds: [55, 110, 390, 5]
+ color: [255, 0, 0, 0.9]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml
new file mode 100644
index 0000000000..e5744ddedc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml
@@ -0,0 +1,39 @@
+# Test that when there are too many compositor surfaces present that
+# the additional compositor surfaces are correctly drawn as regular
+# primitives into picture cache content tiles.
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 400, 88]
+ color: green
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [60, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 70, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [138, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 80, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [216, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 90, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [294, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 100, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [372, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 110, 390, 5]
+ color: [255, 0, 0, 0.9]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image-ref.yaml
new file mode 100644
index 0000000000..fb0a910f27
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 362, 362]
+ color: green
+ - image: checkerboard(2,16,16)
+ bounds: [100, 100, 262, 262]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image.yaml b/gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image.yaml
new file mode 100644
index 0000000000..1387b57211
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/transparent-opaque-image.yaml
@@ -0,0 +1,14 @@
+# Verify that an RGBA compositor surface that is translucent, followed
+# by an RGBA compositor surface that is opaque draws correctly.
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 362, 362]
+ color: green
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [100, 100, 262, 262]
+ prefer-compositor-surface: true
+ - image: checkerboard(2,16,16)
+ bounds: [100, 100, 262, 262]
+ prefer-compositor-surface: true
diff --git a/gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.png b/gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.png
new file mode 100644
index 0000000000..37eb07981c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.yaml b/gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.yaml
new file mode 100644
index 0000000000..fe4ccc354c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/underlay-mask-on-translucent-slice.yaml
@@ -0,0 +1,24 @@
+# Verify that a compositor surface with a mask, which is placed on
+# a translucent picture cache slice draws correctly.
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 440, 338]
+ color: red
+ - type: clip
+ id: 3
+ complex:
+ - rect: [70, 70, 400, 298]
+ radius: 32
+ - type: scroll-frame
+ bounds: [50, 50, 200, 200]
+ items:
+ - type: yuv-image
+ format: planar
+ src-y: barn-y.png
+ src-u: barn-u.png
+ src-v: barn-v.png
+ bounds: [70, 70, 400, 298]
+ prefer-compositor-surface: true
+ clip-chain: [3]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/underlay.png b/gfx/wr/wrench/reftests/compositor-surface/underlay.png
new file mode 100644
index 0000000000..91d0d653d7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/underlay.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/compositor-surface/underlay.yaml b/gfx/wr/wrench/reftests/compositor-surface/underlay.yaml
new file mode 100644
index 0000000000..11c2b7ebd7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/underlay.yaml
@@ -0,0 +1,30 @@
+# Verify that we correctly display an underlay style compositor
+# surface when an overlapping translucent compositor surface
+# exists earlier in the display list.
+# Reference image is public-domain - https://en.wikipedia.org/wiki/File:Barn-yuv.png
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 500, 550]
+ color: white
+ - image: solid-color(255,0,0,128,299,299)
+ bounds: [100, 100, 299, 299]
+ prefer-compositor-surface: true
+ - type: yuv-image
+ format: planar
+ src-y: barn-y.png
+ src-u: barn-u.png
+ src-v: barn-v.png
+ bounds: [100, 100, 299, 299]
+ prefer-compositor-surface: true
+ - text: "Prohibited subpixel AA"
+ origin: 110 380
+ size: 20
+ color: white
+ font: "FreeSans.ttf"
+ - text: "Allowed subpixel AA"
+ origin: 110 480
+ size: 20
+ color: black
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/crash/blank.yaml b/gfx/wr/wrench/reftests/crash/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/crash/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/crash/iframe-dup.yaml b/gfx/wr/wrench/reftests/crash/iframe-dup.yaml
new file mode 100644
index 0000000000..792caba3c8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/crash/iframe-dup.yaml
@@ -0,0 +1,21 @@
+# Ensure that a duplicated iframe reference doesn't cause a panic in WR
+---
+root:
+ items:
+ -
+ type: iframe
+ id: [1, 2]
+ bounds: [100, 100, 100, 100]
+ -
+ type: iframe
+ id: [1, 2]
+ bounds: [100, 100, 100, 100]
+
+pipelines:
+ -
+ id: [1, 2]
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [100, 100, 100, 100]
diff --git a/gfx/wr/wrench/reftests/crash/many-segments.yaml b/gfx/wr/wrench/reftests/crash/many-segments.yaml
new file mode 100644
index 0000000000..f7301ac449
--- /dev/null
+++ b/gfx/wr/wrench/reftests/crash/many-segments.yaml
@@ -0,0 +1,112 @@
+# Ensure that in the case of a huge number of overlapping and intersecting rounded
+# clips we don't generate too many segments, causing the GPU cache to assert.
+---
+root:
+ items:
+ -
+ type: clip
+ complex:
+ - rect: [128, 128, 632, 632]
+ radius: 300
+ id: 2
+ -
+ type: clip
+ complex:
+ - rect: [126, 126, 628, 628]
+ radius: 300
+ id: 3
+ -
+ type: clip
+ complex:
+ - rect: [123, 123, 624, 624]
+ radius: 300
+ id: 4
+ -
+ type: clip
+ complex:
+ - rect: [120, 120, 626, 626]
+ radius: 300
+ id: 5
+ -
+ type: clip
+ complex:
+ - rect: [117, 117, 622, 622]
+ radius: 300
+ id: 6
+ -
+ type: clip
+ complex:
+ - rect: [114, 114, 619, 619]
+ radius: 300
+ id: 7
+ -
+ type: clip
+ complex:
+ - rect: [111, 111, 615, 615]
+ radius: 300
+ id: 8
+ -
+ type: clip
+ complex:
+ - rect: [108, 108, 612, 612]
+ radius: 300
+ id: 9
+ -
+ type: clip
+ complex:
+ - rect: [105, 105, 609, 609]
+ radius: 300
+ id: 10
+ -
+ type: clip
+ complex:
+ - rect: [102, 102, 606, 606]
+ radius: 300
+ id: 11
+ -
+ type: clip
+ complex:
+ - rect: [99, 99, 603, 603]
+ radius: 300
+ id: 12
+ -
+ type: clip
+ complex:
+ - rect: [96, 96, 600, 600]
+ radius: 300
+ id: 13
+ -
+ type: clip
+ complex:
+ - rect: [93, 93, 612, 612]
+ radius: 300
+ id: 14
+ -
+ type: clip
+ complex:
+ - rect: [90, 90, 609, 609]
+ radius: 300
+ id: 15
+ -
+ type: clip
+ complex:
+ - rect: [87, 87, 606, 606]
+ radius: 300
+ id: 16
+ -
+ type: clip
+ complex:
+ - rect: [84, 84, 603, 603]
+ radius: 300
+ id: 17
+
+ -
+ type: "clip-chain"
+ id: 1024
+ clips: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
+ -
+ bounds: [128, 128, 632, 632]
+ clip-rect: [128, 128, 632, 632]
+ clip-chain: 1024
+ type: rect
+ color: 0 255 0 1
diff --git a/gfx/wr/wrench/reftests/crash/reftest.list b/gfx/wr/wrench/reftests/crash/reftest.list
new file mode 100644
index 0000000000..63e815a80b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/crash/reftest.list
@@ -0,0 +1,2 @@
+!= iframe-dup.yaml blank.yaml
+!= many-segments.yaml blank.yaml
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.png b/gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.png
new file mode 100644
index 0000000000..39371a08c7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.yaml
new file mode 100644
index 0000000000..9b8145a545
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-across-tiles.yaml
@@ -0,0 +1,12 @@
+# Verify that resolves across tile boundaries do correct readbacks
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ items:
+ - image: xy-gradient(640,640)
+ bounds: 0 0 640 640
+ - type: backdrop-filter
+ bounds: 20 20 600 600
+ filters: [invert(1)]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-basic-ref.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-basic-ref.yaml
new file mode 100644
index 0000000000..aec471df21
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-basic-ref.yaml
@@ -0,0 +1,11 @@
+
+# Tests that a basic invert backdrop-filter works
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: [0, 255, 255, 1]
+ bounds: 0 0 256 256
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-basic.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-basic.yaml
new file mode 100644
index 0000000000..95521d2fab
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-basic.yaml
@@ -0,0 +1,21 @@
+# Tests that a basic invert backdrop-filter works
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: [255, 0, 0, 1]
+ bounds: 0 0 256 256
+ - type: clip
+ id: 2
+ bounds: 0 0 256 256
+ clip-rect: 0 0 256 256
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 256 256
+ filters: invert(1)
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.png b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.png
new file mode 100644
index 0000000000..9164c78598
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.yaml
new file mode 100644
index 0000000000..80be3ab493
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-across-tiles.yaml
@@ -0,0 +1,19 @@
+# Verify that blurs across tile boundaries do correct readbacks
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ bounds: 20 20 0 0
+ items:
+ - image: checkerboard(2,32,32,16,22)
+ bounds: 0 0 516 644
+ - type: backdrop-filter
+ bounds: 50 50 416 544
+ filters: ["blur(5,5)"]
+ - type: border
+ bounds: [ 50, 50, 416, 544 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: solid
+ color: black
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode-ref.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode-ref.yaml
new file mode 100644
index 0000000000..99238dcc85
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode-ref.yaml
@@ -0,0 +1,10 @@
+# Verify that blurs on backdrop-filters use edgeMode=duplicate
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 400 400
+ color: red
+ - type: rect
+ bounds: 100 100 200 200
+ color: blue
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode.yaml
new file mode 100644
index 0000000000..53681976c6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-blur-edge-mode.yaml
@@ -0,0 +1,17 @@
+# Verify that blurs on backdrop-filters use edgeMode=duplicate
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ bounds: 0 0 400 400
+ color: red
+ - type: rect
+ bounds: 100 100 200 200
+ color: blue
+ - type: backdrop-filter
+ bounds: 100 100 200 200
+ filters: ["blur(10,10)"]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-chain.png b/gfx/wr/wrench/reftests/filters/backdrop-filter-chain.png
new file mode 100644
index 0000000000..1d5c146711
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-chain.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-chain.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-chain.yaml
new file mode 100644
index 0000000000..16f081ae73
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-chain.yaml
@@ -0,0 +1,12 @@
+# Verify that backdrop filters with complex filter chains draw correctly
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
+ - type: backdrop-filter
+ bounds: 50 50 100 100
+ filters: ["blur(5,5)", sepia(0.5), brightness(0.8)]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask-ref.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask-ref.yaml
new file mode 100644
index 0000000000..e9683fc373
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: red
+ - type: rect
+ bounds: 64 64 128 128
+ color: cyan \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask.yaml
new file mode 100644
index 0000000000..ee3bba5ab3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-clip-mask.yaml
@@ -0,0 +1,28 @@
+# Ensure that a backdrop-filter enclosed by a stacking context with
+# a clip-mask can select the correct backdrop root
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: solid-color(255,255,255,255,128,128)
+ rect: [64, 64, 128, 128]
+ repeat: false
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ backdrop-root: true
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: red
+ - type: stacking-context
+ clip-chain: 3
+ wraps-backdrop-filter: true
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 256 256
+ filters: invert(1) \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter-ref.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter-ref.yaml
new file mode 100644
index 0000000000..bbcf0f820d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter-ref.yaml
@@ -0,0 +1,5 @@
+---
+root:
+ items:
+ - image: checkerboard(2,14,14,14,14)
+ bounds: 0 0 200 200
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter.yaml
new file mode 100644
index 0000000000..90edbcba16
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-culled-filter.yaml
@@ -0,0 +1,25 @@
+# Ensure that the backdrop capture primitive is culled in the
+# same way the backdrop render primitive is.
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 0, 0]
+ clip-rect: [0, 0, 0, 0]
+ id: 2
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - image: checkerboard(2,14,14,14,14)
+ bounds: 0 0 200 200
+ - type: stacking-context
+ transform: rotate(45)
+ transform-origin: 100 100
+ filters: identity
+ wraps-backdrop-filter: true
+ clip-chain: 3
+ items:
+ - type: backdrop-filter
+ bounds: 50 50 100 100
+ filters: invert(1)
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.png b/gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.png
new file mode 100644
index 0000000000..dd72042a69
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.yaml
new file mode 100644
index 0000000000..e94b94f14a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-drop-shadow.yaml
@@ -0,0 +1,13 @@
+# Tests that a drop-shadow backdrop-filter works (involves very complex dependency graph due to picture + shadow content)
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 128 128
+ - type: backdrop-filter
+ bounds: 0 0 256 256
+ filters: drop-shadow([20, 20], 10, [255, 0, 0, 1])
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity-ref.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity-ref.yaml
new file mode 100644
index 0000000000..e26ee0de4a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: [128, 128, 128, 1]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity.yaml
new file mode 100644
index 0000000000..33fac807a9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-half-opacity.yaml
@@ -0,0 +1,13 @@
+root:
+ items:
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: [0, 128, 0, 1]
+ - type: stacking-context
+ bounds: [20, 20, 0, 0]
+ filters: [opacity(0.5)]
+ wraps-backdrop-filter: true
+ items:
+ - type: backdrop-filter
+ bounds: [0, 0, 100, 100]
+ filters: [invert(1)]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-isolation-ref.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-isolation-ref.yaml
new file mode 100644
index 0000000000..7bdc84f019
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-isolation-ref.yaml
@@ -0,0 +1,20 @@
+# Ensure that stacking context isolation correctly works with backdrop-filter
+# (doesn't apply the filter outside the bounds of the isolated stacking context bounds)
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 128, 0, 1]
+ - type: stacking-context
+ bounds: [130, 10, 0, 0]
+ filters: [identity]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 128, 0, 1]
+ - type: rect
+ bounds: [-90, 30, 160, 160]
+ color: [255, 255, 0, 0.5]
+ - type: rect
+ bounds: [0, 30, 70, 70]
+ color: [255, 191, 127, 1]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-isolation.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-isolation.yaml
new file mode 100644
index 0000000000..1ab896a234
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-isolation.yaml
@@ -0,0 +1,20 @@
+# Ensure that stacking context isolation correctly works with backdrop-filter
+# (doesn't apply the filter outside the bounds of the isolated stacking context bounds)
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 128, 0, 1]
+ - type: stacking-context
+ bounds: [130, 10, 0, 0]
+ filters: [identity]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 128, 0, 1]
+ - type: backdrop-filter
+ bounds: [-90, 30, 160, 160]
+ filters: [invert(1)]
+ - type: rect
+ bounds: [-90, 30, 160, 160]
+ color: [255, 255, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-nested.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-nested.yaml
new file mode 100644
index 0000000000..1f9e5286c9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-nested.yaml
@@ -0,0 +1,31 @@
+# Verify that when there are sibling backdrop-filters on the same backdrop
+# root, but they are separated by a filter / clip chain, the dependencies
+# are correctly set to ensure that the constrints for Existing render task
+# locations are met (that the existing task is scheduled prior to the
+# existing task, even if it's not needed for rendering order).
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: solid-color(255,255,255,255,100,100)
+ rect: [0, 0, 100, 100]
+ repeat: false
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: stacking-context
+ filters: [identity]
+ wraps-backdrop-filter: true
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 100 100
+ filters: identity
+ - type: stacking-context
+ wraps-backdrop-filter: true
+ clip-chain: 12
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 100 100
+ filters: identity
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface-ref.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface-ref.yaml
new file mode 100644
index 0000000000..214bb87ad0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface-ref.yaml
@@ -0,0 +1,7 @@
+# Tests that a basic invert backdrop-filter works on a child surface
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: cyan
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface.yaml
new file mode 100644
index 0000000000..3792556ade
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-on-child-surface.yaml
@@ -0,0 +1,14 @@
+# Tests that a basic invert backdrop-filter works on a child surface
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ filters: [identity]
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: red
+ - type: backdrop-filter
+ bounds: 0 0 256 256
+ filters: invert(1)
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.png b/gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.png
new file mode 100644
index 0000000000..cebb57f862
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.yaml
new file mode 100644
index 0000000000..68c5c0aba1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-overlap.yaml
@@ -0,0 +1,15 @@
+# Verify that sibling backdrop filters correctly read back intermediate results
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ items:
+ - image: checkerboard(0,16,16)
+ bounds: 0 0 256 256
+ - type: backdrop-filter
+ bounds: 32 32 192 192
+ filters: [invert(1)]
+ - type: backdrop-filter
+ bounds: 64 64 128 128
+ filters: [invert(1)]
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.png b/gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.png
new file mode 100644
index 0000000000..d9d49726bb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.yaml
new file mode 100644
index 0000000000..f5b9a1da64
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-perspective.yaml
@@ -0,0 +1,32 @@
+# Tests that backdrop filter works with a perspective transform
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ backdrop-root: true
+ perspective: 500
+ items:
+ - type: rect
+ color: [255, 255, 255, 1]
+ bounds: 0 0 1024 1024
+ - image: "firefox.png"
+ bounds: 0 0 256 256
+ - type: stacking-context
+ bounds: 50 50 0 0
+ transform: ["rotate-y(-50)", "rotate-z(-45)"]
+ items:
+ - type: clip
+ id: 2
+ bounds: 0 0 100 100
+ clip-rect: 0 0 100 100
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 100 100
+ clip-chain: 12
+ filters: invert(1)
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.png b/gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.png
new file mode 100644
index 0000000000..743bd03425
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.yaml b/gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.yaml
new file mode 100644
index 0000000000..dcde064917
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/backdrop-filter-transformed-filter.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 200 200
+ - image: checkerboard(2,14,14,14,14)
+ bounds: 0 0 200 200
+ - type: stacking-context
+ transform: rotate(45)
+ transform-origin: 100 100
+ filters: identity
+ wraps-backdrop-filter: true
+ items:
+ - type: backdrop-filter
+ bounds: 50 50 100 100
+ filters: invert(1)
diff --git a/gfx/wr/wrench/reftests/filters/blank.yaml b/gfx/wr/wrench/reftests/filters/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.png b/gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.png
new file mode 100644
index 0000000000..ce3f7e229f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.yaml b/gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.yaml
new file mode 100644
index 0000000000..96e55f6a32
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/blend-clipped-raster-root.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 100, 1000, 1000]
+ type: clip
+ id: 3
+ -
+ type: "clip-chain"
+ id: 4
+ clips: [3]
+ -
+ bounds: [200, 200, 0, 0]
+ clip-chain: 4
+ type: "stacking-context"
+ transform: rotate(10)
+ items:
+ -
+ type: "stacking-context"
+ filters:
+ - opacity(0.5)
+ items:
+ -
+ bounds: [0, 0, 1000, 500]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/blend-clipped.png b/gfx/wr/wrench/reftests/filters/blend-clipped.png
new file mode 100644
index 0000000000..e500a538e8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/blend-clipped.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/blend-clipped.yaml b/gfx/wr/wrench/reftests/filters/blend-clipped.yaml
new file mode 100644
index 0000000000..8162a96c09
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/blend-clipped.yaml
@@ -0,0 +1,103 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 1887, 2081]
+ "clip-rect": [0, 0, 1887, 2081]
+ "backface-visible": true
+ type: clip
+ id: 2
+ "content-size": [1887, 2081]
+ -
+ bounds: [0, 111, 1887, 1970]
+ "clip-rect": [0, 111, 1887, 1970]
+ "backface-visible": true
+ type: clip
+ id: 3
+ "content-size": [1887, 1970]
+ -
+ bounds: [0, 111, 1887, 1971]
+ "clip-rect": [0, 111, 1887, 1971]
+ "backface-visible": true
+ type: iframe
+ id: [1, 3]
+ id: [1, 1]
+pipelines:
+ -
+ id: [1, 3]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 1887, 1971]
+ "clip-rect": [0, 0, 1887, 1971]
+ type: clip
+ id: 10
+ "content-size": [1887, 1971]
+ -
+ "clip-rect": [0, 0, 1887, 1971]
+ type: "scroll-frame"
+ id: 2
+ "content-size": [1887, 1971]
+ bounds: [0, 0, 1887, 1971]
+ -
+ bounds: [0, 0, 1887, 1971]
+ "clip-rect": [0, 0, 1887, 1971]
+ type: clip
+ id: 3
+ "content-size": [1887, 1971]
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, -186, 1887, 239]
+ "clip-rect": [0, -186, 1887, 239]
+ "backface-visible": true
+ type: clip
+ id: 4
+ "content-size": [1887, 239]
+ -
+ bounds: [-660.45, -186, 0, 0]
+ "clip-rect": [-660.45, -186, 0, 0]
+ spatial-id: 2
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, -0.57735026, 1, 0, 0, 0, 0, 1, 0, 68.849, 0, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ filters:
+ - opacity(0.8)
+ items:
+ -
+ bounds: [0, 0, 1887, 239]
+ "clip-rect": [0, 0, 1887, 239]
+ type: clip
+ id: 5
+ "content-size": [1887, 239]
+ - type: clip-chain
+ id: 15
+ clips: [3, 4, 5]
+ -
+ bounds: [0, 0, 1887, 239]
+ "clip-rect": [0, 0, 1887, 239]
+ clip-chain: 15
+ "backface-visible": true
+ type: gradient
+ start: [943.5, -0.00000000000005684342]
+ end: [943.5, 238.5]
+ "tile-size": [1887, 238.5]
+ "tile-spacing": [0, 0]
+ stops:
+ - 0
+ - 0 153 204.00002 1.0000
+ - 0.3
+ - 0 153 204.00002 1.0000
+ - 0.6
+ - 7.0000005 137 194.00002 1.0000
+ - 1
+ - 0 91 137 1.0000
+ repeat: false
diff --git a/gfx/wr/wrench/reftests/filters/drop-shadow-inverse-scale.yaml b/gfx/wr/wrench/reftests/filters/drop-shadow-inverse-scale.yaml
new file mode 100644
index 0000000000..229bdaa4b6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/drop-shadow-inverse-scale.yaml
@@ -0,0 +1,14 @@
+# Ensure that zero sized drop shadows handle reflection scale transforms without crashing
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ bounds: [100, 100, 100, 100]
+ filters: drop-shadow([0, 1], 1, red)
+ transform: scale(-1, 1)
+ items:
+ -
+ type: rect
+ color: green
+ bounds: [0, 0, 1, 0]
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-clamping-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-blur-clamping-ref.yaml
new file mode 100644
index 0000000000..a06489467a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-clamping-ref.yaml
@@ -0,0 +1,18 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filters: blur(100, 100)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ filters: blur(50, 50)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 255 0 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-clamping.yaml b/gfx/wr/wrench/reftests/filters/filter-blur-clamping.yaml
new file mode 100644
index 0000000000..0d81a616ee
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-clamping.yaml
@@ -0,0 +1,30 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ transform: scale(10)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur will be 20 * 10(scale) = 200 and it should then be clamped to 100
+ filters: blur(20, 20)
+ items:
+ - type: rect
+ bounds: [0, 0, 10, 10]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ transform: scale(0.1)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur should be 500 * 0.1(scale) = 50. This tests to make sure clamping
+ # does not occur before applying scale factors, otherwise 500 would be
+ # clamped to 100.
+ filters: blur(500, 500)
+ items:
+ - type: rect
+ bounds: [0, 0, 1000, 1000]
+ color: 255 0 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.png b/gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.png
new file mode 100644
index 0000000000..36da2d2620
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.yaml b/gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.yaml
new file mode 100644
index 0000000000..56f843d5ec
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-downscale-fractional.yaml
@@ -0,0 +1,11 @@
+# verify that we correctly size an image to a power of two when
+# using downscale passes to avoid blur artifacts
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filters: blur(16.4, 16.4)
+ items:
+ - image: "firefox.png"
+ bounds: 20 20 200 200
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-huge.yaml b/gfx/wr/wrench/reftests/filters/filter-blur-huge.yaml
new file mode 100644
index 0000000000..13a4c72fd8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-huge.yaml
@@ -0,0 +1,10 @@
+# Don't crash on very large blur radius!
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 260, 260]
+ filters: blur(1000000, 1000000)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-scaled-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-blur-scaled-ref.yaml
new file mode 100644
index 0000000000..6a5f314df0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-scaled-ref.yaml
@@ -0,0 +1,11 @@
+# Ensure scales from enclosing SCs get applied to blurs
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ filters: blur(10, 10)
+ items:
+ - type: rect
+ bounds: [50, 50, 250, 250]
+ color: 0 255 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.png b/gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.png
new file mode 100644
index 0000000000..48f8913752
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.yaml b/gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.yaml
new file mode 100644
index 0000000000..18a897131d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-scaled-xonly.yaml
@@ -0,0 +1,16 @@
+# Ensure scales from enclosing SCs get applied to blurs. This one
+# applies a mixed-dimension scale by scaling the x-axis only.
+---
+root:
+ items:
+ - type: reference-frame
+ bounds: [0, 0, 100, 100]
+ transform: [5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: blur(2, 2)
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: 0 255 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur-scaled.yaml b/gfx/wr/wrench/reftests/filters/filter-blur-scaled.yaml
new file mode 100644
index 0000000000..0e8c9cbff9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur-scaled.yaml
@@ -0,0 +1,15 @@
+# Ensure scales from enclosing SCs get applied to blurs
+---
+root:
+ items:
+ - type: reference-frame
+ bounds: [0, 0, 100, 100]
+ transform: [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: blur(2, 2)
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: 0 255 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur.png b/gfx/wr/wrench/reftests/filters/filter-blur.png
new file mode 100644
index 0000000000..695db74925
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-blur.yaml b/gfx/wr/wrench/reftests/filters/filter-blur.yaml
new file mode 100644
index 0000000000..ee915d7bb1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-blur.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filters: blur(10, 10)
+ items:
+ - image: "firefox.png"
+ bounds: 20 20 256 256
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness-2-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness-2-ref.yaml
new file mode 100644
index 0000000000..209dfb3cc3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness-2.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness-2.yaml
new file mode 100644
index 0000000000..2bdb20aa1a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness-2.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness-3-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness-3-ref.yaml
new file mode 100644
index 0000000000..3201170182
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness-3-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 128, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness-3.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness-3.yaml
new file mode 100644
index 0000000000..8ea1eef5a8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness-3.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(4)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 32, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness-4-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness-4-ref.yaml
new file mode 100644
index 0000000000..b300d2a026
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness-4-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 64, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness-4.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness-4.yaml
new file mode 100644
index 0000000000..9a15b15895
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness-4.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(0.25)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness-ref.yaml
new file mode 100644
index 0000000000..98e1bf419a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [64, 64, 64, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-brightness.yaml b/gfx/wr/wrench/reftests/filters/filter-brightness.yaml
new file mode 100644
index 0000000000..65da0e0b25
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-brightness.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(2)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 255, 0.25]
diff --git a/gfx/wr/wrench/reftests/filters/filter-color-matrix-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-color-matrix-ref.yaml
new file mode 100644
index 0000000000..2d32e5307b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-color-matrix-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 170]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 170]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: [100, 175, 136, 1]
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: rect
+ bounds: [60, 10, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: rect
+ bounds: [10, 110, 50, 50]
+ color: [0, 0, 128, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-color-matrix.yaml b/gfx/wr/wrench/reftests/filters/filter-color-matrix.yaml
new file mode 100644
index 0000000000..4deb19b779
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-color-matrix.yaml
@@ -0,0 +1,53 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 170]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 170]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filters: color-matrix( 0.393, 0.686, 0.534, 0,
+ 0.189, 0.168, 0.131, 0,
+ 0.349, 0.272, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filters: color-matrix( -1, 0, 0, 0,
+ 0, -1, 0, 0,
+ 0, 0, -1, 0,
+ 0, 0, 0, 1,
+ 1, 1, 1, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filters: color-matrix( 0, 0, 1, 0,
+ 0, 1, 0, 0,
+ 1, 0, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
+ - type: stacking-context
+ bounds: [10, 110, 50, 50]
+ filters: color-matrix( 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0.5,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-component-transfer-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-component-transfer-ref.yaml
new file mode 100644
index 0000000000..e19e1ff0b0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-component-transfer-ref.yaml
@@ -0,0 +1,51 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 170, 250]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: [0, 255, 141, 1]
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: rect
+ bounds: [0, 150, 50, 50]
+ color: [191, 128, 128, 1]
+ - type: rect
+ bounds: [0, 200, 50, 50]
+ color: [0, 255, 24, 1]
+ - type: rect
+ bounds: [60, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: rect
+ bounds: [60, 50, 50, 50]
+ color: [255, 255, 255, 1]
+ - type: rect
+ bounds: [60, 100, 50, 50]
+ color: [255, 255, 255, 1]
+ - type: rect
+ bounds: [60, 150, 50, 50]
+ color: [223, 191, 191, 1]
+ - type: rect
+ bounds: [60, 200, 50, 50]
+ color: [191, 255, 197, 1]
+ - type: rect
+ bounds: [120, 0, 50, 50]
+ color: [255, 127, 255, 1]
+ - type: rect
+ bounds: [120, 50, 50, 50]
+ color: [128, 255, 200, 1]
+ - type: rect
+ bounds: [120, 100, 50, 50]
+ color: [255, 255, 255, 1]
+ - type: rect
+ bounds: [120, 150, 50, 50]
+ color: [239, 223, 223, 1]
+ - type: rect
+ bounds: [120, 200, 50, 50]
+ color: [63, 255, 81, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-component-transfer.yaml b/gfx/wr/wrench/reftests/filters/filter-component-transfer.yaml
new file mode 100644
index 0000000000..a573b5587e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-component-transfer.yaml
@@ -0,0 +1,352 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 170, 250]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [0, 50, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [0, 100, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [0, 150, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Identity
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [0, 200, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Identity
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [60, 0, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [60, 50, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [60, 100, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [60, 150, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 200, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-1.75"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [120, 0, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 50, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 0.5]
+ - type: stacking-context
+ bounds: [120, 100, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 150, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [120, 200, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-0.25"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 0.5]
diff --git a/gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml
new file mode 100644
index 0000000000..6b176d9570
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [255, 255, 255, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [223, 223, 223, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml b/gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml
new file mode 100644
index 0000000000..87758d3f4a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: contrast(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [128, 128, 128, 0.25]
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml
new file mode 100644
index 0000000000..6ffcde5f5b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml
@@ -0,0 +1,18 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filters: drop-shadow([0, 0], 100, blue)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ filters: drop-shadow([0, 0], 50, green)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 255 0 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml
new file mode 100644
index 0000000000..1d7157a8e6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml
@@ -0,0 +1,30 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ transform: scale(10)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur will be 20 * 10(scale) = 200 and it should then be clamped to 100
+ filters: drop-shadow([0, 0], 20, blue)
+ items:
+ - type: rect
+ bounds: [0, 0, 10, 10]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ transform: scale(0.1)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur should be 500 * 0.1(scale) = 50. This tests to make sure clamping
+ # does not occur before applying scale factors, otherwise 500 would be
+ # clamped to 100.
+ filters: drop-shadow([0, 0], 500, green)
+ items:
+ - type: rect
+ bounds: [0, 0, 1000, 1000]
+ color: 255 0 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.png b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.png
new file mode 100644
index 0000000000..7b3d1d87ce
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml
new file mode 100644
index 0000000000..4616d5e290
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml
@@ -0,0 +1,21 @@
+# Bug 1561447: If a clip task is created for a picture, it should take into account the rect of the drop shadow
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: 10 0 300 300
+ clip-rect: 10 0 300 300
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ bounds: 30 30 0 0
+ transform: rotate-z(-45)
+ filters: drop-shadow([15, 0], 0, red)
+ clip-chain: 3
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: blue
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.png b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.png
new file mode 100644
index 0000000000..40eded52ac
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml
new file mode 100644
index 0000000000..4b9ad3d36e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml
@@ -0,0 +1,37 @@
+---
+# WebRender internally clips the stacking context to avoid
+# rendering parts that are off-screen. It has to take shadow
+# offsets into account.
+# This test introduces a 90 degrees rotation to ensure that
+# the clip inflation isn't done in the wrong space.
+root:
+ items:
+ # Rotation inside of the shadowed stacking context.
+ - type: stacking-context
+ bounds: [0, -10, 200, 100]
+ filters: drop-shadow([-10, 200], 5, red)
+ items:
+ - type: stacking-context
+ bounds: [50, -10, 200, 100]
+ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 0, 500, 150]
+ glyphs: [55, 75, 76, 86]
+ offsets: [0, 100, 75, 100, 150, 100, 180, 100]
+ size: 90
+ color: blue
+ font: "../text/VeraBd.ttf"
+ # Rotation applied to the shadowed stacking context directly.
+ - type: stacking-context
+ bounds: [150, 35, 200, 100]
+ filters: drop-shadow([200, 10], 5, red)
+ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 0, 500, 150]
+ glyphs: [55, 75, 76, 86]
+ offsets: [0, 100, 75, 100, 150, 100, 180, 100]
+ size: 90
+ color: blue
+ font: "../text/VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.png b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.png
new file mode 100644
index 0000000000..6b0624c8c1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.yaml
new file mode 100644
index 0000000000..33f066328d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: clip
+ id: 3
+ complex:
+ - rect: [0, 0, 256, 256]
+ radius: 16
+ - type: clip-chain
+ id: 5
+ clips: [3]
+ - type: clip
+ id: 4
+ bounds: [100, 100, 2000, 2000]
+ -
+ type: "clip-chain"
+ id: 6
+ clips: [4]
+ - type: stacking-context
+ bounds: [10, 10, 0, 0]
+ filters: drop-shadow([50, 50], 25, red)
+ clip-chain: 6
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: green
+ clip-chain: 5
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.png b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.png
new file mode 100644
index 0000000000..f75e2c5c9e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.yaml
new file mode 100644
index 0000000000..e61ae8ec45
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-fractional.yaml
@@ -0,0 +1,11 @@
+# Verify that drop shadows with fractional blur radii are correctly centered
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [20, 20, 0, 0]
+ filters: drop-shadow([0, 0], 5.01, [255, 0, 0, 1])
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: black
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-huge.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-huge.yaml
new file mode 100644
index 0000000000..dc971a7d3a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-huge.yaml
@@ -0,0 +1,10 @@
+# Don't crash on very large blur radius!
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 260, 260]
+ filters: drop-shadow([73, 73], 10000000, [255, 0, 0, 1])
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.png b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.png
new file mode 100644
index 0000000000..a63372edfb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml
new file mode 100644
index 0000000000..663c03a0de
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 400, 400]
+ filters: drop-shadow([10, 10], 20, [255, 0, 0, 1])
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml
new file mode 100644
index 0000000000..9173528be4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml
@@ -0,0 +1,11 @@
+# Ensure scales from enclosing SCs get applied to drop-shadows
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ filters: drop-shadow([0, 0], 10, [255, 0, 0, 1])
+ items:
+ - type: rect
+ bounds: [50, 50, 250, 250]
+ color: 0 255 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled.yaml
new file mode 100644
index 0000000000..87fac1ee6d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-scaled.yaml
@@ -0,0 +1,15 @@
+# Ensure scales from enclosing SCs get applied to drop-shadows
+---
+root:
+ items:
+ - type: reference-frame
+ bounds: [0, 0, 100, 100]
+ transform: [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 400, 400]
+ filters: drop-shadow([0, 0], 2, [255, 0, 0, 1])
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: 0 255 0 1.0
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml
new file mode 100644
index 0000000000..e46af9dfa4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml
@@ -0,0 +1,17 @@
+# Don't crash on large blur radius with large transform!
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ transform: scale-y(100)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ filters: drop-shadow([0, 0], 999999, [255, 0, 0, 1])
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 1000, 1000]
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow.png b/gfx/wr/wrench/reftests/filters/filter-drop-shadow.png
new file mode 100644
index 0000000000..cf9355e63c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-drop-shadow.yaml b/gfx/wr/wrench/reftests/filters/filter-drop-shadow.yaml
new file mode 100644
index 0000000000..59f90b42da
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-drop-shadow.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: drop-shadow([73, 73], 20, [255, 0, 0, 1])
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/gfx/wr/wrench/reftests/filters/filter-grayscale-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-grayscale-ref.yaml
new file mode 100644
index 0000000000..6a0baae7d9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-grayscale-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 200, 200]
+ color: [182, 182, 182]
diff --git a/gfx/wr/wrench/reftests/filters/filter-grayscale.yaml b/gfx/wr/wrench/reftests/filters/filter-grayscale.yaml
new file mode 100644
index 0000000000..efa299cc07
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-grayscale.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 200, 200]
+ filters: grayscale(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml
new file mode 100644
index 0000000000..a1c4039010
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: [0, 91, 0, 1]
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: [0, 218, 255, 1]
+ - type: rect
+ bounds: [60, 10, 50, 50]
+ color: [255, 0, 37, 1]
+ - type: rect
+ bounds: [60, 60, 50, 50]
+ color: [128, 128, 128, 1] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/filters/filter-hue-rotate-1.yaml b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-1.yaml
new file mode 100644
index 0000000000..9934661bbd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-1.yaml
@@ -0,0 +1,37 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
+ - type: stacking-context
+ bounds: [60, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [128, 128, 128, 1] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml
new file mode 100644
index 0000000000..436f30937a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: [0, 46, 0, 1]
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: [0, 109, 128, 1]
+ - type: rect
+ bounds: [60, 10, 50, 50]
+ color: [128, 0, 18, 1]
+ - type: rect
+ bounds: [60, 60, 50, 50]
+ color: [64, 64, 64, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml
new file mode 100644
index 0000000000..b38cb218ff
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml
@@ -0,0 +1,37 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 0.5]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 0.5]
+ - type: stacking-context
+ bounds: [60, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [128, 128, 128, 0.5] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/filters/filter-invert-2-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-invert-2-ref.yaml
new file mode 100644
index 0000000000..08aa94333d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-invert-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-invert-2.yaml b/gfx/wr/wrench/reftests/filters/filter-invert-2.yaml
new file mode 100644
index 0000000000..f254816dc5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-invert-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 255, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: invert(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/filters/filter-invert-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-invert-ref.yaml
new file mode 100644
index 0000000000..674ecee969
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-invert-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 0, 0.25]
diff --git a/gfx/wr/wrench/reftests/filters/filter-invert.yaml b/gfx/wr/wrench/reftests/filters/filter-invert.yaml
new file mode 100644
index 0000000000..57ebcdb43c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-invert.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: invert(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 255, 0.25]
diff --git a/gfx/wr/wrench/reftests/filters/filter-large-blur-radius.png b/gfx/wr/wrench/reftests/filters/filter-large-blur-radius.png
new file mode 100644
index 0000000000..e48a567c38
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-large-blur-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-large-blur-radius.yaml b/gfx/wr/wrench/reftests/filters/filter-large-blur-radius.yaml
new file mode 100644
index 0000000000..6ce5f4cb22
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-large-blur-radius.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 100 100 512 512
+ filters: blur(100, 100)
+ items:
+ - type: rect
+ bounds: 0 0 512 512
+ color: red
diff --git a/gfx/wr/wrench/reftests/filters/filter-long-chain.png b/gfx/wr/wrench/reftests/filters/filter-long-chain.png
new file mode 100644
index 0000000000..6e58dd6300
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-long-chain.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-long-chain.yaml b/gfx/wr/wrench/reftests/filters/filter-long-chain.yaml
new file mode 100644
index 0000000000..a0f9d698bd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-long-chain.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: [brightness(2),
+ contrast(0.4),
+ grayscale(0.2),
+ hue-rotate(270),
+ invert(0.6),
+ opacity(0.8),
+ saturate(10),
+ sepia(0.4),
+ "blur(3,3)",
+ "drop-shadow([73, 73], 3, [0, 255, 0, 1])"]
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 256 256
diff --git a/gfx/wr/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml
new file mode 100644
index 0000000000..0a43095403
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: [128, 128, 127, 1]
+ bounds: 100 100 100 100
diff --git a/gfx/wr/wrench/reftests/filters/filter-mix-blend-mode.yaml b/gfx/wr/wrench/reftests/filters/filter-mix-blend-mode.yaml
new file mode 100644
index 0000000000..0b6e3eb468
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-mix-blend-mode.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ color: [128, 128, 128, 1]
+ bounds: 100 100 100 100
+ - type: stacking-context
+ bounds: [100, 100, 100, 100]
+ filters: [invert(1)]
+ mix-blend-mode: exclusion
+ items:
+ - type: rect
+ color: yellow
+ bounds: 0 0 100 100
diff --git a/gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml
new file mode 100644
index 0000000000..949da2b16b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml
@@ -0,0 +1,11 @@
+
+# Tests that mix-blend mode content renders correctly when in a scaled surface.
+# See bug 1642549
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - rect: 0 0 150 150
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling.yaml b/gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling.yaml
new file mode 100644
index 0000000000..577f4edebf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-mix-blend-scaling.yaml
@@ -0,0 +1,23 @@
+# Tests that mix-blend mode content renders correctly when in a scaled surface.
+# See bug 1642549
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ # Force WebRender to form a raster root
+ transform: perspective(1000)
+ items:
+ - type: stacking-context
+ bounds: -50 -50 0 0
+ # The raster root will have a 2x scaling factor
+ transform: scale(2)
+ blend-container: true
+ items:
+ - rect: 0 0 100 100
+ color: green
+ - type: stacking-context
+ mix-blend-mode: multiply
+ items:
+ - rect: 0 0 100 100
+ color: white
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml
new file mode 100644
index 0000000000..9b5a96e542
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [18, 18, 18, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-1.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-1.yaml
new file mode 100644
index 0000000000..22d47f10e0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml
new file mode 100644
index 0000000000..a83166358d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [9, 9, 137, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-2.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-2.yaml
new file mode 100644
index 0000000000..0b8cac5609
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml
new file mode 100644
index 0000000000..ebb3450e02
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-3.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-3.yaml
new file mode 100644
index 0000000000..060d0294ff
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-3.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml
new file mode 100644
index 0000000000..321bea6876
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [5, 5, 69, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml
new file mode 100644
index 0000000000..1a264cc458
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 0.5]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-1-ref.yaml
new file mode 100644
index 0000000000..2a710fae15
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [182, 182, 182, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-1.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-1.yaml
new file mode 100644
index 0000000000..4fcfa8174b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-2-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-2-ref.yaml
new file mode 100644
index 0000000000..f13c6e225d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-2-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [91, 219, 91, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-2.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-2.yaml
new file mode 100644
index 0000000000..98f033bb76
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-3-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-3-ref.yaml
new file mode 100644
index 0000000000..00aae63bdc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-3-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-3.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-3.yaml
new file mode 100644
index 0000000000..c7f3561171
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-3.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml
new file mode 100644
index 0000000000..e4c5643f29
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [46, 110, 46, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml
new file mode 100644
index 0000000000..042d19d6f5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-1-ref.yaml
new file mode 100644
index 0000000000..3b95adb53a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [54, 54, 54, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-1.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-1.yaml
new file mode 100644
index 0000000000..9dab61a552
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-2-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-2-ref.yaml
new file mode 100644
index 0000000000..f6707424d0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-2-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [155, 27, 27, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-2.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-2.yaml
new file mode 100644
index 0000000000..5810894a2c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-3-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-3-ref.yaml
new file mode 100644
index 0000000000..0c9e4f4ac2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-3-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-3.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-3.yaml
new file mode 100644
index 0000000000..ce9ed012d3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-3.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml
new file mode 100644
index 0000000000..bdcd52d339
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [78, 14, 14, 1]
diff --git a/gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml b/gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml
new file mode 100644
index 0000000000..11218fcf85
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/filters/filter-segments-ref.yaml b/gfx/wr/wrench/reftests/filters/filter-segments-ref.yaml
new file mode 100644
index 0000000000..1047323d23
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-segments-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [10, 10, 256, 256]
+ radius: 16
+ - type: rect
+ color: [54, 54, 54]
+ bounds: [10, 10, 512, 512]
+ clip-chain: [2]
+ - type: rect
+ color: red
+ bounds: [0, 0, 300, 32]
+ - type: rect
+ color: red
+ bounds: [0, 250, 300, 32]
diff --git a/gfx/wr/wrench/reftests/filters/filter-segments.yaml b/gfx/wr/wrench/reftests/filters/filter-segments.yaml
new file mode 100644
index 0000000000..dbb62ed7d3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-segments.yaml
@@ -0,0 +1,24 @@
+# Ensure that picture / filter primitives draw the entire primitive
+# when they are eligible to be segmented. The red rects are used to
+# mask out the corners, since the AA varies between the tests.
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [10, 10, 256, 256]
+ radius: 16
+ - type: stacking-context
+ filters: grayscale(1)
+ items:
+ - type: rect
+ color: red
+ bounds: [10, 10, 512, 512]
+ clip-chain: [2]
+ - type: rect
+ color: red
+ bounds: [0, 0, 300, 32]
+ - type: rect
+ color: red
+ bounds: [0, 250, 300, 32]
diff --git a/gfx/wr/wrench/reftests/filters/filter-small-blur-radius.png b/gfx/wr/wrench/reftests/filters/filter-small-blur-radius.png
new file mode 100644
index 0000000000..e755e2bb6c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-small-blur-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/filter-small-blur-radius.yaml b/gfx/wr/wrench/reftests/filters/filter-small-blur-radius.yaml
new file mode 100644
index 0000000000..d5b550d0ab
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/filter-small-blur-radius.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 100 100 512 512
+ filters: blur(2, 2)
+ items:
+ - type: rect
+ bounds: 0 0 512 512
+ color: red
diff --git a/gfx/wr/wrench/reftests/filters/firefox.png b/gfx/wr/wrench/reftests/filters/firefox.png
new file mode 100644
index 0000000000..696ba9c9b5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/firefox.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/iframe-dropshadow-ref.yaml b/gfx/wr/wrench/reftests/filters/iframe-dropshadow-ref.yaml
new file mode 100644
index 0000000000..47c7140163
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/iframe-dropshadow-ref.yaml
@@ -0,0 +1,22 @@
+# a drop-shadow in an iframe causes the content to not render
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 148, 1920, 1606]
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [387, 12, 34, 38]
+ clip-rect: [386, 11, 36, 40]
+ -
+ type: "stacking-context"
+ filters: drop-shadow([0, 4], 2, [0, 0, 0, 0.3294117748737335])
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [345, 12, 34, 38]
+ clip-rect: [344, 11, 36, 40]
diff --git a/gfx/wr/wrench/reftests/filters/iframe-dropshadow.yaml b/gfx/wr/wrench/reftests/filters/iframe-dropshadow.yaml
new file mode 100644
index 0000000000..440e757e04
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/iframe-dropshadow.yaml
@@ -0,0 +1,34 @@
+# a drop-shadow in an iframe causes the content to not render
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: iframe
+ id: [1, 2]
+ bounds: [0, 148, 1920, 1606]
+ clip-rect: [0, 148, 1920, 1606]
+
+pipelines:
+ -
+ id: [1, 2]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [387, 12, 34, 38]
+ clip-rect: [386, 11, 36, 40]
+ -
+ type: "stacking-context"
+ filters: drop-shadow([0, 4], 2, [0, 0, 0, 0.3294117748737335])
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [345, 12, 34, 38]
+ clip-rect: [344, 11, 36, 40]
diff --git a/gfx/wr/wrench/reftests/filters/invisible-ref.yaml b/gfx/wr/wrench/reftests/filters/invisible-ref.yaml
new file mode 100644
index 0000000000..ec31525d31
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/invisible-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/invisible.yaml b/gfx/wr/wrench/reftests/filters/invisible.yaml
new file mode 100644
index 0000000000..c4a99e64a8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/invisible.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(0.0),
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+ # This display item ensures that the stacking context is skipped, but
+ # later items are not.
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/isolated-ref.yaml b/gfx/wr/wrench/reftests/filters/isolated-ref.yaml
new file mode 100644
index 0000000000..28c6912a97
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/isolated-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/filters/isolated.yaml b/gfx/wr/wrench/reftests/filters/isolated.yaml
new file mode 100644
index 0000000000..5f61ba2dfa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/isolated.yaml
@@ -0,0 +1,17 @@
+# this tests that filters don't create isolated groups
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
diff --git a/gfx/wr/wrench/reftests/filters/opacity-combined-ref.yaml b/gfx/wr/wrench/reftests/filters/opacity-combined-ref.yaml
new file mode 100644
index 0000000000..2b008f0a2f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/opacity-combined-ref.yaml
@@ -0,0 +1,10 @@
+# this tests that opacity combination respets pre-multiplied alpha
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.25)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/opacity-combined.yaml b/gfx/wr/wrench/reftests/filters/opacity-combined.yaml
new file mode 100644
index 0000000000..7d9bfa4ac5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/opacity-combined.yaml
@@ -0,0 +1,10 @@
+# this tests that opacity combination respects pre-multiplied alpha
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.50), opacity(0.50)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/opacity-overlap-ref.yaml b/gfx/wr/wrench/reftests/filters/opacity-overlap-ref.yaml
new file mode 100644
index 0000000000..d3ad75812e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/opacity-overlap-ref.yaml
@@ -0,0 +1,9 @@
+# this tests opacity rectangle overlapping with opaque one
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [32, 0, 96]
diff --git a/gfx/wr/wrench/reftests/filters/opacity-overlap.yaml b/gfx/wr/wrench/reftests/filters/opacity-overlap.yaml
new file mode 100644
index 0000000000..94832004a3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/opacity-overlap.yaml
@@ -0,0 +1,16 @@
+# this tests opacity rectangle overlapping with opaque one
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [128, 0, 0]
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.75)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 128]
diff --git a/gfx/wr/wrench/reftests/filters/opacity-ref.yaml b/gfx/wr/wrench/reftests/filters/opacity-ref.yaml
new file mode 100644
index 0000000000..ffe06bc5fd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/opacity-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [255, 255, 209, 1.0]
diff --git a/gfx/wr/wrench/reftests/filters/opacity.yaml b/gfx/wr/wrench/reftests/filters/opacity.yaml
new file mode 100644
index 0000000000..838937de2a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/opacity.yaml
@@ -0,0 +1,10 @@
+# this tests opacity pre-multiplied color
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.9)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [255, 255, 0, 0.2]
diff --git a/gfx/wr/wrench/reftests/filters/reftest.list b/gfx/wr/wrench/reftests/filters/reftest.list
new file mode 100644
index 0000000000..493cb6ff8c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/reftest.list
@@ -0,0 +1,85 @@
+== filter-grayscale.yaml filter-grayscale-ref.yaml
+platform(linux,mac) == draw_calls(7) color_targets(7) alpha_targets(0) filter-blur.yaml filter-blur.png
+platform(linux,mac) == filter-blur-downscale-fractional.yaml filter-blur-downscale-fractional.png
+== isolated.yaml isolated-ref.yaml
+== invisible.yaml invisible-ref.yaml
+fuzzy-if(platform(swgl),1,10000) == opacity.yaml opacity-ref.yaml
+fuzzy-range(<=1,*10000) == opacity-combined.yaml opacity-combined-ref.yaml
+fuzzy-if(platform(swgl),1,10000) == opacity-overlap.yaml opacity-overlap-ref.yaml
+== filter-brightness.yaml filter-brightness-ref.yaml
+== filter-brightness-2.yaml filter-brightness-2-ref.yaml
+== filter-brightness-3.yaml filter-brightness-3-ref.yaml
+fuzzy-if(platform(swgl),1,10000) == filter-brightness-4.yaml filter-brightness-4-ref.yaml
+== filter-component-transfer.yaml filter-component-transfer-ref.yaml
+skip_on(android,device) == filter-color-matrix.yaml filter-color-matrix-ref.yaml # fails on Pixel2
+== filter-contrast-gray-alpha-1.yaml filter-contrast-gray-alpha-1-ref.yaml
+== filter-invert.yaml filter-invert-ref.yaml
+== filter-invert-2.yaml filter-invert-2-ref.yaml
+platform(linux,mac) fuzzy(1,133) == filter-large-blur-radius.yaml filter-large-blur-radius.png
+skip_on(android,device) fuzzy(1,12) fuzzy-if(platform(swgl),2,12276) == draw_calls(7) color_targets(6) alpha_targets(0) filter-small-blur-radius.yaml filter-small-blur-radius.png # fails on Pixel2
+== filter-saturate-red-1.yaml filter-saturate-red-1-ref.yaml
+== filter-saturate-red-2.yaml filter-saturate-red-2-ref.yaml
+== filter-saturate-red-3.yaml filter-saturate-red-3-ref.yaml
+== filter-saturate-green-1.yaml filter-saturate-green-1-ref.yaml
+== filter-saturate-green-2.yaml filter-saturate-green-2-ref.yaml
+== filter-saturate-green-3.yaml filter-saturate-green-3-ref.yaml
+== filter-saturate-blue-1.yaml filter-saturate-blue-1-ref.yaml
+== filter-saturate-blue-2.yaml filter-saturate-blue-2-ref.yaml
+== filter-saturate-blue-3.yaml filter-saturate-blue-3-ref.yaml
+== filter-saturate-red-alpha-1.yaml filter-saturate-red-alpha-1-ref.yaml
+== filter-saturate-green-alpha-1.yaml filter-saturate-green-alpha-1-ref.yaml
+== filter-saturate-blue-alpha-1.yaml filter-saturate-blue-alpha-1-ref.yaml
+fuzzy(1,14) == filter-hue-rotate-1.yaml filter-hue-rotate-1-ref.yaml
+skip_on(android,device) == filter-hue-rotate-alpha-1.yaml filter-hue-rotate-alpha-1-ref.yaml # Fails on Pixel2
+skip_on(android,device) fuzzy(2,9072) fuzzy-if(platform(swgl),9,109897) == filter-long-chain.yaml filter-long-chain.png # fails on Pixel2
+platform(linux,mac) == filter-drop-shadow.yaml filter-drop-shadow.png
+platform(linux,mac) == filter-drop-shadow-on-viewport-edge.yaml filter-drop-shadow-on-viewport-edge.png
+platform(linux,mac) == blend-clipped.yaml blend-clipped.png
+platform(linux,mac) == filter-drop-shadow-clip.yaml filter-drop-shadow-clip.png
+fuzzy(2,10) platform(linux,mac) == filter-drop-shadow-clip-2.yaml filter-drop-shadow-clip-2.png
+fuzzy(1,58) platform(linux) == filter-drop-shadow-clip-3.yaml filter-drop-shadow-clip-3.png
+fuzzy(5,100000) == filter-drop-shadow-scaled.yaml filter-drop-shadow-scaled-ref.yaml
+== filter-segments.yaml filter-segments-ref.yaml
+== iframe-dropshadow.yaml iframe-dropshadow-ref.yaml
+skip_on(android,device) == filter-mix-blend-mode.yaml filter-mix-blend-mode-ref.yaml # fails on Pixel2
+== fuzzy(3,20000) srgb-to-linear.yaml srgb-to-linear-ref.yaml
+!= srgb-to-linear-2.yaml srgb-to-linear-ref.yaml
+!= filter-blur-huge.yaml blank.yaml
+!= filter-drop-shadow-huge.yaml blank.yaml
+!= filter-drop-shadow-transform-huge.yaml blank.yaml
+fuzzy(4,62000) == filter-drop-shadow-blur-clamping.yaml filter-drop-shadow-blur-clamping-ref.yaml
+== filter-blur-scaled.yaml filter-blur-scaled-ref.yaml
+fuzzy(5,72000) == filter-blur-clamping.yaml filter-blur-clamping-ref.yaml
+skip_on(android,device) skip_on(win) fuzzy(1,104) fuzzy-if(platform(swgl),4,18484) == filter-blur-scaled-xonly.yaml filter-blur-scaled-xonly.png # fails on Pixel2
+== svg-filter-component-transfer.yaml filter-component-transfer-ref.yaml
+== svg-filter-flood.yaml svg-filter-flood-ref.yaml
+skip_on(android,device) == svg-filter-blend.yaml svg-filter-blend-ref.yaml
+skip_on(android,device) == svg-filter-color-matrix.yaml filter-color-matrix-ref.yaml # fails on Pixel2
+platform(linux,mac) == draw_calls(8) color_targets(8) alpha_targets(0) svg-filter-blur.yaml filter-blur.png # Extra draw call is due to render task graph workaround
+platform(linux,mac) == svg-filter-drop-shadow.yaml svg-filter-drop-shadow.png
+== fuzzy(1,10000) svg-srgb-to-linear.yaml srgb-to-linear-ref.yaml
+platform(linux,mac) == fuzzy(6,36790) svg-filter-drop-shadow-rotate.yaml svg-filter-drop-shadow-rotate-ref.yaml
+platform(linux,mac) fuzzy(3,3550) == svg-filter-blur-transforms.yaml svg-filter-blur-transforms.png
+platform(linux,mac) == svg-filter-drop-shadow-on-viewport-edge.yaml svg-filter-drop-shadow-on-viewport-edge.png
+fuzzy(1,1) platform(linux,mac) == svg-filter-drop-shadow-perspective.yaml svg-filter-drop-shadow-perspective.png
+== backdrop-filter-basic.yaml backdrop-filter-basic-ref.yaml
+platform(linux,mac) == backdrop-filter-perspective.yaml backdrop-filter-perspective.png
+== backdrop-filter-on-child-surface.yaml backdrop-filter-on-child-surface-ref.yaml
+== backdrop-filter-clip-mask.yaml backdrop-filter-clip-mask-ref.yaml
+platform(linux,mac) == backdrop-filter-across-tiles.yaml backdrop-filter-across-tiles.png
+platform(linux,mac) == backdrop-filter-chain.yaml backdrop-filter-chain.png
+platform(linux,mac) == backdrop-filter-overlap.yaml backdrop-filter-overlap.png
+platform(linux,mac) == backdrop-filter-blur-across-tiles.yaml backdrop-filter-blur-across-tiles.png
+== fuzzy(1,4900) backdrop-filter-isolation.yaml backdrop-filter-isolation-ref.yaml
+#platform(linux,mac) == backdrop-filter-drop-shadow.yaml backdrop-filter-drop-shadow.png
+== backdrop-filter-blur-edge-mode.yaml backdrop-filter-blur-edge-mode-ref.yaml
+== backdrop-filter-half-opacity.yaml backdrop-filter-half-opacity-ref.yaml
+== backdrop-filter-culled-filter.yaml backdrop-filter-culled-filter-ref.yaml
+== backdrop-filter-nested.yaml blank.yaml # just don't crash
+platform(linux,mac) == backdrop-filter-transformed-filter.yaml backdrop-filter-transformed-filter.png
+platform(linux,max) == svg-filter-offset.yaml svg-filter-offset-ref.yaml
+skip_on(android,device) == fuzzy(1,100) svg-filter-composite.yaml svg-filter-composite-ref.yaml
+skip_on(android,device) == filter-mix-blend-scaling.yaml filter-mix-blend-scaling-ref.yaml
+platform(linux) == blend-clipped-raster-root.yaml blend-clipped-raster-root.png
+== drop-shadow-inverse-scale.yaml blank.yaml
+platform(linux,mac) == filter-drop-shadow-fractional.yaml filter-drop-shadow-fractional.png
diff --git a/gfx/wr/wrench/reftests/filters/srgb-to-linear-2.yaml b/gfx/wr/wrench/reftests/filters/srgb-to-linear-2.yaml
new file mode 100644
index 0000000000..333ef502ae
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/srgb-to-linear-2.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ filters: [srgb-to-linear]
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/gfx/wr/wrench/reftests/filters/srgb-to-linear-ref.yaml b/gfx/wr/wrench/reftests/filters/srgb-to-linear-ref.yaml
new file mode 100644
index 0000000000..d984523da6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/srgb-to-linear-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/gfx/wr/wrench/reftests/filters/srgb-to-linear.yaml b/gfx/wr/wrench/reftests/filters/srgb-to-linear.yaml
new file mode 100644
index 0000000000..67eb35119f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/srgb-to-linear.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ filters: [srgb-to-linear, linear-to-srgb]
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-blend-ref.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-blend-ref.yaml
new file mode 100644
index 0000000000..d796f0b85e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-blend-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: [40, 20, 2, 1]
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: [20, 10, 155, 1]
+ - type: rect
+ bounds: [0, 150, 50, 50]
+ color: [255, 222, 156, 1]
+ - type: rect
+ bounds: [0, 200, 50, 50]
+ color: [255, 245, 151, 1]
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-blend.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-blend.yaml
new file mode 100644
index 0000000000..2167013d3c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-blend.yaml
@@ -0,0 +1,83 @@
+# Tests various blend modes using the blend filter primitive.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 255, 255, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [51, 51, 51, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: [200, 100, 10, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 10, 156, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: darken
+ items:
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: [20, 222, 155, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 10, 156, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [0, 150, 50, 50]
+ color: [20, 222, 155, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 10, 156, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: exclusion
+ items:
+ - type: rect
+ bounds: [0, 200, 50, 50]
+ color: [0, 255, 24, 1]
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.png b/gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.png
new file mode 100644
index 0000000000..890c815bef
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.yaml
new file mode 100644
index 0000000000..d78f3ae806
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-blur-transforms.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 100, 300, 300]
+ transform: scale-x(0.1) rotate-z(-45)
+ filter-primitives:
+ - type: blur
+ width: 10
+ height: 10
+ in: previous
+ color-space: srgb
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 256 256
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-blur.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-blur.yaml
new file mode 100644
index 0000000000..5554688500
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-blur.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filter-primitives:
+ - type: blur
+ width: 10
+ height: 10
+ in: previous
+ color-space: srgb
+ items:
+ - image: "firefox.png"
+ bounds: 20 20 256 256
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-color-matrix.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-color-matrix.yaml
new file mode 100644
index 0000000000..60166b7514
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-color-matrix.yaml
@@ -0,0 +1,69 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 170]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 170]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [0.393, 0.686, 0.534, 0,
+ 0.189, 0.168, 0.131, 0,
+ 0.349, 0.272, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [-1, 0, 0, 0,
+ 0, -1, 0, 0,
+ 0, 0, -1, 0,
+ 0, 0, 0, 1,
+ 1, 1, 1, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [0, 0, 1, 0,
+ 0, 1, 0, 0,
+ 1, 0, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
+ - type: stacking-context
+ bounds: [10, 110, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0.5,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-component-transfer.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-component-transfer.yaml
new file mode 100644
index 0000000000..88b56a4a25
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-component-transfer.yaml
@@ -0,0 +1,382 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [0, 50, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [0, 100, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [0, 150, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Identity
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [0, 200, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Identity
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [60, 0, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [60, 50, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [60, 100, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [60, 150, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 200, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-1.75"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [120, 0, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 50, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 0.5]
+ - type: stacking-context
+ bounds: [120, 100, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 150, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [120, 200, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-0.25"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 0.5]
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-composite-ref.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-composite-ref.yaml
new file mode 100644
index 0000000000..25d9e7db6a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-composite-ref.yaml
@@ -0,0 +1,73 @@
+# Tests the composite SVG filter primitive
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: yellow
+ bounds: 10 10 100 100
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 200 0 0 0
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 400 0 0 0
+ items:
+ - type: rect
+ color: yellow
+ bounds: 10 10 100 100
+ - type: rect
+ color: blue
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 600 0 0 0
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: rect
+ color: white
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 0 200 0 0
+ items:
+ - type: rect
+ color: yellow
+ bounds: 10 10 100 100
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: rect
+ color: white
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 200 200 0 0
+ items:
+ - type: rect
+ color: [255, 0, 0, 1.0]
+ bounds: 10 10 100 100
+ - type: rect
+ color: [0, 0, 255, 1.0]
+ bounds: 60 60 100 100
+ - type: rect
+ color: [255, 0, 255, 1.0]
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 400 200 0 0
+ items:
+ - type: rect
+ color: [255, 255, 127, 1.0]
+ bounds: 10 10 100 100
+ - type: rect
+ color: [127, 127, 255, 1.0]
+ bounds: 60 60 100 100
+ - type: rect
+ color: [188, 188, 188, 1.0]
+ bounds: 60 60 50 50
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-composite.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-composite.yaml
new file mode 100644
index 0000000000..68f3cc0744
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-composite.yaml
@@ -0,0 +1,124 @@
+# Tests the composite SVG filter primitive
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: over
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 200 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: in
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 400 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: atop
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 600 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: out
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 0 200 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: xor
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 200 200 0 0
+ filter-primitives:
+ - type: flood
+ color: [255, 0, 0, 1.0]
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: lighter
+ items:
+ - type: rect
+ color: [0, 0, 255, 1.0]
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 400 200 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: arithmetic
+ k-values: [0.5, 0.5, 0.5, 0]
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.png b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.png
new file mode 100644
index 0000000000..a63372edfb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml
new file mode 100644
index 0000000000..3b1a4da213
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 400, 400]
+ filter-primitives:
+ - type: drop-shadow
+ offset: [10, 10]
+ radius: 20
+ color: [255, 0, 0, 1]
+ in: previous
+ color-space: srgb
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: green
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png
new file mode 100644
index 0000000000..1015e7f4c0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml
new file mode 100644
index 0000000000..744e2f655e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml
@@ -0,0 +1,22 @@
+# Tests SVG drop shadows with perspective transforms
+---
+root:
+ items:
+ - type: stacking-context
+ perspective: 100
+ perspective-origin: 100 50
+ items:
+ - type: "stacking-context"
+ transform-origin: 0 250
+ transform: rotate-x(-15)
+ filter-primitives:
+ - type: drop-shadow
+ color: red
+ offset: [20, 20]
+ radius: 10
+ in: previous
+ color-space: srgb
+ items:
+ - type: rect
+ color: blue
+ bounds: 0 0 200 200
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml
new file mode 100644
index 0000000000..69501250a0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml
@@ -0,0 +1,11 @@
+# Tests SVG drop shadows with transforms
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: drop-shadow([73, 73], 20, [255, 0, 0, 1])
+ transform: rotate-z(45)
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml
new file mode 100644
index 0000000000..71acca0f52
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml
@@ -0,0 +1,17 @@
+# Tests SVG drop shadows with transforms
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ transform: rotate-z(45)
+ filter-primitives:
+ - type: drop-shadow
+ in: previous
+ offset: [73, 73]
+ radius: 20
+ color: [255, 0, 0, 1]
+ color-space: srgb
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.png b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.png
new file mode 100644
index 0000000000..eee62c79d2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.yaml
new file mode 100644
index 0000000000..25cdfaf61e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-drop-shadow.yaml
@@ -0,0 +1,16 @@
+# Tests that SVG drop shadows are working properly
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filter-primitives:
+ - type: drop-shadow
+ in: previous
+ offset: [73, 73]
+ radius: 20
+ color: [255, 0, 0, 1]
+ color-space: srgb
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml
new file mode 100644
index 0000000000..ae4eb6a0d1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml
@@ -0,0 +1,10 @@
+# Test that flood filter is equivalent to drawing a rect with the same size and color
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ items:
+ - type: rect
+ bounds: [20, 20, 256, 256]
+ color: [0, 255.0, 0, 0.4]
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml
new file mode 100644
index 0000000000..bf896e266f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml
@@ -0,0 +1,10 @@
+# Test that flood filter is equivalent to drawing a rect with the same size and color
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: flood([0, 255.0, 0, 0.4])
+ items:
+ - image: "firefox.png"
+ bounds: 20 20 256 256
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-offset-ref.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-offset-ref.yaml
new file mode 100644
index 0000000000..f6326b5134
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-offset-ref.yaml
@@ -0,0 +1,11 @@
+# Tests the SVG offset filter primitive
+# An offset filter should have the same effect as changing the origin of the rectangle.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ bounds: 20 20 100 100
+ color: red
diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-offset.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-offset.yaml
new file mode 100644
index 0000000000..f48fb5104e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-filter-offset.yaml
@@ -0,0 +1,15 @@
+# Tests the SVG offset filter primitive
+# An offset filter should have the same effect as changing the origin of the rectangle.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ filter-primitives:
+ - type: offset
+ offset: 10 10
+ in: original
+ items:
+ - type: rect
+ bounds: 10 10 100 100
+ color: red
diff --git a/gfx/wr/wrench/reftests/filters/svg-srgb-to-linear.yaml b/gfx/wr/wrench/reftests/filters/svg-srgb-to-linear.yaml
new file mode 100644
index 0000000000..f7f33165f5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/filters/svg-srgb-to-linear.yaml
@@ -0,0 +1,20 @@
+# this test ensures that a sRGB -> linear-RGB -> sRGB results in no change (with exception to rounding error)
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ filter-primitives:
+ - type: identity
+ in: previous
+ color-space: linear-rgb
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/gfx/wr/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml b/gfx/wr/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml
new file mode 100644
index 0000000000..f2053c42b6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: -5.497787143782138
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/conic-angle-wraparound.yaml b/gfx/wr/wrench/reftests/gradient/conic-angle-wraparound.yaml
new file mode 100644
index 0000000000..67a1370eac
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-angle-wraparound.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 7.0685834705770345
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/conic-angle.png b/gfx/wr/wrench/reftests/gradient/conic-angle.png
new file mode 100644
index 0000000000..81ec931cec
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-angle.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/conic-angle.yaml b/gfx/wr/wrench/reftests/gradient/conic-angle.yaml
new file mode 100644
index 0000000000..11a068c9e6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-angle.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 0.7853981633974483
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/conic-backdrop-ref.yaml b/gfx/wr/wrench/reftests/gradient/conic-backdrop-ref.yaml
new file mode 100644
index 0000000000..e4d55171d3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-backdrop-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ center: 400 225
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml b/gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml
new file mode 100644
index 0000000000..2f9bd2225b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ center: 100 100
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml b/gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml
new file mode 100644
index 0000000000..695e600dff
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ spatial-id: 2
+ center: 100 100
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/gfx/wr/wrench/reftests/gradient/conic-backdrop.yaml b/gfx/wr/wrench/reftests/gradient/conic-backdrop.yaml
new file mode 100644
index 0000000000..bc654a50ac
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-backdrop.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ spatial-id: 2
+ center: 400 225
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/gfx/wr/wrench/reftests/gradient/conic-center.png b/gfx/wr/wrench/reftests/gradient/conic-center.png
new file mode 100644
index 0000000000..9843a2efb5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-center.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/conic-center.yaml b/gfx/wr/wrench/reftests/gradient/conic-center.yaml
new file mode 100644
index 0000000000..d01ebc9c8e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-center.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ center: 50 50
+ angle: 0.0
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/conic-color-wheel.png b/gfx/wr/wrench/reftests/gradient/conic-color-wheel.png
new file mode 100644
index 0000000000..3fff3c32d4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-color-wheel.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/conic-color-wheel.yaml b/gfx/wr/wrench/reftests/gradient/conic-color-wheel.yaml
new file mode 100644
index 0000000000..60e6bad865
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-color-wheel.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [50, 50, 300, 300]
+ radius: 300
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 0.0
+ stops: [0.0, red, 0.16666, yellow, 0.33333, green, 0.5, [0,255,255,1], 0.66666, blue, 0.83333, [255,0,255,1], 1.0, red]
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/gradient/conic-large-hard-stop-ref.yaml b/gfx/wr/wrench/reftests/gradient/conic-large-hard-stop-ref.yaml
new file mode 100644
index 0000000000..95c4daf636
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-large-hard-stop-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 250 250
+ center: 100 100
+ angle: 0
+ stops: [0.0, red, 0.2, red, 0.2, yellow, 1.0, yellow]
diff --git a/gfx/wr/wrench/reftests/gradient/conic-large-hard-stop.yaml b/gfx/wr/wrench/reftests/gradient/conic-large-hard-stop.yaml
new file mode 100644
index 0000000000..5656035f5b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-large-hard-stop.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 2048 2048
+ center: 100 100
+ angle: 0
+ stops: [0.0, red, 0.2, red, 0.2, yellow, 1.0, yellow]
+ - type: rect
+ bounds: 0 300 2048 2048
+ color: white
+ - type: rect
+ bounds: 300 0 2048 2048
+ color: white
diff --git a/gfx/wr/wrench/reftests/gradient/conic-large-ref.yaml b/gfx/wr/wrench/reftests/gradient/conic-large-ref.yaml
new file mode 100644
index 0000000000..9441175cf1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-large-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 50 50 2000 300
+ color: blue
+
+ - type: conic-gradient
+ bounds: 50 50 2000 300
+ center: 150 150
+ angle: 0.0
+ stops: [0.0, red,
+ 0.125, blue,
+ 0.375, blue,
+ 0.5, yellow,
+ 1.0, red] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/conic-large.yaml b/gfx/wr/wrench/reftests/gradient/conic-large.yaml
new file mode 100644
index 0000000000..78bf305f54
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-large.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 2000 300
+ center: 150 150
+ angle: 0.0
+ stops: [0.0, red,
+ 0.125, blue,
+ 0.375, blue,
+ 0.5, yellow,
+ 1.0, red] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/conic-nan.yaml b/gfx/wr/wrench/reftests/gradient/conic-nan.yaml
new file mode 100644
index 0000000000..6cc6234611
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-nan.yaml
@@ -0,0 +1,41 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 NaN
+ center: 100 100
+ angle: 0.0
+ stops: [0.0, red, 0.25, green, 0.5, blue, 0.75, black]
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ center: NaN 100
+ angle: 0.0
+ stops: [0.0, red, 0.25, green, 0.5, blue, 0.75, black]
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ angle: NaN
+ stops: [0.0, red, 0.25, green, 0.5, blue, 0.75, black]
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ angle: 0.0
+ stops: [0.0, red, NaN, green, 0.5, blue, 0.75, black]
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ tile-size: NaN 200
+ center: 100 100
+ angle: 0.0
+ stops: [0.0, red, 0.25, green, 0.5, blue, 0.75, black]
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ clip-rect: NaN 0 100 100
+ center: 100 100
+ angle: 0.0
+ stops: [0.0, red, 0.25, green, 0.5, blue, 0.75, black]
+ - type: conic-gradient
+ bounds: NaN NaN NaN NaN
+ clip-rect: NaN NaN NaN NaN
+ center: NaN NaN
+ angle: NaN
+ stops: [NaN, red, NaN, green, NaN, blue, NaN, black]
diff --git a/gfx/wr/wrench/reftests/gradient/conic-ref.yaml b/gfx/wr/wrench/reftests/gradient/conic-ref.yaml
new file mode 100644
index 0000000000..c29484ae9c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 50 50 100 100
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: black
+ - type: rect
+ bounds: 100 0 100 100
+ color: red
+ - type: rect
+ bounds: 100 100 100 100
+ color: green
+ - type: rect
+ bounds: 0 100 100 100
+ color: blue
diff --git a/gfx/wr/wrench/reftests/gradient/conic-simple.png b/gfx/wr/wrench/reftests/gradient/conic-simple.png
new file mode 100644
index 0000000000..79d0885c40
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-simple.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/conic-simple.yaml b/gfx/wr/wrench/reftests/gradient/conic-simple.yaml
new file mode 100644
index 0000000000..c40c878403
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic-simple.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 0.0
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/conic.yaml b/gfx/wr/wrench/reftests/gradient/conic.yaml
new file mode 100644
index 0000000000..ad034d6a9b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/conic.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ angle: 0.0
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black] \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops.yaml
new file mode 100644
index 0000000000..d448723002
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 960 0
+ stops: [0.0, red,
+ 0.25, green,
+ 0.5, blue,
+ 0.75, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml
new file mode 100644
index 0000000000..34b6b0e01c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, red,
+ 0.5, green,
+ 1.0, blue]
+ - type: gradient
+ bounds: 480 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [ 0.0, blue,
+ 0.5, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml
new file mode 100644
index 0000000000..dd2c8b7c9d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 0 540
+ stops: [0.0, red,
+ 0.25, green,
+ 0.5, blue,
+ 0.75, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml
new file mode 100644
index 0000000000..704b5be2f6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 270
+ start: 0 0
+ end: 0 270
+ stops: [0.0, red,
+ 0.5, green,
+ 1.0, blue]
+ - type: gradient
+ bounds: 0 270 960 270
+ start: 0 0
+ end: 0 270
+ stops: [ 0.0, blue,
+ 0.5, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_clamp.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_clamp.yaml
new file mode 100644
index 0000000000..1c55a269a1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_clamp.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 400 200
+ start: 0 100
+ end: 100 100
+ stops: [0.0, blue, 1.0, blue, 1.0, red]
+ - type: gradient
+ bounds: 0 300 400 200
+ start: 100 100
+ end: 200 100
+ stops: [0.0, blue, 1.0, blue, 1.0, red]
+ - type: gradient
+ bounds: 0 600 200 400
+ start: 0 100
+ end: 0 300
+ stops: [
+ 0.0, blue,
+ 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml
new file mode 100644
index 0000000000..4631192cd8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml
@@ -0,0 +1,30 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 400 200
+ start: 0 100
+ end: 400 100
+ stops: [
+ 0.0, blue,
+ 0.25, blue,
+ 0.25, red,
+ 1.0, red]
+ - type: gradient
+ bounds: 0 300 400 200
+ start: 0 100
+ end: 400 100
+ stops: [
+ 0.0, blue,
+ 0.5, blue,
+ 0.5, red,
+ 1.0, red]
+ - type: gradient
+ bounds: 0 600 200 400
+ start: 0 0
+ end: 0 400
+ stops: [
+ 0.0, blue,
+ 0.25, blue,
+ 0.75, red,
+ 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop.yaml
new file mode 100644
index 0000000000..53c908fb22
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 960 0
+ stops: [0.0, red,
+ 0.125, yellow,
+ 0.25, red,
+ 0.25, green,
+ 0.375, yellow,
+ 0.5, green,
+ 0.5, blue,
+ 0.625, yellow,
+ 0.75, blue,
+ 0.75, white,
+ 1.0, [100,200,50,1]]
+
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml
new file mode 100644
index 0000000000..1af3894406
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: clip
+ id: 101
+ complex:
+ - rect: [100, 100, 760, 340]
+ radius: [32, 32]
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 960 0
+ stops: [0.0, red,
+ 0.125, yellow,
+ 0.25, red,
+ 0.25, green,
+ 0.375, yellow,
+ 0.5, green,
+ 0.5, blue,
+ 0.625, yellow,
+ 0.75, blue,
+ 0.75, white,
+ 1.0, [100,200,50,1]]
+ clip-chain: 201
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml
new file mode 100644
index 0000000000..ac13881be8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml
@@ -0,0 +1,41 @@
+---
+root:
+ items:
+ - type: clip
+ id: 101
+ complex:
+ - rect: [100, 100, 760, 340]
+ radius: [32, 32]
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ - type: gradient
+ bounds: 0 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, red,
+ 0.25, yellow,
+ 0.5, red,
+ 0.5, green,
+ 0.75, yellow,
+ 1.0, green]
+ clip-chain: 201
+
+ - type: clip
+ id: 102
+ complex:
+ - rect: [100, 100, 760, 340]
+ radius: [32, 32]
+ - type: clip-chain
+ id: 202
+ clips: [102]
+ - type: gradient
+ bounds: 480 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, blue,
+ 0.25, yellow,
+ 0.5, blue,
+ 0.5, white,
+ 1.0, [100,200,50,1]]
+ clip-chain: 202
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml
new file mode 100644
index 0000000000..e4b3928046
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, red,
+ 0.25, yellow,
+ 0.5, red,
+ 0.5, green,
+ 0.75, yellow,
+ 1.0, green]
+ - type: gradient
+ bounds: 480 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, blue,
+ 0.25, yellow,
+ 0.5, blue,
+ 0.5, white,
+ 1.0, [100,200,50,1]]
+
+
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_repeat.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_repeat.yaml
new file mode 100644
index 0000000000..20a07a72a6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_repeat.yaml
@@ -0,0 +1,119 @@
+---
+root:
+ items:
+ # non-repeating
+ - type: gradient
+ bounds: 100 50 500 10
+ start: 100 0
+ end: 200 0
+ repeat: false
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # repeat 4 times
+ - type: gradient
+ bounds: 100 100 500 10
+ start: 100 0
+ end: 200 0
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 150 500 10
+ start: 125 0
+ end: 225 0
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # more hard stops, non-uniform distribution
+ - type: gradient
+ bounds: 100 250 500 10
+ start: 200 0
+ end: 300 0
+ repeat: false
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # repeat the hard stops
+ - type: gradient
+ bounds: 100 300 500 10
+ start: 200 0
+ end: 300 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 350 500 10
+ start: 175 0
+ end: 275 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # the entire gradient from 0 to 1 is
+ # "offscreen", we're only seeing its
+ # repeats. the gradient is 100 wide
+ # and ends at -75, so the first
+ # three-quarters of it would be hidden,
+ # that is, it should start with blue.
+ - type: gradient
+ bounds: 100 400 500 10
+ start: -175 0
+ end: -75 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but over on the right
+ - type: gradient
+ bounds: 100 450 500 10
+ start: 575 0
+ end: 675 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # a repeat, but not really because only part
+ # of the gradient is visible
+ - type: gradient
+ bounds: 100 500 500 10
+ start: -50 0
+ end: 550 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
diff --git a/gfx/wr/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml b/gfx/wr/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml
new file mode 100644
index 0000000000..e1682622f8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml
@@ -0,0 +1,119 @@
+---
+root:
+ items:
+ # non-repeating
+ - type: gradient
+ bounds: 100 50 500 10
+ start: 100 0
+ end: 200 0.001
+ repeat: false
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # repeat 4 times
+ - type: gradient
+ bounds: 100 100 500 10
+ start: 100 0
+ end: 200 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 150 500 10
+ start: 125 0
+ end: 225 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # more hard stops, non-uniform distribution
+ - type: gradient
+ bounds: 100 250 500 10
+ start: 200 0
+ end: 300 0.001
+ repeat: false
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # repeat the hard stops
+ - type: gradient
+ bounds: 100 300 500 10
+ start: 200 0
+ end: 300 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 350 500 10
+ start: 175 0
+ end: 275 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # the entire gradient from 0 to 1 is
+ # "offscreen", we're only seeing its
+ # repeats. the gradient is 100 wide
+ # and ends at -75, so the first
+ # three-quarters of it would be hidden,
+ # that is, it should start with blue.
+ - type: gradient
+ bounds: 100 400 500 10
+ start: -175 0
+ end: -75 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but over on the right
+ - type: gradient
+ bounds: 100 450 500 10
+ start: 575 0
+ end: 675 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # a repeat, but not really because only part
+ # of the gradient is visible
+ - type: gradient
+ bounds: 100 500 500 10
+ start: -50 0
+ end: 550 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml
new file mode 100644
index 0000000000..c9145fc5e6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 15.47998046875 18 684.39990234375 643.199951171875
+ start: 10.286011695861816 653.47998046875
+ end: 143.13165283203125 520.7279663085938
+ stops: [0.0, red, 1.0, blue]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size.yaml b/gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size.yaml
new file mode 100644
index 0000000000..4d78b9b99e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-adjust-tile-size.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 15.47998046875 18 684.39990234375 643.199951171875
+ tile-size: 684.4000244140625 643.2000122070313
+ start: 10.286011695861816 653.47998046875
+ end: 143.13165283203125 520.7279663085938
+ stops: [0.0, red, 1.0, blue]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.png b/gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.png
new file mode 100644
index 0000000000..450e0ac56a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.yaml b/gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.yaml
new file mode 100644
index 0000000000..13e2b324a8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-aligned-border-radius.yaml
@@ -0,0 +1,46 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ - type: gradient
+ bounds: 20 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [2]
+
+ - type: rect
+ bounds: [130, 10, 120, 120]
+ color: blue
+
+ - type: clip
+ id: 3
+ complex:
+ - rect: [140, 20, 100, 100]
+ radius: 32
+ - type: gradient
+ bounds: 140 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [3]
+
+ - type: rect
+ bounds: [260, 10, 120, 120]
+ color: black
+
+ - type: clip
+ id: 4
+ complex:
+ - rect: [270, 20, 100, 100]
+ radius: 32
+ - type: gradient
+ bounds: 270 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [4]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-aligned-clip-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-aligned-clip-ref.yaml
new file mode 100644
index 0000000000..08a395dc71
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-aligned-clip-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ # an aligned gradient from [0, 400]
+ - type: gradient
+ bounds: 0 0 200 400
+ start: 100 0
+ end: 100 400
+ stops: [0.0, green, 1.0, blue]
+ # manual clipping
+ - type: rect
+ bounds: 0 0 200 100
+ color: white
+ - type: rect
+ bounds: 0 300 200 100
+ color: white
diff --git a/gfx/wr/wrench/reftests/gradient/linear-aligned-clip.yaml b/gfx/wr/wrench/reftests/gradient/linear-aligned-clip.yaml
new file mode 100644
index 0000000000..fad030724f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-aligned-clip.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ # an aligned gradient from [0, 400] and clipped to [100, 300]
+ - type: gradient
+ bounds: 0 100 200 200
+ start: 100 -100
+ end: 100 300
+ stops: [0.0, green, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-backdrop-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-backdrop-ref.yaml
new file mode 100644
index 0000000000..7cc02b573c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-backdrop-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: gradient
+ bounds: 0 0 800 450
+ start: 100 100
+ end: 700 350
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml
new file mode 100644
index 0000000000..e72d156433
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: gradient
+ bounds: 0 0 800 450
+ start: 20 20
+ end: 80 50
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
+
diff --git a/gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml b/gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml
new file mode 100644
index 0000000000..dd85ffdae5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: gradient
+ bounds: 0 0 800 450
+ spatial-id: 2
+ start: 20 20
+ end: 80 50
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/gfx/wr/wrench/reftests/gradient/linear-backdrop.yaml b/gfx/wr/wrench/reftests/gradient/linear-backdrop.yaml
new file mode 100644
index 0000000000..7b351788d4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-backdrop.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: gradient
+ bounds: 0 0 800 450
+ spatial-id: 2
+ start: 100 100
+ end: 700 350
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-bug-1703141.yaml b/gfx/wr/wrench/reftests/gradient/linear-bug-1703141.yaml
new file mode 100644
index 0000000000..9db333277e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-bug-1703141.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: -8396 465 9136 3
+ tile-size: 10498.667 3
+ start: 9448.5 1.5
+ end: 10498.333 1.5
+ repeat: true
+ stops: [0.0, [0,0,0,0], 0.5, [0,0,0,0],
+ 0.5, red, 0.75, red,
+ 0.75, [0,0,0,0], 1.0, [0,0,0,0]]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-clamp-1-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-clamp-1-ref.yaml
new file mode 100644
index 0000000000..81c366d858
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-clamp-1-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 0.5, blue, 0.5, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-clamp-1a.yaml b/gfx/wr/wrench/reftests/gradient/linear-clamp-1a.yaml
new file mode 100644
index 0000000000..b83963a37a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-clamp-1a.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 100 100
+ stops: [0.0, blue, 1.0, blue, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-clamp-1b.yaml b/gfx/wr/wrench/reftests/gradient/linear-clamp-1b.yaml
new file mode 100644
index 0000000000..ffe3391999
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-clamp-1b.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 100 100
+ end: 200 100
+ stops: [0.0, blue, 0.0, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-clamp-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-clamp-2-ref.yaml
new file mode 100644
index 0000000000..8eb475d0a5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-clamp-2-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 0.25, blue, 0.25, green, 0.75, green, 0.75, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-clamp-2.yaml b/gfx/wr/wrench/reftests/gradient/linear-clamp-2.yaml
new file mode 100644
index 0000000000..48428b974a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-clamp-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 50 100
+ end: 150 100
+ stops: [0.0, blue, 0.0, green, 1.0, green, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-double.yaml b/gfx/wr/wrench/reftests/gradient/linear-double.yaml
new file mode 100644
index 0000000000..c9e4a44d84
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-double.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 300 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 1.0, red]
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-far-endpoints.yaml b/gfx/wr/wrench/reftests/gradient/linear-far-endpoints.yaml
new file mode 100644
index 0000000000..45bb52debc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-far-endpoints.yaml
@@ -0,0 +1,10 @@
+# Axis-aligned linear gradient with very far endpoints. It goes through the gradient
+# decomposition path which should not choke on overflow or casting failure.
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 500 500
+ start: -19958788096 0
+ end: 19958788096 0
+ stops: [0.0, red, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-hard-stop-ref.png b/gfx/wr/wrench/reftests/gradient/linear-hard-stop-ref.png
new file mode 100644
index 0000000000..4feb5e4993
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-hard-stop-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large-ref.yaml
new file mode 100644
index 0000000000..9287f91dd4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 800 200
+ tile-size: 200 200
+ clip-rect: 0 0 800 200
+ start: 0 0
+ end: 20 0
+ stops: [0.0, black, 0.1, black, 0.2, white, 1.0, white]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large.yaml b/gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large.yaml
new file mode 100644
index 0000000000..1abf946263
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-hard-stop-repeat-large.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 4000 200
+ tile-size: 200 200
+ clip-rect: 0 0 4000 200
+ start: 0 0
+ end: 20 0
+ stops: [0.0, black, 0.1, black, 0.2, white, 1.0, white]
+ repeat: true
+ - type: rect
+ bounds: 800 0 4000 200
+ color: white
diff --git a/gfx/wr/wrench/reftests/gradient/linear-hard-stop.yaml b/gfx/wr/wrench/reftests/gradient/linear-hard-stop.yaml
new file mode 100644
index 0000000000..b9249e7f2a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-hard-stop.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 0
+ end: 0 100
+ stops: [0.0, blue, 0.5 , red, 0.5, green]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-large-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-large-ref.yaml
new file mode 100644
index 0000000000..472f04fd17
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-large-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 50 50 2000 300
+ color: blue
+
+ - type: gradient
+ bounds: 50 50 400 300
+ start: 0 0
+ end: 100 20
+ stops: [0.0, red, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-large.yaml b/gfx/wr/wrench/reftests/gradient/linear-large.yaml
new file mode 100644
index 0000000000..cf9c50edd1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-large.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 2000 300
+ start: 0 0
+ end: 100 20
+ stops: [0.0, red, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-nan.yaml b/gfx/wr/wrench/reftests/gradient/linear-nan.yaml
new file mode 100644
index 0000000000..687a06d372
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-nan.yaml
@@ -0,0 +1,213 @@
+---
+root:
+ items:
+ # Small-ish gradients
+ - type: gradient
+ bounds: 50 50 NaN 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: NaN 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 NaN
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ NaN, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, NaN, black]
+ - type: gradient
+ bounds: 50 50 200 200
+ clip-rect: 50 50 150 NaN
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 200 200
+ tile-size: NaN 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+
+ # Large-ish gradients
+ - type: gradient
+ bounds: 50 50 NaN 500
+ start: 0 100
+ end: 500 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 500 500
+ start: 0 100
+ end: NaN 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 500 500
+ start: 0 NaN
+ end: 500 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 500 500
+ start: 0 100
+ end: 500 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ NaN, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 500 500
+ start: 0 100
+ end: 500 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, NaN, black]
+ - type: gradient
+ bounds: 50 50 500 500
+ clip-rect: 50 50 150 NaN
+ start: 0 100
+ end: 500 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 500 500
+ tile-size: NaN 500
+ start: 0 100
+ end: 500 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+
+ # Very large gradients
+ - type: gradient
+ bounds: 50 50 10000 10000
+ start: 0 100
+ end: NaN 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 10000 10000
+ start: 0 NaN
+ end: 10000 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 10000 10000
+ start: 0 100
+ end: 10000 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ NaN, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 10000 10000
+ start: 0 100
+ end: 10000 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, NaN, black]
+ - type: gradient
+ bounds: 50 50 10000 10000
+ clip-rect: 50 50 150 NaN
+ start: 0 100
+ end: 10000 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 10000 10000
+ tile-size: NaN 10000
+ start: 0 100
+ end: 10000 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+
+ # Not axis-aligned
+ - type: gradient
+ bounds: 50 50 200 200
+ tile-size: NaN 200
+ start: 0 0
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: NaN 50 200 200
+ tile-size: 100 100
+ start: 0 0
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0.0 0
+ end: 200 100
+ stops: [NaN, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.0, blue, NaN, blue,
+ 0.75, black, 1.0, black]
+
+ # Post-apocalyptic gradient
+ - type: gradient
+ bounds: NaN NaN NaN NaN
+ tile-size: NaN NaN
+ start: NaN NaN
+ end: NaN NaN
+ stops: [NaN, red, NaN, red,
+ NaN, green, NaN, green,
+ NaN, blue, NaN, blue,
+ NaN, black, NaN, black]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-ref.png b/gfx/wr/wrench/reftests/gradient/linear-ref.png
new file mode 100644
index 0000000000..b157ee4bef
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/linear-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-ref.yaml
new file mode 100644
index 0000000000..83d7248166
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 50 50 200 200
+ items:
+ - type: rect
+ bounds: 0 0 50 200
+ color: red
+ - type: rect
+ bounds: 50 0 50 200
+ color: green
+ - type: rect
+ bounds: 100 0 50 200
+ color: blue
+ - type: rect
+ bounds: 150 0 50 200
+ color: black
diff --git a/gfx/wr/wrench/reftests/gradient/linear-repeat-clip-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-repeat-clip-ref.yaml
new file mode 100644
index 0000000000..d8fd0b3b32
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-repeat-clip-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 500 500
+ start: 0 -20
+ end: 0 520
+ stops: [0.0, green, 0.5, blue, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-repeat-clip.yaml b/gfx/wr/wrench/reftests/gradient/linear-repeat-clip.yaml
new file mode 100644
index 0000000000..9c84edd714
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-repeat-clip.yaml
@@ -0,0 +1,13 @@
+# This test has a gradient primitive that is much larger than its local clip
+# and some tiling that can be optimized away. The combination of clipping
+# and stretching optimizations used to cause produce the wrong clip.
+---
+root:
+ items:
+ - type: gradient
+ bounds: -500 0 2000 500
+ tile-size: 100 500
+ clip-rect: 0 0 500 500
+ start: 0 -20
+ end: 0 520
+ stops: [0.0, green, 0.5, blue, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-reverse-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-reverse-2-ref.yaml
new file mode 100644
index 0000000000..b85d303503
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-reverse-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 50 100
+ end: 150 100
+ stops: [0.0, green, 0.5, blue,
+ 0.5, blue, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-reverse-2.yaml b/gfx/wr/wrench/reftests/gradient/linear-reverse-2.yaml
new file mode 100644
index 0000000000..c74c6b88f9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-reverse-2.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 150 100
+ end: 50 100
+ stops: [0.0, red, 0.5, blue,
+ 0.5, blue, 1.0, green]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-reverse-3-ref.yaml b/gfx/wr/wrench/reftests/gradient/linear-reverse-3-ref.yaml
new file mode 100644
index 0000000000..088977f50f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-reverse-3-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 100 100
+ start: 0 0
+ end: 110 0
+ stops: [0.0, white, 1.0, black]
+ - type: gradient
+ bounds: 150 50 100 100
+ start: 0 0
+ end: 110 0
+ stops: [0.0, black, 1.0, white]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-reverse-3.yaml b/gfx/wr/wrench/reftests/gradient/linear-reverse-3.yaml
new file mode 100644
index 0000000000..87b675c8ad
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-reverse-3.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 100 100
+ start: 0 0
+ end: 110 0
+ stops: [0.0, white, 1.0, black]
+ - type: gradient
+ bounds: 150 50 100 100
+ start: 110 0
+ end: 0 0
+ stops: [0.0, white, 1.0, black]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-reverse.yaml b/gfx/wr/wrench/reftests/gradient/linear-reverse.yaml
new file mode 100644
index 0000000000..ecae199e88
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-reverse.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 200 100
+ end: 000 100
+ stops: [0.0, black, 0.25, black,
+ 0.25, blue, 0.5, blue,
+ 0.5, green, 0.75, green,
+ 0.75, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/linear-stops-ref.png b/gfx/wr/wrench/reftests/gradient/linear-stops-ref.png
new file mode 100644
index 0000000000..844b244002
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-stops-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/linear-stops.yaml b/gfx/wr/wrench/reftests/gradient/linear-stops.yaml
new file mode 100644
index 0000000000..f5b8bfbc99
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear-stops.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - type: gradient
+ bounds: [0, 0, 200, 200]
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.5, green, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/linear.yaml b/gfx/wr/wrench/reftests/gradient/linear.yaml
new file mode 100644
index 0000000000..53d8d512cd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/linear.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-1-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-1-ref.yaml
new file mode 100644
index 0000000000..a3bb761463
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-1-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-1.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-1.yaml
new file mode 100644
index 0000000000..8bf6b734c2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-1.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-2-ref.yaml
new file mode 100644
index 0000000000..a3bb761463
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-2.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-2.yaml
new file mode 100644
index 0000000000..ba9b174b51
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-2.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.5, green,
+ 0.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-3-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-3-ref.yaml
new file mode 100644
index 0000000000..d5403c498f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-3-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-3.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-3.yaml
new file mode 100644
index 0000000000..962ff4e7aa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-3.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [-0.5, green,
+ -0.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-4-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-4-ref.yaml
new file mode 100644
index 0000000000..6c0b6e508f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-4-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, green, 1.0, green]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-4.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-4.yaml
new file mode 100644
index 0000000000..6564d84721
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-4.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [1.5, green,
+ 1.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml
new file mode 100644
index 0000000000..1ba6bd2f9e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.0, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-conic-degenerate.yaml b/gfx/wr/wrench/reftests/gradient/norm-conic-degenerate.yaml
new file mode 100644
index 0000000000..be96200722
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-conic-degenerate.yaml
@@ -0,0 +1,14 @@
+# see: https://www.w3.org/TR/2012/CR-css3-images-20120417/#repeating-gradients
+# the spec says that repeating gradients with color stops in the same offset
+# must render as a solid rect with color equal to the average color of the
+# gradient. Gecko and Blink seem to draw it with color equal to the last stop
+# so that is the behavior tested here
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.5, blue, 0.5, red]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-1-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-1-ref.yaml
new file mode 100644
index 0000000000..5b8a0b317a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-1-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-1.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-1.yaml
new file mode 100644
index 0000000000..d79b8608b1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-1.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-2-ref.yaml
new file mode 100644
index 0000000000..5b8a0b317a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-2.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-2.yaml
new file mode 100644
index 0000000000..aa3aa2afe1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-2.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.5, green,
+ 0.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-3-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-3-ref.yaml
new file mode 100644
index 0000000000..62bfda97e6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-3-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-3.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-3.yaml
new file mode 100644
index 0000000000..cc18371592
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-3.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [-0.5, green,
+ -0.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-4-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-4-ref.yaml
new file mode 100644
index 0000000000..bcd84d8294
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-4-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 1.0, green]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-4.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-4.yaml
new file mode 100644
index 0000000000..df622bf299
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-4.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [1.5, green,
+ 1.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml
new file mode 100644
index 0000000000..ae61c486cb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.0, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-linear-degenerate.yaml b/gfx/wr/wrench/reftests/gradient/norm-linear-degenerate.yaml
new file mode 100644
index 0000000000..89b431df32
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-linear-degenerate.yaml
@@ -0,0 +1,14 @@
+# see: https://www.w3.org/TR/2012/CR-css3-images-20120417/#repeating-gradients
+# the spec says that repeating gradients with color stops in the same offset
+# must render as a solid rect with color equal to the average color of the
+# gradient. Gecko and Blink seem to draw it with color equal to the last stop
+# so that is the behavior tested here
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.5, blue, 0.5, red]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-1-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-1-ref.yaml
new file mode 100644
index 0000000000..a67b51ecf8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-1-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.0, red, 0.5, red, 0.5, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-1.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-1.yaml
new file mode 100644
index 0000000000..7ee6caeafa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-1.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.5, red, 0.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-2-ref.yaml
new file mode 100644
index 0000000000..adfc8d70d4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-2-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.0, blue, 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-2.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-2.yaml
new file mode 100644
index 0000000000..dac1b78361
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [-0.5, red, -0.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-3-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-3-ref.yaml
new file mode 100644
index 0000000000..d90d1ee4f8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-3-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.0, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-3.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-3.yaml
new file mode 100644
index 0000000000..fbd5dc929f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-3.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [1.5, red, 1.5, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml
new file mode 100644
index 0000000000..afe59a770b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [0.0, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/norm-radial-degenerate.yaml b/gfx/wr/wrench/reftests/gradient/norm-radial-degenerate.yaml
new file mode 100644
index 0000000000..26d9935475
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/norm-radial-degenerate.yaml
@@ -0,0 +1,14 @@
+# see: https://www.w3.org/TR/2012/CR-css3-images-20120417/#repeating-gradients
+# the spec says that repeating gradients with color stops in the same offset
+# must render as a solid rect with color equal to the average color of the
+# gradient. Gecko and Blink seem to draw it with color equal to the last stop
+# so that is the behavior tested here
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [0.5, blue, 0.5, red]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.png b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.png
new file mode 100644
index 0000000000..b27b9df586
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.yaml
new file mode 100644
index 0000000000..ea8acd5f26
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-aligned.png b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned.png
new file mode 100644
index 0000000000..35fad64b1a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-aligned.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned.yaml
new file mode 100644
index 0000000000..a709f845ea
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-aligned.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.png b/gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.png
new file mode 100644
index 0000000000..ea7a5cf7ef
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.yaml
new file mode 100644
index 0000000000..35546b0cd2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-angle-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 0
+ end: 200 200
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-angle.png b/gfx/wr/wrench/reftests/gradient/premultiplied-angle.png
new file mode 100644
index 0000000000..a37120ad7e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-angle.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-angle.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-angle.yaml
new file mode 100644
index 0000000000..b665e47150
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-angle.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 0
+ end: 200 200
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.png b/gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.png
new file mode 100644
index 0000000000..e589168621
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.yaml
new file mode 100644
index 0000000000..dee4cec03b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-conic-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-conic.png b/gfx/wr/wrench/reftests/gradient/premultiplied-conic.png
new file mode 100644
index 0000000000..678dc9c87f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-conic.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-conic.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-conic.yaml
new file mode 100644
index 0000000000..d4b442bca7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-conic.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.png b/gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.png
new file mode 100644
index 0000000000..cfd7ca2aaa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.yaml
new file mode 100644
index 0000000000..3e682328d1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-radial-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-radial.png b/gfx/wr/wrench/reftests/gradient/premultiplied-radial.png
new file mode 100644
index 0000000000..0b2b2c2f21
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-radial.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/premultiplied-radial.yaml b/gfx/wr/wrench/reftests/gradient/premultiplied-radial.yaml
new file mode 100644
index 0000000000..dc3750abd4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/premultiplied-radial.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-backdrop-ref.yaml b/gfx/wr/wrench/reftests/gradient/radial-backdrop-ref.yaml
new file mode 100644
index 0000000000..a878e2ac0a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-backdrop-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ center: 400 225
+ radius: 200 200
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml b/gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml
new file mode 100644
index 0000000000..2aea254d3a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ center: 50 50
+ radius: 60 60
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml b/gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml
new file mode 100644
index 0000000000..f8e2c14b1c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ spatial-id: 2
+ center: 50 50
+ radius: 60 60
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/gfx/wr/wrench/reftests/gradient/radial-backdrop.yaml b/gfx/wr/wrench/reftests/gradient/radial-backdrop.yaml
new file mode 100644
index 0000000000..91ee3a6ba1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-backdrop.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ spatial-id: 2
+ center: 400 225
+ radius: 200 200
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-circle-ref.png b/gfx/wr/wrench/reftests/gradient/radial-circle-ref.png
new file mode 100644
index 0000000000..3f9a748a7e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-circle-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/radial-circle.yaml b/gfx/wr/wrench/reftests/gradient/radial-circle.yaml
new file mode 100644
index 0000000000..037da7eddc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-circle.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-ellipse-ref.png b/gfx/wr/wrench/reftests/gradient/radial-ellipse-ref.png
new file mode 100644
index 0000000000..b4786cd387
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-ellipse-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/radial-ellipse.yaml b/gfx/wr/wrench/reftests/gradient/radial-ellipse.yaml
new file mode 100644
index 0000000000..7c733f7223
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-ellipse.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 100 200
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-large-ref.png b/gfx/wr/wrench/reftests/gradient/radial-large-ref.png
new file mode 100644
index 0000000000..444b876094
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-large-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/radial-large.yaml b/gfx/wr/wrench/reftests/gradient/radial-large.yaml
new file mode 100644
index 0000000000..c03adec6c1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-large.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 2000 300
+ center: 1000 150
+ radius: 900 200
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-nan.yaml b/gfx/wr/wrench/reftests/gradient/radial-nan.yaml
new file mode 100644
index 0000000000..f8127a8c7a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-nan.yaml
@@ -0,0 +1,35 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 NaN 300
+ center: 150 150
+ radius: 200 200
+ stops: [0, red, 1, blue]
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 NaN
+ radius: 200 200
+ stops: [0, red, 1, blue]
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: NaN 200
+ stops: [0, red, 1, blue]
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0, red, NaN, blue]
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ tile-size: 50 NaN
+ center: 150 150
+ radius: 200 200
+ stops: [0, red, 1, blue]
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ clip-rect: 50 10 NaN 300
+ center: 150 150
+ radius: 200 200
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-optimized-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/radial-optimized-2-ref.yaml
new file mode 100644
index 0000000000..4b900d93fa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-optimized-2-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 500 500
+ center: 150 150
+ radius: 80 160
+ stops: [0, red, 1, [0,0,0,0]]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-optimized-2.yaml b/gfx/wr/wrench/reftests/gradient/radial-optimized-2.yaml
new file mode 100644
index 0000000000..3fac9042e2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-optimized-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 500 500
+ center: 150 150
+ radius: 20 40
+ stops: [0, red, 4, [0,0,0,0]]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-optimized-ref.yaml b/gfx/wr/wrench/reftests/gradient/radial-optimized-ref.yaml
new file mode 100644
index 0000000000..380384ffe6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-optimized-ref.yaml
@@ -0,0 +1,33 @@
+# Hand-roll decomposition that webrender would do for radial-optimized.yaml
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 160 160 20 30
+ center: 10 15
+ radius: 10 15
+ stops: [0, [255.0,0,0,0.7], 1, [0,0,255.0,0.7]]
+ - type: rect
+ bounds: 10 20 150 140
+ color: [0,0,255.0,0.7]
+ - type: rect
+ bounds: 160 20 20 140
+ color: [0,0,255.0,0.7]
+ - type: rect
+ bounds: 180 20 130 140
+ color: [0,0,255.0,0.7]
+ - type: rect
+ bounds: 10 160 150 30
+ color: [0,0,255.0,0.7]
+ - type: rect
+ bounds: 180 160 130 30
+ color: [0,0,255.0,0.7]
+ - type: rect
+ bounds: 10 190 150 160
+ color: [0,0,255.0,0.7]
+ - type: rect
+ bounds: 160 190 20 160
+ color: [0,0,255.0,0.7]
+ - type: rect
+ bounds: 180 190 130 160
+ color: [0,0,255.0,0.7]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-optimized.yaml b/gfx/wr/wrench/reftests/gradient/radial-optimized.yaml
new file mode 100644
index 0000000000..cfc668bc66
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-optimized.yaml
@@ -0,0 +1,12 @@
+# A small radial gradient in a large primitive.
+# Most of the primitive is the constant color of the last gradient stop,
+# and webrender will try to optimize these parts by drawing them with
+# solid color primitives.
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 10 20 300 330
+ center: 160 155
+ radius: 10 15
+ stops: [0, [255.0,0,0,0.7], 1, [0,0,255.0,0.7]]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-tiling-optimized-ref.yaml b/gfx/wr/wrench/reftests/gradient/radial-tiling-optimized-ref.yaml
new file mode 100644
index 0000000000..b5b4957f9b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-tiling-optimized-ref.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 40 20 20
+ center: 10 10
+ radius: 10 10
+ stops: [0, red, 1, blue, 1, [0,0,0,0]]
+ - type: radial-gradient
+ bounds: 450 40 20 20
+ center: 10 10
+ radius: 10 10
+ stops: [0, red, 1, blue, 1, [0,0,0,0]]
+ - type: radial-gradient
+ bounds: 450 340 20 20
+ center: 10 10
+ radius: 10 10
+ stops: [0, red, 1, blue, 1, [0,0,0,0]]
+ - type: radial-gradient
+ bounds: 50 340 20 20
+ center: 10 10
+ radius: 10 10
+ stops: [0, red, 1, blue, 1, [0,0,0,0]]
+
diff --git a/gfx/wr/wrench/reftests/gradient/radial-tiling-optimized.yaml b/gfx/wr/wrench/reftests/gradient/radial-tiling-optimized.yaml
new file mode 100644
index 0000000000..a92fd24479
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-tiling-optimized.yaml
@@ -0,0 +1,13 @@
+# A small repeated radial gradient in a large primitive.
+# There is a lot of fully transparent space that webrender
+# will optimize out.
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 10 10 800 600
+ center: 50 40
+ radius: 10 10
+ stops: [0, red, 1, blue, 1, [0,0,0,0]]
+ tile-size: 300 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/gradient/radial-zero-size-1.yaml b/gfx/wr/wrench/reftests/gradient/radial-zero-size-1.yaml
new file mode 100644
index 0000000000..43e4ef323d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-zero-size-1.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 0
+ stops: [0.0, blue, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-zero-size-2.yaml b/gfx/wr/wrench/reftests/gradient/radial-zero-size-2.yaml
new file mode 100644
index 0000000000..94bf6eae73
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-zero-size-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 0 100
+ stops: [0.0, blue, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/radial-zero-size-3.yaml b/gfx/wr/wrench/reftests/gradient/radial-zero-size-3.yaml
new file mode 100644
index 0000000000..3efa1ec307
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-zero-size-3.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
diff --git a/gfx/wr/wrench/reftests/gradient/radial-zero-size-ref.yaml b/gfx/wr/wrench/reftests/gradient/radial-zero-size-ref.yaml
new file mode 100644
index 0000000000..b3770b752e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/radial-zero-size-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0.0, red, 1.0, red]
diff --git a/gfx/wr/wrench/reftests/gradient/reftest.list b/gfx/wr/wrench/reftests/gradient/reftest.list
new file mode 100644
index 0000000000..5c55c29b06
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/reftest.list
@@ -0,0 +1,128 @@
+platform(linux,mac) == premultiplied-aligned.yaml premultiplied-aligned.png
+fuzzy(1,500) platform(linux,mac) == premultiplied-angle.yaml premultiplied-angle.png
+platform(linux,mac) == premultiplied-radial.yaml premultiplied-radial.png
+platform(linux,mac) == premultiplied-conic.yaml premultiplied-conic.png
+
+platform(linux,mac) == premultiplied-aligned-2.yaml premultiplied-aligned-2.png
+platform(linux,mac) == premultiplied-angle-2.yaml premultiplied-angle-2.png
+platform(linux,mac) == premultiplied-radial-2.yaml premultiplied-radial-2.png
+platform(linux,mac) == premultiplied-conic-2.yaml premultiplied-conic-2.png
+
+== linear.yaml linear-ref.png
+== linear-reverse.yaml linear-ref.png
+fuzzy(255,1200) == linear-reverse-2.yaml linear-reverse-2-ref.yaml
+== linear-reverse-3.yaml linear-reverse-3-ref.yaml
+platform(linux,mac) fuzzy(1,35000) == linear-stops.yaml linear-stops-ref.png
+
+== linear-clamp-1a.yaml linear-clamp-1-ref.yaml
+== linear-clamp-1b.yaml linear-clamp-1-ref.yaml
+== linear-clamp-2.yaml linear-clamp-2-ref.yaml
+
+fuzzy-range(<=1,*4800) == linear-hard-stop.yaml linear-hard-stop-ref.png
+fuzzy-if(env(android,device),15,17000) == linear-hard-stop-repeat-large.yaml linear-hard-stop-repeat-large-ref.yaml # Android device is Samsung Galaxy A51
+
+# dithering requires us to fuzz here
+fuzzy(1,20000) == linear.yaml linear-ref.yaml
+fuzzy(1,20000) == linear-reverse.yaml linear-ref.yaml
+
+fuzzy(1,40000) == linear-aligned-clip.yaml linear-aligned-clip-ref.yaml
+
+platform(linux,mac) fuzzy(1,80000) == radial-circle.yaml radial-circle-ref.png
+platform(linux,mac) fuzzy(1,80000) == radial-ellipse.yaml radial-ellipse-ref.png
+
+!= radial-circle.yaml radial-ellipse.yaml
+
+== norm-linear-1.yaml norm-linear-1-ref.yaml
+== norm-linear-2.yaml norm-linear-2-ref.yaml
+== norm-linear-3.yaml norm-linear-3-ref.yaml
+== norm-linear-4.yaml norm-linear-4-ref.yaml
+== norm-linear-degenerate.yaml norm-radial-degenerate-ref.yaml
+
+== norm-radial-1.yaml norm-radial-1-ref.yaml
+== norm-radial-2.yaml norm-radial-2-ref.yaml
+== norm-radial-3.yaml norm-radial-3-ref.yaml
+== norm-radial-degenerate.yaml norm-radial-degenerate-ref.yaml
+
+== norm-conic-1.yaml norm-conic-1-ref.yaml
+== norm-conic-2.yaml norm-conic-2-ref.yaml
+== norm-conic-3.yaml norm-conic-3-ref.yaml
+== norm-conic-4.yaml norm-conic-4-ref.yaml
+== norm-conic-degenerate.yaml norm-conic-degenerate-ref.yaml
+
+# fuzzy because of differences from normalization
+# this might be able to be improved
+fuzzy(255,1200) == repeat-linear.yaml repeat-linear-ref.yaml
+fuzzy(255,1200) == repeat-linear-reverse.yaml repeat-linear-ref.yaml
+fuzzy(255,2666) == repeat-radial.yaml repeat-radial-ref.yaml
+fuzzy(255,2666) == repeat-radial-negative.yaml repeat-radial-ref.yaml
+fuzzy(255,1652) == repeat-conic.yaml repeat-conic-ref.yaml
+fuzzy(255,1652) == repeat-conic-negative.yaml repeat-conic-ref.yaml
+
+# fuzzy because of thin spaced out column of pixels that are 1 off
+fuzzy(1,83164) == tiling-linear-1.yaml tiling-linear-1-ref.yaml
+fuzzy(1,46293) == tiling-linear-2.yaml tiling-linear-2-ref.yaml
+fuzzy(1,62154) == tiling-linear-3.yaml tiling-linear-3-ref.yaml
+
+fuzzy(1,17) == tiling-radial-1.yaml tiling-radial-1-ref.yaml
+fuzzy(1,1) == tiling-radial-2.yaml tiling-radial-2-ref.yaml
+fuzzy(1,3) fuzzy-if(platform(swgl),1,1318) == tiling-radial-3.yaml tiling-radial-3-ref.yaml
+fuzzy(1,17) == tiling-radial-4.yaml tiling-radial-4-ref.yaml
+
+fuzzy(1,17) == tiling-conic-1.yaml tiling-conic-1-ref.yaml
+fuzzy(1,1) == tiling-conic-2.yaml tiling-conic-2-ref.yaml
+fuzzy(1,7) == tiling-conic-3.yaml tiling-conic-3-ref.yaml
+
+== radial-zero-size-1.yaml radial-zero-size-ref.yaml
+== radial-zero-size-2.yaml radial-zero-size-ref.yaml
+== radial-zero-size-3.yaml radial-zero-size-ref.yaml
+
+== linear-adjust-tile-size.yaml linear-adjust-tile-size-ref.yaml
+== linear-repeat-clip.yaml linear-repeat-clip-ref.yaml
+
+platform(linux,mac) == linear-aligned-border-radius.yaml linear-aligned-border-radius.png
+# interpolation fuzz from sampling texture-baked gradient ramps
+platform(linux,mac) fuzzy-range(<=1,*1404) == repeat-border-radius.yaml repeat-border-radius.png
+
+== conic.yaml conic-ref.yaml
+fuzzy(1,57) == conic-simple.yaml conic-simple.png
+fuzzy(255,302) == conic-angle.yaml conic-angle.png
+== conic-center.yaml conic-center.png
+fuzzy(1,2) == conic-angle-wraparound.yaml conic-angle.yaml
+fuzzy-if(env(android,device),254,146) fuzzy-if(not(env(android,device)),1,1) == conic-angle-wraparound-negative.yaml conic-angle.yaml # Android device is Samsung Galaxy A51
+fuzzy(1,333) == conic-color-wheel.yaml conic-color-wheel.png
+
+# gradient caching tests
+# replaces a computed gradient by a sampled texture, so a lot of off-by-one
+# variation from interpolation, which is fine:
+fuzzy-range(<=1,*195000) == gradient_cache_5stops.yaml gradient_cache_5stops_ref.yaml
+fuzzy-range(<=1,*171840) == gradient_cache_5stops_vertical.yaml gradient_cache_5stops_vertical_ref.yaml
+== gradient_cache_hardstop.yaml gradient_cache_hardstop_ref.yaml
+fuzzy-range(<=1,1) == gradient_cache_hardstop_clip.yaml gradient_cache_hardstop_clip_ref.yaml
+== gradient_cache_clamp.yaml gradient_cache_clamp_ref.yaml
+== gradient_cache_repeat.yaml gradient_cache_repeat_ref.yaml
+== linear-bug-1703141.yaml linear-bug-1703141.yaml
+
+# Recognize opaque tiles with gradient backgrounds
+== conic-backdrop-with-spacing.yaml conic-backdrop-with-spacing-ref.yaml
+== conic-backdrop.yaml conic-backdrop-ref.yaml
+== linear-backdrop-with-spacing.yaml linear-backdrop-with-spacing-ref.yaml
+== linear-backdrop.yaml linear-backdrop-ref.yaml
+== radial-backdrop-with-spacing.yaml radial-backdrop-with-spacing-ref.yaml
+== radial-backdrop.yaml radial-backdrop-ref.yaml
+
+# Exercise the radial gradient optimization code path
+== radial-optimized.yaml radial-optimized-ref.yaml
+== radial-optimized-2.yaml radial-optimized-2-ref.yaml
+== radial-tiling-optimized.yaml radial-tiling-optimized-ref.yaml
+
+# Exercise the cached gradient scaling code path
+fuzzy(2,23000) == linear-large.yaml linear-large-ref.yaml
+== conic-large.yaml conic-large-ref.yaml
+fuzzy-if(env(android,device),254,1) == conic-large-hard-stop.yaml conic-large-hard-stop-ref.yaml # Android device is Samsung Galaxy A51
+fuzzy(1,7000) == radial-large.yaml radial-large-ref.png
+
+# crash tests
+== linear-far-endpoints.yaml linear-far-endpoints.yaml
+== linear-nan.yaml linear-nan.yaml
+== radial-nan.yaml radial-nan.yaml
+== conic-nan.yaml conic-nan.yaml
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-border-radius.png b/gfx/wr/wrench/reftests/gradient/repeat-border-radius.png
new file mode 100644
index 0000000000..cc0fa947ae
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-border-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-border-radius.yaml b/gfx/wr/wrench/reftests/gradient/repeat-border-radius.yaml
new file mode 100644
index 0000000000..08904e082f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-border-radius.yaml
@@ -0,0 +1,136 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ - type: gradient
+ bounds: 20 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
+ repeat: true
+ clip-chain: [2]
+
+ - type: rect
+ bounds: [130, 10, 120, 120]
+ color: blue
+
+ - type: clip
+ id: 3
+ complex:
+ - rect: [140, 20, 100, 100]
+ radius: 32
+ - type: gradient
+ bounds: 140 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.2, red, 1.0, yellow]
+ clip-chain: [3]
+
+ - type: rect
+ bounds: [260, 10, 120, 120]
+ color: black
+
+ - type: clip
+ id: 4
+ complex:
+ - rect: [270, 20, 100, 100]
+ radius: 32
+ - type: gradient
+ bounds: 270 20 100 100
+ start: 50 0
+ end: 51 100
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [4]
+
+ - type: clip
+ id: 5
+ complex:
+ - rect: [20, 160, 100, 100]
+ radius: 32
+ - type: radial-gradient
+ bounds: 20 160 100 100
+ center: 50 50
+ radius: 25 25
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [5]
+
+ - type: rect
+ bounds: [130, 150, 120, 120]
+ color: blue
+
+ - type: clip
+ id: 6
+ complex:
+ - rect: [140, 160, 100, 100]
+ radius: 32
+ - type: radial-gradient
+ bounds: 140 160 100 100
+ center: 50 50
+ radius: 25 25
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [6]
+
+ - type: rect
+ bounds: [260, 150, 120, 120]
+ color: black
+
+ - type: clip
+ id: 7
+ complex:
+ - rect: [270, 160, 100, 100]
+ radius: 32
+ - type: radial-gradient
+ bounds: 270 160 100 100
+ center: 50 50
+ radius: 25 25
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [7]
+
+ - type: clip
+ id: 8
+ complex:
+ - rect: [20, 300, 100, 100]
+ radius: 32
+ - type: conic-gradient
+ bounds: 20 300 100 100
+ angle: 0.0
+ center: 50 50
+ stops: [0.0, red, 1.0, yellow]
+ repeat: true
+ clip-chain: [8]
+
+ - type: rect
+ bounds: [130, 290, 120, 120]
+ color: blue
+
+ - type: clip
+ id: 9
+ complex:
+ - rect: [140, 300, 100, 100]
+ radius: 32
+ - type: conic-gradient
+ bounds: 140 300 100 100
+ angle: 0.0
+ center: 50 50
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [9]
+
+ - type: rect
+ bounds: [260, 290, 120, 120]
+ color: black
+
+ - type: clip
+ id: 10
+ complex:
+ - rect: [270, 300, 100, 100]
+ radius: 32
+ - type: conic-gradient
+ bounds: 270 300 100 100
+ angle: 0.0
+ center: 50 50
+ stops: [0.0, red, 1.0, yellow]
+ clip-chain: [10]
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-conic-negative.yaml b/gfx/wr/wrench/reftests/gradient/repeat-conic-negative.yaml
new file mode 100644
index 0000000000..e1043562da
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-conic-negative.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: -0.62831853
+ center: 150 150
+ stops: [0.1, red, 0.2, red, 0.2, blue, 0.3, blue]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-conic-ref.yaml b/gfx/wr/wrench/reftests/gradient/repeat-conic-ref.yaml
new file mode 100644
index 0000000000..b98cc378a7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-conic-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.0, red,
+ 0.1, red,
+ 0.1, blue,
+ 0.2, blue,
+ 0.2, red,
+ 0.3, red,
+ 0.3, blue,
+ 0.4, blue,
+ 0.4, red,
+ 0.5, red,
+ 0.5, blue,
+ 0.6, blue,
+ 0.6, red,
+ 0.7, red,
+ 0.7, blue,
+ 0.8, blue,
+ 0.8, red,
+ 0.9, red,
+ 0.9, blue,
+ 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-conic.yaml b/gfx/wr/wrench/reftests/gradient/repeat-conic.yaml
new file mode 100644
index 0000000000..bbc4202aec
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-conic.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.1, blue, 0.2, blue, 0.2, red, 0.3, red]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-linear-ref.yaml b/gfx/wr/wrench/reftests/gradient/repeat-linear-ref.yaml
new file mode 100644
index 0000000000..420a08db01
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-linear-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.0, red,
+ 0.1, red,
+ 0.1, blue,
+ 0.2, blue,
+ 0.2, red,
+ 0.3, red,
+ 0.3, blue,
+ 0.4, blue,
+ 0.4, red,
+ 0.5, red,
+ 0.5, blue,
+ 0.6, blue,
+ 0.6, red,
+ 0.7, red,
+ 0.7, blue,
+ 0.8, blue,
+ 0.8, red,
+ 0.9, red,
+ 0.9, blue,
+ 1.0, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-linear-reverse.yaml b/gfx/wr/wrench/reftests/gradient/repeat-linear-reverse.yaml
new file mode 100644
index 0000000000..a81bafe1bd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-linear-reverse.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 300 150
+ end: 0 150
+ stops: [0.1, red, 0.2, red, 0.2, blue, 0.3, blue]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-linear.yaml b/gfx/wr/wrench/reftests/gradient/repeat-linear.yaml
new file mode 100644
index 0000000000..63e136bc8e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-linear.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.1, blue, 0.2, blue, 0.2, red, 0.3, red]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-radial-negative.yaml b/gfx/wr/wrench/reftests/gradient/repeat-radial-negative.yaml
new file mode 100644
index 0000000000..949455f893
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-radial-negative.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [-0.3, blue, -0.2, blue, -0.2, red, -0.1, red]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-radial-ref.yaml b/gfx/wr/wrench/reftests/gradient/repeat-radial-ref.yaml
new file mode 100644
index 0000000000..d2c0292e6e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-radial-ref.yaml
@@ -0,0 +1,38 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ # note: we need stops up to 1.4 because a repeating radial gradient
+ # will fill the whole rect beyond 1.0. So the furthest radius we have
+ # to fill in is the diagonal of the unit square
+ stops: [0.0, red,
+ 0.1, red,
+ 0.1, blue,
+ 0.2, blue,
+ 0.2, red,
+ 0.3, red,
+ 0.3, blue,
+ 0.4, blue,
+ 0.4, red,
+ 0.5, red,
+ 0.5, blue,
+ 0.6, blue,
+ 0.6, red,
+ 0.7, red,
+ 0.7, blue,
+ 0.8, blue,
+ 0.8, red,
+ 0.9, red,
+ 0.9, blue,
+ 1.0, blue,
+ 1.0, red,
+ 1.1, red,
+ 1.1, blue,
+ 1.2, blue,
+ 1.2, red,
+ 1.3, red,
+ 1.3, blue,
+ 1.4, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/repeat-radial.yaml b/gfx/wr/wrench/reftests/gradient/repeat-radial.yaml
new file mode 100644
index 0000000000..04c676c25b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/repeat-radial.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [0.1, blue, 0.2, blue, 0.2, red, 0.3, red]
+ repeat: true
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-conic-1-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-conic-1-ref.yaml
new file mode 100644
index 0000000000..6b93e28fa1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-conic-1-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: conic-gradient
+ bounds: 350 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: conic-gradient
+ bounds: 50 350 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: conic-gradient
+ bounds: 350 350 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-conic-1.yaml b/gfx/wr/wrench/reftests/gradient/tiling-conic-1.yaml
new file mode 100644
index 0000000000..71ffe80b22
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-conic-1.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # basic - 4 tiles spaced out with no clipping
+ - type: conic-gradient
+ bounds: 50 50 500 500
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-conic-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-conic-2-ref.yaml
new file mode 100644
index 0000000000..4360aa204c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-conic-2-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: conic-gradient
+ bounds: 350 50 100 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: conic-gradient
+ bounds: 50 350 200 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: conic-gradient
+ bounds: 350 350 100 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-conic-2.yaml b/gfx/wr/wrench/reftests/gradient/tiling-conic-2.yaml
new file mode 100644
index 0000000000..ba9522a68c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-conic-2.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # slightly clip the last tile
+ - type: conic-gradient
+ bounds: 50 50 400 400
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-conic-3-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-conic-3-ref.yaml
new file mode 100644
index 0000000000..d7b9541ef4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-conic-3-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: conic-gradient
+ bounds: 250 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: conic-gradient
+ bounds: 50 250 200 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: conic-gradient
+ bounds: 250 250 200 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-conic-3.yaml b/gfx/wr/wrench/reftests/gradient/tiling-conic-3.yaml
new file mode 100644
index 0000000000..77b28a9e22
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-conic-3.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # no spacing with a clip
+ - type: conic-gradient
+ bounds: 50 50 400 300
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 0 0
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-linear-1-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-linear-1-ref.yaml
new file mode 100644
index 0000000000..c06e05fb53
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-linear-1-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: gradient
+ bounds: 350 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: gradient
+ bounds: 50 350 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: gradient
+ bounds: 350 350 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-linear-1.yaml b/gfx/wr/wrench/reftests/gradient/tiling-linear-1.yaml
new file mode 100644
index 0000000000..f388e7c593
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-linear-1.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # basic - 4 tiles spaced out with no clipping
+ - type: gradient
+ bounds: 50 50 500 500
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-linear-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-linear-2-ref.yaml
new file mode 100644
index 0000000000..be7dc77463
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-linear-2-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: gradient
+ bounds: 350 50 100 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: gradient
+ bounds: 50 350 200 100
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: gradient
+ bounds: 350 350 100 100
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-linear-2.yaml b/gfx/wr/wrench/reftests/gradient/tiling-linear-2.yaml
new file mode 100644
index 0000000000..7a01c062d1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-linear-2.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # slightly clip the last tile
+ - type: gradient
+ bounds: 50 50 400 400
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-linear-3-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-linear-3-ref.yaml
new file mode 100644
index 0000000000..90b110c8d0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-linear-3-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ # top left and bottom left
+ - type: gradient
+ bounds: 50 50 200 300
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # top right and bottom right
+ - type: gradient
+ bounds: 250 50 200 300
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-linear-3.yaml b/gfx/wr/wrench/reftests/gradient/tiling-linear-3.yaml
new file mode 100644
index 0000000000..a595f3572f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-linear-3.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # no spacing with a clip
+ - type: gradient
+ bounds: 50 50 400 300
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 0 0
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-1-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-1-ref.yaml
new file mode 100644
index 0000000000..66f8c03592
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-1-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 350 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 350 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 350 350 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-1.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-1.yaml
new file mode 100644
index 0000000000..b832a72f96
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-1.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # basic - 4 tiles spaced out with no clipping
+ - type: radial-gradient
+ bounds: 50 50 500 500
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-2-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-2-ref.yaml
new file mode 100644
index 0000000000..da9bcd1bff
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-2-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 350 50 100 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 350 200 100
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 350 350 100 100
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-2.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-2.yaml
new file mode 100644
index 0000000000..8b7feb205e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-2.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # slightly clip the last tile
+ - type: radial-gradient
+ bounds: 50 50 400 400
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-3-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-3-ref.yaml
new file mode 100644
index 0000000000..d8564eed64
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-3-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 250 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 250 200 100
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 250 250 200 100
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-3.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-3.yaml
new file mode 100644
index 0000000000..4ca0886a0d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-3.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # no spacing with a clip
+ - type: radial-gradient
+ bounds: 50 50 400 300
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 0 0
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-4-ref.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-4-ref.yaml
new file mode 100644
index 0000000000..2ba2a96322
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-4-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 350 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 350 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 350 350 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/gradient/tiling-radial-4.yaml b/gfx/wr/wrench/reftests/gradient/tiling-radial-4.yaml
new file mode 100644
index 0000000000..724019441f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/gradient/tiling-radial-4.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # make sure the ellipse transformation retains square tiles
+ - type: radial-gradient
+ bounds: 50 50 500 500
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/gfx/wr/wrench/reftests/image/colorrect.png b/gfx/wr/wrench/reftests/image/colorrect.png
new file mode 100644
index 0000000000..75283ee1f1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/colorrect.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/downscale.png b/gfx/wr/wrench/reftests/image/downscale.png
new file mode 100644
index 0000000000..460a29df19
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/downscale.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/downscale.yaml b/gfx/wr/wrench/reftests/image/downscale.yaml
new file mode 100644
index 0000000000..a848af7ad4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/downscale.yaml
@@ -0,0 +1,18 @@
+# Tests the image quality of using a very large A8 image
+# as a clip mask. It's currently not very good!
+# https://github.com/servo/webrender/issues/2023
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "firefox.png"
+ rect: [0, 0, 350, 90]
+ repeat: false
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 0, 350, 90]
+ color: blue
+
diff --git a/gfx/wr/wrench/reftests/image/firefox.png b/gfx/wr/wrench/reftests/image/firefox.png
new file mode 100644
index 0000000000..f00696789a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/firefox.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/green-alpha-ref.yaml b/gfx/wr/wrench/reftests/image/green-alpha-ref.yaml
new file mode 100644
index 0000000000..62811ac9e2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/green-alpha-ref.yaml
@@ -0,0 +1,4 @@
+root:
+ items:
+ - image: solid-color(0, 255, 0, 127, 400, 400)
+ bounds: 0 0 400 400
diff --git a/gfx/wr/wrench/reftests/image/image-alpha-stretch-tile.yaml b/gfx/wr/wrench/reftests/image/image-alpha-stretch-tile.yaml
new file mode 100644
index 0000000000..8579d03720
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/image-alpha-stretch-tile.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - image: solid-color(0, 255, 0, 255, 40, 4097)
+ bounds: 0 0 400 400
+ alpha: premultiplied-alpha
+ color: 255 255 255 0.5
+ stretch-size: 200 200
+ tile-spacing: 0 0
diff --git a/gfx/wr/wrench/reftests/image/image-alpha-stretch.yaml b/gfx/wr/wrench/reftests/image/image-alpha-stretch.yaml
new file mode 100644
index 0000000000..776d750745
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/image-alpha-stretch.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - image: solid-color(0, 255, 0, 255, 40, 4097)
+ bounds: 0 0 400 400
+ alpha: premultiplied-alpha
+ color: 255 255 255 0.5
diff --git a/gfx/wr/wrench/reftests/image/image-filter-stretch-tile.yaml b/gfx/wr/wrench/reftests/image/image-filter-stretch-tile.yaml
new file mode 100644
index 0000000000..facb98d7da
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/image-filter-stretch-tile.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 400, 400]
+ filters: [opacity(0.5)]
+ items:
+ - image: solid-color(0, 255, 0, 255, 40, 4097)
+ bounds: 0 0 400 400
+ stretch-size: 200 200
+ tile-spacing: 0 0
diff --git a/gfx/wr/wrench/reftests/image/image-filter-stretch.yaml b/gfx/wr/wrench/reftests/image/image-filter-stretch.yaml
new file mode 100644
index 0000000000..c988f174ea
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/image-filter-stretch.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 400, 400]
+ filters: [opacity(0.5)]
+ items:
+ - image: solid-color(0, 255, 0, 255, 40, 4097)
+ bounds: 0 0 400 400
diff --git a/gfx/wr/wrench/reftests/image/occlusion.png b/gfx/wr/wrench/reftests/image/occlusion.png
new file mode 100644
index 0000000000..56332f2ef5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/occlusion.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/occlusion.yaml b/gfx/wr/wrench/reftests/image/occlusion.yaml
new file mode 100644
index 0000000000..4e89a7765b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/occlusion.yaml
@@ -0,0 +1,15 @@
+# Ensure that the clip rect of a primitive that is promoted to a compositor
+# surface is correctly applied when registering it as an occlusion plane.
+
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: [50, 50, 200, 200]
+
+ - type: yuv-image
+ format: interleaved
+ src: spacex-yuv.png
+ bounds: [50, 50, 200, 200]
+ prefer-compositor-surface: true
+ clip-rect: [75, 75, 150, 150]
diff --git a/gfx/wr/wrench/reftests/image/reftest.list b/gfx/wr/wrench/reftests/image/reftest.list
new file mode 100644
index 0000000000..a02e322105
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/reftest.list
@@ -0,0 +1,19 @@
+== tile-size.yaml tile-size-ref.yaml
+== very-big.yaml very-big-ref.yaml
+== very-big-tile-size.yaml very-big-tile-size-ref.yaml
+== tile-with-spacing.yaml tile-with-spacing-ref.yaml
+skip_on(android,device) fuzzy(1,331264) == tile-repeat-prim-or-decompose.yaml tile-repeat-prim-or-decompose-ref.yaml
+platform(linux,mac) options(allow-mipmaps) == downscale.yaml downscale.png
+skip_on(android,device) fuzzy-if(platform(swgl),1,20) == segments.yaml segments.png
+platform(linux,mac) fuzzy(1,6105) == yuv.yaml yuv.png
+platform(linux,mac) fuzzy(1,6105) fuzzy-if(platform(swgl),1,205000) == yuv-clip.yaml yuv.png
+skip_on(android,device) == tiled-clip-chain.yaml tiled-clip-chain-ref.yaml
+skip_on(android,device) == tiled-complex-clip.yaml tiled-complex-clip-ref.yaml
+platform(linux,mac) == texture-rect.yaml texture-rect-ref.yaml
+platform(linux) fuzzy(1,161) == occlusion.yaml occlusion.png
+# allow slight lerp change where the squares meet, but catch lerping problems on the boundary (should clamp)
+fuzzy-range(<=2,*450) == rgb_composite.yaml rgb_composite_ref.yaml
+fuzzy(1,160000) == image-alpha-stretch.yaml green-alpha-ref.yaml
+fuzzy(1,160000) == image-alpha-stretch-tile.yaml green-alpha-ref.yaml
+fuzzy(1,160000) == image-filter-stretch.yaml green-alpha-ref.yaml
+fuzzy(1,160000) == image-filter-stretch-tile.yaml green-alpha-ref.yaml
diff --git a/gfx/wr/wrench/reftests/image/rgb_composite.yaml b/gfx/wr/wrench/reftests/image/rgb_composite.yaml
new file mode 100644
index 0000000000..74db512eed
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/rgb_composite.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(1.5)
+ items:
+ - image: colorrect.png
+ bounds: [0, 0, 100, 100]
+ prefer-compositor-surface: true
diff --git a/gfx/wr/wrench/reftests/image/rgb_composite_ref.yaml b/gfx/wr/wrench/reftests/image/rgb_composite_ref.yaml
new file mode 100644
index 0000000000..0bc4a6e436
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/rgb_composite_ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(1.5)
+ items:
+ - image: colorrect.png
+ bounds: [0, 0, 100, 100]
diff --git a/gfx/wr/wrench/reftests/image/segments.png b/gfx/wr/wrench/reftests/image/segments.png
new file mode 100644
index 0000000000..45e4b544d4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/segments.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/segments.yaml b/gfx/wr/wrench/reftests/image/segments.yaml
new file mode 100644
index 0000000000..840fc60398
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/segments.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [10, 10, 260, 260]
+ radius: 32
+ - image: checkerboard(2, 16, 16)
+ clip-chain: [2]
+ bounds: [10, 10, 260, 260]
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 290, 260, 260]
diff --git a/gfx/wr/wrench/reftests/image/spacex-u.png b/gfx/wr/wrench/reftests/image/spacex-u.png
new file mode 100644
index 0000000000..1de9b6ff66
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/spacex-u.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/spacex-uv.png b/gfx/wr/wrench/reftests/image/spacex-uv.png
new file mode 100644
index 0000000000..4b0259900e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/spacex-uv.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/spacex-v.png b/gfx/wr/wrench/reftests/image/spacex-v.png
new file mode 100644
index 0000000000..1d1a1c0118
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/spacex-v.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/spacex-y.png b/gfx/wr/wrench/reftests/image/spacex-y.png
new file mode 100644
index 0000000000..2256fabecd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/spacex-y.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/spacex-yuv.png b/gfx/wr/wrench/reftests/image/spacex-yuv.png
new file mode 100644
index 0000000000..6073e71735
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/spacex-yuv.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/texture-rect-ref.yaml b/gfx/wr/wrench/reftests/image/texture-rect-ref.yaml
new file mode 100644
index 0000000000..42d8907434
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/texture-rect-ref.yaml
@@ -0,0 +1,15 @@
+# Reference for test to ensure external images using the textureRect sampler mode work correctly.
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: red
+ - type: rect
+ bounds: [50, 0, 50, 50]
+ color: blue
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: green
+ - type: rect
+ bounds: [50, 50, 50, 50]
+ color: white \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/image/texture-rect.yaml b/gfx/wr/wrench/reftests/image/texture-rect.yaml
new file mode 100644
index 0000000000..78e7ce6e86
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/texture-rect.yaml
@@ -0,0 +1,7 @@
+# Test to ensure external images using the textureRect sampler mode work correctly.
+root:
+ items:
+ - image: colorrect.png
+ bounds: [0, 0, 100, 100]
+ external: true
+ external-target: rect \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml b/gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml
new file mode 100644
index 0000000000..8b7e801d56
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - image: xy-gradient(500, 50)
+ bounds: 0 0 800 800
+ stretch-size: 50 50
+ - image: xy-gradient(50, 500)
+ bounds: 800 0 800 800
+ stretch-size: 50 50
diff --git a/gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml b/gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml
new file mode 100644
index 0000000000..43b12bbd94
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml
@@ -0,0 +1,17 @@
+# This test aims at exercising the different ways we handle repetition of tiled images.
+root:
+ items:
+ # This should cause the primitive repetition to be decomposed on the cpu along the x axis
+ # but perform the repetition along the y axis on the image shader because the image width
+ # fits within the tile size.
+ - image: xy-gradient(500, 50)
+ bounds: 0 0 800 800
+ stretch-size: 50 50
+ tile-size: 50
+ # This should cause the primitive repetition to be decomposed on the cpu along the y axis
+ # but perform the repetition along the x axis in the image shader because the image height
+ # fits within the tile size.
+ - image: xy-gradient(50, 500)
+ bounds: 800 0 800 800
+ stretch-size: 50 50
+ tile-size: 50
diff --git a/gfx/wr/wrench/reftests/image/tile-size-ref.yaml b/gfx/wr/wrench/reftests/image/tile-size-ref.yaml
new file mode 100644
index 0000000000..c90ea8a341
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tile-size-ref.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - image: xy-gradient(512, 512)
+ bounds: 0 0 512 512
+ stretch-size: 512 512
+ - image: xy-gradient(512, 512)
+ bounds: 512 0 512 512
+ stretch-size: 512 512
+ - image: xy-gradient(512, 512)
+ bounds: 0 512 512 512
+ stretch-size: 512 512
+ - image: xy-gradient(512, 512)
+ bounds: 512 512 512 512
+ stretch-size: 512 512
diff --git a/gfx/wr/wrench/reftests/image/tile-size.yaml b/gfx/wr/wrench/reftests/image/tile-size.yaml
new file mode 100644
index 0000000000..e17a7b53a4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tile-size.yaml
@@ -0,0 +1,19 @@
+root:
+ items:
+ - image: xy-gradient(512, 512)
+ bounds: 0 0 512 512
+ stretch-size: 512 512
+ tile-size: 64
+ - image: xy-gradient(512, 512)
+ bounds: 512 0 512 512
+ stretch-size: 512 512
+ tile-size: 128
+ - image: xy-gradient(512, 512)
+ bounds: 0 512 512 512
+ stretch-size: 512 512
+ tile-size: 256
+ # tile size bigger than the image itself
+ - image: xy-gradient(512, 512)
+ bounds: 512 512 512 512
+ stretch-size: 512 512
+ tile-size: 4096
diff --git a/gfx/wr/wrench/reftests/image/tile-with-spacing-ref.yaml b/gfx/wr/wrench/reftests/image/tile-with-spacing-ref.yaml
new file mode 100644
index 0000000000..63e1315f0b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tile-with-spacing-ref.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - image: solid-color(255, 0, 0, 255, 300, 300)
+ bounds: 0 0 800 800
+ stretch-size: 200 200
+ tile-spacing: 10 10
diff --git a/gfx/wr/wrench/reftests/image/tile-with-spacing.yaml b/gfx/wr/wrench/reftests/image/tile-with-spacing.yaml
new file mode 100644
index 0000000000..40bc5802d4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tile-with-spacing.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ # TODO: This test would be more useful if we used an image with variations instead
+ # of a solid color. To do this we first need to change the way pixel snapping is
+ # applied so that when an image is split into several primitives, so that the latter
+ # all get snapped the same way rather than independently.
+ #- image: xy-gradient(300, 300)
+ - image: solid-color(255, 0, 0, 255, 300, 300)
+ bounds: 0 0 800 800
+ stretch-size: 200 200
+ tile-spacing: 10 10
+ tile-size: 64
diff --git a/gfx/wr/wrench/reftests/image/tiled-clip-chain-ref.yaml b/gfx/wr/wrench/reftests/image/tiled-clip-chain-ref.yaml
new file mode 100644
index 0000000000..83b4494269
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tiled-clip-chain-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
+ - type: rect
+ bounds: [10, 110, 200, 200]
+ color: white
+ - type: rect
+ bounds: [110, 10, 200, 270]
+ color: white \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/image/tiled-clip-chain.yaml b/gfx/wr/wrench/reftests/image/tiled-clip-chain.yaml
new file mode 100644
index 0000000000..9647e319dc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tiled-clip-chain.yaml
@@ -0,0 +1,11 @@
+# Test that local clip rects from clip-chains are correctly
+# propagated into the local clip rect for tiled images.
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [10, 10, 100, 100]
+ - image: checkerboard(2, 16, 16)
+ clip-chain: [2]
+ bounds: [10, 10, 260, 260]
+ tile-size: 64 \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/image/tiled-complex-clip-ref.yaml b/gfx/wr/wrench/reftests/image/tiled-complex-clip-ref.yaml
new file mode 100644
index 0000000000..871807336a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tiled-complex-clip-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [10, 10, 100, 100]
+ radius: 32
+ - image: checkerboard(2, 16, 16)
+ clip-chain: [2]
+ bounds: [10, 10, 260, 260]
diff --git a/gfx/wr/wrench/reftests/image/tiled-complex-clip.yaml b/gfx/wr/wrench/reftests/image/tiled-complex-clip.yaml
new file mode 100644
index 0000000000..00cc8124f5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/tiled-complex-clip.yaml
@@ -0,0 +1,13 @@
+# Test that complex clips from clip-chains are correctly
+# taken into account for tiled images.
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [10, 10, 100, 100]
+ radius: 32
+ - image: checkerboard(2, 16, 16)
+ clip-chain: [2]
+ bounds: [10, 10, 260, 260]
+ tile-size: 64
diff --git a/gfx/wr/wrench/reftests/image/very-big-ref.yaml b/gfx/wr/wrench/reftests/image/very-big-ref.yaml
new file mode 100644
index 0000000000..6d7ea1b4b1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/very-big-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: 0 0 500 500
+ color: red
diff --git a/gfx/wr/wrench/reftests/image/very-big-tile-size-ref.yaml b/gfx/wr/wrench/reftests/image/very-big-tile-size-ref.yaml
new file mode 100644
index 0000000000..6d7ea1b4b1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/very-big-tile-size-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: 0 0 500 500
+ color: red
diff --git a/gfx/wr/wrench/reftests/image/very-big-tile-size.yaml b/gfx/wr/wrench/reftests/image/very-big-tile-size.yaml
new file mode 100644
index 0000000000..d3bb3b8ec7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/very-big-tile-size.yaml
@@ -0,0 +1,9 @@
+root:
+ items:
+ - type: rect
+ bounds: 0 0 500 500
+ color: green
+ - image: solid-color(255, 0, 0, 255, 100000, 1000)
+ bounds: 0 0 500 500
+ stretch-size: 1000000 1000
+ tile-size: 60000
diff --git a/gfx/wr/wrench/reftests/image/very-big.yaml b/gfx/wr/wrench/reftests/image/very-big.yaml
new file mode 100644
index 0000000000..dc0981d3a4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/very-big.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - image: solid-color(255, 0, 0, 255, 100000, 1000)
+ bounds: 0 0 500 500
+ stretch-size: 1000000 1000
diff --git a/gfx/wr/wrench/reftests/image/yuv-clip.yaml b/gfx/wr/wrench/reftests/image/yuv-clip.yaml
new file mode 100644
index 0000000000..03fe55c3cd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/yuv-clip.yaml
@@ -0,0 +1,26 @@
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 1314, 650]
+ - type: yuv-image
+ clip-chain: [2]
+ format: planar
+ src-y: spacex-y.png
+ src-u: spacex-u.png
+ src-v: spacex-v.png
+ bounds: [10, 10, 427, 640]
+
+ - type: yuv-image
+ clip-chain: [2]
+ format: interleaved
+ src: spacex-yuv.png
+ bounds: [447, 10, 427, 640]
+
+ - type: yuv-image
+ clip-chain: [2]
+ format: nv12
+ src-y: spacex-y.png
+ src-uv: spacex-uv.png
+ bounds: [887, 10, 427, 640]
diff --git a/gfx/wr/wrench/reftests/image/yuv.png b/gfx/wr/wrench/reftests/image/yuv.png
new file mode 100644
index 0000000000..66519bea8f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/yuv.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/image/yuv.yaml b/gfx/wr/wrench/reftests/image/yuv.yaml
new file mode 100644
index 0000000000..8120d93f8c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/image/yuv.yaml
@@ -0,0 +1,19 @@
+root:
+ items:
+ - type: yuv-image
+ format: planar
+ src-y: spacex-y.png
+ src-u: spacex-u.png
+ src-v: spacex-v.png
+ bounds: [10, 10, 427, 640]
+
+ - type: yuv-image
+ format: interleaved
+ src: spacex-yuv.png
+ bounds: [447, 10, 427, 640]
+
+ - type: yuv-image
+ format: nv12
+ src-y: spacex-y.png
+ src-uv: spacex-uv.png
+ bounds: [887, 10, 427, 640]
diff --git a/gfx/wr/wrench/reftests/mask/aligned-layer-rect-ref.yaml b/gfx/wr/wrench/reftests/mask/aligned-layer-rect-ref.yaml
new file mode 100644
index 0000000000..d4ef946d7c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/aligned-layer-rect-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: [9, 9, 10, 10]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/aligned-layer-rect.yaml b/gfx/wr/wrench/reftests/mask/aligned-layer-rect.yaml
new file mode 100644
index 0000000000..7c2628b008
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/aligned-layer-rect.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: scroll-frame
+ id: 2
+ bounds: [9, 9, 10, 10]
+ content-size: [95, 88]
+ clip-to-frame: true
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
+ clip-chain: [2]
+ \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/mask/checkerboard-tiling.yaml b/gfx/wr/wrench/reftests/mask/checkerboard-tiling.yaml
new file mode 100644
index 0000000000..db9f115d92
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/checkerboard-tiling.yaml
@@ -0,0 +1,18 @@
+# Tests a tiled image mask with leftover tile offsets.
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: transparent-checkerboard(2, 16, 16)
+ rect: [0, 0, 200, 200]
+ repeat: false
+ # This is the point of the test, can't be a divisor of 200.
+ tile-size: 37
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/checkerboard.png b/gfx/wr/wrench/reftests/mask/checkerboard.png
new file mode 100644
index 0000000000..f2c45c3194
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/checkerboard.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/mask/checkerboard.yaml b/gfx/wr/wrench/reftests/mask/checkerboard.yaml
new file mode 100644
index 0000000000..755b4f8556
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/checkerboard.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: transparent-checkerboard(2, 16, 16)
+ rect: [0, 0, 200, 200]
+ repeat: false
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/circle.png b/gfx/wr/wrench/reftests/mask/circle.png
new file mode 100644
index 0000000000..ea5789e44f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/circle.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/mask/green.yaml b/gfx/wr/wrench/reftests/mask/green.yaml
new file mode 100644
index 0000000000..0d3df60582
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/green.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: green
diff --git a/gfx/wr/wrench/reftests/mask/mask-atomicity-ref.yaml b/gfx/wr/wrench/reftests/mask/mask-atomicity-ref.yaml
new file mode 100644
index 0000000000..81480856c0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-atomicity-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [25, 25, 100, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ filters:
+ - "opacity(0.5)"
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/mask/mask-atomicity-tiling.yaml b/gfx/wr/wrench/reftests/mask/mask-atomicity-tiling.yaml
new file mode 100644
index 0000000000..17d779d779
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-atomicity-tiling.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [25, 25, 100, 100]
+ color: red
+ - type: clip
+ id: 2
+ image-mask:
+ # premultiplied 0.5 alpha white(??)
+ image: solid-color(127,127,127,127,200,200)
+ rect: [0, 0, 200, 200]
+ tile-size: 10
+ repeat: false
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ clip-chain: 3
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/mask/mask-atomicity.yaml b/gfx/wr/wrench/reftests/mask/mask-atomicity.yaml
new file mode 100644
index 0000000000..26a3e9cede
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-atomicity.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [25, 25, 100, 100]
+ color: red
+ - type: clip
+ id: 2
+ image-mask:
+ # premultiplied 0.5 alpha white(??)
+ image: solid-color(127,127,127,127,200,200)
+ rect: [0, 0, 200, 200]
+ repeat: false
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ clip-chain: 3
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.png b/gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.png
new file mode 100644
index 0000000000..6dbfa4bae9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.yaml b/gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.yaml
new file mode 100644
index 0000000000..cb45f0bae2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-multiple-coord-systems.yaml
@@ -0,0 +1,26 @@
+# Verify that a stacking context with a complex transform, which has an image-mask in the
+# picture local space, and a rectangular clip in the parent space, draws correctly without
+# edge artifacts.
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [50, 100, 250, 150]
+ - type: stacking-context
+ bounds: [200, 0, 100, 100]
+ transform-origin: [250, 250]
+ transform: rotate(45)
+ items:
+ - type: clip
+ id: 3
+ image-mask:
+ image: "circle.png"
+ rect: [0, 0, 100, 100]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ clip-chain: [2, 3]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/mask-perspective-tiling.yaml b/gfx/wr/wrench/reftests/mask/mask-perspective-tiling.yaml
new file mode 100644
index 0000000000..fd297c5dfa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-perspective-tiling.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ perspective: 1
+ perspective-origin: 0 0
+ items:
+ -
+ type: stacking-context
+ transform: 10 0 0 0 0 10 0 0 0 0 10 0 0 0 -9 1
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ tile-size: 5
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/mask-perspective.png b/gfx/wr/wrench/reftests/mask/mask-perspective.png
new file mode 100644
index 0000000000..425872c290
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-perspective.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/mask/mask-perspective.yaml b/gfx/wr/wrench/reftests/mask/mask-perspective.yaml
new file mode 100644
index 0000000000..24f7ba417e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-perspective.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ perspective: 1
+ perspective-origin: 0 0
+ items:
+ -
+ type: stacking-context
+ transform: 10 0 0 0 0 10 0 0 0 0 10 0 0 0 -9 1
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/mask-ref.yaml b/gfx/wr/wrench/reftests/mask/mask-ref.yaml
new file mode 100644
index 0000000000..01c4e60946
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 95, 88]
+ items:
+ - type: rect
+ bounds: [9, 9, 10, 10]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/mask-tiling.yaml b/gfx/wr/wrench/reftests/mask/mask-tiling.yaml
new file mode 100644
index 0000000000..711095b924
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-tiling.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ tile-size: 5
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml b/gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml
new file mode 100644
index 0000000000..1df66453d6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
diff --git a/gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml b/gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml
new file mode 100644
index 0000000000..739e54fa5b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ "scroll-policy": scrollable
+ z-index: 4
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 150, -150, 1]
+ items:
+ - type: clip
+ # 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.
+ image-mask:
+ image: "tiny-check-mask.png"
+ rect: [0, 0, 300, 300]
+ repeat: false
+ id: 2
+ - type: rect
+ clip-chain: [2]
+ bounds: [0, 0, 300, 300]
+ color: 0 128 0 1.0000
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
diff --git a/gfx/wr/wrench/reftests/mask/mask.png b/gfx/wr/wrench/reftests/mask/mask.png
new file mode 100644
index 0000000000..ab1bdb9b50
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/mask/mask.yaml b/gfx/wr/wrench/reftests/mask/mask.yaml
new file mode 100644
index 0000000000..65b3127621
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/mask.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/missing-mask-ref.yaml b/gfx/wr/wrench/reftests/mask/missing-mask-ref.yaml
new file mode 100644
index 0000000000..112da9c9d1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/missing-mask-ref.yaml
@@ -0,0 +1,7 @@
+# Don't crash when supplied an invalid image key for the mask!
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 35, 35]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/missing-mask.yaml b/gfx/wr/wrench/reftests/mask/missing-mask.yaml
new file mode 100644
index 0000000000..69a1c72774
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/missing-mask.yaml
@@ -0,0 +1,14 @@
+# Don't crash when supplied an invalid image key for the mask!
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: invalid
+ rect: [0, 0, 35, 35]
+ repeat: false
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/mask/nested-mask-ref.yaml b/gfx/wr/wrench/reftests/mask/nested-mask-ref.yaml
new file mode 100644
index 0000000000..c16df79e4c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/nested-mask-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 95, 88]
+ items:
+ - type: rect
+ bounds: [13, 13, 6, 6]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/nested-mask-tiling.yaml b/gfx/wr/wrench/reftests/mask/nested-mask-tiling.yaml
new file mode 100644
index 0000000000..b096021380
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/nested-mask-tiling.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ tile-size: 5
+ - type: clip
+ id: 3
+ image-mask:
+ image: "mask.png"
+ rect: [4, 4, 35, 35]
+ repeat: false
+ tile-size: 5
+ - type: stacking-context
+ clip-chain: [2, 3]
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/nested-mask.yaml b/gfx/wr/wrench/reftests/mask/nested-mask.yaml
new file mode 100644
index 0000000000..3a836f7bf1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/nested-mask.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ - type: clip
+ id: 3
+ image-mask:
+ image: "mask.png"
+ rect: [4, 4, 35, 35]
+ repeat: false
+ - type: stacking-context
+ clip-chain: [2, 3]
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/out-of-bounds.yaml b/gfx/wr/wrench/reftests/mask/out-of-bounds.yaml
new file mode 100644
index 0000000000..df478957df
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/out-of-bounds.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 10000, 10000]
+ radius:
+ top-left: [30, 30]
+ top-right: [30, 30]
+ bottom-right: [30, 30]
+ bottom-left: [30, 30]
+ - type: rect
+ bounds: [0, 0, 10000, 10000]
+ color: green
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/mask/reftest.list b/gfx/wr/wrench/reftests/mask/reftest.list
new file mode 100644
index 0000000000..c1b53b83d2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/reftest.list
@@ -0,0 +1,18 @@
+fuzzy(1,10) == mask.yaml mask-ref.yaml
+fuzzy(1,10) == mask-tiling.yaml mask-ref.yaml
+fuzzy(1,10) == nested-mask.yaml nested-mask-ref.yaml
+== nested-mask-tiling.yaml nested-mask-ref.yaml
+!= mask.yaml green.yaml
+== aligned-layer-rect.yaml aligned-layer-rect-ref.yaml
+== mask-transformed-to-empty-rect.yaml mask-transformed-to-empty-rect-ref.yaml
+platform(linux,mac) == rounded-corners.yaml rounded-corners.png
+!= mask.yaml out-of-bounds.yaml
+platform(linux,mac) fuzzy(1,17500) color_targets(3) alpha_targets(0) == mask-atomicity.yaml mask-atomicity-ref.yaml
+platform(linux,mac) fuzzy(1,17500) == mask-atomicity-tiling.yaml mask-atomicity-ref.yaml
+platform(linux,mac) == mask-perspective.yaml mask-perspective.png
+== fuzzy(1,11) mask-perspective-tiling.yaml mask-perspective.yaml
+platform(linux,mac) == checkerboard.yaml checkerboard.png
+skip_on(android,device) fuzzy(2,1900) == checkerboard.yaml checkerboard-tiling.yaml # Fails on a Pixel2
+== missing-mask.yaml missing-mask-ref.yaml
+platform(linux) == scaled-filter-raster-root.yaml scaled-filter-raster-root.png
+platform(linux,mac) == mask-multiple-coord-systems.yaml mask-multiple-coord-systems.png
diff --git a/gfx/wr/wrench/reftests/mask/rounded-corners.png b/gfx/wr/wrench/reftests/mask/rounded-corners.png
new file mode 100644
index 0000000000..4f8d1d0fa0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/rounded-corners.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/mask/rounded-corners.yaml b/gfx/wr/wrench/reftests/mask/rounded-corners.yaml
new file mode 100644
index 0000000000..1cedea53bc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/rounded-corners.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius:
+ top-left: [30, 30]
+ top-right: [30, 30]
+ bottom-right: [30, 30]
+ bottom-left: [30, 30]
+ - type: border
+ clip-chain: [2]
+ bounds: [0, 0, 100, 100]
+ width: [5, 5, 5, 5]
+ border-type: normal
+ style: [solid, solid, solid, solid]
+ color: [blue, blue, blue, blue]
+ radius:
+ top-left: [30, 30]
+ top-right: [30, 30]
+ bottom-right: [0, 0]
+ bottom-left: [0, 0]
diff --git a/gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.png b/gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.png
new file mode 100644
index 0000000000..e9cf49553e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.yaml b/gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.yaml
new file mode 100644
index 0000000000..77925dacff
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/scaled-filter-raster-root.yaml
@@ -0,0 +1,30 @@
+# Verify that a tiled clip mask is correctly applied to a surface that
+# is both a raster root and has a device-pixel ratio different than the
+# primary surface (due to the scale transform).
+---
+root:
+ items:
+ - type: stacking-context
+ transform-origin: [0, 0]
+ transform: scale(20)
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: "circle.png"
+ rect: [10, 10, 10, 10]
+ repeat: false
+ tile-size: 200
+ -
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ - type: stacking-context
+ filters: [opacity(0.5)]
+ items:
+ - type: stacking-context
+ clip-chain: 3
+ items:
+ - type: rect
+ bounds: [10, 10, 10, 10]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/mask/tiny-check-mask.png b/gfx/wr/wrench/reftests/mask/tiny-check-mask.png
new file mode 100644
index 0000000000..d6f6e3548d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/mask/tiny-check-mask.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml b/gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml
new file mode 100644
index 0000000000..7c538488bc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml
@@ -0,0 +1,9 @@
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [255, 0, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice.yaml b/gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice.yaml
new file mode 100644
index 0000000000..a5821973e9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/performance/compositor-surface-opaque-slice.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [255, 0, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/performance/no-clip-mask.png b/gfx/wr/wrench/reftests/performance/no-clip-mask.png
new file mode 100644
index 0000000000..0b1bfca755
--- /dev/null
+++ b/gfx/wr/wrench/reftests/performance/no-clip-mask.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/performance/no-clip-mask.yaml b/gfx/wr/wrench/reftests/performance/no-clip-mask.yaml
new file mode 100644
index 0000000000..51d981e2a0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/performance/no-clip-mask.yaml
@@ -0,0 +1,24 @@
+# In this case, there is no incompatible transform.
+# Therefore, the clip condition should be handled
+# by the vertex shader via the local_clip_rect, and
+# there should be no clip mask generated.
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 111, 1087, 565]
+ "clip-rect": [0, 111, 1087, 565]
+ type: iframe
+ id: [1, 2]
+pipelines:
+ -
+ id: [1, 2]
+ items:
+ -
+ bounds: [1075, -1, 12, 199]
+ "clip-rect": [1075, -1, 12, 199]
+ image: checkerboard(4, 8, 8)
+ stretch-size: 72 72
diff --git a/gfx/wr/wrench/reftests/performance/reftest.list b/gfx/wr/wrench/reftests/performance/reftest.list
new file mode 100644
index 0000000000..5ca69146dc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/performance/reftest.list
@@ -0,0 +1,2 @@
+skip_on(android) == color_targets(2) alpha_targets(0) no-clip-mask.yaml no-clip-mask.png # Too wide for Android
+platform(linux,mac) == compositor-surface-opaque-slice.yaml compositor-surface-opaque-slice-ref.yaml
diff --git a/gfx/wr/wrench/reftests/reftest.list b/gfx/wr/wrench/reftests/reftest.list
new file mode 100644
index 0000000000..99d20f3beb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/reftest.list
@@ -0,0 +1,19 @@
+include aa/reftest.list
+include backface/reftest.list
+include blend/reftest.list
+include border/reftest.list
+include boxshadow/reftest.list
+include clip/reftest.list
+include compositor-surface/reftest.list
+include crash/reftest.list
+include filters/reftest.list
+include gradient/reftest.list
+include image/reftest.list
+include mask/reftest.list
+include performance/reftest.list
+include scrolling/reftest.list
+include snap/reftest.list
+include split/reftest.list
+include text/reftest.list
+include transforms/reftest.list
+include tiles/reftest.list
diff --git a/gfx/wr/wrench/reftests/scrolling/ancestor-scroll-frames.yaml b/gfx/wr/wrench/reftests/scrolling/ancestor-scroll-frames.yaml
new file mode 100644
index 0000000000..9d5c1d006e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/ancestor-scroll-frames.yaml
@@ -0,0 +1,37 @@
+# Test that we don't select a nested scroll frame as a scroll root and include
+# primitives that are positioned by ancestors of that scroll root, when creating
+# a tile cache for a blend container. This test will cause a panic in
+# `get_relative_transform_with_face` otherwise.
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 200, 200]
+ content-size: [200, 400]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform: rotate(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: red
+ - type: scroll-frame
+ bounds: [200, 0, 400, 200]
+ content-size: [400, 200]
+ items:
+ - type: scroll-frame
+ bounds: [200, 0, 400, 200]
+ content-size: [400, 400]
+ items:
+ - type: rect
+ bounds: [200, 0, 100, 200]
+ color: green
+ backface-visible: true
+ - type: rect
+ bounds: [300, 0, 100, 200]
+ color: blue
+ backface-visible: false
diff --git a/gfx/wr/wrench/reftests/scrolling/blank.yaml b/gfx/wr/wrench/reftests/scrolling/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml b/gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml
new file mode 100644
index 0000000000..a465f412df
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property.yaml b/gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property.yaml
new file mode 100644
index 0000000000..43352236f5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/clip-and-scroll-property.yaml
@@ -0,0 +1,33 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: clip
+ id: 2
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ # Here we are testing that the clip-chain property applies to
+ # both stacking contexts and items.
+ -
+ bounds: [0, 0, 0, 0]
+ content-size: [200, 200]
+ clip-chain: 12
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -100, 0, 0, 1]
+ "transform-style": flat
+ items:
+ -
+ bounds: [100, 0, 200, 200]
+ clip: [-8947849, -8947849, 17895698, 17895698]
+ type: rect
+ color: green
+ id: [0, 0]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/scrolling/empty-mask-ref.yaml b/gfx/wr/wrench/reftests/scrolling/empty-mask-ref.yaml
new file mode 100644
index 0000000000..aca8ccd66c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/empty-mask-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/empty-mask.yaml b/gfx/wr/wrench/reftests/scrolling/empty-mask.yaml
new file mode 100644
index 0000000000..2fe90d6338
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/empty-mask.yaml
@@ -0,0 +1,20 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: clip
+ id: 2
+ bounds: [0, 0, 0, 0]
+ - type: clip
+ id: 3
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: 20
+ - type: rect
+ bounds: [0, 0, 500, 500]
+ color: red
+ clip-chain: [2, 3]
diff --git a/gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml b/gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml
new file mode 100644
index 0000000000..3b8d47e94c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ scroll-offset: [0, -50]
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 0, 100, 100]
diff --git a/gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1.yaml b/gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1.yaml
new file mode 100644
index 0000000000..7803574bed
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/ext-scroll-offset-1.yaml
@@ -0,0 +1,14 @@
+# Test that items with an external scroll offset in both the
+# scroll node and primitive match up with items that have
+# been scrolled without an external scroll offset.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ scroll-offset: [0, 0]
+ external-scroll-offset: [0, 50]
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 50, 100, 100]
diff --git a/gfx/wr/wrench/reftests/scrolling/fixed-position-ref.yaml b/gfx/wr/wrench/reftests/scrolling/fixed-position-ref.yaml
new file mode 100644
index 0000000000..aa26387828
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/fixed-position-ref.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
+ - type: rect
+ bounds: [60, 0, 50, 50]
+ color: green
+ - type: rect
+ bounds: [120, 0, 50, 50]
+ color: green
+ - type: rect
+ bounds: [180, 0, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml b/gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml
new file mode 100644
index 0000000000..eb50353314
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml b/gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml
new file mode 100644
index 0000000000..bdf537409e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml
@@ -0,0 +1,33 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [10, 10, 100, 300]
+ content-size: [100, 700]
+ id: 41
+ scroll-offset: [0, 50]
+ items:
+ # The rectangles below should stay in place even when the parent scroll area scrolls,
+ # because they use the root reference frame as their scroll node (fixed position).
+ # On the other hand, the clip item here will scroll with its parent scroll area. Normally
+ # fixed position items would only be clipped by their reference frame (in this case the
+ # root), but since these items specify an auxiliary clip, they will be clipped by their
+ # sibling clip (42).
+ - type: clip
+ bounds: [10, 60, 50, 50]
+ id: 42
+ - type: clip-chain
+ id: 142
+ clips: [42]
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 50]
+ color: green
+ clip-chain: 142
+ spatial-id: root-reference-frame
+ - type: rect
+ bounds: [0, 50, 100, 50]
+ color: red
+ clip-chain: 142
+ spatial-id: root-reference-frame
diff --git a/gfx/wr/wrench/reftests/scrolling/fixed-position.yaml b/gfx/wr/wrench/reftests/scrolling/fixed-position.yaml
new file mode 100644
index 0000000000..c56f1378cd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/fixed-position.yaml
@@ -0,0 +1,52 @@
+root:
+ bounds: [0, 0, 1024, 10000]
+ scroll-offset: [0, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ # This item should not scroll out of view because it is fixed position.
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
+ spatial-id: root-reference-frame
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ transform: translate(60, 100)
+ id: 100
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ # Even though there is a custom clip-scroll ID, it should scroll,
+ # because it is fixed relative to its reference frame. The reference frame
+ # of this stacking context is the stacking context parent because it has
+ # a transformation.
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
+ - type: stacking-context
+ bounds: [120, 0, 50, 200]
+ transform: translate(0, 0)
+ id: 101
+ items:
+ # This is similar to the previous case, but ensures that this still works
+ # even with an identity transform.
+ - type: stacking-context
+ bounds: [0, 0, 50, 200]
+ items:
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: green
+ - type: stacking-context
+ bounds: [180, 0, 50, 200]
+ perspective: 1
+ id: 102
+ items:
+ # This is similar to the previous case, but for perspective.
+ - type: stacking-context
+ bounds: [0, 0, 50, 200]
+ items:
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/mask.png b/gfx/wr/wrench/reftests/scrolling/mask.png
new file mode 100644
index 0000000000..d3cbfe6a63
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/mask.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml b/gfx/wr/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml
new file mode 100644
index 0000000000..c2f0a30710
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/nested-scroll-offset.yaml b/gfx/wr/wrench/reftests/scrolling/nested-scroll-offset.yaml
new file mode 100644
index 0000000000..850468f180
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/nested-scroll-offset.yaml
@@ -0,0 +1,16 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 500, 500]
+ content-size: [1000, 1000]
+ scroll-offset: [0, 300]
+ items:
+ - type: scroll-frame
+ bounds: [0, 300, 50, 50]
+ items:
+ - type: scroll-frame
+ bounds: [0, 300, 50, 50]
+ items:
+ - type: rect
+ bounds: [0, 300, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/nested-stickys-ref.yaml b/gfx/wr/wrench/reftests/scrolling/nested-stickys-ref.yaml
new file mode 100644
index 0000000000..869ad7e9e1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/nested-stickys-ref.yaml
@@ -0,0 +1,11 @@
+root:
+ items:
+ # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+ # viewport by its "bottom" sticky constraint.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: rect
+ bounds: [10, 20, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/nested-stickys.yaml b/gfx/wr/wrench/reftests/scrolling/nested-stickys.yaml
new file mode 100644
index 0000000000..2082bb2576
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/nested-stickys.yaml
@@ -0,0 +1,20 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 30]
+ items:
+ - type: sticky-frame
+ bounds: [10, 30, 50, 50]
+ margin-top: 5
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: sticky-frame
+ bounds: [10, 30, 50, 50]
+ margin-top: 10
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [10, 30, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml b/gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml
new file mode 100644
index 0000000000..eb50353314
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll.yaml b/gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll.yaml
new file mode 100644
index 0000000000..8c87bd6f5c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/out-of-bounds-scroll.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [10, 10, 50, 100]
+ content-size: [50, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/reftest.list b/gfx/wr/wrench/reftests/scrolling/reftest.list
new file mode 100644
index 0000000000..4a8b074e58
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/reftest.list
@@ -0,0 +1,25 @@
+== empty-mask.yaml empty-mask-ref.yaml
+== fixed-position-scrolling-clip.yaml fixed-position-scrolling-clip-ref.yaml
+== fixed-position.yaml fixed-position-ref.yaml
+== nested-scroll-offset.yaml nested-scroll-offset-ref.yaml
+== out-of-bounds-scroll.yaml out-of-bounds-scroll-ref.yaml
+== root-scroll.yaml root-scroll-ref.yaml
+== scroll-layer.yaml scroll-layer-ref.yaml
+== simple.yaml simple-ref.yaml
+== clip-and-scroll-property.yaml clip-and-scroll-property-ref.yaml
+== translate-nested.yaml translate-nested-ref.yaml
+== sticky.yaml sticky-ref.yaml
+== sticky-nested.yaml sticky-ref.yaml
+== sticky-applied.yaml sticky-applied-ref.yaml
+== sticky-transformed.yaml sticky-transformed-ref.yaml
+== sibling-hidden-clip.yaml sibling-hidden-clip-ref.yaml
+== scale-offsets.yaml scale-offsets-ref.yaml
+== nested-stickys.yaml nested-stickys-ref.yaml
+== viewport-offset.yaml viewport-offset-ref.yaml
+== ext-scroll-offset-1.yaml ext-scroll-offset-1-ref.yaml
+== scroll-frame-order.yaml scroll-frame-order-ref.yaml
+!= ancestor-scroll-frames.yaml blank.yaml
+== scroll-generation-1.yaml scroll-generation-ref.yaml
+== scroll-generation-2.yaml scroll-generation-ref.yaml
+== scroll-generation-3.yaml scroll-generation-ref.yaml
+== scroll-generation-4.yaml scroll-generation-ref.yaml
diff --git a/gfx/wr/wrench/reftests/scrolling/root-scroll-ref.yaml b/gfx/wr/wrench/reftests/scrolling/root-scroll-ref.yaml
new file mode 100644
index 0000000000..d49f063d3a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/root-scroll-ref.yaml
@@ -0,0 +1,6 @@
+root:
+ bounds: [0, 0, 1024, 10000]
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/root-scroll.yaml b/gfx/wr/wrench/reftests/scrolling/root-scroll.yaml
new file mode 100644
index 0000000000..d95c7debe1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/root-scroll.yaml
@@ -0,0 +1,7 @@
+root:
+ bounds: [0, 0, 1024, 10000]
+ scroll-offset: [0, 100]
+ items:
+ - type: rect
+ bounds: [10, 110, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/scale-offsets-ref.yaml b/gfx/wr/wrench/reftests/scrolling/scale-offsets-ref.yaml
new file mode 100644
index 0000000000..9276ded8f8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scale-offsets-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ color: green
+ bounds: [50, 50, 50, 50]
diff --git a/gfx/wr/wrench/reftests/scrolling/scale-offsets.yaml b/gfx/wr/wrench/reftests/scrolling/scale-offsets.yaml
new file mode 100644
index 0000000000..b4a93b8c62
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scale-offsets.yaml
@@ -0,0 +1,18 @@
+# Test that a scroll-frame nested within a scale
+# transform correctly calculates local offsets.
+root:
+ items:
+ - type: stacking-context
+ transform: scale(0.5)
+ items:
+ - type: scroll-frame
+ id: 2
+ bounds: [100, 100, 100, 100]
+ content-size: [260, 260]
+ scroll-offset: [0, 60]
+ clip-to-frame: true
+ items:
+ - type: rect
+ color: green
+ bounds: [100, 100, 260, 260]
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-frame-order-ref.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-frame-order-ref.yaml
new file mode 100644
index 0000000000..b29d3ba2b8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-frame-order-ref.yaml
@@ -0,0 +1,34 @@
+# Tests that scroll frames can be defined and used in any order.
+
+---
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 50, 50]
+ content-size: [50, 50]
+ clip-rect: [0, 0, 50, 50]
+ id: 123
+ - type: scroll-frame
+ bounds: [50, 0, 50, 50]
+ content-size: [50, 50]
+ clip-rect: [50, 0, 50, 50]
+ scroll-offset: [0, -25]
+ id: 456
+ - type: scroll-frame
+ bounds: [100, 0, 50, 50]
+ content-size: [50, 50]
+ clip-rect: [100, 0, 50, 50]
+ scroll-offset: [0, -15]
+ id: 789
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: red
+ spatial-id: 123
+ - type: rect
+ bounds: [50, 0, 50, 50]
+ color: green
+ spatial-id: 456
+ - type: rect
+ bounds: [100, 0, 50, 50]
+ color: blue
+ spatial-id: 789
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-frame-order.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-frame-order.yaml
new file mode 100644
index 0000000000..2977c04d95
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-frame-order.yaml
@@ -0,0 +1,35 @@
+# Tests that scroll frames can be defined and used in any order.
+
+---
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 50, 50]
+ content-size: [50, 50]
+ clip-rect: [0, 0, 50, 50]
+ id: 123
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: red
+ spatial-id: 123
+ - type: scroll-frame
+ bounds: [50, 0, 50, 50]
+ content-size: [50, 50]
+ clip-rect: [50, 0, 50, 50]
+ scroll-offset: [0, -25]
+ id: 456
+ - type: rect
+ bounds: [50, 0, 50, 50]
+ color: green
+ spatial-id: 456
+ - type: scroll-frame
+ bounds: [100, 0, 50, 50]
+ content-size: [50, 50]
+ clip-rect: [100, 0, 50, 50]
+ scroll-offset: [0, -15]
+ id: 789
+ - type: rect
+ bounds: [100, 0, 50, 50]
+ color: blue
+ spatial-id: 789
+
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-generation-1.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-generation-1.yaml
new file mode 100644
index 0000000000..8caf080d09
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-generation-1.yaml
@@ -0,0 +1,18 @@
+# Test that an scroll frame having two different generations' scroll-offsets.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ scroll-offsets:
+ - offset: [0, 0]
+ generation: 1
+ - offset: [0, -10]
+ generation: 2
+ external-scroll-offset: [0, 50]
+ scroll-generation: 2
+ has-scroll-linked-effect: true
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 50, 100, 100]
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-generation-2.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-generation-2.yaml
new file mode 100644
index 0000000000..7b48e4f491
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-generation-2.yaml
@@ -0,0 +1,19 @@
+# Test that an scroll frame having scroll-offsets which don't match the scroll
+# generation on the main-thread.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ scroll-offsets:
+ - offset: [0, -10]
+ generation: 10
+ - offset: [0, -100]
+ generation: 11
+ external-scroll-offset: [0, 50]
+ scroll-generation: 2
+ has-scroll-linked-effect: true
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 50, 100, 100]
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-generation-3.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-generation-3.yaml
new file mode 100644
index 0000000000..a52beb8c9c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-generation-3.yaml
@@ -0,0 +1,20 @@
+# Test that an scroll frame having an invalid scroll generation on the
+# main-thread. The least scroll generation offset should be used, in this case
+# it's 10th generation.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ scroll-offsets:
+ - offset: [0, -10]
+ generation: 10
+ - offset: [0, -100]
+ generation: 11
+ external-scroll-offset: [0, 50]
+ scroll-generation: 0
+ has-scroll-linked-effect: true
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 50, 100, 100]
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-generation-4.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-generation-4.yaml
new file mode 100644
index 0000000000..3c6c1c627b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-generation-4.yaml
@@ -0,0 +1,13 @@
+# Test that an scroll frame having no scroll-offsets, this is kinda crash test.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ external-scroll-offset: [0, 60]
+ scroll-generation: 2
+ has-scroll-linked-effect: true
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 60, 100, 100]
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-generation-ref.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-generation-ref.yaml
new file mode 100644
index 0000000000..3b2302992a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-generation-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ external-scroll-offset: [0, 60]
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 60, 100, 100]
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-layer-ref.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-layer-ref.yaml
new file mode 100644
index 0000000000..c2f0a30710
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-layer-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/scroll-layer.yaml b/gfx/wr/wrench/reftests/scrolling/scroll-layer.yaml
new file mode 100644
index 0000000000..4956672a77
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/scroll-layer.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [1000, 1000]
+ scroll-offset: [50, 50]
+ items:
+ - type: rect
+ bounds: [50, 50, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml b/gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml
new file mode 100644
index 0000000000..f722f6f815
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 40, 70]
+ color: red
+ id: [0, 0]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip.yaml b/gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip.yaml
new file mode 100644
index 0000000000..9039a4af0d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sibling-hidden-clip.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ filters: [opacity(0.0)]
+ items:
+ -
+ bounds: [0, 0, 50, 80]
+ type: clip
+ id: 2
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: red
+ clip-chain: 12
+
+ id: [0, 0]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/scrolling/simple-ref.yaml b/gfx/wr/wrench/reftests/scrolling/simple-ref.yaml
new file mode 100644
index 0000000000..cb9ddda07f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/simple-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/simple.yaml b/gfx/wr/wrench/reftests/scrolling/simple.yaml
new file mode 100644
index 0000000000..64a433d83c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/simple.yaml
@@ -0,0 +1,22 @@
+root:
+ items:
+ - type: scroll-frame
+ id: 2
+ bounds: [10, 10, 50, 50]
+ content-size: [100, 100]
+ clip-to-frame: true
+ items:
+ - type: rect
+ bounds: [10, 10, 500, 500]
+ color: green
+ clip-chain: [2]
+ - type: scroll-frame
+ id: 3
+ bounds: [70, 10, 50, 50]
+ content-size: [100, 100]
+ clip-to-frame: true
+ items:
+ - type: rect
+ bounds: [70, 10, 100, 100]
+ color: green
+ clip-chain: [3]
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky-applied-ref.yaml b/gfx/wr/wrench/reftests/scrolling/sticky-applied-ref.yaml
new file mode 100644
index 0000000000..1dd3973c31
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky-applied-ref.yaml
@@ -0,0 +1,70 @@
+root:
+ items:
+ # Reference images are listed in the same order as the test images -
+ # all the "bottom-sticky" ones are first, grouped together.
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 70, 50, 40]
+ color: green
+ - type: rect
+ bounds: [10, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 255, 50, 45]
+ color: green
+
+ # Top sticky
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 80, 50, 40]
+ color: green
+ - type: rect
+ bounds: [70, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 250, 50, 45]
+ color: green
+
+ # Right sticky
+ - type: rect
+ bounds: [130, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [130, 70, 40, 50]
+ color: green
+ - type: rect
+ bounds: [130, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [130, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [135, 250, 45, 50]
+ color: green
+
+ # Left sticky
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [200, 70, 40, 50]
+ color: green
+ - type: rect
+ bounds: [190, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [190, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [190, 250, 45, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky-applied.yaml b/gfx/wr/wrench/reftests/scrolling/sticky-applied.yaml
new file mode 100644
index 0000000000..21a9dc4743
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky-applied.yaml
@@ -0,0 +1,367 @@
+root:
+ items:
+ # Tests sticky-positioned items with previously-applied-offsets.
+
+ # This item is bottom-sticky; we indicate to WR that it already has had
+ # a sticky offset of y=-50 applied, and then scroll down by 50 pixels. WR
+ # should unapply the entire 50px that was applied, and leave the rect
+ # visually in the same spot.
+ - type: scroll-frame
+ id: 2
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [10, 10, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ clip-chain: [2]
+ # Same as above, but this time we only indicate a previous-applied-offset
+ # of 40 pixels, so that's the maximum WR will unapply
+ - type: scroll-frame
+ id: 3
+ bounds: [10, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [10, 70, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -40]
+ items:
+ - type: rect
+ bounds: [10, 70, 50, 50]
+ color: green
+ clip-chain: [3]
+ # This time we indicate a previously-applied-offset of 50 pixels, but only
+ # scroll by 40 pixels. In this case 40 of the 50 applied-offset pixels will
+ # be unapplied
+ - type: scroll-frame
+ id: 4
+ bounds: [10, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 40]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [10, 130, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 130, 50, 50]
+ color: green
+ clip-chain: [4]
+ # Here we indicate a previously-applied-offset of 50 pixels, but continue
+ # scrolling in WR in the same direction by another 10 pixels. This effectively
+ # increases the applied offset to 60 pixels.
+ - type: scroll-frame
+ id: 5
+ bounds: [10, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -10]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [10, 190, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 190, 50, 50]
+ color: green
+ clip-chain: [5]
+ # Same as previous case, but this time with the vertical-offset-bounds
+ # adjusted to limit the applied offset to only 55 pixels.
+ - type: scroll-frame
+ id: 6
+ bounds: [10, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -10]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [10, 250, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-55, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 250, 50, 50]
+ color: green
+ clip-chain: [6]
+
+ # Repeat all the above cases, for top-sticky
+
+ - type: scroll-frame
+ id: 7
+ bounds: [70, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ clip-chain: [7]
+ - type: scroll-frame
+ id: 8
+ bounds: [70, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 70, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 40]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+ clip-chain: [8]
+ - type: scroll-frame
+ id: 9
+ bounds: [70, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -40]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 130, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 130, 50, 50]
+ color: green
+ clip-chain: [9]
+ - type: scroll-frame
+ id: 10
+ bounds: [70, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 10]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 190, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 190, 50, 50]
+ color: green
+ clip-chain: [10]
+ - type: scroll-frame
+ id: 11
+ bounds: [70, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 10]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 250, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 55]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 250, 50, 50]
+ color: green
+ clip-chain: [11]
+
+ # Repeat all the above cases, for right-sticky
+
+ - type: scroll-frame
+ id: 12
+ bounds: [130, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [130, 10, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 10, 50, 50]
+ color: green
+ clip-chain: [12]
+ - type: scroll-frame
+ id: 13
+ bounds: [130, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [130, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-40, 0]
+ items:
+ - type: rect
+ bounds: [130, 70, 50, 50]
+ color: green
+ clip-chain: [13]
+ - type: scroll-frame
+ id: 14
+ bounds: [130, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [40, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [130, 130, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 130, 50, 50]
+ color: green
+ clip-chain: [14]
+ - type: scroll-frame
+ id: 15
+ bounds: [130, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-10, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [130, 190, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 190, 50, 50]
+ color: green
+ clip-chain: [15]
+ - type: scroll-frame
+ id: 16
+ bounds: [130, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-10, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [130, 250, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-55, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 250, 50, 50]
+ color: green
+ clip-chain: [16]
+
+ # Repeat all the above cases, for left-sticky
+
+ - type: scroll-frame
+ id: 17
+ bounds: [190, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 10, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ clip-chain: [17]
+ - type: scroll-frame
+ id: 18
+ bounds: [190, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [40, 0]
+ items:
+ - type: rect
+ bounds: [190, 70, 50, 50]
+ color: green
+ clip-chain: [18]
+ - type: scroll-frame
+ id: 19
+ bounds: [190, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-40, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 130, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 130, 50, 50]
+ color: green
+ clip-chain: [19]
+ - type: scroll-frame
+ id: 20
+ bounds: [190, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [10, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 190, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 190, 50, 50]
+ color: green
+ clip-chain: [20]
+ - type: scroll-frame
+ id: 21
+ bounds: [190, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [10, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 250, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 55]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 250, 50, 50]
+ color: green
+ clip-chain: [21]
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml b/gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml
new file mode 100644
index 0000000000..aa4b655e58
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml
@@ -0,0 +1,257 @@
+root:
+ items:
+ # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+ # viewport by its "bottom" sticky constraint.
+ - type: scroll-frame
+ id: 2
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [10, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ id: 22
+ bounds: [10, 60, 50, 50]
+ content-size: [100, 100]
+ - 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
+ bounds: [70, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ id: 23
+ bounds: [70, 10, 50, 50]
+ content-size: [100, 100]
+ - 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
+ bounds: [10, 70, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [60, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ id: 24
+ bounds: [60, 70, 50, 50]
+ content-size: [100, 100]
+ - 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
+ bounds: [70, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ id: 25
+ bounds: [70, 70, 50, 50]
+ content-size: [100, 100]
+ - 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
+ id: 6
+ bounds: [130, 10, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [130, 60, 50, 50]
+ margin-bottom: 10
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ id: 26
+ bounds: [130, 60, 50, 50]
+ content-size: [100, 100]
+ - 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
+ id: 7
+ bounds: [190, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 10, 50, 50]
+ margin-top: 10
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ id: 27
+ bounds: [190, 10, 50, 50]
+ content-size: [100, 100]
+ - 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
+ id: 8
+ bounds: [130, 70, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [180, 70, 50, 50]
+ margin-right: 10
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ id: 28
+ bounds: [180, 70, 50, 50]
+ content-size: [100, 100]
+ - 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
+ id: 9
+ bounds: [190, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 70, 50, 50]
+ margin-left: 10
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ id: 29
+ bounds: [190, 70, 50, 50]
+ content-size: [100, 100]
+ - 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
+ id: 10
+ bounds: [250, 10, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [250, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-25, 0]
+ items:
+ - type: clip
+ id: 30
+ bounds: [250, 60, 50, 50]
+ content-size: [100, 100]
+ - 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
+ id: 11
+ bounds: [310, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [310, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 25]
+ items:
+ - type: clip
+ bounds: [310, 10, 50, 50]
+ content-size: [100, 100]
+ id: 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
+ id: 12
+ bounds: [250, 70, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [300, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-25, 0]
+ items:
+ - type: clip
+ id: 32
+ bounds: [300, 70, 50, 50]
+ content-size: [100, 100]
+ - 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
+ id: 13
+ bounds: [310, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [310, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 25]
+ items:
+ - type: clip
+ id: 33
+ bounds: [310, 70, 50, 50]
+ content-size: [100, 100]
+ - type: rect
+ bounds: [310, 70, 50, 50]
+ color: green
+ clip-chain: [13, 33]
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky-ref.yaml b/gfx/wr/wrench/reftests/scrolling/sticky-ref.yaml
new file mode 100644
index 0000000000..0f7b7b79a6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky-ref.yaml
@@ -0,0 +1,40 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 70, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+
+ - type: rect
+ bounds: [130, 10, 50, 40]
+ color: green
+ - type: rect
+ bounds: [130, 70, 40, 50]
+ color: green
+ - type: rect
+ bounds: [190, 20, 50, 40]
+ color: green
+ - type: rect
+ bounds: [200, 70, 40, 50]
+ color: green
+
+ - type: rect
+ bounds: [250, 35, 50, 25]
+ color: green
+ - type: rect
+ bounds: [275, 70, 25, 50]
+ color: green
+ - type: rect
+ bounds: [310, 10, 50, 25]
+ color: green
+ - type: rect
+ bounds: [310, 70, 25, 50]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky-transformed-ref.yaml b/gfx/wr/wrench/reftests/scrolling/sticky-transformed-ref.yaml
new file mode 100644
index 0000000000..9849a3f3d8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky-transformed-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 30, 10, 10]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky-transformed.yaml b/gfx/wr/wrench/reftests/scrolling/sticky-transformed.yaml
new file mode 100644
index 0000000000..0144a7c1c3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky-transformed.yaml
@@ -0,0 +1,21 @@
+root:
+ items:
+ # There is a new reference frame introduced between the scrollframe and
+ # the sticky item. This tests that the sticky item is still positioned
+ # correctly.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: stacking-context
+ bounds: [10, 20, 10, 10]
+ transform: translate(0, 10)
+ items:
+ - type: sticky-frame
+ bounds: [0, 0, 10, 10]
+ margin-top: 10
+ vertical-offset-bounds: [0, 200]
+ items:
+ - type: rect
+ bounds: [0, 0, 10, 10]
+ color: green
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky.yaml b/gfx/wr/wrench/reftests/scrolling/sticky.yaml
new file mode 100644
index 0000000000..87480e0751
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky.yaml
@@ -0,0 +1,203 @@
+root:
+ items:
+ # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+ # viewport by its "bottom" sticky constraint.
+ - type: scroll-frame
+ id: 2
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [10, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: green
+ clip-chain: [2]
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ id: 3
+ bounds: [70, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ clip-chain: [3]
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ id: 4
+ bounds: [10, 70, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [60, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [60, 70, 50, 50]
+ color: green
+ clip-chain: [4]
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ id: 5
+ bounds: [70, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [70, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+ clip-chain: [5]
+
+ # The same tests, but this time with a margin.
+ - type: scroll-frame
+ id: 6
+ bounds: [130, 10, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [130, 60, 50, 50]
+ margin-bottom: 10
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [130, 60, 50, 50]
+ color: green
+ clip-chain: [6]
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ id: 7
+ bounds: [190, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 10, 50, 50]
+ margin-top: 10
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ clip-chain: [7]
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ id: 8
+ bounds: [130, 70, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [180, 70, 50, 50]
+ margin-right: 10
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [180, 70, 50, 50]
+ color: green
+ clip-chain: [8]
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ id: 9
+ bounds: [190, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [190, 70, 50, 50]
+ margin-left: 10
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [190, 70, 50, 50]
+ color: green
+ clip-chain: [9]
+
+ # The same tests, but this time with a limit.
+ - type: scroll-frame
+ id: 10
+ bounds: [250, 10, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [250, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-25, 0]
+ items:
+ - type: rect
+ bounds: [250, 60, 50, 50]
+ color: green
+ clip-chain: [10]
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ id: 11
+ bounds: [310, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [310, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 25]
+ items:
+ - type: rect
+ bounds: [310, 10, 50, 50]
+ color: green
+ clip-chain: [11]
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ id: 12
+ bounds: [250, 70, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: [300, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-25, 0]
+ items:
+ - type: rect
+ bounds: [300, 70, 50, 50]
+ color: green
+ clip-chain: [12]
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ id: 13
+ bounds: [310, 70, 50, 50]
+ content-size: [200, 200]
+ clip-to-frame: true
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [310, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 25]
+ items:
+ - type: rect
+ bounds: [310, 70, 50, 50]
+ color: green
+ clip-chain: [13]
diff --git a/gfx/wr/wrench/reftests/scrolling/translate-nested-ref.yaml b/gfx/wr/wrench/reftests/scrolling/translate-nested-ref.yaml
new file mode 100644
index 0000000000..f9f6c68209
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/translate-nested-ref.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ -
+ bounds: [8, 8, 500, 500]
+ clip: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: green
+ id: [0, 0]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/scrolling/translate-nested.yaml b/gfx/wr/wrench/reftests/scrolling/translate-nested.yaml
new file mode 100644
index 0000000000..3920dda414
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/translate-nested.yaml
@@ -0,0 +1,29 @@
+---
+root:
+ items:
+ -
+ bounds: [8, 8, 500, 500]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: clip
+ id: 2
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: red
+ clip-chain: [2]
+ -
+ bounds: [0, 0, 200, 200]
+ type: "stacking-context"
+ transform: translate(100, 0)
+ items:
+ -
+ bounds: [-100, 0, 200, 200]
+ clip-rect: [-300, -300, 900, 900]
+ type: rect
+ color: green
+ clip-chain: [2]
+ id: [0, 0]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/scrolling/viewport-offset-ref.yaml b/gfx/wr/wrench/reftests/scrolling/viewport-offset-ref.yaml
new file mode 100644
index 0000000000..b7d697e4e0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/viewport-offset-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: red
+ bounds: 0 100 1000 50
diff --git a/gfx/wr/wrench/reftests/scrolling/viewport-offset.yaml b/gfx/wr/wrench/reftests/scrolling/viewport-offset.yaml
new file mode 100644
index 0000000000..171e69a63d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/viewport-offset.yaml
@@ -0,0 +1,23 @@
+# The test assures that the viewport offset is correctly getting
+# the reference_frame_relative_offset applied when flattening
+# a scroll frame.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 100 0 0
+ items:
+ - type: scroll-frame
+ id: 2
+ bounds: 0 0 1000 1000
+ clip-to-frame: true
+ items:
+ - type: sticky-frame
+ bounds: 0 -50 1000 50
+ margin-top: -50
+ vertical-offset-bounds: [0, 2000]
+ items:
+ - type: rect
+ bounds: 0 -50 1000 100
+ color: red
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/snap/1761299-ref.yaml b/gfx/wr/wrench/reftests/snap/1761299-ref.yaml
new file mode 100644
index 0000000000..5102c7331e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/1761299-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 512, 128]
+ color: red
diff --git a/gfx/wr/wrench/reftests/snap/1761299.yaml b/gfx/wr/wrench/reftests/snap/1761299.yaml
new file mode 100644
index 0000000000..f36f0c4e50
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/1761299.yaml
@@ -0,0 +1,12 @@
+# verify that the raster spatial node selected when a surface is too large
+# is correct propagated to the picture render task
+---
+root:
+ items:
+ - type: stacking-context
+ filters: [identity]
+ transform: scale(0.5,1,1)
+ items:
+ - type: rect
+ bounds: [0, 0, 1024, 128]
+ color: red
diff --git a/gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml b/gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml
new file mode 100644
index 0000000000..c8985a7d81
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml
@@ -0,0 +1,13 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1920, 1200]
+ transform: translate(-45, 7)
+ items:
+ - type: stacking-context
+ filters: [opacity(0.9)]
+ items:
+ - text: "This should be pixel aligned!"
+ origin: 416.543499 160.008325
+ size: 16
+
diff --git a/gfx/wr/wrench/reftests/snap/fractional-filter.yaml b/gfx/wr/wrench/reftests/snap/fractional-filter.yaml
new file mode 100644
index 0000000000..6b45682ad2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/fractional-filter.yaml
@@ -0,0 +1,14 @@
+# Verify that a fractional transform that is attached to an off-screen
+# surface is able to snap correctly
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1920, 1200]
+ transform: translate(-45, 7.491675)
+ items:
+ - type: stacking-context
+ filters: [opacity(0.9)]
+ items:
+ - text: "This should be pixel aligned!"
+ origin: 416.543499 160.008325
+ size: 16
diff --git a/gfx/wr/wrench/reftests/snap/preserve-3d.png b/gfx/wr/wrench/reftests/snap/preserve-3d.png
new file mode 100644
index 0000000000..46858ebd45
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/preserve-3d.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/snap/preserve-3d.yaml b/gfx/wr/wrench/reftests/snap/preserve-3d.yaml
new file mode 100644
index 0000000000..133233d58b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/preserve-3d.yaml
@@ -0,0 +1,55 @@
+---
+root:
+ items:
+ -
+ bounds: [293, 139, 500, 500]
+ type: reference-frame
+ transform: scale(0.7)
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ type: stacking-context
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.25416666, -0.23866667, 1, -0.00083333335, 0, 0, 0, 1]
+ "transform-style": preserve-3d
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: stacking-context
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -110, 0, 0, 1]
+ items:
+ -
+ type: clip
+ id: 2
+ complex:
+ -
+ rect: [24, 539, 24, 24]
+ radius: [12, 12]
+ -
+ bounds: [24, 539, 24, 24]
+ type: rect
+ color: black
+ clip-chain: [2]
+ -
+ type: clip
+ id: 3
+ complex:
+ -
+ rect: [24, 770, 24, 24]
+ radius: [12, 12]
+ -
+ bounds: [24, 770, 24, 24]
+ type: rect
+ color: black
+ clip-chain: [3]
+ -
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [24, 847, 24, 24]
+ radius: [12, 12]
+ -
+ bounds: [24, 847, 24, 24]
+ type: rect
+ color: black
+ clip-chain: [4]
diff --git a/gfx/wr/wrench/reftests/snap/reftest.list b/gfx/wr/wrench/reftests/snap/reftest.list
new file mode 100644
index 0000000000..3464829f9b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/reftest.list
@@ -0,0 +1,6 @@
+platform(linux,mac) == snap.yaml snap.png
+== transform.yaml transform.png
+platform(linux,mac) == preserve-3d.yaml preserve-3d.png
+fuzzy(128,200) == subpixel-raster-root.yaml subpixel-raster-root-ref.yaml
+platform(linux,mac) == fractional-filter.yaml fractional-filter-ref.yaml
+max_surface_size(256) == 1761299.yaml 1761299.yaml
diff --git a/gfx/wr/wrench/reftests/snap/snap.png b/gfx/wr/wrench/reftests/snap/snap.png
new file mode 100644
index 0000000000..38f7cf33e5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/snap.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/snap/snap.yaml b/gfx/wr/wrench/reftests/snap/snap.yaml
new file mode 100644
index 0000000000..f292a728a9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/snap.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 1, 1, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 10.4, 1.8, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 21.5, 1.5, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 31.2, 1.6, 4.3, 5.5 ]
+ color: green
diff --git a/gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml b/gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml
new file mode 100644
index 0000000000..8afe567788
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 111, 200, 1]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml b/gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml
new file mode 100644
index 0000000000..494ec42334
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml
@@ -0,0 +1,13 @@
+# Verify that we don't incorrectly snap surface rects with fractional pixel offsets
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(0, 100.5, 0)
+ transform-style: preserve-3d
+ items:
+ -
+ bounds: [0, 10.5, 200, 1]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/snap/transform.png b/gfx/wr/wrench/reftests/snap/transform.png
new file mode 100644
index 0000000000..73c8feacdf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/transform.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/snap/transform.yaml b/gfx/wr/wrench/reftests/snap/transform.yaml
new file mode 100644
index 0000000000..d1b0579eda
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/transform.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ # 45 degrees result in middle -+ 14.142, rounded to 14
+ - type: stacking-context
+ bounds: [0, 0, 60, 60]
+ transform: rotate-y(45)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 40, 40 ]
+ color: blue
+ # 50 degrees result in middle -+ 12.856, rounded to 13
+ - type: stacking-context
+ bounds: [50, 0, 60, 60]
+ transform: rotate-x(50)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 40, 40 ]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/split/cross-ref.yaml b/gfx/wr/wrench/reftests/split/cross-ref.yaml
new file mode 100644
index 0000000000..c784e62fce
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/cross-ref.yaml
@@ -0,0 +1,36 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(-45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 100]
+ color: green
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [50, 0, 50, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(-45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [50, 0, 50, 100]
+ color: green
+
+
diff --git a/gfx/wr/wrench/reftests/split/cross.yaml b/gfx/wr/wrench/reftests/split/cross.yaml
new file mode 100644
index 0000000000..e306dbad33
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/cross.yaml
@@ -0,0 +1,24 @@
+# Crossed planes test. Similar to "simple" but has more complex transformations,
+# which puts higher requirements on the precision of arithmetics,
+# and all 4 pieces are visible on screen.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(-45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/filter-ref.yaml b/gfx/wr/wrench/reftests/split/filter-ref.yaml
new file mode 100644
index 0000000000..01e16b6e8f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/filter-ref.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [255, 0, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/split/filter.yaml b/gfx/wr/wrench/reftests/split/filter.yaml
new file mode 100644
index 0000000000..54667c0652
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/filter.yaml
@@ -0,0 +1,21 @@
+# This test ensures that an opacity filter forces the flattening of preserve-3D context.
+# The innermost rectangle has backface visibility disabled. If the parent stacking context
+# is a part of preserve-3D hierarchy, then the item would be backward-facing, thus invisible.
+# With the opacity filter, it's no longer a part of the preserve-3D, thus visible.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ transform: rotate-y(180)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ filters: [opacity(0.5)]
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: red
+ backface-visible: false
diff --git a/gfx/wr/wrench/reftests/split/gradient-ref.yaml b/gfx/wr/wrench/reftests/split/gradient-ref.yaml
new file mode 100644
index 0000000000..5a461c737d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/gradient-ref.yaml
@@ -0,0 +1,39 @@
+# Checks the UV interpolation of a preserved 3d stacking context matches
+# a flat stacking context. There are four black rectangles that overlap
+# the edges of the transformed gradient to minimize fuzz.
+---
+root:
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: flat
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.4699999988079071, -0.44999998807907104, 1, -0.0012499999720603228, 176, 160, 0, 1]
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: flat
+ transform: rotate-y(-53)
+ items:
+ - type: "stacking-context"
+ transform-style: flat
+ items:
+ - type: rect
+ bounds: [0, 0, 300, 300]
+ color: 255 255 255 1.0000
+ - type: gradient
+ bounds: [0, 0, 300, 150]
+ start: [150, 0]
+ end: [150, 150]
+ stops: [0.0, [255, 0, 0, 1], 1.0, [254, 0, 0, 1]]
+ - type: rect
+ bounds: [520, 260, 120, 20]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 336, 120, 3]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 260, 10, 80]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [622, 260, 10, 80]
+ color: 0 0 0 1.0000
diff --git a/gfx/wr/wrench/reftests/split/gradient.yaml b/gfx/wr/wrench/reftests/split/gradient.yaml
new file mode 100644
index 0000000000..8da777df03
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/gradient.yaml
@@ -0,0 +1,42 @@
+# Checks the UV interpolation of a preserved 3d stacking context matches
+# a flat stacking context. There are four black rectangles that overlap
+# the edges of the transformed gradient to minimize fuzz.
+---
+root:
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: preserve-3d
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.4699999988079071, -0.44999998807907104, 1, -0.0012499999720603228, 176, 160, 0, 1]
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: preserve-3d
+ transform: rotate-y(-53)
+ items:
+ - type: "stacking-context"
+ transform-style: preserve-3d
+ items:
+ - type: "stacking-context"
+ transform-style: flat
+ items:
+ - type: rect
+ bounds: [0, 0, 300, 300]
+ color: 255 255 255 1.0000
+ - type: gradient
+ bounds: [0, 0, 300, 150]
+ start: [150, 0]
+ end: [150, 150]
+ stops: [0.0, [255, 0, 0, 1], 1.0, [254, 0, 0, 1]]
+ - type: rect
+ bounds: [520, 260, 120, 20]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 336, 120, 3]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 260, 10, 80]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [622, 260, 10, 80]
+ color: 0 0 0 1.0000
diff --git a/gfx/wr/wrench/reftests/split/intermediate-1-ref.yaml b/gfx/wr/wrench/reftests/split/intermediate-1-ref.yaml
new file mode 100644
index 0000000000..2d67df4ead
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/intermediate-1-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 8 36 100 100
+ color: green
+ - type: rect
+ bounds: 108 36 100 100
+ color: blue
+ - type: rect
+ bounds: 208 36 100 100
+ color: yellow
diff --git a/gfx/wr/wrench/reftests/split/intermediate-1.yaml b/gfx/wr/wrench/reftests/split/intermediate-1.yaml
new file mode 100644
index 0000000000..0c02fe8e3c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/intermediate-1.yaml
@@ -0,0 +1,38 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 8 36 300 100
+ color: red
+ - type: stacking-context
+ transform-style: preserve-3d
+ transform: translate(8, 36, 0)
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
+ - type: stacking-context # flat, intermediate surface
+ items:
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: blue
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: yellow
diff --git a/gfx/wr/wrench/reftests/split/intermediate-2.yaml b/gfx/wr/wrench/reftests/split/intermediate-2.yaml
new file mode 100644
index 0000000000..7d926ade4a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/intermediate-2.yaml
@@ -0,0 +1,34 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 8 36 300 100
+ color: red
+ - type: stacking-context
+ transform-style: preserve-3d
+ transform: translate(8, 36, 0)
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: blue
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: yellow
diff --git a/gfx/wr/wrench/reftests/split/mixed-order-ref.yaml b/gfx/wr/wrench/reftests/split/mixed-order-ref.yaml
new file mode 100644
index 0000000000..e3632665c0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/mixed-order-ref.yaml
@@ -0,0 +1,22 @@
+# The result should be matching the flat ordering, since there
+# is no variation in Z of the preserve-3D children.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform: rotate-x(30)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [25, 25, 100, 100]
+ #transform: rotate-z(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/split/mixed-order.yaml b/gfx/wr/wrench/reftests/split/mixed-order.yaml
new file mode 100644
index 0000000000..789621dc5b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/mixed-order.yaml
@@ -0,0 +1,25 @@
+# The "preserve-3d" context has a mix of children being other stacking contexts and
+# just primitives. The other stacking contexts are also "preserve-3d" but on the same plane,
+# so the result ordering should be exactly matching the way we specify the children.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ transform: rotate-x(30)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [25, 25, 100, 100]
+ #TODO: https://github.com/servo/webrender/issues/2946
+ #transform: rotate-z(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/split/near-plane.png b/gfx/wr/wrench/reftests/split/near-plane.png
new file mode 100644
index 0000000000..c6e81c9983
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/near-plane.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/split/near-plane.yaml b/gfx/wr/wrench/reftests/split/near-plane.yaml
new file mode 100644
index 0000000000..f1911674ca
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/near-plane.yaml
@@ -0,0 +1,16 @@
+# In this test, there is a single polygon intersecting the near plane.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform-style: preserve-3d
+ perspective: 200
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-x(-60.0)
+ items:
+ - type: rect
+ bounds: [000, 0, 600, 600]
+ color: [255, 0, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/split/nested-coord-systems-ref.yaml b/gfx/wr/wrench/reftests/split/nested-coord-systems-ref.yaml
new file mode 100644
index 0000000000..97e2e82fc5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/nested-coord-systems-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 150 200
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/nested-coord-systems.yaml b/gfx/wr/wrench/reftests/split/nested-coord-systems.yaml
new file mode 100644
index 0000000000..5cdc4ab634
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/nested-coord-systems.yaml
@@ -0,0 +1,28 @@
+# This test checks our ability to have the plane splitting root itself to be rasterized
+# in some local space. Perspective transform forces WR to use the local space.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: flat
+ transform: perspective(100) rotate-y(30)
+ transform-origin: 0 0
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: flat
+ transform: perspective(100) rotate-y(30)
+ transform-origin: 0 0
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/nested-preserve3d-crash.yaml b/gfx/wr/wrench/reftests/split/nested-preserve3d-crash.yaml
new file mode 100644
index 0000000000..68a01ebeb1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/nested-preserve3d-crash.yaml
@@ -0,0 +1,37 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/nested-ref.yaml b/gfx/wr/wrench/reftests/split/nested-ref.yaml
new file mode 100644
index 0000000000..798b624356
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/nested-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ items:
+ - type: rect
+ bounds: [150, 0, 300, 600]
+ color: red
+ - type: rect
+ bounds: [150, 0, 300, 200]
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/nested.yaml b/gfx/wr/wrench/reftests/split/nested.yaml
new file mode 100644
index 0000000000..5b93224fda
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/nested.yaml
@@ -0,0 +1,25 @@
+# This tests have a non-preserve3d stacking context nested within
+# preserve-3d sub-tree. This nested context is still getting baked in
+# and participates (as a whole) in plane splitting.
+# It is layed out in the same plane as the parent, so should be ordered
+# last, given that it's coming later than the parent.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform-style: preserve-3d
+ transform: rotate-y(60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 200]
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/order-1-ref.yaml b/gfx/wr/wrench/reftests/split/order-1-ref.yaml
new file mode 100644
index 0000000000..930ac5c8b9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/order-1-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/order-1.yaml b/gfx/wr/wrench/reftests/split/order-1.yaml
new file mode 100644
index 0000000000..7b5613f6d3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/order-1.yaml
@@ -0,0 +1,20 @@
+# The "preserve-3d" context has a "flat" child. Rotation by 180 degrees and positive Z offset
+# should compensate each other, resulting in a green rectangle.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform: translate(0, 0, 10)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
diff --git a/gfx/wr/wrench/reftests/split/order-2-ref.yaml b/gfx/wr/wrench/reftests/split/order-2-ref.yaml
new file mode 100644
index 0000000000..930ac5c8b9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/order-2-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/order-2.yaml b/gfx/wr/wrench/reftests/split/order-2.yaml
new file mode 100644
index 0000000000..a94d25b8f1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/order-2.yaml
@@ -0,0 +1,27 @@
+# The "preserve-3d" context has a "flat" child, which contains two other stacking contexts
+# that have their Z modified. The Z should not affect their drawing order, since they
+# are hidden from the 3D hierarchy by the flat parent.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform: translate(0, 0, 10)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform: translate(0, 0, -10)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/order-3-ref.yaml b/gfx/wr/wrench/reftests/split/order-3-ref.yaml
new file mode 100644
index 0000000000..9d896d9699
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/order-3-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ -
+ type: rect
+ bounds: [8, 8, 200, 200]
+ color: blue
+ -
+ type: rect
+ bounds: [8, 208, 200, 200]
+ color: blue
+ -
+ type: rect
+ bounds: [8, 408, 200, 200]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/split/order-3.yaml b/gfx/wr/wrench/reftests/split/order-3.yaml
new file mode 100644
index 0000000000..7f80652af6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/order-3.yaml
@@ -0,0 +1,31 @@
+# Ensure that preserve-3d items are correctly batched with transparent siblings.
+---
+root:
+ items:
+ -
+ type: stacking-context
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: rect
+ bounds: [8, 8, 200, 200]
+ color: blue
+ -
+ type: stacking-context
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: rect
+ bounds: [8, 208, 200, 200]
+ color: blue
+ - type: rect
+ color: [255, 0, 0, 0.5]
+ bounds: [8, 408, 200, 200]
+ -
+ type: stacking-context
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: rect
+ bounds: [8, 408, 200, 200]
+ color: blue
diff --git a/gfx/wr/wrench/reftests/split/ordering-ref.yaml b/gfx/wr/wrench/reftests/split/ordering-ref.yaml
new file mode 100644
index 0000000000..33ad571660
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/ordering-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ -
+ bounds: [15, 15, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [203, 15, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [0, 0, 450, 150]
+ type: rect
+ color: 0 0 0 0.6667
diff --git a/gfx/wr/wrench/reftests/split/ordering.yaml b/gfx/wr/wrench/reftests/split/ordering.yaml
new file mode 100644
index 0000000000..2809166454
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/ordering.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 15, 0, 1]
+ "transform-style": "preserve-3d"
+ items:
+ -
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.05, -0.1, 1, -0.00066666666, 0, 0, 0, 1]
+ type: "stacking-context"
+ "transform-style": "preserve-3d"
+ items:
+ -
+ bounds: [0, 0, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [203, 15, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [0, 0, 450, 150]
+ type: rect
+ color: 0 0 0 0.6667
diff --git a/gfx/wr/wrench/reftests/split/perspective-clipping-ref.yaml b/gfx/wr/wrench/reftests/split/perspective-clipping-ref.yaml
new file mode 100644
index 0000000000..8f6d4a1566
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/perspective-clipping-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/perspective-clipping.yaml b/gfx/wr/wrench/reftests/split/perspective-clipping.yaml
new file mode 100644
index 0000000000..7135f27c37
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/perspective-clipping.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: red
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ perspective: 300
+ perspective-origin: 0 0
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ # translate-Z(-300) scale(2)
+ transform: 2 0 0 0 0 2 0 0 0 0 2 0 0 0 -300 1
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/reftest.list b/gfx/wr/wrench/reftests/split/reftest.list
new file mode 100644
index 0000000000..cd9b33c02b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/reftest.list
@@ -0,0 +1,22 @@
+fuzzy-if(platform(swgl),1,180000) == simple.yaml simple-ref.yaml
+== order-1.yaml order-1-ref.yaml
+== order-2.yaml order-2-ref.yaml
+== nested.yaml nested-ref.yaml
+# fuzziness is needed due to perspective for the edge
+fuzzy(35,200) == nested-coord-systems.yaml nested-coord-systems-ref.yaml
+== nested-preserve3d-crash.yaml nested-preserve3d-crash.yaml
+== perspective-clipping.yaml perspective-clipping-ref.yaml
+== intermediate-1.yaml intermediate-1-ref.yaml
+== intermediate-2.yaml intermediate-1-ref.yaml
+== split-intersect1.yaml split-intersect1-ref.yaml
+== ordering.yaml ordering-ref.yaml
+fuzzy(1,20) fuzzy-if(platform(swgl),128,39) == near-plane.yaml near-plane.png
+# Note: on windows the image is rendered at a slightly different spot.
+# similarly, a lot of tests in "transform" are non-windows. TODO: investigate
+platform(linux,mac) fuzzy(1,20) == same-plane.yaml same-plane.png
+#TODO: https://github.com/servo/webrender/issues/2946
+#== cross.yaml cross-ref.yaml
+== mixed-order.yaml mixed-order-ref.yaml
+fuzzy(1,40000) == filter.yaml filter-ref.yaml
+fuzzy(1,10000) == gradient.yaml gradient-ref.yaml
+== order-3.yaml order-3-ref.yaml
diff --git a/gfx/wr/wrench/reftests/split/same-plane.png b/gfx/wr/wrench/reftests/split/same-plane.png
new file mode 100644
index 0000000000..3d5baf998f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/same-plane.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/split/same-plane.yaml b/gfx/wr/wrench/reftests/split/same-plane.yaml
new file mode 100644
index 0000000000..277709bad1
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/same-plane.yaml
@@ -0,0 +1,33 @@
+# This test has a number of rectangles placed on the same transformed preserve3d plane.
+# The expected result is that the rectangles are rendered in the order they are listed.
+# This can fail if the primitives are considered outside of the main plane due
+# to floating point precision issues in plane-splitting and transformation.
+---
+root:
+ items:
+ - type: "stacking-context"
+ transform-style: preserve-3d
+ transform: rotate-y(-30) rotate-x(-75) translate(-100, 100, 0)
+ items:
+ - type: "stacking-context"
+ perspective: 400
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: [0, 0, 450, 300]
+ color: 0 255 0 1.0000
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: translate(200, 0, 0)
+ items:
+ - type: rect
+ bounds: [-200, 0, 150, 300]
+ color: 255 0 0 1.0000
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 200, 150, 200]
+ type: rect
+ color: 0 0 255 1.0000
diff --git a/gfx/wr/wrench/reftests/split/simple-ref.yaml b/gfx/wr/wrench/reftests/split/simple-ref.yaml
new file mode 100644
index 0000000000..de1fad9440
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/simple-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ items:
+ - type: rect
+ bounds: [150, 0, 150, 600]
+ color: [191, 127, 63]
+ - type: rect
+ bounds: [300, 0, 150, 600]
+ color: [127, 191, 63]
diff --git a/gfx/wr/wrench/reftests/split/simple.yaml b/gfx/wr/wrench/reftests/split/simple.yaml
new file mode 100644
index 0000000000..b6445780f5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/simple.yaml
@@ -0,0 +1,24 @@
+# This tests a simple intersection of 2 rotated planes to split properly.
+# If the split doesn't happen, we see a single-colored rectangle.
+# If it does, the rectangle gets split vertically in 2 parts of different colors.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-y(-60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+ color: [255, 0, 0, 0.5]
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-y(60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+ color: [0, 255, 0, 0.5]
diff --git a/gfx/wr/wrench/reftests/split/split-intersect1-ref.yaml b/gfx/wr/wrench/reftests/split/split-intersect1-ref.yaml
new file mode 100644
index 0000000000..134698571c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/split-intersect1-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: 50 0 50 100
+ color: red
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: 0 0 50 100
+ color: green
diff --git a/gfx/wr/wrench/reftests/split/split-intersect1.yaml b/gfx/wr/wrench/reftests/split/split-intersect1.yaml
new file mode 100644
index 0000000000..dff7638707
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/split-intersect1.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
+ - type: stacking-context
+ transform: rotate-y(-0.1)
+ bounds: 0 0 100 100
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
diff --git a/gfx/wr/wrench/reftests/text/1658-ref.yaml b/gfx/wr/wrench/reftests/text/1658-ref.yaml
new file mode 100644
index 0000000000..4f5fbe15c5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/1658-ref.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ bounds: [14, 18, 205, 35]
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 0.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ type: text
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 1.0]
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/1658.yaml b/gfx/wr/wrench/reftests/text/1658.yaml
new file mode 100644
index 0000000000..523e7b1143
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/1658.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ bounds: [14, 18, 205, 35]
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 1.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
diff --git a/gfx/wr/wrench/reftests/text/Ahem.ttf b/gfx/wr/wrench/reftests/text/Ahem.ttf
new file mode 100644
index 0000000000..4d4785a412
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/Ahem.ttf
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/FreeSans.ttf b/gfx/wr/wrench/reftests/text/FreeSans.ttf
new file mode 100644
index 0000000000..9db958532c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/FreeSans.ttf
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/Proggy-License.txt b/gfx/wr/wrench/reftests/text/Proggy-License.txt
new file mode 100644
index 0000000000..f45a0d4bed
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/Proggy-License.txt
@@ -0,0 +1,10 @@
+The "Proggy.ttf" font was downloaded from https://proggyfonts.net/download/ on Dec 5, 2017.
+The following license applies to "Proggy.ttf":
+
+Copyright (c) 2004, 2005 Tristan Grimmer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/gfx/wr/wrench/reftests/text/Proggy.ttf b/gfx/wr/wrench/reftests/text/Proggy.ttf
new file mode 100644
index 0000000000..308d3e1ac9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/Proggy.ttf
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/VeraBd.ttf b/gfx/wr/wrench/reftests/text/VeraBd.ttf
new file mode 100644
index 0000000000..51d6111d72
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/VeraBd.ttf
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/ahem-ref.yaml b/gfx/wr/wrench/reftests/text/ahem-ref.yaml
new file mode 100644
index 0000000000..061e62abbf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/ahem-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 16, 16, 520, 280 ]
+ color: 128 128 128 1.0
+ - type: rect
+ bounds: [ 56, 56, 440, 200 ]
+ color: white
+ - type: rect
+ bounds: [ 56, 56, 80, 160 ]
+ color: blue
+ - type: rect
+ bounds: [ 56, 216, 120, 40 ]
+ color: black
+ - type: rect
+ bounds: [ 176, 56, 80, 160 ]
+ color: 255 165 0 1.0000
diff --git a/gfx/wr/wrench/reftests/text/ahem.yaml b/gfx/wr/wrench/reftests/text/ahem.yaml
new file mode 100644
index 0000000000..60f2dbc6a2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/ahem.yaml
@@ -0,0 +1,219 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ type: clip
+ id: 10
+ "content-size": [2560, 1294]
+ -
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ type: "scroll-frame"
+ id: 2
+ "content-size": [2560, 1294]
+ bounds: [0, 0, 2560, 1294]
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ type: clip
+ id: 3
+ "content-size": [2560, 1294]
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [16, 16, 520, 280]
+ "clip-rect": [16, 16, 520, 280]
+ "backface-visible": true
+ type: border
+ width: 40
+ "border-type": normal
+ color: 128 128 128 1.0000
+ style: solid
+ -
+ bounds: [56, 216, 80, 40]
+ "clip-rect": [56, 216, 80, 40]
+ "backface-visible": true
+ type: clip
+ id: 4
+ "content-size": [80, 40]
+ -
+ bounds: [56, 216, 80, 40]
+ "clip-rect": [56, 216, 80, 40]
+ "backface-visible": true
+ type: rect
+ color: black
+ -
+ bounds: [54, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [67, 68]
+ offsets: [56, 88, 96, 88]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [69, 70]
+ offsets: [56, 128, 96, 128]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 135, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [71, 72]
+ offsets: [56, 168, 96, 168]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 175, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [73, 74]
+ offsets: [56, 208, 96, 208]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 215, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [19, 20, 21]
+ offsets: [56, 248, 96, 248, 136, 248]
+ size: 30
+ color: black
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [75, 76]
+ offsets: [176, 88, 216, 88]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [77, 78]
+ offsets: [176, 128, 216, 128]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 135, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [79, 80]
+ offsets: [176, 168, 216, 168]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 175, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [81, 83]
+ offsets: [176, 208, 216, 208]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 215, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [67, 68]
+ offsets: [176, 248, 216, 248]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [69, 70]
+ offsets: [296, 88, 336, 88]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [71, 72]
+ offsets: [296, 128, 336, 128]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 135, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [73, 74]
+ offsets: [296, 168, 336, 168]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 175, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [84, 85]
+ offsets: [296, 208, 336, 208]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 215, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [86, 87]
+ offsets: [296, 248, 336, 248]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [414, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [88, 89]
+ offsets: [416, 88, 456, 88]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [414, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ glyphs: [90, 91]
+ offsets: [416, 128, 456, 128]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
diff --git a/gfx/wr/wrench/reftests/text/allow-subpixel-ref.yaml b/gfx/wr/wrench/reftests/text/allow-subpixel-ref.yaml
new file mode 100644
index 0000000000..d99c91b77f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/allow-subpixel-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - text: "This should not be subpixel text"
+ origin: 20 120
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/allow-subpixel.yaml b/gfx/wr/wrench/reftests/text/allow-subpixel.yaml
new file mode 100644
index 0000000000..d7bd98a287
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/allow-subpixel.yaml
@@ -0,0 +1,19 @@
+--- # Verify that subpixel AA is disabled if the text's enclosing stacking context requires an intermediate surface
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 200]
+ blend-container: true
+ items:
+ - text: "This should not be subpixel text"
+ origin: 20 120
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: white
diff --git a/gfx/wr/wrench/reftests/text/alpha-transform.png b/gfx/wr/wrench/reftests/text/alpha-transform.png
new file mode 100644
index 0000000000..e22066b8c6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/alpha-transform.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/alpha-transform.yaml b/gfx/wr/wrench/reftests/text/alpha-transform.yaml
new file mode 100644
index 0000000000..8a623b8067
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/alpha-transform.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 660, 210]
+ transform: scale(1.5, 2.5) rotate(-10)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/blank.yaml b/gfx/wr/wrench/reftests/text/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.png b/gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.png
new file mode 100644
index 0000000000..944d0b7847
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml b/gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml
new file mode 100644
index 0000000000..bbfc2f1f9f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml
@@ -0,0 +1,48 @@
+# This test ensures that for text that has a shadow and blurred shadow, the
+# shadows are clipped in the same way (via the local clip rect) as the shadowed
+# element.
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [10, 14, 220, 200]
+ blur-radius: 0
+ offset: [0, 50]
+ color: black
+ -
+ type: "shadow"
+ bounds: [10, 14, 220, 100]
+ blur-radius: 3
+ offset: [0, 25]
+ color: black
+ -
+ bounds: [10, 14, 215, 45]
+ clip-rect: [10, 14, 122, 40]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: line
+ clip-rect: [10, 14, 122, 40]
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+ -
+ type: line
+ clip-rect: [10, 14, 122, 40]
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/border-radius-alpha.png b/gfx/wr/wrench/reftests/text/border-radius-alpha.png
new file mode 100644
index 0000000000..e20302a562
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/border-radius-alpha.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/border-radius-subpx.png b/gfx/wr/wrench/reftests/text/border-radius-subpx.png
new file mode 100644
index 0000000000..4361f563db
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/border-radius-subpx.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/border-radius.yaml b/gfx/wr/wrench/reftests/text/border-radius.yaml
new file mode 100644
index 0000000000..e61622b957
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/border-radius.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: blue
+ clip-chain: [2]
+ - text: "A"
+ origin: 30 120
+ size: 200
+ color: red
+ font: "FreeSans.ttf"
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/text/clipped-transform.png b/gfx/wr/wrench/reftests/text/clipped-transform.png
new file mode 100644
index 0000000000..24459d2d3c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/clipped-transform.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/clipped-transform.yaml b/gfx/wr/wrench/reftests/text/clipped-transform.yaml
new file mode 100644
index 0000000000..7f9c9b8661
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/clipped-transform.yaml
@@ -0,0 +1,12 @@
+--- # checks that local clip rects don't inappropriately shear transformed glyphs
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 65, 70]
+ transform: [0.7086478, 0.7055624, 0, 0, -0.7055624, 0.7086478, 0, 0, 0, 0, 1, 0, 40, 10, 0, 1]
+ items:
+ - text: "O"
+ clip-rect: [0, 0, 44, 44]
+ origin: 0 38
+ size: 30
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/color-bitmap-shadow-ref.yaml b/gfx/wr/wrench/reftests/text/color-bitmap-shadow-ref.yaml
new file mode 100644
index 0000000000..039f3c6edf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/color-bitmap-shadow-ref.yaml
@@ -0,0 +1,30 @@
+---
+root:
+ items:
+ -
+ text: "\u263A"
+ origin: [8, 56]
+ size: 36
+ color: white
+ family: "Apple Color Emoji"
+ embedded-bitmaps: true
+ -
+ type: rect
+ bounds: [56, 56, 48, 48]
+ color: yellow
+ -
+ type: rect
+ bounds: [56, 56, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 92, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 56, 12, 48]
+ color: black
+ -
+ type: rect
+ bounds: [92, 56, 12, 48]
+ color: black
diff --git a/gfx/wr/wrench/reftests/text/color-bitmap-shadow.yaml b/gfx/wr/wrench/reftests/text/color-bitmap-shadow.yaml
new file mode 100644
index 0000000000..4ead9270cd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/color-bitmap-shadow.yaml
@@ -0,0 +1,34 @@
+--- # checks that color emoji fast shadows use the shadow color
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 115, 115]
+ offset: [48, 48]
+ blur-radius: 0
+ color: yellow
+ -
+ text: "\u263A"
+ origin: [8, 56]
+ size: 36
+ color: blue
+ family: "Apple Color Emoji"
+ embedded-bitmaps: true
+ -
+ type: "pop-all-shadows"
+ -
+ type: rect
+ bounds: [56, 56, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 92, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 56, 12, 48]
+ color: black
+ -
+ type: rect
+ bounds: [92, 56, 12, 48]
+ color: black
diff --git a/gfx/wr/wrench/reftests/text/colors-alpha.png b/gfx/wr/wrench/reftests/text/colors-alpha.png
new file mode 100644
index 0000000000..3e8d985025
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/colors-alpha.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/colors-subpx.png b/gfx/wr/wrench/reftests/text/colors-subpx.png
new file mode 100644
index 0000000000..50d5c36be3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/colors-subpx.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/colors.yaml b/gfx/wr/wrench/reftests/text/colors.yaml
new file mode 100644
index 0000000000..aceb032898
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/colors.yaml
@@ -0,0 +1,211 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 50
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [270, 10, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 50
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [530, 10, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 50
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [10, 70, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 110
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [270, 70, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 110
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [530, 70, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 110
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [10, 130, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 170
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [270, 130, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 170
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [530, 130, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 170
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [10, 190, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 230
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [270, 190, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 230
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [530, 190, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 230
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [10, 250, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 290
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [270, 250, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 290
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [530, 250, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 290
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [10, 310, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 350
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [270, 310, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 350
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [530, 310, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 350
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [10, 370, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 410
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [270, 370, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 410
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [530, 370, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 410
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [10, 430, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 470
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [270, 430, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 470
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [530, 430, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 470
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
diff --git a/gfx/wr/wrench/reftests/text/decorations-ref.yaml b/gfx/wr/wrench/reftests/text/decorations-ref.yaml
new file mode 100644
index 0000000000..5ad75109fa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/decorations-ref.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: rect # short, horizontal
+ bounds: [ 4, 2, 5, 1 ]
+ color: green
+ - type: rect # short, vertical
+ bounds: [ 12, 14, 1, 5 ]
+ color: red
+ style: solid
+ - type: rect # long, horizontal
+ bounds: [ 34, 32, 200, 3 ]
+ color: blue
+ style: solid
+ - type: rect # long, vertical
+ bounds: [ 52, 54, 3, 200 ]
+ color: black
+ style: solid
+
diff --git a/gfx/wr/wrench/reftests/text/decorations-suite.png b/gfx/wr/wrench/reftests/text/decorations-suite.png
new file mode 100644
index 0000000000..c596ededeb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/decorations-suite.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/decorations-suite.yaml b/gfx/wr/wrench/reftests/text/decorations-suite.yaml
new file mode 100644
index 0000000000..bbe02dcc95
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/decorations-suite.yaml
@@ -0,0 +1,348 @@
+---
+root:
+ items:
+ - type: line
+ baseline: 10
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 20
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 30
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 40
+ start: 10
+ end: 210
+ width: 3
+ thickness: 1
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 50
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 65
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 80
+ start: 10
+ end: 207 # pruposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 95
+ start: 10
+ end: 210
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [8, 100, 225, 50]
+ blur-radius: 0
+ offset: [2, 2]
+ color: red
+ - type: line
+ baseline: 110
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: solid
+ - type: line
+ baseline: 120
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dashed
+ - type: line
+ baseline: 130
+ start: 10
+ end: 209
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dotted
+ - type: line
+ baseline: 140
+ start: 10
+ end: 210
+ width: 3
+ thickness: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 145, 225, 65]
+ blur-radius: 1
+ offset: [2, 3]
+ color: red
+ - type: line
+ baseline: 150
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 165
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 180
+ start: 10
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 195
+ start: 10
+ end: 210
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 220, 225, 40]
+ blur-radius: 0
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 230
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 250
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 270
+ start: 10
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 290
+ start: 10
+ end: 210
+ width: 12
+ thickness: 3
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [0, 320, 240, 140]
+ blur-radius: 3
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 330
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 350
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 370
+ start: 10
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 390
+ start: 10
+ end: 210
+ width: 16
+ thickness: 4
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ - type: line
+ baseline: 220
+ start: 10
+ end: 210
+ width: 1
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 230
+ start: 10
+ end: 210
+ width: 1
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 240
+ start: 10
+ end: 210
+ width: 1
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 250
+ start: 10
+ end: 210
+ thickness: 1
+ width: 3
+ orientation: vertical
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 270
+ start: 10
+ end: 210
+ width: 2
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 290
+ start: 10
+ end: 210
+ width: 2
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 310
+ start: 10
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 330
+ start: 10
+ end: 210
+ thickness: 2
+ width: 6
+ orientation: vertical
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [350, 0, 120, 240]
+ blur-radius: 3
+ offset: [5, 2]
+ color: black
+ - type: line
+ baseline: 380
+ start: 10
+ end: 210
+ width: 8
+ orientation: vertical
+ color: yellow
+ style: solid
+ - type: line
+ baseline: 400
+ start: 10
+ end: 210
+ width: 8
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 420
+ start: 10
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 440
+ start: 10
+ end: 210
+ thickness: 4
+ width: 16
+ orientation: vertical
+ color: red
+ style: wavy
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/decorations.yaml b/gfx/wr/wrench/reftests/text/decorations.yaml
new file mode 100644
index 0000000000..db15551a74
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/decorations.yaml
@@ -0,0 +1,36 @@
+---
+root:
+ items:
+ - type: line # short, horizontal
+ baseline: 2
+ start: 4
+ end: 9
+ width: 1
+ orientation: horizontal
+ color: green
+ style: solid
+ - type: line # short, vertical
+ baseline: 12
+ start: 14
+ end: 19
+ width: 1
+ orientation: vertical
+ color: red
+ style: solid
+ - type: line # long, horizontal
+ baseline: 32
+ start: 34
+ end: 234
+ width: 3
+ orientation: horizontal
+ color: blue
+ style: solid
+ - type: line # long, vertical
+ baseline: 52
+ start: 54
+ end: 254
+ width: 3
+ orientation: vertical
+ color: black
+ style: solid
+
diff --git a/gfx/wr/wrench/reftests/text/diacritics-ref.yaml b/gfx/wr/wrench/reftests/text/diacritics-ref.yaml
new file mode 100644
index 0000000000..334e1899ee
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/diacritics-ref.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - text: "x"
+ origin: 20 30
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/diacritics.yaml b/gfx/wr/wrench/reftests/text/diacritics.yaml
new file mode 100644
index 0000000000..7c613c3aa6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/diacritics.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - text: "x̂"
+ origin: 20 30
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/embedded-bitmaps.png b/gfx/wr/wrench/reftests/text/embedded-bitmaps.png
new file mode 100644
index 0000000000..a8039015a5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/embedded-bitmaps.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/embedded-bitmaps.yaml b/gfx/wr/wrench/reftests/text/embedded-bitmaps.yaml
new file mode 100644
index 0000000000..f22b11d95f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/embedded-bitmaps.yaml
@@ -0,0 +1,9 @@
+--- # checks that embedded bitmaps are rasterized and use a proper layout
+root:
+ items:
+ - text: "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 {}[]()<>$*-+=/#_%^@\\&|~?'\"!,.;:"
+ origin: 20 30
+ bounds: [0, 0, 710, 50]
+ size: 8.25
+ font: "Proggy.ttf"
+ embedded-bitmaps: true
diff --git a/gfx/wr/wrench/reftests/text/intermediate-transform.yaml b/gfx/wr/wrench/reftests/text/intermediate-transform.yaml
new file mode 100644
index 0000000000..ab2e51804c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/intermediate-transform.yaml
@@ -0,0 +1,54 @@
+# This test case makes the text flipped relative to the surface it renders to, but not to the world.
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "reference-frame"
+ transform: [0.7753850221633911, 0, 0, 0, 0, 0.7753850221633911, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "stacking-context"
+ transform-style: "preserve-3d"
+ origin: [237, 246]
+ items:
+ -
+ type: "reference-frame"
+ transform-style: "preserve-3d"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, -0.09215625375509262, -0.05100416764616966, 1, -0.0001250000059371814, 0, -3, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: "reference-frame"
+ transform: [-1, 0, 0, 0, 0, -0.9659258127212524, 0.258819043636322, 0, 0, 0.258819043636322, 0.9659258127212524, 0, 1474.5, 802.0977172851563, -105.5981674194336, 1]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ rect: [0, 0, 1475, 408]
+ color: red
+ -
+ type: "reference-frame"
+ transform: [-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1474.5, 408, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ glyphs: [55,43,40,3,44,54,36,37,40,47,47,36]
+ offsets: [511, 290, 551.2000122070313, 290, 597.066650390625, 290, 637.2666625976563, 290, 656.1333618164063, 290, 682.0999755859375, 290, 716.6333618164063, 290, 759.6666870117188, 290, 799.8666381835938, 290, 840.066650390625, 290, 880.2666625976563, 290, 920.4666748046875, 290]
+ size: 22
+ color: black
+ font: "../text/VeraBd.ttf"
+ bounds: [509, 250, 457, 54]
+ clip-rect: [508, 249, 459, 56]
+
diff --git a/gfx/wr/wrench/reftests/text/isolated-text.png b/gfx/wr/wrench/reftests/text/isolated-text.png
new file mode 100644
index 0000000000..a0c8ed3650
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/isolated-text.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/isolated-text.yaml b/gfx/wr/wrench/reftests/text/isolated-text.yaml
new file mode 100644
index 0000000000..897d410a84
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/isolated-text.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 100]
+ transform: perspective(1000)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 100]
+ transform-style: preserve-3d
+ items:
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 20 30
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/large-glyphs.yaml b/gfx/wr/wrench/reftests/text/large-glyphs.yaml
new file mode 100644
index 0000000000..4bbd3ee10c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/large-glyphs.yaml
@@ -0,0 +1,8 @@
+--- # Verify that large glyphs actually render at all.
+root:
+ items:
+ - text: "HI"
+ origin: 0 1234
+ size: 1234
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/large-line-decoration.yaml b/gfx/wr/wrench/reftests/text/large-line-decoration.yaml
new file mode 100644
index 0000000000..ec12a5dc31
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/large-line-decoration.yaml
@@ -0,0 +1,43 @@
+---
+root:
+ items:
+ - type: line
+ baseline: 0
+ start: 0
+ end: 50
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: red
+ style: solid
+
+ - type: line
+ baseline: 0
+ start: 100
+ end: 150
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: green
+ style: dashed
+
+ - type: line
+ baseline: 0
+ start: 200
+ end: 250
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: blue
+ style: dotted
+
+ - type: line
+ baseline: 0
+ start: 300
+ end: 350
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: yellow
+ style: wavy
+
diff --git a/gfx/wr/wrench/reftests/text/long-text.yaml b/gfx/wr/wrench/reftests/text/long-text.yaml
new file mode 100644
index 0000000000..e44658ca99
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/long-text.yaml
@@ -0,0 +1,610 @@
+---
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ ]
+ offsets: [16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ ]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/mix-blend-layers-ref.yaml b/gfx/wr/wrench/reftests/text/mix-blend-layers-ref.yaml
new file mode 100644
index 0000000000..0d9f6b8864
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/mix-blend-layers-ref.yaml
@@ -0,0 +1,50 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 0, 0]
+ blend-container: true
+ items:
+ - type: "shadow"
+ blur-radius: 0
+ offset: [-10, -4]
+ color: [255, 255, 0, 1]
+ - text: "Fault"
+ origin: 200 300
+ size: 200
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
+ - type: stacking-context
+ blend-container: true
+ mix-blend-mode: darken
+ items:
+ - type: "shadow"
+ blur-radius: 0
+ offset: [6, -8]
+ color: [0, 255, 255, 1]
+ - text: "Fault"
+ origin: 200 300
+ size: 200
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
+ - type: stacking-context
+ blend-container: true
+ mix-blend-mode: darken
+ items:
+ - type: "shadow"
+ blur-radius: 0
+ offset: [10, 4]
+ color: [255, 0, 255, 1]
+ - text: "Fault"
+ origin: 200 300
+ size: 200
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/mix-blend-layers.yaml b/gfx/wr/wrench/reftests/text/mix-blend-layers.yaml
new file mode 100644
index 0000000000..5c21935100
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/mix-blend-layers.yaml
@@ -0,0 +1,53 @@
+# Verify that surfaces with differing surface/raster spatial nodes correctly sample from
+# parent mix-blend container surfaces
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 0, 0]
+ transform: scale(2)
+ blend-container: true
+ items:
+ - type: "shadow"
+ blur-radius: 0
+ offset: [-5, -2]
+ color: [255, 255, 0, 1]
+ - text: "Fault"
+ origin: 100 150
+ size: 100
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
+ - type: stacking-context
+ blend-container: true
+ mix-blend-mode: darken
+ items:
+ - type: "shadow"
+ blur-radius: 0
+ offset: [3, -4]
+ color: [0, 255, 255, 1]
+ - text: "Fault"
+ origin: 100 150
+ size: 100
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
+ - type: stacking-context
+ blend-container: true
+ mix-blend-mode: darken
+ items:
+ - type: "shadow"
+ blur-radius: 0
+ offset: [5, 2]
+ color: [255, 0, 255, 1]
+ - text: "Fault"
+ origin: 100 150
+ size: 100
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/negative-pos.yaml b/gfx/wr/wrench/reftests/text/negative-pos.yaml
new file mode 100644
index 0000000000..7dac5c4961
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/negative-pos.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [-2, 43]
+ size: 24
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/non-opaque-notref.yaml b/gfx/wr/wrench/reftests/text/non-opaque-notref.yaml
new file mode 100644
index 0000000000..53d878b958
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/non-opaque-notref.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [55]
+ offsets: [200, 200]
+ size: 100
+ color: [0, 0, 0]
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/non-opaque.yaml b/gfx/wr/wrench/reftests/text/non-opaque.yaml
new file mode 100644
index 0000000000..ff2573dbfa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/non-opaque.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [55]
+ offsets: [200, 200]
+ size: 100
+ color: [0, 0, 0, 0.5]
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/perspective-clip.png b/gfx/wr/wrench/reftests/text/perspective-clip.png
new file mode 100644
index 0000000000..b790a7f30f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/perspective-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/perspective-clip.yaml b/gfx/wr/wrench/reftests/text/perspective-clip.yaml
new file mode 100644
index 0000000000..0fab8b3bf6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/perspective-clip.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ perspective: 1
+ perspective-origin: 0 0
+ items:
+ -
+ type: stacking-context
+ transform: 10 0 0 0 0 10 0 0 0 0 10 0 0 0 -9 1
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ -
+ type: rect
+ bounds: [50, 50, 200, 200]
+ color: green
+ clip-chain: [2]
+ -
+ text: "X"
+ origin: 100 150
+ size: 100
+ font: "Ahem.ttf"
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/text/raster-space-snap-ref.yaml b/gfx/wr/wrench/reftests/text/raster-space-snap-ref.yaml
new file mode 100644
index 0000000000..43e4ccdf46
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/raster-space-snap-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 480, 80]
+ raster-space: screen
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20.5 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/raster-space-snap.yaml b/gfx/wr/wrench/reftests/text/raster-space-snap.yaml
new file mode 100644
index 0000000000..4ae3f8c99f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/raster-space-snap.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 480, 80]
+ raster-space: local(1.0)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20.5 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/raster-space.png b/gfx/wr/wrench/reftests/text/raster-space.png
new file mode 100644
index 0000000000..8289e428d5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/raster-space.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/raster-space.yaml b/gfx/wr/wrench/reftests/text/raster-space.yaml
new file mode 100644
index 0000000000..a4efba37fd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/raster-space.yaml
@@ -0,0 +1,29 @@
+root:
+ items:
+ - type: stacking-context
+ transform: scale(5.0) rotate(-45)
+ transform-origin: 300 300
+ raster-space: local(1.0)
+ filters: [opacity(0.5)]
+ items:
+ - text: "Local"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+ transform: scale(5.0) rotate(-45)
+ transform-origin: 0 400
+ items:
+ - text: "Screen"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+ transform: scale(5.0) rotate(-45)
+ transform-origin: -80 240
+ raster-space: local(5.0)
+ items:
+ - text: "Local (scaled)"
+ origin: 20 50
+ size: 10
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/raster_root_C_8192.yaml b/gfx/wr/wrench/reftests/text/raster_root_C_8192.yaml
new file mode 100644
index 0000000000..8bb175d211
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/raster_root_C_8192.yaml
@@ -0,0 +1,391 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.125)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ blend-container: true
+ items:
+ - image: checkerboard(0, 512, 16);
+ bounds: [1600, 1600, 8192, 8192]
+ - type: rect
+ color: [180, 140, 120, 0.4]
+ bounds: 2400 2400 8192 8192
+ - type: clip
+ id: 101
+ complex:
+ - rect: [1920, 1920, 4096, 4096]
+ radius: [2048, 2048]
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ - type: "stacking-context"
+ bounds: [0, 0, 8192, 8192]
+ filters: [invert(1)]
+ mix-blend-mode: exclusion
+ clip-chain: 201
+ items:
+ - type: "stacking-context"
+ transform: scale(24)
+ items:
+ - type: line
+ baseline: 16
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 24
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 32
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 40
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: red
+ style: wavy
+ - type: line
+ baseline: 48
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 64
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 80
+ start: 16
+ end: 207 # pruposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 96
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [8, 100, 225, 50]
+ blur-radius: 0
+ offset: [2, 2]
+ color: red
+ - type: line
+ baseline: 112
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: solid
+ - type: line
+ baseline: 120
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dashed
+ - type: line
+ baseline: 128
+ start: 16
+ end: 209
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dotted
+ - type: line
+ baseline: 136
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 145, 225, 65]
+ blur-radius: 1
+ offset: [2, 3]
+ color: red
+ - type: line
+ baseline: 160
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 168
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 184
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 192
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 220, 225, 40]
+ blur-radius: 0
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 248
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 272
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 12
+ thickness: 3
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [0, 320, 240, 140]
+ blur-radius: 3
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 320
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 352
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 368
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 392
+ start: 16
+ end: 208
+ width: 16
+ thickness: 4
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ - type: line
+ baseline: 224
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 240
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 256
+ start: 16
+ end: 208
+ thickness: 1
+ width: 4
+ orientation: vertical
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 272
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 320
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 336
+ start: 16
+ end: 208
+ thickness: 2
+ width: 6
+ orientation: vertical
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [350, 0, 120, 240]
+ blur-radius: 3
+ offset: [5, 2]
+ color: black
+ - type: line
+ baseline: 384
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: yellow
+ style: solid
+ - type: line
+ baseline: 400
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 416
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 440
+ start: 16
+ end: 208
+ thickness: 4
+ width: 16
+ orientation: vertical
+ color: red
+ style: wavy
+ -
+ type: "pop-all-shadows"
+ - text: "side-left"
+ origin: 80 120
+ size: 32
+ transpose: true
+ flip-x: true
+ font: "VeraBd.ttf"
+ color: [40,40,40,1.0]
+ - text: "side-right"
+ origin: 240 240
+ size: 32
+ color: [190,180,200,1.0]
+ transpose: true
+ flip-y: true
+ font: "FreeSans.ttf"
+
diff --git a/gfx/wr/wrench/reftests/text/raster_root_C_ref.yaml b/gfx/wr/wrench/reftests/text/raster_root_C_ref.yaml
new file mode 100644
index 0000000000..4c28f76ced
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/raster_root_C_ref.yaml
@@ -0,0 +1,391 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.5)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ blend-container: true
+ items:
+ - image: checkerboard(0, 128, 16);
+ bounds: [400, 400, 2048, 2048]
+ - type: rect
+ color: [180, 140, 120, 0.4]
+ bounds: 600 600 2048 2048
+ - type: clip
+ id: 101
+ complex:
+ - rect: [480, 480, 1024, 1024]
+ radius: [512, 512]
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ - type: "stacking-context"
+ bounds: [0, 0, 2048, 2048]
+ filters: [invert(1)]
+ mix-blend-mode: exclusion
+ clip-chain: 201
+ items:
+ - type: "stacking-context"
+ transform: scale(6)
+ items:
+ - type: line
+ baseline: 16
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 24
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 32
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 40
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: red
+ style: wavy
+ - type: line
+ baseline: 48
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 64
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 80
+ start: 16
+ end: 207 # pruposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 96
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [8, 100, 225, 50]
+ blur-radius: 0
+ offset: [2, 2]
+ color: red
+ - type: line
+ baseline: 112
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: solid
+ - type: line
+ baseline: 120
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dashed
+ - type: line
+ baseline: 128
+ start: 16
+ end: 209
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dotted
+ - type: line
+ baseline: 136
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 145, 225, 65]
+ blur-radius: 1
+ offset: [2, 3]
+ color: red
+ - type: line
+ baseline: 160
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 168
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 184
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 192
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 220, 225, 40]
+ blur-radius: 0
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 248
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 272
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 12
+ thickness: 3
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [0, 320, 240, 140]
+ blur-radius: 3
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 320
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 352
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 368
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 392
+ start: 16
+ end: 208
+ width: 16
+ thickness: 4
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ - type: line
+ baseline: 224
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 240
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 256
+ start: 16
+ end: 208
+ thickness: 1
+ width: 4
+ orientation: vertical
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 272
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 320
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 336
+ start: 16
+ end: 208
+ thickness: 2
+ width: 6
+ orientation: vertical
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [350, 0, 120, 240]
+ blur-radius: 3
+ offset: [5, 2]
+ color: black
+ - type: line
+ baseline: 384
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: yellow
+ style: solid
+ - type: line
+ baseline: 400
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 416
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 440
+ start: 16
+ end: 208
+ thickness: 4
+ width: 16
+ orientation: vertical
+ color: red
+ style: wavy
+ -
+ type: "pop-all-shadows"
+ - text: "side-left"
+ origin: 80 120
+ size: 32
+ transpose: true
+ flip-x: true
+ font: "VeraBd.ttf"
+ color: [40,40,40,1.0]
+ - text: "side-right"
+ origin: 240 240
+ size: 32
+ color: [190,180,200,1.0]
+ transpose: true
+ flip-y: true
+ font: "FreeSans.ttf"
+
diff --git a/gfx/wr/wrench/reftests/text/reftest.list b/gfx/wr/wrench/reftests/text/reftest.list
new file mode 100644
index 0000000000..4a145ae359
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/reftest.list
@@ -0,0 +1,82 @@
+!= text.yaml blank.yaml
+!= long-text.yaml blank.yaml
+!= negative-pos.yaml blank.yaml
+!= shadow.yaml text.yaml
+!= shadow-single.yaml blank.yaml
+!= shadow-cover-1.yaml blank.yaml
+!= shadow-cover-2.yaml blank.yaml
+
+skip_on(android,device) fuzzy(1,3) == shadow.yaml shadow-ref.yaml # Fails on Pixel2
+fuzzy(1,1) == shadow-huge.yaml shadow-huge-ref.yaml
+!= shadow-cover-1.yaml shadow-cover-2.yaml
+!= shadow-many.yaml shadow.yaml
+!= shadow-complex.yaml shadow-many.yaml
+!= shadow-clipped-text.yaml blank.yaml
+!= non-opaque.yaml non-opaque-notref.yaml
+== decorations.yaml decorations-ref.yaml
+skip_on(android,device) fuzzy(1,3692) fuzzy-if(platform(swgl),3,13540) == decorations-suite.yaml decorations-suite.png # Fails on Pixel2
+== 1658.yaml 1658-ref.yaml
+fuzzy(2,405) fuzzy-if(platform(swgl),2,1510) == split-batch.yaml split-batch-ref.yaml
+# Next 3 tests affected by bug 1548099 on Android
+skip_on(android) == shadow-red.yaml shadow-red-ref.yaml
+skip_on(android) fuzzy(1,999) fuzzy-if(platform(swgl),2,1324) == shadow-grey.yaml shadow-grey-ref.yaml
+skip_on(android) fuzzy(1,828) fuzzy-if(platform(swgl),2,1538) == shadow-grey-transparent.yaml shadow-grey-ref.yaml
+== subtle-shadow.yaml subtle-shadow-ref.yaml
+fuzzy(1,64) == shadow-atomic.yaml shadow-atomic-ref.yaml
+fuzzy(1,64) == shadow-clip-rect.yaml shadow-atomic-ref.yaml
+fuzzy(1,1) platform(linux) == shadow-ordering.yaml shadow-ordering-ref.yaml
+# Next 6 tests affected by bug 1548099 on Android
+skip_on(android) != synthetic-bold.yaml synthetic-bold-not-ref.yaml
+skip_on(android) fuzzy(1,1786) options(disable-subpixel) == synthetic-bold-transparent.yaml synthetic-bold-transparent-ref.yaml
+skip_on(android) != synthetic-bold-transparent.yaml synthetic-bold.yaml
+skip_on(android) != synthetic-italics.yaml synthetic-italics-ref.yaml
+skip_on(android) != synthetic-italics-custom.yaml synthetic-italics-ref.yaml
+skip_on(android) != synthetic-italics-custom.yaml synthetic-italics.yaml
+options(disable-aa) == ahem.yaml ahem-ref.yaml
+platform(linux) == isolated-text.yaml isolated-text.png
+platform(mac) skip_on(mac,>=10.14) fuzzy(3,67) == white-opacity.yaml white-opacity.png
+fuzzy(1,113) platform(linux) options(disable-subpixel) == colors.yaml colors-alpha.png
+fuzzy(1,774) platform(linux) draw_calls(3) == colors.yaml colors-subpx.png
+platform(linux) options(disable-subpixel) == border-radius.yaml border-radius-alpha.png
+platform(linux) == border-radius.yaml border-radius-subpx.png
+options(disable-aa) == transparent-no-aa.yaml transparent-no-aa-ref.yaml
+!= diacritics.yaml diacritics-ref.yaml
+fuzzy(1,30) platform(linux) options(disable-subpixel) == alpha-transform.yaml alpha-transform.png
+fuzzy(1,20) platform(linux) == subpixel-rotate.yaml subpixel-rotate.png
+fuzzy(1,72) platform(linux) == subpixel-scale.yaml subpixel-scale.png
+fuzzy(1,26) platform(linux) == subpixel-skew.yaml subpixel-skew.png
+fuzzy(1,381) platform(linux) == subpixel-translate.yaml subpixel-translate-ref.yaml
+!= shadow-rotate.yaml blank.yaml
+platform(linux) == embedded-bitmaps.yaml embedded-bitmaps.png
+fuzzy(1,13) platform(linux) == clipped-transform.yaml clipped-transform.png
+platform(mac) fuzzy(195,30) == color-bitmap-shadow.yaml color-bitmap-shadow-ref.yaml
+platform(linux) == writing-modes.yaml writing-modes-ref.yaml
+fuzzy(1,5) platform(linux) == blurred-shadow-local-clip-rect.yaml blurred-shadow-local-clip-rect-ref.png
+fuzzy(1,1) platform(linux) == two-shadows.yaml two-shadows.png
+== shadow-clip.yaml shadow-clip-ref.yaml
+== shadow-fast-clip.yaml shadow-fast-clip-ref.yaml
+skip_on(android,device) == shadow-partial-glyph.yaml shadow-partial-glyph-ref.yaml # Fails on Pixel2
+fuzzy(2,212) platform(linux) == shadow-transforms.yaml shadow-transforms.png
+fuzzy(2,370) platform(linux) == raster-space.yaml raster-space.png
+skip_on(android) skip_on(mac,>=10.14) != allow-subpixel.yaml allow-subpixel-ref.yaml # Android: we don't enable sub-px aa on this platform.
+!= large-glyphs.yaml blank.yaml
+!= large-line-decoration.yaml blank.yaml
+skip_on(android,device) == snap-text-offset.yaml snap-text-offset-ref.yaml
+fuzzy(5,4435) == shadow-border.yaml shadow-solid-ref.yaml
+fuzzy(5,4435) == shadow-image.yaml shadow-solid-ref.yaml
+options(disable-aa) == snap-clip.yaml snap-clip-ref.yaml
+platform(linux) == perspective-clip.yaml perspective-clip.png
+fuzzy(1,150) options(disable-subpixel) == raster-space-snap.yaml raster-space-snap-ref.yaml
+# == intermediate-transform.yaml intermediate-transform-ref.yaml # fails because of AA inavailable with an intermediate surface
+fuzzy(1,15) platform(linux) force_subpixel_aa_where_possible(true) == text-fixed-slice.yaml text-fixed-slice-slow.png
+fuzzy(1,15) platform(linux) force_subpixel_aa_where_possible(false) == text-fixed-slice.yaml text-fixed-slice-fast.png
+
+# a 8544x8544 raster root vs. 2136x2136
+# most pixels are off by a small amount, but a few pixels on the edge vary by a lot, pushing up the fuzzy max-diff;
+# the main goal of the test is that everything is in the same place, at the same scale, clipped the same way,
+# despite 4x on-the-fly scale change.
+skip_on(android) fuzzy(120,20800) == raster_root_C_8192.yaml raster_root_C_ref.yaml
+== subpx-bg-mask.yaml subpx-bg-mask-ref.yaml
+platform(linux,mac) == rotate-snap-clip.yaml rotate-snap-clip-ref.yaml
+platform(linux,mac) == rotate-snap-filter.yaml rotate-snap-filter-ref.yaml
+fuzzy-if(env(android,device),47,6860) fuzzy-if(not(env(android,device)),4,6600) == mix-blend-layers.yaml mix-blend-layers-ref.yaml # Android device is Samsung Galaxy A51
diff --git a/gfx/wr/wrench/reftests/text/rotate-snap-clip-ref.yaml b/gfx/wr/wrench/reftests/text/rotate-snap-clip-ref.yaml
new file mode 100644
index 0000000000..b0212e9929
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/rotate-snap-clip-ref.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 400, 30]
+ radius: {
+ top-left: 2,
+ top-right: 2,
+ bottom-left: 2,
+ bottom-right: 2,
+ }
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: stacking-context
+ clip-chain: 12
+ items:
+ - type: stacking-context
+ items:
+ - text: "Should be upright"
+ origin: 20 24
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/rotate-snap-clip.yaml b/gfx/wr/wrench/reftests/text/rotate-snap-clip.yaml
new file mode 100644
index 0000000000..3861bf0e21
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/rotate-snap-clip.yaml
@@ -0,0 +1,29 @@
+# Verify that snapping on a clipped surface with a 180 deg rotation + a local 180 deg rotation works correctly
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 400, 30]
+ radius: {
+ top-left: 2,
+ top-right: 2,
+ bottom-left: 2,
+ bottom-right: 2,
+ }
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: stacking-context
+ clip-chain: 12
+ transform: rotate(180)
+ items:
+ - type: stacking-context
+ transform: rotate(180)
+ items:
+ - text: "Should be upright"
+ origin: 20 24
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/rotate-snap-filter-ref.yaml b/gfx/wr/wrench/reftests/text/rotate-snap-filter-ref.yaml
new file mode 100644
index 0000000000..ae230425ac
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/rotate-snap-filter-ref.yaml
@@ -0,0 +1,14 @@
+# Verify that snapping on a filtered surface with a 180 deg rotation + a local 180 deg rotation works correctly
+---
+root:
+ items:
+ - type: stacking-context
+ filters: [opacity(0.5)]
+ items:
+ - type: stacking-context
+ items:
+ - text: "Should be upright"
+ origin: 20 24
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/rotate-snap-filter.yaml b/gfx/wr/wrench/reftests/text/rotate-snap-filter.yaml
new file mode 100644
index 0000000000..48be649aa2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/rotate-snap-filter.yaml
@@ -0,0 +1,16 @@
+# Verify that snapping on a filtered surface with a 180 deg rotation + a local 180 deg rotation works correctly
+---
+root:
+ items:
+ - type: stacking-context
+ filters: [opacity(0.5)]
+ transform: rotate(180)
+ items:
+ - type: stacking-context
+ transform: rotate(180)
+ items:
+ - text: "Should be upright"
+ origin: 20 24
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/shadow-atomic-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-atomic-ref.yaml
new file mode 100644
index 0000000000..ccf159b5a7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-atomic-ref.yaml
@@ -0,0 +1,81 @@
+---
+root:
+ items:
+# equivalent of shadow with [20, 16] offset
+ -
+ type: line
+ baseline: 61
+ start: 34
+ end: 230
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+ -
+ bounds: [34, 34, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [36, 59, 55.533333, 59, 71.533333, 59, 80.4, 59, 92.833336, 59, 100.833336, 59, 109.7, 59, 122.13333, 59, 130.13333, 59, 139, 59, 155, 59, 169.2, 59, 177.2, 59, 193.2, 59, 207.4, 59, 216.26666, 59]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 48
+ start: 34
+ end: 230
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+# equivalent of shadow with [10, 8] offset
+ -
+ type: line
+ baseline: 53
+ start: 24
+ end: 220
+ width: 3
+ orientation: horizontal
+ color: black
+ style: solid
+ -
+ bounds: [24, 26, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [26, 51, 45.533333, 51, 61.533333, 51, 70.4, 51, 82.833336, 51, 90.833336, 51, 99.7, 51, 112.13333, 51, 120.13333, 51, 129, 51, 145, 51, 159.2, 51, 167.2, 51, 183.2, 51, 197.4, 51, 206.26666, 51]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 40
+ start: 24
+ end: 220
+ width: 3
+ orientation: horizontal
+ color: black
+ style: solid
+# same as shadow-atomic.yaml
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
diff --git a/gfx/wr/wrench/reftests/text/shadow-atomic.yaml b/gfx/wr/wrench/reftests/text/shadow-atomic.yaml
new file mode 100644
index 0000000000..21b9eac876
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-atomic.yaml
@@ -0,0 +1,42 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [20, 16]
+ color: green
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-border.yaml b/gfx/wr/wrench/reftests/text/shadow-border.yaml
new file mode 100644
index 0000000000..b05fb88cb5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-border.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 25
+ bounds: [0, 0, 90, 90]
+ offset: [0, 0]
+ color: [0, 0, 0, 0.8]
+ -
+ type: border
+ bounds: [ 30, 30, 30, 30 ]
+ width: [ 15, 15, 15, 15 ]
+ border-type: normal
+ style: solid
+ color: blue
+ radius: 0
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-clip-rect.yaml b/gfx/wr/wrench/reftests/text/shadow-clip-rect.yaml
new file mode 100644
index 0000000000..6edf6ccb5a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-clip-rect.yaml
@@ -0,0 +1,45 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [20, 16]
+ color: green
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ clip-rect: [14, 18, 205, 35]
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ clip-rect: [14, 18, 205, 35]
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-clip-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-clip-ref.yaml
new file mode 100644
index 0000000000..ff57bfde63
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-clip-ref.yaml
@@ -0,0 +1,11 @@
+# Test that the clip-chain local rect is not applied
+# to the text run being drawn in the shadow. If it was
+# applied, the edges of the quad will be a slightly
+# different color, since the blur will include some
+# clipped out pixels.
+---
+root:
+ items:
+ - type: rect
+ bounds: [28, 28, 80, 80]
+ color: [255, 127, 127, 1]
diff --git a/gfx/wr/wrench/reftests/text/shadow-clip.yaml b/gfx/wr/wrench/reftests/text/shadow-clip.yaml
new file mode 100644
index 0000000000..92b5886acf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-clip.yaml
@@ -0,0 +1,26 @@
+# Test that the clip-chain local rect is not applied
+# to the text run being drawn in the shadow. If it was
+# applied, the edges of the quad will be a slightly
+# different color, since the blur will include some
+# clipped out pixels.
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [28, 28, 80, 80]
+ -
+ type: "shadow"
+ bounds: [0, 0, 200, 200]
+ blur-radius: 2
+ color: [255, 0, 0, 0.5]
+ clip-chain: [2]
+ -
+ bounds: [6, 6, 132, 133]
+ glyphs: [67]
+ offsets: [8, 111]
+ size: 128
+ color: [0, 0, 0, 0]
+ font: "Ahem.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-clipped-text.yaml b/gfx/wr/wrench/reftests/text/shadow-clipped-text.yaml
new file mode 100644
index 0000000000..9ab01d0a3f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-clipped-text.yaml
@@ -0,0 +1,24 @@
+# Tests that the unclipped parts of a shadow still render even if the associated
+# text is clipped out.
+---
+root:
+ items:
+ - type: scroll-frame
+ bounds: [14, 18, 10, 5]
+ content-size: [10, 5]
+ items:
+ -
+ type: "shadow"
+ bounds: [11, 20, 100, 100]
+ blur-radius: 3
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 23, 100, 100]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-complex.yaml b/gfx/wr/wrench/reftests/text/shadow-complex.yaml
new file mode 100644
index 0000000000..e1bfbc1b3a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-complex.yaml
@@ -0,0 +1,46 @@
+--- # The same as shadow-many.yaml, except the shadows only apply to parts of the text
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 5
+ offset: [0, 0]
+ color: black
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [2, 3]
+ color: red
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [-2, 3.5]
+ color: blue
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [3, 76, 86, 3, 87, 75]
+ offsets: [72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [72, 3, 69, 72, 86, 87]
+ offsets: [135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-cover-1.yaml b/gfx/wr/wrench/reftests/text/shadow-cover-1.yaml
new file mode 100644
index 0000000000..088c26f1c5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-cover-1.yaml
@@ -0,0 +1,18 @@
+--- # text covering a shadow
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [0, 0]
+ color: red
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-cover-2.yaml b/gfx/wr/wrench/reftests/text/shadow-cover-2.yaml
new file mode 100644
index 0000000000..c18e277340
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-cover-2.yaml
@@ -0,0 +1,26 @@
+--- # shadow covering text
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [0, 0]
+ color: red
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # text transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
diff --git a/gfx/wr/wrench/reftests/text/shadow-fast-clip-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-fast-clip-ref.yaml
new file mode 100644
index 0000000000..490b7d7b51
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-fast-clip-ref.yaml
@@ -0,0 +1,23 @@
+# Test that fast shadows actually apply clips
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [28, 28, 80, 80]
+ -
+ bounds: [6, 6, 132, 133]
+ text: "overflow text"
+ origin: [9, 101]
+ size: 12
+ color: [0, 0, 0, 1]
+ font: "VeraBd.ttf"
+ clip-chain: [2]
+ -
+ bounds: [6, 6, 132, 133]
+ text: "overflow text"
+ origin: [8, 100]
+ size: 12
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/text/shadow-fast-clip.yaml b/gfx/wr/wrench/reftests/text/shadow-fast-clip.yaml
new file mode 100644
index 0000000000..2a33267c96
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-fast-clip.yaml
@@ -0,0 +1,24 @@
+# Test that fast shadows actually apply clips
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [28, 28, 80, 80]
+ -
+ type: "shadow"
+ bounds: [0, 0, 200, 200]
+ blur-radius: 0
+ offset: [1, 1]
+ color: [0, 0, 0, 1]
+ clip-chain: [2]
+ -
+ bounds: [6, 6, 132, 133]
+ text: "overflow text"
+ origin: [8, 100]
+ size: 12
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ clip-chain: [2]
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-grey-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-grey-ref.yaml
new file mode 100644
index 0000000000..d40d997161
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-grey-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: [100, 100, 100, 1.0]
+
diff --git a/gfx/wr/wrench/reftests/text/shadow-grey-transparent.yaml b/gfx/wr/wrench/reftests/text/shadow-grey-transparent.yaml
new file mode 100644
index 0000000000..ba54ede1e2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-grey-transparent.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: [100, 100, 100, 1.0]
+ -
+ type: "shadow"
+ blur-radius: 2
+ color: [100, 100, 100, 0.2]
+ bounds: [14, 10, 205, 38]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 24
+ color: [0,0,0,0]
+ -
+ type: "pop-all-shadows"
+
diff --git a/gfx/wr/wrench/reftests/text/shadow-grey.yaml b/gfx/wr/wrench/reftests/text/shadow-grey.yaml
new file mode 100644
index 0000000000..a728518ce3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-grey.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: [100, 100, 100, 1.0]
+ -
+ type: "shadow"
+ blur-radius: 2
+ color: [100, 100, 100, 1.0]
+ bounds: [14, 10, 205, 38]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 24
+ color: [0,0,0,0]
+ -
+ type: "pop-all-shadows"
+
diff --git a/gfx/wr/wrench/reftests/text/shadow-huge-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-huge-ref.yaml
new file mode 100644
index 0000000000..c0f8332a9e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-huge-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 600
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-huge.yaml b/gfx/wr/wrench/reftests/text/shadow-huge.yaml
new file mode 100644
index 0000000000..1814dcf1df
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-huge.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 100000000
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-image.yaml b/gfx/wr/wrench/reftests/text/shadow-image.yaml
new file mode 100644
index 0000000000..4d472aadc4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-image.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 25
+ bounds: [0, 0, 90, 90]
+ offset: [0, 0]
+ color: [0, 0, 0, 0.8]
+ -
+ bounds: [ 30, 30, 30, 30 ]
+ image: solid-color(0, 0, 255, 255, 30, 30)
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-many.yaml b/gfx/wr/wrench/reftests/text/shadow-many.yaml
new file mode 100644
index 0000000000..b5daabe669
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-many.yaml
@@ -0,0 +1,30 @@
+--- # the same as shadow.yaml, except there are many shadows with different offsets and colors
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 5
+ offset: [0, 0]
+ color: black
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [2, 3]
+ color: red
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [-2, 3.5]
+ color: blue
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-ordering-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-ordering-ref.yaml
new file mode 100644
index 0000000000..cc0b378cb0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-ordering-ref.yaml
@@ -0,0 +1,131 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [44, 42, 205, 35]
+ blur-radius: 1.0
+ offset: [30, 24]
+ color: blue
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0,0,0,0] # transparent
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [34, 34, 205, 35]
+ blur-radius: 0.0 # no blur to tigger fast shadows
+ offset: [20, 16]
+ color: green
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0,0,0,0] # transparent
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [24, 26, 205, 35]
+ blur-radius: 1.0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0,0,0,0] # transparent
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ type: "pop-all-shadows"
+
+ # real text
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
diff --git a/gfx/wr/wrench/reftests/text/shadow-ordering.yaml b/gfx/wr/wrench/reftests/text/shadow-ordering.yaml
new file mode 100644
index 0000000000..d1969ef09b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-ordering.yaml
@@ -0,0 +1,48 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [44, 42, 205, 35]
+ blur-radius: 1.0
+ offset: [30, 24]
+ color: blue
+ -
+ type: "shadow"
+ bounds: [34, 34, 205, 35]
+ blur-radius: 0.0 # no blur to tigger fast shadows
+ offset: [20, 16]
+ color: green
+ -
+ type: "shadow"
+ bounds: [24, 26, 205, 35]
+ blur-radius: 1.0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-partial-glyph-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-partial-glyph-ref.yaml
new file mode 100644
index 0000000000..e49ec68e97
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-partial-glyph-ref.yaml
@@ -0,0 +1,50 @@
+--- # taking the shadow of multiple copies of a glyph with different clips should look the same as the unclipped glyph
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 2
+ bounds: [14, 18, 205, 35]
+ offset: [40, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 255, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 255, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 255, 1]
+ font: "VeraBd.ttf" \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/text/shadow-partial-glyph.yaml b/gfx/wr/wrench/reftests/text/shadow-partial-glyph.yaml
new file mode 100644
index 0000000000..ccf455d0f6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-partial-glyph.yaml
@@ -0,0 +1,43 @@
+--- # taking the shadow of multiple copies of a glyph with different clips should look the same as the unclipped glyph
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 2
+ bounds: [14, 18, 205, 35]
+ offset: [40, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 255, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 255, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 255, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows" \ No newline at end of file
diff --git a/gfx/wr/wrench/reftests/text/shadow-red-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-red-ref.yaml
new file mode 100644
index 0000000000..6c2f50fba0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-red-ref.yaml
@@ -0,0 +1,5 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: red
diff --git a/gfx/wr/wrench/reftests/text/shadow-red.yaml b/gfx/wr/wrench/reftests/text/shadow-red.yaml
new file mode 100644
index 0000000000..62df9fc39c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-red.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: red
+ -
+ type: "shadow"
+ blur-radius: 1
+ color: red
+ bounds: [14, 10, 205, 38]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 24
+ color: [0,0,0,0]
+ -
+ type: "pop-all-shadows"
+
diff --git a/gfx/wr/wrench/reftests/text/shadow-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-ref.yaml
new file mode 100644
index 0000000000..efc8d2d9f0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-ref.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ - # Compare non-blurred offset shadow to text with all glyphs offset that much
+ bounds: [16, 21, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [18, 46, 37.533333, 46, 53.533333, 46, 62.4, 46, 74.833336, 46, 82.833336, 46, 91.7, 46, 104.13333, 46, 112.13333, 46, 121, 46, 137, 46, 151.2, 46, 159.2, 46, 175.2, 46, 189.4, 46, 198.26666, 46]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ - # Compare blurred offset shadow to shadow
+ type: "shadow"
+ bounds: [12, 314, 205, 35]
+ blur-radius: 5
+ offset: [0, 0]
+ color: red
+ -
+ bounds: [14, 318, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [14, 339, 33.533333, 339, 49.533333, 339, 58.4, 339, 70.833336, 339, 78.833336, 339, 87.7, 339, 100.13333, 339, 108.13333, 339, 117, 339, 133, 339, 147.2, 339, 155.2, 339, 171.2, 339, 185.4, 339, 194.26666, 339]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-rotate.yaml b/gfx/wr/wrench/reftests/text/shadow-rotate.yaml
new file mode 100644
index 0000000000..e0ffc9ac03
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-rotate.yaml
@@ -0,0 +1,18 @@
+--- #checks that transformed text shadows can locate glyphs in the glyph cache
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 430, 330]
+ transform: rotate(30)
+ items:
+ - type: "shadow"
+ bounds: [0, 0, 430, 330]
+ blur-radius: 1
+ offset: [0, 1]
+ color: blue
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 50 200
+ size: 20
+ font: "FreeSans.ttf"
+ - type: "pop-all-shadows"
+
diff --git a/gfx/wr/wrench/reftests/text/shadow-single.yaml b/gfx/wr/wrench/reftests/text/shadow-single.yaml
new file mode 100644
index 0000000000..1804a073ff
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-single.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ bounds: [14, 18, 205, 35]
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-solid-ref.yaml b/gfx/wr/wrench/reftests/text/shadow-solid-ref.yaml
new file mode 100644
index 0000000000..264b1e1096
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-solid-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 25
+ bounds: [0, 0, 90, 90]
+ offset: [0, 0]
+ color: [0, 0, 0, 0.8]
+ -
+ bounds: [30, 30, 30, 30]
+ type: rect
+ style: solid
+ color: blue
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow-transforms.png b/gfx/wr/wrench/reftests/text/shadow-transforms.png
new file mode 100644
index 0000000000..61e50a5547
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-transforms.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/shadow-transforms.yaml b/gfx/wr/wrench/reftests/text/shadow-transforms.yaml
new file mode 100644
index 0000000000..7a75133dab
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow-transforms.yaml
@@ -0,0 +1,58 @@
+# Various tests for rotated text shadows, such as
+# blur radius, offset, shadow color.
+root:
+ items:
+ - type: stacking-context
+ transform: rotate(-30)
+ transform-origin: 80 80
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 350, 100]
+ blur-radius: 5
+ color: [255, 0, 0, 1]
+ - text: "A red shadow"
+ origin: 50 40
+ size: 20
+ font: "FreeSans.ttf"
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [100, 100, 350, 100]
+ blur-radius: 2
+ offset: 10 10
+ color: [0, 255, 0, 0.5]
+ - text: "Red text, green shadow"
+ origin: 150 140
+ size: 20
+ font: "FreeSans.ttf"
+ color: red
+ -
+ type: "pop-all-shadows"
+
+ - type: stacking-context
+ perspective: 100
+ perspective-origin: 650 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ color: [255, 0, 0, 1]
+ offset: [0, 20]
+ -
+ type: "shadow"
+ blur-radius: 0
+ color: [0, 0, 255, 1]
+ offset: [0, -20]
+ - text: "PERSPECTIVE!!!"
+ origin: 500 100
+ size: 100
+ font: "FreeSans.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/shadow.yaml b/gfx/wr/wrench/reftests/text/shadow.yaml
new file mode 100644
index 0000000000..56ffdde93b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/shadow.yaml
@@ -0,0 +1,33 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [2, 3]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ type: "shadow"
+ bounds: [12, 314, 205, 35]
+ blur-radius: 5
+ offset: [-2, -4]
+ color: red
+ -
+ bounds: [14, 318, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 343, 35.533333, 343, 51.533333, 343, 60.4, 343, 72.833336, 343, 80.833336, 343, 89.7, 343, 102.13333, 343, 110.13333, 343, 119, 343, 135, 343, 149.2, 343, 157.2, 343, 173.2, 343, 187.4, 343, 196.26666, 343]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/snap-clip-ref.yaml b/gfx/wr/wrench/reftests/text/snap-clip-ref.yaml
new file mode 100644
index 0000000000..676b7c80c5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/snap-clip-ref.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - bounds: [0, 0, 35, 35]
+ glyphs: [50]
+ offsets: [10, 30]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/snap-clip.yaml b/gfx/wr/wrench/reftests/text/snap-clip.yaml
new file mode 100644
index 0000000000..6ee30aa09b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/snap-clip.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - bounds: [0, 0, 35, 35]
+ glyphs: [50]
+ offsets: [10.3, 30]
+ clip-rect: [0, 0, 29.7, 35]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/snap-text-offset-ref.yaml b/gfx/wr/wrench/reftests/text/snap-text-offset-ref.yaml
new file mode 100644
index 0000000000..51b6a8c7c9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/snap-text-offset-ref.yaml
@@ -0,0 +1,11 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 100]
+ transform: translate(0.5, 0.5)
+ items:
+ - bounds: [0, 0, 200, 100]
+ glyphs: [68, 3, 37, 70, 71, 3, 40, 73, 74, 75]
+ offsets: [20.3, 50, 35, 50, 43, 50.49, 61.2, 50, 75.4, 50, 90.6, 50, 98.8, 50, 116.7, 50, 124.1, 50, 139.5, 50]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/snap-text-offset.yaml b/gfx/wr/wrench/reftests/text/snap-text-offset.yaml
new file mode 100644
index 0000000000..df8c3680d8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/snap-text-offset.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0.5, 0.5, 200, 100]
+ items:
+ - bounds: [0, 0, 200, 100]
+ glyphs: [68, 3, 37, 70, 71, 3, 40, 73, 74, 75]
+ offsets: [20.3, 50, 35, 50, 43, 50.49, 61.2, 50, 75.4, 50, 90.6, 50, 98.8, 50, 116.7, 50, 124.1, 50, 139.5, 50]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/split-batch-ref.yaml b/gfx/wr/wrench/reftests/text/split-batch-ref.yaml
new file mode 100644
index 0000000000..687b051607
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/split-batch-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 650, 670]
+ blur-radius: 2
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [0, 0, 650, 670]
+ glyphs: [55, 45]
+ offsets: [20, 500, 400, 500]
+ size: 500
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/split-batch.yaml b/gfx/wr/wrench/reftests/text/split-batch.yaml
new file mode 100644
index 0000000000..687b051607
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/split-batch.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 650, 670]
+ blur-radius: 2
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [0, 0, 650, 670]
+ glyphs: [55, 45]
+ offsets: [20, 500, 400, 500]
+ size: 500
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/subpixel-rotate.png b/gfx/wr/wrench/reftests/text/subpixel-rotate.png
new file mode 100644
index 0000000000..1eaf89db1f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-rotate.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/subpixel-rotate.yaml b/gfx/wr/wrench/reftests/text/subpixel-rotate.yaml
new file mode 100644
index 0000000000..296afb0d28
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-rotate.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 430, 330]
+ transform: rotate(-30)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 50 200
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/subpixel-scale.png b/gfx/wr/wrench/reftests/text/subpixel-scale.png
new file mode 100644
index 0000000000..5999d2d5dd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-scale.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/subpixel-scale.yaml b/gfx/wr/wrench/reftests/text/subpixel-scale.yaml
new file mode 100644
index 0000000000..84e7b72bfd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-scale.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 680, 80]
+ transform: scale-x(1.5)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/subpixel-skew.png b/gfx/wr/wrench/reftests/text/subpixel-skew.png
new file mode 100644
index 0000000000..9dcfde0088
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-skew.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/subpixel-skew.yaml b/gfx/wr/wrench/reftests/text/subpixel-skew.yaml
new file mode 100644
index 0000000000..7d06f722b2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-skew.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 480, 80]
+ transform: skew-x(30)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/subpixel-translate-ref.yaml b/gfx/wr/wrench/reftests/text/subpixel-translate-ref.yaml
new file mode 100644
index 0000000000..a4377ee76d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-translate-ref.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [80, 80, 80, 80, 80]
+ offsets: [50, 100, 71.111, 100, 92.222, 100, 113.333, 100, 134.444, 100]
+ origin: 0 0
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/subpixel-translate.yaml b/gfx/wr/wrench/reftests/text/subpixel-translate.yaml
new file mode 100644
index 0000000000..940dc6fef7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpixel-translate.yaml
@@ -0,0 +1,13 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ transform: translate(0.444, 0)
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [80, 80, 80, 80, 80]
+ offsets: [50, 100, 71.111, 100, 92.222, 100, 113.333, 100, 134.444, 100]
+ origin: 0 0
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/subpx-bg-mask-ref.yaml b/gfx/wr/wrench/reftests/text/subpx-bg-mask-ref.yaml
new file mode 100644
index 0000000000..782907b5c3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpx-bg-mask-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - text: "A"
+ origin: 20 190
+ size: 180
+ color: black
+ font: "FreeSans.ttf"
diff --git a/gfx/wr/wrench/reftests/text/subpx-bg-mask.yaml b/gfx/wr/wrench/reftests/text/subpx-bg-mask.yaml
new file mode 100644
index 0000000000..4d375d3884
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subpx-bg-mask.yaml
@@ -0,0 +1,28 @@
+# Verify that text on a picture cache slice where the background
+# has a rounded-rect clip correct enables subpixel AA
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: white
+ - type: scroll-frame
+ bounds: [0, 0, 200, 200]
+ content-size: [200, 200]
+ scroll-offset: [0, 0]
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 200, 200]
+ radius: 4
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: white
+ clip-chain: [2]
+ - text: "A"
+ origin: 20 190
+ size: 180
+ color: black
+ font: "FreeSans.ttf"
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/text/subtle-shadow-ref.yaml b/gfx/wr/wrench/reftests/text/subtle-shadow-ref.yaml
new file mode 100644
index 0000000000..54374e1191
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subtle-shadow-ref.yaml
@@ -0,0 +1,27 @@
+--- # incredibly faint shadows showing up as opaque black??
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 255, 85]
+ color: [245, 100, 100, 1.0]
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [0, 1]
+ color: [0.0,0.0,0.0, 0.101961]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 12
+ color: [168, 168, 168, 0.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ - bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 12
+ color: [168, 168, 168, 1.0]
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/subtle-shadow.yaml b/gfx/wr/wrench/reftests/text/subtle-shadow.yaml
new file mode 100644
index 0000000000..67d19e81fd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/subtle-shadow.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 255, 85]
+ color: [245, 100, 100, 1.0]
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [0, 1]
+ color: [0.0,0.0,0.0, 0.101961]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 12
+ color: [168, 168, 168, 1.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/synthetic-bold-not-ref.yaml b/gfx/wr/wrench/reftests/text/synthetic-bold-not-ref.yaml
new file mode 100644
index 0000000000..b947bf4597
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/synthetic-bold-not-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
diff --git a/gfx/wr/wrench/reftests/text/synthetic-bold-transparent-ref.yaml b/gfx/wr/wrench/reftests/text/synthetic-bold-transparent-ref.yaml
new file mode 100644
index 0000000000..c7db0a3426
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/synthetic-bold-transparent-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 660, 210]
+ filters: opacity(0.5)
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
+ synthetic-bold: true
diff --git a/gfx/wr/wrench/reftests/text/synthetic-bold-transparent.yaml b/gfx/wr/wrench/reftests/text/synthetic-bold-transparent.yaml
new file mode 100644
index 0000000000..043a6da781
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/synthetic-bold-transparent.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
+ color: [0, 0, 0, 0.5]
+ synthetic-bold: true
diff --git a/gfx/wr/wrench/reftests/text/synthetic-bold.yaml b/gfx/wr/wrench/reftests/text/synthetic-bold.yaml
new file mode 100644
index 0000000000..8181dbb84e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/synthetic-bold.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
+ synthetic-bold: true
diff --git a/gfx/wr/wrench/reftests/text/synthetic-italics-custom.yaml b/gfx/wr/wrench/reftests/text/synthetic-italics-custom.yaml
new file mode 100644
index 0000000000..00f30a776f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/synthetic-italics-custom.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - text: "Fake italics are great"
+ origin: 20 40
+ size: 20
+ synthetic-italics: 45
+
diff --git a/gfx/wr/wrench/reftests/text/synthetic-italics-ref.yaml b/gfx/wr/wrench/reftests/text/synthetic-italics-ref.yaml
new file mode 100644
index 0000000000..5c5be707f7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/synthetic-italics-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - text: "Fake italics are great"
+ origin: 20 40
+ size: 20
diff --git a/gfx/wr/wrench/reftests/text/synthetic-italics.yaml b/gfx/wr/wrench/reftests/text/synthetic-italics.yaml
new file mode 100644
index 0000000000..fa9b78a3f0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/synthetic-italics.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - text: "Fake italics are great"
+ origin: 20 40
+ size: 20
+ synthetic-italics: true
+
diff --git a/gfx/wr/wrench/reftests/text/text-fixed-slice-fast.png b/gfx/wr/wrench/reftests/text/text-fixed-slice-fast.png
new file mode 100644
index 0000000000..e6d6147219
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/text-fixed-slice-fast.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/text-fixed-slice-slow.png b/gfx/wr/wrench/reftests/text/text-fixed-slice-slow.png
new file mode 100644
index 0000000000..4ccfff39b2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/text-fixed-slice-slow.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/text-fixed-slice.yaml b/gfx/wr/wrench/reftests/text/text-fixed-slice.yaml
new file mode 100644
index 0000000000..9ee4dfcc56
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/text-fixed-slice.yaml
@@ -0,0 +1,27 @@
+# Verify that the option to configure performance / quality settings for
+# subpixel AA with picture caching is respected.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 500, 200]
+ content-size: [500, 500]
+ clip-to-frame: true
+ id: 2
+ items:
+ - type: rect
+ bounds: [0, 0, 500, 200]
+ color: white
+ clip-chain: [2]
+ - type: clip
+ id: 3
+ bounds: [0, 0, 500, 200]
+ - type: rect
+ bounds: [0, 0, 500, 200]
+ color: white
+ clip-chain: [3]
+ - text: "The sun has frightened off the night!"
+ origin: 20 40
+ size: 20
+ font: "FreeSans.ttf"
+ spatial-id: 2
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/text/text.yaml b/gfx/wr/wrench/reftests/text/text.yaml
new file mode 100644
index 0000000000..35e51fa92f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/text.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/transparent-no-aa-ref.yaml b/gfx/wr/wrench/reftests/text/transparent-no-aa-ref.yaml
new file mode 100644
index 0000000000..800b7a9f2a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/transparent-no-aa-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 200, 200]
+ offset: [0, 0]
+ blur-radius: 0
+ color: [0, 0, 0, 0.5]
+ -
+ text: "hello everybody"
+ origin: [10, 20]
+ size: 18
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/transparent-no-aa.yaml b/gfx/wr/wrench/reftests/text/transparent-no-aa.yaml
new file mode 100644
index 0000000000..3a5376f7a2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/transparent-no-aa.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ -
+ text: "hello everybody"
+ origin: [10, 20]
+ size: 18
+ color: [0, 0, 0, 0.5]
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/two-shadows.png b/gfx/wr/wrench/reftests/text/two-shadows.png
new file mode 100644
index 0000000000..3907f1be74
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/two-shadows.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/two-shadows.yaml b/gfx/wr/wrench/reftests/text/two-shadows.yaml
new file mode 100644
index 0000000000..cd16bd1fcf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/two-shadows.yaml
@@ -0,0 +1,24 @@
+--- # A simple example of two shadows
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 2
+ offset: [-2, -2]
+ color: [255, 0, 0, 1]
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 2
+ offset: [2, 2]
+ color: [0, 0, 255, 1]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/gfx/wr/wrench/reftests/text/white-opacity.png b/gfx/wr/wrench/reftests/text/white-opacity.png
new file mode 100644
index 0000000000..69c76b28ae
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/white-opacity.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/text/white-opacity.yaml b/gfx/wr/wrench/reftests/text/white-opacity.yaml
new file mode 100644
index 0000000000..0e16856c14
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/white-opacity.yaml
@@ -0,0 +1,17 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 1000, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 720, 100]
+ color: [211, 211, 211, 1]
+ - type: stacking-context
+ bounds: [0, 0, 500, 100]
+ filters: [opacity(0.4)]
+ items:
+ - text: "Look, no white edges!!"
+ origin: 20 50
+ size: 40
+ color: white
+ font: "VeraBd.ttf"
diff --git a/gfx/wr/wrench/reftests/text/writing-modes-ref.yaml b/gfx/wr/wrench/reftests/text/writing-modes-ref.yaml
new file mode 100644
index 0000000000..c392822e60
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/writing-modes-ref.yaml
@@ -0,0 +1,19 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 60]
+ transform: rotate(-90) translate(-120, 160)
+ items:
+ - text: "This is sideways-left"
+ origin: 0 40
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+ bounds: [0, 0, 300, 60]
+ transform: rotate(90) translate(-90, 120)
+ items:
+ - text: "This is sideways-right"
+ origin: 0 40
+ size: 20
+ font: "FreeSans.ttf"
+
diff --git a/gfx/wr/wrench/reftests/text/writing-modes.yaml b/gfx/wr/wrench/reftests/text/writing-modes.yaml
new file mode 100644
index 0000000000..2c55e209e0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/text/writing-modes.yaml
@@ -0,0 +1,15 @@
+root:
+ items:
+ - text: "This is sideways-left"
+ origin: 20 40
+ size: 20
+ transpose: true
+ flip-x: true
+ font: "FreeSans.ttf"
+ - text: "This is sideways-right"
+ origin: 70 300
+ size: 20
+ transpose: true
+ flip-y: true
+ font: "FreeSans.ttf"
+
diff --git a/gfx/wr/wrench/reftests/tiles/complex-shared-clip-root-ref.yaml b/gfx/wr/wrench/reftests/tiles/complex-shared-clip-root-ref.yaml
new file mode 100644
index 0000000000..6a76d67f33
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/complex-shared-clip-root-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ -
+ type: clip
+ id: 2
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 16
+ - type: rect
+ bounds: [50, 50, 200, 200]
+ color: red
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/tiles/complex-shared-clip-root.yaml b/gfx/wr/wrench/reftests/tiles/complex-shared-clip-root.yaml
new file mode 100644
index 0000000000..3d32a7f006
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/complex-shared-clip-root.yaml
@@ -0,0 +1,25 @@
+# verify that we don't select a shared clip root for a tile cache that has an ancestor complex clip
+---
+root:
+ items:
+ -
+ type: clip
+ id: 2
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 16
+ -
+ type: clip
+ id: 3
+ bounds: [50, 50, 200, 200]
+
+ - type: scroll-frame
+ bounds: 50 50 200 200
+ scroll-offset: [0, 0]
+ id: 10
+ items:
+ - type: rect
+ bounds: [50, 50, 200, 200]
+ color: red
+ spatial-id: 10
+ clip-chain: [3, 2]
diff --git a/gfx/wr/wrench/reftests/tiles/mix-blend-clip-ref.yaml b/gfx/wr/wrench/reftests/tiles/mix-blend-clip-ref.yaml
new file mode 100644
index 0000000000..e31ead5b87
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/mix-blend-clip-ref.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 128, 128]
+ color: magenta
+ - type: stacking-context
+ mix-blend-mode: lighten
+ items:
+ - image: checkerboard(0, 16, 16, 8, 8)
+ bounds: [0, 0, 128, 128]
diff --git a/gfx/wr/wrench/reftests/tiles/mix-blend-clip.yaml b/gfx/wr/wrench/reftests/tiles/mix-blend-clip.yaml
new file mode 100644
index 0000000000..43b68f1787
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/mix-blend-clip.yaml
@@ -0,0 +1,31 @@
+# Test that a backdrop which has both a shared clip (on the tile cache) and is also scrolled
+# correctly calculates the available backdrop rect for a mix-blend on a child.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 128, 128]
+ type: clip
+ id: 2
+ - type: clip-chain
+ id: 12
+ clips: [2]
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: scroll-frame
+ bounds: 0 0 128 512
+ scroll-offset: [0, 128]
+ id: 3
+ items:
+ - type: rect
+ bounds: [0, 0, 128, 512]
+ color: magenta
+ spatial-id: 3
+ clip-chain: 12
+ - type: stacking-context
+ mix-blend-mode: lighten
+ clip-chain: 12
+ items:
+ - image: checkerboard(0, 16, 16, 8, 16)
+ bounds: [0, 0, 128, 256]
diff --git a/gfx/wr/wrench/reftests/tiles/prim-suite.yaml b/gfx/wr/wrench/reftests/tiles/prim-suite.yaml
new file mode 100644
index 0000000000..2a170f8fc9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/prim-suite.yaml
@@ -0,0 +1,45 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: rotate(30)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
+
+ - type: rect
+ bounds: [ 140, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 140, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: outset
+
+ - type: border
+ bounds: [ 250, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+
+ - bounds: [150, 150, 128, 128]
+ image: checkerboard(4, 15, 8)
+ stretch-size: 128 128
+
+ - type: radial-gradient
+ bounds: 300 150 100 100
+ center: 50 50
+ radius: 50 50
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/tiles/rect.yaml b/gfx/wr/wrench/reftests/tiles/rect.yaml
new file mode 100644
index 0000000000..e3f71ac9dd
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/rect.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
diff --git a/gfx/wr/wrench/reftests/tiles/reftest.list b/gfx/wr/wrench/reftests/tiles/reftest.list
new file mode 100644
index 0000000000..800563b87c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/reftest.list
@@ -0,0 +1,7 @@
+** rect.yaml
+fuzzy(1,2000) ** simple-gradient.yaml
+# TODO: Fix rasterizer inaccuracies so this is the same regardless of tile size!
+!* prim-suite.yaml
+== mix-blend-clip.yaml mix-blend-clip-ref.yaml
+platform(linux) == tile-cache-raster-root.yaml tile-cache-raster-root.png
+== complex-shared-clip-root.yaml complex-shared-clip-root-ref.yaml
diff --git a/gfx/wr/wrench/reftests/tiles/simple-gradient.yaml b/gfx/wr/wrench/reftests/tiles/simple-gradient.yaml
new file mode 100644
index 0000000000..0879b2442f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/simple-gradient.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
diff --git a/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.png b/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.png
new file mode 100644
index 0000000000..48ed947ea4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.yaml b/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.yaml
new file mode 100644
index 0000000000..9fc06b7bd5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.yaml
@@ -0,0 +1,43 @@
+# Based on a reduced case from blend-clipped.yaml, ensure that if tile caches don't create
+# raster roots (which messes with the special case handling and positioning of them).
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 111, 1887, 1971]
+ type: iframe
+ id: [1, 3]
+ id: [1, 1]
+pipelines:
+ -
+ id: [1, 3]
+ items:
+ -
+ type: "scroll-frame"
+ id: 2
+ bounds: [0, 0, 1887, 1971]
+ clip-to-frame: true
+ -
+ spatial-id: 2
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, -186, 1887, 239]
+ spatial-id: 2
+ type: clip
+ id: 4
+ -
+ bounds: [-660.45, -186, 0, 0]
+ 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:
+ -
+ bounds: [0, 0, 1887, 239]
+ type: rect
+ color: blue
+ clip-chain: [2, 4]
diff --git a/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml
new file mode 100644
index 0000000000..357981c103
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 0, 0, 200, 44 ]
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml
new file mode 100644
index 0000000000..10db1ae2b2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ transform: scale(-2, 44, 1)
+ items:
+ - type: rect
+ bounds: [ -100, -100, 200, 101 ]
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/blank.yaml b/gfx/wr/wrench/reftests/transforms/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-2.png b/gfx/wr/wrench/reftests/transforms/border-scale-2.png
new file mode 100644
index 0000000000..b848abfbff
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale-2.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-2.yaml b/gfx/wr/wrench/reftests/transforms/border-scale-2.yaml
new file mode 100644
index 0000000000..f841033766
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale-2.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(0.5)
+ items:
+ - type: border
+ bounds: [ 100, 100, 400, 200 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ blue, blue, blue, blue ]
+ radius: {
+ top-left: [100, 100],
+ top-right: [100, 100],
+ bottom-left: [100, 100],
+ bottom-right: [100, 100],
+ }
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-3.png b/gfx/wr/wrench/reftests/transforms/border-scale-3.png
new file mode 100644
index 0000000000..f51553e04f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale-3.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-3.yaml b/gfx/wr/wrench/reftests/transforms/border-scale-3.yaml
new file mode 100644
index 0000000000..9308f2471d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale-3.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: [10,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
+ items:
+ - type: border
+ bounds: [ 5, 50, 20, 100 ]
+ width: [ 10, 1, 10, 1 ]
+ border-type: normal
+ style: solid
+ color: blue
+ radius: {
+ top-left: [5, 50],
+ top-right: [5, 50],
+ bottom-left: [5, 50],
+ bottom-right: [5, 50],
+ }
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-4.png b/gfx/wr/wrench/reftests/transforms/border-scale-4.png
new file mode 100644
index 0000000000..6e1d664f9a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale-4.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-4.yaml b/gfx/wr/wrench/reftests/transforms/border-scale-4.yaml
new file mode 100644
index 0000000000..b2e50bbd2c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale-4.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: [1,0,0,0, 0,10,0,0, 0,0,1,0, 0,0,0,1]
+ items:
+ - type: border
+ bounds: [ 50, 5, 200, 10 ]
+ width: [ 1, 10, 1, 10 ]
+ border-type: normal
+ style: solid
+ color: [ blue, blue, blue, blue ]
+ radius: {
+ top-left: [50, 5],
+ top-right: [50, 5],
+ bottom-left: [50, 5],
+ bottom-right: [50, 5],
+ }
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale.png b/gfx/wr/wrench/reftests/transforms/border-scale.png
new file mode 100644
index 0000000000..6577268663
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/border-scale.yaml b/gfx/wr/wrench/reftests/transforms/border-scale.yaml
new file mode 100644
index 0000000000..4bf10c3029
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-scale.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(10)
+ items:
+ - type: border
+ bounds: [ 5, 5, 20, 10 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: solid
+ color: [ blue, blue, blue, blue ]
+ radius: {
+ top-left: [5, 5],
+ top-right: [5, 5],
+ bottom-left: [5, 5],
+ bottom-right: [5, 5],
+ }
diff --git a/gfx/wr/wrench/reftests/transforms/border-zoom.png b/gfx/wr/wrench/reftests/transforms/border-zoom.png
new file mode 100644
index 0000000000..0bd7cc21ab
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-zoom.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/border-zoom.yaml b/gfx/wr/wrench/reftests/transforms/border-zoom.yaml
new file mode 100644
index 0000000000..d36d66962b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/border-zoom.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ - type: reference-frame
+ transform: scale(4)
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: rotate(-30)
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
diff --git a/gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml b/gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml
new file mode 100644
index 0000000000..412397d90f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: [6, 168, 18, 18]
diff --git a/gfx/wr/wrench/reftests/transforms/clip-translate.yaml b/gfx/wr/wrench/reftests/transforms/clip-translate.yaml
new file mode 100644
index 0000000000..5d4d9a049f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/clip-translate.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.75, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 8, 224, 0, 1]
+ items:
+ - type: clip
+ id: 2
+ image-mask:
+ image: solid-color(255, 0, 0, 255, 24, 24)
+ rect: [0, 0, 24, 24]
+ repeat: false
+ - type: stacking-context
+ clip-chain: [2]
+ items:
+ - type: rect
+ color: red
+ bounds: [0, 0, 24, 24]
diff --git a/gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml b/gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml
new file mode 100644
index 0000000000..9aa0884f62
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml
@@ -0,0 +1,24 @@
+# the root sc should dominate backface-visibility and hide the rect
+
+---
+root:
+ items:
+ -
+ bounds: [300, 300, 300, 300]
+ clip-rect: [300, 300, 300, 300]
+ type: "stacking-context"
+ transform: rotate-y(180)
+ transform-style: flat
+ backface-visible: false
+ items:
+ -
+ type: "stacking-context"
+ transform-style: preserve-3d
+ backface-visible: true
+ items:
+ -
+ bounds: [350, 350, 150, 150]
+ clip-rect: [350, 350, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
+ backface-visible: true
diff --git a/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.png b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.png
new file mode 100644
index 0000000000..5e1b852f49
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml
new file mode 100644
index 0000000000..7cbea35433
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: iframe
+ id: [1, 3]
+ bounds: [100, 100, 128, 256]
+pipelines:
+ -
+ id: [1, 3]
+ items:
+ - type: computed-frame
+ scale-from: [256, 256]
+ vertical-flip: true
+ rotation: 90
+ items:
+ - image: firefox.png
+ bounds: [0, 0, 256, 256]
diff --git a/gfx/wr/wrench/reftests/transforms/content-offset.png b/gfx/wr/wrench/reftests/transforms/content-offset.png
new file mode 100644
index 0000000000..16a39791b2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/content-offset.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/content-offset.yaml b/gfx/wr/wrench/reftests/transforms/content-offset.yaml
new file mode 100644
index 0000000000..379b269fe6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/content-offset.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ perspective: 1000
+ perspective-origin: 0 0
+ "transform-style": "preserve-3d"
+ items:
+ -
+ type: "stacking-context"
+ transform: rotate-x(-45) translate(100, 100, 0)
+ "transform-style": "preserve-3d"
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/coord-system.png b/gfx/wr/wrench/reftests/transforms/coord-system.png
new file mode 100644
index 0000000000..1344ba9248
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/coord-system.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/coord-system.yaml b/gfx/wr/wrench/reftests/transforms/coord-system.yaml
new file mode 100644
index 0000000000..236ebb6d8f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/coord-system.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.102400005, -0.185, 1, -0.0005, 0, 0, 0, 1]
+ items:
+ -
+ type: "scroll-frame"
+ id: 2
+ "content-size": [1024, 740]
+ bounds: [0, 0, 1024, 740]
+ -
+ bounds: [0, 0, 1024, 200]
+ "clip-rect": [0, 0, 1024, 200]
+ 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:
+ -
+ bounds: [0, 0, 1024, 200]
+ "clip-rect": [0, 0, 1024, 200]
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/gfx/wr/wrench/reftests/transforms/firefox.png b/gfx/wr/wrench/reftests/transforms/firefox.png
new file mode 100644
index 0000000000..696ba9c9b5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/firefox.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml b/gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml
new file mode 100644
index 0000000000..fd60bccb4b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: reference-frame
+ transform-style: flat
+ items:
+ - type: reference-frame
+ perspective: 1000
+ transform-style: flat
+ items:
+ - type: reference-frame
+ transform: rotate-z(-45) rotate-x(-75)
+ bounds: 50 0 100 100
+ transform-style: flat
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml b/gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml
new file mode 100644
index 0000000000..d471b052cc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml
@@ -0,0 +1,20 @@
+# This test has a series of flat transforms that affect Z.
+---
+root:
+ items:
+ - type: reference-frame
+ transform: rotate-y(0.0001) # this transform used to affect the Z coordinates during flattening
+ transform-style: flat
+ items:
+ - type: reference-frame
+ perspective: 1000
+ transform-style: flat
+ items:
+ - type: reference-frame
+ transform: rotate-z(-45) rotate-x(-75)
+ bounds: 50 0 100 100
+ transform-style: flat
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml
new file mode 100644
index 0000000000..5dbf829e02
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - bounds: [100, 150, 150, 75]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml
new file mode 100644
index 0000000000..b3507a985a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml
@@ -0,0 +1,23 @@
+# This test ensures that we flatten the trasformations (i.e. zero out Z coordinates)
+# at the boundaries of preserve-3d hierarchies.
+# If the stacking context isn't flattened at the preserve-3d boundary here,
+# it's non-zero Z component starts affecting the screen space position
+# due to the "rotate-x" transform at the top level.
+---
+root:
+ items:
+ -
+ bounds: [100, 100, 0, 0]
+ type: stacking-context
+ transform: rotate-x(60)
+ transform-style: flat
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(0, 0, 200)
+ transform-style: preserve-3d
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml b/gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml
new file mode 100644
index 0000000000..27e4183555
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [100, 100, 200, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/flatten-twice.yaml b/gfx/wr/wrench/reftests/transforms/flatten-twice.yaml
new file mode 100644
index 0000000000..9af750a7c0
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/flatten-twice.yaml
@@ -0,0 +1,21 @@
+# This test ensures that we flatten the "flat" style trasformations.
+# If the flattening doesn't happen here, the rect gets rotated back
+# to the original position.
+---
+root:
+ items:
+ -
+ bounds: [100, 100, 0, 0]
+ type: stacking-context
+ transform: rotate-x(45)
+ transform-origin: 0 0
+ items:
+ -
+ type: "stacking-context"
+ transform: rotate-x(-45)
+ transform-origin: 0 0
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/image-rotated-clip.png b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.png
new file mode 100644
index 0000000000..96439dbc6e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml
new file mode 100644
index 0000000000..71f7300a5f
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ bounds: [18, 18, 400, 400]
+ "clip-rect": [18, 18, 400, 400]
+ type: clip
+ id: 2
+ "content-size": [400, 400]
+ -
+ bounds: [0, 0, 0, 0]
+ clip-chain: [2]
+ type: "stacking-context"
+ transform: [0.70710677, 0.70710677, 0, 0, -0.70710677, 0.70710677, 0, 0, 0, 0, 1, 0, 218, -64.84271, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 400, 400]
+ "clip-rect": [0, 0, 400, 400]
+ image: solid-color(255, 0, 0, 255, 400, 400)
diff --git a/gfx/wr/wrench/reftests/transforms/image.png b/gfx/wr/wrench/reftests/transforms/image.png
new file mode 100644
index 0000000000..c8ec5aefcc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/image.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/large-raster-root.yaml b/gfx/wr/wrench/reftests/transforms/large-raster-root.yaml
new file mode 100644
index 0000000000..0c5176d06d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/large-raster-root.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ perspective: 20
+ items:
+ - type: stacking-context
+ transform: rotate-z(-45) rotate-x(-45)
+ filters: drop-shadow([0, 0], 10000, blue)
+ items:
+ - type: rect
+ bounds: [0, 0, 20000, 100]
+ color: green
diff --git a/gfx/wr/wrench/reftests/transforms/local-clip.png b/gfx/wr/wrench/reftests/transforms/local-clip.png
new file mode 100644
index 0000000000..1f5004902c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/local-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/local-clip.yaml b/gfx/wr/wrench/reftests/transforms/local-clip.yaml
new file mode 100644
index 0000000000..035a97cc17
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/local-clip.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ "clip-rect": [0, 0, 1000, 1000]
+ type: clip
+ id: 3
+ "content-size": [1000, 1000]
+ -
+ bounds: [0, 0, 0, 0]
+ clip-chain: [3]
+ type: "stacking-context"
+ transform: rotate(-45) translate(200, 200)
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ "clip-rect": [0, 0, 100, 100]
+ type: clip
+ id: 4
+ "content-size": [100, 100]
+ -
+ bounds: [2, -182, 152, 216]
+ "clip-rect": [2, 0, 152, 34]
+ clip-chain: [3, 4]
+ image: solid-color(255, 0, 0, 255, 100, 100)
diff --git a/gfx/wr/wrench/reftests/transforms/near-plane-clip.png b/gfx/wr/wrench/reftests/transforms/near-plane-clip.png
new file mode 100644
index 0000000000..05dabb1fe2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/near-plane-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml b/gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml
new file mode 100644
index 0000000000..3bbafca974
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml
@@ -0,0 +1,18 @@
+# Test the calculation for screen bounds for transformed primitives that cross the near plane.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ perspective: 200
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ transform: rotate-x(30)
+ items:
+ -
+ bounds: [350, 200, 260, 300]
+ image: checkerboard(2, 16, 16)
+ stretch-size: 260 260
diff --git a/gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml b/gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml
new file mode 100644
index 0000000000..79007ad26a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ - type: "stacking-context"
+ transform: rotate(45)
+ transform-origin: 450 150
+ raster-space: local(5.0)
+ items:
+ - type: "stacking-context"
+ transform: scale(5)
+ transform-origin: 50 50
+ filters: [identity]
+ raster-space: local(5.0)
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: 10
+ - type: rect
+ clip-chain: [2]
+ bounds: 0 0 100 100
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml b/gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml
new file mode 100644
index 0000000000..6733cdb416
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml
@@ -0,0 +1,24 @@
+# Ensure that local raster scale from a parent is propagated to child surfaces
+---
+root:
+ items:
+ - type: "stacking-context"
+ transform: rotate(45)
+ transform-origin: 450 150
+ raster-space: local(5.0)
+ items:
+ - type: "stacking-context"
+ transform: scale(5)
+ transform-origin: 50 50
+ filters: [identity]
+ raster-space: local(1.0)
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: 10
+ - type: rect
+ clip-chain: [2]
+ bounds: 0 0 100 100
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.png b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.png
new file mode 100644
index 0000000000..686a22cf0a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml
new file mode 100644
index 0000000000..e7f0f05407
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ -
+ bounds: [260, 260, 231, 231]
+ "clip-rect": [260, 260, 231, 231]
+ type: border
+ width: 3
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: dashed
+ -
+ bounds: [300, 300, 0, 0]
+ "clip-rect": [300, 300, 0, 0]
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1]
+ transform-style: preserve-3d
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1]
+ transform-style: preserve-3d
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ "clip-rect": [0, 0, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.png b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.png
new file mode 100644
index 0000000000..ca33ca1336
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml
new file mode 100644
index 0000000000..ed25c8f09d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml
@@ -0,0 +1,27 @@
+# This is the same as nested-rotate-x.yaml but without the preserve-3d.
+---
+root:
+ items:
+ -
+ bounds: [260, 260, 231, 231]
+ "clip-rect": [260, 260, 231, 231]
+ type: border
+ width: 3
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: dashed
+ -
+ bounds: [300, 300, 0, 0]
+ "clip-rect": [300, 300, 0, 0]
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1]
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ "clip-rect": [0, 0, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x.png b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.png
new file mode 100644
index 0000000000..73ad1cec41
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml
new file mode 100644
index 0000000000..f1f8bd36c9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ -
+ bounds: [260, 260, 231, 231]
+ "clip-rect": [260, 260, 231, 231]
+ type: border
+ width: 3
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: dashed
+ -
+ bounds: [300, 300, 0, 0]
+ "clip-rect": [300, 300, 0, 0]
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1]
+ transform-style: preserve-3d
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1]
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ "clip-rect": [0, 0, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
diff --git a/gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml b/gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml
new file mode 100644
index 0000000000..f94404f58e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml
@@ -0,0 +1,23 @@
+# Tests that `get_raster_rects` raster -> world transform is inversible in general,
+# but one of the vertices of the world rectangles can't map back to the raster.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ perspective: 800
+ perspective-origin: 50% 200
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: preserve-3d
+ transform: rotate-z(40) translate(400, 200, 0)
+ margin: 100
+ items:
+ - type: stacking-context
+ bounds: 0 0 1000 1000
+ transform: rotate-y(-75) translate(0, 0, -500)
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-border-radius.png b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.png
new file mode 100644
index 0000000000..29e902025a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml
new file mode 100644
index 0000000000..5eb1f4230c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ perspective: 256
+ items:
+ -
+ bounds: [128, 128, 256, 256]
+ type: "stacking-context"
+ transform: rotate-x(-60) rotate-y(-120)
+ items:
+ - type: clip
+ id: 101
+ complex:
+ - rect: [128, 128, 256, 256]
+ radius: [64, 32]
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ -
+ bounds: [128, 128, 256, 256]
+ type: rect
+ color: blue
+ clip-chain: 201
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml
new file mode 100644
index 0000000000..36df831e19
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: "reference-frame"
+ transform: [1, 0, 0, 0, -0.20399817824363708, 0.05275486409664154, 0.9659258127212524, -0.0008049382013268769, -0.05466114357113838, -1.0211405754089355, 0.258819043636322, -0.00021568253578152508, 52.22355651855469, 242.49476623535156, -247.27700805664063, 1.206064224243164]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "box-shadow"
+ bounds: [30, 0, 507, 512]
+ box-bounds: [30, 0, 507, 512]
+ offset: [-14, 4]
+ blur-radius: 8
+ spread-radius: -4
+ border-radius: 256
+ clip-mode: "inset"
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml
new file mode 100644
index 0000000000..99e247bf49
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "reference-frame"
+ transform: [1, 0, 0, 0, -0.20399817824363708, 0.05275486409664154, 0.9659258127212524, -0.0008049382013268769, -0.05466114357113838, -1.0211405754089355, 0.258819043636322, -0.00021568253578152508, 52.22355651855469, 242.49476623535156, -247.27700805664063, 1.206064224243164]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "box-shadow"
+ bounds: [30, 0, 507, 512]
+ box-bounds: [30, 0, 507, 512]
+ offset: [-14, 4]
+ blur-radius: 8
+ spread-radius: -4
+ border-radius: 256
+ clip-mode: "inset"
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png
new file mode 100644
index 0000000000..0fb321935a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml
new file mode 100644
index 0000000000..82668e28cc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml
@@ -0,0 +1,30 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ bounds: [0, 0, 0, 0]
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -300, -250, 1, -0.5, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: stacking-context
+ transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1]
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: red
+ - type: clip
+ id: 101
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: 16
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: green
+ clip-chain: 201
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip.png b/gfx/wr/wrench/reftests/transforms/perspective-clip.png
new file mode 100644
index 0000000000..ef97fb311e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip.yaml b/gfx/wr/wrench/reftests/transforms/perspective-clip.yaml
new file mode 100644
index 0000000000..bbb9c35efb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-clip.yaml
@@ -0,0 +1,27 @@
+# Test that a local space clip is correctly applied to
+# a primitive with a perspective transform.
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [225, 200, 150, 200]
+ radius: 32
+ -
+ type: "stacking-context"
+ bounds: 0 0 1000 1000
+ perspective: 100
+ perspective-origin: 300 300
+ items:
+ -
+ type: "stacking-context"
+ transform: rotate-x(-10)
+ transform-origin: 300 300
+ filters: identity
+ items:
+ -
+ bounds: [200, 200, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-mask.png b/gfx/wr/wrench/reftests/transforms/perspective-mask.png
new file mode 100644
index 0000000000..02dcddb9f3
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-mask.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-mask.yaml b/gfx/wr/wrench/reftests/transforms/perspective-mask.yaml
new file mode 100644
index 0000000000..9f95549554
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-mask.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ -
+ type: "scroll-frame"
+ id: 2
+ "content-size": [500, 100]
+ bounds: [0, 0, 500, 100]
+ clip-to-frame: true
+ items:
+ -
+ type: "stacking-context"
+ perspective: 125
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 0, 250, 100]
+ transform: rotate-y(54)
+ items:
+ -
+ bounds: [0, 0, 128, 128]
+ type: rect
+ color: red
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-origin.png b/gfx/wr/wrench/reftests/transforms/perspective-origin.png
new file mode 100644
index 0000000000..581d524767
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-origin.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-origin.yaml b/gfx/wr/wrench/reftests/transforms/perspective-origin.yaml
new file mode 100644
index 0000000000..ca5eb5f95c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-origin.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ perspective: 200
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ transform: rotate-x(-45)
+ items:
+ -
+ bounds: [350, 400, 260, 260]
+ image: checkerboard(2, 16, 16)
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-shadow.png b/gfx/wr/wrench/reftests/transforms/perspective-shadow.png
new file mode 100644
index 0000000000..07befbd35b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-shadow.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml b/gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml
new file mode 100644
index 0000000000..8b8e7c87d2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ bounds: [0, 0, 0, 0]
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 139, 0, 1]
+ items:
+ -
+ type: stacking-context
+ bounds: [0, 0, 0, 0]
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -299, -250, 1, -0.5, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: stacking-context
+ transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1]
+ items:
+ -
+ type: box-shadow
+ bounds: [548, 200, 100, 100]
+ color: 0 0 0 0.7020
+ blur-radius: 20
+ -
+ bounds: [548, 200, 100, 100]
+ type: rect
+ color: 0 255 0 1.0000
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.png b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.png
new file mode 100644
index 0000000000..f80f5938d5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml
new file mode 100644
index 0000000000..6888f91c7e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml
@@ -0,0 +1,14 @@
+# Verify that we select a reasonable scale factor for perspective surfaces that don't
+# have a requested scale factor supplied by the caller (based on projected screen rect)
+root:
+ items:
+ - type: "stacking-context"
+ perspective: 1000
+ transform-style: preserve-3d
+ items:
+ - type: "stacking-context"
+ transform-origin: 175 175
+ transform: rotate-x(-20) rotate-y(20)
+ items:
+ - image: checkerboard(2, 22, 16)
+ bounds: [0, 0, 350, 350]
diff --git a/gfx/wr/wrench/reftests/transforms/perspective.png b/gfx/wr/wrench/reftests/transforms/perspective.png
new file mode 100644
index 0000000000..05000384c2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/perspective.yaml b/gfx/wr/wrench/reftests/transforms/perspective.yaml
new file mode 100644
index 0000000000..2ebd0899c6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/perspective.yaml
@@ -0,0 +1,54 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, -1.0606601, -0.35355338, 0.70710677, -0.0035355338, -1.0606601, -1.767767, 0.70710677, -0.0035355338, 306.06604, 335.35535, -70.71068, 1.3535534]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [3.1819804, 1.0606601, -0.70710677, 0.0035355338, 0, 1, 0, 0, -1.7677668, -1.0606601, 0.70710677, -0.0035355338, 381.80194, 93.93398, 70.71068, 0.6464466]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [3.182372, 1.088346, -0.4353384, 0.002176692, -1.0183089, 0.7350135, 0.10599462, -0.00052997307, -4.481691, -1.2350134, 0.89400536, -0.0044700266, 883.5937, 117.66405, 32.93438, 0.8353281]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [0.29134378, -0.9896399, 0.6324555, -0.0015811388, 0.3543281, 1.4948199, -0.31622776, 0.0007905694, -1.1627856, -0.92120904, 0.70710677, -0.0017677669, 235.43283, 649.48206, -31.622776, 1.079057]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 1, 1, 0, 0, -3.5, -3.5, 1, -0.005, 500, 600, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [0.82903755, 0.78133285, 0, 0, -0.5591929, 0.67920226, 0, 0, -5.5, -3.5, 1, -0.005, 1073.0155, 553.9465, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
diff --git a/gfx/wr/wrench/reftests/transforms/prim-suite.png b/gfx/wr/wrench/reftests/transforms/prim-suite.png
new file mode 100644
index 0000000000..0ae3ebe2ed
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/prim-suite.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/prim-suite.yaml b/gfx/wr/wrench/reftests/transforms/prim-suite.yaml
new file mode 100644
index 0000000000..241a2e1c0a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/prim-suite.yaml
@@ -0,0 +1,45 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: rotate(-30)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
+
+ - type: rect
+ bounds: [ 140, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 140, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: outset
+
+ - type: border
+ bounds: [ 250, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+
+ - bounds: [150, 150, 128, 128]
+ image: checkerboard(4, 15, 8)
+ stretch-size: 128 128
+
+ - type: radial-gradient
+ bounds: 300 150 100 100
+ center: 50 50
+ radius: 50 50
+ stops: [0, red, 1, blue]
diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml
new file mode 100644
index 0000000000..acdcc61d56
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml
@@ -0,0 +1,35 @@
+# Tests that raster roots with very large scaling factors do not cause device rects to overflow.
+# See bug 1642440
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform: scale(99999999)
+ transform-style: preserve-3d
+ filters: invert(1)
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform: scale(0.0000001)
+ transform-style: preserve-3d
+ items:
+ - type: clip
+ clip-rect: [0, 0, 60000, 60000]
+ id: 2
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: [20, 20]
+ "clip-mode": clip
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - rect: 0 0 100 100
+ color: red
+ clip-chain: [2]
+ - type: box-shadow
+ bounds: 0 0 100 100
+ color: blue
+ offset: 10 20
+ blur-radius: 10
+ border-radius: [ 20, 20, 20, 20 ]
diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml
new file mode 100644
index 0000000000..15cea6a697
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml
@@ -0,0 +1,28 @@
+# Make sure we don't panic by trying to create an excessively large mask render task
+# See bug 1637796
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform: perspective(300)
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform-style: preserve-3d
+ transform: ["scale(0.001667, 0.001667)"]
+ items:
+ - type: clip
+ clip-rect: [10, 10, 60000, 60000]
+ id: 2
+ complex:
+ - rect: [10, 10, 60000, 60000]
+ radius: [10000, 10000]
+ "clip-mode": clip
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ bounds: 0 0 60000 60000
+ color: blue
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml
new file mode 100644
index 0000000000..925d81951e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml
@@ -0,0 +1,11 @@
+# Tests that the correct device pixel scale is propagated to child surfaces.
+# See bug 1639729
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ filters: invert(1)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 260, 260]
diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml
new file mode 100644
index 0000000000..4455b286e5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml
@@ -0,0 +1,20 @@
+# Tests that the correct device pixel scale is propagated to child surfaces.
+# See bug 1639729
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ transform-style: preserve-3d
+ transform: scale(10,10)
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ # Create a non-raster root surface
+ filters: invert(1)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 26, 26]
diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml
new file mode 100644
index 0000000000..5088e01756
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml
@@ -0,0 +1,10 @@
+
+# Tests that surfaces created by raster roots are scaled based on the surface to parent transform.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 260, 260]
diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml
new file mode 100644
index 0000000000..e7d873888e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml
@@ -0,0 +1,14 @@
+# Tests that surfaces created by raster roots are scaled based on the surface to parent transform.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ transform-style: preserve-3d
+ transform: scale(10,10)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 26, 26]
diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml
new file mode 100644
index 0000000000..99813bacb8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml
@@ -0,0 +1,26 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.125)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ items:
+ - image: checkerboard(0, 512, 16);
+ bounds: [1600, 1600, 8192, 8192]
+ - type: clip
+ id: 101
+ complex:
+ - rect: [2048, 2048, 4096, 4096]
+ radius: [1024, 1024]
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ - type: "stacking-context"
+ bounds: [0, 0, 8192, 8192]
+ mix-blend-mode: difference
+ clip-chain: 201
+ items:
+ - image: checkerboard(0, 4096, 2);
+ bounds: [0, 0, 8192, 8192]
diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml
new file mode 100644
index 0000000000..82073907b6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml
@@ -0,0 +1,26 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.5)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ items:
+ - image: checkerboard(0, 128, 16);
+ bounds: 400 400 2048 2048
+ - type: clip
+ id: 101
+ complex:
+ - rect: [512, 512, 1024, 1024]
+ radius: [256, 256]
+ - type: clip-chain
+ id: 201
+ clips: [101]
+ - type: "stacking-context"
+ bounds: [0, 0, 2048, 2048]
+ mix-blend-mode: difference
+ clip-chain: 201
+ items:
+ - image: checkerboard(0, 1024, 2);
+ bounds: [0, 0, 2048, 2048]
diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml
new file mode 100644
index 0000000000..9f8a58f5cc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ perspective: 100
+ items:
+ - type: stacking-context
+ transform: rotate-z(20) rotate-x(60)
+ filters: [invert(1)]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 20000, 100]
+ color: [20, 120, 18, 1.0]
diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml
new file mode 100644
index 0000000000..3fea3a19db
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ perspective: 100
+ items:
+ - type: stacking-context
+ transform: rotate-z(20) rotate-x(60)
+ filters: [invert(1)]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 4000, 100]
+ color: [20, 120, 18, 1.0]
diff --git a/gfx/wr/wrench/reftests/transforms/reftest.list b/gfx/wr/wrench/reftests/transforms/reftest.list
new file mode 100644
index 0000000000..004caa3197
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/reftest.list
@@ -0,0 +1,59 @@
+platform(linux,mac) == local-clip.yaml local-clip.png
+platform(linux,mac) == rotated-clip.yaml rotated-clip.png
+platform(linux,mac) == rotated-clip-large.yaml rotated-clip-large.png
+platform(linux,mac) == image-rotated-clip.yaml image-rotated-clip.png
+# Something leaks the state: the test passes if only run `reftest reftests/transform`
+# but fails when all the tests are run
+platform(linux,mac) fuzzy(1,6) == rotated-image.yaml rotated-image.png
+== singular.yaml singular-ref.yaml
+platform(linux) fuzzy(1,630) == perspective.yaml perspective.png
+platform(linux,mac) fuzzy(3,8100) == prim-suite.yaml prim-suite.png
+fuzzy(2,26) == segments-bug.yaml segments-bug-ref.yaml
+platform(linux,mac) == content-offset.yaml content-offset.png
+platform(linux,mac) == coord-system.yaml coord-system.png
+platform(linux,mac) fuzzy(1,15) == border-zoom.yaml border-zoom.png
+platform(linux) fuzzy(1,520) == perspective-origin.yaml perspective-origin.png
+platform(linux,mac) color_targets(3) alpha_targets(0) fuzzy(1,180) == screen-space-blit.yaml screen-space-blit.png
+platform(linux,mac) fuzzy(1,346) color_targets(2) alpha_targets(0) == screen-space-blit-trivial.yaml screen-space-blit-trivial.png
+platform(linux) fuzzy(11,4592) == screen-space-blur.yaml screen-space-blur.png
+platform(linux,mac) fuzzy(1,25) == nested-rotate-x.yaml nested-rotate-x.png
+platform(linux,mac) != nested-rotate-x.yaml nested-rotate-x-flat.yaml
+platform(linux,mac) fuzzy(1,25) == nested-rotate-x-flat.yaml nested-rotate-x-flat.png
+platform(linux,mac) fuzzy(1,25) == nested-preserve-3d.yaml nested-preserve-3d.png
+platform(linux,mac) fuzzy(1,283) == near-plane-clip.yaml near-plane-clip.png
+platform(linux,mac) == perspective-mask.yaml perspective-mask.png
+== rotate-clip.yaml rotate-clip-ref.yaml
+== clip-translate.yaml clip-translate-ref.yaml
+platform(linux,mac) fuzzy(1,1) == perspective-clip.yaml perspective-clip.png
+platform(linux,mac) fuzzy(1,2) == perspective-clip-1.yaml perspective-clip-1.png
+platform(linux,mac) fuzzy(1,2) == perspective-shadow.yaml perspective-shadow.png
+# The ref YAML here produces significantly worse quality
+fuzzy(200,4200) == perspective-box-shadow.yaml perspective-box-shadow-ref.yaml
+== complex-preserve-3d.yaml blank.yaml
+platform(linux,mac) fuzzy(38,348) == perspective-border-radius.yaml perspective-border-radius.png
+fuzzy(1,38) == snapped-preserve-3d.yaml snapped-preserve-3d-ref.yaml
+platform(linux,mac) fuzzy(1,122) == border-scale.yaml border-scale.png
+platform(linux,mac) fuzzy(1,16) == border-scale-2.yaml border-scale-2.png
+platform(linux,mac) fuzzy(1,69) == border-scale-3.yaml border-scale-3.png
+platform(linux,mac) fuzzy(1,74) == border-scale-4.yaml border-scale-4.png
+# Just make sure we aren't crashing here
+!= large-raster-root.yaml blank.yaml
+== flatten-preserve-3d-root.yaml flatten-preserve-3d-root-ref.yaml
+== flatten-twice.yaml flatten-twice-ref.yaml
+fuzzy(1,10) == flatten-all-flat.yaml flatten-all-flat-ref.yaml
+== strange-w.yaml strange-w-ref.yaml
+== big-axis-aligned-scale.yaml big-axis-aligned-scale-ref.yaml
+# Compare ~8K raster root (>MAX_SURFACE_SIZE) with ~2K raster root. fuzzy due to lerping on edges.
+skip_on(android) fuzzy(56,804) == raster_root_A_8192.yaml raster_root_A_ref.yaml
+# Same as large-raster-root.yaml but resulting in a 10302×100 raster root (= >4096) vs 4000x100 in ref:
+skip_on(android) fuzzy(60,917) == raster_root_B_8192.yaml raster_root_B_ref.yaml
+# Make sure we don't panic
+!= raster-root-large-mask.yaml blank.yaml
+skip_on(android) == raster-root-scaling.yaml raster-root-scaling-ref.yaml
+skip_on(android) == raster-root-scaling-2.yaml raster-root-scaling-2-ref.yaml
+# Make sure we don't panic
+!= raster-root-huge-scale.yaml blank.yaml
+!= non-inversible-world-rect.yaml blank.yaml
+== nested-local-scale.yaml nested-local-scale-ref.yaml
+platform(linux,mac) == perspective-surface-scale.yaml perspective-surface-scale.png
+fuzzy(1,8762) == computed-rotation-yflip.yaml computed-rotation-yflip.png
diff --git a/gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml b/gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml
new file mode 100644
index 0000000000..133279fca8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ bounds: [100, 146, 150, 107]
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/gfx/wr/wrench/reftests/transforms/rotate-clip.yaml b/gfx/wr/wrench/reftests/transforms/rotate-clip.yaml
new file mode 100644
index 0000000000..c1c01d0dc4
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotate-clip.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ type: clip
+ id: 2
+ bounds: [0, 0, 2000, 2000]
+ clip-rect: [0, 0, 2000, 2000]
+ -
+ bounds: [100, 0, 150, 150]
+ type: "stacking-context"
+ transform: rotate-x(45)
+ transform-origin: [0, 500]
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ type: rect
+ color: 0 128 0 1.0000
+ clip-chain: [2]
diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip-large.png b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.png
new file mode 100644
index 0000000000..5503d6bd81
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml
new file mode 100644
index 0000000000..cfea755a1e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ bounds: 100 100 300 300
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [20, 20, 200, 200]
+ radius: 32
+ - type: rect
+ bounds: 20 20 200 200
+ color: blue
+ clip-chain: [2]
+ type: stacking-context
+ transform: rotate(-33)
diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip.png b/gfx/wr/wrench/reftests/transforms/rotated-clip.png
new file mode 100644
index 0000000000..5a97509644
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotated-clip.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip.yaml b/gfx/wr/wrench/reftests/transforms/rotated-clip.yaml
new file mode 100644
index 0000000000..534685541b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotated-clip.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ bounds: 100 100 100 100
+ items:
+ - type: clip
+ id: 2
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ - type: rect
+ bounds: 20 20 100 100
+ color: blue
+ clip-chain: [2]
+ type: stacking-context
+ transform: rotate(-30)
diff --git a/gfx/wr/wrench/reftests/transforms/rotated-image.png b/gfx/wr/wrench/reftests/transforms/rotated-image.png
new file mode 100644
index 0000000000..012ffe6045
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotated-image.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/rotated-image.yaml b/gfx/wr/wrench/reftests/transforms/rotated-image.yaml
new file mode 100644
index 0000000000..382aac71e7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/rotated-image.yaml
@@ -0,0 +1,72 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "backface-visible": true
+ type: clip
+ id: 10
+ "content-size": [2880, 1482]
+ -
+ "clip-rect": [0, 0, 2880, 1482]
+ "backface-visible": true
+ type: "scroll-frame"
+ id: 2
+ "content-size": [2880, 1482]
+ bounds: [0, 0, 2880, 1482]
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "backface-visible": true
+ type: clip
+ id: 3
+ "content-size": [2880, 1482]
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ clip-chain: [10, 3]
+ "backface-visible": true
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ transform: rotate-z(-1)
+ "transform-style": flat
+ items:
+ -
+ bounds: [2, 2, 200, 200]
+ "clip-rect": [2, 2, 200, 200]
+ "backface-visible": true
+ type: clip
+ id: 4
+ "content-size": [200, 200]
+ -
+ bounds: [2, -182, 152, 216]
+ "clip-rect": [2, 0, 152, 34]
+ clip-chain: [10, 3, 4]
+ "backface-visible": true
+ image: "image.png"
+ "stretch-size": [152, 216]
+ "tile-spacing": [0, 0]
+ -
+ bounds: [0, 0, 204, 204]
+ "clip-rect": [0, 0, 204, 204]
+ "backface-visible": true
+ type: border
+ width: 2
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: solid
+ id: [1, 1]
+pipelines: []
diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.png b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.png
new file mode 100644
index 0000000000..a3cd78ba6b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml
new file mode 100644
index 0000000000..76b2578faa
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml
@@ -0,0 +1,22 @@
+# This test is similar to "screen-space-blit" but without filters,
+# so the implementation doesn't attempt to bake the contents
+# into a separate render target.
+---
+root:
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+ transform: rotate-z(-45)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit.png b/gfx/wr/wrench/reftests/transforms/screen-space-blit.png
new file mode 100644
index 0000000000..39b7afb8e8
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/screen-space-blit.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml b/gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml
new file mode 100644
index 0000000000..0bae3a3736
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml
@@ -0,0 +1,22 @@
+# This test uses `identity` filter on a preserve3D context to test how
+# filters mix up with the SC's baking for preserve3d.
+---
+root:
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ filters: identity
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+ transform: rotate-z(-45)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blur.png b/gfx/wr/wrench/reftests/transforms/screen-space-blur.png
new file mode 100644
index 0000000000..86ce88f896
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/screen-space-blur.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml b/gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml
new file mode 100644
index 0000000000..6d93260c83
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml
@@ -0,0 +1,20 @@
+root:
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ filters: blur(3, 3)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+ transform: rotate-z(-45)
+ filters: blur(3, 3)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
diff --git a/gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml b/gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml
new file mode 100644
index 0000000000..528a440e5b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [12, 12, 130, 130]
+ radius: 20
+ "clip-mode": clip
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [12, 12, 130, 130]
+ clip-chain: [4]
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/gfx/wr/wrench/reftests/transforms/segments-bug.yaml b/gfx/wr/wrench/reftests/transforms/segments-bug.yaml
new file mode 100644
index 0000000000..6ac89e094b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/segments-bug.yaml
@@ -0,0 +1,26 @@
+# Test that opaque/alpha segments are correctly calculated
+# when the clip is in a different (but compatible) coordinate
+# space from the primitive.
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [12, 12, 130, 130]
+ radius: 20
+ "clip-mode": clip
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 12, 12, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 130, 130]
+ type: rect
+ color: 0 128 0 1.0000
+ clip-chain: [4]
diff --git a/gfx/wr/wrench/reftests/transforms/singular-ref.yaml b/gfx/wr/wrench/reftests/transforms/singular-ref.yaml
new file mode 100644
index 0000000000..4d31e4f89c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/singular-ref.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ "clip-rect": [0, 0, 200, 200]
+ type: clip
+ id: 2
+ "content-size": [200, 200]
+ -
+ bounds: [0, 100, 100, 100]
+ "clip-rect": [0, 100, 100, 100]
+ clip-chain: [2]
+ type: rect
+ color: blue
+ -
+ bounds: [100, 0, 100, 100]
+ "clip-rect": [100, 0, 100, 100]
+ clip-chain: [2]
+ type: rect
+ color: green
+ -
+ bounds: [100, 100, 100, 100]
+ "clip-rect": [100, 100, 100, 100]
+ clip-chain: [2]
+ type: rect
+ color: red
+
diff --git a/gfx/wr/wrench/reftests/transforms/singular.yaml b/gfx/wr/wrench/reftests/transforms/singular.yaml
new file mode 100644
index 0000000000..9778518695
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/singular.yaml
@@ -0,0 +1,39 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ "clip-rect": [0, 0, 200, 200]
+ type: clip
+ id: 2
+ "content-size": [200, 200]
+ -
+ bounds: [10, 10, 80, 80]
+ clip-chain: [2]
+ type: "stacking-context"
+ transform: [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 80, 80]
+ "clip-rect": [0, 0, 80, 80]
+ type: rect
+ color: black
+ -
+ bounds: [0, 100, 100, 100]
+ "clip-rect": [0, 100, 100, 100]
+ clip-chain: [2]
+ type: rect
+ color: blue
+ -
+ bounds: [100, 0, 100, 100]
+ "clip-rect": [100, 0, 100, 100]
+ clip-chain: [2]
+ type: rect
+ color: green
+ -
+ bounds: [100, 100, 100, 100]
+ "clip-rect": [100, 100, 100, 100]
+ clip-chain: [2]
+ type: rect
+ color: red
+
diff --git a/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml
new file mode 100644
index 0000000000..a2e8972981
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10.5, 0)
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10, 0)
+ items:
+ -
+ bounds: [10, 10.5, 200, 1]
+ type: rect
+ color: red
+ -
+ bounds: [10, 0, 200, 1]
+ type: rect
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml
new file mode 100644
index 0000000000..cd2cd8b1a7
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10.5, 0)
+ "transform-style": "preserve-3d"
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10, 0)
+ "transform-style": "preserve-3d"
+ items:
+ -
+ bounds: [10, 10.5, 200, 1]
+ type: rect
+ color: red
+ -
+ bounds: [10, 0, 200, 1]
+ type: rect
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml b/gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml
new file mode 100644
index 0000000000..be50589d2a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 600, 600]
+ perspective: 20
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: [25, 25, 50, 50]
+ color: red
diff --git a/gfx/wr/wrench/reftests/transforms/strange-w.yaml b/gfx/wr/wrench/reftests/transforms/strange-w.yaml
new file mode 100644
index 0000000000..8e2a71b197
--- /dev/null
+++ b/gfx/wr/wrench/reftests/transforms/strange-w.yaml
@@ -0,0 +1,15 @@
+# don't assume w=1 when checking if the transform is just a translation
+
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 600, 600]
+ perspective: 20
+ items:
+ - type: stacking-context
+ transform: [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,2]
+ items:
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: red