From c6cdaaf1cfb430ff5769770915be9a4591f7a096 Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Fri, 2 Aug 2019 20:12:40 +0000 Subject: [PATCH] style: Make offset-anchor animatable. Per the spec issue, https://github.com/w3c/csswg-drafts/issues/3482, we update the wpt to keep the percentage in `calc()` for `offset-anchor`. Differential Revision: https://phabricator.services.mozilla.com/D39552 --- components/style/properties/longhands/box.mako.rs | 2 +- components/style/values/generics/position.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index 3dd1e419b526..cc464740e2e2 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -427,7 +427,7 @@ ${helpers.predefined_type( "PositionOrAuto", "computed::PositionOrAuto::auto()", engines="gecko", - animation_value_type="none", + animation_value_type="ComputedValue", gecko_pref="layout.css.motion-path.enabled", spec="https://drafts.fxtf.org/motion-1/#offset-anchor-property", servo_restyle_damage="reflow_out_of_flow", diff --git a/components/style/values/generics/position.rs b/components/style/values/generics/position.rs index 41ccf8a59531..2742dd879136 100644 --- a/components/style/values/generics/position.rs +++ b/components/style/values/generics/position.rs @@ -45,13 +45,16 @@ impl Position { /// This is used by for now. /// https://drafts.fxtf.org/motion-1/#offset-anchor-property #[derive( + Animate, Clone, + ComputeSquaredDistance, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, + ToAnimatedZero, ToComputedValue, ToCss, ToResolvedValue,