blob: 4b18cfb25f1272eccc9e4f4cbebcf6c91388b3ce [file] [log] [blame]
<!-- Based on fast/repaint/obscured-background-no-repaint.html -->
<html>
<head>
<script src="../../../fast/repaint/../../resources/run-after-layout-and-paint.js"></script>
<script src="resources/paint-invalidation-test.js"></script>
<style type="text/css">
#test1 div {
height: 100px;
width: 100px;
}
#test1 .parent {
background-image: url(../../../fast/repaint/resources/animated.gif)
}
#test1 .child {
background-color: green;
}
#test2 .parent {
position: relative;
height: 100px;
width: 100px;
background-image: url(../../../fast/repaint/resources/animated.gif);
background-repeat: no-repeat;
background-position: center;
}
#test2 .child {
background-color: green;
position: relative;
left: 25px;
top: 25px;
height: 50px;
width: 50px;
}
#test3 img {
background-image: url(../../../fast/repaint/resources/animated.gif)
}
#test4 .parent {
position: relative;
height: 100px;
width: 100px;
background-color: red;
background-repeat: no-repeat;
background-position: center;
background-image: url(../../../fast/repaint/resources/animated.gif)
}
</style>
<script>
// Test that obscured animated gif does not trigger repaints.
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
window.testIsAsync = true;
window.expectedPaintInvalidationObjects = [
];
function paintInvalidationTest()
{
runAfterLayoutAndPaint(finishPaintInvalidationTest);
}
function start() {
if (!window.testRunner || !window.internals)
return;
var img = new Image();
img.onload = runPaintInvalidationTest;
img.src = "../../../fast/repaint/resources/animated.gif";
}
</script>
</head>
<body onload="start()">
<div id="test1">
<div class="parent">
<div class="child">
</div>
</div>
</div>
<div id="test2">
<div class="parent">
<div class="child">
</div>
</div>
</div>
<div id="test3">
<img src="../../../fast/repaint/resources/apple.jpg">
</div>
<div id="test4">
<div class="parent">
<a>
<div></div>
<div>
<img src="../../../fast/repaint/resources/apple.jpg">
</div>
</a>
</div>
</div>
</body>
</html>