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

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

Issue 1023993002: Rework the SVGPathSource interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blender fixups. Created 5 years, 9 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/svg/SVGPathSource.h ('k') | Source/core/svg/SVGPathStringSource.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) 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
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 virtual bool hasMoreData() const override;
35 virtual bool moveToNextToken() override; 35 virtual SVGPathSegType peekSegmentType() override;
36 virtual bool parseSVGSegmentType(SVGPathSegType&) override; 36 virtual PathSegmentData parseSegment() override;
37 virtual SVGPathSegType nextCommand(SVGPathSegType previousCommand) override;
38 37
39 virtual bool parseMoveToSegment(FloatPoint&) override; 38 void eatWhitespace();
40 virtual bool parseLineToSegment(FloatPoint&) override; 39 float parseNumberWithError();
41 virtual bool parseLineToHorizontalSegment(float&) override; 40 bool parseArcFlagWithError();
42 virtual bool parseLineToVerticalSegment(float&) override;
43 virtual bool parseCurveToCubicSegment(FloatPoint&, FloatPoint&, FloatPoint&) override;
44 virtual bool parseCurveToCubicSmoothSegment(FloatPoint&, FloatPoint&) overri de;
45 virtual bool parseCurveToQuadraticSegment(FloatPoint&, FloatPoint&) override ;
46 virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&) override;
47 virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPo int&) override;
48 41
49 String m_string; 42 String m_string;
50 bool m_is8BitSource; 43 bool m_is8BitSource;
44 bool m_seenError;
51 45
52 union { 46 union {
53 const LChar* m_character8; 47 const LChar* m_character8;
54 const UChar* m_character16; 48 const UChar* m_character16;
55 } m_current; 49 } m_current;
56 union { 50 union {
57 const LChar* m_character8; 51 const LChar* m_character8;
58 const UChar* m_character16; 52 const UChar* m_character16;
59 } m_end; 53 } m_end;
54
55 SVGPathSegType m_previousCommand;
60 }; 56 };
61 57
62 } // namespace blink 58 } // namespace blink
63 59
64 #endif // SVGPathStringSource_h 60 #endif // SVGPathStringSource_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathSource.h ('k') | Source/core/svg/SVGPathStringSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698