Bug 1368113 - Part 2: Split out problematic parts of display-contents-xbl.xhtml into separate tests. r=bz
authorCameron McCormack <cam@mcc.id.au>
Sat, 10 Jun 2017 11:06:12 +0800
changeset 413840 129c04db249edf92fb1ab2dbfc283ad84cd530b9
parent 413839 9817633686c2bda12bffe8b306184322280a46ae
child 413841 68f9a27cdf3bc31652a3c33dab3110af348b5b2f
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1368113
milestone55.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 1368113 - Part 2: Split out problematic parts of display-contents-xbl.xhtml into separate tests. r=bz MozReview-Commit-ID: 5zDLuKuJRLw
layout/reftests/css-display/display-contents-xbl-6-ref.html
layout/reftests/css-display/display-contents-xbl-6.xhtml
layout/reftests/css-display/display-contents-xbl-7-ref.html
layout/reftests/css-display/display-contents-xbl-7.xhtml
layout/reftests/css-display/display-contents-xbl-ref.html
layout/reftests/css-display/display-contents-xbl.xhtml
layout/reftests/css-display/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-display/display-contents-xbl-6-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<body>
+<div style="color:green">a <b style="color:blue">I</b> c</div>
+<div style="color:blue"><b>L1</b><span style="color:green">2</span></div>
+<div style="color:blue"><b>M1</b><span style="color:green">2</span></div>
+<span style="color:blue"><b>Q1</b><span style="color:green">2</span></span>
+<span style="color:blue"><b>R1</b><span style="color:green">2</span></span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-display/display-contents-xbl-6.xhtml
@@ -0,0 +1,70 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<head>
+  <title>CSS Test: CSS display:contents in XBL</title>
+  <link rel="author" title="William Chen" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1040291"/>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907396"/>
+  <link rel="help" href="http://dev.w3.org/csswg/css-display"/>
+
+<style>
+.c { display:contents; }
+</style>
+<bindings xmlns="http://www.mozilla.org/xbl"
+          xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <binding id="a">
+    <content>
+      <style xmlns="http://www.w3.org/1999/xhtml">
+        .a {
+          display: contents;
+          color: blue;
+        }
+      </style>
+      <xhtml:span>a</xhtml:span>
+      <xhtml:span class="a">
+        <children></children>
+      </xhtml:span>
+      <xhtml:span>c</xhtml:span>
+    </content>
+  </binding>
+
+  <binding id="g">
+    <content>
+      <style xmlns="http://www.w3.org/1999/xhtml">
+        .a {
+          display: contents;
+          color: blue;
+        }
+      </style>
+      <xhtml:span class="a"><children includes="b"></children></xhtml:span>
+      <xhtml:span class="a" style="color:green"><children includes="c"></children></xhtml:span>
+    </content>
+  </binding>
+</bindings>
+</head>
+<body>
+<div id="hostI" style="color:green"><b style="display:contents">I</b></div>
+<div id="hostL" style="color:red"><c>2</c><b style="display:contents">L1</b></div>
+<div id="hostM" style="-moz-binding:url(#g); color:red"><c>2</c><b style="display:contents">M1</b></div>
+<div id="hostQ" class="c" style="color:red"><c>2</c><b style="display:contents">Q1</b></div>
+<div id="hostR" class="c" style="-moz-binding:url(#g); color:red"><c>2</c><b style="display:contents">R1</b></div>
+
+<script>
+
+function tweak() {
+  document.body.offsetHeight;
+
+  hostI.style.MozBinding='url(#a)';
+  hostL.style.MozBinding='url(#g)';
+  hostQ.style.MozBinding='url(#g)';
+
+  document.body.offsetHeight;
+  document.documentElement.removeAttribute("class");
+}
+
+window.addEventListener("MozReftestInvalidate", tweak);
+</script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-display/display-contents-xbl-7-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<body>
+<div style="color:blue">a <span>b</span> c</div>
+<div style="color:blue">a <b>K</b> c</div>
+<span style="color:blue">a <b>P</b> c</span>
+<span style="color:blue">a <span>b</span> c</span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-display/display-contents-xbl-7.xhtml
@@ -0,0 +1,71 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<head>
+  <title>CSS Test: CSS display:contents in XBL</title>
+  <link rel="author" title="William Chen" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1040291"/>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907396"/>
+  <link rel="help" href="http://dev.w3.org/csswg/css-display"/>
+
+<style>
+.c { display:contents; }
+</style>
+<bindings xmlns="http://www.mozilla.org/xbl"
+          xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <binding id="b">
+    <content>
+      <style xmlns="http://www.w3.org/1999/xhtml">
+        .b {
+          display: contents;
+          color: blue;
+        }
+	.b::after {
+          content: 'c';
+        }
+      </style>
+      <xhtml:span class="b">
+        a <children></children>
+      </xhtml:span>
+    </content>
+  </binding>
+</bindings>
+</head>
+<body>
+<div id="host2" style="-moz-binding: url(#b);"></div>
+<div id="hostK" style="-moz-binding:url(#b); color:red"><b>K</b></div>
+<div id="hostP" class="c" style="-moz-binding:url(#b); color:red"><b>P</b></div>
+<div id="hostT" style="-moz-binding: url(#b);"></div>
+
+<script>
+
+function tweak() {
+  document.body.offsetHeight;
+
+  function span(s) {
+    var elm = document.createElement("span");
+    elm.textContent = s;
+    return elm;
+  }
+
+  var elm = span("b");
+  elm.style.display = "contents";
+  elm.style.color = "blue";
+  host2.appendChild(elm);
+
+  hostT.className="c";
+
+  var elm = span("b");
+  elm.style.display = "contents";
+  elm.style.color = "blue";
+  hostT.appendChild(elm);
+
+  document.body.offsetHeight;
+  document.documentElement.removeAttribute("class");
+}
+
+window.addEventListener("MozReftestInvalidate", tweak);
+</script>
+</body>
+</html>
--- a/layout/reftests/css-display/display-contents-xbl-ref.html
+++ b/layout/reftests/css-display/display-contents-xbl-ref.html
@@ -1,17 +1,16 @@
 <!DOCTYPE html>
 <!--
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <html>
 <body>
 <div>a <span style="color:blue">b</span> c</div>
