| Index: Source/core/svg/properties/SVGListPropertyTearOff.h
|
| ===================================================================
|
| --- Source/core/svg/properties/SVGListPropertyTearOff.h (revision 158536)
|
| +++ Source/core/svg/properties/SVGListPropertyTearOff.h (working copy)
|
| @@ -92,8 +92,7 @@
|
|
|
| PassListItemTearOff getItem(unsigned index, ExceptionState& es)
|
| {
|
| - ASSERT(m_animatedProperty);
|
| - return Base::getItemValuesAndWrappers(m_animatedProperty, index, es);
|
| + return Base::getItemValuesAndWrappers(m_animatedProperty.get(), index, es);
|
| }
|
|
|
| PassListItemTearOff insertItemBefore(PassListItemTearOff passNewItem, unsigned index, ExceptionState& es)
|
| @@ -108,8 +107,7 @@
|
|
|
| PassListItemTearOff removeItem(unsigned index, ExceptionState& es)
|
| {
|
| - ASSERT(m_animatedProperty);
|
| - return Base::removeItemValuesAndWrappers(m_animatedProperty, index, es);
|
| + return Base::removeItemValuesAndWrappers(m_animatedProperty.get(), index, es);
|
| }
|
|
|
| PassListItemTearOff appendItem(PassListItemTearOff passNewItem, ExceptionState& es)
|
| @@ -117,27 +115,11 @@
|
| return Base::appendItemValuesAndWrappers(passNewItem, es);
|
| }
|
|
|
| - SVGElement* contextElement() const
|
| - {
|
| - ASSERT(m_animatedProperty);
|
| - return m_animatedProperty->contextElement();
|
| - }
|
| -
|
| - void clearAnimatedProperty()
|
| - {
|
| - ASSERT(m_animatedProperty);
|
| - Base::detachListWrappers(0);
|
| - m_animatedProperty = 0;
|
| - m_values = 0;
|
| - m_wrappers = 0;
|
| - }
|
| -
|
| protected:
|
| SVGListPropertyTearOff(AnimatedListPropertyTearOff* animatedProperty, SVGPropertyRole role, PropertyType& values, ListWrapperCache& wrappers)
|
| : SVGListProperty<PropertyType>(role, values, &wrappers)
|
| , m_animatedProperty(animatedProperty)
|
| {
|
| - ASSERT(m_animatedProperty);
|
| }
|
|
|
| virtual bool isReadOnly() const
|
| @@ -153,7 +135,6 @@
|
| {
|
| ASSERT(m_values);
|
| ASSERT(m_wrappers);
|
| - ASSERT(m_animatedProperty);
|
|
|
| // Update existing wrappers, as the index in the values list has changed.
|
| unsigned size = m_wrappers->size();
|
| @@ -162,7 +143,7 @@
|
| ListItemTearOff* item = m_wrappers->at(i).get();
|
| if (!item)
|
| continue;
|
| - item->setAnimatedProperty(m_animatedProperty);
|
| + item->setAnimatedProperty(m_animatedProperty.get());
|
| item->setValue(m_values->at(i));
|
| }
|
|
|
| @@ -198,7 +179,6 @@
|
|
|
| // Spec: If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
|
| // 'newItem' is already living in another list. If it's not our list, synchronize the other lists wrappers after the removal.
|
| - ASSERT(m_animatedProperty);
|
| bool livesInOtherList = animatedPropertyOfItem != m_animatedProperty;
|
| AnimatedListPropertyTearOff* propertyTearOff = static_cast<AnimatedListPropertyTearOff*>(animatedPropertyOfItem);
|
| int indexToRemove = propertyTearOff->findItem(newItem.get());
|
| @@ -226,7 +206,7 @@
|
|
|
| // Back pointer to the animated property that created us
|
| // For example (text.x.baseVal): m_animatedProperty points to the 'x' SVGAnimatedLengthList object
|
| - AnimatedListPropertyTearOff* m_animatedProperty;
|
| + RefPtr<AnimatedListPropertyTearOff> m_animatedProperty;
|
| };
|
|
|
| }
|
|
|