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

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

Issue 23526051: Optimize number of rowspan cells required to distribute their height in rows. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months 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 | « no previous file | 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 da4b53a56e5c1fb5c6908e7bd47bd46eca864cab..799a6962bdcc6ef6bea74cbb13ee80a68de5e412 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -538,6 +538,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 +550,9 @@ 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) {
rowSpanCells.append(cell);
suchit.agrawal 2013/09/16 22:05:11 #ifndef NDEBUG ASSERT(!uniqueCells.contains(cell))
Julien - ping for review 2013/09/16 23:03:02 HashSet<const RenderTableCell*> uniqueCells; ... b
a.suchit 2013/09/17 00:44:11 It would be local variable here. How will it work
+ lastRowSpanCell = cell;
// Find out the baseline. The baseline is set on the first row in a rowSpan.
updateBaselineForCell(cell, r, baselineDescent);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698