Closed Bug 1511305 Opened 7 years ago Closed 6 years ago

[wpt-sync] Sync PR 14302 - [css-contain][css-grid] Support size containment on grid containers

Categories

(Core :: CSS Parsing and Computation, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 14302 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/14302 Details from upstream follow. Manuel Rego Casasnovas <rego@igalia.com> wrote: > [css-contain][css-grid] Support size containment on grid containers > > We were always sizing grid containers with "contain: size" as 0x0. > However this is wrong as discussed on the following GitHub issue: > https://github.com/w3c/csswg-drafts/issues/2804 > > To do this we add a new method GridContainerSizeWithoutItems() > that returns the size based only on the grid container style. > As it should has the same size than the same grid container > without contents. > > For widths the change is pretty simple > in LayoutGrid::ComputeIntrinsicLogicalWidths(). > For heights we don't have a phase to compute the intrinsic size > so apart from the changes in LayoutGrid::UpdateBlockLayout() > we need some extra checks in LayoutBox too. > > There is a minor change in test contain-size-grid-002.html, > because after this patch it was not passing yet due to some overflow > that is unrelated to the purpose of the test. > > BUG=855261 > TEST=external/wpt/css/css-contain/contain-size-grid-002.html > TEST=external/wpt/css/css-contain/contain-size-grid-003.html > > Change-Id: I4d0fd417183068518070721afde84efdbfe1fcb4 > Reviewed-on: https://chromium-review.googlesource.com/1355923 > WPT-Export-Revision: 893d02885a06568eb64665401939bbc6f1b01c7b
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

Changing this from enhancement to defect. Doing (additional) optimizations when containment in turned on would be an enhancement, but containment needs to have the specified effects as a matter of correctness. If it doesn't authors may start (accidentally) rely on the incorrect behavior, and then we won't be able to introduce optimizations later on.

Type: enhancement → defect
Failed to get results from try push
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/393b6eaf4a58 [wpt PR 14302] - [css-contain][css-grid] Support size containment on grid containers, a=testonly https://hg.mozilla.org/integration/mozilla-inbound/rev/7e5996eff019 [wpt PR 14302] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.