本文整理汇总了C++中SVGDocumentExtensions::removePendingResource方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGDocumentExtensions::removePendingResource方法的具体用法?C++ SVGDocumentExtensions::removePendingResource怎么用?C++ SVGDocumentExtensions::removePendingResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGDocumentExtensions
的用法示例。
在下文中一共展示了SVGDocumentExtensions::removePendingResource方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: registerResource
void RenderSVGResourceContainer::registerResource()
{
SVGDocumentExtensions* extensions = svgExtensionsFromNode(node());
if (!extensions->hasPendingResource(m_id)) {
extensions->addResource(m_id, this);
return;
}
OwnPtr<SVGDocumentExtensions::SVGPendingElements> clients(extensions->removePendingResource(m_id));
// Cache us with the new id.
extensions->addResource(m_id, this);
// Update cached resources of pending clients.
const SVGDocumentExtensions::SVGPendingElements::const_iterator end = clients->end();
for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients->begin(); it != end; ++it) {
ASSERT((*it)->hasPendingResources());
extensions->clearHasPendingResourcesIfPossible(*it);
RenderObject* renderer = (*it)->renderer();
if (!renderer)
continue;
SVGResourcesCache::clientStyleChanged(renderer, StyleDifferenceLayout, renderer->style());
renderer->setNeedsLayout(true);
}
}
示例2: insertedIntoDocument
void SVGElement::insertedIntoDocument()
{
StyledElement::insertedIntoDocument();
SVGDocumentExtensions* extensions = document()->accessSVGExtensions();
String resourceId = SVGURIReference::getTarget(id());
if (extensions->isPendingResource(resourceId)) {
std::auto_ptr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResource(resourceId));
if (clients->isEmpty())
return;
HashSet<SVGStyledElement*>::const_iterator it = clients->begin();
const HashSet<SVGStyledElement*>::const_iterator end = clients->end();
for (; it != end; ++it)
(*it)->buildPendingResource();
SVGResource::invalidateClients(*clients);
}
}