Add a new source type MENU_SOURCE_LONG_PRESS to identify context menu's being...
Add a new source type MENU_SOURCE_LONG_PRESS to identify context menu's being opened via the long press gesture. For context, please refer to this patch https://codereview.chromium.org/1602903003/, where we display the context menu on Windows when the long press gesture is released. This patch used the MENU_SOURCE_TOUCH source type in the context menu params to determine whether a menu is being opened via the long press gesture. Turns out that the MENU_SOURCE_TOUCH is used in places like devtools to open the context menu, which does not work due to the above patch. Fix is to add a new menu source type MENU_SOURCE_LONG_PRESS We use this in RenderWidgetHostViewAura to identify context menus opening via the long press gesture. Added another menu source type MENU_SOURCE_LONG_TAP which indicates menus opening via the long tap gesture. This should fix this regression. BUG=581005 TEST=RenderWidgetHostViewAuraWithViewHarnessTest.ContextMenuTest. Updated this test to test for the MENU_SOURCE_LONG_PRESS gesture type. Review URL: https://codereview.chromium.org/1637743002 Cr-Commit-Position: refs/heads/master@{#371672}
Showing
Please register or sign in to comment