Closed Bug 2091898 Opened 3 days ago Closed 12 hours ago

[wpt-sync] Sync PR 64510 - script: Ignore transforms in HTMLImageElement width/height getters

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Gabriele Cabrini <gabriele@gabrielecabrini.it> wrote:

script: Ignore transforms in HTMLImageElement width/height getters

HTMLImageElement width/height included CSS transforms, so <img style="scale: 0.7">
reported a scaled height. Per the spec they must return the untransformed content box, so
query it with exclude_transform_and_inline = true, as ResizeObserver already does.

Testing: Added a WPT test
Fixes: #<!-- nolink -->49446
Reviewed in servo/servo#49497

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 152 tests and 17 subtests

Status Summary

Firefox

OK : 1[GitHub] 123[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-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 2[GitHub] 4[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 1871[Gecko-windows11-32-25h2-debug] 1890[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] 1894[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 105[Gecko-windows11-32-25h2-debug] 106[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 108[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]

Chrome

OK : 1
PASS: 2

Safari

OK : 1
PASS: 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/animated-webp-update.tentative.html [wpt.fyi]: FAIL
  • /html/semantics/embedded-content/the-img-element/sizes/sizes-auto-2d.tentative.html [wpt.fyi]: SKIP
  • /html/semantics/embedded-content/the-img-element/attr-img-fetchpriority.html [wpt.fyi]
    • fetchpriority attribute on <img> elements should reflect valid IDL values: FAIL [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], PASS [Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
    • fetchPriority of new Image() is 'auto': FAIL [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], PASS [Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
  • /html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html [wpt.fyi]
    • HTMLImageElement.prototype.decode(), iframe tests. Decode from removed iframe fails (img not loaded): FAIL
    • HTMLImageElement.prototype.decode(), iframe tests. Decode from iframe, later removed, fails (img not loaded): FAIL
  • /html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html [wpt.fyi]
    • picture: source (max-width:500px) broken image, img broken image, resize to wide: FAIL
    • picture: source (max-width:500px) valid image, img broken image, resize to wide: FAIL
    • picture: source (max-width:500px) broken image, img broken image, resize to narrow: FAIL
    • picture: source (max-width:500px) broken image, img valid image, resize to narrow: FAIL
  • /html/semantics/embedded-content/the-img-element/image-base-url.html [wpt.fyi]
    • An image should not be refetched upon insertion asynchronously after its Document's base URL changes: FAIL
  • /html/semantics/embedded-content/the-img-element/image-loading-lazy-below-viewport-dynamic.html [wpt.fyi]
    • Test that below viewport images with loading='lazy' and changed to loading='eager' load and do not block the window load event.: FAIL
  • /html/semantics/embedded-content/the-img-element/image-loading-lazy-in-viewport-dynamic.html [wpt.fyi]
    • Test that in viewport images with loading='lazy' and changed to loading='eager' do not block the window load event.: FAIL
  • /html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times.html [wpt.fyi]
    • Images with loading='lazy' can be lazy loaded multiple times: FAIL
  • /html/semantics/embedded-content/the-img-element/list-of-available-images-does-not-coalesce-in-flight-requests.sub.tentative.html [wpt.fyi]
    • list of available images does not coalesce in-flight requests: FAIL
  • /html/semantics/embedded-content/the-img-element/relevant-mutations-lazy.html [wpt.fyi]
    • width attribute changes: FAIL
    • width property changes: FAIL
    • uncached width property changes: FAIL
    • percentage width, CB width changes: FAIL
    • height property changes (with aspect-ratio): FAIL
    • loading attribute changes to LAZY: FAIL
  • /html/semantics/embedded-content/the-img-element/relevant-mutations.html [wpt.fyi]
    • referrerpolicy no-referrer-when-downgrade to absent, src already set: FAIL
    • referrerpolicy no-referrer-when-downgrade to empty, src already set: FAIL
    • referrerpolicy no-referrer-when-downgrade to invalid, src already set: FAIL
    • referrerpolicy no-referrer to absent, src already set: FAIL
    • referrerpolicy no-referrer to empty, src already set: FAIL
    • referrerpolicy no-referrer to invalid, src already set: FAIL
    • srcset is set to same value: FAIL
    • sizes is set to same value: FAIL
  • /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-2d.tentative.html [wpt.fyi]
    • <img sizes="contain 10px 1000px" srcset="/images/green-1x1.png?img1 50w 50h, /images/green-16x16.png?img1 51w 51h">: FAIL
    • <picture><source sizes="contain 10px 1000px" srcset="/images/green-1x1.png?picture1 50w 50h, /images/green-16x16.png?picture1 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="contain 10px 1000px" imagesrcset="/images/green-1x1.png?link1 50w 50h, /images/green-16x16.png?link1 51w 51h">: FAIL
    • <img sizes="CONTAIN 10px 1000px" srcset="/images/green-1x1.png?img2 50w 50h, /images/green-16x16.png?img2 51w 51h">: FAIL
    • <picture><source sizes="CONTAIN 10px 1000px" srcset="/images/green-1x1.png?picture2 50w 50h, /images/green-16x16.png?picture2 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="CONTAIN 10px 1000px" imagesrcset="/images/green-1x1.png?link2 50w 50h, /images/green-16x16.png?link2 51w 51h">: FAIL
    • <img sizes="contain 10px 1000px, cover 10px 1000px" srcset="/images/green-1x1.png?img5 50w 50h, /images/green-16x16.png?img5 51w 51h">: FAIL
    • <picture><source sizes="contain 10px 1000px, cover 10px 1000px" srcset="/images/green-1x1.png?picture5 50w 50h, /images/green-16x16.png?picture5 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="contain 10px 1000px, cover 10px 1000px" imagesrcset="/images/green-1x1.png?link5 50w 50h, /images/green-16x16.png?link5 51w 51h">: FAIL
    • <img sizes="contain 10px 10px" srcset="/images/green-1x1.png?img7 50w 1h, /images/green-16x16.png?img7 51w 2h">: FAIL
    • <picture><source sizes="contain 10px 10px" srcset="/images/green-1x1.png?picture7 50w 1h, /images/green-16x16.png?picture7 51w 2h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="contain 10px 10px" imagesrcset="/images/green-1x1.png?link7 50w 1h, /images/green-16x16.png?link7 51w 2h">: FAIL
    • <img sizes="(min-width: 0px) contain 10px 1000px, cover 10px 1000px" srcset="/images/green-1x1.png?img8 50w 50h, /images/green-16x16.png?img8 51w 51h">: FAIL
    • <picture><source sizes="(min-width: 0px) contain 10px 1000px, cover 10px 1000px" srcset="/images/green-1x1.png?picture8 50w 50h, /images/green-16x16.png?picture8 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(min-width: 0px) contain 10px 1000px, cover 10px 1000px" imagesrcset="/images/green-1x1.png?link8 50w 50h, /images/green-16x16.png?link8 51w 51h">: FAIL
    • <img sizes="(max-width: 0px) cover 10px 1000px, contain 10px 1000px" srcset="/images/green-1x1.png?img10 50w 50h, /images/green-16x16.png?img10 51w 51h">: FAIL
    • <picture><source sizes="(max-width: 0px) cover 10px 1000px, contain 10px 1000px" srcset="/images/green-1x1.png?picture10 50w 50h, /images/green-16x16.png?picture10 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(max-width: 0px) cover 10px 1000px, contain 10px 1000px" imagesrcset="/images/green-1x1.png?link10 50w 50h, /images/green-16x16.png?link10 51w 51h">: FAIL
    • <img sizes="(min-width: 0px) contain 10px 1000px, 1000px" srcset="/images/green-1x1.png?img11 50w 50h, /images/green-16x16.png?img11 51w 51h">: FAIL
    • <picture><source sizes="(min-width: 0px) contain 10px 1000px, 1000px" srcset="/images/green-1x1.png?picture11 50w 50h, /images/green-16x16.png?picture11 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(min-width: 0px) contain 10px 1000px, 1000px" imagesrcset="/images/green-1x1.png?link11 50w 50h, /images/green-16x16.png?link11 51w 51h">: FAIL
    • <img sizes="(max-width: 0px) contain 1000px 1000px, contain 10px 1000px" srcset="/images/green-1x1.png?img12 50w 50h, /images/green-16x16.png?img12 51w 51h">: FAIL
    • <picture><source sizes="(max-width: 0px) contain 1000px 1000px, contain 10px 1000px" srcset="/images/green-1x1.png?picture12 50w 50h, /images/green-16x16.png?picture12 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(max-width: 0px) contain 1000px 1000px, contain 10px 1000px" imagesrcset="/images/green-1x1.png?link12 50w 50h, /images/green-16x16.png?link12 51w 51h">: FAIL
    • <img sizes="(max-width: 0px) cover 10px 1000px, (min-width: 0px) contain 10px 1000px, 1000px" srcset="/images/green-1x1.png?img13 50w 50h, /images/green-16x16.png?img13 51w 51h">: FAIL
    • <picture><source sizes="(max-width: 0px) cover 10px 1000px, (min-width: 0px) contain 10px 1000px, 1000px" srcset="/images/green-1x1.png?picture13 50w 50h, /images/green-16x16.png?picture13 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(max-width: 0px) cover 10px 1000px, (min-width: 0px) contain 10px 1000px, 1000px" imagesrcset="/images/green-1x1.png?link13 50w 50h, /images/green-16x16.png?link13 51w 51h">: FAIL
    • <img sizes="not (max-width: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?img14 50w 50h, /images/green-16x16.png?img14 51w 51h">: FAIL
    • <picture><source sizes="not (max-width: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?picture14 50w 50h, /images/green-16x16.png?picture14 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="not (max-width: 0px) cover 10px 1000px, 1px" imagesrcset="/images/green-1x1.png?link14 50w 50h, /images/green-16x16.png?link14 51w 51h">: FAIL
    • <img sizes="(min-width: 0px) and (min-height: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?img16 50w 50h, /images/green-16x16.png?img16 51w 51h">: FAIL
    • <picture><source sizes="(min-width: 0px) and (min-height: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?picture16 50w 50h, /images/green-16x16.png?picture16 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(min-width: 0px) and (min-height: 0px) cover 10px 1000px, 1px" imagesrcset="/images/green-1x1.png?link16 50w 50h, /images/green-16x16.png?link16 51w 51h">: FAIL
    • <img sizes="(max-width: 0px) or (min-height: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?img18 50w 50h, /images/green-16x16.png?img18 51w 51h">: FAIL
    • <picture><source sizes="(max-width: 0px) or (min-height: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?picture18 50w 50h, /images/green-16x16.png?picture18 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(max-width: 0px) or (min-height: 0px) cover 10px 1000px, 1px" imagesrcset="/images/green-1x1.png?link18 50w 50h, /images/green-16x16.png?link18 51w 51h">: FAIL
    • <img sizes="(width >= 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?img19 50w 50h, /images/green-16x16.png?img19 51w 51h">: FAIL
    • <picture><source sizes="(width >= 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?picture19 50w 50h, /images/green-16x16.png?picture19 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(width >= 0px) cover 10px 1000px, 1px" imagesrcset="/images/green-1x1.png?link19 50w 50h, /images/green-16x16.png?link19 51w 51h">: FAIL
    • <img sizes="(min-width: 0px) cover 10px 1000px, (min-width: 0px) 1px" srcset="/images/green-1x1.png?img23 50w 50h, /images/green-16x16.png?img23 51w 51h">: FAIL
    • <picture><source sizes="(min-width: 0px) cover 10px 1000px, (min-width: 0px) 1px" srcset="/images/green-1x1.png?picture23 50w 50h, /images/green-16x16.png?picture23 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="(min-width: 0px) cover 10px 1000px, (min-width: 0px) 1px" imagesrcset="/images/green-1x1.png?link23 50w 50h, /images/green-16x16.png?link23 51w 51h">: FAIL
    • <img sizes="(min-width: 0px) cover 10px 1000px, 1px" width="1" height="1" srcset="/images/green-1x1.png?img32 50w, /images/green-16x16.png?img32 51w">: FAIL
    • <picture><source sizes="(min-width: 0px) cover 10px 1000px, 1px" width="1" height="1" srcset="/images/green-1x1.png?picture32 50w, /images/green-16x16.png?picture32 51w"><img></picture>: FAIL
    • <img sizes="cover 10px 1000px" srcset="/images/green-1x1.png?img33 50w, /images/green-16x16.png?img33 51w">: FAIL
    • <picture><source sizes="cover 10px 1000px" srcset="/images/green-1x1.png?picture33 50w, /images/green-16x16.png?picture33 51w"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="cover 10px 1000px" imagesrcset="/images/green-1x1.png?link33 50w, /images/green-16x16.png?link33 51w">: FAIL
    • <img sizes="cover 10px 10px" width="1" height="1" srcset="/images/green-1x1.png?img34 50w 50h, /images/green-16x16.png?img34 51w 51h">: FAIL
    • <picture><source sizes="cover 10px 10px" width="1" height="1" srcset="/images/green-1x1.png?picture34 50w 50h, /images/green-16x16.png?picture34 51w 51h"><img></picture>: FAIL
    • <img sizes="contain 10px 1000px" style="object-fit: cover" srcset="/images/green-1x1.png?img35 50w 50h, /images/green-16x16.png?img35 51w 51h">: FAIL
    • <picture><source sizes="contain 10px 1000px" srcset="/images/green-1x1.png?picture35 50w 50h, /images/green-16x16.png?picture35 51w 51h"><img style="object-fit: cover"></picture>: FAIL
    • <img sizes="auto, (min-width: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?img37 50w 50h, /images/green-16x16.png?img37 51w 51h">: FAIL
    • <picture><source sizes="auto, (min-width: 0px) cover 10px 1000px, 1px" srcset="/images/green-1x1.png?picture37 50w 50h, /images/green-16x16.png?picture37 51w 51h"><img></picture>: FAIL
    • <link rel="preload" as="image" imagesizes="auto, (min-width: 0px) cover 10px 1000px, 1px" imagesrcset="/images/green-1x1.png?link37 50w 50h, /images/green-16x16.png?link37 51w 51h">: FAIL
    • <picture><source sizes="cover 10px 1000px" srcset="/images/green-1x1.png?picture-source-width-only 50w, /images/green-16x16.png?picture-source-width-only 51w" width="1"><img width="1" height="1"></picture>: FAIL
  • /html/semantics/embedded-content/the-img-element/svg-img-density-vs-zoom.html [wpt.fyi]
    • SVG, no intrinsic dims + 2x zoom: rendered size scaled, naturalWidth/Height not: FAIL
    • SVG, intrinsic width only + 2x zoom: everything scaled: FAIL
  • /html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html [wpt.fyi]
    • <img src="//[">: FAIL
    • <img srcset="//[">: FAIL
    • <img srcset="//[" src="/images/red.png">: FAIL
    • <img srcset="//[, /images/red.png">: FAIL
  • /html/semantics/embedded-content/the-img-element/usemap-casing.html [wpt.fyi]
    • Image with usemap of #sanityCheck should match the area with map named sanityCheck: FAIL
  • /html/semantics/embedded-content/the-img-element/width-height-attribute-parsing.html [wpt.fyi]
    • width and height attribute value "+10": FAIL
    • width and height attribute value "50%": FAIL
    • width and height attribute value "1.9": FAIL
    • width and height attribute value "0.5": FAIL
    • width and height attribute value "-0": FAIL
    • width and height attribute value "-0.5": FAIL

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6a9ae596a03b https://hg.mozilla.org/integration/autoland/rev/dab14d20b509 [wpt PR 64510] - script: Ignore transforms in HTMLImageElement width/height getters, a=testonly
Status: NEW → RESOLVED
Closed: 12 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.