Commit Graph

191 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
af46b1bd33 Bug 1350743 - Rename AnimationPropertySegment::HasReplacableValues to AnimationPropertySegment::HasReplaceableValues. r=birtles
MozReview-Commit-ID: KNwZhFvG5PJ
2017-03-27 09:15:26 +09:00
Hiroyuki Ikezoe
de94a340b2 Bug 1350743 - Re-use nsStyleContext without animations to extract animation values for each property. r=birtles
MozReview-Commit-ID: L4AmCAp0DLn
2017-03-27 09:15:26 +09:00
Hiroyuki Ikezoe
d126549a76 Bug 1350743 - Make KeyframeEffectReadOnly::ResolveBaseStyle return void. r=birtles
Also it's renamed to EnsureBaseStyle.  We didn't use the return value at all.

MozReview-Commit-ID: Cu4rnAP883M
2017-03-27 09:15:26 +09:00
Ting-Yu Lin
74eea395fa Bug 1322570 Part 4 - Use GetParentAllowServo() in KeyframeEffectReadOnly::UpdateProperties. r=hiro
Per bug 1322570 Comment 7, we could drop the GetParentAllowServo() when we
invoke UpdateProperties() from a SquentialTask, so allow it for now.

MozReview-Commit-ID: 52NauGaz4Zv
2017-03-20 14:13:01 +08:00
Wes Kocher
6342adb165 Merge inbound to central, a=merge
MozReview-Commit-ID: FKkx5SygvHz
2017-03-21 16:08:32 -07:00
Cameron McCormack
757b14f5d7 Bug 1302054 - Part 2: Remove no longer useful nsStyleContext::CalcDifference optimization that handles the same-rule-node case. r=dbaron
nsStyleContext::CalcDifference had an optimization where, when we knew
that the old and new style context have the same rule node, we knew that
the only change hints that would need to be handled are those in the
"not handled for descendants" category, generated due to explicit
'inherit' values on reset properties.  This was because any changes due
to differences in inherited properties should only have generated
"handled for descendants" change hints (and thus would already have been
handled on an ancestor).

Before bug 931668, this let us avoid calling CalcDifference on structs
that only would have generated hints that we knew we already would have
handled.  However, after bug 931668, we compare all structs anyway so
that we can set the aEqualStructs outparam, so we don't gain anything
from this optimization.  We can still return these change hints we know
will not need to be handled, and rely on ElementRestyler::CaptureChange
to filter them out.

MozReview-Commit-ID: Ld1s2Js0i6r
2017-03-21 16:33:05 +08:00
Boris Chiou
51b2cebdaa Bug 1349124 - Replace ServoComputedStyleValues with ServoComputedValuesWithParent. r=hiro
MozReview-Commit-ID: 5POa8DRjmc8
2017-03-21 15:41:23 +08:00
Hiroyuki Ikezoe
f8aeb7ad55 Bug 1340958 - Drop AnimationRule and ServoAnimationRule. r=boris
MozReview-Commit-ID: ClnvyShHpsN
2017-03-17 13:24:42 +09:00
Hiroyuki Ikezoe
7cc9990018 Bug 1340958 - Put computed values into AnimationValueMap instead of hashtable in gecko. r=heycam
Before this patch, we store each computed values in a hashtable,
nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>, for all
KeyframeEffectReadOnly on an element, and convert the ServoAnimationValues of
the hashtable into an nsTArray<ServoAnimationValue*> and then convert
the ServoAnimationValues of the nsTArray into PropertyDeclarationBlock
in rust.  This way was really inefficient.
In this patch, we store the computed values into AnimationValueMap and
convert all AnimationValue in the map into PropertyDeclarationBlock
after EffectCompositor::GetAnimationRule.

MozReview-Commit-ID: EJ2Kl65fVeF
2017-03-17 13:23:21 +09:00
Hiroyuki Ikezoe
d65d560c39 Bug 1340958 - Templatize ComposeStyle. r=birtles
Later in this patch series we will replace ServoAnimationRule with a hashmap.
At that point, we would like to pass the hashmap to ComposeStyle. In order
to achieve that, this patch templatizes the 'animation rule' parameter of
ComposeStyle in both Animation and KeyframeEffectReadOnly so that it can
represent a hashmap instead.

