Closed Bug 233753 Opened 20 years ago Closed 20 years ago
Default Namespace ID creates does not return XHTML in HTML documents
Chatzilla and the DOM TS were broken due to the creation of XML Elements when calling document.createElement('tagname') from HTML Documents. This was introduced in bug 16603. jst has a patch.
err. correct summary.
Summary: GetDefaultNamespaceID creates does return XHTML in HTML documents → GetDefaultNamespaceID creates does not return XHTML in HTML documents
This makes document.createElement('foo') create an HTML element again if document is an HTML document.
Hmm... What will the namespace in the nodeinfo of the new node be then?
Wrong. And dbaron pointed that out to me too. New patch coming up. I'm basically reverting to the old CreateElement() code in nsHTMLDocument... Got too excited there when I figured out what was breaking everything :-)
Status: NEW → ASSIGNED
This should get it right, in all cases AFAICT.
Attachment #141109 - Attachment is obsolete: true
Comment on attachment 141112 [details] [diff] [review] Revert nsHTMLDocument::CreateElement() to what it used to be, more or less. r=bzbarsky
Comment on attachment 141112 [details] [diff] [review] Revert nsHTMLDocument::CreateElement() to what it used to be, more or less. sr=dbaron, although it's worth noting (for the future) that you might want to be doing the case conversion before converting to UTF-8.
Fix checked in, and I went ahead and changed the |tmp| string to an nsAutoString and called ToLowerCase() on it, and let the atom code to the UTF8 conversion. Slightly slower, but correct, and this is not on a performance critical path. Thanks for the reviews, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
So.. this patch actually makes us violate both DOM2 Core and DOM3 Core... See bug 280692.
You need to log in before you can comment on or make changes to this bug.