Chromium Code Reviews| Index: Source/core/rendering/RenderGrid.cpp |
| diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
| index e7daaecd24e539d34fa4095dad4fb805159dccc8..98a11bd637f3b63c31252d4806ea749c79b4eeb0 100644 |
| --- a/Source/core/rendering/RenderGrid.cpp |
| +++ b/Source/core/rendering/RenderGrid.cpp |
| @@ -26,6 +26,7 @@ |
| #include "config.h" |
| #include "core/rendering/RenderGrid.h" |
| +#include "core/css/resolver/StyleAdjuster.h" |
| #include "core/rendering/RenderLayer.h" |
| #include "core/rendering/RenderView.h" |
| #include "core/rendering/TextAutosizer.h" |
| @@ -1284,20 +1285,10 @@ LayoutUnit RenderGrid::centeredRowPositionForChild(const RenderBox* child) const |
| return startOfRow + std::max<LayoutUnit>(0, endOfRow - startOfRow - child->logicalHeight()) / 2; |
| } |
| -// FIXME: We should move this logic to the StyleAdjuster or the StyleBuilder. |
| -static ItemPosition resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle) |
| -{ |
| - ItemPosition align = childStyle->alignSelf(); |
| - // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto". |
| - if (align == ItemPositionAuto) |
| - align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionStretch : parentStyle->alignItems(); |
| - return align; |
| -} |
| - |
| LayoutUnit RenderGrid::rowPositionForChild(const RenderBox* child) const |
| { |
| bool hasOrthogonalWritingMode = child->isHorizontalWritingMode() != isHorizontalWritingMode(); |
| - ItemPosition alignSelf = resolveAlignment(style(), child->style()); |
| + ItemPosition alignSelf = StyleAdjuster::resolveAlignment(style(), child->style()); |
|
esprehn
2014/09/09 10:10:51
This is backwards, the StyleAdjuster should call s
Sunil Ratnu
2014/09/09 10:33:08
Thanks esprehn for review. Maybe not in StyleAdjus
|
| switch (alignSelf) { |
| case ItemPositionSelfStart: |