OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2002, 2003 The Karbon Developers | 2 * Copyright (C) 2002, 2003 The Karbon Developers |
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> |
5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 25 matching lines...) Expand all Loading... |
36 WTF_MAKE_NONCOPYABLE(SVGPathParser); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED
(SVGPathParser); | 36 WTF_MAKE_NONCOPYABLE(SVGPathParser); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED
(SVGPathParser); |
37 public: | 37 public: |
38 SVGPathParser(SVGPathSource* source, SVGPathConsumer* consumer) | 38 SVGPathParser(SVGPathSource* source, SVGPathConsumer* consumer) |
39 : m_source(source) | 39 : m_source(source) |
40 , m_consumer(consumer) | 40 , m_consumer(consumer) |
41 { | 41 { |
42 ASSERT(m_source); | 42 ASSERT(m_source); |
43 ASSERT(m_consumer); | 43 ASSERT(m_consumer); |
44 } | 44 } |
45 | 45 |
46 bool parsePathDataFromSource(PathParsingMode, bool checkForInitialMoveTo = t
rue); | 46 bool parsePathDataFromSource(PathParsingMode pathParsingMode, bool checkForI
nitialMoveTo = true) |
| 47 { |
| 48 ASSERT(m_source); |
| 49 ASSERT(m_consumer); |
| 50 if (checkForInitialMoveTo && !initialCommandIsMoveTo()) |
| 51 return false; |
| 52 if (pathParsingMode == NormalizedParsing) |
| 53 return parseAndNormalizePath(); |
| 54 return parsePath(); |
| 55 } |
47 | 56 |
48 DECLARE_TRACE(); | 57 DECLARE_TRACE(); |
49 | 58 |
50 private: | 59 private: |
51 bool initialCommandIsMoveTo(); | 60 bool initialCommandIsMoveTo(); |
| 61 bool parsePath(); |
| 62 bool parseAndNormalizePath(); |
52 | 63 |
53 RawPtrWillBeMember<SVGPathSource> m_source; | 64 RawPtrWillBeMember<SVGPathSource> m_source; |
54 RawPtrWillBeMember<SVGPathConsumer> m_consumer; | 65 RawPtrWillBeMember<SVGPathConsumer> m_consumer; |
55 }; | 66 }; |
56 | 67 |
57 } // namespace blink | 68 } // namespace blink |
58 | 69 |
59 #endif // SVGPathParser_h | 70 #endif // SVGPathParser_h |
OLD | NEW |