Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index 45467ab23dbfc0fdbf68fdd9ad1ef9532bd20e64..f2c93c2a082e5a73f437b7a828ef2036090c4133 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -1803,7 +1803,6 @@ void View::DoRemoveChildView(View* view, |
| UnregisterChildrenForVisibleBoundsNotification(view); |
| if (view->visible()) |
| view->SchedulePaint(); |
| - GetWidget()->NotifyWillRemoveView(view); |
| } |
| view->PropagateRemoveNotifications(this, new_parent); |
| @@ -1824,6 +1823,9 @@ void View::DoRemoveChildView(View* view, |
| } |
| void View::PropagateRemoveNotifications(View* old_parent, View* new_parent) { |
| + if (GetWidget()) |
| + GetWidget()->NotifyWillRemoveView(this); |
|
sky
2016/01/25 21:22:14
Doing this here means we have to constantly to det
dmazzoni
2016/01/25 21:44:27
OK, moved to a separate helper that takes the widg
|
| + |
| for (int i = 0, count = child_count(); i < count; ++i) |
| child_at(i)->PropagateRemoveNotifications(old_parent, new_parent); |