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

robert at webkit.org robert at webkit.org
Wed Dec 22 12:48:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fe7c2cb506309140cc81c604b0b674ff31637964
Author: robert at webkit.org <robert at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 30 21:16:45 2010 +0000

    2010-08-30  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Simon Hausmann.
    
            allow ports with windowed plugins to support windowless plugin tests
    
            https://bugs.webkit.org/show_bug.cgi?id=40730
    
            Ports that implement plugins windowed by default need to have a way of
            supporting plugin tests that assume the plugin is windowless. Add this
            feature to the tests and support it in the webkit test plugin. Also
            add mouse and keyboard event logging to the webkit-test plugin on Unix.
    
            Unskip the following tests on Qt:
    
            plugins/mouse-events.html
            plugins/keyboard-events.html
            plugins/mouse-events-fixedpos.html
    
            * platform/qt/Skipped:
            * plugins/keyboard-events.html:
            * plugins/mouse-events-fixedpos.html:
            * plugins/mouse-events.html:
    2010-08-30  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Simon Hausmann.
    
            allow ports with windowed plugins to support windowless plugin tests
    
            https://bugs.webkit.org/show_bug.cgi?id=40730
    
            Ports that implement plugins windowed by default need to have a way of
            supporting plugin tests that assume the plugin is windowless. Add this
            feature to the tests and support it in the webkit test plugin. Also
            add mouse and keyboard event logging to the webkit-test plugin on Unix.
    
            Unskip the following tests on Qt:
    
            plugins/mouse-events.html
            plugins/keyboard-events.html
            plugins/mouse-events-fixedpos.html
    
            * plugins/qt/PluginViewQt.cpp:
            (WebCore::PluginView::setFocus):
            (WebCore::setXKeyEventSpecificFields):
    2010-08-30  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Simon Hausmann.
    
            allow ports with windowed plugins to support windowless plugin tests
    
            https://bugs.webkit.org/show_bug.cgi?id=40730
    
            Ports that implement plugins windowed by default need to have a way of
            supporting plugin tests that assume the plugin is windowless. Add this
            feature to the tests and support it in the webkit test plugin. Also
            add mouse and keyboard event logging to the webkit-test plugin on Unix.
    
            Unskip the following tests on Qt:
    
            plugins/mouse-events.html
            plugins/keyboard-events.html
            plugins/mouse-events-fixedpos.html
    
            * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
            (pluginSetProperty):
            * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
            (NPP_New):
            * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
            (webkit_test_plugin_handle_event):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66408 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9581ca7..d4316d0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,27 @@
+2010-08-30  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        allow ports with windowed plugins to support windowless plugin tests
+
+        https://bugs.webkit.org/show_bug.cgi?id=40730
+
+        Ports that implement plugins windowed by default need to have a way of
+        supporting plugin tests that assume the plugin is windowless. Add this
+        feature to the tests and support it in the webkit test plugin. Also
+        add mouse and keyboard event logging to the webkit-test plugin on Unix.
+
+        Unskip the following tests on Qt:
+
+        plugins/mouse-events.html
+        plugins/keyboard-events.html
+        plugins/mouse-events-fixedpos.html
+
+        * platform/qt/Skipped:
+        * plugins/keyboard-events.html:
+        * plugins/mouse-events-fixedpos.html:
+        * plugins/mouse-events.html:
+
 2010-08-30  Evan Martin  <evan at chromium.org>
 
         Unreviewed, updating Chromium expectations.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 1750797..85a351e 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -424,12 +424,6 @@ plugins/embed-attributes-style.html
 # ---- depends on QuickTime support
 plugins/embed-attributes-setting.html
 fast/dom/object-embed-plugin-scripting.html
-
-# ---- events not getting to plugin
-# ---- https://bugs.webkit.org/show_bug.cgi?id=40730
-plugins/mouse-events.html
-plugins/keyboard-events.html
-plugins/mouse-events-fixedpos.html
 # ---- to be reviewed
 http/tests/plugins/plugin-document-has-focus.html
 
