Bug 1534930 - [de-xbl] Remove the spinbuttons, numberbox and textbox bindings. r=mkmelin
--HG-- rename : mail/themes/linux/mail/numberbox.css => mail/themes/linux/mail/textbox.css rename : mail/themes/osx/mail/numberbox.css => mail/themes/osx/mail/textbox.css rename : mail/themes/windows/mail/numberbox.css => mail/themes/windows/mail/textbox.css
This commit is contained in:
Родитель
f25e8e0961
Коммит
80f5b263d5
|
@ -10,9 +10,6 @@
|
|||
<!-- used for button-text and button-menu-dropmarker classes -->
|
||||
<?xml-stylesheet href="chrome://global/skin/button.css" type="text/css"?>
|
||||
|
||||
<!-- used for textbox in the menupopup "snooze-menupopup" -->
|
||||
<?xml-stylesheet href="chrome://messenger/skin/spinbuttons.css" type="text/css"?>
|
||||
|
||||
<!-- DTD File with all strings specific to the calendar -->
|
||||
<!DOCTYPE dialog SYSTEM "chrome://calendar/locale/calendar.dtd">
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ var ATTENDEES_ROW = `
|
|||
// Only for Tasks.
|
||||
var PERCENT_COMPLETE_INPUT = `
|
||||
id("event-grid-todo-status-row")/id("event-grid-todo-status-picker-box")/
|
||||
id("percent-complete-textbox")/anon({"class":"textbox-input-box numberbox-input-box"})/
|
||||
id("percent-complete-textbox")/anon({"class":"textbox-input-box"})/
|
||||
anon({"anonid":"input"})
|
||||
`;
|
||||
|
||||
|
|
|
@ -165,7 +165,6 @@ function test_standardMode() {
|
|||
"color: pink;",
|
||||
"font-family: Times",
|
||||
"font-size: larger",
|
||||
"-moz-binding: url('chrome://global/content/bindings/textbox.xml#textbox');",
|
||||
"display: none",
|
||||
"visibility: hidden",
|
||||
"unsupported-by-gecko: blah",
|
||||
|
@ -236,7 +235,6 @@ function test_permissiveMode() {
|
|||
|
||||
// But still filter out dangerous CSS rules.
|
||||
const badCSS = [
|
||||
"-moz-binding: url('chrome://global/content/bindings/textbox.xml#textbox');",
|
||||
"display: none",
|
||||
"visibility: hidden",
|
||||
"unsupported-by-gecko: blah",
|
||||
|
|
|
@ -1,217 +0,0 @@
|
|||
<?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/. -->
|
||||
|
||||
<bindings id="numberboxBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="numberbox" extends="chrome://messenger/content/textbox.xml#textbox">
|
||||
|
||||
<content>
|
||||
<xul:moz-input-box class="textbox-input-box numberbox-input-box" flex="1"
|
||||
xbl:inherits="context,disabled,focused">
|
||||
<html:input class="numberbox-input textbox-input" anonid="input"
|
||||
xbl:inherits="value,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey"/>
|
||||
</xul:moz-input-box>
|
||||
<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="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">
|
||||
<getter>
|
||||
if (this._valueEntered) {
|
||||
var newval = this.inputField.value;
|
||||
this._validateValue(newval);
|
||||
}
|
||||
return this._value;
|
||||
</getter>
|
||||
<setter>
|
||||
this._validateValue(val);
|
||||
return val;
|
||||
</setter>
|
||||
</property>
|
||||
<property name="min">
|
||||
<getter>
|
||||
var min = this.getAttribute("min");
|
||||
return min ? Number(min) : 0;
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
if (typeof val == "number") {
|
||||
this.setAttribute("min", val);
|
||||
if (this.valueNumber < val)
|
||||
this._validateValue(val);
|
||||
}
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
|
||||
<property name="max">
|
||||
<getter>
|
||||
var max = this.getAttribute("max");
|
||||
return max ? Number(max) : Infinity;
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
if (typeof val != "number")
|
||||
return val;
|
||||
var min = this.min;
|
||||
if (val < min)
|
||||
val = min;
|
||||
this.setAttribute("max", val);
|
||||
if (this.valueNumber > val)
|
||||
this._validateValue(val);
|
||||
return val;
|
||||
]]>
|
||||
</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>
|
||||
<![CDATA[
|
||||
aValue = Number(aValue) || 0;
|
||||
aValue = Math.round(aValue);
|
||||
|
||||
var min = this.min;
|
||||
var max = this.max;
|
||||
if (aValue < min)
|
||||
aValue = min;
|
||||
else if (aValue > max)
|
||||
aValue = max;
|
||||
|
||||
this._valueEntered = false;
|
||||
this._value = Number(aValue);
|
||||
this.inputField.value = aValue;
|
||||
|
||||
this._enableDisableButtons();
|
||||
|
||||
return aValue;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="_fireChange">
|
||||
<body>
|
||||
var evt = document.createEvent("Events");
|
||||
evt.initEvent("change", true, true);
|
||||
this.dispatchEvent(evt);
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<constructor><![CDATA[
|
||||
if (this.max < this.min)
|
||||
this.max = this.min;
|
||||
|
||||
var value = this.inputField.value || 0;
|
||||
this._validateValue(value);
|
||||
]]></constructor>
|
||||
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="input" phase="capturing">
|
||||
this._valueEntered = true;
|
||||
</handler>
|
||||
|
||||
<handler event="keypress">
|
||||
<![CDATA[
|
||||
if (!event.ctrlKey && !event.metaKey && !event.altKey && event.charCode) {
|
||||
if (event.charCode == 45 && this.min < 0)
|
||||
return;
|
||||
|
||||
if (event.charCode < 48 || event.charCode > 57)
|
||||
event.preventDefault();
|
||||
}
|
||||
]]>
|
||||
</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) {
|
||||
var newval = this.inputField.value;
|
||||
this._validateValue(newval);
|
||||
}
|
||||
</handler>
|
||||
</handlers>
|
||||
|
||||
</binding>
|
||||
</bindings>
|
|
@ -1,92 +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">
|
||||
|
||||
<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))
|
||||
cancel = true;
|
||||
}
|
||||
|
||||
return !cancel;
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
|
@ -1,252 +0,0 @@
|
|||
<?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/. -->
|
||||
|
||||
<!-- This files relies on these specific Chrome/XBL globals -->
|
||||
<!-- globals ChromeWindow -->
|
||||
|
||||
<!DOCTYPE bindings [
|
||||
<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" >
|
||||
%textcontextDTD;
|
||||
]>
|
||||
|
||||
<bindings id="textboxBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="textbox">
|
||||
|
||||
<content>
|
||||
<children/>
|
||||
<xul:moz-input-box class="textbox-input-box" flex="1"
|
||||
xbl:inherits="context,spellcheck">
|
||||
<html:input class="textbox-input" anonid="input"
|
||||
xbl:inherits="value,type,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey,noinitialfocus,mozactionhint,spellcheck"/>
|
||||
</xul:moz-input-box>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIDOMXULLabeledControlElement">
|
||||
<!-- nsIDOMXULLabeledControlElement -->
|
||||
<field name="crop">""</field>
|
||||
<field name="image">""</field>
|
||||
<field name="command">""</field>
|
||||
<field name="accessKey">""</field>
|
||||
|
||||
<field name="mInputField">null</field>
|
||||
<field name="mIgnoreClick">false</field>
|
||||
<field name="mIgnoreFocus">false</field>
|
||||
<field name="mEditor">null</field>
|
||||
|
||||
<property name="inputField" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (!this.mInputField)
|
||||
this.mInputField = document.getAnonymousElementByAttribute(this, "anonid", "input");
|
||||
return this.mInputField;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="value" onset="this.inputField.value = val; return val;"
|
||||
onget="return this.inputField.value;"/>
|
||||
<property name="defaultValue" onset="this.inputField.defaultValue = val; return val;"
|
||||
onget="return this.inputField.defaultValue;"/>
|
||||
<property name="label" onset="this.setAttribute('label', val); return val;"
|
||||
onget="return this.getAttribute('label') ||
|
||||
(this.labelElement ? this.labelElement.value :
|
||||
this.placeholder);"/>
|
||||
<property name="placeholder" onset="this.inputField.placeholder = val; return val;"
|
||||
onget="return this.inputField.placeholder;"/>
|
||||
<property name="emptyText" onset="this.placeholder = val; return val;"
|
||||
onget="return this.placeholder;"/>
|
||||
<property name="type" onset="if (val) this.setAttribute('type', val);
|
||||
else this.removeAttribute('type'); return val;"
|
||||
onget="return this.getAttribute('type');"/>
|
||||
<property name="maxLength" onset="this.inputField.maxLength = val; return val;"
|
||||
onget="return this.inputField.maxLength;"/>
|
||||
<property name="disabled" onset="this.inputField.disabled = val;
|
||||
if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled'); return val;"
|
||||
onget="return this.inputField.disabled;"/>
|
||||
<property name="tabIndex" onget="return parseInt(this.getAttribute('tabindex'));"
|
||||
onset="this.inputField.tabIndex = val;
|
||||
if (val) this.setAttribute('tabindex', val);
|
||||
else this.removeAttribute('tabindex'); return val;"/>
|
||||
<property name="size" onset="this.inputField.size = val; return val;"
|
||||
onget="return this.inputField.size;"/>
|
||||
<property name="readOnly" onset="this.inputField.readOnly = val;
|
||||
if (val) this.setAttribute('readonly', 'true');
|
||||
else this.removeAttribute('readonly'); return val;"
|
||||
onget="return this.inputField.readOnly;"/>
|
||||
<property name="clickSelectsAll"
|
||||
onget="return this.getAttribute('clickSelectsAll') == 'true';"
|
||||
onset="if (val) this.setAttribute('clickSelectsAll', 'true');
|
||||
else this.removeAttribute('clickSelectsAll'); return val;" />
|
||||
|
||||
<property name="editor" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (!this.mEditor) {
|
||||
this.mEditor = this.inputField.editor;
|
||||
}
|
||||
return this.mEditor;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<method name="reset">
|
||||
<body><![CDATA[
|
||||
this.value = this.defaultValue;
|
||||
try {
|
||||
this.editor.transactionManager.clear();
|
||||
return true;
|
||||
} catch (e) {}
|
||||
return false;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="select">
|
||||
<body>
|
||||
this.inputField.select();
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<property name="controllers" readonly="true" onget="return this.inputField.controllers"/>
|
||||
<property name="textLength" readonly="true"
|
||||
onget="return this.inputField.textLength;"/>
|
||||
<property name="selectionStart" onset="this.inputField.selectionStart = val; return val;"
|
||||
onget="return this.inputField.selectionStart;"/>
|
||||
<property name="selectionEnd" onset="this.inputField.selectionEnd = val; return val;"
|
||||
onget="return this.inputField.selectionEnd;"/>
|
||||
|
||||
<method name="setSelectionRange">
|
||||
<parameter name="aSelectionStart"/>
|
||||
<parameter name="aSelectionEnd"/>
|
||||
<body>
|
||||
this.inputField.setSelectionRange(aSelectionStart, aSelectionEnd);
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="_setNewlineHandling">
|
||||
<body><![CDATA[
|
||||
var str = this.getAttribute("newlines");
|
||||
if (str && this.editor) {
|
||||
for (let x in Ci.nsIPlaintextEditor) {
|
||||
if (/^eNewlines/.test(x)) {
|
||||
if (str == RegExp.rightContext.toLowerCase()) {
|
||||
this.editor.QueryInterface(Ci.nsIPlaintextEditor)
|
||||
.newlineHandling = Ci.nsIPlaintextEditor[x];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_maybeSelectAll">
|
||||
<body><![CDATA[
|
||||
if (!this.mIgnoreClick && this.clickSelectsAll &&
|
||||
document.activeElement == this.inputField &&
|
||||
this.inputField.selectionStart == this.inputField.selectionEnd)
|
||||
this.editor.selectAll();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<constructor><![CDATA[
|
||||
var str = this.boxObject.getProperty("value");
|
||||
if (str) {
|
||||
this.inputField.value = str;
|
||||
this.boxObject.removeProperty("value");
|
||||
}
|
||||
|
||||
this._setNewlineHandling();
|
||||
|
||||
if (this.hasAttribute("emptytext"))
|
||||
this.placeholder = this.getAttribute("emptytext");
|
||||
]]></constructor>
|
||||
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
var field = this.inputField;
|
||||
if (field && field.value)
|
||||
this.boxObject.setProperty("value", field.value);
|
||||
this.mInputField = null;
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="focus" phase="capturing">
|
||||
<![CDATA[
|
||||
if (this.hasAttribute("focused"))
|
||||
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;
|
||||
}
|
||||
this.setAttribute("focused", "true");
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="blur" phase="capturing">
|
||||
<![CDATA[
|
||||
this.removeAttribute("focused");
|
||||
|
||||
// don't trigger clickSelectsAll when switching application windows
|
||||
if (window == window.top &&
|
||||
window.isChromeWindow &&
|
||||
document.activeElement == this.inputField)
|
||||
this.mIgnoreFocus = true;
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="mousedown">
|
||||
<![CDATA[
|
||||
this.mIgnoreClick = this.hasAttribute("focused");
|
||||
|
||||
if (!this.mIgnoreClick) {
|
||||
this.mIgnoreFocus = true;
|
||||
this.inputField.setSelectionRange(0, 0);
|
||||
if (event.originalTarget == this ||
|
||||
event.originalTarget == this.inputField.parentNode)
|
||||
this.inputField.focus();
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="click" action="this._maybeSelectAll();"/>
|
||||
|
||||
#ifndef XP_WIN
|
||||
<handler event="contextmenu">
|
||||
// Only care about context clicks on the textbox itself.
|
||||
if (event.target != this)
|
||||
return;
|
||||
|
||||
if (!event.button) // context menu opened via keyboard shortcut
|
||||
return;
|
||||
this._maybeSelectAll();
|
||||
// see bug 576135 comment 4
|
||||
let box = this.inputField.parentNode;
|
||||
box._doPopupItemEnabling(box.menupopup);
|
||||
</handler>
|
||||
#endif
|
||||
</handlers>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -2,10 +2,8 @@
|
|||
* 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/. */
|
||||
|
||||
@import url("chrome://global/skin/textbox.css");
|
||||
@import url("chrome://messenger/skin/numberbox.css");
|
||||
@import url("chrome://messenger/skin/textbox.css");
|
||||
@import url("chrome://messenger/skin/xbl-notification.css");
|
||||
@import url("chrome://messenger/skin/spinbuttons.css");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
|
@ -55,15 +53,3 @@ button[type="menu-button"] {
|
|||
menulist[type="description"] > menupopup > menuitem[description] {
|
||||
-moz-binding: url("chrome://messenger/content/mailWidgets.xml#menuitem-iconic-desc-noaccel");
|
||||
}
|
||||
|
||||
textbox[type="number"] {
|
||||
-moz-binding: url('chrome://messenger/content/numberbox.xml#numberbox');
|
||||
}
|
||||
|
||||
spinbuttons {
|
||||
-moz-binding: url("chrome://messenger/content/spinbuttons.xml#spinbuttons");
|
||||
}
|
||||
|
||||
.spinbuttons-button {
|
||||
-moz-user-focus: ignore;
|
||||
}
|
||||
|
|
|
@ -40,10 +40,7 @@ messenger.jar:
|
|||
content/messenger/generalBindings.js (../../common/bindings/generalBindings.js)
|
||||
content/messenger/menubutton.xml (../../common/bindings/menubutton.xml)
|
||||
content/messenger/notificationbox.xml (../../common/bindings/notificationbox.xml)
|
||||
content/messenger/numberbox.xml (../../common/bindings/numberbox.xml)
|
||||
content/messenger/richlistbox.xml (../../common/bindings/richlistbox.xml)
|
||||
content/messenger/spinbuttons.xml (../../common/bindings/spinbuttons.xml)
|
||||
* content/messenger/textbox.xml (../../common/bindings/textbox.xml)
|
||||
* content/messenger/toolbar.xml (../../common/bindings/toolbar.xml)
|
||||
content/messenger/attachmentList.css (content/attachmentList.css)
|
||||
content/messenger/menulist.css (content/menulist.css)
|
||||
|
|
|
@ -69,7 +69,6 @@ tooltip[type="im"] {
|
|||
|
||||
#statusMessage[editing], .statusMessage[editing] {
|
||||
-moz-appearance: textfield;
|
||||
-moz-binding: url('chrome://global/content/bindings/textbox.xml#textbox');
|
||||
}
|
||||
|
||||
#button-chat {
|
||||
|
|
|
@ -14,5 +14,4 @@
|
|||
#displayName[editing],
|
||||
#statusMessage[editing] {
|
||||
-moz-appearance: textfield;
|
||||
-moz-binding: url('chrome://global/content/bindings/textbox.xml#textbox');
|
||||
}
|
||||
|
|
|
@ -227,10 +227,6 @@ imconv:not(:hover) > .closeConversationButton {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
imcontact[aliasing] .contactDisplayName {
|
||||
-moz-binding: url("chrome://global/content/bindings/textbox.xml#textbox");
|
||||
}
|
||||
|
||||
.contactStatusText,
|
||||
.convStatusText {
|
||||
margin-inline-start: 0;
|
||||
|
|
|
@ -30,7 +30,7 @@ classic.jar:
|
|||
skin/classic/messenger/messageIcons.css (mail/messageIcons.css)
|
||||
skin/classic/messenger/messageQuotes.css (mail/messageQuotes.css)
|
||||
skin/classic/messenger/messenger.css (mail/messenger.css)
|
||||
skin/classic/messenger/numberbox.css (mail/numberbox.css)
|
||||
skin/classic/messenger/textbox.css (mail/textbox.css)
|
||||
skin/classic/messenger/attachmentList.css (mail/attachmentList.css)
|
||||
skin/classic/messenger/imageFilters.svg (mail/imageFilters.svg)
|
||||
skin/classic/messenger/mailWindow1.css (mail/mailWindow1.css)
|
||||
|
@ -56,7 +56,6 @@ classic.jar:
|
|||
skin/classic/messenger/tabmail.css (mail/tabmail.css)
|
||||
skin/classic/messenger/editContactPanel.css (mail/editContactPanel.css)
|
||||
skin/classic/messenger/quickFilterBar.css (mail/quickFilterBar.css)
|
||||
skin/classic/messenger/spinbuttons.css (mail/spinbuttons.css)
|
||||
skin/classic/messenger/activity/activity.css (mail/activity/activity.css)
|
||||
skin/classic/messenger/activity/buttons.png (mail/activity/buttons.png)
|
||||
skin/classic/messenger/activity/defaultProcessIcon.png (mail/activity/defaultProcessIcon.png)
|
||||
|
|
|
@ -1,29 +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");
|
||||
@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;
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@import url("chrome://messenger/skin/shared/in-content/aboutPreferences.css");
|
||||
@namespace html "http://www.w3.org/1999/xhtml";
|
||||
|
||||
.dialogBox,
|
||||
#MailPreferences prefpane {
|
||||
|
@ -13,10 +14,6 @@ radio[pane] > .radio-label-box {
|
|||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
spinbuttons {
|
||||
-moz-appearance: none;
|
||||
}
|
||||
|
||||
.treecol-sortdirection {
|
||||
/* override the Linux only toolkit rule */
|
||||
-moz-appearance: none;
|
||||
|
@ -38,9 +35,12 @@ textbox[type="number"] {
|
|||
background-color: var(--in-content-box-background);
|
||||
}
|
||||
|
||||
.numberbox-input-box {
|
||||
-moz-appearance: none;
|
||||
border-width: 0;
|
||||
html|input[type="number"]::-moz-number-spin-up {
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
html|input[type="number"]::-moz-number-spin-down {
|
||||
min-height: 11px;
|
||||
}
|
||||
|
||||
.sidebar-footer-label {
|
||||
|
|
|
@ -7,17 +7,8 @@
|
|||
|
||||
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;
|
||||
html|input[type="number"]::-moz-number-spin-box {
|
||||
margin-inline-start: 5px;
|
||||
}
|
|
@ -35,7 +35,7 @@ classic.jar:
|
|||
skin/classic/messenger/messageIcons.css (mail/messageIcons.css)
|
||||
skin/classic/messenger/messageQuotes.css (mail/messageQuotes.css)
|
||||
skin/classic/messenger/messageWindow.css (mail/messageWindow.css)
|
||||
skin/classic/messenger/numberbox.css (mail/numberbox.css)
|
||||
skin/classic/messenger/textbox.css (mail/textbox.css)
|
||||
skin/classic/messenger/attachmentList.css (mail/attachmentList.css)
|
||||
skin/classic/messenger/msgSelectOffline.css (mail/msgSelectOffline.css)
|
||||
skin/classic/messenger/mailWindow1.css (mail/mailWindow1.css)
|
||||
|
@ -51,7 +51,6 @@ classic.jar:
|
|||
skin/classic/messenger/tabmail.css (mail/tabmail.css)
|
||||
skin/classic/messenger/editContactPanel.css (mail/editContactPanel.css)
|
||||
skin/classic/messenger/quickFilterBar.css (mail/quickFilterBar.css)
|
||||
skin/classic/messenger/spinbuttons.css (mail/spinbuttons.css)
|
||||
skin/classic/messenger/activity/activity.css (mail/activity/activity.css)
|
||||
skin/classic/messenger/activity/buttons.png (mail/activity/buttons.png)
|
||||
skin/classic/messenger/activity/defaultProcessIcon.png (mail/activity/defaultProcessIcon.png)
|
||||
|
|
|
@ -77,7 +77,7 @@ treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-im) {
|
|||
width: 1ch;
|
||||
}
|
||||
|
||||
button:not(.spinbuttons-button):not(.dialog-button) {
|
||||
button:not(.dialog-button) {
|
||||
min-height: 19px; /* aqua size for small buttons */
|
||||
}
|
||||
|
||||
|
|
|
@ -43,11 +43,6 @@ checkbox:not([label]) .checkbox-label-box {
|
|||
display: none;
|
||||
}
|
||||
|
||||
spinbuttons {
|
||||
margin-top: -2px;
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
|
||||
.small-button {
|
||||
min-width: 22px;
|
||||
height: 20px;
|
||||
|
|
|
@ -34,39 +34,26 @@ groupbox > .groupbox-body {
|
|||
}
|
||||
|
||||
textbox[type="number"] {
|
||||
-moz-appearance: none;
|
||||
border: 1px solid var(--in-content-box-border-color);
|
||||
background-color: var(--in-content-box-background);
|
||||
padding-inline-end: 0;
|
||||
}
|
||||
|
||||
.numberbox-input-box {
|
||||
-moz-appearance: none;
|
||||
textbox[type="number"]:focus-within {
|
||||
border-color: var(--in-content-border-active);
|
||||
box-shadow: 0 0 0 1px var(--in-content-border-active),
|
||||
0 0 0 4px var(--in-content-border-active-shadow);
|
||||
}
|
||||
|
||||
html|input[type="number"] {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
spinbuttons {
|
||||
-moz-appearance: none;
|
||||
html|input[type="number"]:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.spinbuttons-up {
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.spinbuttons-down {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0 !important;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
|
||||
.spinbuttons-button > .button-box {
|
||||
padding-inline-start: 8px;
|
||||
padding-inline-end: 8px;
|
||||
}
|
||||
|
||||
.spinbuttons-button > .button-box > .button-text {
|
||||
display: none;
|
||||
html|input[type="number"]::-moz-number-spin-up,
|
||||
html|input[type="number"]::-moz-number-spin-down {
|
||||
min-height: 11px;
|
||||
}
|
||||
|
||||
menulist:not([popuponly="true"]) {
|
||||
|
|
|
@ -65,11 +65,6 @@ menulist {
|
|||
color: GrayText;
|
||||
}
|
||||
|
||||
spinbuttons {
|
||||
margin-top: -2px;
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
|
||||
.small-button {
|
||||
min-width: 22px;
|
||||
height: 20px;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -3,22 +3,16 @@
|
|||
* 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");
|
||||
|
||||
spinbuttons {
|
||||
-moz-appearance: spinner;
|
||||
cursor: default;
|
||||
textbox[type="number"]:focus-within {
|
||||
outline: 2px -moz-mac-focusring solid;
|
||||
}
|
||||
|
||||
.spinbuttons-button {
|
||||
min-width: 13px;
|
||||
min-height: 11px;
|
||||
margin: 0 !important;
|
||||
html|input[type="number"] {
|
||||
padding-inline-end: 0;
|
||||
}
|
||||
|
||||
.spinbuttons-up {
|
||||
-moz-appearance: spinner-upbutton;
|
||||
}
|
||||
|
||||
.spinbuttons-down {
|
||||
-moz-appearance: spinner-downbutton;
|
||||
html|input[type="number"]::-moz-number-spin-box {
|
||||
margin-inline-start: 3px;
|
||||
}
|
|
@ -221,36 +221,39 @@ textbox + button {
|
|||
margin-inline-start: -4px;
|
||||
}
|
||||
|
||||
.spinbuttons-button {
|
||||
min-height: initial;
|
||||
margin-inline-start: 10px !important;
|
||||
margin-inline-end: 2px !important;
|
||||
html|input[type="number"] {
|
||||
padding: 0;
|
||||
padding-inline-end: 1px;
|
||||
}
|
||||
|
||||
.spinbuttons-up {
|
||||
margin-top: 2px !important;
|
||||
html|input[type="number"]::-moz-number-spin-box {
|
||||
margin-inline-start: 10px;
|
||||
}
|
||||
|
||||
html|input[type="number"]::-moz-number-spin-up,
|
||||
html|input[type="number"]::-moz-number-spin-down {
|
||||
-moz-appearance: none;
|
||||
min-width: 25px;
|
||||
border-color: var(--in-content-box-border-color);
|
||||
background-color: var(--in-content-button-background);
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
html|input[type="number"]::-moz-number-spin-up:hover,
|
||||
html|input[type="number"]::-moz-number-spin-down:hover {
|
||||
background-color: var(--in-content-button-background-hover);
|
||||
}
|
||||
|
||||
html|input[type="number"]::-moz-number-spin-up {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
border-radius: 1px 1px 0 0;
|
||||
background-image: url("chrome://messenger/skin/icons/arrow/arrow-up.png");
|
||||
}
|
||||
|
||||
.spinbuttons-down {
|
||||
margin-bottom: 2px !important;
|
||||
html|input[type="number"]::-moz-number-spin-down {
|
||||
border-radius: 0 0 1px 1px;
|
||||
}
|
||||
|
||||
.spinbuttons-up > .button-box > .button-icon {
|
||||
list-style-image: url("chrome://messenger/skin/icons/arrow/arrow-up.png");
|
||||
}
|
||||
|
||||
.spinbuttons-up[disabled="true"] > .button-box > .button-icon {
|
||||
list-style-image: url("chrome://messenger/skin/icons/arrow/arrow-up-dim.png");
|
||||
}
|
||||
|
||||
.spinbuttons-down > .button-box > .button-icon {
|
||||
list-style-image: url("chrome://messenger/skin/icons/arrow/arrow-down.png");
|
||||
}
|
||||
|
||||
.spinbuttons-down[disabled="true"] > .button-box > .button-icon {
|
||||
list-style-image: url("chrome://messenger/skin/icons/arrow/arrow-down-dim.png");
|
||||
background-image: url("chrome://messenger/skin/icons/arrow/arrow-down.png");
|
||||
}
|
||||
|
||||
separator.groove:not([orient="vertical"]) {
|
||||
|
|
|
@ -30,7 +30,7 @@ classic.jar:
|
|||
skin/classic/messenger/messageIcons.css (mail/messageIcons.css)
|
||||
skin/classic/messenger/messageQuotes.css (mail/messageQuotes.css)
|
||||
skin/classic/messenger/messenger.css (mail/messenger.css)
|
||||
skin/classic/messenger/numberbox.css (mail/numberbox.css)
|
||||
skin/classic/messenger/textbox.css (mail/textbox.css)
|
||||
skin/classic/messenger/attachmentList.css (mail/attachmentList.css)
|
||||
skin/classic/messenger/imageFilters.svg (mail/imageFilters.svg)
|
||||
skin/classic/messenger/mailWindow1.css (mail/mailWindow1.css)
|
||||
|
@ -54,7 +54,6 @@ classic.jar:
|
|||
skin/classic/messenger/tabmail.css (mail/tabmail.css)
|
||||
skin/classic/messenger/editContactPanel.css (mail/editContactPanel.css)
|
||||
skin/classic/messenger/quickFilterBar.css (mail/quickFilterBar.css)
|
||||
skin/classic/messenger/spinbuttons.css (mail/spinbuttons.css)
|
||||
skin/classic/messenger/activity/activity.css (mail/activity/activity.css)
|
||||
skin/classic/messenger/activity/addItemIcon.png (mail/activity/addItemIcon.png)
|
||||
skin/classic/messenger/activity/buttons.png (mail/activity/buttons.png)
|
||||
|
|
|
@ -26,6 +26,25 @@ html|h2 {
|
|||
font-size: 1.125em;
|
||||
}
|
||||
|
||||
textbox[type="number"]:focus-within {
|
||||
border-color: var(--in-content-border-active);
|
||||
box-shadow: 0 0 0 1px var(--in-content-border-active),
|
||||
0 0 0 4px var(--in-content-border-active-shadow);
|
||||
}
|
||||
|
||||
html|input[type="number"] {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
html|input[type="number"]:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
html|input[type="number"]::-moz-number-spin-up,
|
||||
html|input[type="number"]::-moz-number-spin-down {
|
||||
min-height: 13px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dialog
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -6,20 +6,16 @@
|
|||
@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;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
padding-inline-end: 0;
|
||||
}
|
||||
|
||||
html|*.numberbox-input {
|
||||
text-align: right;
|
||||
padding: 0 1px !important;
|
||||
html|input[type="number"]::-moz-number-spin-box {
|
||||
margin-inline-start: 4px;
|
||||
}
|
||||
|
||||
.numberbox-input-box {
|
||||
-moz-appearance: textfield;
|
||||
margin-right: 4px;
|
||||
html|input[type="number"]::-moz-number-spin-up,
|
||||
html|input[type="number"]::-moz-number-spin-down {
|
||||
min-height: .7em;
|
||||
}
|
|
@ -69,7 +69,7 @@
|
|||
control="port"/>
|
||||
<hbox>
|
||||
<textbox id="port" type="number" size="5" min="1"
|
||||
max="65535" hidespinbuttons="true"
|
||||
max="65535"
|
||||
disableiflocked="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
@ -150,4 +150,3 @@
|
|||
</vbox>
|
||||
|
||||
</dialog>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче