Closed Bug 1244848 Opened 8 years ago Closed 5 years ago

transition and animation events in subdocuments are dispatched at random order

Categories

(Core :: DOM: Animation, defect, P3)

36 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1415780

People

(Reporter: smaug, Unassigned)

Details

I don't know what the spec says about nested browsing contexts here, but having random
(based on hashtable) order for firing events on nested documents feels odd.
Should we perhaps use docshell tree order? Or even best might be document order. 
(can't recall now if we guarantee docshell order to be the same as document order.)
Priority: -- → P3

I think this might be fixed by bug 1415780. Specifically, I think the setup is now that:

  • DocumentTimelines register themselve as observers of the nsRefreshDriver based on changes to what watches them (should be predictable).
  • These observers are stored in an array.
  • They are called in the order they are stored in the array.
  • DocumentTimelines update the timing of connected animations by iterating through a linked-list (AnimationTimeline::mAnimationOrder).
  • These connected animations can then queue events via the AnimationEventDispatcher associated with the pres context for their DocumentTimeline's document.
  • The AnimationEventDispatcher will add itself to the refresh driver's array of animation event flush observers.
  • The refresh driver will iterate over the animation event flush observers in order and let them dispatch their events.
  • The AnimationEventDispatcher will do a stable sort on its events before dispatching them.

So everything should now be predictable from what I can tell.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.