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

Side by Side Diff: Source/core/svg/SVGParserUtilities.h

Issue 545173003: Support scientific notation in CSS numbers/percentages/dimensions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop parseSVGNumber; Add additional TC. Created 6 years, 3 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 | « Source/core/css/parser/CSSTokenizer-in.cpp ('k') | Source/core/svg/SVGParserUtilities.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, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2013 Apple Inc. All rights reserved. 4 * Copyright (C) 2013 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 23 matching lines...) Expand all
34 34
35 class FloatPoint; 35 class FloatPoint;
36 36
37 enum WhitespaceMode { 37 enum WhitespaceMode {
38 DisallowWhitespace = 0, 38 DisallowWhitespace = 0,
39 AllowLeadingWhitespace = 0x1, 39 AllowLeadingWhitespace = 0x1,
40 AllowTrailingWhitespace = 0x2, 40 AllowTrailingWhitespace = 0x2,
41 AllowLeadingAndTrailingWhitespace = AllowLeadingWhitespace | AllowTrailingWh itespace 41 AllowLeadingAndTrailingWhitespace = AllowLeadingWhitespace | AllowTrailingWh itespace
42 }; 42 };
43 43
44 template <typename CharType>
45 bool parseSVGNumber(CharType* ptr, size_t length, double& number);
46 bool parseNumber(const LChar*& ptr, const LChar* end, float& number, WhitespaceM ode = AllowLeadingAndTrailingWhitespace); 44 bool parseNumber(const LChar*& ptr, const LChar* end, float& number, WhitespaceM ode = AllowLeadingAndTrailingWhitespace);
47 bool parseNumber(const UChar*& ptr, const UChar* end, float& number, WhitespaceM ode = AllowLeadingAndTrailingWhitespace); 45 bool parseNumber(const UChar*& ptr, const UChar* end, float& number, WhitespaceM ode = AllowLeadingAndTrailingWhitespace);
48 bool parseNumberOptionalNumber(const String& s, float& h, float& v); 46 bool parseNumberOptionalNumber(const String& s, float& h, float& v);
49 bool parseNumberOrPercentage(const String& s, float& number); 47 bool parseNumberOrPercentage(const String& s, float& number);
50 bool parseArcFlag(const LChar*& ptr, const LChar* end, bool& flag); 48 bool parseArcFlag(const LChar*& ptr, const LChar* end, bool& flag);
51 bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag); 49 bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag);
52 50
53 template <typename CharType> 51 template <typename CharType>
54 bool parseFloatPoint(const CharType*& current, const CharType* end, FloatPoint&) ; 52 bool parseFloatPoint(const CharType*& current, const CharType* end, FloatPoint&) ;
55 template <typename CharType> 53 template <typename CharType>
(...skipping 29 matching lines...) Expand all
85 bool parseGlyphName(const String& input, HashSet<String>& values); 83 bool parseGlyphName(const String& input, HashSet<String>& values);
86 #endif 84 #endif
87 85
88 template<typename CharType> 86 template<typename CharType>
89 bool parseAndSkipTransformType(const CharType*& ptr, const CharType* end, SVGTra nsformType&); 87 bool parseAndSkipTransformType(const CharType*& ptr, const CharType* end, SVGTra nsformType&);
90 SVGTransformType parseTransformType(const String&); 88 SVGTransformType parseTransformType(const String&);
91 89
92 } // namespace blink 90 } // namespace blink
93 91
94 #endif // SVGParserUtilities_h 92 #endif // SVGParserUtilities_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSTokenizer-in.cpp ('k') | Source/core/svg/SVGParserUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698