mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Remove -moz-outline-radius
It does nothing since 88 and we unshipped it in 89. Differential Revision: https://phabricator.services.mozilla.com/D117532
This commit is contained in:
parent
ed806afe52
commit
837e41c8eb
4 changed files with 2 additions and 72 deletions
|
@ -799,11 +799,8 @@ fn static_assert() {
|
|||
${impl_simple_type_with_conversion("masonry_auto_flow", "mMasonryAutoFlow")}
|
||||
</%self:impl_trait>
|
||||
|
||||
<% skip_outline_longhands = " ".join("outline-style outline-width".split() +
|
||||
["-moz-outline-radius-{0}".format(x.replace("_", ""))
|
||||
for x in CORNERS]) %>
|
||||
<%self:impl_trait style_struct_name="Outline"
|
||||
skip_longhands="${skip_outline_longhands}">
|
||||
skip_longhands="outline-style outline-width">
|
||||
|
||||
pub fn set_outline_style(&mut self, v: longhands::outline_style::computed_value::T) {
|
||||
self.gecko.mOutlineStyle = v;
|
||||
|
@ -831,12 +828,6 @@ fn static_assert() {
|
|||
inherit_from="mOutlineWidth",
|
||||
round_to_pixels=True) %>
|
||||
|
||||
% for corner in CORNERS:
|
||||
<% impl_corner_style_coord("_moz_outline_radius_%s" % corner.replace("_", ""),
|
||||
"mOutlineRadius",
|
||||
corner) %>
|
||||
% endfor
|
||||
|
||||
pub fn outline_has_nonzero_width(&self) -> bool {
|
||||
self.gecko.mActualOutlineWidth != 0
|
||||
}
|
||||
|
|
|
@ -42,20 +42,6 @@ ${helpers.predefined_type(
|
|||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-width",
|
||||
)}
|
||||
|
||||
// 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,
|
||||
"BorderCornerRadius",
|
||||
"computed::BorderCornerRadius::zero()",
|
||||
engines="gecko",
|
||||
boxed=True,
|
||||
animation_value_type="BorderCornerRadius",
|
||||
gecko_pref="layout.css.moz-outline-radius.enabled",
|
||||
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)",
|
||||
)}
|
||||
% endfor
|
||||
|
||||
${helpers.predefined_type(
|
||||
"outline-offset",
|
||||
"Length",
|
||||
|
|
|
@ -78,50 +78,3 @@
|
|||
}
|
||||
}
|
||||
</%helpers:shorthand>
|
||||
|
||||
// The -moz-outline-radius shorthand is non-standard and not on a standards track.
|
||||
<%helpers:shorthand
|
||||
name="-moz-outline-radius"
|
||||
engines="gecko"
|
||||
gecko_pref="layout.css.moz-outline-radius.enabled"
|
||||
sub_properties="${' '.join(
|
||||
'-moz-outline-radius-%s' % corner
|
||||
for corner in ['topleft', 'topright', 'bottomright', 'bottomleft']
|
||||
)}"
|
||||
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)"
|
||||
>
|
||||
use crate::values::generics::rect::Rect;
|
||||
use crate::values::specified::border::BorderRadius;
|
||||
use crate::parser::Parse;
|
||||
|
||||
pub fn parse_value<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Longhands, ParseError<'i>> {
|
||||
let radii = BorderRadius::parse(context, input)?;
|
||||
Ok(expanded! {
|
||||
_moz_outline_radius_topleft: radii.top_left,
|
||||
_moz_outline_radius_topright: radii.top_right,
|
||||
_moz_outline_radius_bottomright: radii.bottom_right,
|
||||
_moz_outline_radius_bottomleft: radii.bottom_left,
|
||||
})
|
||||
}
|
||||
|
||||
impl<'a> ToCss for LonghandsToSerialize<'a> {
|
||||
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
|
||||
use crate::values::generics::border::BorderCornerRadius;
|
||||
|
||||
let LonghandsToSerialize {
|
||||
_moz_outline_radius_topleft: &BorderCornerRadius(ref tl),
|
||||
_moz_outline_radius_topright: &BorderCornerRadius(ref tr),
|
||||
_moz_outline_radius_bottomright: &BorderCornerRadius(ref br),
|
||||
_moz_outline_radius_bottomleft: &BorderCornerRadius(ref bl),
|
||||
} = *self;
|
||||
|
||||
let widths = Rect::new(tl.width(), tr.width(), br.width(), bl.width());
|
||||
let heights = Rect::new(tl.height(), tr.height(), br.height(), bl.height());
|
||||
|
||||
BorderRadius::serialize_rects(widths, heights, dest)
|
||||
}
|
||||
}
|
||||
</%helpers:shorthand>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue