Bug 1474490 - Restore spinbox and number boxes in SeaMonkey. r=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sun, 09 Sep 2018 15:11:29 +0200
changeset 33105 b722826d24442a9f1e2c0966417318933e93134b
parent 33104 736f858f44ce2d2fc019c0d7b12e15a56ed9e75a
child 33106 d8244e31ff87c057b7d7d7a42815b4d014a6cd41
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersIanN
bugs1474490
Bug 1474490 - Restore spinbox and number boxes in SeaMonkey. r=IanN
suite/base/content/communicator.css
suite/components/bindings/jar.mn
suite/themes/classic/communicator/numberbox.css
suite/themes/classic/communicator/spinbuttons.css
suite/themes/classic/jar.mn
suite/themes/classic/linux/communicator/numberbox.css
suite/themes/classic/linux/communicator/spinbuttons.css
suite/themes/classic/mac/communicator/numberbox.css
suite/themes/classic/mac/communicator/spinbuttons.css
suite/themes/modern/communicator/numberbox.css
suite/themes/modern/communicator/spinbuttons.css
suite/themes/modern/global/numberbox.css
suite/themes/modern/global/spinbuttons.css
suite/themes/modern/jar.mn
--- a/suite/base/content/communicator.css
+++ b/suite/base/content/communicator.css
@@ -308,8 +308,22 @@ datepicker {
 
 datepicker[type="popup"] {
   -moz-binding: url("chrome://communicator/content/bindings/datetimepicker.xml#datepicker-popup");
 }
 
 datepicker[type="grid"] {
   -moz-binding: url("chrome://communicator/content/bindings/datetimepicker.xml#datepicker-grid");
 }
+
+/******* numberbox *******/
+textbox[type="number"] {
+  -moz-binding: url("chrome://communicator/content/bindings/numberbox.xml#numberbox");
+}
+
+/******* spinbuttons *******/
+spinbuttons {
+  -moz-binding: url("chrome://communicator/content/bindings/spinbuttons.xml#spinbuttons");
+}
+
+.spinbuttons-button {
+  -moz-user-focus: ignore;
+}
--- a/suite/components/bindings/jar.mn
+++ b/suite/components/bindings/jar.mn
@@ -6,12 +6,15 @@ comm.jar:
    content/communicator/customizeToolbar.css                        (../../../common/src/customizeToolbar.css)
    content/communicator/customizeToolbar.js                         (../../../common/src/customizeToolbar.js)
 *  content/communicator/customizeToolbar.xul                        (../../../common/src/customizeToolbar.xul)
 *  content/communicator/bindings/datetimepicker.xml                 (../../../common/bindings/datetimepicker.xml)
    content/communicator/bindings/findbar.xml                        (findbar.xml)
    content/communicator/bindings/general.xml                        (general.xml)
    content/communicator/bindings/generalBindings.xml                (../../../common/bindings/generalBindings.xml)
    content/communicator/bindings/notification.xml                   (notification.xml)
+   content/communicator/bindings/numberbox.xml                      (../../../common/bindings/numberbox.xml)
 *  content/communicator/bindings/preferences.xml                    (../../../common/bindings/preferences.xml)
+   content/communicator/bindings/spinbuttons.xml                    (../../../common/bindings/spinbuttons.xml)
+*  content/communicator/bindings/textbox.xml                        (../../../common/bindings/textbox.xml)
 *  content/communicator/bindings/toolbar.xml                        (../../../common/bindings/toolbar.xml)
    content/communicator/bindings/toolbar-xpfe.xml                   (toolbar-xpfe.xml)
 *  content/communicator/bindings/prefwindow.xml                     (prefwindow.xml)
new file mode 100644
--- /dev/null
+++ b/suite/themes/classic/communicator/numberbox.css
@@ -0,0 +1,23 @@
+/* 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[type="number"] {
+  padding: 0 !important;
+  cursor: default;
+}
+
+html|*.numberbox-input {
+  text-align: right;
+}
+
+.numberbox-input-box {
+  -moz-box-align: center;
+}
+
+textbox[hidespinbuttons="true"] > .numberbox-input-box {
+  -moz-appearance: textfield;
+}
new file mode 100644
--- /dev/null
+++ b/suite/themes/classic/communicator/spinbuttons.css
@@ -0,0 +1,24 @@
+/* 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;
+}
--- a/suite/themes/classic/jar.mn
+++ b/suite/themes/classic/jar.mn
@@ -16,17 +16,19 @@ classic.jar:
 #ifdef XP_MACOSX
   skin/classic/communicator/aboutPrivateBrowsing.css                    (mac/communicator/aboutPrivateBrowsing.css)
   skin/classic/communicator/aboutSessionRestore.css                     (mac/communicator/aboutSessionRestore.css)
   skin/classic/communicator/button.css                                  (mac/communicator/button.css)
   skin/classic/communicator/communicator.css                            (mac/communicator/communicator.css)
   skin/classic/communicator/customizeToolbar.css                        (mac/communicator/customizeToolbar.css)
   skin/classic/communicator/config.css                                  (mac/communicator/config.css)
   skin/classic/communicator/datetimepicker.css                          (mac/communicator/datetimepicker.css)
+  skin/classic/communicator/numberbox.css                               (mac/communicator/numberbox.css)
   skin/classic/communicator/preferences.css                             (mac/communicator/preferences.css)
+  skin/classic/communicator/spinbuttons.css                             (mac/communicator/spinbuttons.css)
   skin/classic/communicator/toolbar.css                                 (mac/communicator/toolbar.css)
   skin/classic/communicator/viewSourceOverlay.css                       (mac/communicator/viewSourceOverlay.css)
   skin/classic/communicator/console/console-error-caret.gif             (mac/communicator/console/console-error-caret.gif)
   skin/classic/communicator/console/console-error-dash.gif              (mac/communicator/console/console-error-dash.gif)
   skin/classic/communicator/console/console.css                         (mac/communicator/console/console.css)
   skin/classic/communicator/downloads/downloadButtons.png               (mac/communicator/downloads/downloadButtons.png)
   skin/classic/communicator/downloads/progressBg.png                    (mac/communicator/downloads/progressBg.png)
   skin/classic/communicator/downloads/downloadmanager.css               (mac/communicator/downloads/downloadmanager.css)
@@ -67,21 +69,25 @@ classic.jar:
   skin/classic/communicator/aboutPrivateBrowsing.css                    (communicator/aboutPrivateBrowsing.css)
   skin/classic/communicator/aboutSessionRestore.css                     (communicator/aboutSessionRestore.css)
   skin/classic/communicator/button.css                                  (communicator/button.css)
   skin/classic/communicator/config.css                                  (communicator/config.css)
   skin/classic/communicator/customizeToolbar.css                        (communicator/customizeToolbar.css)
   skin/classic/communicator/datetimepicker.css                          (communicator/datetimepicker.css)
 #ifdef MOZ_WIDGET_GTK
   skin/classic/communicator/communicator.css                            (linux/communicator/communicator.css)
+  skin/classic/communicator/numberbox.css                               (linux/communicator/numberbox.css)
   skin/classic/communicator/preferences.css                             (linux/communicator/preferences.css)
   skin/classic/communicator/scrollbars.css                              (linux/communicator/scrollbars.css)
+  skin/classic/communicator/spinbuttons.css                             (linux/communicator/spinbuttons.css)
 #else
   skin/classic/communicator/communicator.css                            (communicator/communicator.css)
+  skin/classic/communicator/numberbox.css                               (communicator/numberbox.css)
   skin/classic/communicator/preferences.css                             (communicator/preferences.css)
+  skin/classic/communicator/spinbuttons.css                             (communicator/spinbuttons.css)
 #endif
   skin/classic/communicator/toolbar.css                                 (communicator/toolbar.css)
   skin/classic/communicator/viewSourceOverlay.css                       (communicator/viewSourceOverlay.css)
   skin/classic/communicator/console/console.css                         (communicator/console/console.css)
   skin/classic/communicator/console/console-error-caret.gif             (communicator/console/console-error-caret.gif)
   skin/classic/communicator/console/console-error-dash.gif              (communicator/console/console-error-dash.gif)
   skin/classic/communicator/console/console-toolbar.png                 (communicator/console/console-toolbar.png)
   skin/classic/communicator/console/itemSelected.png                    (communicator/console/itemSelected.png)
new file mode 100644
--- /dev/null
+++ b/suite/themes/classic/linux/communicator/numberbox.css
@@ -0,0 +1,29 @@
+/* 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[type="number"] {
+  -moz-appearance: none;
+  padding: 0 !important;
+  border: none;
+  cursor: default;
+  background-color: transparent;
+}
+
+html|*.numberbox-input {
+  text-align: right;
+}
+
+.numberbox-input-box {
+  -moz-box-align: center;
+  -moz-appearance: spinner-textfield;
+  margin-right: -1px;
+  padding: 3px;
+}
+
+textbox[hidespinbuttons="true"] > .numberbox-input-box {
+  -moz-appearance: textfield;
+}
new file mode 100644
--- /dev/null
+++ b/suite/themes/classic/linux/communicator/spinbuttons.css
@@ -0,0 +1,24 @@
+/* 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;
+}
new file mode 100644
--- /dev/null
+++ b/suite/themes/classic/mac/communicator/numberbox.css
@@ -0,0 +1,25 @@
+/* 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[type="number"] {
+  -moz-appearance: none;
+  -moz-box-align: center;
+  padding: 0 !important;
+  border: none;
+  background-color: transparent;
+  cursor: default;
+}
+
+html|*.numberbox-input {
+  text-align: right;
+  padding: 0 1px !important;
+}
+
+.numberbox-input-box {
+  -moz-appearance: textfield;
+  margin-right: 4px;
+}
new file mode 100644
--- /dev/null
+++ b/suite/themes/classic/mac/communicator/spinbuttons.css
@@ -0,0 +1,31 @@
+/* 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;
+}
+
rename from suite/themes/modern/global/numberbox.css
rename to suite/themes/modern/communicator/numberbox.css
rename from suite/themes/modern/global/spinbuttons.css
rename to suite/themes/modern/communicator/spinbuttons.css
--- a/suite/themes/modern/jar.mn
+++ b/suite/themes/modern/jar.mn
@@ -17,18 +17,20 @@ modern.jar:
 % style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/messengercompose/messengercompose.css
 % style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/smime/msgCompSMIMEOverlay.css
 % style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/addressbook/addressbook.css
   skin/modern/communicator/brand.css                               (communicator/brand.css)
   skin/modern/communicator/blockedSite.css                         (communicator/blockedSite.css)
   skin/modern/communicator/certError.css                           (communicator/certError.css)
   skin/modern/communicator/customizeToolbar.css                    (communicator/customizeToolbar.css)
   skin/modern/communicator/datetimepicker.css                      (communicator/datetimepicker.css)
+  skin/modern/communicator/numberbox.css                           (communicator/numberbox.css)
   skin/modern/communicator/prefpanels.css                          (communicator/prefpanels.css)
   skin/modern/communicator/preferences.css                         (communicator/preferences.css)
+  skin/modern/communicator/spinbuttons.css                         (communicator/spinbuttons.css)
   skin/modern/communicator/tasksOverlay.css                        (communicator/tasksOverlay.css)
   skin/modern/communicator/button.css                              (communicator/button.css)
   skin/modern/communicator/toolbar.css                             (communicator/toolbar.css)
   skin/modern/communicator/dialogs.css                             (communicator/dialogs.css)
   skin/modern/communicator/smileys.css                             (communicator/smileys.css)
   skin/modern/communicator/communicator.css                        (communicator/communicator.css)
   skin/modern/communicator/aboutPrivateBrowsing.css                (communicator/aboutPrivateBrowsing.css)
   skin/modern/communicator/aboutSessionRestore.css                 (communicator/aboutSessionRestore.css)
@@ -197,31 +199,29 @@ modern.jar:
   skin/modern/global/filefield.css                                 (global/filefield.css)
   skin/modern/global/filepicker.css                                (global/filepicker.css)
   skin/modern/global/findBar.css                                   (global/findBar.css)
   skin/modern/global/global.css                                    (global/global.css)
   skin/modern/global/groupbox.css                                  (global/groupbox.css)
   skin/modern/global/listbox.css                                   (global/listbox.css)
   skin/modern/global/menu.css                                      (global/menu.css)
   skin/modern/global/menulist.css                                  (global/menulist.css)
-  skin/modern/global/numberbox.css                                 (global/numberbox.css)
   skin/modern/global/netError.css                                  (global/netError.css)
   skin/modern/global/notification.css                              (global/notification.css)
   skin/modern/global/plugins.css                                   (global/plugins.css)
   skin/modern/global/popup.css                                     (global/popup.css)
   skin/modern/global/preferences.css                               (global/preferences.css)
   skin/modern/global/printPreview.css                              (global/printPreview.css)
   skin/modern/global/printPageSetup.css                            (global/printPageSetup.css)
   skin/modern/global/progressmeter.css                             (global/progressmeter.css)
   skin/modern/global/radio.css                                     (global/radio.css)
   skin/modern/global/resizer.css                                   (global/resizer.css)
   skin/modern/global/richlistbox.css                               (global/richlistbox.css)
   skin/modern/global/scale.css                                     (global/scale.css)
   skin/modern/global/scrollbox.css                                 (global/scrollbox.css)
-  skin/modern/global/spinbuttons.css                               (global/spinbuttons.css)
   skin/modern/global/splitter.css                                  (global/splitter.css)
   skin/modern/global/tabbox.css                                    (global/tabbox.css)
   skin/modern/global/textbox.css                                   (global/textbox.css)
   skin/modern/global/toolbar.css                                   (global/toolbar.css)
   skin/modern/global/toolbarbutton.css                             (global/toolbarbutton.css)
   skin/modern/global/tree.css                                      (global/tree.css)
   skin/modern/global/wizard.css                                    (global/wizard.css)
 * skin/modern/global/scrollbars.css                                (global/scrollbars.css)