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

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

Issue 1045343002: Split normalized reading from non-normalized in SVGPathParser (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 | Source/core/svg/SVGPathParser.cpp » ('j') | Source/core/svg/SVGPathParser.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathParser.h
diff --git a/Source/core/svg/SVGPathParser.h b/Source/core/svg/SVGPathParser.h
index eb809f5279de0b5e08a77bdfaf804050eb20e10f..c62684e8a9c80f6e536ae6aed4a69ca525d526be 100644
--- a/Source/core/svg/SVGPathParser.h
+++ b/Source/core/svg/SVGPathParser.h
@@ -43,12 +43,23 @@ public:
ASSERT(m_consumer);
}
- bool parsePathDataFromSource(PathParsingMode, bool checkForInitialMoveTo = true);
+ bool parsePathDataFromSource(PathParsingMode pathParsingMode, bool checkForInitialMoveTo = true)
+ {
+ ASSERT(m_source);
+ ASSERT(m_consumer);
+ if (checkForInitialMoveTo && !initialCommandIsMoveTo())
+ return false;
+ if (pathParsingMode == NormalizedParsing)
+ return parseAndNormalizePath();
+ return parsePath();
+ }
DECLARE_TRACE();
private:
bool initialCommandIsMoveTo();
+ bool parsePath();
+ bool parseAndNormalizePath();
RawPtrWillBeMember<SVGPathSource> m_source;
RawPtrWillBeMember<SVGPathConsumer> m_consumer;
« no previous file with comments | « no previous file | Source/core/svg/SVGPathParser.cpp » ('j') | Source/core/svg/SVGPathParser.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698