Index: Source/core/rendering/RenderGrid.cpp |
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
index 008cae430100375bc399711e98d2a9d33349da0e..3a9960fb2da3b00977f012759dcd7d3e27ac731a 100644 |
--- a/Source/core/rendering/RenderGrid.cpp |
+++ b/Source/core/rendering/RenderGrid.cpp |
@@ -1150,9 +1150,12 @@ void RenderGrid::layoutGridItems() |
for (const auto& row : sizingData.rowTracks) |
setLogicalHeight(logicalHeight() + row.baseSize()); |
- // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. |
+ LayoutUnit height = logicalHeight() + borderAndPaddingLogicalHeight(); |
+ if (hasLineIfEmpty()) |
+ height = std::max(height, minimumLogicalHeightForEmptyLine()); |
- setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight()); |
+ // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. |
+ setLogicalHeight(height); |
} |
void RenderGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior info) |