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

@ -676,15 +676,10 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot)
// and not only those whose current style involves CSS transitions,
// because what matters is whether the new style (not the old)
// specifies CSS transitions.
if (presContext->RestyleManager()->IsGecko()) {
// stylo: ServoRestyleManager does not handle transitions yet, and when
// it does it probably won't need to track reframed style contexts to
// initiate transitions correctly.
RestyleManager::ReframingStyleContexts* rsc =
presContext->RestyleManager()->AsGecko()->GetReframingStyleContexts();
if (rsc) {
rsc->Put(mContent, mStyleContext);
}
RestyleManager::ReframingStyleContexts* rsc =
presContext->RestyleManager()->AsGecko()->GetReframingStyleContexts();
if (rsc) {
rsc->Put(mContent, mStyleContext);
}
}
@ -692,15 +687,11 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot)
EffectSet::GetEffectSet(this)) {
// If no new frame for this element is created by the end of the
// restyling process, stop animations and transitions for this frame
if (presContext->RestyleManager()->IsGecko()) {
RestyleManager::AnimationsWithDestroyedFrame* adf =
presContext->RestyleManager()->AsGecko()->GetAnimationsWithDestroyedFrame();
// AnimationsWithDestroyedFrame only lives during the restyling process.
if (adf) {
adf->Put(mContent, mStyleContext);
}
} else {
NS_ERROR("stylo: ServoRestyleManager does not support animations yet");
RestyleManager::AnimationsWithDestroyedFrame* adf =
presContext->RestyleManager()->AsGecko()->GetAnimationsWithDestroyedFrame();
// AnimationsWithDestroyedFrame only lives during the restyling process.
if (adf) {
adf->Put(mContent, mStyleContext);
}
}