Index: Source/core/rendering/RenderTableSection.cpp |
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp |
index b779a5f80271bb4b27681adf620986b14ac4f8b9..126d985dd04186c7f85db560b29a55d59fbc8e36 100644 |
--- a/Source/core/rendering/RenderTableSection.cpp |
+++ b/Source/core/rendering/RenderTableSection.cpp |
@@ -332,7 +332,7 @@ void RenderTableSection::distributeExtraRowSpanHeightToPercentRows(RenderTableCe |
for (unsigned row = rowIndex; row < (rowIndex + rowSpan); row++) { |
if (percent > 0 && extraRowSpanningHeight > 0) { |
if (m_grid[row].logicalHeight.isPercent()) { |
- int toAdd = (tableHeight * m_grid[row].logicalHeight.percent() / 100) - rowsHeight[row - rowIndex]; |
+ int toAdd = (tableHeight * std::ceil(m_grid[row].logicalHeight.percent()) / 100) - rowsHeight[row - rowIndex]; |
Julien - ping for review
2015/01/02 10:13:37
It's not a good change. 0.5% is not 1% but after t
a.suchit
2015/01/07 11:17:09
Yes you are right but should we start this change
Julien - ping for review
2015/01/07 13:30:10
As a rule floats should be used for local computat
|
// FIXME: Note that this is wrong if we have a percentage above 100% and may make us grow |
// above the available space. |
@@ -374,7 +374,7 @@ void RenderTableSection::distributeWholeExtraRowSpanHeightToPercentRows(RenderTa |
int accumulatedPositionIncrease = 0; |
for (unsigned row = rowIndex; row < (rowIndex + rowSpan); row++) { |
if (m_grid[row].logicalHeight.isPercent()) { |
- updatePositionIncreasedWithRowHeight(extraRowSpanningHeight, m_grid[row].logicalHeight.percent(), totalPercent, accumulatedPositionIncrease, remainder); |
+ updatePositionIncreasedWithRowHeight(extraRowSpanningHeight, std::ceil(m_grid[row].logicalHeight.percent()), totalPercent, accumulatedPositionIncrease, remainder); |
// While whole extra spanning height is distributing in percent spanning rows, rational parts remains |
// in every integer division. So accumulating all remainder part in integer division and when total remainder |
@@ -640,7 +640,7 @@ void RenderTableSection::distributeRowSpanHeightToRows(SpanningRenderTableCells& |
// Calculate total percentage, total auto rows height and total rows height except percent rows. |
for (unsigned row = rowIndex; row < spanningCellEndIndex; row++) { |
if (m_grid[row].logicalHeight.isPercent()) { |
- totalPercent += m_grid[row].logicalHeight.percent(); |
+ totalPercent += std::ceil(m_grid[row].logicalHeight.percent()); |
totalRemainingRowsHeight -= spanningRowsHeight.rowHeight[row - rowIndex]; |
} else if (m_grid[row].logicalHeight.isAuto()) { |
totalAutoRowsHeight += spanningRowsHeight.rowHeight[row - rowIndex]; |