style: Make -moz-border-colors chrome only.

This also makes the `border` shorthand not reset them.

Bug: 1417200
Reviewed-by: xidorn
MozReview-Commit-ID: KNais1e5FnE
This commit is contained in:
Emilio Cobos Álvarez 2017-11-28 13:14:40 +01:00
parent 0bcd36838d
commit 0f12380db3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 3 additions and 12 deletions

View file

@ -74,6 +74,7 @@ ${helpers.gecko_keyword_conversion(Keyword('border-style',
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-border-*-colors)"
products="gecko"
flags="APPLIES_TO_FIRST_LETTER"
enabled_in="chrome"
ignored_when_colors_disabled="True">
use std::fmt;
use style_traits::ToCss;

View file

@ -131,16 +131,9 @@ pub fn parse_border<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
for side in PHYSICAL_SIDES
for prop in ['color', 'style', 'width'])}
${' '.join('border-image-%s' % name
for name in ['outset', 'repeat', 'slice', 'source', 'width'])}
${' '.join('-moz-border-%s-colors' % side
for side in PHYSICAL_SIDES) if product == 'gecko' else ''}"
for name in ['outset', 'repeat', 'slice', 'source', 'width'])}"
spec="https://drafts.csswg.org/css-backgrounds/#border">
% if product == "gecko":
use properties::longhands::{_moz_border_top_colors, _moz_border_right_colors,
_moz_border_bottom_colors, _moz_border_left_colors};
% endif
pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Longhands, ParseError<'i>> {
use properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
@ -152,9 +145,6 @@ pub fn parse_border<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
border_${side}_color: color.clone(),
border_${side}_style: style,
border_${side}_width: width.clone(),
% if product == "gecko":
_moz_border_${side}_colors: _moz_border_${side}_colors::get_initial_specified_value(),
% endif
% endfor
// The border shorthand resets border-image to its initial value.