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

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: Removed input type check and instead using virtual function to check if input type is checkbox Created 6 years, 8 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 | « Source/core/html/HTMLTextFormControlElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTextFormControlElement.cpp
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index c3f751a63f54d4eb643bdb97275b0ecbe1ae555c..67e8c69cc1e9a1f07ca97b33c3128723b15c7003 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -182,9 +182,14 @@ void HTMLTextFormControlElement::select()
setSelectionRange(0, numeric_limits<int>::max(), SelectionHasNoDirection);
}
+bool HTMLTextFormControlElement::isCheckbox() const
+{
+ return false;
+}
+
void HTMLTextFormControlElement::dispatchFormControlChangeEvent()
{
- if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, value())) {
+ if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, value()) || (isCheckbox() && m_textAsOfLastFormControlChangeEvent != value())) {
keishi 2014/05/02 07:44:55 HTMLTextFormControlElement exists to share code be
Habib Virji 2014/05/02 15:07:40 Done.
dispatchChangeEvent();
setTextAsOfLastFormControlChangeEvent(value());
}
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698