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

Unified Diff: Source/core/rendering/RenderListItem.cpp

Issue 68523014: Update remaining NodeTraversal / ElementTraversal methods to take references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix build Created 7 years, 1 month 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/rendering/RenderCounter.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderListItem.cpp
diff --git a/Source/core/rendering/RenderListItem.cpp b/Source/core/rendering/RenderListItem.cpp
index 0fe2c4fbb266b2cdfa5143607dfb767cb5378763..0d648c6a0c34606e418fe77ca69807d21b1bd73c 100644
--- a/Source/core/rendering/RenderListItem.cpp
+++ b/Source/core/rendering/RenderListItem.cpp
@@ -126,12 +126,13 @@ static RenderListItem* nextListItem(const Node* listNode, const RenderListItem*
return 0;
const Node* current = item ? item->node() : listNode;
- current = ElementTraversal::nextIncludingPseudo(current, listNode);
+ ASSERT(current);
+ current = ElementTraversal::nextIncludingPseudo(*current, listNode);
while (current) {
if (isList(current)) {
// We've found a nested, independent list: nothing to do here.
- current = ElementTraversal::nextIncludingPseudoSkippingChildren(current, listNode);
+ current = ElementTraversal::nextIncludingPseudoSkippingChildren(*current, listNode);
continue;
}
@@ -140,7 +141,7 @@ static RenderListItem* nextListItem(const Node* listNode, const RenderListItem*
return toRenderListItem(renderer);
// FIXME: Can this be optimized to skip the children of the elements without a renderer?
- current = ElementTraversal::nextIncludingPseudo(current, listNode);
+ current = ElementTraversal::nextIncludingPseudo(*current, listNode);
}
return 0;
@@ -164,7 +165,7 @@ static RenderListItem* previousListItem(const Node* listNode, const RenderListIt
// be a list item itself. We need to examine it, so we do this to counteract
// the previousIncludingPseudo() that will be done by the loop.
if (otherList)
- current = ElementTraversal::nextIncludingPseudo(otherList);
+ current = ElementTraversal::nextIncludingPseudo(*otherList);
}
return 0;
}
« no previous file with comments | « Source/core/rendering/RenderCounter.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698