diff options
Diffstat (limited to 'Source/WebCore/xml/XMLTreeViewer.cpp')
-rw-r--r-- | Source/WebCore/xml/XMLTreeViewer.cpp | 15 |
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 |