gecko/dom/animation
Brian Birtles 4b55f7e56f Bug 1225699 part 6 - Use strong refs to store effects on their target elements; r=smaug
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
2015-11-26 16:53:54 +09:00
..
test Bug 1226193 - Fix test_animation_observers.html timing out on Fennec with C++APZ enabled. r=heycam 2015-11-19 23:06:43 -05:00
Animation.cpp Bug 1225699 part 3 - Register and unregister effects with elements; r=smaug, r=heycam 2015-11-26 16:53:53 +09:00
Animation.h Bug 1223255 - Use Animation::AnimationTimeToTimeStamp instead of timeline->ToTimeStamp. r=bbirtles 2015-11-18 01:50:00 +01:00
AnimationComparator.h Bug 1171817 part 14 - Add AnimationPtrComparator class; r=dbaron 2015-06-09 11:13:54 +09:00
AnimationEffectReadOnly.cpp
AnimationEffectReadOnly.h Bug 1108055 - Part 1: Add ComputedTimingProperties dictionary. r=smaug 2015-10-13 22:17:00 +02:00
AnimationTimeline.cpp Bug 1223445 - KeyframeEffectReadOnly objects end up keeping lots of other objects alive too long, r=birtles 2015-11-16 19:44:55 +02:00
AnimationTimeline.h Bug 1223445 - KeyframeEffectReadOnly objects end up keeping lots of other objects alive too long, r=birtles 2015-11-16 19:44:55 +02:00
AnimationUtils.h
ComputedTimingFunction.cpp Bug 1208940 - Move ComputedTimingFunction to its own file. r=bbirtles 2015-11-01 22:41:00 +01:00
ComputedTimingFunction.h Bug 1208940 - Move ComputedTimingFunction to its own file. r=bbirtles 2015-11-01 22:41:00 +01:00
DocumentTimeline.cpp Bug 1223445 - KeyframeEffectReadOnly objects end up keeping lots of other objects alive too long, r=birtles 2015-11-16 19:44:55 +02:00
DocumentTimeline.h Bug 1209519 - Undef GetCurrentTime in DocumentTimeline.h to fix --disable-accessibility bustage. r=birtles 2015-09-29 10:04:30 -04:00
EffectSet.cpp Bug 1225699 part 6 - Use strong refs to store effects on their target elements; r=smaug 2015-11-26 16:53:54 +09:00
EffectSet.h Bug 1225699 part 6 - Use strong refs to store effects on their target elements; r=smaug 2015-11-26 16:53:54 +09:00
KeyframeEffect.cpp Bug 1225699 part 6 - Use strong refs to store effects on their target elements; r=smaug 2015-11-26 16:53:54 +09:00
KeyframeEffect.h Bug 1225699 part 6 - Use strong refs to store effects on their target elements; r=smaug 2015-11-26 16:53:54 +09:00
moz.build Bug 1225699 part 1 - Add EffectSet class; r=smaug 2015-11-26 16:53:53 +09:00
PendingAnimationTracker.cpp Bug 1182981 part 1 - Use nsTHashtable::Iterator in PendingAnimationTracker; r=njn 2015-07-21 10:47:13 +09:00
PendingAnimationTracker.h