-<div style="color:blue">a <span>b</span> c</div>
 <div>a <span style="color:blue">b</span> cd</div>
 <div>a <span style="color:blue">b</span> c</div>
 <div>a <span style="color:blue">b</span> c</div>
 <div><b>One</b><i>Two</i></div>
 <div><b>One</b><i>Two</i></div>
 <div><b>One</b><i>Two</i></div>
 <div><b>Oneb</b><i>Two</i></div>
 <div><b>Oneb</b><i>Two</i></div>
@@ -20,27 +19,19 @@
 <div><b>One</b><i>Twoi</i></div>
 <div><b>One</b><i>Twoi</i></div>
 <div><b>bOne</b><i>Two</i></div>
 <div><b>bOne</b><i>Two</i></div>
 <div><b>bOne</b><i>Two</i></div>
 <div><b>One</b><i>iTwo</i></div>
 <div><b>One</b><i>iTwo</i></div>
 <div><b>One</b><i>iTwo</i></div>
-<div style="color:green">a <b style="color:blue">I</b> c</div>
 <div style="color:green">a <b style="color:blue">J</b> c</div>
-<div style="color:blue">a <b>K</b> c</div>
-<div style="color:blue"><b>L1</b><span style="color:green">2</span></div>
-<div style="color:blue"><b>M1</b><span style="color:green">2</span></div>
 <span style="color:green">a <b style="color:blue">O</b> c</span>
-<span style="color:blue">a <b>P</b> c</span>
-<span style="color:blue"><b>Q1</b><span style="color:green">2</span></span>
-<span style="color:blue"><b>R1</b><span style="color:green">2</span></span>
 <span>a <span style="color:blue">b</span> c</span>
-<span style="color:blue">a <span>b</span> c</span>
 <span>a <span style="color:blue">b</span> cd</span>
 <span>a <span style="color:blue">b</span> c</span>
 <span>a <span style="color:blue">b</span> c</span>
 <span><b>One</b><i>Two</i></span>
 <span><b>One</b><i>Two</i></span>
 <span><b>One</b><i>Two</i></span>
 <span><b>Oneb</b><i>Two</i></span>
 <span><b>Oneb</b><i>Two</i></span>
--- a/layout/reftests/css-display/display-contents-xbl.xhtml
+++ b/layout/reftests/css-display/display-contents-xbl.xhtml
@@ -25,33 +25,16 @@
       <xhtml:span>a</xhtml:span>
       <xhtml:span class="a">
         <children></children>
       </xhtml:span>
       <xhtml:span>c</xhtml:span>
     </content>
   </binding>
 
