Manish Goregaokar
6415294fd5
Fix unit tests
2017-11-02 14:30:15 -07:00
Boris Chiou
b89286e8e7
Use CSSPixelLength in LengthOrPercentage{*}.
...
Replace Au with CSSPixelLength in LengthOrPercentage,
LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
2017-09-13 18:10:46 +08:00
Boris Chiou
535c1e3c6f
Replace Au with CSSPixelLength in CalcLengthOrPercentage.
...
We replace Au with CSSPixelLength for the length part of
computed::CalcLengthOrPercentage. Therefore, it would be easier to use
CSSPixelLength for all other LengthOrPercentage{*} types.
2017-09-13 18:10:39 +08:00
Boris Chiou
a949e2a057
Introduce CSSPixelLength and update NonNegativeLength.
...
First, we define computed::CSSPixelLength which contains a CSSFloat, a
pixel value, and then we replace computed::Length with CSSPixelLength.
Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength,
FontRelativeLength, ViewportPercentageLength, CharacterWidth, and
PhysicalLength is CSSPixelLength.
Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength
with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
2017-09-13 18:05:14 +08:00
Anthony Ramine
aea0cd7ec7
Introduce values::animated::Animate
...
This replaces the Animatable trait and merges its three former methods into a single one.
2017-08-22 09:41:01 +02:00
DarkDrek
a5b585a5f1
Move Percentage from length.rs to mod.rs
2017-08-08 16:44:31 +02:00
Anthony Ramine
98bf832169
Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zero
2017-07-19 10:19:44 +02:00
Emilio Cobos Álvarez
310be02ba8
style: Respect calc for percentages.
2017-07-14 13:43:27 +02:00
Anthony Ramine
9ab0b9b4ac
Introduce ToAnimatedValue 🎥
2017-06-29 14:03:15 +02:00
Anthony Ramine
608e7f71a2
Make computed types hold Percentage instead of bare CSSFloat
2017-06-15 16:59:03 +02:00
Boris Chiou
a2a19f02ab
Add some unit tests for basic transform operations for Servo.
2017-06-07 13:04:06 +08:00
Xidorn Quan
61eb7e055f
Use animation_value_type in AnimatedProperty.
...
So that we can remove redundant interpolation code for corresponding
computed types.
2017-06-05 11:23:18 +10:00
Manish Goregaokar
1b9bac7e66
Bump cssparser to 0.13.3
2017-05-11 12:50:40 -07:00
Brian Birtles
4d25e87ac6
Rename the Interpolate trait to Animatable
2017-05-10 13:38:06 +09:00
Emilio Cobos Álvarez
0c102e2350
style: Unbox a bunch of color properties.
...
This builds on https://github.com/servo/rust-cssparser/pull/118 .
2017-02-14 20:18:31 +01:00
Hiroyuki Ikezoe
3320457c07
Interpolate colors with premultiplied alpha.
...
We need to clamp each interpolated values because some cubic-bezier functions
produce values that are out of range [0, 1].
2016-12-28 09:18:22 +09:00