[Webkit-unassigned] [Bug 30271] [QT] DRT doesn't support double click simulation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 10 04:59:50 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=30271


Kenneth Rohde Christiansen <kenneth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41105|review?                     |review-
               Flag|                            |




--- Comment #14 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2009-11-10 04:59:50 PDT ---
(From update of attachment 41105)
> Index: WebKitTools/ChangeLog
> ===================================================================
> --- WebKitTools/ChangeLog	(revision 49502)
> +++ WebKitTools/ChangeLog	(working copy)
> @@ -1,3 +1,20 @@
> +2009-10-13  Charles Wei  <charles.wei at torchmobile.com.cn>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [QT] Double Click Simulation support for DRT

Could be more descriptive

> Index: WebKitTools/DumpRenderTree/qt/jsobjects.cpp
> ===================================================================
> --- WebKitTools/DumpRenderTree/qt/jsobjects.cpp	(revision 49496)
> +++ WebKitTools/DumpRenderTree/qt/jsobjects.cpp	(working copy)
> @@ -373,6 +373,14 @@ EventSender::EventSender(QWebPage *paren
>      : QObject(parent)
>  {
>      m_page = parent;
> +    m_timeStarted = false;

m_timerIsRunning? I agree with Eric, it is very hard understanding what this is
used for

> +
> +    if (!m_timeStarted || m_lastButton != mouseButton || m_mouseTime.elapsed() > QApplication::doubleClickInterval()) {
> +        m_mouseTime.restart();

Is this a timestamp? then call it so.

>  void EventSender::leapForward(int ms)
>  {
> -    m_timeLeap += ms;
> +    usleep(ms * 1000);
>      qDebug() << "EventSender::leapForward" << ms;
>  }

Maybe instead of using usleep (which will make our tests run slower) just
modify the timestamps of the mouse events?

like (m_mouseTime.elapsed() + m_leapTime) > QApplication::doubleClickInterval()

Also I guess reset() should reset the m_leapTime?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list