Index: Source/core/rendering/RenderTableSection.cpp |
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp |
index da4b53a56e5c1fb5c6908e7bd47bd46eca864cab..b49f47f6987963472b955849aa78f06dab026038 100644 |
--- a/Source/core/rendering/RenderTableSection.cpp |
+++ b/Source/core/rendering/RenderTableSection.cpp |
@@ -528,6 +528,9 @@ int RenderTableSection::calcRowLogicalHeight() |
m_rowPos[0] = 0; |
SpanningRenderTableCells rowSpanCells; |
+#ifndef NDEBUG |
+ HashSet<const RenderTableCell*> uniqueCells; |
+#endif |
for (unsigned r = 0; r < m_grid.size(); r++) { |
m_grid[r].baseline = 0; |
@@ -538,6 +541,7 @@ int RenderTableSection::calcRowLogicalHeight() |
Row& row = m_grid[r].row; |
unsigned totalCols = row.size(); |
+ RenderTableCell* lastRowSpanCell = 0; |
for (unsigned c = 0; c < totalCols; c++) { |
CellStruct& current = cellAt(r, c); |
@@ -549,8 +553,14 @@ int RenderTableSection::calcRowLogicalHeight() |
if (RuntimeEnabledFeatures::rowSpanLogicalHeightSpreadingEnabled()) { |
if (cell->rowSpan() > 1) { |
// For row spanning cells, we only handle them for the first row they span. This ensures we take their baseline into account. |
- if (cell->rowIndex() == r) { |
+ if (lastRowSpanCell != cell && cell->rowIndex() == r) { |
+#ifndef NDEBUG |
+ ASSERT(!uniqueCells.contains(cell)); |
+ uniqueCells.add(cell); |
+#endif |
+ |
rowSpanCells.append(cell); |
+ lastRowSpanCell = cell; |
// Find out the baseline. The baseline is set on the first row in a rowSpan. |
updateBaselineForCell(cell, r, baselineDescent); |