Commit Graph

68 Commits

Author SHA1 Message Date
Brian Birtles
a21e613ca1 Bug 1355348 - Add constructor to AnimationValue; r=hiro
We will use this later in this patch series to simplify the creation of SMIL's
ValueWrapper objects.

MozReview-Commit-ID: 7EF9CN2SdwQ
2017-04-26 13:00:11 +09: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
781bb4be38 Bug 1352067 - Part 1: Make sure AnimationValue::{mGecko|mServo} are mutually exclusive. r=birtles,emilio
We will obsolete StyleAnimationValue in the future, and can treat
AnimationValue as a wrapper of RawServoAnimationValue to hide the FFIs
at that moment. For now, we still need both types, so it's better to make sure
they are mutually exclusive in AnimationValue. Therefore, let's add some
assertions.

Besides, I think those FFIs might do many things and it seems those methods
are not critical, so let's move them into the cpp file, so we can remove
some dependencies to avoid re-compiling so many files if someone needs
revise ServoBindings.h.

MozReview-Commit-ID: FJ1uTvEQ7NT
2017-03-31 17:46:37 +08:00
Daniel Holbert
e346d70b4a Bug 1298722 followup: remove obsolete documentation about MOZ_MUST_USE annotations on StyleAnimationValue::UncomputeValue(). (no review, comment-only, DONTBUILD)
Originally, the patch for Bug 1298722 was not going to label these functions as
MOZ_MUST_USE, and it added a brief code-comment to explain that. But then it
did end up labeling them as MOZ_MUST_USE after all, in response to some review
feedback. And it kept the now-incorrect comment around by accident, it
seems. This followup just removes that incorrect comment.

MozReview-Commit-ID: 2c35wQPzXRN
2017-03-24 11:45:18 -07: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
d50c720532 Bug 1338087 - Part 2: Drop the computation of StyleAnimationValue on stylo. r=hiro
MozReview-Commit-ID: 4oAzC6m2vie
2017-02-10 15:51:00 +08:00
Boris Chiou
21b309988b Bug 1337313 - Part 3: Rename Servo_AnimationValues_XXX with Servo_AnimationValue_XXX. r=hiro
MozReview-Commit-ID: 7sAEBtR8BQq
2017-02-10 12:03:08 +08: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
2c2e0bce5b Bug 1335942 - Part 6: Implement GetScaleValue for RawServoAnimationValue. r=hiro,manishearth
MozReview-Commit-ID: GnaS44gWmm2
2017-02-06 17:54:49 +08:00
Boris Chiou
d1fd8dc56d Bug 1335942 - Part 5: Add AnimationValue::GetScaleValue(). r=hiro
Move the common part of GetScaleValue into nsStyleTransformMatrix, and add a
new method, GetScaleValue, on AnimationValue, which can get the scale value from
StyleAnimationValue or RawServoAnimationValue.

MozReview-Commit-ID: 4spi1LkZrWP
2017-02-06 16:32:21 +08:00
Boris Chiou
347fe45076 Bug 1335942 - Part 3: Use AnimationValue as the argument in layers::SetAnimatable. r=hiro,manishearth
MozReview-Commit-ID: 4XnLL6I291q
2017-02-08 11:31:15 +08: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
f4d287d335 Bug 1335942 - Part 1: Introduce mozilla::AnimationValue. r=hiro,manishearth
Currently, we have StyleAnimationValue for Gecko and
RawServoAnimationValue for Servo, and use this struct to wrap them to
avoid the duplicated code.

MozReview-Commit-ID: ATDBSCOX2C5
2017-02-08 11:00:36 +08:00
Manish Goregaokar
67a7f92268 Bug 1317208 - Stylo: Store servo computed values for animation properties; r=birtles,heycam
MozReview-Commit-ID: IoQLN5tdIBw
2016-11-30 17:34:54 -08:00
Xidorn Quan
1f17806a81 Bug 1326125 - Rename enum version of SetIntValue to SetEnumValue. r=heycam
MozReview-Commit-ID: EbXK827IRFP
2016-12-29 10:22:49 +11:00
Hiroyuki Ikezoe
e84cd6194f Bug 1311620 - Part 4: Implement keyframe composite(add). r=birtles
This patch also fixes expected computed offset values in frame at 0.5 offset for
add composite.

