From 53b4cc35939c61b227897a54628cb7aec73787fc Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Fri, 7 Apr 2017 09:44:53 +0900 Subject: [PATCH] Make align-items animatable as discrete type. --- components/style/properties/gecko.mako.rs | 6 ++++++ components/style/properties/longhand/position.mako.rs | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 2d8424ff2e2..6941dbbb152 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -1070,6 +1070,12 @@ fn static_assert() { ${impl_simple_copy('align_items', 'mAlignItems')} + pub fn clone_align_items(&self) -> longhands::align_items::computed_value::T { + use values::specified::align::{AlignFlags, AlignItems}; + AlignItems(AlignFlags::from_bits(self.gecko.mAlignItems) + .expect("mAlignItems contains valid flags")) + } + pub fn set_justify_items(&mut self, v: longhands::justify_items::computed_value::T) { self.gecko.mJustifyItems = v.0.bits() } diff --git a/components/style/properties/longhand/position.mako.rs b/components/style/properties/longhand/position.mako.rs index 35664ea5311..cd42e56fcf2 100644 --- a/components/style/properties/longhand/position.mako.rs +++ b/components/style/properties/longhand/position.mako.rs @@ -65,10 +65,9 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse", ${helpers.single_keyword("align-items", "stretch flex-start flex-end center baseline", - need_clone=True, extra_prefixes="webkit", spec="https://drafts.csswg.org/css-flexbox/#align-items-property", - animation_type="none")} + animation_type="discrete")} % else: ${helpers.predefined_type(name="align-content", type="AlignJustifyContent", @@ -82,7 +81,7 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse", initial_value="specified::AlignItems::normal()", spec="https://drafts.csswg.org/css-align/#propdef-align-items", extra_prefixes="webkit", - animation_type="none")} + animation_type="discrete")} ${helpers.predefined_type(name="justify-items", type="JustifyItems",