Reviewed by Kevin Ollivier.
authorkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2011 18:23:24 +0000 (18:23 +0000)
committerkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2011 18:23:24 +0000 (18:23 +0000)
[wx] Update the popup menu code to grab the native control and initialize the
event handler properly.

https://bugs.webkit.org/show_bug.cgi?id=60482

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/wx/PopupMenuWx.cpp

index 674be54..f06f090 100644 (file)
@@ -2,6 +2,20 @@
 
         Reviewed by Kevin Ollivier.
 
+        [wx] Update the popup menu code to grab the native control and initialize the
+        event handler properly.
+        
+        https://bugs.webkit.org/show_bug.cgi?id=60482
+
+        * platform/wx/PopupMenuWx.cpp:
+        (WebCore::PopupMenuWx::PopupMenuWx):
+        (WebCore::PopupMenuWx::~PopupMenuWx):
+        (WebCore::PopupMenuWx::show):
+
+2011-05-09  Robin Dunn  <robin@alldunn.com>
+
+        Reviewed by Kevin Ollivier.
+
         [wx] Make sure other controls adjust the rect to handle transforms, and turn off the
         adjustment in 2.9.2+ where it is handled internally by wx.
         
index b850ef5..8a3b667 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "Frame.h"
 #include "FrameView.h"
+#include "HostWindow.h"
 #include "PopupMenuClient.h"
 #include "PlatformString.h"
 
@@ -65,11 +66,12 @@ PopupMenuWx::PopupMenuWx(PopupMenuClient* client)
     : m_popupClient(client)
     , m_menu(0)
 {
-    PopupMenuEventHandler m_popupHandler(client);
+    m_popupHandler = new PopupMenuEventHandler(client);
 }
 
 PopupMenuWx::~PopupMenuWx()
 {
+    delete m_popupHandler;
     delete m_menu;
 }
 
@@ -83,8 +85,9 @@ void PopupMenuWx::show(const IntRect& r, FrameView* v, int index)
     // just delete and recreate
     delete m_menu;
     ASSERT(client());
+    ASSERT(v);
 
-    wxWindow* nativeWin = v->platformWidget();
+    wxWindow* nativeWin = v->hostWindow()->platformPageClient();
 
     if (nativeWin) {
         // construct the menu