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); |
} |