[Webkit-unassigned] [Bug 82577] New: libxml2 2.7.3 supplied with Lion has entity parsing bug

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 29 00:36:42 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=82577

           Summary: libxml2 2.7.3 supplied with Lion has entity parsing
                    bug
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.7
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: XML
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: zimmermann at kde.org


These tests are currently skipped on Lion, w/o a comment :(
svg/W3C-SVG-1.1/coords-viewattr-01-b.svg
svg/W3C-SVG-1.1/coords-viewattr-02-b.svg
svg/custom/preserve-aspect-ratio-syntax.svg
svg/custom/viewbox-syntax.svg
svg/zoom/page/zoom-coords-viewattr-01-b.svg
svg/zoom/text/zoom-coords-viewattr-01-b.svg
svg/W3C-SVG-1.1/render-elems-03-t.svg

I checked them, and it turns out entity parsing is broken, due to a libxml2 bug.
Those tests use them like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"
[
<!ENTITY shape "    <path d='M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z'/>">
]>
...
<g fill="yellow" stroke="red" stroke-width="8" >&shape;</g>


We're creating our libxml2 parser with the NOENT mode, which means libxml2 replaces the entity, and parses the contained elements, just if they were part of the original tree.
Though upon parsing them it doesn't see the "svg" namespace, and thus in the example above an Element is created instead of a SVGPathElement, as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=502960
libxml 2.7.4 already fixed this in 2009 (!). Anyhow, we need to find a workaround, these are important tests that aren't run on Lion at the moment.
(I stumbled across this as I broke preserve-aspect-ratio-syntax.svg for non-Mac platforms, and couldn't notice this, because the test is skipped).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list