Bug 5142 - parseXMLDocumentFragment can't parse fragments correctly
Summary: parseXMLDocumentFragment can't parse fragments correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on: 6180
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-26 15:13 PDT by Eric Seidel (no email)
Modified: 2019-02-06 09:02 PST (History)
1 user (show)

See Also:


Attachments
test case (1.21 KB, application/xhtml+xml)
2005-09-26 15:14 PDT, Eric Seidel (no email)
no flags Details
Fix (10.61 KB, patch)
2006-01-04 10:34 PST, Anders Carlsson
eric: review-
Details | Formatted Diff | Diff
Remove invalid test result (7.77 KB, patch)
2006-01-05 01:53 PST, Anders Carlsson
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-09-26 15:13:48 PDT
innerHTML doesn't work correctly w/ xhtml namespaces

See attached test case.
Comment 1 Eric Seidel (no email) 2005-09-26 15:14:44 PDT
Created attachment 4050 [details]
test case
Comment 2 Anders Carlsson 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
Comment 3 Eric Seidel (no email) 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.
Comment 4 Anders Carlsson 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)
Comment 5 Anders Carlsson 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
Comment 6 Eric Seidel (no email) 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.
Comment 7 Anders Carlsson 2006-01-05 01:53:07 PST
Created attachment 5491 [details]
Remove invalid test result
Comment 8 Eric Seidel (no email) 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.
Comment 9 Eric Seidel (no email) 2006-01-05 23:21:46 PST
Comment on attachment 5491 [details]
Remove invalid test result

Otherwise the patch looks great!
Comment 10 Anders Carlsson 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.
Comment 11 Eric Seidel (no email) 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.
Comment 12 Lucas Forschler 2019-02-06 09:02:42 PST
Mass moving XML DOM bugs to the "DOM" Component.