Bug 1422386 - Remove toolbardecoration, toolbar, and toolbar-base binding, r=Paolo
authorTimothy Guan-tin Chien <timdream@gmail.com>
Tue, 13 Feb 2018 22:12:18 +0800
changeset 404008 64c97623410097090ddcb9b653ddaafa3f78858d
parent 404007 d9543f62a0f3dd632d7242ff8546783f1765e63b
child 404009 6404740a29d339a8ffa7be87d644a5479b8d00f1
push id99924
push userebalazs@mozilla.com
push dateThu, 15 Feb 2018 20:43:51 +0000
treeherdermozilla-inbound@a7d2a49f46fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPaolo
bugs1422386
milestone60.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 1422386 - Remove toolbardecoration, toolbar, and toolbar-base binding, r=Paolo The only purpose of these bindings was to insert a stylesheet, which has been moved to be included in toolkit/content/components.css. MozReview-Commit-ID: 23jqkIrbVvi
browser/components/customizableui/content/toolbar.xml
toolkit/components/printing/content/printPreviewBindings.xml
toolkit/content/components.css
toolkit/content/widgets/findbar.xml
toolkit/content/widgets/toolbar.xml
toolkit/content/xul.css
--- a/browser/components/customizableui/content/toolbar.xml
+++ b/browser/components/customizableui/content/toolbar.xml
@@ -4,19 +4,16 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <bindings id="browserToolbarBindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:xbl="http://www.mozilla.org/xbl">
 
   <binding id="toolbar">
-    <resources>
-      <stylesheet src="chrome://global/skin/toolbar.css"/>
-    </resources>
     <implementation>
       <field name="overflowedDuringConstruction">null</field>
 
       <constructor><![CDATA[
           let scope = {};
           ChromeUtils.import("resource:///modules/CustomizableUI.jsm", scope);
           let CustomizableUI = scope.CustomizableUI;
           // Add an early overflow event listener that will mark if the
--- a/toolkit/components/printing/content/printPreviewBindings.xml
+++ b/toolkit/components/printing/content/printPreviewBindings.xml
@@ -10,18 +10,17 @@
 <!ENTITY % printPreviewDTD SYSTEM "chrome://global/locale/printPreview.dtd" >
 %printPreviewDTD;
 ]>
 
 <bindings id="printPreviewBindings"
    xmlns="http://www.mozilla.org/xbl"
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <binding id="printpreviewtoolbar"
-           extends="chrome://global/content/bindings/toolbar.xml#toolbar">
+  <binding id="printpreviewtoolbar">
     <resources>
       <stylesheet src="chrome://global/skin/printPreview.css"/>
     </resources>
 
     <content>
       <xul:button label="&print.label;" accesskey="&print.accesskey;"
         oncommand="this.parentNode.print();" icon="print"/>
 
--- a/toolkit/content/components.css
+++ b/toolkit/content/components.css
@@ -2,8 +2,9 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* ===== components.css =================================================
   == Styles ported from XBL <resources>, loaded as UA styles in every XUL doc
   ======================================================================= */
 
 @import url("chrome://global/skin/menu.css");
+@import url("chrome://global/skin/toolbar.css");
--- a/toolkit/content/widgets/findbar.xml
+++ b/toolkit/content/widgets/findbar.xml
@@ -148,18 +148,17 @@
         this.value = value;
         this.findbar._find(value);
         event.stopPropagation();
         event.preventDefault();
       ]]></handler>
     </handlers>
   </binding>
 
-  <binding id="findbar"
-           extends="chrome://global/content/bindings/toolbar.xml#toolbar">
+  <binding id="findbar">
     <resources>
       <stylesheet src="chrome://global/skin/findBar.css"/>
     </resources>
 
     <content hidden="true">
     <xul:hbox anonid="findbar-container" class="findbar-container" flex="1" align="center">
       <xul:hbox anonid="findbar-textbox-wrapper" align="stretch">
         <xul:textbox anonid="findbar-textbox"
--- a/toolkit/content/widgets/toolbar.xml
+++ b/toolkit/content/widgets/toolbar.xml
@@ -4,27 +4,17 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 
 <bindings id="toolbarBindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:xbl="http://www.mozilla.org/xbl">
 
