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

Unified Diff: Source/core/rendering/RenderGrid.cpp

Issue 314993002: [CSS Grid Layout] Fix auto-placement algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 6 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-item-auto-placement-automatic-span-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 163edcffe0754ba440f5c24fba58f1a10b62528a..fa4ff5e7865270123debe9559ba4b19f87303bbe 100644
--- a/Source/core/rendering/RenderGrid.cpp
+++ b/Source/core/rendering/RenderGrid.cpp
@@ -932,6 +932,10 @@ void RenderGrid::placeAutoMajorAxisItemOnGrid(RenderBox* gridItem)
const size_t endOfMinorAxis = autoPlacementMinorAxisDirection() == ForColumns ? gridColumnCount() : gridRowCount();
if (minorAxisFinalPositionIndex.toInt() < endOfMinorAxis)
break;
+
+ // Discard empty grid area as it does not fit in the minor axis direction.
+ // We don't need to create a new empty grid area yet as we might find a valid one in the next iteration.
+ emptyGridArea = nullptr;
}
}
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-item-auto-placement-automatic-span-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698