Reviewed by Sam.
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/mac/PlatformMouseEventMac.mm:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/win/PlatformMouseEventWin.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23996
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-07-04 Adam Roben <aroben@apple.com>
+
+ Changed PlatformMouseEvent to store the modifier flags of the event
+
+ Reviewed by Sam.
+
+ * platform/PlatformMouseEvent.h:
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/mac/PlatformMouseEventMac.mm:
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/win/PlatformMouseEventWin.cpp:
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+
2007-07-04 Adam Roben <aroben@apple.com>
Add HitTestResult::setToNonShadowAncestor
, m_altKey(false)
, m_metaKey(false)
, m_timestamp(0)
+ , m_modifierFlags(0)
{
}
, m_altKey(alt)
, m_metaKey(meta)
, m_timestamp(timestamp)
+ , m_modifierFlags(0)
{
}
bool ctrlKey() const { return m_ctrlKey; }
bool altKey() const { return m_altKey; }
bool metaKey() const { return m_metaKey; }
+ unsigned modifierFlags() const { return m_modifierFlags; }
//time in seconds
double timestamp() const { return m_timestamp; }
bool m_altKey;
bool m_metaKey;
double m_timestamp; // unit: seconds
+ unsigned m_modifierFlags;
#if PLATFORM(MAC)
int m_eventNumber;
#endif
, m_altKey([event modifierFlags] & NSAlternateKeyMask)
, m_metaKey([event modifierFlags] & NSCommandKeyMask)
, m_timestamp([event timestamp])
+ , m_modifierFlags([event modifierFlags])
, m_eventNumber([event eventNumber])
{
}
, m_metaKey(m_altKey) // FIXME: We'll have to test other browsers
, m_activatedWebView(activatedWebView)
, m_eventType(messageToEventType(message))
+ , m_modifierFlags(wParam)
{
m_timestamp = ::GetTickCount()*0.001; // GetTickCount returns milliseconds