Commit Graph

413 Commits

Author SHA1 Message Date
Brian Birtles
6f31f71d47 Bug 1355348 - Move ServoComputedValuesWithParent to separate file; r=hiro
We will use this type later in this patch series in nsSMILCSSProperty so this
patch moves it to a separate file so it can be re-used.

MozReview-Commit-ID: 4Z7YbsQ9xz4
2017-04-26 13:00:11 +09:00
Emilio Cobos Álvarez
d133d0c021 Bug 1358570: Make PurgeCompletedTransitions lookup the correct animation collection. r=hiro
Probably GetAnimationCollection itself should assert against it, but that's a
bigger task right now...

MozReview-Commit-ID: JxFWXtgMAXy
2017-04-21 16:53:21 +02:00
Boris Chiou
40da2266c0 Bug 1343753 - Part 9: Early return for non-animatable properties for transitions. r=hiro,manishearth
MozReview-Commit-ID: HtNavkzyHvt
2017-04-12 16:37:09 +08:00
Boris Chiou
082b181da9 Bug 1343753 - Part 8: Rename and add new methods in nsTransitionManager. r=birtles
Rename UpdateTransitions as DoUpdateTransitions, and add a public
method, UpdateTransitions for stylo.

MozReview-Commit-ID: 7UiGzFsGZC4
2017-04-12 16:33:44 +08:00
Boris Chiou
69d7060ea7 Bug 1343753 - Part 7: Use template for UpdateTransitions and ConsiderInitiatingTransition. r=birtles
We use the template to replace the type, nsStyleContext and
ServoComputedValuesWithParent.

MozReview-Commit-ID: JFPdODZAwX8
2017-03-09 15:37:17 +08:00
Boris Chiou
68f83f15a6 Bug 1343753 - Part 6: Move mAnimationGeneration into RestyleManager. r=birtles
So stylo can also use mAnimationGeneration.

MozReview-Commit-ID: KTc8vs2RKMm
2017-03-09 17:15:08 +08:00
Boris Chiou
21b271db03 Bug 1343753 - Part 5: Support ServoComputedValues in ExtractNonDiscreteComputedValue. r=birtles,hiro,manishearth
We use ServoComputedStyleValues as the argument here, instead of
ServoComputedValues, because I will use template for nsStyleContext and
ServoComputedValuesWithParent in UpdateTransitions() and
ConsiderInitiatingTransition(). Besides, add an FFI to check if a
proeprty is discrete animation type.

MozReview-Commit-ID: 7VtcMDtgl55
2017-04-12 16:31:12 +08:00
Boris Chiou
53644c1a40 Bug 1343753 - Part 4: Introduce AnimationValue::IsInterpolableWith. r=birtles,manishearth
We have different interpolation implementations on Gecko and Servo, so
wrap the "Can be Interpolated" in AnimationValue. This patch also introduces
the FFI, Servo_Animationvalues_IsInterpolable.

MozReview-Commit-ID: 92Yf1u84A3c
2017-04-12 16:26:59 +08:00
Boris Chiou
e62a6d13a7 Bug 1343753 - Part 3: Use AnimationValue in ElementPropertyTransition and CSSTransition. r=birtles
We also need to update the interpolation code based on ServoAnimationValue in
ElementPropertyTransition::UpdateStartValueFromReplacedTransition().
Therefore, ElementPropertyTransition can be used by both Gecko and Servo.

MozReview-Commit-ID: BrIpvRR3te8
2017-03-09 12:33:15 +08:00
Boris Chiou
a237df76a8 Bug 1343753 - Part 2: Update GetTransitionKeyframes for stylo. r=birtles,manishearth
Use AnimationValue as arguments, and add one FFI to uncompute the
value. Therefore, we can use GetTransitionKeyframes for both Gecko and
Servo backends. However, there are many "mGecko"s, which will be removed
later.

MozReview-Commit-ID: Dg5hrDdlIWb
2017-04-12 15:51:55 +08:00
Boris Chiou
8491467388 Bug 1343753 - Part 1: Make GetTransitionKeyframes as a local static function. r=birtles
GetTransitionKeyframes is a simple helper function, which is only used by
ConsiderInitiatingTransition, so let's make it static to reduce the time
to revise the header.

