Created attachment 15360 [details]
Created attachment 15388 [details]
This fixes the testcase and some existing tests. Unfortunately it is hard to see if it changes pixel tests rather than layout tests, since so many seem to fail anyway :}
I'm not sure this should be limited to a subset of xhtml doctypes. xhtml is never in quirks mode, so it would be better not to have quirks. I think it might make sense to just always do this for createElement().
Comment on attachment 15388 [details]
Setting review- based on Maciej's comments. I don't think we want to create a strict vs. quirks mode for XML unless there's some other browser or at least some specification suggesting we should do so.
It's probably right to have createElement always create XHTML elements in any XML document, especially if that's consistent with what other browsers do.
Looking at Document::setTitle, it seems that function already assumes it will do so!
See also bug 8007.
..and bug 10932, which also contains a lot of discussion.
Created attachment 15445 [details]
This patch follows comment #18 in bug 10932, i.e. Opera's solution. dom/xhtml/level3/core/nodelookupprefix10 is a bit special, it fails in Opera, FF2 and with this
patch, so maybe that test is broken?
HTML 5 currently says:
The canonical form of HTML markup is all-lowercase; thus, this method will lowercase the argument before creating the requisite element. Also, the element created must be in the HTML namespace.
This follows a long discussion from Mozilla bugs, e.g. <https://bugzilla.mozilla.org/show_bug.cgi?id=354318#c2>.
Also, does the new test need to be a pixel one?
Comment on attachment 15445 [details]
Given what HTML5 says, and Mozilla's stance, I think we should just make createElement always use the xhtml namespace. It would then be possible to remove the HTMLDocument override for createElement.
http://bugs.webkit.org/show_bug.cgi?id=8007 is a duplicate and my proposed solution would render http://bugs.webkit.org/show_bug.cgi?id=10932 a wontfix.
*** This bug has been marked as a duplicate of 8007 ***