| Index: ui/views/controls/scroll_view.cc
|
| diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc
|
| index e9dbdac9fdd94cb6a246668d3329c8108b4b89e3..0a554c93f37e3a4f46bca73190cd17de27749d32 100644
|
| --- a/ui/views/controls/scroll_view.cc
|
| +++ b/ui/views/controls/scroll_view.cc
|
| @@ -272,12 +272,11 @@ void ScrollView::SetVerticalScrollBar(ScrollBar* vert_sb) {
|
| }
|
|
|
| gfx::Size ScrollView::GetPreferredSize() const {
|
| - if (!is_bounded())
|
| - return View::GetPreferredSize();
|
| -
|
| gfx::Size size = contents()->GetPreferredSize();
|
| - size.SetToMax(gfx::Size(size.width(), min_height_));
|
| - size.SetToMin(gfx::Size(size.width(), max_height_));
|
| + if (is_bounded()) {
|
| + size.SetToMax(gfx::Size(size.width(), min_height_));
|
| + size.SetToMin(gfx::Size(size.width(), max_height_));
|
| + }
|
| gfx::Insets insets = GetInsets();
|
| size.Enlarge(insets.width(), insets.height());
|
| return size;
|
|
|