Commit Graph

393208 Commits

Author SHA1 Message Date
Brian Birtles
aa575c832b Bug 1081007 - Fix relationship between Play/PlayFromJS/PlayFromStyle etc.; r=dholbert
The existing relationship between the particular versions of
AnimationPlayer::Play* (particularly in the CSSAnimationPlayer) subclass are
confusing because, for example, CSSAnimationPlayer::PlayFromStyle needs to be
careful to *not* call Play on CSSAnimationPlayer, but only on the parent
object (since otherwise we reset the sticky pause behavior).

This patch reworks this relationship by adding a protected DoPlay method that
performs the common pausing behavior. Play/PlayFromJS/PlayFromStyle then add
flushing, sticky pausing etc. as necessary.

This patch also removes the UpdateFlags enum and parameters previously used to
control whether we forced an update to style. This is no longer necessary since
we no longer call 'Play' from style. Instead we make Play always post restyles.

If we come across a case where we want to call Play and *not* post restyles, we
can re-add the flags then.

Roughly the same arrangement is true for Pause except that we don't currently
flush styles for CSS animations in PauseFromJS since it currently won't make any
observable difference.
2014-11-17 13:46:01 +09:00
Brian Birtles
18c294458c Bug 1073336 part 16 - Factor out animation-layer related information to a common database; r=dbaron 2014-11-17 13:46:00 +09:00
Brian Birtles
48893c4454 Bug 1073336 part 15 - Switch AnimationPlayer to using less aggressive update mechanism; r=dbaron 2014-11-17 13:46:00 +09:00
Brian Birtles
50564d30cb Bug 1073336 part 14c - Check for a null style refresh time in AnimationPlayerCollection::CanThrottleTransformChanges; r=dbaron
We often set mStyleRuleRefreshTime to null to ensure styles get updated.
However, CanThrottleTransformChanges doesn't check for this case and blindly
does subtraction using this value.

Until now we've got away with this but now that we set mStyleRuleRefreshTime to
null when making changes via the API this case crops up in different
circumstances and we can trip over it.

This patch simply adds a null check before using mStyleRuleRefreshTime in
CanThrottleTransformChanges. All other cases where we operate on
mStyleRuleRefreshTime check for null.
2014-11-17 13:46:00 +09:00
Brian Birtles
d5678b7ad6 Bug 1073336 part 14b - Make ElementRestyler detect changes to the animation generation; r=dbaron
For some kinds of changes we need to update the layer tree even though there is
no change to style. For example, if an animation is paused via the Web
Animations API, we need to remove the animation from the layer even though the
style will not change.

This patch detects such changes by making ElementRestyler check for an
out-of-date animation generation on layers. This is complicated by the fact that
we currently maintain *two* animation generation numbers: one for the set of
animations and one for the set of transitions, but we only have *one* animation
generation number on each layer. This is a known issue (bug 847286).

As a result, until bug 847286 is fixed, we need to be careful to compare against
the greater of the two numbers.
2014-11-17 13:46:00 +09:00
Brian Birtles
dc417c2fec Bug 1073336 part 14a - Update animation generation when changing animations via the API; r=dbaron 2014-11-17 13:45:59 +09:00
Brian Birtles
49dee50d8c Bug 1073336 part 13 - Add AnimationPlayer::PostUpdate; r=dbaron
Adds a method for notifying the collection of changes to one of its players.
2014-11-17 13:45:59 +09:00
Brian Birtles
d855c6692f Bug 1073336 part 12 - Add AnimationPlayer::GetCollection(); r=dbaron
This patch adds a method to animation players that looks up the
AnimationPlayerCollection to which the player belongs.
2014-11-17 13:45:59 +09:00
Brian Birtles
9acbbb6122 Bug 1073336 part 11 - Move GetAnimationPlayers to base CommonAnimationManager class; r=dbaron
nsAnimationManager provides GetAnimationPlayers while nsTransitionManager
provides GetElementTransitions. Both perform the same function, namely, fetching
(and optionally creating if it does not exist) the AnimationPlayerCollection for
the specified element/pseudo. Furthermore, both take the same arguments.

This patch aligns the method names and makes this a virtual method on the base
class CommonAnimationManager so that it can be used generically from a pointer
to a CommonAnimationManager.
2014-11-17 13:45:59 +09:00
Brian Birtles
bb9a6c6bf6 Bug 1073336 part 10 - Add AnimationPlayer::GetAnimationManager(); r=dbaron
This patch introduces an abstract method to AnimationPlayer to fetch the manager
object associated with the player. This method is implemented separate by
CSSAnimationPlayer and CSSTransitionPlayer to return the nsAnimationManager or
nsTransitionManager accordingly.
2014-11-17 13:45:58 +09:00
Brian Birtles
9f8acdf64c Bug 1073336 part 9 - Add protected AnimationPlayer::GetPresContext(); r=dbaron
This patch adds a further getter to find the pres context associated with an
animation player's target element, if any.
2014-11-17 13:45:58 +09:00
Brian Birtles
dc613405f6 Bug 1073336 part 8 - Add protected AnimationPlayer::GetRenderedDocument(); r=dbaron
In order for AnimationPlayer objects to be able to notify their
collection/manager, the can either store an extra pointer member, or they can
navigate to the collection as follows:

  player->source(animation)->target(element)->document
    ->presShell->presContext->manager->collection

