Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| index a54d860bc9e646cb9c5d0c9b52559e8042e2f17f..e2f3b6ebc1cc233445a0e633ad4403883f43ca2a 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| @@ -516,10 +516,8 @@ void RenderWidgetHostViewAura::InitAsPopup( |
| SetBounds(bounds_in_screen); |
| Show(); |
| -#if !defined(OS_WIN) && !defined(OS_CHROMEOS) |
| - if (NeedsInputGrab()) |
| + if (NeedsMouseCapture()) |
| window_->SetCapture(); |
| -#endif |
| event_filter_for_popup_exit_.reset(new EventFilterForPopupExit(this)); |
| } |
| @@ -1869,7 +1867,8 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { |
| FinishImeCompositionSession(); |
| break; |
| case ui::ET_MOUSE_RELEASED: |
| - window_->ReleaseCapture(); |
| + if (!NeedsMouseCapture()) |
| + window_->ReleaseCapture(); |
|
oshima
2014/09/16 16:17:24
who is closing the popup in this case?
pkotwicz
2014/09/17 02:27:58
The popup is closed when
- The user clicks somewhe
|
| break; |
| default: |
| break; |
| @@ -2204,6 +2203,13 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { |
| return popup_type_ == blink::WebPopupTypeSelect; |
| } |
| +bool RenderWidgetHostViewAura::NeedsMouseCapture() { |
| +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| + return NeedsInputGrab(); |
| +#endif |
| + return false; |
| +} |
| + |
| void RenderWidgetHostViewAura::FinishImeCompositionSession() { |
| if (!has_composition_text_) |
| return; |