Rename ALIAS_PROPERTY with SHORTHAND_ALIAS_PROPERTY to prevent confusion

This commit is contained in:
Nazım Can Altınova 2017-05-09 13:47:39 +03:00
parent 9c9bd17871
commit e1053f2c71
No known key found for this signature in database
GPG key ID: AF9BCD7CE6449954
3 changed files with 6 additions and 6 deletions

View file

@ -482,7 +482,7 @@ impl ToCss for PropertyDeclarationBlock {
// Substeps 7 and 8 // Substeps 7 and 8
// We need to check the shorthand whether it's an alias property or not. // 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 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<slice::Iter< _>>, _>( append_serialization::<_, Cloned<slice::Iter< _>>, _>(
dest, dest,
&property, &property,

View file

@ -484,8 +484,8 @@ bitflags! {
/// This property has values that can establish a containing block for /// This property has values that can establish a containing block for
/// absolutely positioned elements. /// absolutely positioned elements.
const ABSPOS_CB = 1 << 2, const ABSPOS_CB = 1 << 2,
/// This property(shorthand) is an alias of another property. /// This shorthand property is an alias of another property.
const ALIAS_PROPERTY = 1 << 3, const SHORTHAND_ALIAS_PROPERTY = 1 << 3,
} }
} }
@ -1263,7 +1263,7 @@ impl ToCss for PropertyDeclaration {
PropertyDeclaration::WithVariables(_, ref with_variables) => { PropertyDeclaration::WithVariables(_, ref with_variables) => {
// https://drafts.csswg.org/css-variables/#variables-in-shorthands // https://drafts.csswg.org/css-variables/#variables-in-shorthands
match with_variables.from_shorthand { 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)?, dest.write_str(&*with_variables.css)?,
None => dest.write_str(&*with_variables.css)?, None => dest.write_str(&*with_variables.css)?,
_ => {}, _ => {},
@ -1345,7 +1345,7 @@ impl PropertyDeclaration {
Some(&*with_variables.css) Some(&*with_variables.css)
} else { None } } else { None }
} else { } else {
if shorthand.flags().contains(ALIAS_PROPERTY) { if shorthand.flags().contains(SHORTHAND_ALIAS_PROPERTY) {
return Some(&*with_variables.css); return Some(&*with_variables.css);
} }
None None

View file

@ -327,7 +327,7 @@ macro_rules! try_parse_one {
<%helpers:shorthand name="-moz-transform" products="gecko" <%helpers:shorthand name="-moz-transform" products="gecko"
sub_properties="transform" sub_properties="transform"
flags="ALIAS_PROPERTY" flags="SHORTHAND_ALIAS_PROPERTY"
spec="Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/transform"> spec="Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/transform">
use properties::longhands::transform; use properties::longhands::transform;