MozReview-Commit-ID: H5bMxjN3W8n
2017-03-17 13:22:13 +09:00
Hiroyuki Ikezoe
efbf131e1d Bug 1340958 - Separate ComposeStyle() into servo and gecko versions. r=birtles
MozReview-Commit-ID: FAXf6J9UVjo
2017-03-17 12:48:56 +09:00
Hiroyuki Ikezoe
301983d126 Bug 1340958 - Allocate StyleRule only if we need to compose styles. r=birtles
MozReview-Commit-ID: 6ucsxBAaYRp
2017-03-17 12:48:51 +09:00
BharatR123
f22cec0a62 Bug 1302637 - Animation::PostUpdate() calls KeyframeEffectReadonly::RequestRestyle() r=hiro
Also removed the function GetPresContext() in KeyframeEffectReadOnly.cpp
and KeyframeEffectReadOnly.h

MozReview-Commit-ID: AJCgxQ05yVQ
2017-03-14 22:03:22 +05:30
BharatR123
72f593ede3 Bug 1302888 - Replace GetPresContext() with nsContentUtils::GetContextForContent() to obtain nsPresContext* in dom/animation r=hiro
Edited all function calls in KeyFrameEffectReadOnly.cpp and one function call in EffectCompositor.cpp

MozReview-Commit-ID: BzSHLZna4xX
2017-03-13 20:39:49 +05:30
Hiroyuki Ikezoe
0388ff334b Bug 1344619 - Part 1: Introduce WillCompose() to update various state that we need to update as the result of ComposeStyle(). r=birtles
MozReview-Commit-ID: JznBR3OghKG
2017-03-09 05:20:17 +09:00
Daisuke Akatsuka
1243945dbb Bug 1339332 - Part 1: Introduce neutral value concept for missing keyframe in CSS Animation. r=birtles,hiro
MozReview-Commit-ID: F3qvRY3SRAp
2017-03-08 10:07:08 +09:00
Hiroyuki Ikezoe
09e38c561f Bug 1344598 - Use nsIDocument::IsStyledByServo to check we are using servo or not. r=boris
MozReview-Commit-ID: 1yQUAwHy51
2017-03-06 11:42:57 +09:00
Hiroyuki Ikezoe
69c1f3b7a6 Bug 1341987 - Part 4: Use nsIFrame's nsPresContext instead of getting from element. r=birtles
MozReview-Commit-ID: 3pWt7d2MKsZ
2017-02-27 11:34:48 +09:00
Hiroyuki Ikezoe
bce3f36bb2 Bug 1341987 - Part 2: Drop cascade level from last refresh time for transform. r=birtles
We no longer need separate time for cascade levels respectively since we do
send all type of animations on the same element to the compositor regardless
of cascade level.

MozReview-Commit-ID: 7cGQGE3yHvm
2017-02-27 11:30:56 +09:00
Hiroyuki Ikezoe
42243bd080 Bug 1341987 - Part 1: Rename AnimationRuleRefreshTime to LastTransformSyncTime. r=birtles
It's just for transform animations on the compositor.

MozReview-Commit-ID: 288CcG4kko4
2017-02-27 11:29:27 +09:00
Hiroyuki Ikezoe
779fbfdd09 Bug 1338927 - Part 7: In case of stylo, use servo computed values instead of nsStyleContext to update properties. r=birtles
We convert nsStyleContext* to servo's computed values in UpdateProperties()
since it is called from various places (e.g. SetTarget()) with nsStyleContext*.

MozReview-Commit-ID: KxPjm82Crl
2017-02-23 09:52:44 +09:00
Hiroyuki Ikezoe
6506f210a3 Bug 1338927 - Part 6: Templatize SetKeyframes(). r=birtles
We have SetKeyframes(nsStyleContext*) for the same reason
of UpdateProperties(nsStyleContext*).

MozReview-Commit-ID: 7WjMU66MzpU
2017-02-23 09:52:44 +09:00
Hiroyuki Ikezoe
0b472a3073 Bug 1338927 - Part 5: Templatize UpdateProperties(). r=birtles
We had to implement UpdateProperties(nsStyleContext*) explicitly
since there are some calls of UpdateProperties() with RefPtr<nsStyleContext>.
Without this compiler tries to use template function instead.

