| Index: Source/core/rendering/svg/SVGPathData.cpp
|
| diff --git a/Source/core/rendering/svg/SVGPathData.cpp b/Source/core/rendering/svg/SVGPathData.cpp
|
| index b1cdda4bf62c5fdad868a04ffeadeb28aa383f95..adafc73821f44f5f37f115fe461c89ffe595e191 100644
|
| --- a/Source/core/rendering/svg/SVGPathData.cpp
|
| +++ b/Source/core/rendering/svg/SVGPathData.cpp
|
| @@ -72,32 +72,26 @@ static void updatePathFromPathElement(SVGElement* element, Path& path)
|
| buildPathFromByteStream(toSVGPathElement(element)->pathByteStream(), path);
|
| }
|
|
|
| -static void updatePathFromPolygonElement(SVGElement* element, Path& path)
|
| +static void updatePathFromPolylineElement(SVGElement* element, Path& path)
|
| {
|
| - SVGPointList& points = toSVGPolygonElement(element)->pointsCurrentValue();
|
| - if (points.isEmpty())
|
| + RefPtr<SVGPointList> points = toSVGPolyElement(element)->points()->currentValue();
|
| + if (points->isEmpty())
|
| return;
|
|
|
| - path.moveTo(points.first());
|
| -
|
| - unsigned size = points.size();
|
| - for (unsigned i = 1; i < size; ++i)
|
| - path.addLineTo(points.at(i));
|
| + SVGPointList::ConstIterator it = points->begin();
|
| + SVGPointList::ConstIterator itEnd = points->end();
|
| + ASSERT(it != itEnd);
|
| + path.moveTo(it->value());
|
| + ++it;
|
|
|
| - path.closeSubpath();
|
| + for (; it != itEnd; ++it)
|
| + path.addLineTo(it->value());
|
| }
|
|
|
| -static void updatePathFromPolylineElement(SVGElement* element, Path& path)
|
| +static void updatePathFromPolygonElement(SVGElement* element, Path& path)
|
| {
|
| - SVGPointList& points = toSVGPolylineElement(element)->pointsCurrentValue();
|
| - if (points.isEmpty())
|
| - return;
|
| -
|
| - path.moveTo(points.first());
|
| -
|
| - unsigned size = points.size();
|
| - for (unsigned i = 1; i < size; ++i)
|
| - path.addLineTo(points.at(i));
|
| + updatePathFromPolylineElement(element, path);
|
| + path.closeSubpath();
|
| }
|
|
|
| static void updatePathFromRectElement(SVGElement* element, Path& path)
|
|
|