Index: Source/core/layout/LayoutTableSection.cpp |
diff --git a/Source/core/layout/LayoutTableSection.cpp b/Source/core/layout/LayoutTableSection.cpp |
index 63e6a0815f5e165059929d22ba614ee60cbeb0a4..13715dbd10623afcc0edecbfdecc50b7cad9f90b 100644 |
--- a/Source/core/layout/LayoutTableSection.cpp |
+++ b/Source/core/layout/LayoutTableSection.cpp |
@@ -322,7 +322,7 @@ void LayoutTableSection::distributeExtraRowSpanHeightToPercentRows(LayoutTableCe |
// FIXME: Note that this is wrong if we have a percentage above 100% and may make us grow |
// above the available space. |
- toAdd = std::min(toAdd, extraRowSpanningHeight); |
+ toAdd = std::max(std::min(toAdd, extraRowSpanningHeight), 0); |
accumulatedPositionIncrease += toAdd; |
extraRowSpanningHeight -= toAdd; |
percent -= m_grid[row].logicalHeight.percent(); |