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

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

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master 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/TouchDisambiguation.cpp ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderNamedFlowThread.cpp
diff --git a/Source/core/rendering/RenderNamedFlowThread.cpp b/Source/core/rendering/RenderNamedFlowThread.cpp
index 9051dc5e6a0e42d83e3708415b7933a9db3800fc..6d765277225907f900ef1279d53b8022de3f34bf 100644
--- a/Source/core/rendering/RenderNamedFlowThread.cpp
+++ b/Source/core/rendering/RenderNamedFlowThread.cpp
@@ -568,13 +568,12 @@ static bool boxIntersectsRegion(LayoutUnit logicalTopForBox, LayoutUnit logicalB
}
// Retrieve the next node to be visited while computing the ranges inside a region.
-static Node* nextNodeInsideContentNode(const Node* currNode, const Node* contentNode)
+static Node* nextNodeInsideContentNode(const Node& currNode, const Node* contentNode)
{
- ASSERT(currNode);
ASSERT(contentNode && contentNode->inNamedFlow());
- if (currNode->renderer() && currNode->renderer()->isSVGRoot())
- return NodeTraversal::nextSkippingChildren(currNode, contentNode);
+ if (currNode.renderer() && currNode.renderer()->isSVGRoot())
+ return NodeTraversal::nextSkippingChildren(&currNode, contentNode);
return NodeTraversal::next(currNode, contentNode);
}
@@ -615,7 +614,7 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
bool skipOverOutsideNodes = false;
Node* lastEndNode = 0;
- for (Node* node = contentNode; node; node = nextNodeInsideContentNode(node, contentNode)) {
+ for (Node* node = contentNode; node; node = nextNodeInsideContentNode(*node, contentNode)) {
RenderObject* renderer = node->renderer();
if (!renderer)
continue;
« no previous file with comments | « Source/core/page/TouchDisambiguation.cpp ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698