Commit 573f4675 authored by danakj's avatar danakj Committed by Commit Bot

Remove code to store the last popup transiently in WebFrameWidgetImpl

This code was copied over from WebViewImpl when adding the HidePopups
call in order to have a pinch zoom or scroll tap outside the current
popup in a non-main-frame-local-rooted iframe hide the current popup.

This is modifying state on WebViewImpl meant to track between TapDown
and Tap, to avoid the Tap showing a popup that was hidden by TapDown.

WebFrameWidgetImpl does not show popups on Tap, and if it did, it
should track this transient state locally not on WebViewImpl.

Also remove the undocumented FALLTHROUGH which was not explained
in 671732 as it now goes to nothing.

R=dcheng@chromium.org

Change-Id: I9d67539cf0afbb9db239b73bf83418e1a877e6db
Bug: 912193, 671732
Reviewed-on: https://chromium-review.googlesource.com/c/1372539Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615708}
parent fdacb825
...@@ -882,15 +882,15 @@ WebInputEventResult WebFrameWidgetImpl::HandleGestureEvent( ...@@ -882,15 +882,15 @@ WebInputEventResult WebFrameWidgetImpl::HandleGestureEvent(
// Touch pinch zoom and scroll on the page (outside of a popup) must hide // Touch pinch zoom and scroll on the page (outside of a popup) must hide
// the popup. In case of a touch scroll or pinch zoom, this function is // the popup. In case of a touch scroll or pinch zoom, this function is
// called with GestureTapDown rather than a GSB/GSU/GSE or GPB/GPU/GPE. // called with GestureTapDown rather than a GSB/GSU/GSE or GPB/GPU/GPE.
// When we close a popup because of a GestureTapDown, we also save it so // WebViewImpl takes additional steps to avoid the following GestureTap
// we can prevent the following GestureTap from immediately reopening the // from re-opening the popup being closed here, but since GestureTap will
// same popup. // unconditionally close the current popup here, it is not used/needed.
view_impl->SetLastHiddenPagePopup(view_impl->GetPagePopup()); // TODO(wjmaclean): We should maybe mirror what WebViewImpl does, the
// HandleGestureEvent() needs to happen inside or before the GestureTap
// case to do so.
View()->HidePopups(); View()->HidePopups();
FALLTHROUGH;
case WebInputEvent::kGestureTapCancel:
View()->SetLastHiddenPagePopup(nullptr);
break; break;
case WebInputEvent::kGestureTapCancel:
case WebInputEvent::kGestureShowPress: case WebInputEvent::kGestureShowPress:
break; break;
case WebInputEvent::kGestureDoubleTap: case WebInputEvent::kGestureDoubleTap:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment