style: Refactor vector types.

This fixes clamping of mask-size and moves it out of mako while at it.

Bug: 1462829
Reviewed-by: hiro,xidorn
MozReview-Commit-ID: 9hiTe63odna
This commit is contained in:
Emilio Cobos Álvarez 2018-05-18 22:06:25 +02:00
parent 3016a7f552
commit 32c6d5b7c6
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
18 changed files with 259 additions and 372 deletions

View file

@ -103,6 +103,7 @@ ${helpers.predefined_type(
initial_specified_value="specified::PositionComponent::Center",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position",
animation_value_type="ComputedValue",
vector_animation_type="repeatable_list",
vector=True,
)}
% endfor
@ -126,26 +127,18 @@ ${helpers.single_keyword("mask-origin",
gecko_enum_prefix="StyleGeometryBox",
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"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-size">
use properties::longhands::background_size;
pub use ::properties::longhands::background_size::SpecifiedValue;
pub use ::properties::longhands::background_size::single_value as single_value;
pub use ::properties::longhands::background_size::computed_value as computed_value;
#[inline]
pub fn get_initial_value() -> computed_value::T {
background_size::get_initial_value()
}
pub fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<SpecifiedValue, ParseError<'i>> {
background_size::parse(context, input)
}
</%helpers:longhand>
${helpers.predefined_type(
"mask-size",
"background::BackgroundSize",
"computed::BackgroundSize::auto()",
initial_specified_value="specified::BackgroundSize::auto()",
products="gecko",
extra_prefixes="webkit",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-size",
animation_value_type="MaskSizeList",
vector=True,
vector_animation_type="repeatable_list",
)}
${helpers.single_keyword("mask-composite",
"add subtract intersect exclude",