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

Unified Diff: Source/core/rendering/RenderFlexibleBox.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 | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderGrid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderFlexibleBox.cpp
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp
index 42fed8d2894fbed034511f2eb3439a26ee789173..51454b7179a4eb3ffcc6e7fb45df9a2b67d5c165 100644
--- a/Source/core/rendering/RenderFlexibleBox.cpp
+++ b/Source/core/rendering/RenderFlexibleBox.cpp
@@ -208,8 +208,8 @@ void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle*
// Flex items that were previously stretching need to be relayed out so we can compute new available cross axis space.
// This is only necessary for stretching since other alignment values don't change the size of the box.
for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
- ItemPosition previousAlignment = RenderStyle::resolveAlignment(oldStyle, child->style());
- if (previousAlignment == ItemPositionStretch && previousAlignment != RenderStyle::resolveAlignment(style(), child->style()))
+ ItemPosition previousAlignment = RenderStyle::resolveAlignment(oldStyle, child->style(), ItemPositionStretch);
+ if (previousAlignment == ItemPositionStretch && previousAlignment != RenderStyle::resolveAlignment(style(), child->style(), ItemPositionStretch))
child->setChildNeedsLayout(MarkOnlyThis);
}
}
@@ -1003,7 +1003,7 @@ void RenderFlexibleBox::prepareChildForPositionedLayout(RenderBox& child, Layout
ItemPosition RenderFlexibleBox::alignmentForChild(RenderBox& child) const
{
- ItemPosition align = RenderStyle::resolveAlignment(style(), child.style());
+ ItemPosition align = RenderStyle::resolveAlignment(style(), child.style(), ItemPositionStretch);
if (align == ItemPositionBaseline && hasOrthogonalFlow(child))
align = ItemPositionFlexStart;
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698