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

Unified Diff: trunk/Source/core/events/EventDispatcher.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.cpp ('k') | trunk/Source/core/events/MouseEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/events/EventDispatcher.cpp
===================================================================
--- trunk/Source/core/events/EventDispatcher.cpp (revision 197019)
+++ trunk/Source/core/events/EventDispatcher.cpp (working copy)
@@ -206,13 +206,7 @@
// Call default event handlers. While the DOM does have a concept of preventing
// default handling, the detail of which handlers are called is an internal
// implementation detail and not part of the DOM.
-
- // The DOM Events spec says that events dispatched by JS (other than "click")
- // should not have their default handlers invoked. (issue #423975)
- // To begin with, only apply to mouse events.
- bool isScriptedMouseEventOtherThanClick = m_event->isMouseEvent() && toMouseEvent(*m_event).fromScript() && toMouseEvent(*m_event).type() != EventTypeNames::click;
-
- if (!m_event->defaultPrevented() && !m_event->defaultHandled() && !isScriptedMouseEventOtherThanClick) {
+ if (!m_event->defaultPrevented() && !m_event->defaultHandled()) {
// Non-bubbling events call only one default event handler, the one for the target.
m_node->willCallDefaultEventHandler(*m_event);
m_node->defaultEventHandler(m_event.get());
« no previous file with comments | « trunk/Source/core/dom/Node.cpp ('k') | trunk/Source/core/events/MouseEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698