#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; }
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