Skip to content

Fix expectations for width attribute changes - #63308

Merged
zcorpan merged 2 commits into
masterfrom
TimvdLippe-patch-1
Oct 9, 2026
Merged

zcorpan merged 2 commits into
masterfrom
TimvdLippe-patch-1

Conversation

@TimvdLippe

Copy link
Copy Markdown
Contributor

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.

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.
@zcorpan
zcorpan enabled auto-merge (rebase) October 6, 2026 09:11
@TimvdLippe

Copy link
Copy Markdown
Contributor Author

@zcorpan Seems like Safari is now stable, but Chrome and Firefox are not. https://wpt.fyi/results/html/semantics/embedded-content/the-img-element/relevant-mutations-lazy.html?label=pr_head&pr=63308 appears to be looking fine, so then we need to deal with the flakiness. It is suspicious to me that all tests now expect a timeout and none use the load path. Also the comment (lazy-loaded images should have fired their first 'load' event at this point.) I am not sure how that is guaranteed? Maybe before it was guaranteed since it was all loading the same image, so all lazily loaded images would be taken out of the cache and thus that was guaranteed.

Should we instead add a load event listener to all image elements and only once they all fired, we change the various properties/attributes/etc... in the test?

@zcorpan

zcorpan commented Oct 8, 2026

Copy link
Copy Markdown
Member

Ah right, the test relied on the caching of the eager image to get predictable timing for the load events of the lazy images. Though the spec doesn't guarantee any particular timing, even when cached, in practice the results were stable in Gecko and Chromium.

In Safari, 5 subtests fail consistently, because the eager load is applied to the lazy images with the same URL. Per spec, maybe omit events suppresses load there regardless of caching.

Options for fixing:

  • revert the query string change, so the test keeps catching the WebKit bug.
  • wait for the first load event for all images, like you suggested, so the timing no longer depends on the cache.

Maybe do both? With the wait in place, a unique-URL variant could also be added to cover the uncached path.

@zcorpan
zcorpan merged commit 71b4d5f into master Oct 9, 2026
25 checks passed
@zcorpan
zcorpan deleted the TimvdLippe-patch-1 branch October 9, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants