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

Unified Diff: content/renderer/render_view_impl.cc

Issue 23691036: Add support for datalist to input type color Base URL: https://chromium.googlesource.com/chromium/src.git@color
Patch Set: Created 7 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 | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webcolorchooser_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 6b3ca9f94632320567558f8e753ca78850a35652..4d3343a31ecd12a4bee64e191203c6aeb88fe16c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2540,10 +2540,15 @@ bool RenderViewImpl::handleCurrentKeyboardEvent() {
WebKit::WebColorChooser* RenderViewImpl::createColorChooser(
WebKit::WebColorChooserClient* client,
- const WebKit::WebColor& initial_color) {
+ const WebKit::WebColor& initial_color,
+ const WebKit::WebVector<WebKit::WebColorSuggestion>& suggestions) {
RendererWebColorChooserImpl* color_chooser =
new RendererWebColorChooserImpl(this, client);
- color_chooser->Open(static_cast<SkColor>(initial_color));
+ std::vector<content::ColorSuggestion> color_suggestions;
+ for (size_t i = 0; i < suggestions.size(); i++) {
+ color_suggestions.push_back(content::ColorSuggestion(suggestions[i]));
+ }
+ color_chooser->Open(static_cast<SkColor>(initial_color), color_suggestions);
return color_chooser;
}
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webcolorchooser_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698