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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 RenderBlock::addChild(newChild, beforeChild); | 217 RenderBlock::addChild(newChild, beforeChild); |
218 | 218 |
219 if (gridIsDirty()) | 219 if (gridIsDirty()) |
220 return; | 220 return; |
221 | 221 |
222 if (!newChild->isBox()) { | 222 if (!newChild->isBox()) { |
223 dirtyGrid(); | 223 dirtyGrid(); |
224 return; | 224 return; |
225 } | 225 } |
226 | 226 |
227 // Positioned items shouldn't take up space or otherwise participate in the layout of the grid. | |
228 if (newChild->isOutOfFlowPositioned()) | |
229 return; | |
230 | |
227 // If the new child has been inserted inside an existent anonymous block, we can simply ignore it as the anonymous | 231 // If the new child has been inserted inside an existent anonymous block, we can simply ignore it as the anonymous |
228 // block is an already known grid item. | 232 // block is an already known grid item. |
229 if (newChild->parent() != this) | 233 if (newChild->parent() != this) |
230 return; | 234 return; |
231 | 235 |
232 // FIXME: Implement properly "stack" value in auto-placement algorithm. | 236 // FIXME: Implement properly "stack" value in auto-placement algorithm. |
233 if (!style()->isGridAutoFlowAlgorithmStack()) { | 237 if (!style()->isGridAutoFlowAlgorithmStack()) { |
234 // The grid needs to be recomputed as it might contain auto-placed items that will change their position. | 238 // The grid needs to be recomputed as it might contain auto-placed items that will change their position. |
235 dirtyGrid(); | 239 dirtyGrid(); |
236 return; | 240 return; |
237 } | 241 } |
238 | 242 |
239 RenderBox* newChildBox = toRenderBox(newChild); | 243 RenderBox* newChildBox = toRenderBox(newChild); |
240 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositionsFr omStyle(*style(), *newChildBox, ForRows); | 244 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositionsFr omStyle(*style(), *newChildBox, ForRows); |
241 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosition sFromStyle(*style(), *newChildBox, ForColumns); | 245 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosition sFromStyle(*style(), *newChildBox, ForColumns); |
242 if (!rowPositions || !columnPositions) { | 246 if (!rowPositions || !columnPositions) { |
243 // The new child requires the auto-placement algorithm to run so we need to recompute the grid fully. | 247 // The new child requires the auto-placement algorithm to run so we need to recompute the grid fully. |
244 dirtyGrid(); | 248 dirtyGrid(); |
245 return; | 249 return; |
246 } else { | 250 } else { |
247 insertItemIntoGrid(*newChildBox, GridCoordinate(*rowPositions, *columnPo sitions)); | 251 insertItemIntoGrid(*newChildBox, GridCoordinate(*rowPositions, *columnPo sitions)); |
248 addChildToIndexesMap(*newChildBox); | 252 addChildToIndexesMap(*newChildBox); |
249 } | 253 } |
250 } | 254 } |
251 | 255 |
252 void RenderGrid::addChildToIndexesMap(RenderBox& child) | 256 void RenderGrid::addChildToIndexesMap(RenderBox& child) |
253 { | 257 { |
254 ASSERT(!m_gridItemsIndexesMap.contains(&child)); | 258 ASSERT(!m_gridItemsIndexesMap.contains(&child)); |
255 RenderBox* sibling = child.nextSiblingBox(); | 259 RenderBox* sibling = child.nextInFlowSiblingBox(); |
256 bool lastSibling = !sibling; | 260 bool lastSibling = !sibling; |
257 | 261 |
258 if (lastSibling) | 262 if (lastSibling) |
259 sibling = child.previousSiblingBox(); | 263 sibling = child.previousInFlowSiblingBox(); |
260 | 264 |
261 size_t index = 0; | 265 size_t index = 0; |
262 if (sibling) | 266 if (sibling) |
263 index = lastSibling ? m_gridItemsIndexesMap.get(sibling) + 1 : m_gridIte msIndexesMap.get(sibling); | 267 index = lastSibling ? m_gridItemsIndexesMap.get(sibling) + 1 : m_gridIte msIndexesMap.get(sibling); |
264 | 268 |
265 if (sibling && !lastSibling) { | 269 if (sibling && !lastSibling) { |
266 for (; sibling; sibling = sibling->nextSiblingBox()) | 270 for (; sibling; sibling = sibling->nextInFlowSiblingBox()) |
267 m_gridItemsIndexesMap.set(sibling, m_gridItemsIndexesMap.get(sibling ) + 1); | 271 m_gridItemsIndexesMap.set(sibling, m_gridItemsIndexesMap.get(sibling ) + 1); |
268 } | 272 } |
269 | 273 |
270 m_gridItemsIndexesMap.set(&child, index); | 274 m_gridItemsIndexesMap.set(&child, index); |
271 } | 275 } |
272 | 276 |
273 void RenderGrid::removeChild(RenderObject* child) | 277 void RenderGrid::removeChild(RenderObject* child) |
274 { | 278 { |
275 RenderBlock::removeChild(child); | 279 RenderBlock::removeChild(child); |
276 | 280 |
277 if (gridIsDirty()) | 281 if (gridIsDirty()) |
278 return; | 282 return; |
279 | 283 |
280 ASSERT(child->isBox()); | 284 ASSERT(child->isBox()); |
281 | 285 |
282 // FIXME: Implement properly "stack" value in auto-placement algorithm. | 286 // FIXME: Implement properly "stack" value in auto-placement algorithm. |
283 if (!style()->isGridAutoFlowAlgorithmStack()) { | 287 if (!style()->isGridAutoFlowAlgorithmStack()) { |
284 // The grid needs to be recomputed as it might contain auto-placed items that will change their position. | 288 // The grid needs to be recomputed as it might contain auto-placed items that will change their position. |
285 dirtyGrid(); | 289 dirtyGrid(); |
286 return; | 290 return; |
287 } | 291 } |
288 | 292 |
293 if (child->isOutOfFlowPositioned()) | |
294 return; | |
295 | |
289 const RenderBox* childBox = toRenderBox(child); | 296 const RenderBox* childBox = toRenderBox(child); |
290 GridCoordinate coordinate = m_gridItemCoordinate.take(childBox); | 297 GridCoordinate coordinate = m_gridItemCoordinate.take(childBox); |
291 | 298 |
292 for (GridSpan::iterator row = coordinate.rows.begin(); row != coordinate.row s.end(); ++row) { | 299 for (GridSpan::iterator row = coordinate.rows.begin(); row != coordinate.row s.end(); ++row) { |
293 for (GridSpan::iterator column = coordinate.columns.begin(); column != c oordinate.columns.end(); ++column) { | 300 for (GridSpan::iterator column = coordinate.columns.begin(); column != c oordinate.columns.end(); ++column) { |
294 GridCell& cell = m_grid[row.toInt()][column.toInt()]; | 301 GridCell& cell = m_grid[row.toInt()][column.toInt()]; |
295 cell.remove(cell.find(childBox)); | 302 cell.remove(cell.find(childBox)); |
296 } | 303 } |
297 } | 304 } |
298 | 305 |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
891 | 898 |
892 populateExplicitGridAndOrderIterator(); | 899 populateExplicitGridAndOrderIterator(); |
893 | 900 |
894 // We clear the dirty bit here as the grid sizes have been updated, this mea ns | 901 // We clear the dirty bit here as the grid sizes have been updated, this mea ns |
895 // that we can safely call gridRowCount() / gridColumnCount(). | 902 // that we can safely call gridRowCount() / gridColumnCount(). |
896 m_gridIsDirty = false; | 903 m_gridIsDirty = false; |
897 | 904 |
898 Vector<RenderBox*> autoMajorAxisAutoGridItems; | 905 Vector<RenderBox*> autoMajorAxisAutoGridItems; |
899 Vector<RenderBox*> specifiedMajorAxisAutoGridItems; | 906 Vector<RenderBox*> specifiedMajorAxisAutoGridItems; |
900 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera tor.next()) { | 907 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera tor.next()) { |
908 if (child->isOutOfFlowPositioned()) | |
909 continue; | |
910 | |
901 // FIXME: We never re-resolve positions if the grid is grown during auto -placement which may lead auto / <integer> | 911 // FIXME: We never re-resolve positions if the grid is grown during auto -placement which may lead auto / <integer> |
902 // positions to not match the author's intent. The specification is uncl ear on what should be done in this case. | 912 // positions to not match the author's intent. The specification is uncl ear on what should be done in this case. |
903 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositio nsFromStyle(*style(), *child, ForRows); | 913 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositio nsFromStyle(*style(), *child, ForRows); |
904 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosi tionsFromStyle(*style(), *child, ForColumns); | 914 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosi tionsFromStyle(*style(), *child, ForColumns); |
905 if (!rowPositions || !columnPositions) { | 915 if (!rowPositions || !columnPositions) { |
906 GridSpan* majorAxisPositions = (autoPlacementMajorAxisDirection() == ForColumns) ? columnPositions.get() : rowPositions.get(); | 916 GridSpan* majorAxisPositions = (autoPlacementMajorAxisDirection() == ForColumns) ? columnPositions.get() : rowPositions.get(); |
907 if (!majorAxisPositions) | 917 if (!majorAxisPositions) |
908 autoMajorAxisAutoGridItems.append(child); | 918 autoMajorAxisAutoGridItems.append(child); |
909 else | 919 else |
910 specifiedMajorAxisAutoGridItems.append(child); | 920 specifiedMajorAxisAutoGridItems.append(child); |
(...skipping 21 matching lines...) Expand all Loading... | |
932 | 942 |
933 void RenderGrid::populateExplicitGridAndOrderIterator() | 943 void RenderGrid::populateExplicitGridAndOrderIterator() |
934 { | 944 { |
935 OrderIteratorPopulator populator(m_orderIterator); | 945 OrderIteratorPopulator populator(m_orderIterator); |
936 | 946 |
937 size_t maximumRowIndex = std::max<size_t>(1, GridResolvedPosition::explicitG ridRowCount(*style())); | 947 size_t maximumRowIndex = std::max<size_t>(1, GridResolvedPosition::explicitG ridRowCount(*style())); |
938 size_t maximumColumnIndex = std::max<size_t>(1, GridResolvedPosition::explic itGridColumnCount(*style())); | 948 size_t maximumColumnIndex = std::max<size_t>(1, GridResolvedPosition::explic itGridColumnCount(*style())); |
939 | 949 |
940 ASSERT(m_gridItemsIndexesMap.isEmpty()); | 950 ASSERT(m_gridItemsIndexesMap.isEmpty()); |
941 size_t childIndex = 0; | 951 size_t childIndex = 0; |
942 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo x()) { | 952 for (RenderBox* child = firstChildBox(); child; child = child->nextInFlowSib lingBox()) { |
943 populator.collectChild(child); | 953 populator.collectChild(child); |
944 m_gridItemsIndexesMap.set(child, childIndex++); | 954 m_gridItemsIndexesMap.set(child, childIndex++); |
945 | 955 |
946 // This function bypasses the cache (cachedGridCoordinate()) as it is us ed to build it. | 956 // This function bypasses the cache (cachedGridCoordinate()) as it is us ed to build it. |
947 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositio nsFromStyle(*style(), *child, ForRows); | 957 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositio nsFromStyle(*style(), *child, ForRows); |
948 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosi tionsFromStyle(*style(), *child, ForColumns); | 958 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosi tionsFromStyle(*style(), *child, ForColumns); |
949 | 959 |
950 // |positions| is 0 if we need to run the auto-placement algorithm. | 960 // |positions| is 0 if we need to run the auto-placement algorithm. |
951 if (rowPositions) { | 961 if (rowPositions) { |
952 maximumRowIndex = std::max<size_t>(maximumRowIndex, rowPositions->re solvedFinalPosition.next().toInt()); | 962 maximumRowIndex = std::max<size_t>(maximumRowIndex, rowPositions->re solvedFinalPosition.next().toInt()); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1091 computeUsedBreadthOfGridTracks(ForColumns, sizingData); | 1101 computeUsedBreadthOfGridTracks(ForColumns, sizingData); |
1092 ASSERT(tracksAreWiderThanMinTrackBreadth(ForColumns, sizingData.columnTracks )); | 1102 ASSERT(tracksAreWiderThanMinTrackBreadth(ForColumns, sizingData.columnTracks )); |
1093 computeUsedBreadthOfGridTracks(ForRows, sizingData); | 1103 computeUsedBreadthOfGridTracks(ForRows, sizingData); |
1094 ASSERT(tracksAreWiderThanMinTrackBreadth(ForRows, sizingData.rowTracks)); | 1104 ASSERT(tracksAreWiderThanMinTrackBreadth(ForRows, sizingData.rowTracks)); |
1095 | 1105 |
1096 populateGridPositions(sizingData); | 1106 populateGridPositions(sizingData); |
1097 m_gridItemsOverflowingGridArea.resize(0); | 1107 m_gridItemsOverflowingGridArea.resize(0); |
1098 | 1108 |
1099 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo x()) { | 1109 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo x()) { |
1100 if (child->isOutOfFlowPositioned()) { | 1110 if (child->isOutOfFlowPositioned()) { |
1101 // FIXME: Absolute positioned grid items should have a special | |
1102 // behavior as described in the spec (crbug.com/273898): | |
1103 // http://www.w3.org/TR/css-grid-1/#abspos-items | |
1104 child->containingBlock()->insertPositionedObject(child); | 1111 child->containingBlock()->insertPositionedObject(child); |
1112 continue; | |
1105 } | 1113 } |
1106 | 1114 |
1107 // Because the grid area cannot be styled, we don't need to adjust | 1115 // Because the grid area cannot be styled, we don't need to adjust |
1108 // the grid breadth to account for 'box-sizing'. | 1116 // the grid breadth to account for 'box-sizing'. |
1109 LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOve rrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogica lWidth() : LayoutUnit(); | 1117 LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOve rrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogica lWidth() : LayoutUnit(); |
1110 LayoutUnit oldOverrideContainingBlockContentLogicalHeight = child->hasOv errideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogi calHeight() : LayoutUnit(); | 1118 LayoutUnit oldOverrideContainingBlockContentLogicalHeight = child->hasOv errideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogi calHeight() : LayoutUnit(); |
1111 | 1119 |
1112 LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthF orChild(*child, ForColumns, sizingData.columnTracks); | 1120 LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthF orChild(*child, ForColumns, sizingData.columnTracks); |
1113 LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadth ForChild(*child, ForRows, sizingData.rowTracks); | 1121 LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadth ForChild(*child, ForRows, sizingData.rowTracks); |
1114 | 1122 |
(...skipping 23 matching lines...) Expand all Loading... | |
1138 } | 1146 } |
1139 | 1147 |
1140 for (size_t i = 0; i < sizingData.rowTracks.size(); ++i) | 1148 for (size_t i = 0; i < sizingData.rowTracks.size(); ++i) |
1141 setLogicalHeight(logicalHeight() + sizingData.rowTracks[i].m_usedBreadth ); | 1149 setLogicalHeight(logicalHeight() + sizingData.rowTracks[i].m_usedBreadth ); |
1142 | 1150 |
1143 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. | 1151 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. |
1144 | 1152 |
1145 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight()); | 1153 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight()); |
1146 } | 1154 } |
1147 | 1155 |
1156 void RenderGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout Behavior info) | |
1157 { | |
1158 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); | |
1159 if (!positionedDescendants) | |
1160 return; | |
1161 | |
1162 bool containerHasHorizontalWritingMode = isHorizontalWritingMode(); | |
1163 TrackedRendererListHashSet::iterator end = positionedDescendants->end(); | |
1164 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin( ); it != end; ++it) { | |
1165 RenderBox* child = *it; | |
1166 | |
1167 bool hasOrthogonalWritingMode = child->isHorizontalWritingMode() != cont ainerHasHorizontalWritingMode; | |
1168 if (hasOrthogonalWritingMode) { | |
1169 // FIXME: Properly support orthogonal writing mode. | |
1170 continue; | |
1171 } | |
1172 | |
1173 // FIXME: Detect properly if start/end is auto for inexistent named grid lines. | |
1174 bool columnStartIsAuto = child->style()->gridColumnStart().isAuto(); | |
1175 LayoutUnit columnBreadth = LayoutUnit(0); | |
1176 LayoutUnit columnOffset = offsetAndBreadthForPositionedChild(*child, For Columns, columnStartIsAuto, child->style()->gridColumnEnd().isAuto(), columnBrea dth); | |
1177 bool rowStartIsAuto = child->style()->gridRowStart().isAuto(); | |
1178 LayoutUnit rowBreadth = LayoutUnit(0); | |
1179 LayoutUnit rowOffset = offsetAndBreadthForPositionedChild(*child, ForRow s, rowStartIsAuto, child->style()->gridRowEnd().isAuto(), rowBreadth); | |
1180 | |
1181 child->setOverrideContainingBlockContentLogicalWidth(columnBreadth); | |
1182 child->setOverrideContainingBlockContentLogicalHeight(rowBreadth); | |
1183 child->setExtraInlineOffset(columnOffset); | |
1184 child->setExtraBlockOffset(rowOffset); | |
1185 | |
1186 if (child->parent() == this) { | |
1187 RenderLayer* childLayer = child->layer(); | |
1188 if (columnStartIsAuto) | |
1189 childLayer->setStaticInlinePosition(borderAndPaddingStart()); | |
1190 else | |
1191 childLayer->setStaticInlinePosition(borderStart() + columnOffset ); | |
1192 if (rowStartIsAuto) | |
1193 childLayer->setStaticBlockPosition(borderAndPaddingBefore()); | |
1194 else | |
1195 childLayer->setStaticBlockPosition(borderBefore() + rowOffset); | |
1196 } | |
1197 } | |
1198 | |
1199 RenderBlock::layoutPositionedObjects(relayoutChildren, info); | |
1200 } | |
1201 | |
1202 LayoutUnit RenderGrid::offsetAndBreadthForPositionedChild(const RenderBox& child , GridTrackSizingDirection direction, bool startIsAuto, bool endIsAuto, LayoutUn it& breadth) | |
Julien - ping for review
2014/12/05 00:32:55
I prefer avoiding mixing a return value and out pa
Manuel Rego
2014/12/05 10:47:08
Done.
| |
1203 { | |
1204 ASSERT(child.isHorizontalWritingMode() == isHorizontalWritingMode()); | |
1205 | |
1206 OwnPtr<GridSpan> positions = GridResolvedPosition::resolveGridPositionsFromS tyle(*style(), child, direction); | |
1207 if (!positions) { | |
1208 breadth = (direction == ForColumns) ? clientLogicalWidth() : clientLogic alHeight(); | |
1209 return LayoutUnit(0); | |
1210 } | |
1211 | |
1212 GridResolvedPosition firstPosition = GridResolvedPosition(0); | |
1213 GridResolvedPosition initialPosition = startIsAuto ? firstPosition : positio ns->resolvedInitialPosition; | |
1214 GridResolvedPosition lastPosition = GridResolvedPosition((direction == ForCo lumns ? gridColumnCount() : gridRowCount()) - 1); | |
1215 GridResolvedPosition finalPosition = endIsAuto ? lastPosition : positions->r esolvedFinalPosition; | |
1216 | |
1217 LayoutUnit start = startIsAuto ? LayoutUnit(0) : (direction == ForColumns) ? m_columnPositions[initialPosition.toInt()] : m_rowPositions[initialPosition.to Int()]; | |
1218 LayoutUnit end = endIsAuto ? (direction == ForColumns) ? logicalWidth() : lo gicalHeight() : (direction == ForColumns) ? m_columnPositions[finalPosition.nex t().toInt()] : m_rowPositions[finalPosition.next().toInt()]; | |
1219 | |
1220 breadth = end - start; | |
1221 | |
1222 if (startIsAuto) | |
1223 breadth -= (direction == ForColumns) ? borderStart() : borderBefore(); | |
1224 else | |
1225 start -= ((direction == ForColumns) ? borderStart() : borderBefore()); | |
1226 | |
1227 if (endIsAuto) { | |
1228 breadth -= (direction == ForColumns) ? borderEnd() : borderAfter(); | |
1229 breadth -= isHorizontalWritingMode() ? verticalScrollbarWidth() : horizo ntalScrollbarHeight(); | |
Julien - ping for review
2014/12/05 00:32:55
Should we add scrollbarLogicalWidth()? (we have sc
Manuel Rego
2014/12/05 10:47:08
Done.
| |
1230 } | |
1231 | |
1232 return start; | |
1233 } | |
1234 | |
1148 GridCoordinate RenderGrid::cachedGridCoordinate(const RenderBox& gridItem) const | 1235 GridCoordinate RenderGrid::cachedGridCoordinate(const RenderBox& gridItem) const |
1149 { | 1236 { |
1150 ASSERT(m_gridItemCoordinate.contains(&gridItem)); | 1237 ASSERT(m_gridItemCoordinate.contains(&gridItem)); |
1151 return m_gridItemCoordinate.get(&gridItem); | 1238 return m_gridItemCoordinate.get(&gridItem); |
1152 } | 1239 } |
1153 | 1240 |
1154 LayoutUnit RenderGrid::gridAreaBreadthForChild(const RenderBox& child, GridTrack SizingDirection direction, const Vector<GridTrack>& tracks) const | 1241 LayoutUnit RenderGrid::gridAreaBreadthForChild(const RenderBox& child, GridTrack SizingDirection direction, const Vector<GridTrack>& tracks) const |
1155 { | 1242 { |
1156 const GridCoordinate& coordinate = cachedGridCoordinate(child); | 1243 const GridCoordinate& coordinate = cachedGridCoordinate(child); |
1157 const GridSpan& span = (direction == ForColumns) ? coordinate.columns : coor dinate.rows; | 1244 const GridSpan& span = (direction == ForColumns) ? coordinate.columns : coor dinate.rows; |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1513 if (isOutOfFlowPositioned()) | 1600 if (isOutOfFlowPositioned()) |
1514 return "RenderGrid (positioned)"; | 1601 return "RenderGrid (positioned)"; |
1515 if (isAnonymous()) | 1602 if (isAnonymous()) |
1516 return "RenderGrid (generated)"; | 1603 return "RenderGrid (generated)"; |
1517 if (isRelPositioned()) | 1604 if (isRelPositioned()) |
1518 return "RenderGrid (relative positioned)"; | 1605 return "RenderGrid (relative positioned)"; |
1519 return "RenderGrid"; | 1606 return "RenderGrid"; |
1520 } | 1607 } |
1521 | 1608 |
1522 } // namespace blink | 1609 } // namespace blink |
OLD | NEW |