<?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>220330</bug_id>
          
          <creation_ts>2021-01-05 10:10:51 -0800</creation_ts>
          <short_desc>[ Big Sur ] fast/images/webp-as-image.html is failing</short_desc>
          <delta_ts>2022-12-15 10:07:16 -0800</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Truitt Savell">tsavell</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andreas.grunewald</cc>
    
    <cc>maggotfish</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>szymon.witamborski</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1717372</commentid>
    <comment_count>0</comment_count>
    <who name="Truitt Savell">tsavell</who>
    <bug_when>2021-01-05 10:10:51 -0800</bug_when>
    <thetext>fast/images/webp-as-image.html

This test is failing on Big Sur Constantly. it looks like this image is not loading. 

History:
https://results.webkit.org/?suite=layout-tests&amp;test=fast%2Fimages%2Fwebp-as-image.html

Diff:
https://build.webkit.org/results/Apple-BigSur-Release-WK2-Tests/r271146%20(753)/fast/images/webp-as-image-diffs.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1717373</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-01-05 10:11:04 -0800</bug_when>
    <thetext>&lt;rdar://problem/72818152&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1717380</commentid>
    <comment_count>2</comment_count>
    <who name="Truitt Savell">tsavell</who>
    <bug_when>2021-01-05 10:17:38 -0800</bug_when>
    <thetext>Modified expectation in https://trac.webkit.org/changeset/271155/webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1723449</commentid>
    <comment_count>3</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-01-28 12:17:56 -0800</bug_when>
    <thetext>I can&apos;t reproduce the failure on macOS 11.0.

But the bots have build macOS 11.1 (20C69) see https://build.webkit.org/buildslaves/bot1024.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1726867</commentid>
    <comment_count>4</comment_count>
      <attachid>419649</attachid>
    <who name="Szymon Witamborski">szymon.witamborski</who>
    <bug_when>2021-02-08 16:05:37 -0800</bug_when>
    <thetext>Created attachment 419649
Script that searches for last good and first bad webp image that fails to be decoded on Big Sur

We found out that Safari was failing to load some lossless webp images, most of the time they were simple single or two-colour images. It was also failing only from a certain size but different depending on content.

When trying to open these images with Preview, it was also failing so that&apos;d point for the bug to be system-level.

I wrote a simple script to generate images with ImageMagick and check if they open with sips -i (normally used to generate thumbnails). This script also binary-searches for last good and first bad images and outputs an HTML file to be used in a browser.

From some manual testing done first it looked like breaking point was independent of aspect ratio but rather only depends on final number of pixels in the image, hence the script generates a 1px-high images and only width is variable. 

Breaking points depend on the actual colour value used. The script only uses some simple examples but could be easily tweaked to test other values (hex values work too). For some it&apos;ll go beyond 16383 which is beyond max edge size of webp image so it might be necessary to adjust height of generated images.

Here&apos;s a live version on codepen of the generated page:
https://codepen.io/brainshave/pen/RwoaXow

And all edge files in a GH gist:
https://gist.github.com/brainshave/04ae8279a4b16e72897ebfb5b382bbd1

Tested on macOS 11.1 and 11.2 on both Safari 14.0.3 and Safari TP 119. All other browsers process these images without issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1726869</commentid>
    <comment_count>5</comment_count>
      <attachid>419651</attachid>
    <who name="Szymon Witamborski">szymon.witamborski</who>
    <bug_when>2021-02-08 16:08:28 -0800</bug_when>
    <thetext>Created attachment 419651
Test HTML file for local browser testing

Expected output from the page: (Firefox 85, Chrome 88)

✅black_11333.webp 
✅black_11334.webp
✅white_12666.webp
✅white_12667.webp
✅red_12000.webp
✅red_12001.webp
✅green_12000.webp
✅green_12001.webp
✅blue_12000.webp
✅blue_12001.webp

Safari 14.0.3 and Safari TP 119 on Big Sur 11.2 (Intel MBP)

✅black_11333.webp
❌black_11334.webp
✅white_12666.webp
❌white_12667.webp
✅red_12000.webp
❌red_12001.webp
✅green_12000.webp
❌green_12001.webp
✅blue_12000.webp
❌blue_12001.webp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1726905</commentid>
    <comment_count>6</comment_count>
    <who name="Andreas">andreas.grunewald</who>
    <bug_when>2021-02-08 17:50:28 -0800</bug_when>
    <thetext>We found a similar issue in our testing last week when trying to enable webp images for our website. Here is the codepen https://codepen.io/grunewald/pen/ExNyvOr all images marked &quot;broken&quot; render fine in Chrome and Firefox but do not render in iOS14 Safari, we weren&apos;t able to test on Big Sur. Hope this adds additional data points to this issue. 

We validated the webp images and none of them seem to be broken. We even generated some ourselves with the cwebp tool and could reproduce the issue sometimes.

