ASSERT_NOT_REACHED() is touched in WebCore::minimumValueForLength
[WebKit-https.git] / Source / WebCore / rendering / RenderTableSection.cpp
index d9bc3f3c70027131e5690b4f7bc8ef86990dd6ca..c85c5424f963a22826d10a337caca416e610c369 100644 (file)
@@ -252,6 +252,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
@@ -279,7 +288,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();