Bug 13508 - Compiling WebKit with libxml 2.6.27 or greater causes some layout tests to fail
Summary: Compiling WebKit with libxml 2.6.27 or greater causes some layout tests to fail
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2007-04-26 12:02 PDT by Matt Perry
Modified: 2007-04-26 23:08 PDT (History)
1 user (show)

See Also:

patch (1.32 KB, patch)
2007-04-26 12:06 PDT, Matt Perry
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]

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]

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]

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]

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.