Happy to support in debugging and testing. 
-Andreas</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1728849</commentid>
    <comment_count>7</comment_count>
    <who name="Andreas">andreas.grunewald</who>
    <bug_when>2021-02-12 16:33:13 -0800</bug_when>
    <thetext>I just tested with the latest iOS 14.5 beta and can no longer reproduce the issue. Can anyone confirm that this is fixed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919621</commentid>
    <comment_count>8</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-12-15 10:07:16 -0800</bug_when>
    <thetext>Indeed, this was fixed in iOS 14.5 (via rdar://72485913)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>419649</attachid>
            <date>2021-02-08 16:05:37 -0800</date>
            <delta_ts>2021-02-08 16:05:37 -0800</delta_ts>
            <desc>Script that searches for last good and first bad webp image that fails to be decoded on Big Sur</desc>
            <filename>test_images.zsh</filename>
            <type>application/x-shellscript</type>
            <size>1630</size>
            <attacher name="Szymon Witamborski">szymon.witamborski</attacher>
            
              <data encoding="base64">IyEvdXNyL2Jpbi9lbnYgenNoCgpybSAqLndlYnAKCmZ1bmN0aW9uIG5hbWUgewogIGxvY2FsIGNv
bG9yPSIkMSIKICBsb2NhbCB3aWR0aD0iJDIiCiAgZWNobyAiJHtjb2xvcn1fJHt3aWR0aH0ud2Vi
cCIKfQoKZnVuY3Rpb24gY2hlY2sgewogIGxvY2FsIGNvbG9yPSIkMSIKICBsb2NhbCB3aWR0aD0i
JDIiCiAgbG9jYWwgZmlsZT0kKG5hbWUgIiRjb2xvciIgIiR3aWR0aCIpCiAgY29udmVydCAtc2l6
ZSAiJHt3aWR0aH14MSIgInhjOiR7Y29sb3J9IiAtZGVmaW5lIHdlYnA6bG9zc2xlc3M9dHJ1ZSAi
JGZpbGUiCiAgc2lwcyAtaSAiJGZpbGUiID4gL2Rldi9udWxsIDI+JjEKfQoKZnVuY3Rpb24gc2Vh
cmNoIHsKICBsb2NhbCBjb2xvcj0iJDEiCiAgbG9jYWwgbWluPSIkMiIKICBsb2NhbCBtYXg9IiQz
IgogIGxvY2FsIG1pZD0wCgogIHdoaWxlIFsgJCgoJG1heCAtICRtaW4pKSAtZ3QgMSBdOyBkbwog
ICAgbWlkPSQoKCAoJG1pbiArICRtYXgpI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bWcuc3JjID0gc3JjOwog
ICAgICB9CiAgICB9CgogICAgdGVzdGltZy5vbmxvYWQgPSAoKSA9PiB7CiAgICAgIGNvbnN0IFtu
YW1lXSA9IGN1cnJlbnQ7CiAgICAgIGxvZy5pbm5lclRleHQgKz0gXGDinIVcJHtuYW1lfVxuXGA7
CiAgICAgIG5leHQoKTsKICAgIH07CgogICAgdGVzdGltZy5vbmVycm9yID0gKCkgPT4gewogICAg
ICBjb25zdCBbbmFtZV0gPSBjdXJyZW50OwogICAgICBsb2cuaW5uZXJUZXh0ICs9IFxg4p2MXCR7
bmFtZX1cblxgOwogICAgICBuZXh0KCk7CiAgICB9OwoKICAgIG5leHQoKTsKICA8L3NjcmlwdD4K
PC9ib2R5Pgo8L2h0bWw+CkVPRgopID4gdGVzdC5odG1sCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>419651</attachid>
            <date>2021-02-08 16:08:28 -0800</date>
            <delta_ts>2021-02-08 16:08:28 -0800</delta_ts>
            <desc>Test HTML file for local browser testing</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>1651</size>
            <attacher name="Szymon Witamborski">szymon.witamborski</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0PSJ1dGYtOCI+CiAgPC9oZWFkPgogIDxi
b2R5PgogIDxpbWcgaWQ9InRlc3RpbWciIHN0eWxlPSJkaXNwbGF5OiBub25lIj4KICA8cHJlIGlk
PSJsb2ciPjwvcHJlPgoKICA8c2NyaXB0PgogICAgY29uc3QgZmlsZXMgPSBbCiAgICAgIFsnYmxh
Y2tfMTEzMzMud2VicCcsICdkYXRhOmltYWdlL3dlYnA7YmFzZTY0LFVrbEdSaG9BQUFCWFJVSlFW
bEE0VEE0QUFBQXZSQ3dBQUFjUUVmMFBSRVQvQXc9PSddLAogICAgICBbJ2JsYWNrXzExMzM0Lndl
YnAnLCAnZGF0YTppbWFnZS93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2kv
d0VBJ10sCiAgICAgIFsnYmx1ZV8xMjAwMS53ZWJwJywgJ2RhdGE6aW1hZ2Uvd2VicDtiYXNlNjQs
VWtsR1Jod0FBQUJYUlVKUVZsQTRUQThBQUFBdjRDNEFBQWNRMGYvK0J5S2kvd0VBJ10sCiAgICBd
OwoKICAgIGxldCBjdXJyZW50OwoKICAgIGNvbnN0IG5leHQgPSAoKSA9PiB7CiAgICAgIGN1cnJl
bnQgPSBmaWxlcy5zaGlmdCgpOwogICAgICBpZiAoY3VycmVudCkgewogICAgICAgIGNvbnN0IFss
IHNyY10gPSBjdXJyZW50OwogICAgICAgIHRlc3RpbWcuc3JjID0gc3JjOwogICAgICB9CiAgICB9
CgogICAgdGVzdGltZy5vbmxvYWQgPSAoKSA9PiB7CiAgICAgIGNvbnN0IFtuYW1lXSA9IGN1cnJl
bnQ7CiAgICAgIGxvZy5pbm5lclRleHQgKz0gYOKchSR7bmFtZX1cbmA7CiAgICAgIG5leHQoKTsK
ICAgIH07CgogICAgdGVzdGltZy5vbmVycm9yID0gKCkgPT4gewogICAgICBjb25zdCBbbmFtZV0g
PSBjdXJyZW50OwogICAgICBsb2cuaW5uZXJUZXh0ICs9IGDinYwke25hbWV9XG5gOwogICAgICBu
ZXh0KCk7CiAgICB9OwoKICAgIG5leHQoKTsKICA8L3NjcmlwdD4KPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>