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] containment vs baseline alignement #2995

Closed
frivoal opened this issue Aug 7, 2018 · 5 comments
Closed

[css-contain] containment vs baseline alignement #2995

frivoal opened this issue Aug 7, 2018 · 5 comments

Comments

@frivoal
Copy link
Collaborator

frivoal commented Aug 7, 2018

I think the spec is a little bit unclear, and probably partially wrong, when it comes to the interaction of containment and baseline alignment.

  • If a non-empty inline-block has size containment, how should it be aligned in the line box that contains it? The way I understand size containment, it is only supposed to affect the size of the element with containment, causing it to be sized as if it was empty. This would mean that unlike an empty inline-block where we align the bottom margin edge with the parent's baseline (see CSS2 10.8), we would align the baseline of the box with the parent's baseline as we would do if the element had an explicit width and height of 0 instead of size containment.

    I am unsure about the meaning of what the spec currently says:

    When laying out the containing element, it must be treated as having no contents.

    After layout of the element is complete, its contents must then be laid out into the containing element’s resolved size.

    I think it only implies what I said above, but I am not sure. I suggest clarifying by changing to:

    When calculating the size of the containing element, it must be treated as having no contents.

    Then, its contents must then be laid out into the containing element’s resolved size.

  • On the other hand, it seems to me that layout containment should negate the ability to do baseline alignment, otherwise, internal changes in the layout of the element would be able to affect it's surroundings. Therefore, I suggest we add this to the list of effects of layout containment:

    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.

    The "any other property" part is meant to catch things like box-snap.

This is not what the Blink implementation does: it turns off baseline alignment on size containment, not on layout containment (see test case).

@frivoal frivoal self-assigned this Aug 7, 2018
@tabatkins
Copy link
Member

I agree that layout containment should treat it as having no baseline.

I think the intent of size containment is best served by also censoring its contents for baseline purposes; baseline alignment can affect the size of an element, and it's really weird for an element to collapse to zero height but still be baseline-aligned against a baseline that is now outside its bounds.

@frivoal
Copy link
Collaborator Author

frivoal commented Aug 8, 2018

I agree that layout containment should treat it as having no baseline.

Cool.

it's really weird for an element to collapse to zero height but still be baseline-aligned against a baseline that is now outside its bounds.

Is it? If you manually size an element with content to 0 height, it still baseline aligns, even though the baseline is outside of the bounds. Plus, I would not expect most element with size containment to collapse to 0, but rather to have a set height an use that. Then you have a non-zero sized inline block with visible content, but you can't baseline-align it. That seems weird.

From a use case point of view, as the spec says, the main reason to use size containment without layout containment is js-based container queries. I don't see anything about this use case that suggest that baseline alignment is any less desirable than in normal circumstances.

Oh, and I just realized that in my proposed text, I forgot to mention it applies to align-self/justify-self in addition to vertical-align, which actually makes it relevant not just to inline blocks, but also about grid and flex items

@tabatkins
Copy link
Member

Yeah, you're right, there really isn't anything wrong with size containment combining with baseline alignment. So then I agree with your original argument; layout containment should censor baselines, size containment shouldn't.

@css-meeting-bot
Copy link
Member

The Working Group just discussed containment vs baseline alignment, and agreed to the following:

  • RESOLVED: layout containment censors baselines and size containment does not
The full IRC log of that discussion <dael> Topic: containment vs baseline alignment
<dael> github: https://github.com//issues/2995
<dael> Rossen: TabAtkins can you do without florian ? Or do we punt?
<dael> TabAtkins: We concluded and wanted to see if obj.
<dael> TabAtkins: Spec wasn't clear what effect containments have on baseline. florian convinced me. Layout containment should censor the baseline b/c i t acts like there's nothing going on inside
<dael> TabAtkins: Don't have to do layout on contents to layout parent. Baseline requires you to know what's i nside
<dael> TabAtkins: Size containment does not censor. baseline doesn't effect that size in any way. Sizing works fine and you can baseline align
<dael> TabAtkins: Only potential weird is an overflow:visible element it can shrink to 0 but still have a baseline. That can happen today, though.
<dael> TabAtkins: Conclusion: layout containment censors baselines and size containment no change. Other containments don't matter here.
<dael> TabAtkins: Sound good?
<dael> Rossen: So this proposal only changes layout containment?
<dael> TabAtkins: Yes.
<dael> TabAtkins: urns out in chrome we don't pay attention to size but do for layout. We should be able to change. Per spec this only changes layout containment.
<dael> Rossen: Okay. Rest is clarification
<fantasai> +1
<fantasai> I think this is the correct resolution
<dael> Rossen: Reasonable. Seems florian agrees. Other comments?
<dael> Rossen: Objections to layout containment censors baselines and size containment does not
<dael> RESOLVED: layout containment censors baselines and size containment does not

frivoal added a commit to frivoal/wpt that referenced this issue Sep 6, 2018
Tests for w3c/csswg-drafts#2995

Only the layout and size variant are needed to catch know bugs (in
chrome) at the time of implementation, and mistakes on paint or style
would be surprising, but it doesn't hurt to be exhaustive.
@frivoal
Copy link
Collaborator Author

frivoal commented Sep 6, 2018

tests here: web-platform-tests/wpt#12868

frivoal added a commit to web-platform-tests/wpt that referenced this issue Sep 7, 2018
…12868)

* [css-contain] check the effects of containment on baseline alignment

Tests for w3c/csswg-drafts#2995

