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 |