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 4f372c4a47e8bb9169aa62d87bce6280a46e2471..1e3434b5da870185309d3831846535a49135d053 100644 |
| --- a/ui/views/bubble/bubble_delegate.cc |
| +++ b/ui/views/bubble/bubble_delegate.cc |
| @@ -231,10 +231,13 @@ void BubbleDelegateView::OnWidgetBoundsChanged(Widget* widget, |
| } |
| gfx::Rect BubbleDelegateView::GetAnchorRect() { |
| - gfx::Rect anchor_bounds = anchor_view() ? anchor_view()->GetBoundsInScreen() : |
| - gfx::Rect(anchor_point_, gfx::Size()); |
| - anchor_bounds.Inset(anchor_insets_); |
| - return anchor_bounds; |
| + if (anchor_view()) { |
| + gfx::Rect anchor_bounds = anchor_view()->GetBoundsInScreen(); |
| + anchor_bounds.Inset(anchor_insets_); |
| + return anchor_bounds; |
| + } else { |
| + return gfx::Rect(anchor_point_, gfx::Size()); |
|
benwells
2013/03/28 05:43:18
nit: no need for the else here, as the if() has a
|
| + } |
| } |
| void BubbleDelegateView::StartFade(bool fade_in) { |