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

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

Issue 22415003: Fix Assert failure for test case bug7714.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 | « LayoutTests/platform/win/tables/mozilla/bugs/bug7714-expected.txt ('k') | 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 282e7fa45ab0745dbbfa2c5ae61cf3c6524ae5f8..55e3d8601a2da227e0ae1539936e9eb2aeda338e 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -413,8 +413,16 @@ void RenderTableSection::distributeRowSpanHeightToRows(SpanningRenderTableCells&
int originalBeforePosition = m_rowPos[rowIndex + rowSpan];
+ // When 2 spanning cells are ending at same row index then while extra height distribution of first spanning
+ // cell updates position of the last row so getting the original position of the last row in second spanning
+ // cell need to reduce the height changed by first spanning cell.
+ // In some cases, spanning cell's end row does not exit based on given rowspan value than in these cases, last
+ // row is consider as end row of the spanning cell.
+ if ((rowIndex + rowSpan) == (lastRowIndex + lastRowSpan) || ((rowIndex + rowSpan) >= (m_grid.size() + 1) && (lastRowIndex + lastRowSpan) >= (m_grid.size() + 1)))
Julien - ping for review 2013/08/07 16:51:30 Do we really need to check if we have cells protud
a.suchit 2013/08/07 19:49:50 You are right that addCell will handle it. I have
a.suchit 2013/08/08 11:17:40 I checked it. What problem was in my mind that wil
+ originalBeforePosition -= extraHeightToPropagate;
+
if (extraHeightToPropagate) {
- for (unsigned row = lastRowIndex + lastRowSpan; row <= rowIndex + rowSpan; row++)
+ for (unsigned row = lastRowIndex + lastRowSpan + 1; row <= rowIndex + rowSpan; row++)
m_rowPos[row] += extraHeightToPropagate;
}
@@ -455,12 +463,11 @@ void RenderTableSection::distributeRowSpanHeightToRows(SpanningRenderTableCells&
// Getting total changed height in the table
extraHeightToPropagate = m_rowPos[rowIndex + rowSpan] - originalBeforePosition;
- m_rowPos[rowIndex + rowSpan] -= extraHeightToPropagate;
}
if (extraHeightToPropagate) {
// Apply changed height by rowSpan cells to rows present at the end of the table
- for (unsigned row = lastRowIndex + lastRowSpan; row <= m_grid.size(); row++)
+ for (unsigned row = lastRowIndex + lastRowSpan + 1; row <= m_grid.size(); row++)
m_rowPos[row] += extraHeightToPropagate;
}
}
« no previous file with comments | « LayoutTests/platform/win/tables/mozilla/bugs/bug7714-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698