mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Make offset-path: path() animatable.
Here, we change the animation type of offset-path as ComputedValue, so we could do animation on it. Also enable the wpt for offset-path interpolation. In test_transition_per_property.html, we add some basic tests ifor offset-path. ToAnimatedZero for PathCommand will be dropped later. Because the animations of arcs with mismatched flags are fallen back to discrete animations, the result of getComputedValue is not normalized in this case. This makes some wpt failed even though the progress is 100%. Depends on D4786 Differential Revision: https://phabricator.services.mozilla.com/D4787
This commit is contained in:
parent
14911b96e0
commit
b0604c9be5
4 changed files with 75 additions and 5 deletions
|
@ -12,7 +12,8 @@ use values::specified::SVGPathData;
|
|||
/// The offset-path value.
|
||||
///
|
||||
/// https://drafts.fxtf.org/motion-1/#offset-path-property
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
|
||||
SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, ToCss)]
|
||||
pub enum OffsetPath {
|
||||
// We could merge SVGPathData into ShapeSource, so we could reuse them. However,
|
||||
// we don't want to support other value for offset-path, so use SVGPathData only for now.
|
||||
|
@ -20,6 +21,7 @@ pub enum OffsetPath {
|
|||
#[css(function)]
|
||||
Path(SVGPathData),
|
||||
/// None value.
|
||||
#[animation(error)]
|
||||
None,
|
||||
// Bug 1186329: Implement ray(), <basic-shape>, <geometry-box>, and <url>.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue