Bug 1376495 - Part 3: Make clip-path animatable.
MozReview-Commit-ID: yxTh9Q9B82
--- a/servo/components/style/properties/longhand/svg.mako.rs
+++ b/servo/components/style/properties/longhand/svg.mako.rs
@@ -52,22 +52,31 @@
spec="https://www.w3.org/TR/SVG/filters.html#LightingColorProperty")}
// CSS Masking Module Level 1
// https://drafts.fxtf.org/css-masking
${helpers.single_keyword("mask-type", "luminance alpha",
products="gecko", animation_value_type="discrete",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-type")}
+<% initial_clip_path_value = "::values::generics::basic_shape::ShapeSource::None" %>
${helpers.predefined_type("clip-path", "basic_shape::ClippingShape",
- "generics::basic_shape::ShapeSource::None",
+ initial_clip_path_value,
products="gecko", boxed="True",
- animation_value_type="none", flags="CREATES_STACKING_CONTEXT",
+ animation_value_type="ComputedValue",
+ flags="CREATES_STACKING_CONTEXT",
spec="https://drafts.fxtf.org/css-masking/#propdef-clip-path")}
+use values::computed::basic_shape::ClippingShape;
+impl ::values::animated::ToAnimatedZero for ClippingShape {
+ fn to_animated_zero(&self) -> Result<Self, ()> {
+ Ok(${initial_clip_path_value})
+ }
+}
+
${helpers.single_keyword("mask-mode",
"match-source alpha luminance",
vector=True,
products="gecko",
animation_value_type="discrete",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-mode")}
<%helpers:vector_longhand name="mask-repeat" products="gecko" animation_value_type="discrete" extra_prefixes="webkit"