Commit Graph

4574 Commits

Author SHA1 Message Date
Seth Fowler
8272e602b4 Bug 1098202 (Part 1) - Rename imgINotificationObserver handlers to be consistent with the notifications they handle. r=tn
--HG--
extra : rebase_source : 991d277afba4826ed403b74bbcbb9408b3dac0cc
2014-11-17 14:29:56 -08:00
Seth Fowler
9fdcdbbc7e Bug 1098652 - ImageLoader::OnStopFrame should be called when we get FRAME_COMPLETE, not LOAD_COMPLETE. r=tn
--HG--
extra : rebase_source : 5ab4ec002657890d615cbd6aa23da98ce8ade1d1
2014-11-17 14:29:56 -08:00
L. David Baron
7348f9ea5a Bug 1087536 patch 3 - Use new no-selector-matching hints for animation restyles. r=birtles
This depends on bug 1086937 patch 1 because it requires that
ResolveStyleWithReplacement support eRestyle_ChangeAnimationPhase on
::before and ::after pseudo-elements.

It also depends on patch 1 of this bug for the reasons described in
patch 1's commit message.

This is needed for bug 960465 so that we can use these hints to detect
whether pending restyles include restyles other than those for
animations.  In other words, patches for bug 960465 (or perhaps a
dependent bug that lands before it) will require that all animation
restyles use an animation-specific nsRestyleHint.

It is also, on its own, a performance improvement for animations and
transitions, since we will stop rerunning selector matching on the
animating element during the progress of the animations or transitions.
Once we remove eRestyle_ChangeAnimationPhase the performance improvement
will even become slightly better.

Note that the eRestyle_ChangeAnimationPhase is needed in some cases
because we use PostRestyleForAnimation in the non-animation-restyle
phase when we have a style rule that we need to add during the animation
restyle phase.  (It's not needed during the progress of the animation,
though.  But hopefully both eRestyle_ChangeAnimationPhase will go away
soon, after bug 960465.  And hopefully the way we tick animations will
also change to look more like the animation-only restyle, but without
the main-thread-suppressed (throttled) animations.)
2014-11-17 11:39:14 -08:00
L. David Baron
45e5ce14aa Bug 1087536 patch 2 - Assert when nsStyleSet::RuleNodeWithReplacement finds the rules in an incorrect order. r=birtles
I confirmed that this assertion fires (along with the other failures)
when running layout/style/test/test_transitions_events.html with patch 3
but not patch 1.
2014-11-17 11:39:14 -08:00
L. David Baron
79ff09761b Bug 1087536 patch 1 - Record the transition manager's cover rule as in the eTransitionSheet level of the cascade so that ResolveStyleWithReplacement replaces it correctly. r=birtles
Without this patch, patch 3 will cause bugs where we'll never remove the
cover rule we create during the process of starting a transition.  This
won't actually be problematic during the transition, since the
transition will overwrite it, but once the transition completes, the
cover rule will still be around, and we'll be stuck with the
pre-transition value instead of the post-transition value.

