Bug 339286, [XForms/ally] tab navigation, p=surkov, r=me+aaronr
git-svn-id: svn://10.0.0.236/trunk@220063 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
9384d4f43b
commit
e322d61230
@ -36,6 +36,7 @@ xforms.jar:
|
||||
locale/en-US/xforms/xforms.properties (resources/locale/en-US/xforms.properties)
|
||||
locale/en-US/xforms/xforms.dtd (resources/locale/en-US/xforms.dtd)
|
||||
* skin/xforms/contents.rdf (resources/skin/contents.rdf)
|
||||
skin/xforms/xforms-xul.css (resources/skin/xforms-xul.css)
|
||||
skin/xforms/widgets-xhtml.css (resources/skin/widgets-xhtml.css)
|
||||
skin/xforms/widgets-xul.css (resources/skin/widgets-xul.css)
|
||||
skin/xforms/input-xul.css (resources/skin/input-xul.css)
|
||||
|
||||
@ -81,7 +81,8 @@
|
||||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input class="xf-value" anonid="control"/>
|
||||
<html:input class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -144,7 +145,8 @@
|
||||
extends="chrome://xforms/content/input.xml#xformswidget-input-boolean-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input anonid="control" type="checkbox" class="xf-value"/>
|
||||
<html:input anonid="control" type="checkbox" class="xf-value"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -209,7 +211,8 @@
|
||||
<children includes="label"/>
|
||||
<html:span class="-moz-date-container">
|
||||
<html:input anonid="control" size="10"
|
||||
class="-moz-xforms-date-input xf-value"/>
|
||||
class="-moz-xforms-date-input xf-value"
|
||||
xbl:inherits="tabindex"/>
|
||||
<html:input mozType:dropmarker="true"
|
||||
type="button" anonid="dropmarker"
|
||||
title="&xforms.datepicker.title;"/>
|
||||
@ -590,7 +593,8 @@
|
||||
extends="chrome://xforms/content/input.xml#xformswidget-input-month-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:select anonid="control" xbl:inherits="style">
|
||||
<html:select anonid="control"
|
||||
xbl:inherits="style, tabindex">
|
||||
<html:option value=""></html:option>
|
||||
</html:select>
|
||||
<children/>
|
||||
@ -639,7 +643,8 @@
|
||||
extends="chrome://xforms/content/input.xml#xformswidget-input-day-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:select anonid="control" xbl:inherits="style">
|
||||
<html:select anonid="control"
|
||||
xbl:inherits="style, tabindex">
|
||||
<html:option value=""></html:option>
|
||||
</html:select>
|
||||
<children/>
|
||||
@ -688,7 +693,8 @@
|
||||
extends="#xformswidget-input">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input anonid="control" type="password"/>
|
||||
<html:input anonid="control" type="password"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -701,13 +707,14 @@
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
|
||||
|
||||
<!-- TEXTAREA: <DEFAULT> -->
|
||||
<binding id="xformswidget-textarea"
|
||||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:textarea class="xf-value" anonid="control"/>
|
||||
<html:textarea class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
||||
@ -117,7 +117,8 @@
|
||||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox class="xf-value" anonid="control" flex="1"/>
|
||||
<xul:textbox class="xf-value" anonid="control" flex="1"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -136,7 +137,8 @@
|
||||
extends="chrome://xforms/content/input.xml#xformswidget-input-boolean-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:checkbox anonid="control" class="xf-value"/>
|
||||
<xul:checkbox anonid="control" class="xf-value"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -196,7 +198,8 @@
|
||||
<xul:hbox class="-moz-menulist-container" flex="1">
|
||||
<html:input anonid="control" flex="1"
|
||||
class="-moz-menulist-textfield"
|
||||
allowevents="true"/>
|
||||
allowevents="true"
|
||||
xbl:inherits="tabindex"/>
|
||||
<xul:dropmarker mozType:dropmarker="true" anonid="dropmarker"
|
||||
xbl:inherits="disabled"/>
|
||||
</xul:hbox>
|
||||
@ -393,7 +396,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="Number.MIN_VALUE" max="Number.MAX_VALUE"/>
|
||||
min="Number.MIN_VALUE" max="Number.MAX_VALUE"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -404,7 +408,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="Number.MIN_VALUE" max="0"/>
|
||||
min="Number.MIN_VALUE" max="0"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -415,7 +420,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="Number.MIN_VALUE" max="-1"/>
|
||||
min="Number.MIN_VALUE" max="-1"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -426,7 +432,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-9223372036854775807" max="9223372036854775807"/>
|
||||
min="-9223372036854775807" max="9223372036854775807"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -437,7 +444,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-2147483647" max="2147483647"/>
|
||||
min="-2147483647" max="2147483647"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -448,7 +456,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-32767" max="32767"/>
|
||||
min="-32767" max="32767"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -459,7 +468,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-127" max="127"/>
|
||||
min="-127" max="127"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -470,7 +480,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="Number.MAX_VALUE"/>
|
||||
min="0" max="Number.MAX_VALUE"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -482,7 +493,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="18446744073709551615"/>
|
||||
min="0" max="18446744073709551615"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -493,7 +505,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="4294967295"/>
|
||||
min="0" max="4294967295"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -504,7 +517,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="65535"/>
|
||||
min="0" max="65535"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -515,7 +529,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="255"/>
|
||||
min="0" max="255"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -526,7 +541,8 @@
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="1" max="Number.MAX_VALUE"/>
|
||||
min="1" max="Number.MAX_VALUE"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -537,7 +553,8 @@
|
||||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="password" anonid="control" flex="1"/>
|
||||
<xul:textbox type="password" anonid="control" flex="1"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -564,8 +581,9 @@
|
||||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox multiline="true" class="xf-value"
|
||||
anonid="control" flex="1"/>
|
||||
<xul:textbox multiline="true" class="xf-value"
|
||||
anonid="control" flex="1"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
<content mozType:deferredrefresh="true">
|
||||
<children includes="label"/>
|
||||
<html:span mozType:slider="true" anonid="slider"
|
||||
xbl:inherits="min=start,max=end,step=step"/>
|
||||
xbl:inherits="min=start,max=end,step=step,mozType:tabindex=tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
||||
@ -48,7 +48,8 @@
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
xmlns:xforms="http://www.w3.org/2002/xforms">
|
||||
xmlns:xforms="http://www.w3.org/2002/xforms"
|
||||
xmlns:mozType="http://www.mozilla.org/projects/xforms/2005/type">
|
||||
|
||||
|
||||
<!-- SELECT/SELECT1 CONTROLS
|
||||
@ -68,7 +69,8 @@
|
||||
<html:span class="label-container">
|
||||
<children includes="label"/>
|
||||
</html:span>
|
||||
<html:span anonid="control" xbl:inherits="style"/>
|
||||
<html:span anonid="control"
|
||||
xbl:inherits="style, mozType:tabindex=tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
@ -81,7 +83,8 @@
|
||||
<html:span class="label-container">
|
||||
<children includes="label"/>
|
||||
</html:span>
|
||||
<html:span anonid="control" xbl:inherits="style"/>
|
||||
<html:span anonid="control"
|
||||
xbl:inherits="style, mozType:tabindex=tabindex"/>
|
||||
<children/>
|
||||
</html:label>
|
||||
</content>
|
||||
@ -107,7 +110,7 @@
|
||||
extends="chrome://xforms/content/select.xml#controlwidget-base">
|
||||
|
||||
<content>
|
||||
<html:select xbl:inherits="style, disabled=readonly"
|
||||
<html:select xbl:inherits="style, disabled=readonly, tabindex=mozType:tabindex"
|
||||
class="xf-value" multiple="true" size="5" anonid="control"/>
|
||||
</content>
|
||||
|
||||
@ -212,7 +215,7 @@
|
||||
<binding id="controlwidget-select1-compact"
|
||||
extends="#controlwidget-select-compact">
|
||||
<content>
|
||||
<html:select xbl:inherits="style, disabled=readonly"
|
||||
<html:select xbl:inherits="style, disabled=readonly, tabindex=mozType:tabindex"
|
||||
class="xf-value" size="5" anonid="control"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
@ -47,7 +47,8 @@
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
xmlns:xforms="http://www.w3.org/2002/xforms"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:mozType="http://www.mozilla.org/projects/xforms/2005/type">
|
||||
|
||||
|
||||
<!-- SELECT, SELECT1 CONTROLS
|
||||
@ -65,7 +66,8 @@
|
||||
<content>
|
||||
<xul:hbox flex="1">
|
||||
<children includes="label"/>
|
||||
<xul:box anonid="control" xbl:inherits="style"
|
||||
<xul:box anonid="control"
|
||||
xbl:inherits="style, mozType:tabindex=tabindex"
|
||||
class="xf-value" flex="1"/>
|
||||
</xul:hbox>
|
||||
<children/>
|
||||
@ -77,7 +79,8 @@
|
||||
<content>
|
||||
<xul:hbox flex="1">
|
||||
<children includes="label"/>
|
||||
<xul:box anonid="control" xbl:inherits="style"
|
||||
<xul:box anonid="control"
|
||||
xbl:inherits="style, mozType:tabindex=tabindex"
|
||||
class="xf-value" flex="1"/>
|
||||
</xul:hbox>
|
||||
<children/>
|
||||
@ -112,7 +115,7 @@
|
||||
extends="chrome://xforms/content/select.xml#controlwidget-base">
|
||||
|
||||
<content>
|
||||
<xul:listbox xbl:inherits="style, disabled=readonly"
|
||||
<xul:listbox xbl:inherits="style, disabled=readonly, tabindex=mozType:tabindex"
|
||||
rows="5" flex="1"
|
||||
seltype="multiple"
|
||||
anonid="control"/>
|
||||
@ -245,7 +248,7 @@
|
||||
extends="chrome://xforms/content/select.xml#controlwidget-base">
|
||||
|
||||
<content>
|
||||
<xul:menulist xbl:inherits="style, disabled=readonly"
|
||||
<xul:menulist xbl:inherits="style, disabled=readonly, tabindex=mozType:tabindex"
|
||||
anonid="control" flex="1">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
@ -384,7 +387,7 @@
|
||||
<binding id="controlwidget-select1-compact"
|
||||
extends="#controlwidget-select-compact">
|
||||
<content>
|
||||
<xul:listbox xbl:inherits="style, disabled=readonly"
|
||||
<xul:listbox xbl:inherits="style, disabled=readonly, tabindex=mozType:tabindex"
|
||||
rows="5" anonid="control"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
anonid="container"><html:input
|
||||
class="-moz-xforms-select1-input xf-value"
|
||||
anonid="control"
|
||||
xbl:inherits="tabindex"
|
||||
onfocus="this.parentNode.parentNode.dispatchDOMUIEvent('DOMFocusIn')"
|
||||
onblur="this.parentNode.parentNode.handleBlur(); this.parentNode.parentNode.dispatchDOMUIEvent('DOMFocusOut');"
|
||||
onclick="this.parentNode.parentNode.handleControlClick();"
|
||||
|
||||
@ -87,7 +87,8 @@
|
||||
extends="chrome://xforms/content/selects.xml#select1-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:radiogroup flex="1" class="xf-value" anonid="control">
|
||||
<xul:radiogroup flex="1" class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex">
|
||||
<children/>
|
||||
</xul:radiogroup>
|
||||
</content>
|
||||
|
||||
@ -50,7 +50,8 @@
|
||||
<bindings id="widgetsBindingsForXHTML"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
xmlns:mozType="http://www.mozilla.org/projects/xforms/2005/type">
|
||||
|
||||
|
||||
<!-- CALENDAR WIDGETS -->
|
||||
@ -361,7 +362,8 @@
|
||||
<content>
|
||||
<html:span anonid="minlabel"/>
|
||||
<!-- XXX: width and height set by CSS, see bug 350870. -->
|
||||
<html:canvas tabindex="0" anonid="canvas" width="260" height="40"/>
|
||||
<html:canvas tabindex="0" anonid="canvas" width="260" height="40"
|
||||
xbl:inherits="tabindex=mozType:tabindex"/>
|
||||
<html:span anonid="maxlabel"/>
|
||||
</content>
|
||||
|
||||
|
||||
@ -58,32 +58,29 @@
|
||||
xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#">
|
||||
|
||||
|
||||
<!-- OUTPUT: <DEFAULT> -->
|
||||
<!-- OUTPUT: <DEFAULT>
|
||||
@note - xf:output can support tab navigation
|
||||
-->
|
||||
<binding id="xformswidget-output"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-output-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<!-- XXX initialize span with a space until repeat is xbl-ized. Part
|
||||
of workaround for bug 322975
|
||||
-->
|
||||
<html:span class="xf-value" anonid="control"> </html:span>
|
||||
<children/>
|
||||
<html:span anonid="control"
|
||||
class="xf-value"
|
||||
xbl:inherits="tabindex">
|
||||
<children/>
|
||||
</html:span>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
<method name="getControlElement">
|
||||
<body>
|
||||
return {
|
||||
__proto__: this.ownerDocument.
|
||||
getAnonymousElementByAttribute(this, 'anonid', 'control'),
|
||||
|
||||
// XXX changing from setting textContent to setting nodeValue of
|
||||
// first child (text node created by space character initializer
|
||||
// above). Workaround for bug 322975. Probably should be changed
|
||||
// back after repeat is xbl-ized
|
||||
__proto__: this.ownerDocument.
|
||||
getAnonymousElementByAttribute(this, 'anonid', 'control'),
|
||||
|
||||
set value(val) {
|
||||
this.firstChild.nodeValue = val;
|
||||
this.firstChild.data = val ? val : "";
|
||||
}
|
||||
};
|
||||
</body>
|
||||
@ -117,7 +114,8 @@
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-output-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:img class="xf-value" anonid="control"/>
|
||||
<html:img class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -143,7 +141,8 @@
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-output-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:img class="xf-value" anonid="control"/>
|
||||
<html:img class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -164,12 +163,16 @@
|
||||
</binding>
|
||||
|
||||
|
||||
<!-- LABEL: <DEFAULT> -->
|
||||
<!-- LABEL: <DEFAULT>
|
||||
@note - xf:label can support tab navigation
|
||||
-->
|
||||
<binding id="xformswidget-label"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-label-base">
|
||||
<content>
|
||||
<html:span anonid="implicitcontent"/>
|
||||
<html:span anonid="explicitcontent"><children/></html:span>
|
||||
<html:span anonid="implicitcontent"
|
||||
xbl:inherits="tabindex"/>
|
||||
<html:span anonid="explicitcontent"
|
||||
xbl:inherits="tabindex"><children/></html:span>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
@ -184,11 +187,13 @@
|
||||
|
||||
set value(val) {
|
||||
if (val != null) {
|
||||
this._implicitContent.textContent = val;
|
||||
this._explicitContent.style.display = 'none';
|
||||
this._implicitContent.style.display = 'inline';
|
||||
this._implicitContent.textContent = val;
|
||||
} else {
|
||||
this._implicitContent.textContent = '';
|
||||
this._explicitContent.style.display = 'inline';
|
||||
this._implicitContent.style.display = 'none';
|
||||
this._implicitContent.textContent = '';
|
||||
}
|
||||
},
|
||||
|
||||
@ -223,8 +228,10 @@
|
||||
<binding id="xformswidget-label-accesskey"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-label-base">
|
||||
<content>
|
||||
<html:span anonid="implicitcontent"/>
|
||||
<html:span anonid="explicitcontent"><children/></html:span>
|
||||
<html:span anonid="implicitcontent"
|
||||
xbl:inherits="tabindex"/>
|
||||
<html:span anonid="explicitcontent"
|
||||
xbl:inherits="tabindex"><children/></html:span>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
@ -244,8 +251,9 @@
|
||||
var textnode = null;
|
||||
|
||||
if (val != null) {
|
||||
this._implicitContent.textContent = val;
|
||||
this._explicitContent.style.display = 'none';
|
||||
this._implicitContent.style.display = 'inline';
|
||||
this._implicitContent.textContent = val;
|
||||
textnode = this._implicitContent.firstChild;
|
||||
} else {
|
||||
// XXX: if label has element node children, we skip accesskey
|
||||
@ -258,13 +266,15 @@
|
||||
}
|
||||
}
|
||||
if (!underline) {
|
||||
this._implicitContent.textContent = '';
|
||||
this._explicitContent.style.display = 'inline';
|
||||
this._implicitContent.style.display = 'none';
|
||||
this._implicitContent.textContent = '';
|
||||
return;
|
||||
}
|
||||
|
||||
this._implicitContent.textContent = this._labelControl.textContent;
|
||||
this._explicitContent.style.display = 'none';
|
||||
this._implicitContent.style.display = 'inline';
|
||||
this._implicitContent.textContent = this._labelControl.textContent;
|
||||
textnode = this._implicitContent.firstChild;
|
||||
}
|
||||
|
||||
@ -315,7 +325,8 @@
|
||||
<binding id="xformswidget-trigger"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-trigger-base">
|
||||
<content>
|
||||
<html:button anonid="control">
|
||||
<html:button anonid="control"
|
||||
xbl:inherits="tabindex">
|
||||
<children/>
|
||||
</html:button>
|
||||
</content>
|
||||
@ -360,7 +371,8 @@
|
||||
<binding id="xformswidget-trigger-minimal"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-trigger-base">
|
||||
<content>
|
||||
<html:span tabindex="0" anonid="control">
|
||||
<html:span tabindex="0" anonid="control"
|
||||
xbl:inherits="tabindex">
|
||||
<children/>
|
||||
</html:span>
|
||||
</content>
|
||||
@ -517,11 +529,14 @@
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-upload-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input anonid="text_control" class="xf-value" readonly="readonly"/>
|
||||
<html:button anonid="browse_button">
|
||||
<html:input anonid="text_control" class="xf-value" readonly="readonly"
|
||||
tabindex="-1"/>
|
||||
<html:button anonid="browse_button"
|
||||
xbl:inherits="tabindex">
|
||||
&xforms.upload.browsetext;
|
||||
</html:button>
|
||||
<html:button anonid="clear_button">
|
||||
<html:button anonid="clear_button"
|
||||
xbl:inherits="tabindex">
|
||||
&xforms.upload.cleartext;
|
||||
</html:button>
|
||||
<children/>
|
||||
|
||||
@ -49,13 +49,21 @@
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:mozType="http://www.mozilla.org/projects/xforms/2005/type">
|
||||
|
||||
<!-- OUTPUT: <DEFAULT> -->
|
||||
<!-- OUTPUT: <DEFAULT>
|
||||
@note - xf:output can support tab navigation
|
||||
-->
|
||||
<binding id="xformswidget-output"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-output-base">
|
||||
<resources>
|
||||
<stylesheet src="chrome://xforms/skin/xforms-xul.css"/>
|
||||
</resources>
|
||||
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:description class="xf-value" anonid="control"/>
|
||||
<children/>
|
||||
<xul:description class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex">
|
||||
<children/>
|
||||
</xul:description>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
@ -66,7 +74,7 @@
|
||||
getAnonymousElementByAttribute(this, 'anonid', 'control'),
|
||||
|
||||
set value(val) {
|
||||
this.textContent = val;
|
||||
this.firstChild.data = val ? val : "";
|
||||
}
|
||||
};
|
||||
</body>
|
||||
@ -80,7 +88,8 @@
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-output-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:box mozType:calendar="true" anonid="control" readonly="true"/>
|
||||
<xul:box mozType:calendar="true" anonid="control" readonly="true"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -100,7 +109,8 @@
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-output-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:image class="xf-value" anonid="control"/>
|
||||
<xul:image class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -126,7 +136,8 @@
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-output-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:image class="xf-value" anonid="control"/>
|
||||
<xul:image class="xf-value" anonid="control"
|
||||
xbl:inherits="tabindex"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
@ -147,38 +158,46 @@
|
||||
</binding>
|
||||
|
||||
|
||||
<!-- LABEL: <DEFAULT> -->
|
||||
<!-- LABEL: <DEFAULT>
|
||||
@note - xf:label can support tab navigation
|
||||
-->
|
||||
<binding id="xformswidget-label"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-label-base">
|
||||
<resources>
|
||||
<stylesheet src="chrome://xforms/skin/xforms-xul.css"/>
|
||||
</resources>
|
||||
|
||||
<content>
|
||||
<xul:deck anonid="contentswitcher" flex="1" selectedIndex="1">
|
||||
<xul:label anonid="implicitcontent"/>
|
||||
<xul:label><children/></xul:label>
|
||||
</xul:deck>
|
||||
<xul:label anonid="implicitcontent"
|
||||
xbl:inherits="tabindex"/>
|
||||
<xul:label anonid="explicitcontent"
|
||||
xbl:inherits="tabindex"><children/></xul:label>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
<method name="getControlElement">
|
||||
<body>
|
||||
return {
|
||||
_contentSwitcher: this.ownerDocument.
|
||||
getAnonymousElementByAttribute(this, 'anonid', 'contentswitcher'),
|
||||
_implicitContent: this.ownerDocument.
|
||||
getAnonymousElementByAttribute(this, 'anonid', 'implicitcontent'),
|
||||
_explicitContent: this.ownerDocument.
|
||||
getAnonymousElementByAttribute(this, 'anonid', 'explicitcontent'),
|
||||
__proto__: this,
|
||||
|
||||
set value(val) {
|
||||
if (val != null) {
|
||||
this._implicitContent.hidden = false;
|
||||
this._explicitContent.hidden = true;
|
||||
this._implicitContent.textContent = val;
|
||||
this._contentSwitcher.selectedIndex = 0;
|
||||
} else {
|
||||
this._implicitContent.hidden = true;
|
||||
this._explicitContent.hidden = false;
|
||||
this._implicitContent.textContent = '';
|
||||
this._contentSwitcher.selectedIndex = 1;
|
||||
}
|
||||
},
|
||||
|
||||
get textValue() {
|
||||
if (this._contentSwitcher.selectedIndex == '0')
|
||||
if (!this._implicitContent.hidden)
|
||||
return this._implicitContent.textContent;
|
||||
return this.textContent;
|
||||
},
|
||||
@ -186,7 +205,7 @@
|
||||
var fragment = this.ownerDocument.createDocumentFragment();
|
||||
|
||||
var container = null;
|
||||
if (this._contentSwitcher.selectedIndex == '0')
|
||||
if (!this._implicitContent.hidden)
|
||||
container = this._implicitContent;
|
||||
else
|
||||
container = this;
|
||||
@ -230,7 +249,8 @@
|
||||
<binding id="xformswidget-trigger"
|
||||
extends="#xformswidget-trigger-base">
|
||||
<content>
|
||||
<xul:button anonid="control" flex="1">
|
||||
<xul:button anonid="control" flex="1"
|
||||
xbl:inherits="tabindex">
|
||||
<children/>
|
||||
</xul:button>
|
||||
</content>
|
||||
@ -260,7 +280,7 @@
|
||||
extends="#xformswidget-trigger-base">
|
||||
<content>
|
||||
<xul:box tabindex="0" anonid="control" flex="1"
|
||||
xbl:inherits="orient">
|
||||
xbl:inherits="tabindex, orient">
|
||||
<children/>
|
||||
</xul:box>
|
||||
</content>
|
||||
|
||||
52
mozilla/extensions/xforms/resources/skin/xforms-xul.css
Normal file
52
mozilla/extensions/xforms/resources/skin/xforms-xul.css
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla XForms support.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Alexander Surkov <surkov.alexander@gmail.com> (original author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
|
||||
@namespace xf url(http://www.w3.org/2002/xforms);
|
||||
|
||||
xf|label > label,
|
||||
xf|output > description {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
xf|label > label:focus,
|
||||
xf|output > description:focus {
|
||||
border: 1px dotted -moz-DialogText;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user