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

@ -525,9 +525,6 @@ ResolvedStyleCache::Get(nsPresContext *aPresContext,
nsCOMArray<nsIStyleRule> rules;
rules.AppendObject(aKeyframeDeclaration);
MOZ_ASSERT(aPresContext->StyleSet()->IsGecko(),
"ServoStyleSet should not use nsAnimationManager for "
"animations");
RefPtr<nsStyleContext> resultStrong = aPresContext->StyleSet()->AsGecko()->
ResolveStyleByAddingRules(aParentStyleContext, rules);
mCache.Put(aKeyframeDeclaration, resultStrong);
@ -1055,9 +1052,6 @@ CSSAnimationBuilder::GetComputedValue(nsPresContext* aPresContext,
StyleAnimationValue computedValue;
if (!mStyleWithoutAnimation) {
MOZ_ASSERT(aPresContext->StyleSet()->IsGecko(),
"ServoStyleSet should not use nsAnimationManager for "
"animations");
mStyleWithoutAnimation = aPresContext->StyleSet()->AsGecko()->
ResolveStyleWithoutAnimation(mTarget, mStyleContext,
eRestyle_AllHintsWithAnimations);
@ -1101,9 +1095,6 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext,
// "none" which is represented by an empty name in the StyleAnimation.
// Since such animations neither affect style nor dispatch events, we do
// not generate a corresponding CSSAnimation for them.
MOZ_ASSERT(mPresContext->StyleSet()->IsGecko(),
"ServoStyleSet should not use nsAnimationManager for "
"animations");
nsCSSKeyframesRule* rule =
src.GetName().IsEmpty()
? nullptr