From 9206283f7ea67b32359e59e786ca742e4e0ba735 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Fri, 10 Aug 2018 02:20:53 +0000 Subject: [PATCH] style: Swap order of values in 'overflow' shorthand property. Differential Revision: https://phabricator.services.mozilla.com/D3069 --- components/style/properties/shorthands/box.mako.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/style/properties/shorthands/box.mako.rs b/components/style/properties/shorthands/box.mako.rs index 3886c7d2d3c..960e608cea7 100644 --- a/components/style/properties/shorthands/box.mako.rs +++ b/components/style/properties/shorthands/box.mako.rs @@ -7,7 +7,7 @@ <%helpers:shorthand name="overflow" flags="SHORTHAND_IN_GETCS" - sub_properties="overflow-x overflow-y" + sub_properties="overflow-y overflow-x" spec="https://drafts.csswg.org/css-overflow/#propdef-overflow" > use properties::longhands::overflow_x::parse as parse_overflow; @@ -52,9 +52,9 @@ } } % endif - let overflow_x = parse_overflow(context, input)?; - let overflow_y = - input.try(|i| parse_overflow(context, i)).unwrap_or(overflow_x); + let overflow_y = parse_overflow(context, input)?; + let overflow_x = + input.try(|i| parse_overflow(context, i)).unwrap_or(overflow_y); Ok(expanded! { overflow_x: overflow_x, overflow_y: overflow_y, @@ -63,10 +63,10 @@ impl<'a> ToCss for LonghandsToSerialize<'a> { fn to_css(&self, dest: &mut CssWriter) -> fmt::Result where W: fmt::Write { - self.overflow_x.to_css(dest)?; + self.overflow_y.to_css(dest)?; if self.overflow_x != self.overflow_y { dest.write_char(' ')?; - self.overflow_y.to_css(dest)?; + self.overflow_x.to_css(dest)?; } Ok(()) }