| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 #include "wtf/HashSet.h" | 27 #include "wtf/HashSet.h" |
| 28 | 28 |
| 29 typedef pair<unsigned, unsigned> UnicodeRange; | 29 typedef pair<unsigned, unsigned> UnicodeRange; |
| 30 typedef Vector<UnicodeRange> UnicodeRanges; | 30 typedef Vector<UnicodeRange> UnicodeRanges; |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 class FloatPoint; | 34 class FloatPoint; |
| 35 class FloatRect; | 35 class FloatRect; |
| 36 class SVGPointList; | 36 class SVGPointList; |
| 37 class SVGTransformList; | |
| 38 | 37 |
| 39 template <typename CharType> | 38 template <typename CharType> |
| 40 bool parseSVGNumber(CharType* ptr, size_t length, double& number); | 39 bool parseSVGNumber(CharType* ptr, size_t length, double& number); |
| 41 bool parseNumber(const LChar*& ptr, const LChar* end, float& number, bool skip =
true); | 40 bool parseNumber(const LChar*& ptr, const LChar* end, float& number, bool skip =
true); |
| 42 bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip =
true); | 41 bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip =
true); |
| 43 bool parseNumberFromString(const String&, float& number, bool skip = true); | 42 bool parseNumberFromString(const String&, float& number, bool skip = true); |
| 44 bool parseNumberOptionalNumber(const String& s, float& h, float& v); | 43 bool parseNumberOptionalNumber(const String& s, float& h, float& v); |
| 45 bool parseArcFlag(const LChar*& ptr, const LChar* end, bool& flag); | 44 bool parseArcFlag(const LChar*& ptr, const LChar* end, bool& flag); |
| 46 bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag); | 45 bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag); |
| 47 | 46 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 79 } |
| 81 } | 80 } |
| 82 return ptr < end; | 81 return ptr < end; |
| 83 } | 82 } |
| 84 | 83 |
| 85 bool pointsListFromSVGData(SVGPointList& pointsList, const String& points); | 84 bool pointsListFromSVGData(SVGPointList& pointsList, const String& points); |
| 86 Vector<String> parseDelimitedString(const String& input, const char seperator); | 85 Vector<String> parseDelimitedString(const String& input, const char seperator); |
| 87 bool parseKerningUnicodeString(const String& input, UnicodeRanges&, HashSet<Stri
ng>& stringList); | 86 bool parseKerningUnicodeString(const String& input, UnicodeRanges&, HashSet<Stri
ng>& stringList); |
| 88 bool parseGlyphName(const String& input, HashSet<String>& values); | 87 bool parseGlyphName(const String& input, HashSet<String>& values); |
| 89 | 88 |
| 90 enum TransformParsingMode { | 89 template<typename CharType> |
| 91 ClearList, | 90 bool parseAndSkipTransformType(const CharType*& ptr, const CharType* end, SVGTra
nsformType& type); |
| 92 DoNotClearList | 91 SVGTransformType parseTransformType(const String& string); |
| 93 }; | |
| 94 | |
| 95 bool parseTransformAttribute(SVGTransformList&, const LChar*& ptr, const LChar*
end, TransformParsingMode = ClearList); | |
| 96 bool parseTransformAttribute(SVGTransformList&, const UChar*& ptr, const UChar*
end, TransformParsingMode = ClearList); | |
| 97 | |
| 98 bool parseTransformValue(unsigned type, const LChar*& ptr, const LChar* end, SVG
Transform&); | |
| 99 bool parseTransformValue(unsigned type, const UChar*& ptr, const UChar* end, SVG
Transform&); | |
| 100 | |
| 101 SVGTransform::SVGTransformType parseTransformType(const String&); | |
| 102 | 92 |
| 103 } // namespace WebCore | 93 } // namespace WebCore |
| 104 | 94 |
| 105 #endif // SVGParserUtilities_h | 95 #endif // SVGParserUtilities_h |
| OLD | NEW |