Index: Source/core/xml/parser/XMLDocumentParser.cpp |
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp |
index dc41f40184b8a2b7a6cda1536f927dd9c9c426f8..37d889a20265aed4203f654473a0db8e86d5e82b 100644 |
--- a/Source/core/xml/parser/XMLDocumentParser.cpp |
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp |
@@ -30,6 +30,7 @@ |
#include "bindings/core/v8/ExceptionStatePlaceholder.h" |
#include "bindings/core/v8/ScriptController.h" |
#include "bindings/core/v8/ScriptSourceCode.h" |
+#include "bindings/core/v8/V8Document.h" |
#include "core/FetchInitiatorTypeNames.h" |
#include "core/HTMLNames.h" |
#include "core/XMLNSNames.h" |
@@ -52,7 +53,6 @@ |
#include "core/loader/FrameLoader.h" |
#include "core/loader/ImageLoader.h" |
#include "core/svg/graphics/SVGImage.h" |
-#include "core/xml/XMLTreeViewer.h" |
#include "core/xml/parser/SharedBufferReader.h" |
#include "core/xml/parser/XMLDocumentParserScope.h" |
#include "core/xml/parser/XMLParserInput.h" |
@@ -1470,8 +1470,9 @@ void XMLDocumentParser::doEnd() |
bool xmlViewerMode = !m_sawError && !m_sawCSS && !m_sawXSLTransform && hasNoStyleInformation(document()); |
if (xmlViewerMode) { |
- XMLTreeViewer xmlTreeViewer(document()); |
- xmlTreeViewer.transformDocumentToTreeView(); |
+ const char noStyleMessage[] = "This XML file does not appear to have any style information associated with it. The document tree is shown below."; |
+ document()->setIsViewSource(true); |
+ V8Document::PrivateScript::transformDocumentToTreeViewMethod(document()->frame(), document(), noStyleMessage); |
} else if (m_sawXSLTransform) { |
xmlDocPtr doc = xmlDocPtrForString(document()->fetcher(), m_originalSourceForTransform.toString(), document()->url().string()); |
document()->setTransformSource(adoptPtr(new TransformSource(doc))); |