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 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 10 matching lines...) Expand all Loading... |
21 #define SVGPathSegListPropertyTearOff_h | 21 #define SVGPathSegListPropertyTearOff_h |
22 | 22 |
23 #include "bindings/v8/ExceptionState.h" | 23 #include "bindings/v8/ExceptionState.h" |
24 #include "core/svg/SVGPathSegList.h" | 24 #include "core/svg/SVGPathSegList.h" |
25 #include "core/svg/properties/SVGAnimatedListPropertyTearOff.h" | 25 #include "core/svg/properties/SVGAnimatedListPropertyTearOff.h" |
26 | 26 |
27 namespace WebCore { | 27 namespace WebCore { |
28 | 28 |
29 class SVGPathElement; | 29 class SVGPathElement; |
30 | 30 |
31 class SVGPathSegListPropertyTearOff : public SVGListProperty<SVGPathSegList> { | 31 class SVGPathSegListPropertyTearOff FINAL : public SVGListProperty<SVGPathSegLis
t> { |
32 public: | 32 public: |
33 typedef SVGListProperty<SVGPathSegList> Base; | 33 typedef SVGListProperty<SVGPathSegList> Base; |
34 typedef SVGAnimatedListPropertyTearOff<SVGPathSegList> AnimatedListPropertyT
earOff; | 34 typedef SVGAnimatedListPropertyTearOff<SVGPathSegList> AnimatedListPropertyT
earOff; |
35 typedef SVGPropertyTraits<SVGPathSegList>::ListItemType ListItemType; | 35 typedef SVGPropertyTraits<SVGPathSegList>::ListItemType ListItemType; |
36 typedef PassRefPtr<SVGPathSeg> PassListItemType; | 36 typedef PassRefPtr<SVGPathSeg> PassListItemType; |
37 | 37 |
38 static PassRefPtr<SVGPathSegListPropertyTearOff> create(AnimatedListProperty
TearOff* animatedProperty, SVGPropertyRole role, SVGPathSegRole pathSegRole, SVG
PathSegList& values, ListWrapperCache& wrappers) | 38 static PassRefPtr<SVGPathSegListPropertyTearOff> create(AnimatedListProperty
TearOff* animatedProperty, SVGPropertyRole role, SVGPathSegRole pathSegRole, SVG
PathSegList& values, ListWrapperCache& wrappers) |
39 { | 39 { |
40 ASSERT(animatedProperty); | 40 ASSERT(animatedProperty); |
41 return adoptRef(new SVGPathSegListPropertyTearOff(animatedProperty, role
, pathSegRole, values, wrappers)); | 41 return adoptRef(new SVGPathSegListPropertyTearOff(animatedProperty, role
, pathSegRole, values, wrappers)); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 : SVGListProperty<SVGPathSegList>(role, values, &wrappers) | 119 : SVGListProperty<SVGPathSegList>(role, values, &wrappers) |
120 , m_animatedProperty(animatedProperty) | 120 , m_animatedProperty(animatedProperty) |
121 , m_pathSegRole(pathSegRole) | 121 , m_pathSegRole(pathSegRole) |
122 { | 122 { |
123 } | 123 } |
124 | 124 |
125 void clearContextAndRoles(); | 125 void clearContextAndRoles(); |
126 | 126 |
127 using Base::m_role; | 127 using Base::m_role; |
128 | 128 |
129 virtual void commitChange() | 129 virtual void commitChange() OVERRIDE |
130 { | 130 { |
131 ASSERT(m_values); | 131 ASSERT(m_values); |
132 m_values->commitChange(m_animatedProperty->contextElement(), ListModific
ationUnknown); | 132 m_values->commitChange(m_animatedProperty->contextElement(), ListModific
ationUnknown); |
133 } | 133 } |
134 | 134 |
135 virtual void commitChange(ListModification listModification) | 135 virtual void commitChange(ListModification listModification) OVERRIDE |
136 { | 136 { |
137 ASSERT(m_values); | 137 ASSERT(m_values); |
138 m_values->commitChange(m_animatedProperty->contextElement(), listModific
ation); | 138 m_values->commitChange(m_animatedProperty->contextElement(), listModific
ation); |
139 } | 139 } |
140 | 140 |
141 virtual bool processIncomingListItemValue(const ListItemType& newItem, unsig
ned* indexToModify) OVERRIDE; | 141 virtual bool processIncomingListItemValue(const ListItemType& newItem, unsig
ned* indexToModify) OVERRIDE; |
142 virtual bool processIncomingListItemWrapper(RefPtr<ListItemTearOff>&, unsign
ed*) | 142 virtual bool processIncomingListItemWrapper(RefPtr<ListItemTearOff>&, unsign
ed*) OVERRIDE |
143 { | 143 { |
144 ASSERT_NOT_REACHED(); | 144 ASSERT_NOT_REACHED(); |
145 return true; | 145 return true; |
146 } | 146 } |
147 | 147 |
148 private: | 148 private: |
149 AnimatedListPropertyTearOff* m_animatedProperty; | 149 AnimatedListPropertyTearOff* m_animatedProperty; |
150 SVGPathSegRole m_pathSegRole; | 150 SVGPathSegRole m_pathSegRole; |
151 }; | 151 }; |
152 | 152 |
153 } | 153 } |
154 | 154 |
155 #endif // SVGListPropertyTearOff_h | 155 #endif // SVGListPropertyTearOff_h |
OLD | NEW |