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

Side by Side Diff: Source/core/rendering/RenderGrid.cpp

Issue 148293008: [CSS Grid Layout] Add support to place items using named grid lines (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added some more test cases for special grid area names Created 6 years, 9 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/rendering/RenderGrid.h ('k') | Source/core/rendering/style/GridCoordinate.h » ('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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 RenderBlock::removeChild(child); 212 RenderBlock::removeChild(child);
213 213
214 if (gridIsDirty()) 214 if (gridIsDirty())
215 return; 215 return;
216 216
217 ASSERT(child->isBox()); 217 ASSERT(child->isBox());
218 // FIXME: We could avoid dirtying the grid in some cases (e.g. if it's an ex plicitly positioned element). 218 // FIXME: We could avoid dirtying the grid in some cases (e.g. if it's an ex plicitly positioned element).
219 dirtyGrid(); 219 dirtyGrid();
220 } 220 }
221 221
222 void RenderGrid::createGridLineNamesMapsForDirection(GridTrackSizingDirection di rection)
223 {
224 NamedGridLinesMap& gridLinesMap = (direction == ForColumns) ? m_namedGridCol umnLines : m_namedGridRowLines;
225 const OrderedNamedGridLines& orderedLinesMap = (direction == ForColumns) ? s tyle()->orderedNamedGridColumnLines() : style()->orderedNamedGridRowLines();
226
227 gridLinesMap.clear();
228 OrderedNamedGridLines::const_iterator orderedLinesEnd = orderedLinesMap.end( );
229 for (OrderedNamedGridLines::const_iterator it = orderedLinesMap.begin(); it != orderedLinesEnd; ++it) {
230 const Vector<String> gridLineNames = it->value;
231 for (size_t i = 0; i < gridLineNames.size(); ++i) {
232 NamedGridLinesMap::AddResult result = gridLinesMap.add(gridLineNames [i], Vector<size_t>());
233 result.storedValue->value.append(it->key);
234 }
235 }
236
237 NamedGridAreaMap::const_iterator gridAreasEnd = style()->namedGridArea().end ();
238 for (NamedGridAreaMap::const_iterator it = style()->namedGridArea().begin(); it != gridAreasEnd; ++it) {
239 GridSpan areaSpan = direction == ForRows ? it->value.rows : it->value.co lumns;
240
241 NamedGridLinesMap::AddResult startResult = gridLinesMap.add(it->key + "- start", Vector<size_t>());
242 startResult.storedValue->value.append(areaSpan.initialPositionIndex);
243 NamedGridLinesMap::AddResult endResult = gridLinesMap.add(it->key + "-en d", Vector<size_t>());
244 endResult.storedValue->value.append(areaSpan.finalPositionIndex + 1);
245 }
246
247 NamedGridLinesMap::const_iterator namedLinesEnd = gridLinesMap.end();
248 for (NamedGridLinesMap::iterator it = gridLinesMap.begin(); it != namedLine sEnd; ++it)
249 std::sort(it->value.begin(), it->value.end());
250 }
Julien - ping for review 2014/03/31 23:36:21 I really don't understand what moving this code to
svillar 2014/04/01 08:00:42 So the idea would be to remove the map of grid lin
Julien - ping for review 2014/04/08 16:47:28 I see the point of splitting the 2 maps as only on
251
222 void RenderGrid::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl e) 252 void RenderGrid::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl e)
223 { 253 {
224 RenderBlock::styleDidChange(diff, oldStyle); 254 RenderBlock::styleDidChange(diff, oldStyle);
255
256 bool gridLinesDefinitionChanged = namedGridLinesDefinitionDidChange(oldStyle );
257 if (gridLinesDefinitionChanged) {
258 createGridLineNamesMapsForDirection(ForColumns);
259 createGridLineNamesMapsForDirection(ForRows);
260 }
261
225 if (!oldStyle) 262 if (!oldStyle)
226 return; 263 return;
227 264
228 // FIXME: The following checks could be narrowed down if we kept track of wh ich type of grid items we have: 265 // FIXME: The following checks could be narrowed down if we kept track of wh ich type of grid items we have:
229 // - explicit grid size changes impact negative explicitely positioned and a uto-placed grid items. 266 // - explicit grid size changes impact negative explicitely positioned and a uto-placed grid items.
230 // - named grid lines only impact grid items with named grid lines. 267 // - named grid lines only impact grid items with named grid lines.
231 // - auto-flow changes only impacts auto-placed children. 268 // - auto-flow changes only impacts auto-placed children.
232 269
233 if (explicitGridDidResize(oldStyle) 270 if (explicitGridDidResize(oldStyle) || gridLinesDefinitionChanged || oldStyl e->gridAutoFlow() != style()->gridAutoFlow())
234 || namedGridLinesDefinitionDidChange(oldStyle)
235 || oldStyle->gridAutoFlow() != style()->gridAutoFlow())
236 dirtyGrid(); 271 dirtyGrid();
237 } 272 }
238 273
239 bool RenderGrid::explicitGridDidResize(const RenderStyle* oldStyle) const 274 bool RenderGrid::explicitGridDidResize(const RenderStyle* oldStyle) const
240 { 275 {
241 return oldStyle->gridTemplateColumns().size() != style()->gridTemplateColumn s().size() 276 return oldStyle->gridTemplateColumns().size() != style()->gridTemplateColumn s().size()
242 || oldStyle->gridTemplateRows().size() != style()->gridTemplateRows().si ze(); 277 || oldStyle->gridTemplateRows().size() != style()->gridTemplateRows().si ze();
243 } 278 }
244 279
245 bool RenderGrid::namedGridLinesDefinitionDidChange(const RenderStyle* oldStyle) const 280 bool RenderGrid::namedGridLinesDefinitionDidChange(const RenderStyle* oldStyle) const
246 { 281 {
247 return oldStyle->namedGridRowLines() != style()->namedGridRowLines() 282 if (!oldStyle)
248 || oldStyle->namedGridColumnLines() != style()->namedGridColumnLines(); 283 return true;
284
285 return oldStyle->orderedNamedGridRowLines() != style()->orderedNamedGridRowL ines()
286 || oldStyle->orderedNamedGridColumnLines() != style()->orderedNamedGridC olumnLines()
287 || oldStyle->namedGridArea() != style()->namedGridArea();
249 } 288 }
250 289
251 void RenderGrid::layoutBlock(bool relayoutChildren) 290 void RenderGrid::layoutBlock(bool relayoutChildren)
252 { 291 {
253 ASSERT(needsLayout()); 292 ASSERT(needsLayout());
254 293
255 if (!relayoutChildren && simplifiedLayout()) 294 if (!relayoutChildren && simplifiedLayout())
256 return; 295 return;
257 296
258 // FIXME: Much of this method is boiler plate that matches RenderBox::layout Block and Render*FlexibleBox::layoutBlock. 297 // FIXME: Much of this method is boiler plate that matches RenderBox::layout Block and Render*FlexibleBox::layoutBlock.
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 return m_gridItemCoordinate.get(gridItem); 999 return m_gridItemCoordinate.get(gridItem);
961 } 1000 }
962 1001
963 GridSpan RenderGrid::resolveGridPositionsFromAutoPlacementPosition(const RenderB ox*, GridTrackSizingDirection, size_t initialPosition) const 1002 GridSpan RenderGrid::resolveGridPositionsFromAutoPlacementPosition(const RenderB ox*, GridTrackSizingDirection, size_t initialPosition) const
964 { 1003 {
965 // FIXME: We don't support spanning with auto positions yet. Once we do, thi s is wrong. Also we should make 1004 // FIXME: We don't support spanning with auto positions yet. Once we do, thi s is wrong. Also we should make
966 // sure the grid can accomodate the new item as we only grow 1 position in a given direction. 1005 // sure the grid can accomodate the new item as we only grow 1 position in a given direction.
967 return GridSpan(initialPosition, initialPosition); 1006 return GridSpan(initialPosition, initialPosition);
968 } 1007 }
969 1008
1009 static bool isNonExistentNamedLineOrArea(GridPosition& position, RenderStyle& st yle, const NamedGridLinesMap& gridLinesMap)
1010 {
1011 ASSERT(position.isNamedGridArea());
1012 String lineName = position.namedGridLine();
Julien - ping for review 2014/04/08 16:47:28 Wouldn't passing this String directly to isNonExis
1013
1014 return !style.namedGridArea().contains(lineName) && !gridLinesMap.contains(l ineName);
1015 }
1016
970 PassOwnPtr<GridSpan> RenderGrid::resolveGridPositionsFromStyle(const RenderBox* gridItem, GridTrackSizingDirection direction) const 1017 PassOwnPtr<GridSpan> RenderGrid::resolveGridPositionsFromStyle(const RenderBox* gridItem, GridTrackSizingDirection direction) const
971 { 1018 {
972 GridPosition initialPosition = (direction == ForColumns) ? gridItem->style() ->gridColumnStart() : gridItem->style()->gridRowStart(); 1019 GridPosition initialPosition = (direction == ForColumns) ? gridItem->style() ->gridColumnStart() : gridItem->style()->gridRowStart();
973 const GridPositionSide initialPositionSide = (direction == ForColumns) ? Col umnStartSide : RowStartSide; 1020 const GridPositionSide initialPositionSide = (direction == ForColumns) ? Col umnStartSide : RowStartSide;
974 GridPosition finalPosition = (direction == ForColumns) ? gridItem->style()-> gridColumnEnd() : gridItem->style()->gridRowEnd(); 1021 GridPosition finalPosition = (direction == ForColumns) ? gridItem->style()-> gridColumnEnd() : gridItem->style()->gridRowEnd();
975 const GridPositionSide finalPositionSide = (direction == ForColumns) ? Colum nEndSide : RowEndSide; 1022 const GridPositionSide finalPositionSide = (direction == ForColumns) ? Colum nEndSide : RowEndSide;
1023 const NamedGridLinesMap& gridLines = (direction == ForColumns) ? m_namedGrid ColumnLines : m_namedGridRowLines;
976 1024
977 // We must handle the placement error handling code here instead of in the S tyleAdjuster because we don't want to 1025 // We must handle the placement error handling code here instead of in the S tyleAdjuster because we don't want to
978 // overwrite the specified values. 1026 // overwrite the specified values.
979 if (initialPosition.isSpan() && finalPosition.isSpan()) 1027 if (initialPosition.isSpan() && finalPosition.isSpan())
980 finalPosition.setAutoPosition(); 1028 finalPosition.setAutoPosition();
981 1029
982 if (initialPosition.isNamedGridArea() && !style()->namedGridArea().contains( initialPosition.namedGridLine())) 1030 if (initialPosition.isNamedGridArea() && isNonExistentNamedLineOrArea(initia lPosition, *style(), gridLines))
983 initialPosition.setAutoPosition(); 1031 initialPosition.setAutoPosition();
984 1032
985 if (finalPosition.isNamedGridArea() && !style()->namedGridArea().contains(fi nalPosition.namedGridLine())) 1033 if (finalPosition.isNamedGridArea() && isNonExistentNamedLineOrArea(finalPos ition, *style(), gridLines))
986 finalPosition.setAutoPosition(); 1034 finalPosition.setAutoPosition();
987 1035
988 if (initialPosition.shouldBeResolvedAgainstOppositePosition() && finalPositi on.shouldBeResolvedAgainstOppositePosition()) { 1036 if (initialPosition.shouldBeResolvedAgainstOppositePosition() && finalPositi on.shouldBeResolvedAgainstOppositePosition()) {
989 if (style()->gridAutoFlow() == AutoFlowNone) 1037 if (style()->gridAutoFlow() == AutoFlowNone)
990 return adoptPtr(new GridSpan(0, 0)); 1038 return adoptPtr(new GridSpan(0, 0));
991 1039
992 // We can't get our grid positions without running the auto placement al gorithm. 1040 // We can't get our grid positions without running the auto placement al gorithm.
993 return nullptr; 1041 return nullptr;
994 } 1042 }
995 1043
(...skipping 16 matching lines...) Expand all
1012 if (resolvedFinalPosition < resolvedInitialPosition) 1060 if (resolvedFinalPosition < resolvedInitialPosition)
1013 resolvedFinalPosition = resolvedInitialPosition; 1061 resolvedFinalPosition = resolvedInitialPosition;
1014 1062
1015 return adoptPtr(new GridSpan(resolvedInitialPosition, resolvedFinalPosition) ); 1063 return adoptPtr(new GridSpan(resolvedInitialPosition, resolvedFinalPosition) );
1016 } 1064 }
1017 1065
1018 size_t RenderGrid::resolveNamedGridLinePositionFromStyle(const GridPosition& pos ition, GridPositionSide side) const 1066 size_t RenderGrid::resolveNamedGridLinePositionFromStyle(const GridPosition& pos ition, GridPositionSide side) const
1019 { 1067 {
1020 ASSERT(!position.namedGridLine().isNull()); 1068 ASSERT(!position.namedGridLine().isNull());
1021 1069
1022 const NamedGridLinesMap& gridLinesNames = (side == ColumnStartSide || side = = ColumnEndSide) ? style()->namedGridColumnLines() : style()->namedGridRowLines( ); 1070 const NamedGridLinesMap& gridLinesNames = gridLinesForSide(side);
1023 NamedGridLinesMap::const_iterator it = gridLinesNames.find(position.namedGri dLine()); 1071 NamedGridLinesMap::const_iterator it = gridLinesNames.find(position.namedGri dLine());
1024 if (it == gridLinesNames.end()) { 1072 if (it == gridLinesNames.end()) {
1025 if (position.isPositive()) 1073 if (position.isPositive())
1026 return 0; 1074 return 0;
1027 const size_t lastLine = explicitGridSizeForSide(side); 1075 const size_t lastLine = explicitGridSizeForSide(side);
1028 return GridPosition::adjustGridPositionForSide(lastLine, side); 1076 return GridPosition::adjustGridPositionForSide(lastLine, side);
1029 } 1077 }
1030 1078
1031 size_t namedGridLineIndex; 1079 size_t namedGridLineIndex;
1032 if (position.isPositive()) 1080 if (position.isPositive())
1033 namedGridLineIndex = std::min<size_t>(position.integerPosition(), it->va lue.size()) - 1; 1081 namedGridLineIndex = std::min<size_t>(position.integerPosition(), it->va lue.size()) - 1;
1034 else 1082 else
1035 namedGridLineIndex = std::max<int>(it->value.size() - abs(position.integ erPosition()), 0); 1083 namedGridLineIndex = std::max<int>(it->value.size() - abs(position.integ erPosition()), 0);
1036 return GridPosition::adjustGridPositionForSide(it->value[namedGridLineIndex] , side); 1084 return GridPosition::adjustGridPositionForSide(it->value[namedGridLineIndex] , side);
1037 } 1085 }
1038 1086
1087 size_t RenderGrid::resolveExplicitPositionFromStyle(const GridPosition& position , GridPositionSide side) const
1088 {
1089 ASSERT(position.integerPosition());
1090
1091 if (!position.namedGridLine().isNull())
1092 return resolveNamedGridLinePositionFromStyle(position, side);
1093
1094 if (position.isPositive())
1095 return GridPosition::adjustGridPositionForSide(position.integerPosition( ) - 1, side);
1096
1097 size_t resolvedPosition = abs(position.integerPosition()) - 1;
1098 const size_t endOfTrack = explicitGridSizeForSide(side);
1099
1100 // Per http://lists.w3.org/Archives/Public/www-style/2013Mar/0589.html, we c lamp negative value to the first line.
1101 if (endOfTrack < resolvedPosition)
1102 return 0;
1103
1104 return GridPosition::adjustGridPositionForSide(endOfTrack - resolvedPosition , side);
1105 }
1106
1039 size_t RenderGrid::resolveGridPositionFromStyle(const GridPosition& position, Gr idPositionSide side) const 1107 size_t RenderGrid::resolveGridPositionFromStyle(const GridPosition& position, Gr idPositionSide side) const
1040 { 1108 {
1041 switch (position.type()) { 1109 // We shouldn't see any other type of position here because 'auto' and span depend on the opposite position for
1042 case ExplicitPosition: { 1110 // resolution (e.g. grid-row: auto / 1 or grid-column: span 3 / myHeader).
1043 ASSERT(position.integerPosition()); 1111 ASSERT(position.type() == NamedGridAreaPosition || position.type() == Explic itPosition);
1044 1112
1045 if (!position.namedGridLine().isNull()) 1113 if (position.type() == NamedGridAreaPosition) {
1046 return resolveNamedGridLinePositionFromStyle(position, side); 1114 // Four implicit named grid lines are created for each grid area (areaNa me-{start|end} for rows and
1115 // columns). Authors can either use the area names or the implicit grid line names.
1116 NamedGridAreaMap::const_iterator areaIter = style()->namedGridArea().fin d(position.namedGridLine());
1117 if (areaIter != style()->namedGridArea().end()) {
1118 String implicitNamedGridLine = position.namedGridLine() + ((side == ColumnStartSide || side == RowStartSide) ? "-start" : "-end");
1119 const NamedGridLinesMap& gridLineNames = gridLinesForSide(side);
1120 NamedGridLinesMap::const_iterator lineIter = gridLineNames.find(impl icitNamedGridLine);
1047 1121
1048 // Handle <integer> explicit position. 1122 if (lineIter != gridLineNames.end())
1049 if (position.isPositive()) 1123 return GridPosition::adjustGridPositionForSide(lineIter->value[0 ], side);
1050 return GridPosition::adjustGridPositionForSide(position.integerPosit ion() - 1, side);
1051 1124
1052 size_t resolvedPosition = abs(position.integerPosition()) - 1; 1125 return areaIter->value.positionForSide(side);
1053 const size_t endOfTrack = explicitGridSizeForSide(side); 1126 }
1127 // Fallback to a implicit grid line position if there is no grid area wi th that name.
1128 GridPosition adjustedPosition;
1129 adjustedPosition.setExplicitPosition(1, position.namedGridLine());
1130 return resolveExplicitPositionFromStyle(adjustedPosition, side);
1131 }
1054 1132
1055 // Per http://lists.w3.org/Archives/Public/www-style/2013Mar/0589.html, we clamp negative value to the first line. 1133 return resolveExplicitPositionFromStyle(position, side);
1056 if (endOfTrack < resolvedPosition)
1057 return 0;
1058
1059 return GridPosition::adjustGridPositionForSide(endOfTrack - resolvedPosi tion, side);
1060 }
1061 case NamedGridAreaPosition:
1062 {
1063 NamedGridAreaMap::const_iterator it = style()->namedGridArea().find(posi tion.namedGridLine());
1064 // Unknown grid area should have been computed to 'auto' by now.
1065 ASSERT_WITH_SECURITY_IMPLICATION(it != style()->namedGridArea().end());
1066 const GridCoordinate& gridAreaCoordinate = it->value;
1067 switch (side) {
1068 case ColumnStartSide:
1069 return gridAreaCoordinate.columns.initialPositionIndex;
1070 case ColumnEndSide:
1071 return gridAreaCoordinate.columns.finalPositionIndex;
1072 case RowStartSide:
1073 return gridAreaCoordinate.rows.initialPositionIndex;
1074 case RowEndSide:
1075 return gridAreaCoordinate.rows.finalPositionIndex;
1076 }
1077 ASSERT_NOT_REACHED();
1078 return 0;
1079 }
1080 case AutoPosition:
1081 case SpanPosition:
1082 // 'auto' and span depend on the opposite position for resolution (e.g. grid-row: auto / 1 or grid-column: span 3 / "myHeader").
1083 ASSERT_NOT_REACHED();
1084 return 0;
1085 }
1086 ASSERT_NOT_REACHED();
1087 return 0;
1088 } 1134 }
1089 1135
1090 PassOwnPtr<GridSpan> RenderGrid::resolveGridPositionAgainstOppositePosition(size _t resolvedOppositePosition, const GridPosition& position, GridPositionSide side ) const 1136 PassOwnPtr<GridSpan> RenderGrid::resolveGridPositionAgainstOppositePosition(size _t resolvedOppositePosition, const GridPosition& position, GridPositionSide side ) const
1091 { 1137 {
1092 if (position.isAuto()) 1138 if (position.isAuto())
1093 return GridSpan::create(resolvedOppositePosition, resolvedOppositePositi on); 1139 return GridSpan::create(resolvedOppositePosition, resolvedOppositePositi on);
1094 1140
1095 ASSERT(position.isSpan()); 1141 ASSERT(position.isSpan());
1096 ASSERT(position.spanPosition() > 0); 1142 ASSERT(position.spanPosition() > 0);
1097 1143
1098 if (!position.namedGridLine().isNull()) { 1144 if (!position.namedGridLine().isNull()) {
1099 // span 2 'c' -> we need to find the appropriate grid line before / afte r our opposite position. 1145 // span 2 'c' -> we need to find the appropriate grid line before / afte r our opposite position.
1100 return resolveNamedGridLinePositionAgainstOppositePosition(resolvedOppos itePosition, position, side); 1146 return resolveNamedGridLinePositionAgainstOppositePosition(resolvedOppos itePosition, position, side);
1101 } 1147 }
1102 1148
1103 return GridSpan::createWithSpanAgainstOpposite(resolvedOppositePosition, pos ition, side); 1149 return GridSpan::createWithSpanAgainstOpposite(resolvedOppositePosition, pos ition, side);
1104 } 1150 }
1105 1151
1106 PassOwnPtr<GridSpan> RenderGrid::resolveNamedGridLinePositionAgainstOppositePosi tion(size_t resolvedOppositePosition, const GridPosition& position, GridPosition Side side) const 1152 PassOwnPtr<GridSpan> RenderGrid::resolveNamedGridLinePositionAgainstOppositePosi tion(size_t resolvedOppositePosition, const GridPosition& position, GridPosition Side side) const
1107 { 1153 {
1108 ASSERT(position.isSpan()); 1154 ASSERT(position.isSpan());
1109 ASSERT(!position.namedGridLine().isNull()); 1155 ASSERT(!position.namedGridLine().isNull());
1110 // Negative positions are not allowed per the specification and should have been handled during parsing. 1156 // Negative positions are not allowed per the specification and should have been handled during parsing.
1111 ASSERT(position.spanPosition() > 0); 1157 ASSERT(position.spanPosition() > 0);
1112 1158
1113 const NamedGridLinesMap& gridLinesNames = (side == ColumnStartSide || side = = ColumnEndSide) ? style()->namedGridColumnLines() : style()->namedGridRowLines( ); 1159 const NamedGridLinesMap& gridLinesNames = gridLinesForSide(side);
1114 NamedGridLinesMap::const_iterator it = gridLinesNames.find(position.namedGri dLine()); 1160 NamedGridLinesMap::const_iterator it = gridLinesNames.find(position.namedGri dLine());
1115 1161
1116 // If there is no named grid line of that name, we resolve the position to ' auto' (which is equivalent to 'span 1' in this case). 1162 // If there is no named grid line of that name, we resolve the position to ' auto' (which is equivalent to 'span 1' in this case).
1117 // See http://lists.w3.org/Archives/Public/www-style/2013Jun/0394.html. 1163 // See http://lists.w3.org/Archives/Public/www-style/2013Jun/0394.html.
1118 if (it == gridLinesNames.end()) 1164 if (it == gridLinesNames.end())
1119 return GridSpan::create(resolvedOppositePosition, resolvedOppositePositi on); 1165 return GridSpan::create(resolvedOppositePosition, resolvedOppositePositi on);
1120 1166
1121 return GridSpan::createWithNamedSpanAgainstOpposite(resolvedOppositePosition , position, side, it->value); 1167 return GridSpan::createWithNamedSpanAgainstOpposite(resolvedOppositePosition , position, side, it->value);
1122 } 1168 }
1123 1169
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 if (isOutOfFlowPositioned()) 1427 if (isOutOfFlowPositioned())
1382 return "RenderGrid (positioned)"; 1428 return "RenderGrid (positioned)";
1383 if (isAnonymous()) 1429 if (isAnonymous())
1384 return "RenderGrid (generated)"; 1430 return "RenderGrid (generated)";
1385 if (isRelPositioned()) 1431 if (isRelPositioned())
1386 return "RenderGrid (relative positioned)"; 1432 return "RenderGrid (relative positioned)";
1387 return "RenderGrid"; 1433 return "RenderGrid";
1388 } 1434 }
1389 1435
1390 } // namespace WebCore 1436 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderGrid.h ('k') | Source/core/rendering/style/GridCoordinate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698