| Index: ui/views/view.cc
|
| diff --git a/ui/views/view.cc b/ui/views/view.cc
|
| index 9ee7272bd04f4fbaa7078350e6eeb8462b484462..95f5c7037ab53e13e4915852e1b618547a1fc345 100644
|
| --- a/ui/views/view.cc
|
| +++ b/ui/views/view.cc
|
| @@ -1798,11 +1798,14 @@ void View::DoRemoveChildView(View* view,
|
| next_focusable->previous_focusable_view_ = prev_focusable;
|
| }
|
|
|
| - if (GetWidget()) {
|
| + Widget* widget = GetWidget();
|
| + if (widget) {
|
| UnregisterChildrenForVisibleBoundsNotification(view);
|
| if (view->visible())
|
| view->SchedulePaint();
|
| - GetWidget()->NotifyWillRemoveView(view);
|
| +
|
| + if (!new_parent || new_parent->GetWidget() != widget)
|
| + widget->NotifyWillRemoveView(view);
|
| }
|
|
|
| view->PropagateRemoveNotifications(this, new_parent);
|
|
|