• Gyuyoung Kim's avatar
    fixup! Convert WidgetMsg_ShowContextMenu to Mojo · a4ab41ab
    Gyuyoung Kim authored
    This CL is to fix the regressions caused by r785154. r785154 has been
    causing two regressions. One is the context menu is opened at the wrong place
    once right click is used inside emulation window. The other one is
    a crash happens when performing a right click on 'Color selector'
    overlay in emulation view.
    
    The first regression caused by r785154 missed clearing
    |host_context_menu_location_| unlike the original behavior. So, it
    made RenderFrameImpl::ShowContextMenu() calculate the position of
    the context menu with |host_context_menu_location| instead of the
    current window position unlike the original behavior.
    
    And, the second regresion was caused by RenderWidgetHostImpl::ShowContextMenuAtPoint
    calls ShowContextMenu() through the Mojo message without checking if
    |blink_frame_widget_| is bound.
    
    This CL fixes those regressions.
    
    Bug: 1093960, 1113088, 1115440
    Change-Id: I94c3c385caeacda5561d30e6fd7ced6e86d69201
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354128Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#798639}
    a4ab41ab
render_widget_host_impl.cc 128 KB