<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:magomez&#64;igalia.com" title="Miguel Gomez &lt;magomez&#64;igalia.com&gt;"> <span class="fn">Miguel Gomez</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION(r205841): [GTK] Test fast/images/animated-png.html is failing since r205841"
   href="https://bugs.webkit.org/show_bug.cgi?id=168425">bug 168425</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>magomez&#64;igalia.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION(r205841): [GTK] Test fast/images/animated-png.html is failing since r205841"
   href="https://bugs.webkit.org/show_bug.cgi?id=168425#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION(r205841): [GTK] Test fast/images/animated-png.html is failing since r205841"
   href="https://bugs.webkit.org/show_bug.cgi?id=168425">bug 168425</a>
              from <span class="vcard"><a class="email" href="mailto:magomez&#64;igalia.com" title="Miguel Gomez &lt;magomez&#64;igalia.com&gt;"> <span class="fn">Miguel Gomez</span></a>
</span></b>
        <pre>The test is running several animations and comparing the final frame of each animation to a reference one. This is failing because the png animations are not running at all, and what it's comparing is the first frame of the animation instead of the last one.

I've debugged this and what happens is that BitmapImage::shouldAnimate() is false because PNGImageDecoder::repetitionCount() is returning 0, which means that it's not an animation.
The curious thing is that PNGImageDecoder reads 1 as the repetition value from the file, but it returns that value minus 1, making it 0. It has been that way since that code was added but I don't know why. Just removing that minus 1 and returning the gotten repetition value makes the animations work again.

This fixes the result in 9 of the 10 images used in the test. The failing one has some small differences in some pixels, probably due to small variations in the decoding result.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>