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

Unified Diff: Source/core/layout/LayoutGrid.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: ResolveConflict 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/layout/LayoutBox.h ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutGrid.cpp
diff --git a/Source/core/layout/LayoutGrid.cpp b/Source/core/layout/LayoutGrid.cpp
index 11d580dec5ceb9a71ce0bda5db20318228fc28cb..1a4b7e4c27419a4032105e776454e65ef6ef184e 100644
--- a/Source/core/layout/LayoutGrid.cpp
+++ b/Source/core/layout/LayoutGrid.cpp
@@ -1162,9 +1162,12 @@ void LayoutGrid::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 LayoutGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior info)
« no previous file with comments | « Source/core/layout/LayoutBox.h ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698