mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
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:
parent
3016a7f552
commit
32c6d5b7c6
18 changed files with 259 additions and 372 deletions
|
@ -36,6 +36,7 @@ ${helpers.predefined_type("background-image", "ImageLayer",
|
|||
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-" + axis,
|
||||
animation_value_type="ComputedValue",
|
||||
vector=True,
|
||||
vector_animation_type="repeatable_list",
|
||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||
)}
|
||||
% endfor
|
||||
|
@ -76,13 +77,15 @@ ${helpers.single_keyword("background-origin",
|
|||
animation_value_type="discrete",
|
||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER")}
|
||||
|
||||
${helpers.predefined_type("background-size", "BackgroundSize",
|
||||
${helpers.predefined_type(
|
||||
"background-size",
|
||||
"BackgroundSize",
|
||||
initial_value="computed::BackgroundSize::auto()",
|
||||
initial_specified_value="specified::BackgroundSize::auto()",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-size",
|
||||
vector=True,
|
||||
vector_animation_type="repeatable_list",
|
||||
animation_value_type="BackgroundSizeList",
|
||||
need_animatable=True,
|
||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||
extra_prefixes="webkit")}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ ${helpers.predefined_type(
|
|||
None,
|
||||
vector=True,
|
||||
animation_value_type="AnimatedBoxShadowList",
|
||||
vector_animation_type="with_zero",
|
||||
extra_prefixes="webkit",
|
||||
ignored_when_colors_disabled=True,
|
||||
flags="APPLIES_TO_FIRST_LETTER",
|
||||
|
@ -45,6 +46,7 @@ ${helpers.predefined_type(
|
|||
vector=True,
|
||||
separator="Space",
|
||||
animation_value_type="AnimatedFilterList",
|
||||
vector_animation_type="with_zero",
|
||||
extra_prefixes="webkit",
|
||||
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
|
||||
spec="https://drafts.fxtf.org/filters/#propdef-filter",
|
||||
|
|
|
@ -192,6 +192,7 @@ ${helpers.predefined_type(
|
|||
"SimpleShadow",
|
||||
None,
|
||||
vector=True,
|
||||
vector_animation_type="with_zero",
|
||||
animation_value_type="AnimatedTextShadowList",
|
||||
ignored_when_colors_disabled=True,
|
||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue