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

Unified 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: Patch for landing 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderGrid.cpp
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp
index e7daaecd24e539d34fa4095dad4fb805159dccc8..8e4c9146bd1dace75fb64d23cb75eb5efc1fd2b2 100644
--- a/Source/core/rendering/RenderGrid.cpp
+++ b/Source/core/rendering/RenderGrid.cpp
@@ -219,6 +219,11 @@ void RenderGrid::addChild(RenderObject* newChild, RenderObject* beforeChild)
return;
}
+ // If the new child has been inserted inside an existent anonymous block, we can simply ignore it as the anonymous
+ // block is an already known grid item.
+ if (newChild->parent() != this)
+ return;
+
// FIXME: Implement properly "stack" value in auto-placement algorithm.
if (!style()->isGridAutoFlowAlgorithmStack()) {
// The grid needs to be recomputed as it might contain auto-placed items that will change their position.
« 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