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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 size_t index, | 228 size_t index, |
229 ExceptionState& exceptionState) { | 229 ExceptionState& exceptionState) { |
230 if (index >= m_values.size()) { | 230 if (index >= m_values.size()) { |
231 exceptionState.throwDOMException( | 231 exceptionState.throwDOMException( |
232 IndexSizeError, ExceptionMessages::indexExceedsMaximumBound( | 232 IndexSizeError, ExceptionMessages::indexExceedsMaximumBound( |
233 "index", index, m_values.size())); | 233 "index", index, m_values.size())); |
234 return nullptr; | 234 return nullptr; |
235 } | 235 } |
236 DCHECK_EQ(m_values.at(index)->ownerList(), this); | 236 DCHECK_EQ(m_values.at(index)->ownerList(), this); |
237 ItemPropertyType* oldItem = m_values.at(index); | 237 ItemPropertyType* oldItem = m_values.at(index); |
238 m_values.remove(index); | 238 m_values.erase(index); |
239 oldItem->setOwnerList(0); | 239 oldItem->setOwnerList(0); |
240 return oldItem; | 240 return oldItem; |
241 } | 241 } |
242 | 242 |
243 template <typename Derived, typename ItemProperty> | 243 template <typename Derived, typename ItemProperty> |
244 ItemProperty* SVGListPropertyHelper<Derived, ItemProperty>::appendItem( | 244 ItemProperty* SVGListPropertyHelper<Derived, ItemProperty>::appendItem( |
245 ItemProperty* newItem) { | 245 ItemProperty* newItem) { |
246 // Append the value and wrapper at the end of the list. | 246 // Append the value and wrapper at the end of the list. |
247 append(newItem); | 247 append(newItem); |
248 | 248 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 for (size_t i = 0; i < paddingCount; ++i) | 340 for (size_t i = 0; i < paddingCount; ++i) |
341 append(createPaddingItem()); | 341 append(createPaddingItem()); |
342 } | 342 } |
343 | 343 |
344 return true; | 344 return true; |
345 } | 345 } |
346 | 346 |
347 } // namespace blink | 347 } // namespace blink |
348 | 348 |
349 #endif // SVGListPropertyHelper_h | 349 #endif // SVGListPropertyHelper_h |
OLD | NEW |