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

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

Issue 760603002: Allow SVGPathStringSource to be allocated on the stack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | « no previous file | Source/core/svg/SVGPathUtilities.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 11 matching lines...) Expand all
22 #define SVGPathStringSource_h 22 #define SVGPathStringSource_h
23 23
24 #include "core/svg/SVGPathSource.h" 24 #include "core/svg/SVGPathSource.h"
25 #include "wtf/PassOwnPtr.h" 25 #include "wtf/PassOwnPtr.h"
26 #include "wtf/text/WTFString.h" 26 #include "wtf/text/WTFString.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 class SVGPathStringSource final : public SVGPathSource { 30 class SVGPathStringSource final : public SVGPathSource {
31 public: 31 public:
32 static PassOwnPtrWillBeRawPtr<SVGPathStringSource> create(const String& stri ng) 32 explicit SVGPathStringSource(const String&);
33 {
34 return adoptPtrWillBeNoop(new SVGPathStringSource(string));
35 }
36 33
37 private: 34 private:
38 explicit SVGPathStringSource(const String&);
39
40 virtual bool hasMoreData() const override; 35 virtual bool hasMoreData() const override;
41 virtual bool moveToNextToken() override; 36 virtual bool moveToNextToken() override;
42 virtual bool parseSVGSegmentType(SVGPathSegType&) override; 37 virtual bool parseSVGSegmentType(SVGPathSegType&) override;
43 virtual SVGPathSegType nextCommand(SVGPathSegType previousCommand) override; 38 virtual SVGPathSegType nextCommand(SVGPathSegType previousCommand) override;
44 39
45 virtual bool parseMoveToSegment(FloatPoint&) override; 40 virtual bool parseMoveToSegment(FloatPoint&) override;
46 virtual bool parseLineToSegment(FloatPoint&) override; 41 virtual bool parseLineToSegment(FloatPoint&) override;
47 virtual bool parseLineToHorizontalSegment(float&) override; 42 virtual bool parseLineToHorizontalSegment(float&) override;
48 virtual bool parseLineToVerticalSegment(float&) override; 43 virtual bool parseLineToVerticalSegment(float&) override;
49 virtual bool parseCurveToCubicSegment(FloatPoint&, FloatPoint&, FloatPoint&) override; 44 virtual bool parseCurveToCubicSegment(FloatPoint&, FloatPoint&, FloatPoint&) override;
(...skipping 11 matching lines...) Expand all
61 } m_current; 56 } m_current;
62 union { 57 union {
63 const LChar* m_character8; 58 const LChar* m_character8;
64 const UChar* m_character16; 59 const UChar* m_character16;
65 } m_end; 60 } m_end;
66 }; 61 };
67 62
68 } // namespace blink 63 } // namespace blink
69 64
70 #endif // SVGPathStringSource_h 65 #endif // SVGPathStringSource_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGPathUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698