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

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

Issue 919473004: Make DOMParser create documents with a context document set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added test Created 5 years, 10 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 | « Source/core/xml/DOMParser.h ('k') | Source/core/xml/DOMParser.idl » ('j') | 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 a60572e2e5cfeace4f48d641b94b827eae2924dc..4e68739295b28a587ef20a905e48d303e134c628 100644
--- a/Source/core/xml/DOMParser.cpp
+++ b/Source/core/xml/DOMParser.cpp
@@ -27,9 +27,14 @@ namespace blink {
PassRefPtrWillBeRawPtr<Document> DOMParser::parseFromString(const String& str, const String& type)
{
- RefPtrWillBeRawPtr<Document> doc = DOMImplementation::createDocument(type, 0, KURL(), false);
+ RefPtrWillBeRawPtr<Document> doc = DOMImplementation::createDocument(type, DocumentInit(KURL(), nullptr, m_contextDocument), false);
doc->setContent(str);
return doc.release();
}
+DOMParser::DOMParser(Document& document)
+ : m_contextDocument(document.contextDocument())
+{
+}
+
} // namespace blink
« no previous file with comments | « Source/core/xml/DOMParser.h ('k') | Source/core/xml/DOMParser.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698