-  <binding id="toolbar-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/toolbar.css"/>
-    </resources>
-  </binding>
-
-  <binding id="toolbar"
-           extends="chrome://global/content/bindings/toolbar.xml#toolbar-base" />
-
-  <binding id="toolbar-menubar-autohide"
-           extends="chrome://global/content/bindings/toolbar.xml#toolbar">
+  <binding id="toolbar-menubar-autohide">
     <implementation>
       <constructor>
         this._setInactive();
       </constructor>
       <destructor>
         this._setActive();
       </destructor>
 
@@ -109,18 +99,17 @@
       <handler event="mousedown" button="2" action="this._contextMenuListener.init(event);"/>
       <handler event="DOMMenuBarInactive"><![CDATA[
         if (!this._contextMenuListener.active)
           this._setInactiveAsync();
       ]]></handler>
     </handlers>
   </binding>
 
-  <binding id="toolbar-drag"
-           extends="chrome://global/content/bindings/toolbar.xml#toolbar">
+  <binding id="toolbar-drag">
     <implementation>
       <field name="_dragBindingAlive">true</field>
       <constructor><![CDATA[
         if (!this._draggableStarted) {
           this._draggableStarted = true;
           try {
             let tmp = {};
             ChromeUtils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
@@ -131,18 +120,17 @@
                      this.getAttribute("customizing") != "true";
             };
           } catch (e) {}
         }
       ]]></constructor>
     </implementation>
   </binding>
 
-  <binding id="menubar"
-           extends="chrome://global/content/bindings/toolbar.xml#toolbar-base" display="xul:menubar">
+  <binding id="menubar" extends="xul:menubar">
     <implementation>
        <field name="_active">false</field>
        <field name="_statusbar">null</field>
        <field name="_originalStatusText">null</field>
        <property name="statusbar" onget="return this.getAttribute('statusbar');"
                                   onset="this.setAttribute('statusbar', val); return val;"/>
        <method name="_updateStatusText">
           <parameter name="itemText"/>
@@ -176,20 +164,17 @@
             this._statusbar.label = this._originalStatusText;
           ]]>
         </handler>
         <handler event="DOMMenuItemActive">this._updateStatusText(event.target.statusText);</handler>
         <handler event="DOMMenuItemInactive">this._updateStatusText("");</handler>
     </handlers>
   </binding>
 
-  <binding id="toolbardecoration" extends="chrome://global/content/bindings/toolbar.xml#toolbar-base">
-  </binding>
-
-  <binding id="toolbarpaletteitem" extends="chrome://global/content/bindings/toolbar.xml#toolbar-base" display="xul:button">
+  <binding id="toolbarpaletteitem" extends="xul:button">
     <content>
       <xul:hbox class="toolbarpaletteitem-box" flex="1" xbl:inherits="type,place">
         <children/>
       </xul:hbox>
     </content>
   </binding>
 
   <binding id="toolbarpaletteitem-palette" extends="chrome://global/content/bindings/toolbar.xml#toolbarpaletteitem">
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -281,20 +281,16 @@ menulist {
 
 /******* toolbar *******/
 
 toolbox {
   -moz-appearance: toolbox;
   -moz-box-orient: vertical;
 }
 
-toolbar {
-  -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar");
-}
-
 toolbar[customizing="true"][collapsed="true"] {
   /* Some apps, e.g. Firefox, use 'collapsed' to hide toolbars.
      Override it while customizing. */
   visibility: visible;
 }
 
 toolbar[customizing="true"][hidden="true"] {
   /* Some apps, e.g. SeaMonkey, use 'hidden' to hide toolbars.
@@ -316,26 +312,17 @@ toolbar[type="menubar"][autohide="true"]
 toolbar[type="menubar"][autohide="true"][inactive="true"]:not([customizing="true"]) {
   min-height: 0 !important;
   height: 0 !important;
   -moz-appearance: none !important;
   border-style: none !important;
 }
 %endif
 
-toolbarseparator {
-  -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbardecoration");
-}
-
-toolbarspacer {
-  -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbardecoration");
-}
-
 toolbarspring {
-  -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbardecoration");
   -moz-box-flex: 1000;
 }
 
 toolbarpaletteitem {
   -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbarpaletteitem");
 }
 
 toolbarpaletteitem[place="palette"] {