void RenderTableRow::layout() { StackStats::LayoutCheckPoint layoutCheckPoint; ASSERT(needsLayout()); // Table rows do not add translation. LayoutStateMaintainer statePusher(view(), *this, LayoutSize(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode()); bool paginated = view().layoutState()->isPaginated(); for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { if (!cell->needsLayout() && paginated && (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset()))) cell->setChildNeedsLayout(MarkOnlyThis); if (cell->needsLayout()) { cell->computeAndSetBlockDirectionMargins(table()); cell->layout(); } } // We only ever need to repaint if our cells didn't, which menas that they didn't need // layout, so we know that our bounds didn't change. This code is just making up for // the fact that we did not repaint in setStyle() because we had a layout hint. // We cannot call repaint() because our clippedOverflowRectForRepaint() is taken from the // parent table, and being mid-layout, that is invalid. Instead, we repaint our cells. if (selfNeedsLayout() && checkForRepaintDuringLayout()) { for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) cell->repaint(); } statePusher.pop(); // RenderTableSection::layoutRows will set our logical height and width later, so it calls updateLayerTransform(). clearNeedsLayout(); }
void RenderTableRow::layout() { ASSERT(needsLayout()); // Table rows do not add translation. LayoutStateMaintainer statePusher(*this, LayoutSize()); for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { if (child->isTableCell()) { SubtreeLayoutScope layouter(child); RenderTableCell* cell = toRenderTableCell(child); if (!cell->needsLayout()) cell->markForPaginationRelayoutIfNeeded(layouter); if (cell->needsLayout()) { cell->computeAndSetBlockDirectionMargins(table()); cell->layout(); } } } m_overflow.clear(); addVisualEffectOverflow(); // We only ever need to repaint if our cells didn't, which means that they didn't need // layout, so we know that our bounds didn't change. This code is just making up for // the fact that we did not repaint in setStyle() because we had a layout hint. // We cannot call repaint() because our clippedOverflowRectForRepaint() is taken from the // parent table, and being mid-layout, that is invalid. Instead, we repaint our cells. if (selfNeedsLayout() && checkForRepaint()) { for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { if (child->isTableCell()) { if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { // FIXME: Is this needed with repaint After Layout? child->setShouldDoFullRepaintAfterLayout(true); } else { child->repaint(); } } } } // RenderTableSection::layoutRows will set our logical height and width later, so it calls updateLayerTransform(). clearNeedsLayout(); }
void RenderTableRow::layout() { ASSERT(needsLayout()); // Table rows do not add translation. LayoutStateMaintainer statePusher(view(), this, IntSize(), style()->isFlippedBlocksWritingMode()); bool paginated = view()->layoutState()->isPaginated(); for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { if (child->isTableCell()) { RenderTableCell* cell = toRenderTableCell(child); if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->logicalTop()) != cell->pageLogicalOffset()) cell->setChildNeedsLayout(true, false); if (child->needsLayout()) { cell->computeBlockDirectionMargins(table()); cell->layout(); } } } // We only ever need to repaint if our cells didn't, which menas that they didn't need // layout, so we know that our bounds didn't change. This code is just making up for // the fact that we did not repaint in setStyle() because we had a layout hint. // We cannot call repaint() because our clippedOverflowRectForRepaint() is taken from the // parent table, and being mid-layout, that is invalid. Instead, we repaint our cells. if (selfNeedsLayout() && checkForRepaintDuringLayout()) { for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { if (child->isTableCell()) child->repaint(); } } statePusher.pop(); // RenderTableSection::layoutRows will set our logical height and width later, so it calls updateLayerTransform(). setNeedsLayout(false); }