Reviewed by Kevin Ollivier.
authorkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2008 04:58:09 +0000 (04:58 +0000)
committerkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2008 04:58:09 +0000 (04:58 +0000)
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
WebCore/platform/wx/PopupMenuWx.cpp

index f08fa3d..bb29ca2 100644 (file)
@@ -1,3 +1,16 @@
+2008-05-11  Robin Dunn  <robin@alldunn.com>
+
+        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  <sam@webkit.org>
 
         Reviewed by Mark Rowe.
index b327f51..dfabadd 100644 (file)
@@ -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()