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

Unified Diff: Source/core/html/forms/CheckboxInputType.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: Added tests for Radio to check onchange event trigger 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/forms/CheckboxInputType.cpp
diff --git a/Source/core/html/forms/CheckboxInputType.cpp b/Source/core/html/forms/CheckboxInputType.cpp
index 738f9d58b9b0b15abb71a562058d9f40f5284f47..d2d803f9471cf4365a02f2110d65f7b9d8859d97 100644
--- a/Source/core/html/forms/CheckboxInputType.cpp
+++ b/Source/core/html/forms/CheckboxInputType.cpp
@@ -107,4 +107,9 @@ bool CheckboxInputType::supportsIndeterminateAppearance() const
return true;
}
+bool CheckboxInputType::shouldDispatchFormControlChangeEvent(String& oldValue, String& newValue)
+{
+ return oldValue != newValue;
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698