Bug 857355 - Hide HTMLInputElement's inputMode behind a pref and only turn it on for Nightly/Aurora. r=smaug

This commit is contained in:
Mounir Lamouri 2013-05-01 16:58:30 +01:00
parent 589fed31a5
commit 5a4ff80d3f
4 changed files with 15 additions and 3 deletions

View File

@ -490,8 +490,12 @@ nsIMEStateManager::SetIMEState(const IMEState &aState,
} else {
context.mHTMLInputType.Assign(nsGkAtoms::textarea->GetUTF16String());
}
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::inputmode,
context.mHTMLInputInputmode);
if (Preferences::GetBool("dom.forms.inputmode", false)) {
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::inputmode,
context.mHTMLInputInputmode);
}
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::moz_action_hint,
context.mActionHint);

View File

@ -110,6 +110,7 @@ reflectUnsignedInt({
// .indeterminate doesn't reflect a content attribute.
// .inputmode
if (SpecialPowers.getBoolPref("dom.forms.inputmode")) {
reflectLimitedEnumerated({
element: document.createElement("input"),
attribute: "inputMode",
@ -117,6 +118,7 @@ reflectLimitedEnumerated({
invalidValues: [ "", "foo", "tulip" ],
defaultValue: "auto"
});
}
// TODO: list (HTMLElement)

View File

@ -47,7 +47,7 @@ interface HTMLInputElement : HTMLElement {
attribute unsigned long height;
[Pure]
attribute boolean indeterminate;
[Pure, SetterThrows]
[Pure, SetterThrows, Pref="dom.forms.inputmode"]
attribute DOMString inputMode;
[Pure]
readonly attribute HTMLElement? list;

View File

@ -4205,3 +4205,9 @@ pref("captivedetect.maxWaitingTime", 5000);
pref("captivedetect.pollingTime", 3000);
pref("captivedetect.maxRetryCount", 5);
#endif
#ifdef RELEASE_BUILD
pref("dom.forms.inputmode", false);
#else
pref("dom.forms.inputmode", true);
#endif