Bug 1475316 - Rename -moz-autofill to just autofill. r=geckoview-reviewers,esawin,boris

No compat impact, as this remains an internal pseudo-class for the time
being.

Differential Revision: https://phabricator.services.mozilla.com/D99295
This commit is contained in:
Emilio Cobos Álvarez 2020-12-15 19:39:59 +00:00
Родитель b5397a3ef6
Коммит 92c6fb3495
8 изменённых файлов: 9 добавлений и 8 удалений

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

@ -80,7 +80,7 @@ class FormAutofillSection {
// not themed
[FIELD_STATES.NORMAL]: null,
// highlighted
[FIELD_STATES.AUTO_FILLED]: "-moz-autofill",
[FIELD_STATES.AUTO_FILLED]: "autofill",
// highlighted && grey color text
[FIELD_STATES.PREVIEW]: "-moz-autofill-preview",
};

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

@ -4156,7 +4156,7 @@ struct StateTableEntry {
};
static constexpr StateTableEntry kManuallyManagedStates[] = {
{"-moz-autofill", NS_EVENT_STATE_AUTOFILL},
{"autofill", NS_EVENT_STATE_AUTOFILL},
{"-moz-autofill-preview", NS_EVENT_STATE_AUTOFILL_PREVIEW},
{nullptr, EventStates()},
};

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

@ -1022,7 +1022,7 @@ input:is([type="date"], [type="time"]):is(:disabled, :read-only) {
color: GrayText;
}
input:-moz-autofill, input:-moz-autofill-preview {
input:autofill, input:-moz-autofill-preview {
filter: grayscale(21%) brightness(88%) contrast(161%) invert(10%) sepia(40%) saturate(206%);
}

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

@ -14,6 +14,7 @@ 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",
@ -30,7 +31,6 @@ 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",

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

@ -220,7 +220,7 @@ class GeckoViewAutofill {
// `responses` is an object with IDs as keys.
debug`Performing auto-fill ${Object.keys(responses)}`;
const AUTOFILL_STATE = "-moz-autofill";
const AUTOFILL_STATE = "autofill";
const winUtils = window.windowUtils;
for (const id in responses) {

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

@ -37,6 +37,7 @@ 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, _),
@ -62,7 +63,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),

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

@ -2017,6 +2017,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
{
use selectors::matching::*;
match *pseudo_class {
NonTSPseudoClass::Autofill |
NonTSPseudoClass::Defined |
NonTSPseudoClass::Focus |
NonTSPseudoClass::Enabled |
@ -2062,7 +2063,6 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
NonTSPseudoClass::MozDirAttrLTR |
NonTSPseudoClass::MozDirAttrRTL |
NonTSPseudoClass::MozDirAttrLikeAuto |
NonTSPseudoClass::MozAutofill |
NonTSPseudoClass::MozModalDialog |
NonTSPseudoClass::MozTopmostModalDialog |
NonTSPseudoClass::Active |

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

@ -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 = "-moz-autofill";
const AUTOFILL_STATE = "autofill";
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"