<?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>66118</bug_id>
          
          <creation_ts>2011-08-11 17:18:15 -0700</creation_ts>
          <short_desc>HANDLE_ANIMATION_INHERIT_AND_INITIAL macro fails to actually iterate.</short_desc>
          <delta_ts>2022-02-12 18:09:02 -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>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>
          <dependson>66126</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Luke Macpherson">macpherson</reporter>
          <assigned_to name="Dean Jackson">dino</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cmarrin</cc>
    
    <cc>darin</cc>
    
    <cc>dino</cc>
    
    <cc>macpherson</cc>
    
    <cc>mitz</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>450176</commentid>
    <comment_count>0</comment_count>
    <who name="Luke Macpherson">macpherson</who>
    <bug_when>2011-08-11 17:18:15 -0700</bug_when>
    <thetext>Noticed this during refactoring:

CSSStyleSelector.cpp:183    list-&gt;animation(0)-&gt;set##Prop(Animation::initialAnimation##Prop()); \
CSSStyleSelector.cpp:184    for (size_t i = 1; i &lt; list-&gt;size(); ++i) \
CSSStyleSelector.cpp:185        list-&gt;animation(0)-&gt;clear##Prop(); \

As you can see, i is not used in the body of the loop, and instead the 0th element is set repeatedly, which also negates the effect of line 183.
Looks like this code has been in since 36634, and I don&apos;t know what user-visible bugs this causes, if any.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>450180</commentid>
    <comment_count>1</comment_count>
    <who name="Luke Macpherson">macpherson</who>
    <bug_when>2011-08-11 17:20:24 -0700</bug_when>
    <thetext>This bug also appears in the HANDLE_TRANSITION_INHERIT_AND_INITIAL macro.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452026</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-08-16 17:38:26 -0700</bug_when>
    <thetext>Bad news. Somebody should figure out what the symptom is and make a test so we can fix it!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452186</commentid>
    <comment_count>3</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2011-08-17 03:00:53 -0700</bug_when>
    <thetext>I&apos;ll take a look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452691</commentid>
    <comment_count>4</comment_count>
    <who name="Luke Macpherson">macpherson</who>
    <bug_when>2011-08-17 16:20:46 -0700</bug_when>
    <thetext>FYI: https://bugs.webkit.org/show_bug.cgi?id=66126 would fix this en passant, but doesn&apos;t add tests etc. It may be better to fix/test/close this bug before that goes in, but that&apos;s up to reviewers I suppose.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452738</commentid>
    <comment_count>5</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2011-08-17 16:57:50 -0700</bug_when>
    <thetext>I agree. We should fix this separately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452765</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2011-08-17 17:44:31 -0700</bug_when>
    <thetext>&lt;rdar://problem/9973753&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452780</commentid>
    <comment_count>7</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2011-08-17 18:14:41 -0700</bug_when>
    <thetext>The reason we&apos;ve never noticed this is that it would mean setting an animation property value to &apos;initial&apos;. I doubt many people have ever done this. Not only that, since the properties are not inherited you always have the initial value. I&apos;m trying to work out how to write test that hits this code (in which case, why do we even have it?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>456600</commentid>
    <comment_count>8</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2011-08-24 18:58:00 -0700</bug_when>
    <thetext>I don&apos;t want to hold up this much longer, especially since the linked bug would fix it, but I&apos;m wondering if the fact we never saw this cause breakage is that it is hidden by another bug.

This code would only be triggered in the case where an animation property is given the value &apos;initial&apos;. Animation properties don&apos;t inherit, so it isn&apos;t a big deal. But I notice this macro does something weird as it is creating the list of animations:

    for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { \
        if (childIndex &lt;= list-&gt;size()) \
            list-&gt;append(Animation::create()); \
        mapAnimation##Prop(list-&gt;animation(childIndex), i.value()); \
        ++childIndex; \

childIndex is 0 when this loop begins. Notice that we append to the list, but then set the value of the first element. We never touch the element we appended.

Unless anyone objects, I&apos;m going to close this as WONTFIX and we&apos;ll investigate in https://bugs.webkit.org/show_bug.cgi?id=66126 if the above code is buggy, or is doing unnecessary work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1840761</commentid>
    <comment_count>9</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-02-12 18:09:02 -0800</bug_when>
    <thetext>Fixed in http://trac.webkit.org/changeset/93848</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>