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


C++ RenderElement::isSVGResourceFilterPrimitive方法代码示例

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


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

示例1: childrenChanged

void SVGFELightElement::childrenChanged(const ChildChange& change)
{
    SVGElement::childrenChanged(change);

    if (change.source == ChildChangeSourceParser)
        return;
    ContainerNode* parent = parentNode();
    if (!parent)
        return;
    RenderElement* renderer = parent->renderer();
    if (renderer && renderer->isSVGResourceFilterPrimitive())
        RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:13,代码来源:SVGFELightElement.cpp

示例2: invalidateFilterPrimitiveParent

void invalidateFilterPrimitiveParent(SVGElement* element)
{
    if (!element)
        return;

    ContainerNode* parent = element->parentNode();

    if (!parent)
        return;

    RenderElement* renderer = parent->renderer();
    if (!renderer || !renderer->isSVGResourceFilterPrimitive())
        return;

    RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer, false);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:16,代码来源:SVGFilterPrimitiveStandardAttributes.cpp

示例3: clientStyleChanged

void SVGResourcesCache::clientStyleChanged(RenderElement& renderer, StyleDifference diff, const RenderStyle& newStyle)
{
    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 == StyleDifferenceRepaintIfTextOrBorderOrOutline))
        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->removeResourcesFromRenderer(renderer);
        cache->addResourcesFromRenderer(renderer, newStyle);
    }

    RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);

    if (renderer.element() && !renderer.element()->isSVGElement())
        renderer.element()->setNeedsStyleRecalc(SyntheticStyleChange);
}
开发者ID:CannedFish,项目名称:webkitgtk,代码行数:23,代码来源:SVGResourcesCache.cpp


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