| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 m_values->remove(itemIndex); | 65 m_values->remove(itemIndex); |
| 66 | 66 |
| 67 if (shouldSynchronizeWrappers) | 67 if (shouldSynchronizeWrappers) |
| 68 commitChange(); | 68 commitChange(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // SVGList API | 71 // SVGList API |
| 72 void clear(ExceptionState&); | 72 void clear(ExceptionState&); |
| 73 | 73 |
| 74 PassListItemType initialize(PassListItemType passNewItem, ExceptionState& es
) | 74 PassListItemType initialize(PassListItemType passNewItem, ExceptionState& ex
ceptionState) |
| 75 { | 75 { |
| 76 // Not specified, but FF/Opera do it this way, and it's just sane. | 76 // Not specified, but FF/Opera do it this way, and it's just sane. |
| 77 if (!passNewItem) { | 77 if (!passNewItem) { |
| 78 es.throwUninformativeAndGenericTypeError(); | 78 exceptionState.throwUninformativeAndGenericTypeError(); |
| 79 return 0; | 79 return 0; |
| 80 } | 80 } |
| 81 | 81 |
| 82 clearContextAndRoles(); | 82 clearContextAndRoles(); |
| 83 ListItemType newItem = passNewItem; | 83 ListItemType newItem = passNewItem; |
| 84 return Base::initializeValues(newItem, es); | 84 return Base::initializeValues(newItem, exceptionState); |
| 85 } | 85 } |
| 86 | 86 |
| 87 PassListItemType getItem(unsigned index, ExceptionState&); | 87 PassListItemType getItem(unsigned index, ExceptionState&); |
| 88 | 88 |
| 89 PassListItemType insertItemBefore(PassListItemType passNewItem, unsigned ind
ex, ExceptionState& es) | 89 PassListItemType insertItemBefore(PassListItemType passNewItem, unsigned ind
ex, ExceptionState& exceptionState) |
| 90 { | 90 { |
| 91 // Not specified, but FF/Opera do it this way, and it's just sane. | 91 // Not specified, but FF/Opera do it this way, and it's just sane. |
| 92 if (!passNewItem) { | 92 if (!passNewItem) { |
| 93 es.throwUninformativeAndGenericTypeError(); | 93 exceptionState.throwUninformativeAndGenericTypeError(); |
| 94 return 0; | 94 return 0; |
| 95 } | 95 } |
| 96 | 96 |
| 97 ListItemType newItem = passNewItem; | 97 ListItemType newItem = passNewItem; |
| 98 return Base::insertItemBeforeValues(newItem, index, es); | 98 return Base::insertItemBeforeValues(newItem, index, exceptionState); |
| 99 } | 99 } |
| 100 | 100 |
| 101 PassListItemType replaceItem(PassListItemType, unsigned index, ExceptionStat
e&); | 101 PassListItemType replaceItem(PassListItemType, unsigned index, ExceptionStat
e&); |
| 102 | 102 |
| 103 PassListItemType removeItem(unsigned index, ExceptionState&); | 103 PassListItemType removeItem(unsigned index, ExceptionState&); |
| 104 | 104 |
| 105 PassListItemType appendItem(PassListItemType passNewItem, ExceptionState& es
) | 105 PassListItemType appendItem(PassListItemType passNewItem, ExceptionState& ex
ceptionState) |
| 106 { | 106 { |
| 107 // Not specified, but FF/Opera do it this way, and it's just sane. | 107 // Not specified, but FF/Opera do it this way, and it's just sane. |
| 108 if (!passNewItem) { | 108 if (!passNewItem) { |
| 109 es.throwUninformativeAndGenericTypeError(); | 109 exceptionState.throwUninformativeAndGenericTypeError(); |
| 110 return 0; | 110 return 0; |
| 111 } | 111 } |
| 112 | 112 |
| 113 ListItemType newItem = passNewItem; | 113 ListItemType newItem = passNewItem; |
| 114 return Base::appendItemValues(newItem, es); | 114 return Base::appendItemValues(newItem, exceptionState); |
| 115 } | 115 } |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 SVGPathSegListPropertyTearOff(AnimatedListPropertyTearOff* animatedProperty,
SVGPropertyRole role, SVGPathSegRole pathSegRole, SVGPathSegList& values, ListW
rapperCache& wrappers) | 118 SVGPathSegListPropertyTearOff(AnimatedListPropertyTearOff* animatedProperty,
SVGPropertyRole role, SVGPathSegRole pathSegRole, SVGPathSegList& values, ListW
rapperCache& wrappers) |
| 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 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 RefPtr<AnimatedListPropertyTearOff> m_animatedProperty; | 158 RefPtr<AnimatedListPropertyTearOff> m_animatedProperty; |
| 159 SVGPathSegRole m_pathSegRole; | 159 SVGPathSegRole m_pathSegRole; |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 } | 162 } |
| 163 | 163 |
| 164 #endif // SVGListPropertyTearOff_h | 164 #endif // SVGListPropertyTearOff_h |
| OLD | NEW |