Bug 1851962 - Remove dom.forms.autocapitalize pref r=emilio,geckoview-reviewers,m_kato

Differential Revision: https://phabricator.services.mozilla.com/D188367
This commit is contained in:
Gregory Pappas 2023-09-18 13:53:21 +00:00
parent d1761aed79
commit 06e3f83e31
7 changed files with 2 additions and 16 deletions

View File

@ -1662,7 +1662,6 @@ static void GetAutocapitalize(const IMEState& aState, const Element& aElement,
const InputContext& aInputContext,
nsAString& aAutocapitalize) {
if (aElement.IsHTMLElement() && aState.IsEditable() &&
StaticPrefs::dom_forms_autocapitalize() &&
aInputContext.IsAutocapitalizeSupported()) {
nsGenericHTMLElement::FromNode(&aElement)->GetAutocapitalize(
aAutocapitalize);

View File

@ -57,7 +57,7 @@ interface HTMLElement : Element {
attribute DOMString inputMode;
[CEReactions, Pure, SetterThrows]
attribute DOMString enterKeyHint;
[CEReactions, Pure, SetterThrows, Pref="dom.forms.autocapitalize"]
[CEReactions, Pure, SetterThrows]
attribute DOMString autocapitalize;
attribute DOMString nonce;

View File

@ -1218,8 +1218,6 @@ class TextInputDelegateTest : BaseSessionTest() {
// no way to set autocapitalize on designmode.
assumeThat("Not in designmode", id, not(equalTo("#designmode")))
sessionRule.setPrefsUntilTestEnd(mapOf("dom.forms.autocapitalize" to true))
mainSession.textInput.view = View(InstrumentationRegistry.getInstrumentation().targetContext)
mainSession.loadTestPath(INPUTS_PATH)

View File

@ -2965,12 +2965,6 @@
mirror: always
#endif
# Is support for HTMLElement.autocapitalize enabled?
- name: dom.forms.autocapitalize
type: bool
value: true
mirror: always
# Support for input type=month, type=week. By default, disabled.
- name: dom.forms.datetime.others
type: bool

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.autocapitalize:true]
prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featurePolicy.header.enabled:true, dom.security.featurePolicy.webidl.enabled:true]
[idlharness.https.html?exclude=(Document|Window|HTML.*)]
[AudioTrack interface: existence and properties of interface prototype object]
expected: FAIL

View File

@ -1,2 +0,0 @@
prefs: [dom.forms.autocapitalize:true]
[autocapitalize.html]

View File

@ -49,14 +49,11 @@ SimpleTest.waitForFocus(async () => {
{ id: "d3", autocapitalize: "sentences", desc: "input with autocapitalize=on in form" },
];
await SpecialPowers.setBoolPref("dom.forms.autocapitalize", true);
for (let test of tests) {
document.getElementById(test.id).focus();
is(SpecialPowers.DOMWindowUtils.focusedAutocapitalize, test.autocapitalize, test.desc);
}
SpecialPowers.clearUserPref("dom.forms.autocapitalize");
SimpleTest.finish();
});
</script>