<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.box { | |
height: 100px; | |
width: 100px; | |
margin: 30px; | |
background-color: blue; | |
} | |
.shadowed { | |
box-shadow: 10px 10px 20px black; | |
} | |
</style> | |
<script> | |
if (window.testRunner) | |
testRunner.dumpAsText(); | |
function doTest() | |
{ | |
if (!window.testRunner || !window.internals) | |
return; | |
window.internals.startTrackingRepaints(); | |
document.getElementById('box').classList.add('shadowed'); | |
document.getElementById('repaints').textContent = window.internals.repaintRectsAsText(); | |
window.internals.stopTrackingRepaints(); | |
} | |
window.addEventListener('load', doTest, false); | |
</script> | |
</head> | |
<body> | |
<div id="box" class="box"> | |
</div> | |
<h2>Repaint rects:</h2> | |
<pre id="repaints"></pre> | |
</body> | |
</html> |