[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-115.2.0esr-13.0-1] 2 commits: Bug 42027: Base Browser migration procedures.

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Tue Aug 22 16:51:17 UTC 2023



Pier Angelo Vendrame pushed to branch base-browser-115.2.0esr-13.0-1 at The Tor Project / Applications / Tor Browser


Commits:
f96d5aae by Pier Angelo Vendrame at 2023-08-22T18:51:06+02:00
Bug 42027: Base Browser migration procedures.

This commit implmenents the the Base Browser's version of _migrateUI.

- - - - -
fc9ab629 by Pier Angelo Vendrame at 2023-08-22T18:51:09+02:00
Bug 41739: Remove "Website appearance" from about:preferences.

It is ignored because of RFP and it is confusing for users.

- - - - -


2 changed files:

- browser/components/BrowserGlue.sys.mjs
- browser/components/preferences/main.inc.xhtml


Changes:

=====================================
browser/components/BrowserGlue.sys.mjs
=====================================
@@ -1211,6 +1211,9 @@ BrowserGlue.prototype = {
     // handle any UI migration
     this._migrateUI();
 
+    // Base Browser-specific version of _migrateUI.
+    this._migrateUIBB();
+
     // Clear possibly auto enabled enterprise_roots prefs (see bug 40166)
     if (
       !Services.prefs.getBoolPref(
@@ -4283,6 +4286,25 @@ BrowserGlue.prototype = {
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
+  _migrateUIBB() {
+    // Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
+    //            for tor-browser#41739.
+    const MIGRATION_VERSION = 1;
+    const MIGRATION_PREF = "basebrowser.migration.version";
+    // We do not care whether this is a new or old profile, since in version 1
+    // we just quickly clear a user preference, which should not do anything to
+    // new profiles.
+    // Shall we ever raise the version number and have a watershed, we can add
+    // a check easily (any version > 0 will be an old profile).
+    const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
+    if (currentVersion < 1) {
+      Services.prefs.clearUserPref(
+        "layout.css.prefers-color-scheme.content-override"
+      );
+    }
+    Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
+  },
+
   async _showUpgradeDialog() {
     const data = await lazy.OnboardingMessageProvider.getUpgradeMessage();
     const { gBrowser } = lazy.BrowserWindowTracker.getTopWindow();


=====================================
browser/components/preferences/main.inc.xhtml
=====================================
@@ -138,7 +138,7 @@
 </hbox>
 
 <!-- Website appearance -->
-<groupbox id="webAppearanceGroup" data-category="paneGeneral" hidden="true">
+<groupbox id="webAppearanceGroup" data-category="paneGeneral" hidden="true" data-hidden-from-search="true">
   <html:h2 data-l10n-id="preferences-web-appearance-header"/>
   <html:div id="webAppearanceSettings">
     <description data-l10n-id="preferences-web-appearance-description"/>



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/ed48588bf9cab3393c7a6c132ec06000142c35d8...fc9ab629b8aa086e7e2ca43bb9f192f9415110f3

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/ed48588bf9cab3393c7a6c132ec06000142c35d8...fc9ab629b8aa086e7e2ca43bb9f192f9415110f3
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230822/118d0755/attachment-0001.htm>


More information about the tbb-commits mailing list