blob: b8ee0d6e61abf0b6ef05686f4b1b380473033726 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest() {
getSelection().removeAllRanges();
}
onload = function() {
getSelection().selectAllChildren(document.getElementById('div'));
runAfterLayoutAndPaint(function() {
document.getElementById('div').style.top = '300px';
runRepaintTest();
});
};
</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>