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

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

Issue 6057003: DOMUI Settings: UTH: Fix up the 'Web Content' section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 10 years 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 | « chrome/browser/resources/options/advanced_options.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/advanced_options.js
diff --git a/chrome/browser/resources/options/advanced_options.js b/chrome/browser/resources/options/advanced_options.js
index 051c3cf3d3d0db54e68838b1a9f342b0a33f56da..0d52a907135d0d06878ca17b08b2fe58be7b3367 100644
--- a/chrome/browser/resources/options/advanced_options.js
+++ b/chrome/browser/resources/options/advanced_options.js
@@ -59,7 +59,11 @@ var OptionsPage = options.OptionsPage;
$('defaultZoomLevel').onchange = function(event) {
chrome.send('defaultZoomLevelAction',
[String(event.target.options[event.target.selectedIndex].value)]);
- }
+ };
+ $('defaultFontSize').onchange = function(event) {
+ chrome.send('defaultFontSizeAction',
+ [String(event.target.options[event.target.selectedIndex].value)]);
+ };
if (cr.isWindows || cr.isMac) {
$('certificatesManageButton').onclick = function(event) {
@@ -169,6 +173,31 @@ var OptionsPage = options.OptionsPage;
selectCtl.selectedIndex = 4; // 100%
};
+ // Set the font size selected item.
+ AdvancedOptions.SetFontSize = function(fixed_font_size_value,
+ font_size_value) {
+ var selectCtl = $('defaultFontSize');
+ if (fixed_font_size_value == font_size_value) {
+ for (var i = 0; i < selectCtl.options.length; i++) {
+ if (selectCtl.options[i].value == font_size_value) {
+ selectCtl.selectedIndex = i;
+ if ($('Custom'))
+ selectCtl.remove($('Custom').index);
+ return;
+ }
+ }
+ }
+
+ // Add/Select Custom Option in the font size label list.
+ if (!$('Custom')) {
+ var option = new Option(localStrings.getString('fontSizeLabelCustom'),
+ -1, false, true);
+ option.setAttribute("id", "Custom");
+ selectCtl.add(option);
+ }
+ $('Custom').selected = true;
+ };
+
// Set the download path.
AdvancedOptions.SetDownloadLocationPath = function(path) {
if (!cr.isChromeOS)
« no previous file with comments | « chrome/browser/resources/options/advanced_options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698