Chromium Code Reviews| Index: Source/core/svg/SVGParserUtilities.h |
| diff --git a/Source/core/svg/SVGParserUtilities.h b/Source/core/svg/SVGParserUtilities.h |
| index 6e2e423b1c24853051d320577abd82dd32a039fc..d26d823dc879608cf0f9fe82ee11d6bf50865f4b 100644 |
| --- a/Source/core/svg/SVGParserUtilities.h |
| +++ b/Source/core/svg/SVGParserUtilities.h |
| @@ -35,11 +35,19 @@ class FloatPoint; |
| class FloatRect; |
| class SVGPointList; |
| +enum WhitespaceParsing { |
| + STRICT = 0, |
| + ALLOW_LEADING = 0x1, |
| + ALLOW_TRAILING = 0x2, |
| + ALLOW_LEADING_AND_TRAILING = ALLOW_LEADING | ALLOW_TRAILING |
| +}; |
| + |
| template <typename CharType> |
| bool parseSVGNumber(CharType* ptr, size_t length, double& number); |
| -bool parseNumber(const LChar*& ptr, const LChar* end, float& number, bool skip = true); |
| -bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip = true); |
| +bool parseNumber(const LChar*& ptr, const LChar* end, float& number, WhitespaceParsing mode = ALLOW_LEADING_AND_TRAILING); |
| +bool parseNumber(const UChar*& ptr, const UChar* end, float& number, WhitespaceParsing mode = ALLOW_LEADING_AND_TRAILING); |
| bool parseNumberOptionalNumber(const String& s, float& h, float& v); |
| +bool parseNumberOrPercentage(const String& s, float& number); |
| bool parseArcFlag(const LChar*& ptr, const LChar* end, bool& flag); |
| bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag); |
| @@ -55,7 +63,7 @@ bool parseFloatPoint3(const CharType*& current, const CharType* end, FloatPoint& |
| template <typename CharType> |
| inline bool isSVGSpace(CharType c) |
| { |
| - return c == ' ' || c == '\t' || c == '\n' || c == '\r'; |
| + return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f'; |
|
pdr.
2014/06/02 14:35:19
This now matches isHTMLSpace(). Do we need both?
Erik Dahlström (inactive)
2014/06/04 16:25:43
Replaced all instances of isSVGSpace with isHTMLSp
|
| } |
| template <typename CharType> |