Commit dc76bd12 authored by Alice Boxhall's avatar Alice Boxhall Committed by Commit Bot

Revert "Remove code to store the last popup transiently in WebFrameWidgetImpl"

This reverts commit 573f4675.

Reason for revert: Seems to be causing EffectiveTouchActionPropagatesAcrossNestedFrames to fail https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8927388648425983952/+/steps/content_browsertests_on_Intel_GPU_on_Mac_on_Mac-10.12.6/0/logs/SitePerProcessBrowserTouchActionTest.EffectiveTouchActionPropagatesAcrossNestedFrames/0

Original change's description:
> 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/1372539
> Reviewed-by: James MacLean <wjmaclean@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#615708}

TBR=danakj@chromium.org,dcheng@chromium.org,wjmaclean@chromium.org

Change-Id: Ifddbb605fc6165505774105d5618d57b62e3159c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 912193, 671732
Reviewed-on: https://chromium-review.googlesource.com/c/1372110Reviewed-by: default avatarAlice Boxhall <aboxhall@chromium.org>
Commit-Queue: Alice Boxhall <aboxhall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615783}
parent 2ec822d3
......@@ -882,15 +882,15 @@ WebInputEventResult WebFrameWidgetImpl::HandleGestureEvent(
// 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
// called with GestureTapDown rather than a GSB/GSU/GSE or GPB/GPU/GPE.
// WebViewImpl takes additional steps to avoid the following GestureTap
// from re-opening the popup being closed here, but since GestureTap will
// unconditionally close the current popup here, it is not used/needed.
// TODO(wjmaclean): We should maybe mirror what WebViewImpl does, the
// HandleGestureEvent() needs to happen inside or before the GestureTap
// case to do so.
// When we close a popup because of a GestureTapDown, we also save it so
// we can prevent the following GestureTap from immediately reopening the
// same popup.
view_impl->SetLastHiddenPagePopup(view_impl->GetPagePopup());
View()->HidePopups();
break;
FALLTHROUGH;
case WebInputEvent::kGestureTapCancel:
View()->SetLastHiddenPagePopup(nullptr);
break;
case WebInputEvent::kGestureShowPress:
break;
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