summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/base')
-rw-r--r--application/palemoon/base/content/browser.css8
-rw-r--r--application/palemoon/base/content/browser.js116
-rw-r--r--application/palemoon/base/content/browser.xul1
-rw-r--r--application/palemoon/base/content/pageinfo/pageInfo.js2
-rw-r--r--application/palemoon/base/content/sanitizeDialog.js4
-rw-r--r--application/palemoon/base/content/sync/aboutSyncTabs.js2
-rw-r--r--application/palemoon/base/content/sync/addDevice.js6
-rw-r--r--application/palemoon/base/content/sync/genericChange.js4
-rw-r--r--application/palemoon/base/content/sync/setup.js8
-rw-r--r--application/palemoon/base/content/tabbrowser.xml8
10 files changed, 87 insertions, 72 deletions
diff --git a/application/palemoon/base/content/browser.css b/application/palemoon/base/content/browser.css
index a2970aefc..76e49436c 100644
--- a/application/palemoon/base/content/browser.css
+++ b/application/palemoon/base/content/browser.css
@@ -43,8 +43,6 @@ tabbrowser {
.tabbrowser-tab:not([pinned]) {
-moz-box-flex: 100;
- max-width: 250px;
- min-width: 100px;
width: 0;
transition: min-width 175ms ease-out,
max-width 200ms ease-out,
@@ -67,6 +65,12 @@ tabbrowser {
display: none;
}
+.tabbrowser-tab[pinned] {
+ -moz-box-flex: 0;
+ min-width: 0 !important;
+ max-width: none !important;
+}
+
.tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
position: fixed !important;
display: block; /* position:fixed already does this (bug 579776), but let's be explicit */
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index c1643caa4..4bdac7850 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -420,7 +420,8 @@ var gPopupBlockerObserver = {
if (!this._reportButton && gURLBar)
this._reportButton = document.getElementById("page-report-button");
- if (!gBrowser.selectedBrowser.blockedPopups) {
+ if (!gBrowser.selectedBrowser.blockedPopups ||
+ !gBrowser.selectedBrowser.blockedPopups.length) {
// Hide the icon in the location bar (if the location bar exists)
if (gURLBar)
this._reportButton.hidden = true;
@@ -522,65 +523,66 @@ var gPopupBlockerObserver = {
else
blockedPopupAllowSite.removeAttribute("disabled");
- var foundUsablePopupURI = false;
- var blockedPopups = browser.blockedPopups;
- if (blockedPopups) {
- for (let i = 0; i < blockedPopups.length; i++) {
- let blockedPopup = blockedPopups[i];
-
- // popupWindowURI will be null if the file picker popup is blocked.
- // xxxdz this should make the option say "Show file picker" and do it (Bug 590306)
- if (!blockedPopup.popupWindowURI)
- continue;
- var popupURIspec = blockedPopup.popupWindowURI.spec;
-
- // Sometimes the popup URI that we get back from the blockedPopup
- // isn't useful (for instance, netscape.com's popup URI ends up
- // being "http://www.netscape.com", which isn't really the URI of
- // the popup they're trying to show). This isn't going to be
- // useful to the user, so we won't create a menu item for it.
- if (popupURIspec == "" || popupURIspec == "about:blank" ||
- popupURIspec == uri.spec)
- continue;
-
- // Because of the short-circuit above, we may end up in a situation
- // in which we don't have any usable popup addresses to show in
- // the menu, and therefore we shouldn't show the separator. However,
- // since we got past the short-circuit, we must've found at least
- // one usable popup URI and thus we'll turn on the separator later.
- foundUsablePopupURI = true;
-
- var menuitem = document.createElement("menuitem");
- var label = gNavigatorBundle.getFormattedString("popupShowPopupPrefix",
- [popupURIspec]);
- menuitem.setAttribute("label", label);
- menuitem.setAttribute("popupWindowURI", popupURIspec);
- menuitem.setAttribute("popupWindowFeatures", blockedPopup.popupWindowFeatures);
- menuitem.setAttribute("popupWindowName", blockedPopup.popupWindowName);
- menuitem.setAttribute("oncommand", "gPopupBlockerObserver.showBlockedPopup(event);");
- menuitem.setAttribute("popupReportIndex", i);
- menuitem.popupReportBrowser = browser;
- aEvent.target.appendChild(menuitem);
- }
- }
-
- // Show or hide the separator, depending on whether we added any
- // showable popup addresses to the menu.
- var blockedPopupsSeparator =
- document.getElementById("blockedPopupsSeparator");
- if (foundUsablePopupURI)
- blockedPopupsSeparator.removeAttribute("hidden");
- else
- blockedPopupsSeparator.setAttribute("hidden", true);
-
- var blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");
- var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
+ let blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");
+ let showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
blockedPopupDontShowMessage.setAttribute("checked", !showMessage);
if (aEvent.target.anchorNode.id == "page-report-button") {
aEvent.target.anchorNode.setAttribute("open", "true");
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromLocationbar"));
- } else
+ } else {
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromMessage"));
+ }
+
+ let blockedPopupsSeparator =
+ document.getElementById("blockedPopupsSeparator");
+ blockedPopupsSeparator.setAttribute("hidden", true);
+
+ gBrowser.selectedBrowser.retrieveListOfBlockedPopups().then(blockedPopups => {
+ let foundUsablePopupURI = false;
+ if (blockedPopups) {
+ for (let i = 0; i < blockedPopups.length; i++) {
+ let blockedPopup = blockedPopups[i];
+
+ // popupWindowURI will be null if the file picker popup is blocked.
+ // xxxdz this should make the option say "Show file picker" and do it (Bug 590306)
+ if (!blockedPopup.popupWindowURIspec)
+ continue;
+
+ var popupURIspec = blockedPopup.popupWindowURIspec;
+
+ // Sometimes the popup URI that we get back from the blockedPopup
+ // isn't useful (for instance, netscape.com's popup URI ends up
+ // being "http://www.netscape.com", which isn't really the URI of
+ // the popup they're trying to show). This isn't going to be
+ // useful to the user, so we won't create a menu item for it.
+ if (popupURIspec == "" || popupURIspec == "about:blank" ||
+ popupURIspec == "<self>" ||
+ popupURIspec == uri.spec)
+ continue;
+
+ // Because of the short-circuit above, we may end up in a situation
+ // in which we don't have any usable popup addresses to show in
+ // the menu, and therefore we shouldn't show the separator. However,
+ // since we got past the short-circuit, we must've found at least
+ // one usable popup URI and thus we'll turn on the separator later.
+ foundUsablePopupURI = true;
+
+ var menuitem = document.createElement("menuitem");
+ var label = gNavigatorBundle.getFormattedString("popupShowPopupPrefix",
+ [popupURIspec]);
+ menuitem.setAttribute("label", label);
+ menuitem.setAttribute("oncommand", "gPopupBlockerObserver.showBlockedPopup(event);");
+ menuitem.setAttribute("popupReportIndex", i);
+ menuitem.popupReportBrowser = browser;
+ aEvent.target.appendChild(menuitem);
+ }
+ }
+
+ // Show the separator if we added any
+ // showable popup addresses to the menu.
+ if (foundUsablePopupURI)
+ blockedPopupsSeparator.removeAttribute("hidden");
+ }, null);
},
onPopupHiding: function (aEvent) {
@@ -3096,6 +3098,8 @@ const BrowserSearch = {
},
};
+XPCOMUtils.defineConstant(this, "BrowserSearch", BrowserSearch);
+
function FillHistoryMenu(aParent) {
// Lazily add the hover listeners on first showing and never remove them
if (!aParent.hasStatusListener) {
@@ -6768,7 +6772,7 @@ function getTabModalPromptBox(aWindow) {
function getBrowser() gBrowser;
function getNavToolbox() gNavToolbox;
-let gPrivateBrowsingUI = {
+var gPrivateBrowsingUI = {
init: function PBUI_init() {
// Do nothing for normal windows
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul
index f9030056e..254e2eee0 100644
--- a/application/palemoon/base/content/browser.xul
+++ b/application/palemoon/base/content/browser.xul
@@ -452,7 +452,6 @@
<image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
- <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="alert-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
diff --git a/application/palemoon/base/content/pageinfo/pageInfo.js b/application/palemoon/base/content/pageinfo/pageInfo.js
index 6b02bc370..600174ad9 100644
--- a/application/palemoon/base/content/pageinfo/pageInfo.js
+++ b/application/palemoon/base/content/pageinfo/pageInfo.js
@@ -2,7 +2,7 @@
* 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/. */
-const Cu = Components.utils;
+var Cu = Components.utils;
Cu.import("resource://gre/modules/LoadContextInfo.jsm");
Cu.import("resource://gre/modules/Services.jsm");
diff --git a/application/palemoon/base/content/sanitizeDialog.js b/application/palemoon/base/content/sanitizeDialog.js
index 18df5e4a4..786113288 100644
--- a/application/palemoon/base/content/sanitizeDialog.js
+++ b/application/palemoon/base/content/sanitizeDialog.js
@@ -3,8 +3,8 @@
* 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/. */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
var gSanitizePromptDialog = {
diff --git a/application/palemoon/base/content/sync/aboutSyncTabs.js b/application/palemoon/base/content/sync/aboutSyncTabs.js
index bc624a459..410494b5b 100644
--- a/application/palemoon/base/content/sync/aboutSyncTabs.js
+++ b/application/palemoon/base/content/sync/aboutSyncTabs.js
@@ -2,7 +2,7 @@
* 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/. */
-const Cu = Components.utils;
+var Cu = Components.utils;
Cu.import("resource://services-common/utils.js");
Cu.import("resource://services-sync/main.js");
diff --git a/application/palemoon/base/content/sync/addDevice.js b/application/palemoon/base/content/sync/addDevice.js
index 40862a791..0390d4397 100644
--- a/application/palemoon/base/content/sync/addDevice.js
+++ b/application/palemoon/base/content/sync/addDevice.js
@@ -2,9 +2,9 @@
* 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/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cu = Components.utils;
Cu.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
diff --git a/application/palemoon/base/content/sync/genericChange.js b/application/palemoon/base/content/sync/genericChange.js
index 0c6dc145e..df6639178 100644
--- a/application/palemoon/base/content/sync/genericChange.js
+++ b/application/palemoon/base/content/sync/genericChange.js
@@ -2,8 +2,8 @@
* 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/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");
diff --git a/application/palemoon/base/content/sync/setup.js b/application/palemoon/base/content/sync/setup.js
index 99faa038e..e8d67a5f6 100644
--- a/application/palemoon/base/content/sync/setup.js
+++ b/application/palemoon/base/content/sync/setup.js
@@ -2,10 +2,10 @@
* 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/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cr = Components.results;
+var Cu = Components.utils;
// page consts
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index 1b8099785..10f109ce8 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -1445,6 +1445,9 @@
t.setAttribute("label", aURI);
t.setAttribute("crop", "end");
+ t.style.maxWidth = this.tabContainer.mTabMaxWidth + "px";
+ t.style.minWidth = this.tabContainer.mTabMinWidth + "px";
+ t.width = 0;
t.setAttribute("validate", "never"); //PMed
t.setAttribute("onerror", "this.removeAttribute('image');");
t.className = "tabbrowser-tab";
@@ -3410,6 +3413,8 @@
<implementation implements="nsIDOMEventListener">
<constructor>
<![CDATA[
+ this.mTabMinWidth = Services.prefs.getIntPref("browser.tabs.tabMinWidth");
+ this.mTabMaxWidth = Services.prefs.getIntPref("browser.tabs.tabMaxWidth");
this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
this.mCloseButtons = Services.prefs.getIntPref("browser.tabs.closeButtons");
this._closeWindowWithLastTab = Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
@@ -3417,6 +3422,9 @@
var tab = this.firstChild;
tab.setAttribute("label",
this.tabbrowser.mStringBundle.getString("tabs.emptyTabTitle"));
+ tab.style.minWidth = this.mTabMinWidth + "px";
+ tab.style.maxWidth = this.mTabMaxWidth + "px";
+ tab.width = 0;
tab.setAttribute("crop", "end");
tab.setAttribute("onerror", "this.removeAttribute('image');");
this.adjustTabstrip();