Prevent browser-side hit testing when page popup is selected

When any form of cross-process frames are enabled, the browser process
locks mouse input to a RenderWidgetHostView while a mouse button is
being held down. This also applies to page popups, which causes a
problem on Linux when a user drag-selects a drop-down menu from a
<select> element, because the popup does not receive any input until
the button is released.

This changelist exempts popup RenderWidgetHostViewAuras from browser-
side hit testing, ignoring mouse capture.

BUG=703191

Review-Url: https://codereview.chromium.org/2770923002
Cr-Commit-Position: refs/heads/master@{#459476}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c49fd75..c89fa4bf 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2545,6 +2545,11 @@
   return false;
 }
 
+bool WebContentsImpl::IsWidgetForMainFrame(
+    RenderWidgetHostImpl* render_widget_host) {
+  return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
+}
+
 BrowserAccessibilityManager*
     WebContentsImpl::GetRootBrowserAccessibilityManager() {
   RenderFrameHostImpl* rfh = GetMainFrame();