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

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

Issue 2744153002: Use parseFromString type arg to set mime type. (Closed)
Patch Set: Fixed parseFromString-xml test expectations Created 3 years, 9 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 | « third_party/WebKit/LayoutTests/external/wpt/domparsing/DOMParser-parseFromString-xml-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xml/DOMParser.cpp
diff --git a/third_party/WebKit/Source/core/xml/DOMParser.cpp b/third_party/WebKit/Source/core/xml/DOMParser.cpp
index 41db8624bcfddc214c29641d2b129889805fe157..7bff95367878609ff9f3d55be35f064d3e0381d2 100644
--- a/third_party/WebKit/Source/core/xml/DOMParser.cpp
+++ b/third_party/WebKit/Source/core/xml/DOMParser.cpp
@@ -29,6 +29,7 @@ Document* DOMParser::parseFromString(const String& str, const String& type) {
Document* doc = DOMImplementation::createDocument(
type, DocumentInit(KURL(), nullptr, m_contextDocument), false);
doc->setContent(str);
+ doc->setMimeType(AtomicString(type));
if (m_contextDocument) {
doc->setURL(m_contextDocument->url());
doc->setSecurityOrigin(m_contextDocument->getSecurityOrigin());
« no previous file with comments | « third_party/WebKit/LayoutTests/external/wpt/domparsing/DOMParser-parseFromString-xml-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698