Граф коммитов

250 Коммитов

Автор SHA1 Сообщение Дата
Boris Chiou 3788926119 Bug 1340005 - Part 6: Move AppendTransformFunction into AnimationValue struct. r=birtles
MozReview-Commit-ID: KhjKXxkllEF

--HG--
extra : rebase_source : 6f22a5f0a90f3f3d160f64c67e6fd6d04a2c1441
2017-10-17 13:11:19 +08:00
Boris Chiou 0129bb4f52 Bug 1340005 - Part 4: Retrieve transform list from AnimationValue. r=birtles
MozReview-Commit-ID: 82NAOBV2rEl

--HG--
extra : rebase_source : 073ff742dcea4573febeec3b57c60b0f1f5736e2
2017-09-25 14:25:43 +08:00
Boris Chiou 743614effe Bug 1340005 - Part 3: Use AnimationValue on the compositor thread. r=birtles
MozReview-Commit-ID: CtnDLsdcr9x

--HG--
extra : rebase_source : 3d4a0f40e2f522471555c04c88474cb08e082851
2017-09-21 17:01:48 +08:00
Boris Chiou 7086921688 Bug 1340005 - Part 2: Implement AnimationValue::Transform. r=birtles
MozReview-Commit-ID: BDKcpDIM9nb

--HG--
extra : rebase_source : 43a5e7f053d746198f422487f7e19f535ccd9dc5
2017-10-27 21:06:30 +02:00
Boris Chiou 701609334e Bug 1340005 - Part 1: Implement AnimationValue::Opacity. r=birtles
We will use Servo backend on the compositor, so implement this for opacity.

MozReview-Commit-ID: BeWR2nBSbjb

--HG--
extra : rebase_source : eb5db3cf04640a83f13857984e792a949f26bcc7
2017-10-27 21:04:52 +02:00
Ting-Yu Lin d944131798 Bug 1404243 Part 3 - Remove refcount for StyleBasicShape, and use UniquePtr to hold it. r=heycam
After StyleBasicShape is set to StyleShapeSource, it's life cycle never go
beyond StyleShapeSource, so I make StyleBasicShape hold by a UniquePtr in
StyleShapeSource.

Also, replace all raw pointers to StyleBasicShape by UniquePtr in all APIs.

MozReview-Commit-ID: 1MfIFjP8TsQ

--HG--
extra : rebase_source : bdbbd47de57e0bc610e37913752ab8413f62588a
2017-09-25 18:50:24 +08:00
Ting-Yu Lin 90a32588be Bug 1281101 Part 1 - Remove MOZ_ENABLE_MASK_AS_SHORTHAND from layout code. r=cjku
MozReview-Commit-ID: HWq2IOLsflD

--HG--
extra : rebase_source : eb5c3db6e2d88164bcd6a86448c4ad04cd251c93
2017-09-21 17:36:57 +08:00
Ting-Yu Lin 59d3f6d123 Bug 1289049 Part 4 - Make <basic-shape> animatable for shape-outside for gecko style system. r=boris
MozReview-Commit-ID: 7x0jdqWqkpL

--HG--
extra : rebase_source : e79a0ca24fb929f80d305adf164329ae0f44690f
2017-09-19 17:21:21 +08:00
Ting-Yu Lin 31e158966d Bug 1289049 Part 2 - Extract a helper function ExtractComputedValueFromShapeSource(). r=boris
MozReview-Commit-ID: IhHaKhQTWbo

--HG--
extra : rebase_source : 13b716916a16b6030c566921fc15b285a158e53c
2017-09-19 17:20:14 +08:00
Ting-Yu Lin 28602b96b1 Bug 1289049 Part 1 - Use shape source instead of clip path in naming. r=boris
This function can be used to implement animation for <basic-shape> for
shape-outside, so I remove the clip path in naming to make it more general.

MozReview-Commit-ID: LwVe0Dk5Web

--HG--
extra : rebase_source : eb0136c79b494222cca38ebd68d62f3f825bd29e
2017-09-19 16:59:38 +08:00
Mantaroh Yoshinaga 4c7997db68 Bug 1390352 - Make Servo_AnimationValues_ComputeDistance return negative value instead of 0.0 when the function fails to distinguish its failure. r=hiro
We need to check whether the function fails or not in order to check whether
we support the specified paced animation values.

Current servo returns 0.0 when failed computing distance, so servo doesn't
distinguish its failure. This patch makes Servo_AnimationValue_ComputeDistance
return a negative value when the function fails.

MozReview-Commit-ID: 43Q4gu4xwHc

