| 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 9b70c14246c0977c6e1645927061b89b3aec95f0..0ff518fe28a25c532e10310d9fda35e48d181872 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| @@ -1263,16 +1263,17 @@ void LayoutGrid::LayoutPositionedObjects(bool relayout_children,
|
|
|
| child->SetOverrideContainingBlockContentLogicalWidth(column_breadth);
|
| child->SetOverrideContainingBlockContentLogicalHeight(row_breadth);
|
| - child->SetExtraInlineOffset(column_offset);
|
| - child->SetExtraBlockOffset(row_offset);
|
|
|
| - if (child->Parent() == this) {
|
| - PaintLayer* child_layer = child->Layer();
|
| - child_layer->SetStaticInlinePosition(BorderStart() + column_offset);
|
| - child_layer->SetStaticBlockPosition(BorderBefore() + row_offset);
|
| - }
|
| + // Mark for layout as we're resetting the position before and we relay in
|
| + // generic layout logic for positioned items in order to get the offsets
|
| + // properly resolved.
|
| + child->SetNeedsLayout(LayoutInvalidationReason::kGridChanged,
|
| + kMarkOnlyThis);
|
|
|
| LayoutPositionedObject(child, relayout_children, info);
|
| +
|
| + child->SetLogicalLocation(LayoutPoint(child->LogicalLeft() + column_offset,
|
| + child->LogicalTop() + row_offset));
|
| }
|
| }
|
|
|
| @@ -1364,11 +1365,8 @@ void LayoutGrid::OffsetAndBreadthForPositionedChild(
|
| breadth = std::max(end - start, LayoutUnit());
|
| offset = start;
|
|
|
| - if (is_for_columns && !StyleRef().IsLeftToRightDirection() &&
|
| - !child.StyleRef().HasStaticInlinePosition(
|
| - child.IsHorizontalWritingMode())) {
|
| - // If the child doesn't have a static inline position (i.e. "left" and/or
|
| - // "right" aren't "auto", we need to calculate the offset from the left
|
| + if (is_for_columns && !StyleRef().IsLeftToRightDirection()) {
|
| + // We always want to calculate the static position from the left
|
| // (even if we're in RTL).
|
| if (end_is_auto) {
|
| offset = LayoutUnit();
|
|
|