Closed Bug 2085482 Opened 1 month ago Closed 24 days ago

[wpt-sync] Sync PR 64058 - Make sizes="auto" two-dimensional

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Noam Rosenthal <nrosenthal@chromium.org> wrote:

Make sizes="auto" two-dimensional

Second part of https://github.com/whatwg/html/pull/13053, behind the
SrcsetTwoDimensionalSizes runtime flag.

When sizes="auto" is used, resolve it to the layout box's width and
height together with the computed object-fit, so that the source
concrete width of candidates with an h descriptor accounts for how the
image is fit into the box. The last auto-sizes size (used when the image
is not being rendered) stores the full TargetBoxSize.

A change to the computed object-fit of a lazy-loaded sizes="auto"
image is a relevant mutation, so re-run source selection (in a task, as
this is detected during style recalc).

Using the width/height attributes as a default aspect ratio for
candidates without an h descriptor is implemented in a follow-up CL.

Bug: 572724710
Change-Id: Ie4ce4feffc447102862fea230ba852ecdcc9dc3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8563320
Commit-Queue: Noam Rosenthal \<nrosenthal@google.com>
Reviewed-by: Stefan Zager \<szager@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1722995}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 17 tests and 74 subtests

Status Summary

Firefox

OK : 9
PASS : 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 11[GitHub] 810[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 816[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 1[GitHub] 13[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 2

Chrome

PASS : 11
FAIL : 1
TIMEOUT: 2

Safari

PASS : 11
FAIL : 1
TIMEOUT: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-display-none.html [wpt.fyi]
    • <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (display:none): FAIL
    • <img srcset="/images/green-1x1.png?f51 50w, /images/green-16x16.png?f51 51w" sizes="calc(0px / 0)"> ref sizes="100vw" (display:none): FAIL
    • <img srcset="/images/green-1x1.png?f52 50w, /images/green-16x16.png?f52 51w" sizes="calc(-1px / 0)"> ref sizes="100vw" (display:none): FAIL
  • /html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-quirks-mode.html [wpt.fyi]
    • <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (quirks mode): FAIL
    • <img srcset="/images/green-1x1.png?f51 50w, /images/green-16x16.png?f51 51w" sizes="calc(0px / 0)"> ref sizes="100vw" (quirks mode): FAIL
    • <img srcset="/images/green-1x1.png?f52 50w, /images/green-16x16.png?f52 51w" sizes="calc(-1px / 0)"> ref sizes="100vw" (quirks mode): FAIL
  • /html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html [wpt.fyi]
    • <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (standards mode): FAIL
    • <img srcset="/images/green-1x1.png?f51 50w, /images/green-16x16.png?f51 51w" sizes="calc(0px / 0)"> ref sizes="100vw" (standards mode): FAIL
    • <img srcset="/images/green-1x1.png?f52 50w, /images/green-16x16.png?f52 51w" sizes="calc(-1px / 0)"> ref sizes="100vw" (standards mode): FAIL
  • /html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html [wpt.fyi]
    • <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (width:1000px): FAIL
    • <img srcset="/images/green-1x1.png?f51 50w, /images/green-16x16.png?f51 51w" sizes="calc(0px / 0)"> ref sizes="100vw" (width:1000px): FAIL
    • <img srcset="/images/green-1x1.png?f52 50w, /images/green-16x16.png?f52 51w" sizes="calc(-1px / 0)"> ref sizes="100vw" (width:1000px): FAIL
  • /html/semantics/embedded-content/the-img-element/sizes/sizes-auto-2d.tentative.html [wpt.fyi]: TIMEOUT (Chrome: TIMEOUT, Safari: TIMEOUT)
    • <img loading="lazy" sizes="auto" style="object-fit: cover" srcset="/images/green-1x1.png?img9 50w 1h, /images/green-16x16.png?img9 51w 2h">: FAIL (Chrome: FAIL, Safari: FAIL)
    • Changing computed object-fit on an auto-sized img updates currentSrc: TIMEOUT (Chrome: TIMEOUT, Safari: TIMEOUT)
Status: NEW → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.