We have ServoCSSParser class, and I think it's better to move those
Servo FFI into this class to avoid including ServoBindings.h everywhere.
MozReview-Commit-ID: 6orXtddp9ZU
--HG--
extra : rebase_source : 6da4158c4fec606aaee49fddee3192f94d6c85a3
Some Gecko style system files are modified to prevent assertions and
crashing, and to keep test failures on stylo disabled builds to minimum.
MozReview-Commit-ID: GuxAeCTz0xx
--HG--
extra : rebase_source : 2342085d13a50535836be46d75a731641d0fc49e
Some Gecko style system files are modified to prevent assertions and
crashing, and to keep test failures on stylo disabled builds to minimum.
MozReview-Commit-ID: GuxAeCTz0xx
--HG--
extra : rebase_source : 97c8b3900e4492ac03158a38aa03f7c044b71e0f
This follows from the previous patch; these values feed into UpdateMinMaxScale
as well, which explicitly wants to use floats, so there's no point in creating
doubles. The source of this information is also a float-based matrix.
MozReview-Commit-ID: LPk4Xm9AaJJ
--HG--
extra : rebase_source : d7714755fb1078880133d6f044cc9bc7743439ee
We will use Servo backend on the compositor, so implement this for opacity.
MozReview-Commit-ID: BeWR2nBSbjb
--HG--
extra : rebase_source : eb5db3cf04640a83f13857984e792a949f26bcc7
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
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
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
Also if |aCoeff1| is zero, we can just ignore the first list altogether.
MozReview-Commit-ID: LVZmAx0K574
--HG--
extra : rebase_source : f4419131590befde2a616d2e47785024f90f0719
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
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
AnimationValue::FromString compute the AnimationValue from a string.
MozReview-Commit-ID: CX8wairpnfN
--HG--
extra : rebase_source : 05dbaa84bf40463a0021bd538d7baba5d591f992
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
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
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
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
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