Bug 1594122 - convert XBL binding to custom element in reftest 1369954-1.xhtml r=bzbarsky
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 14 Nov 2019 21:19:54 +0000
changeset 502060 a21f7f0b362ef9cd81c2f8262d535c2e3396c4b4
parent 502059 d519e5920a23a531269fec72a0ef440674692603
child 502061 6fc0c2b4b9096e7ff61265dddb682adb21ee5eed
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, 1369954
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 binding to custom element in reftest 1369954-1.xhtml r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D53064
layout/reftests/bugs/1369954-1-ref.xhtml
layout/reftests/bugs/1369954-1.xhtml
layout/reftests/bugs/reftest.list
--- a/layout/reftests/bugs/1369954-1-ref.xhtml
+++ b/layout/reftests/bugs/1369954-1-ref.xhtml
@@ -1,17 +1,17 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <style>
-      span { color: green; }
+      p > span { color: green; }
       b { color: purple }
     </style>
   </head>
   <body>
     <div>
-      <span>This should be green</span>
+      <span>This should not be green</span>
       <p>
-        <span>This should also be green</span><br/>
+        <span>This should be green</span><br/>
         <b>This should be purple</b>
       </p>
     </div>
   </body>
 </html>
--- a/layout/reftests/bugs/1369954-1.xhtml
+++ b/layout/reftests/bugs/1369954-1.xhtml
@@ -1,26 +1,33 @@
 <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>
-          <span>This should be green</span>
-          <xhtml:p>
-            <children></children>
-          </xhtml:p>
-        </content>
-      </binding>
-    </bindings>
     <style>
       div > span { color: green; }
       p > span { color: red !important; }
       p { color: purple }
     </style>
+    <script>
+      customElements.define("custom-div", class extends HTMLDivElement {
+        constructor() {
+          super();
+          this.attachShadow({ mode: "open" });
+
+          let style = document.createElement("style");
+          style.textContent = "p > span { color: red; } p { color: purple }";
+          let span = document.createElement("span");
+          span.textContent = "This should not be green";
+          let p = document.createElement("p");
+          p.append(document.createElement("slot"));
+          this.shadowRoot.append(style, span, p);
+        }
+      }, {
+        extends: "div",
+      });
+    </script>
   </head>
   <body>
-    <div style="-moz-binding: url(#a)">
-      <span>This should also be green</span><br/>
+    <div is="custom-div">
+      <span>This should be green</span><br/>
       <b>This should be purple</b>
     </div>
   </body>
 </html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1996,17 +1996,17 @@ skip-if(isDebugBuild&&winWidget) == 1330
 == 1365159-1.html 1365159-1-ref.html
 == 1365162-1.html 1365162-1-ref.html
 == 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
-skip-if(!xbl) == 1369954-1.xhtml 1369954-1-ref.xhtml
+== 1369954-1.xhtml 1369954-1-ref.xhtml
 == 1369985-1.html 1369985-1-ref.html
 skip-if(!xbl) == 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