summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 21:14:37 +0000
committerkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 21:14:37 +0000
commit5ccc1b7e59902c9263c9fc1dc72b3b15a92b9092 (patch)
tree118f95ae7106b4dde827b0465f1939768d3c0f19
parentca5a65fb841e9a155ceae326391fe513fd79998c (diff)
downloadchromium_src-5ccc1b7e59902c9263c9fc1dc72b3b15a92b9092.zip
chromium_src-5ccc1b7e59902c9263c9fc1dc72b3b15a92b9092.tar.gz
chromium_src-5ccc1b7e59902c9263c9fc1dc72b3b15a92b9092.tar.bz2
Fix enable / disable handlers radio buttons in the content settings page.
Currently this crashes chrome in debug mode. The problem is that a selector used to decorate radio buttons is too broad and attaches a listener to radio buttons that later call callbacks with data they aren't expecting. This change fixes this problem by making the selector in question more specific. TEST=Click enable / disable for the handlers section in chrome://settings/content and verify there's no crash. Review URL: http://codereview.chromium.org/7096008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87365 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/options/content_settings.html6
-rw-r--r--chrome/browser/resources/options/options.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/resources/options/content_settings.html b/chrome/browser/resources/options/content_settings.html
index b1502fb..2bb07c1 100644
--- a/chrome/browser/resources/options/content_settings.html
+++ b/chrome/browser/resources/options/content_settings.html
@@ -92,13 +92,15 @@
<div>
<div class="radio">
<label>
- <input type="radio" name="handlers" value="allow">
+ <input type="radio" name="handlers" value="allow"
+ class="handler-radio">
<span i18n-content="handlers_allow"></span>
</label>
</div>
<div class="radio">
<label>
- <input type="radio" name="handlers" value="block">
+ <input type="radio" name="handlers" value="block"
+ class="handler-radio">
<span i18n-content="handlers_block"></span>
</label>
</div>
diff --git a/chrome/browser/resources/options/options.js b/chrome/browser/resources/options/options.js
index d13b169..89a068c 100644
--- a/chrome/browser/resources/options/options.js
+++ b/chrome/browser/resources/options/options.js
@@ -40,9 +40,9 @@ function load() {
cr.ui.decorate('select[pref]', options.PrefSelect);
cr.ui.decorate('input[pref][type=text]', options.PrefTextField);
cr.ui.decorate('input[pref][type=url]', options.PrefTextField);
- cr.ui.decorate('#content-settings-page input[type=radio]',
+ cr.ui.decorate('#content-settings-page input[type=radio]:not(.handler-radio)',
options.ContentSettingsRadio);
- cr.ui.decorate('#handlers-section input[type=radio]',
+ cr.ui.decorate('#content-settings-page input[type=radio].handler-radio',
options.HandlersEnabledRadio);
var menuOffPattern = /(^\?|&)menu=off($|&)/;