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

Unified Diff: Source/core/css/resolver/StyleAdjuster.cpp

Issue 614263005: [CSS Grid Layout] overflow-position keyword for align and justify properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied suggested changes. Created 6 years, 2 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
Index: Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
index dc278e60be6e74766c7a3126440e13ee641804c2..af83723536ebb0cfdb4eca4d7137bbd33acd9624 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -250,6 +250,12 @@ void StyleAdjuster::adjustStyleForAlignment(RenderStyle& style, const RenderStyl
bool isFlexOrGrid = style.isDisplayFlexibleOrGridBox();
bool absolutePositioned = style.position() == AbsolutePosition;
+ // The default overflow alignment is 'true' for flex or grid items/contaners, 'safe' otherwise.
+ if (style.justifyItemsOverflowAlignment() == OverflowAlignmentDefault)
+ style.setJustifyItemsOverflowAlignment(isFlexOrGrid ? OverflowAlignmentTrue : OverflowAlignmentSafe);
+ if (style.justifySelfOverflowAlignment() == OverflowAlignmentDefault)
+ style.setJustifySelfOverflowAlignment(isFlexOrGrid ? OverflowAlignmentTrue : OverflowAlignmentSafe);
+
// If the inherited value of justify-items includes the legacy keyword, 'auto'
// computes to the the inherited value.
// Otherwise, auto computes to:

Powered by Google App Engine
This is Rietveld 408576698