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

Unified Diff: chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js

Issue 1420533011: [MD settings] change dropdown to accept array of objects rather than array of tuples (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@appearance50p
Patch Set: trybot fix Created 5 years, 1 month 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 | « no previous file | chrome/browser/resources/settings/appearance_page/appearance_page.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js b/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
index 938b356025d6bf7d9114621a913c4387d64d0517..6c8edeb4a534069dd935bf5ce8eb0d670fbe78f6 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
+++ b/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
@@ -185,11 +185,20 @@ Polymer({
* @private
*/
setFontsData_: function(fontList, encodingList) {
- this.$.standardFont.menuOptions = fontList;
- this.$.serifFont.menuOptions = fontList;
- this.$.sansSerifFont.menuOptions = fontList;
- this.$.fixedFont.menuOptions = fontList;
- this.$.encoding.menuOptions = encodingList;
+ var fontMenuOptions = [];
+ for (var i = 0; i < fontList.length; ++i)
+ fontMenuOptions.push({value: fontList[i][0], name: fontList[i][1]});
+ this.$.standardFont.menuOptions = fontMenuOptions;
+ this.$.serifFont.menuOptions = fontMenuOptions;
+ this.$.sansSerifFont.menuOptions = fontMenuOptions;
+ this.$.fixedFont.menuOptions = fontMenuOptions;
+
+ var encodingMenuOptions = [];
+ for (var i = 0; i < encodingList.length; ++i) {
+ encodingMenuOptions.push({
+ value: encodingList[i][0], name: encodingList[i][1]});
+ }
+ this.$.encoding.menuOptions = encodingMenuOptions;
},
/**
« no previous file with comments | « no previous file | chrome/browser/resources/settings/appearance_page/appearance_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698