diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 0c9212e2a11..29b32f70086 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -2457,7 +2457,7 @@ clip-path <%self:impl_trait style_struct_name="Column" - skip_longhands="column-count column-gap -moz-column-rule-width"> + skip_longhands="column-count column-gap column-rule-width"> #[allow(unused_unsafe)] pub fn set_column_count(&mut self, v: longhands::column_count::computed_value::T) { @@ -2484,7 +2484,7 @@ clip-path <%call expr="impl_coord_copy('column_gap', 'mColumnGap')"> - <% impl_app_units("_moz_column_rule_width", "mColumnRuleWidth", need_clone=True, + <% impl_app_units("column_rule_width", "mColumnRuleWidth", need_clone=True, round_to_pixels=True) %> diff --git a/components/style/properties/longhand/column.mako.rs b/components/style/properties/longhand/column.mako.rs index 119c4e0ca31..ef2802be00d 100644 --- a/components/style/properties/longhand/column.mako.rs +++ b/components/style/properties/longhand/column.mako.rs @@ -107,7 +107,7 @@ ${helpers.single_keyword("column-fill", "auto balance", products="gecko", animatable=False)} // https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width -<%helpers:longhand name="-moz-column-rule-width" products="gecko" animatable="True"> +<%helpers:longhand name="column-rule-width" products="gecko" animatable="True"> use app_units::Au; use std::fmt; use style_traits::ToCss; @@ -137,19 +137,18 @@ ${helpers.single_keyword("column-fill", "auto balance", // https://drafts.csswg.org/css-multicol-1/#crc -${helpers.predefined_type("-moz-column-rule-color", "CSSColor", +${helpers.predefined_type("column-rule-color", "CSSColor", "::cssparser::Color::CurrentColor", - products="gecko", gecko_ffi_name="mColumnRuleColor", - animatable=True, complex_color=True, need_clone=True)} + products="gecko", animatable=True, + complex_color=True, need_clone=True)} // It's not implemented in servo or gecko yet. // https://drafts.csswg.org/css-multicol-1/#column-span ${helpers.single_keyword("column-span", "none all", products="none", animatable=False)} -${helpers.single_keyword("-moz-column-rule-style", +${helpers.single_keyword("column-rule-style", "none hidden dotted dashed solid double groove ridge inset outset", products="gecko", - gecko_ffi_name="mColumnRuleStyle", gecko_constant_prefix="NS_STYLE_BORDER_STYLE", animatable=False)} diff --git a/components/style/properties/shorthand/column.mako.rs b/components/style/properties/shorthand/column.mako.rs index 037154e4afe..e2b6f2ac5a7 100644 --- a/components/style/properties/shorthand/column.mako.rs +++ b/components/style/properties/shorthand/column.mako.rs @@ -59,10 +59,10 @@ // https://drafts.csswg.org/css-multicol/#column-rule -<%helpers:shorthand name="-moz-column-rule" products="gecko" - sub_properties="-moz-column-rule-width -moz-column-rule-style -moz-column-rule-color"> - use properties::longhands::{_moz_column_rule_width, _moz_column_rule_style}; - use properties::longhands::_moz_column_rule_color; +<%helpers:shorthand name="column-rule" products="gecko" + sub_properties="column-rule-width column-rule-style column-rule-color"> + use properties::longhands::{column_rule_width, column_rule_style}; + use properties::longhands::column_rule_color; pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result { % for name in "width style color".split(): @@ -74,7 +74,7 @@ % for name in "width style color".split(): if column_rule_${name}.is_none() { if let Ok(value) = input.try(|input| - _moz_column_rule_${name}::parse(context, input)) { + column_rule_${name}::parse(context, input)) { column_rule_${name} = Some(value); any = true; continue @@ -87,10 +87,10 @@ if any { Ok(Longhands { % for name in "width style".split(): - _moz_column_rule_${name}: column_rule_${name} - .or(Some(_moz_column_rule_${name}::get_initial_specified_value())), + column_rule_${name}: column_rule_${name} + .or(Some(column_rule_${name}::get_initial_specified_value())), % endfor - _moz_column_rule_color: column_rule_color, + column_rule_color: column_rule_color, }) } else { Err(()) @@ -100,14 +100,14 @@ impl<'a> LonghandsToSerialize<'a> { fn to_css_declared(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { let mut need_space = false; - try!(self._moz_column_rule_width.to_css(dest)); + try!(self.column_rule_width.to_css(dest)); - if let DeclaredValue::Value(ref width) = *self._moz_column_rule_width { + if let DeclaredValue::Value(ref width) = *self.column_rule_width { try!(width.to_css(dest)); need_space = true; } - if let DeclaredValue::Value(ref style) = *self._moz_column_rule_style { + if let DeclaredValue::Value(ref style) = *self.column_rule_style { if need_space { try!(write!(dest, " ")); } @@ -115,7 +115,7 @@ need_space = true; } - if let DeclaredValue::Value(ref color) = *self._moz_column_rule_color { + if let DeclaredValue::Value(ref color) = *self.column_rule_color { if need_space { try!(write!(dest, " ")); }