WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Take into account the timeOffset when synthesizing events in the DRT
0001-GTK-Double-clicks-cause-three-button-press-events.patch (text/plain), 3.90 KB, created by
Martin Robinson
on 2010-05-12 18:07:31 PDT
(
hide
)
Description:
Take into account the timeOffset when synthesizing events in the DRT
Filename:
MIME Type:
Creator:
Martin Robinson
Created:
2010-05-12 18:07:31 PDT
Size:
3.90 KB
patch
obsolete
>From dcd66aaa5546df12ba69659fa7c8d3637c0d5526 Mon Sep 17 00:00:00 2001 >From: Martin Robinson <mrobinson@igalia.com> >Date: Wed, 12 May 2010 15:57:22 -0700 >Subject: [PATCH] [GTK] Double clicks cause three button press events > https://bugs.webkit.org/show_bug.cgi?id=38853 > >Reviewed by NOBODY (OOPS!). > >Take into account the relative timeOffset from leapFoward in the GTK+ EventSender. > >* DumpRenderTree/gtk/EventSender.cpp: >(prepareMouseButtonEvent): Add timeOffset to the base time. >(mouseMoveToCallback): Ditto. >(mouseWheelToCallback): Ditto. >(makeEventSender): Ditto. >--- > WebKitTools/ChangeLog | 15 +++++++++++++++ > WebKitTools/DumpRenderTree/gtk/EventSender.cpp | 15 ++++++++++----- > 2 files changed, 25 insertions(+), 5 deletions(-) > >diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog >index 225c0ff..39530e2 100644 >--- a/WebKitTools/ChangeLog >+++ b/WebKitTools/ChangeLog >@@ -1,3 +1,18 @@ >+2010-05-12 Martin Robinson <mrobinson@igalia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ [GTK] Double clicks cause three button press events >+ https://bugs.webkit.org/show_bug.cgi?id=38853 >+ >+ Take into account the relative timeOffset from leapFoward in the GTK+ EventSender. >+ >+ * DumpRenderTree/gtk/EventSender.cpp: >+ (prepareMouseButtonEvent): Add timeOffset to the base time. >+ (mouseMoveToCallback): Ditto. >+ (mouseWheelToCallback): Ditto. >+ (makeEventSender): Ditto. >+ > 2010-05-10 Martin Robinson <mrobinson@webkit.org> > > Reviewed by NOBODY (OOPS!). >diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp >index c13fcf0..7f8b255 100644 >--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp >+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp >@@ -54,7 +54,7 @@ extern "C" { > static bool dragMode; > static bool replayingSavedEvents; > static bool doneLeapingForward; >-static int timeOffset; >+static guint32 timeOffset = 0; > > static int lastMousePositionX; > static int lastMousePositionY; >@@ -122,7 +122,7 @@ bool prepareMouseButtonEvent(GdkEvent* event, int button) > event->button.x = lastMousePositionX; > event->button.y = lastMousePositionY; > event->button.window = GTK_WIDGET(view)->window; >- event->button.time = GDK_CURRENT_TIME; >+ event->button.time = GDK_CURRENT_TIME + timeOffset; > event->button.device = gdk_device_get_core_pointer(); > event->button.state = getStateFlags(); > >@@ -257,7 +257,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function > event.type = GDK_MOTION_NOTIFY; > event.motion.x = lastMousePositionX; > event.motion.y = lastMousePositionY; >- event.motion.time = GDK_CURRENT_TIME; >+ event.motion.time = GDK_CURRENT_TIME + timeOffset; > event.motion.window = GTK_WIDGET(view)->window; > event.motion.device = gdk_device_get_core_pointer(); > event.motion.state = getStateFlags(); >@@ -296,7 +296,7 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio > event.type = GDK_SCROLL; > event.scroll.x = lastMousePositionX; > event.scroll.y = lastMousePositionY; >- event.scroll.time = GDK_CURRENT_TIME; >+ event.scroll.time = GDK_CURRENT_TIME + timeOffset; > event.scroll.window = GTK_WIDGET(view)->window; > > if (horizontal < 0) >@@ -624,7 +624,12 @@ JSObjectRef makeEventSender(JSContextRef context, bool isTopFrame) > dragMode = true; > replayingSavedEvents = false; > doneLeapingForward = false; >- timeOffset = 0; >+ >+ // Fly forward in time one second when the main frame loads. This will >+ // ensure that when a test begin clicking in the same location as >+ // a previous test, those clicks won't be interpreted as continuations >+ // of the previous test's click sequences. >+ timeOffset += 1000; > > lastMousePositionX = lastMousePositionY = 0; > lastClickPositionX = lastClickPositionY = 0; >-- >1.6.3.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mrobinson
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 38853
:
55577
|
55579
|
55607
|
55642
|
55648
|
55653
|
55917
|
55918
|
55919
|
55922
|
55933
|
56076
|
56092
|
57235
|
57317