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

Unified Diff: Source/core/html/HTMLCollection.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 | « Source/core/dom/LiveNodeList.cpp ('k') | Source/core/html/HTMLCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCollection.h
diff --git a/Source/core/html/HTMLCollection.h b/Source/core/html/HTMLCollection.h
index ce6505a4fe04a16be3a6f583f792b511a2ccb29d..797b6ad70017ba5073da42903e75fe15860cfa14 100644
--- a/Source/core/html/HTMLCollection.h
+++ b/Source/core/html/HTMLCollection.h
@@ -46,16 +46,16 @@ public:
{
if (isLengthCacheValid())
return !cachedLength();
- if (isItemCacheValid())
- return !cachedItem();
+ if (cachedItem())
+ return false;
return !item(0);
}
bool hasExactlyOneItem() const
{
if (isLengthCacheValid())
return cachedLength() == 1;
- if (isItemCacheValid())
- return cachedItem() && !cachedItemOffset() && !item(1);
+ if (cachedItem())
+ return !cachedItemOffset() && !item(1);
return item(0) && !item(1);
}
« no previous file with comments | « Source/core/dom/LiveNodeList.cpp ('k') | Source/core/html/HTMLCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698