mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Restrict <baseline-position> and <content-position> depending on the axis in content distribution properties.
This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1430817, and updates us to the current version of the css-align spec. MozReview-Commit-ID: LtBcdqYJeK
This commit is contained in:
parent
7497720081
commit
fd47a93b9c
2 changed files with 57 additions and 33 deletions
|
@ -634,11 +634,19 @@
|
|||
FallbackAllowed::No,
|
||||
AxisDirection::Block,
|
||||
)
|
||||
}).unwrap_or(align_content);
|
||||
});
|
||||
|
||||
let justify_content = match justify_content {
|
||||
Ok(v) => v,
|
||||
Err(err) => {
|
||||
if !align_content.is_valid_on_both_axes() {
|
||||
return Err(err);
|
||||
}
|
||||
|
||||
align_content
|
||||
}
|
||||
};
|
||||
|
||||
// NOTE(emilio): align-content parsing is more restrictive than
|
||||
// justify-content parsing, so no need to do any extra check here for
|
||||
// that.
|
||||
if align_content.has_extra_flags() || justify_content.has_extra_flags() {
|
||||
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue