[webkit-help] click emulation text/image different behavior
Luka Napotnik
luka.napotnik at gmail.com
Wed Dec 2 03:23:38 PST 2009
Hello.
I've created a function to emulate a click event on given X,Y
coordinates. But I'm having a problem in the function behavior.
To emulate the click I first trigger a
MousePressEvent(handleMousePressEvent() call) and then immediately a
MouseReleaseEvent(handleMouseReleaseEvent() call) trigger.
The click works but I get different return values when clicking on an
image and on a text. Both elements are binded to a JavaScript function.
But, if I click on the text, both the press and release calls return
true. Clicking on the image causes press to fail and release to succeed.
Here's my emulation code:
-------------------------------
click1 =
frame->eventHandler()->handleMousePressEvent(PlatformMouseEvent(
IntPoint(x, y), IntPoint(0,0), LeftButton, MouseEventPressed,
1,
false, false, false, false, gtk_get_current_event_time()));
click2 =
frame->eventHandler()->handleMouseReleaseEvent(PlatformMouseEvent(
IntPoint(x, y), IntPoint(0,0), LeftButton, MouseEventReleased,
1,
false, false, false, false, gtk_get_current_event_time()));
-------------------------------
Any ideas why the different behaviour? Using WebKit gtk+ port rev. ~
47800.
Greets,
Luka
More information about the webkit-help
mailing list