diff --git a/components/style/properties/longhand/outline.mako.rs b/components/style/properties/longhand/outline.mako.rs index 2eab90ce556..afa2c9a06c7 100644 --- a/components/style/properties/longhand/outline.mako.rs +++ b/components/style/properties/longhand/outline.mako.rs @@ -58,4 +58,11 @@ ${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::Curr } +// The -moz-outline-radius-* properties are non-standard and not on a standards track. +% for corner in ["topleft", "topright", "bottomright", "bottomleft"]: + ${helpers.predefined_type("-moz-outline-radius-" + corner, "BorderRadiusSize", + "computed::BorderRadiusSize::zero()", + "parse", products="gecko")} +% endfor + ${helpers.predefined_type("outline-offset", "Length", "Au(0)")} diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index c0cee275eb9..4037ea58fe1 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -548,14 +548,25 @@ fn static_assert() { % endfor +<% skip_outline_longhands = " ".join("outline-color outline-style".split() + + ["-moz-outline-radius-{0}".format(x.ident.replace("_", "")) + for x in CORNERS]) %> <%self:impl_trait style_struct_name="Outline" - skip_longhands="outline-color outline-style" + skip_longhands="${skip_outline_longhands}" skip_additionals="*"> <% impl_keyword("outline_style", "mOutlineStyle", border_style_keyword, need_clone=True) %> <% impl_color("outline_color", "mOutlineColor", color_flags_ffi_name="mOutlineStyle") %> + % for corner in CORNERS: + <% impl_corner_style_coord("_moz_outline_radius_%s" % corner.ident.replace("_", ""), + "mOutlineRadius.mUnits[%s]" % corner.x_index, + "mOutlineRadius.mValues[%s]" % corner.x_index, + "mOutlineRadius.mUnits[%s]" % corner.y_index, + "mOutlineRadius.mValues[%s]" % corner.y_index) %> + % endfor + fn outline_has_nonzero_width(&self) -> bool { self.gecko.mCachedOutlineWidth != 0 }