mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Extend supported geometry box value for geckolib
This commit is contained in:
parent
04a3242dc5
commit
0a56ec3477
4 changed files with 24 additions and 4 deletions
|
@ -1565,6 +1565,14 @@ fn static_assert() {
|
||||||
T::border_box => StyleGeometryBox::Border,
|
T::border_box => StyleGeometryBox::Border,
|
||||||
T::padding_box => StyleGeometryBox::Padding,
|
T::padding_box => StyleGeometryBox::Padding,
|
||||||
T::content_box => StyleGeometryBox::Content,
|
T::content_box => StyleGeometryBox::Content,
|
||||||
|
% if shorthand == "mask":
|
||||||
|
T::fill_box => StyleGeometryBox::Fill,
|
||||||
|
T::stroke_box => StyleGeometryBox::Stroke,
|
||||||
|
T::view_box => StyleGeometryBox::View,
|
||||||
|
T::no_clip => StyleGeometryBox::NoClip,
|
||||||
|
% elif shorthand == "background":
|
||||||
|
T::text => StyleGeometryBox::Text,
|
||||||
|
% endif
|
||||||
}
|
}
|
||||||
</%self:simple_image_array_property>
|
</%self:simple_image_array_property>
|
||||||
|
|
||||||
|
@ -1576,6 +1584,11 @@ fn static_assert() {
|
||||||
T::border_box => StyleGeometryBox::Border,
|
T::border_box => StyleGeometryBox::Border,
|
||||||
T::padding_box => StyleGeometryBox::Padding,
|
T::padding_box => StyleGeometryBox::Padding,
|
||||||
T::content_box => StyleGeometryBox::Content,
|
T::content_box => StyleGeometryBox::Content,
|
||||||
|
% if shorthand == "mask":
|
||||||
|
T::fill_box => StyleGeometryBox::Fill,
|
||||||
|
T::stroke_box => StyleGeometryBox::Stroke,
|
||||||
|
T::view_box => StyleGeometryBox::View,
|
||||||
|
% endif
|
||||||
}
|
}
|
||||||
</%self:simple_image_array_property>
|
</%self:simple_image_array_property>
|
||||||
|
|
||||||
|
|
|
@ -203,6 +203,7 @@ ${helpers.single_keyword("background-attachment",
|
||||||
|
|
||||||
${helpers.single_keyword("background-clip",
|
${helpers.single_keyword("background-clip",
|
||||||
"border-box padding-box content-box",
|
"border-box padding-box content-box",
|
||||||
|
extra_gecko_values="text",
|
||||||
vector=True, extra_prefixes="webkit",
|
vector=True, extra_prefixes="webkit",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-clip",
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-clip",
|
||||||
animatable=False)}
|
animatable=False)}
|
||||||
|
|
|
@ -158,20 +158,18 @@ ${helpers.single_keyword("mask-repeat",
|
||||||
}
|
}
|
||||||
</%helpers:vector_longhand>
|
</%helpers:vector_longhand>
|
||||||
|
|
||||||
// missing: margin-box fill-box stroke-box view-box no-clip
|
|
||||||
// (gecko doesn't implement these)
|
|
||||||
${helpers.single_keyword("mask-clip",
|
${helpers.single_keyword("mask-clip",
|
||||||
"content-box padding-box border-box",
|
"content-box padding-box border-box",
|
||||||
|
extra_gecko_values="fill-box stroke-box view-box no-clip",
|
||||||
vector=True,
|
vector=True,
|
||||||
products="gecko",
|
products="gecko",
|
||||||
extra_prefixes="webkit",
|
extra_prefixes="webkit",
|
||||||
animatable=False,
|
animatable=False,
|
||||||
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-clip")}
|
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-clip")}
|
||||||
|
|
||||||
// missing: margin-box fill-box stroke-box view-box
|
|
||||||
// (gecko doesn't implement these)
|
|
||||||
${helpers.single_keyword("mask-origin",
|
${helpers.single_keyword("mask-origin",
|
||||||
"content-box padding-box border-box",
|
"content-box padding-box border-box",
|
||||||
|
extra_gecko_values="fill-box stroke-box view-box",
|
||||||
vector=True,
|
vector=True,
|
||||||
products="gecko",
|
products="gecko",
|
||||||
extra_prefixes="webkit",
|
extra_prefixes="webkit",
|
||||||
|
|
|
@ -20,6 +20,14 @@
|
||||||
mask_clip::single_value::SpecifiedValue::padding_box,
|
mask_clip::single_value::SpecifiedValue::padding_box,
|
||||||
mask_origin::single_value::SpecifiedValue::border_box =>
|
mask_origin::single_value::SpecifiedValue::border_box =>
|
||||||
mask_clip::single_value::SpecifiedValue::border_box,
|
mask_clip::single_value::SpecifiedValue::border_box,
|
||||||
|
% if product == "gecko":
|
||||||
|
mask_origin::single_value::SpecifiedValue::fill_box =>
|
||||||
|
mask_clip::single_value::SpecifiedValue::fill_box,
|
||||||
|
mask_origin::single_value::SpecifiedValue::stroke_box =>
|
||||||
|
mask_clip::single_value::SpecifiedValue::stroke_box,
|
||||||
|
mask_origin::single_value::SpecifiedValue::view_box =>
|
||||||
|
mask_clip::single_value::SpecifiedValue::view_box,
|
||||||
|
% endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue