Bug 1426492 - Test case with trivial binding attached to the span element draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 19 Jan 2018 10:27:59 -0800
changeset 722723 07594f17c3192c27b09e84733c1bb3d8bb5222c1
parent 722722 0accdd6e64c4cd2876aedb70eb0152bc847b855b
child 746673 705c1eb9b31244891466bbdf8bb85735085a36c3
push id96215
push userbgrinstead@mozilla.com
push dateFri, 19 Jan 2018 18:35:46 +0000
bugs1426492
milestone59.0a1
Bug 1426492 - Test case with trivial binding attached to the span element STR: ./mach run 'data:text/html,<span></span>' MozReview-Commit-ID: 7CWfMztAymN
layout/style/res/html.css
layout/style/xbl-marquee/xbl-marquee.xml
--- a/layout/style/res/html.css
+++ b/layout/style/res/html.css
@@ -831,16 +831,21 @@ dialog {
   background: white;
   width: -moz-fit-content;
 }
 
 dialog:not([open]) {
   display: none;
 }
 
+span {
+  /* Apply a trivial binding to span elements to measure perf */
+  -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#span');
+}
+
 /* emulation of non-standard HTML <marquee> tag */
 marquee {
   inline-size: -moz-available;
   display: inline-block;
   vertical-align: text-bottom;
   text-align: start;
   -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizontal');
 }
--- a/layout/style/xbl-marquee/xbl-marquee.xml
+++ b/layout/style/xbl-marquee/xbl-marquee.xml
@@ -5,16 +5,22 @@
 
 <bindings id="marqueeBindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:html="http://www.w3.org/1999/xhtml"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:xbl="http://www.mozilla.org/xbl">
 
 
+  <binding id="span" bindToUntrustedContent="true">
+    <implementation>
+      <constructor>void(0)</constructor>
+    </implementation>
+  </binding>
+
   <binding id="marquee" bindToUntrustedContent="true">
 
     <resources>
       <stylesheet src="chrome://xbl-marquee/content/xbl-marquee.css"/>
     </resources>
     <implementation>
 
       <property name="scrollAmount" exposeToUntrustedContent="true">