Only the layout and size variant are needed to catch know bugs (in
chrome) at the time of implementation, and mistakes on paint or style
would be surprising, but it doesn't hurt to be exhaustive.
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 12, 2018
…inment on baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] check the effects of containment on baseline alignment (#12868)

* [css-contain] check the effects of containment on baseline alignment

Tests for w3c/csswg-drafts#2995

Only the layout and size variant are needed to catch know bugs (in
chrome) at the time of implementation, and mistakes on paint or style
would be surprising, but it doesn't hurt to be exhaustive.
--

wpt-commits: 844cecae1ea48d364c5dfb723695354256c13666
wpt-pr: 12868
jankeromnes pushed a commit to jankeromnes/gecko that referenced this issue Sep 12, 2018
…inment on baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] check the effects of containment on baseline alignment (#12868)

* [css-contain] check the effects of containment on baseline alignment

Tests for w3c/csswg-drafts#2995

Only the layout and size variant are needed to catch know bugs (in
chrome) at the time of implementation, and mistakes on paint or style
would be surprising, but it doesn't hurt to be exhaustive.
--

wpt-commits: 844cecae1ea48d364c5dfb723695354256c13666
wpt-pr: 12868
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue 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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue 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}
aarongable pushed a commit to chromium/chromium that referenced this issue 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}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue 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}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 20, 2018
…t and baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] Layout and size containment and baseline alignment

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}

--

wpt-commits: bec8a89a03674f5cf7a6aa8b7b23d196c377790f
wpt-pr: 13025


--HG--
rename : testing/web-platform/tests/css/css-contain/reference/contain-size-021-ref.html => testing/web-platform/tests/css/css-contain/reference/contain-size-025-ref.html
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this issue Sep 20, 2018
…t and baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] Layout and size containment and baseline alignment

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}

--

wpt-commits: bec8a89a03674f5cf7a6aa8b7b23d196c377790f
wpt-pr: 13025
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Oct 9, 2018
… suppress baseline measurements r=dholbert

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."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

--HG--
extra : amend_source : 05dc9a320afeb1d58981e2bd8bc47b435999f2f9
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 9, 2018
…eline measurements

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."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1491235
gecko-commit: 4e07d3243403123217539ce6d328641daa0513da
gecko-integration-branch: mozilla-inbound
gecko-reviewers: dholbert
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 10, 2018
…eline measurements

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."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1491235
gecko-commit: 4e07d3243403123217539ce6d328641daa0513da
gecko-integration-branch: mozilla-inbound
gecko-reviewers: dholbert
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
…inment on baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] check the effects of containment on baseline alignment (#12868)

* [css-contain] check the effects of containment on baseline alignment

Tests for w3c/csswg-drafts#2995

Only the layout and size variant are needed to catch know bugs (in
chrome) at the time of implementation, and mistakes on paint or style
would be surprising, but it doesn't hurt to be exhaustive.
--

wpt-commits: 844cecae1ea48d364c5dfb723695354256c13666
wpt-pr: 12868

UltraBlame original commit: 858f51269eb26a23b18264f1e28f2647cc11a4ad
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
…t and baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] Layout and size containment and baseline alignment

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 <mstenshochromium.org>
Commit-Queue: Manuel Rego <regoigalia.com>
Cr-Commit-Position: refs/heads/master{#591642}

--

wpt-commits: bec8a89a03674f5cf7a6aa8b7b23d196c377790f
wpt-pr: 13025

UltraBlame original commit: 6f0f795fa265ba6dbc567458547a51518462b3f2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
…inment on baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] check the effects of containment on baseline alignment (#12868)

* [css-contain] check the effects of containment on baseline alignment

Tests for w3c/csswg-drafts#2995

Only the layout and size variant are needed to catch know bugs (in
chrome) at the time of implementation, and mistakes on paint or style
would be surprising, but it doesn't hurt to be exhaustive.
--

wpt-commits: 844cecae1ea48d364c5dfb723695354256c13666
wpt-pr: 12868

UltraBlame original commit: 858f51269eb26a23b18264f1e28f2647cc11a4ad
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
… suppress baseline measurements r=dholbert

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."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

UltraBlame original commit: 4e07d3243403123217539ce6d328641daa0513da
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
…t and baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] Layout and size containment and baseline alignment

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 <mstenshochromium.org>
Commit-Queue: Manuel Rego <regoigalia.com>
Cr-Commit-Position: refs/heads/master{#591642}

--

wpt-commits: bec8a89a03674f5cf7a6aa8b7b23d196c377790f
wpt-pr: 13025

UltraBlame original commit: 6f0f795fa265ba6dbc567458547a51518462b3f2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
… suppress baseline measurements r=dholbert

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."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

UltraBlame original commit: 4e07d3243403123217539ce6d328641daa0513da
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…inment on baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] check the effects of containment on baseline alignment (#12868)

* [css-contain] check the effects of containment on baseline alignment

Tests for w3c/csswg-drafts#2995

Only the layout and size variant are needed to catch know bugs (in
chrome) at the time of implementation, and mistakes on paint or style
would be surprising, but it doesn't hurt to be exhaustive.
--

wpt-commits: 844cecae1ea48d364c5dfb723695354256c13666
wpt-pr: 12868

UltraBlame original commit: 858f51269eb26a23b18264f1e28f2647cc11a4ad
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…t and baseline alignment, a=testonly

Automatic update from web-platform-tests[css-contain] Layout and size containment and baseline alignment

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 <mstenshochromium.org>
Commit-Queue: Manuel Rego <regoigalia.com>
Cr-Commit-Position: refs/heads/master{#591642}

--

wpt-commits: bec8a89a03674f5cf7a6aa8b7b23d196c377790f
wpt-pr: 13025

UltraBlame original commit: 6f0f795fa265ba6dbc567458547a51518462b3f2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
… suppress baseline measurements r=dholbert

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."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

UltraBlame original commit: 4e07d3243403123217539ce6d328641daa0513da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants