mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
4b55f7e56f
This is so that when we have code like: elem.animate({ opacity: 0 }, 1000) the resulting Animation object is kept alive by |elem| based on the following ownership chain: elem --(strong)--> KeyframeEffectReadOnly --(strong)--> Animation Now, there is an ownership cycle introduced here because KeyframeEffectReadOnly objects also store owning references to their target elements. This is broken when the Animation finishes (if it does not fill forwards) or is cancelled since either event will trigger a call to KeyframeEffectReadOnly::UpdateTargetRegistration. If the Animation fills forwards, the resource will not be released until it is cancelled. For Animations corresponding to CSS Animations / CSS Transitions this happens when the Element is unbound or when the corresponding style property is updated causing the animation to be replaced or removed. For the general case of script-generated animations, however, this cycle won't be broken until the Element is unbound and all external references to the Animation or KeyframeEffectReadOnly are dropped. It's unfortunate that we can't more aggressively prune these objects but it's what the spec currently says. I've posted to the mailing list[1] about this but have yet to find a good solution. [1] https://lists.w3.org/Archives/Public/public-fx/2015OctDec/0029.html |
||
---|---|---|
.. | ||
test | ||
Animation.cpp | ||
Animation.h | ||
AnimationComparator.h | ||
AnimationEffectReadOnly.cpp | ||
AnimationEffectReadOnly.h | ||
AnimationTimeline.cpp | ||
AnimationTimeline.h | ||
AnimationUtils.h | ||
ComputedTimingFunction.cpp | ||
ComputedTimingFunction.h | ||
DocumentTimeline.cpp | ||
DocumentTimeline.h | ||
EffectSet.cpp | ||
EffectSet.h | ||
KeyframeEffect.cpp | ||
KeyframeEffect.h | ||
moz.build | ||
PendingAnimationTracker.cpp | ||
PendingAnimationTracker.h |