本文整理汇总了C++中StyleDifference::needsFullLayout方法的典型用法代码示例。如果您正苦于以下问题:C++ StyleDifference::needsFullLayout方法的具体用法?C++ StyleDifference::needsFullLayout怎么用?C++ StyleDifference::needsFullLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StyleDifference
的用法示例。
在下文中一共展示了StyleDifference::needsFullLayout方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: styleDidChange
void LayoutTableRow::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
ASSERT(style()->display() == TABLE_ROW);
LayoutBox::styleDidChange(diff, oldStyle);
propagateStyleToAnonymousChildren();
if (section() && oldStyle && style()->logicalHeight() != oldStyle->logicalHeight())
section()->rowLogicalHeightChanged(this);
// If border was changed, notify table.
if (parent()) {
LayoutTable* table = this->table();
if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border())
table->invalidateCollapsedBorders();
if (table && oldStyle && diff.needsFullLayout() && needsLayout() && table->collapseBorders() && borderWidthChanged(oldStyle, style())) {
// If the border width changes on a row, we need to make sure the cells in the row know to lay out again.
// This only happens when borders are collapsed, since they end up affecting the border sides of the cell
// itself.
for (LayoutBox* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
if (!childBox->isTableCell())
continue;
childBox->setChildNeedsLayout();
}
}
}
}
示例2: styleWillChange
void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
{
s_wasFloating = isFloating();
// If our z-index changes value or our visibility changes,
// we need to dirty our stacking context's z-order list.
RenderStyle* oldStyle = style();
if (oldStyle) {
// Do a repaint with the old style first through RenderLayerRepainter.
// RenderObject::styleWillChange takes care of repainting objects without RenderLayers.
if (parent() && diff.needsRepaintLayer()) {
layer()->repainter().repaintIncludingNonCompositingDescendants();
if (oldStyle->hasClip() != newStyle.hasClip()
|| oldStyle->clip() != newStyle.clip())
layer()->clipper().clearClipRectsIncludingDescendants();
} else if (diff.needsFullLayout()) {
if (hasLayer()) {
if (!layer()->hasCompositedLayerMapping() && oldStyle->position() != newStyle.position())
layer()->repainter().repaintIncludingNonCompositingDescendants();
} else if (newStyle.hasTransform() || newStyle.opacity() < 1 || newStyle.hasFilter()) {
// If we don't have a layer yet, but we are going to get one because of transform or opacity,
// then we need to repaint the old position of the object.
paintInvalidationForWholeRenderer();
}
}
}
RenderObject::styleWillChange(diff, newStyle);
}
示例3: styleDidChange
void LayoutSVGInline::styleDidChange(StyleDifference diff,
const ComputedStyle* oldStyle) {
if (diff.needsFullLayout())
setNeedsBoundariesUpdate();
LayoutInline::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, styleRef());
}
示例4: styleDidChange
void RenderSVGBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
if (diff.needsFullLayout())
setNeedsBoundariesUpdate();
RenderBlock::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, style());
}
示例5: styleDidChange
void RenderSVGModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
if (diff.needsFullLayout()) {
setNeedsBoundariesUpdate();
if (style()->hasTransform())
setNeedsTransformUpdate();
}
RenderObject::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, style());
}
示例6: styleDidChange
void LayoutSVGRoot::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
if (diff.needsFullLayout())
setNeedsBoundariesUpdate();
if (diff.needsPaintInvalidation()) {
// Box decorations may have appeared/disappeared - recompute status.
m_hasBoxDecorationBackground = calculateHasBoxDecorations();
}
LayoutReplaced::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, styleRef());
}
示例7: styleDidChange
void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
if (diff.needsFullLayout())
setNeedsBoundariesUpdate();
if (diff.needsRepaint()) {
// Box decorations may have appeared/disappeared - recompute status.
m_hasBoxDecorations = calculateHasBoxDecorations();
}
RenderReplaced::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, style());
}
示例8: styleDidChange
void LayoutSVGBlock::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
if (diff.needsFullLayout())
setNeedsBoundariesUpdate();
if (isBlendingAllowed()) {
bool hasBlendModeChanged = (oldStyle && oldStyle->hasBlendMode()) == !style()->hasBlendMode();
if (parent() && hasBlendModeChanged)
parent()->descendantIsolationRequirementsChanged(style()->hasBlendMode() ? DescendantIsolationRequired : DescendantIsolationNeedsUpdate);
}
LayoutBlock::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, styleRef());
}
示例9: styleDidChange
void LayoutSVGRect::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
if (diff.needsFullLayout() && oldStyle) {
const SVGComputedStyle& oldSvgStyle = oldStyle->svgStyle();
const SVGComputedStyle& svgStyle = style()->svgStyle();
if (oldSvgStyle.rx() != svgStyle.rx()
|| oldSvgStyle.ry() != svgStyle.ry()
|| oldSvgStyle.vectorEffect() != svgStyle.vectorEffect()
|| definitelyHasSimpleStroke(oldSvgStyle) != definitelyHasSimpleStroke(svgStyle))
setNeedsShapeUpdate();
}
// Superclass will take care of calling clientStyleChanged.
LayoutSVGShape::styleDidChange(diff, oldStyle);
}
示例10: styleDidChange
void LayoutSVGInlineText::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
LayoutText::styleDidChange(diff, oldStyle);
updateScaledFont();
bool newPreserves = style() ? style()->whiteSpace() == PRE : false;
bool oldPreserves = oldStyle ? oldStyle->whiteSpace() == PRE : false;
if (oldPreserves != newPreserves) {
setText(originalText(), true);
return;
}
if (!diff.needsFullLayout())
return;
// The text metrics may be influenced by style changes.
if (LayoutSVGText* textLayoutObject = LayoutSVGText::locateLayoutSVGTextAncestor(this))
textLayoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::StyleChange);
}
示例11: styleDidChange
void RenderTextControlSingleLine::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
m_desiredInnerEditorLogicalHeight = -1;
RenderTextControl::styleDidChange(diff, oldStyle);
// We may have set the width and the height in the old style in layout().
// Reset them now to avoid getting a spurious layout hint.
Element* viewPort = editingViewPortElement();
if (RenderObject* viewPortRenderer = viewPort ? viewPort->renderer() : 0) {
viewPortRenderer->style()->setHeight(Length());
viewPortRenderer->style()->setWidth(Length());
}
Element* container = containerElement();
if (RenderObject* containerRenderer = container ? container->renderer() : 0) {
containerRenderer->style()->setHeight(Length());
containerRenderer->style()->setWidth(Length());
}
RenderObject* innerEditorRenderer = innerEditorElement()->renderer();
if (innerEditorRenderer && diff.needsFullLayout())
innerEditorRenderer->setNeedsLayoutAndFullPaintInvalidation();
if (HTMLElement* placeholder = inputElement()->placeholderElement())
placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldBeTruncated() ? CSSValueEllipsis : CSSValueClip);
setHasOverflowClip(false);
}