From 9c2dbfe0d7cd0e309ee9a19fd694d662b552edb0 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Fri, 17 Feb 2017 11:26:20 -0800 Subject: [PATCH] Fix -moz aliases for border-{start,end} properties Fixes #15297. --- components/style/properties/longhand/border.mako.rs | 2 +- components/style/properties/shorthand/border.mako.rs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/style/properties/longhand/border.mako.rs b/components/style/properties/longhand/border.mako.rs index 8de98c8f527..2b21214c391 100644 --- a/components/style/properties/longhand/border.mako.rs +++ b/components/style/properties/longhand/border.mako.rs @@ -34,7 +34,7 @@ % for side in ALL_SIDES: <%helpers:longhand name="border-${side[0]}-width" animatable="True" logical="${side[1]}" - alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-width") + alias="${maybe_moz_logical_alias(product, side, '-moz-border-%s-width')}" spec="${maybe_logical_spec(side, 'width')}"> use app_units::Au; use std::fmt; diff --git a/components/style/properties/shorthand/border.mako.rs b/components/style/properties/shorthand/border.mako.rs index 1c95cdea09c..3aefd6a8bc5 100644 --- a/components/style/properties/shorthand/border.mako.rs +++ b/components/style/properties/shorthand/border.mako.rs @@ -84,10 +84,14 @@ pub fn parse_border(context: &ParserContext, input: &mut Parser) if logical: spec = "https://drafts.csswg.org/css-logical-props/#propdef-border-%s" % side %> - <%helpers:shorthand name="border-${side}" sub_properties="${' '.join( - 'border-%s-%s' % (side, prop) - for prop in ['color', 'style', 'width'] - )}" alias=maybe_moz_logical_alias(product, side, "-moz-border-%s") spec="${spec}"> + <%helpers:shorthand + name="border-${side}" + sub_properties="${' '.join( + 'border-%s-%s' % (side, prop) + for prop in ['color', 'style', 'width'] + )}" + alias="${maybe_moz_logical_alias(product, (side, logical), '-moz-border-%s')}" + spec="${spec}"> pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result { let (color, style, width) = try!(super::parse_border(context, input));