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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGStringList.h

Issue 2390773004: reflow comments in core/svg/ (Closed)
Patch Set: comments (heh!) Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/svg/properties/SVGPropertyHelper.h" 36 #include "core/svg/properties/SVGPropertyHelper.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class ExceptionState; 40 class ExceptionState;
41 class SVGStringListTearOff; 41 class SVGStringListTearOff;
42 42
43 // Implementation of SVGStringList spec: 43 // Implementation of SVGStringList spec:
44 // http://www.w3.org/TR/SVG/single-page.html#types-InterfaceSVGStringList 44 // http://www.w3.org/TR/SVG/single-page.html#types-InterfaceSVGStringList
45 // See SVGStringListTearOff for actual Javascript interface. 45 // See SVGStringListTearOff for actual Javascript interface.
46 // Unlike other SVG*List implementations, SVGStringList is NOT tied to SVGString . 46 // Unlike other SVG*List implementations, SVGStringList is NOT tied to
47 // SVGString.
47 // SVGStringList operates directly on DOMString. 48 // SVGStringList operates directly on DOMString.
48 // 49 //
49 // In short: 50 // In short:
50 // SVGStringList has_a Vector<String>. 51 // SVGStringList has_a Vector<String>.
51 // SVGStringList items are exposed to Javascript as DOMString (not SVGString) as in the spec. 52 // SVGStringList items are exposed to Javascript as DOMString (not SVGString)
52 // SVGString is used only for boxing values for non-list string property SVGAn imatedString, 53 // as in the spec.
54 // SVGString is used only for boxing values for non-list string property
55 // SVGAnimatedString,
53 // and not used for SVGStringList. 56 // and not used for SVGStringList.
54 class SVGStringList final : public SVGPropertyHelper<SVGStringList> { 57 class SVGStringList final : public SVGPropertyHelper<SVGStringList> {
55 public: 58 public:
56 typedef SVGStringListTearOff TearOffType; 59 typedef SVGStringListTearOff TearOffType;
57 60
58 static SVGStringList* create() { return new SVGStringList(); } 61 static SVGStringList* create() { return new SVGStringList(); }
59 62
60 ~SVGStringList() override; 63 ~SVGStringList() override;
61 64
62 const Vector<String>& values() const { return m_values; } 65 const Vector<String>& values() const { return m_values; }
63 66
64 // SVGStringList DOM Spec implementation. These are only to be called from SVG StringListTearOff: 67 // SVGStringList DOM Spec implementation. These are only to be called from
68 // SVGStringListTearOff:
65 unsigned long length() { return m_values.size(); } 69 unsigned long length() { return m_values.size(); }
66 void clear() { m_values.clear(); } 70 void clear() { m_values.clear(); }
67 void initialize(const String&); 71 void initialize(const String&);
68 String getItem(size_t, ExceptionState&); 72 String getItem(size_t, ExceptionState&);
69 void insertItemBefore(const String&, size_t); 73 void insertItemBefore(const String&, size_t);
70 String removeItem(size_t, ExceptionState&); 74 String removeItem(size_t, ExceptionState&);
71 void appendItem(const String&); 75 void appendItem(const String&);
72 void replaceItem(const String&, size_t, ExceptionState&); 76 void replaceItem(const String&, size_t, ExceptionState&);
73 77
74 // SVGPropertyBase: 78 // SVGPropertyBase:
(...skipping 18 matching lines...) Expand all
93 template <typename CharType> 97 template <typename CharType>
94 void parseInternal(const CharType*& ptr, const CharType* end); 98 void parseInternal(const CharType*& ptr, const CharType* end);
95 bool checkIndexBound(size_t, ExceptionState&); 99 bool checkIndexBound(size_t, ExceptionState&);
96 100
97 Vector<String> m_values; 101 Vector<String> m_values;
98 }; 102 };
99 103
100 } // namespace blink 104 } // namespace blink
101 105
102 #endif // SVGStringList_h 106 #endif // SVGStringList_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGStopElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGStringList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698