| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 bool anonymousIndexedSetter(unsigned index, PassRefPtrWillBeRawPtr<ItemTearO
ffType> passItem, ExceptionState& exceptionState) | 157 bool anonymousIndexedSetter(unsigned index, PassRefPtrWillBeRawPtr<ItemTearO
ffType> passItem, ExceptionState& exceptionState) |
| 158 { | 158 { |
| 159 replaceItem(passItem, index, exceptionState); | 159 replaceItem(passItem, index, exceptionState); |
| 160 return true; | 160 return true; |
| 161 } | 161 } |
| 162 | 162 |
| 163 PassRefPtrWillBeRawPtr<ItemTearOffType> removeItem(unsigned long index, Exce
ptionState& exceptionState) | 163 PassRefPtrWillBeRawPtr<ItemTearOffType> removeItem(unsigned long index, Exce
ptionState& exceptionState) |
| 164 { | 164 { |
| 165 if (toDerived()->isImmutable()) { |
| 166 exceptionState.throwDOMException(NoModificationAllowedError, "The ob
ject is read-only."); |
| 167 return nullptr; |
| 168 } |
| 169 |
| 165 RefPtrWillBeRawPtr<ItemPropertyType> value = toDerived()->target()->remo
veItem(index, exceptionState); | 170 RefPtrWillBeRawPtr<ItemPropertyType> value = toDerived()->target()->remo
veItem(index, exceptionState); |
| 166 toDerived()->commitChange(); | 171 toDerived()->commitChange(); |
| 167 | 172 |
| 168 return createItemTearOff(value.release()); | 173 return createItemTearOff(value.release()); |
| 169 } | 174 } |
| 170 | 175 |
| 171 PassRefPtrWillBeRawPtr<ItemTearOffType> appendItem(PassRefPtrWillBeRawPtr<It
emTearOffType> passItem, ExceptionState& exceptionState) | 176 PassRefPtrWillBeRawPtr<ItemTearOffType> appendItem(PassRefPtrWillBeRawPtr<It
emTearOffType> passItem, ExceptionState& exceptionState) |
| 172 { | 177 { |
| 173 RefPtrWillBeRawPtr<ItemTearOffType> item = passItem; | 178 RefPtrWillBeRawPtr<ItemTearOffType> item = passItem; |
| 174 | 179 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 return ItemTraits::createTearOff(value, 0, PropertyIsNotAnimVal, Qualifi
edName::null()); | 212 return ItemTraits::createTearOff(value, 0, PropertyIsNotAnimVal, Qualifi
edName::null()); |
| 208 } | 213 } |
| 209 | 214 |
| 210 private: | 215 private: |
| 211 Derived* toDerived() { return static_cast<Derived*>(this); } | 216 Derived* toDerived() { return static_cast<Derived*>(this); } |
| 212 }; | 217 }; |
| 213 | 218 |
| 214 } | 219 } |
| 215 | 220 |
| 216 #endif // SVGListPropertyTearOffHelper_h | 221 #endif // SVGListPropertyTearOffHelper_h |
| OLD | NEW |