Closed Bug 1449132 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 10194 - [css-grid] Fix resolution of percentage paddings and marings of grid items

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 10194 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/w3c/web-platform-tests/pull/10194
Details from upstream follow.

Manuel Rego Casasnovas <rego@igalia.com> wrote:
>  [css-grid] Fix resolution of percentage paddings and marings of grid items
>  
>  We were not resolving properly percentage paddings and margins
>  for tracks that have something like minmax(auto, 100px).
>  The reason was that while computing the minimum size of a grid item,
>  the percentages were resolved against the inline size of the grid container.
>  But for grid items we shouldn't never use the grid container size,
>  but the grid area size, as that's their containing block.
>  
>  The patch modifies ContainingBlockLogicalWidthForContent() and
>  ContainingBlockLogicalHeightForContent() in LayoutBox,
>  so for grid items we return 0 if the area size hasn't been set yet.
>  We never want to use the grid container's sizes in these cases.
>  
>  BUG=808758
>  TEST=external/wpt/css/css-grid/grid-items/grid-items-percentage-margins-*
>  TEST=external/wpt/css/css-grid/grid-items/grid-items-percentage-paddings-*
>  
>  Change-Id: Ib142e51aee1fe623d38688469b179f01f82eb07b
>  Reviewed-on: https://chromium-review.googlesource.com/980756
>  WPT-Export-Revision: e20721c5bdac8e50b5c667211c58825c8896470f
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 12 tests and 96 subtests
OK     : 12
FAIL   : 96

New tests that have failures or other problems:
/css/css-grid/grid-items/grid-items-percentage-margins-001.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-margins-002.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-margins-vertical-lr-001.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-margins-vertical-lr-002.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-margins-vertical-rl-001.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-margins-vertical-rl-002.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-paddings-001.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-paddings-002.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-001.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-001.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002.html
    .grid 1: FAIL
    .grid 2: FAIL
    .grid 3: FAIL
    .grid 4: FAIL
    .grid 5: FAIL
    .grid 6: FAIL
    .grid 7: FAIL
    .grid 8: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1715027770e
[wpt PR 10194] - [css-grid] Fix resolution of percentage paddings and margins of grid items, a=testonly
https://hg.mozilla.org/mozilla-central/rev/c1715027770e
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.