This patch adds a getter for the first part of this journey up to the document.
2014-11-17 13:45:58 +09:00
Brian Birtles
9efcdfde21 Bug 1073336 part 7 - Move style flushing to CSSAnimationPlayer and CSSTransitionPlayer; r=dbaron
Previously AnimationPlayer::Play() and AnimationPlayer::PlayState() would flush
styles as part of their operation. This, however, is only needed when the player
corresponds to a CSS Animation or CSS Transition. Now that we have concrete
subclasses for each of these cases we can move style flushing to the subclasses
and remove it from the base class (which is expected to be shared with
animations that are not dependent on style).
2014-11-17 13:45:58 +09:00
Brian Birtles
5f35f63800 Bug 1073336 part 6 - Add CSSTransitionPlayer; r=dbaron
In order to be able to find the collection a player belongs to from its source
content, we first need to be able to determine which manager--the animation
manager or transition manager--to look up.

We eventually plan to push transition event dispatch down to a CSS
transitions-specific subclass of AnimationPlayer, so this seems like a suitable
point to introduce this class.

Using this subclass we can define a virtual GetManager method that will
return the appropriate animation/transition manager for the player.
2014-11-17 13:45:57 +09:00
Brian Birtles
371d30ed6a Bug 1073336 part 5 - Add AnimationPlayerCollection::PlayerUpdated; r=dbaron 2014-11-17 13:45:57 +09:00
Brian Birtles
e8b261ac02 Bug 1073336 part 4 - Add CommonAnimationManager::CollectionUpdated; r=dbaron
Adds a method to the animation manager base class to handle changes to one of
its associated collections.
2014-11-17 13:45:57 +09:00
Brian Birtles
b8775a0cfa Bug 1073336 part 3b - Add nsPresContext::ClearLastStyleUpdateForAllAnimations; r=dbaron 2014-11-17 13:45:57 +09:00
Brian Birtles
862f1e6d3b Bug 1073336 part 3a - Allow TimeStamp == and != operators to work with null timestamps; r=froydnj 2014-11-17 13:45:56 +09:00
Brian Birtles
3ba1306512 Bug 1073336 part 2 - Call CheckNeedsRefresh from within EnsureStyleRuleFor; r=dbaron
Now that CheckNeedsRefresh is a member of the base class,
CommonAnimationManager, we no longer need to rely on callers of
AnimationPlayerCollection::EnsureStyleRuleFor to remember to call this method
but can do it automatically.
2014-11-17 13:45:56 +09:00
Brian Birtles
6435d45744 Bug 1073336 part 1 - Move CheckNeedsRefreshes to CommonAnimationManager; r=dbaron
In order to add AnimationPlayerCollection::NotifyPlayerUpdated, collections
need a way of updating their managers to inform them that their mNeedsRefreshes
flag has changed and hence the manager may need to resume observing the refresh
driver.

Currently, only nsAnimationManager makes use of mNeedsRefreshes and provides
a CheckNeedsRefresh method. In order to allow AnimationPlayerCollection to
operate independently of the type of manager it is attached to (and because
there's a lot of similar code here that we eventually want to move to a common
manager anyway), this patch moves CheckNeedsRefreshes and associated
machinery to CommonAnimationManager.
2014-11-17 13:45:56 +09:00
Phil Ringnalda
5cdbb8940e Backed out 2 changesets (bug 1084183) for b2g crashes
Backed out changeset a7e75614e955 (bug 1084183)
Backed out changeset af96c149900b (bug 1084183)
2014-11-16 20:21:55 -08:00
Dan Glastonbury
89a0a8b4f6 Bug 1002281 - Change WebGLBindableName to make mGLName const. r=jgilbert
Split the two functions into two classes. WebGLRenderBuffer and
WebGLVertexArray are special cases.

