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..0b395f635b1289b1d0c0d1ec96d7993411d01306 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 |
|
mstensho (USE GERRIT)
2017/04/27 12:37:28
You could remove that last sentence (or at least w
|
| if (!has_perpendicular_containing_block && container_logical_width && |
| - container_logical_width != |
| + container_logical_width > |
| (computed_values.extent_ + computed_values.margins_.start_ + |
| computed_values.margins_.end_) && |
| !IsFloating() && !IsInline() && !cb->IsFlexibleBoxIncludingDeprecated() && |