Chromium Code Reviews| Index: Source/core/layout/LayoutFlexibleBox.cpp |
| diff --git a/Source/core/layout/LayoutFlexibleBox.cpp b/Source/core/layout/LayoutFlexibleBox.cpp |
| index 5de6becb21b9f66ef63b7ed635c9bea88309a265..2007f88f10c2df5dd3bed0cfa4fe3c4998264e0f 100644 |
| --- a/Source/core/layout/LayoutFlexibleBox.cpp |
| +++ b/Source/core/layout/LayoutFlexibleBox.cpp |
| @@ -117,7 +117,9 @@ void LayoutFlexibleBox::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidt |
| // For multiline, the min preferred width is if you put a break between each item. |
| minLogicalWidth = std::max(minLogicalWidth, minPreferredLogicalWidth); |
| } else { |
| - minLogicalWidth += minPreferredLogicalWidth; |
| + // We add minPreferredLogicalWidth only if is positive. Adding negative widths does not make sense. |
|
cbiesinger
2015/05/27 16:50:19
minPreferredLogicalWidth should not be negative. W
|
| + if (minPreferredLogicalWidth >= 0) |
| + minLogicalWidth += minPreferredLogicalWidth; |
| } |
| } else { |
| minLogicalWidth = std::max(minPreferredLogicalWidth, minLogicalWidth); |