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

@ -2030,11 +2030,8 @@ CounterStyleManager::BuildCounterStyle(const nsSubstring& aName)
// but the user-defined names case-sensitive.
// XXXheycam ServoStyleSets do not support custom counter styles yet.
StyleSetHandle styleSet = mPresContext->StyleSet();
NS_ASSERTION(styleSet->IsGecko(),
"stylo: ServoStyleSets do not support custom counter "
"styles yet");
nsCSSCounterStyleRule* rule = styleSet->IsGecko() ?
styleSet->AsGecko()->CounterStyleRuleForName(aName) : nullptr;
nsCSSCounterStyleRule* rule =
styleSet->AsGecko()->CounterStyleRuleForName(aName);
if (rule) {
data = new (mPresContext) CustomCounterStyle(aName, this, rule);
} else {
@ -2076,11 +2073,8 @@ CounterStyleManager::NotifyRuleChanged()
bool toBeRemoved = false;
// XXXheycam ServoStyleSets do not support custom counter styles yet.
StyleSetHandle styleSet = mPresContext->StyleSet();
NS_ASSERTION(styleSet->IsGecko(),
"stylo: ServoStyleSets do not support custom counter "
"styles yet");
nsCSSCounterStyleRule* newRule = styleSet->IsGecko() ?
styleSet->AsGecko()->CounterStyleRuleForName(iter.Key()) : nullptr;
nsCSSCounterStyleRule* newRule =
styleSet->AsGecko()->CounterStyleRuleForName(iter.Key());
if (!newRule) {
if (style->IsCustomStyle()) {
toBeRemoved = true;