OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 #square { | 3 #square { |
4 background-color: blue; | 4 background-color: blue; |
5 width: 30px; | 5 width: 30px; |
6 height: 30px; | 6 height: 30px; |
7 position: relative; | 7 position: relative; |
8 -webkit-backface-visibility: hidden; | 8 -webkit-backface-visibility: hidden; |
9 } | 9 } |
10 | 10 |
11 #testResults { | 11 #testResults { |
12 display: none; | 12 display: none; |
13 } | 13 } |
14 </style> | 14 </style> |
15 | 15 |
| 16 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
16 <script> | 17 <script> |
17 if (window.testRunner) { | 18 function repaintTest() { |
18 testRunner.dumpAsText(); | |
19 } | |
20 | |
21 onload = function() { | |
22 if (!window.internals) | |
23 return; | |
24 | |
25 window.internals.startTrackingRepaints(document); | |
26 | |
27 // Remove the div's only compositing reason. This should trigger a repaint. | 19 // Remove the div's only compositing reason. This should trigger a repaint. |
28 document.getElementById("square").style.webkitBackfaceVisibility = "visible"
; | 20 document.getElementById("square").style.webkitBackfaceVisibility = "visible"
; |
29 document.getElementById("layertree").textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | |
30 window.internals.stopTrackingRepaints(document); | |
31 | |
32 document.getElementById("testResults").style.display = "block"; | |
33 } | 21 } |
| 22 runRepaintTest(); |
34 </script> | 23 </script> |
35 | 24 |
36 <div id="square"></div> | 25 <div id="square"></div> |
37 | |
38 <div id="testResults"> | |
39 <pre id="layertree"></pre> | |
40 </div> | |
OLD | NEW |