Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1239)

Unified Diff: Source/core/rendering/RenderTableSection.cpp

Issue 744493002: Let RenderTable reach table cells needing overflow recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderTableSection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableSection.cpp
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp
index f1983f60442b97de4e318913bdadcee70a486cf4..9c0cf08d9b6bf851be925d3a368ea7e0bb52865a 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -943,9 +943,6 @@ void RenderTableSection::layoutRows()
// Set the width of our section now. The rows will also be this width.
setLogicalWidth(table()->contentLogicalWidth());
- m_overflow.clear();
- m_overflowingCells.clear();
- m_forceSlowPaintPathWithOverflowingCell = false;
int vspacing = table()->vBorderSpacing();
unsigned nEffCols = table()->numEffCols();
@@ -960,8 +957,6 @@ void RenderTableSection::layoutRows()
rowRenderer->setLogicalWidth(logicalWidth());
rowRenderer->setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspacing);
rowRenderer->updateLayerTransformAfterLayout();
- rowRenderer->clearAllOverflows();
- rowRenderer->addVisualEffectOverflow();
}
int rowHeightIncreaseForPagination = 0;
@@ -1053,9 +1048,6 @@ void RenderTableSection::layoutRows()
cell->computeOverflow(oldLogicalHeight, false);
}
- if (rowRenderer)
- rowRenderer->addOverflowFromCell(cell);
-
LayoutSize childOffset(cell->location() - oldCellRect.location());
if (childOffset.width() || childOffset.height()) {
// If the child moved, we have to issue paint invalidations to it as well as any floating/positioned
@@ -1077,6 +1069,9 @@ void RenderTableSection::layoutRows()
}
}
}
+
+ if (rowRenderer)
+ rowRenderer->recomputeOverflow();
}
ASSERT(!needsLayout());
@@ -1098,6 +1093,10 @@ void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
unsigned totalCellsCount = nEffCols * totalRows;
unsigned maxAllowedOverflowingCellsCount = totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell ? 0 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount;
+ m_overflow.clear();
+ m_overflowingCells.clear();
+ m_forceSlowPaintPathWithOverflowingCell = false;
+
#if ENABLE(ASSERT)
bool hasOverflowingCell = false;
#endif
@@ -1129,6 +1128,41 @@ void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n
ASSERT(hasOverflowingCell == this->hasOverflowingCell());
}
+bool RenderTableSection::recalcChildOverflowAfterStyleChange()
+{
+ ASSERT(childNeedsOverflowRecalcAfterStyleChange());
+ clearChildNeedsOverflowRecalcAfterStyleChange();
+
+ unsigned totalRows = m_grid.size();
+ unsigned numEffCols = table()->numEffCols();
+ bool childrenOverflowChanged = false;
+
+ for (unsigned r = 0; r < totalRows; r++) {
+ RenderTableRow* rowRenderer = rowRendererAt(r);
+ if (!rowRenderer || !rowRenderer->childNeedsOverflowRecalcAfterStyleChange())
+ continue;
+
+ rowRenderer->clearChildNeedsOverflowRecalcAfterStyleChange();
+
+ bool rowChildrenOverflowChanged = false;
+ for (unsigned c = 0; c < numEffCols; c++) {
+ CellStruct& cs = cellAt(r, c);
+ RenderTableCell* cell = cs.primaryCell();
+ if (!cell || cs.inColSpan || !cell->needsOverflowRecalcAfterStyleChange())
+ continue;
+ rowChildrenOverflowChanged |= cell->recalcOverflowAfterStyleChange();
+ }
+ if (rowChildrenOverflowChanged)
+ rowRenderer->recomputeOverflow();
+ childrenOverflowChanged |= rowChildrenOverflowChanged;
+ }
+
+ if (childrenOverflowChanged)
+ computeOverflowFromCells(totalRows, numEffCols);
+
+ return childrenOverflowChanged;
+}
+
int RenderTableSection::calcBlockDirectionOuterBorder(BlockBorderSide side) const
{
unsigned totalCols = table()->numEffCols();
« no previous file with comments | « Source/core/rendering/RenderTableSection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698