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

Unified Diff: Source/core/rendering/RenderGrid.cpp

Issue 870013003: Div having contentEditable and display:grid cannot be edited if it is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add minimumLogicalHeightForEmptyLine Created 5 years, 10 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
« Source/core/rendering/RenderBox.h ('K') | « Source/core/rendering/RenderBox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« Source/core/rendering/RenderBox.h ('K') | « Source/core/rendering/RenderBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698