Bug 1463820 - Migrate all tookit/content/widget <resources> to UA styles draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Sun, 24 Jun 2018 12:33:35 +0100
changeset 809968 5fcb9f650fe82f7eac8ab8f6238f418b0e345092
parent 809967 97ad11e2640e791ea820aef34ca56138a7e0e63e
child 809969 975970182d829d21daa24d32a2c0d9ce269435c1
push id113849
push userpaolo.mozmail@amadzone.org
push dateSun, 24 Jun 2018 11:35:53 +0000
bugs1463820
milestone62.0a1
Bug 1463820 - Migrate all tookit/content/widget <resources> to UA styles MozReview-Commit-ID: K9og3bSlI5o
toolkit/content/autocomplete.css
toolkit/content/components.css
toolkit/content/widgets.css
toolkit/content/widgets/autocomplete.xml
toolkit/content/widgets/button.xml
toolkit/content/widgets/checkbox.xml
toolkit/content/widgets/colorpicker.xml
toolkit/content/widgets/datetimepopup.xml
toolkit/content/widgets/dialog.xml
toolkit/content/widgets/findbar.xml
toolkit/content/widgets/listbox.xml
toolkit/content/widgets/notification.xml
toolkit/content/widgets/numberbox.xml
toolkit/content/widgets/popup.xml
toolkit/content/widgets/progressmeter.xml
toolkit/content/widgets/radio.xml
toolkit/content/widgets/richlistbox.xml
toolkit/content/widgets/scale.xml
toolkit/content/widgets/tabbox.xml
toolkit/content/widgets/textbox.xml
toolkit/content/widgets/toolbarbutton.xml
toolkit/content/widgets/tree.xml
toolkit/content/widgets/wizard.xml
toolkit/themes/linux/global/autocomplete.css
toolkit/themes/osx/global/autocomplete.css
toolkit/themes/windows/global/autocomplete.css
--- a/toolkit/content/autocomplete.css
+++ b/toolkit/content/autocomplete.css
@@ -7,17 +7,17 @@
 
 /* Apply crisp rendering for favicons at exactly 2dppx resolution */
 @media (resolution: 2dppx) {
   .ac-site-icon {
     image-rendering: -moz-crisp-edges;
   }
 }
 
