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

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

Issue 1646543004: Refactor away SVGPathSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use namespace Created 4 years, 11 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
Index: third_party/WebKit/Source/core/svg/SVGPathParser.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathParser.cpp b/third_party/WebKit/Source/core/svg/SVGPathParser.cpp
index 7a1b5c3b6662fb33a228ef02a60fa209fe1386f7..d9e3835e27b411b25bb40b07d28b8f6b3d88673c 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathParser.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathParser.cpp
@@ -24,35 +24,11 @@
#include "core/svg/SVGPathParser.h"
#include "core/svg/SVGPathConsumer.h"
-#include "core/svg/SVGPathSource.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/MathExtras.h"
namespace blink {
-bool SVGPathParser::initialCommandIsMoveTo()
-{
- // If the path is empty it is still valid, so return true.
- if (!m_source->hasMoreData())
- return true;
-
- SVGPathSegType command = m_source->peekSegmentType();
- // Path must start with moveTo.
- return command == PathSegMoveToAbs || command == PathSegMoveToRel;
-}
-
-bool SVGPathParser::parsePath()
-{
- while (m_source->hasMoreData()) {
- PathSegmentData segment = m_source->parseSegment();
- if (segment.command == PathSegUnknown)
- return false;
-
- m_consumer->emitSegment(segment);
- }
- return true;
-}
-
static FloatPoint reflectedPoint(const FloatPoint& reflectIn, const FloatPoint& pointToReflect)
{
return FloatPoint(2 * reflectIn.x() - pointToReflect.x(), 2 * reflectIn.y() - pointToReflect.y());
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathParser.h ('k') | third_party/WebKit/Source/core/svg/SVGPathParserTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698