RESOLVED FIXED 5142
parseXMLDocumentFragment can't parse fragments correctly
https://bugs.webkit.org/show_bug.cgi?id=5142
Summary parseXMLDocumentFragment can't parse fragments correctly
Eric Seidel (no email)
Reported 2005-09-26 15:13:48 PDT
innerHTML doesn't work correctly w/ xhtml namespaces See attached test case.
Attachments
test case (1.21 KB, application/xhtml+xml)
2005-09-26 15:14 PDT, Eric Seidel (no email)
no flags
Fix (10.61 KB, patch)
2006-01-04 10:34 PST, Anders Carlsson
eric: review-
Remove invalid test result (7.77 KB, patch)
2006-01-05 01:53 PST, Anders Carlsson
eric: review+
Eric Seidel (no email)
Comment 1 2005-09-26 15:14:44 PDT
Created attachment 4050 [details] test case
Anders Carlsson
Comment 2 2006-01-04 10:34:37 PST
Created attachment 5483 [details] Fix This changes parseXMLDocumentFragment back into using xmlParseBalancedChunkMemory, because using the regular parser does not work for things such as "<foo/><foo/>" which are legal fragments. This does break the XSLTProcessor test, but that's because of a bug in XLSTProcessor which I'm investigating
Eric Seidel (no email)
Comment 3 2006-01-04 11:56:45 PST
Comment on attachment 5483 [details] Fix Bad to regress the XSLTProcessor tests. Let's fix those issues first.
Anders Carlsson
Comment 4 2006-01-04 12:29:10 PST
If the patch in 6180 is committed, the XSLT test won't fail anymore. (The reason was that the garbage produced does not parse as a fragment, but as a document)
Anders Carlsson
Comment 5 2006-01-04 13:57:20 PST
Comment on attachment 5483 [details] Fix Now that #6180 has been fixed, this does not cause a regression anymore
Eric Seidel (no email)
Comment 6 2006-01-04 15:10:26 PST
Comment on attachment 5483 [details] Fix Please post an updated patch w/o these (now invalid) test changes.
Anders Carlsson
Comment 7 2006-01-05 01:53:07 PST
Created attachment 5491 [details] Remove invalid test result
Eric Seidel (no email)
Comment 8 2006-01-05 23:21:36 PST
Comment on attachment 5491 [details] Remove invalid test result IMO, any balanced handlers which can be the same as the normal handlers should be. I think most of these can share code there.
Eric Seidel (no email)
Comment 9 2006-01-05 23:21:46 PST
Comment on attachment 5491 [details] Remove invalid test result Otherwise the patch looks great!
Anders Carlsson
Comment 10 2006-01-06 02:23:09 PST
Comment on attachment 5491 [details] Remove invalid test result It isn't possible to share them, because the normal handlers have a context pointer as user data arguments to make it possible for the regular libxml SAX handlers to be called. It isn't possible to create such a context pointer when parsing a balanced chunk.
Eric Seidel (no email)
Comment 11 2006-01-06 02:33:03 PST
Comment on attachment 5491 [details] Remove invalid test result Ah yes! I remember that exact issue w/ the userdata vs. context pointer. Looks good. r=me.
Lucas Forschler
Comment 12 2019-02-06 09:02:42 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note You need to log in before you can comment on or make changes to this bug.