| Index: chrome/browser/resources/options2/font_settings.js
|
| diff --git a/chrome/browser/resources/options2/font_settings.js b/chrome/browser/resources/options2/font_settings.js
|
| index df027985d1d35b84da536e706ea6aeea723ff449..27b03a429f3de647e5741f00ae395237f60f95c4 100644
|
| --- a/chrome/browser/resources/options2/font_settings.js
|
| +++ b/chrome/browser/resources/options2/font_settings.js
|
| @@ -34,16 +34,28 @@ cr.define('options', function() {
|
| 22, 24, 26, 28, 30, 32, 34, 36, 40, 44, 48, 56, 64, 72];
|
| standardFontRange.continuous = false;
|
| standardFontRange.notifyChange = this.standardRangeChanged_.bind(this);
|
| - standardFontRange.notifyPrefChange =
|
| - this.standardFontSizeChanged_.bind(this);
|
| + Preferences.getInstance().addEventListener(
|
| + standardFontRange.pref,
|
| + function(event) {
|
| + Preferences.setIntegerPref(
|
| + 'webkit.webprefs.default_fixed_font_size',
|
| + event.value.value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD,
|
| + true);
|
| + });
|
|
|
| var minimumFontRange = $('minimum-font-size');
|
| minimumFontRange.valueMap = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
|
| 18, 20, 22, 24];
|
| minimumFontRange.continuous = false;
|
| minimumFontRange.notifyChange = this.minimumRangeChanged_.bind(this);
|
| - minimumFontRange.notifyPrefChange =
|
| - this.minimumFontSizeChanged_.bind(this);
|
| + Preferences.getInstance().addEventListener(
|
| + minimumFontRange.pref,
|
| + function(event) {
|
| + Preferences.setIntegerPref(
|
| + 'webkit.webprefs.minimum_logical_font_size',
|
| + event.value.value,
|
| + true);
|
| + });
|
|
|
| var placeholder = loadTimeData.getString('fontSettingsPlaceholder');
|
| var elements = [$('standard-font-family'), $('serif-font-family'),
|
| @@ -100,19 +112,6 @@ cr.define('options', function() {
|
| },
|
|
|
| /**
|
| - * Sets the 'default_fixed_font_size' preference when the standard font
|
| - * size has been changed by the user.
|
| - * @param {Element} el The slider input element.
|
| - * @param {number} value The mapped value that has been saved.
|
| - * @private
|
| - */
|
| - standardFontSizeChanged_: function(el, value) {
|
| - Preferences.setIntegerPref(
|
| - 'webkit.webprefs.default_fixed_font_size',
|
| - value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD, '');
|
| - },
|
| -
|
| - /**
|
| * Called as the user changes the miniumum font size. This allows for
|
| * reflecting the change in the UI before the preference has been changed.
|
| * @param {Element} el The slider input element.
|
| @@ -126,18 +125,6 @@ cr.define('options', function() {
|
| },
|
|
|
| /**
|
| - * Sets the 'minimum_logical_font_size' preference when the minimum font
|
| - * size has been changed by the user.
|
| - * @param {Element} el The slider input element.
|
| - * @param {number} value The mapped value that has been saved.
|
| - * @private
|
| - */
|
| - minimumFontSizeChanged_: function(el, value) {
|
| - Preferences.setIntegerPref(
|
| - 'webkit.webprefs.minimum_logical_font_size', value, '');
|
| - },
|
| -
|
| - /**
|
| * Sets the text, font size and font family of the sample text.
|
| * @param {Element} el The div containing the sample text.
|
| * @param {number} size The font size of the sample text.
|
|
|