| 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 23 matching lines...) Expand all Loading... |
| 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)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 SVGPathElement* contextElement() const; | |
| 45 SVGAnimatedProperty* animatedProperty() const { return m_animatedProperty.ge
t(); } | |
| 46 | |
| 47 int findItem(const ListItemType& item) const | 44 int findItem(const ListItemType& item) const |
| 48 { | 45 { |
| 49 ASSERT(m_values); | 46 ASSERT(m_values); |
| 50 | 47 |
| 51 unsigned size = m_values->size(); | 48 unsigned size = m_values->size(); |
| 52 for (size_t i = 0; i < size; ++i) { | 49 for (size_t i = 0; i < size; ++i) { |
| 53 if (item == m_values->at(i)) | 50 if (item == m_values->at(i)) |
| 54 return i; | 51 return i; |
| 55 } | 52 } |
| 56 | 53 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 112 } |
| 116 | 113 |
| 117 private: | 114 private: |
| 118 SVGPathSegListPropertyTearOff(AnimatedListPropertyTearOff* animatedProperty,
SVGPropertyRole role, SVGPathSegRole pathSegRole, SVGPathSegList& values, ListW
rapperCache& wrappers) | 115 SVGPathSegListPropertyTearOff(AnimatedListPropertyTearOff* animatedProperty,
SVGPropertyRole role, SVGPathSegRole pathSegRole, SVGPathSegList& values, ListW
rapperCache& wrappers) |
| 119 : SVGListProperty<SVGPathSegList>(role, values, &wrappers) | 116 : SVGListProperty<SVGPathSegList>(role, values, &wrappers) |
| 120 , m_animatedProperty(animatedProperty) | 117 , m_animatedProperty(animatedProperty) |
| 121 , m_pathSegRole(pathSegRole) | 118 , m_pathSegRole(pathSegRole) |
| 122 { | 119 { |
| 123 } | 120 } |
| 124 | 121 |
| 122 SVGPathElement* contextElement() const; |
| 123 |
| 125 void clearContextAndRoles(); | 124 void clearContextAndRoles(); |
| 126 | 125 |
| 127 using Base::m_role; | 126 using Base::m_role; |
| 128 | 127 |
| 129 virtual bool isReadOnly() const | 128 virtual bool isReadOnly() const |
| 130 { | 129 { |
| 131 if (m_role == AnimValRole) | 130 if (m_role == AnimValRole) |
| 132 return true; | 131 return true; |
| 133 if (m_animatedProperty && m_animatedProperty->isReadOnly()) | 132 if (m_animatedProperty && m_animatedProperty->isReadOnly()) |
| 134 return true; | 133 return true; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 155 } | 154 } |
| 156 | 155 |
| 157 private: | 156 private: |
| 158 RefPtr<AnimatedListPropertyTearOff> m_animatedProperty; | 157 RefPtr<AnimatedListPropertyTearOff> m_animatedProperty; |
| 159 SVGPathSegRole m_pathSegRole; | 158 SVGPathSegRole m_pathSegRole; |
| 160 }; | 159 }; |
| 161 | 160 |
| 162 } | 161 } |
| 163 | 162 |
| 164 #endif // SVGListPropertyTearOff_h | 163 #endif // SVGListPropertyTearOff_h |
| OLD | NEW |