Index: Source/core/events/MouseRelatedEvent.h |
diff --git a/Source/core/events/MouseRelatedEvent.h b/Source/core/events/MouseRelatedEvent.h |
index 21dc6a54cc78b941ae8cf5720f8c399da3a3cab4..3c2080e239b1c04769c4e610d80be0e62d4e829e 100644 |
--- a/Source/core/events/MouseRelatedEvent.h |
+++ b/Source/core/events/MouseRelatedEvent.h |
@@ -25,6 +25,7 @@ |
#define MouseRelatedEvent_h |
#include "core/events/UIEventWithKeyState.h" |
+#include "platform/PlatformMouseEvent.h" |
#include "platform/geometry/LayoutPoint.h" |
namespace blink { |
@@ -46,7 +47,12 @@ namespace blink { |
virtual int layerY() OVERRIDE FINAL; |
int offsetX(); |
int offsetY(); |
+ // FIXME: rename isSimulated to fromKeyboard() and replace m_isSimulated with a new value |
+ // in PlatformMouseEvent::SyntheticEventType. isSimulated() is only true for synthetic |
+ // mouse events that derive from keyboard input, which do not have a position. |
bool isSimulated() const { return m_isSimulated; } |
+ bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent::FromTouch; } |
+ bool notFromInput() const { return m_syntheticEventType == PlatformMouseEvent::NotFromInput; } |
virtual int pageX() const OVERRIDE FINAL; |
virtual int pageY() const OVERRIDE FINAL; |
int x() const; |
@@ -61,10 +67,11 @@ namespace blink { |
protected: |
MouseRelatedEvent(); |
- MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, |
- int detail, const IntPoint& screenLocation, const IntPoint& windowLocation, |
- const IntPoint& movementDelta, |
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated = false); |
+ MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, |
+ PassRefPtrWillBeRawPtr<AbstractView>, int detail, const IntPoint& screenLocation, |
+ const IntPoint& windowLocation, const IntPoint& movementDelta, bool ctrlKey, bool altKey, |
+ bool shiftKey, bool metaKey, bool isSimulated = false, |
+ PlatformMouseEvent::SyntheticEventType = PlatformMouseEvent::NotSyntheticOrIndistinguishable); |
void initCoordinates(); |
void initCoordinates(const LayoutPoint& clientLocation); |
@@ -85,6 +92,7 @@ namespace blink { |
LayoutPoint m_absoluteLocation; |
bool m_isSimulated; |
bool m_hasCachedRelativePosition; |
+ PlatformMouseEvent::SyntheticEventType m_syntheticEventType; |
Rick Byers
2014/08/22 18:11:13
Adding this to MouseRelatedEvent doesn't really ma
Ignacio Solla
2014/08/26 13:40:53
Done.
|
}; |
} // namespace blink |