Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: Source/core/svg/SVGPathBuilder.cpp

Issue 1016023002: Move 'closePath' handling to the consumers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: closePath() Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGPathBuilder.h ('k') | Source/core/svg/SVGPathByteStreamBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathBuilder.cpp
diff --git a/Source/core/svg/SVGPathBuilder.cpp b/Source/core/svg/SVGPathBuilder.cpp
index f708c2f5196246f6e17e5b748e31487ef53fcb51..deef74a20b78575ac20adefb8f4365c793404e58 100644
--- a/Source/core/svg/SVGPathBuilder.cpp
+++ b/Source/core/svg/SVGPathBuilder.cpp
@@ -28,12 +28,13 @@
namespace blink {
-void SVGPathBuilder::moveTo(const FloatPoint& targetPoint, bool closed, PathCoordinateMode mode)
+void SVGPathBuilder::moveTo(const FloatPoint& targetPoint, PathCoordinateMode mode)
{
ASSERT(mode == AbsoluteCoordinates);
- if (closed && !m_path.isEmpty())
- m_path.closeSubpath();
+ if (m_closed && !m_path.isEmpty())
+ closePath();
m_path.moveTo(targetPoint);
+ m_closed = false;
}
void SVGPathBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateMode mode)
@@ -51,6 +52,7 @@ void SVGPathBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& po
void SVGPathBuilder::closePath()
{
m_path.closeSubpath();
+ m_closed = true;
}
}
« no previous file with comments | « Source/core/svg/SVGPathBuilder.h ('k') | Source/core/svg/SVGPathByteStreamBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698