-  <binding id="b">
-    <content>
-      <style xmlns="http://www.w3.org/1999/xhtml">
-        .b {
-          display: contents;
-          color: blue;
-        }
-	.b::after {
-          content: 'c';
-        }
-      </style>
-      <xhtml:span class="b">
-        a <children></children>
-      </xhtml:span>
-    </content>
-  </binding>
-
   <binding id="c">
     <content>
       <xhtml:span>a</xhtml:span>
       <xhtml:span style="color:blue"> <children></children> </xhtml:span>
       <xhtml:span>c</xhtml:span>
     </content>
   </binding>
 
@@ -106,17 +89,16 @@
       <xhtml:span class="a"><children includes="b"></children></xhtml:span>
       <xhtml:span class="a" style="color:green"><children includes="c"></children></xhtml:span>
     </content>
   </binding>
 </bindings>
 </head>
 <body>
 <div id="host1" style="-moz-binding: url(#a);"></div>
-<div id="host2" style="-moz-binding: url(#b);"></div>
 <div id="host3" style="-moz-binding: url(#c); display: contents;"></div>d
 <div id="host4" style="-moz-binding: url(#d);"></div>
 <div id="host5" style="-moz-binding: url(#e);"></div>
 <div            style="-moz-binding: url(#f)"><i>Two</i><b>One</b></div>
 <div            style="-moz-binding: url(#f)"><i style="display: contents;">Two</i><b>One</b></div>
 <div            style="-moz-binding: url(#f)"><i>Two</i><b style="display: contents;">One</b></div>
 <div id="host6" style="-moz-binding: url(#f)"><i>Two</i><b>One</b></div>
 <div id="host7" style="-moz-binding: url(#f)"><i style="display: contents;">Two</i><b>One</b></div>
@@ -125,27 +107,19 @@
 <div id="hostA" style="-moz-binding: url(#f)"><i style="display: contents;">Two</i><b>One</b></div>
 <div id="hostB" style="-moz-binding: url(#f)"><i>Two</i><b style="display: contents;">One</b></div>
 <div id="hostC" style="-moz-binding: url(#f)"><i>Two</i><b>One</b></div>
 <div id="hostD" style="-moz-binding: url(#f)"><i style="display: contents;">Two</i><b>One</b></div>
 <div id="hostE" style="-moz-binding: url(#f)"><i>Two</i><b style="display: contents;">One</b></div>
 <div id="hostF" style="-moz-binding: url(#f)"><i>Two</i><b>One</b></div>
 <div id="hostG" style="-moz-binding: url(#f)"><i style="display: contents;">Two</i><b>One</b></div>
 <div id="hostH" style="-moz-binding: url(#f)"><i>Two</i><b style="display: contents;">One</b></div>
-<div id="hostI" style="color:green"><b style="display:contents">I</b></div>
 <div id="hostJ" style="-moz-binding:url(#a); color:green"><b>J</b></div>
-<div id="hostK" style="-moz-binding:url(#b); color:red"><b>K</b></div>
-<div id="hostL" style="color:red"><c>2</c><b style="display:contents">L1</b></div>
-<div id="hostM" style="-moz-binding:url(#g); color:red"><c>2</c><b style="display:contents">M1</b></div>
 <div id="hostO" class="c" style="-moz-binding:url(#a); color:green"><b>O</b></div>
-<div id="hostP" class="c" style="-moz-binding:url(#b); color:red"><b>P</b></div>
-<div id="hostQ" class="c" style="color:red"><c>2</c><b style="display:contents">Q1</b></div>
-<div id="hostR" class="c" style="-moz-binding:url(#g); color:red"><c>2</c><b style="display:contents">R1</b></div>
 <div id="hostS" style="-moz-binding: url(#a);"></div>
-<div id="hostT" style="-moz-binding: url(#b);"></div>
 <div id="hostU" style="-moz-binding: url(#c); display: contents;"></div>d
 <div id="hostV" style="-moz-binding: url(#d);"></div>
 <div id="hostW" style="-moz-binding: url(#e);"></div>
 <div class="c"  style="-moz-binding: url(#f)"><i>Two</i><b>One</b></div>
 <div class="c"  style="-moz-binding: url(#f)"><i style="display: contents;">Two</i><b>One</b></div>
 <div class="c"  style="-moz-binding: url(#f)"><i>Two</i><b style="display: contents;">One</b></div>
 <div id="hostX" style="-moz-binding: url(#f)"><i>Two</i><b>One</b></div>
 <div id="hostY" style="-moz-binding: url(#f)"><i style="display: contents;">Two</i><b>One</b></div>
