Chromium Code Reviews| 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 6f2ceee06cd38b7eebf8828ca9cde565f9b1a570..22e237c79377f1eb45c604bb23545d2878ac52fe 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -2702,8 +2702,15 @@ void LayoutBox::ComputeLogicalWidth( |
| computed_values.margins_.start_, computed_values.margins_.end_, |
| Style()->MarginStart(), Style()->MarginEnd()); |
| + // CSS 2.1 10.3.3 |
| + // If 'width' is not 'auto' and 'border-left-width' + 'padding-left' + 'width' |
| + // + 'padding-right' + 'border-right-width' (plus any of 'margin-left' or |
| + // 'margin-right' that are not 'auto') is larger than the width of the |
| + // containing block, then any 'auto' values for 'margin-left' or |
| + // 'margin-right' treated as zero. The following should only apply for parent |
| + // width >= children width |
| if (!has_perpendicular_containing_block && container_logical_width && |
| - container_logical_width != |
| + container_logical_width >= |
|
facetothefate
2017/04/26 18:09:43
To keep the old behavior, should be > I guess
|
| (computed_values.extent_ + computed_values.margins_.start_ + |
| computed_values.margins_.end_) && |
| !IsFloating() && !IsInline() && !cb->IsFlexibleBoxIncludingDeprecated() && |