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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/core/layout/LayoutBox.h ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 // Keep track of children overflowing their grid area as we might need t o paint them even if the grid-area is 1155 // Keep track of children overflowing their grid area as we might need t o paint them even if the grid-area is
1156 // not visible 1156 // not visible
1157 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight 1157 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight
1158 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h) 1158 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h)
1159 m_gridItemsOverflowingGridArea.append(child); 1159 m_gridItemsOverflowingGridArea.append(child);
1160 } 1160 }
1161 1161
1162 for (const auto& row : sizingData.rowTracks) 1162 for (const auto& row : sizingData.rowTracks)
1163 setLogicalHeight(logicalHeight() + row.baseSize()); 1163 setLogicalHeight(logicalHeight() + row.baseSize());
1164 1164
1165 LayoutUnit height = logicalHeight() + borderAndPaddingLogicalHeight();
1166 if (hasLineIfEmpty())
1167 height = std::max(height, minimumLogicalHeightForEmptyLine());
1168
1165 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. 1169 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock.
1166 1170 setLogicalHeight(height);
1167 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight());
1168 } 1171 }
1169 1172
1170 void LayoutGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout Behavior info) 1173 void LayoutGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout Behavior info)
1171 { 1174 {
1172 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); 1175 TrackedRendererListHashSet* positionedDescendants = positionedObjects();
1173 if (!positionedDescendants) 1176 if (!positionedDescendants)
1174 return; 1177 return;
1175 1178
1176 bool containerHasHorizontalWritingMode = isHorizontalWritingMode(); 1179 bool containerHasHorizontalWritingMode = isHorizontalWritingMode();
1177 for (auto* child : *positionedDescendants) { 1180 for (auto* child : *positionedDescendants) {
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 if (isOutOfFlowPositioned()) 1748 if (isOutOfFlowPositioned())
1746 return "LayoutGrid (positioned)"; 1749 return "LayoutGrid (positioned)";
1747 if (isAnonymous()) 1750 if (isAnonymous())
1748 return "LayoutGrid (generated)"; 1751 return "LayoutGrid (generated)";
1749 if (isRelPositioned()) 1752 if (isRelPositioned())
1750 return "LayoutGrid (relative positioned)"; 1753 return "LayoutGrid (relative positioned)";
1751 return "LayoutGrid"; 1754 return "LayoutGrid";
1752 } 1755 }
1753 1756
1754 } // namespace blink 1757 } // namespace blink
OLDNEW
« 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