Chromium Code Reviews| 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); |
|
haraken
2014/11/17 14:18:32
Just help me understand: Why do we need to copy th
tasak
2014/11/19 08:23:17
Because Document::initContentSecurityPolicy did:
|
| } |
| } else { |
| result = LocalDOMWindow::createDocument(sourceMIMEType, init, forceXHTML); |