summaryrefslogtreecommitdiff
path: root/Source/WebCore/xml/XMLTreeViewer.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/xml/XMLTreeViewer.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/xml/XMLTreeViewer.cpp')
-rw-r--r--Source/WebCore/xml/XMLTreeViewer.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/WebCore/xml/XMLTreeViewer.cpp b/Source/WebCore/xml/XMLTreeViewer.cpp
index 1a85dc7c2..d641d76cb 100644
--- a/Source/WebCore/xml/XMLTreeViewer.cpp
+++ b/Source/WebCore/xml/XMLTreeViewer.cpp
@@ -34,15 +34,15 @@
#include "Document.h"
#include "Element.h"
-#include "ExceptionCodePlaceholder.h"
#include "Frame.h"
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "SecurityOrigin.h"
+#include "SecurityOriginPolicy.h"
+#include "StyleScope.h"
#include "Text.h"
#include "XMLViewerCSS.h"
#include "XMLViewerJS.h"
-#include <bindings/ScriptValue.h>
namespace WebCore {
@@ -53,17 +53,16 @@ XMLTreeViewer::XMLTreeViewer(Document& document)
void XMLTreeViewer::transformDocumentToTreeView()
{
- m_document.setSecurityOrigin(SecurityOrigin::createUnique());
+ m_document.setSecurityOriginPolicy(SecurityOriginPolicy::create(SecurityOrigin::createUnique()));
String scriptString = StringImpl::createWithoutCopying(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.");
- m_document.frame()->script().evaluate(ScriptSourceCode("prepareWebKitXMLViewer('" + noStyleMessage + "');"));
+ m_document.frame()->script().evaluate(ScriptSourceCode(AtomicString("prepareWebKitXMLViewer('This XML file does not appear to have any style information associated with it. The document tree is shown below.');")));
String cssString = StringImpl::createWithoutCopying(XMLViewer_css, sizeof(XMLViewer_css));
- RefPtr<Text> text = m_document.createTextNode(cssString);
- m_document.getElementById("xml-viewer-style")->appendChild(text, IGNORE_EXCEPTION);
- m_document.styleResolverChanged(RecalcStyleImmediately);
+ auto text = m_document.createTextNode(cssString);
+ m_document.getElementById(String(ASCIILiteral("xml-viewer-style")))->appendChild(text);
+ m_document.styleScope().didChangeActiveStyleSheetCandidates();
}
} // namespace WebCore