Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1124)

Unified Diff: Source/core/xml/DOMParser.cpp

Issue 23903014: DOMParser.parseFromString() should support creating HTML Document with mimetype text/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/dom-parser-text-html-mimetype-support-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/DOMParser.cpp
diff --git a/Source/core/xml/DOMParser.cpp b/Source/core/xml/DOMParser.cpp
index b923b46ec23902e17faae02d2457a0238f28e989..475eb975f097e9309fa3c1757ab4409c43474fdd 100644
--- a/Source/core/xml/DOMParser.cpp
+++ b/Source/core/xml/DOMParser.cpp
@@ -27,7 +27,7 @@ namespace WebCore {
PassRefPtr<Document> DOMParser::parseFromString(const String& str, const String& contentType)
{
- if (!DOMImplementation::isXMLMIMEType(contentType))
+ if (!(DOMImplementation::isXMLMIMEType(contentType) || contentType == "text/html"))
abarth-chromium 2013/09/05 17:25:31 Can you distribute the ! inside the || ? I think
eseidel 2013/09/05 17:26:28 I'm concerned that we support more mime types than
return 0;
RefPtr<Document> doc = DOMImplementation::createDocument(contentType, 0, KURL(), false);
« no previous file with comments | « LayoutTests/fast/dom/dom-parser-text-html-mimetype-support-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698