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

Side by Side 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 unified diff | Download patch
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 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 // Keep track of children overflowing their grid area as we might need t o paint them even if the grid-area is 1143 // Keep track of children overflowing their grid area as we might need t o paint them even if the grid-area is
1144 // not visible 1144 // not visible
1145 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight 1145 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight
1146 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h) 1146 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h)
1147 m_gridItemsOverflowingGridArea.append(child); 1147 m_gridItemsOverflowingGridArea.append(child);
1148 } 1148 }
1149 1149
1150 for (const auto& row : sizingData.rowTracks) 1150 for (const auto& row : sizingData.rowTracks)
1151 setLogicalHeight(logicalHeight() + row.baseSize()); 1151 setLogicalHeight(logicalHeight() + row.baseSize());
1152 1152
1153 LayoutUnit height = logicalHeight() + borderAndPaddingLogicalHeight();
1154 if (hasLineIfEmpty())
1155 height = std::max(height, minimumLogicalHeightForEmptyLine());
1156
1153 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. 1157 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock.
1154 1158 setLogicalHeight(height);
1155 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight());
1156 } 1159 }
1157 1160
1158 void RenderGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout Behavior info) 1161 void RenderGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout Behavior info)
1159 { 1162 {
1160 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); 1163 TrackedRendererListHashSet* positionedDescendants = positionedObjects();
1161 if (!positionedDescendants) 1164 if (!positionedDescendants)
1162 return; 1165 return;
1163 1166
1164 bool containerHasHorizontalWritingMode = isHorizontalWritingMode(); 1167 bool containerHasHorizontalWritingMode = isHorizontalWritingMode();
1165 for (auto* child : *positionedDescendants) { 1168 for (auto* child : *positionedDescendants) {
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 if (isOutOfFlowPositioned()) 1736 if (isOutOfFlowPositioned())
1734 return "RenderGrid (positioned)"; 1737 return "RenderGrid (positioned)";
1735 if (isAnonymous()) 1738 if (isAnonymous())
1736 return "RenderGrid (generated)"; 1739 return "RenderGrid (generated)";
1737 if (isRelPositioned()) 1740 if (isRelPositioned())
1738 return "RenderGrid (relative positioned)"; 1741 return "RenderGrid (relative positioned)";
1739 return "RenderGrid"; 1742 return "RenderGrid";
1740 } 1743 }
1741 1744
1742 } // namespace blink 1745 } // namespace blink
OLDNEW
« 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