diff --git a/LayoutTests/plugins/keyboard-events.html b/LayoutTests/plugins/keyboard-events.html
index 30b93c9..b51804f 100644
--- a/LayoutTests/plugins/keyboard-events.html
+++ b/LayoutTests/plugins/keyboard-events.html
@@ -4,6 +4,7 @@
 <p>This test checks if a plug-in can receive keyboard events sent from eventSender. This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34936">Bug 34936</a>.</p>
 <script>
 
+    plg.windowedPlugin = false;
     plg.eventLoggingEnabled = true;
 
     if (!window.layoutTestController) {
diff --git a/LayoutTests/plugins/mouse-events-fixedpos.html b/LayoutTests/plugins/mouse-events-fixedpos.html
index 22c9c11..20088f5 100644
--- a/LayoutTests/plugins/mouse-events-fixedpos.html
+++ b/LayoutTests/plugins/mouse-events-fixedpos.html
@@ -31,6 +31,7 @@
 
     layoutTestController.dumpAsText();
 
+    plg.windowedPlugin = false;
     plg.eventLoggingEnabled = true;
 
     eventSender.mouseMoveTo(70,70);
diff --git a/LayoutTests/plugins/mouse-events.html b/LayoutTests/plugins/mouse-events.html
index 88b4f08..9638e2e 100644
--- a/LayoutTests/plugins/mouse-events.html
+++ b/LayoutTests/plugins/mouse-events.html
@@ -5,6 +5,7 @@
 Flash clicks/interactivity not working properly.</p>
 <script>
 
+    plg.windowedPlugin = false;
     plg.eventLoggingEnabled = true;
 
     if (!window.layoutTestController) {
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5391367..4166a23 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-08-30  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        allow ports with windowed plugins to support windowless plugin tests
+
+        https://bugs.webkit.org/show_bug.cgi?id=40730
+
+        Ports that implement plugins windowed by default need to have a way of
+        supporting plugin tests that assume the plugin is windowless. Add this
+        feature to the tests and support it in the webkit test plugin. Also
+        add mouse and keyboard event logging to the webkit-test plugin on Unix.
+
+        Unskip the following tests on Qt:
+
+        plugins/mouse-events.html
+        plugins/keyboard-events.html
+        plugins/mouse-events-fixedpos.html
+
+        * plugins/qt/PluginViewQt.cpp:
+        (WebCore::PluginView::setFocus):
+        (WebCore::setXKeyEventSpecificFields):
+
 2010-08-30  Kinuko Yasuda  <kinuko at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index 47e27d8..f60885d 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -154,6 +154,13 @@ void PluginView::setFocus(bool focused)
     } else {
         Widget::setFocus(focused);
     }
+    if (!m_isWindowed) {
+      XEvent npEvent;
+      initXEvent(&npEvent);
+      npEvent.type = (focused) ? 9 : 10; // ints as Qt unsets FocusIn and FocusOut
+      if (!dispatchNPEvent(npEvent))
+          LOG(Events, "PluginView::setFocus(%d): Focus event not accepted", focused);
+    }
 }
 
 void PluginView::show()
@@ -374,6 +381,17 @@ void setXKeyEventSpecificFields(XEvent* xEvent, KeyboardEvent* event)
     xEvent->xkey.time = event->timeStamp();
     xEvent->xkey.state = qKeyEvent->nativeModifiers();
     xEvent->xkey.keycode = qKeyEvent->nativeScanCode();
