Changeset 72113 in webkit


Ignore:
Timestamp:
Nov 16, 2010 9:56:23 AM (13 years ago)
Author:
Martin Robinson
Message:

2010-11-16 Carlos Garcia Campos <cgarcia@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):
Location:
trunk/WebKit/gtk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r72109 r72113  
     12010-11-16  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Some key-press events can't be handled by WebView
     6        https://bugs.webkit.org/show_bug.cgi?id=48986
     7
     8        The problem is that "popup-menu" and "show-help" signals are
     9        handled by GtkTextView, as they are added to the key bindings set
     10        of every widget in gtk_widget_class_init(). For all other bindings
     11        handled by GtkTextView we are stopping the signal emission in
     12        their callbacks, so we only need to do the same for "popup-menu"
     13        and "show-help" signals.
     14
     15        * WebCoreSupport/EditorClientGtk.cpp:
     16        (WebKit::toggleOverwriteCallback):
     17        (WebKit::popupMenuCallback):
     18        (WebKit::showHelpCallback):
     19        (WebKit::EditorClient::EditorClient):
     20
    1212010-11-16  Carlos Garcia Campos  <cgarcia@igalia.com>
    222
  • trunk/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp

    r71881 r72113  
    123123}
    124124
    125 static void toggleOverwriteCallback(GtkWidget* widget, EditorClient* client)
     125static void toggleOverwriteCallback(GtkWidget* widget, EditorClient*)
    126126{
    127127    // We don't support toggling the overwrite mode, but the default callback expects
    128128    // the GtkTextView to have a layout, so we handle this signal just to stop it.
    129129    g_signal_stop_emission_by_name(widget, "toggle-overwrite");
     130}
     131
     132// GTK+ will still send these signals to the web view. So we can safely stop signal
     133// emission without breaking accessibility.
     134static void popupMenuCallback(GtkWidget* widget, EditorClient*)
     135{
     136    g_signal_stop_emission_by_name(widget, "popup-menu");
     137}
     138
     139static void showHelpCallback(GtkWidget* widget, EditorClient*)
     140{
     141    g_signal_stop_emission_by_name(widget, "show-help");
    130142}
    131143
     
    790802    g_signal_connect(m_nativeWidget.get(), "delete-from-cursor", G_CALLBACK(deleteFromCursorCallback), this);
    791803    g_signal_connect(m_nativeWidget.get(), "toggle-overwrite", G_CALLBACK(toggleOverwriteCallback), this);
     804    g_signal_connect(m_nativeWidget.get(), "popup-menu", G_CALLBACK(popupMenuCallback), this);
     805    g_signal_connect(m_nativeWidget.get(), "show-help", G_CALLBACK(showHelpCallback), this);
    792806}
    793807
Note: See TracChangeset for help on using the changeset viewer.