http://bugs.webkit.org/show_bug.cgi?id=11517
REGRESSION: Flash clicks/interactivity not working properly
WebCore:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::handleMouseMoveEvent):
(WebCore::FrameMac::handleMouseReleaseEvent):
Restore parts of event dispatching that were removed when fixing
bug 7323 - just bypass those for subframes.
WebKitTools:
Teach TestNetscapePlugin to log events passed to it. To enable, set eventLoggingEnabled to true:
<embed name="plg" type="application/x-webkit-test-netscape" width=100 height=100></embed>
<script>
plg.eventLoggingEnabled = true;
// use eventSender to simulate events...
</script>
* DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
(pluginGetProperty):
(pluginSetProperty):
(pluginAllocate):
* DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
* DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
(NPP_HandleEvent):
LayoutTests:
* plugins/mouse-events-expected.txt: Added.
* plugins/mouse-events.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17611
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-11-06 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ Test for http://bugs.webkit.org/show_bug.cgi?id=11517
+ REGRESSION: Flash clicks/interactivity not working properly
+
+ * plugins/mouse-events-expected.txt: Added.
+ * plugins/mouse-events.html: Added.
+
2006-11-06 Mark Rowe <bdash@webkit.org>
Reviewed by the wonderful Mitz Pettel.
--- /dev/null
+PLUGIN: getFocusEvent
+PLUGIN: mouseDown at (12, 12)
+PLUGIN: mouseUp at (12, 12)
+PLUGIN: mouseDown at (22, 22)
+PLUGIN: mouseUp at (32, 22)
+
+Test for bug 11517: Flash clicks/interactivity not working properly.
+
+
--- /dev/null
+<html>
+<body>
+<embed name="plg" type="application/x-webkit-test-netscape" width=100 height=100></embed>
+<p>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=11517">bug 11517</a>:
+Flash clicks/interactivity not working properly.</p>
+<script>
+
+ plg.eventLoggingEnabled = true;
+
+ if (!window.layoutTestController) {
+ document.write("This test does not work in manual mode.");
+ return;
+ }
+
+ layoutTestController.dumpAsText();
+
+ eventSender.mouseMoveTo(0,0);
+ eventSender.mouseMoveTo(20,20);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ eventSender.mouseMoveTo(30,30);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(40,30);
+ eventSender.mouseUp();
+ eventSender.mouseMoveTo(0,0);
+
+</script>
+</body>
+</html>
+2006-11-06 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11517
+ REGRESSION: Flash clicks/interactivity not working properly
+
+ * bridge/mac/FrameMac.mm:
+ (WebCore::FrameMac::handleMouseMoveEvent):
+ (WebCore::FrameMac::handleMouseReleaseEvent):
+ Restore parts of event dispatching that were removed when fixing
+ bug 7323 - just bypass those for subframes.
+
2006-11-05 Darin Adler <darin@apple.com>
- quick attempt to fix the no-SVG build
BEGIN_BLOCK_OBJC_EXCEPTIONS;
if ([_currentEvent type] == NSLeftMouseDragged) {
- if (mouseDownViewIfStillGood())
- return; // The event has been already dispatched to a subframe
+ NSView *view = mouseDownViewIfStillGood();
+
+ if (view) {
+ if (!_mouseDownWasInSubframe) {
+ _sendingEventToSubview = true;
+ [view mouseDragged:_currentEvent];
+ _sendingEventToSubview = false;
+ }
+ return;
+ }
// Careful that the drag starting logic stays in sync with eventMayStartDrag()
return;
}
stopAutoscrollTimer();
+
+ if (!_mouseDownWasInSubframe) {
+ _sendingEventToSubview = true;
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ [view mouseUp:_currentEvent];
+ END_BLOCK_OBJC_EXCEPTIONS;
+ _sendingEventToSubview = false;
+ }
}
bool FrameMac::passSubframeEventToSubframe(MouseEventWithHitTestResults& event, Frame* subframe)
+2006-11-06 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ Test for http://bugs.webkit.org/show_bug.cgi?id=11517
+ REGRESSION: Flash clicks/interactivity not working properly
+
+ Teach TestNetscapePlugin to log events passed to it. To enable, set eventLoggingEnabled to true:
+
+ <embed name="plg" type="application/x-webkit-test-netscape" width=100 height=100></embed>
+ <script>
+ plg.eventLoggingEnabled = true;
+ // use eventSender to simulate events...
+ </script>
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginGetProperty):
+ (pluginSetProperty):
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_HandleEvent):
+
2006-11-04 David Smith <catfish.man@gmail.com>
Reviewed by Tim H.
static bool identifiersInitialized = false;
#define ID_PROPERTY_PROPERTY 0
-#define NUM_PROPERTY_IDENTIFIERS 1
+#define ID_PROPERTY_EVENT_LOGGING 1
+#define NUM_PROPERTY_IDENTIFIERS 2
static NPIdentifier pluginPropertyIdentifiers[NUM_PROPERTY_IDENTIFIERS];
static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = {
- "property"
+ "property",
+ "eventLoggingEnabled"
};
#define ID_TEST_CALLBACK_METHOD 0
if (name == pluginPropertyIdentifiers[ID_PROPERTY_PROPERTY]) {
STRINGZ_TO_NPVARIANT("property", *variant);
return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_EVENT_LOGGING]) {
+ BOOLEAN_TO_NPVARIANT(((PluginObject *)obj)->eventLogging, *variant);
+ return true;
}
return false;
}
static bool pluginSetProperty(NPObject *obj, NPIdentifier name, const NPVariant *variant)
{
+ if (name == pluginPropertyIdentifiers[ID_PROPERTY_EVENT_LOGGING]) {
+ ((PluginObject *)obj)->eventLogging = NPVARIANT_TO_BOOLEAN(*variant);
+ return true;
+ }
return false;
}
newInstance->npp = npp;
+ newInstance->eventLogging = FALSE;
+
return (NPObject *)newInstance;
}
typedef struct {
NPObject header;
NPP npp;
+ Boolean eventLogging;
} PluginObject;
extern NPClass *getPluginClass(void);
int16 NPP_HandleEvent(NPP instance, void *event)
{
+ PluginObject *obj = instance->pdata;
+ if (!obj->eventLogging)
+ return 0;
+
+ EventRecord *evt = event;
+ Point pt = { evt->where.v, evt->where.h };
+ switch (evt->what) {
+ case nullEvent:
+ // these are delivered non-deterministically, don't log.
+ break;
+ case mouseDown:
+ GlobalToLocal(&pt);
+ printf("PLUGIN: mouseDown at (%d, %d)\n", pt.h, pt.v);
+ break;
+ case mouseUp:
+ GlobalToLocal(&pt);
+ printf("PLUGIN: mouseUp at (%d, %d)\n", pt.h, pt.v);
+ break;
+ case keyDown:
+ printf("PLUGIN: keyDown '%c'\n", (char)(evt->message & 0xFF));
+ break;
+ case keyUp:
+ printf("PLUGIN: keyUp '%c'\n", (char)(evt->message & 0xFF));
+ break;
+ case autoKey:
+ printf("PLUGIN: autoKey '%c'\n", (char)(evt->message & 0xFF));
+ break;
+ case updateEvt:
+ printf("PLUGIN: updateEvt\n");
+ break;
+ case diskEvt:
+ printf("PLUGIN: diskEvt\n");
+ break;
+ case activateEvt:
+ printf("PLUGIN: activateEvt\n");
+ break;
+ case osEvt:
+ printf("PLUGIN: osEvt - ");
+ switch ((evt->message & 0xFF000000) >> 24) {
+ case suspendResumeMessage:
+ printf("%s\n", (evt->message & 0x1) ? "resume" : "suspend");
+ break;
+ case mouseMovedMessage:
+ printf("mouseMoved\n");
+ break;
+ default:
+ printf("%08lX\n", evt->message);
+ }
+ break;
+ case kHighLevelEvent:
+ printf("PLUGIN: kHighLevelEvent\n");
+ break;
+ // NPAPI events
+ case getFocusEvent:
+ printf("PLUGIN: getFocusEvent\n");
+ break;
+ case loseFocusEvent:
+ printf("PLUGIN: loseFocusEvent\n");
+ break;
+ case adjustCursorEvent:
+ printf("PLUGIN: adjustCursorEvent\n");
+ break;
+ default:
+ printf("PLUGIN: event %d\n", evt->what);
+ }
+
return 0;
}