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

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

Issue 730003002: Refactoring XSLT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed ASSERT crashes when xsltEnabled() returns false Created 6 years, 1 month 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/DocumentXSLT.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XSLTProcessor.cpp
diff --git a/Source/core/xml/XSLTProcessor.cpp b/Source/core/xml/XSLTProcessor.cpp
index 40df7d23ae4e55f07fc71052f01dc1c4c1ef5ea0..d346ec6ab90bec90f8128bcc08d732a8d80258a5 100644
--- a/Source/core/xml/XSLTProcessor.cpp
+++ b/Source/core/xml/XSLTProcessor.cpp
@@ -31,6 +31,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
+#include "core/xml/DocumentXSLT.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/Assertions.h"
@@ -83,10 +84,13 @@ PassRefPtrWillBeRawPtr<Document> XSLTProcessor::createDocumentFromSource(const S
view->clear();
if (oldDocument) {
- result->setTransformSourceDocument(oldDocument.get());
+ DocumentXSLT::from(*result).setTransformSourceDocument(oldDocument.get());
result->updateSecurityOrigin(oldDocument->securityOrigin());
result->setCookieURL(oldDocument->cookieURL());
- result->initContentSecurityPolicy();
+
+ RefPtr<ContentSecurityPolicy> csp = ContentSecurityPolicy::create();
+ csp->copyStateFrom(oldDocument->contentSecurityPolicy());
+ result->initContentSecurityPolicy(csp);
}
} else {
result = LocalDOMWindow::createDocument(sourceMIMEType, init, forceXHTML);
« no previous file with comments | « Source/core/xml/DocumentXSLT.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698