<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>244815</bug_id>
          
          <creation_ts>2022-09-05 10:56:11 -0700</creation_ts>
          <short_desc>Incorrect image srcset candidate chosen for &lt;img&gt; from new DOMParser</short_desc>
          <delta_ts>2022-09-10 14:45:44 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>211620</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=211620</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anthony Ricaud">rik</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>karlcow</cc>
    
    <cc>rniwa</cc>
    
    <cc>sabouhallawa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1896356</commentid>
    <comment_count>0</comment_count>
      <attachid>462146</attachid>
    <who name="Anthony Ricaud">rik</who>
    <bug_when>2022-09-05 10:56:11 -0700</bug_when>
    <thetext>Created attachment 462146
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896358</commentid>
    <comment_count>1</comment_count>
    <who name="Anthony Ricaud">rik</who>
    <bug_when>2022-09-05 10:59:18 -0700</bug_when>
    <thetext>Chrome and Firefox both display the expected outcome: same 2x image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1897602</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-09-10 14:45:44 -0700</bug_when>
    <thetext>This is a duplicate of the bug 211620.

*** This bug has been marked as a duplicate of bug 211620 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>462146</attachid>
            <date>2022-09-05 10:56:11 -0700</date>
            <delta_ts>2022-09-05 10:57:00 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>file_244815.txt</filename>
            <type>text/html</type>
            <size>624</size>
            <attacher name="Anthony Ricaud">rik</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8bWV0YSBjaGFyc2V0PSJ1dGYtOCIgLz4NCg0KPGltZw0KICAgIHdp
ZHRoPSIyMDAiDQogICAgaGVpZ2h0PSIyMDAiDQogICAgc3JjPSJodHRwczovL3dlYmtpdC5vcmcv
ZGVtb3Mvc3Jjc2V0L2ltYWdlLXNyYy5wbmciDQogICAgc3Jjc2V0PSINCiAgICAgICAgaHR0cHM6
Ly93ZWJraXQub3JnL2RlbW9zL3NyY3NldC9pbWFnZS0xeC5wbmcgMXgsDQogICAgICAgIGh0dHBz
Oi8vd2Via2l0Lm9yZy9kZW1vcy9zcmNzZXQvaW1hZ2UtMngucG5nIDJ4LA0KICAgICAgICBodHRw
czovL3dlYmtpdC5vcmcvZGVtb3Mvc3Jjc2V0L2ltYWdlLTN4LnBuZyAzeCwNCiAgICAgICAgaHR0
cHM6Ly93ZWJraXQub3JnL2RlbW9zL3NyY3NldC9pbWFnZS00eC5wbmcgNHgNCiAgICAiDQovPg0K
DQo8c2NyaXB0IHR5cGU9Im1vZHVsZSI+DQogICAgY29uc3QgaW1nID0gZG9jdW1lbnQucXVlcnlT
ZWxlY3RvcignaW1nJykNCiAgICBjb25zdCBuZXh0RG9jdW1lbnQgPSBuZXcgRE9NUGFyc2VyKCku
cGFyc2VGcm9tU3RyaW5nKGltZy5vdXRlckhUTUwsICd0ZXh0L2h0bWwnKQ0KICAgIGRvY3VtZW50
LmJvZHkuYXBwZW5kKC4uLm5leHREb2N1bWVudC5ib2R5LmNoaWxkcmVuKQ0KPC9zY3JpcHQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>