Hide popups when handling mouse down, mouse wheel, or gesture tap in a WebFrameWidget

Desktop / Chromium - ekaramad [chromium.org] - 20 April 2017 13:45 EDT

When a mouse down is handled inside WebViewImpl (main frame), the current page popup is hidden. The same behavior should apply to out of process renderers. However, in OOPIF renderers the WebViewImpl does not handle mouse events and the task is delegated to the WebFrameWidget corresponding to the frame which has received the event. But since receiving and input inside a WebFrameWidget suggests that the mouse down has been outside the bounds of the WebPagePopup, we should dismiss any currently showing popups the same way as we do it for WebViewImpls.

Specifically, not having this behavior led to a bug on Windows where date picker inside OOPIFs does not show again after dismissing an older one by clicking inside the OOPIF.

BUG=671732

Review-Url: https://codereview.chromium.org/2804813002 Cr-Commit-Position: refs/heads/master@{#466055}

e3cbfee Hide popups when handling mouse down, mouse wheel, or gesture tap in a WebFrameWidget
.../site_per_process_interactive_browsertest.cc | 110 +++++++++++++++++++++
.../WebKit/Source/web/WebFrameWidgetImpl.cpp | 29 +++++-
third_party/WebKit/Source/web/WebViewImpl.cpp | 26 ++---
third_party/WebKit/Source/web/WebViewImpl.h | 14 ++-
4 files changed, 159 insertions(+), 20 deletions(-)

Upstream: git.chromium.org


  • Share