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

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

Issue 25164005: Merge 158408 "Revert 157959 "Introduce a new reference graph to ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1650/
Patch Set: 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
===================================================================
--- 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;
};
}
« 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