New issue
Advanced search Search tips

Issue 882333 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[css-contain] Layout containment suppresses baseline alignment, but size containment does not

Project Member Reported by r...@igalia.com, Sep 10

Issue description


The CSSWG has resolved this in a recent issue: https://github.com/w3c/csswg-drafts/issues/2995
> RESOLVED: layout containment censors baselines and size containment does not

The following tests check this:
* http://w3c-test.org/css/css-contain/contain-layout-baseline-001.html
* http://w3c-test.org/css/css-contain/contain-size-baseline-001.html

 
Owner: r...@igalia.com
Status: Started (was: Available)

Reported bug on Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1491235) as one of their tests fail if we remove current behavior regarding size containment and baseline alignment.
That's why the patch marks as failure the test:
external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-inline-block-001.html
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89ed4eb7db99eaab7add934bb6ff761579d85451

commit 89ed4eb7db99eaab7add934bb6ff761579d85451
Author: Manuel Rego Casasnovas <rego@igalia.com>
Date: Mon Sep 17 11:30:54 2018

[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:
https://github.com/w3c/csswg-drafts/issues/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}
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-layout-independent-formatting-context-002.html
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-023.html
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-025.html
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-027.html
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-041.html
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-021-ref.html
[add] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-023-ref.html
[add] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-025-ref.html
[add] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-027-ref.html
[modify] https://crrev.com/89ed4eb7db99eaab7add934bb6ff761579d85451/third_party/blink/renderer/core/layout/layout_block.cc

Status: Fixed (was: Started)
Cc: robertma@chromium.org kojii@chromium.org
 Issue 881872  has been merged into this issue.
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2

commit 5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2
Author: Manuel Rego Casasnovas <rego@igalia.com>
Date: Fri Sep 28 15:48:32 2018

[css-contain] Layout|Size containment and baseline in flexbox|grid

In r591642 we updated the behavior so layout containment
suppress baseline alignment, while size containment does not.
However, we forgot about the special cases (flexbox and grid)
that have their own code for this, which are fixed in this patch.

Regarding WPT tests, these changes will fix the following issue:
https://github.com/web-platform-tests/wpt/issues/13252

One of the Mozilla tests is failing now, it was mentioned
in the associated bug report (https://bugzilla.mozilla.org/1491235).

BUG= 882333 
TEST=external/wpt/css/css-contain/contain-layout-button-001.html
TEST=external/wpt/css/css-contain/contain-layout-flexbox-001.html
TEST=external/wpt/css/css-contain/contain-layout-grid-001.html
TEST=external/wpt/css/css-contain/contain-size-button-001.html
TEST=external/wpt/css/css-contain/contain-size-flexbox-001.html
TEST=external/wpt/css/css-contain/contain-size-grid-001.html

Change-Id: I5e437d7f82d07d2f6222416a1eb9a3b89cb44eca
Reviewed-on: https://chromium-review.googlesource.com/1250524
Commit-Queue: Manuel Rego <rego@igalia.com>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595105}
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-layout-button-001.html
[add] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-layout-flexbox-001.html
[add] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-layout-grid-001.html
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-button-001.html
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-flexbox-001.html
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-grid-001.html
[add] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-layout-button-001-ref.html
[add] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-layout-flexbox-001-ref.html
[add] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-layout-grid-001-ref.html
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-button-001-ref.html
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-flexbox-001-ref.html
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-grid-001-ref.html
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/blink/renderer/core/layout/layout_flexible_box.cc
[modify] https://crrev.com/5b55328c8fce72b3c9f85d78b4bd2dd02e6704b2/third_party/blink/renderer/core/layout/layout_grid.cc

Sign in to add a comment