diff options
-rw-r--r-- | components/style/properties/longhand/position.mako.rs | 10 | ||||
-rw-r--r-- | components/style/properties/shorthand/position.mako.rs | 6 | ||||
-rw-r--r-- | components/style/values/computed/align.rs | 2 | ||||
-rw-r--r-- | components/style/values/computed/mod.rs | 2 | ||||
-rw-r--r-- | components/style/values/specified/align.rs | 12 | ||||
-rw-r--r-- | components/style/values/specified/mod.rs | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/components/style/properties/longhand/position.mako.rs b/components/style/properties/longhand/position.mako.rs index e3b2dc0cd2c..013b93b2640 100644 --- a/components/style/properties/longhand/position.mako.rs +++ b/components/style/properties/longhand/position.mako.rs @@ -138,20 +138,20 @@ ${helpers.predefined_type("flex-shrink", "NonNegativeNumber", animation_value_type="discrete")} % else: ${helpers.predefined_type(name="align-self", - type="AlignJustifySelf", - initial_value="specified::AlignJustifySelf::auto()", + type="SelfAlignment", + initial_value="specified::SelfAlignment::auto()", spec="https://drafts.csswg.org/css-align/#align-self-property", extra_prefixes="webkit", animation_value_type="discrete")} ${helpers.predefined_type(name="justify-self", - type="AlignJustifySelf", - initial_value="specified::AlignJustifySelf::auto()", + type="SelfAlignment", + initial_value="specified::SelfAlignment::auto()", spec="https://drafts.csswg.org/css-align/#justify-self-property", animation_value_type="discrete")} #[cfg(feature = "gecko")] - impl_align_conversions!(::values::specified::align::AlignJustifySelf); + impl_align_conversions!(::values::specified::align::SelfAlignment); % endif // https://drafts.csswg.org/css-flexbox/#propdef-order diff --git a/components/style/properties/shorthand/position.mako.rs b/components/style/properties/shorthand/position.mako.rs index 2f5aba1b2b2..8775eed5c2c 100644 --- a/components/style/properties/shorthand/position.mako.rs +++ b/components/style/properties/shorthand/position.mako.rs @@ -653,16 +653,16 @@ <%helpers:shorthand name="place-self" sub_properties="align-self justify-self" spec="https://drafts.csswg.org/css-align/#place-self-property" products="gecko"> - use values::specified::align::AlignJustifySelf; + use values::specified::align::SelfAlignment; use parser::Parse; pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Longhands, ParseError<'i>> { - let align = AlignJustifySelf::parse(context, input)?; + let align = SelfAlignment::parse(context, input)?; if align.has_extra_flags() { return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)); } - let justify = input.try(|input| AlignJustifySelf::parse(context, input)).unwrap_or(align.clone()); + let justify = input.try(|input| SelfAlignment::parse(context, input)).unwrap_or(align.clone()); if justify.has_extra_flags() { return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)); } diff --git a/components/style/values/computed/align.rs b/components/style/values/computed/align.rs index 54e7fd38bde..c7bf6a30c6b 100644 --- a/components/style/values/computed/align.rs +++ b/components/style/values/computed/align.rs @@ -11,7 +11,7 @@ use style_traits::{CssWriter, ToCss}; use values::computed::{Context, ToComputedValue}; use values::specified; -pub use super::specified::{AlignItems, ContentDistribution, AlignJustifySelf}; +pub use super::specified::{AlignItems, ContentDistribution, SelfAlignment}; /// The computed value for the `justify-items` property. /// diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index ae903dc5b89..7600d23a9d1 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -32,7 +32,7 @@ use super::specified; pub use app_units::Au; pub use properties::animated_properties::TransitionProperty; #[cfg(feature = "gecko")] -pub use self::align::{AlignItems, ContentDistribution, AlignJustifySelf, JustifyItems}; +pub use self::align::{AlignItems, ContentDistribution, SelfAlignment, JustifyItems}; pub use self::angle::Angle; pub use self::background::{BackgroundSize, BackgroundRepeat}; pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth}; diff --git a/components/style/values/specified/align.rs b/components/style/values/specified/align.rs index 62aefb5d546..584a24b61fb 100644 --- a/components/style/values/specified/align.rs +++ b/components/style/values/specified/align.rs @@ -240,13 +240,13 @@ impl Parse for ContentDistribution { /// <https://drafts.csswg.org/css-align/#self-alignment> #[cfg_attr(feature = "gecko", derive(MallocSizeOf))] #[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue, ToCss)] -pub struct AlignJustifySelf(pub AlignFlags); +pub struct SelfAlignment(pub AlignFlags); -impl AlignJustifySelf { +impl SelfAlignment { /// The initial value 'auto' #[inline] pub fn auto() -> Self { - AlignJustifySelf(AlignFlags::AUTO) + SelfAlignment(AlignFlags::AUTO) } /// Whether this value has extra flags. @@ -257,16 +257,16 @@ impl AlignJustifySelf { } -impl Parse for AlignJustifySelf { +impl Parse for SelfAlignment { // auto | normal | stretch | <baseline-position> | // [ <overflow-position>? && <self-position> ] fn parse<'i, 't>(_: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { // auto | normal | stretch | <baseline-position> if let Ok(value) = input.try(parse_auto_normal_stretch_baseline) { - return Ok(AlignJustifySelf(value)) + return Ok(SelfAlignment(value)) } // [ <overflow-position>? && <self-position> ] - Ok(AlignJustifySelf(parse_overflow_self_position(input)?)) + Ok(SelfAlignment(parse_overflow_self_position(input)?)) } } diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs index 237fe5834f1..2a9e05f7e75 100644 --- a/components/style/values/specified/mod.rs +++ b/components/style/values/specified/mod.rs @@ -26,7 +26,7 @@ use values::specified::calc::CalcNode; pub use properties::animated_properties::TransitionProperty; pub use self::angle::Angle; #[cfg(feature = "gecko")] -pub use self::align::{AlignItems, ContentDistribution, AlignJustifySelf, JustifyItems}; +pub use self::align::{AlignItems, ContentDistribution, SelfAlignment, JustifyItems}; pub use self::background::{BackgroundRepeat, BackgroundSize}; pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth}; pub use self::border::{BorderImageSideWidth, BorderRadius, BorderSideWidth, BorderSpacing}; |