Chromium Code Reviews| Index: ui/views/bubble/bubble_delegate.cc |
| diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc |
| index 53ff9e69b7e56f075dd900172d24f536cc9b95bc..972743dc964fc8bebdda8bd67a539749020fd36c 100644 |
| --- a/ui/views/bubble/bubble_delegate.cc |
| +++ b/ui/views/bubble/bubble_delegate.cc |
| @@ -176,10 +176,16 @@ void BubbleDelegateView::OnWidgetActivationChanged(Widget* widget, |
| void BubbleDelegateView::OnWidgetBoundsChanged(Widget* widget, |
| const gfx::Rect& new_bounds) { |
| if (anchor_widget() == widget) { |
| - if (move_with_anchor()) |
| + if (move_with_anchor()) { |
| SizeToContents(); |
| - else |
| - GetWidget()->Close(); |
| + } else { |
| + // Do not close if the widget gets shrinked vertically without move. |
|
msw
2014/02/13 00:32:48
This seems odd, and I don't think this is the righ
oshima
2014/02/13 01:28:29
You're right that anchor position may change even
msw
2014/02/13 01:38:07
I don't see a reason offhand why the bookmark bubb
|
| + gfx::Rect bounds = widget->GetWindowBoundsInScreen(); |
| + if (bounds.origin() != new_bounds.origin() || |
| + bounds.width() != new_bounds.width()) { |
| + GetWidget()->Close(); |
| + } |
| + } |
| } |
| } |