X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=WebCore%2Fsvg%2FSVGPolygonElement.cpp;h=3439a78cf1889353cc24dc1abbb3b6912262cfd2;hb=28040489d744e0c5d475a88663056c9040ed5320;hp=38f5bce4575b493c44b5b0851afb682912a50d20;hpb=eff9be92c41913c92fb1d3b7983c071f3e718678;p=android-x86%2Fexternal-webkit.git diff --git a/WebCore/svg/SVGPolygonElement.cpp b/WebCore/svg/SVGPolygonElement.cpp index 38f5bce45..3439a78cf 100644 --- a/WebCore/svg/SVGPolygonElement.cpp +++ b/WebCore/svg/SVGPolygonElement.cpp @@ -23,8 +23,6 @@ #if ENABLE(SVG) #include "SVGPolygonElement.h" -#include "SVGPointList.h" - namespace WebCore { inline SVGPolygonElement::SVGPolygonElement(const QualifiedName& tagName, Document* document) @@ -41,15 +39,15 @@ void SVGPolygonElement::toPathData(Path& path) const { ASSERT(path.isEmpty()); - int len = points()->numberOfItems(); - if (len < 1) + SVGPointList& points = pointList(); + if (points.isEmpty()) return; - - ExceptionCode ec = 0; - path.moveTo(points()->getItem(0, ec)); - for (int i = 1; i < len; ++i) - path.addLineTo(points()->getItem(i, ec)); + path.moveTo(points.first()); + + unsigned size = points.size(); + for (unsigned i = 1; i < size; ++i) + path.addLineTo(points.at(i)); path.closeSubpath(); }