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

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

Issue 703193004: XSLT-in-PrivateScript (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/xml/XSLTProcessor.cpp
diff --git a/Source/core/xml/XSLTProcessor.cpp b/Source/core/xml/XSLTProcessor.cpp
index d97c01fedf5c2925ba512fe9252a2223f755d040..fb14da037ce1c25398dd6d8fb5b2a1a0a6c2938e 100644
--- a/Source/core/xml/XSLTProcessor.cpp
+++ b/Source/core/xml/XSLTProcessor.cpp
@@ -23,9 +23,11 @@
#include "config.h"
#include "core/xml/XSLTProcessor.h"
+#include "bindings/core/v8/V8Document.h"
#include "core/dom/DOMImplementation.h"
#include "core/dom/DocumentEncodingData.h"
#include "core/dom/DocumentFragment.h"
+#include "core/dom/ProcessingInstruction.h"
#include "core/editing/markup.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/FrameView.h"
@@ -83,10 +85,13 @@ PassRefPtrWillBeRawPtr<Document> XSLTProcessor::createDocumentFromSource(const S
view->clear();
if (oldDocument) {
- result->setTransformSourceDocument(oldDocument.get());
+ V8Document::PrivateScript::setTransformSourceDocumentMethod(frame, result.get(), 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);

Powered by Google App Engine
This is Rietveld 408576698