Index: Source/core/rendering/RenderTableSection.cpp |
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp |
index 3d10b9e684a3f0eea39b64db6f858918bcc23d1b..336558b72d651b4cf8209c3334bbe8f84bbaf55d 100644 |
--- a/Source/core/rendering/RenderTableSection.cpp |
+++ b/Source/core/rendering/RenderTableSection.cpp |
@@ -1129,6 +1129,30 @@ void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned n |
ASSERT(hasOverflowingCell == this->hasOverflowingCell()); |
} |
+bool RenderTableSection::recalcOverflowForCellsAfterStyleChange() |
+{ |
+ unsigned totalRows = m_grid.size(); |
+ unsigned numEffCols = table()->numEffCols(); |
+ bool childrenOverflowChanged = false; |
+ |
+ // Now that our height has been determined, add in overflow from cells. |
+ for (unsigned r = 0; r < totalRows; r++) { |
+ for (unsigned c = 0; c < numEffCols; c++) { |
+ CellStruct& cs = cellAt(r, c); |
+ RenderTableCell* cell = cs.primaryCell(); |
+ if (!cell || cs.inColSpan || !cell->needsOverflowRecalcAfterStyleChange()) |
+ continue; |
+ if (cell->recalcOverflowAfterStyleChange()) |
+ childrenOverflowChanged = true; |
+ } |
+ } |
Julien - ping for review
2014/11/22 02:35:04
Recomputing the overflow is now O(columns*rows) :(
Xianzhu
2014/11/24 17:23:00
I think it's
[O(columns*rows) of cost_of_testing
|
+ |
+ if (childrenOverflowChanged) |
+ computeOverflowFromCells(totalRows, numEffCols); |
+ |
+ return childrenOverflowChanged; |
+} |
+ |
int RenderTableSection::calcBlockDirectionOuterBorder(BlockBorderSide side) const |
{ |
unsigned totalCols = table()->numEffCols(); |