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

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: Updated patch 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
« no previous file with comments | « Source/core/dom/Position.cpp ('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 07451ab9878f5f4a62b554b0e3ef2095ebbbbafb..8baf47e8190c9e76845d4ed226f8046ef07b657e 100644
--- a/Source/core/rendering/RenderGrid.cpp
+++ b/Source/core/rendering/RenderGrid.cpp
@@ -1148,8 +1148,14 @@ void RenderGrid::layoutGridItems()
setLogicalHeight(logicalHeight() + row.baseSize());
// Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock.
-
setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight());
+ if (hasLineIfEmpty()) {
+ LayoutUnit minHeight = borderAndPaddingLogicalHeight()
+ + lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes)
+ + scrollbarLogicalHeight();
+ if (size().height() < minHeight)
+ setLogicalHeight(minHeight);
+ }
rune 2015/02/25 11:34:53 This code is identical to the code in RenderFlexib
}
void RenderGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior info)
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698