[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

kevino at webkit.org kevino at webkit.org
Wed Apr 7 23:22:39 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 78dae66b3acdbb3266bd2a28331b0f23eebdf15c
Author: kevino at webkit.org <kevino at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 4 19:55:54 2009 +0000

    Reviewed by Kevin Ollivier.
    
    Fix an assert on shutdown when wxWebView has captured the mouse,
    and make sure wxWebView's right click handling is only active when
    the WebCore popup menu is used.
    
    https://bugs.webkit.org/show_bug.cgi?id=31131
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50522 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 27d5101..7202b7f 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,18 @@
+2009-11-04  Kevin Watters  <kevinwatters at gmail.com>
+
+        Reviewed by Kevin Ollivier.
+
+        Fix an assert on shutdown when wxWebView has captured the mouse,
+        and make sure wxWebView's right click handling is only active when 
+        the WebCore popup menu is used.
+        
+        https://bugs.webkit.org/show_bug.cgi?id=31131
+
+        * WebView.cpp:
+        (wxWebView::~wxWebView):
+        (wxWebView::OnContextMenuEvents):
+        (wxWebView::OnMenuSelectEvents):
+
 2009-11-04  Vadim Zeitlin  <vadim at wxwidgets.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp
index 1b27cde..a112c79 100644
--- a/WebKit/wx/WebView.cpp
+++ b/WebKit/wx/WebView.cpp
@@ -257,7 +257,6 @@ BEGIN_EVENT_TABLE(wxWebView, wxWindow)
     EVT_SIZE(wxWebView::OnSize)
     EVT_MOUSE_EVENTS(wxWebView::OnMouseEvents)
     EVT_CONTEXT_MENU(wxWebView::OnContextMenuEvents)
-    EVT_MENU(wxID_ANY, wxWebView::OnMenuSelectEvents)
     EVT_KEY_DOWN(wxWebView::OnKeyEvents)
     EVT_KEY_UP(wxWebView::OnKeyEvents)
     EVT_CHAR(wxWebView::OnKeyEvents)
@@ -348,6 +347,9 @@ wxWebView::~wxWebView()
 {
     m_beingDestroyed = true;
     
+    while (HasCapture())
+        ReleaseMouse();
+    
     if (m_mainFrame && m_mainFrame->GetFrame())
         m_mainFrame->GetFrame()->loader()->detachFromParent();
     
@@ -646,6 +648,7 @@ void wxWebView::OnMouseEvents(wxMouseEvent& event)
 
 void wxWebView::OnContextMenuEvents(wxContextMenuEvent& event)
 {
+    Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxWebView::OnMenuSelectEvents), NULL, this);
     m_impl->page->contextMenuController()->clearContextMenu();
     wxPoint localEventPoint = ScreenToClient(event.GetPosition());
 
@@ -675,10 +678,18 @@ void wxWebView::OnContextMenuEvents(wxContextMenuEvent& event)
         return;
 
     PopupMenu(menuWx, localEventPoint);
+    
+    Disconnect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxWebView::OnMenuSelectEvents), NULL, this);
 }
 
 void wxWebView::OnMenuSelectEvents(wxCommandEvent& event)
 {
+    // we shouldn't hit this unless there's a context menu showing
+    WebCore::ContextMenu* coreMenu = m_impl->page->contextMenuController()->contextMenu();
+    ASSERT(coreMenu);
+    if (!coreMenu)
+        return;
+
     WebCore::ContextMenuItem* item = WebCore::ContextMenu::itemWithId (event.GetId());
     if (!item)
         return;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list