From e1053f2c71024ba08022b2a04147a6ae51a426f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Tue, 9 May 2017 13:47:39 +0300 Subject: [PATCH] Rename ALIAS_PROPERTY with SHORTHAND_ALIAS_PROPERTY to prevent confusion --- components/style/properties/declaration_block.rs | 2 +- components/style/properties/properties.mako.rs | 8 ++++---- components/style/properties/shorthand/box.mako.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/style/properties/declaration_block.rs b/components/style/properties/declaration_block.rs index 7b53a49626a..613b6327924 100644 --- a/components/style/properties/declaration_block.rs +++ b/components/style/properties/declaration_block.rs @@ -482,7 +482,7 @@ impl ToCss for PropertyDeclarationBlock { // Substeps 7 and 8 // We need to check the shorthand whether it's an alias property or not. // If it's an alias property, it should be serialized like its longhand. - if shorthand.flags().contains(ALIAS_PROPERTY) { + if shorthand.flags().contains(SHORTHAND_ALIAS_PROPERTY) { append_serialization::<_, Cloned>, _>( dest, &property, diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 7a57acb9761..905816f0b77 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -484,8 +484,8 @@ bitflags! { /// This property has values that can establish a containing block for /// absolutely positioned elements. const ABSPOS_CB = 1 << 2, - /// This property(shorthand) is an alias of another property. - const ALIAS_PROPERTY = 1 << 3, + /// This shorthand property is an alias of another property. + const SHORTHAND_ALIAS_PROPERTY = 1 << 3, } } @@ -1263,7 +1263,7 @@ impl ToCss for PropertyDeclaration { PropertyDeclaration::WithVariables(_, ref with_variables) => { // https://drafts.csswg.org/css-variables/#variables-in-shorthands match with_variables.from_shorthand { - Some(shorthand) if shorthand.flags().contains(ALIAS_PROPERTY) => + Some(shorthand) if shorthand.flags().contains(SHORTHAND_ALIAS_PROPERTY) => dest.write_str(&*with_variables.css)?, None => dest.write_str(&*with_variables.css)?, _ => {}, @@ -1345,7 +1345,7 @@ impl PropertyDeclaration { Some(&*with_variables.css) } else { None } } else { - if shorthand.flags().contains(ALIAS_PROPERTY) { + if shorthand.flags().contains(SHORTHAND_ALIAS_PROPERTY) { return Some(&*with_variables.css); } None diff --git a/components/style/properties/shorthand/box.mako.rs b/components/style/properties/shorthand/box.mako.rs index a1bcd207f58..9b9ccfe78d7 100644 --- a/components/style/properties/shorthand/box.mako.rs +++ b/components/style/properties/shorthand/box.mako.rs @@ -327,7 +327,7 @@ macro_rules! try_parse_one { <%helpers:shorthand name="-moz-transform" products="gecko" sub_properties="transform" - flags="ALIAS_PROPERTY" + flags="SHORTHAND_ALIAS_PROPERTY" spec="Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/transform"> use properties::longhands::transform;