<?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>173464</bug_id>
          
          <creation_ts>2017-06-16 02:48:20 -0700</creation_ts>
          <short_desc>REGRESSION(r218253): Infinite animated gifs no longer loop</short_desc>
          <delta_ts>2017-06-18 22:23:06 -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>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=172502</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>clopez</cc>
    
    <cc>magomez</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>sabouhallawa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1319909</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-06-16 02:48:20 -0700</bug_when>
    <thetext>Even with bug #173403 fixed, we still see that infinite gifs only play once. Now the repetition counts is correctly used, but after the first loop iteration we keep rendering the same frame all the time, so it looks like if the animation stopped. This is because in r218253 we changed to use SharedBuffer instead of a Vector in ImageBackingStore, but we are not correctly copying the data in the copy constructor. We are using SharedBuffer::copy() that doesn&apos;t actually copy the data of the segments. I&apos;m not sure if that&apos;s on purpose or a regression of bug #170956.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319911</commentid>
    <comment_count>1</comment_count>
      <attachid>313067</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-06-16 02:51:10 -0700</bug_when>
    <thetext>Created attachment 313067
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319930</commentid>
    <comment_count>2</comment_count>
      <attachid>313067</attachid>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2017-06-16 06:16:54 -0700</bug_when>
    <thetext>Comment on attachment 313067
Patch

Maybe is a good idea to create some test for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319932</commentid>
    <comment_count>3</comment_count>
      <attachid>313067</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-06-16 06:26:54 -0700</bug_when>
    <thetext>Comment on attachment 313067
Patch

Thanks for the review, let&apos;s not push this for now, because I&apos;m still not sure if it&apos;s a bug in SharedBuffer::copy(). I&apos;ll check existing tests to see if we can add a test for this too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319936</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-06-16 07:15:45 -0700</bug_when>
    <thetext>Does this fix imgur gifs? We have another bug for that....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319941</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-06-16 07:19:10 -0700</bug_when>
    <thetext>What other bug? This is a very recent regression anyway, so maybe imgur is fixed by bug #173403.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319944</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-06-16 07:25:11 -0700</bug_when>
    <thetext>Bug #161963. I guess it&apos;s unrelated.

There&apos;s also bug #109395 which is also quite bad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1320601</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-06-18 22:23:06 -0700</bug_when>
    <thetext>Committed r218472: &lt;http://trac.webkit.org/changeset/218472&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>313067</attachid>
            <date>2017-06-16 02:51:10 -0700</date>
            <delta_ts>2017-06-16 06:26:54 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>wcore-animated-gif.diff</filename>
            <type>text/plain</type>
            <size>1881</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCA0MWY2ZmVmYTIzOS4uMzViOWU3MjA3ZmEgMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJDb3JlL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKQEAgLTEs
NSArMSwyMCBAQAogMjAxNy0wNi0xNiAgQ2FybG9zIEdhcmNpYSBDYW1wb3MgIDxjZ2FyY2lhQGln
YWxpYS5jb20+CiAKKyAgICAgICAgUkVHUkVTU0lPTihyMjE4MjUzKTogSW5maW5pdGUgYW5pbWF0
ZWQgZ2lmcyBubyBsb25nZXIgbG9vcAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9z
aG93X2J1Zy5jZ2k/aWQ9MTczNDY0CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BT
ISkuCisKKyAgICAgICAgQWZ0ZXIgdGhlIGZpcnN0IGxvb3AgaXRlcmF0aW9uIHdl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cmNlL1dlYkNvcmUvcGxh
dGZvcm0vZ3JhcGhpY3MvSW1hZ2VCYWNraW5nU3RvcmUuaCBiL1NvdXJjZS9XZWJDb3JlL3BsYXRm
b3JtL2dyYXBoaWNzL0ltYWdlQmFja2luZ1N0b3JlLmgKaW5kZXggMDFiNTI4ZTk5ODIuLmM4ZGRl
NTgzODBkIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9ncmFwaGljcy9JbWFn
ZUJhY2tpbmdTdG9yZS5oCisrKyBiL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL0lt
YWdlQmFja2luZ1N0b3JlLmgKQEAgLTE4OSw3ICsxODksNyBAQCBwcml2YXRlOgogICAgICAgICAs
IG1fcHJlbXVsdGlwbHlBbHBoYShvdGhlci5tX3ByZW11bHRpcGx5QWxwaGEpCiAgICAgewogICAg
ICAgICBBU1NFUlQoIW1fc2l6ZS5pc0VtcHR5KCkgJiYgIWlzT3ZlclNpemUobV9zaXplKSk7Ci0g
ICAgICAgIG1fcGl4ZWxzID0gb3RoZXIubV9waXhlbHMtPmNvcHkoKTsKKyAgICAgICAgbV9waXhl
bHMgPSBTaGFyZWRCdWZmZXI6OmNyZWF0ZShvdGhlci5tX3BpeGVscy0+ZGF0YSgpLCBvdGhlci5t
X3BpeGVscy0+c2l6ZSgpKTsKICAgICAgICAgbV9waXhlbHNQdHIgPSByZWludGVycHJldF9jYXN0
PFJHQkEzMio+KGNvbnN0X2Nhc3Q8Y2hhcio+KG1fcGl4ZWxzLT5kYXRhKCkpKTsKICAgICB9CiAK
</data>
<flag name="review"
          id="333971"
          type_id="1"
          status="+"
          setter="clopez"
    />
    <flag name="commit-queue"
          id="333974"
          type_id="3"
          status="-"
          setter="cgarcia"
    />
          </attachment>
      

    </bug>

</bugzilla>