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..44e2c2dd1c8cd337edce1d1eb6fed88ce85efb30 100644 |
--- a/views/controls/single_split_view.cc |
+++ b/views/controls/single_split_view.cc |
@@ -246,7 +246,10 @@ 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 embedded SingleSplitView |
tfarina
2011/09/08 20:39:45
add space between gfx::Size() and for
and "for an
Gajen
2011/09/09 13:58:02
Done.
|
+ // on very first Layout. |
+ return std::max(0, ((primary_axis_size - kDividerSize) / 2)); |
tfarina
2011/09/08 20:39:45
is there an extra (unnecessary) parentheses around
Gajen
2011/09/09 13:58:02
Done.
|
+ |
return std::min(divider_offset, |
sky
2011/09/08 14:27:11
Put the std::max call here, eg std::max(0, divider
|
std::max(primary_axis_size - kDividerSize, 0)); |
} |