--HG--
extra : rebase_source : fa159b4b03e2e84c0a365455de4c0d2cf5d4f2ce
2017-08-24 10:21:14 +09:00
Boris Chiou d8f7b71ccb Bug 1362896 - Part 1: Fix the computation of distance for non-normalizable direction vector of rotate3d. r=birtles
MozReview-Commit-ID: GuT9vocccuN
2017-08-18 22:17:41 +08:00
Brad Werth d073eb9bda Bug 1383296 Part 1: Remove all uses of the nsCSSValue::Serialization enum, now that it no longer has multiple values. r=heycam
MozReview-Commit-ID: n6px5hNHtB

--HG--
extra : rebase_source : 6269a9d52e0282d0391276dc1b9ee26dbde7b985
2017-07-21 17:26:35 -07:00
Hiroyuki Ikezoe ead0069e9b Bug 1383493 - Make AddDifferentTransformLists() add |aCoeff1| instead of just adding 1 to |aCoeff2| for the same list case. r=birtles
Also if |aCoeff1| is zero, we can just ignore the first list altogether.

MozReview-Commit-ID: LVZmAx0K574

--HG--
extra : rebase_source : f4419131590befde2a616d2e47785024f90f0719
2017-07-27 06:46:33 +09:00
Emilio Cobos Álvarez 2b7de51623 Bug 1381844: Be more explicit about the kind of style context we handle all the time. r=bholley
MozReview-Commit-ID: E0mdkhU3XBz
2017-07-22 18:02:57 +02:00
Emilio Cobos Álvarez 9a6ef770c1 Bug 1381764: Cleanup the Gecko bits. r=manishearth
MozReview-Commit-ID: dbVDy1u4vp
2017-07-18 16:22:00 -07:00
Mantaroh Yoshinaga 704c140ee1 Bug 1374564 - Skip serialize shadow's fourth value when property is text-shadow or drop-shadow of filter. r=hiro
MozReview-Commit-ID: CoZj0WPCL8w

--HG--
extra : rebase_source : 45730cebe6e9da5b0617f74369e575b2c32a4911
2017-06-30 15:11:33 -07:00
Markus Stange 579f0e24a9 Bug 1370034 - Add CSS properties -moz-window-transform and -moz-window-transform-origin, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: BlLMswF0bKO

--HG--
extra : rebase_source : c064a2774f352ca2a3b0139e8a8f657c3a4ea1d8
extra : source : 6bd03efee80afb048db2e51777a8e5ff6db80dc4
2017-06-19 01:44:22 -04:00
Cameron McCormack 1849ea4995 Backout bug 1291457 and bug 1370034 for bustage. 2017-06-19 13:55:15 +08:00
Markus Stange f3b2407d70 Bug 1370034 - Add CSS properties -moz-window-transform and -moz-window-transform-origin, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: BlLMswF0bKO

--HG--
extra : rebase_source : 170e4db9ad8b285f7575e39109517cb6acef8733
extra : source : 6bd03efee80afb048db2e51777a8e5ff6db80dc4
2017-06-19 00:21:16 -04:00
Manish Goregaokar 3188b9bfd6 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA

--HG--
extra : rebase_source : e2f65c316be2c5640150eb5ff5628505ce446535
2017-06-10 22:27:45 -07:00
Manish Goregaokar 02ab46c24d Bug 1373018 - Part 8: stylo: Move nsStyleContext::SetStyle to GeckoStyleContext; r=bholley
MozReview-Commit-ID: ycXu95whnG

--HG--
extra : rebase_source : 852051aa074cc8ed8f11f0d68c26fe4f0a6962b6
2017-06-10 22:27:45 -07:00
Manish Goregaokar 828745da04 Bug 1373018 - Part 7: stylo: Move nsStyleContext::mSource into subclasses; r=bholley
MozReview-Commit-ID: AspYUJ7lGqD

--HG--
extra : rebase_source : 1f8d368312bd8149f32efc31130f4bf6659064ed
2017-06-10 22:27:45 -07:00
Brian Birtles f7f386ac4e Bug 1371196 - Round font-weight when interpolating, don't floor; r=hiro
The spec says,

 font weight: interpolated via discrete steps (multiples of 100). The
 interpolation happens in real number space and is converted to an integer by
 rounding to the nearest multiple of 100, with values halfway between
 multiples of 100 rounded towards positive infinity.[1]

However, our implementation pre-dates this spec text (bug 528234 landed Nov 2009
whereas the spec was updated in Mar 2012[2]).

This patch rounds the result by simply adding 50 to the result before we floor
it (which is good enough in this case because we don't need to worry about
negative values).

It also slightly simplifies the logic by re-using Clamp from MathAlgorithms.h.

[1] https://drafts.csswg.org/css-transitions/#animtype-font-weight
[2] 00c6286109

MozReview-Commit-ID: BjCg7MG70hW

