Changeset 88471 in webkit
- Timestamp:
- Jun 9, 2011 12:30:55 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r88468 r88471 1 2011-06-09 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Andreas Kling. 4 5 [GTK] [Qt] Eliminate duplicate TestNetscapePlugin implementation 6 https://bugs.webkit.org/show_bug.cgi?id=62385 7 8 Remove a cr-linux expectation that no longer differs from the default 9 expectation. 10 11 * platform/chromium-linux/plugins/mouse-events-expected.txt: Removed. 12 1 13 2011-06-02 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/Tools/ChangeLog
r88465 r88471 1 2011-06-09 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Andreas Kling. 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 (keyEventToChar): Added this helper which converts a X11 keycode into a char. 14 (handleEventX11): Use the handler to properly convert the keycode. Do not print 15 adjustCursorEvent output. The tests currently do not trigger this for Cocoa and thus 16 it should not be in the results. 17 (NPP_GetValue): Properly handle NPPVpluginNeedsXEmbed. 18 * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro: Update source list. 19 * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp: Removed. 20 * GNUmakefile.am: Update source list. 21 1 22 2011-06-09 Noel Gordon <noel.gordon@gmail.com> 2 23 -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
r88465 r88471 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 … … 623 625 624 626 #ifdef XP_UNIX 627 628 static char keyEventToChar(XKeyEvent* event) 629 { 630 char c = ' '; 631 XLookupString(event, &c, sizeof(c), 0, 0); 632 return c; 633 } 634 625 635 static int16_t handleEventX11(NPP instance, PluginObject* obj, XEvent* event) 626 636 { 627 XButtonPressedEvent* buttonPressEvent = reinterpret_cast<XButtonPressedEvent*>(event);628 XButtonReleasedEvent* buttonReleaseEvent = reinterpret_cast<XButtonReleasedEvent*>(event);629 637 switch (event->type) { 630 638 case ButtonPress: 631 639 if (obj->eventLogging) 632 pluginLog(instance, "mouseDown at (%d, %d)", buttonPressEvent->x, buttonPressEvent->y);640 pluginLog(instance, "mouseDown at (%d, %d)", event->xbutton.x, event->xbutton.y); 633 641 if (obj->evaluateScriptOnMouseDownOrKeyDown && obj->mouseDownForEvaluateScript) 634 642 executeScript(obj, obj->evaluateScriptOnMouseDownOrKeyDown); … … 636 644 case ButtonRelease: 637 645 if (obj->eventLogging) 638 pluginLog(instance, "mouseUp at (%d, %d)", buttonReleaseEvent->x, buttonReleaseEvent->y);646 pluginLog(instance, "mouseUp at (%d, %d)", event->xbutton.x, event->xbutton.y); 639 647 break; 640 648 case KeyPress: 641 649 // FIXME: extract key code 642 650 if (obj->eventLogging) 643 pluginLog(instance, " NOTIMPLEMENTED: keyDown '%c'", ' ');651 pluginLog(instance, "keyDown '%c'", keyEventToChar(&event->xkey)); 644 652 if (obj->evaluateScriptOnMouseDownOrKeyDown && !obj->mouseDownForEvaluateScript) 645 653 executeScript(obj, obj->evaluateScriptOnMouseDownOrKeyDown); … … 648 656 // FIXME: extract key code 649 657 if (obj->eventLogging) 650 pluginLog(instance, " NOTIMPLEMENTED: keyUp '%c'", ' ');658 pluginLog(instance, "keyUp '%c'", keyEventToChar(&event->xkey)); 651 659 break; 652 660 case GraphicsExpose: … … 668 676 case LeaveNotify: 669 677 case MotionNotify: 670 if (obj->eventLogging)671 pluginLog(instance, "adjustCursorEvent");672 678 break; 673 679 default: … … 781 787 return NPERR_NO_ERROR; 782 788 } 789 if (variable == NPPVpluginNeedsXEmbed) { 790 *((NPBool *)value) = TRUE; 791 return NPERR_NO_ERROR; 792 } 783 793 #endif 784 794 -
trunk/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
r86487 r88471 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 -
trunk/Tools/GNUmakefile.am
r88185 r88471 217 217 Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h \ 218 218 Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h \ 219 Tools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp \220 219 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp \ 221 220 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \ … … 236 235 Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h \ 237 236 Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp \ 238 Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h 237 Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h \ 238 Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp 239 239 240 240 TestNetscapePlugin_libtestnetscapeplugin_la_LDFLAGS = \
Note: See TracChangeset
for help on using the changeset viewer.