<?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>35012</bug_id>
          
          <creation_ts>2010-02-16 17:25:03 -0800</creation_ts>
          <short_desc>SVG entity parsing broken on SnowLeopard/Windows - libxml2 bug</short_desc>
          <delta_ts>2010-02-17 11:36:49 -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>XML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>krit</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>190827</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-16 17:25:03 -0800</bug_when>
    <thetext>Bots are showing failure in this test on SnowLeopard:

http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20(Tests)/r54847%20(5627)/results.html

svg/zoom/page/zoom-coords-viewattr-01-b.svg	expected	actual	diff	pretty diff
svg/zoom/text/zoom-coords-viewattr-01-b.svg	expected	actual	diff	pretty diff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190828</commentid>
    <comment_count>1</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2010-02-16 17:30:18 -0800</bug_when>
    <thetext>Skipping tests in r54850 on SnowLeopard. svg/W3C-SVG-1.1/coords-viewattr* is already skiped on SL. According to the diffs the entity contained in the tests, that expands to SVG markup (it&apos;s sad W3C writes tests like this...) are not parsed properly.
 
I don&apos;t have SnowLeopard around, can anyone test and/or investigate? It&apos;s bad to skip important tests like this on SL. Maybe trac.webkit.org says something about why this test has been skipped...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190836</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-16 17:54:35 -0800</bug_when>
    <thetext>The test seems to have issues with the Smile entity. Wildfox suspects a libxml problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190837</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2010-02-16 17:55:44 -0800</bug_when>
    <thetext>&lt;rdar://problem/7656130&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190887</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-16 22:08:20 -0800</bug_when>
    <thetext>The entity parsing in libxml seems OK. What I&apos;m seeing is that XMLTokenizer::startElementNs(), when called for the &lt;rect&gt; of the entity, is creating an Element, rather than an SVGElement, because the SVG namespace URI is not getting passed in. As a result, we refuse to create a renderer for the Element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190889</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-16 22:38:11 -0800</bug_when>
    <thetext>The nsTab for the ctxt created by xmlParseBalancedChunkMemoryInternal() in libxml2 never gets the svg namespace stuffed into it, which is why the xmlParseBalancedChunkMemoryInternal() callback has a null uri param.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191082</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-17 10:38:04 -0800</bug_when>
    <thetext>On Leopard the stack for creating elements from entities looks like this:

#0  WebCore::XMLTokenizer::startElementNs (this=0x1f6d4320, xmlLocalName=0x8208963 &quot;rect&quot;, xmlPrefix=0x0, xmlURI=0x8208875 &quot;http://www.w3.org/2000/svg&quot;, nb_namespaces=0, libxmlNamespaces=0x0, nb_attributes=6, nb_defaulted=0, libxmlAttributes=0x1f6d25c0) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:723
#1  0x047df5ba in WebCore::startElementNsHandler (closure=0x1fd56830, localname=0x8208963 &quot;rect&quot;, prefix=0x0, uri=0x8208875 &quot;http://www.w3.org/2000/svg&quot;, nb_namespaces=0, namespaces=0x0, nb_attributes=6, nb_defaulted=0, libxmlAttributes=0x1f6d25c0) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:1097
#2  0x9003516d in xmlIOParseDTD ()
#3  0x9000dd40 in xmlParseChunk ()
#4  0x047de049 in WebCore::XMLTokenizer::doEnd (this=0x1f6d4320) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:1321
#5  0x047db7f7 in WebCore::XMLTokenizer::end (this=0x1f6d4320) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizer.cpp:208
#6  0x047db883 in WebCore::XMLTokenizer::finish (this=0x1f6d4320) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizer.cpp:227
#7  0x03e8c6c2 in WebCore::Document::finishParsing (this=0x8278c00) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/Document.cpp:1959

xmlURI is the correct SVG URI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191086</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-17 10:47:07 -0800</bug_when>
    <thetext>On SnowLeopard it looks like this:

#0  WebCore::XMLTokenizer::startElementNs (this=0x12233e170, xmlLocalName=0x11b25416f &quot;rect&quot;, xmlPrefix=0x0, xmlURI=0x0, nb_namespaces=0, libxmlNamespaces=0x0, nb_attributes=6, nb_defaulted=0, libxmlAttributes=0x12234b950) at /Volumes/InternalData/Development/webkit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:723
#1  0x0000000102a1f546 in WebCore::startElementNsHandler (closure=0x12234b460, localname=0x11b25416f &quot;rect&quot;, prefix=0x0, uri=0x0, nb_namespaces=0, namespaces=0x0, nb_attributes=6, nb_defaulted=0, libxmlAttributes=0x12234b950) at /Volumes/InternalData/Development/webkit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:1097
#2  0x0000000101d12358 in xmlParseStartTag2 (ctxt=0x12234b460, pref=0x7fff5fbfcc60, URI=0x7fff5fbfcc58, tlen=0x7fff5fbfcc78) at parser.c:9057
#3  0x0000000101d135fe in xmlParseElement (ctxt=0x12234b460) at parser.c:9402
#4  0x0000000101d13312 in xmlParseContent (ctxt=0x12234b460) at parser.c:9315
#5  0x0000000101d1c24f in xmlParseBalancedChunkMemoryInternal (oldctxt=0x122348de0, string=0x122349f50 &quot;\n&lt;rect x=&apos;.5&apos; y=&apos;.5&apos; width=&apos;29&apos; height=&apos;39&apos; fill=&apos;black&apos; stroke=&apos;red&apos;/&gt;\n&lt;g transform=&apos;translate(0, 5)&apos;&gt;\n&lt;circle cx=&apos;15&apos; cy=&apos;15&apos; r=&apos;10&apos; fill=&apos;yellow&apos;/&gt;\n&lt;circle cx=&apos;12&apos; cy=&apos;12&apos; r=&apos;1.5&apos; fill=&apos;black&apos;/&gt;\n&lt;c&quot;..., user_data=0x0, lst=0x7fff5fbfcdf0) at parser.c:12630
#6  0x0000000101d0d280 in xmlParseReference (ctxt=0x122348de0) at parser.c:6745
#7  0x0000000101d17ea1 in xmlParseTryOrFinish (ctxt=0x122348de0, terminate=0) at parser.c:10895
#8  0x0000000101d19abe in xmlParseChunk (ctxt=0x122348de0, chunk=0x11b25fa00 &quot;&lt;&quot;, size=16980, terminate=0) at parser.c:11502
#9  0x0000000102a1e8b9 in WebCore::XMLTokenizer::doWrite (this=0x12233e170, parseString=@0x7fff5fbfd0d0) at /Volumes/InternalData/Development/webkit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:650

Note that xmlURI is null.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191090</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-17 10:53:29 -0800</bug_when>
    <thetext>See http://mail.gnome.org/archives/xml/2007-December/msg00031.html
https://bugzilla.gnome.org/show_bug.cgi?id=502960

Fixed in libxml2 2.7.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191092</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-17 10:56:09 -0800</bug_when>
    <thetext>LOL: http://mail.gnome.org/archives/xml/2007-December/msg00044.html specifically calls out these SVG tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191119</commentid>
    <comment_count>10</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2010-02-17 11:36:49 -0800</bug_when>
    <thetext>Closing as INVALID since this isn’t a WebKit issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>