Index: third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
index cd8e759b22198378c0d7379bdfa4fffbe1507628..d5f093b6d2ab785721b99d0421ef90e8141e6cde 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
@@ -1554,6 +1554,12 @@ void LayoutGrid::layoutPositionedObjects(bool relayoutChildren, PositionedLayout |
child->setOverrideContainingBlockContentLogicalHeight(rowBreadth); |
child->setExtraInlineOffset(columnOffset); |
child->setExtraBlockOffset(rowOffset); |
+ |
+ if (child->parent() == this) { |
+ PaintLayer* childLayer = child->layer(); |
+ childLayer->setStaticInlinePosition(borderStart() + columnOffset); |
+ childLayer->setStaticBlockPosition(borderBefore() + rowOffset); |
+ } |
} |
LayoutBlock::layoutPositionedObjects(relayoutChildren, info); |
@@ -1641,14 +1647,6 @@ void LayoutGrid::offsetAndBreadthForPositionedChild(const LayoutBox& child, Grid |
} |
} |
- if (child.parent() == this && !startIsAuto) { |
- // If column/row start is "auto" the static position has been already set in prepareChildForPositionedLayout(). |
- PaintLayer* childLayer = child.layer(); |
- if (isForColumns) |
- childLayer->setStaticInlinePosition(borderStart() + offset); |
- else |
- childLayer->setStaticBlockPosition(borderBefore() + offset); |
- } |
} |
GridArea LayoutGrid::cachedGridArea(const LayoutBox& gridItem) const |