summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/xml
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-06-10 16:52:27 +0100
committerSteve Block <steveblock@google.com>2011-06-14 01:14:02 +0100
commit54cdeeebc7adcbcd900e8b6a141a8cae27d9a631 (patch)
tree845b0d338b204a48560eca3b51b34cf92ed96840 /Source/WebCore/xml
parentd2c5226a647dc21d0c15267e09a3d19cf3e0d593 (diff)
downloadexternal_webkit-54cdeeebc7adcbcd900e8b6a141a8cae27d9a631.zip
external_webkit-54cdeeebc7adcbcd900e8b6a141a8cae27d9a631.tar.gz
external_webkit-54cdeeebc7adcbcd900e8b6a141a8cae27d9a631.tar.bz2
Merge WebKit at branches/chromium/742 r88085: Initial merge by git.
Change-Id: I0501b484b9528e31b0026e5ad64416dd6541cdde
Diffstat (limited to 'Source/WebCore/xml')
-rw-r--r--Source/WebCore/xml/XMLTreeViewer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/xml/XMLTreeViewer.cpp b/Source/WebCore/xml/XMLTreeViewer.cpp
index a2110db..874a8cf 100644
--- a/Source/WebCore/xml/XMLTreeViewer.cpp
+++ b/Source/WebCore/xml/XMLTreeViewer.cpp
@@ -70,6 +70,12 @@ bool XMLTreeViewer::hasNoStyleInformation() const
void XMLTreeViewer::transformDocumentToTreeView()
{
+ // FIXME: Temporary hack to ensure that we still display some of the document (and don't crash)
+ // when script is disabled. See https://bugs.webkit.org/show_bug.cgi?id=59113 for work on a
+ // better solution.
+ if (!m_document->frame()->script()->canExecuteScripts(NotAboutToExecuteScript))
+ return;
+
String scriptString(reinterpret_cast<const char*>(XMLViewer_js), sizeof(XMLViewer_js));
m_document->frame()->script()->evaluate(ScriptSourceCode(scriptString));
String noStyleMessage("This XML file does not appear to have any style information associated with it. The document tree is shown below.");