Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-contain] Layout and size containment and baseline alignment #13025

Merged
merged 1 commit into from
Sep 17, 2018

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 17, 2018

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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants