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

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 479753003: Transform XML tree viewer to blink-in-js implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months 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
« Source/core/xml/XMLTreeViewer.idl ('K') | « Source/core/xml/XMLTreeViewer.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3b3f404d3a80a7554401dcf7893d685d9982cf56 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/V8XMLTreeViewer.h"
#include "core/FetchInitiatorTypeNames.h"
#include "core/HTMLNames.h"
#include "core/XMLNSNames.h"
@@ -1470,8 +1471,9 @@ void XMLDocumentParser::doEnd()
bool xmlViewerMode = !m_sawError && !m_sawCSS && !m_sawXSLTransform && hasNoStyleInformation(document());
if (xmlViewerMode) {
- XMLTreeViewer xmlTreeViewer(document());
- xmlTreeViewer.transformDocumentToTreeView();
+ XMLTreeViewer xmlTreeViewer;
+ document()->setIsViewSource(true);
+ V8XMLTreeViewer::PrivateScript::transformDocumentToTreeViewMethod(document()->frame(), &xmlTreeViewer);
} else if (m_sawXSLTransform) {
xmlDocPtr doc = xmlDocPtrForString(document()->fetcher(), m_originalSourceForTransform.toString(), document()->url().string());
document()->setTransformSource(adoptPtr(new TransformSource(doc)));
« Source/core/xml/XMLTreeViewer.idl ('K') | « Source/core/xml/XMLTreeViewer.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698