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

Unified Diff: ui/views/bubble/bubble_delegate.cc

Issue 89503003: Close bubble widget when its anchor widget bounds has changed and move_with_anchor is false. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/bubble/bubble_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index 8c305c8f1b01e8a63fe462146a16f52e31b97460..515c400526be19c4ca20fc13844c63f534b8f6d0 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -174,8 +174,12 @@ void BubbleDelegateView::OnWidgetActivationChanged(Widget* widget,
void BubbleDelegateView::OnWidgetBoundsChanged(Widget* widget,
const gfx::Rect& new_bounds) {
- if (move_with_anchor() && anchor_widget() == widget)
- SizeToContents();
+ if (anchor_widget() == widget) {
+ if (move_with_anchor())
+ SizeToContents();
+ else
+ GetWidget()->Close();
+ }
}
View* BubbleDelegateView::GetAnchorView() const {
« no previous file with comments | « no previous file | ui/views/bubble/bubble_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698