--HG--
extra : rebase_source : 879ea18d7d1a49ff425d6e467081983a130a65e3
2017-06-09 12:19:47 +09:00
Hiroyuki Ikezoe c875d87482 Bug 1367293 - Don't get parent style for ComputeAnimationValue. r=birtles
MozReview-Commit-ID: 4TskjmoKchD

--HG--
extra : rebase_source : ab70bae076380fea2bb84bdcb35adaae4aa07437
2017-06-02 09:38:46 +09:00
Hiroyuki Ikezoe 696f9294bb Bug 1367293 - Get parent style from the target element. r=birtles
We can get the parent style from element tree in servo side.
The parent style has been already restyled.
E.g.;
 When we get target element style with nsComputedDOMStyle::GetStyleContext,
 the function flushes styles so that the parent style has also
 restyled.

 When we call Servo_GetComputedKeyframeValues, it's called from a
 SequentialTask, that means all elements have been already restyled.

Unfortunately we can't assert that the parent style is not stale
to check the parent element has no dirty descendant bit since
Servo_GetComputedKeyframeValues is called in a SequantialTask
that is processed before post traversal, that means elements
still have the dirty bit to update nsStyleContext in the
post traversal.

MozReview-Commit-ID: AC2ZRyzk3eu

--HG--
extra : rebase_source : b0ae8b52bb2daca6e634b66ffdfd41ffc3fa7b86
2017-06-02 09:38:22 +09:00
Brian Birtles 208d409a42 Bug 1366627 - Make accumulation of transform lists with 'none' behave in the same way as interpolation; r=hiro
MozReview-Commit-ID: LITXkeYN1VR

--HG--
extra : rebase_source : bdda1f30c8fa8f6ede210b2007c0f59c29804a83
2017-05-22 09:35:10 +09:00
Boris Chiou 7c0868e25d Bug 1346052 - Part 3: Implement AnimationValue::FromString. r=birtles
AnimationValue::FromString compute the AnimationValue from a string.

MozReview-Commit-ID: CX8wairpnfN

--HG--
extra : rebase_source : 05dbaa84bf40463a0021bd538d7baba5d591f992
2017-05-03 11:15:27 +08:00
Boris Chiou b3ceb979ce Bug 1346052 - Part 2: Implement AnimationValue::ComputeDistance. r=birtles
We will use this API to compute the distance between two AnimationValues
in the patch series.

MozReview-Commit-ID: 2Tw9xumuz45

--HG--
extra : rebase_source : 298baaf597a81e03191a0468f9d7509e092a5e78
2017-04-26 20:05:04 +08:00
Robert Longson 0c1b6c1fcc Bug 1347409 part 2 - serialise fill and stroke fallback properly r=cam 2017-05-02 22:12:59 +01:00
Mantaroh Yoshinaga 46f5f1d742 Bug 1359281 - Use rounded interpolation value when interpolating the Integer type and Font strech type based on spec. r=birtles
MozReview-Commit-ID: L4aP8MqYpna

--HG--
extra : rebase_source : 350b57c9ee7dbcd0b0261e155191244e64ed3528
2017-05-01 11:07:50 +09:00
Boris Chiou fb53a02a99 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

--HG--
extra : rebase_source : 544d9db1b0d377006ae42b1242dc064bd5fa65d2
2017-04-12 16:26:59 +08:00
Boris Chiou f4f6aed21d 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

--HG--
extra : rebase_source : df49fdf39811dcd1661cc815dbf0b1bc192f9d81
2017-03-09 12:33:15 +08:00
Boris Chiou cce4aeb6b8 Bug 1352067 - Part 2: Avoid passing any nullptr into Servo_AnimationValue_DeepEqual. r=hiro
The FFI type conversion in AnimationValue::as_arc will check if the
parameter is nullptr or not. If it is, we will get a debug assertion, so
we shouldn't pass a nullptr into it.

MozReview-Commit-ID: KWko2ipJwbo

--HG--
extra : rebase_source : f3e284da008b6c3bb3c56eb26c485f825b1188a7
2017-03-31 11:04:08 +08:00
Boris Chiou a583863fc8 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

--HG--
extra : rebase_source : 8ef99c659f2721c8425364051db19b66536bccc6
2017-03-31 17:46:37 +08:00
cku cfc6e5755f Bug 1336905 - Part 1. Remove StyleShapeSource's template argument. r=heycam,TYLin
MozReview-Commit-ID: FHTwGyXHsce

--HG--
extra : rebase_source : c043e4790bc2c84e4f3735a95c8ef0d9aa268986
extra : source : fb3c04effbd191767b1ff3e46c3c2d416ac8ee37
2017-02-21 23:26:17 +08:00
Boris Chiou 921bec7548 Bug 1338087 - Part 2: Drop the computation of StyleAnimationValue on stylo. r=hiro
MozReview-Commit-ID: 4oAzC6m2vie

