Title: [89823] trunk/Source/WebCore
Revision
89823
Author
[email protected]
Date
2011-06-27 08:37:18 -0700 (Mon, 27 Jun 2011)

Log Message

2011-06-27  Noel Gordon  <[email protected]>

        Reviewed by Adam Roben.

        Send keypress events to windowless plugins on the windows port.
        https://bugs.webkit.org/show_bug.cgi?id=63144

        No new tests.  Covered by existing windowless plugin tests plugins/mouse-events.html
        and plugins/keyboard-events.html.  Both are not yet working as desired because focus
        events are not being fowarded to windowed plugins on the win port (bug 62375).  Test
        plugin logging on the win port was added in bug 61721.  New failing expectations for
        plugins/keyboard-events.html were subsequently added in bug 33973 so there's no need
        to update test expectations in this patch.

         * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginView::handleKeyboardEvent): Add an ASSERT(m_plugin && !m_isWindowed)
        to indicate that the routine is for windowless plugins.  Remove trailing whitespace.
        Add handling for keyPress events (map to WM_CHAR).
        (WebCore::PluginView::handleMouseEvent): Add the ASSERT to indicate that the routine
        is for windowless plugins.  Add FIXME note.  Remove trailing whitespace.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (89822 => 89823)


--- trunk/Source/WebCore/ChangeLog	2011-06-27 15:33:56 UTC (rev 89822)
+++ trunk/Source/WebCore/ChangeLog	2011-06-27 15:37:18 UTC (rev 89823)
@@ -1,3 +1,24 @@
+2011-06-27  Noel Gordon  <[email protected]>
+
+        Reviewed by Adam Roben.
+
+        Send keypress events to windowless plugins on the windows port.
+        https://bugs.webkit.org/show_bug.cgi?id=63144
+
+        No new tests.  Covered by existing windowless plugin tests plugins/mouse-events.html
+        and plugins/keyboard-events.html.  Both are not yet working as desired because focus
+        events are not being fowarded to windowed plugins on the win port (bug 62375).  Test
+        plugin logging on the win port was added in bug 61721.  New failing expectations for
+        plugins/keyboard-events.html were subsequently added in bug 33973 so there's no need
+        to update test expectations in this patch.
+
+         * plugins/win/PluginViewWin.cpp:
+        (WebCore::PluginView::handleKeyboardEvent): Add an ASSERT(m_plugin && !m_isWindowed)
+        to indicate that the routine is for windowless plugins.  Remove trailing whitespace.
+        Add handling for keyPress events (map to WM_CHAR).
+        (WebCore::PluginView::handleMouseEvent): Add the ASSERT to indicate that the routine
+        is for windowless plugins.  Add FIXME note.  Remove trailing whitespace.
+
 2011-06-27  Alexander Pavlov  <[email protected]>
 
         Reviewed by Pavel Feldman.

Modified: trunk/Source/WebCore/plugins/win/PluginViewWin.cpp (89822 => 89823)


--- trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2011-06-27 15:33:56 UTC (rev 89822)
+++ trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2011-06-27 15:37:18 UTC (rev 89823)
@@ -639,17 +639,23 @@
 
 void PluginView::handleKeyboardEvent(KeyboardEvent* event)
 {
+    ASSERT(m_plugin && !m_isWindowed);
+
     NPEvent npEvent;
 
-    npEvent.wParam = event->keyCode();    
+    npEvent.wParam = event->keyCode();
 
     if (event->type() == eventNames().keydownEvent) {
         npEvent.event = WM_KEYDOWN;
         npEvent.lParam = 0;
+    } else if (event->type() == eventNames().keypressEvent) {
+        npEvent.event = WM_CHAR;
+        npEvent.lParam = 0;
     } else if (event->type() == eventNames().keyupEvent) {
         npEvent.event = WM_KEYUP;
         npEvent.lParam = 0x8000;
-    }
+    } else
+        return;
 
     JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
     if (dispatchNPEvent(npEvent))
@@ -662,6 +668,8 @@
 
 void PluginView::handleMouseEvent(MouseEvent* event)
 {
+    ASSERT(m_plugin && !m_isWindowed);
+
     NPEvent npEvent;
 
     IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(IntPoint(event->pageX(), event->pageY()));
@@ -720,6 +728,7 @@
         return;
 
     JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
+    // FIXME: Consider back porting the http://webkit.org/b/58108 fix here.
     if (dispatchNPEvent(npEvent))
         event->setDefaultHandled();
 
@@ -728,7 +737,7 @@
     // and since we don't want that we set ignoreNextSetCursor to true here to prevent that.
     ignoreNextSetCursor = true;
     if (Page* page = m_parentFrame->page())
-        page->chrome()->client()->setLastSetCursorToCurrentCursor();    
+        page->chrome()->client()->setLastSetCursorToCurrentCursor();
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to