gecko-dev/layout
Brian Birtles 8ab108c3be Bug 1188251 part 8 - Remove call to Animation::Tick from CheckAnimationRule; r=dholbert
We want to move the newly-introduced RequestRestyle call from FlushAnimations
to Animation::Tick. However, nsAnimationManager::CheckAnimationRule calls
Animation::Tick so this would cause us to start posting animation restyles
within a restyle.

Typically, Animations have an effect (currently there is only one type of
effect: KeyframeEffectReadOnly) and when there is any change in timing they
pass it down to their effect. However, the Animation is dependent on the
duration of the effect for determining if it is "finished" or not. As a result,
when an effect's timing changes, the owning Animation needs to know.

(The way this *should* work is that effects should tell their animation or
trigger some chain of events that causes animation's to update themselves.
However, the current implementation of effects is fairly primitive and does
not do this or even have a reference to the owning Animation. When we
implement the script API for updating the timing properties of effects we will
have to fix this but for now it is up to code in layout/style to update the
Animation when it touches the corresponding effect's timing.)

nsAnimationManager::CheckAnimationRule currently does this by calling
Animation::Tick() which ensures the Animation's finished state is updated
accordingly.

Ultimately we want to ensure that Animation::Tick is called exactly once per
frame (and at the appropriate point in that frame) so we'd like to remove this
call from CheckAnimationRule.

This patch achieves that by:

* Making Animation::SetEffect update the animation's timing - this is necessary
  for animations that are created by CheckAnimationRule and will be
  necessary when once we make Animation.effect writeable from script anyway.

* Calling Animation::SetEffect even for the case when we are updating the
  existing effect.

Another side-effect of calling Animation::Tick within
nsAnimationManager::CheckAnimationRule is that CSSAnimation::Tick queues
events. There are some tests (e.g. layout/style/test/test_animations.html) that
assume that animationstart events are dispatched immediately when new
animations are created. That will change with bug 1134163 but for now we
should maintain this existing behavior since changing this might introduce
compatibility issues that are best dealt with as a separate bug rather than
blocking this refactoring. To that end, this patch also explicitly queues
animationstart events for newly-created animations.
2015-08-17 13:59:45 +09:00
..
base Bug 1188251 part 6 - Unify FlushAnimations and FlushTransitions; r=dholbert 2015-08-17 13:59:44 +09:00
build Merge m-c to inbound, a=merge 2015-08-06 18:11:16 -07:00
doc Bug 1148833 part 3 - Remove nsIFrame::WillReflow and add a non-virtual MarkInReflow method instead that sets NS_FRAME_IN_REFLOW. Call it at the start of Reflow(). r=roc 2015-03-29 22:38:40 +00:00
forms Bug 1179451 - Part 1: Rewrite some ternary operators as if/else. r=froydnj 2015-08-13 15:22:48 +03:00
generic Bug 1181130 - Part 3: Keep track of editable descendants per node and prevent NS_STYLE_USER_SELECT_ALL selection for nodes with editable descendants. r=bz 2015-08-14 10:52:38 -07:00
inspector Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan 2015-08-04 16:17:36 -07:00
ipc Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
mathml Bug 1187673 - Reset CSS spacing properties on the <math> element. r=jkitch 2015-07-26 02:02:00 +02:00
media Bug 1178215 - update update.py for new libvpx r=rillian 2015-06-29 23:06:04 +02:00
printing Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan 2015-08-04 16:17:36 -07:00
reftests Bug 1146002 - Increase fuzzy-if(Android) max-difference for box-sizing-replaced-003 to match box-sizing-replaced-002 to fix frequent intermittent failure. No review. 2015-08-16 23:12:43 +02:00
style Bug 1188251 part 8 - Remove call to Animation::Tick from CheckAnimationRule; r=dholbert 2015-08-17 13:59:45 +09:00
svg Bug 1149542 - Part 3: Crashtest. r=dholbert 2015-08-08 11:40:04 +10:00
tables Bug 1183896. Don't assume that relatively positioned table cells actually have positioned offsets computed, because in the case of position:sticky they don't. r=dholbert 2015-07-16 17:53:52 -04:00
tools Bug 1175606 - Disable tracking protection for reftests;r=philor 2015-08-08 23:16:27 -07:00
xul Bug 1194493 - Ensure the 'mVertical' flag is set appropriately on the nsFontMetrics we use to draw text for an nsTextBoxFrame. r=smontagu 2015-08-16 15:09:08 +01:00
moz.build Bug 1156111 patch 1 - Give layout/reftests/ its own moz.build file. r=gps 2015-04-20 23:10:40 -07:00