| Index: Source/core/rendering/RenderFlexibleBox.cpp
|
| diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp
|
| index 644696facbe1bee7c8cbc791e9ad8c2f4bb10ed7..491b559f2e0e2b1020e5e31b7afb54d3a728f2e1 100644
|
| --- a/Source/core/rendering/RenderFlexibleBox.cpp
|
| +++ b/Source/core/rendering/RenderFlexibleBox.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "config.h"
|
| #include "core/rendering/RenderFlexibleBox.h"
|
|
|
| +#include "core/css/resolver/StyleAdjuster.h"
|
| #include "core/frame/UseCounter.h"
|
| #include "core/rendering/RenderLayer.h"
|
| #include "core/rendering/RenderView.h"
|
| @@ -192,14 +193,6 @@ int RenderFlexibleBox::inlineBlockBaseline(LineDirectionMode direction) const
|
| return synthesizedBaselineFromContentBox(this, direction) + marginAscent;
|
| }
|
|
|
| -static ItemPosition resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle)
|
| -{
|
| - ItemPosition align = childStyle->alignSelf();
|
| - if (align == ItemPositionAuto)
|
| - align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionStretch : parentStyle->alignItems();
|
| - return align;
|
| -}
|
| -
|
| void RenderFlexibleBox::removeChild(RenderObject* child)
|
| {
|
| RenderBlock::removeChild(child);
|
| @@ -214,8 +207,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 = resolveAlignment(oldStyle, child->style());
|
| - if (previousAlignment == ItemPositionStretch && previousAlignment != resolveAlignment(style(), child->style()))
|
| + ItemPosition previousAlignment = StyleAdjuster::resolveAlignment(oldStyle, child->style());
|
| + if (previousAlignment == ItemPositionStretch && previousAlignment != StyleAdjuster::resolveAlignment(style(), child->style()))
|
| child->setChildNeedsLayout(MarkOnlyThis);
|
| }
|
| }
|
| @@ -1013,7 +1006,7 @@ void RenderFlexibleBox::prepareChildForPositionedLayout(RenderBox* child, Layout
|
|
|
| ItemPosition RenderFlexibleBox::alignmentForChild(RenderBox* child) const
|
| {
|
| - ItemPosition align = resolveAlignment(style(), child->style());
|
| + ItemPosition align = StyleAdjuster::resolveAlignment(style(), child->style());
|
|
|
| if (align == ItemPositionBaseline && hasOrthogonalFlow(child))
|
| align = ItemPositionFlexStart;
|
|
|