From 4c9f2b587d552f8565b4ba8fb24f913364a5aa8d Mon Sep 17 00:00:00 2001 From: "kevino@webkit.org" Date: Mon, 12 May 2008 04:58:09 +0000 Subject: [PATCH] Reviewed by Kevin Ollivier. Since wx popup menus dismiss themselves when an item is selected we need to call hidePopup so webkit's internal state is correct. https://bugs.webkit.org/show_bug.cgi?id=19000 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33035 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 13 +++++++++++++ WebCore/platform/wx/PopupMenuWx.cpp | 9 ++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index f08fa3d..bb29ca2 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2008-05-11 Robin Dunn + + Reviewed by Kevin Ollivier. + + Since wx popup menus dismiss themselves when an item is selected we need to + call hidePopup so webkit's internal state is correct. + + https://bugs.webkit.org/show_bug.cgi?id=19000 + + * platform/wx/PopupMenuWx.cpp: + (WebCore::PopupMenu::OnMenuItemSelected): + (WebCore::PopupMenu::hide): + 2008-05-11 Sam Weinig Reviewed by Mark Rowe. diff --git a/WebCore/platform/wx/PopupMenuWx.cpp b/WebCore/platform/wx/PopupMenuWx.cpp index b327f51..dfabadd 100644 --- a/WebCore/platform/wx/PopupMenuWx.cpp +++ b/WebCore/platform/wx/PopupMenuWx.cpp @@ -85,14 +85,17 @@ void PopupMenu::show(const IntRect& r, FrameView* v, int index) void PopupMenu::OnMenuItemSelected(wxCommandEvent& event) { - if (client()) - client()->valueChanged(event.GetId() - s_menuStartId); + if (client()) { + client()->valueChanged(event.GetId() - s_menuStartId); + client()->hidePopup(); + } // TODO: Do we need to call Disconnect here? Do we have a ref to the native window still? } void PopupMenu::hide() { - notImplemented(); + // we don't need to do anything here, the native control only exists during the time + // show is called } void PopupMenu::updateFromElement() -- 1.8.3.1