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

tonikitoo at webkit.org tonikitoo at webkit.org
Thu Apr 8 02:01:41 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit a4a7a3b386a8f323ed027239f8bb11a015e3d9a1
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 26 21:48:19 2010 +0000

    [Gtk] Make DRT EventSender::keyDown to consider 'hardware_keycode' field when synthesizing an event.
    https://bugs.webkit.org/show_bug.cgi?id=35432
    
    Patch by Antonio Gomes <tonikitoo at webkit.org>
    Reviewed by Gustavo Noronha.
    
    When a directional key-press event (arrow keys, End, Home, PageUp,
    PageDown, etc) is synthesized by DRT's EventSender and it targets
    an editor (e.g. <input type=text>, <textare>, etc), event is processed
    by WebCore::EventHandler. On the other hand, if event target is not
    an editor, event is bubbled up to Gtk+ for processing. In such cases,
    if 'hardware_keycode' is not provided at event synthesize time
    its processing fails (at some point in gtk_bindings_activate_event),
    and no scroll action is performed.
    
    Unskip fast/events/node-event-anchor-lock.html
    
    * DumpRenderTree/win/EventSender.cpp:
    (keyDownCallback):
    * platform/gtk/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55309 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index b3acff5..35aa143 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5480,9 +5480,6 @@ fast/events/onunload-window-property.html
 fast/dom/Window/get-set-properties.html
 http/tests/security/window-events-pass.html
 
-# https://bugs.webkit.org/show_bug.cgi?id=30587
-fast/events/node-event-anchor-lock.html
-
 # Probably related to https://bugs.webkit.org/show_bug.cgi?id=27637
 http/tests/security/mixedContent/insecure-plugin-in-iframe.html
 http/tests/loading/basic-auth-resend-wrong-credentials.html 
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 79443e7..9c362a3 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,26 @@
+2010-02-26  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Gustavo Noronha.
+        Patch by Antonio Gomes <tonikitoo at webkit.org>
+
+        [Gtk] Make DRT EventSender::keyDown to consider 'hardware_keycode' field when synthesizing an event.
+        https://bugs.webkit.org/show_bug.cgi?id=35432
+
+        When a directional key-press event (arrow keys, End, Home, PageUp,
+        PageDown, etc) is synthesized by DRT's EventSender and it targets
+        an editor (e.g. <input type=text>, <textare>, etc), event is processed
+        by WebCore::EventHandler. On the other hand, if event target is not
+        an editor, event is bubbled up to Gtk+ for processing. In such cases,
+        if 'hardware_keycode' is not provided at event synthesize time
+        its processing fails (at some point in gtk_bindings_activate_event),
+        and no scroll action is performed.
+
+        Unskip fast/events/node-event-anchor-lock.html
+
+        * DumpRenderTree/win/EventSender.cpp:
+        (keyDownCallback):
+        * platform/gtk/Skipped:
+
 2010-02-26  Dimitri Glazkov  <dglazkov at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index 458e0ba..5a6492a 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -557,8 +557,18 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
     event.key.state = state;
     event.key.window = GTK_WIDGET(view)->window;
 
+    // When synthesizing an event, an invalid hardware_keycode value
+    // can cause it to be badly processed by Gtk+.
+    GdkKeymapKey* keys;
+    gint n_keys;
+    if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), gdkKeySym, &keys, &n_keys)) {
+        event.key.hardware_keycode = keys[0].keycode;
+        g_free(keys);
+    }
+
     gboolean return_val;
     event.key.type = GDK_KEY_PRESS;
+
     g_signal_emit_by_name(view, "key-press-event", &event.key, &return_val);
 
     event.key.type = GDK_KEY_RELEASE;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list