diff options
Diffstat (limited to 'Source/WebCore/svg/SVGPathElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGPathElement.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/WebCore/svg/SVGPathElement.cpp b/Source/WebCore/svg/SVGPathElement.cpp index b030c9a83..c34c476f4 100644 --- a/Source/WebCore/svg/SVGPathElement.cpp +++ b/Source/WebCore/svg/SVGPathElement.cpp @@ -329,13 +329,22 @@ PassRefPtr<SVGAnimatedProperty> SVGPathElement::lookupOrCreateDWrapper(SVGElemen if (RefPtr<SVGAnimatedProperty> property = SVGAnimatedProperty::lookupWrapper<SVGPathElement, SVGAnimatedPathSegListPropertyTearOff>(ownerType, dPropertyInfo())) return property; - // Build initial SVGPathSegList. - buildSVGPathSegListFromByteStream(ownerType->m_pathByteStream.get(), ownerType, ownerType->m_pathSegList.value, UnalteredParsing); + if (ownerType->m_pathSegList.value.isEmpty()) + buildSVGPathSegListFromByteStream(ownerType->m_pathByteStream.get(), ownerType, ownerType->m_pathSegList.value, UnalteredParsing); return SVGAnimatedProperty::lookupOrCreateWrapper<SVGPathElement, SVGAnimatedPathSegListPropertyTearOff, SVGPathSegList> (ownerType, dPropertyInfo(), ownerType->m_pathSegList.value); } +void SVGPathElement::animatedPropertyWillBeDeleted() +{ + // m_pathSegList.shouldSynchronize is set to true when the 'd' wrapper for m_pathSegList + // is created and cached. We need to reset it back to false when this wrapper is deleted + // so we can be sure if shouldSynchronize is true, SVGAnimatedProperty::lookupWrapper() + // will return a valid cached 'd' wrapper for the m_pathSegList. + m_pathSegList.shouldSynchronize = false; +} + void SVGPathElement::synchronizeD(SVGElement* contextElement) { ASSERT(contextElement); |