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

Unified Diff: Source/core/svg/SVGSVGElement.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/rendering/RenderNamedFlowThread.cpp ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index 0d4005572d50d263725c27aa3227d3e2d4510f44..7a9e9b955018d9b346d483d0444d2ecf1bcafc8a 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -336,7 +336,7 @@ void SVGSVGElement::forceRedraw()
PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const SVGRect& rect, SVGElement* referenceElement, CollectIntersectionOrEnclosure collect) const
{
Vector<RefPtr<Node> > nodes;
- Element* element = ElementTraversal::next(referenceElement ? referenceElement : this);
+ Element* element = ElementTraversal::next(*(referenceElement ? referenceElement : this));
while (element) {
if (element->isSVGElement()) {
SVGElement* svgElement = toSVGElement(element);
@@ -349,7 +349,7 @@ PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const SVG
}
}
- element = ElementTraversal::next(element, referenceElement ? referenceElement : this);
+ element = ElementTraversal::next(*element, referenceElement ? referenceElement : this);
}
return StaticNodeList::adopt(nodes);
}
@@ -774,7 +774,7 @@ Element* SVGSVGElement::getElementById(const AtomicString& id) const
// Fall back to traversing our subtree. Duplicate ids are allowed, the first found will
// be returned.
- for (Node* node = firstChild(); node; node = NodeTraversal::next(node, this)) {
+ for (Node* node = firstChild(); node; node = NodeTraversal::next(*node, this)) {
if (!node->isElementNode())
continue;
« no previous file with comments | « Source/core/rendering/RenderNamedFlowThread.cpp ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698