| Index: Source/core/dom/LiveNodeListBase.h
|
| diff --git a/Source/core/dom/LiveNodeList.h b/Source/core/dom/LiveNodeListBase.h
|
| similarity index 76%
|
| copy from Source/core/dom/LiveNodeList.h
|
| copy to Source/core/dom/LiveNodeListBase.h
|
| index 422e6bcc1da1606f86debac787270b7669315c3c..098d8ddfcce190a3990ec3465e337ff0c38c3ca4 100644
|
| --- a/Source/core/dom/LiveNodeList.h
|
| +++ b/Source/core/dom/LiveNodeListBase.h
|
| @@ -3,6 +3,7 @@
|
| * (C) 1999 Antti Koivisto (koivisto@kde.org)
|
| * (C) 2001 Dirk Mueller (mueller@kde.org)
|
| * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
|
| + * Copyright (C) 2014 Samsung Electronics. All rights reserved.
|
| *
|
| * This library is free software; you can redistribute it and/or
|
| * modify it under the terms of the GNU Library General Public
|
| @@ -21,21 +22,15 @@
|
| *
|
| */
|
|
|
| -#ifndef LiveNodeList_h
|
| -#define LiveNodeList_h
|
| +#ifndef LiveNodeListBase_h
|
| +#define LiveNodeListBase_h
|
|
|
| #include "HTMLNames.h"
|
| #include "core/dom/Document.h"
|
| -#include "core/dom/NodeList.h"
|
| -#include "core/html/CollectionIndexCache.h"
|
| #include "core/html/CollectionType.h"
|
| -#include "wtf/Forward.h"
|
| -#include "wtf/RefPtr.h"
|
|
|
| namespace WebCore {
|
|
|
| -class Element;
|
| -
|
| enum NodeListRootType {
|
| NodeListIsRootedAtNode,
|
| NodeListIsRootedAtDocument,
|
| @@ -126,32 +121,6 @@ ALWAYS_INLINE bool LiveNodeListBase::shouldInvalidateTypeOnAttributeChange(NodeL
|
| return false;
|
| }
|
|
|
| -class LiveNodeList : public NodeList, public LiveNodeListBase {
|
| -public:
|
| - LiveNodeList(PassRefPtr<ContainerNode> ownerNode, CollectionType collectionType, NodeListInvalidationType invalidationType, NodeListRootType rootType = NodeListIsRootedAtNode)
|
| - : LiveNodeListBase(ownerNode.get(), rootType, invalidationType,
|
| - collectionType)
|
| - { }
|
| -
|
| - virtual unsigned length() const OVERRIDE FINAL { return m_collectionIndexCache.nodeCount(*this); }
|
| - virtual Node* item(unsigned offset) const OVERRIDE FINAL { return m_collectionIndexCache.nodeAt(*this, offset); }
|
| - virtual bool nodeMatches(const Element&) const = 0;
|
| -
|
| - virtual void invalidateCache(Document* oldDocument) const OVERRIDE FINAL;
|
| - bool shouldOnlyIncludeDirectChildren() const { return false; }
|
| -
|
| - // Collection IndexCache API.
|
| - bool canTraverseBackward() const { return true; }
|
| - Element* itemBefore(const Element* previousItem) const;
|
| - Element* traverseToFirstElement(const ContainerNode& root) const;
|
| - Element* traverseForwardToOffset(unsigned offset, Element& currentNode, unsigned& currentOffset, const ContainerNode& root) const;
|
| -
|
| -private:
|
| - virtual Node* virtualOwnerNode() const OVERRIDE FINAL;
|
| -
|
| - mutable CollectionIndexCache<LiveNodeList, Element> m_collectionIndexCache;
|
| -};
|
| -
|
| } // namespace WebCore
|
|
|
| -#endif // LiveNodeList_h
|
| +#endif // LiveNodeListBase_h
|
|
|