Bug 1443027 - Add two new tests for merging behaviour. r=mstange
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 23 Mar 2018 12:20:40 +1300
changeset 411634 373a7a3e5c8f84c658a4e6ca1d2e28905ea25b10
parent 411633 08c9beb155d5233f1e57073b44e9175ef6231de3
child 411635 99de9f5450d819c78ceab58d3502c82efaffd231
push id101712
push userebalazs@mozilla.com
push dateWed, 04 Apr 2018 09:52:15 +0000
treeherdermozilla-inbound@dd31fb345c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1443027
milestone61.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 1443027 - Add two new tests for merging behaviour. r=mstange MozReview-Commit-ID: G5vgtSCdRZP
layout/base/crashtests/1443027-1.html
layout/base/crashtests/crashtests.list
layout/reftests/display-list/1443027-1.html
layout/reftests/display-list/1443027-2.html
layout/reftests/display-list/1443027-3-ref.html
layout/reftests/display-list/1443027-3.html
layout/reftests/display-list/1443027-ref.html
layout/reftests/display-list/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/1443027-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+  <div id="first" style="position:absolute; width: 200px; height: 200px; background-color:blue; z-index: 1"></div>
+  <div style="position:absolute; left: 400px; width: 200px; height: 200px; background-color:green; z-index: 2"></div>
+  <div id="overlay" style="position:absolute; top: 100px; width: 600px; height: 200px; background-color:orange; z-index: 10"></div>
+</body>
+<script>
+  function doTest2() {
+    document.getElementById("overlay").style.zIndex= 11;
+    document.documentElement.removeAttribute('class');
+  }
+  function doTest() {
+    document.getElementById("first").style.zIndex = 3;
+    setTimeout(doTest2, 1000);
+  }
+
+  window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</html>
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -522,9 +522,10 @@ load 1425893.html
 load 1428353.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1429088.html
 load 1429961.html
 load 1435015.html
 load 1429962.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1439016.html
 load 1442506.html
 load 1437155.html
+load 1443027-1.html
 load 1448841-1.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/display-list/1443027-1.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8">
