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
Родитель d1761aed79
Коммит 06e3f83e31
7 изменённых файлов: 2 добавлений и 16 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -1218,8 +1218,6 @@ class TextInputDelegateTest : BaseSessionTest() {
// no way to set autocapitalize on designmode. // no way to set autocapitalize on designmode.
assumeThat("Not in designmode", id, not(equalTo("#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.textInput.view = View(InstrumentationRegistry.getInstrumentation().targetContext)
mainSession.loadTestPath(INPUTS_PATH) mainSession.loadTestPath(INPUTS_PATH)

Просмотреть файл

@ -2965,12 +2965,6 @@
mirror: always mirror: always
#endif #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. # Support for input type=month, type=week. By default, disabled.
- name: dom.forms.datetime.others - name: dom.forms.datetime.others
type: bool type: bool

Просмотреть файл

@ -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.*)] [idlharness.https.html?exclude=(Document|Window|HTML.*)]
[AudioTrack interface: existence and properties of interface prototype object] [AudioTrack interface: existence and properties of interface prototype object]
expected: FAIL expected: FAIL

Просмотреть файл

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

Просмотреть файл

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