Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1466)

Unified Diff: ui/views/view.cc

Issue 1624343003: Minor fixes for WidgetRemovalsObserver::OnWillRemoveView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698