... |
... |
@@ -1211,6 +1211,9 @@ BrowserGlue.prototype = { |
1211
|
1211
|
// handle any UI migration
|
1212
|
1212
|
this._migrateUI();
|
1213
|
1213
|
|
|
1214
|
+ // Base Browser-specific version of _migrateUI.
|
|
1215
|
+ this._migrateUIBB();
|
|
1216
|
+
|
1214
|
1217
|
// Clear possibly auto enabled enterprise_roots prefs (see bug 40166)
|
1215
|
1218
|
if (
|
1216
|
1219
|
!Services.prefs.getBoolPref(
|
... |
... |
@@ -4283,6 +4286,25 @@ BrowserGlue.prototype = { |
4283
|
4286
|
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
4284
|
4287
|
},
|
4285
|
4288
|
|
|
4289
|
+ _migrateUIBB() {
|
|
4290
|
+ // Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
|
|
4291
|
+ // for tor-browser#41739.
|
|
4292
|
+ const MIGRATION_VERSION = 1;
|
|
4293
|
+ const MIGRATION_PREF = "basebrowser.migration.version";
|
|
4294
|
+ // We do not care whether this is a new or old profile, since in version 1
|
|
4295
|
+ // we just quickly clear a user preference, which should not do anything to
|
|
4296
|
+ // new profiles.
|
|
4297
|
+ // Shall we ever raise the version number and have a watershed, we can add
|
|
4298
|
+ // a check easily (any version > 0 will be an old profile).
|
|
4299
|
+ const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
|
|
4300
|
+ if (currentVersion < 1) {
|
|
4301
|
+ Services.prefs.clearUserPref(
|
|
4302
|
+ "layout.css.prefers-color-scheme.content-override"
|
|
4303
|
+ );
|
|
4304
|
+ }
|
|
4305
|
+ Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
|
|
4306
|
+ },
|
|
4307
|
+
|
4286
|
4308
|
async _showUpgradeDialog() {
|
4287
|
4309
|
const data = await lazy.OnboardingMessageProvider.getUpgradeMessage();
|
4288
|
4310
|
const { gBrowser } = lazy.BrowserWindowTracker.getTopWindow();
|