Bug 1473921 - Load checkbox.css and radio.css as document stylesheets. r=paolo
authorDão Gottwald <dao@mozilla.com>
Fri, 14 Sep 2018 19:35:47 +0200
changeset 436422 85c0ed4ef9c07f9ed83e1279c1c0b4479881b74c
parent 436421 f8bf4f08ececa908442535c90aa44e60712039c6
child 436423 d212d02b75014a20afed1b4eb61ee80fd85a3769
push id107848
push userdgottwald@mozilla.com
push dateFri, 14 Sep 2018 17:36:05 +0000
treeherdermozilla-inbound@85c0ed4ef9c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaolo
bugs1473921
milestone64.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 1473921 - Load checkbox.css and radio.css as document stylesheets. r=paolo
toolkit/content/widgets.css
toolkit/content/widgets/checkbox.xml
toolkit/content/widgets/radio.xml
toolkit/themes/linux/global/checkbox.css
toolkit/themes/linux/global/radio.css
toolkit/themes/osx/global/checkbox.css
toolkit/themes/osx/global/radio.css
toolkit/themes/windows/global/checkbox.css
toolkit/themes/windows/global/radio.css
--- a/toolkit/content/widgets.css
+++ b/toolkit/content/widgets.css
@@ -3,21 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* ===== widgets.css =====================================================
    == Styles ported from XBL <resources>, loaded by "global.css".
    ======================================================================= */
 
 @import url("chrome://global/content/autocomplete.css");
 @import url("chrome://global/skin/autocomplete.css");
+@import url("chrome://global/skin/checkbox.css");
 @import url("chrome://global/skin/dialog.css");
 @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/notification.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/splitter.css");
 @import url("chrome://global/skin/tabbox.css");
 @import url("chrome://global/skin/toolbar.css");
 @import url("chrome://global/skin/wizard.css");
--- 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/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;
@@ -388,20 +384,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/themes/linux/global/checkbox.css
+++ b/toolkit/themes/linux/global/checkbox.css
@@ -20,17 +20,17 @@ checkbox {
   -moz-appearance: checkbox-label;
 }
 
 .checkbox-icon[src] {
   margin-inline-end: 2px;
 }
 
 .checkbox-label {
-  margin: 0 !important;
+  margin: 0;
 }
 
 /* ..... focused state ..... */
 
 checkbox:-moz-focusring > .checkbox-label-box {
   /* Native theming should take care of this but it appears to be broken with
      some Gtk themes. Bug 1312169. */
   outline: 1px dotted;
--- a/toolkit/themes/linux/global/radio.css
+++ b/toolkit/themes/linux/global/radio.css
@@ -25,17 +25,17 @@ radio {
   -moz-appearance: radio-label;
 }
 
 .radio-icon[src] {
   margin-inline-end: 2px;
 }
 
 .radio-label {
-  margin: 0 !important;
+  margin: 0;
 }
 
 /* ..... focused state ..... */
 
 radio[focused="true"] > .radio-label-box {
   /* Native theming should take care of this but it appears to be broken with
      some Gtk themes. Bug 1312169. */
   outline: 1px dotted;
--- a/toolkit/themes/osx/global/checkbox.css
+++ b/toolkit/themes/osx/global/checkbox.css
@@ -10,23 +10,23 @@ checkbox {
   margin: 4px 2px;
 }
 
 .checkbox-icon {
   margin-right: 2px;
 }
 
 .checkbox-label {
-  margin: 1px 0 !important;
+  margin: 1px 0;
 }
 
 /* ..... disabled state ..... */
 
 checkbox[disabled="true"] {
-  color: GrayText !important;
+  color: GrayText;
 }
 
 /* ::::: checkmark image ::::: */
 
 .checkbox-check {
   -moz-appearance: checkbox;
   margin: 1px 1px 0;
   /* vertical-align tells native theming where to snap to. However, this doesn't
--- a/toolkit/themes/osx/global/radio.css
+++ b/toolkit/themes/osx/global/radio.css
@@ -10,31 +10,26 @@ radiogroup {
 
 radio {
   -moz-appearance: radio-container;
   -moz-box-align: center;
   margin: 4px 2px;
   -moz-user-focus: ignore;
 }
 
-.radio-label-box {
-  margin-inline-start: 0px;
-  padding: 0px;
-}
-
 .radio-icon {
   margin-inline-end: 2px;
 }
 
 .radio-label {
-  margin: 1px 0 !important;
+  margin: 1px 0;
 }
 
 radio[disabled="true"] {
-  color: GrayText !important;
+  color: GrayText;
 }
 
 .radio-check {
   -moz-appearance: radio;
   margin: 0 1px 1px;
   /* vertical-align tells native theming where to snap to. However, this doesn't
    * always work reliably because of bug 503833. */
   vertical-align: bottom;
--- a/toolkit/themes/windows/global/checkbox.css
+++ b/toolkit/themes/windows/global/checkbox.css
@@ -20,17 +20,17 @@ checkbox {
   padding-inline-end: 2px;
 }
 
 .checkbox-icon[src] {
   margin-inline-end: 2px;
 }
 
 .checkbox-label {
-  margin: 0 !important;
+  margin: 0;
 }
 
 /* ..... focused state ..... */
 
 checkbox:-moz-focusring > .checkbox-label-box {
   outline: 1px dotted;
 }
 
--- a/toolkit/themes/windows/global/radio.css
+++ b/toolkit/themes/windows/global/radio.css
@@ -31,17 +31,17 @@ radio {
   padding-inline-start: 1px;
 }
 
 .radio-icon[src] {
   margin-inline-end: 2px;
 }
 
 .radio-label {
-  margin: 0 !important;
+  margin: 0;
 }
 
 /* ..... focused state ..... */
 
 radio[focused="true"] > .radio-label-box {
   outline: 1px dotted;
 }