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

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

Issue 22589002: Margins on children of display:table-cell elements get stuck at highest value. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplify test case with Ref Test 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
Index: Source/core/rendering/RenderTableSection.cpp
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp
index 282e7fa45ab0745dbbfa2c5ae61cf3c6524ae5f8..322e51b4c580b2100d874aa06ce05b45e9204eb4 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -473,13 +473,15 @@ void RenderTableSection::updateBaselineForCell(RenderTableCell* cell, unsigned r
if (!cell->isBaselineAligned())
return;
- LayoutUnit baselinePosition = cell->cellBaselinePosition();
- if (baselinePosition > cell->borderBefore() + cell->paddingBefore()) {
+ // Calculating the row's baseline excluding intrinsic padding because row's baseline will come into it's right
Julien - ping for review 2013/08/08 22:15:51 s/it's/its/ :(
+ // position when row's baseline would be calculated for the cell which introduced intrinsic padding for other cells.
Julien - ping for review 2013/08/08 22:15:51 Let's try to make comment good English sentence. T
suchit.agrawal 2013/08/09 11:00:43 Done.
+ LayoutUnit baselinePosition = cell->cellBaselinePosition() - cell->intrinsicPaddingBefore();
+ if (baselinePosition > cell->borderBefore() + (cell->paddingBefore() - cell->intrinsicPaddingBefore())) {
m_grid[row].baseline = max(m_grid[row].baseline, baselinePosition);
int cellStartRowBaselineDescent = 0;
if (cell->rowSpan() == 1) {
- baselineDescent = max(baselineDescent, cell->logicalHeightForRowSizing() - (baselinePosition - cell->intrinsicPaddingBefore()));
+ baselineDescent = max(baselineDescent, cell->logicalHeightForRowSizing() - baselinePosition);
cellStartRowBaselineDescent = baselineDescent;
}
m_rowPos[row + 1] = max<int>(m_rowPos[row + 1], m_rowPos[row] + m_grid[row].baseline + cellStartRowBaselineDescent);

Powered by Google App Engine
This is Rietveld 408576698