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:
Boris Chiou 2018-09-07 22:29:12 +00:00 committed by Emilio Cobos Álvarez
parent 14911b96e0
commit b0604c9be5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 75 additions and 5 deletions

View file

@ -406,3 +406,14 @@ where
))
}
}
impl<T> ToAnimatedZero for Box<[T]>
where
T: ToAnimatedZero,
{
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> {
let v = self.iter().map(|v| v.to_animated_zero()).collect::<Result<Vec<_>, _>>()?;
Ok(v.into_boxed_slice())
}
}