Bug 854175 - Don't add "(Private Browsing)" to the window title in permanent PB mode; r=ehsan
authorChristian Ascheberg <c.ascheberg@gmx.de>
Sun, 24 Mar 2013 11:15:53 +0100
changeset 126055 4e6b20451bb636beffa4fc274cac63521a5992c2
parent 126054 c5c2aee6ebe6ec3245628c5597b7751de038d0be
child 126056 0373ca9b42ef2337db6a8e56522be4bcbf719491
push id25252
push usereakhgari@mozilla.com
push dateSun, 24 Mar 2013 14:30:37 +0000
treeherdermozilla-inbound@4e6b20451bb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs854175
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 854175 - Don't add "(Private Browsing)" to the window title in permanent PB mode; r=ehsan
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7132,20 +7132,22 @@ let gPrivateBrowsingUI = {
 #ifdef XP_MACOSX
       if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
         document.documentElement.setAttribute("drawintitlebar", true);
       }
 #endif
 
       // Adjust the window's title
       let docElement = document.documentElement;
-      docElement.setAttribute("title",
-        docElement.getAttribute("title_privatebrowsing"));
-      docElement.setAttribute("titlemodifier",
-        docElement.getAttribute("titlemodifier_privatebrowsing"));
+      if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
+        docElement.setAttribute("title",
+          docElement.getAttribute("title_privatebrowsing"));
+        docElement.setAttribute("titlemodifier",
+          docElement.getAttribute("titlemodifier_privatebrowsing"));
+      }
       docElement.setAttribute("privatebrowsingmode",
         PrivateBrowsingUtils.permanentPrivateBrowsing ? "permanent" : "temporary");
       gBrowser.updateTitlebar();
 
       if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
         // Adjust the New Window menu entries
         [
           { normal: "menu_newNavigator", private: "menu_newPrivateWindow" },