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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Issue 1396493005: Table rowspan cell's height resize when percent element present in the cell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refector code and Layout test reduced. Created 4 years, 11 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: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
index baae67a67e1add2ff80ab2d4d35a5e2e8975557f..239b7a52e3359f7d7e4a9111833f787739a7bc63 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -727,6 +727,15 @@ void LayoutTableSection::updateBaselineForCell(LayoutTableCell* cell, unsigned r
}
}
+static void ResetOverrideLoicalContentHeightIfNeeded(LayoutTableCell* cell)
mstensho (USE GERRIT) 2016/01/12 19:18:13 That wasn't quite what I had in mind. Since update
a.suchit2 2016/01/13 05:58:43 Done.
+{
+ if (cell->hasOverrideLogicalContentHeight()) {
+ cell->clearIntrinsicPadding();
+ cell->clearOverrideSize();
+ cell->forceChildLayout();
+ }
+}
+
int LayoutTableSection::calcRowLogicalHeight()
{
#if ENABLE(ASSERT)
@@ -790,6 +799,8 @@ int LayoutTableSection::calcRowLogicalHeight()
rowSpanCells.append(cell);
lastRowSpanCell = cell;
+ ResetOverrideLoicalContentHeightIfNeeded(cell);
+
// Find out the baseline. The baseline is set on the first row in a rowSpan.
updateBaselineForCell(cell, r, baselineDescent);
}
@@ -798,11 +809,7 @@ int LayoutTableSection::calcRowLogicalHeight()
ASSERT(cell->rowSpan() == 1);
- if (cell->hasOverrideLogicalContentHeight()) {
- cell->clearIntrinsicPadding();
- cell->clearOverrideSize();
- cell->forceChildLayout();
- }
+ ResetOverrideLoicalContentHeightIfNeeded(cell);
m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + cell->logicalHeightForRowSizing());

Powered by Google App Engine
This is Rietveld 408576698