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

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

Issue 1015083003: Only update SVGPathParser::m_controlPoint when doing NormalizedParsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathParser.cpp
diff --git a/Source/core/svg/SVGPathParser.cpp b/Source/core/svg/SVGPathParser.cpp
index 26bae8496138974fb4869310854c87ec66c0396a..8ee90d91a8e1425c1823deac439565803aa82102 100644
--- a/Source/core/svg/SVGPathParser.cpp
+++ b/Source/core/svg/SVGPathParser.cpp
@@ -153,16 +153,16 @@ bool SVGPathParser::parseCurveToCubicSmoothSegment()
if (!m_source->parseCurveToCubicSmoothSegment(point2, targetPoint))
return false;
+ if (m_pathParsingMode == UnalteredParsing) {
+ m_consumer->curveToCubicSmooth(point2, targetPoint, m_mode);
+ return true;
+ }
if (m_lastCommand != PathSegCurveToCubicAbs
&& m_lastCommand != PathSegCurveToCubicRel
&& m_lastCommand != PathSegCurveToCubicSmoothAbs
&& m_lastCommand != PathSegCurveToCubicSmoothRel)
m_controlPoint = m_currentPoint;
- if (m_pathParsingMode == UnalteredParsing) {
- m_consumer->curveToCubicSmooth(point2, targetPoint, m_mode);
- return true;
- }
FloatPoint point1 = m_currentPoint;
point1.scale(2, 2);
point1.move(-m_controlPoint.x(), -m_controlPoint.y());
@@ -215,16 +215,16 @@ bool SVGPathParser::parseCurveToQuadraticSmoothSegment()
if (!m_source->parseCurveToQuadraticSmoothSegment(targetPoint))
return false;
+ if (m_pathParsingMode == UnalteredParsing) {
+ m_consumer->curveToQuadraticSmooth(targetPoint, m_mode);
+ return true;
+ }
if (m_lastCommand != PathSegCurveToQuadraticAbs
&& m_lastCommand != PathSegCurveToQuadraticRel
&& m_lastCommand != PathSegCurveToQuadraticSmoothAbs
&& m_lastCommand != PathSegCurveToQuadraticSmoothRel)
m_controlPoint = m_currentPoint;
- if (m_pathParsingMode == UnalteredParsing) {
- m_consumer->curveToQuadraticSmooth(targetPoint, m_mode);
- return true;
- }
FloatPoint cubicPoint = m_currentPoint;
cubicPoint.scale(2, 2);
cubicPoint.move(-m_controlPoint.x(), -m_controlPoint.y());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698