21 -webkit-backface-visibility: hidden;
25 background-color: green
29 background-color: blue
33 background-color: lime
63 <!-- This test checks various configurations of backface visibility when there is a 3d
64 rendering context. -->
66 <!-- The blue div is a 3d rendering context, containing the lime div. No back faces are
67 visible, so we should see all three divs. -->
68 <div class=
"large green" id=
"testCase1">
69 <div class=
"medium blue" style=
"-webkit-backface-visibility: hidden; transform: rotateY(0deg); -webkit-transform-style: preserve-3d">
70 <div class=
"small lime" style=
"-webkit-backface-visibility: hidden; transform: rotateX(0deg)">
75 <!-- The blue div is a 3d rendering context, containing the lime div. The lime div should
76 inherit the blue div's transform, so both divs are showing their backface and both
78 <div class=
"large green" id=
"testCase2">
79 <div class=
"medium blue" style=
"-webkit-backface-visibility: hidden; transform: rotateY(180deg); -webkit-transform-style: preserve-3d">
80 <div class=
"small lime" style=
"-webkit-backface-visibility: hidden; transform: rotateX(0deg)">
85 <!-- The blue div is a 3d rendering context, containing the lime div. The lime div should
86 become invisible when it shows its backface. -->
87 <div class=
"large green" id=
"testCase3">
88 <div class=
"medium blue" style=
"-webkit-backface-visibility: hidden; transform: rotateY(0deg); -webkit-transform-style: preserve-3d">
89 <div class=
"small lime" style=
"-webkit-backface-visibility: hidden; transform: rotateX(180deg)">
94 <!-- The blue div is a 3d rendering context, containing the lime div. The lime div should
95 inherit the blue div's transform, but because it flips twice (once around Y, once
96 around X), its shows its front face and should be visible. This happens BEFORE the
97 lime div flattens to the rendering context, so the lime div should remain visible. -->
98 <div id=
"testCase4" class=
"large green">
99 <div class=
"medium blue" style=
"-webkit-backface-visibility: hidden; transform: rotateY(180deg); -webkit-transform-style: preserve-3d">
100 <div class=
"small lime" style=
"-webkit-backface-visibility: hidden; transform: rotateX(180deg)">
106 if (window
.testRunner
) {
107 testRunner
.dumpAsTextWithPixelResults(); // This is only useful as a pixel test.
108 document
.write("<span style='position:absolute; top:-5000px'>This test is only useful as a pixel test</span>");