summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGPathElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGPathElement.cpp')
-rw-r--r--WebCore/svg/SVGPathElement.cpp46
1 files changed, 25 insertions, 21 deletions
diff --git a/WebCore/svg/SVGPathElement.cpp b/WebCore/svg/SVGPathElement.cpp
index 803ce14..2adc05f 100644
--- a/WebCore/svg/SVGPathElement.cpp
+++ b/WebCore/svg/SVGPathElement.cpp
@@ -1,22 +1,22 @@
/*
- Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
+ * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
+ * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
#include "config.h"
@@ -27,6 +27,7 @@
#include "RenderPath.h"
#include "RenderSVGResource.h"
#include "SVGNames.h"
+#include "SVGPathParserFactory.h"
#include "SVGPathSegArc.h"
#include "SVGPathSegClosePath.h"
#include "SVGPathSegCurvetoCubic.h"
@@ -173,8 +174,8 @@ void SVGPathElement::parseMappedAttribute(Attribute* attr)
if (attr->name() == SVGNames::dAttr) {
ExceptionCode ec;
pathSegList()->clear(ec);
- SVGPathSegListBuilder parser(pathSegList());
- if (!parser.build(attr->value(), NormalizedParsing))
+ SVGPathParserFactory* factory = SVGPathParserFactory::self();
+ if (!factory->buildSVGPathSegListFromString(attr->value(), pathSegList(), NormalizedParsing))
document()->accessSVGExtensions()->reportError("Problem parsing d=\"" + attr->value() + "\"");
} else if (attr->name() == SVGNames::pathLengthAttr) {
setPathLengthBaseValue(attr->value().toFloat());
@@ -262,7 +263,10 @@ SVGPathSegList* SVGPathElement::animatedNormalizedPathSegList() const
Path SVGPathElement::toPathData() const
{
- return pathSegList()->toPathData();
+ Path result;
+ SVGPathParserFactory* factory = SVGPathParserFactory::self();
+ factory->buildPathFromSVGPathSegList(pathSegList(), result);
+ return result;
}
}