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

Unified Diff: Source/core/dom/Document.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/dom/Document.h ('k') | Source/core/dom/ProcessingInstruction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 1dd86fa7a6f630171e375421b99a6367db7808db..ed06c8c07315db1af68447daf149bbade88c6623 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4422,27 +4422,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;
@@ -4857,8 +4836,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);
}
@@ -5801,7 +5778,6 @@ void Document::trace(Visitor* visitor)
visitor->trace(m_cssTarget);
visitor->trace(m_currentScriptStack);
visitor->trace(m_scriptRunner);
- visitor->trace(m_transformSourceDocument);
visitor->trace(m_listsInvalidatedAtDocument);
for (int i = 0; i < numNodeListInvalidationTypes; ++i)
visitor->trace(m_nodeLists[i]);
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/ProcessingInstruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698