tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 754892ef9425c268d2025968424547bee428c777
parent c72761bb5da5d33a7021b728edb8626bef8756a7
Author: Andrei Volykhin <andrei.volykhin@gmail.com>
Date:   Wed, 15 Oct 2025 08:20:59 +0000

Bug 1993469 [wpt PR 55305] - html: Do not update the image data inside legacy <image> constructor, a=testonly

Automatic update from web-platform-tests
html: Do not update the image data inside legacy <image> constructor

The legacy 'image' constructor (new Image()) doesn't have any step
in specification which require to run `update the image data`
algorithm.

See https://html.spec.whatwg.org/multipage/#dom-image

This non-conformant behavior was added in the PR #31269 to follow
https://html.spec.whatwg.org/multipage/#when-to-obtain-images
(.. whenever that element is created or has experienced relevant
mutations) to handle the edge case of `decode()` with 'image' without
"src" and "srcset" attributes.

See html/semantics/embedded-content/the-img-element/decode/image-decode.html#L87

Testing: No changes in test expectations

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>

--

wpt-commits: 04521c5e109399816d767ddcccb759e3f574c363
wpt-pr: 55305

Diffstat:
Mtesting/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html @@ -84,6 +84,12 @@ promise_test(function(t) { var img = new Image(); var promise = img.decode(); return promise_rejects_dom(t, "EncodingError", promise); +}, document.title + " Image (legacy) without src/srcset fails decode."); + +promise_test(function(t) { + var img = document.createElement("img"); + var promise = img.decode(); + return promise_rejects_dom(t, "EncodingError", promise); }, document.title + " Image without src/srcset fails decode."); promise_test(function() {