diff options
Diffstat (limited to 'chrome/browser/speech/speech_input_bubble_views.cc')
-rw-r--r-- | chrome/browser/speech/speech_input_bubble_views.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/speech/speech_input_bubble_views.cc b/chrome/browser/speech/speech_input_bubble_views.cc index 2fe29e8..5e56c73 100644 --- a/chrome/browser/speech/speech_input_bubble_views.cc +++ b/chrome/browser/speech/speech_input_bubble_views.cc @@ -112,11 +112,11 @@ void SpeechInputBubbleView::OnWidgetActivationChanged(views::Widget* widget, gfx::Rect SpeechInputBubbleView::GetAnchorRect() { gfx::Rect container_rect; tab_contents_->GetContainerBounds(&container_rect); - gfx::Point anchor(container_rect.x() + element_rect_.CenterPoint().x(), - container_rect.y() + element_rect_.bottom()); - if (!container_rect.Contains(anchor)) + gfx::Rect anchor(element_rect_); + anchor.Offset(container_rect.origin()); + if (!container_rect.Intersects(anchor)) return BubbleDelegateView::GetAnchorRect(); - return gfx::Rect(anchor, gfx::Size()); + return anchor; } void SpeechInputBubbleView::Init() { |