diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2016-08-15 15:16:06 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-08-18 11:38:40 +0530 |
commit | 1d32422fe85955b6cb9082047af60588c0dd600c (patch) | |
tree | acfc6dac859d311a04b53168d2d28e3b7de05f83 | |
parent | 254900bd1afa0927fc35ebf38786729b62378d67 (diff) | |
download | servo-1d32422fe85955b6cb9082047af60588c0dd600c.tar.gz servo-1d32422fe85955b6cb9082047af60588c0dd600c.zip |
Add clip-path
-rw-r--r-- | components/style/properties/longhand/svg.mako.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/components/style/properties/longhand/svg.mako.rs b/components/style/properties/longhand/svg.mako.rs index 49dd2bdbdac..3d0c5cc48aa 100644 --- a/components/style/properties/longhand/svg.mako.rs +++ b/components/style/properties/longhand/svg.mako.rs @@ -49,3 +49,31 @@ ${helpers.predefined_type( // https://www.w3.org/TR/css-masking-1/ ${helpers.single_keyword("mask-type", "luminance alpha", products="gecko", animatable=False)} + +<%helpers:longhand name="clip-path" animatable="False" products="gecko"> + use cssparser::ToCss; + use std::fmt; + use values::LocalToCss; + use values::NoViewportPercentage; + use values::specified::basic_shape::{ShapeSource, GeometryBox}; + + pub mod computed_value { + use app_units::Au; + use values::computed::basic_shape::{ShapeSource, GeometryBox}; + + pub type T = ShapeSource<GeometryBox>; + } + + pub type SpecifiedValue = ShapeSource<GeometryBox>; + + #[inline] + pub fn get_initial_value() -> computed_value::T { + Default::default() + } + + pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> { + ShapeSource::parse(context, input) + } + + impl NoViewportPercentage for SpecifiedValue {} +</%helpers:longhand> |