| Index: third_party/WebKit/Source/core/html/CollectionIndexCache.h
|
| diff --git a/third_party/WebKit/Source/core/html/CollectionIndexCache.h b/third_party/WebKit/Source/core/html/CollectionIndexCache.h
|
| index 44b9c44c339e86228dda7da1b7eb3d5537344a5f..562d1be0ecfa2cd1a03e1bdfe344aa986bf7787a 100644
|
| --- a/third_party/WebKit/Source/core/html/CollectionIndexCache.h
|
| +++ b/third_party/WebKit/Source/core/html/CollectionIndexCache.h
|
| @@ -155,7 +155,8 @@ CollectionIndexCache<Collection, NodeType>::nodeBeforeCachedNode(
|
| unsigned currentIndex = cachedNodeIndex();
|
| DCHECK_GT(currentIndex, index);
|
|
|
| - // Determine if we should traverse from the beginning of the collection instead of the cached node.
|
| + // Determine if we should traverse from the beginning of the collection
|
| + // instead of the cached node.
|
| bool firstIsCloser = index < currentIndex - index;
|
| if (firstIsCloser || !collection.canTraverseBackward()) {
|
| NodeType* firstNode = collection.traverseToFirst();
|
| @@ -182,7 +183,8 @@ CollectionIndexCache<Collection, NodeType>::nodeAfterCachedNode(
|
| unsigned currentIndex = cachedNodeIndex();
|
| DCHECK_LT(currentIndex, index);
|
|
|
| - // Determine if we should traverse from the end of the collection instead of the cached node.
|
| + // Determine if we should traverse from the end of the collection instead of
|
| + // the cached node.
|
| bool lastIsCloser = isCachedNodeCountValid() &&
|
| cachedNodeCount() - index < index - currentIndex;
|
| if (lastIsCloser && collection.canTraverseBackward()) {
|
|
|