Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: Source/core/svg/properties/SVGListPropertyTearOff.h

Issue 24863002: Revert 157959 "Introduce a new reference graph to SVG*TearOffs." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/properties/SVGListPropertyTearOff.h
diff --git a/Source/core/svg/properties/SVGListPropertyTearOff.h b/Source/core/svg/properties/SVGListPropertyTearOff.h
index 640d7245f4c417f75cf2f88e6f04de321d3892a3..c6246d7c24a09557cf56f785ec612dcf738a25fa 100644
--- a/Source/core/svg/properties/SVGListPropertyTearOff.h
+++ b/Source/core/svg/properties/SVGListPropertyTearOff.h
@@ -92,8 +92,7 @@ public:
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 @@ public:
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 @@ public:
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 @@ protected:
{
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 @@ protected:
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 @@ protected:
// 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 @@ protected:
// 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;
};
}
« no previous file with comments | « Source/core/svg/properties/SVGAnimatedProperty.cpp ('k') | Source/core/svg/properties/SVGPathSegListPropertyTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698