Index: Source/platform/PlatformMouseEvent.h |
diff --git a/Source/platform/PlatformMouseEvent.h b/Source/platform/PlatformMouseEvent.h |
index 4a4b8a95ee4539a6f39e03ce151b885fb093e07c..110f2d07ade55baf6082c92d8ad4e1a213c72db1 100644 |
--- a/Source/platform/PlatformMouseEvent.h |
+++ b/Source/platform/PlatformMouseEvent.h |
@@ -37,15 +37,16 @@ enum MouseButton { NoButton = -1, LeftButton, MiddleButton, RightButton }; |
class PlatformMouseEvent : public PlatformEvent { |
public: |
enum SyntheticEventType { |
- NotFromTouch, |
- FromTouch, |
+ NotSyntheticOrIndistinguishable, // Real mouse input events or synthetic events that behave just like real events |
Rick Byers
2014/08/22 18:11:13
nit: maybe put these comments on the line above th
Rick Byers
2014/08/22 18:11:13
nit: this name is a bit of a mouthful. I like tha
Ignacio Solla
2014/08/26 13:40:53
Done.
Ignacio Solla
2014/08/26 13:40:53
I agree, it is a mouthful, I've changed it now to
|
+ FromTouch, // Mouse events derived from touch input |
+ NotFromInput, // Blink can generate fake mouse events after scrolling or re-layout, see for example EventHandler::dispatchFakeMouseMoveEventSoon |
}; |
PlatformMouseEvent() |
: PlatformEvent(PlatformEvent::MouseMoved) |
, m_button(NoButton) |
, m_clickCount(0) |
- , m_synthesized(NotFromTouch) |
+ , m_synthesized(NotSyntheticOrIndistinguishable) |
, m_modifierFlags(0) |
{ |
} |
@@ -56,7 +57,7 @@ public: |
, m_globalPosition(globalPosition) |
, m_button(button) |
, m_clickCount(clickCount) |
- , m_synthesized(NotFromTouch) |
+ , m_synthesized(NotSyntheticOrIndistinguishable) |
, m_modifierFlags(0) |
{ |
} |
@@ -72,13 +73,13 @@ public: |
{ |
} |
- PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type, int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp) |
+ PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type, int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp, SyntheticEventType synthesized = NotSyntheticOrIndistinguishable) |
Rick Byers
2014/08/22 18:11:13
I think we should try to keep the parameter order
Ignacio Solla
2014/08/26 13:40:53
Done.
Added a non-optional arg and updated all c
Rick Byers
2014/08/26 15:25:46
Thank you!
Ignacio Solla
2014/08/26 17:30:42
Acknowledged.
|
: PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp) |
, m_position(position) |
, m_globalPosition(globalPosition) |
, m_button(button) |
, m_clickCount(clickCount) |
- , m_synthesized(NotFromTouch) |
+ , m_synthesized(synthesized) |
, m_modifierFlags(0) |
{ |
} |
@@ -91,6 +92,7 @@ public: |
int clickCount() const { return m_clickCount; } |
unsigned modifierFlags() const { return m_modifierFlags; } |
bool fromTouch() const { return m_synthesized == FromTouch; } |
+ SyntheticEventType syntheticEventType() const { return m_synthesized; } |
protected: |
IntPoint m_position; |