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

Unified Diff: trunk/Source/core/dom/Node.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/dom/Node.h ('k') | trunk/Source/core/events/EventDispatcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/dom/Node.cpp
===================================================================
--- trunk/Source/core/dom/Node.cpp (revision 197019)
+++ trunk/Source/core/dom/Node.cpp (working copy)
@@ -2066,10 +2066,8 @@
bool Node::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event)
{
- if (event->isMouseEvent()) {
- toMouseEvent(*event).setFromScript();
- return dispatchMouseEvent(static_pointer_cast<MouseEvent>(event));
- }
+ if (event->isMouseEvent())
+ return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator::create(static_pointer_cast<MouseEvent>(event), MouseEventDispatchMediator::SyntheticMouseEvent));
if (event->isTouchEvent())
return dispatchTouchEvent(static_pointer_cast<TouchEvent>(event));
return EventDispatcher::dispatchEvent(*this, EventDispatchMediator::create(event));
@@ -2108,11 +2106,6 @@
return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator::create(MouseEvent::create(eventType, document().domWindow(), event, detail, relatedTarget)));
}
-bool Node::dispatchMouseEvent(PassRefPtrWillBeRawPtr<MouseEvent> event)
-{
- return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator::create(event));
-}
-
bool Node::dispatchGestureEvent(const PlatformGestureEvent& event)
{
RefPtrWillBeRawPtr<GestureEvent> gestureEvent = GestureEvent::create(document().domWindow(), event);
« no previous file with comments | « trunk/Source/core/dom/Node.h ('k') | trunk/Source/core/events/EventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698