-richlistitem {
+.autocomplete-richlistbox richlistitem {
   -moz-box-orient: horizontal;
   overflow: hidden;
 }
 
 .ac-title-text,
 .ac-tags-text,
 .ac-url-text,
 .ac-action-text {
--- a/toolkit/content/components.css
+++ b/toolkit/content/components.css
@@ -5,15 +5,8 @@
 /* ===== components.css ==================================================
    ==
    == THESE STYLES WILL BE MOVED TO "widgets.css".
    ==
    == These are loaded as UA syles, but eventually they will become
    == document styles in "widgets.css". See bug 1463820 for details.
    ==
    ======================================================================= */
-
-@import url("chrome://global/skin/dropmarker.css");
-@import url("chrome://global/skin/groupbox.css");
-@import url("chrome://global/skin/menu.css");
-@import url("chrome://global/skin/menulist.css");
-@import url("chrome://global/skin/toolbar.css");
-@import url("chrome://global/skin/splitter.css");
--- a/toolkit/content/widgets.css
+++ b/toolkit/content/widgets.css
@@ -1,7 +1,38 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 /* ===== widgets.css =====================================================
    == Styles ported from XBL <resources>, loaded in every XUL document.
    ======================================================================= */
+
+@import url("chrome://global/content/autocomplete.css");
+@import url("chrome://global/content/textbox.css");
+@import url("chrome://global/skin/autocomplete.css");
+@import url("chrome://global/skin/button.css");
+@import url("chrome://global/skin/checkbox.css");
+@import url("chrome://global/skin/colorpicker.css");
+@import url("chrome://global/skin/datetimepopup.css");
+@import url("chrome://global/skin/dialog.css");
+@import url("chrome://global/skin/dropmarker.css");
+@import url("chrome://global/skin/findBar.css");
+@import url("chrome://global/skin/groupbox.css");
+@import url("chrome://global/skin/listbox.css");
+@import url("chrome://global/skin/menu.css");
+@import url("chrome://global/skin/menulist.css");
+@import url("chrome://global/skin/notification.css");
+@import url("chrome://global/skin/numberbox.css");
+@import url("chrome://global/skin/popup.css");
+@import url("chrome://global/skin/progressmeter.css");
+@import url("chrome://global/skin/radio.css");
+@import url("chrome://global/skin/richlistbox.css");
+@import url("chrome://global/skin/scale.css");
+@import url("chrome://global/skin/scrollbox.css");
+@import url("chrome://global/skin/splitter.css");
+@import url("chrome://global/skin/tabbox.css");
+@import url("chrome://global/skin/textbox.css");
+@import url("chrome://global/skin/toolbar.css");
+@import url("chrome://global/skin/toolbarbutton.css");
+@import url("chrome://global/skin/tree.css");
+@import url("chrome://global/skin/wizard.css");
+   
\ No newline at end of file
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -6,20 +6,16 @@
 <bindings id="autocompleteBindings"
           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="autocomplete"
            extends="chrome://global/content/bindings/textbox.xml#textbox">
-    <resources>
-      <stylesheet src="chrome://global/content/autocomplete.css"/>
-      <stylesheet src="chrome://global/skin/autocomplete.css"/>
-    </resources>
 
     <content sizetopopup="pref">
       <children includes="image|deck|stack|box"/>
 
       <xul:hbox anonid="textbox-input-box" class="textbox-input-box" flex="1" xbl:inherits="tooltiptext=inputtooltiptext">
         <children/>
         <html:input anonid="input" class="autocomplete-textbox textbox-input"
                     allowevents="true"
@@ -643,20 +639,16 @@
           if (!this.ignoreBlurWhileSearching)
             this.detachController();
         }
       ]]></handler>
     </handlers>
   </binding>
 
   <binding id="autocomplete-rich-result-popup" extends="chrome://global/content/bindings/popup.xml#popup">
-    <resources>
-      <stylesheet src="chrome://global/content/autocomplete.css"/>
-      <stylesheet src="chrome://global/skin/autocomplete.css"/>
-    </resources>
 
     <content ignorekeys="true" level="top" consumeoutsideclicks="never">
       <xul:richlistbox anonid="richlistbox" class="autocomplete-richlistbox" flex="1"/>
       <xul:hbox>
         <children/>
       </xul:hbox>
     </content>
 
--- a/toolkit/content/widgets/button.xml
+++ b/toolkit/content/widgets/button.xml
@@ -187,20 +187,16 @@
           this.fireAccessKeyButton(buttonBox, charPressedLower);
       ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="button" display="xul:button"
            extends="chrome://global/content/bindings/button.xml#button-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/button.css"/>
-    </resources>
-
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:hbox class="box-inherit button-box" xbl:inherits="align,dir,pack,orient"
                 align="center" pack="center" flex="1" anonid="button-box">
         <xul:image class="button-icon" xbl:inherits="src=image"/>
         <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop,highlightable"/>
         <xul:label class="button-highlightable-text" xbl:inherits="xbl:text=label,accesskey,crop,highlightable"/>
       </xul:hbox>
@@ -326,20 +322,16 @@
           event.preventDefault();
         }
       </handler>
     </handlers>
   </binding>
 
   <binding id="menu-button" display="xul:menu"
            extends="chrome://global/content/bindings/button.xml#menu-button-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/button.css"/>
-    </resources>
-
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:button class="box-inherit button-menubutton-button"
                   anonid="button" flex="1" allowevents="true"
                   xbl:inherits="disabled,crop,image,label,accesskey,command,
                                 buttonover,buttondown,align,dir,pack,orient">
         <children/>
       </xul:button>
--- a/toolkit/content/widgets/checkbox.xml
+++ b/toolkit/content/widgets/checkbox.xml
@@ -6,20 +6,16 @@
 
 <bindings id="checkboxBindings"
    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="checkbox"
     extends="chrome://global/content/bindings/general.xml#basetext">
