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 14 matching lines...) Expand all Loading... |
25 #include "platform/geometry/FloatPoint.h" | 25 #include "platform/geometry/FloatPoint.h" |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 SVGPathStringSource::SVGPathStringSource(const String& string) | 29 SVGPathStringSource::SVGPathStringSource(const String& string) |
30 : m_string(string) | 30 : m_string(string) |
31 , m_is8BitSource(string.is8Bit()) | 31 , m_is8BitSource(string.is8Bit()) |
32 , m_seenError(false) | 32 , m_seenError(false) |
33 , m_previousCommand(PathSegUnknown) | 33 , m_previousCommand(PathSegUnknown) |
34 { | 34 { |
35 ASSERT(!string.isEmpty()); | 35 ASSERT(!string.isNull()); |
36 | 36 |
37 if (m_is8BitSource) { | 37 if (m_is8BitSource) { |
38 m_current.m_character8 = string.characters8(); | 38 m_current.m_character8 = string.characters8(); |
39 m_end.m_character8 = m_current.m_character8 + string.length(); | 39 m_end.m_character8 = m_current.m_character8 + string.length(); |
40 } else { | 40 } else { |
41 m_current.m_character16 = string.characters16(); | 41 m_current.m_character16 = string.characters16(); |
42 m_end.m_character16 = m_current.m_character16 + string.length(); | 42 m_end.m_character16 = m_current.m_character16 + string.length(); |
43 } | 43 } |
44 eatWhitespace(); | 44 eatWhitespace(); |
45 } | 45 } |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 case PathSegUnknown: | 228 case PathSegUnknown: |
229 ASSERT_NOT_REACHED(); | 229 ASSERT_NOT_REACHED(); |
230 } | 230 } |
231 | 231 |
232 if (UNLIKELY(m_seenError)) | 232 if (UNLIKELY(m_seenError)) |
233 segment.command = PathSegUnknown; | 233 segment.command = PathSegUnknown; |
234 return segment; | 234 return segment; |
235 } | 235 } |
236 | 236 |
237 } // namespace blink | 237 } // namespace blink |
OLD | NEW |