Bug 1039926 - Add a test for not invalidating stuff inside mask layers.

This commit is contained in:
Markus Stange 2015-03-17 15:47:45 -04:00
Родитель 0605c44412
Коммит 9bd0f5b094
3 изменённых файлов: 116 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Moving a layer in a box with a rounded clip shouldn't invalidate.</title>
<style>
#outer {
position: absolute;
top: 50px;
left: 50px;
width: 300px;
height: 200px;
background-color: #DDD;
overflow: hidden;
border-radius: 10px;
}
#animatedLeft {
position: absolute;
top: 50px;
left: 40px;
box-model: border-box;
border: 1px solid lime;
width: 100px;
height: 100px;
}
</style>
<body>
<div id="outer" reftest-assigned-layer="rounded-clip">
<div id="animatedLeft" class="reftest-no-paint" reftest-assigned-layer="animated-left"></div>
</div>
<script>
var animatedLeft = document.getElementById("animatedLeft");
function doTest() {
animatedLeft.style.left = "100px";
document.documentElement.removeAttribute("class");
}
// Layerize #animatedLeft
animatedLeft.offsetLeft;
animatedLeft.style.left = "60px";
animatedLeft.offsetLeft;
animatedLeft.style.left = "40px";
animatedLeft.offsetLeft;
document.addEventListener("MozReftestInvalidate", doTest, false);
</script>

Просмотреть файл

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Moving a layer in a box with a rounded clip shouldn't invalidate.</title>
<style>
#scrollbox {
position: absolute;
top: 50px;
left: 50px;
width: 300px;
height: 200px;
background-color: #DDD;
overflow: auto;
border-radius: 10px;
}
#scrollable {
width: 600px;
}
#scrolledLayer {
margin-top: 50px;
margin-left: 100px;
box-model: border-box;
border: 1px solid lime;
width: 100px;
height: 100px;
}
</style>
<body>
<div id="scrollbox" reftest-assigned-layer="rounded-clip">
<div id="scrollable">
<div id="scrolledLayer" class="reftest-no-paint" reftest-assigned-layer="animated-left"></div>
</div>
</div>
<script>
var scrollbox = document.getElementById("scrollbox");
function doTest() {
scrollbox.scrollLeft = 0;
document.documentElement.removeAttribute("class");
}
// Make #scrollbox have active scrolling
scrollbox.scrollLeft = 60;
scrollbox.offsetLeft;
scrollbox.scrollLeft = 40;
scrollbox.offsetLeft;
document.addEventListener("MozReftestInvalidate", doTest, false);
</script>

Просмотреть файл

@ -55,3 +55,5 @@ pref(layout.animated-image-layers.enabled,true) == test-animated-image-layers-ba
!= paintedlayer-recycling-5.html about:blank
!= paintedlayer-recycling-6.html about:blank
!= paintedlayer-recycling-7.html about:blank
!= masklayer-1.html about:blank
!= masklayer-2.html about:blank