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

Unified Diff: chrome/browser/resources/options/font_settings.js

Issue 6602021: web-ui settings: Standard font setting now correlates to WebKit's standard fo... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase Created 9 years, 10 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: chrome/browser/resources/options/font_settings.js
===================================================================
--- chrome/browser/resources/options/font_settings.js (revision 76410)
+++ chrome/browser/resources/options/font_settings.js (working copy)
@@ -29,13 +29,13 @@
initializePage: function() {
OptionsPage.prototype.initializePage.call(this);
- var serifFontRange = $('serif-font-size');
- serifFontRange.valueMap = $('fixed-font-size').valueMap = [9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 40, 44,
- 48, 56, 64, 72];
- serifFontRange.continuous = false;
- serifFontRange.fontSampleEl = $('serif-font-sample');
- serifFontRange.notifyChange = this.rangeChanged_.bind(this);
+ var standardFontRange = $('standard-font-size');
+ standardFontRange.valueMap = $('fixed-font-size').valueMap = [9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 40,
+ 44, 48, 56, 64, 72];
+ standardFontRange.continuous = false;
+ standardFontRange.fontSampleEl = $('standard-font-sample');
+ standardFontRange.notifyChange = this.rangeChanged_.bind(this);
var minimumFontRange = $('minimum-font-size');
minimumFontRange.valueMap = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20,
@@ -47,17 +47,9 @@
this.minimumFontSizeChanged_.bind(this);
var placeholder = localStrings.getString('fontSettingsPlaceholder');
- $('serif-font-family').appendChild(new Option(placeholder));
+ $('standard-font-family').appendChild(new Option(placeholder));
$('fixed-font-family').appendChild(new Option(placeholder));
$('font-encoding').appendChild(new Option(placeholder));
-
- // Add an additional listener to the font select menu for the
- // 'sansserif_font_family' preference.
- $('serif-font-family').addEventListener('change',
- function(e) {
- Preferences.setStringPref('webkit.webprefs.sansserif_font_family',
- this.options[this.selectedIndex].value, '');
- });
},
/**
@@ -145,7 +137,7 @@
// Chrome callbacks
FontSettings.setFontsData = function(fonts, encodings, selectedValues) {
- FontSettings.getInstance().populateSelect_($('serif-font-family'), fonts,
+ FontSettings.getInstance().populateSelect_($('standard-font-family'), fonts,
selectedValues[0]);
FontSettings.getInstance().populateSelect_($('fixed-font-family'), fonts,
selectedValues[1]);
@@ -153,8 +145,8 @@
selectedValues[2]);
};
- FontSettings.setupSerifFontSample = function(font, size) {
- FontSettings.getInstance().setupFontSample_($('serif-font-sample'), size,
+ FontSettings.setupStandardFontSample = function(font, size) {
+ FontSettings.getInstance().setupFontSample_($('standard-font-sample'), size,
font);
};
« no previous file with comments | « chrome/browser/resources/options/font_settings.html ('k') | chrome/browser/tab_contents/render_view_host_delegate_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698