diff options
author | daisuke <daisuke@daisukenoMacBook-Pro.local> | 2017-05-29 16:15:06 +0900 |
---|---|---|
committer | daisuke <daisuke@daisukenoMacBook-Pro.local> | 2017-05-29 23:10:02 +0900 |
commit | f46678cea878b1cce99897da79a9df6c7036ff26 (patch) | |
tree | 2bdcdc9f762d65fcddc7b69550beaeda7cf297b9 | |
parent | 545a7420c80bf4343c8c99dac62af0187afaefa9 (diff) | |
download | servo-f46678cea878b1cce99897da79a9df6c7036ff26.tar.gz servo-f46678cea878b1cce99897da79a9df6c7036ff26.zip |
Implements position related discrete animatable properties
-rw-r--r-- | components/style/properties/gecko.mako.rs | 13 | ||||
-rw-r--r-- | components/style/properties/longhand/position.mako.rs | 5 |
2 files changed, 5 insertions, 13 deletions
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index bcbf1a7946b..b5b6fb73bd2 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -1072,7 +1072,7 @@ fn static_assert() { <% skip_position_longhands = " ".join(x.ident for x in SIDES + GRID_LINES) %> <%self:impl_trait style_struct_name="Position" - skip_longhands="${skip_position_longhands} z-index box-sizing order align-content + skip_longhands="${skip_position_longhands} z-index order align-content justify-content align-self justify-self align-items justify-items grid-auto-rows grid-auto-columns grid-auto-flow grid-template-areas grid-template-rows grid-template-columns"> @@ -1159,17 +1159,6 @@ fn static_assert() { .expect("mJustifyItems contains valid flags")) } - pub fn set_box_sizing(&mut self, v: longhands::box_sizing::computed_value::T) { - use computed_values::box_sizing::T; - use gecko_bindings::structs::StyleBoxSizing; - // TODO: guess what to do with box-sizing: padding-box - self.gecko.mBoxSizing = match v { - T::content_box => StyleBoxSizing::Content, - T::border_box => StyleBoxSizing::Border - } - } - ${impl_simple_copy('box_sizing', 'mBoxSizing')} - pub fn set_order(&mut self, v: longhands::order::computed_value::T) { self.gecko.mOrder = v; } diff --git a/components/style/properties/longhand/position.mako.rs b/components/style/properties/longhand/position.mako.rs index 1b4c96d5090..ebf4265cd0d 100644 --- a/components/style/properties/longhand/position.mako.rs +++ b/components/style/properties/longhand/position.mako.rs @@ -205,7 +205,10 @@ ${helpers.single_keyword("box-sizing", "content-box border-box", extra_prefixes="moz webkit", spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing", - animation_value_type="none")} + gecko_enum_prefix="StyleBoxSizing", + custom_consts={ "content-box": "Content", "border-box": "Border" }, + gecko_inexhaustive=True, + animation_value_type="discrete")} ${helpers.single_keyword("object-fit", "fill contain cover none scale-down", products="gecko", animation_value_type="discrete", |