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

Unified Diff: Source/core/html/HTMLCollection.h

Issue 229213002: Make HTMLCollection / NodeList backward traversal consistent with forward one (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
Index: Source/core/html/HTMLCollection.h
diff --git a/Source/core/html/HTMLCollection.h b/Source/core/html/HTMLCollection.h
index 60b3674f848c4725294ce554e195fa9289ac9450..16b57382f8e5be98a31994a0ccd104b91dfb8436 100644
--- a/Source/core/html/HTMLCollection.h
+++ b/Source/core/html/HTMLCollection.h
@@ -58,9 +58,10 @@ public:
// CollectionIndexCache API.
bool canTraverseBackward() const { return !overridesItemAfter(); }
- Element* itemBefore(const Element* previousItem) const;
Element* traverseToFirstElement() const;
+ Element* traverseToLastElement() const;
Element* traverseForwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset) const;
+ Element* traverseBackwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset) const;
protected:
HTMLCollection(ContainerNode& base, CollectionType, ItemAfterOverrideType);

Powered by Google App Engine
This is Rietveld 408576698