diff options
Diffstat (limited to 'Source/WebCore/svg/properties/SVGListProperty.h')
-rw-r--r-- | Source/WebCore/svg/properties/SVGListProperty.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/WebCore/svg/properties/SVGListProperty.h b/Source/WebCore/svg/properties/SVGListProperty.h index aed4ad49e..1587a40ac 100644 --- a/Source/WebCore/svg/properties/SVGListProperty.h +++ b/Source/WebCore/svg/properties/SVGListProperty.h @@ -52,21 +52,26 @@ public: return true; } - void detachListWrappers(unsigned newListSize) + static void detachListWrappersAndResize(ListWrapperCache* wrappers, unsigned newListSize = 0) { - // See SVGPropertyTearOff::detachWrapper() for an explaination what's happening here. - ASSERT(m_wrappers); - unsigned size = m_wrappers->size(); + // See SVGPropertyTearOff::detachWrapper() for an explanation about what's happening here. + ASSERT(wrappers); + unsigned size = wrappers->size(); for (unsigned i = 0; i < size; ++i) { - if (ListItemTearOff* item = m_wrappers->at(i).get()) + if (ListItemTearOff* item = wrappers->at(i).get()) item->detachWrapper(); } // Reinitialize the wrapper cache to be equal to the new values size, after the XML DOM changed the list. if (newListSize) - m_wrappers->fill(0, newListSize); + wrappers->fill(0, newListSize); else - m_wrappers->clear(); + wrappers->clear(); + } + + void detachListWrappers(unsigned newListSize) + { + detachListWrappersAndResize(m_wrappers, newListSize); } void setValuesAndWrappers(PropertyType* values, ListWrapperCache* wrappers, bool shouldOwnValues) |