OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "core/svg/SVGPathSource.h" | 24 #include "core/svg/SVGPathSource.h" |
25 #include "wtf/text/WTFString.h" | 25 #include "wtf/text/WTFString.h" |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 class SVGPathStringSource final : public SVGPathSource { | 29 class SVGPathStringSource final : public SVGPathSource { |
30 public: | 30 public: |
31 explicit SVGPathStringSource(const String&); | 31 explicit SVGPathStringSource(const String&); |
32 | 32 |
33 private: | 33 private: |
34 virtual bool hasMoreData() const override; | 34 bool hasMoreData() const override; |
35 virtual SVGPathSegType peekSegmentType() override; | 35 SVGPathSegType peekSegmentType() override; |
36 virtual PathSegmentData parseSegment() override; | 36 PathSegmentData parseSegment() override; |
37 | 37 |
38 void eatWhitespace(); | 38 void eatWhitespace(); |
39 float parseNumberWithError(); | 39 float parseNumberWithError(); |
40 bool parseArcFlagWithError(); | 40 bool parseArcFlagWithError(); |
41 | 41 |
42 String m_string; | 42 String m_string; |
43 bool m_is8BitSource; | 43 bool m_is8BitSource; |
44 bool m_seenError; | 44 bool m_seenError; |
45 | 45 |
46 union { | 46 union { |
47 const LChar* m_character8; | 47 const LChar* m_character8; |
48 const UChar* m_character16; | 48 const UChar* m_character16; |
49 } m_current; | 49 } m_current; |
50 union { | 50 union { |
51 const LChar* m_character8; | 51 const LChar* m_character8; |
52 const UChar* m_character16; | 52 const UChar* m_character16; |
53 } m_end; | 53 } m_end; |
54 | 54 |
55 SVGPathSegType m_previousCommand; | 55 SVGPathSegType m_previousCommand; |
56 }; | 56 }; |
57 | 57 |
58 } // namespace blink | 58 } // namespace blink |
59 | 59 |
60 #endif // SVGPathStringSource_h | 60 #endif // SVGPathStringSource_h |
OLD | NEW |