From ad7cfcbb7e8cb1db334df06a58a371561c628585 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 7 May 2016 16:48:07 +1000 Subject: [PATCH] Support -moz-outline-radius shorthand in geckolib. --- .../style/properties/shorthand/outline.mako.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/components/style/properties/shorthand/outline.mako.rs b/components/style/properties/shorthand/outline.mako.rs index 57481dfcb02..09f3e4e3702 100644 --- a/components/style/properties/shorthand/outline.mako.rs +++ b/components/style/properties/shorthand/outline.mako.rs @@ -47,3 +47,20 @@ Err(()) } + +// The -moz-outline-radius shorthand is non-standard and not on a standards track. +<%helpers:shorthand name="-moz-outline-radius" sub_properties="${' '.join( + '-moz-outline-radius-%s' % corner + for corner in ['topleft', 'topright', 'bottomright', 'bottomleft'] +)}" products="gecko"> + use properties::shorthands; + + // Re-use border-radius parsing. + shorthands::border_radius::parse_value(context, input).map(|longhands| { + Longhands { + % for corner in ["top_left", "top_right", "bottom_right", "bottom_left"]: + _moz_outline_radius_${corner.replace("_", "")}: longhands.border_${corner}_radius, + % endfor + } + }) +