RenderObject* RenderMultiColumnBlock::layoutSpecialExcludedChild(bool relayoutChildren) { if (!m_flowThread) return 0; // Update the sizes of our regions (but not the placement) before we lay out the flow thread. // FIXME: Eventually this is going to get way more complicated, and we will be destroying regions // instead of trying to keep them around. bool shouldInvalidateRegions = false; for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) { if (childBox == m_flowThread) continue; if (relayoutChildren || childBox->needsLayout()) { childBox->updateLogicalWidth(); childBox->updateLogicalHeight(); shouldInvalidateRegions = true; } } if (shouldInvalidateRegions) m_flowThread->invalidateRegions(); if (relayoutChildren) m_flowThread->setChildNeedsLayout(true, MarkOnlyThis); setLogicalTopForChild(m_flowThread, borderBefore() + paddingBefore()); m_flowThread->layoutIfNeeded(); determineLogicalLeftPositionForChild(m_flowThread); return m_flowThread; }
RenderObject* RenderMultiColumnBlock::layoutSpecialExcludedChild(bool relayoutChildren) { if (!m_flowThread) return 0; // Update the dimensions of our regions before we lay out the flow thread. // FIXME: Eventually this is going to get way more complicated, and we will be destroying regions // instead of trying to keep them around. bool shouldInvalidateRegions = false; for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) { if (childBox == m_flowThread) continue; if (relayoutChildren || childBox->needsLayout()) { if (!m_inBalancingPass && childBox->isRenderMultiColumnSet()) toRenderMultiColumnSet(childBox)->prepareForLayout(); shouldInvalidateRegions = true; } } if (shouldInvalidateRegions) m_flowThread->invalidateRegions(); if (relayoutChildren) m_flowThread->setChildNeedsLayout(MarkOnlyThis); setLogicalTopForChild(*m_flowThread, borderAndPaddingBefore()); m_flowThread->layoutIfNeeded(); determineLogicalLeftPositionForChild(*m_flowThread); return m_flowThread; }
void RenderBlockFlow::layoutBlockChild(RenderBox* child) { child->computeAndSetBlockDirectionMargins(this); LayoutUnit marginBefore = marginBeforeForChild(child); child->setY(logicalHeight() + marginBefore); child->layoutIfNeeded(); determineLogicalLeftPositionForChild(child); setLogicalHeight(logicalHeight() + marginBefore + logicalHeightForChild(child) + marginAfterForChild(child)); }