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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 16:31:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 804d65e6508b15d59ad65b3cecfaaeb49f7c86f4
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 25 03:18:29 2010 +0000

    2010-11-24  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
    
            Reviewed by Martin Robinson.
    
            [GTK] Windowless plugins gets broken key input
            https://bugs.webkit.org/show_bug.cgi?id=49927
    
            When converting the GdkEvent to XEvent we need to send the
            hardware_keycode as XEvent::keycode. Instead we where sending
            the GdkEvent::keyval. This is already tested by
            plugins/keyboard-events.html, but a bug in the test plugin was
            resulting in false positive.
    
            * plugins/gtk/PluginViewGtk.cpp:
            (WebCore::PluginView::handleKeyboardEvent):
    2010-11-24  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
    
            Reviewed by Martin Robinson.
    
            [GTK] Windowless plugins gets broken key input
            https://bugs.webkit.org/show_bug.cgi?id=49927
    
            Convert the XEvent::keycode to ASCII before printing it. Not
            doing this was causing false positive in
            plugins/keyboard-events.html.
    
            * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
            (keycode_to_char):
            (webkit_test_plugin_handle_event):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72717 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7afdb69..54448d8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-24  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Windowless plugins gets broken key input
+        https://bugs.webkit.org/show_bug.cgi?id=49927
+
+        When converting the GdkEvent to XEvent we need to send the
+        hardware_keycode as XEvent::keycode. Instead we where sending
+        the GdkEvent::keyval. This is already tested by
+        plugins/keyboard-events.html, but a bug in the test plugin was
+        resulting in false positive.
+
+        * plugins/gtk/PluginViewGtk.cpp:
+        (WebCore::PluginView::handleKeyboardEvent):
+
 2010-11-24  Eric Uhrhane  <ericu at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index 6608f6c..35f8ee2 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -282,7 +282,7 @@ void PluginView::handleKeyboardEvent(KeyboardEvent* event)
     xEvent.xkey.subwindow = 0; // we have no child window
     xEvent.xkey.time = event->timeStamp();
     xEvent.xkey.state = gdkEvent->state; // GdkModifierType mirrors xlib state masks
-    xEvent.xkey.keycode = gdkEvent->keyval;
+    xEvent.xkey.keycode = gdkEvent->hardware_keycode;
     xEvent.xkey.same_screen = true;
 
     // NOTE: As the XEvents sent to the plug-in are synthesized and there is not a native window
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a055d14..55cedae 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-24  Nicolas Dufresne  <nicolas.dufresne at collabora.co.uk>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Windowless plugins gets broken key input
+        https://bugs.webkit.org/show_bug.cgi?id=49927
+
+        Convert the XEvent::keycode to ASCII before printing it. Not
+        doing this was causing false positive in 
+        plugins/keyboard-events.html.
+
+        * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
+        (keycode_to_char):
+        (webkit_test_plugin_handle_event):
+
 2010-11-24  Jan Erik Hanssen  <jhanssen at sencha.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
index 755fba0..a4f7f04 100644
--- a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
+++ b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
@@ -38,6 +38,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <X11/Xlib.h>
+#include <X11/Xutil.h>
 #include <string>
 
 using namespace std;
@@ -261,6 +262,13 @@ webkit_test_plugin_print(NPP /*instance*/, NPPrint* /*platformPrint*/)
 {
 }
 
+static char keyEventToChar(XKeyEvent* event)
+{
+    char c = ' ';
+    XLookupString(event, &c, sizeof(c), 0, 0);
+    return c;
+}
+
 static int16_t
 webkit_test_plugin_handle_event(NPP instance, void* event)
 {
@@ -278,10 +286,10 @@ webkit_test_plugin_handle_event(NPP instance, void* event)
             pluginLog(instance, "mouseDown at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
             break;
         case KeyRelease:
-            pluginLog(instance, "keyUp '%c'", evt->xkey.keycode);
+            pluginLog(instance, "keyUp '%c'", keyEventToChar(&evt->xkey));
             break;
         case KeyPress:
-            pluginLog(instance, "keyDown '%c'", evt->xkey.keycode);
+            pluginLog(instance, "keyDown '%c'", keyEventToChar(&evt->xkey));
             break;
         case MotionNotify:
         case EnterNotify:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list