-    <resources>
-      <stylesheet src="chrome://global/skin/checkbox.css"/>
-    </resources>
-
     <content>
       <xul:image class="checkbox-check" xbl:inherits="checked,disabled"/>
       <xul:hbox class="checkbox-label-box" flex="1">
         <xul:image class="checkbox-icon" xbl:inherits="src"/>
         <xul:label class="checkbox-label" xbl:inherits="xbl:text=label,accesskey,crop" flex="1"/>
       </xul:hbox>
     </content>
 
--- a/toolkit/content/widgets/colorpicker.xml
+++ b/toolkit/content/widgets/colorpicker.xml
@@ -5,20 +5,16 @@
 
 
 <bindings id="colorpickerBindings"
    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="colorpicker" extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/colorpicker.css"/>
-    </resources>
-
     <content>
       <xul:vbox flex="1">
 
         <xul:hbox>
           <xul:image class="colorpickertile cp-light" color="#FFFFFF"/>
           <xul:image class="colorpickertile cp-light" color="#FFCCCC"/>
           <xul:image class="colorpickertile cp-light" color="#FFCC99"/>
           <xul:image class="colorpickertile cp-light" color="#FFFF99"/>
@@ -420,20 +416,16 @@
         }
       ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="colorpicker-button" display="xul:menu"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/colorpicker.css"/>
-    </resources>
-
     <content>
       <xul:image class="colorpicker-button-colorbox" anonid="colorbox" flex="1" xbl:inherits="disabled"/>
 
       <xul:panel class="colorpicker-button-menupopup"
                  anonid="colorpopup" noautofocus="true" level="top"
                  onmousedown="event.stopPropagation()"
                  onpopupshowing="this._colorPicker.onPopupShowing()"
                  onpopuphiding="this._colorPicker.onPopupHiding()"
--- a/toolkit/content/widgets/datetimepopup.xml
+++ b/toolkit/content/widgets/datetimepopup.xml
@@ -6,19 +6,16 @@
 
 <bindings id="dateTimePopupBindings"
    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="datetime-popup"
            extends="chrome://global/content/bindings/popup.xml#arrowpanel">
-    <resources>
-      <stylesheet src="chrome://global/skin/datetimepopup.css"/>
-    </resources>
     <implementation>
       <property name="dateTimePopupFrame">
         <getter>
           let frame = this.querySelector("#dateTimePopupFrame");
           if (!frame) {
             frame = this.ownerDocument.createElement("iframe");
             frame.id = "dateTimePopupFrame";
             this.appendChild(frame);
--- a/toolkit/content/widgets/dialog.xml
+++ b/toolkit/content/widgets/dialog.xml
@@ -9,19 +9,16 @@
 ]>
 
 <bindings id="dialogBindings"
           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="dialog">
-    <resources>
-      <stylesheet src="chrome://global/skin/dialog.css"/>
-    </resources>
     <content>
       <xul:vbox class="box-inherit dialog-content-box" flex="1">
         <children/>
       </xul:vbox>
 
       <xul:hbox class="dialog-button-box" anonid="buttons"
                 xbl:inherits="pack=buttonpack,align=buttonalign,dir=buttondir,orient=buttonorient"
 #ifdef XP_UNIX
--- a/toolkit/content/widgets/findbar.xml
+++ b/toolkit/content/widgets/findbar.xml
@@ -151,20 +151,16 @@
         this.findbar._find(value);
         event.stopPropagation();
         event.preventDefault();
       ]]></handler>
     </handlers>
   </binding>
 
   <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"
                      class="findbar-textbox findbar-find-fast"
                      xbl:inherits="flash"/>
         <xul:toolbarbutton anonid="find-previous"
                            class="findbar-find-previous tabbable"
