Bug 286079. Tabindex broken in XUL. r=vlad, sr=neil
This commit is contained in:
Родитель
f23a2409d1
Коммит
9af50e08ac
|
@ -5,7 +5,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="colorpicker">
|
||||
<binding id="colorpicker" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/colorpicker.css"/>
|
||||
</resources>
|
||||
|
@ -450,12 +450,6 @@
|
|||
</property>
|
||||
|
||||
<property name="open" onget="return this.mOpen"/>
|
||||
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.hasAttribute('disabled');"/>
|
||||
|
||||
<property name="value" onget="return this.color;" onset="return (this.color = val);"/>
|
||||
<property name="color">
|
||||
<getter><![CDATA[
|
||||
|
|
|
@ -4,18 +4,27 @@
|
|||
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="basecontrol">
|
||||
<implementation implements="nsIDOMXULControlElement">
|
||||
<!-- public implementation -->
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.getAttribute('disabled') == 'true';"/>
|
||||
<property name="tabIndex" onget="return parseInt(this.getAttribute('tabindex'));"
|
||||
onset="if (val) this.setAttribute('tabindex', val);
|
||||
else this.removeAttribute('tabindex'); return val;"/>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="basetext">
|
||||
<binding id="basetext" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<implementation>
|
||||
<!-- public implementation -->
|
||||
<property name="label" onset="return this.setAttribute('label',val);"
|
||||
onget="return this.getAttribute('label');"/>
|
||||
<property name="crop" onset="return this.setAttribute('crop',val);"
|
||||
onget="return this.getAttribute('crop');"/>
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.getAttribute('disabled') == 'true';"/>
|
||||
<property name="image" onset="return this.setAttribute('image',val);"
|
||||
onget="return this.getAttribute('image');"/>
|
||||
<property name="accessKey">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="listbox-base">
|
||||
<binding id="listbox-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/listbox.css"/>
|
||||
</resources>
|
||||
|
@ -58,11 +58,6 @@
|
|||
|
||||
<!-- ///////////////// public listbox members ///////////////// -->
|
||||
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.hasAttribute('disabled');"/>
|
||||
|
||||
<property name="listBoxObject"
|
||||
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIListBoxObject);"
|
||||
readonly="true"/>
|
||||
|
@ -774,9 +769,6 @@
|
|||
<property name="label" onget="return this.getAttribute('label');"
|
||||
onset="this.setAttribute('label', val); return val;"/>
|
||||
|
||||
<property name="disabled" onget="return this.getAttribute('disabled') == 'true';"
|
||||
onset="if (val) this.setAttribute('disabled', 'true'); else this.removeAttribute('disabled');"/>
|
||||
|
||||
<property name="selected" onget="return this.getAttribute('selected') == 'true';">
|
||||
<setter><![CDATA[
|
||||
if (val)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="menulist-base">
|
||||
<binding id="menulist-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/menulist.css"/>
|
||||
</resources>
|
||||
|
@ -94,10 +94,6 @@
|
|||
<property name="label" readonly="true" onget="return this.getAttribute('label');"/>
|
||||
<property name="description" onset="this.setAttribute('description',val); return val;"
|
||||
onget="return this.getAttribute('description');"/>
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.hasAttribute('disabled');"/>
|
||||
|
||||
<property name="open" onset="this.menuBoxObject.openMenu(val);
|
||||
return val;"
|
||||
|
@ -278,7 +274,7 @@
|
|||
<content sizetopopup="pref">
|
||||
<xul:hbox class="menulist-editable-box textbox-input-box" xbl:inherits="context" flex="1">
|
||||
<html:input class="menulist-editable-input" flex="1" anonid="input" allowevents="true"
|
||||
xbl:inherits="value=label,disabled,readonly"/>
|
||||
xbl:inherits="value=label,disabled,tabindex,readonly"/>
|
||||
</xul:hbox>
|
||||
<xul:dropmarker class="menulist-dropmarker" type="menu"/>
|
||||
<children includes="menupopup"/>
|
||||
|
|
|
@ -173,6 +173,31 @@
|
|||
</setter>
|
||||
</property>
|
||||
|
||||
<property name="tabIndex">
|
||||
<getter>
|
||||
return parseInt(this.getAttribute("tabindex"));
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
if (val)
|
||||
this.setAttribute("tabindex", val);
|
||||
else
|
||||
this.removeAttribute("tabindex");
|
||||
|
||||
var elements = document.getElementsByAttribute("preference", this.id);
|
||||
for (var i = 0; i < elements.length; ++i) {
|
||||
elements[i].tabIndex = val;
|
||||
|
||||
var labels = document.getElementsByAttribute("control", elements[i].id);
|
||||
for (var j = 0; j < labels.length; ++j)
|
||||
labels[j].tabIndex = val;
|
||||
}
|
||||
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
|
||||
<property name="hasUserValue">
|
||||
<getter>
|
||||
return this.preferences.rootBranch.prefHasUserValue(this.name);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="radiogroup">
|
||||
<binding id="radiogroup" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/radio.css"/>
|
||||
</resources>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<!-- bound to <description>s -->
|
||||
<binding id="text-base">
|
||||
<binding id="text-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<implementation implements="nsIDOMXULDescriptionElement, nsIAccessibleProvider">
|
||||
<property name="accessible">
|
||||
<getter>
|
||||
|
@ -16,10 +16,6 @@
|
|||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
<property name="disabled" onget="return this.hasAttribute('disabled');"
|
||||
onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"/>
|
||||
<property name="value" onget="return this.getAttribute('value');"
|
||||
onset="this.setAttribute('value', val); return val;"/>
|
||||
<property name="crop" onget="return this.getAttribute('crop');"
|
||||
|
|
|
@ -53,6 +53,10 @@
|
|||
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;
|
||||
|
@ -161,7 +165,7 @@
|
|||
<content>
|
||||
<xul:hbox class="textbox-input-box" flex="1" xbl:inherits="context">
|
||||
<html:textarea class="textbox-textarea" flex="1" anonid="input"
|
||||
xbl:inherits="onfocus,onblur,xbl:text=value,disabled,rows,cols,readonly,wrap"><children/></html:textarea>
|
||||
xbl:inherits="onfocus,onblur,xbl:text=value,disabled,tabindex,rows,cols,readonly,wrap"><children/></html:textarea>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="tree-base">
|
||||
<binding id="tree-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tree.css"/>
|
||||
</resources>
|
||||
|
@ -40,13 +40,6 @@
|
|||
onset="if (val) this.setAttribute('editable', 'true');
|
||||
else this.removeAttribute('editable'); return val;"/>
|
||||
|
||||
<!-- ///////////////// nsIDOMXULControlElement ///////////////// -->
|
||||
|
||||
<property name="disabled"
|
||||
onget="return this.hasAttribute('disabled');"
|
||||
onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled'); return val;"/>
|
||||
|
||||
<!-- ///////////////// nsIDOMXULSelectControlElement ///////////////// -->
|
||||
|
||||
<!-- ///////////////// nsIDOMXULMultiSelectControlElement ///////////////// -->
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="colorpicker">
|
||||
<binding id="colorpicker" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/colorpicker.css"/>
|
||||
</resources>
|
||||
|
@ -439,11 +439,6 @@
|
|||
|
||||
<property name="open" onget="return this.mOpen"/>
|
||||
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.hasAttribute('disabled');"/>
|
||||
|
||||
<property name="color">
|
||||
<getter><![CDATA[
|
||||
return this.getAttribute("color");
|
||||
|
|
|
@ -5,17 +5,26 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="basetext">
|
||||
<binding id="basecontrol">
|
||||
<implementation implements="nsIDOMXULControlElement">
|
||||
<!-- public implementation -->
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.getAttribute('disabled') == 'true';"/>
|
||||
<property name="tabIndex" onget="return parseInt(this.getAttribute('tabindex'));"
|
||||
onset="if (val) this.setAttribute('tabindex', val);
|
||||
else this.removeAttribute('tabindex'); return val;"/>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="basetext" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<implementation>
|
||||
<!-- public implementation -->
|
||||
<property name="label" onset="return this.setAttribute('label',val);"
|
||||
onget="return this.getAttribute('label');"/>
|
||||
<property name="crop" onset="return this.setAttribute('crop',val);"
|
||||
onget="return this.getAttribute('crop');"/>
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.getAttribute('disabled') == 'true';"/>
|
||||
<property name="image" onset="return this.setAttribute('image',val);"
|
||||
onget="return this.getAttribute('image');"/>
|
||||
<property name="accessKey">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="listbox-base">
|
||||
<binding id="listbox-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/listbox.css"/>
|
||||
</resources>
|
||||
|
@ -58,11 +58,6 @@
|
|||
|
||||
<!-- ///////////////// public listbox members ///////////////// -->
|
||||
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.hasAttribute('disabled');"/>
|
||||
|
||||
<property name="listBoxObject"
|
||||
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIListBoxObject);"
|
||||
readonly="true"/>
|
||||
|
@ -774,9 +769,6 @@
|
|||
<property name="label" onget="return this.getAttribute('label');"
|
||||
onset="this.setAttribute('label', val); return val;"/>
|
||||
|
||||
<property name="disabled" onget="return this.getAttribute('disabled') == 'true';"
|
||||
onset="if (val) this.setAttribute('disabled', 'true'); else this.removeAttribute('disabled');"/>
|
||||
|
||||
<property name="selected" onget="return this.getAttribute('selected') == 'true';">
|
||||
<setter><![CDATA[
|
||||
if (val)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="menulist-base">
|
||||
<binding id="menulist-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/menulist.css"/>
|
||||
</resources>
|
||||
|
@ -94,10 +94,6 @@
|
|||
<property name="label" readonly="true" onget="return this.getAttribute('label');"/>
|
||||
<property name="description" onset="this.setAttribute('description',val); return val;"
|
||||
onget="return this.getAttribute('description');"/>
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
onget="return this.hasAttribute('disabled');"/>
|
||||
|
||||
<property name="open" onset="this.menuBoxObject.openMenu(val);
|
||||
return val;"
|
||||
|
@ -278,7 +274,7 @@
|
|||
<content sizetopopup="pref">
|
||||
<xul:hbox class="menulist-editable-box textbox-input-box" xbl:inherits="context" flex="1">
|
||||
<html:input class="menulist-editable-input" flex="1" anonid="input" allowevents="true"
|
||||
xbl:inherits="value=label,disabled"/>
|
||||
xbl:inherits="value=label,disabled,tabindex"/>
|
||||
</xul:hbox>
|
||||
<xul:dropmarker class="menulist-dropmarker" type="menu"/>
|
||||
<children includes="menupopup"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="radiogroup">
|
||||
<binding id="radiogroup" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/radio.css"/>
|
||||
</resources>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<!-- bound to <description>s -->
|
||||
<binding id="text-base">
|
||||
<binding id="text-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<implementation implements="nsIDOMXULDescriptionElement, nsIAccessibleProvider">
|
||||
<property name="accessible">
|
||||
<getter>
|
||||
|
@ -16,10 +16,6 @@
|
|||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
<property name="disabled" onget="return this.hasAttribute('disabled');"
|
||||
onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"/>
|
||||
<property name="value" onget="return this.getAttribute('value');"
|
||||
onset="this.setAttribute('value', val); return val;"/>
|
||||
<property name="crop" onget="return this.getAttribute('crop');"
|
||||
|
|
|
@ -53,6 +53,10 @@
|
|||
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;
|
||||
|
@ -161,7 +165,7 @@
|
|||
<content>
|
||||
<xul:hbox class="textbox-input-box" flex="1" xbl:inherits="context">
|
||||
<html:textarea class="textbox-textarea" flex="1" anonid="input"
|
||||
xbl:inherits="onfocus,onblur,xbl:text=value,disabled,rows,cols,readonly,wrap"><children/></html:textarea>
|
||||
xbl:inherits="onfocus,onblur,xbl:text=value,disabled,tabindex,rows,cols,readonly,wrap"><children/></html:textarea>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="tree-base">
|
||||
<binding id="tree-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tree.css"/>
|
||||
</resources>
|
||||
|
@ -40,13 +40,6 @@
|
|||
onset="if (val) this.setAttribute('editable', 'true');
|
||||
else this.removeAttribute('editable'); return val;"/>
|
||||
|
||||
<!-- ///////////////// nsIDOMXULControlElement ///////////////// -->
|
||||
|
||||
<property name="disabled"
|
||||
onget="return this.hasAttribute('disabled');"
|
||||
onset="if (val) this.setAttribute('disabled', 'true');
|
||||
else this.removeAttribute('disabled'); return val;"/>
|
||||
|
||||
<!-- ///////////////// nsIDOMXULSelectControlElement ///////////////// -->
|
||||
|
||||
<!-- ///////////////// nsIDOMXULMultiSelectControlElement ///////////////// -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче