diff options
Diffstat (limited to '')
17 files changed, 263 insertions, 0 deletions
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 |