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

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

Issue 69003004: Have NodeTraversal::previous*() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/page/FocusController.cpp ('k') | Source/core/rendering/RenderListItem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderCounter.cpp
diff --git a/Source/core/rendering/RenderCounter.cpp b/Source/core/rendering/RenderCounter.cpp
index 6b4f959c2065ece07b47751a91447aedfd99ceae..8880e82d2b5b76bc58c12ca1426eccba353384cb 100644
--- a/Source/core/rendering/RenderCounter.cpp
+++ b/Source/core/rendering/RenderCounter.cpp
@@ -58,9 +58,10 @@ static CounterMaps& counterMaps()
static RenderObject* previousInPreOrder(const RenderObject* object)
{
Element* self = toElement(object->node());
- Element* previous = ElementTraversal::previousIncludingPseudo(self);
+ ASSERT(self);
+ Element* previous = ElementTraversal::previousIncludingPseudo(*self);
while (previous && !previous->renderer())
- previous = ElementTraversal::previousIncludingPseudo(previous);
+ previous = ElementTraversal::previousIncludingPseudo(*previous);
return previous ? previous->renderer() : 0;
}
@@ -69,9 +70,10 @@ static RenderObject* previousInPreOrder(const RenderObject* object)
static RenderObject* previousSiblingOrParent(const RenderObject* object)
{
Element* self = toElement(object->node());
- Element* previous = ElementTraversal::pseudoAwarePreviousSibling(self);
+ ASSERT(self);
+ Element* previous = ElementTraversal::pseudoAwarePreviousSibling(*self);
while (previous && !previous->renderer())
- previous = ElementTraversal::pseudoAwarePreviousSibling(previous);
+ previous = ElementTraversal::pseudoAwarePreviousSibling(*previous);
if (previous)
return previous->renderer();
previous = self->parentElement();
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | Source/core/rendering/RenderListItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698