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

Unified Diff: Source/core/dom/Document.cpp

Issue 730003002: Refactoring XSLT (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/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 15e51deb36a65c9ccb46505c25af707ba6b79846..a6360c61f4382e18fd5788cd545b776153dc0eaf 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4421,27 +4421,6 @@ void Document::popCurrentScript()
m_currentScriptStack.removeLast();
}
-void Document::applyXSLTransform(ProcessingInstruction* pi)
-{
- ASSERT(!pi->isLoading());
- UseCounter::count(*this, UseCounter::XSLProcessingInstruction);
- RefPtrWillBeRawPtr<XSLTProcessor> processor = XSLTProcessor::create(*this);
- processor->setXSLStyleSheet(toXSLStyleSheet(pi->sheet()));
- String resultMIMEType;
- String newSource;
- String resultEncoding;
- setParsingState(Parsing);
- if (!processor->transformToString(this, resultMIMEType, newSource, resultEncoding)) {
- setParsingState(FinishedParsing);
- return;
- }
- // FIXME: If the transform failed we should probably report an error (like Mozilla does).
- LocalFrame* ownerFrame = frame();
- processor->createDocumentFromSource(newSource, resultEncoding, resultMIMEType, this, ownerFrame);
- InspectorInstrumentation::frameDocumentUpdated(ownerFrame);
- setParsingState(FinishedParsing);
-}
-
void Document::setTransformSource(PassOwnPtr<TransformSource> source)
{
m_transformSource = source;
@@ -4856,8 +4835,6 @@ void Document::initContentSecurityPolicy(PassRefPtr<ContentSecurityPolicy> csp)
setContentSecurityPolicy(csp ? csp : ContentSecurityPolicy::create());
if (m_frame && m_frame->tree().parent() && m_frame->tree().parent()->isLocalFrame() && (shouldInheritSecurityOriginFromOwner(m_url) || isPluginDocument()))
contentSecurityPolicy()->copyStateFrom(toLocalFrame(m_frame->tree().parent())->document()->contentSecurityPolicy());
- if (transformSourceDocument())
- contentSecurityPolicy()->copyStateFrom(transformSourceDocument()->contentSecurityPolicy());
contentSecurityPolicy()->bindToExecutionContext(this);
}

Powered by Google App Engine
This is Rietveld 408576698