WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
35012
SVG entity parsing broken on SnowLeopard/Windows - libxml2 bug
https://bugs.webkit.org/show_bug.cgi?id=35012
Summary
SVG entity parsing broken on SnowLeopard/Windows - libxml2 bug
Simon Fraser (smfr)
Reported
2010-02-16 17:25:03 PST
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
Attachments
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2010-02-16 17:30:18 PST
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's sad W3C writes tests like this...) are not parsed properly. I don't have SnowLeopard around, can anyone test and/or investigate? It's bad to skip important tests like this on SL. Maybe trac.webkit.org says something about why this test has been skipped...
Simon Fraser (smfr)
Comment 2
2010-02-16 17:54:35 PST
The test seems to have issues with the Smile entity. Wildfox suspects a libxml problem.
mitz
Comment 3
2010-02-16 17:55:44 PST
<
rdar://problem/7656130
>
Simon Fraser (smfr)
Comment 4
2010-02-16 22:08:20 PST
The entity parsing in libxml seems OK. What I'm seeing is that XMLTokenizer::startElementNs(), when called for the <rect> 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.
Simon Fraser (smfr)
Comment 5
2010-02-16 22:38:11 PST
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.
Simon Fraser (smfr)
Comment 6
2010-02-17 10:38:04 PST
On Leopard the stack for creating elements from entities looks like this: #0 WebCore::XMLTokenizer::startElementNs (this=0x1f6d4320, xmlLocalName=0x8208963 "rect", xmlPrefix=0x0, xmlURI=0x8208875 "
http://www.w3.org/2000/svg
", 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 "rect", prefix=0x0, uri=0x8208875 "
http://www.w3.org/2000/svg
", 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.
Simon Fraser (smfr)
Comment 7
2010-02-17 10:47:07 PST
On SnowLeopard it looks like this: #0 WebCore::XMLTokenizer::startElementNs (this=0x12233e170, xmlLocalName=0x11b25416f "rect", 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 "rect", 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 "\n<rect x='.5' y='.5' width='29' height='39' fill='black' stroke='red'/>\n<g transform='translate(0, 5)'>\n<circle cx='15' cy='15' r='10' fill='yellow'/>\n<circle cx='12' cy='12' r='1.5' fill='black'/>\n<c"..., 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 "<", 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.
Simon Fraser (smfr)
Comment 8
2010-02-17 10:53:29 PST
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
Simon Fraser (smfr)
Comment 9
2010-02-17 10:56:09 PST
LOL:
http://mail.gnome.org/archives/xml/2007-December/msg00044.html
specifically calls out these SVG tests.
Mark Rowe (bdash)
Comment 10
2010-02-17 11:36:49 PST
Closing as INVALID since this isn’t a WebKit issue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug