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

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

Issue 2732863002: Propagate active document URL to result of DOMParser.parseFromString() (Closed)
Patch Set: Fixed 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 98a2a5bef7479c35e59885685210654957238ccc..e0d39e9338529e23c660bcab8fff1d9167d505ee 100644
--- a/third_party/WebKit/Source/core/xml/DOMParser.cpp
+++ b/third_party/WebKit/Source/core/xml/DOMParser.cpp
@@ -28,8 +28,10 @@ Document* DOMParser::parseFromString(const String& str, const String& type) {
Document* doc = DOMImplementation::createDocument(
type, DocumentInit(KURL(), nullptr, m_contextDocument), false);
doc->setContent(str);
- if (m_contextDocument)
+ if (m_contextDocument) {
+ doc->setURL(m_contextDocument->url());
doc->setSecurityOrigin(m_contextDocument->getSecurityOrigin());
+ }
return doc;
}
« 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