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


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

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


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

示例1: clientStyleChanged

void SVGResourcesCache::clientStyleChanged(RenderObject* renderer, StyleDifference diff, const RenderStyle* newStyle)
{
    ASSERT(renderer);
    if (diff == StyleDifferenceEqual || !renderer->parent())
        return;

    // In this case the proper SVGFE*Element will decide whether the modified CSS properties require a relayout or repaint.
    if (renderer->isSVGResourceFilterPrimitive() && (diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintIfText))
        return;

    // Dynamic changes of CSS properties like 'clip-path' may require us to recompute the associated resources for a renderer.
    // 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 (rendererCanHaveResources(renderer)) {
        SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
        cache->removeResourcesFromRenderObject(renderer);
        cache->addResourcesFromRenderObject(renderer, newStyle);
    }

    RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);

    // FIXME: This doesn't look right, we often go through here in styleDidChange which means
    // we're changing the needsStyleRecalc bits in the middle of recalcStyle on ourself which
    // makes no sense. It's also not clear why we'd go through here for non-SVG elements.
    if (renderer->node() && !renderer->node()->isSVGElement())
        renderer->node()->setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer);
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:27,代码来源:SVGResourcesCache.cpp

示例2: clientUpdatedFromElement

void SVGResourcesCache::clientUpdatedFromElement(RenderObject* renderer, const RenderStyle* newStyle)
{
    ASSERT(renderer);
    ASSERT(renderer->parent());

    SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
    cache->removeResourcesFromRenderObject(renderer);
    cache->addResourcesFromRenderObject(renderer, newStyle);
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:9,代码来源:SVGResourcesCache.cpp

示例3: clientDestroyed

void SVGResourcesCache::clientDestroyed(RenderObject* renderer)
{
    ASSERT(renderer);

    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
    if (resources)
        resources->removeClientFromCache(renderer);

    SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
    cache->removeResourcesFromRenderObject(renderer);
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:11,代码来源:SVGResourcesCache.cpp

示例4: clientWillBeRemovedFromTree

void SVGResourcesCache::clientWillBeRemovedFromTree(RenderObject* renderer)
{
    if (!renderer->node())
        return;
    RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);

    if (!rendererCanHaveResources(renderer))
        return;
    SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
    cache->removeResourcesFromRenderObject(renderer);
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:11,代码来源:SVGResourcesCache.cpp

示例5: 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);
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:12,代码来源:SVGResourcesCache.cpp

示例6: clientUpdatedFromElement

void SVGResourcesCache::clientUpdatedFromElement(RenderObject* renderer, const RenderStyle* newStyle)
{
    ASSERT(renderer);
    ASSERT(renderer->parent());

    SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
    cache->removeResourcesFromRenderObject(renderer);
    cache->addResourcesFromRenderObject(renderer, newStyle);

#if ENABLE(FILTERS)
    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
    if (resources && resources->filter())
        resources->removeClientFromCache(renderer);
#endif
}
开发者ID:1833183060,项目名称:wke,代码行数:15,代码来源:SVGResourcesCache.cpp

示例7: 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);
    }
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:20,代码来源:SVGResourcesCache.cpp

示例8: clientStyleChanged

void SVGResourcesCache::clientStyleChanged(RenderObject* renderer, StyleDifference diff, const RenderStyle* newStyle)
{
    ASSERT(renderer);
    ASSERT(renderer->node());
    ASSERT(renderer->node()->isSVGElement());

    if (diff == StyleDifferenceEqual || !renderer->parent())
        return;

    // In this case the proper SVGFE*Element will decide whether the modified CSS properties require a relayout or repaint.
    if (renderer->isSVGResourceFilterPrimitive() && diff == StyleDifferenceRepaint)
        return;

    // Dynamic changes of CSS properties like 'clip-path' may require us to recompute the associated resources for a renderer.
    // 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 (rendererCanHaveResources(renderer)) {
        SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
        cache->removeResourcesFromRenderObject(renderer);
        cache->addResourcesFromRenderObject(renderer, newStyle);
    }

    RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);
}
开发者ID:jeremyroman,项目名称:blink,代码行数:24,代码来源:SVGResourcesCache.cpp

示例9: clientDestroyed

void SVGResourcesCache::clientDestroyed(RenderObject* renderer)
{
    ASSERT(renderer);
    SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
    cache->removeResourcesFromRenderObject(renderer);
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:6,代码来源:SVGResourcesCache.cpp


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