@@ -175,21 +149,16 @@ function tweak() {
     var elm = document.createElement(tag);
     elm.textContent = tag;
     return elm;
   }
 
   // Span should be distributed to the xbl:children insertion point between 'a' and 'c'.
   host1.appendChild(span("b"));
 
-  var elm = span("b");
-  elm.style.display = "contents";
-  elm.style.color = "blue";
-  host2.appendChild(elm);
-
   host3.appendChild(span("b"));
   host4.appendChild(span("b"));
   host5.appendChild(span("b"));
 
   host6.appendChild(elem("b"));
   host7.appendChild(elem("b"));
   host8.appendChild(elem("b"));
 
@@ -201,23 +170,19 @@ function tweak() {
   hostD.insertBefore(elem("b"), hostD.firstChild);
   hostE.insertBefore(elem("b"), hostE.firstChild);
 
   hostF.insertBefore(elem("i"), hostF.firstChild);
   hostG.insertBefore(elem("i"), hostG.firstChild);
   hostH.insertBefore(elem("i"), hostH.firstChild);
 
   document.body.offsetHeight;
-  hostI.style.MozBinding='url(#a)';
-  hostL.style.MozBinding='url(#g)';
   hostO.style.MozBinding='url(#a)';
-  hostQ.style.MozBinding='url(#g)';
 
   hostS.className="c";
-  hostT.className="c";
   hostU.className="c";
   hostV.className="c";
   hostW.className="c";
   hostX.className="c";
   hostY.className="c";
   hostZ.className="c";
   hosta.className="c";
   hostb.className="c";
@@ -226,21 +191,16 @@ function tweak() {
   hoste.className="c";
   hostf.className="c";
   hostg.className="c";
   hosth.className="c";
   hosti.className="c";
 
   hostS.appendChild(span("b"));
 
-  var elm = span("b");
-  elm.style.display = "contents";
-  elm.style.color = "blue";
-  hostT.appendChild(elm);
-
   hostU.appendChild(span("b"));
   hostV.appendChild(span("b"));
   hostW.appendChild(span("b"));
 
   hostX.appendChild(elem("b"));
   hostY.appendChild(elem("b"));
   hostZ.appendChild(elem("b"));
 
--- a/layout/reftests/css-display/reftest.list
+++ b/layout/reftests/css-display/reftest.list
@@ -18,14 +18,16 @@ fuzzy-if(winWidget,12,100) skip-if(stylo
 == display-contents-495385-2d.html display-contents-495385-2d-ref.html
 fuzzy-if(Android,7,3935) == display-contents-xbl.xhtml display-contents-xbl-ref.html
 fuzzy-if(Android,7,1186) pref(dom.webcomponents.enabled,true) skip-if(styloVsGecko||stylo) == display-contents-shadow-dom-1.html display-contents-shadow-dom-1-ref.html
 == display-contents-xbl-2.xul display-contents-xbl-2-ref.xul
 asserts(1) asserts-if(styloVsGecko,2) == display-contents-xbl-3.xul display-contents-xbl-3-ref.xul # bug 1089223
 skip == display-contents-xbl-4.xul display-contents-xbl-4-ref.xul # fails (not just asserts) due to bug 1089223
 asserts(0-1) fuzzy-if(Android,8,3216) == display-contents-fieldset.html display-contents-fieldset-ref.html # bug 1089223
 asserts(1) asserts-if(styloVsGecko,2) == display-contents-xbl-5.xul display-contents-xbl-3-ref.xul # bug 1089223
+fails-if(!stylo) == display-contents-xbl-6.xhtml display-contents-xbl-6-ref.html # bug 1345809
+== display-contents-xbl-7.xhtml display-contents-xbl-7-ref.html
 == display-contents-list-item-child.html display-contents-list-item-child-ref.html
 == display-contents-dyn-insert-text.html display-contents-dyn-insert-text-ref.html
 == display-contents-writing-mode-1.html display-contents-writing-mode-1-ref.html
 == display-contents-writing-mode-2.html display-contents-writing-mode-2-ref.html
 needs-focus == display-contents-state-change.html display-contents-state-change-ref.html
-== display-flow-root-001.html display-flow-root-001-ref.html
\ No newline at end of file
+== display-flow-root-001.html display-flow-root-001-ref.html