Closed Bug 1912329 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 47528 - [layout] Fix content-contributions of calc-size().

Categories

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

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ian Kilpatrick <ikilpatrick@chromium.org> wrote:

[layout] Fix content-contributions of calc-size().

Previously we'd just treat calc-size() as effectively the same as auto.

This was incorrect. Instead:

  • Attempt to resolve the main length, if this succeeds this is our
    contribution. (This will capture the calc-size(min-content, size)
    case.
  • If this returns an indefinite size, we force the sizing keyword
    as auto, and for the min-size treat auto as min-content, and for
    the max-size treat auto as max-content.

This patch also fixes some "depends_on_block_constraints" logic
(accidentally) in cases like:
\<div style="min-width: min-content; width: 0px;">\</div>
where we weren't properly calculating this value.

Bug: 40339056
Change-Id: I22ee162deb49c37b948e5a22a12218b392710603
Reviewed-on: https://chromium-review.googlesource.com/5750362
WPT-Export-Revision: 3a811a964894bfae8fc16dbfee3ffb8b43d0f11a

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 8 tests

Status Summary

Firefox

PASS: 2
FAIL: 6

Chrome

FAIL: 8

Safari

FAIL: 8

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/64c0ba1ee4e8 [wpt PR 47528] - [layout] Fix content-contributions of calc-size()., a=testonly https://hg.mozilla.org/integration/autoland/rev/853b500cf406 [wpt PR 47528] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.