Add a MediaShutdownManager and have that as the only xpcom-shutdown
observer. This then shutsdown the MediaDecoders, and blocks waiting for
the media state machine's shared thread to complete shutdown before
exiting from the xpcom-shutdown observer. This ensures that the
MediaDecoder infrastructure does not use XPCOM on any thread after XPCOM
has shutdown, which is a logical error.
Forgot an include in the ImageLayerD3D9.cpp file (though I am unable to
reproduce the issue on my own windows installation).
Also seems in my previous attempt to fix the build, I introduced a
breakage for Android. Hopefully this will fix things.
When an invalid dur, min, max, or repeatDur is set we were failing to call
UpdateCurrentInterval to update the timing model. This patch makes sure we
update the current interval in error cases too.
Mochitests test the interval is being updated in these cases and, for
completeness, the case of repeatCount as well.
The min attribute on an animation element can extend the active duration making
it longer than the "repeat duration" (the amount of the time the animation runs
including all repeats). For the remaining time after the repeat duration has
completed until the end of the active duration the animation should apply its
fill behavior.
Previously this was not implemented and min could not extend the active
duration. Allowing this effectively introduces an additional kind of state where
we are both within the active interval but not animating. In this case we
set the animation function (referred to as the "client" for historical reasons)
to inactive so that effectively the timing model is active but the animation
model is inactive.
(In the future we will come up with something a little easier to understand when
we rework this in terms of Web Animations components.)
In order to implement the min attribute properly we need to distinguish between
cases where the repeat duration is less than the active duration so we can apply
the fill mode in the 'gap'. Currently the repeat duration calculation is mostly
contained in GetRepeatDuration (but is hard to make sense of) and partly
contained in the call site CalcActiveEnd. Furthermore, it does not have thorough
tests (there were some unit tests but they were never converted to mochitests).
This patch reworks the repeat duration calculation so it is contained in one
place, easier to read, and thoroughly tested.