--HG--
extra : source : 547e328ef878882bce8df3fc1b1e28926d910f1d
2014-11-17 12:21:04 +10:00
Matt Woodrow
88baefe614 Bug 1100176 - Avoiding infinite loops when encountering a sidx box. r=ajones
--HG--
extra : rebase_source : 6f957d02ef1fb02a5ec446761e64e69b5922641c
2014-11-17 15:31:25 +13:00
Matt Woodrow
5ea0d1c4e2 Bug 1098990 - Correctly parse version 1 trun segments where the composition time is signed. r=ajones
--HG--
extra : rebase_source : 4e7103f8a9bcd47a481c6db89366a09d033d1920
2014-11-17 15:30:02 +13:00
Christoph Kerschbaumer
d4653cf831 Bug 1067517: Update triggeringPrincipal and loadingDoc for contentPolicy check and in the loadInfo (r=sicking) 2014-11-16 17:36:44 -08:00
Brian Hackett
4b75bdf2e6 Bug 1096016 - Fix post barrier insertion for MStoreUnboxedObjectOrNull, r=nmatsakis. 2014-11-16 17:10:24 -07:00
Xidorn Quan
7f8acfe395 Bug 1084183 - Test for text-decoration for ruby frames. r=dbaron 2014-11-17 10:26:45 +11:00
Xidorn Quan
06a84fbe4a Bug 1084183 - Propagate text decoration to ruby frames. r=dbaron 2014-11-17 10:26:39 +11:00
Jonathan Watt
cd03927dbc Bug 1094063 follow-up - Remove yet more fuzzing from reftests that don't need it any more. 2014-11-13 15:11:42 +00:00
Jonathan Watt
82831ccc12 Bug 1097438 - Restore the use of AntialiasMode::NONE in nsCSSBorderRenderer::DrawBorders(). r=roc 2014-11-12 02:56:12 +00:00
Boris Zbarsky
9ee334fef9 Bug 1081241. Things that aren't exposed in Window shouldn't show up in RegisterBindings at all. r=smaug 2014-11-16 15:01:32 -05:00
Boris Zbarsky
b32a7b90f2 Bug 1098739. Add a BufferSource typedef in our IDL. r=khuey 2014-11-16 15:01:08 -05:00
Bas Schouten
f58f8f8040 Bug 1099335: Base decision to use a complex clip on whether a DT supports regoin clipping. r=jrmuizel
DrawTargets that support region clipping are able to clip to regions effectively. Other DrawTargets go through expensive complex clip paths. When invalidating regions we have code that draws in multiple steps when using Direct2D to avoid this expense, we should base the decision to do this simply on whether the DrawTarget supports fast region clipping.
2014-11-16 19:17:40 +00:00
Sotaro Ikeda
148067068a Bug 1085655 - Improve TabChild::InitRenderingState() r=bent 2014-11-16 10:23:22 -08:00
Jan Beich
7c94bec4c4 Bug 1098607 - Unbreak build BSDs and Solaris after bug 1072093. r=kats 2014-11-16 18:38:31 +01:00
Dan Gohman
85b76e243d Bug 1099466 - IonMonkey: Spew the line and column for blocks in IONFLAGS=codegen r=luke 2014-11-15 07:00:37 -08:00
Phil Ringnalda
b1544015f4 Merge m-c to m-i 2014-11-15 15:41:15 -08:00
Jonathan Kew
0e4e955616 Backout changesets fad675db4598 and 618d8f44d9e2 (bug 1090168 pt 1 and 2) for Nightly crashiness. a=backout 2014-11-15 22:40:00 +00:00
Phil Ringnalda
f9a2419494 Merge b-i to m-c, a=merge 2014-11-15 15:16:34 -08:00
Phil Ringnalda
4535eceab2 Merge f-t to m-c, a=merge 2014-11-15 14:54:36 -08:00
Gregory Szorc
17920b30c8 Merge inbound to m-c; a=merge
--HG--
extra : amend_source : 2e89bf359e356566aee6b04bb864979539e1c90d
2014-11-15 13:57:08 -08:00
B2G Bumper Bot
f9ef31db91 Bumping manifests a=b2g-bump 2014-11-15 09:48:03 -08:00
ffxbld
d2233af98c No bug, Automated blocklist update from host b-linux64-ix-0011 - a=blocklist-update 2014-11-15 03:21:24 -08:00
ffxbld
4bccbd33d3 No bug, Automated HPKP preload list update from host b-linux64-ix-0011 - a=hpkp-update 2014-11-15 03:21:19 -08:00
ffxbld
1ffd463d9d No bug, Automated HSTS preload list update from host b-linux64-ix-0011 - a=hsts-update 2014-11-15 03:21:16 -08:00
B2G Bumper Bot
0618323144 Bumping manifests a=b2g-bump 2014-11-14 21:07:18 -08:00
B2G Bumper Bot
178c358450 Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
========

https://hg.mozilla.org/integration/gaia-central/rev/eba399d3ba97
Author: Min-Zhong "John" Lu <jlu@mozilla.com>
Desc: Merge pull request #26132 from mnjul/bug_1098955_remove_inputwindow_getdpx

Bug 1098955 - Remove InputWindow._getDpx(); use Object.defineProperty to mock window.devicePixelRatio. r=timdream

========

https://hg.mozilla.org/integration/gaia-central/rev/494be473cbc2
Author: John Lu [:mnjul] <jlu@mozilla.com>
Desc: Bug 1098955 - Remove InputWindow._getDpx(); use Object.defineProperty to mock window.devicePixelRatio
2014-11-14 21:00:52 -08:00
Seth Fowler
c6907e0f94 Bug 1098108 (Part 5) - Check consistency whenever progress changes in ProgressTracker. r=tn 2014-11-14 20:10:48 -08:00
Seth Fowler
d54f7c61aa Bug 1098108 (Part 4) - Make resniffed multipart requests progress like normal requests. r=tn 2014-11-14 20:10:48 -08:00
Seth Fowler
06b4ef5f00 Bug 1098108 (Part 3) - Record REQUEST* notifications for imgTools decodes. r=tn 2014-11-14 20:10:48 -08:00