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

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

Issue 450783002: [CSS Grid Layout] Ignore positioned block item added after inline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes in the test in order to reproduce the bug in current trunk Created 6 years, 3 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 | « LayoutTests/fast/css-grid-layout/grid-add-positioned-block-item-after-inline-item-expected.txt ('k') | no next file » | 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::addChild(newChild, beforeChild); 212 RenderBlock::addChild(newChild, beforeChild);
213 213
214 if (gridIsDirty()) 214 if (gridIsDirty())
215 return; 215 return;
216 216
217 if (!newChild->isBox()) { 217 if (!newChild->isBox()) {
218 dirtyGrid(); 218 dirtyGrid();
219 return; 219 return;
220 } 220 }
221 221
222 // If the new child has been inserted inside an existent anonymous block, we can simple ignore it as the anonymous
Julien - ping for review 2014/09/08 23:13:51 s/simple/simply/
Manuel Rego 2014/09/09 10:03:57 Done.
223 // block is an already known grid item.
224 if (newChild->parent() != this)
225 return;
226
222 // FIXME: Implement properly "stack" value in auto-placement algorithm. 227 // FIXME: Implement properly "stack" value in auto-placement algorithm.
223 if (!style()->isGridAutoFlowAlgorithmStack()) { 228 if (!style()->isGridAutoFlowAlgorithmStack()) {
224 // The grid needs to be recomputed as it might contain auto-placed items that will change their position. 229 // The grid needs to be recomputed as it might contain auto-placed items that will change their position.
225 dirtyGrid(); 230 dirtyGrid();
226 return; 231 return;
227 } 232 }
228 233
229 RenderBox* newChildBox = toRenderBox(newChild); 234 RenderBox* newChildBox = toRenderBox(newChild);
230 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositionsFr omStyle(*style(), *newChildBox, ForRows); 235 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositionsFr omStyle(*style(), *newChildBox, ForRows);
231 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosition sFromStyle(*style(), *newChildBox, ForColumns); 236 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosition sFromStyle(*style(), *newChildBox, ForColumns);
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 if (isOutOfFlowPositioned()) 1452 if (isOutOfFlowPositioned())
1448 return "RenderGrid (positioned)"; 1453 return "RenderGrid (positioned)";
1449 if (isAnonymous()) 1454 if (isAnonymous())
1450 return "RenderGrid (generated)"; 1455 return "RenderGrid (generated)";
1451 if (isRelPositioned()) 1456 if (isRelPositioned())
1452 return "RenderGrid (relative positioned)"; 1457 return "RenderGrid (relative positioned)";
1453 return "RenderGrid"; 1458 return "RenderGrid";
1454 } 1459 }
1455 1460
1456 } // namespace blink 1461 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-add-positioned-block-item-after-inline-item-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698