| Index: third_party/WebKit/Source/core/svg/SVGGradientElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGGradientElement.cpp b/third_party/WebKit/Source/core/svg/SVGGradientElement.cpp
|
| index c91eac607f58feb062cc4fd0c08b3f66b3f08afb..30eaaaa17ce3fb3d6585d30007a7955527a63414 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGGradientElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGGradientElement.cpp
|
| @@ -96,15 +96,14 @@ Vector<Gradient::ColorStop> SVGGradientElement::buildStops()
|
| Vector<Gradient::ColorStop> stops;
|
|
|
| float previousOffset = 0.0f;
|
| - for (SVGStopElement* stop = Traversal<SVGStopElement>::firstChild(*this); stop; stop = Traversal<SVGStopElement>::nextSibling(*stop)) {
|
| - // Figure out right monotonic offset
|
| - float offset = stop->offset()->currentValue()->value();
|
| + for (const SVGStopElement& stop : Traversal<SVGStopElement>::childrenOf(*this)) {
|
| + // Figure out right monotonic offset.
|
| + float offset = stop.offset()->currentValue()->value();
|
| offset = std::min(std::max(previousOffset, offset), 1.0f);
|
| previousOffset = offset;
|
|
|
| - stops.append(Gradient::ColorStop(offset, stop->stopColorIncludingOpacity()));
|
| + stops.append(Gradient::ColorStop(offset, stop.stopColorIncludingOpacity()));
|
| }
|
| -
|
| return stops;
|
| }
|
|
|
|
|