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


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

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


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


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