Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: Source/core/dom/LiveNodeList.h

Issue 144313014: Remove NodeList's anonymous named getter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another clang build fix Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/EmptyNodeList.h ('k') | Source/core/dom/LiveNodeList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 class LiveNodeList : public NodeList, public LiveNodeListBase { 142 class LiveNodeList : public NodeList, public LiveNodeListBase {
143 public: 143 public:
144 LiveNodeList(PassRefPtr<ContainerNode> ownerNode, CollectionType collectionT ype, NodeListInvalidationType invalidationType, NodeListRootType rootType = Node ListIsRootedAtNode) 144 LiveNodeList(PassRefPtr<ContainerNode> ownerNode, CollectionType collectionT ype, NodeListInvalidationType invalidationType, NodeListRootType rootType = Node ListIsRootedAtNode)
145 : LiveNodeListBase(ownerNode.get(), rootType, invalidationType, collecti onType == ChildNodeListType, 145 : LiveNodeListBase(ownerNode.get(), rootType, invalidationType, collecti onType == ChildNodeListType,
146 collectionType, DoesNotOverrideItemAfter) 146 collectionType, DoesNotOverrideItemAfter)
147 { } 147 { }
148 148
149 virtual unsigned length() const OVERRIDE FINAL { return m_collectionIndexCac he.nodeCount(*this); } 149 virtual unsigned length() const OVERRIDE FINAL { return m_collectionIndexCac he.nodeCount(*this); }
150 virtual Node* item(unsigned offset) const OVERRIDE FINAL { return m_collecti onIndexCache.nodeAt(*this, offset); } 150 virtual Node* item(unsigned offset) const OVERRIDE FINAL { return m_collecti onIndexCache.nodeAt(*this, offset); }
151 virtual Node* namedItem(const AtomicString&) const OVERRIDE FINAL;
152 virtual bool nodeMatches(const Element&) const = 0; 151 virtual bool nodeMatches(const Element&) const = 0;
153 // Avoid ambiguity since both NodeList and LiveNodeListBase have an ownerNod e() method. 152 // Avoid ambiguity since both NodeList and LiveNodeListBase have an ownerNod e() method.
154 using LiveNodeListBase::ownerNode; 153 using LiveNodeListBase::ownerNode;
155 154
156 virtual void invalidateCache() const OVERRIDE FINAL; 155 virtual void invalidateCache() const OVERRIDE FINAL;
157 156
158 // Collection IndexCache API. 157 // Collection IndexCache API.
159 Node* traverseToFirstElement(const ContainerNode& root) const; 158 Node* traverseToFirstElement(const ContainerNode& root) const;
160 Node* traverseForwardToOffset(unsigned offset, Node& currentNode, unsigned& currentOffset, const ContainerNode& root) const; 159 Node* traverseForwardToOffset(unsigned offset, Node& currentNode, unsigned& currentOffset, const ContainerNode& root) const;
161 160
162 private: 161 private:
163 virtual bool isLiveNodeList() const OVERRIDE FINAL { return true; } 162 virtual bool isLiveNodeList() const OVERRIDE FINAL { return true; }
164 163
165 mutable CollectionIndexCache<LiveNodeList> m_collectionIndexCache; 164 mutable CollectionIndexCache<LiveNodeList> m_collectionIndexCache;
166 }; 165 };
167 166
168 } // namespace WebCore 167 } // namespace WebCore
169 168
170 #endif // LiveNodeList_h 169 #endif // LiveNodeList_h
OLDNEW
« no previous file with comments | « Source/core/dom/EmptyNodeList.h ('k') | Source/core/dom/LiveNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698