[css-contain] Layout and size containment and baseline alignment #13025
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The CSSWG has recently resolved that layout containment
suppress baseline alignment, while size containment does not:
w3c/csswg-drafts#2995
Spec text (https://drafts.csswg.org/css-contain/#containment-layout):
"7. For the purpose of the vertical-align property,
or any other property whose effects need to relate
the position of the containing element's baseline
to something other than its descendants,
the containing element is treated as having no baseline."
And a note in (https://drafts.csswg.org/css-contain/#containment-size):
"Note: size containment does not suppress baseline alignment.
See layout containment for that."
The patch is just a modification in the condition at
LayoutBlock::UseLogicalBottomMarginEdgeForInlineBlockBaseline().
Some tests in the suite need minor modifications
due to the behavior change in order to match the references.
One of the Mozilla tests is failing now, a bug was reported
to get it updated (https://bugzilla.mozilla.org/1491235).
BUG=882333
TEST=external/wpt/css/css-contain/contain-layout-baseline-001.html
TEST=external/wpt/css/css-contain/contain-size-baseline-001.html
Change-Id: I08f157bfbc7477777b2f0b0157d8f05d3a6219d6
Reviewed-on: https://chromium-review.googlesource.com/1226146
Reviewed-by: Morten Stenshorne mstensho@chromium.org
Commit-Queue: Manuel Rego rego@igalia.com
Cr-Commit-Position: refs/heads/master@{#591642}