Bug 1412361: Remove unused XBL checkbox-baseline and checkbox-radio. draft
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 02 Nov 2017 10:28:53 -0700
changeset 692237 dd79f0be2d6ff5a61bedc5a09925aa4b78e30c1b
parent 692149 58e3cc92a9e49a92ce07affb1c427df354bd913a
child 738718 63cb908cada7c48030ec1af90d9353b442c0a5f5
push id87457
push userdtownsend@mozilla.com
push dateThu, 02 Nov 2017 21:12:28 +0000
bugs1412361
milestone58.0a1
Bug 1412361: Remove unused XBL checkbox-baseline and checkbox-radio. MozReview-Commit-ID: 3wHHhkcGXEC
mobile/android/chrome/content/bindings/checkbox.xml
mobile/android/locales/en-US/chrome/checkbox.dtd
mobile/android/locales/jar.mn
toolkit/content/widgets/checkbox.xml
--- a/mobile/android/chrome/content/bindings/checkbox.xml
+++ b/mobile/android/chrome/content/bindings/checkbox.xml
@@ -1,81 +1,19 @@
 <?xml version="1.0"?>
 
 <!-- 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/. -->
 
-<!DOCTYPE bindings [
-  <!ENTITY % checkboxDTD SYSTEM "chrome://browser/locale/checkbox.dtd">
-  %checkboxDTD;
-]>
-
 <bindings
     xmlns="http://www.mozilla.org/xbl"
     xmlns:xbl="http://www.mozilla.org/xbl"
     xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <binding id="checkbox-radio" display="xul:box" extends="chrome://global/content/bindings/checkbox.xml#checkbox-baseline">
-    <content>
-      <xul:radiogroup anonid="group" xbl:inherits="disabled">
-        <xul:radio anonid="on" class="checkbox-radio-on" label="&checkbox.yes.label;" xbl:inherits="label=onlabel"/>
-        <xul:radio anonid="off" class="checkbox-radio-off" label="&checkbox.no.label;" xbl:inherits="label=offlabel"/>
-      </xul:radiogroup>
-    </content>
-    <implementation>
-      <constructor><![CDATA[
-        this.setChecked(this.checked);
-      ]]></constructor>
-
-      <field name="_group">
-        document.getAnonymousElementByAttribute(this, "anonid", "group");
-      </field>
-
-      <field name="_on">
-        document.getAnonymousElementByAttribute(this, "anonid", "on");
-      </field>
-
-      <field name="_off">
-        document.getAnonymousElementByAttribute(this, "anonid", "off");
-      </field>
-
-      <property name="onlabel"
-        onget="return this._on.label"
-        onset="this._on.label=val"/>
-
-      <property name="offlabel"
-        onget="return this._off.label"
-        onset="this._off.label=val"/>
-
-      <method name="setChecked">
-        <parameter name="aValue"/>
-        <body>
-        <![CDATA[
-          var change = (aValue != this.checked);
-          if (aValue) {
-            this.setAttribute("checked", "true");
-            this._group.selectedItem = this._on;
-          } else {
-            this.removeAttribute("checked");
-            this._group.selectedItem = this._off;
-          }
-
-          if (change) {
-            var event = document.createEvent("Events");
-            event.initEvent("CheckboxStateChange", true, true);
-            this.dispatchEvent(event);
-          }
-          return aValue;
-        ]]>
-        </body>
-      </method>
-    </implementation>
-  </binding>
-
   <binding id="checkbox-with-spacing"
            extends="chrome://global/content/bindings/checkbox.xml#checkbox">
 
     <content>
       <xul:hbox class="checkbox-spacer-box">
         <xul:image class="checkbox-check" xbl:inherits="checked,disabled"/>
       </xul:hbox>
       <xul:hbox class="checkbox-label-center-box" flex="1">
deleted file mode 100644
--- a/mobile/android/locales/en-US/chrome/checkbox.dtd
+++ /dev/null
@@ -1,6 +0,0 @@
-<!-- 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/. -->
-
-<!ENTITY checkbox.yes.label    "Yes">
-<!ENTITY checkbox.no.label     "No">
--- a/mobile/android/locales/jar.mn
+++ b/mobile/android/locales/jar.mn
@@ -20,17 +20,16 @@
   locale/@AB_CD@/browser/aboutHome.properties     (%chrome/aboutHome.properties)
   locale/@AB_CD@/browser/aboutPrivateBrowsing.dtd (%chrome/aboutPrivateBrowsing.dtd)
 #ifdef MOZ_SERVICES_HEALTHREPORT
   locale/@AB_CD@/browser/aboutHealthReport.dtd    (%chrome/aboutHealthReport.dtd)
 #endif
   locale/@AB_CD@/browser/browser.properties       (%chrome/browser.properties)
   locale/@AB_CD@/browser/config.dtd               (%chrome/config.dtd)
   locale/@AB_CD@/browser/config.properties        (%chrome/config.properties)
-  locale/@AB_CD@/browser/checkbox.dtd             (%chrome/checkbox.dtd)
   locale/@AB_CD@/browser/devicePrompt.properties  (%chrome/devicePrompt.properties)
   locale/@AB_CD@/browser/pippki.properties        (%chrome/pippki.properties)
   locale/@AB_CD@/browser/sync.properties          (%chrome/sync.properties)
   locale/@AB_CD@/browser/phishing.dtd             (%chrome/phishing.dtd)
   locale/@AB_CD@/browser/aboutLogins.dtd          (%chrome/aboutLogins.dtd)
   locale/@AB_CD@/browser/aboutLogins.properties  (%chrome/aboutLogins.properties)
   locale/@AB_CD@/browser/passwordmgr.properties   (%chrome/passwordmgr.properties)
 #ifndef RELEASE_OR_BETA
--- a/toolkit/content/widgets/checkbox.xml
+++ b/toolkit/content/widgets/checkbox.xml
@@ -4,24 +4,22 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 
 <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/checkbox.xml#checkbox-baseline">
+  <binding id="checkbox" role="xul:checkbox"
+    extends="chrome://global/content/bindings/general.xml#basetext">
     <resources>
       <stylesheet src="chrome://global/skin/checkbox.css"/>
     </resources>
-  </binding>
 
-  <binding id="checkbox-baseline" role="xul:checkbox"
-    extends="chrome://global/content/bindings/general.xml#basetext">
     <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>