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

Unified Diff: Source/core/dom/EventDispatcher.cpp

Issue 16194013: Mouse press should focus on any types of form controls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 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
Index: Source/core/dom/EventDispatcher.cpp
diff --git a/Source/core/dom/EventDispatcher.cpp b/Source/core/dom/EventDispatcher.cpp
index 2e6b5d01a82c489b55b66d230cce73265cfea2d5..bf9f40bf0f9796c5b60dab82b80b29348bdcf2b1 100644
--- a/Source/core/dom/EventDispatcher.cpp
+++ b/Source/core/dom/EventDispatcher.cpp
@@ -199,6 +199,7 @@ inline void EventDispatcher::dispatchEventPostProcess(void* preDispatchEventHand
// implementation detail and not part of the DOM.
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());
ASSERT(!m_event->defaultPrevented());
if (m_event->defaultHandled())
@@ -208,6 +209,7 @@ inline void EventDispatcher::dispatchEventPostProcess(void* preDispatchEventHand
if (m_event->bubbles()) {
size_t size = m_event->eventPath().size();
for (size_t i = 1; i < size; ++i) {
+ m_event->eventPath()[i]->node()->willCallDefaultEventHandler(*m_event);
m_event->eventPath()[i]->node()->defaultEventHandler(m_event.get());
ASSERT(!m_event->defaultPrevented());
if (m_event->defaultHandled())
« no previous file with comments | « LayoutTests/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.html ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698