Implements svg related discrete animatable properties

This commit is contained in:
daisuke 2017-05-29 16:12:35 +09:00
parent 23e673f2a2
commit 1a915fa07c
2 changed files with 6 additions and 25 deletions

View file

@ -4049,27 +4049,8 @@ clip-path
skip_additionals="*">
<% impl_common_image_layer_properties("mask") %>
<%self:simple_image_array_property name="mode" shorthand="mask" field_name="mMaskMode">
use properties::longhands::mask_mode::single_value::computed_value::T;
match servo {
T::alpha => structs::NS_STYLE_MASK_MODE_ALPHA as u8,
T::luminance => structs::NS_STYLE_MASK_MODE_LUMINANCE as u8,
T::match_source => structs::NS_STYLE_MASK_MODE_MATCH_SOURCE as u8,
}
</%self:simple_image_array_property>
<%self:simple_image_array_property name="composite" shorthand="mask" field_name="mComposite">
use properties::longhands::mask_composite::single_value::computed_value::T;
match servo {
T::add => structs::NS_STYLE_MASK_COMPOSITE_ADD as u8,
T::subtract => structs::NS_STYLE_MASK_COMPOSITE_SUBTRACT as u8,
T::intersect => structs::NS_STYLE_MASK_COMPOSITE_INTERSECT as u8,
T::exclude => structs::NS_STYLE_MASK_COMPOSITE_EXCLUDE as u8,
}
</%self:simple_image_array_property>
<% impl_simple_image_array_property("mode", "mask", "mMask", "mMaskMode", "SVG") %>
<% impl_simple_image_array_property("composite", "mask", "mMask", "mComposite", "SVG") %>
<% impl_shape_source("clip_path", "mClipPath") %>
</%self:impl_trait>

View file

@ -67,7 +67,7 @@ ${helpers.single_keyword("mask-mode",
"match-source alpha luminance",
vector=True,
products="gecko",
animation_value_type="none",
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="none" extra_prefixes="webkit"
@ -104,7 +104,7 @@ ${helpers.single_keyword("mask-clip",
products="gecko",
extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox",
animation_value_type="none",
animation_value_type="discrete",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-clip")}
${helpers.single_keyword("mask-origin",
@ -114,7 +114,7 @@ ${helpers.single_keyword("mask-origin",
products="gecko",
extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox",
animation_value_type="none",
animation_value_type="discrete",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-origin")}
<%helpers:longhand name="mask-size" products="gecko" animation_value_type="ComputedValue" extra_prefixes="webkit"
@ -139,7 +139,7 @@ ${helpers.single_keyword("mask-composite",
vector=True,
products="gecko",
extra_prefixes="webkit",
animation_value_type="none",
animation_value_type="discrete",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-composite")}
${helpers.predefined_type("mask-image", "ImageLayer",