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

Unified Diff: Source/core/dom/LiveNodeList.h

Issue 136833002: Remove redundant m_isItemCacheValid flag from LiveNodeListBase (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No change Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/LiveNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LiveNodeList.h
diff --git a/Source/core/dom/LiveNodeList.h b/Source/core/dom/LiveNodeList.h
index cd1f9d1065d0f041dd93d97b9a98d483e19cb5c8..bd4302f90f2c91dacb592fb817ac098140ba9703 100644
--- a/Source/core/dom/LiveNodeList.h
+++ b/Source/core/dom/LiveNodeList.h
@@ -53,7 +53,6 @@ public:
: m_ownerNode(ownerNode)
, m_cachedItem(0)
, m_isLengthCacheValid(false)
- , m_isItemCacheValid(false)
, m_rootType(rootType)
, m_invalidationType(invalidationType)
, m_shouldOnlyIncludeDirectChildren(shouldOnlyIncludeDirectChildren)
@@ -100,9 +99,8 @@ protected:
ContainerNode* rootContainerNode() const;
bool overridesItemAfter() const { return m_overridesItemAfter; }
- ALWAYS_INLINE bool isItemCacheValid() const { return m_isItemCacheValid; }
ALWAYS_INLINE Node* cachedItem() const { return m_cachedItem; }
- ALWAYS_INLINE unsigned cachedItemOffset() const { return m_cachedItemOffset; }
+ ALWAYS_INLINE unsigned cachedItemOffset() const { ASSERT(cachedItem()); return m_cachedItemOffset; }
ALWAYS_INLINE bool isLengthCacheValid() const { return m_isLengthCacheValid; }
ALWAYS_INLINE unsigned cachedLength() const { return m_cachedLength; }
@@ -116,7 +114,6 @@ protected:
ASSERT(item);
m_cachedItem = item;
m_cachedItemOffset = offset;
- m_isItemCacheValid = true;
}
ALWAYS_INLINE NodeListRootType rootType() const { return static_cast<NodeListRootType>(m_rootType); }
@@ -135,7 +132,6 @@ private:
mutable unsigned m_cachedLength;
mutable unsigned m_cachedItemOffset;
mutable unsigned m_isLengthCacheValid : 1;
- mutable unsigned m_isItemCacheValid : 1;
const unsigned m_rootType : 2;
const unsigned m_invalidationType : 4;
const unsigned m_shouldOnlyIncludeDirectChildren : 1;
« 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