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

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

Issue 29873003: Have LiveNodeList::rootNode() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 else if (hasIdNameCache() && (*attrName == HTMLNames::idAttr || *attrNam e == HTMLNames::nameAttr)) 93 else if (hasIdNameCache() && (*attrName == HTMLNames::idAttr || *attrNam e == HTMLNames::nameAttr))
94 invalidateIdNameCacheMaps(); 94 invalidateIdNameCacheMaps();
95 } 95 }
96 void invalidateCache() const; 96 void invalidateCache() const;
97 void invalidateIdNameCacheMaps() const; 97 void invalidateIdNameCacheMaps() const;
98 98
99 static bool shouldInvalidateTypeOnAttributeChange(NodeListInvalidationType, const QualifiedName&); 99 static bool shouldInvalidateTypeOnAttributeChange(NodeListInvalidationType, const QualifiedName&);
100 100
101 protected: 101 protected:
102 Document& document() const { return m_ownerNode->document(); } 102 Document& document() const { return m_ownerNode->document(); }
103 Node* rootNode() const; 103 Node& rootNode() const;
104 ContainerNode* rootContainerNode() const; 104 ContainerNode* rootContainerNode() const;
105 bool overridesItemAfter() const { return m_overridesItemAfter; } 105 bool overridesItemAfter() const { return m_overridesItemAfter; }
106 106
107 ALWAYS_INLINE bool isItemCacheValid() const { return m_isItemCacheValid; } 107 ALWAYS_INLINE bool isItemCacheValid() const { return m_isItemCacheValid; }
108 ALWAYS_INLINE Node* cachedItem() const { return m_cachedItem; } 108 ALWAYS_INLINE Node* cachedItem() const { return m_cachedItem; }
109 ALWAYS_INLINE unsigned cachedItemOffset() const { return m_cachedItemOffset; } 109 ALWAYS_INLINE unsigned cachedItemOffset() const { return m_cachedItemOffset; }
110 110
111 ALWAYS_INLINE bool isLengthCacheValid() const { return m_isLengthCacheValid; } 111 ALWAYS_INLINE bool isLengthCacheValid() const { return m_isLengthCacheValid; }
112 ALWAYS_INLINE unsigned cachedLength() const { return m_cachedLength; } 112 ALWAYS_INLINE unsigned cachedLength() const { return m_cachedLength; }
113 ALWAYS_INLINE void setLengthCache(unsigned length) const 113 ALWAYS_INLINE void setLengthCache(unsigned length) const
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 virtual Node* namedItem(const AtomicString&) const OVERRIDE; 196 virtual Node* namedItem(const AtomicString&) const OVERRIDE;
197 virtual bool nodeMatches(Element*) const = 0; 197 virtual bool nodeMatches(Element*) const = 0;
198 198
199 private: 199 private:
200 virtual bool isLiveNodeList() const OVERRIDE { return true; } 200 virtual bool isLiveNodeList() const OVERRIDE { return true; }
201 }; 201 };
202 202
203 } // namespace WebCore 203 } // namespace WebCore
204 204
205 #endif // LiveNodeList_h 205 #endif // LiveNodeList_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/LiveNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698