Bug 1429573 - Remove spinbuttons.xml bindings now that they are unused. r=Paolo draft
authorTim Nguyen <ntim.bugs@gmail.com>
Fri, 09 Feb 2018 21:54:42 +0000
changeset 753259 14e1ccd92f6b1549e457536aadd2c70bfca91606
parent 753258 cfe813d6601978b4ad442a6b4d48a185131756a6
push id98538
push userbmo:ntim.bugs@gmail.com
push dateFri, 09 Feb 2018 21:55:26 +0000
reviewersPaolo
bugs1429573
milestone60.0a1
Bug 1429573 - Remove spinbuttons.xml bindings now that they are unused. r=Paolo MozReview-Commit-ID: Cbj7vZcrDrL
accessible/base/Role.h
accessible/interfaces/nsIAccessibleRole.idl
browser/installer/allowed-dupes.mn
mobile/android/installer/allowed-dupes.mn
toolkit/content/jar.mn
toolkit/content/widgets/spinbuttons.xml
toolkit/content/xul.css
toolkit/themes/mobile/jar.mn
toolkit/themes/osx/global/jar.mn
toolkit/themes/osx/global/spinbuttons.css
toolkit/themes/shared/non-mac.jar.inc.mn
toolkit/themes/windows/global/spinbuttons.css
--- a/accessible/base/Role.h
+++ b/accessible/base/Role.h
@@ -340,17 +340,17 @@ enum Role {
    * increments between minimum and maximum values. It is used by xul:scale,
    * role="slider".
    */
   SLIDER = 51,
 
   /**
    * Represents a spin box, which is a control that allows the user to increment
    * or decrement the value displayed in a separate "buddy" control associated
-   * with the spin box. It is used for xul:spinbuttons.
+   * with the spin box. It is used for input[type=number] spin buttons.
    */
   SPINBUTTON = 52,
 
   /**
    * Represents a graphical image used to diagram data. It is used for svg:svg.
    */
   DIAGRAM = 53,
 
--- a/accessible/interfaces/nsIAccessibleRole.idl
+++ b/accessible/interfaces/nsIAccessibleRole.idl
@@ -333,17 +333,17 @@ interface nsIAccessibleRole : nsISupport
    * increments between minimum and maximum values. It is used by xul:scale,
    * role="slider".
    */
   const unsigned long ROLE_SLIDER = 51;
 
   /**
    * Represents a spin box, which is a control that allows the user to increment
    * or decrement the value displayed in a separate "buddy" control associated
-   * with the spin box. It is used for xul:spinbuttons.
+   * with the spin box. It is used for input[type=number] spin buttons.
    */
   const unsigned long ROLE_SPINBUTTON = 52;
 
   /**
    * Represents a graphical image used to diagram data. It is used for svg:svg.
    */
   const unsigned long ROLE_DIAGRAM = 53;
 
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -108,17 +108,16 @@ chrome/toolkit/skin/classic/global/popup
 chrome/toolkit/skin/classic/global/preferences.css
 chrome/toolkit/skin/classic/global/progressmeter.css
 chrome/toolkit/skin/classic/global/radio.css
 chrome/toolkit/skin/classic/global/resizer.css
 chrome/toolkit/skin/classic/global/richlistbox.css
 chrome/toolkit/skin/classic/global/scale.css
 chrome/toolkit/skin/classic/global/scrollbars.css
 chrome/toolkit/skin/classic/global/scrollbox.css
-chrome/toolkit/skin/classic/global/spinbuttons.css
 chrome/toolkit/skin/classic/global/splitter.css
 chrome/toolkit/skin/classic/global/tabbox.css
 chrome/toolkit/skin/classic/global/textbox.css
 chrome/toolkit/skin/classic/global/toolbar.css
 chrome/toolkit/skin/classic/global/toolbarbutton.css
 chrome/toolkit/skin/classic/global/tree.css
 chrome/toolkit/skin/classic/global/wizard.css
 chrome/toolkit/skin/classic/mozapps/downloads/buttons.png
--- a/mobile/android/installer/allowed-dupes.mn
+++ b/mobile/android/installer/allowed-dupes.mn
@@ -20,17 +20,16 @@ chrome/toolkit/skin/classic/global/popup
 chrome/toolkit/skin/classic/global/preferences.css
 chrome/toolkit/skin/classic/global/progressmeter.css
 chrome/toolkit/skin/classic/global/radio.css
 chrome/toolkit/skin/classic/global/resizer.css
 chrome/toolkit/skin/classic/global/richlistbox.css
 chrome/toolkit/skin/classic/global/scale.css
 chrome/toolkit/skin/classic/global/scrollbars.css
 chrome/toolkit/skin/classic/global/scrollbox.css
-chrome/toolkit/skin/classic/global/spinbuttons.css
 chrome/toolkit/skin/classic/global/splitter.css
 chrome/toolkit/skin/classic/global/tabbox.css
 chrome/toolkit/skin/classic/global/textbox.css
 chrome/toolkit/skin/classic/global/toolbar.css
 chrome/toolkit/skin/classic/global/toolbarbutton.css
 chrome/toolkit/skin/classic/global/tree.css
 chrome/toolkit/skin/classic/global/wizard.css
 modules/commonjs/sdk/ui/button/view/events.js
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -89,17 +89,16 @@ toolkit.jar:
    content/global/bindings/remote-browser.xml  (widgets/remote-browser.xml)
    content/global/bindings/resizer.xml         (widgets/resizer.xml)
    content/global/bindings/richlistbox.xml     (widgets/richlistbox.xml)
    content/global/bindings/scale.xml           (widgets/scale.xml)
    content/global/bindings/scrollbar.xml       (widgets/scrollbar.xml)
    content/global/bindings/scrollbox.xml       (widgets/scrollbox.xml)
    content/global/bindings/spinner.js          (widgets/spinner.js)
    content/global/bindings/splitter.xml        (widgets/splitter.xml)
-   content/global/bindings/spinbuttons.xml     (widgets/spinbuttons.xml)
    content/global/bindings/stringbundle.xml    (widgets/stringbundle.xml)
 *  content/global/bindings/tabbox.xml          (widgets/tabbox.xml)
    content/global/bindings/text.xml            (widgets/text.xml)
 *  content/global/bindings/textbox.xml         (widgets/textbox.xml)
    content/global/bindings/timekeeper.js       (widgets/timekeeper.js)
    content/global/bindings/timepicker.js       (widgets/timepicker.js)
    content/global/bindings/toolbar.xml         (widgets/toolbar.xml)
    content/global/bindings/toolbarbutton.xml   (widgets/toolbarbutton.xml)
deleted file mode 100644
--- a/toolkit/content/widgets/spinbuttons.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- 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/. -->
-
-<bindings id="spinbuttonsBindings"
-   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="spinbuttons"
-           extends="chrome://global/content/bindings/general.xml#basecontrol">
-
-    <resources>
-      <stylesheet src="chrome://global/skin/spinbuttons.css"/>
-    </resources>
-
-    <content>
-      <xul:vbox class="spinbuttons-box" flex="1">
-        <xul:button anonid="increaseButton" type="repeat" flex="1"
-                    class="spinbuttons-button spinbuttons-up"
-                    xbl:inherits="disabled,disabled=increasedisabled"/>
-        <xul:button anonid="decreaseButton" type="repeat" flex="1"
-                    class="spinbuttons-button spinbuttons-down"
-                    xbl:inherits="disabled,disabled=decreasedisabled"/>
-      </xul:vbox>
-    </content>
-
-    <implementation>
-      <property name="_increaseButton" readonly="true">
-        <getter>
-          return document.getAnonymousElementByAttribute(this, "anonid", "increaseButton");
-        </getter>
-      </property>
-      <property name="_decreaseButton" readonly="true">
-        <getter>
-          return document.getAnonymousElementByAttribute(this, "anonid", "decreaseButton");
-        </getter>
-      </property>
-
-      <property name="increaseDisabled"
-                onget="return this._increaseButton.getAttribute('disabled') == 'true';"
-                onset="if (val) this._increaseButton.setAttribute('disabled', 'true');
-                       else this._increaseButton.removeAttribute('disabled'); return val;"/>
-      <property name="decreaseDisabled"
-                onget="return this._decreaseButton.getAttribute('disabled') == 'true';"
-                onset="if (val) this._decreaseButton.setAttribute('disabled', 'true');
-                       else this._decreaseButton.removeAttribute('disabled'); return val;"/>
-    </implementation>
-
-    <handlers>
-      <handler event="mousedown">
-        <![CDATA[
-          // on the Mac, the native theme draws the spinbutton as a single widget
-          // so a state attribute is set based on where the mouse button was pressed
-          if (event.originalTarget == this._increaseButton)
-            this.setAttribute("state", "up");
-          else if (event.originalTarget == this._decreaseButton)
-            this.setAttribute("state", "down");
-        ]]>
-      </handler>
-
-      <handler event="mouseup">
-        this.removeAttribute("state");
-      </handler>
-      <handler event="mouseout">
-        this.removeAttribute("state");
-      </handler>
-
-      <handler event="command">
-        <![CDATA[
-          var eventname;
-          if (event.originalTarget == this._increaseButton)
-            eventname = "up";
-          else if (event.originalTarget == this._decreaseButton)
-            eventname = "down";
-
-          var evt = document.createEvent("Events");
-          evt.initEvent(eventname, true, true);
-          var cancel = this.dispatchEvent(evt);
-
-          if (this.hasAttribute("on" + eventname)) {
-            var fn = new Function("event", this.getAttribute("on" + eventname));
-            if (fn.call(this, event) == false)
-              cancel = true;
-          }
-
-          return !cancel;
-        ]]>
-      </handler>
-
-    </handlers>
-  </binding>
-
-</bindings>
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -951,26 +951,16 @@ arrowscrollbox {
 arrowscrollbox[clicktoscroll="true"] {
   -moz-binding: url("chrome://global/content/bindings/scrollbox.xml#arrowscrollbox-clicktoscroll");
 }
 
 autorepeatbutton {
   -moz-binding: url("chrome://global/content/bindings/scrollbox.xml#autorepeatbutton");
 }
 
-/********** spinbuttons ***********/
-
-spinbuttons {
-  -moz-binding: url("chrome://global/content/bindings/spinbuttons.xml#spinbuttons");
-}
-
-.spinbuttons-button {
-  -moz-user-focus: ignore;
-}
-
 /********** stringbundle **********/
 
 stringbundleset {
   visibility: collapse;
 }
 
 stringbundle {
   -moz-binding: url("chrome://global/content/bindings/stringbundle.xml#stringbundle");
--- a/toolkit/themes/mobile/jar.mn
+++ b/toolkit/themes/mobile/jar.mn
@@ -18,17 +18,16 @@ toolkit.jar:
    skin/classic/global/numberbox.css                       (global/empty.css)
    skin/classic/global/popup.css                           (global/empty.css)
    skin/classic/global/progressmeter.css                   (global/empty.css)
    skin/classic/global/radio.css                           (global/empty.css)
    skin/classic/global/resizer.css                         (global/empty.css)
    skin/classic/global/richlistbox.css                     (global/empty.css)
    skin/classic/global/scale.css                           (global/empty.css)
    skin/classic/global/scrollbox.css                       (global/empty.css)
-   skin/classic/global/spinbuttons.css                     (global/empty.css)
    skin/classic/global/splitter.css                        (global/empty.css)
    skin/classic/global/tabbox.css                          (global/empty.css)
    skin/classic/global/textbox.css                         (global/empty.css)
    skin/classic/global/toolbar.css                         (global/empty.css)
    skin/classic/global/toolbarbutton.css                   (global/empty.css)
    skin/classic/global/tree.css                            (global/empty.css)
    skin/classic/global/wizard.css                          (global/empty.css)
    skin/classic/global/scrollbars.css                      (global/empty.css)
--- a/toolkit/themes/osx/global/jar.mn
+++ b/toolkit/themes/osx/global/jar.mn
@@ -25,17 +25,16 @@ toolkit.jar:
   skin/classic/global/numberbox.css
   skin/classic/global/popup.css
   skin/classic/global/progressmeter.css
   skin/classic/global/radio.css
   skin/classic/global/resizer.css
   skin/classic/global/richlistbox.css
   skin/classic/global/scrollbars.css                                 (nativescrollbars.css)
   skin/classic/global/scrollbox.css
-  skin/classic/global/spinbuttons.css
   skin/classic/global/splitter.css
   skin/classic/global/tabprompts.css
   skin/classic/global/tabbox.css
   skin/classic/global/textbox.css
   skin/classic/global/toolbar.css
   skin/classic/global/toolbarbutton.css
 * skin/classic/global/tree.css
   skin/classic/global/wizard.css
deleted file mode 100644
--- a/toolkit/themes/osx/global/spinbuttons.css
+++ /dev/null
@@ -1,31 +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/. */
-
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-spinbuttons {
-  height: 24px;
-  min-height: 24px;
-  -moz-appearance: spinner;
-  cursor: default;
-}
-
-.spinbuttons-up {
-  -moz-appearance: none;
-  -moz-box-flex: 1;
-  min-width: 1px;
-  min-height: 1px;
-  margin: 0;
-  padding: 0;
-}
-
-.spinbuttons-down {
-  -moz-appearance: none;
-  -moz-box-flex: 1;
-  min-width: 1px;
-  min-height: 1px;
-  margin: 0;
-  padding: 0;
-}
-
--- a/toolkit/themes/shared/non-mac.jar.inc.mn
+++ b/toolkit/themes/shared/non-mac.jar.inc.mn
@@ -11,17 +11,16 @@
 #include jar.inc.mn
 
   skin/classic/global/dialog.css                           (../../windows/global/dialog.css)
   skin/classic/global/filefield.css                        (../../windows/global/filefield.css)
   skin/classic/global/progressmeter.css                    (../../windows/global/progressmeter.css)
   skin/classic/global/resizer.css                          (../../windows/global/resizer.css)
   skin/classic/global/richlistbox.css                      (../../windows/global/richlistbox.css)
   skin/classic/global/scrollbars.css                       (../../windows/global/xulscrollbars.css)
-  skin/classic/global/spinbuttons.css                      (../../windows/global/spinbuttons.css)
   skin/classic/global/tabprompts.css                       (../../windows/global/tabprompts.css)
   skin/classic/global/wizard.css                           (../../windows/global/wizard.css)
 
   skin/classic/global/arrow/arrow-dn.gif                   (../../windows/global/arrow/arrow-dn.gif)
   skin/classic/global/arrow/arrow-up.gif                   (../../windows/global/arrow/arrow-up.gif)
   skin/classic/global/arrow/panelarrow-horizontal.svg      (../../windows/global/arrow/panelarrow-horizontal.svg)
   skin/classic/global/arrow/panelarrow-vertical.svg        (../../windows/global/arrow/panelarrow-vertical.svg)
 
deleted file mode 100644
--- a/toolkit/themes/windows/global/spinbuttons.css
+++ /dev/null
@@ -1,24 +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/. */
-
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-spinbuttons {
-  -moz-appearance: spinner;
-  cursor: default;
-}
-
-.spinbuttons-button {
-  min-width: 13px;
-  min-height: 11px;
-  margin: 0 !important;
-}
-
-.spinbuttons-up {
-  -moz-appearance: spinner-upbutton;
-}
-
-.spinbuttons-down {
-  -moz-appearance: spinner-downbutton;
-}