summaryrefslogtreecommitdiffstats
path: root/browser/base/content
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content')
-rw-r--r--browser/base/content/aboutDialog.js25
-rw-r--r--browser/base/content/aboutDialog.xul16
-rw-r--r--browser/base/content/browser-media.js15
-rw-r--r--browser/base/content/browser-menubar.inc11
-rw-r--r--browser/base/content/browser-places.js4
-rwxr-xr-xbrowser/base/content/browser.js41
-rw-r--r--browser/base/content/browser.xul2
-rw-r--r--browser/base/content/overrides/app-license.html3
-rw-r--r--browser/base/content/sync/customize.xul7
-rw-r--r--browser/base/content/tab-content.js4
-rw-r--r--browser/base/content/tabbrowser.xml19
-rw-r--r--browser/base/content/urlbarBindings.xml60
-rw-r--r--browser/base/content/utilityOverlay.js6
-rw-r--r--browser/base/content/win6BrowserOverlay.xul12
14 files changed, 105 insertions, 120 deletions
diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js
index 569a65adb..f9571621f 100644
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -40,16 +40,23 @@ function init(aEvent)
// Pref is unset
}
- // Include the build ID and display warning if this is an "a#" (nightly or aurora) build
+ // Include the build ID
let versionField = document.getElementById("version");
let version = Services.appinfo.version;
+ let buildID = Services.appinfo.appBuildID;
+ let year = buildID.slice(0, 4);
+ let month = buildID.slice(4, 6);
+ let day = buildID.slice(6, 8);
+ let hour = buildID.slice(8, 10);
+ let minute = buildID.slice(10, 12);
+ if (Services.prefs.getBoolPref("general.useragent.appVersionIsBuildID")) {
+ versionField.textContent = `${year}.${month}.${day}`;
+ } else {
+ versionField.textContent = `v` + version + ` (${year}-${month}-${day})`;
+ }
+
+ // Display warning if this is an "a#" (nightly or aurora) build
if (/a\d+$/.test(version)) {
- let buildID = Services.appinfo.appBuildID;
- let year = buildID.slice(0, 4);
- let month = buildID.slice(4, 6);
- let day = buildID.slice(6, 8);
- versionField.textContent += ` (${year}-${month}-${day})`;
-
document.getElementById("experimental").hidden = false;
document.getElementById("communityDesc").hidden = true;
}
@@ -62,6 +69,10 @@ function init(aEvent)
let arch = bundle.GetStringFromName(archResource);
versionField.textContent += ` (${arch})`;
+ // Get Release Notes URL from Preferences
+ let releaseNotesURL = Services.prefs.getCharPref("app.releaseNotesURL");
+ document.getElementById("releasenotes").setAttribute("href", releaseNotesURL);
+
if (AppConstants.MOZ_UPDATER) {
gAppUpdater = new appUpdater();
diff --git a/browser/base/content/aboutDialog.xul b/browser/base/content/aboutDialog.xul
index cbb07a5e1..f64e79681 100644
--- a/browser/base/content/aboutDialog.xul
+++ b/browser/base/content/aboutDialog.xul
@@ -45,9 +45,9 @@
<vbox id="leftBox" flex="1"/>
<vbox id="rightBox" flex="1">
<hbox align="baseline">
-#expand <label id="version">__MOZ_APP_VERSION_DISPLAY__</label>
+#expand <label id="version"></label>
#ifndef NIGHTLY_BUILD
-#expand <label id="releasenotes" class="text-link" href="https://www.mozilla.org/firefox/__MOZ_APP_VERSION__/releasenotes/">&releaseNotes.link;</label>
+ <label id="releasenotes" class="text-link">&releaseNotes.link;</label>
#endif
</hbox>
@@ -120,19 +120,13 @@
<vbox id="experimental" hidden="true">
<description class="text-blurb" id="warningDesc">
&warningDesc.version;
-#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
- &warningDesc.telemetryDesc;
-#endif
- </description>
- <description class="text-blurb" id="communityExperimentalDesc">
- &community.exp.start;<label class="text-link" href="http://www.mozilla.org/">&community.exp.mozillaLink;</label>&community.exp.middle;<label class="text-link" useoriginprincipal="true" href="about:credits">&community.exp.creditsLink;</label>&community.exp.end;
</description>
</vbox>
<description class="text-blurb" id="communityDesc">
- &community.start2;<label class="text-link" href="http://www.mozilla.org/">&community.mozillaLink;</label>&community.middle2;<label class="text-link" useoriginprincipal="true" href="about:credits">&community.creditsLink;</label>&community.end3;
+ Basilisk is community software released by <label class="text-link" href="http://www.palemoon.org/">the Pale Moon team</label> and Mozilla developers. Learn <label class="text-link" useoriginprincipal="true" href="about:credits">who contributed</label> to this software.
</description>
<description class="text-blurb" id="contributeDesc">
- &helpus.start;<label class="text-link" href="https://sendto.mozilla.org/page/contribute/Give-Now?source=mozillaorg_default_footer&#38;ref=firefox_about&#38;utm_campaign=firefox_about&#38;tm_source=firefox&#38;tm_medium=referral&#38;utm_content=20140929_FireFoxAbout">&helpus.donateLink;</label>&helpus.middle;<label class="text-link" href="http://www.mozilla.org/contribute/">&helpus.getInvolvedLink;</label>&helpus.end;
+ Want to help? Please consider <label class="text-link" href="https://www.palemoon.org/donations.shtml">donating</label> or get involved with our <label class="text-link" href="https://github.com/MoonchildProductions/moebius">development</label> of the Unified XUL Platform.
</description>
</vbox>
</vbox>
@@ -141,7 +135,7 @@
<hbox pack="center">
<label class="text-link bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label>
<label class="text-link bottom-link" useoriginprincipal="true" href="about:rights">&bottomLinks.rights;</label>
- <label class="text-link bottom-link" href="https://www.mozilla.org/privacy/">&bottomLinks.privacy;</label>
+ <label class="text-link bottom-link" href="https://www.palemoon.org/privacy.shtml">&bottomLinks.privacy;</label>
</hbox>
<description id="trademark">&trademarkInfo.part1;</description>
</vbox>
diff --git a/browser/base/content/browser-media.js b/browser/base/content/browser-media.js
index 81e7faf17..a013dbd8a 100644
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -201,29 +201,16 @@ let gDecoderDoctorHandler = {
getLabelForNotificationBox(type) {
if (type == "adobe-cdm-not-found" &&
AppConstants.platform == "win") {
- if (AppConstants.isPlatformAndVersionAtMost("win", "5.9")) {
- // We supply our own Learn More button so we don't need to populate the message here.
- return gNavigatorBundle.getFormattedString("emeNotifications.drmContentDisabled.message", [""]);
- }
return gNavigatorBundle.getString("decoder.noCodecs.message");
}
if (type == "adobe-cdm-not-activated" &&
AppConstants.platform == "win") {
- if (AppConstants.isPlatformAndVersionAtMost("win", "5.9")) {
- return gNavigatorBundle.getString("decoder.noCodecsXP.message");
- }
- if (!AppConstants.isPlatformAndVersionAtLeast("win", "6.1")) {
- return gNavigatorBundle.getString("decoder.noCodecsVista.message");
- }
return gNavigatorBundle.getString("decoder.noCodecs.message");
}
if (type == "platform-decoder-not-found") {
- if (AppConstants.isPlatformAndVersionAtLeast("win", "6.1")) {
+ if (AppConstants.platform == "win") {
return gNavigatorBundle.getString("decoder.noHWAcceleration.message");
}
- if (AppConstants.isPlatformAndVersionAtLeast("win", "6")) {
- return gNavigatorBundle.getString("decoder.noHWAccelerationVista.message");
- }
if (AppConstants.platform == "linux") {
return gNavigatorBundle.getString("decoder.noCodecsLinux.message");
}
diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc
index e952bc3ca..3fc098755 100644
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -179,15 +179,6 @@
label="&bidiSwitchTextDirectionItem.label;"
accesskey="&bidiSwitchTextDirectionItem.accesskey;"
hidden="true"/>
-#ifdef XP_UNIX
-#ifndef XP_MACOSX
- <menuseparator/>
- <menuitem id="menu_preferences"
- label="&preferencesCmdUnix.label;"
- accesskey="&preferencesCmdUnix.accesskey;"
- oncommand="openPreferences();"/>
-#endif
-#endif
</menupopup>
</menu>
@@ -521,13 +512,11 @@
<menupopup id="menu_mirrorTab-popup"
onpopupshowing="populateMirrorTabMenu(this)"/>
</menu>
-#ifndef XP_UNIX
<menuseparator id="prefSep"/>
<menuitem id="menu_preferences"
label="&preferencesCmd2.label;"
accesskey="&preferencesCmd2.accesskey;"
oncommand="openPreferences();"/>
-#endif
</menupopup>
</menu>
diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js
index 14e90cde2..de880d11d 100644
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1555,6 +1555,10 @@ var BookmarkingUI = {
// so kill current view and let popupshowing generate a new one.
if (this.button._placesView)
this.button._placesView.uninit();
+ // ...and do the same for the menu bar.
+ let menubar = document.getElementById("bookmarksMenu");
+ if (menubar._placesview)
+ menubar._placesview.uninit();
// We have to do the same thing for the "special" views underneath the
// the bookmarks menu.
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 7b05e1da7..910dc4f68 100755
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -97,11 +97,6 @@ XPCOMUtils.defineLazyGetter(this, "gCustomizeMode", function() {
return new scope.CustomizeMode(window);
});
-XPCOMUtils.defineLazyGetter(window, "gShowPageResizers", function () {
- // Only show resizers on Windows 2000 and XP
- return AppConstants.isPlatformAndVersionAtMost("win", "5.9");
-});
-
XPCOMUtils.defineLazyGetter(this, "gPrefService", function() {
return Services.prefs;
});
@@ -473,9 +468,7 @@ var gPopupBlockerObserver = {
var brandShortName = brandBundle.getString("brandShortName");
var popupCount = gBrowser.selectedBrowser.blockedPopups.length;
- var stringKey = AppConstants.platform == "win"
- ? "popupWarningButton"
- : "popupWarningButtonUnix";
+ var stringKey = "popupWarningButton";
var popupButtonText = gNavigatorBundle.getString(stringKey);
var popupButtonAccesskey = gNavigatorBundle.getString(stringKey + ".accesskey");
@@ -1055,8 +1048,10 @@ var gBrowserInit = {
window.matchMedia("(-moz-windows-default-theme)").matches) {
let windowFrameColor = new Color(...Cu.import("resource:///modules/Windows8WindowFrameColor.jsm", {})
.Windows8WindowFrameColor.get());
- // Default to black for foreground text.
- if (!windowFrameColor.isContrastRatioAcceptable(new Color(0, 0, 0))) {
+ // Check if window frame color is dark.
+ if ((windowFrameColor.r * 2 +
+ windowFrameColor.g * 5 +
+ windowFrameColor.b) <= 128 * 8) {
document.documentElement.setAttribute("darkwindowframe", "true");
}
}
@@ -3372,8 +3367,6 @@ var PrintPreviewListener = {
this._chromeState.notificationsOpen = !notificationBox.notificationsHidden;
notificationBox.notificationsHidden = true;
- gBrowser.updateWindowResizers();
-
this._chromeState.findOpen = gFindBarInitialized && !gFindBar.hidden;
if (gFindBarInitialized)
gFindBar.close();
@@ -5222,7 +5215,6 @@ function setToolbarVisibility(toolbar, isVisible, persist=true) {
PlacesToolbarHelper.init();
BookmarkingUI.onToolbarVisibilityChange();
- gBrowser.updateWindowResizers();
if (isVisible)
ToolbarIconColor.inferFromText();
}
@@ -5686,7 +5678,7 @@ function middleMousePaste(event) {
function stripUnsafeProtocolOnPaste(pasteData) {
// Don't allow pasting javascript URIs since we don't support
// LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL for those.
- return pasteData.replace(/^(?:\s*javascript:)+/i, "");
+ return pasteData.replace(/\r?\n/g, "").replace(/^(?:\W*javascript:)+/i, "");
}
// handleDroppedLink has the following 2 overloads:
@@ -8073,6 +8065,7 @@ var ToolbarIconColor = {
window.addEventListener("activate", this);
window.addEventListener("deactivate", this);
Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
+ gPrefService.addObserver("ui.colorChanged", this, false);
// If the window isn't active now, we assume that it has never been active
// before and will soon become active such that inferFromText will be
@@ -8087,6 +8080,7 @@ var ToolbarIconColor = {
window.removeEventListener("activate", this);
window.removeEventListener("deactivate", this);
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
+ gPrefService.removeObserver("ui.colorChanged", this);
},
handleEvent: function (event) {
@@ -8105,6 +8099,18 @@ var ToolbarIconColor = {
// lightweight-theme-styling-update observer.
setTimeout(() => { this.inferFromText(); }, 0);
break;
+ case "nsPref:changed":
+ // system color change
+ var colorChangedPref = false;
+ try {
+ colorChangedPref = gPrefService.getBoolPref("ui.colorChanged");
+ } catch(e) { }
+ // if pref indicates change, call inferFromText() on a small delay
+ if (colorChangedPref == true)
+ setTimeout(() => { this.inferFromText(); }, 300);
+ break;
+ default:
+ console.error("ToolbarIconColor: Uncaught topic " + aTopic);
}
},
@@ -8128,16 +8134,19 @@ var ToolbarIconColor = {
let luminances = new Map;
for (let toolbar of document.querySelectorAll(toolbarSelector)) {
let [r, g, b] = parseRGB(getComputedStyle(toolbar).color);
- let luminance = 0.2125 * r + 0.7154 * g + 0.0721 * b;
+ let luminance = (2 * r + 5 * g + b) / 8;
luminances.set(toolbar, luminance);
}
for (let [toolbar, luminance] of luminances) {
- if (luminance <= 110)
+ if (luminance <= 128)
toolbar.removeAttribute("brighttext");
else
toolbar.setAttribute("brighttext", "true");
}
+
+ // Clear pref if set, since we're done applying the color changes.
+ gPrefService.clearUserPref("ui.colorChanged");
}
}
diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul
index 2c74aecdf..be17fb0e2 100644
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -546,10 +546,8 @@
#ifdef MENUBAR_CAN_AUTOHIDE
toolbarname="&menubarCmd.label;"
accesskey="&menubarCmd.accesskey;"
-#if defined(MOZ_WIDGET_GTK)
autohide="true"
#endif
-#endif
context="toolbar-context-menu">
<toolbaritem id="menubar-items" align="center">
# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
diff --git a/browser/base/content/overrides/app-license.html b/browser/base/content/overrides/app-license.html
index e7a158c79..0a1f0d8f5 100644
--- a/browser/base/content/overrides/app-license.html
+++ b/browser/base/content/overrides/app-license.html
@@ -2,5 +2,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<p><b>Binaries</b> of this product have been made available to you by the
- <a href="http://www.mozilla.org/">Mozilla Project</a> under the Mozilla
+ <a href="http://www.palemoon.org/">Pale Moon project team</a> and
+ <a href="http://www.moonchildproductions.info/">Moonchild Productions</a> under the Mozilla
Public License 2.0 (MPL). <a href="about:rights">Know your rights</a>.</p>
diff --git a/browser/base/content/sync/customize.xul b/browser/base/content/sync/customize.xul
index d95536d9a..827edf565 100644
--- a/browser/base/content/sync/customize.xul
+++ b/browser/base/content/sync/customize.xul
@@ -31,12 +31,7 @@
<label id="sync-customize-title" value="&syncCustomize.title;"/>
<description id="sync-customize-subtitle"
-#ifdef XP_UNIX
- value="&syncCustomizeUnix.description;"
-#else
- value="&syncCustomize.description;"
-#endif
- />
+ value="&syncCustomize.description;"/>
<vbox align="start">
<checkbox label="&engine.tabs.label;"
diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js
index 06fa3d9cc..05f8e00ab 100644
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -9,7 +9,9 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
+#ifdef MOZ_WEBEXTENSIONS
Cu.import("resource://gre/modules/ExtensionContent.jsm");
+#endif
XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
"resource:///modules/E10SUtils.jsm");
@@ -929,11 +931,13 @@ var UserContextIdNotifier = {
UserContextIdNotifier.init();
+#ifdef MOZ_WEBEXTENSIONS
ExtensionContent.init(this);
addEventListener("unload", () => {
ExtensionContent.uninit(this);
RefreshBlocker.uninit();
});
+#endif
addMessageListener("AllowScriptsToClose", () => {
content.QueryInterface(Ci.nsIInterfaceRequestor)
diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
index 3f4c3518e..0cb0f3bd6 100644
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -214,18 +214,6 @@
]]></body>
</method>
- <method name="updateWindowResizers">
- <body><![CDATA[
- if (!window.gShowPageResizers)
- return;
-
- var show = window.windowState == window.STATE_NORMAL;
- for (let i = 0; i < this.browsers.length; i++) {
- this.browsers[i].showWindowResizer = show;
- }
- ]]></body>
- </method>
-
<method name="_setCloseKeyState">
<parameter name="aEnabled"/>
<body><![CDATA[
@@ -1970,10 +1958,6 @@
b.QueryInterface(Ci.nsIFrameLoaderOwner).presetOpenerWindow(aParams.opener);
}
- if (window.gShowPageResizers && window.windowState == window.STATE_NORMAL) {
- b.setAttribute("showresizer", "true");
- }
-
if (!aParams.isPreloadBrowser && this.hasAttribute("autocompletepopup")) {
b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
}
@@ -4835,7 +4819,6 @@
this.appendChild(this._autoScrollPopup);
this.mCurrentBrowser.setAttribute("autoscrollpopup", this._autoScrollPopup.id);
this.mCurrentBrowser.droppedLinkHandler = handleDroppedLink;
- this.updateWindowResizers();
// Hook up the event listeners to the first browser
var tabListener = this.mTabProgressListener(this.mCurrentTab, this.mCurrentBrowser, true, false);
@@ -5854,8 +5837,6 @@
this._handleTabSelect();
this.mTabstripWidth = width;
}
-
- this.tabbrowser.updateWindowResizers();
break;
case "mouseout":
// If the "related target" (the node to which the pointer went) is not
diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml
index 84ed693ff..eb3150581 100644
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -56,10 +56,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<field name="AppConstants" readonly="true">
(Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants;
</field>
-
+#ifdef MOZ_WEBEXTENSIONS
<field name="ExtensionSearchHandler" readonly="true">
(Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler;
</field>
+#endif
<constructor><![CDATA[
this._prefs = Components.classes["@mozilla.org/preferences-service;1"]
@@ -487,6 +488,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
actionDetails
);
break;
+#ifdef MOZ_WEBEXTENSIONS
case "extension":
this.handleRevert();
// Give the extension control of handling the command.
@@ -494,6 +496,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
let keyword = action.params.keyword;
this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where);
return;
+#endif
}
} else {
// This is a fallback for add-ons and old testing code that directly
@@ -701,38 +704,51 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
]]></body>
</method>
- <method name="onDragOver">
- <parameter name="aEvent"/>
- <body>
- var types = aEvent.dataTransfer.types;
- if (types.includes("application/x-moz-file") ||
- types.includes("text/x-moz-url") ||
- types.includes("text/uri-list") ||
- types.includes("text/unicode"))
- aEvent.preventDefault();
- </body>
- </method>
-
- <method name="onDrop">
+ <method name="_getDroppableLink">
<parameter name="aEvent"/>
<body><![CDATA[
let links = browserDragAndDrop.dropLinks(aEvent);
-
// The URL bar automatically handles inputs with newline characters,
// so we can get away with treating text/x-moz-url flavours as text/plain.
if (links.length > 0 && links[0].url) {
- let url = links[0].url;
aEvent.preventDefault();
- this.value = url;
- SetPageProxyState("invalid");
- this.focus();
+ let url = links[0].url;
+ let strippedURL = stripUnsafeProtocolOnPaste(url);
+ if (strippedURL != url) {
+ aEvent.stopImmediatePropagation();
+ return null;
+ }
try {
urlSecurityCheck(url,
gBrowser.contentPrincipal,
Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
} catch (ex) {
- return;
+ return null;
}
+ return url;
+ }
+ return null;
+ ]]></body>
+ </method>
+
+ <method name="onDragOver">
+ <parameter name="aEvent"/>
+ <body><![CDATA[
+ // We don't need the link here, so we ignore the return value.
+ if (!this._getDroppableLink(aEvent)) {
+ aEvent.dataTransfer.dropEffect = "none";
+ }
+ ]]></body>
+ </method>
+
+ <method name="onDrop">
+ <parameter name="aEvent"/>
+ <body><![CDATA[
+ let url = this._getDroppableLink(aEvent);
+ if (url) {
+ this.value = url;
+ SetPageProxyState("invalid");
+ this.focus();
this.handleCommand();
// Force not showing the dropped URI immediately.
gBrowser.userTypedValue = null;
@@ -932,7 +948,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Unfortunately we're not allowed to set the bits being pasted
// so cancel this event:
aEvent.preventDefault();
- aEvent.stopPropagation();
+ aEvent.stopImmediatePropagation();
this.inputField.value = oldStart + pasteData + oldEnd;
// Fix up cursor/selection:
@@ -1198,9 +1214,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
this._clearNoActions();
this.formatValue();
}
+#ifdef MOZ_WEBEXTENSIONS
if (ExtensionSearchHandler.hasActiveInputSession()) {
ExtensionSearchHandler.handleInputCancelled();
}
+#endif
]]></handler>
<handler event="dragstart" phase="capturing"><![CDATA[
diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js
index 7da54e064..833369f4d 100644
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -258,6 +258,12 @@ function openLinkIn(url, where, params) {
}
if (!w || where == "window") {
+ // Strip referrer data when opening a new private window, to prevent
+ // regular browsing data from leaking into it.
+ if (aIsPrivate) {
+ aNoReferrer = true;
+ }
+
// This propagates to window.arguments.
var sa = Cc["@mozilla.org/array;1"].
createInstance(Ci.nsIMutableArray);
diff --git a/browser/base/content/win6BrowserOverlay.xul b/browser/base/content/win6BrowserOverlay.xul
deleted file mode 100644
index a69e3f6bd..000000000
--- a/browser/base/content/win6BrowserOverlay.xul
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- -*- Mode: HTML -*- -->
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<overlay id="win6-browser-overlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <toolbar id="toolbar-menubar"
- autohide="true"/>
-</overlay>