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

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: Patch for landing! 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/domparser-parsefromstring-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..25c1cb6d6d222de8bcb4086409d31592094b2c63 100644
--- a/Source/core/xml/DOMParser.cpp
+++ b/Source/core/xml/DOMParser.cpp
@@ -20,14 +20,13 @@
#include "core/xml/DOMParser.h"
#include "core/dom/DOMImplementation.h"
-#include "core/dom/Document.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
PassRefPtr<Document> DOMParser::parseFromString(const String& str, const String& contentType)
{
- if (!DOMImplementation::isXMLMIMEType(contentType))
+ if (!DOMImplementation::isXMLMIMEType(contentType) && contentType != "text/html")
return 0;
RefPtr<Document> doc = DOMImplementation::createDocument(contentType, 0, KURL(), false);
« no previous file with comments | « LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698