| Summary: | Safari complains about invalid `imagesrcset` value in <link rel=preload> where Chrome doesn't | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris J. Shull <chrisjshull> | ||||
| Component: | Page Loading | Assignee: | Chris Dumez <cdumez> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ahmad.saleem792, anthony.pezzolla, beidson, bfulgham, eivindml, karlcow, kevin_neal, koivisto, rbuis, rik, sabouhallawa, simon.fraser, steven, webkit-bug-importer, webkit | ||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||
| Version: | Safari Technology Preview | ||||||
| Hardware: | Mac (Intel) | ||||||
| OS: | macOS 11 | ||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=245415 https://bugs.webkit.org/show_bug.cgi?id=192950 https://bugs.webkit.org/show_bug.cgi?id=198533 https://bugs.webkit.org/show_bug.cgi?id=198960 |
||||||
| Attachments: |
|
||||||
|
Description
Chris J. Shull
2021-10-03 17:48:19 PDT
Thanks for filing. The appropriate engineers have been notified. Created attachment 464102 [details]
Link preload responsive images experimental feature
It seems from Safari 15.3 onwards, you can enable the correct behaviour via an Experimental Features flag.
Hopefully this will be enabled by default in an upcoming version. Until then it will expect a `href` attribute on a rel="preload" as="image" link tag and throw an error if that does not exist.
I believe this bug causes Safari to preload the wrong image since link.href refers to the img.src but it should use link.imagesrcset when available to match the img.srcset and fetch the correct image. When can we expect the fix to ship unflagged? (In reply to styfle from comment #4) > I believe this bug causes Safari to preload the wrong image since link.href > refers to the img.src but it should use link.imagesrcset when available to > match the img.srcset and fetch the correct image. > > When can we expect the fix to ship unflagged? It is currently as 'testable': https://github.com/WebKit/WebKit/blob/597aa395dcdcdb2c1c48069f450f7419a30df72d/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml#L3735 You can get idea on how flag works: https://github.com/WebKit/WebKit/blob/597aa395dcdcdb2c1c48069f450f7419a30df72d/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml#L27 Any updates on when this will ship unflagged? Seems like this was implemented via bug 192950, bug 198533 and bug 198960. Rob: Any plans to ship this? It looks like `wpt /preload/dynamic-adding-preload-imagesrcset.html` shows this works properly when activated. Pull request: https://github.com/WebKit/WebKit/pull/16499 Committed 266787@main (a32d1a3606d7): <https://commits.webkit.org/266787@main> Reviewed commits have been landed. Closing PR #16499 and removing active labels. |