Backed out 2 changesets (bug 1429573) for failing reftest on reftest/tests/editor/reftests/xul/number-3.xul on a CLOSED TREE

Backed out changeset 75364898f5f6 (bug 1429573)
Backed out changeset fe69b415f45b (bug 1429573)
This commit is contained in:
arthur.iakab 2018-02-09 23:27:59 +02:00
parent 8c3d3e2350
commit f58e902071
24 changed files with 461 additions and 70 deletions

View File

@ -345,7 +345,7 @@ enum Role {
/**
* 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 input[type=number] spin buttons.
* with the spin box. It is used for xul:spinbuttons.
*/
SPINBUTTON = 52,

View File

@ -338,7 +338,7 @@ interface nsIAccessibleRole : nsISupports
/**
* 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 input[type=number] spin buttons.
* with the spin box. It is used for xul:spinbuttons.
*/
const unsigned long ROLE_SPINBUTTON = 52;

View File

@ -75,12 +75,10 @@
accTree =
{ SECTION: [
{ SPINBUTTON: [
{ ENTRY: [ { TEXT_LEAF: [] } ] },
{ PUSHBUTTON: [ ] },
{ PUSHBUTTON: [ ] }
] },
{ ENTRY: [ { TEXT_LEAF: [] } ] },
{ MENUPOPUP: [] },
{ PUSHBUTTON: [] },
{ PUSHBUTTON: [] }
] };
testAccessibleTree("txc_number", accTree);

View File

@ -113,6 +113,7 @@ 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

View File

@ -39,7 +39,21 @@ html|input.num {
text-align: end;
}
#mac html|input.num {
margin-inline-end: 8px;
}
#win html|input.num {
padding: 0 !important;
}
#linux html|input.num {
margin-inline-end: 3px;
padding: 3px 4px;
}
html|div.plainfield {
color: -moz-fieldtext;
white-space: pre;
}

View File

@ -25,6 +25,7 @@ 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

View File

@ -94,6 +94,7 @@ toolkit.jar:
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)

View File

@ -6,8 +6,8 @@
-->
<window title="Textbox type='number' test" width="500" height="600"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<hbox>
<textbox id="n1" type="number" size="4"/>
@ -48,6 +48,8 @@ function doTests() {
testValsMinMax(n5, "initial n5", -10, -10, -3);
testValsMinMax(n6, "initial n6", 12, 12, 12);
ok(n1.spinButtons != null && n1.spinButtons.localName == "spinbuttons", "spinButtons set");
// test changing the value
n1.value = "1700";
testVals(n1, "set value,", 1700);
@ -91,19 +93,67 @@ function doTests() {
n1.max = 22;
testValsMinMax(n1, "set integer max,", 22, 8, 22);
// test increase and decrease via the keyboard and the spinbuttons
testIncreaseDecrease(n1, "integer", 1, 0, 8, 22);
// UI tests
n1.min = 5;
n1.max = 15;
n1.value = 5;
n1.focus();
var sb = n1.spinButtons;
var sbbottom = sb.getBoundingClientRect().bottom - sb.getBoundingClientRect().top - 2;
synthesizeKey("VK_UP", {});
testVals(n1, "key up", 6);
synthesizeKey("VK_DOWN", {});
testVals(n1, "key down", 5);
synthesizeMouse(sb, 2, 2, {});
testVals(n1, "spinbuttons up", 6);
synthesizeMouse(sb, 2, sbbottom, {});
testVals(n1, "spinbuttons down", 5);
n1.value = 15;
synthesizeKey("VK_UP", {});
testVals(n1, "key up at max", 15);
synthesizeMouse(sb, 2, 2, {});
testVals(n1, "spinbuttons up at max", 15);
n1.value = 5;
synthesizeKey("VK_DOWN", {});
testVals(n1, "key down at min", 5);
synthesizeMouse(sb, 2, sbbottom, {});
testVals(n1, "spinbuttons down at min", 5);
// check read only state
n1.readOnly = true;
n1.min = -10;
n1.max = 15;
n1.value = 12;
n1.inputField.focus();
// no events should fire and no changes should occur when the field is read only
synthesizeKeyExpectEvent("VK_UP", { }, n1, "!change", "key up read only");
is(n1.value, "12", "key up read only value");
synthesizeKeyExpectEvent("VK_DOWN", { }, n1, "!change", "key down read only");
is(n1.value, "12", "key down read only value");
synthesizeMouseExpectEvent(sb, 2, 2, { }, n1, "!change", "mouse up read only");
is(n1.value, "12", "mouse up read only value");
synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, n1, "!change", "mouse down read only");
is(n1.value, "12", "mouse down read only value");
n1.readOnly = false;
n1.disabled = true;
synthesizeMouseExpectEvent(sb, 2, 2, { }, n1, "!change", "mouse up disabled");
is(n1.value, "12", "mouse up disabled value");
synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, n1, "!change", "mouse down disabled");
is(n1.value, "12", "mouse down disabled value");
var nsbrect = $("n8").spinButtons.getBoundingClientRect();
ok(nsbrect.left == 0 && nsbrect.top == 0 && nsbrect.right == 0, nsbrect.bottom == 0,
"hidespinbuttons");
var n9 = $("n9");
is(n9.value, "0", "initial value");
@ -152,6 +202,38 @@ function testValsMinMax(nb, name, valueNumber, min, max, valueFieldNumber) {
SimpleTest.is(nb.max, max, name + " max is " + max);
}
function testIncreaseDecrease(nb, testid, increment, fixedCount, min, max) {
testid += " ";
nb.focus();
nb.value = min;
// pressing the cursor up and down keys should adjust the value
synthesizeKeyExpectEvent("VK_UP", { }, nb, "change", testid + "key up");
is(nb.value, String(min + increment), testid + "key up");
nb.value = max;
synthesizeKeyExpectEvent("VK_UP", { }, nb, "!change", testid + "key up at max");
is(nb.value, String(max), testid + "key up at max");
synthesizeKeyExpectEvent("VK_DOWN", { }, nb, "change", testid + "key down");
is(nb.value, String(max - increment), testid + "key down");
nb.value = min;
synthesizeKeyExpectEvent("VK_DOWN", { }, nb, "!change", testid + "key down at min");
is(nb.value, String(min), testid + "key down at min");
// check pressing the spinbutton arrows
var sb = nb.spinButtons;
var sbbottom = sb.getBoundingClientRect().bottom - sb.getBoundingClientRect().top - 2;
nb.value = min;
synthesizeMouseExpectEvent(sb, 2, 2, { }, nb, "change", testid + "mouse up");
is(nb.value, String(min + increment), testid + "mouse up");
nb.value = max;
synthesizeMouseExpectEvent(sb, 2, 2, { }, nb, "!change", testid + "mouse up at max");
synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, nb, "change", testid + "mouse down");
is(nb.value, String(max - increment), testid + "mouse down");
nb.value = min;
synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, nb, "!change", testid + "mouse down at min");
}
SimpleTest.waitForFocus(doTests);
]]></script>

View File

