void RenderFrameSet::layout() { StackStats::LayoutCheckPoint layoutCheckPoint; ASSERT(needsLayout()); bool doFullRepaint = selfNeedsLayout() && checkForRepaintDuringLayout(); LayoutRect oldBounds; RenderLayerModelObject* repaintContainer = 0; if (doFullRepaint) { repaintContainer = containerForRepaint(); oldBounds = clippedOverflowRectForRepaint(repaintContainer); } if (!parent()->isFrameSet() && !document().printing()) { setWidth(view().viewWidth()); setHeight(view().viewHeight()); } unsigned cols = frameSetElement().totalCols(); unsigned rows = frameSetElement().totalRows(); if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) { m_rows.resize(rows); m_cols.resize(cols); } LayoutUnit borderThickness = frameSetElement().border(); layOutAxis(m_rows, frameSetElement().rowLengths(), height() - (rows - 1) * borderThickness); layOutAxis(m_cols, frameSetElement().colLengths(), width() - (cols - 1) * borderThickness); if (flattenFrameSet()) positionFramesWithFlattening(); else positionFrames(); RenderBox::layout(); computeEdgeInfo(); updateLayerTransform(); if (doFullRepaint) { repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds)); LayoutRect newBounds = clippedOverflowRectForRepaint(repaintContainer); if (newBounds != oldBounds) repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBounds)); } clearNeedsLayout(); }
void RenderFrameSet::layout() { ASSERT(needsLayout()); bool doFullRepaint = selfNeedsLayout() && checkForRepaintDuringLayout(); IntRect oldBounds; if (doFullRepaint) oldBounds = absoluteClippedOverflowRect(); if (!parent()->isFrameSet() && !document()->printing()) { setWidth(view()->viewWidth()); setHeight(view()->viewHeight()); } size_t cols = frameSet()->totalCols(); size_t rows = frameSet()->totalRows(); if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) { m_rows.resize(rows); m_cols.resize(cols); } int borderThickness = frameSet()->border(); layOutAxis(m_rows, frameSet()->rowLengths(), height() - (rows - 1) * borderThickness); layOutAxis(m_cols, frameSet()->colLengths(), width() - (cols - 1) * borderThickness); if (flattenFrameSet()) positionFramesWithFlattening(); else positionFrames(); RenderBox::layout(); computeEdgeInfo(); if (doFullRepaint) { view()->repaintViewRectangle(oldBounds); IntRect newBounds = absoluteClippedOverflowRect(); if (newBounds != oldBounds) view()->repaintViewRectangle(newBounds); } setNeedsLayout(false); }
void RenderFrameSet::layout() { ASSERT(needsLayout()); bool doFullRepaint = selfNeedsLayout() && checkForRepaintDuringLayout(); IntRect oldBounds; if (doFullRepaint) oldBounds = absoluteClippedOverflowRect(); if (!parent()->isFrameSet() && !document()->printing()) { #ifdef FLATTEN_FRAMESET // Force a grid recalc. m_gridCalculated = false; #endif m_width = view()->viewWidth(); m_height = view()->viewHeight(); } size_t cols = frameSet()->totalCols(); size_t rows = frameSet()->totalRows(); if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) { m_rows.resize(rows); m_cols.resize(cols); #ifdef FLATTEN_FRAMESET m_gridCalculated = false; #endif } #ifdef FLATTEN_FRAMESET if (!m_gridCalculated) { m_gridCalculated = true; // Make all the child framesets recalculate their grid. RenderObject* child = firstChild(); for (; child; child = child->nextSibling()) { if (child->isFrameSet()) static_cast<RenderFrameSet*>(child)->setGridNeedsLayout(); } #endif int borderThickness = frameSet()->border(); layOutAxis(m_rows, frameSet()->rowLengths(), m_height - (rows - 1) * borderThickness); layOutAxis(m_cols, frameSet()->colLengths(), m_width - (cols - 1) * borderThickness); #ifdef FLATTEN_FRAMESET } #endif positionFrames(); RenderContainer::layout(); computeEdgeInfo(); if (doFullRepaint) { view()->repaintViewRectangle(oldBounds); IntRect newBounds = absoluteClippedOverflowRect(); if (newBounds != oldBounds) view()->repaintViewRectangle(newBounds); } setNeedsLayout(false); }