mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1171817 part 16 - Always cancel transitions before removing them; r=dbaron
Earlier in this patch series we added an assertion to the destructor for CSSAnimation and CSSTransition to check that the owning element has been cleared when the animation is destroyed. This assertion fails, however, for transitions because there are a two code paths where a transition may be destroyed without being cancelled. This patch adjusts those two code paths to ensure transitions are always cancelled before being destroyed.
This commit is contained in:
parent
7d4395728f
commit
c4f8b27475
@ -406,9 +406,9 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
|
||||
currentValue != segment.mToValue) {
|
||||
// stop the transition
|
||||
if (!anim->GetEffect()->IsFinishedTransition()) {
|
||||
anim->CancelFromStyle();
|
||||
collection->UpdateAnimationGeneration(mPresContext);
|
||||
}
|
||||
anim->CancelFromStyle();
|
||||
animations.RemoveElementAt(i);
|
||||
}
|
||||
} while (i != 0);
|
||||
@ -721,6 +721,7 @@ nsTransitionManager::PruneCompletedTransitions(mozilla::dom::Element* aElement,
|
||||
if (!ExtractComputedValueForTransition(prop.mProperty, aNewStyleContext,
|
||||
currentValue) ||
|
||||
currentValue != segment.mToValue) {
|
||||
anim->CancelFromStyle();
|
||||
animations.RemoveElementAt(i);
|
||||
}
|
||||
} while (i != 0);
|
||||
|
Loading…
Reference in New Issue
Block a user