| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 body { | 3 body { |
| 4 margin: 0; | 4 margin: 0; |
| 5 } | 5 } |
| 6 | 6 |
| 7 #indicator { | 7 #indicator { |
| 8 position: absolute; | 8 position: absolute; |
| 9 top: 200px; | 9 top: 200px; |
| 10 width: 100px; | 10 width: 100px; |
| 11 height: 100px; | 11 height: 100px; |
| 12 background-color: red; | 12 background-color: red; |
| 13 } | 13 } |
| 14 | 14 |
| 15 #block { | 15 #block { |
| 16 position: relative; | 16 position: relative; |
| 17 width: 100px; | 17 width: 100px; |
| 18 height: 100px; | 18 height: 100px; |
| 19 top: 100px; | 19 top: 100px; |
| 20 background-color: green; | 20 background-color: green; |
| 21 } | 21 } |
| 22 | 22 |
| 23 #composited-non-stacking-context { | 23 #composited-non-stacking-context { |
| 24 width: 20px; | 24 width: 20px; |
| 25 height: 20px; | 25 height: 20px; |
| 26 background-color: white; | 26 background-color: white; |
| 27 backface-visibility: hidden; | 27 backface-visibility: hidden; |
| 28 } | 28 } |
| 29 </style> | 29 </style> |
| 30 <div id="indicator"></div> | 30 <div id="indicator">The test fails if you see this.</div> |
| 31 <div id="composited-non-stacking-context"> | 31 <div id="composited-non-stacking-context"> |
| 32 <div id="block"></div> | 32 <div id="block">The test passes if there is no red.</div> |
| 33 </div> | 33 </div> |
| 34 This test passes if there is a green square without red. | |
| 35 <script src="../../resources/run-after-layout-and-paint.js"></script> | 34 <script src="../../resources/run-after-layout-and-paint.js"></script> |
| 36 <script> | 35 <script> |
| 37 runAfterLayoutAndPaint(function() { | 36 runAfterLayoutAndPaint(function() { |
| 38 document.getElementById("block").style.top = "200px"; | 37 document.getElementById("block").style.top = "200px"; |
| 39 }, true); | 38 }, true); |
| 40 </script> | 39 </script> |
| OLD | NEW |