It's possible it also fixes existing bugs prior to the patch series in
this bug.
2014-11-17 11:39:14 -08:00
Brian Birtles
85688c0d50 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
2f81a1905a 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
b873dee10d 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
d208f5d64f 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
05bcd90baf 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
3b5c4f0d9d 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
e3a6d8668d 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
2213cff252 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
b07eebee5b Bug 1073336 part 5 - Add AnimationPlayerCollection::PlayerUpdated; r=dbaron 2014-11-17 13:45:57 +09:00
Brian Birtles
d9b4e0e02f 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
baef709a86 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
89f4908fb5 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
8e167728ed 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
Xidorn Quan
79dba04000 Bug 1084183 - Propagate text decoration to ruby frames. r=dbaron 2014-11-17 10:26:39 +11:00
Daniel Holbert
da820542cf Bug 624647 part 2: Honor "object-fit" & "object-position" in nsImageFrame, nsSubDocumentFrame, & nsVideoFrame. r=roc 2014-11-14 16:45:24 -08:00
Daniel Holbert
6c33817dd5 Bug 624647 part 0: Don't use ASSUME_DRAWING_RESTRICTED_TO_CONTENT_RECT flag if 'object-fit' and/or 'object-position' might make our drawing overflow. r=roc 2014-11-14 16:45:23 -08:00
Cameron McCormack
a954ec858b Bug 1089463 - Clear an element's restyle bits when inserting into a shadow tree. r=bzbarsky 2014-11-15 09:08:21 +11:00
Christoph Kerschbaumer
a9d3ae9136 Bug 1083422 - Add triggering Principal to nsILoadInfo - update callsites (r=bz,sicking) 2014-11-14 08:56:55 -08:00
Brian Marshall
5d639a0edf Bug 783213 - Part 3: Tests. r=dbaron 2014-11-10 21:50:12 -08:00
Brian Marshall
5e4a1f9247 Bug 783213 - Part 2: Don't apply the quirk to selectors that use a pseudo-element or are part of a pseudo-class argument. r=dbaron 2014-11-13 21:37:42 -08:00
Brian Marshall
9ca3173fa9 Bug 783213 - Part 1: Only apply the :active and :hover quirk to links, and not when the selector uses other pseudo-classes. r=dbaron 2014-11-08 17:16:39 -08:00
Carsten "Tomcat" Book
a1c255441d merge fx-team to mozilla-central a=merge 2014-11-14 13:13:42 +01:00
Gregory Szorc
4ae6bb6448 Bug 1098135 - Convert some rules to misc tier; r=glandium
--HG--
extra : rebase_source : 1a486bf0ff2e5b3be637f3725cd04b6073e074b8
2014-11-13 19:30:21 -08:00
Morris Tseng
ca0f216c74 Bug 1096169 - Handle selection carets overlapping case. r=roc 2014-11-12 23:03:00 -05:00
Daniel Holbert
ef419fe57d Bug 1098558: Remove unused constant NS_STYLE_DIRECTION_INHERIT. r=smontagu 2014-11-13 15:50:39 -08:00
Cameron McCormack
a08ed57e69 Bug 1096808 - Reload ua.css when ruby pref changes. r=bzbarsky 2014-11-14 09:11:20 +11:00
Cameron McCormack
6f9094eb37 Bug 1068477 - Add pref callback to style sheet cache to handle UA style sheet reloads. r=bzbarsky 2014-11-14 09:11:19 +11:00
Jonathan Kew
ecfeb14da7 Bug 1093165 - Include the text-orientation value in WritingMode, and add the IsSideways flag for baseline decisions. r=smontagu 2014-11-13 08:58:04 +00:00
L. David Baron
4120161816 Bug 1086937 patch 3 - Add test for animations continuing across a user font set update. r=birtles
I confirmed that without patch 2, the third and fourth tests fail
(reporting -1000px), whereas with the patches all 4 tests pass.
2014-11-12 23:28:52 -08:00
L. David Baron
a8e8f8637b Bug 1086937 patch 1 - Add eRestyle_ChangeAnimationPhaseDescendants restyle hint that is like eRestyle_ChangeAnimationPhase, but for a whole subtree. r=birtles 2014-11-12 23:28:52 -08:00
Daniel Holbert
edade3ea6b Bug 1097488: Honor 'object-fit' & 'object-position' in UA stylesheets even if they're preffed off, and remove no-longer-necessary @supports guard. r=heycam 2014-11-11 22:49:15 -08:00
Karl Tomlinson
e04362ca98 backout bug 1096132 for Mac build failure
--HG--
extra : rebase_source : 6994fe50e8fb1a4f89298e1b9ad1c714acdfe39e
2014-11-12 16:02:34 +13:00
Karl Tomlinson
1085e66407 bug 1096132 rename UnscaledAppUnitsPerDevPixel() to AppUnitsPerDevPixelAtUnitFullZoom() r=tn
--HG--
extra : rebase_source : 113b249f2cb6f1619e0b1a495655726b5100038b
2014-11-08 17:48:14 +13:00
L. David Baron
3771d286c3 Bug 1087541 - Make RuleNodeWithReplacement handle animations and transitions like RulesMatching codepath does. r=birtles
I originally wrote this to see if it would fix bug 1086937, but it
didn't.

Note that this conflicts a bit with the patch in bug 1085769; whoever
lands second will have some merging (though it shouldn't be difficult).

The updating of the style rule is needed as part of the animation-only
style update, but it shouldn't be in the general restyling code, so it
has moved there.
2014-11-11 15:42:57 -08:00
Daniel Holbert
2c707f2d53 Bug 1041075 followup: Request even-longer timeout for test_value_storage.html. r=dbaron 2014-11-11 08:46:49 -08:00
Cameron McCormack
5e52aa2468 Bug 1092570 - Avoid exposing FontFace(Set) constructors when the Font Loading API pref is not set. r=bzbarsky 2014-11-11 14:53:55 +11:00
Seth Fowler
bc3fd9cc71 Bug 969406 - Make ImageLoader force painting on FRAME_COMPLETE but not FRAME_CHANGED. r=mattwoodrow 2014-11-07 15:40:12 -08:00
John Daggett
2bf063af98 Bug 475891 - support unicode-range when matching userfonts (non-linux). r=jfkthame 2014-11-06 13:42:50 +09:00
Daniel Holbert
6ef5776e05 Bug 1094360: Move nsRuleNode::ComputeTextData's chunk for 'mControlCharacterVisibility' down, to match the style struct's member-var ordering. r=roc 2014-11-05 16:08:30 -08:00
Xidorn Quan
c3cb8e27e9 Bug 1094460 - Reorder KTables in nsCSSProps. r=dholbert
--HG--
extra : rebase_source : ccd2b7160158737c2c5fc0434eae5f2efeea428c
2014-11-06 10:14:49 +11:00
Chris Lord
6162d0f241 Bug 974125 - Use RepaintFrame change hint for will-change. r=dbaron 2014-10-30 15:12:11 +00:00
Ryan VanderMeulen
4402a94e8d Bug 891840 - Re-enable test_pixel_lengths.html now that the underlying platform bug has been fixed. r=me
--HG--
extra : rebase_source : 896d2b1f078ade77d5d99b6f2b00759242d0eb34
2014-11-03 17:09:41 -05:00
Vaibhav Agrawal
1ab18000f4 Bug 1083347 - Removing entries from android23.json and annotating manifests. r=gbrown 2014-11-03 12:01:51 -08:00
Rik Cabanier
a15ff61f2f Bug 1092264 - Fix testing of 'isolation' property. r=dbaron 2014-11-03 10:13:13 -08:00
Phil Ringnalda
e2eee0a3e3 Back out b327975e972b (bug 891840) for moving test_bluetooth.html into a b2g debug mochitest chunk where it doesn't want to run half the time 2014-11-01 19:44:43 -07:00