Chromium Code Reviews| Index: ui/views/controls/scroll_view.cc |
| diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc |
| index 68ee68fee3eaa8561e097be266a8ec202f448155..cd09df95662eae55a5bf8fdaf1bb266ce13cac7c 100644 |
| --- a/ui/views/controls/scroll_view.cc |
| +++ b/ui/views/controls/scroll_view.cc |
| @@ -12,6 +12,7 @@ |
| #include "ui/native_theme/native_theme.h" |
| #include "ui/views/background.h" |
| #include "ui/views/border.h" |
| +#include "ui/views/controls/focus_ring.h" |
| #include "ui/views/style/platform_style.h" |
| #include "ui/views/widget/widget.h" |
| @@ -294,6 +295,11 @@ int ScrollView::GetHeightForWidth(int width) const { |
| } |
| void ScrollView::Layout() { |
| + // If there's a focus ring, lay it out first. |
| + for (int i = 0; i < child_count(); ++i) |
|
sky
2016/10/12 20:08:53
I suspect tree isn't the only place that wants scr
Elly Fong-Jones
2016/10/12 21:10:22
Done.
|
| + if (child_at(i)->GetClassName() == FocusRing::kViewClassName) |
| + child_at(i)->Layout(); |
| + |
| gfx::Rect available_rect = GetContentsBounds(); |
| if (is_bounded()) { |
| int content_width = available_rect.width(); |