--HG--
extra : rebase_source : 139674c8059a918b6850b74e4bdeb8a49b4a2571
2017-02-10 15:51:00 +08:00
Daniel Holbert f8a884b751 Bug 1339546 part 2: Make layout/style/*.cpp include corresponding .h file as the first header. r=xidorn
MozReview-Commit-ID: 2rZ9z0BgRvN

--HG--
extra : rebase_source : d046a915283dd45ec8ff39f1b63da8ae59d3fac8
2017-02-14 11:23:11 -08:00
Carsten "Tomcat" Book d49b3f08d6 Backed out changeset fb3c04effbd1 (bug 1336905) for bustage in stylo builds 2017-02-14 11:07:17 +01:00
cku 80f22f74f4 Bug 1336905 - Part 1. Remove StyleShapeSource's template argument. r=heycam,TYLin
MozReview-Commit-ID: FHTwGyXHsce

--HG--
extra : rebase_source : e1346a2ec89d023b2aa0c2cd5ced94529b7f9067
2017-02-06 15:50:22 +08:00
Boris Chiou 8372c2c7f8 Bug 1335942 - Part 6: Implement GetScaleValue for RawServoAnimationValue. r=hiro,manishearth
MozReview-Commit-ID: GnaS44gWmm2

--HG--
extra : rebase_source : 58ee6837c730fd7e54b75e52e48b3f77c8cb805a
2017-02-06 17:54:49 +08:00
Boris Chiou 93878e807e 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

--HG--
extra : rebase_source : 81e352edb85c9abb16fb0ef2780ff27c4f264709
2017-02-06 16:32:21 +08:00
Boris Chiou 13d39b9757 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

--HG--
extra : rebase_source : 85991ef5e23a445ae6302264508d1c06a46c0e29
2017-02-08 11:00:36 +08:00
Xidorn Quan c3e6a81bc4 Bug 1316236 - Treat perspective(0) as perspective(infinity). r=dholbert
MozReview-Commit-ID: H9xlpjxrzht

--HG--
extra : rebase_source : 5060ae56163446a9dd6ae816c548ecd987a6e33e
2017-01-20 12:45:33 +11:00
Hiroyuki Ikezoe bcd83bc12f Bug 1330513- Check that mCSSValueList is null in case of filter and shadow in StyleAnimationValue::Add(). r=boris
The StyleAnimationValue for filter and shadow has no mCSSValueList in case of
initial style.

MozReview-Commit-ID: JigQQBbx77x

--HG--
extra : rebase_source : b2bb513424a7d089c8dfb6b880dd7c7239280efb
2017-01-12 19:42:14 +09:00
Ting-Yu Lin 160ed71c4e Bug 1320014 Part 11 - Convert NS_FULL_TO_HALF_CORNER to a constexpr function. r=mats
Because the new function checks types, we need to change the fullCorner type
in nsComputedDOMStyle::GetEllipseRadii() and
StyleAnimationValue::ExtractComputedValue() from uint8_t to |Corner| to fix
build error.

MozReview-Commit-ID: 5NuFE3yA2QD

--HG--
extra : rebase_source : 8f94209b24bd909839358cd502f462edb9ce3116
2017-01-05 14:59:17 +08:00
Ting-Yu Lin 2dada2d6e0 Bug 1320014 Part 6 - Remove #define NS_CORNER_[TOP_LEFT/TOP_RIGHT/BOTTOM_RIGHT/BOTTOM_LEFT] r=mats
MozReview-Commit-ID: ERAwdxKZPf7

--HG--
extra : rebase_source : 53eb8d15ecd0d9d8fd0c7b88872b210b54104725
2017-01-04 18:15:30 +08:00
Wes Kocher 0f254a30d6 Merge inbound to central, a=merge
MozReview-Commit-ID: 1ij6nLf8f8s
2017-01-05 17:30:35 -08:00
Hiroyuki Ikezoe 0e03cf5f82 Bug 1328535 - Remove range-checking assertion for aDilutionRatio, in color animation code. r=dholbert
Some cubic-bezier functions, e.g. cubic-bezier(0,-0.5,0,0), produce values out
of range of [0, 1].

MozReview-Commit-ID: 9ZTsTRTcUaI

--HG--
extra : rebase_source : 7edf0c4d2702a502a9c0422be83ce7229751e815
2017-01-05 09:05:57 +09:00
Boris Zbarsky 85a6ca2630 Bug 1298588 part 10, gecko piece. Pass through useful default styles to apply_declarations(). r=bholley 2017-01-04 14:52:27 -05:00