Changeset 32798 in webkit


Ignore:
Timestamp:
May 1, 2008 10:16:42 PM (16 years ago)
Author:
kevino@webkit.org
Message:

Reviewed by Eric Seidel.

Make sure we properly set the button for all mouse events, not just mouse down, set the click count to 0 for non-click events, and finally set the timestamp.

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

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r32795 r32798  
     12008-05-01  Kevin Ollivier  <kevino@theolliviers.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Make sure we properly set the button for all mouse events,
     6        not just mouse down, set the click count to 0
     7        for non-click events, and finally set the timestamp.
     8       
     9        https://bugs.webkit.org/show_bug.cgi?id=18464
     10
     11        * platform/wx/MouseEventWx.cpp:
     12        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
     13
    1142008-05-01  Sam Weinig  <sam@webkit.org>
    215
  • trunk/WebCore/platform/wx/MouseEventWx.cpp

    r29663 r32798  
    2525
    2626#include "config.h"
     27#include "Assertions.h"
    2728#include "PlatformMouseEvent.h"
     29#include "SystemTime.h"
    2830
    2931#include <wx/defs.h>
     
    3537    : m_position(event.GetPosition())
    3638    , m_globalPosition(globalPoint)
    37     , m_clickCount(event.ButtonDClick() ? 2 : 1)
    3839    , m_shiftKey(event.ShiftDown())
    3940    , m_ctrlKey(event.CmdDown())
     
    5455        m_eventType = MouseEventMoved;
    5556
    56     if (event.LeftIsDown())
     57    if (event.Button(wxMOUSE_BTN_LEFT))
    5758        m_button = LeftButton;
    58     else if (event.RightIsDown())
     59    else if (event.Button(wxMOUSE_BTN_RIGHT))
    5960        m_button = RightButton;
    60     else if (event.MiddleIsDown())
     61    else if (event.Button(wxMOUSE_BTN_MIDDLE))
    6162        m_button = MiddleButton;
     63    else if (!m_eventType == MouseEventMoved)
     64        ASSERT_NOT_REACHED();
     65
     66
     67    if (m_eventType == MouseEventMoved)
     68        m_clickCount = 0;
     69    else
     70        m_clickCount = event.ButtonDClick() ? 2 : 1;
     71
     72    m_timestamp = WebCore::currentTime();
    6273}
    6374
Note: See TracChangeset for help on using the changeset viewer.