MozReview-Commit-ID: 8PNp237NoV4
2016-12-24 19:54:27 +09:00
Brian Birtles
a819db7bf1 Bug 1322589 - Correct description of StyleAnimationValue::Accumulate; r=hiro
MozReview-Commit-ID: 39gWkeIs11F
2016-12-08 14:45:57 -10:00
Hiroyuki Ikezoe
06e0ac11c7 Bug 1304886 - Part 3: Move InterpolateTransformMatrix into nsStyleTransformMatrix. r=boris
MozReview-Commit-ID: 7GV6B7AwNcg
2016-11-16 20:32:32 +09:00
Hiroyuki Ikezoe
723ccec4d8 Bug 1304886 - Part 1: Make StyleAnimationValue::Accumulate() infallible. r=birtles
MozReview-Commit-ID: 9ve3k6a3eAg
2016-11-16 20:32:26 +09:00
Manish Goregaokar
486ae2d4e5 Bug 1314200 - stylo: support transform; r=heycam
MozReview-Commit-ID: 50YhZtjF3vH
2016-10-31 16:30:43 -07:00
Boris Chiou
5e5fbf62e9 Bug 1272549 - Part 9: Compute distance for mismatched transform lists. r=birtles
MozReview-Commit-ID: JJWcMgj88GX
2016-10-05 15:36:16 +08:00
Xidorn Quan
81893e7dfe Bug 1309109 part 3 - Rename ServoDeclarationBlock to RawServoDeclarationBlock. r=heycam
So that the new subclass of DeclarationBlock could just be
ServoDeclarationBlock.

MozReview-Commit-ID: 55KgfmWmmyU
2016-10-18 15:29:03 +11:00
Sebastian Hengst
7305938aa8 Merge mozilla-central to autoland 2016-10-05 17:15:26 +02:00
Brian Birtles
66918342ce Bug 1302949 - Compute StyleAnimationValue objects from servo declaration blocks; r=heycam
MozReview-Commit-ID: 6Am1FRC9uV0
2016-09-16 11:08:44 +09:00
Hiroyuki Ikezoe
2fd75567bd Bug 1304922 - Part 12: Add move assignment operator for StyleAnimationValue. r=birtles
MozReview-Commit-ID: dvAx8eViRR
2016-10-05 14:58:09 +09:00
Xidorn Quan
b02699f29d Bug 1299741 part 7 - Support storing ComplexColor in nsCSSValue and StyleAnimationValue. r=heycam
This is a complete rewrite of the original part 8. Instead of storing
the ratio in mValueExtra, all values are stored in a struct in heap,
so that we support range outside [0.0, 1.0] in computation.

MozReview-Commit-ID: 7xUZSgQE5vA
2016-09-16 15:30:35 +10:00
Xidorn Quan
2c6d50d57a Bug 1299741 part 6 - Use RGBAColorData for color calculation in StyleAnimationValue. r=birtles
This makes it easier for reusing code for calculating ComplexColor.

Note that this patch also includes two fixes to the logic:
1. Fix the condition on when DiluteColor should be called instead of
   AddWeightedColors. See discussion in bug 1216843 comment 199 to 204.
2. Simplify DiluteColor to not using premultiplied color. See discussion
   in bug 1216843 comment 205 to 206.

