From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/xml/XMLTreeViewer.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Source/WebCore/xml/XMLTreeViewer.cpp') 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 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 = 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 -- cgit v1.2.1