Chromium Code Reviews| Index: Source/core/rendering/RenderTableSection.cpp |
| diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp |
| index bd7863a888193166d5e2e6691dcad701864ba5af..d3cc69da5037fecc910f3e33ec5cfcdd08d9920d 100644 |
| --- a/Source/core/rendering/RenderTableSection.cpp |
| +++ b/Source/core/rendering/RenderTableSection.cpp |
| @@ -288,8 +288,8 @@ void RenderTableSection::populateSpanningRowsHeightFromCell(RenderTableCell* cel |
| unsigned actualRow = row + rowIndex; |
| spanningRowsHeight.rowHeight[row] = m_rowPos[actualRow + 1] - m_rowPos[actualRow] - borderSpacingForRow(actualRow); |
| - if (!spanningRowsHeight.rowHeight[row]) |
| - spanningRowsHeight.rowWithOnlySpanningCells |= rowHasOnlySpanningCells(actualRow); |
| + if (!spanningRowsHeight.rowWithOnlySpanningCells && !spanningRowsHeight.rowHeight[row]) |
|
Julien - ping for review
2014/02/06 20:30:45
You misunderstood what I said: this code is equiva
a.suchit
2014/02/18 13:07:10
We are checking all the rows of rowspanning cell.
|
| + spanningRowsHeight.rowWithOnlySpanningCells = rowHasOnlySpanningCells(actualRow); |
| spanningRowsHeight.totalRowsHeight += spanningRowsHeight.rowHeight[row]; |
| spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing -= borderSpacingForRow(actualRow); |
| @@ -542,14 +542,28 @@ void RenderTableSection::distributeRowSpanHeightToRows(SpanningRenderTableCells& |
| populateSpanningRowsHeightFromCell(cell, spanningRowsHeight); |
| + // if only spanning cells are present in spanning rows then apply height based on spanning cells. |
| + // Here we are handling only row(s) who have only rowspanning cells and do not have any empty cell. |
| if (spanningRowsHeight.rowWithOnlySpanningCells) |
| updateRowsHeightHavingOnlySpanningCells(cell, spanningRowsHeight); |
| - if (!spanningRowsHeight.totalRowsHeight || spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing <= spanningRowsHeight.totalRowsHeight) { |
| + // else if total height of spanning rows are 0 then apply rowspanning cells height here. |
| + // Here we are handling only row(s) who have rowspanning cell(s) and at least one empty cell. |
|
Julien - ping for review
2014/02/06 20:30:45
I tried reading those comments several times but a
a.suchit
2014/02/18 13:07:10
Done.
|
| + if (!spanningRowsHeight.totalRowsHeight) { |
| + if (spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing) |
| + m_rowPos[rowIndex + rowSpan] += spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing + borderSpacingForRow(rowIndex + rowSpan - 1); |
|
Julien - ping for review
2014/02/06 20:30:45
This should be spanningCellEndIndex for consistenc
a.suchit
2014/02/18 13:07:10
Done.
|
| + |
| + extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBeforePosition; |
| + continue; |
|
Julien - ping for review
2014/02/06 20:30:45
My biggest issue with this code is that it will wr
|
| + } |
| + |
| + if (spanningRowsHeight.spanningCellHeightIgnoringBorderSpacing <= spanningRowsHeight.totalRowsHeight) { |
| extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBeforePosition; |
|
Julien - ping for review
2014/02/06 20:30:45
How does this ensures that we allocate all of span
a.suchit
2014/02/18 13:07:10
Spanning rows total height is already more then th
|
| continue; |
| } |
| + // else distribute extra height in percent rows, auto rows and fixed rows respectively. |
| + // Below we are handling only row(s) who have at least one visible cell without rowspan value. |
| int totalPercent = 0; |
| int totalAutoRowsHeight = 0; |
| int totalRemainingRowsHeight = spanningRowsHeight.totalRowsHeight; |