Bug 211620 - Incorrect image srcset candidate chosen for <img> cloned from <template>
Summary: Incorrect image srcset candidate chosen for <img> cloned from <template>
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-08 03:08 PDT by Javan Makhmali
Modified: 2021-03-11 06:08 PST (History)
4 users (show)

See Also:


Attachments
Minimal test case (833 bytes, text/html)
2020-05-08 03:08 PDT, Javan Makhmali
no flags Details
Screenshot of test case (87.37 KB, image/png)
2020-05-08 03:09 PDT, Javan Makhmali
no flags Details
Browser comparison (252.26 KB, image/png)
2020-05-08 03:58 PDT, Javan Makhmali
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Javan Makhmali 2020-05-08 03:08:16 PDT
Created attachment 398848 [details]
Minimal test case

To reproduce: Open the attached template-img-srcset.html file in Safari on a 2x DPR or higher display.

Expected: Both images load the same URL.

Actual: The first image loads the correct URL. The second image (cloned from a <template>) incorrectly loads the first URL from its srcset.
Comment 1 Javan Makhmali 2020-05-08 03:09:11 PDT
Created attachment 398849 [details]
Screenshot of test case
Comment 2 Javan Makhmali 2020-05-08 03:58:25 PDT
Created attachment 398853 [details]
Browser comparison

Does not occur in Firefox or Chrome (top). Does occur in Safari and Safari Technology Preview (bottom).
Comment 3 Radar WebKit Bug Importer 2020-05-08 15:45:11 PDT
<rdar://problem/63039539>