Bug 938334 - Use PseudoElementSupportsStyleAttribute(Type) when it makes sense to do so and remove now unnecessary nsCSSPseudoElements functions. r=dbaron

This commit is contained in:
Arnaud Bienner 2013-12-02 22:38:45 +01:00
parent 04546e289c
commit 89b6530bc5
2 changed files with 2 additions and 10 deletions

View File

@ -2386,8 +2386,8 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf, nsRestyleHint aRestyleHint)
nsCSSPseudoElements::ePseudo_PseudoElementCount,
"Unexpected pseudo type");
Element* pseudoElement =
nsCSSPseudoElements::PseudoElementSupportsStyleAttribute(pseudoTag) ||
nsCSSPseudoElements::PseudoElementSupportsUserActionState(pseudoTag) ?
nsCSSPseudoElements::PseudoElementSupportsStyleAttribute(pseudoType) ||
nsCSSPseudoElements::PseudoElementSupportsUserActionState(pseudoType) ?
aSelf->GetContent()->AsElement() : nullptr;
MOZ_ASSERT(element != pseudoElement);
newContext = styleSet->ResolvePseudoElementStyle(element,

View File

@ -78,19 +78,11 @@ public:
return PseudoElementHasFlags(aType, CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS);
}
static bool PseudoElementSupportsStyleAttribute(nsIAtom *aAtom) {
return PseudoElementHasFlags(GetPseudoType(aAtom), CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE);
}
static bool PseudoElementSupportsStyleAttribute(const Type aType) {
MOZ_ASSERT(aType < ePseudo_PseudoElementCount);
return PseudoElementHasFlags(aType, CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE);
}
static bool PseudoElementSupportsUserActionState(nsIAtom *aAtom) {
return PseudoElementSupportsUserActionState(GetPseudoType(aAtom));
}
static bool PseudoElementSupportsUserActionState(const Type aType);
static bool PseudoElementIsChromeOnly(const Type aType) {