зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1513325 - Remove textbox binding. r=emilio,dao
Differential Revision: https://phabricator.services.mozilla.com/D38955 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
53a3c77cec
Коммит
822add064c
|
@ -82,10 +82,6 @@ XULMAP(popup, [](Element* aElement, Accessible* aContext) {
|
|||
return CreateMenupopupAccessible(aElement, aContext);
|
||||
})
|
||||
|
||||
XULMAP(textbox, [](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new EnumRoleAccessible<roles::SECTION>(aElement, aContext->Document());
|
||||
})
|
||||
|
||||
XULMAP(tree, [](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
nsIContent* child =
|
||||
nsTreeUtils::GetDescendantChild(aElement, nsGkAtoms::treechildren);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Accessible focus event testing">
|
||||
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
|
@ -29,7 +30,7 @@
|
|||
gQueue = new eventQueue();
|
||||
|
||||
gQueue.push(new synthFocus("textbox",
|
||||
new focusChecker(getNode("textbox").inputField)));
|
||||
new focusChecker(getNode("textbox"))));
|
||||
gQueue.push(new synthFocusOnFrame("editabledoc"));
|
||||
gQueue.push(new synthFocus("radioclothes",
|
||||
new focusChecker("radiosweater")));
|
||||
|
@ -83,7 +84,7 @@
|
|||
</body>
|
||||
|
||||
<vbox flex="1">
|
||||
<textbox id="textbox" value="hello"/>
|
||||
<html:input id="textbox" value="hello"/>
|
||||
<iframe id="editabledoc" src="focus.html"/>
|
||||
<radiogroup id="radioclothes">
|
||||
<radio id="radiosweater" label="radiosweater"/>
|
||||
|
|
|
@ -99,9 +99,6 @@
|
|||
testRelation("flowfrom1", RELATION_FLOWS_FROM, "flowto1");
|
||||
testRelation("flowfrom2", RELATION_FLOWS_FROM, "flowto1");
|
||||
|
||||
// 'default button' relation
|
||||
testRelation("textbox", RELATION_DEFAULT_BUTTON, "submit");
|
||||
|
||||
// 'labelled by'/'label for' relation for xul:groupbox and xul:label
|
||||
var groupboxAcc = getAccessible("groupbox");
|
||||
var labelAcc = groupboxAcc.firstChild;
|
||||
|
@ -205,9 +202,6 @@
|
|||
<description id="flowto" aria-flowto="flowfrom">flow to</description>
|
||||
<description id="flowfrom">flow from</description>
|
||||
|
||||
<textbox id="textbox"/>
|
||||
<button id="submit" default="true" label="Default"/>
|
||||
|
||||
<groupbox id="groupbox">
|
||||
<label value="caption"/>
|
||||
</groupbox>
|
||||
|
@ -233,4 +227,3 @@
|
|||
|
||||
</vbox>
|
||||
</window>
|
||||
|
||||
|
|
|
@ -1519,7 +1519,6 @@ var PanelView = class extends AssociatedToNode {
|
|||
let tag = element.localName;
|
||||
return (
|
||||
tag == "menulist" ||
|
||||
tag == "textbox" ||
|
||||
tag == "input" ||
|
||||
tag == "textarea" ||
|
||||
// Allow tab to reach embedded documents.
|
||||
|
|
|
@ -370,7 +370,6 @@ var gConnectionsDialog = {
|
|||
return [
|
||||
...controlGroup.querySelectorAll(":scope > radio"),
|
||||
...controlGroup.querySelectorAll("label"),
|
||||
...controlGroup.querySelectorAll("textbox"),
|
||||
...controlGroup.querySelectorAll("checkbox"),
|
||||
...document.querySelectorAll("#networkProxySOCKSVersion > radio"),
|
||||
...document.querySelectorAll("#ConnectionsDialogPane > checkbox"),
|
||||
|
|
|
@ -7,9 +7,3 @@
|
|||
.actionsMenu > .menulist-label-box > .menulist-icon {
|
||||
margin-inline-end: 9px;
|
||||
}
|
||||
|
||||
textbox + button {
|
||||
margin-inline-start: -4px;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ this.SplitView = function SplitView(aRoot) {
|
|||
if (
|
||||
aEvent.target.ownerDocument != this._nav.ownerDocument ||
|
||||
aEvent.target.tagName == "input" ||
|
||||
aEvent.target.tagName == "textbox" ||
|
||||
aEvent.target.tagName == "textarea" ||
|
||||
aEvent.target.classList.contains("textbox")
|
||||
) {
|
||||
|
|
|
@ -1278,10 +1278,7 @@ class StorageUI {
|
|||
event.keyCode == KeyCodes.DOM_VK_BACK_SPACE ||
|
||||
event.keyCode == KeyCodes.DOM_VK_DELETE
|
||||
) {
|
||||
if (
|
||||
this.table.selectedRow &&
|
||||
!["input", "textbox"].includes(event.target.localName)
|
||||
) {
|
||||
if (this.table.selectedRow && event.target.localName != "input") {
|
||||
this.onRemoveItem();
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
|
|
@ -527,24 +527,8 @@ void Element::ClearStyleStateLocks() {
|
|||
|
||||
#ifdef MOZ_XBL
|
||||
static bool MayNeedToLoadXBLBinding(const Element& aElement) {
|
||||
if (!aElement.IsAnyOfXULElements(nsGkAtoms::textbox)) {
|
||||
// Other elements no longer have XBL bindings. Please don't add to the list
|
||||
// above unless completely necessary.
|
||||
return false;
|
||||
}
|
||||
if (!aElement.IsInComposedDoc()) {
|
||||
return false;
|
||||
}
|
||||
// If we have a frame, the frame has already loaded the binding.
|
||||
if (aElement.GetPrimaryFrame() || !aElement.OwnerDoc()->GetPresShell()) {
|
||||
return false;
|
||||
}
|
||||
// If we have a binding, well..
|
||||
if (aElement.GetXBLBinding()) {
|
||||
return false;
|
||||
}
|
||||
// We need to try.
|
||||
return true;
|
||||
// Clean this up in https://bugzilla.mozilla.org/show_bug.cgi?id=1585823
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -337,17 +337,12 @@ Element* nsFocusManager::GetRedirectedFocus(nsIContent* aContent) {
|
|||
|
||||
#ifdef MOZ_XUL
|
||||
if (aContent->IsXULElement()) {
|
||||
if (aContent->IsXULElement(nsGkAtoms::textbox)) {
|
||||
return aContent->OwnerDoc()->GetAnonymousElementByAttribute(
|
||||
aContent, nsGkAtoms::anonid, NS_LITERAL_STRING("input"));
|
||||
} else {
|
||||
nsCOMPtr<nsIDOMXULMenuListElement> menulist =
|
||||
aContent->AsElement()->AsXULMenuList();
|
||||
if (menulist) {
|
||||
RefPtr<Element> inputField;
|
||||
menulist->GetInputField(getter_AddRefs(inputField));
|
||||
return inputField;
|
||||
}
|
||||
nsCOMPtr<nsIDOMXULMenuListElement> menulist =
|
||||
aContent->AsElement()->AsXULMenuList();
|
||||
if (menulist) {
|
||||
RefPtr<Element> inputField;
|
||||
menulist->GetInputField(getter_AddRefs(inputField));
|
||||
return inputField;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -99,9 +99,6 @@ bool L10nOverlays::IsAttrNameLocalizable(
|
|||
if (elemName == nsGkAtoms::label) {
|
||||
return nameAtom == nsGkAtoms::value;
|
||||
}
|
||||
if (elemName == nsGkAtoms::textbox) {
|
||||
return nameAtom == nsGkAtoms::placeholder || nameAtom == nsGkAtoms::value;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -109,12 +109,6 @@ uint32_t nsXULPrototypeAttribute::gNumCacheFills;
|
|||
nsXULElement::nsXULElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||
: nsStyledElement(std::move(aNodeInfo)), mBindingParent(nullptr) {
|
||||
XUL_PROTOTYPE_ATTRIBUTE_METER(gNumElements);
|
||||
|
||||
// We may be READWRITE by default; check.
|
||||
if (IsReadWriteTextElement()) {
|
||||
AddStatesSilently(NS_EVENT_STATE_MOZ_READWRITE);
|
||||
RemoveStatesSilently(NS_EVENT_STATE_MOZ_READONLY);
|
||||
}
|
||||
}
|
||||
|
||||
nsXULElement::~nsXULElement() {}
|
||||
|
@ -525,8 +519,7 @@ bool nsXULElement::PerformAccesskey(bool aKeyCausesActivation,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (aKeyCausesActivation &&
|
||||
!content->IsAnyOfXULElements(nsGkAtoms::textbox, nsGkAtoms::menulist)) {
|
||||
if (aKeyCausesActivation && !content->IsXULElement(nsGkAtoms::menulist)) {
|
||||
elm->ClickWithInputSource(MouseEvent_Binding::MOZ_SOURCE_KEYBOARD,
|
||||
aIsTrustedEvent);
|
||||
}
|
||||
|
@ -1192,17 +1185,6 @@ nsresult nsXULElement::AddPopupListener(nsAtom* aName) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
EventStates nsXULElement::IntrinsicState() const {
|
||||
EventStates state = nsStyledElement::IntrinsicState();
|
||||
|
||||
if (IsReadWriteTextElement()) {
|
||||
state |= NS_EVENT_STATE_MOZ_READWRITE;
|
||||
state &= ~NS_EVENT_STATE_MOZ_READONLY;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
nsresult nsXULElement::MakeHeavyweight(nsXULPrototypeElement* aPrototype) {
|
||||
|
|
|
@ -361,7 +361,6 @@ class nsXULElement : public nsStyledElement {
|
|||
|
||||
virtual nsresult Clone(mozilla::dom::NodeInfo*,
|
||||
nsINode** aResult) const override;
|
||||
virtual mozilla::EventStates IntrinsicState() const override;
|
||||
|
||||
virtual void RecompileScriptEventListeners() override;
|
||||
|
||||
|
@ -608,11 +607,6 @@ class nsXULElement : public nsStyledElement {
|
|||
nsXULPrototypeElement* aPrototype, mozilla::dom::NodeInfo* aNodeInfo,
|
||||
bool aIsScriptable, bool aIsRoot);
|
||||
|
||||
bool IsReadWriteTextElement() const {
|
||||
return IsAnyOfXULElements(nsGkAtoms::textbox, nsGkAtoms::textarea) &&
|
||||
!HasAttr(kNameSpaceID_None, nsGkAtoms::readonly);
|
||||
}
|
||||
|
||||
virtual JSObject* WrapNode(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
|
|
|
@ -1145,8 +1145,8 @@ void nsBoxFrame::RegUnregAccessKey(bool aDoReg) {
|
|||
|
||||
// only support accesskeys for the following elements
|
||||
if (!mContent->IsAnyOfXULElements(nsGkAtoms::button, nsGkAtoms::toolbarbutton,
|
||||
nsGkAtoms::checkbox, nsGkAtoms::textbox,
|
||||
nsGkAtoms::tab, nsGkAtoms::radio)) {
|
||||
nsGkAtoms::checkbox, nsGkAtoms::tab,
|
||||
nsGkAtoms::radio)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,8 +95,6 @@ window.addEventListener(
|
|||
// Support context menus on html textareas in the parent process:
|
||||
window.addEventListener("contextmenu", e => {
|
||||
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
// Note that there's not a risk of e.target being XBL anonymous content for <textbox> (which manages
|
||||
// its own context menu), because e.target will be the XBL binding parent in that case.
|
||||
let needsContextMenu =
|
||||
e.target.ownerDocument == document &&
|
||||
!e.defaultPrevented &&
|
||||
|
|
|
@ -66,7 +66,6 @@ toolkit.jar:
|
|||
content/global/bindings/datepicker.js (widgets/datepicker.js)
|
||||
content/global/bindings/datetimebox.css (widgets/datetimebox.css)
|
||||
content/global/bindings/spinner.js (widgets/spinner.js)
|
||||
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/elements/autocomplete-input.js (widgets/autocomplete-input.js)
|
||||
|
|
|
@ -441,13 +441,6 @@ const Preferences = (window.Preferences = (function() {
|
|||
}
|
||||
if (aElement.localName == "checkbox") {
|
||||
setValue(aElement, "checked", val);
|
||||
} else if (aElement.localName == "textbox") {
|
||||
// XXXmano Bug 303998: Avoid a caret placement issue if either the
|
||||
// preference observer or its setter calls updateElements as a result
|
||||
// of the input event handler.
|
||||
if (aElement.value !== val) {
|
||||
setValue(aElement, "value", val);
|
||||
}
|
||||
} else {
|
||||
setValue(aElement, "value", val);
|
||||
}
|
||||
|
@ -499,7 +492,6 @@ const Preferences = (window.Preferences = (function() {
|
|||
case "input":
|
||||
case "radiogroup":
|
||||
case "textarea":
|
||||
case "textbox":
|
||||
case "menulist":
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,198 +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 anonid="moz-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>
|
||||
<!-- 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="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.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="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>
|
||||
|
||||
<method name="setUserInput">
|
||||
<parameter name="value"/>
|
||||
<body><![CDATA[
|
||||
this.inputField.setUserInput(value);
|
||||
]]></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>
|
||||
// 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.setSelectionRange( aSelectionStart, aSelectionEnd );
|
||||
}
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<constructor><![CDATA[
|
||||
var str = this._cachedInputFieldValue;
|
||||
if (str) {
|
||||
this.inputField.value = str;
|
||||
delete this._cachedInputFieldValue;
|
||||
}
|
||||
|
||||
if (this.hasAttribute("emptytext"))
|
||||
this.placeholder = this.getAttribute("emptytext");
|
||||
]]></constructor>
|
||||
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
var field = this.inputField;
|
||||
if (field && field.value) {
|
||||
this._cachedInputFieldValue = 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();
|
||||
this.setAttribute("focused", "true");
|
||||
break;
|
||||
case this.inputField:
|
||||
this.setAttribute("focused", "true");
|
||||
break;
|
||||
default:
|
||||
// Otherwise, allow other children (e.g. URL bar buttons) to get focus
|
||||
break;
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="blur" phase="capturing">
|
||||
<![CDATA[
|
||||
this.removeAttribute("focused");
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="mousedown">
|
||||
<![CDATA[
|
||||
this.mIgnoreClick = this.hasAttribute("focused");
|
||||
|
||||
if (!this.mIgnoreClick) {
|
||||
this.setSelectionRange(0, 0);
|
||||
if (event.originalTarget == this ||
|
||||
event.originalTarget == this.inputField.parentNode)
|
||||
this.inputField.focus();
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -434,8 +434,7 @@ tooltip[titletip="true"] {
|
|||
|
||||
/********** textbox **********/
|
||||
|
||||
textbox {
|
||||
-moz-binding: url("chrome://global/content/bindings/textbox.xml#textbox");
|
||||
search-textbox {
|
||||
-moz-user-select: text;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
@ -453,10 +452,6 @@ textbox {
|
|||
}
|
||||
}
|
||||
|
||||
.textbox-contextmenu:-moz-locale-dir(rtl) {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
/********** autocomplete textbox **********/
|
||||
|
||||
/* SeaMonkey uses its own autocomplete and the toolkit's autocomplete widget */
|
||||
|
|
|
@ -105,10 +105,3 @@ html|span.ac-tag {
|
|||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/* ::::: textboxes inside toolbarpaletteitems ::::: */
|
||||
|
||||
toolbarpaletteitem > toolbaritem > textbox > moz-input-box > html|*.textbox-input,
|
||||
toolbarpaletteitem > toolbaritem > * > textbox > moz-input-box > html|*.textbox-input {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ xul|label[disabled="true"] {
|
|||
}
|
||||
|
||||
html|input {
|
||||
margin: 2px 4px; /* matches xul <textbox> default margin */
|
||||
margin: 2px 4px;
|
||||
}
|
||||
|
||||
xul|notification > xul|hbox > xul|button {
|
||||
|
|
|
@ -3,19 +3,18 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* ===== textbox.css ==================================================
|
||||
== Styles used by the XUL textbox element.
|
||||
== Styles used by the XUL search-textbox element.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
/* ::::: textbox ::::: */
|
||||
/* ::::: search textbox ::::: */
|
||||
|
||||
textbox,
|
||||
search-textbox {
|
||||
-moz-appearance: textfield;
|
||||
cursor: text;
|
||||
margin: 2px 4px;
|
||||
margin: 2px 4px; /* matches <input> global.css margin */
|
||||
padding: 2px 2px 3px;
|
||||
padding-inline-start: 4px;
|
||||
background-color: -moz-Field;
|
||||
|
@ -36,13 +35,8 @@ html|*.textbox-input {
|
|||
text-align: inherit;
|
||||
}
|
||||
|
||||
.textbox-contextmenu {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* ..... readonly state ..... */
|
||||
|
||||
textbox[readonly="true"],
|
||||
search-textbox[readonly="true"] {
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
|
@ -50,14 +44,13 @@ search-textbox[readonly="true"] {
|
|||
|
||||
/* ..... disabled state ..... */
|
||||
|
||||
textbox[disabled="true"],
|
||||
search-textbox[disabled="true"] {
|
||||
cursor: default;
|
||||
background-color: -moz-Dialog;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
/* ::::: search textbox ::::: */
|
||||
/* ::::: icons ::::: */
|
||||
|
||||
search-textbox:not([searchbutton]) > .textbox-search-sign {
|
||||
list-style-image: url(chrome://global/skin/icons/search-textbox.svg);
|
||||
|
@ -72,13 +65,7 @@ search-textbox:not([searchbutton]) > .textbox-search-sign {
|
|||
list-style-image: url(chrome://global/skin/icons/searchfield-cancel.svg);
|
||||
}
|
||||
|
||||
.textbox-search-icon[searchbutton]:not([disabled]) ,
|
||||
.textbox-search-icon[searchbutton]:not([disabled]),
|
||||
.textbox-search-clear:not([disabled]) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ::::: textboxes inside toolbarpaletteitems ::::: */
|
||||
|
||||
toolbarpaletteitem > toolbaritem > textbox > moz-input-box > html|*.textbox-input {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
|
|
@ -93,10 +93,3 @@ html|span.ac-tag {
|
|||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/* ::::: textboxes inside toolbarpaletteitems ::::: */
|
||||
|
||||
toolbarpaletteitem > toolbaritem > textbox > moz-input-box > html|*.textbox-input,
|
||||
toolbarpaletteitem > toolbaritem > * > textbox > moz-input-box > html|*.textbox-input {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ xul|label[disabled="true"] {
|
|||
}
|
||||
|
||||
html|input {
|
||||
margin: 4px; /* matches xul <textbox> default margin */
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
xul|notification > xul|hbox > xul|button {
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
textbox,
|
||||
search-textbox {
|
||||
-moz-appearance: textfield;
|
||||
-moz-appearance: searchfield;
|
||||
font-size: 12px;
|
||||
cursor: text;
|
||||
margin: 4px;
|
||||
padding: 0px;
|
||||
margin: 4px; /* matches <input> global.css margin */
|
||||
padding: 1px;
|
||||
background-color: -moz-Field;
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
@ -26,36 +26,21 @@ html|*.textbox-input {
|
|||
text-shadow: inherit;
|
||||
box-sizing: border-box;
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
html|*.textbox-input {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
.textbox-contextmenu {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
textbox[readonly="true"],
|
||||
search-textbox[readonly="true"] {
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
}
|
||||
|
||||
textbox[disabled="true"],
|
||||
search-textbox[disabled="true"] {
|
||||
cursor: default;
|
||||
background-color: -moz-Dialog;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
/* ::::: search box ::::: */
|
||||
|
||||
search-textbox {
|
||||
-moz-appearance: searchfield;
|
||||
padding: 1px;
|
||||
font-size: 12px;
|
||||
}
|
||||
/* ::::: icons ::::: */
|
||||
|
||||
.textbox-search-clear {
|
||||
list-style-image: url(chrome://global/skin/icons/searchfield-cancel.svg);
|
||||
|
|
|
@ -462,7 +462,6 @@ html|input[type="password"],
|
|||
html|input[type="url"],
|
||||
html|input[type="number"],
|
||||
html|textarea,
|
||||
xul|textbox,
|
||||
xul|search-textbox {
|
||||
-moz-appearance: none;
|
||||
border: 1px solid var(--in-content-box-border-color);
|
||||
|
@ -473,7 +472,6 @@ xul|search-textbox {
|
|||
background-color: var(--in-content-box-background) !important;
|
||||
}
|
||||
|
||||
xul|textbox,
|
||||
xul|search-textbox {
|
||||
min-height: 30px;
|
||||
padding-right: 8px;
|
||||
|
@ -500,7 +498,6 @@ html|input[type="password"]:enabled:not(:focus):hover,
|
|||
html|input[type="url"]:enabled:not(:focus):hover,
|
||||
html|input[type="number"]:enabled:not(:focus):hover,
|
||||
html|textarea:enabled:not(:focus):hover,
|
||||
xul|textbox:not([disabled="true"]):not([focused]):hover,
|
||||
xul|search-textbox:not([disabled="true"]):not([focused]):hover {
|
||||
border-color: var(--in-content-border-hover);
|
||||
}
|
||||
|
@ -512,7 +509,6 @@ html|input[type="password"]:focus,
|
|||
html|input[type="url"]:focus,
|
||||
html|input[type="number"]:focus,
|
||||
html|textarea:focus,
|
||||
xul|textbox[focused],
|
||||
xul|search-textbox[focused] {
|
||||
border-color: var(--in-content-border-active);
|
||||
box-shadow: 0 0 0 1px var(--in-content-border-active),
|
||||
|
@ -529,9 +525,7 @@ html|textarea:-moz-ui-invalid {
|
|||
border-color: var(--in-content-border-invalid);
|
||||
}
|
||||
|
||||
/* Don't show the field error outlines and focus borders at the same time.
|
||||
This doesn't apply to XUL <textbox> since they don't expose validity
|
||||
attributes */
|
||||
/* Don't show the field error outlines and focus borders at the same time. */
|
||||
html|input[type="email"]:-moz-ui-invalid:focus,
|
||||
html|input[type="tel"]:-moz-ui-invalid:focus,
|
||||
html|input[type="text"]:-moz-ui-invalid:focus,
|
||||
|
@ -549,7 +543,6 @@ html|input[type="password"]:disabled,
|
|||
html|input[type="url"]:disabled,
|
||||
html|input[type="number"]:disabled,
|
||||
html|textarea:disabled,
|
||||
xul|textbox[disabled="true"],
|
||||
xul|search-textbox[disabled="true"] {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
|
|
@ -103,10 +103,3 @@ html|span.ac-tag {
|
|||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/* ::::: textboxes inside toolbarpaletteitems ::::: */
|
||||
|
||||
toolbarpaletteitem > toolbaritem > textbox > moz-input-box > html|*.textbox-input,
|
||||
toolbarpaletteitem > toolbaritem > * > textbox > moz-input-box > html|*.textbox-input {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ xul|label[disabled="true"] {
|
|||
}
|
||||
|
||||
html|input {
|
||||
margin: 2px 4px; /* matches xul <textbox> default margin */
|
||||
margin: 2px 4px;
|
||||
}
|
||||
|
||||
xul|popupnotificationcontent {
|
||||
|
|
|
@ -3,19 +3,18 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* ===== textbox.css ==================================================
|
||||
== Styles used by the XUL textbox element.
|
||||
== Styles used by the XUL search-textbox element.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
/* ::::: textbox ::::: */
|
||||
/* ::::: search textbox ::::: */
|
||||
|
||||
textbox,
|
||||
search-textbox {
|
||||
-moz-appearance: textfield;
|
||||
cursor: text;
|
||||
margin: 2px 4px;
|
||||
margin: 2px 4px; /* matches <input> global.css margin */
|
||||
padding: 2px 2px 3px;
|
||||
padding-inline-start: 4px;
|
||||
background-color: -moz-Field;
|
||||
|
@ -36,19 +35,8 @@ html|*.textbox-input {
|
|||
text-align: inherit;
|
||||
}
|
||||
|
||||
@media (-moz-windows-default-theme) and (-moz-os-version: windows-win7) {
|
||||
textbox html|*.textbox-input::placeholder {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
.textbox-contextmenu {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* ..... readonly state ..... */
|
||||
|
||||
textbox[readonly="true"],
|
||||
search-textbox[readonly="true"] {
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
|
@ -56,14 +44,13 @@ search-textbox[readonly="true"] {
|
|||
|
||||
/* ..... disabled state ..... */
|
||||
|
||||
textbox[disabled="true"],
|
||||
search-textbox[disabled="true"] {
|
||||
cursor: default;
|
||||
background-color: -moz-Dialog;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
/* ::::: search textbox ::::: */
|
||||
/* ::::: icons ::::: */
|
||||
|
||||
search-textbox:not([searchbutton]) > .textbox-search-sign {
|
||||
list-style-image: url(chrome://global/skin/icons/search-textbox.svg);
|
||||
|
@ -90,9 +77,3 @@ search-textbox:not([searchbutton]) > .textbox-search-sign {
|
|||
.textbox-search-clear:not([disabled]) {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* ::::: textboxes inside toolbarpaletteitems ::::: */
|
||||
|
||||
toolbarpaletteitem > toolbaritem > textbox > moz-input-box > html|*.textbox-input {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче