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

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

Issue 1184693003: Revert 196987 "Don't invoke default actions for MouseEvents gene..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 5 years, 6 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 | « trunk/Source/core/events/MouseEvent.h ('k') | trunk/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/events/MouseEvent.cpp
===================================================================
--- trunk/Source/core/events/MouseEvent.cpp (revision 197019)
+++ trunk/Source/core/events/MouseEvent.cpp (working copy)
@@ -108,7 +108,7 @@
, m_buttons(initializer.buttons())
, m_relatedTarget(initializer.relatedTarget())
, m_dataTransfer(nullptr)
- , m_syntheticEventType(PlatformMouseEvent::FromScript)
+ , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable)
{
initCoordinates(IntPoint(initializer.clientX(), initializer.clientY()));
}
@@ -152,7 +152,6 @@
m_button = button;
m_buttons = buttons;
m_relatedTarget = relatedTarget;
- m_syntheticEventType = PlatformMouseEvent::FromScript;
initCoordinates(IntPoint(clientX, clientY));
@@ -243,13 +242,13 @@
MouseEvent::trace(visitor);
}
-PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> MouseEventDispatchMediator::create(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent)
+PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> MouseEventDispatchMediator::create(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent, MouseEventType mouseEventType)
{
- return adoptRefWillBeNoop(new MouseEventDispatchMediator(mouseEvent));
+ return adoptRefWillBeNoop(new MouseEventDispatchMediator(mouseEvent, mouseEventType));
}
-MouseEventDispatchMediator::MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent)
- : EventDispatchMediator(mouseEvent)
+MouseEventDispatchMediator::MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent, MouseEventType mouseEventType)
+ : EventDispatchMediator(mouseEvent), m_mouseEventType(mouseEventType)
{
}
@@ -260,7 +259,7 @@
bool MouseEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) const
{
- if (event().fromScript()) {
+ if (isSyntheticMouseEvent()) {
event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relatedTarget());
return dispatcher.dispatch();
}
« no previous file with comments | « trunk/Source/core/events/MouseEvent.h ('k') | trunk/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698