Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / xml / XSLStyleSheetLibxslt.cpp
index 38cd4ba..b4a5679 100644 (file)
@@ -25,8 +25,8 @@
 #include "core/dom/Document.h"
 #include "core/dom/Node.h"
 #include "core/dom/TransformSource.h"
-#include "core/frame/Frame.h"
 #include "core/frame/FrameHost.h"
+#include "core/frame/LocalFrame.h"
 #include "core/xml/XSLImportRule.h"
 #include "core/xml/XSLTProcessor.h"
 #include "core/xml/parser/XMLDocumentParserScope.h"
@@ -39,7 +39,7 @@
 namespace WebCore {
 
 XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& originalURL, const KURL& finalURL)
-    : m_ownerNode(0)
+    : m_ownerNode(nullptr)
     , m_originalURL(originalURL)
     , m_finalURL(finalURL)
     , m_isDisabled(false)
@@ -62,7 +62,7 @@ XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const
     , m_stylesheetDoc(0)
     , m_stylesheetDocTaken(false)
     , m_compilationFailed(false)
-    , m_parentStyleSheet(0)
+    , m_parentStyleSheet(nullptr)
 {
 }
 
@@ -70,11 +70,12 @@ XSLStyleSheet::~XSLStyleSheet()
 {
     if (!m_stylesheetDocTaken)
         xmlFreeDoc(m_stylesheetDoc);
-
+#if !ENABLE(OILPAN)
     for (unsigned i = 0; i < m_children.size(); ++i) {
         ASSERT(m_children.at(i)->parentStyleSheet() == this);
         m_children.at(i)->setParentStyleSheet(0);
     }
+#endif
 }
 
 bool XSLStyleSheet::isLoading() const
@@ -128,10 +129,10 @@ bool XSLStyleSheet::parseString(const String& source)
         xmlFreeDoc(m_stylesheetDoc);
     m_stylesheetDocTaken = false;
 
-    PageConsole* console = 0;
-    Frame* frame = ownerDocument()->frame();
-    if (frame && frame->host())
-        console = &frame->host()->console();
+    FrameConsole* console = 0;
+    LocalFrame* frame = ownerDocument()->frame();
+    if (frame)
+        console = &frame->console();
 
     XMLDocumentParserScope scope(fetcher(), XSLTProcessor::genericErrorFunc, XSLTProcessor::parseErrorFunc, console);
     XMLParserInput input(source);
@@ -216,7 +217,7 @@ void XSLStyleSheet::loadChildSheets()
 
 void XSLStyleSheet::loadChildSheet(const String& href)
 {
-    OwnPtr<XSLImportRule> childRule = XSLImportRule::create(this, href);
+    OwnPtrWillBeRawPtr<XSLImportRule> childRule = XSLImportRule::create(this, href);
     XSLImportRule* c = childRule.get();
     m_children.append(childRule.release());
     c->loadSheet();
@@ -303,4 +304,12 @@ void XSLStyleSheet::markAsProcessed()
     m_stylesheetDocTaken = true;
 }
 
+void XSLStyleSheet::trace(Visitor* visitor)
+{
+    visitor->trace(m_ownerNode);
+    visitor->trace(m_children);
+    visitor->trace(m_parentStyleSheet);
+    StyleSheet::trace(visitor);
+}
+
 } // namespace WebCore