| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <style> | 3 <style> |
| 4 #container { | 4 #container { |
| 5 position: relative; | 5 position: relative; |
| 6 width: 100px; | 6 width: 100px; |
| 7 height: 50px; | 7 height: 50px; |
| 8 transform: translateZ(0); | 8 transform: translateZ(0); |
| 9 } | 9 } |
| 10 #test { | 10 #test { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 document.getElementById('test').style.left = testData[testIndex][1]; | 43 document.getElementById('test').style.left = testData[testIndex][1]; |
| 44 runAfterLayoutAndPaint(runTest); | 44 runAfterLayoutAndPaint(runTest); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 function runTest() { | 47 function runTest() { |
| 48 if (window.internals) | 48 if (window.internals) |
| 49 internals.startTrackingRepaints(document); | 49 internals.startTrackingRepaints(document); |
| 50 document.getElementById('test').style.left = testData[testIndex][2]; | 50 document.getElementById('test').style.left = testData[testIndex][2]; |
| 51 if (window.internals) { | 51 if (window.internals) { |
| 52 document.getElementById('console').textContent += testData[testIndex] +
':\n' | 52 document.getElementById('console').textContent += testData[testIndex] +
':\n' |
| 53 + internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_
REPAINT_RECTS); | 53 + internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_
PAINT_INVALIDATIONS); |
| 54 internals.stopTrackingRepaints(document); | 54 internals.stopTrackingRepaints(document); |
| 55 } | 55 } |
| 56 | 56 |
| 57 if (++testIndex < testData.length) { | 57 if (++testIndex < testData.length) { |
| 58 repaintTest(); | 58 repaintTest(); |
| 59 } else { | 59 } else { |
| 60 // Display the test results only after test is done so that it does not
affect repaint rect results. | 60 // Display the test results only after test is done so that it does not
affect repaint rect results. |
| 61 document.getElementById('console').style.display = "block"; | 61 document.getElementById('console').style.display = "block"; |
| 62 if (window.testRunner) | 62 if (window.testRunner) |
| 63 testRunner.notifyDone(); | 63 testRunner.notifyDone(); |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 </script> | 66 </script> |
| 67 <body onload="repaintTest()"> | 67 <body onload="repaintTest()"> |
| 68 <div id="container"><div id="test"></div></div> | 68 <div id="container"><div id="test"></div></div> |
| 69 <pre id="console"></pre> | 69 <pre id="console"></pre> |
| OLD | NEW |