Bug 1594122 - convert XBL bindings to custom elements in 1371130.xhtml reftest r=bzbarsky
authorAlexander Surkov <surkov.alexander@gmail.com>
Fri, 15 Nov 2019 19:55:17 +0000
changeset 502279 8d60ae80f33b8f88e947b17b34d89b384bb472c8
parent 502278 9f0cb3df34c4d9a4d9d10c9729c864401eca9c78
child 502280 c162ad97808da1fb11dba53934534d1f4771f082
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1594122, 1371130
milestone72.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 1594122 - convert XBL bindings to custom elements in 1371130.xhtml reftest r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D53214
layout/reftests/bugs/1371130-ref.xhtml
layout/reftests/bugs/1371130.xhtml
layout/reftests/bugs/reftest.list
--- a/layout/reftests/bugs/1371130-ref.xhtml
+++ b/layout/reftests/bugs/1371130-ref.xhtml
@@ -1,24 +1,29 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
-    <bindings xmlns="http://www.mozilla.org/xbl"
-              xmlns:xhtml="http://www.w3.org/1999/xhtml">
-      <binding id="a">
-        <content>
-          <xhtml:p>
-            <children></children>
-          </xhtml:p>
-          <xhtml:span>This should also be green.</xhtml:span>
-        </content>
-      </binding>
-    </bindings>
+    <script>
+      customElements.define("custom-div", class extends HTMLDivElement {
+        constructor() {
+          super();
+          this.attachShadow({ mode: "open" });
+
+          let p = document.createElement("p");
+          p.append(document.createElement("slot"));
+          let span = document.createElement("span");
+          span.textContent = "This should not be green.";
+          this.shadowRoot.append(p, span);
+        }
+      }, {
+        extends: "div",
+      });
+    </script>
     <style>
       span { color: red; }
       div > span { color: green; }
     </style>
   </head>
   <body>
-    <div style="-moz-binding: url(#a)">
+    <div is="custom-div">
       <span>This should be green.</span>
     </div>
   </body>
 </html>
--- a/layout/reftests/bugs/1371130.xhtml
+++ b/layout/reftests/bugs/1371130.xhtml
@@ -1,24 +1,29 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
-    <bindings xmlns="http://www.mozilla.org/xbl"
-              xmlns:xhtml="http://www.w3.org/1999/xhtml">
-      <binding id="a">
-        <content>
-          <xhtml:p>
-            <children></children>
-          </xhtml:p>
-          <xhtml:span>This should also be green.</xhtml:span>
-        </content>
-      </binding>
-    </bindings>
+    <script>
+      customElements.define("custom-div", class extends HTMLDivElement {
+        constructor() {
+          super();
+          this.attachShadow({ mode: "open" });
+
+          let p = document.createElement("p");
+          p.append(document.createElement("slot"));
+          let span = document.createElement("span");
+          span.textContent = "This should not be green.";
+          this.shadowRoot.append(p, span);
+        }
+      }, {
+        extends: "div",
+      });
+    </script>
     <style>
       span { color: red; }
       div.x > span { color: green; }
     </style>
   </head>
   <body onload="document.body.offsetTop; document.querySelector('div').className = 'x'">
-    <div style="-moz-binding: url(#a)">
+    <div is="custom-div">
       <span>This should be green.</span>
     </div>
   </body>
 </html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1998,17 +1998,17 @@ skip-if(isDebugBuild&&winWidget) == 1330
 == 1352306-1.html 1352306-1-ref.html
 == 1366144.html 1366144-ref.html
 == 1367592-1.html 1367592-1-ref.html
 == 1368113-1.html 1368113-1-ref.html
 == 1369584-1a.html 1369584-1-ref.html
 == 1369584-1b.html 1369584-1-ref.html
 == 1369954-1.xhtml 1369954-1-ref.xhtml
 == 1369985-1.html 1369985-1-ref.html
-skip-if(!xbl) == 1371130.xhtml 1371130-ref.xhtml
+== 1371130.xhtml 1371130-ref.xhtml
 == 1375315-1.html 1375315-1-ref.html
 == 1375315-2.html 1375315-2-ref.html
 == 1375315-3.html 1375315-3-ref.html
 == 1375315-4.html 1375315-4-ref.html
 == 1375315-5.html 1375315-5-ref.html
 == 1375315-6.html 1375315-6-ref.html
 == 1375315-7.html 1375315-7-ref.html
 == 1375315-8.html 1375315-8-ref.html