当前位置: 首页>>代码示例>>C++>>正文


C++ SVGResourcesCache::removeResourcesFromLayoutObject方法代码示例

本文整理汇总了C++中SVGResourcesCache::removeResourcesFromLayoutObject方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGResourcesCache::removeResourcesFromLayoutObject方法的具体用法?C++ SVGResourcesCache::removeResourcesFromLayoutObject怎么用?C++ SVGResourcesCache::removeResourcesFromLayoutObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SVGResourcesCache的用法示例。


在下文中一共展示了SVGResourcesCache::removeResourcesFromLayoutObject方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: clientWillBeRemovedFromTree

void SVGResourcesCache::clientWillBeRemovedFromTree(LayoutObject* layoutObject)
{
    if (!layoutObject->node())
        return;
    LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(layoutObject, false);

    if (!layoutObjectCanHaveResources(layoutObject))
        return;
    SVGResourcesCache* cache = resourcesCacheFromLayoutObject(layoutObject);
    cache->removeResourcesFromLayoutObject(layoutObject);
}
开发者ID:alexanderbill,项目名称:blink-crosswalk,代码行数:11,代码来源:SVGResourcesCache.cpp

示例2: clientDestroyed

void SVGResourcesCache::clientDestroyed(LayoutObject* layoutObject)
{
    ASSERT(layoutObject);

    SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(layoutObject);
    if (resources)
        resources->removeClientFromCache(layoutObject);

    SVGResourcesCache* cache = resourcesCacheFromLayoutObject(layoutObject);
    cache->removeResourcesFromLayoutObject(layoutObject);
}
开发者ID:alexanderbill,项目名称:blink-crosswalk,代码行数:11,代码来源:SVGResourcesCache.cpp

示例3: resourceDestroyed

void SVGResourcesCache::resourceDestroyed(LayoutSVGResourceContainer* resource)
{
    ASSERT(resource);
    SVGResourcesCache* cache = resourcesCacheFromLayoutObject(resource);

    // The resource itself may have clients, that need to be notified.
    cache->removeResourcesFromLayoutObject(resource);

    for (auto& objectResources : cache->m_cache) {
        objectResources.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(objectResources.key->node());
        SVGDocumentExtensions& extensions = clientElement->document().accessSVGExtensions();

        extensions.addPendingResource(resourceElement->fastGetAttribute(HTMLNames::idAttr), clientElement);
    }
}
开发者ID:alexanderbill,项目名称:blink-crosswalk,代码行数:19,代码来源:SVGResourcesCache.cpp

示例4: clientStyleChanged

void SVGResourcesCache::clientStyleChanged(LayoutObject* layoutObject, StyleDifference diff, const ComputedStyle& newStyle)
{
    ASSERT(layoutObject);
    ASSERT(layoutObject->node());
    ASSERT(layoutObject->node()->isSVGElement());

    if (!diff.hasDifference() || !layoutObject->parent())
        return;

    // In this case the proper SVGFE*Element will decide whether the modified CSS properties require a relayout or paintInvalidation.
    if (layoutObject->isSVGResourceFilterPrimitive() && !diff.needsLayout())
        return;

    // Dynamic changes of CSS properties like 'clip-path' may require us to recompute the associated resources for a layoutObject.
    // FIXME: Avoid passing in a useless StyleDifference, but instead compare oldStyle/newStyle to see which resources changed
    // to be able to selectively rebuild individual resources, instead of all of them.
    if (layoutObjectCanHaveResources(layoutObject)) {
        SVGResourcesCache* cache = resourcesCacheFromLayoutObject(layoutObject);
        cache->removeResourcesFromLayoutObject(layoutObject);
        cache->addResourcesFromLayoutObject(layoutObject, newStyle);
    }

    LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(layoutObject, false);
}
开发者ID:alexanderbill,项目名称:blink-crosswalk,代码行数:24,代码来源:SVGResourcesCache.cpp


注:本文中的SVGResourcesCache::removeResourcesFromLayoutObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。