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

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

Issue 613273002: [CSS Grid Layout] Stretch value for align and justify properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed some layout tests. Created 6 years, 1 month 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/justify-self-cell.html ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
index cce0938458ab0b7838fbc8fc4700fc618de0850f..477002f3ed6deb81eea530bd7e7f1754b4a91f64 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -301,8 +301,11 @@ void StyleAdjuster::adjustStyleForAlignment(RenderStyle& style, const RenderStyl
// Flex Containers: 'auto' computes to 'flex-start'.
// Grid Containers: 'auto' computes to 'start', and 'stretch' behaves like 'start'.
if ((style.justifyContent() == ContentPositionAuto) && (style.justifyContentDistribution() == ContentDistributionDefault)) {
- if (style.isDisplayFlexibleBox()) {
- style.setJustifyContent(ContentPositionFlexStart);
+ if (style.isDisplayFlexibleOrGridBox()) {
+ if (style.isDisplayFlexibleBox())
+ style.setJustifyContent(ContentPositionFlexStart);
+ else
+ style.setJustifyContent(ContentPositionStart);
}
}
}
« no previous file with comments | « LayoutTests/fast/css-grid-layout/justify-self-cell.html ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698