Bug 13508

Summary: Compiling WebKit with libxml 2.6.27 or greater causes some layout tests to fail
Product: WebKit Reporter: Matt Perry <mpComplete>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mrowe
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch mjs: review+

Description Matt Perry 2007-04-26 12:02:07 PDT
There was a bug in libxml prior to 2.6.27 that caused entities to be inserted twice.  See http://bugzilla.gnome.org/show_bug.cgi?id=159219 .

WebKit has a workaround for this: hackAroundLibXMLEntityBug.

However, in libxml 2.6.27, this bug was fixed, so the workaround causes incorrect behavior with that version.  A simple #if/#else can fix this.
Comment 1 Matt Perry 2007-04-26 12:06:54 PDT
Created attachment 14209 [details]
patch

No layout test is needed.  Existing layout tests already fail when using libxml 2.6.27 or greater.  For example, dom/xhtml/level3/core/nodegettextcontent14 fails.
Comment 2 Dave Hyatt 2007-04-26 12:16:43 PDT
Comment on attachment 14209 [details]
patch

This is defined by libxml in its headers?
Comment 3 Matt Perry 2007-04-26 12:41:07 PDT
Yes.  LIBXML_VERSION is defined in libxml/xmlversion.h.
Comment 4 Darin Adler 2007-04-26 12:44:36 PDT
Comment on attachment 14209 [details]
patch

Ideally this should be done as a runtime check, not compile time, since libxml is often dynamically linked in.

But looking at xmlversion.h I don't see a way to make the a check at runtime.
Comment 5 Maciej Stachowiak 2007-04-26 22:35:13 PDT
Comment on attachment 14209 [details]
patch

I agree that a runtime check would be better, but since that apparently can't be done, this seems fine. r=me
Comment 6 Mark Rowe (bdash) 2007-04-26 23:08:43 PDT
Landed in r21136.