Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Unified Diff: Source/core/events/MouseRelatedEvent.h

Issue 453493002: Improve detection of touch events when hiding media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoHideControls
Patch Set: Propagate SyntheticEventType to MouseRelatedEvent Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/events/MouseRelatedEvent.h
diff --git a/Source/core/events/MouseRelatedEvent.h b/Source/core/events/MouseRelatedEvent.h
index 21dc6a54cc78b941ae8cf5720f8c399da3a3cab4..7d3e84fd19cd79ffa7e2bd2fa949adf3c3eb420d 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 {
@@ -47,6 +48,7 @@ namespace blink {
int offsetX();
int offsetY();
bool isSimulated() const { return m_isSimulated; }
+ bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent::FromTouch; }
virtual int pageX() const OVERRIDE FINAL;
virtual int pageY() const OVERRIDE FINAL;
int x() const;
@@ -61,10 +63,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::NotFromTouch);
void initCoordinates();
void initCoordinates(const LayoutPoint& clientLocation);
@@ -85,6 +88,7 @@ namespace blink {
LayoutPoint m_absoluteLocation;
bool m_isSimulated;
bool m_hasCachedRelativePosition;
+ PlatformMouseEvent::SyntheticEventType m_syntheticEventType;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698