Bug 1966677 - Also remove unused SUPPORTS_STYLE_ATTRIBUTE flag. r=firefox-style-system-reviewers,layout-reviewers,boris

Pseudo-elements are internal nodes. If we set the style attribute we
always honor it now.

Differential Revision: https://phabricator.services.mozilla.com/D249598
This commit is contained in:
Emilio Cobos Álvarez
2025-05-15 16:07:49 +00:00
committed by ealvarez@mozilla.com
parent 76c874e126
commit cbd46c3767
2 changed files with 1 additions and 12 deletions

View File

@@ -37,8 +37,7 @@ CSS_PSEUDO_ELEMENT(marker, ":marker", 0)
CSS_PSEUDO_ELEMENT(backdrop, ":backdrop", 0)
CSS_PSEUDO_ELEMENT(cue, ":cue", CSS_PSEUDO_ELEMENT_IS_JS_CREATED_NAC |
CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE)
CSS_PSEUDO_ELEMENT(cue, ":cue", CSS_PSEUDO_ELEMENT_IS_JS_CREATED_NAC)
CSS_PSEUDO_ELEMENT(firstLetter, ":first-letter", CSS_PSEUDO_ELEMENT_IS_CSS2)
CSS_PSEUDO_ELEMENT(firstLine, ":first-line", CSS_PSEUDO_ELEMENT_IS_CSS2)
@@ -93,7 +92,6 @@ CSS_PSEUDO_ELEMENT(mozMeterBar, ":-moz-meter-bar",
CSS_PSEUDO_ELEMENT(placeholder, ":placeholder",
CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE)
CSS_PSEUDO_ELEMENT(mozColorSwatch, ":-moz-color-swatch",
CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE |
CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE)
// The root of the text value anonymous content inside an <input> or <textarea>.
CSS_PSEUDO_ELEMENT(mozTextControlEditingRoot, ":-moz-text-control-editing-root",

View File

@@ -21,9 +21,6 @@
//
// Note: We also rely on this for IsEagerlyCascadedInServo.
#define CSS_PSEUDO_ELEMENT_IS_CSS2 (1 << 0)
// Flag to add the ability to take into account style attribute set for the
// pseudo element (by default it's ignored).
#define CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE (1 << 2)
// Flag that indicate the pseudo-element supports a user action pseudo-class
// following it, such as :active or :hover. This would normally correspond
// to whether the pseudo-element is tree-like, but we don't support these
@@ -84,12 +81,6 @@ class nsCSSPseudoElements {
// This only ever returns static atoms, so it's fine to return a raw pointer.
static nsAtom* GetPseudoAtom(Type aType);
static bool PseudoElementSupportsStyleAttribute(const Type aType) {
MOZ_ASSERT(aType < Type::CSSPseudoElementsEnd);
return PseudoElementHasFlags(aType,
CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE);
}
static bool PseudoElementSupportsUserActionState(const Type aType);
static bool PseudoElementIsJSCreatedNAC(Type aType) {