MozReview-Commit-ID: HlztPxz8sMJ
2017-03-09 13:35:43 +08:00
Hiroyuki Ikezoe
86a7d15844 Bug 1344603 - Make Stop{Animations|Transitions}ForElement as a member function of CommonAnimationManager. r=boris
MozReview-Commit-ID: LSSpWYjoPn9
2017-03-06 13:19:09 +09:00
Hiroyuki Ikezoe
42508fbb2b Bug 1344533 - Replace OwningElementRef::GetRenderedPresContext with nsContentUtils::GetContextForContext(). r=boris
MozReview-Commit-ID: HaAvgNcORQb
2017-03-05 17:28:49 +09:00
Hiroyuki Ikezoe
c9b25aeb10 Bug 1340916 - Part 3: Add a helper function to create TimingParams CSS animation/transition properties. r=birtles
MozReview-Commit-ID: 3CmCc44FhvA
2017-02-20 11:02:52 +09:00
Cameron McCormack
87f3ad6dfb Bug 1297899 - Part 6: Move RestyleManagerHandle functionality into RestyleManager. r=bholley
MozReview-Commit-ID: 7lsti0bGzNr
2017-02-13 11:21:33 +08:00
Mantaroh Yoshinaga
246a4a50cb Bug 1302648 part 5 - Queue animationcancel when animation status is idle. r=birtles
MozReview-Commit-ID: DRjWboQwR0A
2017-02-10 12:32:44 +09:00
Boris Chiou
afe4b3dc4b Bug 1335942 - Part 2: Use mozilla::AnimationValue in AnimationPropertySegment. r=hiro,manishearth
MozReview-Commit-ID: L6U1A223jsa
2017-02-04 13:57:08 +08:00
Mantaroh Yoshinaga
deb1e99281 Bug 1336899 - Should not fire the transitioncancel after ending CSS Transition. r=birtles
MozReview-Commit-ID: IrqNNjVg0xg
2017-02-06 16:21:01 +09:00
Mantaroh Yoshinaga
831b5a3b13 Bug 1308099 part 2 - Remove unnecessary typedef and use defined name instead of full namespace. r=hiro
MozReview-Commit-ID: Jn5qLqS9Kc3
2017-01-25 15:59:30 +09:00
Hiroyuki Ikezoe
6044c74e91 Bug 1330190 - Part 2: Add a new function named ResolveStyleWithoutAnimation. r=heycam
Unlike the other one this function does not need an old nsStyleContext.
This function just resolves style without all animation data in the first place.
The existing ResolveStyleWithoutAnimation is renamed to
ResolveStyleByRemovingAnimation.

MozReview-Commit-ID: 1RmCQNw0MmW
2017-01-16 16:57:13 +09:00
Mantaroh Yoshinaga
2381e8946b Bug 1264125 part 6 - Queue CSS related event when setting null target effect. r=birtles
MozReview-Commit-ID: 6KILkmNInbm
2016-12-20 16:03:29 +09:00
Mantaroh Yoshinaga
0adb32af09 Bug 1264125 part 5 - Call the queueing events when canceling transition via Style or Script. r=birtles
MozReview-Commit-ID: 5qWef4xCZXX
2016-12-20 16:03:29 +09:00
Mantaroh Yoshinaga
5271a072cb Bug 1264125 part 4 - Queue transitioncancel when animation status is idle. r=birtles
MozReview-Commit-ID: CsmIcWfKAID
2016-12-20 16:03:29 +09:00
Xidorn Quan
3b74963c68 Bug 1307357 part 2 - Fix issues appear after adding file to unified source. r=heycam
MozReview-Commit-ID: 5FkisMn3LKq
2016-11-23 10:26:20 +11:00
Mantaroh Yoshinaga
0249279370 Bug 1287983 part 6 - Integrate ElapsedTimeToTimeStamp function to the Animation class. r=birtles
MozReview-Commit-ID: 43AGaTYQoqn
2016-10-19 15:16:52 +09:00
Mantaroh Yoshinaga
4af39d9541 Bug 1287983 part 5 - Clarify the function name of creating transition. r=hiro
MozReview-Commit-ID: AW5qD8uBQxf
2016-10-19 15:16:52 +09:00
Mantaroh Yoshinaga
09cad849e9 Bug 1287983 part 2 - Add transitionstart/transitionrun event handling. r=birtles
The specification of CSS-Transition event  is as follow:
https://drafts.csswg.org/css-transitions-2/#transition-events

