Граф коммитов

435506 Коммитов

Автор SHA1 Сообщение Дата
Brian Birtles 0cf13fbef2 Bug 1188251 part 3 - Add AnimationCollection::RequestRestyle; r=dholbert
Ultimately we want to move throttling logic to AnimationCollection and
Animation::Tick (and later to KeyframeEffect::SetParentTime). This is so that
we can support script-generated animations without having to introduce yet
another manager.

To that end this patch introduces a method on AnimationCollection that can be
called from Animation::Tick to perform the necessary notifications needed to
update style.

Later in this patch series we will extend RequestRestyle to incorporate more of
the throttling logic and further extend it to cover some of the other
notifications such as updating layers.

This patch tracks whether or not we have already posted a restyle for animation
to avoid making redundant calls. Calls to nsIDocument::SetNeedStyleFlush are
cheap and more difficult to detect when they have completed so we don't filter
redundant calls in the Restyle::Throttled case.

If mHasPendingAnimationRestyle is set and AnimationCommon::EnsureStyleRuleFor
is *never* called then we could arrive at situation where we fail to make post
further restyles for animation.

I have verified that if we fail to reset mHasPendingAnimationRestyle at the
appropriate point (e.g. resetting it at the end of EnsureStyleRuleFor *after*
the early-returns) then a number of existing tests fail.

Furthermore, I have observed that it is reset by the beginning of each tick
in almost every case except for a few instances of browser mochitests such as
browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js.
In this case, during the async cleanup of the test, we have an opacity
transition on a vbox element that becomes display:none and appears to be skipped
during restyling. However, even in this case, EnsureStyleRuleFor is called
within one or at most two ticks and mHasPendingAnimationRestyle flag is cleared
(i.e. it does not get stuck).
2015-08-17 13:59:44 +09:00
Brian Birtles b71ee27f2f Bug 1188251 part 2 - Check if a tick can be throttled in FlushAnimations using Animation::CanThrottle; r=dholbert
In FlushTransitions and FlushAnimations we use different mechanisms to see if a
transition/animation can be throttled on the current tick.

FlushTransitions calls Animation::CanThrottle whilst FlushAnimations calls
EnsureStyleRuleFor and checks if the rule has changed or not. These are not as
completely different as they might seem at first since, internally,
EnsureStyleRuleFor calls Animation::CanThrottle.

We would like to unify this behavior and simply use Animation::CanThrottle in
FlushAnimations as we do in FlushTransitions.

First, however, we have to account for the differences in these approaches:

1. Using the result of EnsureStyleRuleFor means we may *not* call
   PostRestyleForAnimation if an animation collection's mNeedsRefreshes member
   is false.

   This member is false when all animations have finished (or there are no
   animations in the collection). In this case EnsureStyleRuleFor will not
   update the style rule and we will end up assuming the tick can be throttled.
   *However*, in the case that all animations are finished
   Animation::CanThrottle will *also* return true (technically it will return
   false until we compose style for the first time after becoming finished but
   beyond that one moment it will return true) so skipping this check by using
   Animation::CanThrottle instead of EnsureStyleRuleFor should not
   make a significant difference.

2. Using the result of EnsureStyleRuleFor will mean that if we have already
   updated the style rule within a given tick we will avoid calling
   PostRestyleForAnimation (and call SetNeedStyleFlush instead). This can
   happen the first time we call FlushAnimations from
   PresShell::FlushPendingNotifications. (When we call FlushAnimations from
   nsAnimationManager::WillRefresh mStyleRuleRefreshTime will be stale and we
   won't apply this optimization. Furthermore after the first call to
   PresShell::FlushPendingNotifications we will typically skip calling
   FlushAnimations since PresShell::StyleUpdateForAllAnimationsIsUpToDate will
   typically return true).

   This seems like a possibly useful optimization although it is surprising we
   don't do the same for transitions. Note that this optimization applies
   regardless of whether we are performing a throttleable flush or not. That is,
   even if we pass CommonAnimationManager::Cannot_Throttle we will still end up
   throttling the tick in this case. Furthermore, we will mark the document as
   needing a style flush even though this does not appear to be necessary.

   This patch copies this optimization (checking if mStyleRuleRefreshTime) to
   FlushAnimations so we can maintain this behavior when calling
   Animation::CanThrottle instead of EnsureStyleRuleFor. It also applies the
   same behavior to FlushTransitions for consistency (and so we can later
   combine FlushAnimations and FlushTransitions).

   Note that we apply this optimization *before* calling Tick since it should
   only apply once we have already Tick'ed the animations in the collection.
   We will first hit FlushAnimations as a result of the refresh driver calling
   nsAnimationManager/nsTransitionManager::WillRefresh at which point
   mStyleRuleRefreshTime should be stale. Using this order not only saves
   redundant work but also makes moving the restyle code to Animation later on
   more straightforward.

   (In future we will divorce WillRefresh and FlushAnimations and only call
   Tick in WillRefresh and only perform this optimization FlushAnimations.)

3. Using the result of EnsureStyleRuleFor means that while checking if we can
   throttle or not we also update the style rule in FlushAnimations. That seems
   like an odd side-effect particularly since FlushTransitions doesn't do the
   same thing.
2015-08-17 13:59:44 +09:00
Brian Birtles ab1cd7b690 Bug 1188251 part 1 - Remove transitions cleanup from FlushTransitions; r=dholbert
There is no longer anything in FlushTransitions that modifies the set of
transitions. I believe this changed as of bug 960465, specifically changeset
https://hg.mozilla.org/mozilla-central/rev/b2ee72589c18, so that this code is
no longer needed.

By removing this we can further align FlushAnimations and FlushTransitions.
2015-08-17 13:59:44 +09:00
Jean-Yves Avenard 12c9711fb9 Bug 1190970: [MSE] P1. Enable WebM by default on platforms not supporting h264/aac. r=cpeterson 2015-08-17 13:47:49 +10:00
Karl Tomlinson 5a2faaf647 bug 1191889 skip Close() when not initialized r=roc
--HG--
extra : rebase_source : ea7a6c4d6a74e15cf699fb49c8bf2b4c9b757cc6
2015-08-17 10:07:50 +12:00
Karl Tomlinson c5e3e52551 bug 962719 remove unnecessary OneIteration() parameters aFrom/aTo r=padenot
--HG--
extra : rebase_source : 7ad313275ef00a0306c8b3b4775f0088f07c9031
2015-08-04 19:42:10 +12:00
Karl Tomlinson c2379131a8 bug 962719 remove notified blocked warning of finished stream r=padenot
Finished can be determined immediately after mFinished is set, but blocked is
not determined until RecomputeBlocking() has run.

--HG--
extra : rebase_source : e1d919bfbd411b928c25d1f0d428842e17f6fbf8
2015-07-31 22:49:55 +12:00
Karl Tomlinson fb9954a77c bug 962719 update stream state to processed time after processing r=padenot
Notifications are now up to date with processing, and
MediaStream::GetCurrentTime() now returns "the main-thread's view of how much
data has been processed by this stream", as documented.

--HG--
extra : rebase_source : 90eb894f7b5e7cf56c3635e68716fd2514494f7e
2015-07-29 19:32:10 +12:00
Karl Tomlinson 3ff62a58db bug 962719 provide video frames to the container as soon as available r=roc
This does not affect the target time of the video frames, but may mean that more
frames are displayed.

--HG--
extra : rebase_source : f804f2f58ce5ce2668e047f83adf614d9043f3a2
2015-08-14 14:16:57 +12:00
Karl Tomlinson 257b2b6cc9 bug 1194558 correct time conversion for video frame timestamps r=roc
MediaTimeToSeconds() works fine for negative intervals

--HG--
extra : rebase_source : 8698761e28a54e6bd172a032c62e03b96ac66bfa
2015-08-13 17:07:49 +12:00
Karl Tomlinson 47185cd76f bug 962719 provide frame ID service to clients r=roc
--HG--
extra : rebase_source : 5ae68f8a06da21faf35b8d2f3817dfee857e64cc
2015-08-07 11:37:08 +12:00
Karl Tomlinson 3cf03deb5f bug 962719 make FindChunkContaining() public r=roc
--HG--
extra : rebase_source : cf882ddbe1058f487734ea43f953a726747e54d5
2015-08-04 10:42:31 +12:00
Karl Tomlinson 33732bace9 bug 962719 introduce mProcessedTime r=padenot
--HG--
extra : rebase_source : 4521e5c46d99ea6e97aed4d796211ce42820299e
2015-07-31 21:28:29 +12:00
Karl Tomlinson 6de7f1f2d4 bug 962719 update NextFrameStatus() on finished notification r=roc
This provides HAVE_CURRENT_DATA readyState.