+
+    // We may not have a nativeScanCode() if the key event is from DRT's eventsender. In that
+    // case just populate the XEvent's keycode with the Qt platform-independent keycode. The only
+    // place this keycode will be used is in webkit_test_plugin_handle_event().
+    if (QWebPagePrivate::drtRun && !xEvent->xkey.keycode) {
+        if (!qKeyEvent->text().isEmpty())
+            xEvent->xkey.keycode = int(qKeyEvent->text().at(0).unicode() + qKeyEvent->modifiers());
+        else if (qKeyEvent->key() && (qKeyEvent->key() != Qt::Key_unknown))
+            xEvent->xkey.keycode = int(qKeyEvent->key() + qKeyEvent->modifiers());
+    }
+
     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 071df95..68abcdb 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,29 @@
+2010-08-30  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        allow ports with windowed plugins to support windowless plugin tests
+
+        https://bugs.webkit.org/show_bug.cgi?id=40730
+
+        Ports that implement plugins windowed by default need to have a way of
+        supporting plugin tests that assume the plugin is windowless. Add this
+        feature to the tests and support it in the webkit test plugin. Also
+        add mouse and keyboard event logging to the webkit-test plugin on Unix.
+
+        Unskip the following tests on Qt:
+
+        plugins/mouse-events.html
+        plugins/keyboard-events.html
+        plugins/mouse-events-fixedpos.html
+
+        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+        (pluginSetProperty):
+        * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+        (NPP_New):
+        * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
+        (webkit_test_plugin_handle_event):
+
 2010-08-30  Kevin Ollivier  <kevino at theolliviers.com>
 
         [wx] Build fix after addition of fileapi directory in WebCore.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
index 0d556b1..44fafa1 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
@@ -139,6 +139,7 @@ enum {
     ID_PROPERTY_CACHED_PRIVATE_BROWSING_ENABLED,
     ID_PROPERTY_THROW_EXCEPTION_PROPERTY,
     ID_LAST_SET_WINDOW_ARGUMENTS,
+    ID_PROPERTY_WINDOWED_PLUGIN,
     NUM_PROPERTY_IDENTIFIERS
 };
 
@@ -154,7 +155,8 @@ static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = {
     "privateBrowsingEnabled",
     "cachedPrivateBrowsingEnabled",
     "testThrowExceptionProperty",
-    "lastSetWindowArguments"
+    "lastSetWindowArguments",
+    "windowedPlugin"
 };
 
 enum {
@@ -328,6 +330,9 @@ static bool pluginSetProperty(NPObject* obj, NPIdentifier name, const NPVariant*
     } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_THROW_EXCEPTION_PROPERTY]) {
         browser->setexception(obj, "plugin object testThrowExceptionProperty SUCCESS");
         return true;
+    } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_WINDOWED_PLUGIN]) {
+        browser->setvalue(plugin->npp, NPPVpluginWindowBool, (void *)NPVARIANT_TO_BOOLEAN(*variant));
+        return true;
     }
 
     return false;
diff --git a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
index 8216f7a..8c4e98d 100644
--- a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
+++ b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
@@ -267,7 +267,33 @@ webkit_test_plugin_handle_event(NPP instance, void* event)
         return 0;
 
     XEvent* evt = static_cast<XEvent*>(event);
-    pluginLog(instance, "event %d", evt->type);
+
+    switch (evt->type) {
+        case ButtonRelease:
+            pluginLog(instance, "mouseUp at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
+            break;
+        case ButtonPress:
+            pluginLog(instance, "mouseDown at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
+            break;
+        case KeyRelease:
+            pluginLog(instance, "keyUp '%c'", evt->xkey.keycode);
+            break;
+        case KeyPress:
+            pluginLog(instance, "keyDown '%c'", evt->xkey.keycode);
+            break;
+        case MotionNotify:
+        case EnterNotify:
+        case LeaveNotify:
+            break;
+        case FocusIn:
+            pluginLog(instance, "getFocusEvent");
+            break;
+        case FocusOut:
+            pluginLog(instance, "loseFocusEvent");
+            break;
+        default:
+            pluginLog(instance, "event %d", evt->type);
+    }
 
     return 0;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list