diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-09-28 16:39:37 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:31:01 +0000 |
commit | 9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch) | |
tree | 322337ad0acbc75732f916376ec6d36e7ec0e5bc /Source/WebCore/rendering/RenderTableSection.cpp | |
parent | 6882a04fb36642862b11efe514251d32070c3d65 (diff) |
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebCore/rendering/RenderTableSection.cpp')
-rw-r--r-- | Source/WebCore/rendering/RenderTableSection.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp index 1907657e9..7f9100b6e 100644 --- a/Source/WebCore/rendering/RenderTableSection.cpp +++ b/Source/WebCore/rendering/RenderTableSection.cpp @@ -251,6 +251,15 @@ void RenderTableSection::addCell(RenderTableCell* cell, RenderTableRow* row) cell->setCol(table()->effColToCol(col)); } +static LayoutUnit resolveLogicalHeightForRow(const Length& rowLogicalHeight) +{ + if (rowLogicalHeight.isFixed()) + return rowLogicalHeight.value(); + if (rowLogicalHeight.isCalculated()) + return rowLogicalHeight.nonNanCalculatedValue(0); + return 0; +} + LayoutUnit RenderTableSection::calcRowLogicalHeight() { #ifndef NDEBUG @@ -278,7 +287,7 @@ LayoutUnit RenderTableSection::calcRowLogicalHeight() LayoutUnit baselineDescent = 0; // Our base size is the biggest logical height from our cells' styles (excluding row spanning cells). - m_rowPos[r + 1] = std::max(m_rowPos[r] + minimumValueForLength(m_grid[r].logicalHeight, 0), LayoutUnit::fromPixel(0)); + m_rowPos[r + 1] = std::max(m_rowPos[r] + resolveLogicalHeightForRow(m_grid[r].logicalHeight), LayoutUnit::fromPixel(0)); Row& row = m_grid[r].row; unsigned totalCols = row.size(); @@ -372,6 +381,7 @@ void RenderTableSection::layout() ASSERT(!needsCellRecalc()); ASSERT(!table()->needsSectionRecalc()); + m_forceSlowPaintPathWithOverflowingCell = false; // addChild may over-grow m_grid but we don't want to throw away the memory too early as addChild // can be called in a loop (e.g during parsing). Doing it now ensures we have a stable-enough structure. m_grid.shrinkToFit(); |