New issue
Advanced search Search tips

Issue 882388 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

[css-contain] Size containment and fieldset

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

Issue description


When you use "contain: size" on a fieldset element,
it should ignore its contents to determine the size.

Spec (https://drafts.csswg.org/css-contain/#containment-size):
  "When calculating the size of the containing element,
   it must be treated as having no contents."

Tests:
* http://w3c-test.org/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-fieldset-001.html
* http://w3c-test.org/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-fieldset-002.html
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 25

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

commit d157b3968431272cf98ef6b030886c938bcd1047
Author: Manuel Rego Casasnovas <rego@igalia.com>
Date: Tue Sep 25 21:57:08 2018

[css-contain] Fix size containment on fieldsets

Fieldsets with "contain: size" were not ignoring the legend
when determining their size.

Spec (https://drafts.csswg.org/css-contain/#containment-size):
  "When calculating the size of the containing element,
   it must be treated as having no contents."

The patch is just an early return in
LayoutFieldset::ComputePreferredLogicalWidths()
like we have in other parts of the code.

BUG= 882388 
TEST=external/wpt/css/css-contain/contain-size-fieldset-001.html

Change-Id: I79425cf9c10ecf794f52cb4f635b95e1be059d81
Reviewed-on: https://chromium-review.googlesource.com/1242357
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594119}
[add] https://crrev.com/d157b3968431272cf98ef6b030886c938bcd1047/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-size-fieldset-001.html
[add] https://crrev.com/d157b3968431272cf98ef6b030886c938bcd1047/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/reference/contain-size-fieldset-001-ref.html
[modify] https://crrev.com/d157b3968431272cf98ef6b030886c938bcd1047/third_party/blink/renderer/core/layout/layout_fieldset.cc

Owner: r...@igalia.com
Status: Fixed (was: Available)
This is fixed now.

Mozilla tests don't pass yet, but that's because the references need to get updated (as size containment suppress baseline alignment in Firefox when it shouldn't). See https://bugzilla.mozilla.org/1491235.

Sign in to add a comment