Bug 1039926 - Add a test for not invalidating stuff inside mask layers.
authorMarkus Stange <mstange@themasta.com>
Sat, 28 Mar 2015 21:14:10 -0400
changeset 265250 259e491ccb21c358aa7ee04a0262a7d8981637bc
parent 265249 e19def475b91d36c13de902824c3818de2ab6287
child 265251 baec9e361ac8f3c7fdc4857c4fc0af75689e9ed5
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1039926
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1039926 - Add a test for not invalidating stuff inside mask layers.
layout/reftests/invalidation/masklayer-1.html
layout/reftests/invalidation/masklayer-2.html
layout/reftests/invalidation/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/masklayer-1.html
@@ -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">
+  <div id="animatedLeft" class="reftest-no-paint"></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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/invalidation/masklayer-2.html
@@ -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">
+  <div id="scrollable">
+    <div id="scrolledLayer" class="reftest-no-paint"></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>
--- a/layout/reftests/invalidation/reftest.list
+++ b/layout/reftests/invalidation/reftest.list
@@ -50,8 +50,10 @@ pref(layout.animated-image-layers.enable
 != clipped-animated-transform-1.html about:blank
 != paintedlayer-recycling-1.html about:blank
 != paintedlayer-recycling-2.html about:blank
 != paintedlayer-recycling-3.html about:blank
 != paintedlayer-recycling-4.html about:blank
 != 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