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

Unified Diff: Source/core/svg/SVGSVGElement.cpp

Issue 191963002: Use new Traversal<SVG*Element> API more in SVG code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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/svg/SVGPolyElement.h ('k') | Source/core/svg/SVGTextContentElement.h » ('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 4f4716877a2823784bd0a692ca006ffa649d95f5..5be8b3959de2f1e5ecbdefa92f1332f58b58d4c8 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -72,7 +72,7 @@ inline SVGSVGElement::SVGSVGElement(Document& doc)
, m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::create(LengthModeWidth)))
, m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::create(LengthModeHeight)))
, m_useCurrentView(false)
- , m_timeContainer(SMILTimeContainer::create(this))
+ , m_timeContainer(SMILTimeContainer::create(*this))
, m_translation(SVGPoint::create())
{
ScriptWrappable::init(this);
@@ -389,14 +389,9 @@ PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const Flo
}
}
- for (Element* element = ElementTraversal::firstWithin(*root); element;
- element = ElementTraversal::next(*element, root)) {
-
- if (!WebCore::isSVGGraphicsElement(*element))
- continue;
-
- SVGElement* svgElement = toSVGElement(element);
- if (checkIntersectionOrEnclosure(*svgElement, rect, mode))
+ for (SVGGraphicsElement* element = Traversal<SVGGraphicsElement>::firstWithin(*root); element;
+ element = Traversal<SVGGraphicsElement>::next(*element, root)) {
+ if (checkIntersectionOrEnclosure(*element, rect, mode))
nodes.append(element);
}
« no previous file with comments | « Source/core/svg/SVGPolyElement.h ('k') | Source/core/svg/SVGTextContentElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698