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

Side by Side Diff: Source/core/svg/SVGPathParser.cpp

Issue 380213002: An empty SVG path string is not in error (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TestExpectations. Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/dom/script-tests/path-parser.js ('k') | Source/core/svg/SVGPathUtilities.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2002, 2003 The Karbon Developers 2 * Copyright (C) 2002, 2003 The Karbon Developers
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 m_pathParsingMode = pathParsingMode; 289 m_pathParsingMode = pathParsingMode;
290 290
291 m_controlPoint = FloatPoint(); 291 m_controlPoint = FloatPoint();
292 m_currentPoint = FloatPoint(); 292 m_currentPoint = FloatPoint();
293 m_subPathPoint = FloatPoint(); 293 m_subPathPoint = FloatPoint();
294 m_closePath = true; 294 m_closePath = true;
295 295
296 // Skip any leading spaces. 296 // Skip any leading spaces.
297 if (!m_source->moveToNextToken()) 297 if (!m_source->moveToNextToken())
298 return false; 298 return true;
299 299
300 SVGPathSegType command; 300 SVGPathSegType command;
301 m_source->parseSVGSegmentType(command); 301 m_source->parseSVGSegmentType(command);
302 m_lastCommand = PathSegUnknown; 302 m_lastCommand = PathSegUnknown;
303 303
304 // Path must start with moveto. 304 // Path must start with moveto.
305 if (checkForInitialMoveTo && command != PathSegMoveToAbs && command != PathS egMoveToRel) 305 if (checkForInitialMoveTo && command != PathSegMoveToAbs && command != PathS egMoveToRel)
306 return false; 306 return false;
307 307
308 while (true) { 308 while (true) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 point2 = targetPoint; 486 point2 = targetPoint;
487 point2.move(t * sinEndTheta, -t * cosEndTheta); 487 point2.move(t * sinEndTheta, -t * cosEndTheta);
488 488
489 m_consumer->curveToCubic(pointTransform.mapPoint(point1), pointTransform .mapPoint(point2), 489 m_consumer->curveToCubic(pointTransform.mapPoint(point1), pointTransform .mapPoint(point2),
490 pointTransform.mapPoint(targetPoint), AbsoluteC oordinates); 490 pointTransform.mapPoint(targetPoint), AbsoluteC oordinates);
491 } 491 }
492 return true; 492 return true;
493 } 493 }
494 494
495 } 495 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/dom/script-tests/path-parser.js ('k') | Source/core/svg/SVGPathUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698