diff --git a/browser/extensions/formautofill/FormAutofillHandler.jsm b/browser/extensions/formautofill/FormAutofillHandler.jsm index 0bf6dfa4962d..70b549d30672 100644 --- a/browser/extensions/formautofill/FormAutofillHandler.jsm +++ b/browser/extensions/formautofill/FormAutofillHandler.jsm @@ -80,7 +80,7 @@ class FormAutofillSection { // not themed [FIELD_STATES.NORMAL]: null, // highlighted - [FIELD_STATES.AUTO_FILLED]: "autofill", + [FIELD_STATES.AUTO_FILLED]: "-moz-autofill", // highlighted && grey color text [FIELD_STATES.PREVIEW]: "-moz-autofill-preview", }; diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index 262c334deb2c..ba1e420e9b5f 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -4156,7 +4156,7 @@ struct StateTableEntry { }; static constexpr StateTableEntry kManuallyManagedStates[] = { - {"autofill", NS_EVENT_STATE_AUTOFILL}, + {"-moz-autofill", NS_EVENT_STATE_AUTOFILL}, {"-moz-autofill-preview", NS_EVENT_STATE_AUTOFILL_PREVIEW}, {nullptr, EventStates()}, }; diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index 1839aa68948f..8a1f09a4a31d 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -1022,7 +1022,7 @@ input:is([type="date"], [type="time"]):is(:disabled, :read-only) { color: GrayText; } -input:autofill, input:-moz-autofill-preview { +input:-moz-autofill, input:-moz-autofill-preview { filter: grayscale(21%) brightness(88%) contrast(161%) invert(10%) sepia(40%) saturate(206%); } diff --git a/layout/style/test/test_non_content_accessible_pseudos.html b/layout/style/test/test_non_content_accessible_pseudos.html index 8d1cb709f0ad..fe0842730950 100644 --- a/layout/style/test/test_non_content_accessible_pseudos.html +++ b/layout/style/test/test_non_content_accessible_pseudos.html @@ -14,7 +14,6 @@ const NON_CONTENT_ACCESIBLE_PSEUDOS = [ "::-moz-number-spin-box", "::-moz-search-clear-button", - ":autofill", ":-moz-native-anonymous", ":-moz-use-shadow-tree-root", ":-moz-table-border-nonzero", @@ -31,6 +30,7 @@ const NON_CONTENT_ACCESIBLE_PSEUDOS = [ ":-moz-dir-attr-ltr", ":-moz-dir-attr-rtl", ":-moz-dir-attr-like-auto", + ":-moz-autofill", ":-moz-autofill-preview", "::-moz-tree-row", diff --git a/mobile/android/modules/geckoview/GeckoViewAutofill.jsm b/mobile/android/modules/geckoview/GeckoViewAutofill.jsm index ee8f3d25edd5..ac6f1e8a01d0 100644 --- a/mobile/android/modules/geckoview/GeckoViewAutofill.jsm +++ b/mobile/android/modules/geckoview/GeckoViewAutofill.jsm @@ -220,7 +220,7 @@ class GeckoViewAutofill { // `responses` is an object with IDs as keys. debug`Performing auto-fill ${Object.keys(responses)}`; - const AUTOFILL_STATE = "autofill"; + const AUTOFILL_STATE = "-moz-autofill"; const winUtils = window.windowUtils; for (const id in responses) { diff --git a/servo/components/style/gecko/non_ts_pseudo_class_list.rs b/servo/components/style/gecko/non_ts_pseudo_class_list.rs index d927e886bc77..d1e49036d902 100644 --- a/servo/components/style/gecko/non_ts_pseudo_class_list.rs +++ b/servo/components/style/gecko/non_ts_pseudo_class_list.rs @@ -37,7 +37,6 @@ macro_rules! apply_non_ts_list { ("any-link", AnyLink, IN_VISITED_OR_UNVISITED_STATE, _), ("visited", Visited, IN_VISITED_STATE, _), ("active", Active, IN_ACTIVE_STATE, _), - ("autofill", Autofill, IN_AUTOFILL_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), ("checked", Checked, IN_CHECKED_STATE, _), ("defined", Defined, IN_DEFINED_STATE, _), ("disabled", Disabled, IN_DISABLED_STATE, _), @@ -63,7 +62,7 @@ macro_rules! apply_non_ts_list { ("-moz-dir-attr-ltr", MozDirAttrLTR, IN_HAS_DIR_ATTR_LTR_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), ("-moz-dir-attr-rtl", MozDirAttrRTL, IN_HAS_DIR_ATTR_RTL_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), ("-moz-dir-attr-like-auto", MozDirAttrLikeAuto, IN_HAS_DIR_ATTR_LIKE_AUTO_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), - + ("-moz-autofill", MozAutofill, IN_AUTOFILL_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), ("-moz-autofill-preview", MozAutofillPreview, IN_AUTOFILL_PREVIEW_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), ("-moz-handler-clicktoplay", MozHandlerClickToPlay, IN_HANDLER_CLICK_TO_PLAY_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), diff --git a/servo/components/style/gecko/wrapper.rs b/servo/components/style/gecko/wrapper.rs index 0e0486133a91..4773bd89997d 100644 --- a/servo/components/style/gecko/wrapper.rs +++ b/servo/components/style/gecko/wrapper.rs @@ -2017,7 +2017,6 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { { use selectors::matching::*; match *pseudo_class { - NonTSPseudoClass::Autofill | NonTSPseudoClass::Defined | NonTSPseudoClass::Focus | NonTSPseudoClass::Enabled | @@ -2063,6 +2062,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { NonTSPseudoClass::MozDirAttrLTR | NonTSPseudoClass::MozDirAttrRTL | NonTSPseudoClass::MozDirAttrLikeAuto | + NonTSPseudoClass::MozAutofill | NonTSPseudoClass::MozModalDialog | NonTSPseudoClass::MozTopmostModalDialog | NonTSPseudoClass::Active | diff --git a/toolkit/components/passwordmgr/LoginManagerChild.jsm b/toolkit/components/passwordmgr/LoginManagerChild.jsm index 4159f7802eda..49852844906e 100644 --- a/toolkit/components/passwordmgr/LoginManagerChild.jsm +++ b/toolkit/components/passwordmgr/LoginManagerChild.jsm @@ -18,7 +18,7 @@ const PASSWORD_INPUT_ADDED_COALESCING_THRESHOLD_MS = 1; // popup from a focus event in ms. This matches the threshold in // toolkit/components/satchel/nsFormFillController.cpp const AUTOCOMPLETE_AFTER_RIGHT_CLICK_THRESHOLD_MS = 400; -const AUTOFILL_STATE = "autofill"; +const AUTOFILL_STATE = "-moz-autofill"; const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm"