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

Unified Diff: Source/core/html/forms/ColorInputType.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/forms/ColorInputType.h ('k') | Source/core/html/forms/InputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/ColorInputType.cpp
diff --git a/Source/core/html/forms/ColorInputType.cpp b/Source/core/html/forms/ColorInputType.cpp
index 9881a63e4b6ed9d30a959700ca361863deabd393..3edd2dead5a76c7375d62458d16633f54add6907 100644
--- a/Source/core/html/forms/ColorInputType.cpp
+++ b/Source/core/html/forms/ColorInputType.cpp
@@ -44,6 +44,7 @@
#include "core/html/HTMLOptionElement.h"
#include "core/html/forms/ColorChooser.h"
#include "core/page/Chrome.h"
+#include "core/rendering/RenderTheme.h"
#include "core/rendering/RenderView.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/UserGestureIndicator.h"
@@ -183,11 +184,14 @@ void ColorInputType::didChooseColor(const Color& color)
return;
element().setValueFromRenderer(color.serialized());
element().updateView();
- element().dispatchFormControlChangeEvent();
+ if (!RenderTheme::theme().isModalColorChooser())
+ element().dispatchFormControlChangeEvent();
}
void ColorInputType::didEndChooser()
{
+ if (RenderTheme::theme().isModalColorChooser())
+ element().dispatchFormControlChangeEvent();
m_chooser.clear();
}
@@ -258,4 +262,9 @@ AXObject* ColorInputType::popupRootAXObject()
return m_chooser ? m_chooser->rootAXObject() : 0;
}
+ColorChooserClient* ColorInputType::colorChooserClient()
+{
+ return this;
+}
+
} // namespace blink
« no previous file with comments | « Source/core/html/forms/ColorInputType.h ('k') | Source/core/html/forms/InputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698