Closed Bug 1937919 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 49744 - layout: Never stretch indefinite intrinsic keywords other than `auto`

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Oriol Brufau <obrufau@igalia.com> wrote:

layout: Never stretch indefinite intrinsic keywords other than auto

Consider:

<div style="position: relative; width: 50px; height: 50px; border: solid; margin: 5px">
  <div style="position: absolute; top: 0; bottom: 0; height: max-content">
    <canvas width="25" height="25" style="background: cyan; height: 100%"></canvas>
  </div>
</div>

In order to determine the inline min/max-content sizes, we need a tentative block size as the input, which only takes extrinsic values into account.

In this case height: max-content is intrinsic, so we were treating it as height: initial, which would behave as a definite height: stretch. Therefore, the canvas was able to resolve its percentage.

However, it seems weird to treat an explicitly intrinsic keyword in an extrinsic way, and Blink doesn't do it. So now we treat the tentative block size as indefinite, therefore the percentage behaves as auto.

This adds a new test, we were previously failing 6 subtests, now only 3.

<!-- Please describe your changes on the following line: -->

Reviewed in servo/servo#34672

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 60 subtests

Status Summary

Firefox

OK : 1
PASS: 48
FAIL: 12

Chrome

OK : 1
PASS: 60

Safari

OK : 1
PASS: 51
FAIL: 9

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

  • /css/css-sizing/keyword-sizes-on-abspos.html [wpt.fyi]
    • .test 35: FAIL (Chrome: PASS, Safari: FAIL)
    • .test 37: FAIL (Chrome: PASS, Safari: PASS)
    • .test 38: FAIL (Chrome: PASS, Safari: PASS)
    • .test 39: FAIL (Chrome: PASS, Safari: PASS)
    • .test 40: FAIL (Chrome: PASS, Safari: FAIL)
    • .test 42: FAIL (Chrome: PASS, Safari: PASS)
    • .test 43: FAIL (Chrome: PASS, Safari: PASS)
    • .test 44: FAIL (Chrome: PASS, Safari: PASS)
    • .test 45: FAIL (Chrome: PASS, Safari: FAIL)
    • .test 50: FAIL (Chrome: PASS, Safari: FAIL)
    • .test 55: FAIL (Chrome: PASS, Safari: FAIL)
    • .test 60: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e0059c1eca8c [wpt PR 49744] - layout: Never stretch indefinite intrinsic keywords other than `auto`, a=testonly https://hg.mozilla.org/integration/autoland/rev/97738a97bfeb [wpt PR 49744] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.