Closed Bug 1563050 Opened 5 years ago Closed 5 years ago

[css-contain] layout containment should suppress baseline alignment for table-cell

Categories

(Core :: Layout: Tables, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox69 --- fixed
firefox70 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

Right now, we fail the WPT http://w3c-test.org/css/css-contain/contain-layout-baseline-004.html ( https://wpt.fyi/results/css/css-contain/contain-layout-baseline-004.html?label=master&label=experimental ).

Per the spec, layout containment is supposed to apply to table-cell (but not other internal table parts), which means it should suppress baseline alignment in this case. But it's apparently not suppressing it right now, per this testcase.

Bugbug thinks this bug is a task, but please change it back in case of error.

Type: defect → task
Type: task → defect

This makes us pass WPT test contain-layout-baseline-004.html (i.e. it makes us
treat one table cell as having no baseline, so we align its bottom edge with
the other cell's baseline, as the test expects).

This is required by the spec text at [1] which excludes most table parts but
includes table cells, and says "the containing element is treated as having no
baseline").

[1] https://drafts.csswg.org/css-contain/#containment-layout

Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/824b5c4ed05e Treat table-cells with contain:layout as if they had no baseline. r=TYLin

I think this landed after the Beta69 branch point, so this will need a beta uplift in order for this to be fixed in the initial release of this feature, CSS Containment (which is targeting Firefox 69 release via bug 1487493).

I'll request beta uplift approval here after it's clear that the autoland landing has stuck.

Flags: needinfo?(dholbert)

Comment on attachment 9076288 [details]
Bug 1563050: Treat table-cells with contain:layout as if they had no baseline. r?TYLin

Beta/Release Uplift Approval Request

  • User impact if declined: Possible broken layout (misaligned table cells in pages that use contain:layout)
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Not risky. This is just adding one line of logic to make us ignore a table-cell's actual baseline (as the spec says we should) when it has the CSS contain:layout applied to it.

I'm requesting uplift because it's trivial and because we're intending to ship the contain property with Firefox 69, so it'd be nice to have this fixed as part of that release.

  • String changes made/needed: None
Flags: needinfo?(dholbert)
Attachment #9076288 - Flags: approval-mozilla-beta?

Just to be extra clear since it's merge week -- the beta-uplift-request is for Beta69, the "new" beta.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

Comment on attachment 9076288 [details]
Bug 1563050: Treat table-cells with contain:layout as if they had no baseline. r?TYLin

Minor CSS Containment fix. Approved for 69.0b4.

Attachment #9076288 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: