Skip to content

Remove width as relevant mutation for image - #13033

Merged
zcorpan merged 1 commit into
whatwg:mainfrom
TimvdLippe:width-relevant-mutation
Oct 6, 2026
Merged

zcorpan merged 1 commit into
whatwg:mainfrom
TimvdLippe:width-relevant-mutation

Conversation

@TimvdLippe

@TimvdLippe TimvdLippe commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

An engine that implements this will start to cause
several tests to either flake or incorrectly pass: servo/servo@2e584db

Engines currently already implement this, but the
tests need to be updated so that all engines pass
the tests (currently only Chromium does):
web-platform-tests/wpt#63308

Fixes #9371

(See WHATWG Working Mode: Changes for more details.)


/images.html ( diff )

An engine that implements this will start to cause
several tests to either flake or incorrectly pass:
servo/servo@2e584db

Fixes whatwg#9371
@TimvdLippe

Copy link
Copy Markdown
Contributor Author

@zcorpan Since you opened #9371 would Gecko be supportive of changing the spec here? When we implement it as-is, then Servo would have significant flakiness in two test suites.

@annevk

annevk commented Oct 3, 2026

Copy link
Copy Markdown
Member

If the main engines already do this, this doesn’t need explicit support. Might be good to mention that in the final commit message.

@TimvdLippe

Copy link
Copy Markdown
Contributor Author

Well, I am not confident to claim that. When I looked up the relevant tests, Gecko and Webkit might actually implement this: https://wpt.fyi/results/html/semantics/embedded-content/the-img-element/relevant-mutations-lazy.html?label=experimental&label=master&aligned

@zcorpan

zcorpan commented Oct 5, 2026

Copy link
Copy Markdown
Member

From code inspection this seems to match Chromium, WebKit, and Gecko. The tests should be updated to match though.

The spec also expects width and height on source to be relevant mutations, but that seems to not be implemented either. This could be a follow-up though.

@TimvdLippe

Copy link
Copy Markdown
Contributor Author

Ah okay thanks! I did my best to rewrite the PR description, but not actually sure what I should write there. Feel free to update it as you see fit.

@zcorpan

zcorpan commented Oct 5, 2026

Copy link
Copy Markdown
Member

For Firefox, the test results can be explained by lack of "maybe omit events" for layout changes.

For Safari TP, they can be explained by the same URL being used for all images and it's cached and used by lazy images (but results are flaky).

To fix the test, update the test expectation for "width attribute changes" to 'timeout', and add a different query string for each image.

@TimvdLippe

Copy link
Copy Markdown
Contributor Author

I don't have Safari available to test locally, but I think web-platform-tests/wpt#63308 are the changes as requested.

@zcorpan
zcorpan merged commit ba3400b into whatwg:main Oct 6, 2026
2 checks passed
zcorpan pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 9, 2026
Following whatwg/html#13033 that should
timeout instead of load, as no engine currently does that.

Additionally, this test flakes on Safari because all images are lazily
loaded from the cache. To dedupe these cache hits, add a query
string to each of them to ensure they are all unique.
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Oct 13, 2026
…nges, a=testonly

Automatic update from web-platform-tests
Fix expectations for width attribute changes

Following whatwg/html#13033 that should
timeout instead of load, as no engine currently does that.

Additionally, this test flakes on Safari because all images are lazily
loaded from the cache. To dedupe these cache hits, add a query
string to each of them to ensure they are all unique.
--
Update relevant-mutations-lazy.html
--

wpt-commits: 15c04ca9d43b87c817fa74aeb5c7d9346bb8ca66, 71b4d5f0eb7628a5d5f7cd2ee868ce1b1b5dc010
wpt-pr: 63308
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 13, 2026
…nges, a=testonly

Automatic update from web-platform-tests
Fix expectations for width attribute changes

Following whatwg/html#13033 that should
timeout instead of load, as no engine currently does that.

Additionally, this test flakes on Safari because all images are lazily
loaded from the cache. To dedupe these cache hits, add a query
string to each of them to ensure they are all unique.
--
Update relevant-mutations-lazy.html
--

wpt-commits: 15c04ca9d43b87c817fa74aeb5c7d9346bb8ca66, 71b4d5f0eb7628a5d5f7cd2ee868ce1b1b5dc010
wpt-pr: 63308

UltraBlame original commit: 87dbe27dad7ae6ab284bc83de6e7528e16d576d8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 13, 2026
…nges, a=testonly

Automatic update from web-platform-tests
Fix expectations for width attribute changes

Following whatwg/html#13033 that should
timeout instead of load, as no engine currently does that.

Additionally, this test flakes on Safari because all images are lazily
loaded from the cache. To dedupe these cache hits, add a query
string to each of them to ensure they are all unique.
--
Update relevant-mutations-lazy.html
--

wpt-commits: 15c04ca9d43b87c817fa74aeb5c7d9346bb8ca66, 71b4d5f0eb7628a5d5f7cd2ee868ce1b1b5dc010
wpt-pr: 63308

UltraBlame original commit: 87dbe27dad7ae6ab284bc83de6e7528e16d576d8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 13, 2026
…nges, a=testonly

Automatic update from web-platform-tests
Fix expectations for width attribute changes

Following whatwg/html#13033 that should
timeout instead of load, as no engine currently does that.

Additionally, this test flakes on Safari because all images are lazily
loaded from the cache. To dedupe these cache hits, add a query
string to each of them to ensure they are all unique.
--
Update relevant-mutations-lazy.html
--

wpt-commits: 15c04ca9d43b87c817fa74aeb5c7d9346bb8ca66, 71b4d5f0eb7628a5d5f7cd2ee868ce1b1b5dc010
wpt-pr: 63308

UltraBlame original commit: 87dbe27dad7ae6ab284bc83de6e7528e16d576d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

The width attribute should not be a relevant mutation

3 participants