mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Rename AlignJustifySelf to SelfAlignment.
This matches the spec term and, again, the two properties will have different grammars soon. MozReview-Commit-ID: 8f8JXj2NnCi
This commit is contained in:
parent
d4a44de928
commit
711ea51d7b
6 changed files with 17 additions and 17 deletions
|
@ -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.
|
||||
///
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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)?))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue