Bug 211620

Summary: Incorrect image srcset candidate chosen for <img> cloned from <template>
Product: WebKit Reporter: Javan Makhmali <javan>
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: rik, rniwa, sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Minimal test case
Screenshot of test case
Browser comparison none

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