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

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

Issue 363133003: [CSS Grid Layout] Adapting align-self, align-items and justify-self to the last CSS 3 spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: A new approach for resolving auto values. 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 5d7c1aa7b235643035d2c71cb92d93279de623bd..a9960fb6d2f0b6af33670aee43b218135e34acfd 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -254,6 +254,23 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
style->setTextAutosizingMultiplier(e->renderStyle()->textAutosizingMultiplier());
style->setUnique();
}
+
+ adjustStyleForAlignment(style, *parentStyle);
+}
+
+void StyleAdjuster::adjustStyleForAlignment(RenderStyle* style, RenderStyle& parentStyle)
+{
+ if (style->justifyItems() == ItemPositionAuto)
+ style->resolveJustifyItemsAuto(parentStyle);
+
+ if (style->justifySelf() == ItemPositionAuto)
+ style->resolveJustifySelfAuto(parentStyle);
+
+ if (style->alignItems() == ItemPositionAuto)
+ style->resolveAlignItemsAuto(parentStyle);
+
+ if (style->alignSelf() == ItemPositionAuto)
+ style->resolveAlignSelfAuto(parentStyle);
}
void StyleAdjuster::adjustStyleForTagName(RenderStyle* style, RenderStyle* parentStyle, Element& element)

Powered by Google App Engine
This is Rietveld 408576698