Bug 1376495 - Part 4: Make shape-outside animatable.
MozReview-Commit-ID: 14gCUkvp3f8
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -1900,23 +1900,31 @@
"all",
"auto",
])
}).map(SpecifiedValue::AnimateableFeatures)
}
}
</%helpers:longhand>
+<% initial_clip_path_value = "::values::generics::basic_shape::ShapeSource::None" %>
${helpers.predefined_type("shape-outside", "basic_shape::FloatAreaShape",
- "generics::basic_shape::ShapeSource::None",
+ initial_clip_path_value,
products="gecko", boxed="True",
- animation_value_type="none",
+ animation_value_type="ComputedValue",
flags="APPLIES_TO_FIRST_LETTER",
spec="https://drafts.csswg.org/css-shapes/#shape-outside-property")}
+use values::computed::basic_shape::FloatAreaShape;
+impl values::animated::ToAnimatedZero for FloatAreaShape {
+ fn to_animated_zero(&self) -> Result<Self, ()> {
+ Ok(${initial_clip_path_value})
+ }
+}
+
<%helpers:longhand name="touch-action"
products="gecko"
animation_value_type="discrete"
disable_when_testing="True"
spec="https://compat.spec.whatwg.org/#touch-action">
use gecko_bindings::structs;
use std::fmt;
use style_traits::ToCss;