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

Unified Diff: Source/core/rendering/style/GridResolvedPosition.cpp

Issue 320093002: [CSS Grid Layout] Named grid line span not allowed for automatic positions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@span-named-grid-line-to-upload
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 | « Source/core/rendering/style/GridCoordinate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/GridResolvedPosition.cpp
diff --git a/Source/core/rendering/style/GridResolvedPosition.cpp b/Source/core/rendering/style/GridResolvedPosition.cpp
index 7888168dbd7919d47ea83a8774445019aac466c7..b537048b75c5eae3a8ca4596d09102000d161699 100644
--- a/Source/core/rendering/style/GridResolvedPosition.cpp
+++ b/Source/core/rendering/style/GridResolvedPosition.cpp
@@ -56,6 +56,12 @@ void GridResolvedPosition::initialAndFinalPositionsFromStyle(const RenderStyle&
if (finalPosition.isNamedGridArea() && !isValidNamedLineOrArea(finalPosition.namedGridLine(), gridContainerStyle, finalPositionSide))
finalPosition.setAutoPosition();
+
+ // If the grid item has an automatic position and a grid span for a named line in a given dimension, instead treat the grid span as one.
+ if (initialPosition.isAuto() && finalPosition.isSpan() && !finalPosition.namedGridLine().isNull())
+ finalPosition.setSpanPosition(1, String());
+ if (finalPosition.isAuto() && initialPosition.isSpan() && !initialPosition.namedGridLine().isNull())
+ initialPosition.setSpanPosition(1, String());
}
GridSpan GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition(const RenderStyle& gridContainerStyle, const RenderBox& gridItem, GridTrackSizingDirection direction, const GridResolvedPosition& resolvedInitialPosition)
« no previous file with comments | « Source/core/rendering/style/GridCoordinate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698