| OLD | NEW |
| 1 <!-- Based on fast/repaint/child-of-sub-pixel-offset-composited-layer.html --> |
| 1 <!DOCTYPE html> | 2 <!DOCTYPE html> |
| 2 <html> | 3 <html> |
| 3 <head> | 4 <head> |
| 4 <style> | 5 <style> |
| 5 .container { | 6 .container { |
| 6 transform: translateZ(0); | 7 transform: translateZ(0); |
| 7 position: absolute; | 8 position: absolute; |
| 8 top: 100px; | 9 top: 100px; |
| 9 left:100.5px; | 10 left:100.5px; |
| 10 background-color: red; | 11 background-color: red; |
| 11 } | 12 } |
| 12 | 13 |
| 13 #target { | 14 #target { |
| 14 position: absolute; | 15 position: absolute; |
| 15 left: 0px; | 16 left: 0px; |
| 16 width: 10px; | 17 width: 10px; |
| 17 height: 10px; | 18 height: 10px; |
| 18 border: 2px solid red; | 19 border: 2px solid red; |
| 19 } | 20 } |
| 20 | 21 |
| 21 #target.green { | 22 #target.green { |
| 22 border-color: green; | 23 border-color: green; |
| 23 } | 24 } |
| 24 </style> | 25 </style> |
| 25 <script src="resources/text-based-repaint.js" type="text/javascript"></script> | 26 <script src="resources/paint-invalidation-test.js" type="text/javascript"></scri
pt> |
| 26 </head> | 27 </head> |
| 27 <body onload="runRepaintTest();"> | 28 <body onload="runPaintInvalidationTest();"> |
| 28 <div class="container"> | 29 <div class="container"> |
| 29 <div id="target"> | 30 <div id="target"> |
| 30 </div> | 31 </div> |
| 31 </div> | 32 </div> |
| 32 <script> | 33 <script> |
| 33 // This test ensures that children of a composited element with a sub-pixel offs
et are properly repainted. | 34 // This test ensures that children of a composited element with a sub-pixel offs
et are properly repainted. |
| 34 // The box should have a fully green border. | 35 // The box should have a fully green border. |
| 35 if (window.testRunner) | 36 window.expectedPaintInvalidationObjects = [ |
| 36 testRunner.dumpAsTextWithPixelResults(); | 37 "LayoutBlockFlow (positioned) DIV id='target' class='green'", |
| 37 function repaintTest() { | 38 ]; |
| 39 function paintInvalidationTest() { |
| 38 var target = document.getElementById('target'); | 40 var target = document.getElementById('target'); |
| 39 target.classList.add('green'); | 41 target.classList.add('green'); |
| 40 } | 42 } |
| 41 </script> | 43 </script> |
| OLD | NEW |