MozReview-Commit-ID: 72NgwmJ4kcx
2017-02-23 09:52:44 +09:00
Hiroyuki Ikezoe
b8594918d3 Bug 1338927 - Part 4: Templatize BuildProperties(). r=birtles
We'd like to use template to manage functions that have almost the same functionality
both on stylo and gecko instead of branching in each functions because it will be
easier to maintain stylo and gecko for a while.

MozReview-Commit-ID: 25ukMpOeqLj
2017-02-23 09:52:44 +09:00
Hiroyuki Ikezoe
9dcdac4be2 Bug 1338927 - Part 1: Drop nsStyleContext argument from KeyframeUtils::GetAnimationPropertiesFromKeyframes. r=birtles
It's not used at all.

MozReview-Commit-ID: 2vAmlDhp12G
2017-02-23 09:52:43 +09:00
Shing Lyu
e651462701 Bug 1337229 - Implement the deep operator== for RawServoAnimationValue r=hiro,manishearth
MozReview-Commit-ID: BiNNrIFXqtf
2017-02-24 15:05:23 +08:00
Iris Hsiao
5cbd031da5 Backed out changeset 2d21596af124 (bug 1337229) for developer's request 2017-02-22 17:40:13 +08:00
Shing Lyu
3a8dbbc94b Bug 1337229 - Implement deep operator== for RawServoAnimationValue r=hiro,manishearth
MozReview-Commit-ID: Euvv9zarFe3
2017-02-17 14:39:24 +08:00
Xidorn Quan
5055d45482 Bug 1340033 - Remove dependency from StyleAnimationValue.h to ServoBindings.h. r=hiro
MozReview-Commit-ID: 79czvLmftmv
2017-02-16 15:14:06 +11:00
Boris Chiou
8f08a51089 Bug 1338087 - Part 1: Don't apply paced spacing on stylo. r=hiro
To avoid using StyleAnimationValue on stylo, we should skip
ApplySpacing, which means We always fall back to distribute spacing on stylo.

MozReview-Commit-ID: 9DNwhOI8saf
2017-02-10 16:37:45 +08:00
Hiroyuki Ikezoe
a6db5ea712 Bug 1331704 - Part 3: Drop all of unused stuff. r=birtles a=abillings
MozReview-Commit-ID: BWAC0iZLw6t
2017-02-11 19:11:45 +09:00
Hiroyuki Ikezoe
b423c1eb7d Bug 1331704 - Part 2: Resolve base styles during UpdateProprties. r=birtles a=abillings
EnsureBaseStyle() requires an already resolved nsStyleContext
and resolves the base style by ResolveStyleByRemovingAnimation().

MozReview-Commit-ID: BHqJiBJspQY
2017-02-11 19:11:45 +09:00
Hiroyuki Ikezoe
448c234858 Bug 1331704 - Part 1: Store base styles in KeyframeEffectReadOnly instead of EffectSet. r=birtles a=abillings
Now we dropped mNeedsBaseStyleSet bit set.

MozReview-Commit-ID: Gv2rU0jpyk1
2017-02-11 19:11:45 +09:00
Sebastian Hengst
2beaba93bd Backed out changeset e2f6d5054e20 (bug 1331704) for build bustage: unused variable hasProperty at KeyframeEffectReadOnly.h:294. r=backout on a CLOSED TREE 2017-02-11 11:37:54 +01:00
Sebastian Hengst
6e9f4fc3b4 Backed out changeset 6eb3b0501d00 (bug 1331704) 2017-02-11 11:32:14 +01:00
Sebastian Hengst
0a388f09bd Backed out changeset 0077d103e862 (bug 1331704) 2017-02-11 11:32:10 +01:00
Hiroyuki Ikezoe
db4e65d866 Bug 1331704 - Part 3: Drop all of unused stuff. r=birtles a=abillings
MozReview-Commit-ID: BWAC0iZLw6t
2017-02-11 19:11:45 +09:00
Hiroyuki Ikezoe
138176968e Bug 1331704 - Part 2: Resolve base styles during UpdateProprties. r=birtles a=abillings
EnsureBaseStyle() requires an already resolved nsStyleContext
and resolves the base style by ResolveStyleByRemovingAnimation().

