-
Ionel Popescu authored
The current behavior for a popup is to destroy it, create it and destroy it again if the element which was clicked/tapped was already owning the popup. This behavior is causing a flicker effect when animation/drop shadow is added to the popup. This behavior can be changed to just store the popup, send the event to the element and later destroy the popup if needed. The popup will be destroyed in the following cases: 1. when another element which could open a popup was clicked/tapped - WebViewImpl::OpenPagePopup is going to call CancelPagePopup 2. when the user has clicked/tapped outside of the popup or on the element which had already a popup opened - by checking if the saved popup is the same as the current one Because of the way EventSender::HandleInputEventOnViewOrPopup is implemented adding a web_test will not be able to test the impacted scenarios: a popup should be dismissed when clicking outside of its area and another one should be opened when clicked/tapped on an element which supports having a popup (if first popup owner != second popup owner). Currently EventSender::HandleInputEventOnViewOrPopup will always send the input event to the popup if there is one. The real world implementation is that the popup will not receive the event if the click/tap event is outside of its area and the WebView is responsible for dismissing it. Bug: 992238 Change-Id: I13b7848e6e734e981d4fb9782e68a3d8123bc5ff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1745769Reviewed-by:
Avi Drissman <avi@chromium.org> Reviewed-by:
Kent Tamura <tkent@chromium.org> Reviewed-by:
Mason Freed <masonfreed@chromium.org> Commit-Queue: Ionel Popescu <iopopesc@microsoft.com> Cr-Commit-Position: refs/heads/master@{#693370}
21feee22