From 3b59dbadeee545dfc1935c5f5cd8cc7250195d67 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Mon, 6 Feb 2017 17:45:09 -0800 Subject: [PATCH] stylo: Implement -moz-stack-sizing MozReview-Commit-ID: 6mr4ktfeEGT --- components/style/properties/gecko.mako.rs | 12 ++++++++++++ components/style/properties/longhand/xul.mako.rs | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 5d3ebaae4e8..065599b4f73 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -2851,6 +2851,18 @@ clip-path } +<%self:impl_trait style_struct_name="XUL" + skip_longhands="-moz-stack-sizing"> + + #[allow(non_snake_case)] + pub fn set__moz_stack_sizing(&mut self, v: longhands::_moz_stack_sizing::computed_value::T) { + use properties::longhands::_moz_stack_sizing::computed_value::T; + self.gecko.mStretchStack = v == T::stretch_to_fit; + } + + ${impl_simple_copy('_moz_stack_sizing', 'mStretchStack')} + + <%def name="define_ffi_struct_accessor(style_struct)"> #[no_mangle] #[allow(non_snake_case, unused_variables)] diff --git a/components/style/properties/longhand/xul.mako.rs b/components/style/properties/longhand/xul.mako.rs index 7862b1d9177..6cf61f3948a 100644 --- a/components/style/properties/longhand/xul.mako.rs +++ b/components/style/properties/longhand/xul.mako.rs @@ -22,3 +22,10 @@ ${helpers.predefined_type("-moz-box-flex", "Number", "0.0", "parse_non_negative" animatable=False, alias="-webkit-box-flex", spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-flex)")} + + +${helpers.single_keyword("-moz-stack-sizing", "stretch-to-fit ignore", + products="gecko", gecko_ffi_name="mStretchStack", + gecko_constant_prefix="NS_STYLE_STACK_SIZING", + animatable=False, + spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-stack-sizing)")}