mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
style: Use alias for StyleFillRule.
This needs to update the "fill-rule" and "clip-rule" to use predefined_type to avoid some compilation errors. Differential Revision: https://phabricator.services.mozilla.com/D10142
This commit is contained in:
parent
cb2533d61a
commit
c7027e2676
8 changed files with 25 additions and 25 deletions
|
@ -298,6 +298,7 @@ class Longhand(object):
|
|||
"ColumnCount",
|
||||
"Contain",
|
||||
"Display",
|
||||
"FillRule",
|
||||
"Float",
|
||||
"FontSizeAdjust",
|
||||
"FontStretch",
|
||||
|
|
|
@ -1397,6 +1397,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
"length::LengthOrNormal": impl_style_coord,
|
||||
"length::NonNegativeLengthOrAuto": impl_style_coord,
|
||||
"length::NonNegativeLengthOrPercentageOrNormal": impl_style_coord,
|
||||
"FillRule": impl_simple,
|
||||
"FlexBasis": impl_style_coord,
|
||||
"Length": impl_absolute_length,
|
||||
"LengthOrNormal": impl_style_coord,
|
||||
|
@ -4953,8 +4954,7 @@ fn set_style_svg_path(
|
|||
gecko_path.mPath.assign_from_iter_pod(iter);
|
||||
|
||||
// Setup fill-rule.
|
||||
// unsafe: cbindgen ensures the representation is the same.
|
||||
gecko_path.mFillRule = unsafe { transmute(fill) };
|
||||
gecko_path.mFillRule = fill;
|
||||
}
|
||||
|
||||
<%def name="impl_shape_source(ident, gecko_ffi_name)">
|
||||
|
@ -5059,8 +5059,7 @@ fn set_style_svg_path(
|
|||
coord.0.to_gecko_style_coord(&mut shape.mCoordinates[2 * i]);
|
||||
coord.1.to_gecko_style_coord(&mut shape.mCoordinates[2 * i + 1]);
|
||||
}
|
||||
// unsafe: cbindgen ensures the representation is the same.
|
||||
shape.mFillRule = unsafe { transmute(poly.fill) };
|
||||
shape.mFillRule = poly.fill;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,10 +55,11 @@ ${helpers.predefined_type(
|
|||
spec="https://www.w3.org/TR/SVG11/painting.html#FillOpacityProperty",
|
||||
)}
|
||||
|
||||
${helpers.single_keyword(
|
||||
${helpers.predefined_type(
|
||||
"fill-rule",
|
||||
"nonzero evenodd",
|
||||
gecko_enum_prefix="StyleFillRule",
|
||||
"FillRule",
|
||||
"Default::default()",
|
||||
needs_context=False,
|
||||
products="gecko",
|
||||
animation_value_type="discrete",
|
||||
spec="https://www.w3.org/TR/SVG11/painting.html#FillRuleProperty",
|
||||
|
@ -142,11 +143,12 @@ ${helpers.predefined_type(
|
|||
)}
|
||||
|
||||
// Section 14 - Clipping, Masking and Compositing
|
||||
${helpers.single_keyword(
|
||||
${helpers.predefined_type(
|
||||
"clip-rule",
|
||||
"nonzero evenodd",
|
||||
"FillRule",
|
||||
"Default::default()",
|
||||
needs_context=False,
|
||||
products="gecko",
|
||||
gecko_enum_prefix="StyleFillRule",
|
||||
animation_value_type="discrete",
|
||||
spec="https://www.w3.org/TR/SVG11/masking.html#ClipRuleProperty",
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue