Chromium Code Reviews| 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 17d826a81fed428b956b7e2cb4960f367716a12a..a0f50aa0ea3ac94c04ca95dd8ff4eebd2912f4d4 100644 |
| --- a/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js |
| +++ b/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js |
| @@ -156,7 +156,29 @@ |
| }, |
| /** |
| - * Creates an html style value. |
| + * Get the minimum font size, accounting for unset prefs. |
| + * @return {string} |
| + * @private |
| + */ |
| + computeMinimumFontSize_: function() { |
| + var value = this.get('prefs.webkit.webprefs.minimum_font_size.value'); |
| + return (value ? value : MINIMUM_FONT_SIZE_RANGE_[0]).toString(); |
|
Dan Beam
2017/03/14 03:27:19
(value || MINIMUM_FONT_SIZE_RANGE_[0])
why toStri
dschuyler
2017/03/14 18:55:31
Done.
|
| + }, |
| + |
| + /** |
| + * Creates an html style value for the minimum font size. |
| + * @param {number} fontSize The font size to use. |
| + * @param {string} fontFamily The name of the font family use. |
| + * @return {string} |
| + * @private |
| + */ |
| + computeMinimumStyle_: function(fontSize, fontFamily) { |
| + return 'font-size: ' + this.computeMinimumFontSize_() + |
| + "px; font-family: '" + fontFamily + "';"; |
| + }, |
| + |
| + /** |
| + * Creates an html style value for the default font size. |
| * @param {number} fontSize The font size to use. |
| * @param {string} fontFamily The name of the font family use. |
| * @return {string} |