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

Unified Diff: third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp

Issue 2744413002: Set view source without creating a unique origin in XMLDocumentParser (Closed)
Patch Set: Add test 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/Source/core/dom/Document.cpp ('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/parser/XMLDocumentParser.cpp
diff --git a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
index 9cd21b6d35e61ddfb4dc3c0be6d07fa3a5d1175f..c9b9918a00e810119605a500a15a875038388a4e 100644
--- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1548,7 +1548,10 @@ void XMLDocumentParser::doEnd() {
bool xmlViewerMode = !m_sawError && !m_sawCSS && !m_sawXSLTransform &&
hasNoStyleInformation(document());
if (xmlViewerMode) {
- document()->setIsViewSource(true);
+ if (document()->canExecuteScripts(NotAboutToExecuteScript))
jochen (gone - plz use gerrit) 2017/03/14 20:13:53 why this if ()?
adithyas 2017/03/14 20:55:15 I thought we still need the unique origin when scr
+ document()->setIsViewSourceWithoutUniqueOrigin();
+ else
+ document()->setIsViewSource(true);
transformDocumentToXMLTreeView(*document());
} else if (m_sawXSLTransform) {
xmlDocPtr doc =
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698