Commit Graph

4612 Commits

Author SHA1 Message Date
L. David Baron
44b5ed6728 Bug 1089417 patch 3 - Add mochitest. r=heycam
Note that if I make the style element currently /* empty */ have a rule
in it, the test passes.

Patch 8 also makes the test pass.
2014-12-05 11:37:38 -08:00
L. David Baron
02e66dfa8a Bug 1089417 patch 1 - Add assertions that rule processors are valid before we access them. r=heycam
This was just something that seemed worth asserting in the process of
debugging, since I wanted to see if it was the problem.
2014-12-05 11:37:38 -08:00
Carsten "Tomcat" Book
f97c2d406b merge fx-team to mozilla-central a=merge 2014-12-05 13:02:46 +01:00
Gijs Kruitbosch
b089406711 Bug 639134 - change document color pref to tristate, r=dbaron 2014-11-27 19:06:14 +00:00
Milan Loveless
c300ef1afc Bug 1107595 - Changed spelling of behaviour to behavior in AnimationCommon.cpp; r=birtles 2014-12-04 12:37:28 -08:00
Jonathan Kew
99ce3e394c Bug 1102177 - Don't apply a fixed height to <hr> elements. r=dbaron
--HG--
rename : layout/base/crashtests/266445-1.html => layout/base/crashtests/266445-2.html
2014-12-01 20:57:28 -08:00
Boris Zbarsky
df0625421a Bug 830260 followup to address review comment. 2014-12-01 15:22:44 -05:00
Boris Zbarsky
cb114f6309 Bug 830260. Passing null as the value to CSSStyleDeclaration.setProperty should remove the property. r=heycam 2014-12-01 15:15:59 -05:00
Boris Zbarsky
a10fc15a22 Bug 1020400. Remove empty-cells quirk, since no other UA has it. r=heycam 2014-12-01 15:15:41 -05:00
Mats Palmgren
2455228c4a Bug 1102374 - Enable display:contents by default in non-release builds. r=dbaron 2014-12-01 15:55:16 +00:00
Mats Palmgren
fa685d9436 Bug 1105938 - Don't use nsCSSProps::PropHasFlags(eCSSPropertyExtra_variable, ...). r=heycam 2014-12-01 15:55:16 +00:00
Carsten "Tomcat" Book
01f4bea101 Backed out changeset 88befbeb7321 (bug 1102177) for crashtest bustage 2014-12-01 12:44:01 +01:00
Jonathan Kew
42163bd00f Bug 1102177 - Don't apply a fixed height to <hr> elements. r=dbaron 2014-12-01 09:47:34 +00:00
L. David Baron
8a68f4e46e Bug 1100773 patch 4 - Fix nonunified build bustage. 2014-11-26 23:39:43 -08:00
L. David Baron
2fbfc09f6f Bug 1102650 - Make the :-moz-dir() and :-moz-locale-dir() selectors be valid selectors (matching nothing) with arguments other than rtl and ltr, rather than invalid. r=heycam 2014-11-26 22:29:45 -08:00
L. David Baron
8c516d0dfd Bug 1100773 patch 3 - Add an aListDescendants boolean to nsStyleContext::List. r=heycam 2014-11-26 22:29:45 -08:00
L. David Baron
ac0837a339 Bug 1100773 patch 2 - Convert style rule List methods to use fprintf_stderr. r=heycam
Note that getting decent logcat output on Android and B2G requires not
splitting lines of output across multiple fprintf_stderr calls.
2014-11-26 22:29:44 -08:00
L. David Baron
15771fb627 Bug 1100773 patch 1 - Fix bracing of indent loops in style rule print functions. r=heycam 2014-11-26 22:29:44 -08:00
Xidorn Quan
6bb73d843e Bug 1084183 - Propagate text decoration to ruby frames. r=dbaron 2014-11-26 15:53:18 +11:00
Daniel Holbert
cb3c595d42 Bug 1093316 part 2: Backout changeset af2a4fb980ad (i.e. backout bug 1032922 part 1), to reflect CSSWG removing "flex-basis: main-size" from the flexbox spec.
Landing on a CLOSED TREE with a=kwierso
2014-11-25 15:40:24 -08:00
Daniel Holbert
8b2fb3bb07 Bug 1093316 part 1: Backout changeset aece7f9f944c (i.e. backout bug 1032922 part 2), to reflect CSSWG removing "flex-basis: main-size" from the flexbox spec. 2014-11-25 11:28:15 -08:00
Seth Fowler
04a7d19f79 Bug 1102617 - Replace imgIContainer::FrameIsOpaque with imgIContainer::IsOpaque. r=tn 2014-11-24 23:42:43 -08:00
Dirk Schulze
fb488563e8 Bug 1074528 - Implement parsing/computing of inset(). r=dbaron 2014-11-22 05:28:00 +01:00
Jesse Ruderman
c7ef084d73 Bug 559491 - crashtest. 2014-11-23 15:09:51 +00:00
Karl Tomlinson
0a52493d8d bug 1096132 rename UnscaledAppUnitsPerDevPixel() to AppUnitsPerDevPixelAtUnitFullZoom() r=tn
--HG--
extra : rebase_source : 220ede5d449a752c16064bb77905bc68af3df707
2014-11-14 00:53:02 +13:00
Mats Palmgren
a25bb0f239 Bug 907396 - Tests for CSS 'display:contents'. 2014-11-20 18:24:11 +00:00
Mats Palmgren
a589dd143f Bug 907396 - Put display:contents support behind a pref - disabled by default. r=dholbert 2014-11-20 18:24:09 +00:00
Mats Palmgren
02d2f75bc9 Bug 907396 - Flex/Grid container changes for display:contents. r=dholbert 2014-11-20 18:24:09 +00:00
Mats Palmgren
ca5235fd31 Bug 907396 - Style system support for display:contents. r=dbaron 2014-11-20 18:24:08 +00:00
Brian Birtles
a8a325e307 Bug 1104427 part 2 - Encapsulate AnimationPlayer::mStartTime; r=dholbert
Now that there is a public accessor for mStartTime, we can make it a protected
member of AnimationPlayer. The only time mStartTime is ever set is when playing
the animation so we can replace external modifications to mStartTime with calls
to Play(). This simplifies implementing deferred starting of animations
in bug 927349 by isolating the deferred playback logic to AnimationPlayer.

