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

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

Issue 192103002: Drop SVGElement::isGradientStop() virtual function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use Traversal<> API 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/SVGElement.h ('k') | Source/core/svg/SVGStopElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGGradientElement.cpp
diff --git a/Source/core/svg/SVGGradientElement.cpp b/Source/core/svg/SVGGradientElement.cpp
index 0b9039059ddb8e9c8dc6eab2169a1e00ec8fa38f..eea0849fbf32baeae45f8bb46906d9031938faf0 100644
--- a/Source/core/svg/SVGGradientElement.cpp
+++ b/Source/core/svg/SVGGradientElement.cpp
@@ -124,12 +124,7 @@ Vector<Gradient::ColorStop> SVGGradientElement::buildStops()
Vector<Gradient::ColorStop> stops;
float previousOffset = 0.0f;
- for (Node* n = firstChild(); n; n = n->nextSibling()) {
- SVGElement* element = n->isSVGElement() ? toSVGElement(n) : 0;
- if (!element || !element->isGradientStop())
- continue;
-
- SVGStopElement* stop = toSVGStopElement(element);
+ for (SVGStopElement* stop = Traversal<SVGStopElement>::firstChild(*this); stop; stop = Traversal<SVGStopElement>::nextSibling(*stop)) {
Color color = stop->stopColorIncludingOpacity();
// Figure out right monotonic offset
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGStopElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698