Bug 244815 - Incorrect image srcset candidate chosen for <img> from new DOMParser
Summary: Incorrect image srcset candidate chosen for <img> from new DOMParser
Status: RESOLVED DUPLICATE of bug 211620
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, HasReduction
Depends on:
Blocks:
 
Reported: 2022-09-05 10:56 PDT by Anthony Ricaud
Modified: 2022-09-10 14:45 PDT (History)
3 users (show)

See Also:


Attachments
Testcase (624 bytes, text/html)
2022-09-05 10:56 PDT, Anthony Ricaud
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Ricaud 2022-09-05 10:56:11 PDT
Created attachment 462146 [details]
Testcase

To reproduce: Open the testcase 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 (copied from `new DOMParser().parseFromString`) incorrectly loads the first URL from its srcset.

This might be the same root cause as bug 211620.
Comment 1 Anthony Ricaud 2022-09-05 10:59:18 PDT
Chrome and Firefox both display the expected outcome: same 2x image.
Comment 2 Ryosuke Niwa 2022-09-10 14:45:44 PDT
This is a duplicate of the bug 211620.

*** This bug has been marked as a duplicate of bug 211620 ***