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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPathStringSource.h

Issue 1642463004: Extended error reporting for SVG path parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "path flag" -> "arc flag" 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/SVGPathStringSource.h
diff --git a/third_party/WebKit/Source/core/svg/SVGPathStringSource.h b/third_party/WebKit/Source/core/svg/SVGPathStringSource.h
index e8916de33dfa14219608076c7708ed475550c246..5b55fd4cf5a8c116f33410438fb4d43b0cebe271 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathStringSource.h
+++ b/third_party/WebKit/Source/core/svg/SVGPathStringSource.h
@@ -22,6 +22,7 @@
#define SVGPathStringSource_h
#include "core/CoreExport.h"
+#include "core/svg/SVGParsingError.h"
#include "core/svg/SVGPathSource.h"
#include "wtf/text/WTFString.h"
@@ -31,6 +32,8 @@ class CORE_EXPORT SVGPathStringSource final : public SVGPathSource {
public:
explicit SVGPathStringSource(const String&);
+ SVGParsingError parseError() const { return m_error; }
+
private:
bool hasMoreData() const override;
SVGPathSegType peekSegmentType() override;
@@ -39,10 +42,9 @@ private:
void eatWhitespace();
float parseNumberWithError();
bool parseArcFlagWithError();
+ void setErrorMark(SVGParseStatus);
- String m_string;
bool m_is8BitSource;
- bool m_seenError;
union {
const LChar* m_character8;
@@ -54,6 +56,8 @@ private:
} m_end;
SVGPathSegType m_previousCommand;
+ SVGParsingError m_error;
+ String m_string;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathParserTest.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPathStringSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698