本文整理汇总了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;
}