[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mrobinson at webkit.org mrobinson at webkit.org
Wed Dec 22 15:55:15 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 562b2aa80bb856d722633a999187bae1efff7862
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 16 17:56:23 2010 +0000

    2010-11-16  Carlos Garcia Campos  <cgarcia at igalia.com>
    
            Reviewed by Martin Robinson.
    
            [GTK] Some key-press events can't be handled by WebView
            https://bugs.webkit.org/show_bug.cgi?id=48986
    
            The problem is that "popup-menu" and "show-help" signals are
            handled by GtkTextView, as they are added to the key bindings set
            of every widget in gtk_widget_class_init(). For all other bindings
            handled by GtkTextView we are stopping the signal emission in
            their callbacks, so we only need to do the same for "popup-menu"
            and "show-help" signals.
    
            * WebCoreSupport/EditorClientGtk.cpp:
            (WebKit::toggleOverwriteCallback):
            (WebKit::popupMenuCallback):
            (WebKit::showHelpCallback):
            (WebKit::EditorClient::EditorClient):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 5a844a7..4611775 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -2,6 +2,26 @@
 
         Reviewed by Martin Robinson.
 
+        [GTK] Some key-press events can't be handled by WebView
+        https://bugs.webkit.org/show_bug.cgi?id=48986
+
+        The problem is that "popup-menu" and "show-help" signals are
+        handled by GtkTextView, as they are added to the key bindings set
+        of every widget in gtk_widget_class_init(). For all other bindings
+        handled by GtkTextView we are stopping the signal emission in
+        their callbacks, so we only need to do the same for "popup-menu"
+        and "show-help" signals.
+
+        * WebCoreSupport/EditorClientGtk.cpp:
+        (WebKit::toggleOverwriteCallback):
+        (WebKit::popupMenuCallback):
+        (WebKit::showHelpCallback):
+        (WebKit::EditorClient::EditorClient):
+
+2010-11-16  Carlos Garcia Campos  <cgarcia at igalia.com>
+
+        Reviewed by Martin Robinson.
+
         [GTK] Show default context menu for the currently focused element when activated with keyboard
         https://bugs.webkit.org/show_bug.cgi?id=49376
 
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index c7b30b1..e04b5f9 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -122,13 +122,25 @@ static void pasteClipboardCallback(GtkWidget* widget, EditorClient* client)
     client->addPendingEditorCommand("Paste");
 }
 
-static void toggleOverwriteCallback(GtkWidget* widget, EditorClient* client)
+static void toggleOverwriteCallback(GtkWidget* widget, EditorClient*)
 {
     // We don't support toggling the overwrite mode, but the default callback expects
     // the GtkTextView to have a layout, so we handle this signal just to stop it.
     g_signal_stop_emission_by_name(widget, "toggle-overwrite");
 }
 
+// GTK+ will still send these signals to the web view. So we can safely stop signal
+// emission without breaking accessibility.
+static void popupMenuCallback(GtkWidget* widget, EditorClient*)
+{
+    g_signal_stop_emission_by_name(widget, "popup-menu");
+}
+
+static void showHelpCallback(GtkWidget* widget, EditorClient*)
+{
+    g_signal_stop_emission_by_name(widget, "show-help");
+}
+
 static const char* const gtkDeleteCommands[][2] = {
     { "DeleteBackward",               "DeleteForward"                        }, // Characters
     { "DeleteWordBackward",           "DeleteWordForward"                    }, // Word ends
@@ -789,6 +801,8 @@ EditorClient::EditorClient(WebKitWebView* webView)
     g_signal_connect(m_nativeWidget.get(), "move-cursor", G_CALLBACK(moveCursorCallback), this);
     g_signal_connect(m_nativeWidget.get(), "delete-from-cursor", G_CALLBACK(deleteFromCursorCallback), this);
     g_signal_connect(m_nativeWidget.get(), "toggle-overwrite", G_CALLBACK(toggleOverwriteCallback), this);
+    g_signal_connect(m_nativeWidget.get(), "popup-menu", G_CALLBACK(popupMenuCallback), this);
+    g_signal_connect(m_nativeWidget.get(), "show-help", G_CALLBACK(showHelpCallback), this);
 }
 
 EditorClient::~EditorClient()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list