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

Unified Diff: Source/core/dom/ElementTraversal.h

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 | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ElementTraversal.h
diff --git a/Source/core/dom/ElementTraversal.h b/Source/core/dom/ElementTraversal.h
index f3307d98e76488d2768967549dc3d4a3c6425831..274725d57eeb8d0e535fa17ccb0b46e20d2aa798 100644
--- a/Source/core/dom/ElementTraversal.h
+++ b/Source/core/dom/ElementTraversal.h
@@ -50,8 +50,8 @@ Element* nextSkippingChildren(const ContainerNode&, const Node* stayWithin);
// Pre-order traversal including the pseudo-elements.
Element* previousIncludingPseudo(const Node&, const Node* stayWithin = 0);
-Element* nextIncludingPseudo(const Node*, const Node* stayWithin = 0);
-Element* nextIncludingPseudoSkippingChildren(const Node*, const Node* stayWithin = 0);
+Element* nextIncludingPseudo(const Node&, const Node* stayWithin = 0);
+Element* nextIncludingPseudoSkippingChildren(const Node&, const Node* stayWithin = 0);
// Utility function to traverse only the element and pseudo-element siblings of a node.
Element* pseudoAwarePreviousSibling(const Node&);
@@ -120,19 +120,19 @@ inline Element* previousIncludingPseudo(const Node& current, const Node* stayWit
return toElement(node);
}
-inline Element* nextIncludingPseudo(const Node* current, const Node* stayWithin)
+inline Element* nextIncludingPseudo(const Node& current, const Node* stayWithin)
{
Node* node = NodeTraversal::nextIncludingPseudo(current, stayWithin);
while (node && !node->isElementNode())
- node = NodeTraversal::nextIncludingPseudo(node, stayWithin);
+ node = NodeTraversal::nextIncludingPseudo(*node, stayWithin);
return toElement(node);
}
-inline Element* nextIncludingPseudoSkippingChildren(const Node* current, const Node* stayWithin)
+inline Element* nextIncludingPseudoSkippingChildren(const Node& current, const Node* stayWithin)
{
Node* node = NodeTraversal::nextIncludingPseudoSkippingChildren(current, stayWithin);
while (node && !node->isElementNode())
- node = NodeTraversal::nextIncludingPseudoSkippingChildren(node, stayWithin);
+ node = NodeTraversal::nextIncludingPseudoSkippingChildren(*node, stayWithin);
return toElement(node);
}
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698