Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / dom / EmptyNodeList.h
index 06f895f..f11775d 100644 (file)
 #define EmptyNodeList_h
 
 #include "core/dom/NodeList.h"
+#include "wtf/RefPtr.h"
 
-namespace WebCore {
+namespace blink {
 
 class EmptyNodeList FINAL : public NodeList {
 public:
-    static PassRefPtr<EmptyNodeList> create(Node* rootNode)
+    static PassRefPtrWillBeRawPtr<EmptyNodeList> create(Node& rootNode)
     {
-        return adoptRef(new EmptyNodeList(rootNode));
+        return adoptRefWillBeNoop(new EmptyNodeList(rootNode));
     }
     virtual ~EmptyNodeList();
 
-    Node* ownerNode() const { return m_owner.get(); }
+    Node& ownerNode() const { return *m_owner; }
+
+    virtual void trace(Visitor*) OVERRIDE;
 
 private:
-    explicit EmptyNodeList(Node* rootNode) : m_owner(rootNode) { }
+    explicit EmptyNodeList(Node& rootNode) : m_owner(rootNode) { }
 
     virtual unsigned length() const OVERRIDE { return 0; }
     virtual Node* item(unsigned) const OVERRIDE { return 0; }
@@ -55,11 +58,11 @@ private:
     virtual bool isEmptyNodeList() const OVERRIDE { return true; }
     virtual Node* virtualOwnerNode() const OVERRIDE;
 
-    RefPtr<Node> m_owner;
+    RefPtrWillBeMember<Node> m_owner;
 };
 
 DEFINE_TYPE_CASTS(EmptyNodeList, NodeList, nodeList, nodeList->isEmptyNodeList(), nodeList.isEmptyNodeList());
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // EmptyNodeList_h