Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index 763714ed83eaae8c6764d5b9c47c01d1779ee277..04f8eced489fa433cbb03e65c2308b11f35613f4 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -209,8 +209,9 @@ void View::AddChildViewAt(View* view, int index) { |
| // If |view| has a parent, remove it from its parent. |
| View* parent = view->parent_; |
| - const ui::NativeTheme* old_theme = view->GetNativeTheme(); |
| + ui::NativeTheme* old_theme = NULL; |
|
Evan Stade
2014/04/22 00:25:41
this change makes it so that OnNativeThemeChanged
sky
2014/04/22 15:30:21
Why do you need to do these changes?
Evan Stade
2014/04/22 17:12:32
The changes on L239-241 just seem more correct to
|
| if (parent) { |
| + old_theme = view->GetNativeTheme(); |
| if (parent == this) { |
| ReorderChildView(view, index); |
| return; |
| @@ -235,9 +236,9 @@ void View::AddChildViewAt(View* view, int index) { |
| views::Widget* widget = GetWidget(); |
| if (widget) { |
| RegisterChildrenForVisibleBoundsNotification(view); |
| - const ui::NativeTheme* new_theme = widget->GetNativeTheme(); |
| + const ui::NativeTheme* new_theme = view->GetNativeTheme(); |
| if (new_theme != old_theme) |
| - PropagateNativeThemeChanged(new_theme); |
| + view->PropagateNativeThemeChanged(new_theme); |
| if (view->visible()) |
| view->SchedulePaint(); |
| } |