For webkit portings which use XMLTokenizerLibxml2, When XHTMLMP is enabled, all the XHTML documents fail to render, including all the test cases in LayoutTests/dom/xhtml.
Created attachment 49145 [details] fix patch When the XHTMLMP is enabled, the author added one member function to class Document to decide if the document is of XHTMLMP type, and they later on in the tokenizer, it validates if the right Doctype is declared for xhtml-mp document. The right MIME type for XHTMLMP is "application/vnd.wap.xhtml+xml", while in the new member function isXHTMLMPDocument() of Document, it returns true for both "application/vnd.wap.xhtml+xml" and "application/xhtml+xml". In the Tokenizer, it trys to validate that the XHTMLDocument contains the right DTD declaration and public ID ("//WAPFORUM/DTD XHTML Mobile 1.0"), sure it fails for all the XHTML (non-MP) documents. Ths fix for this bug is only documents with MIME type "application/wap.vnd.xhtml+xml" will be treated as XHTMLMP documents; MIME type "application/xhtml+xml" is for XHTML documents.
Comment on attachment 49145 [details] fix patch Why does this touch WML?
Comment on attachment 49145 [details] fix patch Like george, I don't understand why this channges WML. Not that the change is wrong, it just needs more explanation. It looks like this was always backwards: #if !ENABLE(XHTMLMP) 1256 || (extId == "-//WAPFORUM//DTD XHTML Mobile 1.0//EN") 1257 #endif ? Or if that should be enabled for all ports, just remove the #if.
Thanks, George, and Eric, for the review. The change for WML is a clean-up of the code. That piece of code is actually identical for both XHTMLMP, WML and XHTML, I just cleaned it up by removing the XHTMLMP and WML to remove the redundent code. 1255 #if !ENABLE(XHTMLMP) 1256 || (extId == "-//WAPFORUM//DTD XHTML Mobile 1.0//EN") 1257 #endif should only be enabled for XHTMLMP, while the original code makes it avaiable only if XHTMLMP is disabled, that is wrong . I hope this makes it clear and you will re-consider and take the patch . If you have other comments, I would be glad to work on that.
It looks to me that this impacts not only XMLTokenizerLibxml2 but also XMLTokenizerQt.cpp. Charles, would you consider making the same changes for the Qt port as well together with this patch ?
Comment on attachment 49145 [details] fix patch Clearing flags on attachment: 49145 Committed r55802: <http://trac.webkit.org/changeset/55802>
All reviewed patches have been landed. Closing bug.