@ -19,16 +19,28 @@
<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"/>
<html:input class="numberbox-input textbox-input" anonid="input"
xbl:inherits="value,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey"/>
</xul:hbox>
<xul:spinbuttons anonid="buttons" xbl:inherits="disabled,hidden=hidespinbuttons"/>
</content>
<implementation>
<field name="_valueEntered">false</field>
<field name="_spinButtons">null</field>
<field name="_value">0</field>
<property name="value" onget="return String(this.valueNumber)"
<property name="spinButtons" readonly="true">
<getter>
<![CDATA[
if (!this._spinButtons)
this._spinButtons = document.getAnonymousElementByAttribute(this, "anonid", "buttons");
return this._spinButtons;
]]>
</getter>
</property>
<property name="value" onget="return '' + this.valueNumber"
onset="return this.valueNumber = val;"/>
<property name="valueNumber">
@ -81,6 +93,47 @@
</setter>
</property>
<method name="_modifyUp">
<body>
<![CDATA[
if (this.disabled || this.readOnly)
return;
var oldval = this.valueNumber;
var newval = this._validateValue(this.valueNumber + 1);
this.inputField.select();
if (oldval != newval)
this._fireChange();
]]>
</body>
</method>
<method name="_modifyDown">
<body>
<![CDATA[
if (this.disabled || this.readOnly)
return;
var oldval = this.valueNumber;
var newval = this._validateValue(this.valueNumber - 1);
this.inputField.select();
if (oldval != newval)
this._fireChange();
]]>
</body>
</method>
<method name="_enableDisableButtons">
<body>
<![CDATA[
var buttons = this.spinButtons;
if (this.disabled || this.readOnly) {
buttons.decreaseDisabled = buttons.increaseDisabled = true;
} else {
buttons.decreaseDisabled = (this.valueNumber <= this.min);
buttons.increaseDisabled = (this.valueNumber >= this.max);
}
]]>
</body>
</method>
<method name="_validateValue">
<parameter name="aValue"/>
<body>
@ -99,6 +152,8 @@
this._value = Number(aValue);
this.inputField.value = aValue;
this._enableDisableButtons();
return aValue;
]]>
</body>
@ -139,9 +194,26 @@
]]>
</handler>
<handler event="keypress" keycode="VK_UP">
this._modifyUp();
</handler>
<handler event="keypress" keycode="VK_DOWN">
this._modifyDown();
</handler>
<handler event="up" preventdefault="true">
this._modifyUp();
</handler>
<handler event="down" preventdefault="true">
this._modifyDown();
</handler>
<handler event="change">
if (event.originalTarget == this.inputField) {
this._validateValue(this.inputField.value);
var newval = this.inputField.value;
this._validateValue(newval);
}
</handler>
</handlers>

View File

@ -0,0 +1,96 @@
<?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>

View File

@ -127,12 +127,7 @@
<parameter name="aSelectionStart"/>
<parameter name="aSelectionEnd"/>
<body>
// According to https://html.spec.whatwg.org/#do-not-apply,
// setSelectionRange() is only available on a limited set of input types.
if (this.inputField.type == "text" ||
this.inputField.tagName == "html:textarea") {
this.inputField.setSelectionRange( aSelectionStart, aSelectionEnd );
}
this.inputField.setSelectionRange( aSelectionStart, aSelectionEnd );
</body>
</method>
@ -193,29 +188,26 @@
if (this.hasAttribute("focused"))
return;
let { originalTarget } = event;
if (originalTarget == this) {
// Forward focus to actual HTML input
this.inputField.focus();
this.setAttribute("focused", "true");
return;
switch (event.originalTarget) {
case this:
// Forward focus to actual HTML input
this.inputField.focus();
break;
case this.inputField:
if (this.mIgnoreFocus) {
this.mIgnoreFocus = false;
} else if (this.clickSelectsAll) {
try {
if (!this.editor || !this.editor.composing)
this.editor.selectAll();
} catch (e) {}
}
break;
default:
// Allow other children (e.g. URL bar buttons) to get focus
return;
}
// We check for the parent nodes to support input[type=number] where originalTarget may be an
// anonymous child input.
if (originalTarget == this.inputField ||
originalTarget.localName == "input" && originalTarget.parentNode.parentNode == this.inputField) {
if (this.mIgnoreFocus) {
this.mIgnoreFocus = false;
} else if (this.clickSelectsAll) {
try {
if (!this.editor || !this.editor.composing)
this.editor.selectAll();
} catch (e) {}
}
this.setAttribute("focused", "true");
}
// Otherwise, allow other children (e.g. URL bar buttons) to get focus
this.setAttribute("focused", "true");
]]>
</handler>
@ -237,7 +229,7 @@
if (!this.mIgnoreClick) {
this.mIgnoreFocus = true;
this.setSelectionRange(0, 0);
this.inputField.setSelectionRange(0, 0);
if (event.originalTarget == this ||
event.originalTarget == this.inputField.parentNode)
this.inputField.focus();

View File

@ -919,6 +919,16 @@ 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 {

View File

@ -81,6 +81,10 @@ html|input[type="checkbox"]:-moz-focusring + html|label:before {
outline: 1px dotted;
}
xul|spinbuttons {
-moz-appearance: none;
}
xul|treechildren::-moz-tree-row(multicol, odd) {
background-color: var(--in-content-box-background-odd);
}

View File

@ -9,10 +9,25 @@
@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;
}
textbox[type="number"][hidespinbuttons="true"] html|*.numberbox-input {
-moz-appearance: textfield !important;
.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;
}

View File

@ -23,6 +23,7 @@ toolkit.jar:
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)