MozReview-Commit-ID: CWgsRRLhnXp
2016-10-19 15:16:51 +09:00
Hiroyuki Ikezoe
ffa9edc0e8 Bug 1304922 - Part 11: Don't use StyleAnimationValue after moving it. r=birtles
MozReview-Commit-ID: A4h270gOPOR
2016-10-05 14:58:07 +09:00
Nicholas Nethercote
887efe04d5 Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.
2016-09-01 15:01:16 +10:00
Boris Chiou
b5fe9f732c Bug 1049975 - Part 9: Implement writable Animation effect. r=birtles
MozReview-Commit-ID: 1dwHpcYJto3
2016-07-13 18:44:19 +08:00
Boris Chiou
ac350393aa Bug 1049975 - Part 7: Add SetEffectNoUpdate. r=birtles
Use SetEffectNoUpdate() for the procedure of setting effect, and let SetEffect()
also calls PostUpdate(), so we can use SetEffectNoUpdate() if we don't want to
call RequestRestyle(RestyleType::layer).

MozReview-Commit-ID: CaWA34UebpH
2016-08-24 14:36:14 +08:00
Boris Chiou
1ef0babead Bug 1049975 - Part 4: Merge two Animation::SetEffect()s. r=birtles
This is a pre-patch for part 5, which is trying to make our code closer to the
spec. Some methods in KeyframeEffectReadOnly belong to AnimationEffectReadOnly,
so first, use AsKeyframeEffect() to access those keyframe-related methods, and
then add virtual methods for timing-related methods to AnimationEffectReadOnly.

MozReview-Commit-ID: 1srA1f8JYeN
2016-07-25 16:56:34 +08:00
Boris Chiou
db667f51cf Bug 1049975 - Part 3: Handle removed/replaced effect for CSS Transition. r=birtles
Add mTransitionProperty and mTransitionToValue into CSSTransition, so we can
retrieve the original property and ToValue after setting a different effect.

MozReview-Commit-ID: 6sBGHkPAhGX
2016-07-28 11:20:13 +08:00
Ryan VanderMeulen
576edfd1fd Merge inbound to m-c. a=merge 2016-08-19 09:52:53 -04:00
Cameron McCormack
eee4228783 Bug 1295852 - Part 5: Check for generated content containers more precisely in nsTransitionManager assertion. r=boris
MozReview-Commit-ID: 3GNdT8ubKDb
2016-08-19 11:46:46 +08:00
Jonathan Chan
2eeb9e0a7f Bug 1293739 - Part 2: Rename nsCSSPropertySet to nsCSSPropertyIDSet. r=dholbert
The previous patch in this series renamed nsCSSProperty to nsCSSPropertyID.
This patch renames nsCSSPropertySet to nsCSSPropertyIDSet accordingly.

This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSPropertySet\b/nsCSSPropertyIDSet/g' -i''

Then:

  hg mv layout/style/nsCSSPropertySet.h layout/style/nsCSSPropertyIDSet.h

... and finally, manually renaming nsCSSPropertySet in the include guard in
nsCSSPropertyIDSet.h.

(NOTE: Re-landing this patch on a CLOSED TREE to correctly-address the merge bustage that closed the tree.)

MozReview-Commit-ID: ASUNs7FWbKP
2016-08-16 18:46:58 -07:00
Jonathan Chan
e201b93c16 Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA
2016-08-16 18:37:48 -07:00
Gregory Szorc
3bcd02ebea Backed out changesets dcdb85fc5517, 702bca0deee2, 9cKX8gC1ATA (bug 1293739) for build bustage; a=bustage
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.

CLOSED TREE
2016-08-16 17:50:40 -07:00
Wes Kocher
bb9e0744e6 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change
2016-08-16 17:05:30 -07:00
Daisuke Akatsuka
f2b0e52be2 Bug 1277433 - Part 1: Use discrete animation for appropriate CSS Alignment properties. r=dholbert,heycam
MozReview-Commit-ID: BHtzuwJOuB5
2016-08-16 14:29:21 +09:00
Jonathan Chan
fafebb61e5 Bug 1293739 - Part 2: Rename nsCSSPropertySet to nsCSSPropertyIDSet. r=dholbert
The previous patch in this series renamed nsCSSProperty to nsCSSPropertyID.
This patch renames nsCSSPropertySet to nsCSSPropertyIDSet accordingly.

This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSPropertySet\b/nsCSSPropertyIDSet/g' -i''

