本文整理汇总了C++中SVGDocumentExtensions::addPendingResource方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGDocumentExtensions::addPendingResource方法的具体用法?C++ SVGDocumentExtensions::addPendingResource怎么用?C++ SVGDocumentExtensions::addPendingResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGDocumentExtensions
的用法示例。
在下文中一共展示了SVGDocumentExtensions::addPendingResource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resourceDestroyed
void SVGResourcesCache::resourceDestroyed(RenderSVGResourceContainer& resource)
{
SVGResourcesCache* cache = resourcesCacheFromRenderObject(resource);
// The resource itself may have clients, that need to be notified.
cache->removeResourcesFromRenderer(resource);
for (auto it = cache->m_cache.begin(), end = cache->m_cache.end(); it != end; ++it) {
it->value->resourceDestroyed(resource);
// Mark users of destroyed resources as pending resolution based on the id of the old resource.
Element& resourceElement = resource.element();
Element* clientElement = toElement(it->key->node());
SVGDocumentExtensions* extensions = clientElement->document().accessSVGExtensions();
extensions->addPendingResource(resourceElement.getIdAttribute(), clientElement);
}
}
示例2: resourceDestroyed
void SVGResourcesCache::resourceDestroyed(RenderSVGResourceContainer* resource)
{
ASSERT(resource);
SVGResourcesCache* cache = resourcesCacheFromRenderObject(resource);
// The resource itself may have clients, that need to be notified.
cache->removeResourcesFromRenderObject(resource);
HashMap<RenderObject*, SVGResources*>::iterator end = cache->m_cache.end();
for (HashMap<RenderObject*, SVGResources*>::iterator it = cache->m_cache.begin(); it != end; ++it) {
it->second->resourceDestroyed(resource);
// Mark users of destroyed resources as pending resolution based on the id of the old resource.
Element* resourceElement = toElement(resource->node());
SVGStyledElement* clientElement = toSVGStyledElement(it->first->node());
SVGDocumentExtensions* extensions = clientElement->document()->accessSVGExtensions();
extensions->addPendingResource(resourceElement->fastGetAttribute(HTMLNames::idAttr), clientElement);
}
}
示例3: registerPendingResource
static inline void registerPendingResource(SVGDocumentExtensions& extensions, const AtomicString& id, SVGElement& element)
{
extensions.addPendingResource(id, &element);
}