blob: b744bf2039946e03dd368d4e5cbafd02dcdc8cbc [file] [log] [blame]
<!-- Based on fast/repaint/selection-clear-after-move.html -->
<!DOCTYPE html>
<script src="../../../fast/repaint/../../resources/run-after-layout-and-paint.js"></script>
<script src="resources/paint-invalidation-test.js"></script>
<script>
function paintInvalidationTest() {
getSelection().removeAllRanges();
}
onload = function() {
getSelection().selectAllChildren(document.getElementById('div'));
runAfterLayoutAndPaint(function() {
document.getElementById('div').style.top = '300px';
runPaintInvalidationTest();
});
};
</script>
<style>
img {
vertical-align: text-bottom;
width: 50px;
height: 50px;
}
div {
position: absolute;
top: 100px;
left: 100px;
}
</style>
Tests paint invalidation of selection when its cleared after the container is moved.<br>
Passes if no selection left.
<div id="div">
<img></img>
</div>