--- a/toolkit/content/widgets/listbox.xml
+++ b/toolkit/content/widgets/listbox.xml
@@ -635,21 +635,16 @@
     </handlers>
   </binding>
 
 
   <!-- Binding for xul:listbox element.
   -->
   <binding id="listbox"
            extends="#listbox-base">
-
-    <resources>
-      <stylesheet src="chrome://global/skin/listbox.css"/>
-    </resources>
-
     <content>
       <children includes="listcols">
         <xul:listcols>
           <xul:listcol flex="1"/>
         </xul:listcols>
       </children>
       <xul:listrows>
         <children includes="listhead"/>
@@ -869,21 +864,16 @@
           this._touchY = -1;
         ]]>
       </handler>
 
     </handlers>
   </binding>
 
   <binding id="listrows">
-
-    <resources>
-      <stylesheet src="chrome://global/skin/listbox.css"/>
-    </resources>
-
     <handlers>
       <handler event="DOMMouseScroll" phase="capturing">
       <![CDATA[
         if (event.axis == event.HORIZONTAL_AXIS)
           return;
 
         var listBox = this.parentNode.listBoxObject;
         var rows = event.detail;
@@ -907,20 +897,16 @@
         event.preventDefault();
       ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="listitem"
            extends="chrome://global/content/bindings/general.xml#basetext">
-    <resources>
-      <stylesheet src="chrome://global/skin/listbox.css"/>
-    </resources>
-
     <content>
       <children>
         <xul:listcell xbl:inherits="label,crop,disabled,flexlabel"/>
       </children>
     </content>
 
     <implementation implements="nsIDOMXULSelectControlItemElement">
       <property name="current" onget="return this.getAttribute('current') == 'true';">
@@ -1072,21 +1058,16 @@
         }
       ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="listcell"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
-
-    <resources>
-      <stylesheet src="chrome://global/skin/listbox.css"/>
-    </resources>
-
     <content>
       <children>
         <xul:label class="listcell-label" xbl:inherits="value=label,flex=flexlabel,crop,disabled" flex="1" crop="right"/>
       </children>
     </content>
   </binding>
 
   <binding id="listcell-iconic"
@@ -1105,34 +1086,24 @@
       <children>
         <xul:image class="listcell-check" xbl:inherits="checked,disabled"/>
         <xul:label class="listcell-label" xbl:inherits="value=label,flex=flexlabel,crop,disabled" flex="1" crop="right"/>
       </children>
     </content>
   </binding>
 
   <binding id="listhead">
-
-    <resources>
-      <stylesheet src="chrome://global/skin/listbox.css"/>
-    </resources>
-
     <content>
       <xul:listheaditem>
         <children includes="listheader"/>
       </xul:listheaditem>
     </content>
   </binding>
 
   <binding id="listheader" display="xul:button">
-
-    <resources>
-      <stylesheet src="chrome://global/skin/listbox.css"/>
-    </resources>
-
     <content>
       <xul:image class="listheader-icon"/>
       <xul:label class="listheader-label" xbl:inherits="value=label,crop" flex="1" crop="right"/>
       <xul:image class="listheader-sortdirection" xbl:inherits="sortDirection"/>
     </content>
   </binding>
 
 </bindings>
--- a/toolkit/content/widgets/notification.xml
+++ b/toolkit/content/widgets/notification.xml
@@ -409,19 +409,16 @@
       </xul:hbox>
       <xul:toolbarbutton ondblclick="event.stopPropagation();"
                          class="messageCloseButton close-icon tabbable"
                          anonid="close-button"
                          xbl:inherits="hidden=hideclose"
                          tooltiptext="&closeNotification.tooltip;"
                          oncommand="document.getBindingParent(this).dismiss();"/>
     </content>
-    <resources>
-      <stylesheet src="chrome://global/skin/notification.css"/>
-    </resources>
     <implementation>
       <property name="label" onset="this.setAttribute('label', val); return val;"
                              onget="return this.getAttribute('label');"/>
       <property name="value" onset="this.setAttribute('value', val); return val;"
                              onget="return this.getAttribute('value');"/>
       <property name="image" onset="this.setAttribute('image', val); return val;"
                              onget="return this.getAttribute('image');"/>
       <property name="type" onset="this.setAttribute('type', val); return val;"
@@ -551,19 +548,16 @@
         <xul:button anonid="button"
                     class="popup-notification-button"
                     default="true"
                     label="&defaultButton.label;"
                     accesskey="&defaultButton.accesskey;"
                     xbl:inherits="oncommand=buttoncommand,label=buttonlabel,accesskey=buttonaccesskey,highlight=buttonhighlight,disabled=mainactiondisabled"/>
       </xul:hbox>
     </content>
-    <resources>
-      <stylesheet src="chrome://global/skin/notification.css"/>
-    </resources>
     <implementation>
       <field name="checkbox" readonly="true">
         document.getAnonymousElementByAttribute(this, "anonid", "checkbox");
       </field>
       <field name="closebutton" readonly="true">
         document.getAnonymousElementByAttribute(this, "anonid", "closebutton");
       </field>
       <field name="button" readonly="true">
--- a/toolkit/content/widgets/numberbox.xml
+++ b/toolkit/content/widgets/numberbox.xml
@@ -7,21 +7,16 @@
 <bindings id="numberboxBindings"
    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="numberbox"
            extends="chrome://global/content/bindings/textbox.xml#textbox">
-
-    <resources>
-      <stylesheet src="chrome://global/skin/numberbox.css"/>
-    </resources>
-
     <content>
       <xul:hbox class="textbox-input-box numberbox-input-box" flex="1" xbl:inherits="context,disabled,focused">
         <html:input class="numberbox-input textbox-input" type="number" anonid="input"
                     xbl:inherits="value,min,max,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey"/>
       </xul:hbox>
     </content>
 
     <implementation>
--- a/toolkit/content/widgets/popup.xml
+++ b/toolkit/content/widgets/popup.xml
@@ -7,19 +7,16 @@
 <!-- globals PopupBoxObject -->
 
 <bindings id="popupBindings"
    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="popup-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/popup.css"/>
-    </resources>
   </binding>
 
   <binding id="popup"
            extends="chrome://global/content/bindings/popup.xml#popup-base">
 
     <content>
       <xul:arrowscrollbox class="popup-internal-box" flex="1" orient="vertical"
                           smoothscroll="false">
--- a/toolkit/content/widgets/progressmeter.xml
+++ b/toolkit/content/widgets/progressmeter.xml
@@ -5,20 +5,16 @@
 
 
 <bindings id="progressmeterBindings"
    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="progressmeter">
-    <resources>
-      <stylesheet src="chrome://global/skin/progressmeter.css"/>
-    </resources>
-
     <content>
       <xul:spacer class="progress-bar" xbl:inherits="mode"/>
       <xul:spacer class="progress-remainder" xbl:inherits="mode"/>
     </content>
 
     <implementation>
       <property name="mode" onset="if (this.mode != val) this.setAttribute('mode', val); return val;"
                             onget="return this.getAttribute('mode');"/>
--- a/toolkit/content/widgets/radio.xml
+++ b/toolkit/content/widgets/radio.xml
@@ -6,20 +6,16 @@
 
 <bindings id="radioBindings"
    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="radiogroup"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/radio.css"/>
-    </resources>
-
     <implementation implements="nsIDOMXULSelectControlElement">
       <constructor>
         <![CDATA[
           if (this.getAttribute("disabled") == "true")
             this.disabled = true;
 
           var children = this._getRadioChildren();
           var length = children.length;
@@ -389,19 +385,16 @@
         this.removeAttribute("focused");
         this.focusedItem = null;
       </handler>
     </handlers>
   </binding>
 
   <binding id="radio"
     extends="chrome://global/content/bindings/general.xml#basetext">
-    <resources>
-      <stylesheet src="chrome://global/skin/radio.css"/>
-    </resources>
 
     <content>
       <xul:image class="radio-check" xbl:inherits="disabled,selected"/>
       <xul:hbox class="radio-label-box" align="center" flex="1">
         <xul:image class="radio-icon" xbl:inherits="src"/>
         <xul:label class="radio-label" xbl:inherits="xbl:text=label,accesskey,crop" flex="1"/>
       </xul:hbox>
     </content>
--- a/toolkit/content/widgets/richlistbox.xml
+++ b/toolkit/content/widgets/richlistbox.xml
@@ -6,20 +6,16 @@
 
 <bindings id="richlistboxBindings"
           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="richlistbox"
            extends="chrome://global/content/bindings/listbox.xml#listbox-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/richlistbox.css"/>
-    </resources>
-
     <content>
       <children includes="listheader"/>
       <xul:scrollbox allowevents="true" orient="vertical" anonid="main-box"
                      flex="1" style="overflow: auto;" xbl:inherits="dir,pack">
         <children/>
       </xul:scrollbox>
     </content>
 
@@ -511,20 +507,16 @@
   </binding>
 
   <binding id="richlistitem"
            extends="chrome://global/content/bindings/listbox.xml#listitem">
     <content>
       <children/>
     </content>
 
-    <resources>
-      <stylesheet src="chrome://global/skin/richlistbox.css"/>
-    </resources>
-
     <implementation>
       <field name="selectedByMouseOver">false</field>
 
       <destructor>
         <![CDATA[
           var control = this.control;
           if (!control)
             return;
--- a/toolkit/content/widgets/scale.xml
+++ b/toolkit/content/widgets/scale.xml
@@ -6,19 +6,16 @@
 
 <bindings id="scaleBindings"
    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="scale"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/scale.css"/>
-    </resources>
 
     <content align="center" pack="center">
       <xul:slider anonid="slider" class="scale-slider" snap="true" flex="1"
                   xbl:inherits="disabled,orient,dir,curpos=value,minpos=min,maxpos=max,increment,pageincrement,movetoclick">
         <xul:thumb class="scale-thumb" xbl:inherits="disabled,orient"/>
       </xul:slider>
     </content>
 
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -5,19 +5,16 @@
 
 
 <bindings id="tabBindings"
           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="tab-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/tabbox.css"/>
-    </resources>
   </binding>
 
   <binding id="tabbox"
            extends="chrome://global/content/bindings/tabbox.xml#tab-base">
     <implementation>
       <property name="handleCtrlTab">
         <setter>
         <![CDATA[
@@ -215,20 +212,16 @@
                     .getService(Ci.nsIEventListenerService);
         els.removeSystemEventListener(this._eventNode, "keydown", this, false);
       </destructor>
     </implementation>
   </binding>
 
   <binding id="tabs"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/tabbox.css"/>
-    </resources>
-
     <content>
       <xul:spacer class="tabs-left"/>
       <children/>
       <xul:spacer class="tabs-right" flex="1"/>
     </content>
 
     <implementation implements="nsIDOMXULSelectControlElement, nsIDOMXULRelatedElement">
       <constructor>
@@ -644,20 +637,16 @@
           ]]>
         </setter>
       </property>
     </implementation>
   </binding>
 
   <binding id="tab" display="xul:button"
            extends="chrome://global/content/bindings/general.xml#basetext">
-    <resources>
-      <stylesheet src="chrome://global/skin/tabbox.css"/>
-    </resources>
-
     <content>
       <xul:hbox class="tab-middle box-inherit" xbl:inherits="align,dir,pack,orient,selected,visuallyselected" flex="1">
         <xul:image class="tab-icon"
                    xbl:inherits="validate,src=image"
                    role="presentation"/>
         <xul:label class="tab-text"
                    xbl:inherits="value=label,accesskey,crop,disabled"
                    flex="1"
--- a/toolkit/content/widgets/textbox.xml
+++ b/toolkit/content/widgets/textbox.xml
@@ -14,21 +14,16 @@
 
 <bindings id="textboxBindings"
    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="textbox">
-    <resources>
-      <stylesheet src="chrome://global/content/textbox.css"/>
-      <stylesheet src="chrome://global/skin/textbox.css"/>
-    </resources>
-
     <content>
       <children/>
       <xul:hbox class="textbox-input-box" flex="1" xbl:inherits="context,spellcheck">
         <html:input class="textbox-input" anonid="input"
                     xbl:inherits="value,type,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey,noinitialfocus,mozactionhint,spellcheck"/>
       </xul:hbox>
     </content>
 
--- a/toolkit/content/widgets/toolbarbutton.xml
+++ b/toolkit/content/widgets/toolbarbutton.xml
@@ -6,20 +6,16 @@
 
 <bindings id="toolbarbuttonBindings"
    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="toolbarbutton" display="xul:button"
            extends="chrome://global/content/bindings/button.xml#button-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/toolbarbutton.css"/>
-    </resources>
-
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label,type,consumeanchor"/>
       <xul:label class="toolbarbutton-text" crop="right" flex="1"
                  xbl:inherits="value=label,accesskey,crop,dragover-top,wrap"/>
       <xul:label class="toolbarbutton-multiline-text" flex="1"
                  xbl:inherits="xbl:text=label,accesskey,wrap"/>
       <children includes="box"/>
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -10,19 +10,16 @@
 ]>
 
 <bindings id="treeBindings"
    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="tree-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/tree.css"/>
-    </resources>
     <implementation>
       <method name="_isAccelPressed">
         <parameter name="aEvent"/>
         <body><![CDATA[
           return aEvent.getModifierState("Accel");
         ]]></body>
       </method>
     </implementation>
@@ -1024,19 +1021,16 @@
            event.preventDefault();
          }
          ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="treecols">
-    <resources>
-      <stylesheet src="chrome://global/skin/tree.css"/>
-    </resources>
     <content orient="horizontal">
       <xul:hbox class="tree-scrollable-columns" flex="1">
         <children includes="treecol|splitter"/>
       </xul:hbox>
       <xul:treecolpicker class="treecol-image" fixed="true" xbl:inherits="tooltiptext=pickertooltiptext"/>
     </content>
     <implementation>
       <constructor><![CDATA[
--- a/toolkit/content/widgets/wizard.xml
+++ b/toolkit/content/widgets/wizard.xml
@@ -10,25 +10,19 @@
 ]>
 
 <bindings id="wizardBindings"
    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="wizard-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/wizard.css"/>
-    </resources>
   </binding>
 
   <binding id="wizard">
-    <resources>
-      <stylesheet src="chrome://global/skin/wizard.css"/>
-    </resources>
     <content>
       <xul:hbox class="wizard-header" anonid="Header"/>
 
       <xul:deck class="wizard-page-box" flex="1" anonid="Deck">
         <children includes="wizardpage"/>
       </xul:deck>
       <children/>
 
--- a/toolkit/themes/linux/global/autocomplete.css
+++ b/toolkit/themes/linux/global/autocomplete.css
@@ -6,17 +6,17 @@
   == Styles used by the autocomplete widget.
   ======================================================================= */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 /* ::::: autocomplete ::::: */
 
-textbox[nomatch="true"][highlightnonmatches="true"] {
+textbox[type="autocomplete"][nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
 /* ::::: autocomplete popups ::::: */
 
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   border: 1px solid ThreeDShadow;
--- a/toolkit/themes/osx/global/autocomplete.css
+++ b/toolkit/themes/osx/global/autocomplete.css
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
-textbox[nomatch="true"][highlightnonmatches="true"] {
+textbox[type="autocomplete"][nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
 /* ::::: autocomplete popups ::::: */
 
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   padding: 0px !important;
--- a/toolkit/themes/windows/global/autocomplete.css
+++ b/toolkit/themes/windows/global/autocomplete.css
@@ -6,17 +6,17 @@
   == Styles used by the autocomplete widget.
   ======================================================================= */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 /* ::::: autocomplete ::::: */
 
-textbox[nomatch="true"][highlightnonmatches="true"] {
+textbox[type="autocomplete"][nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
 /* ::::: autocomplete popups ::::: */
 
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   -moz-appearance: none;