if (!hasSVGRareData())
ASSERT(!SVGElementRareData::rareDataMap().contains(this));
else {
+ ASSERT(document());
+ if (hasPendingResources())
+ document()->accessSVGExtensions()->removeElementFromPendingResources(this);
+ ASSERT(!hasPendingResources());
SVGElementRareData::SVGElementRareDataMap& rareDataMap = SVGElementRareData::rareDataMap();
SVGElementRareData::SVGElementRareDataMap::iterator it = rareDataMap.find(this);
ASSERT(it != rareDataMap.end());
delete rareData;
rareDataMap.remove(it);
}
+ ASSERT(document());
document()->accessSVGExtensions()->removeAllAnimationElementsFromTarget(this);
document()->accessSVGExtensions()->removeAllElementReferencesForTarget(this);
}
if (wasInDocument) {
document()->accessSVGExtensions()->removeAllAnimationElementsFromTarget(this);
document()->accessSVGExtensions()->removeAllElementReferencesForTarget(this);
+ document()->accessSVGExtensions()->removeElementFromPendingResources(this);
}
}
svgAttributeChanged(name);
}
+bool SVGElement::hasPendingResources() const
+{
+ return hasSVGRareData() && svgRareData()->hasPendingResources();
+}
+
+void SVGElement::setHasPendingResources()
+{
+ ensureSVGRareData()->setHasPendingResources(true);
+}
+
+void SVGElement::clearHasPendingResourcesIfPossible()
+{
+ if (!document()->accessSVGExtensions()->isElementPendingResources(this))
+ ensureSVGRareData()->setHasPendingResources(false);
+}
+
void SVGElement::updateAnimatedSVGAttribute(const QualifiedName& name) const
{
if (isSynchronizingSVGAttributes() || areSVGAttributesValid())