summaryrefslogtreecommitdiffstats
path: root/application/palemoon
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon')
-rw-r--r--application/palemoon/base/content/newtab/grid.js147
-rw-r--r--application/palemoon/base/content/newtab/newTab.css58
-rw-r--r--application/palemoon/base/content/newtab/newTab.xhtml1
-rw-r--r--application/palemoon/base/content/newtab/page.js9
-rw-r--r--application/palemoon/base/content/palemoon.xhtml66
-rw-r--r--application/palemoon/base/content/sanitize.js2
-rw-r--r--application/palemoon/base/content/utilityOverlay.js4
-rw-r--r--application/palemoon/base/jar.mn1
-rw-r--r--application/palemoon/components/about/AboutRedirector.cpp2
-rw-r--r--application/palemoon/config/version.txt2
-rw-r--r--application/palemoon/locales/Makefile.in3
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/palemoon.dtd14
-rw-r--r--application/palemoon/locales/en-US/chrome/overrides/netError.dtd10
-rw-r--r--application/palemoon/locales/jar.mn1
-rw-r--r--application/palemoon/modules/moz.build3
-rw-r--r--application/palemoon/modules/promise.js118
-rw-r--r--application/palemoon/themes/linux/browser.css6
-rw-r--r--application/palemoon/themes/osx/browser.css6
-rw-r--r--application/palemoon/themes/shared/newtab/newTab.css.inc2
-rw-r--r--application/palemoon/themes/windows/browser.css25
20 files changed, 199 insertions, 281 deletions
diff --git a/application/palemoon/base/content/newtab/grid.js b/application/palemoon/base/content/newtab/grid.js
index be5a57c4b..db3d319c3 100644
--- a/application/palemoon/base/content/newtab/grid.js
+++ b/application/palemoon/base/content/newtab/grid.js
@@ -5,12 +5,6 @@
#endif
/**
- * Define various fixed dimensions
- */
-const GRID_BOTTOM_EXTRA = 7; // title's line-height extends 7px past the margin
-const GRID_WIDTH_EXTRA = 1; // provide 1px buffer to allow for rounding error
-
-/**
* This singleton represents the grid that contains all sites.
*/
var gGrid = {
@@ -35,7 +29,14 @@ var gGrid = {
/**
* All sites contained in the grid's cells. Sites may be empty.
*/
- get sites() { return [for (cell of this.cells) cell.site]; },
+ get sites() {
+ // return [for (cell of this.cells) cell.site];
+ let aSites = [];
+ for (let cell of this.cells) {
+ aSites.push(cell.site);
+ }
+ return aSites;
+ },
// Tells whether the grid has already been initialized.
get ready() { return !!this._ready; },
@@ -55,20 +56,7 @@ var gGrid = {
gLinks.populateCache(() => {
this._refreshGrid();
this._ready = true;
-
- // If fetching links took longer than loading the page itself then
- // we need to resize the grid as that was blocked until now.
- // We also want to resize now if the page was already loaded when
- // initializing the grid (the user toggled the page).
- this._resizeGrid();
-
- addEventListener("resize", this);
});
-
- // Resize the grid as soon as the page loads.
- if (!this.isDocumentLoaded) {
- addEventListener("load", this);
- }
},
/**
@@ -87,12 +75,7 @@ var gGrid = {
* Handles all grid events.
*/
handleEvent: function Grid_handleEvent(aEvent) {
- switch (aEvent.type) {
- case "load":
- case "resize":
- this._resizeGrid();
- break;
- }
+ // Any specific events should go here.
},
/**
@@ -110,31 +93,37 @@ var gGrid = {
},
/**
- * Renders and resizes the gird. _resizeGrid() call is needed to ensure
- * that scrollbar disappears when the bottom row becomes empty following
- * the block action, or tile display is turmed off via cog menu
+ * Renders the grid.
*/
-
refresh() {
this._refreshGrid();
- this._resizeGrid();
},
/**
* Renders the grid, including cells and sites.
*/
_refreshGrid() {
+ let row = document.createElementNS(HTML_NAMESPACE, "div");
+ row.classList.add("newtab-row");
let cell = document.createElementNS(HTML_NAMESPACE, "div");
cell.classList.add("newtab-cell");
- // Creates all the cells up to the maximum
- let fragment = document.createDocumentFragment();
- for (let i = 0; i < gGridPrefs.gridColumns * gGridPrefs.gridRows; i++) {
- fragment.appendChild(cell.cloneNode(true));
+ // Clear the grid
+ this._node.innerHTML = "";
+
+ // Creates the structure of one row
+ for (let i = 0; i < gGridPrefs.gridColumns; i++) {
+ row.appendChild(cell.cloneNode(true));
}
- // Create cells.
- let cells = Array.from(fragment.childNodes, (cell) => new Cell(this, cell));
+ // Creates the grid
+ for (let j = 0; j < gGridPrefs.gridRows; j++) {
+ this._node.appendChild(row.cloneNode(true));
+ }
+
+ // Create cell array.
+ let cellElements = this.node.querySelectorAll(".newtab-cell");
+ let cells = Array.from(cellElements, (cell) => new Cell(this, cell));
// Fetch links.
let links = gLinks.getLinks();
@@ -152,20 +141,6 @@ var gGrid = {
}
this._cells = cells;
- while (this._gridDefaultContent.nextSibling) {
- this._gridDefaultContent.nextSibling.remove();
- }
- this._node.appendChild(fragment);
- },
-
- /**
- * Calculate the height for a number of rows up to the maximum rows
- * @param rows Number of rows defaulting to the max
- */
- _computeHeight: function Grid_computeHeight(aRows) {
- let {gridRows} = gGridPrefs;
- aRows = aRows === undefined ? gridRows : Math.min(gridRows, aRows);
- return aRows * this._cellHeight + GRID_BOTTOM_EXTRA;
},
/**
@@ -199,74 +174,6 @@ var gGrid = {
_isHistoricalTile: function Grid_isHistoricalTile(aPos) {
let site = this.sites[aPos];
return site && (site.isPinned() || site.link && site.link.type == "history");
- },
-
- /**
- * Make sure the correct number of rows and columns are visible
- */
- _resizeGrid: function Grid_resizeGrid() {
- // If we're somehow called before the page has finished loading,
- // let's bail out to avoid caching zero heights and widths.
- // We'll be called again when DOMContentLoaded fires.
- // Same goes for the grid if that's not ready yet.
- if (!this.isDocumentLoaded || !this._ready) {
- return;
- }
-
- // Save the cell's computed height/width including margin and border
- if (this._cellHeight === undefined) {
- let refCell = document.querySelector(".newtab-cell");
- let style = getComputedStyle(refCell);
- this._cellHeight = refCell.offsetHeight +
- parseFloat(style.marginTop) + parseFloat(style.marginBottom);
- this._cellWidth = refCell.offsetWidth +
- parseFloat(style.marginLeft) + parseFloat(style.marginRight);
- }
-
- let searchContainer = document.querySelector("#searchContainer");
- // Save search-container margin height
- if (this._searchContainerMargin === undefined) {
- let style = getComputedStyle(searchContainer);
- this._searchContainerMargin = parseFloat(style.marginBottom) +
- parseFloat(style.marginTop);
- }
-
- // Find the number of rows we can place into view port
- let availHeight = document.documentElement.clientHeight -
- searchContainer.offsetHeight - this._searchContainerMargin;
- let visibleRows = Math.floor(availHeight / this._cellHeight);
-
- // Find the number of columns that fit into view port
- let maxGridWidth = gGridPrefs.gridColumns * this._cellWidth + GRID_WIDTH_EXTRA;
- // available width is current grid width, but no greater than maxGridWidth
- let availWidth = Math.min(document.querySelector("#newtab-grid").clientWidth,
- maxGridWidth);
- // finally get the number of columns we can fit into view port
- let gridColumns = Math.floor(availWidth / this._cellWidth);
- // walk sites backwords until a pinned or history tile is found or visibleRows reached
- let tileIndex = Math.min(gGridPrefs.gridRows * gridColumns, this.sites.length) - 1;
- while (tileIndex >= visibleRows * gridColumns) {
- if (this._isHistoricalTile(tileIndex)) {
- break;
- }
- tileIndex--;
- }
-
- // Compute the actual number of grid rows we will display (potentially
- // with a scroll bar). tileIndex now points to a historical tile with
- // heighest index or to the last index of the visible row, if none found
- // Dividing tileIndex by number of tiles in a column gives the rows
- let gridRows = Math.floor(tileIndex / gridColumns) + 1;
-
- // we need to set grid width, for otherwise the scrollbar may shrink
- // the grid when shown and cause grid layout to be different from
- // what being computed above. This, in turn, may cause scrollbar shown
- // for directory tiles, and introduce jitter when grid width is aligned
- // exactly on the column boundary
- this._node.style.width = gridColumns * this._cellWidth + "px";
- this._node.style.maxWidth = gGridPrefs.gridColumns * this._cellWidth +
- GRID_WIDTH_EXTRA + "px";
- this._node.style.height = this._computeHeight() + "px";
- this._node.style.maxHeight = this._computeHeight(gridRows) + "px";
}
+
};
diff --git a/application/palemoon/base/content/newtab/newTab.css b/application/palemoon/base/content/newtab/newTab.css
index a5431cf65..fe745d2fd 100644
--- a/application/palemoon/base/content/newtab/newTab.css
+++ b/application/palemoon/base/content/newtab/newTab.css
@@ -42,6 +42,18 @@ input[type=button] {
pointer-events: none;
}
+/* TOGGLE */
+#newtab-toggle {
+ position: absolute;
+ top: 12px;
+ right: 12px;
+}
+
+#newtab-toggle:-moz-locale-dir(rtl) {
+ left: 12px;
+ right: auto;
+}
+
/* MARGINS */
#newtab-vertical-margin {
display: -moz-box;
@@ -69,33 +81,38 @@ input[type=button] {
#newtab-horizontal-margin {
display: -moz-box;
- -moz-box-flex: 1;
-}
-
-#newtab-margin-top,
-#newtab-margin-bottom {
- display: -moz-box;
- position: relative;
+ -moz-box-flex: 5;
}
#newtab-margin-top {
+ min-height: 10px;
+ max-height: 30px;
+ display: -moz-box;
-moz-box-flex: 1;
+ -moz-box-align: center;
+ -moz-box-pack: center;
}
#newtab-margin-bottom {
- -moz-box-flex: 2;
+ min-height: 40px;
+ max-height: 80px;
+ -moz-box-flex: 1;
}
.newtab-side-margin {
- min-width: 10px;
+ min-width: 40px;
+ max-width: 300px;
-moz-box-flex: 1;
}
/* GRID */
#newtab-grid {
+ display: -moz-box;
-moz-box-flex: 5;
- overflow: hidden;
- transition: 300ms ease-out;
+ -moz-box-orient: vertical;
+ min-width: 600px;
+ min-height: 400px;
+ transition: 175ms ease-out;
transition-property: opacity;
}
@@ -108,25 +125,30 @@ input[type=button] {
pointer-events: none;
}
+/* ROWS */
+.newtab-row {
+ display: -moz-box;
+ -moz-box-orient: horizontal;
+ -moz-box-direction: normal;
+ -moz-box-flex: 1;
+}
+
/*
- * If you change the sizes here, make sure you
- * change the preferences:
+ * Thumbnail image sizes are determined in the preferences:
* toolkit.pageThumbs.minWidth
* toolkit.pageThumbs.minHeight
*/
/* CELLS */
.newtab-cell {
display: -moz-box;
- height: 180px;
- margin: 15px 10px 30px;
- width: 250px;
+ -moz-box-flex: 1;
}
/* SITES */
.newtab-site {
position: relative;
-moz-box-flex: 1;
- transition: 200ms ease-out;
+ transition: 150ms ease-out;
transition-property: top, left, opacity;
}
@@ -211,7 +233,7 @@ input[type=button] {
display: -moz-box;
position: relative;
-moz-box-pack: center;
- margin: 40px 0 15px;
+ margin: 10px 0 15px;
}
#searchContainer[page-disabled] {
diff --git a/application/palemoon/base/content/newtab/newTab.xhtml b/application/palemoon/base/content/newtab/newTab.xhtml
index eac62c987..de000e723 100644
--- a/application/palemoon/base/content/newtab/newTab.xhtml
+++ b/application/palemoon/base/content/newtab/newTab.xhtml
@@ -54,6 +54,7 @@
</div>
<div id="newtab-margin-bottom"/>
+ <input id="newtab-toggle" type="button"/>
</div>
</body>
<script type="text/javascript;version=1.8" src="chrome://browser/content/newtab/newTab.js"/>
diff --git a/application/palemoon/base/content/newtab/page.js b/application/palemoon/base/content/newtab/page.js
index cbd6750b6..7117d4527 100644
--- a/application/palemoon/base/content/newtab/page.js
+++ b/application/palemoon/base/content/newtab/page.js
@@ -21,6 +21,10 @@ var gPage = {
// Listen for 'unload' to unregister this page.
addEventListener("unload", this, false);
+
+ // Listen for toggle button clicks.
+ let button = document.getElementById("newtab-toggle");
+ button.addEventListener("click", e => this.toggleEnabled(e));
// XXX bug 991111 - Not all click events are correctly triggered when
// listening from xhtml nodes -- in particular middle clicks on sites, so
@@ -277,6 +281,11 @@ var gPage = {
}
},
+ toggleEnabled: function(aEvent) {
+ gAllPages.enabled = !gAllPages.enabled;
+ event.stopPropagation();
+ },
+
maybeShowAutoMigrationUndoNotification() {
// sendAsyncMessage("NewTab:MaybeShowAutoMigrationUndoNotification");
},
diff --git a/application/palemoon/base/content/palemoon.xhtml b/application/palemoon/base/content/palemoon.xhtml
new file mode 100644
index 000000000..96757052c
--- /dev/null
+++ b/application/palemoon/base/content/palemoon.xhtml
@@ -0,0 +1,66 @@
+<!DOCTYPE html
+[
+ <!ENTITY % mozillaDTD SYSTEM "chrome://browser/locale/palemoon.dtd" >
+ %mozillaDTD;
+ <!ENTITY % directionDTD SYSTEM "chrome://global/locale/global.dtd" >
+ %directionDTD;
+]>
+
+<!-- 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/. -->
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset='utf-8' />
+ <title>&chronicles.title.55.2;</title>
+
+<style type="text/css">
+html {
+ background: #333399 radial-gradient( circle at 75% 25%, #6666b0 0%, #333399 40%, #111177 80%) center center / cover no-repeat;
+ color: white;
+ font-style: italic;
+ text-rendering: optimizeLegibility;
+ min-height: 100%;
+}
+
+#moztext {
+ margin-top: 15%;
+ font-size: 1.1em;
+ font-family: serif;
+ text-align: center;
+ line-height: 1.5;
+}
+
+#from {
+ font-size: 1.95em;
+ font-family: serif;
+ text-align: right;
+}
+
+em {
+ font-size: 1.3em;
+ line-height: 0;
+}
+
+a {
+ text-decoration: none;
+ color: white;
+}
+</style>
+</head>
+
+<body dir="&locale.dir;">
+
+<section>
+ <p id="moztext">
+ &chronicles.quote.55.2;
+ </p>
+
+ <p id="from">
+ &chronicles.from.55.2;
+ </p>
+</section>
+
+</body>
+</html>
diff --git a/application/palemoon/base/content/sanitize.js b/application/palemoon/base/content/sanitize.js
index 74372a4af..0c85fa215 100644
--- a/application/palemoon/base/content/sanitize.js
+++ b/application/palemoon/base/content/sanitize.js
@@ -11,7 +11,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
"resource://gre/modules/Downloads.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource:///modules/promise.js");
+ "resource://gre/modules/Promise.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js
index c45297e0b..63488e209 100644
--- a/application/palemoon/base/content/utilityOverlay.js
+++ b/application/palemoon/base/content/utilityOverlay.js
@@ -250,6 +250,10 @@ function openLinkIn(url, where, params) {
aRelatedToCurrent = false;
}
+ // We can only do this after we're sure of what |w| will be the rest of this function.
+ // Note that if |w| is null we might have no current browser (we'll open a new window).
+ var aCurrentBrowser = params.currentBrowser || (w && w.gBrowser.selectedBrowser);
+
if (!w || where == "window") {
// This propagates to window.arguments.
// Strip referrer data when opening a new private window, to prevent
diff --git a/application/palemoon/base/jar.mn b/application/palemoon/base/jar.mn
index 246cf9017..d8c3f4b21 100644
--- a/application/palemoon/base/jar.mn
+++ b/application/palemoon/base/jar.mn
@@ -69,6 +69,7 @@ browser.jar:
content/browser/padlock_classic_https.png (content/padlock_classic_https.png)
content/browser/padlock_classic_low.png (content/padlock_classic_low.png)
content/browser/padlock_classic_broken.png (content/padlock_classic_broken.png)
+ content/browser/palemoon.xhtml (content/palemoon.xhtml)
content/browser/newtab/newTab.xhtml (content/newtab/newTab.xhtml)
* content/browser/newtab/newTab.js (content/newtab/newTab.js)
content/browser/newtab/newTab.css (content/newtab/newTab.css)
diff --git a/application/palemoon/components/about/AboutRedirector.cpp b/application/palemoon/components/about/AboutRedirector.cpp
index 7e4c634f7..508202c7d 100644
--- a/application/palemoon/components/about/AboutRedirector.cpp
+++ b/application/palemoon/components/about/AboutRedirector.cpp
@@ -57,7 +57,7 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::ALLOW_SCRIPT
},
{
- "palemoon", "chrome://global/content/memoriam.xhtml",
+ "palemoon", "chrome://browser/content/palemoon.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::HIDE_FROM_ABOUTABOUT
},
diff --git a/application/palemoon/config/version.txt b/application/palemoon/config/version.txt
index 87265bad0..d292f6343 100644
--- a/application/palemoon/config/version.txt
+++ b/application/palemoon/config/version.txt
@@ -1 +1 @@
-28.0.0b1 \ No newline at end of file
+28.0.0b2 \ No newline at end of file
diff --git a/application/palemoon/locales/Makefile.in b/application/palemoon/locales/Makefile.in
index 5720a76df..c81329a9a 100644
--- a/application/palemoon/locales/Makefile.in
+++ b/application/palemoon/locales/Makefile.in
@@ -124,6 +124,9 @@ libs-%:
@$(MAKE) -C ../../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C ../../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C ../../../intl/locales AB_CD=$* XPI_NAME=locale-$*
+ifdef MOZ_DEVTOOLS
+ @$(MAKE) -C ../../../devtools/client/locales AB_CD=$* XPI_NAME=locale-$*
+endif
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
diff --git a/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd b/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd
new file mode 100644
index 000000000..038d8eb75
--- /dev/null
+++ b/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd
@@ -0,0 +1,14 @@
+<!-- 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/. -->
+
+<!ENTITY chronicles.title.55.2
+'The Chronicles of the Pale Moon, 55:2'>
+
+<!ENTITY chronicles.quote.55.2
+'And so, our focus was drawn through time and space to the <em>emerging dragon</em> who would not abandon hope.<br/>
+Its resilience, stubbornness and spirit unbroken, and searching for long hours to find those willing to <em>join</em> its cause.<br/>
+The old nest abandoned, the death throes of the Beast ignored, and more determined than ever to find glory in the future.'>
+
+<!ENTITY chronicles.from.55.2
+'from <strong>The Chronicles of the Pale Moon,</strong> 55:2'>
diff --git a/application/palemoon/locales/en-US/chrome/overrides/netError.dtd b/application/palemoon/locales/en-US/chrome/overrides/netError.dtd
index c97bd1b59..04bfe9925 100644
--- a/application/palemoon/locales/en-US/chrome/overrides/netError.dtd
+++ b/application/palemoon/locales/en-US/chrome/overrides/netError.dtd
@@ -226,16 +226,6 @@ functionality specific to firefox. -->
<button id='exceptionDialogButton'>&securityOverride.exceptionButtonLabel;</button>
">
-<!ENTITY errorReporting.title "Report this error">
-<!ENTITY errorReporting.longDesc "Reporting the address and certificate information for <span id='hostname'></span> will help us identify and block malicious sites. Thanks for helping create a safer web!">
-<!ENTITY errorReporting.automatic "Automatically report errors in the future">
-<!ENTITY errorReporting.automatic2 "Report errors like this to help Mozilla identify and block malicious sites">
-<!ENTITY errorReporting.learnMore "Learn moreā€¦">
-<!ENTITY errorReporting.sending "Sending report">
-<!ENTITY errorReporting.sent "Report sent">
-<!ENTITY errorReporting.report "Report">
-<!ENTITY errorReporting.tryAgain "Try again">
-
<!ENTITY remoteXUL.title "Remote XUL">
<!ENTITY remoteXUL.longDesc "<p><ul><li>Please contact the website owners to inform them of this problem.</li></ul></p>">
diff --git a/application/palemoon/locales/jar.mn b/application/palemoon/locales/jar.mn
index 046cb0ac7..8d88e16fd 100644
--- a/application/palemoon/locales/jar.mn
+++ b/application/palemoon/locales/jar.mn
@@ -28,6 +28,7 @@
locale/browser/openLocation.properties (%chrome/browser/openLocation.properties)
locale/browser/pageInfo.dtd (%chrome/browser/pageInfo.dtd)
locale/browser/pageInfo.properties (%chrome/browser/pageInfo.properties)
+ locale/browser/palemoon.dtd (%chrome/browser/palemoon.dtd)
locale/browser/quitDialog.properties (%chrome/browser/quitDialog.properties)
locale/browser/safeMode.dtd (%chrome/browser/safeMode.dtd)
locale/browser/sanitize.dtd (%chrome/browser/sanitize.dtd)
diff --git a/application/palemoon/modules/moz.build b/application/palemoon/modules/moz.build
index 67fd22338..8032930b2 100644
--- a/application/palemoon/modules/moz.build
+++ b/application/palemoon/modules/moz.build
@@ -5,9 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# XXX: Include this until we convert browser/ to use toolkit promises directly
-EXTRA_JS_MODULES += [ 'promise.js' ]
-
EXTRA_JS_MODULES += [
'AutoCompletePopup.jsm',
'BrowserNewTabPreloader.jsm',
diff --git a/application/palemoon/modules/promise.js b/application/palemoon/modules/promise.js
deleted file mode 100644
index 74065c8db..000000000
--- a/application/palemoon/modules/promise.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/* 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/.
- */
-
-'use strict';
-
-/*
- * Uses `Promise.jsm` as a core implementation, with additional sugar
- * from previous implementation, with inspiration from `Q` and `when`
- *
- * https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm
- * https://github.com/cujojs/when
- * https://github.com/kriskowal/q
- */
-const PROMISE_URI = 'resource://gre/modules/Promise.jsm';
-
-getEnvironment.call(this, function ({ require, exports, module, Cu }) {
-
-const Promise = Cu.import(PROMISE_URI, {}).Promise;
-const { Debugging, defer, resolve, all, reject, race } = Promise;
-
-module.metadata = {
- 'stability': 'unstable'
-};
-
-var promised = (function() {
- // Note: Define shortcuts and utility functions here in order to avoid
- // slower property accesses and unnecessary closure creations on each
- // call of this popular function.
-
- var call = Function.call;
- var concat = Array.prototype.concat;
-
- // Utility function that does following:
- // execute([ f, self, args...]) => f.apply(self, args)
- function execute (args) call.apply(call, args)
-
- // Utility function that takes promise of `a` array and maybe promise `b`
- // as arguments and returns promise for `a.concat(b)`.
- function promisedConcat(promises, unknown) {
- return promises.then(function (values) {
- return resolve(unknown)
- .then(function (value) values.concat([value]));
- });
- }
-
- return function promised(f, prototype) {
- /**
- Returns a wrapped `f`, which when called returns a promise that resolves to
- `f(...)` passing all the given arguments to it, which by the way may be
- promises. Optionally second `prototype` argument may be provided to be used
- a prototype for a returned promise.
-
- ## Example
-
- var promise = promised(Array)(1, promise(2), promise(3))
- promise.then(console.log) // => [ 1, 2, 3 ]
- **/
-
- return function promised(...args) {
- // create array of [ f, this, args... ]
- return [f, this, ...args].
- // reduce it via `promisedConcat` to get promised array of fulfillments
- reduce(promisedConcat, resolve([], prototype)).
- // finally map that to promise of `f.apply(this, args...)`
- then(execute);
- };
- };
-})();
-
-exports.promised = promised;
-exports.all = all;
-exports.defer = defer;
-exports.resolve = resolve;
-exports.reject = reject;
-exports.race = race;
-exports.Promise = Promise;
-exports.Debugging = Debugging;
-});
-
-function getEnvironment (callback) {
- let Cu, _exports, _module, _require;
-
- // CommonJS / SDK
- if (typeof(require) === 'function') {
- Cu = require('chrome').Cu;
- _exports = exports;
- _module = module;
- _require = require;
- }
- // JSM
- else if (String(this).indexOf('BackstagePass') >= 0) {
- Cu = this['Components'].utils;
- _exports = this.Promise = {};
- _module = { uri: __URI__, id: 'promise/core' };
- _require = uri => {
- let imports = {};
- Cu.import(uri, imports);
- return imports;
- };
- this.EXPORTED_SYMBOLS = ['Promise'];
- // mozIJSSubScriptLoader.loadSubscript
- } else if (~String(this).indexOf('Sandbox')) {
- Cu = this['Components'].utils;
- _exports = this;
- _module = { id: 'promise/core' };
- _require = uri => {};
- }
-
- callback({
- Cu: Cu,
- exports: _exports,
- module: _module,
- require: _require
- });
-}
-
diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css
index 9a08ea4d8..7d353685d 100644
--- a/application/palemoon/themes/linux/browser.css
+++ b/application/palemoon/themes/linux/browser.css
@@ -1571,6 +1571,12 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
background-color: Window;
}
+.browserContainer > findbar {
+ background-color: -moz-dialog;
+ color: -moz-DialogText;
+ text-shadow: none;
+}
+
/* Throbber */
#navigator-throbber {
width: 16px;
diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css
index 485ed9115..a8e86ff5c 100644
--- a/application/palemoon/themes/osx/browser.css
+++ b/application/palemoon/themes/osx/browser.css
@@ -1348,6 +1348,12 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url-
-moz-padding-start: 0px;
}
+.browserContainer > findbar {
+ background-color: -moz-dialog;
+ color: -moz-DialogText;
+ text-shadow: none;
+}
+
/* ::::: throbber ::::: */
#navigator-throbber {
diff --git a/application/palemoon/themes/shared/newtab/newTab.css.inc b/application/palemoon/themes/shared/newtab/newTab.css.inc
index 4ffd32d50..3341ba7e5 100644
--- a/application/palemoon/themes/shared/newtab/newTab.css.inc
+++ b/application/palemoon/themes/shared/newtab/newTab.css.inc
@@ -105,7 +105,7 @@ body {
.newtab-site:hover,
.newtab-site[dragged] {
- box-shadow: 0 3px 10px rgba(8,20,37,.6);
+ box-shadow: 0 3px 6px 1px rgba(8,20,37,.6);
}
.newtab-site[dragged] {
diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css
index 099382a5a..5c044fdd4 100644
--- a/application/palemoon/themes/windows/browser.css
+++ b/application/palemoon/themes/windows/browser.css
@@ -1788,6 +1788,12 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
-moz-padding-start: 0px;
}
+.browserContainer > findbar {
+ background-color: -moz-dialog;
+ color: -moz-DialogText;
+ text-shadow: none;
+}
+
/* ::::: throbber ::::: */
#navigator-throbber {
@@ -3416,7 +3422,13 @@ toolbar[brighttext] #addonbar-closebutton {
border-radius: var(--toolbarbutton-border-radius);
color: black;
}
-
+
+ :-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
+ :-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme),
+ #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
+ #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme) {
+ list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png");
+ }
}
/* ==== Windows 8/10 (flat color) styling ==== */
@@ -3454,6 +3466,10 @@ toolbar[brighttext] #addonbar-closebutton {
border-right-style: none !important;
}
+ #main-menubar > menu:not(:-moz-lwtheme) {
+ color: inherit;
+ }
+
:-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
:-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme),
#TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#new-tab-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
@@ -3462,13 +3478,6 @@ toolbar[brighttext] #addonbar-closebutton {
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme) {
list-style-image: var(--toolbarbutton-glass-image);
}
-
- :-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
- :-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme),
- #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
- #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme) {
- list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png");
- }
/* Show toolbar borders on vista through win8, but not on win10 and later: */
@media (-moz-os-version: windows-vista),