View File

@ -57,6 +57,11 @@ xul|*.radio-icon {
margin-inline-end: 0;
}
xul|*.numberbox-input-box {
-moz-appearance: none;
border-width: 0;
}
xul|*.text-link:-moz-focusring {
color: var(--in-content-link-highlight);
text-decoration: underline;
@ -78,14 +83,29 @@ xul|radio[focused="true"] > .radio-check {
-moz-outline-radius: 100%;
}
html|*.numberbox-input::-moz-number-spin-up {
xul|spinbuttons {
-moz-appearance: none;
}
xul|*.spinbuttons-up {
margin-top: 0 !important;
border-radius: 4px 4px 0 0;
}
html|*.numberbox-input::-moz-number-spin-down {
xul|*.spinbuttons-down {
margin-bottom: 0 !important;
border-radius: 0 0 4px 4px;
}
xul|*.spinbuttons-button > xul|*.button-box {
padding-inline-start: 2px !important;
padding-inline-end: 3px !important;
}
xul|*.spinbuttons-button > xul|*.button-box > xul|*.button-text {
display: none;
}
xul|textbox[type="search"]:not([searchbutton]) > .textbox-input-box > .textbox-search-sign {
list-style-image: url(chrome://global/skin/icons/search-textbox.svg);
margin-inline-end: 5px;

View File

@ -30,6 +30,7 @@ toolkit.jar:
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

View File

@ -5,11 +5,21 @@
@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;
}
textbox[type="number"][hidespinbuttons="true"] html|*.numberbox-input {
-moz-appearance: textfield !important;
.numberbox-input-box {
-moz-appearance: textfield;
margin-right: 4px;
}

View File

@ -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;
}

View File

@ -165,9 +165,7 @@ html|button {
*|button,
html|select,
xul|colorpicker[type="button"],
xul|menulist,
html|*.numberbox-input::-moz-number-spin-up,
html|*.numberbox-input::-moz-number-spin-down {
xul|menulist {
-moz-appearance: none;
min-height: 30px;
color: var(--in-content-text-color);
@ -203,8 +201,6 @@ html|select:not([size]):not([multiple]):dir(rtl){
html|button:enabled:hover,
html|select:not([size]):not([multiple]):enabled:hover,
html|*.numberbox-input::-moz-number-spin-up:hover,
html|*.numberbox-input::-moz-number-spin-down:hover,
xul|button:not([disabled="true"]):hover,
xul|colorpicker[type="button"]:not([disabled="true"]):hover,
xul|menulist:not([disabled="true"]):hover {
@ -213,8 +209,6 @@ xul|menulist:not([disabled="true"]):hover {
html|button:enabled:hover:active,
html|select:not([size]):not([multiple]):enabled:hover:active,
html|*.numberbox-input::-moz-number-spin-up:hover:active,
html|*.numberbox-input::-moz-number-spin-down:hover:active,
xul|button:not([disabled="true"]):hover:active,
xul|colorpicker[type="button"]:not([disabled="true"]):hover:active,
xul|menulist[open="true"]:not([disabled="true"]) {
@ -223,7 +217,6 @@ xul|menulist[open="true"]:not([disabled="true"]) {
html|button:disabled,
html|select:disabled,
html|*.numberbox-input:disabled::-moz-number-spin-box,
xul|button[disabled="true"],
xul|colorpicker[type="button"][disabled="true"],
xul|menulist[disabled="true"],
@ -354,22 +347,40 @@ html|*.help-button:hover:active {
background-color: var(--in-content-category-background-active);
}
html|*.numberbox-input::-moz-number-spin-up,
html|*.numberbox-input::-moz-number-spin-down {
padding: 5px 8px;
margin: 1px;
margin-inline-start: 10px;
xul|*.spinbuttons-button {
min-height: initial;
margin-inline-start: 10px !important;
margin-inline-end: 2px !important;
}
html|*.numberbox-input::-moz-number-spin-up {
xul|*.spinbuttons-up {
margin-top: 2px !important;
border-radius: 1px 1px 0 0;
background-image: url("chrome://global/skin/arrow/arrow-up.gif");
}
html|*.numberbox-input::-moz-number-spin-down {
xul|*.spinbuttons-down {
margin-bottom: 2px !important;
border-radius: 0 0 1px 1px;
background-image: url("chrome://global/skin/arrow/arrow-dn.gif");
}
xul|*.spinbuttons-button > xul|*.button-box {
padding: 1px 5px 2px !important;
}
xul|*.spinbuttons-up > xul|*.button-box > xul|*.button-icon {
list-style-image: url("chrome://global/skin/arrow/arrow-up.gif");
}
xul|*.spinbuttons-up[disabled="true"] > xul|*.button-box > xul|*.button-icon {
list-style-image: url("chrome://global/skin/arrow/arrow-up-dis.gif");
}
xul|*.spinbuttons-down > xul|*.button-box > xul|*.button-icon {
list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif");
}
xul|*.spinbuttons-down[disabled="true"] > xul|*.button-box > xul|*.button-icon {
list-style-image: url("chrome://global/skin/arrow/arrow-dn-dis.gif");
}
xul|menulist:not([editable="true"]) > xul|*.menulist-dropmarker {

View File

@ -16,11 +16,14 @@
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-dn-dis.gif (../../windows/global/arrow/arrow-dn-dis.gif)
skin/classic/global/arrow/arrow-up.gif (../../windows/global/arrow/arrow-up.gif)
skin/classic/global/arrow/arrow-up-dis.gif (../../windows/global/arrow/arrow-up-dis.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)

View File

@ -36,8 +36,6 @@ toolkit.jar:
skin/classic/global/arrow/arrow-lft-dis.gif (arrow/arrow-lft-dis.gif)
skin/classic/global/arrow/arrow-rit.gif (arrow/arrow-rit.gif)
skin/classic/global/arrow/arrow-rit-dis.gif (arrow/arrow-rit-dis.gif)
skin/classic/global/arrow/arrow-up-dis.gif (arrow/arrow-up-dis.gif)
skin/classic/global/arrow/arrow-dn-dis.gif (arrow/arrow-dn-dis.gif)
skin/classic/global/dirListing/folder.png (dirListing/folder.png)
skin/classic/global/dirListing/up.png (dirListing/up.png)
skin/classic/global/icons/blacklist_favicon.png (icons/blacklist_favicon.png)

View File

@ -9,10 +9,16 @@
@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;
}
textbox[type="number"][hidespinbuttons="true"] html|*.numberbox-input {
-moz-appearance: textfield !important;
.numberbox-input-box {
-moz-box-align: center;
}

View File

@ -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;
}