Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1141 // not visible | 1141 // not visible |
| 1142 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight | 1142 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight |
| 1143 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h) | 1143 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h) |
| 1144 m_gridItemsOverflowingGridArea.append(child); | 1144 m_gridItemsOverflowingGridArea.append(child); |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 for (const auto& row : sizingData.rowTracks) | 1147 for (const auto& row : sizingData.rowTracks) |
| 1148 setLogicalHeight(logicalHeight() + row.baseSize()); | 1148 setLogicalHeight(logicalHeight() + row.baseSize()); |
| 1149 | 1149 |
| 1150 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. | 1150 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. |
| 1151 | |
| 1152 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight()); | 1151 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight()); |
| 1152 if (hasLineIfEmpty()) { | |
| 1153 LayoutUnit minHeight = borderAndPaddingLogicalHeight() | |
| 1154 + lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : Vert icalLine, PositionOfInteriorLineBoxes) | |
| 1155 + scrollbarLogicalHeight(); | |
| 1156 if (size().height() < minHeight) | |
| 1157 setLogicalHeight(minHeight); | |
| 1158 } | |
|
rune
2015/02/25 11:34:53
This code is identical to the code in RenderFlexib
| |
| 1153 } | 1159 } |
| 1154 | 1160 |
| 1155 void RenderGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout Behavior info) | 1161 void RenderGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout Behavior info) |
| 1156 { | 1162 { |
| 1157 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); | 1163 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); |
| 1158 if (!positionedDescendants) | 1164 if (!positionedDescendants) |
| 1159 return; | 1165 return; |
| 1160 | 1166 |
| 1161 bool containerHasHorizontalWritingMode = isHorizontalWritingMode(); | 1167 bool containerHasHorizontalWritingMode = isHorizontalWritingMode(); |
| 1162 for (auto* child : *positionedDescendants) { | 1168 for (auto* child : *positionedDescendants) { |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1730 if (isOutOfFlowPositioned()) | 1736 if (isOutOfFlowPositioned()) |
| 1731 return "RenderGrid (positioned)"; | 1737 return "RenderGrid (positioned)"; |
| 1732 if (isAnonymous()) | 1738 if (isAnonymous()) |
| 1733 return "RenderGrid (generated)"; | 1739 return "RenderGrid (generated)"; |
| 1734 if (isRelPositioned()) | 1740 if (isRelPositioned()) |
| 1735 return "RenderGrid (relative positioned)"; | 1741 return "RenderGrid (relative positioned)"; |
| 1736 return "RenderGrid"; | 1742 return "RenderGrid"; |
| 1737 } | 1743 } |
| 1738 | 1744 |
| 1739 } // namespace blink | 1745 } // namespace blink |
| OLD | NEW |