Index: Source/core/rendering/RenderGrid.cpp |
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
index 80046d23d2c9225e15d8555bfc0590e01753b808..041c62a0e9cf12e0a2f6ed9ff40de6d66bd5ea28 100644 |
--- a/Source/core/rendering/RenderGrid.cpp |
+++ b/Source/core/rendering/RenderGrid.cpp |
@@ -211,7 +211,8 @@ void RenderGrid::addChild(RenderObject* newChild, RenderObject* beforeChild) |
return; |
} |
- if (style()->gridAutoFlow() != AutoFlowNone) { |
+ // FIXME: Implement properly "stack" value in auto-placement algorithm. |
+ if (style()->gridAutoFlow() != AutoFlowStackColumn && style()->gridAutoFlow() != AutoFlowStackRow) { |
// The grid needs to be recomputed as it might contain auto-placed items that will change their position. |
dirtyGrid(); |
return; |
@@ -260,7 +261,8 @@ void RenderGrid::removeChild(RenderObject* child) |
ASSERT(child->isBox()); |
- if (style()->gridAutoFlow() != AutoFlowNone) { |
+ // FIXME: Implement properly "stack" value in auto-placement algorithm. |
+ if (style()->gridAutoFlow() != AutoFlowStackColumn && style()->gridAutoFlow() != AutoFlowStackRow) { |
// The grid needs to be recomputed as it might contain auto-placed items that will change their position. |
dirtyGrid(); |
return; |
@@ -810,7 +812,8 @@ void RenderGrid::placeItemsOnGrid() |
ASSERT(gridRowCount() >= style()->gridTemplateRows().size()); |
ASSERT(gridColumnCount() >= style()->gridTemplateColumns().size()); |
- if (autoFlow == AutoFlowNone) { |
+ // FIXME: Implement properly "stack" value in auto-placement algorithm. |
+ if (autoFlow == AutoFlowStackColumn || autoFlow == AutoFlowStackRow) { |
// If we did collect some grid items, they won't be placed thus never laid out. |
ASSERT(!autoMajorAxisAutoGridItems.size()); |
ASSERT(!specifiedMajorAxisAutoGridItems.size()); |
@@ -933,15 +936,13 @@ void RenderGrid::placeAutoMajorAxisItemOnGrid(RenderBox* gridItem) |
GridTrackSizingDirection RenderGrid::autoPlacementMajorAxisDirection() const |
{ |
GridAutoFlow flow = style()->gridAutoFlow(); |
- ASSERT(flow != AutoFlowNone); |
- return (flow == AutoFlowColumn) ? ForColumns : ForRows; |
+ return (flow == AutoFlowColumn || flow == AutoFlowColumnDense || flow == AutoFlowStackColumn) ? ForColumns : ForRows; |
} |
GridTrackSizingDirection RenderGrid::autoPlacementMinorAxisDirection() const |
{ |
GridAutoFlow flow = style()->gridAutoFlow(); |
- ASSERT(flow != AutoFlowNone); |
- return (flow == AutoFlowColumn) ? ForRows : ForColumns; |
+ return (flow == AutoFlowColumn || flow == AutoFlowColumnDense || flow == AutoFlowStackColumn) ? ForRows : ForColumns; |
} |
void RenderGrid::dirtyGrid() |