From 4c27304541f856e8cf8817ad4142fe629f73c7b6 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 16 Feb 2017 09:27:59 -0800 Subject: [PATCH 1/2] Fix initial value of align-content and justify-content --- components/style/properties/longhand/position.mako.rs | 4 ++-- components/style/values/specified/align.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/style/properties/longhand/position.mako.rs b/components/style/properties/longhand/position.mako.rs index 59edcd92672..bcc899673bc 100644 --- a/components/style/properties/longhand/position.mako.rs +++ b/components/style/properties/longhand/position.mako.rs @@ -93,7 +93,7 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse", % else: ${helpers.predefined_type(name="justify-content", type="AlignJustifyContent", - initial_value="specified::AlignJustifyContent::auto()", + initial_value="specified::AlignJustifyContent::normal()", spec="https://drafts.csswg.org/css-flexbox/#justify-content-property", extra_prefixes="webkit", animatable=False)} @@ -118,7 +118,7 @@ ${helpers.single_keyword("align-items", "stretch flex-start flex-end center base % else: ${helpers.predefined_type(name="align-content", type="AlignJustifyContent", - initial_value="specified::AlignJustifyContent::auto()", + initial_value="specified::AlignJustifyContent::normal()", spec="https://drafts.csswg.org/css-flexbox/#align-content-property", extra_prefixes="webkit", animatable=False)} diff --git a/components/style/values/specified/align.rs b/components/style/values/specified/align.rs index fe7c779552b..026a7b85aec 100644 --- a/components/style/values/specified/align.rs +++ b/components/style/values/specified/align.rs @@ -117,10 +117,10 @@ const ALIGN_ALL_SHIFT: u32 = structs::NS_STYLE_ALIGN_ALL_SHIFT; pub struct AlignJustifyContent(u16); impl AlignJustifyContent { - /// The initial value 'auto' + /// The initial value 'normal' #[inline] - pub fn auto() -> Self { - Self::new(ALIGN_AUTO) + pub fn normal() -> Self { + Self::new(ALIGN_NORMAL) } /// Construct a value with no fallback. From 33338cab9d3a40f4173b0ef40d85ed81a5398bb1 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 16 Feb 2017 11:53:49 -0800 Subject: [PATCH 2/2] Update spec links for align-content and justify-content --- components/style/properties/longhand/position.mako.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/style/properties/longhand/position.mako.rs b/components/style/properties/longhand/position.mako.rs index bcc899673bc..b6da66c4e5e 100644 --- a/components/style/properties/longhand/position.mako.rs +++ b/components/style/properties/longhand/position.mako.rs @@ -88,13 +88,13 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse", // FIXME: Update Servo to support the same Syntax as Gecko. ${helpers.single_keyword("justify-content", "stretch flex-start flex-end center space-between space-around", extra_prefixes="webkit", - spec="https://drafts.csswg.org/css-flexbox/#justify-content-property", + spec="https://drafts.csswg.org/css-align/#propdef-justify-content", animatable=False)} % else: ${helpers.predefined_type(name="justify-content", type="AlignJustifyContent", initial_value="specified::AlignJustifyContent::normal()", - spec="https://drafts.csswg.org/css-flexbox/#justify-content-property", + spec="https://drafts.csswg.org/css-align/#propdef-justify-content", extra_prefixes="webkit", animatable=False)} % endif @@ -113,13 +113,13 @@ ${helpers.single_keyword("align-items", "stretch flex-start flex-end center base // FIXME: Update Servo to support the same Syntax as Gecko. ${helpers.single_keyword("align-content", "stretch flex-start flex-end center space-between space-around", extra_prefixes="webkit", - spec="https://drafts.csswg.org/css-flexbox/#align-content-property", + spec="https://drafts.csswg.org/css-align/#propdef-align-content", animatable=False)} % else: ${helpers.predefined_type(name="align-content", type="AlignJustifyContent", initial_value="specified::AlignJustifyContent::normal()", - spec="https://drafts.csswg.org/css-flexbox/#align-content-property", + spec="https://drafts.csswg.org/css-align/#propdef-align-content", extra_prefixes="webkit", animatable=False)} % endif