blob: 7d5a139a761a446c858c94699cd1d59f185fdd5f [file] [log] [blame]
<!DOCTYPE html>
<!--
This tests verifies that filters repaint correctly in software mode when the filter property is changed.
You should see 5 green rectangles. First 4 of the rectangles have a blue shadow. There should be no red.
-->
<html>
<head>
<style>
.box {
height: 50px;
width: 50px;
margin-left: 20px;
margin-bottom: 60px;
background-color: green;
}
.software_from_none {
-webkit-filter: drop-shadow(0px 0px 10px blue);
}
.software_from_none.before {
-webkit-filter: none;
}
.software_from_software {
-webkit-filter: drop-shadow(0px 0px 10px blue);
}
.software_from_software.before {
-webkit-filter: drop-shadow(0px 0px 10px red);
}
.composited_from_software {
/* force a composited layer */
-webkit-transform: translate3d(0, 0, 0);
-webkit-filter: drop-shadow(0px 0px 10px blue);
}
.composited_from_software.before {
-webkit-transform: none;
-webkit-filter: drop-shadow(0px 0px 10px red);
}
.software_from_composited {
-webkit-transform: none;
-webkit-filter: drop-shadow(0px 0px 10px blue);
}
.software_from_composited.before {
/* force a composited layer */
-webkit-transform: translate3d(0, 0, 0);
-webkit-filter: drop-shadow(0px 0px 10px red);
}
.none_from_software {
-webkit-filter: none;
}
.none_from_software.before {
-webkit-filter: drop-shadow(0px 0px 10px red);
}
</style>
<script src="../../fast/repaint/resources/repaint.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText(true);
function repaintTest()
{
var items = document.getElementsByClassName('before');
while (items.length)
items[0].classList.remove("before");
}
</script>
</head>
<body onload="runRepaintTest()">
<div class="box software_from_none before"></div>
<div class="box software_from_software before"></div>
<div class="box composited_from_software before"></div>
<div class="box software_from_composited before"></div>
<div class="box none_from_software before"></div>
</body>
</html>