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

Unified Diff: Source/web/ColorChooserUIController.cpp

Issue 23236002: Prepare for color input datalist support on Android (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/web/ColorChooserUIController.cpp
diff --git a/Source/web/ColorChooserUIController.cpp b/Source/web/ColorChooserUIController.cpp
index 125d2e6808dd8d968dd9defb6e79a21f157c714e..62798bc9f0ca07bab63ffdcac5b91b66549f7f98 100644
--- a/Source/web/ColorChooserUIController.cpp
+++ b/Source/web/ColorChooserUIController.cpp
@@ -80,7 +80,12 @@ void ColorChooserUIController::didEndChooser()
void ColorChooserUIController::openColorChooser()
{
ASSERT(!m_chooser);
- m_chooser = m_chromeClient->createWebColorChooser(this, static_cast<WebColor>(m_client->currentColor().rgb()));
+ const Vector<Color>& suggestions = m_client->suggestions();
+ Vector<WebColor> suggestionColors(suggestions.size());
+ for (size_t i = 0; i < suggestions.size(); i++) {
tkent 2013/08/16 02:21:03 We prefer ++i.
keishi 2013/08/19 13:48:18 Done.
+ suggestionColors[i] = static_cast<WebColor>(suggestions[i].rgb());
+ }
+ m_chooser = m_chromeClient->createWebColorChooser(this, static_cast<WebColor>(m_client->currentColor().rgb()), suggestionColors);
}
} // namespace WebKit

Powered by Google App Engine
This is Rietveld 408576698