Issue #2488 - Part 4: Remove the RestyleManagerHandle smart pointer class

This commit is contained in:
FranklinDM 2024-03-29 16:08:08 +08:00 committed by roytam1
commit 6803c1f710
24 changed files with 55 additions and 414 deletions

View file

@ -31,8 +31,7 @@
#include "nsDisplayList.h"
#include "nsStyleChangeList.h"
#include "nsStyleSet.h"
#include "mozilla/RestyleManagerHandle.h"
#include "mozilla/RestyleManagerHandleInlines.h"
#include "mozilla/RestyleManager.h"
#include "nsDOMMutationObserver.h"
using mozilla::TimeStamp;
@ -503,7 +502,7 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
if (collection &&
collection->mCheckGeneration ==
mPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration()) {
mPresContext->RestyleManager()->GetAnimationGeneration()) {
// When we start a new transition, we immediately post a restyle.
// If the animation generation on the collection is current, that
// means *this* is that restyle, since we bump the animation
@ -914,7 +913,7 @@ nsTransitionManager::ConsiderInitiatingTransition(
OwningElementRef(*aElement, aNewStyleContext->GetPseudoType()));
animation->SetTimelineNoUpdate(timeline);
animation->SetCreationSequence(
mPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration());
mPresContext->RestyleManager()->GetAnimationGeneration());
animation->SetEffectFromStyle(pt);
animation->PlayFromStyle();