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

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

Issue 433153003: [CSS Grid Layout] Don't resolve align-self and justify-self properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 6225ed6d32fcef01ac00058f5eeaf32fbecc80a4..286940585f709e0275a9c75a510430410b7a51d3 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -271,18 +271,17 @@ void StyleAdjuster::adjustStyleForAlignment(RenderStyle& style, const RenderStyl
style.setJustifyItemsPositionType(parentStyle.justifyItemsPositionType());
} else if (isFlexOrGrid) {
style.setJustifyItems(ItemPositionStretch);
+ } else {
+ style.setJustifyItems(ItemPositionStart);
}
}
// The 'auto' keyword computes to 'stretch' on absolutely-positioned elements,
// and to the computed value of justify-items on the parent (minus
- // any legacy keywords) on all other boxes.
+ // any 'legacy' keywords) on all other boxes (to be resolved during the layout).
if (style.justifySelf() == ItemPositionAuto) {
if (absolutePositioned) {
esprehn 2014/08/19 00:56:33 You should combine these if statements now.
jfernandez 2014/08/19 21:00:12 Acknowledged.
style.setJustifySelf(ItemPositionStretch);
- } else {
- style.setJustifySelf(parentStyle.justifyItems());
- style.setJustifySelfOverflowAlignment(parentStyle.justifyItemsOverflowAlignment());
}
}
@@ -292,17 +291,16 @@ void StyleAdjuster::adjustStyleForAlignment(RenderStyle& style, const RenderStyl
if (style.alignItems() == ItemPositionAuto) {
if (isFlexOrGrid)
style.setAlignItems(ItemPositionStretch);
+ else
+ style.setAlignItems(ItemPositionStart);
esprehn 2014/08/19 00:56:33 Doesn't this go against what your patch says it do
esprehn 2014/08/19 00:56:33 Doesn't this go against what your patch says it do
jfernandez 2014/08/19 21:00:12 Actually not. The patch precisely tries to resolve
}
// The 'auto' keyword computes to 'stretch' on absolutely-positioned elements,
// and to the computed value of align-items on the parent (minus
- // any 'legacy' keywords) on all other boxes.
+ // any 'legacy' keywords) on all other boxes (to be resolved during the layout).
if (style.alignSelf() == ItemPositionAuto) {
if (absolutePositioned) {
style.setAlignSelf(ItemPositionStretch);
- } else {
- style.setAlignSelf(parentStyle.alignItems());
- style.setAlignSelfOverflowAlignment(parentStyle.alignItemsOverflowAlignment());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698