Chromium Code Reviews| Index: chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc |
| diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc |
| index 8b2a367de1e2e256e85bdd630f521386c055220e..53fc8e4a71a44acec036064fb9d253c3799f9df1 100644 |
| --- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc |
| +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc |
| @@ -118,6 +118,16 @@ void DesktopMediaListView::Layout() { |
| x += active_style_->item_size.width(); |
| } |
| + |
| + // TODO(qiangchen): Bounded ScrollView has a bug to display horizontal bar |
| + // always, and then display vertical bar when the content just fit the |
| + // container. See crbug/636338. |
|
msw
2016/09/06 19:01:13
nit: file a new bug for the TODO to fix the underl
qiangchen
2016/09/06 21:48:03
Done.
|
| + // Fix the underlying issue and remove the following code. |
| + gfx::Size parent_content_size = parent()->GetContentsBounds().size(); |
| + gfx::Size preferred_size = GetPreferredSize(); |
| + SetSize(gfx::Size( |
|
msw
2016/09/06 19:01:13
optional nit: use Size::SetToMax():
gfx::Size pref
qiangchen
2016/09/06 21:48:03
Done.
|
| + std::max(parent_content_size.width(), preferred_size.width()), |
| + std::max(parent_content_size.height(), preferred_size.height()))); |
| } |
| bool DesktopMediaListView::OnKeyPressed(const ui::KeyEvent& event) { |