Issue #2112 - Part 5: Remove Servo from forwarding code used by magic pointer classes

This commit is contained in:
FranklinDM 2024-03-25 02:02:08 +08:00 committed by roytam1
commit a93a7bed47
52 changed files with 274 additions and 1116 deletions

View file

@ -523,11 +523,6 @@ nsComputedDOMStyle::GetStyleContextForElementNoFlush(Element* aElement,
}
if (aStyleType == eDefaultOnly) {
if (styleSet->IsServo()) {
NS_ERROR("stylo: ServoStyleSets cannot supply UA-only styles yet");
return nullptr;
}
// We really only want the user and UA rules. Filter out the other ones.
nsTArray< nsCOMPtr<nsIStyleRule> > rules;
for (nsRuleNode* ruleNode = sc->RuleNode();
@ -653,10 +648,7 @@ MustReresolveStyle(const nsStyleContext* aContext)
MOZ_ASSERT(aContext);
if (aContext->HasPseudoElementData()) {
if (!aContext->GetPseudo() ||
aContext->StyleSource().IsServoComputedValues()) {
// TODO(emilio): When ::first-line is supported in Servo, we may want to
// fix this to avoid re-resolving pseudo-element styles.
if (!aContext->GetPseudo()) {
return true;
}