From eb6837c36518ed3c21637bb0525832f787f33f2a Mon Sep 17 00:00:00 2001 From: "brk376@motorola.com" Date: Tue, 8 Nov 2011 18:59:36 +0000 Subject: chrome should show the context menu on menu key press though last_mouse_down is NULL. BUG=102828 TEST=1. Open https://bugs.webkit.org/ 2. Focus input field using 'Tab' key. 3. Press menu or Shift+F10 key to open context menu. 4. This should open a menu. Review URL: http://codereview.chromium.org/8503009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109065 0039d316-1c4b-4281-b951-d872f2087c98 --- AUTHORS | 1 + chrome/browser/tab_contents/tab_contents_view_gtk.cc | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 82403ea..d952438 100644 --- a/AUTHORS +++ b/AUTHORS @@ -141,3 +141,4 @@ Ravi Phaneendra Kasibhatla Rosen Dash Parag Radke Yair Yogev +Chandra Shekar Vallala diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc index c588ecc..d23ea55 100644 --- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc +++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc @@ -376,11 +376,12 @@ void TabContentsViewGtk::ShowContextMenu(const ContextMenuParams& params) { } RenderWidgetHostViewGtk* view_gtk = static_cast(view); - if (!view_gtk || !view_gtk->last_mouse_down()) + if (!view_gtk) return; context_menu_.reset(new RenderViewContextMenuGtk( - tab_contents_, params, view_gtk->last_mouse_down()->time)); + tab_contents_, params, view_gtk->last_mouse_down() ? + view_gtk->last_mouse_down()->time : GDK_CURRENT_TIME)); context_menu_->Init(); gfx::Rect bounds; -- cgit v1.1