Changeset 88712 in webkit
- Timestamp:
- Jun 13, 2011 3:25:34 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r88709 r88712 1 2011-06-13 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Eric Seidel. 4 5 [GTK] [Qt] Eliminate duplicate TestNetscapePlugin implementation 6 https://bugs.webkit.org/show_bug.cgi?id=62385 7 8 Remove adjustCursorEvent from platform-specific test expectation for Chromium Linux, 9 since the TestPlugin no longer prints this event. 10 11 * platform/chromium-linux/plugins/mouse-events-expected.txt: Remove adjustCursorEvent output. 12 1 13 2011-06-13 Nate Chapin <japhet@chromium.org> 2 14 -
trunk/LayoutTests/platform/chromium-linux/plugins/mouse-events-expected.txt
r88513 r88712 1 CONSOLE MESSAGE: line 17: PLUGIN: adjustCursorEvent2 CONSOLE MESSAGE: line 17: PLUGIN: adjustCursorEvent3 1 CONSOLE MESSAGE: line 18: PLUGIN: getFocusEvent 4 2 CONSOLE MESSAGE: line 18: PLUGIN: mouseDown at (12, 12) 5 3 CONSOLE MESSAGE: line 19: PLUGIN: mouseUp at (12, 12) 6 CONSOLE MESSAGE: line 20: PLUGIN: adjustCursorEvent7 4 CONSOLE MESSAGE: line 21: PLUGIN: mouseDown at (22, 22) 8 CONSOLE MESSAGE: line 23: PLUGIN: adjustCursorEvent9 5 CONSOLE MESSAGE: line 23: PLUGIN: mouseUp at (32, 22) 10 CONSOLE MESSAGE: line 24: PLUGIN: adjustCursorEvent11 6 12 7 Test for bug 11517: Flash clicks/interactivity not working properly. -
trunk/Tools/ChangeLog
r88680 r88712 1 2011-06-13 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Eric Seidel. 4 5 [GTK] [Qt] Eliminate duplicate TestNetscapePlugin implementation 6 https://bugs.webkit.org/show_bug.cgi?id=62385 7 8 Remove duplicate TestNetscapePlugIn implementation. Having two copies 9 of this code makes keeping it in sync much more difficult. The files are 10 almost identical and this change ports the X11 changes to main.cpp. 11 12 * DumpRenderTree/TestNetscapePlugIn/main.cpp: 13 (NPP_New): Do not set the plugin as windowless always. Doing this breaks 14 some results on Qt and this seems to be unnecessary for the moment. 15 (keyEventToChar): Added this helper which converts a X11 keycode into a char. 16 (handleEventX11): Use the handler to properly convert the keycode. Do not print 17 adjustCursorEvent output. The tests currently do not trigger this for Cocoa and thus 18 it should not be in the results. 19 (NPP_GetValue): Properly handle NPPVpluginNeedsXEmbed and make it clearer why the 20 XP_UNIX block is first by guarding against using a null instance. 21 * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro: Update source list add 22 the XP_UNIX define for Linux. 23 * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp: Removed. 24 * GNUmakefile.am: Update source list. 25 1 26 2011-06-13 Sheriff Bot <webkit.review.bot@gmail.com> 2 27 -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
r88513 r88712 28 28 #include "PluginTest.h" 29 29 #include <cstdlib> 30 #include <cstring> 30 31 #include <string> 31 32 32 33 #ifdef XP_UNIX 33 34 #include <X11/Xlib.h> 35 #include <X11/Xutil.h> 34 36 #endif 35 37 … … 286 288 } 287 289 288 #ifdef XP_UNIX289 // On Unix, plugins only get events if they are windowless.290 browser->setvalue(instance, NPPVpluginWindowBool, 0);291 #endif292 293 290 if (onNewScript) 294 291 executeScript(obj, onNewScript); … … 623 620 624 621 #ifdef XP_UNIX 622 623 static char keyEventToChar(XKeyEvent* event) 624 { 625 char c = ' '; 626 XLookupString(event, &c, sizeof(c), 0, 0); 627 return c; 628 } 629 625 630 static int16_t handleEventX11(NPP instance, PluginObject* obj, XEvent* event) 626 631 { 627 XButtonPressedEvent* buttonPressEvent = reinterpret_cast<XButtonPressedEvent*>(event);628 XButtonReleasedEvent* buttonReleaseEvent = reinterpret_cast<XButtonReleasedEvent*>(event);629 632 switch (event->type) { 630 633 case ButtonPress: 631 634 if (obj->eventLogging) 632 pluginLog(instance, "mouseDown at (%d, %d)", buttonPressEvent->x, buttonPressEvent->y);635 pluginLog(instance, "mouseDown at (%d, %d)", event->xbutton.x, event->xbutton.y); 633 636 if (obj->evaluateScriptOnMouseDownOrKeyDown && obj->mouseDownForEvaluateScript) 634 637 executeScript(obj, obj->evaluateScriptOnMouseDownOrKeyDown); … … 636 639 case ButtonRelease: 637 640 if (obj->eventLogging) 638 pluginLog(instance, "mouseUp at (%d, %d)", buttonReleaseEvent->x, buttonReleaseEvent->y);641 pluginLog(instance, "mouseUp at (%d, %d)", event->xbutton.x, event->xbutton.y); 639 642 break; 640 643 case KeyPress: 641 644 // FIXME: extract key code 642 645 if (obj->eventLogging) 643 pluginLog(instance, " NOTIMPLEMENTED: keyDown '%c'", ' ');646 pluginLog(instance, "keyDown '%c'", keyEventToChar(&event->xkey)); 644 647 if (obj->evaluateScriptOnMouseDownOrKeyDown && !obj->mouseDownForEvaluateScript) 645 648 executeScript(obj, obj->evaluateScriptOnMouseDownOrKeyDown); … … 648 651 // FIXME: extract key code 649 652 if (obj->eventLogging) 650 pluginLog(instance, " NOTIMPLEMENTED: keyUp '%c'", ' ');653 pluginLog(instance, "keyUp '%c'", keyEventToChar(&event->xkey)); 651 654 break; 652 655 case GraphicsExpose: … … 668 671 case LeaveNotify: 669 672 case MotionNotify: 670 if (obj->eventLogging)671 pluginLog(instance, "adjustCursorEvent");672 673 break; 673 674 default: … … 781 782 return NPERR_NO_ERROR; 782 783 } 783 #endif 784 784 if (variable == NPPVpluginNeedsXEmbed) { 785 *((NPBool *)value) = TRUE; 786 return NPERR_NO_ERROR; 787 } 788 #endif 789 790 if (!instance) 791 return NPERR_GENERIC_ERROR; 785 792 PluginObject* obj = static_cast<PluginObject*>(instance->pdata); 786 793 -
trunk/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
r88513 r88712 29 29 PluginTest.cpp \ 30 30 TestObject.cpp \ 31 main.cpp \ 31 32 Tests/DocumentOpenInDestroyStream.cpp \ 32 33 Tests/EvaluateJSAfterRemovingPluginElement.cpp \ … … 44 45 45 46 mac { 46 SOURCES += ../../TestNetscapePlugIn/main.cpp47 47 OBJECTIVE_SOURCES += PluginObjectMac.mm 48 48 LIBS += -framework Carbon -framework Cocoa -framework QuartzCore 49 } else {50 SOURCES += ../../unix/TestNetscapePlugin/TestNetscapePlugin.cpp51 49 } 52 50 … … 55 53 !win32:!embedded:!mac:!symbian { 56 54 LIBS += -lX11 55 DEFINES += XP_UNIX 57 56 } -
trunk/Tools/GNUmakefile.am
r88631 r88712 267 267 Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h \ 268 268 Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h \ 269 Tools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp \270 269 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp \ 271 270 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \ … … 286 285 Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h \ 287 286 Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp \ 288 Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h 287 Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h \ 288 Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp 289 289 290 290 TestNetscapePlugin_libtestnetscapeplugin_la_LDFLAGS = \
Note: See TracChangeset
for help on using the changeset viewer.