MozReview-Commit-ID: BHqJiBJspQY
2017-02-11 19:11:45 +09:00
Hiroyuki Ikezoe
00914b9633 Bug 1331704 - Part 1: Store base styles in KeyframeEffectReadOnly instead of EffectSet. r=birtles a=abillings
Now we dropped mNeedsBaseStyleSet bit set.

MozReview-Commit-ID: Gv2rU0jpyk1
2017-02-11 19:11:45 +09:00
Boris Chiou
df0e080301 Bug 1337313 - Part 2: Add AnimationValue::SerializeSpecifiedValue. r=hiro
Move the implementation of uncomputing to string into AnimationValue,
and add one more FFI for RawServoAnimationValue.

MozReview-Commit-ID: JFnXnGO3mlp
2017-02-09 11:33:17 +08:00
Boris Chiou
95221a7995 Bug 1337313 - Part 1: Use AnimationValue in CreatePropertyValue. r=hiro
Replace the argument type with AnimationValue.

MozReview-Commit-ID: IeydVOLKTB9
2017-02-08 16:15:18 +08:00
Hiroyuki Ikezoe
6afc2b92f7 Bug 1333846 - Part 2: Evaluate scale values for additive or accumulative animations. r=birtles a=abillings
MozReview-Commit-ID: LSKJNH5OJbs
2017-02-09 11:28:47 +09:00
Hiroyuki Ikezoe
cdad0a1c56 Bug 1333846 - Part 1: Move ContainsAnimatedScale() codes into dom/animation/. r=birtles a=abillings
MozReview-Commit-ID: 6bWeTfCmjtd
2017-02-09 11:28:47 +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
Boris Chiou
1776484714 Bug 1317209 - Part 2: Call Servo's Interpolation from Gecko. r=heycam,manishearth
1. Call Servo's interpolation from KeyframeEffectReadOnly::ComposeStyle().
2. Store the results into ServoAnimationRule.

MozReview-Commit-ID: LOp2mbXforg
2017-01-24 15:21:52 +08:00
Boris Chiou
9bb79bff75 Bug 1317209 - Part 1: Introduce ServoAnimationRule and implement uncompute FFI. r=heycam,manishearth
1. Introduce ServoAnimationRule, which is an equivalent of AnimValuesStyleRule.
2. Wrap ServoAnimationRule and AnimValuesStyleRule into a struct, and
   use it as the parameter of Animation::ComposeStyle and
   KeyframeEffectReadOnly::ComposeStyle.
3. Uncompute the RawServoAnimationValues in ServoAnimationRule when we
   need it.

MozReview-Commit-ID: HahXDYBCAhH
2017-01-24 15:19:18 +08:00
Hiroyuki Ikezoe
535df82e0d Bug 1330190 - Part 6: Add MOZ_DIAGNOSTIC_ASSERT for mIsComposing. r=birtles
Based on the other changesets in this series, we don't expect to be calling
UpdateProperties() and ComposeStyle() from within ComposeStyle() itself.
However, in case there is some scenario where that does still occur, we leave
the mIsComposing check in place and add an equivalent MOZ_DIAGNOSTIC_ASSERT so
that we are alerted if this does occur on debug / Nightly / DevEdition builds,
but handle it gracefully on beta or release builds.

MozReview-Commit-ID: 2cFpyMFR29Q
2017-01-16 17:41:25 +09:00
Hiroyuki Ikezoe
cfcc50ecbf Bug 1330190 - Part 5: Get style context without all of animation data for base styles. r=birtles
Test case, 1330190-2.html, is another variant of 1325193-1.html. It's for
animation on a pseudo element, causes timeout without part 3 patch.

MozReview-Commit-ID: KX6FE8mkZY2
2017-01-16 17:41:24 +09:00
Hiroyuki Ikezoe
b32a4246ca Bug 1322291 - Part 3: Ensure base styles if there is an additive or accumulate segment for propertis that can be run on the compositor. r=birtles
MozReview-Commit-ID: JjIQkafUh91
2017-01-12 14:48:42 +09:00
Hiroyuki Ikezoe
9940e0fd49 Bug 1325193 - Get underlying style value in the case where the last segment is missing keyframe for accumulation of iteration composite. r=birtles
Both of tests in this patch fail and cause lots of assertions without this fix.

MozReview-Commit-ID: CFrWSlM0Us5
2017-01-12 10:28:46 +09:00