<?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>224685</bug_id>
          
          <creation_ts>2021-04-16 12:21:33 -0700</creation_ts>
          <short_desc>[GTK] Blurry images on various news websites</short_desc>
          <delta_ts>2021-05-13 11:50:38 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1751182</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-04-16 12:21:33 -0700</bug_when>
    <thetext>Images are sometimes fuzzy and sad on various news websites, e.g. https://www.vox.com/future-perfect/22385612/plant-based-meat-milk-alternative-protein. To reproduce, you must open the link in a new tab and wait for the page to load in that tab. Don&apos;t switch to the new tab until the page is loaded. The image will be very blurry, but only if you wait for the page to load before visiting the new tab. So don&apos;t visit the page directly, because the bug won&apos;t happen if you do.

Good case: the image displayed is https://cdn.vox-cdn.com/thumbor/7DKI3N1-Ra3UaohynBbgF0nXv1A=/0x0:5624x3621/1570x883/filters:focal(1050x760:1948x1658):format(webp)/cdn.vox-cdn.com/uploads/chorus_image/image/69136028/GettyImages_1183778224.0.jpg. Note the size 1050x760.

Bad case: the image displayed is https://cdn.vox-cdn.com/thumbor/tIAt7KSHnXblaMYwWtmFhsu2Zbw=/0x0:5624x3621/320x180/filters:focal(1050x760:1948x1658):format(webp)/cdn.vox-cdn.com/uploads/chorus_image/image/69136028/GettyImages_1183778224.0.jpg. Note the size 320x180.

Because the issue does not occur when the page is loaded in an existing tab, I suspect we may be messing up the viewport size somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1752366</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-04-20 12:01:59 -0700</bug_when>
    <thetext>Seems to also affect images in twitter embeds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1759290</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-05-12 10:21:52 -0700</bug_when>
    <thetext>This seems to be breaking a wide variety of websites. For example, same problem occurs here:

https://www.warbyparker.com/eyeglasses/men/hayden/striped-pacific

In this case, the image looks like this:

&lt;img class=&quot;c-product-slide--product-image__image&quot; alt=&quot;Angle of Hayden in Striped Pacific&quot; sizes=&quot;100vw&quot; srcset=&quot;//i.warbycdn.com/s/c/21f0689060082b07dec5bf388393ec5117c656d7?quality=80&amp;amp;width=250 250w,//i.warbycdn.com/s/c/21f0689060082b07dec5bf388393ec5117c656d7?quality=80&amp;amp;width=500 500w,//i.warbycdn.com/s/c/21f0689060082b07dec5bf388393ec5117c656d7?quality=80&amp;amp;width=1000 1000w,//i.warbycdn.com/s/c/21f0689060082b07dec5bf388393ec5117c656d7?quality=80&amp;amp;width=1250 1250w,//i.warbycdn.com/s/c/21f0689060082b07dec5bf388393ec5117c656d7?quality=80&amp;amp;width=1500 1500w,//i.warbycdn.com/s/c/21f0689060082b07dec5bf388393ec5117c656d7?quality=80&amp;amp;width=1750 1750w,//i.warbycdn.com/s/c/21f0689060082b07dec5bf388393ec5117c656d7?quality=80&amp;amp;width=2000 2000w&quot;&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1759750</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-05-13 11:08:08 -0700</bug_when>
    <thetext>OK it&apos;s really simple. The window size is indeed set incorrectly. This script reproduces the bug:

&lt;body&gt;
  &lt;p&gt;&lt;a id=&quot;link&quot;&gt;New tab!&lt;/a&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;script&gt;
  var p = document.createElement(&quot;P&quot;);
  var t = document.createTextNode(`width=${window.innerWidth}`);
  p.appendChild(t);
  document.body.appendChild(p);

  document.getElementById(&quot;link&quot;).href = document.URL;
&lt;/script&gt;

Load it in an open window and it will print the window width. Open it in a new tab and quickly switch to the new tab, and it will print the window width. Open it in a new tab and allow the tab to load in the background, and it will print 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1759755</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-05-13 11:14:46 -0700</bug_when>
    <thetext>It&apos;s somehow an Epiphany regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1759763</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-05-13 11:33:17 -0700</bug_when>
    <thetext>It&apos;s caused by &quot;Port to HdyTabView/HdyTabBar&quot; so not WebKit&apos;s fault.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1759767</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-05-13 11:50:38 -0700</bug_when>
    <thetext>https://gitlab.gnome.org/GNOME/epiphany/-/issues/1532</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>