+<title>Bug 1443027 - Test merging across multiple paints</title>
+
+<style>
+
+body { opacity: 0.9; }
+
+div {
+  position: absolute;
+}
+
+#A {
+  left: 250px;
+  top: 50px;
+  width: 100px;
+  height: 100px;
+  background-color: red;
+}
+
+#B {
+  left: 200px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: yellow;
+}
+
+#C {
+  left: 0px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: green;
+}
+
+#D {
+  left: 80px;
+  top: 20px;
+  width: 140px;
+  height: 100px;
+  background-color: blue;
+}
+
+</style>
+</head>
+<body>
+<div id="A"></div>
+<div id="B"></div>
+<div id="C"></div>
+<div id="D"></div>
+
+<script>
+
+var A = document.getElementById("A");
+var B = document.getElementById("B");
+var C = document.getElementById("C");
+var D = document.getElementById("D");
+
+A.style.visibility = "hidden";
+B.style.visibility = "hidden";
+C.style.visibility = "hidden";
+D.style.visibility = "hidden";
+
+window.addEventListener("MozReftestInvalidate", step1);
+
+function step1() {
+  C.style.visibility = "visible";
+  C.style.transform = "translatez(1px)";
+  D.style.visibility = "visible";
+  D.style.transform = "translatez(1px)";
+
+  window.requestAnimationFrame(function() { window.requestAnimationFrame(step2); });
+}
+
+function step2() {
+  A.style.visibility = "visible";
+  A.style.transform = "translatez(1px)";
+  B.style.visibility = "visible";
+  B.style.transform = "translatez(1px)";
+
+  window.requestAnimationFrame(step3);
+}
+
+function step3() {
+  D.style.visibility = "hidden";
+  D.style.transform = "";
+  document.documentElement.removeAttribute('class');
+}
+
+</script>
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/display-list/1443027-2.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8">
+<title>Bug 1443027 - Test merging across multiple paints</title>
+
+<style>
+
+body { opacity: 0.9; }
+
+div {
+  position: absolute;
+}
+
+#A {
+  left: 250px;
+  top: 50px;
+  width: 100px;
+  height: 100px;
+  background-color: red;
+}
+
+#B {
+  left: 200px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: yellow;
+}
+
+#C {
+  left: 0px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: green;
+}
+
+#D {
+  left: 80px;
+  top: 20px;
+  width: 140px;
+  height: 100px;
+  background-color: blue;
+}
+
+</style>
+</head>
+<body>
+<div id="A"></div>
+<div id="B"></div>
+<div id="C"></div>
+<div id="D"></div>
+
+<script>
+
+var A = document.getElementById("A");
+var B = document.getElementById("B");
+var C = document.getElementById("C");
+var D = document.getElementById("D");
+
+A.style.visibility = "hidden";
+B.style.visibility = "hidden";
+C.style.visibility = "hidden";
+D.style.visibility = "hidden";
+
+window.addEventListener("MozReftestInvalidate", step1);
+
+function step1() {
+  A.style.visibility = "visible";
+  A.style.transform = "translatez(1px)";
+  B.style.visibility = "visible";
+  B.style.transform = "translatez(1px)";
+  D.style.visibility = "visible";
+  D.style.transform = "translatez(1px)";
+
+  window.requestAnimationFrame(function() { window.requestAnimationFrame(step2); });
+}
+
+function step2() {
+  C.style.visibility = "visible";
+  C.style.transform = "translatez(1px)";
+
+  window.requestAnimationFrame(step3);
+}
+
+function step3() {
+  D.style.visibility = "hidden";
+  D.style.transform = "";
+  document.documentElement.removeAttribute('class');
+}
+
+</script>
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/display-list/1443027-3-ref.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html lang="en"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8">
+<title>Bug 1443027 - Test merging across multiple paints</title>
+
+<style>
+
+body { opacity: 0.9; }
+
+div {
+  position: absolute;
+  transform: translatez(1px);
+}
+
+#A {
+  left: 250px;
+  top: 50px;
+  width: 100px;
+  height: 100px;
+  background-color: red;
+}
+
+#B {
+  left: 200px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: yellow;
+}
+
+#C {
+  left: 0px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: green;
+}
+
+#D {
+  left: 80px;
+  top: 20px;
+  width: 140px;
+  height: 100px;
+  background-color: blue;
+}
+
+</style>
+</head>
+<body>
+<div id="A"></div>
+<div id="B"></div>
+<div id="D"></div>
+<div id="C"></div>
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/display-list/1443027-3.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="en" class="reftest-wait"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8">
+<title>Bug 1443027 - Test merging across multiple paints</title>
+
+<style>
+
+body { opacity: 0.9; }
+
+div {
+  position: absolute;
+}
+
+#A {
+  left: 250px;
+  top: 50px;
+  width: 100px;
+  height: 100px;
+  background-color: red;
+}
+
+#B {
+  left: 200px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: yellow;
+}
+
+#C {
+  left: 0px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: green;
+}
+
+#D {
+  left: 80px;
+  top: 20px;
+  width: 140px;
+  height: 100px;
+  background-color: blue;
+}
+
+</style>
+</head>
+<body>
+<div id="A"></div>
+<div id="B"></div>
+<div id="D"></div>
+<div id="C"></div>
+
+<script>
+
+var A = document.getElementById("A");
+var B = document.getElementById("B");
+var C = document.getElementById("C");
+var D = document.getElementById("D");
+
+A.style.visibility = "hidden";
+B.style.visibility = "hidden";
+C.style.visibility = "hidden";
+D.style.visibility = "hidden";
+
+window.addEventListener("MozReftestInvalidate", step1);
+
+function step1() {
+  A.style.visibility = "visible";
+  A.style.transform = "translatez(1px)";
+
+  window.requestAnimationFrame(function() { window.requestAnimationFrame(step2); });
+}
+
+function step2() {
+  C.style.visibility = "visible";
+  C.style.transform = "translatez(1px)";
+  D.style.visibility = "visible";
+  D.style.transform = "translatez(1px)";
+
+  window.requestAnimationFrame(step3);
+}
+
+function step3() {
+  B.style.visibility = "visible";
+  B.style.transform = "translatez(1px)";
+  document.documentElement.removeAttribute('class');
+}
+
+</script>
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/display-list/1443027-ref.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html lang="en"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8">
+<title>Bug 1443027 - Test merging across multiple paints</title>
+
+<style>
+
+body { opacity: 0.9; }
+
+div {
+  position: absolute;
+  transform: translatez(1px);
+}
+
+#A {
+  left: 250px;
+  top: 50px;
+  width: 100px;
+  height: 100px;
+  background-color: red;
+}
+
+#B {
+  left: 200px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: yellow;
+}
+
+#C {
+  left: 0px;
+  top: 0px;
+  width: 100px;
+  height: 100px;
+  background-color: green;
+}
+
+</style>
+</head>
+<body>
+<div id="A"></div>
+<div id="B"></div>
+<div id="C"></div>
+</body></html>
--- a/layout/reftests/display-list/reftest.list
+++ b/layout/reftests/display-list/reftest.list
@@ -18,9 +18,11 @@ skip-if(Android) == 1428993-1.html 14289
 == 1420480-1.html 1420480-1-ref.html
 == 1428993-2.html 1428993-2-ref.html
 needs-focus == 1429027-1.html 1429027-1-ref.html
 == 1432553-1.html 1432553-1-ref.html
 == 1432553-2.html 1432553-2-ref.html
 == 1436189-1.html 1436189-1-ref.html
 skip-if(!asyncPan) == 1437374-1.html 1437374-1-ref.html
 == 1439809-1.html 1439809-1-ref.html
-
+== 1443027-1.html 1443027-ref.html
+== 1443027-2.html 1443027-ref.html
+== 1443027-3.html 1443027-3-ref.html