From 8757548a3e5b5cc4d159d61eb4a12c7af1be548e Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Sat, 13 Apr 2019 11:22:15 -0400 Subject: Issue #991 Part 8: Toolkit everything else --- toolkit/content/widgets/browser.xml | 23 +++-------------------- toolkit/content/widgets/preferences.xml | 8 ++------ toolkit/content/widgets/scrollbox.xml | 27 +++++++-------------------- 3 files changed, 12 insertions(+), 46 deletions(-) (limited to 'toolkit/content') diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml index 9c72e86d8..11ed998cc 100644 --- a/toolkit/content/widgets/browser.xml +++ b/toolkit/content/widgets/browser.xml @@ -19,14 +19,7 @@ if (this.getAttribute("autoscroll") == "false") return false; - var enabled = true; - try { - enabled = this.mPrefs.getBoolPref("general.autoScroll"); - } - catch (ex) { - } - - return enabled; + return this.mPrefs.getBoolPref("general.autoScroll", true); ]]> @@ -1427,18 +1420,8 @@ return; // Toggle browse with caret mode - var browseWithCaretOn = false; - var warn = true; - - try { - warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable); - } catch (ex) { - } - - try { - browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn); - } catch (ex) { - } + var browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn, false); + var warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable, true); if (warn && !browseWithCaretOn) { var checkValue = {value:false}; var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] diff --git a/toolkit/content/widgets/preferences.xml b/toolkit/content/widgets/preferences.xml index 9fb2ac7ea..11de03246 100644 --- a/toolkit/content/widgets/preferences.xml +++ b/toolkit/content/widgets/preferences.xml @@ -893,12 +893,8 @@ diff --git a/toolkit/content/widgets/scrollbox.xml b/toolkit/content/widgets/scrollbox.xml index ff57a5911..219b7cb5e 100644 --- a/toolkit/content/widgets/scrollbox.xml +++ b/toolkit/content/widgets/scrollbox.xml @@ -80,13 +80,8 @@ @@ -99,13 +94,8 @@ if (this.hasAttribute("smoothscroll")) { this._smoothScroll = (this.getAttribute("smoothscroll") == "true"); } else { - try { - this._smoothScroll = this._prefBranch - .getBoolPref("toolkit.scrollbox.smoothScroll"); - } - catch (ex) { - this._smoothScroll = true; - } + this._smoothScroll = this._prefBranch + .getBoolPref("toolkit.scrollbox.smoothScroll", true); } } return this._smoothScroll; @@ -737,12 +727,9 @@