| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index 097fec971dac558f6d294e287ee84ef1491c2e7a..7155f2b7b2c378898b76e7d160ba353934d260d5 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -2682,14 +2682,17 @@ void LayoutBox::ComputeLogicalWidth(
|
| computed_values.margins_.end_) &&
|
| !IsFloating() && !IsInline() && !cb->IsFlexibleBoxIncludingDeprecated() &&
|
| !cb->IsLayoutGrid()) {
|
| - LayoutUnit new_margin = container_logical_width - computed_values.extent_ -
|
| - cb->MarginStartForChild(*this);
|
| + LayoutUnit new_margin_total =
|
| + container_logical_width - computed_values.extent_;
|
| bool has_inverted_direction = cb->Style()->IsLeftToRightDirection() !=
|
| Style()->IsLeftToRightDirection();
|
| - if (has_inverted_direction)
|
| - computed_values.margins_.start_ = new_margin;
|
| - else
|
| - computed_values.margins_.end_ = new_margin;
|
| + if (has_inverted_direction) {
|
| + computed_values.margins_.start_ =
|
| + new_margin_total - computed_values.margins_.end_;
|
| + } else {
|
| + computed_values.margins_.end_ =
|
| + new_margin_total - computed_values.margins_.start_;
|
| + }
|
| }
|
|
|
| if (style_to_use.TextAutosizingMultiplier() != 1 &&
|
|
|