Chromium Code Reviews| Index: Source/platform/PlatformMouseEvent.h |
| diff --git a/Source/platform/PlatformMouseEvent.h b/Source/platform/PlatformMouseEvent.h |
| index 488bd0c211c910e5137fe452603608f3484de634..bf95e7c5d5e59796fd939322b1f94aa901bb8e6f 100644 |
| --- a/Source/platform/PlatformMouseEvent.h |
| +++ b/Source/platform/PlatformMouseEvent.h |
| @@ -95,6 +95,23 @@ public: |
| bool fromTouch() const { return m_synthesized == FromTouch; } |
| SyntheticEventType syntheticEventType() const { return m_synthesized; } |
| + unsigned short buttons() const |
|
Rick Byers
2014/11/18 20:29:19
And actually, it doesn't really make sense for Pla
zino
2014/11/24 13:07:08
Done.
|
| + { |
| + if (fromTouch()) |
| + return 1; |
|
Rick Byers
2014/11/18 20:29:19
This logic doesn't belong here, the caller should
zino
2014/11/24 13:07:08
Done.
Rick Byers
2014/11/25 17:44:27
I still don't see why we should change the Platfor
zino
2014/11/28 02:37:07
Here
zino
2014/11/28 12:29:28
Done
|
| + |
| + unsigned short value = 0; |
| + |
| + if (m_modifiers & LeftButtonDown) |
| + value |= 1; |
| + if (m_modifiers & RightButtonDown) |
| + value |= 2; |
| + if (m_modifiers & MiddleButtonDown) |
| + value |= 4; |
| + |
| + return value; |
| + } |
| + |
| protected: |
| IntPoint m_position; |
| IntPoint m_globalPosition; |