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


C++ StyleDifference::setNeedsFullLayout方法代码示例

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


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

示例1: visualInvalidationDiff

StyleDifference RenderStyle::visualInvalidationDiff(const RenderStyle& other) const
{
    // Note, we use .get() on each DataRef below because DataRef::operator== will do a deep
    // compare, which is duplicate work when we're going to compare each property inside
    // this function anyway.

    StyleDifference diff;

    if (diffNeedsFullLayout(other)) {
        diff.setNeedsFullLayout();
    } else if (position() != StaticPosition && surround->offset != other.surround->offset) {
        // Optimize for the case where a positioned layer is moving but not changing size.
        if (positionedObjectMovedOnly(surround->offset, other.surround->offset, m_box->width()))
            diff.setNeedsPositionedMovementLayout();
        else
            diff.setNeedsFullLayout();
    }

    updatePropertySpecificDifferences(other, diff);

    // Cursors are not checked, since they will be set appropriately in response to mouse events,
    // so they don't need to cause any paint invalidation or layout.

    return diff;
}
开发者ID:rmacnak-google,项目名称:engine,代码行数:25,代码来源:RenderStyle.cpp

示例2: registerResource

void RenderSVGResourceContainer::registerResource()
{
    SVGDocumentExtensions& extensions = svgExtensionsFromElement(element());
    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;

        StyleDifference diff;
        diff.setNeedsFullLayout();
        SVGResourcesCache::clientStyleChanged(renderer, diff, renderer->style());
        renderer->setNeedsLayoutAndFullPaintInvalidation();
    }
}
开发者ID:ewilligers,项目名称:blink,代码行数:28,代码来源:RenderSVGResourceContainer.cpp

示例3: diff

StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
{
    StyleDifference styleDifference;

    if (diffNeedsLayoutAndPaintInvalidation(other)) {
        styleDifference.setNeedsFullLayout();
        styleDifference.setNeedsPaintInvalidationObject();
    } else if (diffNeedsPaintInvalidation(other)) {
        styleDifference.setNeedsPaintInvalidationObject();
    }

    return styleDifference;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:13,代码来源:SVGRenderStyle.cpp

示例4: diff

StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
{
    StyleDifference styleDifference;

    if (diffNeedsLayoutAndRepaint(other)) {
        styleDifference.setNeedsFullLayout();
        styleDifference.setNeedsRepaintObject();
    } else if (diffNeedsRepaint(other)) {
        styleDifference.setNeedsRepaintObject();
    }

    return styleDifference;
}
开发者ID:ewilligers,项目名称:blink,代码行数:13,代码来源:SVGRenderStyle.cpp


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