Bug 1842986 - Remove dom.forms.inputmode pref r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D187421
This commit is contained in:
Gregory Pappas 2023-09-15 16:49:21 +00:00
parent 8016a76331
commit 16301b7fe2
9 changed files with 5 additions and 23 deletions

View file

@ -1644,9 +1644,7 @@ MOZ_CAN_RUN_SCRIPT static void GetActionHint(const IMEState& aState,
static void GetInputMode(const IMEState& aState, const nsIContent& aContent,
nsAString& aInputMode) {
if (aState.IsEditable() &&
(StaticPrefs::dom_forms_inputmode() ||
nsContentUtils::IsChromeDoc(aContent.OwnerDoc()))) {
if (aState.IsEditable()) {
aContent.AsElement()->GetAttr(nsGkAtoms::inputmode, aInputMode);
if (aContent.IsHTMLElement(nsGkAtoms::input) &&
aInputMode.EqualsLiteral("mozAwesomebar")) {

View file

@ -791,8 +791,7 @@ void nsGenericHTMLElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
AddToNameTable(aValue->GetAtomValue());
}
}
} else if ((aName == nsGkAtoms::inputmode &&
StaticPrefs::dom_forms_inputmode()) ||
} else if (aName == nsGkAtoms::inputmode ||
aName == nsGkAtoms::enterkeyhint) {
nsPIDOMWindowOuter* window = OwnerDoc()->GetWindow();
if (window && window->GetFocusedElement() == this) {

View file

@ -1,6 +1,5 @@
[DEFAULT]
prefs =
dom.forms.inputmode=true # only for test_inputmode.html
gfx.font_loader.delay=0
support-files =
347174transform.xsl

View file

@ -53,7 +53,7 @@ interface HTMLElement : Element {
attribute DOMString? popover;
[CEReactions, SetterThrows, Pure]
attribute boolean spellcheck;
[CEReactions, Pure, SetterThrows, Pref="dom.forms.inputmode"]
[CEReactions, Pure, SetterThrows]
attribute DOMString inputMode;
[CEReactions, Pure, SetterThrows]
attribute DOMString enterKeyHint;

View file

@ -964,8 +964,7 @@ The value is a string representing the focused editor.
mHTMLInputMode
^^^^^^^^^^^^^^
The value is ``inputmode`` attribute value of the focused editor. This is set
only when ``"dom.forms.inputmode"`` pref is true.
The value is ``inputmode`` attribute value of the focused editor.
mActionHint
^^^^^^^^^^^

View file

@ -2977,12 +2977,6 @@
value: @IS_ANDROID@
mirror: always
# Is support for HTMLElement.inputMode enabled?
- name: dom.forms.inputmode
type: bool
value: true
mirror: always
- name: dom.forms.always_allow_pointer_events.enabled
type: bool
value: @IS_NIGHTLY_BUILD@

View file

@ -1,4 +1,4 @@
prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featurePolicy.header.enabled:true, dom.security.featurePolicy.webidl.enabled:true, dom.forms.inputmode:true, dom.forms.autocapitalize:true]
prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featurePolicy.header.enabled:true, dom.security.featurePolicy.webidl.enabled:true, dom.forms.autocapitalize:true]
[idlharness.https.html?exclude=(Document|Window|HTML.*)]
[AudioTrack interface: existence and properties of interface prototype object]
expected: FAIL

View file

@ -1,3 +0,0 @@
[reflection-misc.html]
prefs: [dom.forms.inputmode:true]

View file

@ -10828,8 +10828,6 @@ async function runPasswordMaskDelayTest() {
async function runInputModeTest()
{
await SpecialPowers.setBoolPref("dom.forms.inputmode", true);
let result = [];
function handler(aEvent)
@ -10860,8 +10858,6 @@ async function runInputModeTest()
textarea.value = "";
textarea.removeEventListener("compositionupdate", handler, true);
textarea.removeEventListener("compositionend", handler, true);
await SpecialPowers.clearUserPref("dom.forms.inputmode");
}