style: Rename AlignJustifyContent to ContentDistribution.

align-content and justify-content will have different types in a second.

MozReview-Commit-ID: 5JDeR5kXZNP
This commit is contained in:
Emilio Cobos Álvarez 2018-01-24 12:23:00 +01:00
parent da56bdecc6
commit d4a44de928
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 24 additions and 24 deletions

View file

@ -69,8 +69,8 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
animation_value_type="discrete")}
% else:
${helpers.predefined_type(name="justify-content",
type="AlignJustifyContent",
initial_value="specified::AlignJustifyContent::normal()",
type="ContentDistribution",
initial_value="specified::ContentDistribution::normal()",
spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
extra_prefixes="webkit",
animation_value_type="discrete")}
@ -90,8 +90,8 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
animation_value_type="discrete")}
% else:
${helpers.predefined_type(name="align-content",
type="AlignJustifyContent",
initial_value="specified::AlignJustifyContent::normal()",
type="ContentDistribution",
initial_value="specified::ContentDistribution::normal()",
spec="https://drafts.csswg.org/css-align/#propdef-align-content",
extra_prefixes="webkit",
animation_value_type="discrete")}

View file

@ -615,18 +615,18 @@
<%helpers:shorthand name="place-content" sub_properties="align-content justify-content"
spec="https://drafts.csswg.org/css-align/#propdef-place-content"
products="gecko">
use values::specified::align::{AlignJustifyContent, FallbackAllowed};
use values::specified::align::{ContentDistribution, FallbackAllowed};
pub fn parse_value<'i, 't>(
_: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> {
let align = AlignJustifyContent::parse_with_fallback(input, FallbackAllowed::No)?;
let align = ContentDistribution::parse_with_fallback(input, FallbackAllowed::No)?;
if align.has_extra_flags() {
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}
let justify =
input.try(|input| AlignJustifyContent::parse_with_fallback(input, FallbackAllowed::No))
input.try(|input| ContentDistribution::parse_with_fallback(input, FallbackAllowed::No))
.unwrap_or(align);
if justify.has_extra_flags() {
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));