Verified Commit 40a83cb3 authored by henry's avatar henry Committed by ma1
Browse files

TB 7494: Create local home page for TBB.

Bug 41333: Update about:tor to new design. Including:
+ make the favicon match the branding icon.
+ make the location bar show a search icon.
parent 34be9e05
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1438,6 +1438,10 @@ var BookmarkingUI = {
      newTabURL,
      "about:home",
      "chrome://browser/content/blanktab.html",
      // Add the "about:tor" uri. See tor-browser#41717.
      // NOTE: "about:newtab", "about:welcome", "about:home" and
      // "about:privatebrowsing" can also redirect to "about:tor".
      "about:tor",
    ];
    if (PrivateBrowsingUtils.isWindowPrivate(window)) {
      newTabURLs.push("about:privatebrowsing");
+2 −0
Original line number Diff line number Diff line
@@ -748,6 +748,7 @@ async function gLazyFindCommand(cmd, ...args) {
}

var gPageIcons = {
  "about:tor": "chrome://branding/content/icon32.png",
  "about:home": "chrome://branding/content/icon32.png",
  "about:newtab": "chrome://branding/content/icon32.png",
  "about:welcome": "chrome://branding/content/icon32.png",
@@ -755,6 +756,7 @@ var gPageIcons = {
};

var gInitialPages = [
  "about:tor",
  "about:torconnect",
  "about:blank",
  "about:home",
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ function isBlankPageURL(aURL) {
  return (
    aURL == "about:blank" ||
    aURL == "about:home" ||
    aURL == "about:tor" ||
    aURL == BROWSER_NEW_TAB_URL ||
    aURL == "chrome://browser/content/blanktab.html"
  );
+21 −0
Original line number Diff line number Diff line
@@ -995,6 +995,27 @@ nsBrowserContentHandler.prototype = {
              "%OLD_BASE_BROWSER_VERSION%",
              old_forkVersion
            );
            if (overridePage && AppConstants.BASE_BROWSER_UPDATE) {
              // Tor Browser: Instead of opening the post-update "override page"
              // directly, we ensure that about:tor will be opened, which should
              // notify the user that their browser was updated.
              //
              // The overridePage comes from the openURL attribute within the
              // updates.xml file or, if no showURL action is present, from the
              // startup.homepage_override_url pref.
              Services.prefs.setCharPref(
                "torbrowser.post_update.url",
                overridePage
              );
              Services.prefs.setBoolPref(
                "torbrowser.post_update.shouldNotify",
                true
              );
              // If the user's homepage is about:tor, we will inform them
              // about the update on that page; otherwise, we arrange to
              // open about:tor in a secondary tab.
              overridePage = startPage === "about:tor" ? "" : "about:tor";
            }
            break;
          }
          case OVERRIDE_NEW_BUILD_ID: {
+20 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
  WindowsLaunchOnLogin: "resource://gre/modules/WindowsLaunchOnLogin.sys.mjs",
  WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
  WindowsGPOParser: "resource://gre/modules/policies/WindowsGPOParser.sys.mjs",
  checkHomepageOverride: "resource:///modules/HomepageOverride.sys.mjs",
  clearTimeout: "resource://gre/modules/Timer.sys.mjs",
  setTimeout: "resource://gre/modules/Timer.sys.mjs",
});
@@ -525,6 +526,23 @@ let JSWINDOWACTORS = {
    matches: ["about:tabcrashed*"],
  },

  AboutTor: {
    parent: {
      esModuleURI: "resource:///actors/AboutTorParent.sys.mjs",
    },
    child: {
      esModuleURI: "resource:///actors/AboutTorChild.sys.mjs",

      events: {
        DOMContentLoaded: {},
        L10nMutationsFinished: {},
        SubmitSearchOnionize: { wantUntrusted: true },
      },
    },

    matches: ["about:tor"],
  },

  // Removed AboutWelcomeShopping. tor-browser#42831.

  AboutWelcome: {
@@ -1637,6 +1655,8 @@ BrowserGlue.prototype = {

    lazy.ResetPBMPanel.init();

    lazy.checkHomepageOverride();

    AboutHomeStartupCache.init();

    Services.obs.notifyObservers(null, "browser-ui-startup-complete");
Loading