The specification http://domparsing.spec.whatwg.org/#the-domparser-interface for DOMParser.parseFromString() allows the document creation if the mimeType is one of the supported types: ["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"] Also script elements get marked unexecutable and the contents of noscript get parsed as markup. blink review URL: https://codereview.chromium.org/23903014/
Created attachment 210700 [details] Patch
Comment on attachment 210700 [details] Patch Attachment 210700 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1714115 New failing tests: media/video-object-fit.html
Created attachment 210713 [details] Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-09 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
(In reply to comment #2) > (From update of attachment 210700 [details]) > Attachment 210700 [details] did not pass mac-wk2-ews (mac-wk2): > Output: http://webkit-queues.appspot.com/results/1714115 > > New failing tests: > media/video-object-fit.html I suppose the above failure is not related the proposed patch.
Comment on attachment 210700 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210700&action=review > Source/WebCore/xml/DOMParser.cpp:29 > + if (!DOMImplementation::isXMLMIMEType(contentType) && contentType != "text/html") isXMLMiMEType allows any MIME type that ends with +xml. That doesn't seem to match the spec.
Comment on attachment 210700 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210700&action=review >> Source/WebCore/xml/DOMParser.cpp:29 >> + if (!DOMImplementation::isXMLMIMEType(contentType) && contentType != "text/html") > > isXMLMiMEType allows any MIME type that ends with +xml. That doesn't seem to match the spec. Lets make sure we have some test coverage for this, either way. Some bogus type that ends in "+xml" to make sure we don’t support it. Also, should this be case sensitive or not? Need test coverage for that too.
Created attachment 211302 [details] Patch
(In reply to comment #6) > (From update of attachment 210700 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=210700&action=review > > >> Source/WebCore/xml/DOMParser.cpp:29 > >> + if (!DOMImplementation::isXMLMIMEType(contentType) && contentType != "text/html") > > > > isXMLMiMEType allows any MIME type that ends with +xml. That doesn't seem to match the spec. > > Lets make sure we have some test coverage for this, either way. Some bogus type that ends in "+xml" to make sure we don’t support it. > > Also, should this be case sensitive or not? Need test coverage for that too. FF and opera 12 raise exception in case of type mismatch or incorrect case. Matching our behavior with it. Also made changes in order to support only listed types. Please take a look, thank you.
Comment on attachment 211302 [details] Patch Clearing flags on attachment: 211302 Committed r155584: <http://trac.webkit.org/changeset/155584>
All reviewed patches have been landed. Closing bug.
Mass moving XML DOM bugs to the "DOM" Component.