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

Unified Diff: Source/core/html/HTMLTextFormControlElement.cpp

Issue 255163002: Dispatch change event for input type=checkbox when checked but value is null (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: "Fix compilation error on Windows and MAC" Created 6 years, 7 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/html/HTMLTextFormControlElement.cpp
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index c3f751a63f54d4eb643bdb97275b0ecbe1ae555c..459d766269248b3b0c7d171b331d0f3dd92a48b0 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -182,11 +182,18 @@ void HTMLTextFormControlElement::select()
setSelectionRange(0, numeric_limits<int>::max(), SelectionHasNoDirection);
}
+bool HTMLTextFormControlElement::shouldDispatchFormControlChangeEvent(String& oldValue, String& newValue)
+{
+ return false;
+}
+
void HTMLTextFormControlElement::dispatchFormControlChangeEvent()
{
- if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, value())) {
+ String newValue = value();
+ if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, newValue)
tkent 2014/05/07 01:24:57 The equalIgnoringNullity check should be in HTMLTe
keishi 2014/05/07 01:26:11 I think equalIgnoringNullity is part of the check
Habib Virji 2014/05/07 10:06:39 Done.
Habib Virji 2014/05/07 10:06:39 Done.
+ || shouldDispatchFormControlChangeEvent(m_textAsOfLastFormControlChangeEvent, newValue)) {
dispatchChangeEvent();
- setTextAsOfLastFormControlChangeEvent(value());
+ setTextAsOfLastFormControlChangeEvent(newValue);
}
setChangedSinceLastFormControlChangeEvent(false);
}

Powered by Google App Engine
This is Rietveld 408576698