| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <link rel="stylesheet" href="resources/default.css"> | 3 <link rel="stylesheet" href="resources/default.css"> |
| 4 <style> | 4 <style> |
| 5 ::-webkit-scrollbar { | 5 ::-webkit-scrollbar { |
| 6 width: 0px; | 6 width: 0px; |
| 7 height: 0px; | 7 height: 0px; |
| 8 } | 8 } |
| 9 html { | 9 html { |
| 10 overflow: scroll; | 10 overflow: scroll; |
| 11 } | 11 } |
| 12 .fixed { |
| 13 opacity: 0.99; /* Using 99% opacity on fixed pos elements to ensure
they are not automatically promoted. */ |
| 14 } |
| 12 </style> | 15 </style> |
| 13 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip
t> | 16 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip
t> |
| 14 <script type="text/javascript"> | 17 <script type="text/javascript"> |
| 15 window.enablePixelTesting = true; | 18 window.enablePixelTesting = true; |
| 16 window.onload = function() { | 19 window.onload = function() { |
| 17 window.scrollTo(0, 500); | 20 window.scrollTo(0, 500); |
| 18 runRepaintTest(); | 21 runRepaintTest(); |
| 19 }; | 22 }; |
| 20 | 23 |
| 21 function repaintTest() | 24 function repaintTest() |
| 22 { | 25 { |
| 23 document.getElementById('absoluteDiv').style.top = '700px'; | 26 document.getElementById('absoluteDiv').style.top = '700px'; |
| 24 } | 27 } |
| 25 </script> | 28 </script> |
| 26 </head> | 29 </head> |
| 27 <body style="height:2000px;"> | 30 <body style="height:2000px;"> |
| 28 <!-- You should see 1 green rectangle in the output and no red. --> | 31 <!-- You should see 1 green rectangle in the output and no red. --> |
| 29 <div style="top: 200px; left: 100px;" class="fixed red"></div> | 32 <div style="top: 200px; left: 100px;" class="fixed red"></div> |
| 30 <div id="absoluteDiv" style="top: 500px; left:100px;" class="absolute green"
></div> | 33 <div id="absoluteDiv" style="top: 500px; left:100px;" class="absolute green"
></div> |
| 31 </body> | 34 </body> |
| 32 </html> | 35 </html> |
| OLD | NEW |