Bug 639134 - migrate users of the old pref, r=jaws
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1454,17 +1454,17 @@ BrowserGlue.prototype = {
var notifyBox = win.gBrowser.getNotificationBox();
var notification = notifyBox.appendNotification(text, title, null,
notifyBox.PRIORITY_CRITICAL_MEDIUM,
buttons);
notification.persistence = -1; // Until user closes it
},
_migrateUI: function BG__migrateUI() {
- const UI_VERSION = 26;
+ const UI_VERSION = 27;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion = 0;
try {
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
} catch(ex) {}
if (currentUIVersion >= UI_VERSION)
return;
@@ -1764,16 +1764,25 @@ BrowserGlue.prototype = {
// Typed behavior will be used only for results from history.
if (defaultBehavior != -1 &&
!!(defaultBehavior & Ci.mozIPlacesAutoComplete["BEHAVIOR_TYPED"])) {
Services.prefs.setBoolPref("browser.urlbar.suggest.history.onlyTyped", true);
}
}
+ if (currentUIVersion < 27) {
+ // Fix up document color use:
+ const kOldColorPref = "browser.display.use_document_colors";
+ if (Services.prefs.prefHasUserValue(kOldColorPref) &&
+ !Services.prefs.getBoolPref(kOldColorPref)) {
+ Services.prefs.setIntPref("browser.display.document_color_use", 2);
+ }
+ }
+
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
// ------------------------------
// public nsIBrowserGlue members
// ------------------------------