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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormElement.cpp

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: sed -i s/DispatchEventResult/WebInputEventResult/g Created 5 years 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: third_party/WebKit/Source/core/html/HTMLFormElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
index 284ea311990279688eb16b6044f746297e9b3da4..fabfd26e61c0def5f8a714b4effe032225ed8516 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
@@ -327,7 +327,7 @@ void HTMLFormElement::prepareForSubmission(Event* event)
frame->loader().client()->dispatchWillSendSubmitEvent(this);
- if (dispatchEvent(Event::createCancelableBubble(EventTypeNames::submit)))
+ if (dispatchEvent(Event::createCancelableBubble(EventTypeNames::submit)) == WebInputEventResult::NotHandled)
m_shouldSubmit = true;
m_isSubmittingOrInUserJSSubmitEvent = false;
@@ -448,7 +448,7 @@ void HTMLFormElement::reset()
m_isInResetFunction = true;
- if (!dispatchEvent(Event::createCancelableBubble(EventTypeNames::reset))) {
+ if (dispatchEvent(Event::createCancelableBubble(EventTypeNames::reset)) != WebInputEventResult::NotHandled) {
m_isInResetFunction = false;
return;
}

Powered by Google App Engine
This is Rietveld 408576698