mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 922669 - Part 2: Use a different operator to represent the element -> pseudo-element relationship in selectors. r=bz
This commit is contained in:
parent
1e5c47e48c
commit
a57586d9a6
@ -550,7 +550,7 @@ nsCSSSelector::ToString(nsAString& aString, nsCSSStyleSheet* aSheet,
|
||||
const nsCSSSelector *next = stack.ElementAt(index - 1);
|
||||
PRUnichar oper = s->mOperator;
|
||||
if (next->IsPseudoElement()) {
|
||||
NS_ASSERTION(oper == PRUnichar('>'),
|
||||
NS_ASSERTION(oper == PRUnichar(':'),
|
||||
"improperly chained pseudo element");
|
||||
} else {
|
||||
NS_ASSERTION(oper != PRUnichar(0),
|
||||
|
@ -4218,12 +4218,12 @@ CSSParserImpl::ParseSelector(nsCSSSelectorList* aList,
|
||||
&pseudoElementType);
|
||||
if (pseudoElement &&
|
||||
pseudoElementType != nsCSSPseudoElements::ePseudo_AnonBox) {
|
||||
// Pseudo-elements other than anonymous boxes are represented as
|
||||
// direct children ('>' combinator) of the rest of the selector.
|
||||
// Pseudo-elements other than anonymous boxes are represented with
|
||||
// a special ':' combinator.
|
||||
|
||||
aList->mWeight += selector->CalcWeight();
|
||||
|
||||
selector = aList->AddSelector('>');
|
||||
selector = aList->AddSelector(':');
|
||||
|
||||
selector->mLowercaseTag.swap(pseudoElement);
|
||||
selector->mClassList = pseudoElementArgs.forget();
|
||||
|
@ -2990,7 +2990,7 @@ AddRule(RuleSelectorPair* aRuleInfo, RuleCascadeData* aCascade)
|
||||
}
|
||||
NS_ASSERTION(aRuleInfo->mSelector->mNext,
|
||||
"Must have mNext; parser screwed up");
|
||||
NS_ASSERTION(aRuleInfo->mSelector->mNext->mOperator == '>',
|
||||
NS_ASSERTION(aRuleInfo->mSelector->mNext->mOperator == ':',
|
||||
"Unexpected mNext combinator");
|
||||
aRuleInfo->mSelector = aRuleInfo->mSelector->mNext;
|
||||
ruleHash->AppendRule(*aRuleInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user