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