MozReview-Commit-ID: DOXMpDkwhAK
2016-09-16 15:36:39 +10:00
Xidorn Quan
43e8d0963f Bug 1299741 part 1 - Factor out ComputeColorDistance. r=birtles
MozReview-Commit-ID: HojkuHyqWoT
2016-08-30 11:41:14 +10:00
Hiroyuki Ikezoe
e63da2b1c6 Bug 1216843 - Part 3: Use nsCSSValue instead of nscolor to store over 1.0 color components as an accumulated value so that we can correctly calculate intermediate values in interpolation. r=dholbert
MozReview-Commit-ID: GYdqYZA4xXf
2016-09-13 11:48:44 +09:00
Hiroyuki Ikezoe
68331a33cc Bug 1216843 - Part 2: Implement effect iteration composition. r=birtles, r=smaug
MozReview-Commit-ID: 6u7WtXwL3y3
2016-09-13 11:48:44 +09:00
Jeremy Chen
43a4f4efc9 Bug 1297306 - part4:rename IsEnumFittingWithin with EnumTypeFitsWithin and move it to mfbt/EnumTypeTraits.h. r=froydnj
With this change, we could share this EnumTypeTraits between files easily.

MozReview-Commit-ID: 9Q2augati7l
2016-09-07 10:20:16 +08:00
Nicholas Nethercote
177f76c5cc Bug 1298722 - Use MOZ_MUST_USE in StyleAnimationValue. r=birtles. 2016-08-30 16:10:59 +10: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
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
Cameron McCormack
547ed4efcb Bug 1290023 - Allow enum class values to be passed to other nsCSSProps methods and stored in nsCSSValue/StyleAnimationValue. r=xidorn
MozReview-Commit-ID: 62usVamI3GA
2016-07-29 16:18:48 +08:00
Xidorn Quan
90f7282451 Bug 1269975 part 1 - Move nsCSSProps::EnabledState to a top level enum class mozilla::CSSEnabledState. r=heycam
MozReview-Commit-ID: 3KH5cqDFzUI
2016-05-10 18:44:05 +10:00
Ryan VanderMeulen
39f3eff072 Backed out 4 changesets (bug 1269975) for bustage.
Backed out changeset a55ecedea260 (bug 1269975)
Backed out changeset 5321545b938c (bug 1269975)
Backed out changeset 7e4a2ee61ef3 (bug 1269975)
Backed out changeset d181f8e7e4c3 (bug 1269975)
2016-05-10 00:08:54 -04:00
Xidorn Quan
38e4a7340d Bug 1269975 part 1 - Move nsCSSProps::EnabledState to a top level enum class mozilla::CSSEnabledState. r=heycam
MozReview-Commit-ID: 3KH5cqDFzUI
2016-05-10 13:36:25 +10:00
Jonathan Watt
1da20efc5f Bug 1266868, part 1 - Fix nsCSSValue::Array leaks in the StyleAnimationValue code. r=dholbert 2016-05-02 18:39:23 +01:00
Markus Stange
94cd9c9960 Bug 550426 - Add support for {background,mask}-position-{x,y}, StyleAnimation changes. r=dbaron
MozReview-Commit-ID: 8Qb0asWMgVA
2016-04-21 20:23:35 -04:00
Wes Kocher
1a290e54b0 Backed out 10 changesets (bug 550426) for failures in browser_css_autocompletion.js
Backed out changeset 6ff2e12738ca (bug 550426)
Backed out changeset 10ee68fd318e (bug 550426)
Backed out changeset 324f4f602730 (bug 550426)
Backed out changeset 81306e78ccaa (bug 550426)
Backed out changeset 44b820f6fb3d (bug 550426)
Backed out changeset 987b6ff7262e (bug 550426)
Backed out changeset d505646974c7 (bug 550426)
Backed out changeset 2162ecc18859 (bug 550426)
Backed out changeset 1a030aba3acc (bug 550426)
Backed out changeset 3655883e7faf (bug 550426)

MozReview-Commit-ID: AlUihrLtlhL
2016-04-29 14:47:43 -07:00
Markus Stange
96a62345d1 Bug 550426 - Add support for {background,mask}-position-{x,y}, StyleAnimation changes. r=dbaron
MozReview-Commit-ID: 8Qb0asWMgVA
***
2016-04-21 20:23:35 -04:00
Xidorn Quan
60633d5469 Bug 1260543 - Treat currentcolor as computed value which is not interpolatable with actual color for text-emphasis-color and -webkit-text-fill-color. r=birtles
MozReview-Commit-ID: GUXEDHxOdNC
2016-04-08 13:43:09 +10:00