--HG--
extra : rebase_source : d18abe878bc97b6165474f58ef550d1936fe2494
2015-08-04 17:43:46 +12:00
Karl Tomlinson 3976b00d63 bug 962719 ensure state computed time does not retreat r=padenot
--HG--
extra : rebase_source : 7acc6c71ef585813a3d80ee954fe208d7c1ef469
2015-08-04 19:54:54 +12:00
Karl Tomlinson d894983b78 bug 962719 remove unnecessary OneIteration() parameter aStateFrom r=padenot
--HG--
extra : rebase_source : 22d67be26f4cface092cf13577035473b18b2b93
2015-07-31 17:39:35 +12:00
Karl Tomlinson 78739ed9f6 bug 962719 move mStateComputedTime to MediaStreamGraphImpl r=padenot
--HG--
extra : rebase_source : 3c4727a6397cc77800aa2676b17c3d85702cd64f
2015-08-13 16:23:17 +12:00
Karl Tomlinson ea84d39947 bug 962719 use unsigned ints for FrameID and ProducerID for defined overflow behavior r=roc
--HG--
extra : rebase_source : 0375f04a60a548975547b80e60e5cf5dada2f86f
2015-08-12 11:02:41 +12:00
Karl Tomlinson 795135daf2 test for bug 1191648
--HG--
extra : rebase_source : 3588805b7e34ac76ed6422c6703c25d1fcc220bc
2015-08-11 13:37:20 +12:00
Jean-Yves Avenard 3f43144aaf Bug 1195071: Check for MediaDataDecoder::Input error. r=cpearce 2015-08-17 10:28:43 +10:00
Jean-Yves Avenard 186b001e2e Bug 1194708: Properly find SPS NAL in some H264 streams. r=kentuckyfriedtakahe
With some encoding, we didn't detect the SPS. With AVC3 stream it would cause playback to never start on mac or linux (ffmpeg)
2015-08-17 10:28:37 +10:00
Nathan Froyd 66f69ee222 Backout d4cd6c8c9ced (bug 1194985) for gtest orange 2015-08-17 03:58:44 -04:00
JW Wang c912b2b38c Bug 1191696. Part 2 - implementation in DecodedStream. r=roc. 2015-08-17 07:52:42 +08:00
JW Wang 64e94fc75e Bug 1191696. Part 1 - Handle the promise returned by DecodedStream::StartPlayback in MDSM. r=roc. 2015-08-17 07:52:28 +08:00
L. David Baron a58048f446 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
Nathan Froyd 82e25c816b Bug 1194985 - avoid shift overflows in devtools gtests; r=fitzgen
clang complains about shifting quantities beyond the width of their
type, since that is undefined behavior.  Let's fix the problematic
occurrences by adding some casts prior to shifting.
2015-08-15 16:04:56 -04:00
Daniel Holbert 08e005cdec Bug 1195123: Restructure logic (pulling out "!") for SVG image rejection, to make it clearer that it matches the comment. r=longsonr 2015-08-16 13:37:56 -07:00
Chris Peterson c98b4c65b1 Bug 1194951 - Suppress warnings in third-party code: pocketsphinx and sphinxbase. r=kdavis 2015-08-10 23:01:25 -07:00
Chris Peterson 6d9eccfa13 Bug 1194580 - Mark dom/push as FAIL_ON_WARNINGS. r=nsm 2015-08-13 20:35:31 -07:00
Jonathan Kew 054796730b 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
Jean-Yves Avenard b181248915 Bug 1194612: P3. Remove redundant member. r=alfredo 2015-08-16 19:34:03 +10:00
Jean-Yves Avenard 40f0b287b4 Bug 1194612: P2. Don't drop first sample with SPS/PPS NALs. r=alfredo
It would cause the Apple VT decoder to fail decoding the frame, aborting playback
2015-08-16 19:01:52 +10:00
Jean-Yves Avenard b619f8c2e7 Bug 1194612: P1. Dont reject init promise when initialising H264Converter. r=alfredo
A decoder isn't created until a SPS and PPS NALs have been detected in the stream. The decoder will be initialised instead lazily later during the input process.
2015-08-16 19:01:44 +10:00
Sebastian Hengst 486cee1a15 Backed out 4 changesets (bug 1194612) for test bustages. r=backout on a CLOSED TREE
Backed out changeset dde632bce46c (bug 1194612)
Backed out changeset e6d2cb05222a (bug 1194612)
Backed out changeset a2f27d383087 (bug 1194612)
Backed out changeset f9a0ce79b27e (bug 1194612)
2015-08-16 09:09:13 +02:00
Jean-Yves Avenard 685e1fe427 Bug 1194884: [webm] P2. Retrieve all VPX decoded frames from decoder. r=j^ 2015-08-16 11:58:41 +10:00
Jean-Yves Avenard 466c5f2646 Bug 1194884: [webm] P1. Use MediaResourceIndex. r=j^
Remove duplicated code.
2015-08-16 11:58:40 +10:00
Jean-Yves Avenard 6c3d638077 Bug 1194612: P4. Remove redundant member. r=alfredo 2015-08-16 11:07:01 +10:00
Jean-Yves Avenard d4baf5f7bf Bug 1194612: P3. Ensure H264Converter is thread safe. r=alfredo 2015-08-16 11:07:00 +10:00
Jean-Yves Avenard bd505942da Bug 1194612: P2. Don't drop first sample with SPS/PPS NALs. r=alfredo
It would cause the Apple VT decoder to fail decoding the frame, aborting playback
2015-08-16 11:06:58 +10:00
Jean-Yves Avenard ae21948ec7 Bug 1194612: P1. Dont reject init promise when initialising H264Converter. r=alfredo
A decoder isn't created until a SPS and PPS NALs have been detected in the stream. The decoder will be initialised instead lazily later during the input process.
2015-08-16 11:06:58 +10:00
Till Schneidereit fbbf268d1d Bug 1195030 - Backout of bug 890329 for breaking email reading in gmail. r=bustage
--HG--
extra : rebase_source : 7eddefe81f7e920713759c6302363c4caca1f366
2015-08-15 23:58:24 +02:00
Jan de Mooij d05c21f140 Bug 1194627 - Change group when sweeping preliminary objects to avoid leaking their slots. r=bhackett 2015-08-15 19:27:16 +02:00
Phil Ringnalda cbbd80b4ee Back out 6 changesets (bug 1186424) for ASan mochitest-1 leaks
Backed out changeset 4612c09141ae (bug 1186424)
Backed out changeset 94c7d36f29ba (bug 1186424)
Backed out changeset bdeb7135e541 (bug 1186424)
Backed out changeset e41895c02c0b (bug 1186424)
Backed out changeset 65b067184f10 (bug 1186424)
Backed out changeset ddc3a4689c88 (bug 1186424)
2015-08-15 09:21:19 -07:00
Kartikaya Gupta 36f86db358 Bug 1191277 - Ensure that we don't find clusters of clickable elements when there is no possible way for the heuristic to actually target those elements. r=domivinc
--HG--
extra : commitid : BcmblW2Avbd
2015-08-15 11:15:29 -04:00
Benjamin Bouvier cfc2c061bb Bug 1186424: Move compilation data into ModuleCompileResults and have MV finish module's compilation; r=luke
--HG--
extra : commitid : JH8Br5204Jo
extra : rebase_source : 64e5379eab4a8b6720aa0116a8db7d9a7b425ddc
extra : histedit_source : 4ae76a129b8dc1ae860821c60cd2f4be13682452%2C8514e76c661993a8ad17228f741e4774e06a52d0
2015-08-15 14:41:43 +02:00
Benjamin Bouvier 7716d9ce87 Bug 1186424: Embed AsmFunction into ModuleGlobals::Func; r=luke
--HG--
extra : commitid : 8pziKzT0fgR
extra : rebase_source : 55ccdd955d352364cfc37c69e5df74b1a881c3a5
extra : histedit_source : 6e893df69e7117bdbaa187dbadac37bc22d46535
2015-07-30 15:09:59 +02:00
Benjamin Bouvier fda942b26f Bug 1186424: Take ModuleCompiler out of CheckFunction(); r=luke
--HG--
extra : commitid : LDDPjZHibd3
extra : rebase_source : e32f7a848dd3eefebbd2f72a18761768cf32f0a4
extra : histedit_source : 9aa5b1b0c0f9a3effda6cb1b38d9d07ff43665b8
2015-07-29 14:33:17 +02:00
Benjamin Bouvier d6b41e5c48 Bug 1186424: Make ModuleCompiler standalone; r=luke
--HG--
extra : commitid : KQ8y3ZI6CZT
extra : rebase_source : 4202d823d7c139fa7ba4484823f2688958d2f635
extra : histedit_source : c3d7e2265500c72ddd3918a5c1281503d51a8a6f
2015-07-30 12:58:05 +02:00
Benjamin Bouvier 1a8fde5b33 Bug 1186424: Split ModuleCompiler into ModuleCompiler/ModuleValidator; r=luke
--HG--
extra : commitid : FkZUJqy5yHm
extra : rebase_source : edb2ac16d534e1ecadcfc983dee75b7767f687f5
extra : histedit_source : e678c6456ae3606f51016a7883b207bbaad1ccb8
2015-07-27 16:25:23 +02:00
Benjamin Bouvier d5b73da3ad Bug 1186424: Encode all global value's information directly in the IR; r=luke
--HG--
extra : commitid : FVqLWySOCai
extra : rebase_source : 7a587a6a175157a3d4ec9b4489dd7a3b2f42fb9d
2015-07-27 14:04:47 +02:00