<?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>86004</bug_id>
          
          <creation_ts>2012-05-09 10:19:48 -0700</creation_ts>
          <short_desc>Cleanup SVGElement.cpp</short_desc>
          <delta_ts>2012-05-09 18:09:17 -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>SVG</component>
          <version>528+ (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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rob Buis">rwlbuis</reporter>
          <assigned_to name="Rob Buis">rwlbuis</assigned_to>
          <cc>eric</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>619615</commentid>
    <comment_count>0</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-09 10:19:48 -0700</bug_when>
    <thetext>SVGElement.cpp has potential for cleanup since a lot of code moved in and out over time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619624</commentid>
    <comment_count>1</comment_count>
      <attachid>140970</attachid>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-09 10:25:43 -0700</bug_when>
    <thetext>Created attachment 140970
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619831</commentid>
    <comment_count>2</comment_count>
      <attachid>140970</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-09 14:28:14 -0700</bug_when>
    <thetext>Comment on attachment 140970
Patch

OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619833</commentid>
    <comment_count>3</comment_count>
      <attachid>140970</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-09 14:29:15 -0700</bug_when>
    <thetext>Comment on attachment 140970
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140970&amp;action=review

&gt; Source/WebCore/svg/svgattrs.in:-198
&gt; -style

This has a null namespace and prefix, correct?  There is no differnece between this and HTMLNames::styleAttr?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619837</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-09 14:30:18 -0700</bug_when>
    <thetext>It appears there is!

DEFINE_GLOBAL(QualifiedName, styleAttr, nullAtom, &quot;style&quot;, xhtmlNamespaceURI)

I&apos;m not sure if that&apos;s intentional or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619843</commentid>
    <comment_count>5</comment_count>
      <attachid>140970</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-09 14:36:42 -0700</bug_when>
    <thetext>Comment on attachment 140970
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140970&amp;action=review

&gt; Source/WebCore/svg/SVGElement.cpp:434
&gt; -    if (attr-&gt;name() != HTMLNames::styleAttr)
&gt; +    if (attr-&gt;name() != styleAttr)

What happens when we end up in a SVG document and the style attribute is in the SVG namespace?  Seems this will do the wrong thing.  Seems we want to just compare hte localName() here.

Unless attr-&gt;name() is already just an AtomicString insetad of a QualifiedName?

&gt; Source/WebCore/svg/SVGElement.cpp:530
&gt;      DEFINE_STATIC_LOCAL(HashSet&lt;QualifiedName&gt;, animatableAttributes, ());

I suspect this doesn&apos;t work right either.  At least not for the class attribute, which will be in a differnet namespace than expected?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619847</commentid>
    <comment_count>6</comment_count>
      <attachid>140970</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-09 14:39:59 -0700</bug_when>
    <thetext>Comment on attachment 140970
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140970&amp;action=review

&gt;&gt; Source/WebCore/svg/SVGElement.cpp:434
&gt;&gt; +    if (attr-&gt;name() != styleAttr)
&gt; 
&gt; What happens when we end up in a SVG document and the style attribute is in the SVG namespace?  Seems this will do the wrong thing.  Seems we want to just compare hte localName() here.
&gt; 
&gt; Unless attr-&gt;name() is already just an AtomicString insetad of a QualifiedName?

IT&apos;s a QualifiedName. :(

http://trac.webkit.org/browser/trunk/Source/WebCore/dom/Attribute.h

I believe this has a noticable behavioral difference when the attribute is explcitly created with the sVG namespace.  Which is possible manually, as well as by having an xml file or a .svg file, I think.

&gt; Source/WebCore/svg/SVGElement.cpp:533
&gt; +        animatableAttributes.add(classAttr);

Similarly, I believe this code is observable in the same manner.  We won&apos;t treat &quot;class&quot; attributes in the SVG namespace as animatable.  I&apos;m not sure if we should or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619850</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-09 14:40:21 -0700</bug_when>
    <thetext>You&apos;re not changing the code, I understand,b ut I believe you may be stumbling on two bugs here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619857</commentid>
    <comment_count>8</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-09 14:45:33 -0700</bug_when>
    <thetext>I need to think about this :) Seems tricky stuff.
Slightly related, what would happen with this &lt;rect style=&quot;fill:red;&quot; svg:style=&quot;green&quot;&gt;. But I think this is more of a XML question...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>620130</commentid>
    <comment_count>9</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-09 18:09:17 -0700</bug_when>
    <thetext>The style attribute change was not committed, this needs more investigation.

Fixed in r 116569.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>140970</attachid>
            <date>2012-05-09 10:25:43 -0700</date>
            <delta_ts>2012-05-09 14:39:59 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-86004-20120509132542.patch</filename>
            <type>text/plain</type>
            <size>3668</size>
            <attacher name="Rob Buis">rwlbuis</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTE2NDU1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggOTQxMGJkYjlhYjYyNzQ2
NGViYWZmM2M4ZmVmM2YzYjAwN2FlNTczOS4uMTc2NDJlZTRiNzlkMTQ5OWJlZDU3YTFlZTJiYjc4
ZDgxMmI4NWI0NyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE5IEBACisyMDEyLTA1LTA5ICBSb2Ig
QnVpcyAgPHJidWlzQHJpbS5jb20+CisKKyAgICAgICAgQ2xlYW51cCBTVkdFbGVtZW50LmNwcAor
ICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9ODYwMDQKKwor
ICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBSZW1vdmUgdW5u
ZWVkZWQgaW5jbHVkZXMuIEFsc28gcmVtb3ZlIFNWR05hbWVzOjpzdHlsZSwganVzdCB1c2UgSFRN
TE5hbWVzOjpzdHlsZS4KKyAgICAgICAgV2UgZG8gbm90IG5lZWQgdG8gY2hlY2sgYXR0ciBpbiBT
VkdFbGVtZW50O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xpZmllZE5hbWU+LCBhbmltYXRhYmxlQXR0cmlidXRlcywgKCkpOwog
CiAgICAgaWYgKGFuaW1hdGFibGVBdHRyaWJ1dGVzLmlzRW1wdHkoKSkgewotICAgICAgICBhbmlt
YXRhYmxlQXR0cmlidXRlcy5hZGQoSFRNTE5hbWVzOjpjbGFzc0F0dHIpOworICAgICAgICBhbmlt
YXRhYmxlQXR0cmlidXRlcy5hZGQoY2xhc3NBdHRyKTsKICAgICAgICAgYW5pbWF0YWJsZUF0dHJp
YnV0ZXMuYWRkKFhMaW5rTmFtZXM6OmhyZWZBdHRyKTsKICAgICAgICAgYW5pbWF0YWJsZUF0dHJp
YnV0ZXMuYWRkKFNWR05hbWVzOjphbXBsaXR1ZGVBdHRyKTsKICAgICAgICAgYW5pbWF0YWJsZUF0
dHJpYnV0ZXMuYWRkKFNWR05hbWVzOjphemltdXRoQXR0cik7CmRpZmYgLS1naXQgYS9Tb3VyY2Uv
V2ViQ29yZS9zdmcvc3ZnYXR0cnMuaW4gYi9Tb3VyY2UvV2ViQ29yZS9zdmcvc3ZnYXR0cnMuaW4K
aW5kZXggYzIyMGI2N2I4YzM1NDNjNmZlMThiODZiMDVmNjUyZTQ1Yjg2ZTNhNi4uOGJjYzgxZjlj
NzE0NWMyMzJkZjVlZjYyMWU4OTFlMTgxZWUzMDA2YyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNv
cmUvc3ZnL3N2Z2F0dHJzLmluCisrKyBiL1NvdXJjZS9XZWJDb3JlL3N2Zy9zdmdhdHRycy5pbgpA
QCAtMTk1LDcgKzE5NSw2IEBAIHN0cm9rZS1saW5lam9pbgogc3Ryb2tlLW1pdGVybGltaXQKIHN0
cm9rZS1vcGFjaXR5CiBzdHJva2Utd2lkdGgKLXN0eWxlCiBzdXJmYWNlU2NhbGUKIHN5c3RlbUxh
bmd1YWdlCiB0YWJsZVZhbHVlcwo=
</data>
<flag name="review"
          id="147013"
          type_id="1"
          status="+"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>