Chromium Code Reviews| Index: views/controls/single_split_view.cc |
| diff --git a/views/controls/single_split_view.cc b/views/controls/single_split_view.cc |
| index 5addbb9186014c56a3cce95d8918c8d24c02d58c..06965bc6309786b9cc2f906339a0b4e312c399d5 100644 |
| --- a/views/controls/single_split_view.cc |
| +++ b/views/controls/single_split_view.cc |
| @@ -246,7 +246,9 @@ int SingleSplitView::NormalizeDividerOffset(int divider_offset, |
| const gfx::Rect& bounds) const { |
| int primary_axis_size = GetPrimaryAxisSize(bounds.width(), bounds.height()); |
| if (divider_offset < 0) |
| - return (primary_axis_size - kDividerSize) / 2; |
| + // Prevents negative check fail in gfx::Size() for an embedded |
|
sky
2011/09/09 15:32:23
For a comment, how about 'primary_axis_size may <
Gajen
2011/09/12 15:13:44
Agreed but it won't add more value b'coz
0)Adds on
|
| + // SingleSplitView on very first Layout. |
| + return std::max(0, (primary_axis_size - kDividerSize) / 2); |
| return std::min(divider_offset, |
| std::max(primary_axis_size - kDividerSize, 0)); |
| } |