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

Unified Diff: Source/core/events/MouseEvent.cpp

Issue 453493002: Improve detection of touch events when hiding media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoHideControls
Patch Set: Revert Patch Set 8 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
« no previous file with comments | « Source/core/events/MouseEvent.h ('k') | Source/core/events/MouseRelatedEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/MouseEvent.cpp
diff --git a/Source/core/events/MouseEvent.cpp b/Source/core/events/MouseEvent.cpp
index 4cec501a1809ffaac2ef1fb8ea4691b3c0e36a83..a2bb5aa82b8320d9d978decb2f23108db40dddd9 100644
--- a/Source/core/events/MouseEvent.cpp
+++ b/Source/core/events/MouseEvent.cpp
@@ -62,19 +62,19 @@ PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& eventT
detail, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(),
event.movementDelta().x(), event.movementDelta().y(),
event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.button(),
- relatedTarget, nullptr, false);
+ relatedTarget, nullptr, false, event.syntheticEventType());
}
PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView> view,
int detail, int screenX, int screenY, int pageX, int pageY,
int movementX, int movementY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<DataTransfer> dataTransfer, bool isSimulated)
+ PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<DataTransfer> dataTransfer, bool isSimulated, PlatformMouseEvent::SyntheticEventType syntheticEventType)
{
return adoptRefWillBeNoop(new MouseEvent(type, canBubble, cancelable, view,
detail, screenX, screenY, pageX, pageY,
movementX, movementY,
- ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, dataTransfer, isSimulated));
+ ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, dataTransfer, isSimulated, syntheticEventType));
}
MouseEvent::MouseEvent()
@@ -89,7 +89,7 @@ MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
int movementX, int movementY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
unsigned short button, PassRefPtrWillBeRawPtr<EventTarget> relatedTarget,
- PassRefPtrWillBeRawPtr<DataTransfer> dataTransfer, bool isSimulated)
+ PassRefPtrWillBeRawPtr<DataTransfer> dataTransfer, bool isSimulated, PlatformMouseEvent::SyntheticEventType syntheticEventType)
: MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, IntPoint(screenX, screenY),
IntPoint(pageX, pageY),
IntPoint(movementX, movementY),
@@ -98,6 +98,7 @@ MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
, m_buttonDown(button != (unsigned short)-1)
, m_relatedTarget(relatedTarget)
, m_dataTransfer(dataTransfer)
+ , m_syntheticEventType(syntheticEventType)
{
ScriptWrappable::init(this);
}
@@ -207,9 +208,8 @@ SimulatedMouseEvent::~SimulatedMouseEvent()
}
SimulatedMouseEvent::SimulatedMouseEvent(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, PassRefPtrWillBeRawPtr<Event> underlyingEvent)
- : MouseEvent(eventType, true, true, view, 0, 0, 0, 0, 0,
- 0, 0,
- false, false, false, false, 0, nullptr, nullptr, true)
+ : MouseEvent(eventType, true, true, view, 0, 0, 0, 0, 0, 0, 0, false, false, false, false, 0,
+ nullptr, nullptr, true, PlatformMouseEvent::RealOrIndistinguishable)
{
if (UIEventWithKeyState* keyStateEvent = findEventWithKeyState(underlyingEvent.get())) {
m_ctrlKey = keyStateEvent->ctrlKey();
« no previous file with comments | « Source/core/events/MouseEvent.h ('k') | Source/core/events/MouseRelatedEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698