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

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

Issue 513783002: Dispatch change event for input type=color when colorpicker is closed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Implemented colorChooserClient support Created 6 years, 3 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/HTMLInputElement.h ('k') | Source/core/html/forms/ColorInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 138e00626067e3d7750b949cfbfafdad56940c55..87d5169233044306820aa9639b7f1374b34190fa 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -1483,10 +1483,14 @@ void HTMLInputElement::requiredAttributeChanged()
void HTMLInputElement::selectColorInColorChooser(const Color& color)
{
- // FIXME: Remove type check and static_cast.
- if (type() != InputTypeNames::color)
- return;
- static_cast<ColorInputType*>(m_inputType.get())->didChooseColor(color);
+ if (ColorChooserClient* client = m_inputType->colorChooserClient())
+ client->didChooseColor(color);
+}
+
+void HTMLInputElement::endColorChooser()
+{
+ if (ColorChooserClient* client = m_inputType->colorChooserClient())
+ client->didEndChooser();
}
HTMLElement* HTMLInputElement::list() const
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/ColorInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698