diff --git a/mobile/android/app/geckoview-prefs.js b/mobile/android/app/geckoview-prefs.js index 8da10fea4aeb..f46fa8a80739 100644 --- a/mobile/android/app/geckoview-prefs.js +++ b/mobile/android/app/geckoview-prefs.js @@ -399,9 +399,6 @@ pref("signon.firefoxRelay.feature", "not available"); pref("signon.showAutoCompleteFooter", true); -// Delegate autocomplete to GeckoView (bug 1618058) -pref("toolkit.autocomplete.delegate", true); - // Locked because any other value would break GeckoView pref("toolkit.defaultChromeURI", "chrome://geckoview/content/geckoview.xhtml", locked); diff --git a/toolkit/actors/AutoCompleteParent.sys.mjs b/toolkit/actors/AutoCompleteParent.sys.mjs index 43c437769662..4dd0292d364d 100644 --- a/toolkit/actors/AutoCompleteParent.sys.mjs +++ b/toolkit/actors/AutoCompleteParent.sys.mjs @@ -2,17 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; +import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs"; const lazy = {}; -XPCOMUtils.defineLazyPreferenceGetter( - lazy, - "DELEGATE_AUTOCOMPLETE", - "toolkit.autocomplete.delegate", - false -); - ChromeUtils.defineESModuleGetters(lazy, { GeckoViewAutocomplete: "resource://gre/modules/GeckoViewAutocomplete.sys.mjs", setTimeout: "resource://gre/modules/Timer.sys.mjs", @@ -378,7 +371,7 @@ export class AutoCompleteParent extends JSWindowActorParent { if ( !browser || - (!lazy.DELEGATE_AUTOCOMPLETE && !browser.autoCompletePopup) + (!AppConstants.MOZ_GECKOVIEW && !browser.autoCompletePopup) ) { // If there is no browser or popup, just make sure that the popup has been closed. if (this.openedPopup) { @@ -414,7 +407,7 @@ export class AutoCompleteParent extends JSWindowActorParent { case "AutoComplete:MaybeOpenPopup": { let { results, rect, dir, inputElementIdentifier, formOrigin } = message.data; - if (lazy.DELEGATE_AUTOCOMPLETE) { + if (AppConstants.MOZ_GECKOVIEW) { lazy.GeckoViewAutocomplete.delegateSelection({ browsingContext: this.browsingContext, options: results, @@ -439,7 +432,7 @@ export class AutoCompleteParent extends JSWindowActorParent { } case "AutoComplete:ClosePopup": { - if (lazy.DELEGATE_AUTOCOMPLETE) { + if (AppConstants.MOZ_GECKOVIEW) { lazy.GeckoViewAutocomplete.delegateDismiss(); break; } diff --git a/toolkit/components/formautofill/FormAutofillChild.sys.mjs b/toolkit/components/formautofill/FormAutofillChild.sys.mjs index ef4be1714e94..cba43b0fe98f 100644 --- a/toolkit/components/formautofill/FormAutofillChild.sys.mjs +++ b/toolkit/components/formautofill/FormAutofillChild.sys.mjs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs"; const lazy = {}; @@ -26,13 +25,6 @@ ChromeUtils.defineESModuleGetters(lazy, { FORM_SUBMISSION_REASON: "resource://gre/actors/FormHandlerChild.sys.mjs", }); -XPCOMUtils.defineLazyPreferenceGetter( - lazy, - "DELEGATE_AUTOCOMPLETE", - "toolkit.autocomplete.delegate", - false -); - /** * Handles content's interactions for the frame. */ @@ -413,7 +405,7 @@ export class FormAutofillChild extends JSWindowActorChild { } if ( - lazy.DELEGATE_AUTOCOMPLETE || + AppConstants.MOZ_GECKOVIEW || !lazy.FormAutofillContent.savedFieldNames ) { this.debug("onFocusIn: savedFieldNames are not known yet");