Note that even when we call PauseFromStyle immediately afterwards we still need
to call PlayFromStyle (or Play) first in order to resolve the time at which the
player should be paused. A newly created player doesn't have a current time so
if we were simply to call pause it wouldn't pause at the start of the animation
as we might expect. The call to Play(FromStyle) will cause the current time to
become zero and then we pause at that time.
2014-12-04 08:28:38 -08:00
David Zbarsky
7d60c708ba Bug 1085769: Merge ContentOrAncestorHasAnimation/Transition r=birtles 2014-11-19 21:48:42 -05:00
David Zbarsky
3e883018cf Bug 1085769: Merge RulesMatching, GetAnimationPlayers, and GetAnimationRule r=birtles 2014-11-19 21:48:41 -05:00
Boris Zbarsky
e13e547738 Bug 771043. Move MediaQueryList tracking from the prescontext to the document, so they will correctly outlive prescontext changes. r=dbaron 2014-10-03 14:15:25 -04:00
Sid Stamm
7840802ff5 Bug 704320 - apply referrer policies to image loads (r=seth) 2014-11-18 08:46:53 -05:00
Sid Stamm
2189922ce8 Bug 704320 - Add referrer policy support to stylesheet and CSS loads and fonts. (r=bz) 2014-11-18 08:46:47 -05:00
Tooru Fujisawa
917acfe60d Bug 1039488 - Turn text-decoration into a shorthand. r=dbaron 2014-11-18 19:23:09 +09:00
Tooru Fujisawa
c6892f38ac Bug 825004 - Part 2: Provide temporary aliases for -moz-text-decoration-*. r=dbaron 2014-11-18 19:23:09 +09:00
Tooru Fujisawa
1bf9e20256 Bug 825004 - Part 1: Unprefix CSS3 Text Decoration. r=dbaron 2014-11-18 19:23:09 +09:00
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