void RenderReplaced::layout() { ASSERT(needsLayout()); setHeight(minimumReplacedHeight()); updateLogicalWidth(); updateLogicalHeight(); m_overflow.clear(); addVisualEffectOverflow(); updateLayerTransformAfterLayout(); clearNeedsLayout(); }
void RenderSVGRoot::layout() { StackStats::LayoutCheckPoint layoutCheckPoint; ASSERT(needsLayout()); m_resourcesNeedingToInvalidateClients.clear(); // Arbitrary affine transforms are incompatible with LayoutState. LayoutStateDisabler layoutStateDisabler(view()); bool needsLayout = selfNeedsLayout(); LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout); LayoutSize oldSize = size(); updateLogicalWidth(); updateLogicalHeight(); buildLocalToBorderBoxTransform(); SVGSVGElement* svg = toSVGSVGElement(node()); ASSERT(svg); m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size()); SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this)); if (!m_resourcesNeedingToInvalidateClients.isEmpty()) { // Invalidate resource clients, which may mark some nodes for layout. HashSet<RenderSVGResourceContainer*>::iterator end = m_resourcesNeedingToInvalidateClients.end(); for (HashSet<RenderSVGResourceContainer*>::iterator it = m_resourcesNeedingToInvalidateClients.begin(); it != end; ++it) (*it)->removeAllClientsFromCache(); m_isLayoutSizeChanged = false; SVGRenderSupport::layoutChildren(this, false); } // At this point LayoutRepainter already grabbed the old bounds, // recalculate them now so repaintAfterLayout() uses the new bounds. if (m_needsBoundariesOrTransformUpdate) { updateCachedBoundaries(); m_needsBoundariesOrTransformUpdate = false; } updateLayerTransform(); repainter.repaintAfterLayout(); setNeedsLayout(false); }
void RenderMultiColumnBlock::checkForPaginationLogicalHeightChange(LayoutUnit& /*pageLogicalHeight*/, bool& /*pageLogicalHeightChanged*/, bool& /*hasSpecifiedPageLogicalHeight*/) { // We don't actually update any of the variables. We just subclassed to adjust our column height. updateLogicalHeight(); LayoutUnit newContentLogicalHeight = contentLogicalHeight(); m_requiresBalancing = !newContentLogicalHeight; if (!m_requiresBalancing) { // The regions will be invalidated when we lay them out and they change size to // the new column height. if (columnHeight() != newContentLogicalHeight) setColumnHeight(newContentLogicalHeight); } setLogicalHeight(0); // Set up our column sets. ensureColumnSets(); }
void RenderSVGRoot::layout() { ASSERT(needsLayout()); // Arbitrary affine transforms are incompatible with LayoutState. LayoutStateDisabler layoutStateDisabler(*this); bool needsLayout = selfNeedsLayout(); LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout); LayoutSize oldSize = size(); updateLogicalWidth(); updateLogicalHeight(); buildLocalToBorderBoxTransform(); SVGRenderSupport::layoutResourcesIfNeeded(this); SVGSVGElement* svg = toSVGSVGElement(node()); ASSERT(svg); m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size()); SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this)); // At this point LayoutRepainter already grabbed the old bounds, // recalculate them now so repaintAfterLayout() uses the new bounds. if (m_needsBoundariesOrTransformUpdate) { updateCachedBoundaries(); m_needsBoundariesOrTransformUpdate = false; } m_overflow.clear(); addVisualEffectOverflow(); if (!shouldApplyViewportClip()) { FloatRect contentRepaintRect = repaintRectInLocalCoordinates(); contentRepaintRect = m_localToBorderBoxTransform.mapRect(contentRepaintRect); addVisualOverflow(enclosingLayoutRect(contentRepaintRect)); } updateLayerTransform(); m_hasBoxDecorations = isDocumentElement() ? calculateHasBoxDecorations() : hasBoxDecorations(); invalidateBackgroundObscurationStatus(); repainter.repaintAfterLayout(); clearNeedsLayout(); }
void RenderReplaced::layout() { ASSERT(needsLayout()); LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); setHeight(minimumReplacedHeight()); updateLogicalWidth(); updateLogicalHeight(); m_overflow.clear(); addVisualEffectOverflow(); updateLayerTransform(); repainter.repaintAfterLayout(); setNeedsLayout(false); }
void RenderReplaced::layout() { StackStats::LayoutCheckPoint layoutCheckPoint; ASSERT(needsLayout()); LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); setHeight(minimumReplacedHeight()); updateLogicalWidth(); updateLogicalHeight(); clearOverflow(); addVisualEffectOverflow(); updateLayerTransform(); invalidateBackgroundObscurationStatus(); repainter.repaintAfterLayout(); clearNeedsLayout(); }
void RenderSVGRoot::layout() { ASSERT(needsLayout()); // Arbitrary affine transforms are incompatible with LayoutState. ForceHorriblySlowRectMapping slowRectMapping(*this); bool needsLayout = selfNeedsLayout(); LayoutSize oldSize = size(); updateLogicalWidth(); updateLogicalHeight(); buildLocalToBorderBoxTransform(); SVGRenderSupport::layoutResourcesIfNeeded(this); SVGSVGElement* svg = toSVGSVGElement(node()); ASSERT(svg); m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size()); SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this)); if (m_needsBoundariesOrTransformUpdate) { updateCachedBoundaries(); m_needsBoundariesOrTransformUpdate = false; } m_overflow.clear(); addVisualEffectOverflow(); if (!shouldApplyViewportClip()) { FloatRect contentRepaintRect = paintInvalidationRectInLocalCoordinates(); contentRepaintRect = m_localToBorderBoxTransform.mapRect(contentRepaintRect); addVisualOverflow(enclosingLayoutRect(contentRepaintRect)); } updateLayerTransformAfterLayout(); m_hasBoxDecorationBackground = isDocumentElement() ? calculateHasBoxDecorations() : hasBoxDecorationBackground(); invalidateBackgroundObscurationStatus(); clearNeedsLayout(); }
void RenderReplaced::layout() { ASSERT(needsLayout()); LayoutRect oldContentRect = replacedContentRect(); setHeight(minimumReplacedHeight()); updateLogicalWidth(); updateLogicalHeight(); m_overflow.clear(); addVisualEffectOverflow(); updateLayerTransformAfterLayout(); invalidateBackgroundObscurationStatus(); clearNeedsLayout(); if (replacedContentRect() != oldContentRect) setShouldDoFullPaintInvalidation(); }
void LayoutReplaced::layout() { ASSERT(needsLayout()); LayoutAnalyzer::Scope analyzer(*this); LayoutRect oldContentRect = replacedContentRect(); setHeight(minimumReplacedHeight()); updateLogicalWidth(); updateLogicalHeight(); m_overflow.clear(); addVisualEffectOverflow(); updateLayerTransformAfterLayout(); invalidateBackgroundObscurationStatus(); clearNeedsLayout(); if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && replacedContentRect() != oldContentRect) setShouldDoFullPaintInvalidation(); }
void LayoutMultiColumnSpannerPlaceholder::layout() { ASSERT(needsLayout()); // The placeholder, like any other block level object, has its logical top calculated and set // before layout. Copy this to the actual column-span:all object before laying it out, so that // it gets paginated correctly, in case we have an enclosing fragmentation context. m_layoutObjectInFlowThread->setLogicalTop(logicalTop()); // Lay out the actual column-span:all element. m_layoutObjectInFlowThread->layoutIfNeeded(); // The spanner has now been laid out, so its height is known. Time to update the placeholder's // height as well, so that we take up the correct amount of space in the multicol container. updateLogicalHeight(); // Take the overflow from the spanner, so that it gets // propagated to the multicol container and beyond. m_overflow.reset(); addContentsVisualOverflow(m_layoutObjectInFlowThread->visualOverflowRect()); addLayoutOverflow(m_layoutObjectInFlowThread->layoutOverflowRect()); clearNeedsLayout(); }
void RenderHTMLCanvas::canvasSizeChanged() { IntSize canvasSize = toHTMLCanvasElement(node())->size(); if (canvasSize == intrinsicSize()) return; setIntrinsicSize(canvasSize); if (!parent()) return; if (!preferredLogicalWidthsDirty()) setPreferredLogicalWidthsDirty(); LayoutSize oldSize = size(); updateLogicalWidth(); updateLogicalHeight(); if (oldSize == size()) return; if (!selfNeedsLayout()) setNeedsLayoutAndFullPaintInvalidation(); }