Then:

  hg mv layout/style/nsCSSPropertySet.h layout/style/nsCSSPropertyIDSet.h

... and finally, manually renaming nsCSSPropertySet in the include guard in
nsCSSPropertyIDSet.h.

MozReview-Commit-ID: ASUNs7FWbKP
2016-08-09 16:28:21 -07:00
Jonathan Chan
23ccd0531f Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA
2016-08-09 16:28:19 -07:00
Brian Birtles
b95d814ea1 Bug 1286476 part 2 - Respect the playback rate when calculating phase boundaries; r=hiro
This implements the spec change in 21de090dac

The spec change refers to a binary 'animation direction' flag. Instead of that,
however, we just pass the playback rate along and use it inside
GetComputedTimingAt since this seems simpler.

Also, this patch moves the implementation of
KeyframeEffectReadOnly::GetComputedTiming from the header file into the .cpp
file. This is because with this change, GetComputedTiming needs to call
mAnimation->PlaybackRate() and so mozilla::dom::Animation needs to be a complete
type. However, simply including Animation.h doesn't work because of a cyclic
dependency between KeyframeEffect.h and Animation.h. We might be able to fix
this later but since yet-to-land bug 1049975 moves this code around a lot, I'd
rather not touch it too much just now.

MozReview-Commit-ID: 1h6XRh4xmfI
2016-08-17 08:28:41 +09:00
Wes Kocher
c7a7ed3ee4 Backed out 3 changesets (bug 1286476) for frequent windows wpt failures in phases-and-states.html CLOSED TREE
Backed out changeset 53bbfa02d45d (bug 1286476)
Backed out changeset 3947ab570883 (bug 1286476)
Backed out changeset ffd8c37eb695 (bug 1286476)
2016-08-17 10:41:46 -07:00
Wes Kocher
b6639dcfb3 Merge m-c to inbound, a=merge 2016-08-16 22:06:58 -07:00
Brian Birtles
af36ab2fce Bug 1286476 part 2 - Respect the playback rate when calculating phase boundaries; r=hiro
This implements the spec change in 21de090dac

The spec change refers to a binary 'animation direction' flag. Instead of that,
however, we just pass the playback rate along and use it inside
GetComputedTimingAt since this seems simpler.

Also, this patch moves the implementation of
KeyframeEffectReadOnly::GetComputedTiming from the header file into the .cpp
file. This is because with this change, GetComputedTiming needs to call
mAnimation->PlaybackRate() and so mozilla::dom::Animation needs to be a complete
type. However, simply including Animation.h doesn't work because of a cyclic
dependency between KeyframeEffect.h and Animation.h. We might be able to fix
this later but since yet-to-land bug 1049975 moves this code around a lot, I'd
rather not touch it too much just now.

MozReview-Commit-ID: 1h6XRh4xmfI
2016-08-17 08:28:41 +09:00
Hiroyuki Ikezoe
0d7fe978f1 Bug 1285407 - Part 3: Remove UpdateCascadeResults call because it's called against the same nsStyleContext from MaybeUpdateAnimationRule. r=birtles
MozReview-Commit-ID: FrrFLq9S2f4
2016-07-11 17:28:17 +09:00
Hiroyuki Ikezoe
c2e183e18a Bug 1285407 - Part 1: Pass a newly created nsStyleContext to GetAnimationRule and MaybeUpdateAnimationRule. r=birtles
While resolving style context, the primary frame of the target element
has previous style context so if we don't pass the newly created nsStyleContext,
UpdateCascadeResults uses the previous style to get overridden properties, it
will result unexpected cascading results.

MozReview-Commit-ID: osqXQlP43X
2016-07-11 17:28:14 +09:00
Jonathan Chan
9b3dfb521f Bug 1285365 - Part 2: Add missing includes and namespace qualifiers. r=dholbert
MozReview-Commit-ID: 5vDmc1yGe1P
2016-07-07 14:05:28 -07:00
Boris Chiou
efa654bd9f Bug 1244590 - Part 1: Introduce KeyframeEffectParams. r=birtles
Add a new file, KeyframeEffectParams.h, and define the basic data
members nsString for the spacing mode.
Also, add one more argument, const KeyframeEffectParams&, to the
constructors of KeyframeEffect(ReadOnly).

MozReview-Commit-ID: I7LYlnv6LLb
2016-05-05 15:41:03 +08:00