diff --git a/.gitignore b/.gitignore index c4fd25d6e4..24f0e5b3e1 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,8 @@ ID /machrc /.machrc +obj-x86_64-pc-mingw32/ + # Empty marker file that's generated when we check out NSS security/manager/.nss.checkout diff --git a/README.md b/README.md index 28a6d4d965..1cbee3cd1f 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,12 @@ -# Repo for Eclipse Lun3r and Eclipse Hydra +# Dactyloidae web browser -Eclipse Lun3r is a fork of Pale Moon made for Windows XP. Some advantages over upstream and roytam1's New Moon are more optimzations and better interoperability with upstream. (using SQL storage intead of DBM) +Dactyloidae is a fork of Eclipse Lun3r (fork of Pale Moon made for Windows XP). -![big1](https://github.com/user-attachments/assets/e49f28fa-824f-4482-8ee7-e2785bf086eb) - -Eclipse Hydra is a fork of Basilisk made for Windows XP. Some advantages over upstream and roytam1's Serpent are more optimzations and better interoperability with upstream. (using SQL storage intead of DBM) - -![big1](https://github.com/user-attachments/assets/0bd7d7df-0d9a-46b3-9273-2ba7cae5fbdb) - -# Original repository readme +Some advantages over upstream, roytam1's New Moon and Lun3r are: +- More optimzations +- Better interoperability with upstream. (using SQL storage intead of DBM) +- More modern theme +- Better e10s support -# Unified XUL Platform (UXP) -This repository holds the code for a unified application platform for XUL-based -applications. It is a hard fork from the Mozilla code repository (mozilla-central) -with an ESR-52 fork point. - -In addition to further development based on the Mozilla upstream code, and -selective cherry-picking of directly-applicable patches, this repository has its -own development and holds the base for a maintained platform to be used by XUL -applications. - -For a list of active projects making use of the Unified XUL Platform, checkout http://thereisonlyxul.org/. - -## Additional documentation - -Additional documentation relevant to this source code can be found in the `/docs` -directory. This will contain relevant documentation regarding contributing, -using and distributing this code and its binaries. - -If you are interested in the development and building side of things, some -information will be available on the [Pale Moon developer site](http://developer.palemoon.org). -You are also always welcome to get in touch with our community on the [Pale Moon forum](https://forum.palemoon.org/). - -### A note about trademarks and branding - -Although this repository is licensed under Mozilla Public License v2.0, the -trademarks and brands contained herein remain the property of their respective -owners. For more details, please see the notifications in the respective directories. - -### Foundation and maintainership - -This repository has been founded by Moonchild (M.C. Straver) and is maintained by him -and other community members. -If you fork this repository to perform your own work on it, please consider offering -improvement patches upstream to its origin to mutually improve the platform and build -a future for XUL. diff --git a/application/basilisk/app/application.ini b/application/basilisk/app/application.ini index 917cb155fa..7e9ba224fc 100644 --- a/application/basilisk/app/application.ini +++ b/application/basilisk/app/application.ini @@ -25,7 +25,7 @@ RemotingName=@MOZ_APP_REMOTINGNAME@ #ifdef MOZ_APP_DISPLAYNAME CodeName=@MOZ_APP_DISPLAYNAME@ #endif -Version=@MOZ_APP_VERSION@ +Version=52.10.0 #ifdef MOZ_APP_PROFILE Profile=@MOZ_APP_PROFILE@ #endif diff --git a/application/basilisk/base/content/aboutDialog.xul b/application/basilisk/base/content/aboutDialog.xul index e55f3f27b5..9241dab078 100644 --- a/application/basilisk/base/content/aboutDialog.xul +++ b/application/basilisk/base/content/aboutDialog.xul @@ -30,7 +30,7 @@ #ifdef XP_MACOSX inwindowmenu="false" #else - title="&aboutDialog.title;" + title="About LegacyEngine" #endif role="dialog" aria-describedby="version distribution distributionId communityDesc contributeDesc trademark" @@ -141,7 +141,7 @@ #endif #else - This is an unofficial build of Hydra. For official builds, please go to . + LegacyEngine is a custom browser, based on the best of Firefox. #endif diff --git a/application/basilisk/base/content/abouthome/aboutHome.css b/application/basilisk/base/content/abouthome/aboutHome.css index 86f74727f2..5767066670 100644 --- a/application/basilisk/base/content/abouthome/aboutHome.css +++ b/application/basilisk/base/content/abouthome/aboutHome.css @@ -6,7 +6,6 @@ html { font: message-box; - font-size: 100%; background-color: hsl(0,0%,95%); color: #000; height: 100%; @@ -20,6 +19,10 @@ body { height: 100%; } +h1 { + font-weight: normal !important +} + input, button { font-size: inherit; @@ -31,12 +34,9 @@ a { text-decoration: none; } -.spacer { - -moz-box-flex: 1; -} - #topSection { text-align: center; + margin-top: 100px; } #brandLogo { diff --git a/application/basilisk/base/content/abouthome/aboutHome.xhtml b/application/basilisk/base/content/abouthome/aboutHome.xhtml index 90daad2dc8..588e9b2bee 100644 --- a/application/basilisk/base/content/abouthome/aboutHome.xhtml +++ b/application/basilisk/base/content/abouthome/aboutHome.xhtml @@ -37,8 +37,7 @@
- - +

Where to next?

-
- -
- - - - -#ifdef MOZ_SERVICES_SYNC - -#endif -#ifdef XP_WIN - -#else - -#endif -
- -
diff --git a/application/basilisk/base/content/newtab/newTab.css b/application/basilisk/base/content/newtab/newTab.css index 64b3ed7ef7..934dee7847 100644 --- a/application/basilisk/base/content/newtab/newTab.css +++ b/application/basilisk/base/content/newtab/newTab.css @@ -541,4 +541,4 @@ input[type=button] { .contentSearchSuggestionTable { font: message-box; font-size: 16px; -} +} \ No newline at end of file diff --git a/application/basilisk/base/content/newtab/newTab.js b/application/basilisk/base/content/newtab/newTab.js index 1731edadca..a681203d32 100644 --- a/application/basilisk/base/content/newtab/newTab.js +++ b/application/basilisk/base/content/newtab/newTab.js @@ -67,4 +67,4 @@ const TILES_PRIVACY_LINK = "https://www.mozilla.org/privacy/"; #include customize.js // Everything is loaded. Initialize the New Tab Page. -gPage.init(); +gPage.init(); \ No newline at end of file diff --git a/application/basilisk/base/content/newtab/newTab.xhtml b/application/basilisk/base/content/newtab/newTab.xhtml index 7de1ff3d49..26046e87d0 100644 --- a/application/basilisk/base/content/newtab/newTab.xhtml +++ b/application/basilisk/base/content/newtab/newTab.xhtml @@ -85,4 +85,4 @@ - - - - - - - -
- - -
-

&robots.errorTitleText;

-
- - -
- - -
-

&robots.errorShortDescText;

-
- - -
-
    -
  • &robots.errorLongDesc1;
  • -
  • &robots.errorLongDesc2;
  • -
  • &robots.errorLongDesc3;
  • -
  • &robots.errorLongDesc4;
  • -
-
- - -
-

&robots.errorTrailerDescText;

-
- -
- - - - - - -
- - - diff --git a/application/palemoon/base/content/autocomplete.css b/application/palemoon/base/content/autocomplete.css deleted file mode 100644 index 960bdc456d..0000000000 --- a/application/palemoon/base/content/autocomplete.css +++ /dev/null @@ -1,17 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -@namespace html url("http://www.w3.org/1999/xhtml"); - -/* Apply crisp rendering for favicons at exactly 2dppx resolution */ -@media (resolution: 2dppx) { - .ac-site-icon { - image-rendering: -moz-crisp-edges; - } -} - -richlistitem > .ac-title-box > .ac-title > .ac-comment:not([selected]) > html|span.ac-selected-text { - display: none; -} diff --git a/application/palemoon/base/content/autocomplete.xml b/application/palemoon/base/content/autocomplete.xml deleted file mode 100644 index b3250199dd..0000000000 --- a/application/palemoon/base/content/autocomplete.xml +++ /dev/null @@ -1,2112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - null - null - false - null - - null - null - null - null - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - parseInt(this.getAttribute("shrinkdelay")) || 0 - - - - { - let utils = {}; - Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm", utils); - utils.PrivateBrowsingUtils - } - - - - - - - - 14 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - null - - - - - - - - = 1) - this.mController.handleTab(); - break; - case KeyEvent.DOM_VK_UP: - case KeyEvent.DOM_VK_DOWN: - case KeyEvent.DOM_VK_PAGE_UP: - case KeyEvent.DOM_VK_PAGE_DOWN: - cancel = this.mController.handleKeyNavigation(aEvent.keyCode); - break; - } - } - - // Handle keys we know aren't part of a shortcut, even with Alt or - // Ctrl. - switch (aEvent.keyCode) { - case KeyEvent.DOM_VK_ESCAPE: - cancel = this.mController.handleEscape(); - break; - case KeyEvent.DOM_VK_RETURN: - this.mEnterEvent = aEvent; - if (this.mController.selection) { - this._selectionDetails = { - index: this.mController.selection.currentIndex, - kind: "key" - }; - } - cancel = this.handleEnter(); - break; - case KeyEvent.DOM_VK_DELETE: - cancel = this.handleDelete(); - break; - case KeyEvent.DOM_VK_BACK_SPACE: - break; - case KeyEvent.DOM_VK_DOWN: - case KeyEvent.DOM_VK_UP: - if (aEvent.altKey) - this.toggleHistoryPopup(); - break; - case KeyEvent.DOM_VK_F4: - this.toggleHistoryPopup(); - break; - } - - if (cancel) { - aEvent.stopPropagation(); - aEvent.preventDefault(); - } - - return true; - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - false - aCommand == "cmd_paste", - doCommand: function(aCommand) { - this._autocomplete._valueIsPasted = true; - this._autocomplete.editor.paste(this._kGlobalClipboard); - this._autocomplete._valueIsPasted = false; - }, - isCommandEnabled: function(aCommand) { - return this._autocomplete.editor.isSelectionEditable && - this._autocomplete.editor.canPaste(this._kGlobalClipboard); - }, - onEvent: function() {} - }) - ]]> - - - - - - - - - - - - - - - - - - - = 1) { - // mousemove sets selected index. Don't blindly use that selected - // index in this blur handler since if the popup is open you can - // easily "select" another match just by moving the mouse over it. - let filledVal = this.value.replace(/.+ >> /, "").toLowerCase(); - let selectedVal = null; - if (this.popup.selectedIndex >= 0) { - selectedVal = this.mController.getFinalCompleteValueAt( - this.popup.selectedIndex); - } - if (selectedVal && filledVal != selectedVal.toLowerCase()) { - for (let i = 0; i < this.mController.matchCount; i++) { - let matchVal = this.mController.getFinalCompleteValueAt(i); - if (matchVal.toLowerCase() == filledVal) { - this.popup.selectedIndex = i; - break; - } - } - } - this.mController.handleEnter(false); - } - if (!this.ignoreBlurWhileSearching) - this.detachController(); - } - ]]> - - - - - - - - - - - - - - - - - - - - - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0) - this.tree.treeBoxObject.ensureRowIsVisible(val < 0 ? 0 : val); - // Fire select event on xul:tree so that accessibility API - // support layer can fire appropriate accessibility events. - var event = document.createEvent('Events'); - event.initEvent("select", true, true); - this.tree.dispatchEvent(event); - return val; - ]]> - - - - - - - - - - - - - - - - - - 100 ? width : 100); - - // Adjust the direction of the autocomplete popup list based on the textbox direction, bug 649840 - var popupDirection = aElement.ownerDocument.defaultView.getComputedStyle(aElement).direction; - this.style.direction = popupDirection; - - this.openPopup(aElement, "after_start", 0, 0, false, false); - } - ]]> - - - - - - - - - - - - - - - - document.getAnonymousElementByAttribute(this, "anonid", "tree"); - - - - document.getAnonymousElementByAttribute(this, "anonid", "treecols"); - - - - - - - - - - - - null - false - false - - - - - - - - - - - - - - - - - - - 6 - - - -1 - - - - - - - - - - - - - aMaxRow && aIndex != aMaxRow) - newIdx = aMaxRow; - else if (!aReverse && aIndex == -1 || newIdx < 0 && aIndex != 0) - newIdx = 0; - - if (newIdx < 0 && aIndex == 0 || newIdx > aMaxRow && aIndex == aMaxRow) - aIndex = -1; - else - aIndex = newIdx; - - return aIndex; - ]]> - - - - - - - - - - - - { - this.mIsPopupHidingTick = false; - }, 0); - - // Reset the maxRows property to the cached "normal" value, and reset - // _normalMaxRows so that we can detect whether it was set by the input - // when the popupshowing handler runs. - - // Null-check this.mInput; see bug 1017914 - if (this.mInput) - this.mInput.maxRows = this._normalMaxRows; - this._normalMaxRows = -1; - // If the list was being navigated and then closed, make sure - // we fire accessible focus event back to textbox - - // Null-check this.mInput; see bug 1017914 - if (isListActive && this.mInput) { - this.mInput.mIgnoreFocus = true; - this.mInput._focus(); - this.mInput.mIgnoreFocus = false; - } - ]]> - - - - - - - - - - - - - - - - - - 0 - 0 - false - - - - - - - - - - - - - - - - - - - - - - - - - - 100 ? width : 100); - // invalidate() depends on the width attribute - this._invalidate(); - - this.openPopup(aElement, "after_start", 0, 0, false, false); - } - ]]> - - - - - - - - - - - - - - this.adjustHeight(), 0); - - this._currentIndex = 0; - if (this._appendResultTimeout) { - clearTimeout(this._appendResultTimeout); - } - this._appendCurrentResult(reason); - ]]> - - - - - - - - - - - - - - - - - - - - - - - - currentHeight) { - // Grow immediately. - if (animate) { - this.richlistbox.removeAttribute("height"); - this.richlistbox.style.height = height + "px"; - } else { - this.richlistbox.style.removeProperty("height"); - this.richlistbox.height = height; - } - } else { - // Delay shrinking to avoid flicker. - this._shrinkTimeout = setTimeout(() => { - this._collapseUnusedItems(); - if (animate) { - this.richlistbox.removeAttribute("height"); - this.richlistbox.style.height = height + "px"; - } else { - this.richlistbox.style.removeProperty("height"); - this.richlistbox.height = height; - } - }, this.mInput.shrinkDelay); - } - ]]> - - - - - - - = matchCount) - break; - - var item; - - // trim the leading/trailing whitespace - var trimmedSearchString = controller.searchString.replace(/^\s+/, "").replace(/\s+$/, ""); - - let url = controller.getValueAt(this._currentIndex); - - if (this._currentIndex < existingItemsCount) { - // re-use the existing item - item = this.richlistbox.childNodes[this._currentIndex]; - - // Completely reuse the existing richlistitem for invalidation - // due to new results, but only when: the item is the same, *OR* - // we are about to replace the currently mouse-selected item, to - // avoid surprising the user. - let iface = Components.interfaces.nsIAutoCompletePopup; - if (item.getAttribute("text") == trimmedSearchString && - invalidateReason == iface.INVALIDATE_REASON_NEW_RESULT && - (item.getAttribute("url") == url || - this.richlistbox.mouseSelectedIndex === this._currentIndex)) { - item.collapsed = false; - this._currentIndex++; - continue; - } - } - else { - // need to create a new item - item = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "richlistitem"); - } - - // set these attributes before we set the class - // so that we can use them from the constructor - let iconURI = controller.getImageAt(this._currentIndex); - item.setAttribute("image", iconURI); - item.setAttribute("url", url); - item.setAttribute("title", controller.getCommentAt(this._currentIndex)); - item.setAttribute("type", controller.getStyleAt(this._currentIndex)); - item.setAttribute("text", trimmedSearchString); - - if (this._currentIndex < existingItemsCount) { - // re-use the existing item - item._adjustAcItem(); - item.collapsed = false; - } - else { - // set the class at the end so we can use the attributes - // in the xbl constructor - item.className = "private-autocomplete-richlistitem"; - this.richlistbox.appendChild(item); - } - - this._currentIndex++; - } - - if (typeof this.onResultsAdded == "function") - this.onResultsAdded(); - - if (this._currentIndex < matchCount) { - // yield after each batch of items so that typing the url bar is - // responsive - this._appendResultTimeout = setTimeout(() => this._appendCurrentResult(), 0); - } - ]]> - - - - - - - - - - - - - document.getAnonymousElementByAttribute(this, "anonid", "richlistbox"); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - str).join(" ") - - // allow consumers that have extended popups to override - // the label values for the richlistitems - let panel = this.parentNode.parentNode; - if (panel.createResultLabel) { - return panel.createResultLabel(this, label); - } - - return label; - ]]> - - - - - - - - null - - - - - - - - - - - - = 0) { - regions.push([matchIndex, matchIndex + searchLen]); - } - } - - // Sort the regions by start position then end position - regions = regions.sort((a, b) => { - let start = a[0] - b[0]; - return (start == 0) ? a[1] - b[1] : start; - }); - - // Generate the boundary indices from each region - let start = 0; - let end = 0; - let boundaries = []; - let len = regions.length; - for (let i = 0; i < len; i++) { - // We have a new boundary if the start of the next is past the end - let region = regions[i]; - if (region[0] > end) { - // First index is the beginning of match - boundaries.push(start); - // Second index is the beginning of non-match - boundaries.push(end); - - // Track the new region now that we've stored the previous one - start = region[0]; - } - - // Push back the end index for the current or new region - end = Math.max(end, region[1]); - } - - // Add the last region - boundaries.push(start); - boundaries.push(end); - - // Put on the end boundary if necessary - if (end < aText.length) - boundaries.push(aText.length); - - // Skip the first item because it's always 0 - return boundaries.slice(1); - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - = 0 && index < aReplacements.length) { - pairs.push([...aReplacements[index]]); - } - } else { - pairs.push([part]); - } - } - - return pairs; - ]]> - - - - - - - - - - - - - null - - - - - - - - - - = 0) { - pairs = [ - [searchSuggestion.substring(0, idx), ""], - [searchQuery, "match"], - [searchSuggestion.substring(idx + searchQuery.length), ""], - ]; - } else { - pairs = [ - [searchSuggestion, ""], - ]; - } - } else { - pairs = [ - [searchQuery, ""], - ]; - } - pairs.push([engineStr, "selected"]); - let interpStr = pairs.map((pair, i) => `%${i + 1}$S`).join(""); - title = this._generateEmphasisPairs(interpStr, pairs); - - // If this is a default search match, we remove the image so we - // can style it ourselves with a generic search icon. - // We don't do this when matching an aliased search engine, - // because the icon helps with recognising which engine will be - // used (when using the default engine, we don't need that - // recognition). - if (!action.params.alias) { - this.removeAttribute("image"); - } - } else if (action.type == "visiturl") { - emphasiseUrl = false; - displayUrl = this._unescapeUrl(action.params.url); - let sourceStr = this._stringBundle.GetStringFromName("visitURL"); - title = this._generateEmphasisPairs(sourceStr, [ - [displayUrl, "match"], - ]); - } - } - - // Check if we have a search engine name - if (initialTypes.has("search")) { - emphasiseUrl = false; - - const TITLE_SEARCH_ENGINE_SEPARATOR = " \u00B7\u2013\u00B7 "; - - let searchEngine = ""; - [title, searchEngine] = title.split(TITLE_SEARCH_ENGINE_SEPARATOR); - displayUrl = this._stringBundle.formatStringFromName("searchWithEngine", [searchEngine], 1); - } - - if (!displayUrl) { - let input = this.parentNode.parentNode.input; - let url = typeof(input.trimValue) == "function" ? - input.trimValue(originalUrl) : - originalUrl; - displayUrl = this._unescapeUrl(url); - } - this.setAttribute("displayurl", displayUrl); - - // Check if we have an auto-fill URL - if (initialTypes.has("autofill")) { - emphasiseUrl = false; - - let sourceStr = this._stringBundle.GetStringFromName("visitURL"); - title = this._generateEmphasisPairs(sourceStr, [ - [displayUrl, "match"], - ]); - } - - // If we have a tag match, show the tags and icon - if (type == "tag" || type == "bookmark-tag") { - // Configure the extra box for tags display - this._extraBox.hidden = false; - this._extraBox.childNodes[0].hidden = false; - this._extraBox.childNodes[1].hidden = true; - this._extraBox.pack = "end"; - this._titleBox.flex = 1; - - // The title is separated from the tags by an endash - let tags; - [, title, tags] = title.match(/^(.+) \u2013 (.+)$/); - - // Each tag is split by a comma in an undefined order, so sort it - let sortedTags = tags.split(",").sort().join(", "); - - // Emphasize the matching text in the tags - this._setUpDescription(this._extra, sortedTags); - - // If we're suggesting bookmarks, then treat tagged matches as - // bookmarks for the star. - if (type == "bookmark-tag") { - type = "bookmark"; - } else { - this._typeImage.hidden = true; - } - // keyword and favicon type results for search engines - // have an extra magnifying glass icon after them - } else if (type == "keyword" || (initialTypes.has("search") && - initialTypes.has("favicon"))) { - // Configure the extra box for keyword display - this._extraBox.hidden = false; - this._extraBox.childNodes[0].hidden = true; - // The second child node is ":" and it should be hidden for non keyword types - this._extraBox.childNodes[1].hidden = type == "keyword" ? false : true; - this._extraBox.pack = "start"; - this._titleBox.flex = 0; - - // Hide the ellipsis so it doesn't take up space. - this._titleOverflowEllipsis.hidden = true; - - if (type == "keyword") { - // Put the parameters next to the title if we have any - let search = this.getAttribute("text"); - let params = ""; - let paramsIndex = search.indexOf(" "); - if (paramsIndex != -1) - params = search.substr(paramsIndex + 1); - - // Emphasize the keyword parameters - this._setUpDescription(this._extra, params); - - // Don't emphasize keyword searches in the title or url - emphasiseUrl = false; - emphasiseTitle = false; - } else { - // Don't show any description for non keyword types. - this._setUpDescription(this._extra, "", true); - } - // If the result has the type favicon and a known search provider, - // customize it the same way as a keyword result. - type = "keyword"; - } - - // Give the image the icon style and a special one for the type - this._typeImage.className = "ac-type-icon" + - (type ? " ac-result-type-" + type : ""); - - // Show the domain as the title if we don't have a title. - if (title == "") { - title = displayUrl; - try { - let uri = Services.io.newURI(originalUrl, null, null); - // Not all valid URLs have a domain. - if (uri.host) - title = uri.host; - } catch (e) {} - } - - // Emphasize the matching search terms for the description - if (Array.isArray(title)) - this._setUpEmphasisedSections(this._title, title); - else - this._setUpDescription(this._title, title, !emphasiseTitle); - - this._setUpDescription(this._url, displayUrl, !emphasiseUrl); - - // Set up overflow on a timeout because the contents of the box - // might not have a width yet even though we just changed them - setTimeout(this._setUpOverflow, 0, this._titleBox, this._titleOverflowEllipsis); - setTimeout(this._setUpOverflow, 0, this._urlBox, this._urlOverflowEllipsis); - ]]> - - - - - - - - - - - - - 0) { - // Subtract a little less to account for subpixel rounding - widthDiff -= childWidth - .5; - - // Add to the tooltip if it's not hidden and has text - let childText = children[i].textContent; - if (childText) - tooltip.push(childText); - } - } - - // If the children take up more space than the parent.. overflow! - if (widthDiff < 0) { - // Re-show the ellipsis now that we know it's needed - aEllipsis.style.visibility = "visible"; - - // Separate text components with a ndash -- - aParentBox.tooltipText = tooltip.join(" \u2013 "); - } - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date.now() - -1 - - - - - - - - 30) { - let item = event.target; - while (item && item.localName != "richlistitem") { - item = item.parentNode; - } - - if (!item) - return; - - let index = this.getIndexOfItem(item); - if (index != this.selectedIndex) { - this.mouseSelectedIndex = this.selectedIndex = index; - } - - this.mLastMoveTime = Date.now(); - } - ]]> - - - - - - - Date.now() - - - - - - - - 30) { - var rc = this.parentNode.treeBoxObject.getRowAt(event.clientX, event.clientY); - if (rc != this.parentNode.currentIndex) - this.parentNode.view.selection.select(rc); - this.mLastMoveTime = Date.now(); - } - ]]> - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/base/content/autorecovery.js b/application/palemoon/base/content/autorecovery.js deleted file mode 100644 index 78c7a5bd8f..0000000000 --- a/application/palemoon/base/content/autorecovery.js +++ /dev/null @@ -1,58 +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/. */ - -/* Auto-recovery module. - * This module aims to catch fatal browser initialization errors and either - * automatically correct likely causes from them, or automatically restarting - * the browser in safe mode. This is hooked into the browser's "onload" - * event because it can be assumed that at that point, everything must - * have been properly initialized already. - */ - -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; - -// Services = object with smart getters for common XPCOM services -Cu.import("resource://gre/modules/Services.jsm"); - -var browser_autoRecovery = { - onLoad: function() { - var nsIAS = Ci.nsIAppStartup; // Application startup interface - - if (typeof gBrowser === "undefined") { - // gBrowser should always be defined at this point, but if it is not, then most likely - // it is due to an incompatible or outdated language pack being installed and selected. - // In this case, we reset "general.useragent.locale" to try to recover browser startup. - if (Services.prefs.prefHasUserValue("general.useragent.locale")) { - // Restart automatically in en-US. - Services.prefs.clearUserPref("general.useragent.locale"); - Cc["@mozilla.org/toolkit/app-startup;1"].getService(nsIAS).quit(nsIAS.eRestart | nsIAS.eAttemptQuit); - } else if (!Services.appinfo.inSafeMode) { - // gBrowser isn't defined, and we're not using a custom locale. Most likely - // a user-installed add-on causes issues here, so we restart in Safe Mode. - let RISM = Services.prompt.confirm(null, "Error", - "The Browser didn't start properly!\n"+ - "This is usually caused by an add-on or misconfiguration.\n\n"+ - "Restart in Safe Mode?"); - if (RISM) { - Cc["@mozilla.org/toolkit/app-startup;1"].getService(nsIAS).restartInSafeMode(nsIAS.eRestart | nsIAS.eAttemptQuit); - } else { - // Force quit application - Cc["@mozilla.org/toolkit/app-startup;1"].getService(nsIAS).quit(nsIAS.eForceQuit); - } - } - // Something else caused this issue and we're already in Safe Mode, so we return - // without doing anything else, and let normal error handling take place. - return; - } // gBrowser undefined - - // Other checks than gBrowser undefined can go here! - - // Remove our listener, since we don't want this to fire on every load. - window.removeEventListener("load", browser_autoRecovery.onLoad, false); - } -}; - -window.addEventListener("load", browser_autoRecovery.onLoad, false); diff --git a/application/palemoon/base/content/autorecovery.xul b/application/palemoon/base/content/autorecovery.xul deleted file mode 100644 index 866bdf288b..0000000000 --- a/application/palemoon/base/content/autorecovery.xul +++ /dev/null @@ -1,12 +0,0 @@ - - - - - -#endif - - - - - - - -
- - -
-

&certerror.longpagetitle;

-
- - -
-
-

&certerror.introPara1;

-

&certerror.introPara2;

-
- -
-

&certerror.whatShouldIDo.heading;

-
-

&certerror.whatShouldIDo.content;

- -
-
- - -

- -

-

- -

- -

-
-

&certerror.expert.content;

-

&certerror.expert.contentPara2;

- -
-
-
- - - - - - diff --git a/application/palemoon/components/certerror/jar.mn b/application/palemoon/components/certerror/jar.mn deleted file mode 100644 index 08e0710275..0000000000 --- a/application/palemoon/components/certerror/jar.mn +++ /dev/null @@ -1,7 +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/. - -browser.jar: - content/browser/certerror/aboutCertError.xhtml (content/aboutCertError.xhtml) - content/browser/certerror/aboutCertError.css (content/aboutCertError.css) diff --git a/application/palemoon/components/certerror/moz.build b/application/palemoon/components/certerror/moz.build deleted file mode 100644 index ecb79e730d..0000000000 --- a/application/palemoon/components/certerror/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/application/palemoon/components/dirprovider/DirectoryProvider.cpp b/application/palemoon/components/dirprovider/DirectoryProvider.cpp deleted file mode 100644 index 85728b3510..0000000000 --- a/application/palemoon/components/dirprovider/DirectoryProvider.cpp +++ /dev/null @@ -1,268 +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/. */ - -#include "nsIDirectoryService.h" -#include "DirectoryProvider.h" - -#include "nsIFile.h" -#include "nsISimpleEnumerator.h" -#include "nsIPrefService.h" -#include "nsIPrefBranch.h" - -#include "nsArrayEnumerator.h" -#include "nsEnumeratorUtils.h" -#include "nsAppDirectoryServiceDefs.h" -#include "nsDirectoryServiceDefs.h" -#include "nsCategoryManagerUtils.h" -#include "nsComponentManagerUtils.h" -#include "nsCOMArray.h" -#include "nsDirectoryServiceUtils.h" -#include "mozilla/ModuleUtils.h" -#include "nsServiceManagerUtils.h" -#include "nsStringAPI.h" -#include "nsXULAppAPI.h" -#include "nsIPrefLocalizedString.h" - -namespace mozilla { -namespace browser { - -NS_IMPL_ISUPPORTS(DirectoryProvider, - nsIDirectoryServiceProvider, - nsIDirectoryServiceProvider2) - -NS_IMETHODIMP -DirectoryProvider::GetFile(const char *aKey, bool *aPersist, nsIFile* *aResult) -{ - return NS_ERROR_FAILURE; -} - -static void -AppendFileKey(const char *key, nsIProperties* aDirSvc, - nsCOMArray &array) -{ - nsCOMPtr file; - nsresult rv = aDirSvc->Get(key, NS_GET_IID(nsIFile), getter_AddRefs(file)); - if (NS_FAILED(rv)) - return; - - bool exists; - rv = file->Exists(&exists); - if (NS_FAILED(rv) || !exists) - return; - - array.AppendObject(file); -} - -// Appends the distribution-specific search engine directories to the -// array. The directory structure is as follows: - -// appdir/ -// \- distribution/ -// \- searchplugins/ -// |- common/ -// \- locale/ -// |- / -// ... -// \- / - -// common engines are loaded for all locales. If there is no locale -// directory for the current locale, there is a pref: -// "distribution.searchplugins.defaultLocale" -// which specifies a default locale to use. - -static void -AppendDistroSearchDirs(nsIProperties* aDirSvc, nsCOMArray &array) -{ - nsCOMPtr searchPlugins; - nsresult rv = aDirSvc->Get(XRE_APP_DISTRIBUTION_DIR, - NS_GET_IID(nsIFile), - getter_AddRefs(searchPlugins)); - if (NS_FAILED(rv)) - return; - searchPlugins->AppendNative(NS_LITERAL_CSTRING("searchplugins")); - - bool exists; - rv = searchPlugins->Exists(&exists); - if (NS_FAILED(rv) || !exists) - return; - - nsCOMPtr commonPlugins; - rv = searchPlugins->Clone(getter_AddRefs(commonPlugins)); - if (NS_SUCCEEDED(rv)) { - commonPlugins->AppendNative(NS_LITERAL_CSTRING("common")); - rv = commonPlugins->Exists(&exists); - if (NS_SUCCEEDED(rv) && exists) - array.AppendObject(commonPlugins); - } - - nsCOMPtr prefs(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (prefs) { - - nsCOMPtr localePlugins; - rv = searchPlugins->Clone(getter_AddRefs(localePlugins)); - if (NS_FAILED(rv)) - return; - - localePlugins->AppendNative(NS_LITERAL_CSTRING("locale")); - - nsCString locale; - nsCOMPtr prefString; - rv = prefs->GetComplexValue("general.useragent.locale", - NS_GET_IID(nsIPrefLocalizedString), - getter_AddRefs(prefString)); - if (NS_SUCCEEDED(rv)) { - nsAutoString wLocale; - prefString->GetData(getter_Copies(wLocale)); - CopyUTF16toUTF8(wLocale, locale); - } else { - rv = prefs->GetCharPref("general.useragent.locale", getter_Copies(locale)); - } - - if (NS_SUCCEEDED(rv)) { - - nsCOMPtr curLocalePlugins; - rv = localePlugins->Clone(getter_AddRefs(curLocalePlugins)); - if (NS_SUCCEEDED(rv)) { - - curLocalePlugins->AppendNative(locale); - rv = curLocalePlugins->Exists(&exists); - if (NS_SUCCEEDED(rv) && exists) { - array.AppendObject(curLocalePlugins); - return; // all done - } - } - } - - // we didn't append the locale dir - try the default one - nsCString defLocale; - rv = prefs->GetCharPref("distribution.searchplugins.defaultLocale", - getter_Copies(defLocale)); - if (NS_SUCCEEDED(rv)) { - - nsCOMPtr defLocalePlugins; - rv = localePlugins->Clone(getter_AddRefs(defLocalePlugins)); - if (NS_SUCCEEDED(rv)) { - - defLocalePlugins->AppendNative(defLocale); - rv = defLocalePlugins->Exists(&exists); - if (NS_SUCCEEDED(rv) && exists) - array.AppendObject(defLocalePlugins); - } - } - } -} - -NS_IMETHODIMP -DirectoryProvider::GetFiles(const char *aKey, nsISimpleEnumerator* *aResult) -{ - nsresult rv; - - if (!strcmp(aKey, NS_APP_SEARCH_DIR_LIST)) { - nsCOMPtr dirSvc - (do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID)); - if (!dirSvc) - return NS_ERROR_FAILURE; - - nsCOMArray baseFiles; - - /** - * We want to preserve the following order, since the search service loads - * engines in first-loaded-wins order. - * - extension search plugin locations (prepended below using - * NS_NewUnionEnumerator) - * - distro search plugin locations - * - user search plugin locations (profile) - * - app search plugin location (shipped engines) - */ - AppendDistroSearchDirs(dirSvc, baseFiles); - AppendFileKey(NS_APP_USER_SEARCH_DIR, dirSvc, baseFiles); - AppendFileKey(NS_APP_SEARCH_DIR, dirSvc, baseFiles); - - nsCOMPtr baseEnum; - rv = NS_NewArrayEnumerator(getter_AddRefs(baseEnum), baseFiles); - if (NS_FAILED(rv)) - return rv; - - nsCOMPtr list; - rv = dirSvc->Get(XRE_EXTENSIONS_DIR_LIST, - NS_GET_IID(nsISimpleEnumerator), getter_AddRefs(list)); - if (NS_FAILED(rv)) - return rv; - - static char const *const kAppendSPlugins[] = {"searchplugins", nullptr}; - - nsCOMPtr extEnum = - new AppendingEnumerator(list, kAppendSPlugins); - if (!extEnum) - return NS_ERROR_OUT_OF_MEMORY; - - return NS_NewUnionEnumerator(aResult, extEnum, baseEnum); - } - - return NS_ERROR_FAILURE; -} - -NS_IMPL_ISUPPORTS(DirectoryProvider::AppendingEnumerator, nsISimpleEnumerator) - -NS_IMETHODIMP -DirectoryProvider::AppendingEnumerator::HasMoreElements(bool *aResult) -{ - *aResult = mNext ? true : false; - return NS_OK; -} - -NS_IMETHODIMP -DirectoryProvider::AppendingEnumerator::GetNext(nsISupports* *aResult) -{ - if (aResult) - NS_ADDREF(*aResult = mNext); - - mNext = nullptr; - - nsresult rv; - - // Ignore all errors - - bool more; - while (NS_SUCCEEDED(mBase->HasMoreElements(&more)) && more) { - nsCOMPtr nextbasesupp; - mBase->GetNext(getter_AddRefs(nextbasesupp)); - - nsCOMPtr nextbase(do_QueryInterface(nextbasesupp)); - if (!nextbase) - continue; - - nextbase->Clone(getter_AddRefs(mNext)); - if (!mNext) - continue; - - char const *const * i = mAppendList; - while (*i) { - mNext->AppendNative(nsDependentCString(*i)); - ++i; - } - - bool exists; - rv = mNext->Exists(&exists); - if (NS_SUCCEEDED(rv) && exists) - break; - - mNext = nullptr; - } - - return NS_OK; -} - -DirectoryProvider::AppendingEnumerator::AppendingEnumerator - (nsISimpleEnumerator* aBase, - char const *const *aAppendList) : - mBase(aBase), - mAppendList(aAppendList) -{ - // Initialize mNext to begin. - GetNext(nullptr); -} - -} // namespace browser -} // namespace mozilla diff --git a/application/palemoon/components/dirprovider/DirectoryProvider.h b/application/palemoon/components/dirprovider/DirectoryProvider.h deleted file mode 100644 index 43fa85ab93..0000000000 --- a/application/palemoon/components/dirprovider/DirectoryProvider.h +++ /dev/null @@ -1,51 +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/. */ - -#ifndef DirectoryProvider_h__ -#define DirectoryProvider_h__ - -#include "nsIDirectoryService.h" -#include "nsComponentManagerUtils.h" -#include "nsISimpleEnumerator.h" -#include "nsIFile.h" -#include "mozilla/Attributes.h" - -#define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \ - "@mozilla.org/browser/directory-provider;1" - -namespace mozilla { -namespace browser { - -class DirectoryProvider final : public nsIDirectoryServiceProvider2 -{ -public: - NS_DECL_ISUPPORTS - NS_DECL_NSIDIRECTORYSERVICEPROVIDER - NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 - -private: - ~DirectoryProvider() {} - - class AppendingEnumerator final : public nsISimpleEnumerator - { - public: - NS_DECL_ISUPPORTS - NS_DECL_NSISIMPLEENUMERATOR - - AppendingEnumerator(nsISimpleEnumerator* aBase, - char const *const *aAppendList); - - private: - ~AppendingEnumerator() {} - - nsCOMPtr mBase; - char const *const *const mAppendList; - nsCOMPtr mNext; - }; -}; - -} // namespace browser -} // namespace mozilla - -#endif // DirectoryProvider_h__ diff --git a/application/palemoon/components/dirprovider/moz.build b/application/palemoon/components/dirprovider/moz.build deleted file mode 100644 index 3f51743af5..0000000000 --- a/application/palemoon/components/dirprovider/moz.build +++ /dev/null @@ -1,12 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -EXPORTS.mozilla.browser += ['DirectoryProvider.h'] - -SOURCES += ['DirectoryProvider.cpp'] - -FINAL_LIBRARY = 'browsercomps' - -LOCAL_INCLUDES += ['../build'] diff --git a/application/palemoon/components/distribution.js b/application/palemoon/components/distribution.js deleted file mode 100644 index 88d2b3f587..0000000000 --- a/application/palemoon/components/distribution.js +++ /dev/null @@ -1,373 +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/. */ - -this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ]; - -var Ci = Components.interfaces; -var Cc = Components.classes; -var Cr = Components.results; -var Cu = Components.utils; - -const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC = - "distribution-customization-complete"; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); - -this.DistributionCustomizer = function DistributionCustomizer() { - let dirSvc = Cc["@mozilla.org/file/directory_service;1"] - .getService(Ci.nsIProperties); - let iniFile = dirSvc.get("XREExeF", Ci.nsIFile); - iniFile.leafName = "distribution"; - iniFile.append("distribution.ini"); - if (iniFile.exists()) { - this._iniFile = iniFile; - } -} - -DistributionCustomizer.prototype = { - _iniFile: null, - - get _ini() { - let ini = Cc["@mozilla.org/xpcom/ini-parser-factory;1"] - .getService(Ci.nsIINIParserFactory) - .createINIParser(this._iniFile); - this.__defineGetter__("_ini", () => ini); - return this._ini; - }, - - get _locale() { - let locale = this._prefs.getCharPref("general.useragent.locale", "en-US"); - this.__defineGetter__("_locale", () => locale); - return this._locale; - }, - - get _prefSvc() { - let svc = Cc["@mozilla.org/preferences-service;1"] - .getService(Ci.nsIPrefService); - this.__defineGetter__("_prefSvc", () => svc); - return this._prefSvc; - }, - - get _prefs() { - let branch = this._prefSvc.getBranch(null); - this.__defineGetter__("_prefs", () => branch); - return this._prefs; - }, - - get _ioSvc() { - let svc = Cc["@mozilla.org/network/io-service;1"] - .getService(Ci.nsIIOService); - this.__defineGetter__("_ioSvc", () => svc); - return this._ioSvc; - }, - - _makeURI: function(spec) { - return this._ioSvc.newURI(spec, null, null); - }, - - _parseBookmarksSection: - function(parentId, section) { - let keys = []; - for (let i in enumerate(this._ini.getKeys(section))) { - keys.push(i); - } - keys.sort(); - - let items = {}; - let defaultItemId = -1; - let maxItemId = -1; - - for (let i = 0; i < keys.length; i++) { - let m = /^item\.(\d+)\.(\w+)\.?(\w*)/.exec(keys[i]); - if (m) { - let [foo, iid, iprop, ilocale] = m; - iid = parseInt(iid); - - if (ilocale) { - continue; - } - - if (!items[iid]) { - items[iid] = {}; - } - if (keys.indexOf(keys[i] + "." + this._locale) >= 0) { - items[iid][iprop] = this._ini.getString(section, keys[i] + "." + - this._locale); - } else { - items[iid][iprop] = this._ini.getString(section, keys[i]); - } - - if (iprop == "type" && items[iid]["type"] == "default") { - defaultItemId = iid; - } - - if (maxItemId < iid) { - maxItemId = iid; - } - } else { - dump("Key did not match: " + keys[i] + "\n"); - } - } - - let prependIndex = 0; - for (let iid = 0; iid <= maxItemId; iid++) { - if (!items[iid]) { - continue; - } - - let index = PlacesUtils.bookmarks.DEFAULT_INDEX; - let newId; - - switch (items[iid]["type"]) { - case "default": - break; - - case "folder": - if (iid < defaultItemId) { - index = prependIndex++; - } - - newId = PlacesUtils.bookmarks.createFolder(parentId, - items[iid]["title"], - index); - - this._parseBookmarksSection(newId, "BookmarksFolder-" + - items[iid]["folderId"]); - - if (items[iid]["description"]) - PlacesUtils.annotations.setItemAnnotation(newId, - "bookmarkProperties/description", - items[iid]["description"], 0, - PlacesUtils.annotations.EXPIRE_NEVER); - - break; - - case "separator": - if (iid < defaultItemId) { - index = prependIndex++; - } - PlacesUtils.bookmarks.insertSeparator(parentId, index); - break; - - case "livemark": - if (iid < defaultItemId) { - index = prependIndex++; - } - - // Don't bother updating the livemark contents on creation. - PlacesUtils.livemarks.addLivemark({ title: items[iid]["title"], - parentId: parentId, - index: index, - feedURI: this._makeURI(items[iid]["feedLink"]), - siteURI: this._makeURI(items[iid]["siteLink"]) - }).then(null, Cu.reportError); - break; - - case "bookmark": - // Fallthrough - default: - if (iid < defaultItemId) { - index = prependIndex++; - } - - newId = PlacesUtils.bookmarks.insertBookmark(parentId, - this._makeURI(items[iid]["link"]), - index, items[iid]["title"]); - - if (items[iid]["description"]) { - PlacesUtils.annotations.setItemAnnotation(newId, "bookmarkProperties/description", - items[iid]["description"], 0, - PlacesUtils.annotations.EXPIRE_NEVER); - } - - break; - } - } - }, - - _customizationsApplied: false, - applyCustomizations: function() { - this._customizationsApplied = true; - if (!this._iniFile) { - return this._checkCustomizationComplete(); - } - - // nsPrefService loads very early. Reload prefs so we can set - // distribution defaults during the prefservice:after-app-defaults - // notification (see applyPrefDefaults below) - this._prefSvc.QueryInterface(Ci.nsIObserver); - this._prefSvc.observe(null, "reload-default-prefs", null); - }, - - _bookmarksApplied: false, - applyBookmarks: function() { - this._bookmarksApplied = true; - if (!this._iniFile) { - return this._checkCustomizationComplete(); - } - - let sections = enumToObject(this._ini.getSections()); - - // The global section, and several of its fields, is required - // (we also check here to be consistent with applyPrefDefaults below) - if (!sections["Global"]) { - return this._checkCustomizationComplete(); - } - let globalPrefs = enumToObject(this._ini.getKeys("Global")); - if (!(globalPrefs["id"] && globalPrefs["version"] && globalPrefs["about"])) { - return this._checkCustomizationComplete(); - } - - let bmProcessedPref; - try { - bmProcessedPref = this._ini.getString("Global", - "bookmarks.initialized.pref"); - } catch(e) { - bmProcessedPref = "distribution." + - this._ini.getString("Global", "id") + ".bookmarksProcessed"; - } - - let bmProcessed = this._prefs.getBoolPref(bmProcessedPref, false); - - if (!bmProcessed) { - if (sections["BookmarksMenu"]) { - this._parseBookmarksSection(PlacesUtils.bookmarksMenuFolderId, - "BookmarksMenu"); - } - if (sections["BookmarksToolbar"]) { - this._parseBookmarksSection(PlacesUtils.toolbarFolderId, - "BookmarksToolbar"); - } - this._prefs.setBoolPref(bmProcessedPref, true); - } - return this._checkCustomizationComplete(); - }, - - _prefDefaultsApplied: false, - applyPrefDefaults: function() { - this._prefDefaultsApplied = true; - if (!this._iniFile) { - return this._checkCustomizationComplete(); - } - - let sections = enumToObject(this._ini.getSections()); - - // The global section, and several of its fields, is required - if (!sections["Global"]) { - return this._checkCustomizationComplete(); - } - let globalPrefs = enumToObject(this._ini.getKeys("Global")); - if (!(globalPrefs["id"] && globalPrefs["version"] && globalPrefs["about"])) { - return this._checkCustomizationComplete(); - } - - let defaults = this._prefSvc.getDefaultBranch(null); - - // Global really contains info we set as prefs. They're only - // separate because they are "special" (read: required) - - defaults.setCharPref("distribution.id", this._ini.getString("Global", "id")); - defaults.setCharPref("distribution.version", - this._ini.getString("Global", "version")); - - let partnerAbout = Cc["@mozilla.org/supports-string;1"] - .createInstance(Ci.nsISupportsString); - try { - if (globalPrefs["about." + this._locale]) { - partnerAbout.data = this._ini.getString("Global", "about." + this._locale); - } else { - partnerAbout.data = this._ini.getString("Global", "about"); - } - defaults.setComplexValue("distribution.about", - Ci.nsISupportsString, partnerAbout); - } catch(e) { - /* ignore bad prefs due to bug 895473 and move on */ - Cu.reportError(e); - } - - if (sections["Preferences"]) { - for (let key in enumerate(this._ini.getKeys("Preferences"))) { - try { - let value = eval(this._ini.getString("Preferences", key)); - switch (typeof value) { - case "boolean": - defaults.setBoolPref(key, value); - break; - case "number": - defaults.setIntPref(key, value); - break; - case "string": - defaults.setCharPref(key, value); - break; - case "undefined": - defaults.setCharPref(key, value); - break; - } - } catch(e) { - /* ignore bad prefs and move on */ - } - } - } - - // We eval() the localizable prefs as well (even though they'll - // always get set as a string) to keep the INI format consistent: - // string prefs always need to be in quotes - - let localizedStr = Cc["@mozilla.org/pref-localizedstring;1"] - .createInstance(Ci.nsIPrefLocalizedString); - - if (sections["LocalizablePreferences"]) { - for (let key in enumerate(this._ini.getKeys("LocalizablePreferences"))) { - try { - let value = eval(this._ini.getString("LocalizablePreferences", key)); - value = value.replace("%LOCALE%", this._locale, "g"); - localizedStr.data = "data:text/plain," + key + "=" + value; - defaults.setComplexValue(key, Ci.nsIPrefLocalizedString, localizedStr); - } catch(e) { - /* ignore bad prefs and move on */ - } - } - } - - if (sections["LocalizablePreferences-" + this._locale]) { - for (let key in enumerate(this._ini.getKeys("LocalizablePreferences-" + this._locale))) { - try { - let value = eval(this._ini.getString("LocalizablePreferences-" + this._locale, key)); - localizedStr.data = "data:text/plain," + key + "=" + value; - defaults.setComplexValue(key, Ci.nsIPrefLocalizedString, localizedStr); - } catch(e) { - /* ignore bad prefs and move on */ - } - } - } - - return this._checkCustomizationComplete(); - }, - - _checkCustomizationComplete: function() { - let prefDefaultsApplied = this._prefDefaultsApplied || !this._iniFile; - if (this._customizationsApplied && this._bookmarksApplied && - prefDefaultsApplied) { - let os = Cc["@mozilla.org/observer-service;1"] - .getService(Ci.nsIObserverService); - os.notifyObservers(null, DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC, null); - } - } -}; - -function enumerate(UTF8Enumerator) { - while (UTF8Enumerator.hasMore()) { - yield UTF8Enumerator.getNext(); - } -} - -function enumToObject(UTF8Enumerator) { - let ret = {}; - for (let i in enumerate(UTF8Enumerator)) { - ret[i] = 1; - } - return ret; -} diff --git a/application/palemoon/components/downloads/BrowserDownloads.manifest b/application/palemoon/components/downloads/BrowserDownloads.manifest deleted file mode 100644 index 1881ca1d7d..0000000000 --- a/application/palemoon/components/downloads/BrowserDownloads.manifest +++ /dev/null @@ -1,4 +0,0 @@ -component {49507fe5-2cee-4824-b6a3-e999150ce9b8} DownloadsStartup.js -contract @mozilla.org/browser/downloadsstartup;1 {49507fe5-2cee-4824-b6a3-e999150ce9b8} -category profile-after-change DownloadsStartup @mozilla.org/browser/downloadsstartup;1 -component {4d99321e-d156-455b-81f7-e7aa2308134f} DownloadsUI.js diff --git a/application/palemoon/components/downloads/DownloadsCommon.jsm b/application/palemoon/components/downloads/DownloadsCommon.jsm deleted file mode 100644 index 920d1cff35..0000000000 --- a/application/palemoon/components/downloads/DownloadsCommon.jsm +++ /dev/null @@ -1,1921 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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"; - -this.EXPORTED_SYMBOLS = [ - "DownloadsCommon", -]; - -/** - * Handles the Downloads panel shared methods and data access. - * - * This file includes the following constructors and global objects: - * - * DownloadsCommon - * This object is exposed directly to the consumers of this JavaScript module, - * and provides shared methods for all the instances of the user interface. - * - * DownloadsData - * Retrieves the list of past and completed downloads from the underlying - * Downloads API data, and provides asynchronous notifications allowing - * to build a consistent view of the available data. - * - * DownloadsIndicatorData - * This object registers itself with DownloadsData as a view, and transforms the - * notifications it receives into overall status data, that is then broadcast to - * the registered download status indicators. - */ - -//////////////////////////////////////////////////////////////////////////////// -//// Globals - -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; -const Cr = Components.results; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", - "resource://gre/modules/PluralForm.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Downloads", - "resource://gre/modules/Downloads.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadUIHelper", - "resource://gre/modules/DownloadUIHelper.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils", - "resource://gre/modules/DownloadUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", - "resource://gre/modules/FileUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "OS", - "resource://gre/modules/osfile.jsm") -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Promise", - "resource://gre/modules/Promise.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsLogger", - "resource:///modules/DownloadsLogger.jsm"); - -const nsIDM = Ci.nsIDownloadManager; - -const kDownloadsStringBundleUrl = - "chrome://browser/locale/downloads/downloads.properties"; - -const kPrefConfirmOpenExe = "browser.download.confirmOpenExecutable"; - -const kDownloadsStringsRequiringFormatting = { - sizeWithUnits: true, - shortTimeLeftSeconds: true, - shortTimeLeftMinutes: true, - shortTimeLeftHours: true, - shortTimeLeftDays: true, - statusSeparator: true, - statusSeparatorBeforeNumber: true, - fileExecutableSecurityWarning: true -}; - -const kDownloadsStringsRequiringPluralForm = { - otherDownloads2: true -}; - -const kPartialDownloadSuffix = ".part"; - -const kPrefBranch = Services.prefs.getBranch("browser.download."); - -var PrefObserver = { - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, - Ci.nsISupportsWeakReference]), - getPref: function(name) { - try { - switch (typeof this.prefs[name]) { - case "boolean": - return kPrefBranch.getBoolPref(name); - } - } catch (ex) { } - return this.prefs[name]; - }, - observe: function(aSubject, aTopic, aData) { - if (this.prefs.hasOwnProperty(aData)) { - return this[aData] = this.getPref(aData); - } - }, - register: function(prefs) { - this.prefs = prefs; - kPrefBranch.addObserver("", this, true); - for (let key in prefs) { - let name = key; - XPCOMUtils.defineLazyGetter(this, name, function() { - return PrefObserver.getPref(name); - }); - } - }, -}; - -PrefObserver.register({ - // prefName: defaultValue - debug: false, - animateNotifications: true -}); - - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsCommon - -/** - * This object is exposed directly to the consumers of this JavaScript module, - * and provides shared methods for all the instances of the user interface. - */ -this.DownloadsCommon = { - log: function(...aMessageArgs) { - delete this.log; - this.log = function(...aMessageArgs) { - if (!PrefObserver.debug) { - return; - } - DownloadsLogger.log.apply(DownloadsLogger, aMessageArgs); - } - this.log.apply(this, aMessageArgs); - }, - - error: function(...aMessageArgs) { - delete this.error; - this.error = function(...aMessageArgs) { - if (!PrefObserver.debug) { - return; - } - DownloadsLogger.reportError.apply(DownloadsLogger, aMessageArgs); - } - this.error.apply(this, aMessageArgs); - }, - /** - * Returns an object whose keys are the string names from the downloads string - * bundle, and whose values are either the translated strings or functions - * returning formatted strings. - */ - get strings() - { - let strings = {}; - let sb = Services.strings.createBundle(kDownloadsStringBundleUrl); - let enumerator = sb.getSimpleEnumeration(); - while (enumerator.hasMoreElements()) { - let string = enumerator.getNext().QueryInterface(Ci.nsIPropertyElement); - let stringName = string.key; - if (stringName in kDownloadsStringsRequiringFormatting) { - strings[stringName] = function() { - // Convert "arguments" to a real array before calling into XPCOM. - return sb.formatStringFromName(stringName, - Array.slice(arguments, 0), - arguments.length); - }; - } else if (stringName in kDownloadsStringsRequiringPluralForm) { - strings[stringName] = function(aCount) { - // Convert "arguments" to a real array before calling into XPCOM. - let formattedString = sb.formatStringFromName(stringName, - Array.slice(arguments, 0), - arguments.length); - return PluralForm.get(aCount, formattedString); - }; - } else { - strings[stringName] = string.value; - } - } - delete this.strings; - return this.strings = strings; - }, - - /** - * Generates a very short string representing the given time left. - * - * @param aSeconds - * Value to be formatted. It represents the number of seconds, it must - * be positive but does not need to be an integer. - * - * @return Formatted string, for example "30s" or "2h". The returned value is - * maximum three characters long, at least in English. - */ - formatTimeLeft: function(aSeconds) - { - // Decide what text to show for the time - let seconds = Math.round(aSeconds); - if (!seconds) { - return ""; - } else if (seconds <= 30) { - return DownloadsCommon.strings["shortTimeLeftSeconds"](seconds); - } - let minutes = Math.round(aSeconds / 60); - if (minutes < 60) { - return DownloadsCommon.strings["shortTimeLeftMinutes"](minutes); - } - let hours = Math.round(minutes / 60); - if (hours < 48) { // two days - return DownloadsCommon.strings["shortTimeLeftHours"](hours); - } - let days = Math.round(hours / 24); - return DownloadsCommon.strings["shortTimeLeftDays"](Math.min(days, 99)); - }, - - /** - * Indicates whether we should show the full Download Manager window interface - * instead of the simplified panel interface. The behavior of downloads - * across browsing session is consistent with the selected interface. - */ - get useToolkitUI() - { - /* Toolkit UI is currently incompatible. - * FIXME: Either fix the toolkitUI (make DBConnection work) or remove - * the unused code altogether - */ - //try { - // return Services.prefs.getBoolPref("browser.download.useToolkitUI"); - //} catch (ex) { } - return false; - }, - - /** - * Indicates whether we should show visual notification on the indicator - * when a download event is triggered. - */ - get animateNotifications() - { - return PrefObserver.animateNotifications; - }, - - /** - * Get access to one of the DownloadsData or PrivateDownloadsData objects, - * depending on the privacy status of the window in question. - * - * @param aWindow - * The browser window which owns the download button. - */ - getData: function(aWindow) { - if (PrivateBrowsingUtils.isWindowPrivate(aWindow)) { - return PrivateDownloadsData; - } else { - return DownloadsData; - } - }, - - /** - * Initializes the data link for both the private and non-private downloads - * data objects. - * - * @param aDownloadManagerService - * Reference to the service implementing nsIDownloadManager. We need - * this because getService isn't available for us when this method is - * called, and we must ensure to register our listeners before the - * getService call for the Download Manager returns. - */ - initializeAllDataLinks: function(aDownloadManagerService) { - DownloadsData.initializeDataLink(aDownloadManagerService); - PrivateDownloadsData.initializeDataLink(aDownloadManagerService); - }, - - /** - * Terminates the data link for both the private and non-private downloads - * data objects. - */ - terminateAllDataLinks: function() { - DownloadsData.terminateDataLink(); - PrivateDownloadsData.terminateDataLink(); - }, - - /** - * Reloads the specified kind of downloads from the non-private store. - * This method must only be called when Private Browsing Mode is disabled. - * - * @param aActiveOnly - * True to load only active downloads from the database. - */ - ensureAllPersistentDataLoaded: - function(aActiveOnly) { - DownloadsData.ensurePersistentDataLoaded(aActiveOnly); - }, - - /** - * Get access to one of the DownloadsIndicatorData or - * PrivateDownloadsIndicatorData objects, depending on the privacy status of - * the window in question. - */ - getIndicatorData: function(aWindow) { - if (PrivateBrowsingUtils.isWindowPrivate(aWindow)) { - return PrivateDownloadsIndicatorData; - } else { - return DownloadsIndicatorData; - } - }, - - /** - * Returns a reference to the DownloadsSummaryData singleton - creating one - * in the process if one hasn't been instantiated yet. - * - * @param aWindow - * The browser window which owns the download button. - * @param aNumToExclude - * The number of items on the top of the downloads list to exclude - * from the summary. - */ - getSummary: function(aWindow, aNumToExclude) - { - if (PrivateBrowsingUtils.isWindowPrivate(aWindow)) { - if (this._privateSummary) { - return this._privateSummary; - } - return this._privateSummary = new DownloadsSummaryData(true, aNumToExclude); - } else { - if (this._summary) { - return this._summary; - } - return this._summary = new DownloadsSummaryData(false, aNumToExclude); - } - }, - _summary: null, - _privateSummary: null, - - /** - * Returns the legacy state integer value for the provided Download object. - */ - stateOfDownload(download) { - // Collapse state using the correct priority. - if (!download.stopped) { - return nsIDM.DOWNLOAD_DOWNLOADING; - } - if (download.succeeded) { - return nsIDM.DOWNLOAD_FINISHED; - } - if (download.error) { - if (download.error.becauseBlockedByParentalControls) { - return nsIDM.DOWNLOAD_BLOCKED_PARENTAL; - } - if (download.error.becauseBlockedByReputationCheck) { - return nsIDM.DOWNLOAD_DIRTY; - } - return nsIDM.DOWNLOAD_FAILED; - } - if (download.canceled) { - if (download.hasPartialData) { - return nsIDM.DOWNLOAD_PAUSED; - } - return nsIDM.DOWNLOAD_CANCELED; - } - return nsIDM.DOWNLOAD_NOTSTARTED; - }, - - /** - * Helper function required because the Downloads Panel and the Downloads View - * don't share the controller yet. - */ - removeAndFinalizeDownload(download) { - Downloads.getList(Downloads.ALL) - .then(list => list.remove(download)) - .then(() => download.finalize(true)) - .catch(Cu.reportError); - }, - - /** - * Given an iterable collection of Download objects, generates and returns - * statistics about that collection. - * - * @param downloads An iterable collection of Download objects. - * - * @return Object whose properties are the generated statistics. Currently, - * we return the following properties: - * - * numActive : The total number of downloads. - * numPaused : The total number of paused downloads. - * numDownloading : The total number of downloads being downloaded. - * totalSize : The total size of all downloads once completed. - * totalTransferred: The total amount of transferred data for these - * downloads. - * slowestSpeed : The slowest download rate. - * rawTimeLeft : The estimated time left for the downloads to - * complete. - * percentComplete : The percentage of bytes successfully downloaded. - */ - summarizeDownloads(downloads) { - let summary = { - numActive: 0, - numPaused: 0, - numDownloading: 0, - totalSize: 0, - totalTransferred: 0, - // slowestSpeed is Infinity so that we can use Math.min to - // find the slowest speed. We'll set this to 0 afterwards if - // it's still at Infinity by the time we're done iterating all - // download. - slowestSpeed: Infinity, - rawTimeLeft: -1, - percentComplete: -1 - } - - for (let download of downloads) { - summary.numActive++; - - if (!download.stopped) { - summary.numDownloading++; - if (download.hasProgress && download.speed > 0) { - let sizeLeft = download.totalBytes - download.currentBytes; - summary.rawTimeLeft = Math.max(summary.rawTimeLeft, - sizeLeft / download.speed); - summary.slowestSpeed = Math.min(summary.slowestSpeed, - download.speed); - } - } else if (download.canceled && download.hasPartialData) { - summary.numPaused++; - } - // Only add to total values if we actually know the download size. - if (download.succeeded) { - summary.totalSize += download.target.size; - summary.totalTransferred += download.target.size; - } else if (download.hasProgress) { - summary.totalSize += download.totalBytes; - summary.totalTransferred += download.currentBytes; - } - } - - if (summary.totalSize != 0) { - summary.percentComplete = (summary.totalTransferred / - summary.totalSize) * 100; - } - - if (summary.slowestSpeed == Infinity) { - summary.slowestSpeed = 0; - } - - return summary; - }, - - /** - * If necessary, smooths the estimated number of seconds remaining for one - * or more downloads to complete. - * - * @param aSeconds - * Current raw estimate on number of seconds left for one or more - * downloads. This is a floating point value to help get sub-second - * accuracy for current and future estimates. - */ - smoothSeconds: function(aSeconds, aLastSeconds) - { - // We apply an algorithm similar to the DownloadUtils.getTimeLeft function, - // though tailored to a single time estimation for all downloads. We never - // apply something if the new value is less than half the previous value. - let shouldApplySmoothing = aLastSeconds >= 0 && - aSeconds > aLastSeconds / 2; - if (shouldApplySmoothing) { - // Apply hysteresis to favor downward over upward swings. Trust only 30% - // of the new value if lower, and 10% if higher (exponential smoothing). - let diff = aSeconds - aLastSeconds; - aSeconds = aLastSeconds + (diff < 0 ? .3 : .1) * diff; - - // If the new time is similar, reuse something close to the last time - // left, but subtract a little to provide forward progress. - diff = aSeconds - aLastSeconds; - let diffPercent = diff / aLastSeconds * 100; - if (Math.abs(diff) < 5 || Math.abs(diffPercent) < 5) { - aSeconds = aLastSeconds - (diff < 0 ? .4 : .2); - } - } - - // In the last few seconds of downloading, we are always subtracting and - // never adding to the time left. Ensure that we never fall below one - // second left until all downloads are actually finished. - return aLastSeconds = Math.max(aSeconds, 1); - }, - - /** - * Opens a downloaded file. - * - * @param aFile - * the downloaded file to be opened. - * @param aMimeInfo - * the mime type info object. May be null. - * @param aOwnerWindow - * the window with which this action is associated. - */ - openDownloadedFile: function(aFile, aMimeInfo, aOwnerWindow) { - if (!(aFile instanceof Ci.nsIFile)) - throw new Error("aFile must be a nsIFile object"); - if (aMimeInfo && !(aMimeInfo instanceof Ci.nsIMIMEInfo)) - throw new Error("Invalid value passed for aMimeInfo"); - if (!(aOwnerWindow instanceof Ci.nsIDOMWindow)) - throw new Error("aOwnerWindow must be a dom-window object"); - -#ifdef XP_WIN - // On Windows, the system will provide a native confirmation prompt - // for .exe files. Exclude this from our prompt, but prompt on other - // executable types. - let isWindowsExe = aFile.leafName.toLowerCase().endsWith(".exe"); -#else - let isWindowsExe = false; -#endif - - // Confirm opening executable files if required. - if (aFile.isExecutable() && !isWindowsExe) { - let showAlert = true; - try { - showAlert = Services.prefs.getBoolPref(kPrefConfirmOpenExe); - } catch (ex) { - // If the preference does not exist, continue with the prompt. - } - - if (showAlert) { - let name = aFile.leafName; - let message = - DownloadsCommon.strings.fileExecutableSecurityWarning(name, name); - let title = - DownloadsCommon.strings.fileExecutableSecurityWarningTitle; - - let open = Services.prompt.confirm(aOwnerWindow, title, message); - if (!open) { - return; - } - } - } - - // Actually open the file. - try { - if (aMimeInfo && aMimeInfo.preferredAction == aMimeInfo.useHelperApp) { - aMimeInfo.launchWithFile(aFile); - return; - } - } - catch(ex) { } - - // If either we don't have the mime info, or the preferred action failed, - // attempt to launch the file directly. - try { - aFile.launch(); - } - catch(ex) { - // If launch fails, try sending it through the system's external "file:" - // URL handler. - Cc["@mozilla.org/uriloader/external-protocol-service;1"] - .getService(Ci.nsIExternalProtocolService) - .loadUrl(NetUtil.newURI(aFile)); - } - }, - - /** - * Show a downloaded file in the system file manager. - * - * @param aFile - * a downloaded file. - */ - showDownloadedFile: function(aFile) { - if (!(aFile instanceof Ci.nsIFile)) - throw new Error("aFile must be a nsIFile object"); - try { - // Show the directory containing the file and select the file. - aFile.reveal(); - } catch (ex) { - // If reveal fails for some reason (e.g., it's not implemented on unix - // or the file doesn't exist), try using the parent if we have it. - let parent = aFile.parent; - if (parent) { - try { - // Open the parent directory to show where the file should be. - parent.launch(); - } catch (ex) { - // If launch also fails (probably because it's not implemented), let - // the OS handler try to open the parent. - Cc["@mozilla.org/uriloader/external-protocol-service;1"] - .getService(Ci.nsIExternalProtocolService) - .loadUrl(NetUtil.newURI(parent)); - } - } - } - } -}; - -/** - * Returns true if we are executing on Windows Vista or a later version. - */ -XPCOMUtils.defineLazyGetter(DownloadsCommon, "isWinVistaOrHigher", function() { - let os = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).OS; - if (os != "WINNT") { - return false; - } - let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2); - return parseFloat(sysInfo.getProperty("version")) >= 6; -}); - -/** - * Returns true to indicate that we should hook the panel to the JavaScript API - * for downloads instead of the nsIDownloadManager back-end. - * This is kept for compatibility/leftovers and should be removed later. - */ -XPCOMUtils.defineLazyGetter(DownloadsCommon, "useJSTransfer", function() { - return true; -}); - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsData - -/** - * Retrieves the list of past and completed downloads from the underlying - * Download Manager data, and provides asynchronous notifications allowing to - * build a consistent view of the available data. - * - * This object responds to real-time changes in the underlying Download Manager - * data. For example, the deletion of one or more downloads is notified through - * the nsIObserver interface, while any state or progress change is notified - * through the nsIDownloadProgressListener interface. - * - * Note that using this object does not automatically start the Download Manager - * service. Consumers will see an empty list of downloads until the service is - * actually started. This is useful to display a neutral progress indicator in - * the main browser window until the autostart timeout elapses. - * - * Note that DownloadsData and PrivateDownloadsData are two equivalent singleton - * objects, one accessing non-private downloads, and the other accessing private - * ones. - */ -function DownloadsDataCtor(aPrivate) { - this._isPrivate = aPrivate; - - // Contains all the available Download objects and their integer state. - this.oldDownloadStates = new Map(); - - // Array of view objects that should be notified when the available download - // data changes. - this._views = []; -} - -DownloadsDataCtor.prototype = { - /** - * Starts receiving events for current downloads. - */ - initializeDataLink() { - if (!this._dataLinkInitialized) { - let promiseList = Downloads.getList(this._isPrivate ? Downloads.PRIVATE - : Downloads.PUBLIC); - promiseList.then(list => list.addView(this)).then(null, Cu.reportError); - this._dataLinkInitialized = true; - } - }, - _dataLinkInitialized: false, - - /** - * Stops receiving events for current downloads and cancels any pending read. - */ - terminateDataLink: function() - { - Cu.reportError("terminateDataLink not applicable with JS Transfers"); - return; - }, - - /** - * Iterator for all the available Download objects. This is empty until the - * data has been loaded using the JavaScript API for downloads. - */ - get downloads() { - return this.oldDownloadStates.keys(); - }, - - /** - * True if there are finished downloads that can be removed from the list. - */ - get canRemoveFinished() - { - for (let download of this.downloads) { - // Stopped, paused, and failed downloads with partial data are removed. - if (download.stopped && !(download.canceled && download.hasPartialData)) { - return true; - } - } - return false; - }, - - /** - * Asks the back-end to remove finished downloads from the list. - */ - removeFinished: function() - { - let promiseList = Downloads.getList(this._isPrivate ? Downloads.PRIVATE - : Downloads.PUBLIC); - promiseList.then(list => list.removeFinished()) - .then(null, Cu.reportError); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Integration with the asynchronous Downloads back-end - - onDownloadAdded(download) { - // Download objects do not store the end time of downloads, as the Downloads - // API does not need to persist this information for all platforms. Once a - // download terminates on a Desktop browser, it becomes a history download, - // for which the end time is stored differently, as a Places annotation. - download.endTime = Date.now(); - - this.oldDownloadStates.set(download, - DownloadsCommon.stateOfDownload(download)); - - for (let view of this._views) { - view.onDownloadAdded(download, true); - } - }, - - onDownloadChanged(download) { - let oldState = this.oldDownloadStates.get(download); - let newState = DownloadsCommon.stateOfDownload(download); - this.oldDownloadStates.set(download, newState); - - if (oldState != newState) { - if (download.succeeded || - (download.canceled && !download.hasPartialData) || - download.error) { - // Store the end time that may be displayed by the views. - download.endTime = Date.now(); - - // This state transition code should actually be located in a Downloads - // API module (bug 941009). Moreover, the fact that state is stored as - // annotations should be ideally hidden behind methods of - // nsIDownloadHistory (bug 830415). - if (!this._isPrivate) { - try { - let downloadMetaData = { - state: DownloadsCommon.stateOfDownload(download), - endTime: download.endTime, - }; - if (download.succeeded) { - downloadMetaData.fileSize = download.target.size; - } - - PlacesUtils.annotations.setPageAnnotation( - NetUtil.newURI(download.source.url), - "downloads/metaData", - JSON.stringify(downloadMetaData), 0, - PlacesUtils.annotations.EXPIRE_WITH_HISTORY); - } catch (ex) { - Cu.reportError(ex); - } - } - } - - for (let view of this._views) { - try { - view.onDownloadStateChanged(download); - } catch (ex) { - Cu.reportError(ex); - } - } - - if (download.succeeded || - (download.error && download.error.becauseBlocked)) { - this._notifyDownloadEvent("finish"); - } - } - - if (!download.newDownloadNotified) { - download.newDownloadNotified = true; - this._notifyDownloadEvent("start"); - } - - for (let view of this._views) { - view.onDownloadChanged(download); - } - }, - - onDownloadRemoved(download) { - this.oldDownloadStates.delete(download); - - for (let view of this._views) { - view.onDownloadRemoved(download); - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Registration of views - - /** - * Adds an object to be notified when the available download data changes. - * The specified object is initialized with the currently available downloads. - * - * @param aView - * DownloadsView object to be added. This reference must be passed to - * removeView before termination. - */ - addView: function(aView) - { - this._views.push(aView); - this._updateView(aView); - }, - - /** - * Removes an object previously added using addView. - * - * @param aView - * DownloadsView object to be removed. - */ - removeView: function(aView) - { - let index = this._views.indexOf(aView); - if (index != -1) { - this._views.splice(index, 1); - } - }, - - /** - * Ensures that the currently loaded data is added to the specified view. - * - * @param aView - * DownloadsView object to be initialized. - */ - _updateView: function(aView) - { - // Indicate to the view that a batch loading operation is in progress. - aView.onDataLoadStarting(); - - // Sort backwards by start time, ensuring that the most recent - // downloads are added first regardless of their state. - // Tycho: - //let loadedItemsArray = [dataItem - // for each (dataItem in this.dataItems) - // if (dataItem)]; - let downloadsArray = [...this.downloads]; - downloadsArray.sort((a, b) => b.startTime - a.startTime); - downloadsArray.forEach(download => aView.onDownloadAdded(download, false)); - - // Notify the view that all data is available unless loading is in progress. - if (!this._pendingStatement) { - aView.onDataLoadCompleted(); - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// In-memory downloads data store - - /** - * Clears the loaded data. - */ - clear: function() - { - this._terminateDataAccess(); - this.dataItems = {}; - }, - - /** - * Returns the data item associated with the provided source object. The - * source can be a download object that we received from the Download Manager - * because of a real-time notification, or a row from the downloads database, - * during the asynchronous data load. - * - * In case we receive download status notifications while we are still - * populating the list of downloads from the database, we want the real-time - * status to take precedence over the state that is read from the database, - * which might be older. This is achieved by creating the download item if - * it's not already in the list, but never updating the returned object using - * the data from the database, if the object already exists. - * - * @param aSource - * Object containing the data with which the item should be initialized - * if it doesn't already exist in the list. This should implement - * either nsIDownload or mozIStorageRow. If the item exists, this - * argument is only used to retrieve the download identifier. - * @param aMayReuseGUID - * If false, indicates that the download should not be added if a - * download with the same identifier was removed in the meantime. This - * ensures that, while loading the list asynchronously, downloads that - * have been removed in the meantime do no reappear inadvertently. - * - * @return New or existing data item, or null if the item was deleted from the - * list of available downloads. - */ - _getOrAddDataItem: function(aSource, aMayReuseGUID) - { - let downloadGuid = (aSource instanceof Ci.nsIDownload) - ? aSource.guid - : aSource.getResultByName("guid"); - if (downloadGuid in this.dataItems) { - let existingItem = this.dataItems[downloadGuid]; - if (existingItem || !aMayReuseGUID) { - // Returns null if the download was removed and we can't reuse the item. - return existingItem; - } - } - DownloadsCommon.log("Creating a new DownloadsDataItem with downloadGuid =", - downloadGuid); - let dataItem = new DownloadsDataItem(aSource); - this.dataItems[downloadGuid] = dataItem; - - // Create the view items before returning. - let addToStartOfList = aSource instanceof Ci.nsIDownload; - this._views.forEach( - function(view) view.onDataItemAdded(dataItem, addToStartOfList) - ); - return dataItem; - }, - - /** - * Removes the data item with the specified identifier. - * - * This method can be called at most once per download identifier. - */ - _removeDataItem: function(aDownloadId) - { - if (aDownloadId in this.dataItems) { - let dataItem = this.dataItems[aDownloadId]; - this.dataItems[aDownloadId] = null; - this._views.forEach( - function(view) view.onDataItemRemoved(dataItem) - ); - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Persistent data loading - - /** - * Represents an executing statement, allowing its cancellation. - */ - _pendingStatement: null, - - /** - * Indicates which kind of items from the persistent downloads database have - * been fully loaded in memory and are available to the views. This can - * assume the value of one of the kLoad constants. - */ - _loadState: 0, - - /** No downloads have been fully loaded yet. */ - get kLoadNone() 0, - /** All the active downloads in the database are loaded in memory. */ - get kLoadActive() 1, - /** All the downloads in the database are loaded in memory. */ - get kLoadAll() 2, - - /** - * Reloads the specified kind of downloads from the persistent database. This - * method must only be called when Private Browsing Mode is disabled. - * - * @param aActiveOnly - * True to load only active downloads from the database. - */ - ensurePersistentDataLoaded: - function(aActiveOnly) - { - if (this == PrivateDownloadsData) { - Cu.reportError("ensurePersistentDataLoaded should not be called on PrivateDownloadsData"); - return; - } - - if (this._pendingStatement) { - // We are already in the process of reloading all downloads. - return; - } - - if (aActiveOnly) { - if (this._loadState == this.kLoadNone) { - DownloadsCommon.log("Loading only active downloads from the persistence database"); - // Indicate to the views that a batch loading operation is in progress. - this._views.forEach( - function(view) view.onDataLoadStarting() - ); - - // Reload the list using the Download Manager service. The list is - // returned in no particular order. - let downloads = Services.downloads.activeDownloads; - while (downloads.hasMoreElements()) { - let download = downloads.getNext().QueryInterface(Ci.nsIDownload); - this._getOrAddDataItem(download, true); - } - this._loadState = this.kLoadActive; - - // Indicate to the views that the batch loading operation is complete. - this._views.forEach( - function(view) view.onDataLoadCompleted() - ); - DownloadsCommon.log("Active downloads done loading."); - } - } else { - if (this._loadState != this.kLoadAll) { - // Load only the relevant columns from the downloads database. The - // columns are read in the _initFromDataRow method of DownloadsDataItem. - // Order by descending download identifier so that the most recent - // downloads are notified first to the listening views. - DownloadsCommon.log("Loading all downloads from the persistence database."); - let dbConnection = Services.downloads.DBConnection; - let statement = dbConnection.createAsyncStatement( - "SELECT guid, target, name, source, referrer, state, " - + "startTime, endTime, currBytes, maxBytes " - + "FROM moz_downloads " - + "ORDER BY startTime DESC" - ); - try { - this._pendingStatement = statement.executeAsync(this); - } finally { - statement.finalize(); - } - } - } - }, - - /** - * Cancels any pending data access and ensures views are notified. - */ - _terminateDataAccess: function() - { - if (this._pendingStatement) { - this._pendingStatement.cancel(); - this._pendingStatement = null; - } - - // Close all the views on the current data. Create a copy of the array - // because some views might unregister while processing this event. - Array.slice(this._views, 0).forEach( - function(view) view.onDataInvalidated() - ); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// mozIStorageStatementCallback - - handleResult: function(aResultSet) - { - for (let row = aResultSet.getNextRow(); - row; - row = aResultSet.getNextRow()) { - // Add the download to the list and initialize it with the data we read, - // unless we already received a notification providing more reliable - // information for this download. - this._getOrAddDataItem(row, false); - } - }, - - handleError: function(aError) - { - DownloadsCommon.error("Database statement execution error (", - aError.result, "): ", aError.message); - }, - - handleCompletion: function(aReason) - { - DownloadsCommon.log("Loading all downloads from database completed with reason:", - aReason); - this._pendingStatement = null; - - // To ensure that we don't inadvertently delete more downloads from the - // database than needed on shutdown, we should update the load state only if - // the operation completed successfully. - if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) { - this._loadState = this.kLoadAll; - } - - // Indicate to the views that the batch loading operation is complete, even - // if the lookup failed or was canceled. The only possible glitch happens - // in case the database backend changes while loading data, when the views - // would open and immediately close. This case is rare enough not to need a - // special treatment. - this._views.forEach( - function(view) view.onDataLoadCompleted() - ); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// nsIObserver - - observe: function(aSubject, aTopic, aData) - { - switch (aTopic) { - case "download-manager-remove-download-guid": - // If a single download was removed, remove the corresponding data item. - if (aSubject) { - let downloadGuid = aSubject.QueryInterface(Ci.nsISupportsCString).data; - DownloadsCommon.log("A single download with id", - downloadGuid, "was removed."); - this._removeDataItem(downloadGuid); - break; - } - - // Multiple downloads have been removed. Iterate over known downloads - // and remove those that don't exist anymore. - DownloadsCommon.log("Multiple downloads were removed."); - for each (let dataItem in this.dataItems) { - if (dataItem) { - // Bug 449811 - We have to bind to the dataItem because Javascript - // doesn't do fresh let-bindings per loop iteration. - let dataItemBinding = dataItem; - Services.downloads.getDownloadByGUID(dataItemBinding.downloadGuid, - function(aStatus, aResult) { - if (aStatus == Components.results.NS_ERROR_NOT_AVAILABLE) { - DownloadsCommon.log("Removing download with id", - dataItemBinding.downloadGuid); - this._removeDataItem(dataItemBinding.downloadGuid); - } - }.bind(this)); - } - } - break; - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// nsIDownloadProgressListener - - onDownloadStateChange: function(aOldState, aDownload) - { - if (aDownload.isPrivate != this._isPrivate) { - // Ignore the downloads with a privacy status other than what we are - // tracking. - return; - } - - // When a new download is added, it may have the same identifier of a - // download that we previously deleted during this session, and we also - // want to provide a visible indication that the download started. - let isNew = aOldState == nsIDM.DOWNLOAD_NOTSTARTED || - aOldState == nsIDM.DOWNLOAD_QUEUED; - - let dataItem = this._getOrAddDataItem(aDownload, isNew); - if (!dataItem) { - return; - } - - let wasInProgress = dataItem.inProgress; - - DownloadsCommon.log("A download changed its state to:", aDownload.state); - dataItem.state = aDownload.state; - dataItem.referrer = aDownload.referrer && aDownload.referrer.spec; - dataItem.resumable = aDownload.resumable; - dataItem.startTime = Math.round(aDownload.startTime / 1000); - dataItem.currBytes = aDownload.amountTransferred; - dataItem.maxBytes = aDownload.size; - - if (wasInProgress && !dataItem.inProgress) { - dataItem.endTime = Date.now(); - } - - // When a download is retried, we create a different download object from - // the database with the same ID as before. This means that the nsIDownload - // that the dataItem holds might now need updating. - // - // We only overwrite this in the event that _download exists, because if it - // doesn't, that means that no caller ever tried to get the nsIDownload, - // which means it was never retrieved and doesn't need to be overwritten. - if (dataItem._download) { - dataItem._download = aDownload; - } - - for (let view of this._views) { - try { - view.getViewItem(dataItem).onStateChange(aOldState); - } catch (ex) { - Cu.reportError(ex); - } - } - - if (isNew && !dataItem.newDownloadNotified) { - dataItem.newDownloadNotified = true; - this._notifyDownloadEvent("start"); - } - - // This is a final state of which we are only notified once. - if (dataItem.done) { - this._notifyDownloadEvent("finish"); - } - - // TODO Bug 830415: this isn't the right place to set these annotation. - // It should be set it in places' nsIDownloadHistory implementation. - if (!this._isPrivate && !dataItem.inProgress) { - let downloadMetaData = { state: dataItem.state, - endTime: dataItem.endTime }; - if (dataItem.done) - downloadMetaData.fileSize = dataItem.maxBytes; - - try { - PlacesUtils.annotations.setPageAnnotation( - NetUtil.newURI(dataItem.uri), "downloads/metaData", JSON.stringify(downloadMetaData), 0, - PlacesUtils.annotations.EXPIRE_WITH_HISTORY); - } - catch(ex) { - Cu.reportError(ex); - } - } - }, - - onProgressChange: function(aWebProgress, aRequest, - aCurSelfProgress, - aMaxSelfProgress, - aCurTotalProgress, - aMaxTotalProgress, aDownload) - { - if (aDownload.isPrivate != this._isPrivate) { - // Ignore the downloads with a privacy status other than what we are - // tracking. - return; - } - - let dataItem = this._getOrAddDataItem(aDownload, false); - if (!dataItem) { - return; - } - - dataItem.currBytes = aDownload.amountTransferred; - dataItem.maxBytes = aDownload.size; - dataItem.speed = aDownload.speed; - dataItem.percentComplete = aDownload.percentComplete; - - this._views.forEach( - function(view) view.getViewItem(dataItem).onProgressChange() - ); - }, - - onStateChange: function() { }, - - onSecurityChange: function() { }, - - ////////////////////////////////////////////////////////////////////////////// - //// Notifications sent to the most recent browser window only - - /** - * Set to true after the first download causes the downloads panel to be - * displayed. - */ - get panelHasShownBefore() { - try { - return Services.prefs.getBoolPref("browser.download.panel.shown"); - } catch (ex) { } - return false; - }, - - set panelHasShownBefore(aValue) { - Services.prefs.setBoolPref("browser.download.panel.shown", aValue); - return aValue; - }, - - /** - * Displays a new or finished download notification in the most recent browser - * window, if one is currently available with the required privacy type. - * - * @param aType - * Set to "start" for new downloads, "finish" for completed downloads. - */ - _notifyDownloadEvent: function(aType) - { - DownloadsCommon.log("Attempting to notify that a new download has started or finished."); - if (DownloadsCommon.useToolkitUI) { - DownloadsCommon.log("Cancelling notification - we're using the toolkit downloads manager."); - return; - } - - // Show the panel in the most recent browser window, if present. - let browserWin = RecentWindow.getMostRecentBrowserWindow({ private: this._isPrivate }); - if (!browserWin) { - return; - } - - if (this.panelHasShownBefore) { - // For new downloads after the first one, don't show the panel - // automatically, but provide a visible notification in the topmost - // browser window, if the status indicator is already visible. - DownloadsCommon.log("Showing new download notification."); - browserWin.DownloadsIndicatorView.showEventNotification(aType); - return; - } - this.panelHasShownBefore = true; - browserWin.DownloadsPanel.showPanel(); - } -}; - -XPCOMUtils.defineLazyGetter(this, "PrivateDownloadsData", function() { - return new DownloadsDataCtor(true); -}); - -XPCOMUtils.defineLazyGetter(this, "DownloadsData", function() { - return new DownloadsDataCtor(false); -}); - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsViewPrototype - -/** - * A prototype for an object that registers itself with DownloadsData as soon - * as a view is registered with it. - */ -const DownloadsViewPrototype = { - ////////////////////////////////////////////////////////////////////////////// - //// Registration of views - - /** - * Array of view objects that should be notified when the available status - * data changes. - * - * SUBCLASSES MUST OVERRIDE THIS PROPERTY. - */ - _views: null, - - /** - * Determines whether this view object is over the private or non-private - * downloads. - * - * SUBCLASSES MUST OVERRIDE THIS PROPERTY. - */ - _isPrivate: false, - - /** - * Adds an object to be notified when the available status data changes. - * The specified object is initialized with the currently available status. - * - * @param aView - * View object to be added. This reference must be - * passed to removeView before termination. - */ - addView: function(aView) - { - // Start receiving events when the first of our views is registered. - if (this._views.length == 0) { - if (this._isPrivate) { - PrivateDownloadsData.addView(this); - } else { - DownloadsData.addView(this); - } - } - - this._views.push(aView); - this.refreshView(aView); - }, - - /** - * Updates the properties of an object previously added using addView. - * - * @param aView - * View object to be updated. - */ - refreshView: function(aView) - { - // Update immediately even if we are still loading data asynchronously. - // Subclasses must provide these two functions! - this._refreshProperties(); - this._updateView(aView); - }, - - /** - * Removes an object previously added using addView. - * - * @param aView - * View object to be removed. - */ - removeView: function(aView) - { - let index = this._views.indexOf(aView); - if (index != -1) { - this._views.splice(index, 1); - } - - // Stop receiving events when the last of our views is unregistered. - if (this._views.length == 0) { - if (this._isPrivate) { - PrivateDownloadsData.removeView(this); - } else { - DownloadsData.removeView(this); - } - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Callback functions from DownloadsData - - /** - * Indicates whether we are still loading downloads data asynchronously. - */ - _loading: false, - - /** - * Called before multiple downloads are about to be loaded. - */ - onDataLoadStarting: function() - { - this._loading = true; - }, - - /** - * Called after data loading finished. - */ - onDataLoadCompleted: function() - { - this._loading = false; - }, - - /** - * Called when the downloads database becomes unavailable (for example, we - * entered Private Browsing Mode and the database backend changed). - * References to existing data should be discarded. - * - * @note Subclasses should override this. - */ - onDataInvalidated: function() - { - throw Components.results.NS_ERROR_NOT_IMPLEMENTED; - }, - - /** - * Called when a new download data item is available, either during the - * asynchronous data load or when a new download is started. - * - * @param download - * Download object that was just added. - * @param newest - * When true, indicates that this item is the most recent and should be - * added in the topmost position. This happens when a new download is - * started. When false, indicates that the item is the least recent - * with regard to the items that have been already added. The latter - * generally happens during the asynchronous data load. - * - * @note Subclasses should override this. - */ - onDownloadAdded(download, newest) { - throw Components.results.NS_ERROR_NOT_IMPLEMENTED; - }, - - /** - * Called when the overall state of a Download has changed. In particular, - * this is called only once when the download succeeds or is blocked - * permanently, and is never called if only the current progress changed. - * - * The onDownloadChanged notification will always be sent afterwards. - * - * @note Subclasses should override this. - */ - onDownloadStateChanged(download) { - throw Components.results.NS_ERROR_NOT_IMPLEMENTED; - }, - - /** - * Called every time any state property of a Download may have changed, - * including progress properties. - * - * Note that progress notification changes are throttled at the Downloads.jsm - * API level, and there is no throttling mechanism in the front-end. - * - * @note Subclasses should override this. - */ - onDownloadChanged(download) { - throw Components.results.NS_ERROR_NOT_IMPLEMENTED; - }, - - /** - * Called when a data item is removed, ensures that the widget associated with - * the view item is removed from the user interface. - * - * @param download - * Download object that is being removed. - * - * @note Subclasses should override this. - */ - onDownloadRemoved(download) { - throw Components.results.NS_ERROR_NOT_IMPLEMENTED; - }, - - /** - * Private function used to refresh the internal properties being sent to - * each registered view. - * - * @note Subclasses should override this. - */ - _refreshProperties: function() - { - throw Components.results.NS_ERROR_NOT_IMPLEMENTED; - }, - - /** - * Private function used to refresh an individual view. - * - * @note Subclasses should override this. - */ - _updateView: function() - { - throw Components.results.NS_ERROR_NOT_IMPLEMENTED; - } -}; - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsIndicatorData - -/** - * This object registers itself with DownloadsData as a view, and transforms the - * notifications it receives into overall status data, that is then broadcast to - * the registered download status indicators. - * - * Note that using this object does not automatically start the Download Manager - * service. Consumers will see an empty list of downloads until the service is - * actually started. This is useful to display a neutral progress indicator in - * the main browser window until the autostart timeout elapses. - */ -function DownloadsIndicatorDataCtor(aPrivate) { - this._isPrivate = aPrivate; - this._views = []; -} -DownloadsIndicatorDataCtor.prototype = { - __proto__: DownloadsViewPrototype, - - /** - * Removes an object previously added using addView. - * - * @param aView - * DownloadsIndicatorView object to be removed. - */ - removeView: function(aView) - { - DownloadsViewPrototype.removeView.call(this, aView); - - if (this._views.length == 0) { - this._itemCount = 0; - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Callback functions from DownloadsData - - onDataLoadCompleted: function() - { - DownloadsViewPrototype.onDataLoadCompleted.call(this); - this._updateViews(); - }, - - /** - * Called when the downloads database becomes unavailable (for example, we - * entered Private Browsing Mode and the database backend changed). - * References to existing data should be discarded. - */ - onDataInvalidated: function() - { - this._itemCount = 0; - }, - - onDownloadAdded(download, newest) { - this._itemCount++; - this._updateViews(); - }, - - onDownloadStateChanged(download) { - if (download.succeeded || download.error) { - this.attention = true; - } - - // Since the state of a download changed, reset the estimated time left. - this._lastRawTimeLeft = -1; - this._lastTimeLeft = -1; - }, - - onDownloadChanged(download) { - this._updateViews(); - }, - - onDownloadRemoved(download) { - this._itemCount--; - this._updateViews(); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Propagation of properties to our views - - // The following properties are updated by _refreshProperties and are then - // propagated to the views. See _refreshProperties for details. - _hasDownloads: false, - _counter: "", - _percentComplete: -1, - _paused: false, - - /** - * Indicates whether the download indicators should be highlighted. - */ - set attention(aValue) - { - this._attention = aValue; - this._updateViews(); - return aValue; - }, - _attention: false, - - /** - * Indicates whether the user is interacting with downloads, thus the - * attention indication should not be shown even if requested. - */ - set attentionSuppressed(aValue) - { - this._attentionSuppressed = aValue; - this._attention = false; - this._updateViews(); - return aValue; - }, - _attentionSuppressed: false, - - /** - * Computes aggregate values and propagates the changes to our views. - */ - _updateViews: function() - { - // Do not update the status indicators during batch loads of download items. - if (this._loading) { - return; - } - - this._refreshProperties(); - this._views.forEach(this._updateView, this); - }, - - /** - * Updates the specified view with the current aggregate values. - * - * @param aView - * DownloadsIndicatorView object to be updated. - */ - _updateView: function(aView) - { - aView.hasDownloads = this._hasDownloads; - aView.counter = this._counter; - aView.percentComplete = this._percentComplete; - aView.paused = this._paused; - aView.attention = this._attention && !this._attentionSuppressed; - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Property updating based on current download status - - /** - * Number of download items that are available to be displayed. - */ - _itemCount: 0, - - /** - * Floating point value indicating the last number of seconds estimated until - * the longest download will finish. We need to store this value so that we - * don't continuously apply smoothing if the actual download state has not - * changed. This is set to -1 if the previous value is unknown. - */ - _lastRawTimeLeft: -1, - - /** - * Last number of seconds estimated until all in-progress downloads with a - * known size and speed will finish. This value is stored to allow smoothing - * in case of small variations. This is set to -1 if the previous value is - * unknown. - */ - _lastTimeLeft: -1, - - /** - * A generator function for the Download objects this summary is currently - * interested in. This generator is passed off to summarizeDownloads in order - * to generate statistics about the downloads we care about - in this case, - * it's all active downloads. - */ - * _activeDownloads() { - let downloads = this._isPrivate ? PrivateDownloadsData.downloads - : DownloadsData.downloads; - for (let download of downloads) { - if (!download.stopped || (download.canceled && download.hasPartialData)) { - yield download; - } - } - }, - - /** - * Computes aggregate values based on the current state of downloads. - */ - _refreshProperties: function() - { - let summary = - DownloadsCommon.summarizeDownloads(this._activeDownloads()); - - // Determine if the indicator should be shown or get attention. - this._hasDownloads = (this._itemCount > 0); - - // If all downloads are paused, show the progress indicator as paused. - this._paused = summary.numActive > 0 && - summary.numActive == summary.numPaused; - - this._percentComplete = summary.percentComplete; - - // Display the estimated time left, if present. - if (summary.rawTimeLeft == -1) { - // There are no downloads with a known time left. - this._lastRawTimeLeft = -1; - this._lastTimeLeft = -1; - this._counter = ""; - } else { - // Compute the new time left only if state actually changed. - if (this._lastRawTimeLeft != summary.rawTimeLeft) { - this._lastRawTimeLeft = summary.rawTimeLeft; - this._lastTimeLeft = DownloadsCommon.smoothSeconds(summary.rawTimeLeft, - this._lastTimeLeft); - } - this._counter = DownloadsCommon.formatTimeLeft(this._lastTimeLeft); - } - } -}; - -XPCOMUtils.defineLazyGetter(this, "PrivateDownloadsIndicatorData", function() { - return new DownloadsIndicatorDataCtor(true); -}); - -XPCOMUtils.defineLazyGetter(this, "DownloadsIndicatorData", function() { - return new DownloadsIndicatorDataCtor(false); -}); - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsSummaryData - -/** - * DownloadsSummaryData is a view for DownloadsData that produces a summary - * of all downloads after a certain exclusion point aNumToExclude. For example, - * if there were 5 downloads in progress, and a DownloadsSummaryData was - * constructed with aNumToExclude equal to 3, then that DownloadsSummaryData - * would produce a summary of the last 2 downloads. - * - * @param aIsPrivate - * True if the browser window which owns the download button is a private - * window. - * @param aNumToExclude - * The number of items to exclude from the summary, starting from the - * top of the list. - */ -function DownloadsSummaryData(aIsPrivate, aNumToExclude) { - this._numToExclude = aNumToExclude; - // Since we can have multiple instances of DownloadsSummaryData, we - // override these values from the prototype so that each instance can be - // completely separated from one another. - this._loading = false; - - this._downloads = []; - - // Floating point value indicating the last number of seconds estimated until - // the longest download will finish. We need to store this value so that we - // don't continuously apply smoothing if the actual download state has not - // changed. This is set to -1 if the previous value is unknown. - this._lastRawTimeLeft = -1; - - // Last number of seconds estimated until all in-progress downloads with a - // known size and speed will finish. This value is stored to allow smoothing - // in case of small variations. This is set to -1 if the previous value is - // unknown. - this._lastTimeLeft = -1; - - // The following properties are updated by _refreshProperties and are then - // propagated to the views. - this._showingProgress = false; - this._details = ""; - this._description = ""; - this._numActive = 0; - this._percentComplete = -1; - - this._isPrivate = aIsPrivate; - this._views = []; -} - -DownloadsSummaryData.prototype = { - __proto__: DownloadsViewPrototype, - - /** - * Removes an object previously added using addView. - * - * @param aView - * DownloadsSummary view to be removed. - */ - removeView: function(aView) - { - DownloadsViewPrototype.removeView.call(this, aView); - - if (this._views.length == 0) { - // Clear out our collection of Download objects. If we ever have - // another view registered with us, this will get re-populated. - this._downloads = []; - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Callback functions from DownloadsData - see the documentation in - //// DownloadsViewPrototype for more information on what these functions - //// are used for. - - onDataLoadCompleted: function() - { - DownloadsViewPrototype.onDataLoadCompleted.call(this); - this._updateViews(); - }, - - onDataInvalidated: function() - { - this._dataItems = []; - }, - - onDownloadAdded(download, newest) { - if (newest) { - this._downloads.unshift(download); - } else { - this._downloads.push(download); - } - - this._updateViews(); - }, - - onDownloadStateChanged() { - // Since the state of a download changed, reset the estimated time left. - this._lastRawTimeLeft = -1; - this._lastTimeLeft = -1; - }, - - onDownloadChanged() { - this._updateViews(); - }, - - onDownloadRemoved(download) { - let itemIndex = this._downloads.indexOf(download); - this._downloads.splice(itemIndex, 1); - this._updateViews(); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Propagation of properties to our views - - /** - * Computes aggregate values and propagates the changes to our views. - */ - _updateViews: function() - { - // Do not update the status indicators during batch loads of download items. - if (this._loading) { - return; - } - - this._refreshProperties(); - this._views.forEach(this._updateView, this); - }, - - /** - * Updates the specified view with the current aggregate values. - * - * @param aView - * DownloadsIndicatorView object to be updated. - */ - _updateView: function(aView) - { - aView.showingProgress = this._showingProgress; - aView.percentComplete = this._percentComplete; - aView.description = this._description; - aView.details = this._details; - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Property updating based on current download status - - /** - * A generator function for the Download objects this summary is currently - * interested in. This generator is passed off to summarizeDownloads in order - * to generate statistics about the downloads we care about - in this case, - * it's the downloads in this._downloads after the first few to exclude, - * which was set when constructing this DownloadsSummaryData instance. - */ - * _downloadsForSummary() { - if (this._downloads.length > 0) { - for (let i = this._numToExclude; i < this._downloads.length; ++i) { - yield this._downloads[i]; - } - } - }, - - /** - * Computes aggregate values based on the current state of downloads. - */ - _refreshProperties: function() - { - // Pre-load summary with default values. - let summary = - DownloadsCommon.summarizeDownloads(this._downloadsForSummary()); - - this._description = DownloadsCommon.strings - .otherDownloads2(summary.numActive); - this._percentComplete = summary.percentComplete; - - // If all downloads are paused, show the progress indicator as paused. - this._showingProgress = summary.numDownloading > 0 || - summary.numPaused > 0; - - // Display the estimated time left, if present. - if (summary.rawTimeLeft == -1) { - // There are no downloads with a known time left. - this._lastRawTimeLeft = -1; - this._lastTimeLeft = -1; - this._details = ""; - } else { - // Compute the new time left only if state actually changed. - if (this._lastRawTimeLeft != summary.rawTimeLeft) { - this._lastRawTimeLeft = summary.rawTimeLeft; - this._lastTimeLeft = DownloadsCommon.smoothSeconds(summary.rawTimeLeft, - this._lastTimeLeft); - } - [this._details] = DownloadUtils.getDownloadStatusNoRate( - summary.totalTransferred, summary.totalSize, summary.slowestSpeed, - this._lastTimeLeft); - } - } -} diff --git a/application/palemoon/components/downloads/DownloadsLogger.jsm b/application/palemoon/components/downloads/DownloadsLogger.jsm deleted file mode 100644 index 845f1c91fc..0000000000 --- a/application/palemoon/components/downloads/DownloadsLogger.jsm +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil; -*- */ -/* 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/. */ - -/** - * The contents of this file were copied almost entirely from - * toolkit/identity/LogUtils.jsm. Until we've got a more generalized logging - * mechanism for toolkit, I think this is going to be how we roll. - */ - -"use strict"; - -this.EXPORTED_SYMBOLS = ["DownloadsLogger"]; -const PREF_DEBUG = "browser.download.debug"; - -const Cu = Components.utils; -const Ci = Components.interfaces; -const Cc = Components.classes; -const Cr = Components.results; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); - -this.DownloadsLogger = { - _generateLogMessage: function(args) { - // create a string representation of a list of arbitrary things - let strings = []; - - for (let arg of args) { - if (typeof arg === 'string') { - strings.push(arg); - } else if (arg === undefined) { - strings.push('undefined'); - } else if (arg === null) { - strings.push('null'); - } else { - try { - strings.push(JSON.stringify(arg, null, 2)); - } catch(err) { - strings.push("<>"); - } - } - }; - return 'Downloads: ' + strings.join(' '); - }, - - /** - * log() - utility function to print a list of arbitrary things - * - * Enable with about:config pref browser.download.debug - */ - log: function(...args) { - let output = this._generateLogMessage(args); - dump(output + "\n"); - - // Additionally, make the output visible in the Error Console - Services.console.logStringMessage(output); - }, - - /** - * reportError() - report an error through component utils as well as - * our log function - */ - reportError: function(...aArgs) { - // Report the error in the browser - let output = this._generateLogMessage(aArgs); - Cu.reportError(output); - dump("ERROR:" + output + "\n"); - for (let frame = Components.stack.caller; frame; frame = frame.caller) { - dump("\t" + frame + "\n"); - } - } - -}; diff --git a/application/palemoon/components/downloads/DownloadsStartup.js b/application/palemoon/components/downloads/DownloadsStartup.js deleted file mode 100644 index 363b9642c9..0000000000 --- a/application/palemoon/components/downloads/DownloadsStartup.js +++ /dev/null @@ -1,277 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -/** - * This component listens to notifications for startup, shutdown and session - * restore, controlling which downloads should be loaded from the database. - * - * To avoid affecting startup performance, this component monitors the current - * session restore state, but defers the actual downloads data manipulation - * until the Download Manager service is loaded. - */ - -"use strict"; - -//////////////////////////////////////////////////////////////////////////////// -//// Globals - -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; -const Cr = Components.results; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); -XPCOMUtils.defineLazyServiceGetter(this, "gSessionStartup", - "@mozilla.org/browser/sessionstartup;1", - "nsISessionStartup"); - -const kObservedTopics = [ - "sessionstore-windows-restored", - "sessionstore-browser-state-restored", - "download-manager-initialized", - "download-manager-change-retention", - "last-pb-context-exited", - "browser-lastwindow-close-granted", - "quit-application", - "profile-change-teardown", -]; - -/** - * CID of our implementation of nsIDownloadManagerUI. - */ -const kDownloadsUICid = Components.ID("{4d99321e-d156-455b-81f7-e7aa2308134f}"); - -/** - * Contract ID of the service implementing nsIDownloadManagerUI. - */ -const kDownloadsUIContractId = "@mozilla.org/download-manager-ui;1"; - -/** - * CID of the JavaScript implementation of nsITransfer. - */ -const kTransferCid = Components.ID("{1b4c85df-cbdd-4bb6-b04e-613caece083c}"); - -/** - * Contract ID of the service implementing nsITransfer. - */ -const kTransferContractId = "@mozilla.org/transfer;1"; - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsStartup - -function DownloadsStartup() { } - -DownloadsStartup.prototype = { - classID: Components.ID("{49507fe5-2cee-4824-b6a3-e999150ce9b8}"), - - _xpcom_factory: XPCOMUtils.generateSingletonFactory(DownloadsStartup), - - ////////////////////////////////////////////////////////////////////////////// - //// nsISupports - - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, - Ci.nsISupportsWeakReference]), - - ////////////////////////////////////////////////////////////////////////////// - //// nsIObserver - - observe: function(aSubject, aTopic, aData) - { - switch (aTopic) { - case "profile-after-change": - // Override Toolkit's nsIDownloadManagerUI implementation with our own. - // This must be done at application startup and not in the manifest to - // ensure that our implementation overrides the original one. - Components.manager.QueryInterface(Ci.nsIComponentRegistrar) - .registerFactory(kDownloadsUICid, "", - kDownloadsUIContractId, null); - - Components.manager.QueryInterface(Ci.nsIComponentRegistrar) - .registerFactory(kTransferCid, "", - kTransferContractId, null); - break; - - case "sessionstore-windows-restored": - case "sessionstore-browser-state-restored": - // Unless there is no saved session, there is a chance that we are - // starting up after a restart or a crash. We should check the disk - // database to see if there are completed downloads to recover and show - // in the panel, in addition to in-progress downloads. - if (gSessionStartup.sessionType != Ci.nsISessionStartup.NO_SESSION) { - this._restoringSession = true; - } - this._ensureDataLoaded(); - break; - - case "download-manager-initialized": - // Don't initialize the JavaScript data and user interface layer if we - // are initializing the Download Manager service during shutdown. - if (this._shuttingDown) { - break; - } - - // Start receiving events for active and new downloads before we return - // from this observer function. We can't defer the execution of this - // step, to ensure that we don't lose events raised in the meantime. - DownloadsCommon.initializeAllDataLinks( - aSubject.QueryInterface(Ci.nsIDownloadManager)); - - this._downloadsServiceInitialized = true; - - // Since this notification is generated during the getService call and - // we need to get the Download Manager service ourselves, we must post - // the handler on the event queue to be executed later. - Services.tm.mainThread.dispatch(this._ensureDataLoaded.bind(this), - Ci.nsIThread.DISPATCH_NORMAL); - break; - - case "download-manager-change-retention": - // If we're using the Downloads Panel, we override the retention - // preference to always retain downloads on completion. - if (!DownloadsCommon.useToolkitUI) { - aSubject.QueryInterface(Ci.nsISupportsPRInt32).data = 2; - } - break; - - case "browser-lastwindow-close-granted": - // When using the panel interface, downloads that are already completed - // should be removed when the last full browser window is closed. This - // event is invoked only if the application is not shutting down yet. - // If the Download Manager service is not initialized, we don't want to - // initialize it just to clean up completed downloads, because they can - // be present only in case there was a browser crash or restart. - if (this._downloadsServiceInitialized && - !DownloadsCommon.useToolkitUI) { - Services.downloads.cleanUp(); - } - break; - - case "last-pb-context-exited": - // Similar to the above notification, but for private downloads. - if (this._downloadsServiceInitialized && - !DownloadsCommon.useToolkitUI) { - Services.downloads.cleanUpPrivate(); - } - break; - - case "quit-application": - // When the application is shutting down, we must free all resources in - // addition to cleaning up completed downloads. If the Download Manager - // service is not initialized, we don't want to initialize it just to - // clean up completed downloads, because they can be present only in - // case there was a browser crash or restart. - this._shuttingDown = true; - if (!this._downloadsServiceInitialized) { - break; - } - - DownloadsCommon.terminateAllDataLinks(); - - // When using the panel interface, downloads that are already completed - // should be removed when quitting the application. - if (!DownloadsCommon.useToolkitUI && aData != "restart") { - this._cleanupOnShutdown = true; - } - break; - - case "profile-change-teardown": - // If we need to clean up, we must do it synchronously after all the - // "quit-application" listeners are invoked, so that the Download - // Manager service has a chance to pause or cancel in-progress downloads - // before we remove completed downloads from the list. Note that, since - // "quit-application" was invoked, we've already exited Private Browsing - // Mode, thus we are always working on the disk database. - if (this._cleanupOnShutdown) { - Services.downloads.cleanUp(); - } - - if (!DownloadsCommon.useToolkitUI) { - // If we got this far, that means that we finished our first session - // with the Downloads Panel without crashing. This means that we don't - // have to force displaying only active downloads on the next startup - // now. - this._firstSessionCompleted = true; - } - break; - } - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Private - - /** - * Indicates whether we're restoring a previous session. This is used by - * _recoverAllDownloads to determine whether or not we should load and - * display all downloads data, or restrict it to only the active downloads. - */ - _restoringSession: false, - - /** - * Indicates whether the Download Manager service has been initialized. This - * flag is required because we want to avoid accessing the service immediately - * at browser startup. The service will start when the user first requests a - * download, or some time after browser startup. - */ - _downloadsServiceInitialized: false, - - /** - * True while we are processing the "quit-application" event, and later. - */ - _shuttingDown: false, - - /** - * True during shutdown if we need to remove completed downloads. - */ - _cleanupOnShutdown: false, - - /** - * True if we should display all downloads, as opposed to just active - * downloads. We decide to display all downloads if we're restoring a session, - * or if we're using the Downloads Panel anytime after the first session with - * it has completed. - */ - get _recoverAllDownloads() { - return this._restoringSession || - (!DownloadsCommon.useToolkitUI && this._firstSessionCompleted); - }, - - /** - * True if we've ever completed a session with the Downloads Panel enabled. - */ - get _firstSessionCompleted() { - return Services.prefs - .getBoolPref("browser.download.panel.firstSessionCompleted"); - }, - - set _firstSessionCompleted(aValue) { - Services.prefs.setBoolPref("browser.download.panel.firstSessionCompleted", - aValue); - return aValue; - }, - - /** - * Ensures that persistent download data is reloaded at the appropriate time. - */ - _ensureDataLoaded: function() - { - if (!this._downloadsServiceInitialized) { - return; - } - - // If the previous session has been already restored, then we ensure that - // all the downloads are loaded. Otherwise, we only ensure that the active - // downloads from the previous session are loaded. - DownloadsCommon.ensureAllPersistentDataLoaded(!this._recoverAllDownloads); - } -}; - -//////////////////////////////////////////////////////////////////////////////// -//// Module - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DownloadsStartup]); diff --git a/application/palemoon/components/downloads/DownloadsTaskbar.jsm b/application/palemoon/components/downloads/DownloadsTaskbar.jsm deleted file mode 100644 index e1b9f7a27d..0000000000 --- a/application/palemoon/components/downloads/DownloadsTaskbar.jsm +++ /dev/null @@ -1,176 +0,0 @@ -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* 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/. */ - -/** - * Handles the download progress indicator in the taskbar. - */ - -"use strict"; - -this.EXPORTED_SYMBOLS = [ - "DownloadsTaskbar", -]; - -//////////////////////////////////////////////////////////////////////////////// -//// Globals - -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; -const Cr = Components.results; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "Downloads", - "resource://gre/modules/Downloads.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Services", - "resource://gre/modules/Services.jsm"); - -XPCOMUtils.defineLazyGetter(this, "gWinTaskbar", function () { - if (!("@mozilla.org/windows-taskbar;1" in Cc)) { - return null; - } - let winTaskbar = Cc["@mozilla.org/windows-taskbar;1"] - .getService(Ci.nsIWinTaskbar); - return winTaskbar.available && winTaskbar; -}); - -XPCOMUtils.defineLazyGetter(this, "gMacTaskbarProgress", function () { - return ("@mozilla.org/widget/macdocksupport;1" in Cc) && - Cc["@mozilla.org/widget/macdocksupport;1"] - .getService(Ci.nsITaskbarProgress); -}); - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsTaskbar - -/** - * Handles the download progress indicator in the taskbar. - */ -this.DownloadsTaskbar = { - /** - * Underlying DownloadSummary providing the aggregate download information, or - * null if the indicator has never been initialized. - */ - _summary: null, - - /** - * nsITaskbarProgress object to which download information is dispatched. - * This can be null if the indicator has never been initialized or if the - * indicator is currently hidden on Windows. - */ - _taskbarProgress: null, - - /** - * This method is called after a new browser window is opened, and ensures - * that the download progress indicator is displayed in the taskbar. - * - * On Windows, the indicator is attached to the first browser window that - * calls this method. When the window is closed, the indicator is moved to - * another browser window, if available, in no particular order. When there - * are no browser windows visible, the indicator is hidden. - * - * On Mac OS X, the indicator is initialized globally when this method is - * called for the first time. Subsequent calls have no effect. - * - * @param aBrowserWindow - * nsIDOMWindow object of the newly opened browser window to which the - * indicator may be attached. - */ - registerIndicator(aBrowserWindow) { - if (!this._taskbarProgress) { - if (gMacTaskbarProgress) { - // On Mac OS X, we have to register the global indicator only once. - this._taskbarProgress = gMacTaskbarProgress; - // Free the XPCOM reference on shutdown, to prevent detecting a leak. - Services.obs.addObserver(() => { - this._taskbarProgress = null; - gMacTaskbarProgress = null; - }, "quit-application-granted", false); - } else if (gWinTaskbar) { - // On Windows, the indicator is currently hidden because we have no - // previous browser window, thus we should attach the indicator now. - this._attachIndicator(aBrowserWindow); - } else { - // The taskbar indicator is not available on this platform. - return; - } - } - - // Ensure that the DownloadSummary object will be created asynchronously. - if (!this._summary) { - Downloads.getSummary(Downloads.ALL).then(summary => { - // In case the method is re-entered, we simply ignore redundant - // invocations of the callback, instead of keeping separate state. - if (this._summary) { - return; - } - this._summary = summary; - return this._summary.addView(this); - }).then(null, Cu.reportError); - } - }, - - /** - * On Windows, attaches the taskbar indicator to the specified browser window. - */ - _attachIndicator(aWindow) { - // Activate the indicator on the specified window. - let docShell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocShellTreeItem).treeOwner - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIXULWindow).docShell; - this._taskbarProgress = gWinTaskbar.getTaskbarProgress(docShell); - - // If the DownloadSummary object has already been created, we should update - // the state of the new indicator, otherwise it will be updated as soon as - // the DownloadSummary view is registered. - if (this._summary) { - this.onSummaryChanged(); - } - - aWindow.addEventListener("unload", () => { - // Locate another browser window, excluding the one being closed. - let browserWindow = RecentWindow.getMostRecentBrowserWindow(); - if (browserWindow) { - // Move the progress indicator to the other browser window. - this._attachIndicator(browserWindow); - } else { - // The last browser window has been closed. We remove the reference to - // the taskbar progress object so that the indicator will be registered - // again on the next browser window that is opened. - this._taskbarProgress = null; - } - }, false); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// DownloadSummary view - - onSummaryChanged() { - // If the last browser window has been closed, we have no indicator any more. - if (!this._taskbarProgress) { - return; - } - - if (this._summary.allHaveStopped || this._summary.progressTotalBytes == 0) { - this._taskbarProgress.setProgressState( - Ci.nsITaskbarProgress.STATE_NO_PROGRESS, 0, 0); - } else { - // For a brief moment before completion, some download components may - // report more transferred bytes than the total number of bytes. Thus, - // ensure that we never break the expectations of the progress indicator. - let progressCurrentBytes = Math.min(this._summary.progressTotalBytes, - this._summary.progressCurrentBytes); - this._taskbarProgress.setProgressState( - Ci.nsITaskbarProgress.STATE_NORMAL, - progressCurrentBytes, - this._summary.progressTotalBytes); - } - }, -}; diff --git a/application/palemoon/components/downloads/DownloadsUI.js b/application/palemoon/components/downloads/DownloadsUI.js deleted file mode 100644 index e62bb81485..0000000000 --- a/application/palemoon/components/downloads/DownloadsUI.js +++ /dev/null @@ -1,150 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -/** - * This component implements the nsIDownloadManagerUI interface and opens the - * downloads panel in the most recent browser window when requested. - * - * If a specific preference is set, this component transparently forwards all - * calls to the original implementation in Toolkit, that shows the window UI. - */ - -"use strict"; - -//////////////////////////////////////////////////////////////////////////////// -//// Globals - -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; -const Cr = Components.results; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); -XPCOMUtils.defineLazyServiceGetter(this, "gBrowserGlue", - "@mozilla.org/browser/browserglue;1", - "nsIBrowserGlue"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); - -//////////////////////////////////////////////////////////////////////////////// -//// DownloadsUI - -function DownloadsUI() -{ - XPCOMUtils.defineLazyGetter(this, "_toolkitUI", function() { - // Create Toolkit's nsIDownloadManagerUI implementation. - return Components.classesByID["{7dfdf0d1-aff6-4a34-bad1-d0fe74601642}"] - .getService(Ci.nsIDownloadManagerUI); - }); -} - -DownloadsUI.prototype = { - classID: Components.ID("{4d99321e-d156-455b-81f7-e7aa2308134f}"), - - _xpcom_factory: XPCOMUtils.generateSingletonFactory(DownloadsUI), - - ////////////////////////////////////////////////////////////////////////////// - //// nsISupports - - QueryInterface: XPCOMUtils.generateQI([Ci.nsIDownloadManagerUI]), - - ////////////////////////////////////////////////////////////////////////////// - //// nsIDownloadManagerUI - - show: function(aWindowContext, aDownload, aReason, aUsePrivateUI) - { - if (DownloadsCommon.useToolkitUI && !PrivateBrowsingUtils.isWindowPrivate(aWindowContext)) { - this._toolkitUI.show(aWindowContext, aDownload, aReason, aUsePrivateUI); - return; - } - - if (!aReason) { - aReason = Ci.nsIDownloadManagerUI.REASON_USER_INTERACTED; - } - - if (aReason == Ci.nsIDownloadManagerUI.REASON_NEW_DOWNLOAD) { - const kMinimized = Ci.nsIDOMChromeWindow.STATE_MINIMIZED; - let browserWin = gBrowserGlue.getMostRecentBrowserWindow(); - - if (!browserWin || browserWin.windowState == kMinimized) { - this._showDownloadManagerUI(aWindowContext, aUsePrivateUI); - } - else { - // If the indicator is visible, then new download notifications are - // already handled by the panel service. - browserWin.DownloadsButton.checkIsVisible(function(isVisible) { - if (!isVisible) { - this._showDownloadManagerUI(aWindowContext, aUsePrivateUI); - } - }.bind(this)); - } - } else { - this._showDownloadManagerUI(aWindowContext, aUsePrivateUI); - } - }, - - get visible() - { - // If we're still using the toolkit downloads manager, delegate the call - // to it. Otherwise, return true for now, until we decide on how we want - // to indicate that a new download has started if a browser window is - // not available or minimized. - return DownloadsCommon.useToolkitUI ? this._toolkitUI.visible : true; - }, - - getAttention: function() - { - if (DownloadsCommon.useToolkitUI) { - this._toolkitUI.getAttention(); - } - }, - - /** - * Helper function that opens the download manager UI. - */ - _showDownloadManagerUI: - function(aWindowContext, aUsePrivateUI) - { - // If we weren't given a window context, try to find a browser window - // to use as our parent - and if that doesn't work, error out and give up. - let parentWindow = aWindowContext; - if (!parentWindow) { - parentWindow = RecentWindow.getMostRecentBrowserWindow({ private: !!aUsePrivateUI }); - if (!parentWindow) { - Components.utils.reportError( - "Couldn't find a browser window to open the Places Downloads View " + - "from."); - return; - } - } - - // If window is private then show it in a tab. - if (PrivateBrowsingUtils.isWindowPrivate(parentWindow)) { - parentWindow.openUILinkIn("about:downloads", "tab"); - return; - } else { - let organizer = Services.wm.getMostRecentWindow("Places:Organizer"); - if (!organizer) { - parentWindow.openDialog("chrome://browser/content/places/places.xul", - "", "chrome,toolbar=yes,dialog=no,resizable", - "Downloads"); - } else { - organizer.PlacesOrganizer.selectLeftPaneQuery("Downloads"); - organizer.focus(); - } - } - } -}; - -//////////////////////////////////////////////////////////////////////////////// -//// Module - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DownloadsUI]); diff --git a/application/palemoon/components/downloads/DownloadsViewUI.jsm b/application/palemoon/components/downloads/DownloadsViewUI.jsm deleted file mode 100644 index 7471925d9c..0000000000 --- a/application/palemoon/components/downloads/DownloadsViewUI.jsm +++ /dev/null @@ -1,252 +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/. */ - -/* - * This module is imported by code that uses the "download.xml" binding, and - * provides prototypes for objects that handle input and display information. - */ - -"use strict"; - -this.EXPORTED_SYMBOLS = [ - "DownloadsViewUI", -]; - -const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils", - "resource://gre/modules/DownloadUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "OS", - "resource://gre/modules/osfile.jsm"); - -this.DownloadsViewUI = {}; - -/** - * A download element shell is responsible for handling the commands and the - * displayed data for a single element that uses the "download.xml" binding. - * - * The information to display is obtained through the associated Download object - * from the JavaScript API for downloads, and commands are executed using a - * combination of Download methods and DownloadsCommon.jsm helper functions. - * - * Specialized versions of this shell must be defined, and they are required to - * implement the "download" property or getter. Currently these objects are the - * HistoryDownloadElementShell and the DownloadsViewItem for the panel. The - * history view may use a HistoryDownload object in place of a Download object. - */ -this.DownloadsViewUI.DownloadElementShell = function () {} - -this.DownloadsViewUI.DownloadElementShell.prototype = { - /** - * The richlistitem for the download, initialized by the derived object. - */ - element: null, - - /** - * URI string for the file type icon displayed in the download element. - */ - get image() { - if (!this.download.target.path) { - // Old history downloads may not have a target path. - return "moz-icon://.unknown?size=32"; - } - - // When a download that was previously in progress finishes successfully, it - // means that the target file now exists and we can extract its specific - // icon, for example from a Windows executable. To ensure that the icon is - // reloaded, however, we must change the URI used by the XUL image element, - // for example by adding a query parameter. This only works if we add one of - // the parameters explicitly supported by the nsIMozIconURI interface. - return "moz-icon://" + this.download.target.path + "?size=32" + - (this.download.succeeded ? "&state=normal" : ""); - }, - - /** - * The user-facing label for the download. This is normally the leaf name of - * the download target file. In case this is a very old history download for - * which the target file is unknown, the download source URI is displayed. - */ - get displayName() { - if (!this.download.target.path) { - return this.download.source.url; - } - return OS.Path.basename(this.download.target.path); - }, - - get extendedDisplayName() { - let s = DownloadsCommon.strings; - let displayHost = DownloadUtils.getURIHost(this.download.source.url); - return s.statusSeparator(this.displayName, displayHost); - }, - - get extendedDisplayNameTip() { - let s = DownloadsCommon.strings; - let fullHost = DownloadUtils.getURIHost(this.download.source.url); - let referrer = this.download.source.referrer; - if (referrer) { - fullHost += ' (' + DownloadUtils.getURIHost(referrer) + ')'; - } - return s.statusSeparator(this.displayName, fullHost); - }, - - /** - * The progress element for the download, or undefined in case the XBL binding - * has not been applied yet. - */ - get _progressElement() { - if (!this.__progressElement) { - // If the element is not available now, we will try again the next time. - this.__progressElement = - this.element.ownerDocument.getAnonymousElementByAttribute( - this.element, "anonid", - "progressmeter"); - } - return this.__progressElement; - }, - - /** - * Processes a major state change in the user interface, then proceeds with - * the normal progress update. This function is not called for every progress - * update in order to improve performance. - */ - _updateState() { - this.element.setAttribute("displayName", this.displayName); - this.element.setAttribute("extendedDisplayName", this.extendedDisplayName); - this.element.setAttribute("extendedDisplayNameTip", this.extendedDisplayNameTip); - this.element.setAttribute("image", this.image); - this.element.setAttribute("state", - DownloadsCommon.stateOfDownload(this.download)); - - // Since state changed, reset the time left estimation. - this.lastEstimatedSecondsLeft = Infinity; - - this._updateProgress(); - }, - - /** - * Updates the elements that change regularly for in-progress downloads, - * namely the progress bar and the status line. - */ - _updateProgress() { - if (this.download.succeeded) { - // We only need to add or remove this attribute for succeeded downloads. - if (this.download.target.exists) { - this.element.setAttribute("exists", "true"); - } else { - this.element.removeAttribute("exists"); - } - } - - // The progress bar is only displayed for in-progress downloads. - if (this.download.hasProgress) { - this.element.setAttribute("progressmode", "normal"); - this.element.setAttribute("progress", this.download.progress); - } else { - this.element.setAttribute("progressmode", "undetermined"); - } - - // Dispatch the ValueChange event for accessibility, if possible. - if (this._progressElement) { - let event = this.element.ownerDocument.createEvent("Events"); - event.initEvent("ValueChange", true, true); - this._progressElement.dispatchEvent(event); - } - - let status = this.statusTextAndTip; - this.element.setAttribute("status", status.text); - this.element.setAttribute("statusTip", status.tip); - }, - - lastEstimatedSecondsLeft: Infinity, - - /** - * Returns the text for the status line and the associated tooltip. These are - * returned by a single property because they are computed together. The - * result may be overridden by derived objects. - */ - get statusTextAndTip() { - return this.rawStatusTextAndTip; - }, - - /** - * Derived objects may call this to get the status text. - */ - get rawStatusTextAndTip() { - const nsIDM = Ci.nsIDownloadManager; - let s = DownloadsCommon.strings; - - let text = ""; - let tip = ""; - - if (!this.download.stopped) { - let totalBytes = this.download.hasProgress ? this.download.totalBytes - : -1; - // By default, extended status information including the individual - // download rate is displayed in the tooltip. The history view overrides - // the getter and displays the datails in the main area instead. - [text] = DownloadUtils.getDownloadStatusNoRate( - this.download.currentBytes, - totalBytes, - this.download.speed, - this.lastEstimatedSecondsLeft); - let newEstimatedSecondsLeft; - [tip, newEstimatedSecondsLeft] = DownloadUtils.getDownloadStatus( - this.download.currentBytes, - totalBytes, - this.download.speed, - this.lastEstimatedSecondsLeft); - this.lastEstimatedSecondsLeft = newEstimatedSecondsLeft; - } else if (this.download.canceled && this.download.hasPartialData) { - let totalBytes = this.download.hasProgress ? this.download.totalBytes - : -1; - let transfer = DownloadUtils.getTransferTotal(this.download.currentBytes, - totalBytes); - - // We use the same XUL label to display both the state and the amount - // transferred, for example "Paused - 1.1 MB". - text = s.statusSeparatorBeforeNumber(s.statePaused, transfer); - } else if (!this.download.succeeded && !this.download.canceled && - !this.download.error) { - text = s.stateStarting; - } else { - let stateLabel; - - if (this.download.succeeded) { - // For completed downloads, show the file size (e.g. "1.5 MB"). - if (this.download.target.size !== undefined) { - let [size, unit] = - DownloadUtils.convertByteUnits(this.download.target.size); - stateLabel = s.sizeWithUnits(size, unit); - } else { - // History downloads may not have a size defined. - stateLabel = s.sizeUnknown; - } - } else if (this.download.canceled) { - stateLabel = s.stateCanceled; - } else if (this.download.error.becauseBlockedByParentalControls) { - stateLabel = s.stateBlockedParentalControls; - } else if (this.download.error.becauseBlockedByReputationCheck) { - stateLabel = s.stateDirty; - } else { - stateLabel = s.stateFailed; - } - - let referrer = this.download.source.referrer || this.download.source.url; - let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer); - - let date = new Date(this.download.endTime); - let [displayDate, fullDate] = DownloadUtils.getReadableDates(date); - - let firstPart = s.statusSeparator(stateLabel, displayHost); - text = s.statusSeparator(firstPart, displayDate); - tip = s.statusSeparator(fullHost, fullDate); - } - - return { text, tip: tip || text }; - }, -}; diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.css b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.css deleted file mode 100644 index c062ae4646..0000000000 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.css +++ /dev/null @@ -1,56 +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/. */ - -/** - * The downloads richlistbox may list thousands of items, and it turns out - * XBL binding attachment, and even more so detachment, is a performance hog. - * This hack makes sure we don't apply any binding to inactive items (inactive - * items are history downloads that haven't been in the visible area). - * We can do this because the richlistbox implementation does not interact - * much with the richlistitem binding. However, this may turn out to have - * some side effects (see bug 828111 for the details). - * - * We might be able to do away with this workaround once bug 653881 is fixed. - */ -richlistitem.download { - -moz-binding: none; -} - -richlistitem.download[active] { - -moz-binding: url('chrome://browser/content/downloads/download.xml#download-full-ui'); -} - -richlistitem.download[active]:-moz-any([state="-1"],/* Starting (initial) */ - [state="0"], /* Downloading */ - [state="4"], /* Paused */ - [state="5"], /* Starting (queued) */ - [state="7"]) /* Scanning */ -{ - -moz-binding: url('chrome://browser/content/downloads/download.xml#download-in-progress-full-ui'); -} - -.download-state:not( [state="0"] /* Downloading */) - .downloadPauseMenuItem, -.download-state:not( [state="4"] /* Paused */) - .downloadResumeMenuItem, -.download-state:not(:-moz-any([state="2"], /* Failed */ - [state="4"]) /* Paused */) - .downloadCancelMenuItem, -.download-state[state]:not(:-moz-any([state="1"], /* Finished */ - [state="2"], /* Failed */ - [state="3"], /* Canceled */ - [state="6"], /* Blocked (parental) */ - [state="8"], /* Blocked (dirty) */ - [state="9"]) /* Blocked (policy) */) - .downloadRemoveFromHistoryMenuItem, -.download-state:not(:-moz-any([state="-1"],/* Starting (initial) */ - [state="0"], /* Downloading */ - [state="1"], /* Finished */ - [state="4"], /* Paused */ - [state="5"]) /* Starting (queued) */) - .downloadShowMenuItem, -.download-state[state="7"] /* Scanning */ .downloadCommandsSeparator -{ - display: none; -} diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js deleted file mode 100644 index 824e9932ab..0000000000 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js +++ /dev/null @@ -1,1422 +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/. */ - -var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils", - "resource://gre/modules/DownloadUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsViewUI", - "resource:///modules/DownloadsViewUI.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", - "resource://gre/modules/FileUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "OS", - "resource://gre/modules/osfile.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Promise", - "resource://gre/modules/Promise.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Services", - "resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Task", - "resource://gre/modules/Task.jsm"); - -const nsIDM = Ci.nsIDownloadManager; - -const DESTINATION_FILE_URI_ANNO = "downloads/destinationFileURI"; -const DOWNLOAD_META_DATA_ANNO = "downloads/metaData"; - -const DOWNLOAD_VIEW_SUPPORTED_COMMANDS = - ["cmd_delete", "cmd_copy", "cmd_paste", "cmd_selectAll", - "downloadsCmd_pauseResume", "downloadsCmd_cancel", - "downloadsCmd_open", "downloadsCmd_show", "downloadsCmd_retry", - "downloadsCmd_openReferrer", "downloadsCmd_clearDownloads"]; - -/** - * Represents a download from the browser history. It implements part of the - * interface of the Download object. - * - * @param aPlacesNode - * The Places node from which the history download should be initialized. - */ -function HistoryDownload(aPlacesNode) { - // TODO (bug 829201): history downloads should get the referrer from Places. - this.source = { - url: aPlacesNode.uri, - }; - this.target = { - path: undefined, - exists: false, - size: undefined, - }; - - // In case this download cannot obtain its end time from the Places metadata, - // use the time from the Places node, that is the start time of the download. - this.endTime = aPlacesNode.time / 1000; -} - -HistoryDownload.prototype = { - /** - * Pushes information from Places metadata into this object. - */ - updateFromMetaData(metaData) { - try { - this.target.path = Cc["@mozilla.org/network/protocol;1?name=file"] - .getService(Ci.nsIFileProtocolHandler) - .getFileFromURLSpec(metaData.targetFileSpec).path; - } catch (ex) { - this.target.path = undefined; - } - - if ("state" in metaData) { - this.succeeded = metaData.state == nsIDM.DOWNLOAD_FINISHED; - this.error = metaData.state == nsIDM.DOWNLOAD_FAILED - ? { message: "History download failed." } - : metaData.state == nsIDM.DOWNLOAD_BLOCKED_PARENTAL - ? { becauseBlockedByParentalControls: true } - : metaData.state == nsIDM.DOWNLOAD_DIRTY - ? { becauseBlockedByReputationCheck: true } - : null; - this.canceled = metaData.state == nsIDM.DOWNLOAD_CANCELED || - metaData.state == nsIDM.DOWNLOAD_PAUSED; - this.endTime = metaData.endTime; - - // Normal history downloads are assumed to exist until the user interface - // is refreshed, at which point these values may be updated. - this.target.exists = true; - this.target.size = metaData.fileSize; - } else { - // Metadata might be missing from a download that has started but hasn't - // stopped already. Normally, this state is overridden with the one from - // the corresponding in-progress session download. But if the browser is - // terminated abruptly and additionally the file with information about - // in-progress downloads is lost, we may end up using this state. We use - // the failed state to allow the download to be restarted. - // - // On the other hand, if the download is missing the target file - // annotation as well, it is just a very old one, and we can assume it - // succeeded. - this.succeeded = !this.target.path; - this.error = this.target.path ? { message: "Unstarted download." } : null; - this.canceled = false; - - // These properties may be updated if the user interface is refreshed. - this.target.exists = false; - this.target.size = undefined; - } - }, - - /** - * History downloads are never in progress. - */ - stopped: true, - - /** - * No percentage indication is shown for history downloads. - */ - hasProgress: false, - - /** - * History downloads cannot be restarted using their partial data, even if - * they are indicated as paused in their Places metadata. The only way is to - * use the information from a persisted session download, that will be shown - * instead of the history download. In case this session download is not - * available, we show the history download as canceled, not paused. - */ - hasPartialData: false, - - /** - * This method mimicks the "start" method of session downloads, and is called - * when the user retries a history download. - * - * At present, we always ask the user for a new target path when retrying a - * history download. In the future we may consider reusing the known target - * path if the folder still exists and the file name is not already used, - * except when the user preferences indicate that the target path should be - * requested every time a new download is started. - */ - start() { - let browserWin = RecentWindow.getMostRecentBrowserWindow(); - let initiatingDoc = browserWin ? browserWin.document : document; - - // Do not suggest a file name if we don't know the original target. - let leafName = this.target.path ? OS.Path.basename(this.target.path) : null; - DownloadURL(this.source.url, leafName, initiatingDoc); - - return Promise.resolve(); - }, - - /** - * This method mimicks the "refresh" method of session downloads, except that - * it cannot notify that the data changed to the Downloads View. - */ - refresh: Task.async(function* () { - try { - this.target.size = (yield OS.File.stat(this.target.path)).size; - this.target.exists = true; - } catch (ex) { - // We keep the known file size from the metadata, if any. - this.target.exists = false; - } - }), -}; - -/** - * A download element shell is responsible for handling the commands and the - * displayed data for a single download view element. - * - * The shell may contain a session download, a history download, or both. When - * both a history and a session download are present, the session download gets - * priority and its information is displayed. - * - * On construction, a new richlistitem is created, and can be accessed through - * the |element| getter. The shell doesn't insert the item in a richlistbox, the - * caller must do it and remove the element when it's no longer needed. - * - * The caller is also responsible for forwarding status notifications for - * session downloads, calling the onStateChanged and onChanged methods. - * - * @param [optional] aSessionDownload - * The session download, required if aHistoryDownload is not set. - * @param [optional] aHistoryDownload - * The history download, required if aSessionDownload is not set. - */ -function HistoryDownloadElementShell(aSessionDownload, aHistoryDownload) { - this.element = document.createElement("richlistitem"); - this.element._shell = this; - - this.element.classList.add("download"); - this.element.classList.add("download-state"); - - if (aSessionDownload) { - this.sessionDownload = aSessionDownload; - } - if (aHistoryDownload) { - this.historyDownload = aHistoryDownload; - } -} - -HistoryDownloadElementShell.prototype = { - __proto__: DownloadsViewUI.DownloadElementShell.prototype, - - /** - * Manages the "active" state of the shell. By default all the shells without - * a session download are inactive, thus their UI is not updated. They must - * be activated when entering the visible area. Session downloads are always - * active. - */ - ensureActive: function() { - if (!this._active) { - this._active = true; - this.element.setAttribute("active", true); - this._updateUI(); - } - }, - get active() { - return !!this._active; - }, - - /** - * Overrides the base getter to return the Download or HistoryDownload object - * for displaying information and executing commands in the user interface. - */ - get download() { - return this._sessionDownload || this._historyDownload; - }, - - _sessionDownload: null, - get sessionDownload() { - return this._sessionDownload; - }, - set sessionDownload(aValue) { - if (this._sessionDownload != aValue) { - if (!aValue && !this._historyDownload) { - throw new Error("Should always have either a Download or a HistoryDownload"); - } - - this._sessionDownload = aValue; - - this.ensureActive(); - this._updateUI(); - } - return aValue; - }, - - _historyDownload: null, - get historyDownload() { - return this._historyDownload; - }, - set historyDownload(aValue) { - if (this._historyDownload != aValue) { - if (!aValue && !this._sessionDownload) { - throw new Error("Should always have either a Download or a HistoryDownload"); - } - - this._historyDownload = aValue; - - // We don't need to update the UI if we had a session data item, because - // the places information isn't used in this case. - if (!this._sessionDownload) { - this._updateUI(); - } - } - return aValue; - }, - - _updateUI() { - // There is nothing to do if the item has always been invisible. - if (!this.active) { - return; - } - - // Since the state changed, we may need to check the target file again. - this._targetFileChecked = false; - - this._updateState(); - }, - - get statusTextAndTip() { - let status = this.rawStatusTextAndTip; - - // The base object would show extended progress information in the tooltip, - // but we move this to the main view and never display a tooltip. - if (!this.download.stopped) { - status.text = status.tip; - } - status.tip = ""; - - return status; - }, - - onStateChanged() { - this.element.setAttribute("image", this.image); - this.element.setAttribute("state", - DownloadsCommon.stateOfDownload(this.download)); - - if (this.element.selected) { - goUpdateDownloadCommands(); - } else { - goUpdateCommand("downloadsCmd_clearDownloads"); - } - }, - - onChanged() { - this._updateProgress(); - }, - - /* nsIController */ - isCommandEnabled: function(aCommand) { - // The only valid command for inactive elements is cmd_delete. - if (!this.active && aCommand != "cmd_delete") - return false; - switch (aCommand) { - case "downloadsCmd_open": - // This property is false if the download did not succeed. - return this.download.target.exists; - case "downloadsCmd_show": - // TODO: Bug 827010 - Handle part-file asynchronously. - if (this._sessionDownload && this.download.target.partFilePath) { - let partFile = new FileUtils.File(this.download.target.partFilePath); - if (partFile.exists()) { - return true; - } - } - - // This property is false if the download did not succeed. - return this.download.target.exists; - case "downloadsCmd_pauseResume": - return this.download.hasPartialData && !this.download.error; - case "downloadsCmd_retry": - return this.download.canceled || this.download.error; - case "downloadsCmd_openReferrer": - return !!this.download.source.referrer; - case "cmd_delete": - // We don't want in-progress downloads to be removed accidentally. - return this.download.stopped; - case "downloadsCmd_cancel": - return !!this._sessionDownload; - } - return false; - }, - - /* nsIController */ - doCommand: function(aCommand) { - switch (aCommand) { - case "downloadsCmd_open": { - let file = new FileUtils.File(this.download.target.path); - DownloadsCommon.openDownloadedFile(file, null, window); - break; - } - case "downloadsCmd_show": { - let file = new FileUtils.File(this.download.target.path); - DownloadsCommon.showDownloadedFile(file); - break; - } - case "downloadsCmd_openReferrer": { - openURL(this.download.source.referrer); - break; - } - case "downloadsCmd_cancel": { - this.download.cancel().catch(() => {}); - this.download.removePartialData().catch(Cu.reportError); - break; - } - case "cmd_delete": { - if (this._sessionDownload) { - DownloadsCommon.removeAndFinalizeDownload(this.download); - } - if (this._historyDownload) { - let uri = NetUtil.newURI(this.download.source.url); - PlacesUtils.bhistory.removePage(uri); - } - break; - } - case "downloadsCmd_retry": { - // Errors when retrying are already reported as download failures. - this.download.start().catch(() => {}); - break; - } - case "downloadsCmd_pauseResume": { - // This command is only enabled for session downloads. - if (this.download.stopped) { - this.download.start(); - } else { - this.download.cancel(); - } - break; - } - } - }, - - // Returns whether or not the download handled by this shell should - // show up in the search results for the given term. Both the display - // name for the download and the url are searched. - matchesSearchTerm: function(aTerm) { - if (!aTerm) - return true; - aTerm = aTerm.toLowerCase(); - return this.displayName.toLowerCase().contains(aTerm) || - this.download.source.url.toLowerCase().contains(aTerm); - }, - - // Handles return keypress on the element (the keypress listener is - // set in the DownloadsPlacesView object). - doDefaultCommand: function() { - function getDefaultCommandForState(aState) { - switch (aState) { - case nsIDM.DOWNLOAD_FINISHED: - return "downloadsCmd_open"; - case nsIDM.DOWNLOAD_PAUSED: - return "downloadsCmd_pauseResume"; - case nsIDM.DOWNLOAD_NOTSTARTED: - case nsIDM.DOWNLOAD_QUEUED: - return "downloadsCmd_cancel"; - case nsIDM.DOWNLOAD_FAILED: - case nsIDM.DOWNLOAD_CANCELED: - return "downloadsCmd_retry"; - case nsIDM.DOWNLOAD_SCANNING: - return "downloadsCmd_show"; - case nsIDM.DOWNLOAD_BLOCKED_PARENTAL: - case nsIDM.DOWNLOAD_DIRTY: - case nsIDM.DOWNLOAD_BLOCKED_POLICY: - return "downloadsCmd_openReferrer"; - } - return ""; - } - let state = DownloadsCommon.stateOfDownload(this.download); - let command = getDefaultCommandForState(state); - if (command && this.isCommandEnabled(command)) - this.doCommand(command); - }, - - /** - * This method is called by the outer download view, after the controller - * commands have already been updated. In case we did not check for the - * existence of the target file already, we can do it now and then update - * the commands as needed. - */ - onSelect: function() { - if (!this.active) - return; - - // If this is a history download for which no target file information is - // available, we cannot retrieve information about the target file. - if (!this.download.target.path) { - return; - } - - // Start checking for existence. This may be done twice if onSelect is - // called again before the information is collected. - if (!this._targetFileChecked) { - this._checkTargetFileOnSelect().catch(Cu.reportError); - } - }, - - _checkTargetFileOnSelect: Task.async(function* () { - try { - yield this.download.refresh(); - } finally { - // Do not try to check for existence again if this failed once. - this._targetFileChecked = true; - } - - // Update the commands only if the element is still selected. - if (this.element.selected) { - goUpdateDownloadCommands(); - } - - // Ensure the interface has been updated based on the new values. We need to - // do this because history downloads can't trigger update notifications. - this._updateProgress(); - }), -}; - -/** - * A Downloads Places View is a places view designed to show a places query - * for history downloads alongside the session downloads. - * - * As we don't use the places controller, some methods implemented by other - * places views are not implemented by this view. - * - * A richlistitem in this view can represent either a past download or a session - * download, or both. Session downloads are shown first in the view, and as long - * as they exist they "collapses" their history "counterpart" (So we don't show two - * items for every download). - */ -function DownloadsPlacesView(aRichListBox, aActive = true) { - this._richlistbox = aRichListBox; - this._richlistbox._placesView = this; - window.controllers.insertControllerAt(0, this); - - // Map download URLs to download element shells regardless of their type - this._downloadElementsShellsForURI = new Map(); - - // Map download data items to their element shells. - this._viewItemsForDownloads = new WeakMap(); - - // Points to the last session download element. We keep track of this - // in order to keep all session downloads above past downloads. - this._lastSessionDownloadElement = null; - - this._searchTerm = ""; - - this._active = aActive; - - // Register as a downloads view. The places data will be initialized by - // the places setter. - this._initiallySelectedElement = null; - this._downloadsData = DownloadsCommon.getData(window.opener || window); - this._downloadsData.addView(this); - - // Get the Download button out of the attention state since we're about to - // view all downloads. - DownloadsCommon.getIndicatorData(window).attention = false; - - // Make sure to unregister the view if the window is closed. - window.addEventListener("unload", function() { - window.controllers.removeController(this); - this._downloadsData.removeView(this); - this.result = null; - }.bind(this), true); - // Resizing the window may change items visibility. - window.addEventListener("resize", function() { - this._ensureVisibleElementsAreActive(); - }.bind(this), true); -} - -DownloadsPlacesView.prototype = { - get associatedElement() { - return this._richlistbox; - }, - - - get active() { - return this._active; - }, - set active(val) { - this._active = val; - if (this._active) - this._ensureVisibleElementsAreActive(); - return this._active; - }, - - /** - * This cache exists in order to optimize the load of the Downloads View, when - * Places annotations for history downloads must be read. In fact, annotations - * are stored in a single table, and reading all of them at once is much more - * efficient than an individual query. - * - * When this property is first requested, it reads the annotations for all the - * history downloads and stores them indefinitely. - * - * The historical annotations are not expected to change for the duration of - * the session, except in the case where a session download is running for the - * same URI as a history download. To ensure we don't use stale data, URIs - * corresponding to session downloads are permanently removed from the cache. - * This is a very small mumber compared to history downloads. - * - * This property returns a Map from each download source URI found in Places - * annotations to an object with the format: - * - * { targetFileSpec, state, endTime, fileSize, ... } - * - * The targetFileSpec property is the value of "downloads/destinationFileURI", - * while the other properties are taken from "downloads/metaData". Any of the - * properties may be missing from the object. - */ - get _cachedPlacesMetaData() { - if (!this.__cachedPlacesMetaData) { - this.__cachedPlacesMetaData = new Map(); - - // Read the metadata annotations first, but ignore invalid JSON. - for (let result of PlacesUtils.annotations.getAnnotationsWithName( - DOWNLOAD_META_DATA_ANNO)) { - try { - this.__cachedPlacesMetaData.set(result.uri.spec, - JSON.parse(result.annotationValue)); - } catch (ex) {} - } - - // Add the target file annotations to the metadata. - for (let result of PlacesUtils.annotations.getAnnotationsWithName( - DESTINATION_FILE_URI_ANNO)) { - let metaData = this.__cachedPlacesMetaData.get(result.uri.spec); - if (!metaData) { - metaData = {}; - this.__cachedPlacesMetaData.set(result.uri.spec, metaData); - } - metaData.targetFileSpec = result.annotationValue; - } - } - - return this.__cachedPlacesMetaData; - }, - __cachedPlacesMetaData: null, - - /** - * Reads current metadata from Places annotations for the specified URI, and - * returns an object with the format: - * - * { targetFileSpec, state, endTime, fileSize, ... } - * - * The targetFileSpec property is the value of "downloads/destinationFileURI", - * while the other properties are taken from "downloads/metaData". Any of the - * properties may be missing from the object. - */ - _getPlacesMetaDataFor(spec) { - let metaData = {}; - - try { - let uri = NetUtil.newURI(spec); - try { - metaData = JSON.parse(PlacesUtils.annotations.getPageAnnotation( - uri, DOWNLOAD_META_DATA_ANNO)); - } catch (ex) {} - metaData.targetFileSpec = PlacesUtils.annotations.getPageAnnotation( - uri, DESTINATION_FILE_URI_ANNO); - } catch (ex) {} - - return metaData; - }, - - /** - * Given a data item for a session download, or a places node for a past - * download, updates the view as necessary. - * 1. If the given data is a places node, we check whether there are any - * elements for the same download url. If there are, then we just reset - * their places node. Otherwise we add a new download element. - * 2. If the given data is a data item, we first check if there's a history - * download in the list that is not associated with a data item. If we - * found one, we use it for the data item as well and reposition it - * alongside the other session downloads. If we don't, then we go ahead - * and create a new element for the download. - * - * @param [optional] sessionDownload - * A Download object, or null for history downloads. - * @param [optional] aPlacesNode - * The Places node for a history download, or null for session downloads. - * @param [optional] aNewest - * @see onDownloadAdded. Ignored for history downloads. - * @param [optional] aDocumentFragment - * To speed up the appending of multiple elements to the end of the - * list which are coming in a single batch (i.e. invalidateContainer), - * a document fragment may be passed to which the new elements would - * be appended. It's the caller's job to ensure the fragment is merged - * to the richlistbox at the end. - */ - _addDownloadData(sessionDownload, aPlacesNode, aNewest = false, - aDocumentFragment = null) { - let downloadURI = aPlacesNode ? aPlacesNode.uri - : sessionDownload.source.url; - let shellsForURI = this._downloadElementsShellsForURI.get(downloadURI); - if (!shellsForURI) { - shellsForURI = new Set(); - this._downloadElementsShellsForURI.set(downloadURI, shellsForURI); - } - - // When a session download is attached to a shell, we ensure not to keep - // stale metadata around for the corresponding history download. This - // prevents stale state from being used if the view is rebuilt. - // - // Note that we will eagerly load the data in the cache at this point, even - // if we have seen no history download. The case where no history download - // will appear at all is rare enough in normal usage, so we can apply this - // simpler solution rather than keeping a list of cache items to ignore. - if (sessionDownload) { - this._cachedPlacesMetaData.delete(sessionDownload.source.url); - } - - let newOrUpdatedShell = null; - - // Trivial: if there are no shells for this download URI, we always - // need to create one. - let shouldCreateShell = shellsForURI.size == 0; - - // However, if we do have shells for this download uri, there are - // few options: - // 1) There's only one shell and it's for a history download (it has - // no data item). In this case, we update this shell and move it - // if necessary - // 2) There are multiple shells, indicating multiple downloads for - // the same download uri are running. In this case we create - // another shell for the download (so we have one shell for each data - // item). - // - // Note: If a cancelled session download is already in the list, and the - // download is retried, onDownloadAdded is called again for the same - // data item. Thus, we also check that we make sure we don't have a view item - // already. - if (!shouldCreateShell && - sessionDownload && !this._viewItemsForDownloads.has(sessionDownload)) { - // If there's a past-download-only shell for this download-uri with no - // associated data item, use it for the new data item. Otherwise, go ahead - // and create another shell. - shouldCreateShell = true; - for (let shell of shellsForURI) { - if (!shell.sessionDownload) { - shouldCreateShell = false; - shell.sessionDownload = sessionDownload; - newOrUpdatedShell = shell; - this._viewItemsForDownloads.set(sessionDownload, shell); - break; - } - } - } - - if (shouldCreateShell) { - // If we are adding a new history download here, it means there is no - // associated session download, thus we must read the Places metadata, - // because it will not be obscured by the session download. - let historyDownload = null; - if (aPlacesNode) { - let metaData = this._cachedPlacesMetaData.get(aPlacesNode.uri) || - this._getPlacesMetaDataFor(aPlacesNode.uri); - historyDownload = new HistoryDownload(aPlacesNode); - historyDownload.updateFromMetaData(metaData); - } - let shell = new HistoryDownloadElementShell(sessionDownload, - historyDownload); - shell.element._placesNode = aPlacesNode; - newOrUpdatedShell = shell; - shellsForURI.add(shell); - if (sessionDownload) { - this._viewItemsForDownloads.set(sessionDownload, shell); - } - } - else if (aPlacesNode) { - // We are updating information for a history download for which we have - // at least one download element shell already. There are two cases: - // 1) There are one or more download element shells for this source URI, - // each with an associated session download. We update the Places node - // because we may need it later, but we don't need to read the Places - // metadata until the last session download is removed. - // 2) Occasionally, we may receive a duplicate notification for a history - // download with no associated session download. We have exactly one - // download element shell in this case, but the metdata cannot have - // changed, just the reference to the Places node object is different. - // So, we update all the node references and keep the metadata intact. - for (let shell of shellsForURI) { - if (!shell.historyDownload) { - // Create the element to host the metadata when needed. - shell.historyDownload = new HistoryDownload(aPlacesNode); - } - shell.element._placesNode = aPlacesNode; - } - } - - if (newOrUpdatedShell) { - if (aNewest) { - this._richlistbox.insertBefore(newOrUpdatedShell.element, - this._richlistbox.firstChild); - if (!this._lastSessionDownloadElement) { - this._lastSessionDownloadElement = newOrUpdatedShell.element; - } - // Some operations like retrying an history download move an element to - // the top of the richlistbox, along with other session downloads. - // More generally, if a new download is added, should be made visible. - this._richlistbox.ensureElementIsVisible(newOrUpdatedShell.element); - } else if (sessionDownload) { - let before = this._lastSessionDownloadElement ? - this._lastSessionDownloadElement.nextSibling : this._richlistbox.firstChild; - this._richlistbox.insertBefore(newOrUpdatedShell.element, before); - this._lastSessionDownloadElement = newOrUpdatedShell.element; - } - else { - let appendTo = aDocumentFragment || this._richlistbox; - appendTo.appendChild(newOrUpdatedShell.element); - } - - if (this.searchTerm) { - newOrUpdatedShell.element.hidden = - !newOrUpdatedShell.element._shell.matchesSearchTerm(this.searchTerm); - } - } - - // If aDocumentFragment is defined this is a batch change, so it's up to - // the caller to append the fragment and activate the visible shells. - if (!aDocumentFragment) { - this._ensureVisibleElementsAreActive(); - goUpdateCommand("downloadsCmd_clearDownloads"); - } - }, - - _removeElement: function(aElement) { - // If the element was selected exclusively, select its next - // sibling first, if not, try for previous sibling, if any. - if ((aElement.nextSibling || aElement.previousSibling) && - this._richlistbox.selectedItems && - this._richlistbox.selectedItems.length == 1 && - this._richlistbox.selectedItems[0] == aElement) { - this._richlistbox.selectItem(aElement.nextSibling || - aElement.previousSibling); - } - - if (this._lastSessionDownloadElement == aElement) - this._lastSessionDownloadElement = aElement.previousSibling; - - this._richlistbox.removeItemFromSelection(aElement); - this._richlistbox.removeChild(aElement); - this._ensureVisibleElementsAreActive(); - goUpdateCommand("downloadsCmd_clearDownloads"); - }, - - _removeHistoryDownloadFromView: - function(aPlacesNode) { - let downloadURI = aPlacesNode.uri; - let shellsForURI = this._downloadElementsShellsForURI.get(downloadURI); - if (shellsForURI) { - for (let shell of shellsForURI) { - if (shell.sessionDownload) { - shell.historyDownload = null; - } - else { - this._removeElement(shell.element); - shellsForURI.delete(shell); - if (shellsForURI.size == 0) - this._downloadElementsShellsForURI.delete(downloadURI); - } - } - } - }, - - _removeSessionDownloadFromView(download) { - let shells = this._downloadElementsShellsForURI - .get(download.source.url); - if (shells.size == 0) - throw new Error("Should have had at leaat one shell for this uri"); - - let shell = this._viewItemsForDownloads.get(download); - if (!shells.has(shell)) - throw new Error("Missing download element shell in shells list for url"); - - // If there's more than one item for this download uri, we can let the - // view item for this this particular data item go away. - // If there's only one item for this download uri, we should only - // keep it if it is associated with a history download. - if (shells.size > 1 || !shell.historyDownload) { - this._removeElement(shell.element); - shells.delete(shell); - if (shells.size == 0) - this._downloadElementsShellsForURI.delete(download.source.url); - } - else { - // We have one download element shell containing both a session download - // and a history download, and we are now removing the session download. - // Previously, we did not use the Places metadata because it was obscured - // by the session download. Since this is no longer the case, we have to - // read the latest metadata before removing the session download. - let url = shell.historyDownload.source.url; - let metaData = this._getPlacesMetaDataFor(url); - shell.historyDownload.updateFromMetaData(metaData); - shell.sessionDownload = null; - // Move it below the session-download items; - if (this._lastSessionDownloadElement == shell.element) { - this._lastSessionDownloadElement = shell.element.previousSibling; - } - else { - let before = this._lastSessionDownloadElement ? - this._lastSessionDownloadElement.nextSibling : this._richlistbox.firstChild; - this._richlistbox.insertBefore(shell.element, before); - } - } - }, - - _ensureVisibleElementsAreActive: - function() { - if (!this.active || this._ensureVisibleTimer || !this._richlistbox.firstChild) - return; - - this._ensureVisibleTimer = setTimeout(function() { - delete this._ensureVisibleTimer; - if (!this._richlistbox.firstChild) - return; - - let rlbRect = this._richlistbox.getBoundingClientRect(); - let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - let nodes = winUtils.nodesFromRect(rlbRect.left, rlbRect.top, - 0, rlbRect.width, rlbRect.height, 0, - true, false); - // nodesFromRect returns nodes in z-index order, and for the same z-index - // sorts them in inverted DOM order, thus starting from the one that would - // be on top. - let firstVisibleNode, lastVisibleNode; - for (let node of nodes) { - if (node.localName === "richlistitem" && node._shell) { - node._shell.ensureActive(); - // The first visible node is the last match. - firstVisibleNode = node; - // While the last visible node is the first match. - if (!lastVisibleNode) - lastVisibleNode = node; - } - } - - // Also activate the first invisible nodes in both boundaries (that is, - // above and below the visible area) to ensure proper keyboard navigation - // in both directions. - let nodeBelowVisibleArea = lastVisibleNode && lastVisibleNode.nextSibling; - if (nodeBelowVisibleArea && nodeBelowVisibleArea._shell) - nodeBelowVisibleArea._shell.ensureActive(); - - let nodeABoveVisibleArea = - firstVisibleNode && firstVisibleNode.previousSibling; - if (nodeABoveVisibleArea && nodeABoveVisibleArea._shell) - nodeABoveVisibleArea._shell.ensureActive(); - }.bind(this), 10); - }, - - _place: "", - get place() { - return this._place; - }, - set place(val) { - // Don't reload everything if we don't have to. - if (this._place == val) { - // XXXmano: places.js relies on this behavior (see Bug 822203). - this.searchTerm = ""; - return val; - } - - this._place = val; - - let history = PlacesUtils.history; - let queries = { }, options = { }; - history.queryStringToQueries(val, queries, { }, options); - if (!queries.value.length) - queries.value = [history.getNewQuery()]; - - let result = history.executeQueries(queries.value, queries.value.length, - options.value); - result.addObserver(this, false); - return val; - }, - - _result: null, - get result() { - return this._result; - }, - set result(val) { - if (this._result == val) - return val; - - if (this._result) { - this._result.removeObserver(this); - this._resultNode.containerOpen = false; - } - - if (val) { - this._result = val; - this._resultNode = val.root; - this._resultNode.containerOpen = true; - this._ensureInitialSelection(); - } - else { - delete this._resultNode; - delete this._result; - } - - return val; - }, - - get selectedNodes() { - return [for (element of this._richlistbox.selectedItems) - if (element._placesNode) - element._placesNode]; - }, - - get selectedNode() { - let selectedNodes = this.selectedNodes; - return selectedNodes.length == 1 ? selectedNodes[0] : null; - }, - - get hasSelection() { - return this.selectedNodes.length > 0; - }, - - containerStateChanged: - function(aNode, aOldState, aNewState) { - this.invalidateContainer(aNode) - }, - - invalidateContainer: - function(aContainer) { - if (aContainer != this._resultNode) - throw new Error("Unexpected container node"); - if (!aContainer.containerOpen) - throw new Error("Root container for the downloads query cannot be closed"); - - let suppressOnSelect = this._richlistbox.suppressOnSelect; - this._richlistbox.suppressOnSelect = true; - try { - // Remove the invalidated history downloads from the list and unset the - // places node for data downloads. - // Loop backwards since _removeHistoryDownloadFromView may removeChild(). - for (let i = this._richlistbox.childNodes.length - 1; i >= 0; --i) { - let element = this._richlistbox.childNodes[i]; - if (element._placesNode) { - this._removeHistoryDownloadFromView(element._placesNode); - } - } - } - finally { - this._richlistbox.suppressOnSelect = suppressOnSelect; - } - - if (aContainer.childCount > 0) { - let elementsToAppendFragment = document.createDocumentFragment(); - for (let i = 0; i < aContainer.childCount; i++) { - try { - this._addDownloadData(null, aContainer.getChild(i), false, - elementsToAppendFragment); - } - catch(ex) { - Cu.reportError(ex); - } - } - - // _addDownloadData may not add new elements if there were already - // data items in place. - if (elementsToAppendFragment.firstChild) { - this._appendDownloadsFragment(elementsToAppendFragment); - this._ensureVisibleElementsAreActive(); - } - } - - goUpdateDownloadCommands(); - }, - - _appendDownloadsFragment: function(aDOMFragment) { - // Workaround multiple reflows hang by removing the richlistbox - // and adding it back when we're done. - - // Hack for bug 836283: reset xbl fields to their old values after the - // binding is reattached to avoid breaking the selection state - let xblFields = new Map(); - for (let [key, value] in Iterator(this._richlistbox)) { - xblFields.set(key, value); - } - - let parentNode = this._richlistbox.parentNode; - let nextSibling = this._richlistbox.nextSibling; - parentNode.removeChild(this._richlistbox); - this._richlistbox.appendChild(aDOMFragment); - parentNode.insertBefore(this._richlistbox, nextSibling); - - for (let [key, value] of xblFields) { - this._richlistbox[key] = value; - } - }, - - nodeInserted: function(aParent, aPlacesNode) { - this._addDownloadData(null, aPlacesNode); - }, - - nodeRemoved: function(aParent, aPlacesNode, aOldIndex) { - this._removeHistoryDownloadFromView(aPlacesNode); - }, - - nodeAnnotationChanged() {}, - nodeIconChanged() {}, - nodeTitleChanged() {}, - nodeKeywordChanged: function() {}, - nodeDateAddedChanged: function() {}, - nodeLastModifiedChanged: function() {}, - nodeHistoryDetailsChanged: function() {}, - nodeTagsChanged: function() {}, - sortingChanged: function() {}, - nodeMoved: function() {}, - nodeURIChanged: function() {}, - batching: function() {}, - - get controller() { - return this._richlistbox.controller; - }, - - get searchTerm() { - return this._searchTerm; - }, - set searchTerm(aValue) { - if (this._searchTerm != aValue) { - for (let element of this._richlistbox.childNodes) { - element.hidden = !element._shell.matchesSearchTerm(aValue); - } - this._ensureVisibleElementsAreActive(); - } - return this._searchTerm = aValue; - }, - - /** - * When the view loads, we want to select the first item. - * However, because session downloads, for which the data is loaded - * asynchronously, always come first in the list, and because the list - * may (or may not) already contain history downloads at that point, it - * turns out that by the time we can select the first item, the user may - * have already started using the view. - * To make things even more complicated, in other cases, the places data - * may be loaded after the session downloads data. Thus we cannot rely on - * the order in which the data comes in. - * We work around this by attempting to select the first element twice, - * once after the places data is loaded and once when the session downloads - * data is done loading. However, if the selection has changed in-between, - * we assume the user has already started using the view and give up. - */ - _ensureInitialSelection: function() { - // Either they're both null, or the selection has not changed in between. - if (this._richlistbox.selectedItem == this._initiallySelectedElement) { - let firstDownloadElement = this._richlistbox.firstChild; - if (firstDownloadElement != this._initiallySelectedElement) { - // We may be called before _ensureVisibleElementsAreActive, - // or before the download binding is attached. Therefore, ensure the - // first item is activated, and pass the item to the richlistbox - // setters only at a point we know for sure the binding is attached. - firstDownloadElement._shell.ensureActive(); - Services.tm.mainThread.dispatch(function() { - this._richlistbox.selectedItem = firstDownloadElement; - this._richlistbox.currentItem = firstDownloadElement; - this._initiallySelectedElement = firstDownloadElement; - }.bind(this), Ci.nsIThread.DISPATCH_NORMAL); - } - } - }, - - onDataLoadStarting: function() { }, - onDataLoadCompleted: function() { - this._ensureInitialSelection(); - }, - - onDownloadAdded(download, newest) { - this._addDownloadData(download, null, newest); - }, - - onDownloadStateChanged(download) { - this._viewItemsForDownloads.get(download).onStateChanged(); - }, - - onDownloadChanged(download) { - this._viewItemsForDownloads.get(download).onChanged(); - }, - - onDownloadRemoved(download) { - this._removeSessionDownloadFromView(download); - }, - - supportsCommand: function(aCommand) { - if (DOWNLOAD_VIEW_SUPPORTED_COMMANDS.indexOf(aCommand) != -1) { - // The clear-downloads command may be performed by the toolbar-button, - // which can be focused on OS X. Thus enable this command even if the - // richlistbox is not focused. - // For other commands, be prudent and disable them unless the richlistview - // is focused. It's important to make the decision here rather than in - // isCommandEnabled. Otherwise our controller may "steal" commands from - // other controls in the window (see goUpdateCommand & - // getControllerForCommand). - if (document.activeElement == this._richlistbox || - aCommand == "downloadsCmd_clearDownloads") { - return true; - } - } - return false; - }, - - isCommandEnabled: function(aCommand) { - switch (aCommand) { - case "cmd_copy": - return this._richlistbox.selectedItems.length > 0; - case "cmd_selectAll": - return true; - case "cmd_paste": - return this._canDownloadClipboardURL(); - case "downloadsCmd_clearDownloads": - return this._canClearDownloads(); - default: - return Array.every(this._richlistbox.selectedItems, function(element) { - return element._shell.isCommandEnabled(aCommand); - }); - } - }, - - _canClearDownloads: function() { - // Downloads can be cleared if there's at least one removable download in - // the list (either a history download or a completed session download). - // Because history downloads are always removable and are listed after the - // session downloads, check from bottom to top. - for (let elt = this._richlistbox.lastChild; elt; elt = elt.previousSibling) { - // Stopped, paused, and failed downloads with partial data are removed. - let download = elt._shell.download; - if (download.stopped && !(download.canceled && download.hasPartialData)) { - return true; - } - } - return false; - }, - - _copySelectedDownloadsToClipboard: - function() { - let urls = [for (element of this._richlistbox.selectedItems) - element._shell.download.source.url]; - - Cc["@mozilla.org/widget/clipboardhelper;1"] - .getService(Ci.nsIClipboardHelper) - .copyString(urls.join("\n"), document); - }, - - _getURLFromClipboardData: function() { - let trans = Cc["@mozilla.org/widget/transferable;1"]. - createInstance(Ci.nsITransferable); - trans.init(null); - - let flavors = ["text/x-moz-url", "text/unicode"]; - flavors.forEach(trans.addDataFlavor); - - Services.clipboard.getData(trans, Services.clipboard.kGlobalClipboard); - - // Getting the data or creating the nsIURI might fail. - try { - let data = {}; - trans.getAnyTransferData({}, data, {}); - let [url, name] = data.value.QueryInterface(Ci.nsISupportsString) - .data.split("\n"); - if (url) - return [NetUtil.newURI(url, null, null).spec, name]; - } - catch(ex) { } - - return ["", ""]; - }, - - _canDownloadClipboardURL: function() { - let [url, name] = this._getURLFromClipboardData(); - return url != ""; - }, - - _downloadURLFromClipboard: function() { - let [url, name] = this._getURLFromClipboardData(); - let browserWin = RecentWindow.getMostRecentBrowserWindow(); - let initiatingDoc = browserWin ? browserWin.document : document; - DownloadURL(url, name, initiatingDoc); - }, - - doCommand: function(aCommand) { - // Commands may be invoked with keyboard shortcuts even if disabled. - if (!this.isCommandEnabled(aCommand)) { - return; - } - switch (aCommand) { - case "cmd_copy": - this._copySelectedDownloadsToClipboard(); - break; - case "cmd_selectAll": - this._richlistbox.selectAll(); - break; - case "cmd_paste": - this._downloadURLFromClipboard(); - break; - case "downloadsCmd_clearDownloads": - this._downloadsData.removeFinished(); - if (this.result) { - Cc["@mozilla.org/browser/download-history;1"] - .getService(Ci.nsIDownloadHistory) - .removeAllDownloads(); - } - // There may be no selection or focus change as a result - // of these change, and we want the command updated immediately. - goUpdateCommand("downloadsCmd_clearDownloads"); - break; - default: { - // Cloning the nodelist into an array to get a frozen list of selected items. - // Otherwise, the selectedItems nodelist is live and doCommand may alter the - // selection while we are trying to do one particular action, like removing - // items from history. - let selectedElements = [...this._richlistbox.selectedItems]; - for (let element of selectedElements) { - element._shell.doCommand(aCommand); - } - } - } - }, - - onEvent: function() { }, - - onContextMenu: function(aEvent) - { - let element = this._richlistbox.selectedItem; - if (!element || !element._shell) - return false; - - // Set the state attribute so that only the appropriate items are displayed. - let contextMenu = document.getElementById("downloadsContextMenu"); - let download = element._shell.download; - contextMenu.setAttribute("state", - DownloadsCommon.stateOfDownload(download)); - - if (!download.stopped) { - // The hasPartialData property of a download may change at any time after - // it has started, so ensure we update the related command now. - goUpdateCommand("downloadsCmd_pauseResume"); - } - return true; - }, - - onKeyPress: function(aEvent) { - let selectedElements = this._richlistbox.selectedItems; - if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN) { - // In the content tree, opening bookmarks by pressing return is only - // supported when a single item is selected. To be consistent, do the - // same here. - if (selectedElements.length == 1) { - let element = selectedElements[0]; - if (element._shell) - element._shell.doDefaultCommand(); - } - } - else if (aEvent.charCode == " ".charCodeAt(0)) { - // Pause/Resume every selected download - for (let element of selectedElements) { - if (element._shell.isCommandEnabled("downloadsCmd_pauseResume")) - element._shell.doCommand("downloadsCmd_pauseResume"); - } - } - }, - - onDoubleClick: function(aEvent) { - if (aEvent.button != 0) - return; - - let selectedElements = this._richlistbox.selectedItems; - if (selectedElements.length != 1) - return; - - let element = selectedElements[0]; - if (element._shell) - element._shell.doDefaultCommand(); - }, - - onScroll: function() { - this._ensureVisibleElementsAreActive(); - }, - - onSelect: function() { - goUpdateDownloadCommands(); - - let selectedElements = this._richlistbox.selectedItems; - for (let elt of selectedElements) { - if (elt._shell) - elt._shell.onSelect(); - } - }, - - onDragStart: function(aEvent) { - // TODO Bug 831358: Support d&d for multiple selection. - // For now, we just drag the first element. - let selectedItem = this._richlistbox.selectedItem; - if (!selectedItem) - return; - - let targetPath = selectedItem._shell.download.target.path; - if (!targetPath) { - return; - } - - // We must check for existence synchronously because this is a DOM event. - let file = new FileUtils.File(targetPath); - if (!file.exists()) - return; - - let dt = aEvent.dataTransfer; - dt.mozSetDataAt("application/x-moz-file", file, 0); - let url = Services.io.newFileURI(file).spec; - dt.setData("text/uri-list", url); - dt.setData("text/plain", url); - dt.effectAllowed = "copyMove"; - dt.addElement(selectedItem); - }, - - onDragOver: function(aEvent) { - let types = aEvent.dataTransfer.types; - if (types.contains("text/uri-list") || - types.contains("text/x-moz-url") || - types.contains("text/plain")) { - aEvent.preventDefault(); - } - }, - - onDrop: function(aEvent) { - let dt = aEvent.dataTransfer; - // If dragged item is from our source, do not try to - // redownload already downloaded file. - if (dt.mozGetDataAt("application/x-moz-file", 0)) - return; - - let links = Services.droppedLinkHandler.dropLinks(aEvent); - if (!links.length) - return; - let browserWin = RecentWindow.getMostRecentBrowserWindow(); - let initiatingDoc = browserWin ? browserWin.document : document; - for (let link of links) { - if (link.url.startsWith("about:")) - continue; - DownloadURL(link.url, link.name, initiatingDoc); - } - } -}; - -for (let methodName of ["load", "applyFilter", "selectNode", "selectItems"]) { - DownloadsPlacesView.prototype[methodName] = function() { - throw new Error("|" + methodName + "| is not implemented by the downloads view."); - } -} - -function goUpdateDownloadCommands() { - for (let command of DOWNLOAD_VIEW_SUPPORTED_COMMANDS) { - goUpdateCommand(command); - } -} diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.xul b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.xul deleted file mode 100644 index 3571adc5c8..0000000000 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.xul +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - -%downloadsDTD; -]> - - - - - - -
-
- - - -
-

-

-

-
-
-
- - diff --git a/application/palemoon/components/feeds/content/subscribe.xml b/application/palemoon/components/feeds/content/subscribe.xml deleted file mode 100644 index 949bcfd7e6..0000000000 --- a/application/palemoon/components/feeds/content/subscribe.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - %feedDTD; -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/components/feeds/jar.mn b/application/palemoon/components/feeds/jar.mn deleted file mode 100644 index f8896f8772..0000000000 --- a/application/palemoon/components/feeds/jar.mn +++ /dev/null @@ -1,9 +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/. - -browser.jar: - content/browser/feeds/subscribe.xhtml (content/subscribe.xhtml) - content/browser/feeds/subscribe.js (content/subscribe.js) - content/browser/feeds/subscribe.xml (content/subscribe.xml) - content/browser/feeds/subscribe.css (content/subscribe.css) diff --git a/application/palemoon/components/feeds/moz.build b/application/palemoon/components/feeds/moz.build deleted file mode 100644 index 24dd30c824..0000000000 --- a/application/palemoon/components/feeds/moz.build +++ /dev/null @@ -1,32 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -JAR_MANIFESTS += ['jar.mn'] - -XPIDL_SOURCES += [ - 'nsIFeedResultService.idl', - 'nsIWebContentConverterRegistrar.idl', -] - -XPIDL_MODULE = 'browser-feeds' - -SOURCES += ['nsFeedSniffer.cpp'] - -EXTRA_COMPONENTS += [ - 'BrowserFeeds.manifest', - 'FeedConverter.js', -] - -EXTRA_PP_COMPONENTS += [ - 'FeedWriter.js', - 'WebContentConverter.js', -] - -FINAL_LIBRARY = 'browsercomps' - -for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'): - DEFINES[var] = CONFIG[var] - -LOCAL_INCLUDES += ['../build'] diff --git a/application/palemoon/components/feeds/nsFeedSniffer.cpp b/application/palemoon/components/feeds/nsFeedSniffer.cpp deleted file mode 100644 index f314d3d3bd..0000000000 --- a/application/palemoon/components/feeds/nsFeedSniffer.cpp +++ /dev/null @@ -1,363 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -#include "nsFeedSniffer.h" - - -#include "nsNetCID.h" -#include "nsXPCOM.h" -#include "nsCOMPtr.h" -#include "nsStringStream.h" - -#include "nsBrowserCompsCID.h" - -#include "nsICategoryManager.h" -#include "nsIServiceManager.h" -#include "nsComponentManagerUtils.h" -#include "nsServiceManagerUtils.h" - -#include "nsIStreamConverterService.h" -#include "nsIStreamConverter.h" - -#include "nsIStreamListener.h" - -#include "nsIHttpChannel.h" -#include "nsIMIMEHeaderParam.h" - -#include "nsMimeTypes.h" -#include "nsIURI.h" -#include - -#define TYPE_ATOM "application/atom+xml" -#define TYPE_RSS "application/rss+xml" -#define TYPE_MAYBE_FEED "application/vnd.mozilla.maybe.feed" - -#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" -#define NS_RSS "http://purl.org/rss/1.0/" - -#define MAX_BYTES 512u - -NS_IMPL_ISUPPORTS(nsFeedSniffer, - nsIContentSniffer, - nsIStreamListener, - nsIRequestObserver) - -nsresult -nsFeedSniffer::ConvertEncodedData(nsIRequest* request, - const uint8_t* data, - uint32_t length) -{ - nsresult rv = NS_OK; - - mDecodedData = ""; - nsCOMPtr httpChannel(do_QueryInterface(request)); - if (!httpChannel) - return NS_ERROR_NO_INTERFACE; - - nsAutoCString contentEncoding; - httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Encoding"), - contentEncoding); - if (!contentEncoding.IsEmpty()) { - nsCOMPtr converterService(do_GetService(NS_STREAMCONVERTERSERVICE_CONTRACTID)); - if (converterService) { - ToLowerCase(contentEncoding); - - nsCOMPtr converter; - rv = converterService->AsyncConvertData(contentEncoding.get(), - "uncompressed", this, nullptr, - getter_AddRefs(converter)); - NS_ENSURE_SUCCESS(rv, rv); - - converter->OnStartRequest(request, nullptr); - - nsCOMPtr rawStream = - do_CreateInstance(NS_STRINGINPUTSTREAM_CONTRACTID); - if (!rawStream) - return NS_ERROR_FAILURE; - - rv = rawStream->SetData((const char*)data, length); - NS_ENSURE_SUCCESS(rv, rv); - - rv = converter->OnDataAvailable(request, nullptr, rawStream, 0, length); - NS_ENSURE_SUCCESS(rv, rv); - - converter->OnStopRequest(request, nullptr, NS_OK); - } - } - return rv; -} - -template -static bool -StringBeginsWithLowercaseLiteral(nsAString& aString, - const char (&aSubstring)[N]) -{ - return StringHead(aString, N).LowerCaseEqualsLiteral(aSubstring); -} - -bool -HasAttachmentDisposition(nsIHttpChannel* httpChannel) -{ - if (!httpChannel) - return false; - - uint32_t disp; - nsresult rv = httpChannel->GetContentDisposition(&disp); - - if (NS_SUCCEEDED(rv) && disp == nsIChannel::DISPOSITION_ATTACHMENT) - return true; - - return false; -} - -/** - * @return the first occurrence of a character within a string buffer, - * or nullptr if not found - */ -static const char* -FindChar(char c, const char *begin, const char *end) -{ - for (; begin < end; ++begin) { - if (*begin == c) - return begin; - } - return nullptr; -} - -/** - * - * Determine if a substring is the "documentElement" in the document. - * - * All of our sniffed substrings: = end) - return false; - - // Check to see if the character following the '<' is either '?' or '!' - // (processing instruction or doctype or comment)... these are valid nodes - // to have in the prologue. - if (*start != '?' && *start != '!') - return false; - - // Now advance the iterator until the '>' (We do this because we don't want - // to sniff indicator substrings that are embedded within other nodes, e.g. - // comments: - start = FindChar('>', start, end); - if (!start) - return false; - - ++start; - } - return true; -} - -/** - * Determines whether or not a string exists as the root element in an XML data - * string buffer. - * @param dataString - * The data being sniffed - * @param substring - * The substring being tested for existence and root-ness. - * @returns true if the substring exists and is the documentElement, false - * otherwise. - */ -static bool -ContainsTopLevelSubstring(nsACString& dataString, const char *substring) -{ - int32_t offset = dataString.Find(substring); - if (offset == -1) - return false; - - const char *begin = dataString.BeginReading(); - - // Only do the validation when we find the substring. - return IsDocumentElement(begin, begin + offset); -} - -NS_IMETHODIMP -nsFeedSniffer::GetMIMETypeFromContent(nsIRequest* request, - const uint8_t* data, - uint32_t length, - nsACString& sniffedType) -{ - nsCOMPtr channel(do_QueryInterface(request)); - if (!channel) - return NS_ERROR_NO_INTERFACE; - - // Check that this is a GET request, since you can't subscribe to a POST... - nsAutoCString method; - channel->GetRequestMethod(method); - if (!method.EqualsLiteral("GET")) { - sniffedType.Truncate(); - return NS_OK; - } - - // We need to find out if this is a load of a view-source document. In this - // case we do not want to override the content type, since the source display - // does not need to be converted from feed format to XUL. More importantly, - // we don't want to change the content type from something - // nsContentDLF::CreateInstance knows about (e.g. application/xml, text/html - // etc) to something that only the application fe knows about (maybe.feed) - // thus deactivating syntax highlighting. - nsCOMPtr originalURI; - channel->GetOriginalURI(getter_AddRefs(originalURI)); - - nsAutoCString scheme; - originalURI->GetScheme(scheme); - if (scheme.EqualsLiteral("view-source")) { - sniffedType.Truncate(); - return NS_OK; - } - - // Check the Content-Type to see if it is set correctly. If it is set to - // something specific that we think is a reliable indication of a feed, don't - // bother sniffing since we assume the site maintainer knows what they're - // doing. - nsAutoCString contentType; - channel->GetContentType(contentType); - bool noSniff = contentType.EqualsLiteral(TYPE_RSS) || - contentType.EqualsLiteral(TYPE_ATOM); - - // Check to see if this was a feed request from the location bar or from - // the feed: protocol. This is also a reliable indication. - // The value of the header doesn't matter. - if (!noSniff) { - nsAutoCString sniffHeader; - nsresult foundHeader = - channel->GetRequestHeader(NS_LITERAL_CSTRING("X-Moz-Is-Feed"), - sniffHeader); - noSniff = NS_SUCCEEDED(foundHeader); - } - - if (noSniff) { - // check for an attachment after we have a likely feed. - if(HasAttachmentDisposition(channel)) { - sniffedType.Truncate(); - return NS_OK; - } - - // set the feed header as a response header, since we have good metadata - // telling us that the feed is supposed to be RSS or Atom - channel->SetResponseHeader(NS_LITERAL_CSTRING("X-Moz-Is-Feed"), - NS_LITERAL_CSTRING("1"), false); - sniffedType.AssignLiteral(TYPE_MAYBE_FEED); - return NS_OK; - } - - // Don't sniff arbitrary types. Limit sniffing to situations that - // we think can reasonably arise. - if (!contentType.EqualsLiteral(TEXT_HTML) && - !contentType.EqualsLiteral(APPLICATION_OCTET_STREAM) && - // Same criterion as XMLHttpRequest. Should we be checking for "+xml" - // and check for text/xml and application/xml by hand instead? - contentType.Find("xml") == -1) { - sniffedType.Truncate(); - return NS_OK; - } - - // Now we need to potentially decompress data served with - // Content-Encoding: gzip - nsresult rv = ConvertEncodedData(request, data, length); - if (NS_FAILED(rv)) - return rv; - - // We cap the number of bytes to scan at MAX_BYTES to prevent picking up - // false positives by accidentally reading document content, e.g. a "how to - // make a feed" page. - const char* testData; - if (mDecodedData.IsEmpty()) { - testData = (const char*)data; - length = std::min(length, MAX_BYTES); - } else { - testData = mDecodedData.get(); - length = std::min(mDecodedData.Length(), MAX_BYTES); - } - - // The strategy here is based on that described in: - // http://blogs.msdn.com/rssteam/articles/PublishersGuide.aspx - // for interoperarbility purposes. - - // Thus begins the actual sniffing. - nsDependentCSubstring dataString((const char*)testData, length); - - bool isFeed = false; - - // RSS 0.91/0.92/2.0 - isFeed = ContainsTopLevelSubstring(dataString, "(closure); - decodedData->Append(rawSegment, count); - *writeCount = count; - return NS_OK; -} - -NS_IMETHODIMP -nsFeedSniffer::OnDataAvailable(nsIRequest* request, nsISupports* context, - nsIInputStream* stream, uint64_t offset, - uint32_t count) -{ - uint32_t read; - return stream->ReadSegments(AppendSegmentToString, &mDecodedData, count, - &read); -} - -NS_IMETHODIMP -nsFeedSniffer::OnStopRequest(nsIRequest* request, nsISupports* context, - nsresult status) -{ - return NS_OK; -} diff --git a/application/palemoon/components/feeds/nsFeedSniffer.h b/application/palemoon/components/feeds/nsFeedSniffer.h deleted file mode 100644 index a0eb9862ce..0000000000 --- a/application/palemoon/components/feeds/nsFeedSniffer.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - - -#include "nsIContentSniffer.h" -#include "nsIStreamListener.h" -#include "nsStringAPI.h" -#include "mozilla/Attributes.h" - -class nsFeedSniffer final : public nsIContentSniffer, - nsIStreamListener -{ -public: - NS_DECL_ISUPPORTS - NS_DECL_NSICONTENTSNIFFER - NS_DECL_NSIREQUESTOBSERVER - NS_DECL_NSISTREAMLISTENER - - static nsresult AppendSegmentToString(nsIInputStream* inputStream, - void* closure, - const char* rawSegment, - uint32_t toOffset, - uint32_t count, - uint32_t* writeCount); - -protected: - ~nsFeedSniffer() {} - - nsresult ConvertEncodedData(nsIRequest* request, const uint8_t* data, - uint32_t length); - -private: - nsCString mDecodedData; -}; - diff --git a/application/palemoon/components/feeds/nsIFeedResultService.idl b/application/palemoon/components/feeds/nsIFeedResultService.idl deleted file mode 100644 index cb0f332d1a..0000000000 --- a/application/palemoon/components/feeds/nsIFeedResultService.idl +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -#include "nsISupports.idl" -interface nsIURI; -interface nsIRequest; -interface nsIFeedResult; - -/** - * nsIFeedResultService provides a globally-accessible object for retrieving - * the results of feed processing. - */ -[scriptable, uuid(950a829e-c20e-4dc3-b447-f8b753ae54da)] -interface nsIFeedResultService : nsISupports -{ - /** - * When set to true, forces the preview page to be displayed, regardless - * of the user's preferences. - */ - attribute boolean forcePreviewPage; - - /** - * Adds a URI to the user's specified external feed handler, or live - * bookmarks. - * @param uri - * The uri of the feed to add. - * @param title - * The title of the feed to add. - * @param subtitle - * The subtitle of the feed to add. - * @param feedType - * The nsIFeed type of the feed. See nsIFeed.idl - */ - void addToClientReader(in AUTF8String uri, - in AString title, - in AString subtitle, - in unsigned long feedType); - - /** - * Registers a Feed Result object with a globally accessible service - * so that it can be accessed by a singleton method outside the usual - * flow of control in document loading. - * - * @param feedResult - * An object implementing nsIFeedResult representing the feed. - */ - void addFeedResult(in nsIFeedResult feedResult); - - /** - * Gets a Feed Handler object registered using addFeedResult. - * - * @param uri - * The URI of the feed a handler is being requested for - */ - nsIFeedResult getFeedResult(in nsIURI uri); - - /** - * Unregisters a Feed Handler object registered using addFeedResult. - * @param uri - * The feed URI the handler was registered under. This must be - * the same *instance* the feed was registered under. - */ - void removeFeedResult(in nsIURI uri); -}; diff --git a/application/palemoon/components/feeds/nsIWebContentConverterRegistrar.idl b/application/palemoon/components/feeds/nsIWebContentConverterRegistrar.idl deleted file mode 100644 index 08ce2f4ae7..0000000000 --- a/application/palemoon/components/feeds/nsIWebContentConverterRegistrar.idl +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -#include "nsIMIMEInfo.idl" -#include "nsIWebContentHandlerRegistrar.idl" - -interface nsIRequest; - -[scriptable, uuid(eb361098-5158-4b21-8f98-50b445f1f0b2)] -interface nsIWebContentHandlerInfo : nsIHandlerApp -{ - /** - * The content type handled by the handler - */ - readonly attribute AString contentType; - - /** - * The uri of the handler, with an embedded %s where the URI of the loaded - * document will be encoded. - */ - readonly attribute AString uri; - - /** - * Gets the service URL Spec, with the loading document URI encoded in it. - * @param uri - * The URI of the document being loaded - * @returns The URI of the service with the loading document URI encoded in - * it. - */ - AString getHandlerURI(in AString uri); -}; - -[scriptable, uuid(de7cc06e-e778-45cb-b7db-7a114e1e75b1)] -interface nsIWebContentConverterService : nsIWebContentHandlerRegistrar -{ - /** - * Specifies the handler to be used to automatically handle all links of a - * certain content type from now on. - * @param contentType - * The content type to automatically load with the specified handler - * @param handler - * A web service handler. If this is null, no automatic action is - * performed and the user must choose. - * @throws NS_ERROR_NOT_AVAILABLE if the service refered to by |handler| is - * not already registered. - */ - void setAutoHandler(in AString contentType, in nsIWebContentHandlerInfo handler); - - /** - * Gets the auto handler specified for a particular content type - * @param contentType - * The content type to look up an auto handler for. - * @returns The web service handler that will automatically handle all - * documents of the specified type. null if there is no automatic - * handler. (Handlers may be registered, just none of them specified - * as "automatic"). - */ - nsIWebContentHandlerInfo getAutoHandler(in AString contentType); - - /** - * Gets a web handler for the specified service URI - * @param contentType - * The content type of the service being located - * @param uri - * The service URI of the handler to locate. - * @returns A web service handler that uses the specified uri. - */ - nsIWebContentHandlerInfo getWebContentHandlerByURI(in AString contentType, - in AString uri); - - /** - * Loads the preferred handler when content of a registered type is about - * to be loaded. - * @param request - * The nsIRequest for the load of the content - */ - void loadPreferredHandler(in nsIRequest request); - - /** - * Removes a registered protocol handler - * @param protocol - * The protocol scheme to remove a service handler for - * @param uri - * The uri of the service handler to remove - */ - void removeProtocolHandler(in AString protocol, in AString uri); - - /** - * Removes a registered content handler - * @param contentType - * The content type to remove a service handler for - * @param uri - * The uri of the service handler to remove - */ - void removeContentHandler(in AString contentType, in AString uri); - - /** - * Gets the list of content handlers for a particular type. - * @param contentType - * The content type to get handlers for - * @returns An array of nsIWebContentHandlerInfo objects - */ - void getContentHandlers(in AString contentType, - [optional] out unsigned long count, - [retval,array,size_is(count)] out nsIWebContentHandlerInfo handlers); - - /** - * Resets the list of available content handlers to the default set from - * the distribution. - * @param contentType - * The content type to reset handlers for - */ - void resetHandlersForType(in AString contentType); -}; - diff --git a/application/palemoon/components/fuel/fuelApplication.js b/application/palemoon/components/fuel/fuelApplication.js deleted file mode 100644 index a4b2d28134..0000000000 --- a/application/palemoon/components/fuel/fuelApplication.js +++ /dev/null @@ -1,822 +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/. */ - -const Ci = Components.interfaces; -const Cc = Components.classes; - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", - "resource://gre/modules/Deprecated.jsm"); - -const APPLICATION_CID = Components.ID("fe74cf80-aa2d-11db-abbd-0800200c9a66"); -const APPLICATION_CONTRACTID = "@mozilla.org/fuel/application;1"; - -//================================================= -// Singleton that holds services and utilities -var Utilities = { - get bookmarks() { - let bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]. - getService(Ci.nsINavBookmarksService); - this.__defineGetter__("bookmarks", () => bookmarks); - return this.bookmarks; - }, - - get bookmarksObserver() { - let bookmarksObserver = new BookmarksObserver(); - this.__defineGetter__("bookmarksObserver", () => bookmarksObserver); - return this.bookmarksObserver; - }, - - get annotations() { - let annotations = Cc["@mozilla.org/browser/annotation-service;1"]. - getService(Ci.nsIAnnotationService); - this.__defineGetter__("annotations", () => annotations); - return this.annotations; - }, - - get history() { - let history = Cc["@mozilla.org/browser/nav-history-service;1"]. - getService(Ci.nsINavHistoryService); - this.__defineGetter__("history", () => history); - return this.history; - }, - - get windowMediator() { - let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"]. - getService(Ci.nsIWindowMediator); - this.__defineGetter__("windowMediator", () => windowMediator); - return this.windowMediator; - }, - - makeURI: function(aSpec) { - if (!aSpec) - return null; - var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); - return ios.newURI(aSpec, null, null); - }, - - free: function() { - delete this.bookmarks; - delete this.bookmarksObserver; - delete this.annotations; - delete this.history; - delete this.windowMediator; - } -}; - - -//================================================= -// Window implementation - -var fuelWindowMap = new WeakMap(); -function getWindow(aWindow) { - let fuelWindow = fuelWindowMap.get(aWindow); - if (!fuelWindow) { - fuelWindow = new Window(aWindow); - fuelWindowMap.set(aWindow, fuelWindow); - } - return fuelWindow; -} - -// Don't call new Window() directly; use getWindow instead. -function Window(aWindow) { - this._window = aWindow; - this._events = new Events(); - - this._watch("TabOpen"); - this._watch("TabMove"); - this._watch("TabClose"); - this._watch("TabSelect"); -} - -Window.prototype = { - get events() { - return this._events; - }, - - get _tabbrowser() { - return this._window.getBrowser(); - }, - - /* - * Helper used to setup event handlers on the XBL element. Note that the events - * are actually dispatched to tabs, so we capture them. - */ - _watch: function(aType) { - this._tabbrowser.tabContainer.addEventListener(aType, this, - /* useCapture = */ true); - }, - - handleEvent: function(aEvent) { - this._events.dispatch(aEvent.type, getBrowserTab(this, aEvent.originalTarget.linkedBrowser)); - }, - - get tabs() { - var tabs = []; - var browsers = this._tabbrowser.browsers; - for (var i=0; i getWindow(Utilities.windowMediator.getMostRecentWindow("navigator:browser")), - enumerable: true, - configurable: true - }); - -}; - -// set the proto, defined in extApplication.js -ApplicationPrototype.prototype = extApplication.prototype; - -Application.prototype = new ApplicationPrototype(); - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([Application]); - diff --git a/application/palemoon/components/fuel/fuelApplication.manifest b/application/palemoon/components/fuel/fuelApplication.manifest deleted file mode 100644 index 67e6d0fe6a..0000000000 --- a/application/palemoon/components/fuel/fuelApplication.manifest +++ /dev/null @@ -1,3 +0,0 @@ -component {fe74cf80-aa2d-11db-abbd-0800200c9a66} fuelApplication.js -contract @mozilla.org/fuel/application;1 {fe74cf80-aa2d-11db-abbd-0800200c9a66} -category JavaScript-global-privileged-property Application @mozilla.org/fuel/application;1 diff --git a/application/palemoon/components/fuel/fuelIApplication.idl b/application/palemoon/components/fuel/fuelIApplication.idl deleted file mode 100644 index 69b51b0f5e..0000000000 --- a/application/palemoon/components/fuel/fuelIApplication.idl +++ /dev/null @@ -1,347 +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/. */ - -#include "nsISupports.idl" -#include "extIApplication.idl" - -interface nsIVariant; -interface nsIURI; -interface nsIDOMHTMLDocument; - -interface fuelIBookmarkFolder; -interface fuelIBrowserTab; - -/** - * Interface representing a collection of annotations associated - * with a bookmark or bookmark folder. - */ -[scriptable, uuid(335c9292-91a1-4ca0-ad0b-07d5f63ed6cd)] -interface fuelIAnnotations : nsISupports -{ - /** - * Array of the annotation names associated with the owning item - */ - readonly attribute nsIVariant names; - - /** - * Determines if an annotation exists with the given name. - * @param aName - * The name of the annotation - * @returns true if an annotation exists with the given name, - * false otherwise. - */ - boolean has(in AString aName); - - /** - * Gets the value of an annotation with the given name. - * @param aName - * The name of the annotation - * @returns A variant containing the value of the annotation. Supports - * string, boolean and number. - */ - nsIVariant get(in AString aName); - - /** - * Sets the value of an annotation with the given name. - * @param aName - * The name of the annotation - * @param aValue - * The new value of the annotation. Supports string, boolean - * and number - * @param aExpiration - * The expiration policy for the annotation. - * See nsIAnnotationService. - */ - void set(in AString aName, in nsIVariant aValue, in int32_t aExpiration); - - /** - * Removes the named annotation from the owner item. - * @param aName - * The name of annotation. - */ - void remove(in AString aName); -}; - - -/** - * Interface representing a bookmark item. - */ -[scriptable, uuid(808585b6-7568-4b26-8c62-545221bf2b8c)] -interface fuelIBookmark : nsISupports -{ - /** - * The id of the bookmark. - */ - readonly attribute long long id; - - /** - * The title of the bookmark. - */ - attribute AString title; - - /** - * The uri of the bookmark. - */ - attribute nsIURI uri; - - /** - * The description of the bookmark. - */ - attribute AString description; - - /** - * The keyword associated with the bookmark. - */ - attribute AString keyword; - - /** - * The type of the bookmark. - * values: "bookmark", "separator" - */ - readonly attribute AString type; - - /** - * The parent folder of the bookmark. - */ - attribute fuelIBookmarkFolder parent; - - /** - * The annotations object for the bookmark. - */ - readonly attribute fuelIAnnotations annotations; - - /** - * The events object for the bookmark. - * supports: "remove", "change", "visit", "move" - */ - readonly attribute extIEvents events; - - /** - * Removes the item from the parent folder. Used to - * delete a bookmark or separator - */ - void remove(); -}; - - -/** - * Interface representing a bookmark folder. Folders - * can hold bookmarks, separators and other folders. - */ -[scriptable, uuid(9f42fe20-52de-4a55-8632-a459c7716aa0)] -interface fuelIBookmarkFolder : nsISupports -{ - /** - * The id of the folder. - */ - readonly attribute long long id; - - /** - * The title of the folder. - */ - attribute AString title; - - /** - * The description of the folder. - */ - attribute AString description; - - /** - * The type of the folder. - * values: "folder" - */ - readonly attribute AString type; - - /** - * The parent folder of the folder. - */ - attribute fuelIBookmarkFolder parent; - - /** - * The annotations object for the folder. - */ - readonly attribute fuelIAnnotations annotations; - - /** - * The events object for the folder. - * supports: "add", "addchild", "remove", "removechild", "change", "move" - */ - readonly attribute extIEvents events; - - /** - * Array of all bookmarks, separators and folders contained - * in this folder. - */ - readonly attribute nsIVariant children; - - /** - * Adds a new child bookmark to this folder. - * @param aTitle - * The title of bookmark. - * @param aURI - * The uri of bookmark. - */ - fuelIBookmark addBookmark(in AString aTitle, in nsIURI aURI); - - /** - * Adds a new child separator to this folder. - */ - fuelIBookmark addSeparator(); - - /** - * Adds a new child folder to this folder. - * @param aTitle - * The title of folder. - */ - fuelIBookmarkFolder addFolder(in AString aTitle); - - /** - * Removes the folder from the parent folder. - */ - void remove(); -}; - -/** - * Interface representing a container for bookmark roots. Roots - * are the top level parents for the various types of bookmarks in the system. - */ -[scriptable, uuid(c9a80870-eb3c-11dc-95ff-0800200c9a66)] -interface fuelIBookmarkRoots : nsISupports -{ - /** - * The folder for the 'bookmarks menu' root. - */ - readonly attribute fuelIBookmarkFolder menu; - - /** - * The folder for the 'personal toolbar' root. - */ - readonly attribute fuelIBookmarkFolder toolbar; - - /** - * The folder for the 'tags' root. - */ - readonly attribute fuelIBookmarkFolder tags; - - /** - * The folder for the 'unfiled bookmarks' root. - */ - readonly attribute fuelIBookmarkFolder unfiled; -}; - -/** - * Interface representing a browser window. - */ -[scriptable, uuid(207edb28-eb5e-424e-a862-b0e97C8de866)] -interface fuelIWindow : nsISupports -{ - /** - * A collection of browser tabs within the browser window. - */ - readonly attribute nsIVariant tabs; - - /** - * The currently-active tab within the browser window. - */ - readonly attribute fuelIBrowserTab activeTab; - - /** - * Open a new browser tab, pointing to the specified URI. - * @param aURI - * The uri to open the browser tab to - */ - fuelIBrowserTab open(in nsIURI aURI); - - /** - * The events object for the browser window. - * supports: "TabOpen", "TabClose", "TabMove", "TabSelect" - */ - readonly attribute extIEvents events; -}; - -/** - * Interface representing a browser tab. - */ -[scriptable, uuid(3073ceff-777c-41ce-9ace-ab37268147c1)] -interface fuelIBrowserTab : nsISupports -{ - /** - * The current uri of this tab. - */ - readonly attribute nsIURI uri; - - /** - * The current index of this tab in the browser window. - */ - readonly attribute int32_t index; - - /** - * The browser window that is holding the tab. - */ - readonly attribute fuelIWindow window; - - /** - * The content document of the browser tab. - */ - readonly attribute nsIDOMHTMLDocument document; - - /** - * The events object for the browser tab. - * supports: "load" - */ - readonly attribute extIEvents events; - - /** - * Load a new URI into this browser tab. - * @param aURI - * The uri to load into the browser tab - */ - void load(in nsIURI aURI); - - /** - * Give focus to this browser tab, and bring it to the front. - */ - void focus(); - - /** - * Close the browser tab. This may not actually close the tab - * as script may abort the close operation. - */ - void close(); - - /** - * Moves this browser tab before another browser tab within the window. - * @param aBefore - * The tab before which the target tab will be moved - */ - void moveBefore(in fuelIBrowserTab aBefore); - - /** - * Move this browser tab to the last tab within the window. - */ - void moveToEnd(); -}; - -/** - * Interface for managing and accessing the applications systems - */ -[scriptable, uuid(fe74cf80-aa2d-11db-abbd-0800200c9a66)] -interface fuelIApplication : extIApplication -{ - /** - * The root bookmarks object for the application. - * Contains all the bookmark roots in the system. - */ - readonly attribute fuelIBookmarkRoots bookmarks; - - /** - * An array of browser windows within the application. - */ - readonly attribute nsIVariant windows; - - /** - * The currently active browser window. - */ - readonly attribute fuelIWindow activeWindow; -}; diff --git a/application/palemoon/components/fuel/moz.build b/application/palemoon/components/fuel/moz.build deleted file mode 100644 index a81933d695..0000000000 --- a/application/palemoon/components/fuel/moz.build +++ /dev/null @@ -1,13 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -XPIDL_SOURCES += ['fuelIApplication.idl'] - -XPIDL_MODULE = 'fuel' - -EXTRA_COMPONENTS += ['fuelApplication.manifest'] - -EXTRA_PP_COMPONENTS += ['fuelApplication.js'] - diff --git a/application/palemoon/components/moz.build b/application/palemoon/components/moz.build deleted file mode 100644 index 9bbaf5ddc8..0000000000 --- a/application/palemoon/components/moz.build +++ /dev/null @@ -1,46 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -DIRS += [ - 'abouthome', - 'certerror', - 'dirprovider', - 'downloads', - 'feeds', - 'fuel', - 'newtab', - 'pageinfo', - 'places', - 'permissions', - 'preferences', - 'privatebrowsing', - 'search', - 'sessionstore', - 'shell', - 'statusbar', -] - -if CONFIG['MOZ_SERVICES_SYNC']: - DIRS += ['sync'] - -DIRS += ['build'] - -XPIDL_SOURCES += [ - 'nsIBrowserGlue.idl', - 'nsIBrowserHandler.idl', -] - -XPIDL_MODULE = 'browsercompsbase' - -EXTRA_PP_COMPONENTS += [ - 'BrowserComponents.manifest', - 'nsAboutRedirector.js', - 'nsBrowserContentHandler.js', - 'nsBrowserGlue.js', -] - -EXTRA_JS_MODULES += [ - 'distribution.js', -] \ No newline at end of file diff --git a/application/palemoon/components/newtab/cells.js b/application/palemoon/components/newtab/cells.js deleted file mode 100644 index cc1b8ee75d..0000000000 --- a/application/palemoon/components/newtab/cells.js +++ /dev/null @@ -1,126 +0,0 @@ -#ifdef 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/. */ -#endif - -/** - * This class manages a cell's DOM node (not the actually cell content, a site). - * It's mostly read-only, i.e. all manipulation of both position and content - * aren't handled here. - */ -function Cell(aGrid, aNode) { - this._grid = aGrid; - this._node = aNode; - this._node._newtabCell = this; - - // Register drag-and-drop event handlers. - ["dragenter", "dragover", "dragexit", "drop"].forEach(function(aType) { - this._node.addEventListener(aType, this, false); - }, this); -} - -Cell.prototype = { - /** - * The grid. - */ - _grid: null, - - /** - * The cell's DOM node. - */ - get node() { return this._node; }, - - /** - * The cell's offset in the grid. - */ - get index() { - let index = this._grid.cells.indexOf(this); - - // Cache this value, overwrite the getter. - Object.defineProperty(this, "index", {value: index, enumerable: true}); - - return index; - }, - - /** - * The previous cell in the grid. - */ - get previousSibling() { - let prev = this.node.previousElementSibling; - prev = prev && prev._newtabCell; - - // Cache this value, overwrite the getter. - Object.defineProperty(this, "previousSibling", {value: prev, enumerable: true}); - - return prev; - }, - - /** - * The next cell in the grid. - */ - get nextSibling() { - let next = this.node.nextElementSibling; - next = next && next._newtabCell; - - // Cache this value, overwrite the getter. - Object.defineProperty(this, "nextSibling", {value: next, enumerable: true}); - - return next; - }, - - /** - * The site contained in the cell, if any. - */ - get site() { - let firstChild = this.node.firstElementChild; - return firstChild && firstChild._newtabSite; - }, - - /** - * Checks whether the cell contains a pinned site. - * @return Whether the cell contains a pinned site. - */ - containsPinnedSite: function() { - let site = this.site; - return site && site.isPinned(); - }, - - /** - * Checks whether the cell contains a site (is empty). - * @return Whether the cell is empty. - */ - isEmpty: function() { - return !this.site; - }, - - /** - * Handles all cell events. - */ - handleEvent: function(aEvent) { - // We're not responding to external drag/drop events - // when our parent window is in private browsing mode. - if (inPrivateBrowsingMode() && !gDrag.draggedSite) - return; - - if (aEvent.type != "dragexit" && !gDrag.isValid(aEvent)) - return; - - switch (aEvent.type) { - case "dragenter": - aEvent.preventDefault(); - gDrop.enter(this, aEvent); - break; - case "dragover": - aEvent.preventDefault(); - break; - case "dragexit": - gDrop.exit(this, aEvent); - break; - case "drop": - aEvent.preventDefault(); - gDrop.drop(this, aEvent); - break; - } - } -}; diff --git a/application/palemoon/components/newtab/drag.js b/application/palemoon/components/newtab/drag.js deleted file mode 100644 index 566e3755f8..0000000000 --- a/application/palemoon/components/newtab/drag.js +++ /dev/null @@ -1,151 +0,0 @@ -#ifdef 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/. */ -#endif - -/** - * This singleton implements site dragging functionality. - */ -var gDrag = { - /** - * The site offset to the drag start point. - */ - _offsetX: null, - _offsetY: null, - - /** - * The site that is dragged. - */ - _draggedSite: null, - get draggedSite() { return this._draggedSite; }, - - /** - * The cell width/height at the point the drag started. - */ - _cellWidth: null, - _cellHeight: null, - get cellWidth() { return this._cellWidth; }, - get cellHeight() { return this._cellHeight; }, - - /** - * Start a new drag operation. - * @param aSite The site that's being dragged. - * @param aEvent The 'dragstart' event. - */ - start: function(aSite, aEvent) { - this._draggedSite = aSite; - - // Mark nodes as being dragged. - let selector = ".newtab-site, .newtab-control, .newtab-thumbnail"; - let parentCell = aSite.node.parentNode; - let nodes = parentCell.querySelectorAll(selector); - for (let i = 0; i < nodes.length; i++) - nodes[i].setAttribute("dragged", "true"); - - parentCell.setAttribute("dragged", "true"); - - this._setDragData(aSite, aEvent); - - // Store the cursor offset. - let node = aSite.node; - let rect = node.getBoundingClientRect(); - this._offsetX = aEvent.clientX - rect.left; - this._offsetY = aEvent.clientY - rect.top; - - // Store the cell dimensions. - let cellNode = aSite.cell.node; - this._cellWidth = cellNode.offsetWidth; - this._cellHeight = cellNode.offsetHeight; - - gTransformation.freezeSitePosition(aSite); - }, - - /** - * Handles the 'drag' event. - * @param aSite The site that's being dragged. - * @param aEvent The 'drag' event. - */ - drag: function(aSite, aEvent) { - // Get the viewport size. - let {clientWidth, clientHeight} = document.documentElement; - - // We'll want a padding of 5px. - let border = 5; - - // Enforce minimum constraints to keep the drag image inside the window. - let left = Math.max(scrollX + aEvent.clientX - this._offsetX, border); - let top = Math.max(scrollY + aEvent.clientY - this._offsetY, border); - - // Enforce maximum constraints to keep the drag image inside the window. - left = Math.min(left, scrollX + clientWidth - this.cellWidth - border); - top = Math.min(top, scrollY + clientHeight - this.cellHeight - border); - - // Update the drag image's position. - gTransformation.setSitePosition(aSite, {left: left, top: top}); - }, - - /** - * Ends the current drag operation. - * @param aSite The site that's being dragged. - * @param aEvent The 'dragend' event. - */ - end: function(aSite, aEvent) { - let nodes = gGrid.node.querySelectorAll("[dragged]") - for (let i = 0; i < nodes.length; i++) - nodes[i].removeAttribute("dragged"); - - // Slide the dragged site back into its cell (may be the old or the new cell). - gTransformation.slideSiteTo(aSite, aSite.cell, {unfreeze: true}); - - this._draggedSite = null; - }, - - /** - * Checks whether we're responsible for a given drag event. - * @param aEvent The drag event to check. - * @return Whether we should handle this drag and drop operation. - */ - isValid: function(aEvent) { - let link = gDragDataHelper.getLinkFromDragEvent(aEvent); - - // Check that the drag data is non-empty. - // Can happen when dragging places folders. - if (!link || !link.url) { - return false; - } - - // Check that we're not accepting URLs which would inherit the caller's - // principal (such as javascript: or data:). - return gLinkChecker.checkLoadURI(link.url); - }, - - /** - * Initializes the drag data for the current drag operation. - * @param aSite The site that's being dragged. - * @param aEvent The 'dragstart' event. - */ - _setDragData: function(aSite, aEvent) { - let {url, title} = aSite; - - let dt = aEvent.dataTransfer; - dt.mozCursor = "default"; - dt.effectAllowed = "move"; - dt.setData("text/plain", url); - dt.setData("text/uri-list", url); - dt.setData("text/x-moz-url", url + "\n" + title); - dt.setData("text/html", "" + url + ""); - - // Create and use an empty drag element. We don't want to use the default - // drag image with its default opacity. - let dragElement = document.createElementNS(HTML_NAMESPACE, "div"); - dragElement.classList.add("newtab-drag"); - let scrollbox = document.getElementById("newtab-vertical-margin"); - scrollbox.appendChild(dragElement); - dt.setDragImage(dragElement, 0, 0); - - // After the 'dragstart' event has been processed we can remove the - // temporary drag element from the DOM. - setTimeout(() => scrollbox.removeChild(dragElement), 0); - } -}; diff --git a/application/palemoon/components/newtab/dragDataHelper.js b/application/palemoon/components/newtab/dragDataHelper.js deleted file mode 100644 index e92b9bb1c8..0000000000 --- a/application/palemoon/components/newtab/dragDataHelper.js +++ /dev/null @@ -1,22 +0,0 @@ -#ifdef 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/. */ -#endif - -var gDragDataHelper = { - get mimeType() { - return "text/x-moz-url"; - }, - - getLinkFromDragEvent: function(aEvent) { - let dt = aEvent.dataTransfer; - if (!dt || !dt.types.includes(this.mimeType)) { - return null; - } - - let data = dt.getData(this.mimeType) || ""; - let [url, title] = data.split(/[\r\n]+/); - return {url: url, title: title}; - } -}; diff --git a/application/palemoon/components/newtab/drop.js b/application/palemoon/components/newtab/drop.js deleted file mode 100644 index fe402a29bf..0000000000 --- a/application/palemoon/components/newtab/drop.js +++ /dev/null @@ -1,150 +0,0 @@ -#ifdef 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/. */ -#endif - -// A little delay that prevents the grid from being too sensitive when dragging -// sites around. -const DELAY_REARRANGE_MS = 100; - -/** - * This singleton implements site dropping functionality. - */ -var gDrop = { - /** - * The last drop target. - */ - _lastDropTarget: null, - - /** - * Handles the 'dragenter' event. - * @param aCell The drop target cell. - */ - enter: function(aCell) { - this._delayedRearrange(aCell); - }, - - /** - * Handles the 'dragexit' event. - * @param aCell The drop target cell. - * @param aEvent The 'dragexit' event. - */ - exit: function(aCell, aEvent) { - if (aEvent.dataTransfer && !aEvent.dataTransfer.mozUserCancelled) { - this._delayedRearrange(); - } else { - // The drag operation has been cancelled. - this._cancelDelayedArrange(); - this._rearrange(); - } - }, - - /** - * Handles the 'drop' event. - * @param aCell The drop target cell. - * @param aEvent The 'dragexit' event. - */ - drop: function(aCell, aEvent) { - // The cell that is the drop target could contain a pinned site. We need - // to find out where that site has gone and re-pin it there. - if (aCell.containsPinnedSite()) - this._repinSitesAfterDrop(aCell); - - // Pin the dragged or insert the new site. - this._pinDraggedSite(aCell, aEvent); - - this._cancelDelayedArrange(); - - // Update the grid and move all sites to their new places. - gUpdater.updateGrid(); - }, - - /** - * Re-pins all pinned sites in their (new) positions. - * @param aCell The drop target cell. - */ - _repinSitesAfterDrop: function(aCell) { - let sites = gDropPreview.rearrange(aCell); - - // Filter out pinned sites. - let pinnedSites = sites.filter(function(aSite) { - return aSite && aSite.isPinned(); - }); - - // Re-pin all shifted pinned cells. - pinnedSites.forEach(aSite => aSite.pin(sites.indexOf(aSite))); - }, - - /** - * Pins the dragged site in its new place. - * @param aCell The drop target cell. - * @param aEvent The 'dragexit' event. - */ - _pinDraggedSite: function(aCell, aEvent) { - let index = aCell.index; - let draggedSite = gDrag.draggedSite; - - if (draggedSite) { - // Pin the dragged site at its new place. - if (aCell != draggedSite.cell) - draggedSite.pin(index); - } else { - let link = gDragDataHelper.getLinkFromDragEvent(aEvent); - if (link) { - // A new link was dragged onto the grid. Create it by pinning its URL. - gPinnedLinks.pin(link, index); - - // Make sure the newly added link is not blocked. - gBlockedLinks.unblock(link); - } - } - }, - - /** - * Time a rearrange with a little delay. - * @param aCell The drop target cell. - */ - _delayedRearrange: function(aCell) { - // The last drop target didn't change so there's no need to re-arrange. - if (this._lastDropTarget == aCell) - return; - - let self = this; - - function callback() { - self._rearrangeTimeout = null; - self._rearrange(aCell); - } - - this._cancelDelayedArrange(); - this._rearrangeTimeout = setTimeout(callback, DELAY_REARRANGE_MS); - - // Store the last drop target. - this._lastDropTarget = aCell; - }, - - /** - * Cancels a timed rearrange, if any. - */ - _cancelDelayedArrange: function() { - if (this._rearrangeTimeout) { - clearTimeout(this._rearrangeTimeout); - this._rearrangeTimeout = null; - } - }, - - /** - * Rearrange all sites in the grid depending on the current drop target. - * @param aCell The drop target cell. - */ - _rearrange: function(aCell) { - let sites = gGrid.sites; - - // We need to rearrange the grid only if there's a current drop target. - if (aCell) - sites = gDropPreview.rearrange(aCell); - - gTransformation.rearrangeSites(sites, {unfreeze: !aCell}); - } -}; diff --git a/application/palemoon/components/newtab/dropPreview.js b/application/palemoon/components/newtab/dropPreview.js deleted file mode 100644 index 219b84c89f..0000000000 --- a/application/palemoon/components/newtab/dropPreview.js +++ /dev/null @@ -1,222 +0,0 @@ -#ifdef 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/. */ -#endif - -/** - * This singleton provides the ability to re-arrange the current grid to - * indicate the transformation that results from dropping a cell at a certain - * position. - */ -var gDropPreview = { - /** - * Rearranges the sites currently contained in the grid when a site would be - * dropped onto the given cell. - * @param aCell The drop target cell. - * @return The re-arranged array of sites. - */ - rearrange: function(aCell) { - let sites = gGrid.sites; - - // Insert the dragged site into the current grid. - this._insertDraggedSite(sites, aCell); - - // After the new site has been inserted we need to correct the positions - // of all pinned tabs that have been moved around. - this._repositionPinnedSites(sites, aCell); - - return sites; - }, - - /** - * Inserts the currently dragged site into the given array of sites. - * @param aSites The array of sites to insert into. - * @param aCell The drop target cell. - */ - _insertDraggedSite: function(aSites, aCell) { - let dropIndex = aCell.index; - let draggedSite = gDrag.draggedSite; - - // We're currently dragging a site. - if (draggedSite) { - let dragCell = draggedSite.cell; - let dragIndex = dragCell.index; - - // Move the dragged site into its new position. - if (dragIndex != dropIndex) { - aSites.splice(dragIndex, 1); - aSites.splice(dropIndex, 0, draggedSite); - } - // We're handling an external drag item. - } else { - aSites.splice(dropIndex, 0, null); - } - }, - - /** - * Correct the position of all pinned sites that might have been moved to - * different positions after the dragged site has been inserted. - * @param aSites The array of sites containing the dragged site. - * @param aCell The drop target cell. - */ - _repositionPinnedSites: - function(aSites, aCell) { - - // Collect all pinned sites. - let pinnedSites = this._filterPinnedSites(aSites, aCell); - - // Correct pinned site positions. - pinnedSites.forEach(function(aSite) { - aSites[aSites.indexOf(aSite)] = aSites[aSite.cell.index]; - aSites[aSite.cell.index] = aSite; - }, this); - - // There might be a pinned cell that got pushed out of the grid, try to - // sneak it in by removing a lower-priority cell. - if (this._hasOverflowedPinnedSite(aSites, aCell)) - this._repositionOverflowedPinnedSite(aSites, aCell); - }, - - /** - * Filter pinned sites out of the grid that are still on their old positions - * and have not moved. - * @param aSites The array of sites to filter. - * @param aCell The drop target cell. - * @return The filtered array of sites. - */ - _filterPinnedSites: function(aSites, aCell) { - let draggedSite = gDrag.draggedSite; - - // When dropping on a cell that contains a pinned site make sure that all - // pinned cells surrounding the drop target are moved as well. - let range = this._getPinnedRange(aCell); - - return aSites.filter(function(aSite, aIndex) { - // The site must be valid, pinned and not the dragged site. - if (!aSite || aSite == draggedSite || !aSite.isPinned()) - return false; - - let index = aSite.cell.index; - - // If it's not in the 'pinned range' it's a valid pinned site. - return (index > range.end || index < range.start); - }); - }, - - /** - * Determines the range of pinned sites surrounding the drop target cell. - * @param aCell The drop target cell. - * @return The range of pinned cells. - */ - _getPinnedRange: function(aCell) { - let dropIndex = aCell.index; - let range = {start: dropIndex, end: dropIndex}; - - // We need a pinned range only when dropping on a pinned site. - if (aCell.containsPinnedSite()) { - let links = gPinnedLinks.links; - - // Find all previous siblings of the drop target that are pinned as well. - while (range.start && links[range.start - 1]) - range.start--; - - let maxEnd = links.length - 1; - - // Find all next siblings of the drop target that are pinned as well. - while (range.end < maxEnd && links[range.end + 1]) - range.end++; - } - - return range; - }, - - /** - * Checks if the given array of sites contains a pinned site that has - * been pushed out of the grid. - * @param aSites The array of sites to check. - * @param aCell The drop target cell. - * @return Whether there is an overflowed pinned cell. - */ - _hasOverflowedPinnedSite: - function(aSites, aCell) { - - // If the drop target isn't pinned there's no way a pinned site has been - // pushed out of the grid so we can just exit here. - if (!aCell.containsPinnedSite()) - return false; - - let cells = gGrid.cells; - - // No cells have been pushed out of the grid, nothing to do here. - if (aSites.length <= cells.length) - return false; - - let overflowedSite = aSites[cells.length]; - - // Nothing to do if the site that got pushed out of the grid is not pinned. - return (overflowedSite && overflowedSite.isPinned()); - }, - - /** - * We have a overflowed pinned site that we need to re-position so that it's - * visible again. We try to find a lower-priority cell (empty or containing - * an unpinned site) that we can move it to. - * @param aSites The array of sites. - * @param aCell The drop target cell. - */ - _repositionOverflowedPinnedSite: - function(aSites, aCell) { - - // Try to find a lower-priority cell (empty or containing an unpinned site). - let index = this._indexOfLowerPrioritySite(aSites, aCell); - - if (index > -1) { - let cells = gGrid.cells; - let dropIndex = aCell.index; - - // Move all pinned cells to their new positions to let the overflowed - // site fit into the grid. - for (let i = index + 1, lastPosition = index; i < aSites.length; i++) { - if (i != dropIndex) { - aSites[lastPosition] = aSites[i]; - lastPosition = i; - } - } - - // Finally, remove the overflowed site from its previous position. - aSites.splice(cells.length, 1); - } - }, - - /** - * Finds the index of the last cell that is empty or contains an unpinned - * site. These are considered to be of a lower priority. - * @param aSites The array of sites. - * @param aCell The drop target cell. - * @return The cell's index. - */ - _indexOfLowerPrioritySite: - function(aSites, aCell) { - - let cells = gGrid.cells; - let dropIndex = aCell.index; - - // Search (beginning with the last site in the grid) for a site that is - // empty or unpinned (an thus lower-priority) and can be pushed out of the - // grid instead of the pinned site. - for (let i = cells.length - 1; i >= 0; i--) { - // The cell that is our drop target is not a good choice. - if (i == dropIndex) - continue; - - let site = aSites[i]; - - // We can use the cell only if it's empty or the site is un-pinned. - if (!site || !site.isPinned()) - return i; - } - - return -1; - } -}; diff --git a/application/palemoon/components/newtab/dropTargetShim.js b/application/palemoon/components/newtab/dropTargetShim.js deleted file mode 100644 index 698a9e33e1..0000000000 --- a/application/palemoon/components/newtab/dropTargetShim.js +++ /dev/null @@ -1,232 +0,0 @@ -#ifdef 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/. */ -#endif - -/** - * This singleton provides a custom drop target detection. We need this because - * the default DnD target detection relies on the cursor's position. We want - * to pick a drop target based on the dragged site's position. - */ -var gDropTargetShim = { - /** - * Cache for the position of all cells, cleaned after drag finished. - */ - _cellPositions: null, - - /** - * The last drop target that was hovered. - */ - _lastDropTarget: null, - - /** - * Initializes the drop target shim. - */ - init: function() { - gGrid.node.addEventListener("dragstart", this, true); - }, - - /** - * Add all event listeners needed during a drag operation. - */ - _addEventListeners: function() { - gGrid.node.addEventListener("dragend", this); - - let docElement = document.documentElement; - docElement.addEventListener("dragover", this); - docElement.addEventListener("dragenter", this); - docElement.addEventListener("drop", this); - }, - - /** - * Remove all event listeners that were needed during a drag operation. - */ - _removeEventListeners: function() { - gGrid.node.removeEventListener("dragend", this); - - let docElement = document.documentElement; - docElement.removeEventListener("dragover", this); - docElement.removeEventListener("dragenter", this); - docElement.removeEventListener("drop", this); - }, - - /** - * Handles all shim events. - */ - handleEvent: function(aEvent) { - switch (aEvent.type) { - case "dragstart": - this._dragstart(aEvent); - break; - case "dragenter": - aEvent.preventDefault(); - break; - case "dragover": - this._dragover(aEvent); - break; - case "drop": - this._drop(aEvent); - break; - case "dragend": - this._dragend(aEvent); - break; - } - }, - - /** - * Handles the 'dragstart' event. - * @param aEvent The 'dragstart' event. - */ - _dragstart: function(aEvent) { - if (aEvent.target.classList.contains("newtab-link")) { - gGrid.lock(); - this._addEventListeners(); - } - }, - - /** - * Handles the 'dragover' event. - * @param aEvent The 'dragover' event. - */ - _dragover: function(aEvent) { - // XXX bug 505521 - Use the dragover event to retrieve the - // current mouse coordinates while dragging. - let sourceNode = aEvent.dataTransfer.mozSourceNode.parentNode; - gDrag.drag(sourceNode._newtabSite, aEvent); - - // Find the current drop target, if there's one. - this._updateDropTarget(aEvent); - - // If we have a valid drop target, - // let the drag-and-drop service know. - if (this._lastDropTarget) { - aEvent.preventDefault(); - } - }, - - /** - * Handles the 'drop' event. - * @param aEvent The 'drop' event. - */ - _drop: function(aEvent) { - // We're accepting all drops. - aEvent.preventDefault(); - - // remember that drop event was seen, this explicitly - // assumes that drop event preceeds dragend event - this._dropSeen = true; - - // Make sure to determine the current drop target - // in case the dragover event hasn't been fired. - this._updateDropTarget(aEvent); - - // A site was successfully dropped. - this._dispatchEvent(aEvent, "drop", this._lastDropTarget); - }, - - /** - * Handles the 'dragend' event. - * @param aEvent The 'dragend' event. - */ - _dragend: function(aEvent) { - if (this._lastDropTarget) { - if (aEvent.dataTransfer.mozUserCancelled || !this._dropSeen) { - // The drag operation was cancelled or no drop event was generated - this._dispatchEvent(aEvent, "dragexit", this._lastDropTarget); - this._dispatchEvent(aEvent, "dragleave", this._lastDropTarget); - } - - // Clean up. - this._lastDropTarget = null; - this._cellPositions = null; - } - - this._dropSeen = false; - gGrid.unlock(); - this._removeEventListeners(); - }, - - /** - * Tries to find the current drop target and will fire - * appropriate dragenter, dragexit, and dragleave events. - * @param aEvent The current drag event. - */ - _updateDropTarget: function(aEvent) { - // Let's see if we find a drop target. - let target = this._findDropTarget(aEvent); - - if (target != this._lastDropTarget) { - if (this._lastDropTarget) - // We left the last drop target. - this._dispatchEvent(aEvent, "dragexit", this._lastDropTarget); - - if (target) - // We're now hovering a (new) drop target. - this._dispatchEvent(aEvent, "dragenter", target); - - if (this._lastDropTarget) - // We left the last drop target. - this._dispatchEvent(aEvent, "dragleave", this._lastDropTarget); - - this._lastDropTarget = target; - } - }, - - /** - * Determines the current drop target by matching the dragged site's position - * against all cells in the grid. - * @return The currently hovered drop target or null. - */ - _findDropTarget: function() { - // These are the minimum intersection values - we want to use the cell if - // the site is >= 50% hovering its position. - let minWidth = gDrag.cellWidth / 2; - let minHeight = gDrag.cellHeight / 2; - - let cellPositions = this._getCellPositions(); - let rect = gTransformation.getNodePosition(gDrag.draggedSite.node); - - // Compare each cell's position to the dragged site's position. - for (let i = 0; i < cellPositions.length; i++) { - let inter = rect.intersect(cellPositions[i].rect); - - // If the intersection is big enough we found a drop target. - if (inter.width >= minWidth && inter.height >= minHeight) - return cellPositions[i].cell; - } - - // No drop target found. - return null; - }, - - /** - * Gets the positions of all cell nodes. - * @return The (cached) cell positions. - */ - _getCellPositions: function() { - if (this._cellPositions) - return this._cellPositions; - - return this._cellPositions = gGrid.cells.map(function(cell) { - return {cell: cell, rect: gTransformation.getNodePosition(cell.node)}; - }); - }, - - /** - * Dispatches a custom DragEvent on the given target node. - * @param aEvent The source event. - * @param aType The event type. - * @param aTarget The target node that receives the event. - */ - _dispatchEvent: function(aEvent, aType, aTarget) { - let node = aTarget.node; - let event = document.createEvent("DragEvent"); - - // The event should not bubble to prevent recursion. - event.initDragEvent(aType, false, true, window, 0, 0, 0, 0, 0, false, false, - false, false, 0, node, aEvent.dataTransfer); - - node.dispatchEvent(event); - } -}; diff --git a/application/palemoon/components/newtab/grid.js b/application/palemoon/components/newtab/grid.js deleted file mode 100644 index 118159f9c0..0000000000 --- a/application/palemoon/components/newtab/grid.js +++ /dev/null @@ -1,175 +0,0 @@ -#ifdef 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/. */ -#endif - -/** - * This singleton represents the grid that contains all sites. - */ -var gGrid = { - /** - * The DOM node of the grid. - */ - _node: null, - _gridDefaultContent: null, - get node() { return this._node; }, - - /** - * The cached DOM fragment for sites. - */ - _siteFragment: null, - - /** - * All cells contained in the grid. - */ - _cells: [], - get cells() { return this._cells; }, - - /** - * All sites contained in the grid's cells. Sites may be empty. - */ - 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; }, - - // Returns whether the page has finished loading yet. - get isDocumentLoaded() { return document.readyState == "complete"; }, - - /** - * Initializes the grid. - * @param aSelector The query selector of the grid. - */ - init: function() { - this._node = document.getElementById("newtab-grid"); - this._gridDefaultContent = this._node.lastChild; - this._createSiteFragment(); - - gLinks.populateCache(() => { - this._refreshGrid(); - this._ready = true; - }); - }, - - /** - * Creates a new site in the grid. - * @param aLink The new site's link. - * @param aCell The cell that will contain the new site. - * @return The newly created site. - */ - createSite: function(aLink, aCell) { - let node = aCell.node; - node.appendChild(this._siteFragment.cloneNode(true)); - return new Site(node.firstElementChild, aLink); - }, - - /** - * Handles all grid events. - */ - handleEvent: function(aEvent) { - // Any specific events should go here. - }, - - /** - * Locks the grid to block all pointer events. - */ - lock: function() { - this.node.setAttribute("locked", "true"); - }, - - /** - * Unlocks the grid to allow all pointer events. - */ - unlock: function() { - this.node.removeAttribute("locked"); - }, - - /** - * Renders the grid. - */ - refresh() { - this._refreshGrid(); - }, - - /** - * 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"); - - // 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)); - } - - // 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(); - - // Create sites. - let numLinks = Math.min(links.length, cells.length); - for (let i = 0; i < numLinks; i++) { - if (links[i]) { - this.createSite(links[i], cells[i]); - } - } - - this._cells = cells; - }, - - /** - * Creates the DOM fragment that is re-used when creating sites. - */ - _createSiteFragment: function() { - let site = document.createElementNS(HTML_NAMESPACE, "div"); - site.classList.add("newtab-site"); - site.setAttribute("draggable", "true"); - - // Create the site's inner HTML code. - site.innerHTML = - '' + - ' ' + - ' ' + - ' ' + - '' + - '' + - ''; - - this._siteFragment = document.createDocumentFragment(); - this._siteFragment.appendChild(site); - }, - - /** - * Test a tile at a given position for being pinned or history - * @param position Position in sites array - */ - _isHistoricalTile: function(aPos) { - let site = this.sites[aPos]; - return site && (site.isPinned() || site.link && site.link.type == "history"); - } - -}; diff --git a/application/palemoon/components/newtab/jar.mn b/application/palemoon/components/newtab/jar.mn deleted file mode 100644 index 2d62914220..0000000000 --- a/application/palemoon/components/newtab/jar.mn +++ /dev/null @@ -1,8 +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/. - -browser.jar: - content/browser/newtab/newTab.xhtml -* content/browser/newtab/newTab.js - content/browser/newtab/newTab.css \ No newline at end of file diff --git a/application/palemoon/components/newtab/moz.build b/application/palemoon/components/newtab/moz.build deleted file mode 100644 index 8267a660d1..0000000000 --- a/application/palemoon/components/newtab/moz.build +++ /dev/null @@ -1,7 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -JAR_MANIFESTS += ['jar.mn'] - diff --git a/application/palemoon/components/newtab/newTab.css b/application/palemoon/components/newtab/newTab.css deleted file mode 100644 index 3cbcf452f9..0000000000 --- a/application/palemoon/components/newtab/newTab.css +++ /dev/null @@ -1,336 +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/. */ - -html { - width: 100%; - height: 100%; -} - -body { - font: message-box; - width: 100%; - height: 100%; - padding: 0; - margin: 0; - background-color: #eee; - display: -moz-box; - position: relative; - -moz-box-flex: 1; - -moz-user-focus: normal; - -moz-box-orient: vertical; -} - -input { - font: message-box; - font-size: 16px; -} - -input[type=button] { - cursor: pointer; -} - -/* UNDO */ -#newtab-undo-container { - transition: opacity 100ms ease-out; - -moz-box-align: center; - -moz-box-pack: center; -} - -#newtab-undo-container[undo-disabled] { - opacity: 0; - 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; - position: relative; - -moz-box-flex: 1; - -moz-box-orient: vertical; -} - -#newtab-margin-undo-container { - display: -moz-box; - left: 6px; - position: absolute; - top: 6px; - z-index: 1; -} - -#newtab-margin-undo-container:dir(rtl) { - left: auto; - right: 6px; -} - -#newtab-undo-close-button:dir(rtl) { - float:left; -} - -#newtab-horizontal-margin { - display: -moz-box; - -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 { - min-height: 40px; - max-height: 80px; - -moz-box-flex: 1; -} - -.newtab-side-margin { - min-width: 40px; - max-width: 300px; - -moz-box-flex: 1; -} - -/* GRID */ -#newtab-grid { - display: -moz-box; - -moz-box-flex: 5; - -moz-box-orient: vertical; - min-width: 600px; - min-height: 400px; - transition: 175ms ease-out; - transition-property: opacity; -} - -#newtab-grid[page-disabled] { - opacity: 0; -} - -#newtab-grid[locked], -#newtab-grid[page-disabled] { - pointer-events: none; -} - -/* ROWS */ -.newtab-row { - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-direction: normal; - -moz-box-flex: 1; -} - -/* - * Thumbnail image sizes are determined in the preferences: - * toolkit.pageThumbs.minWidth - * toolkit.pageThumbs.minHeight - */ -/* CELLS */ -.newtab-cell { - display: -moz-box; - -moz-box-flex: 1; -} - -/* SITES */ -.newtab-site { - position: relative; - -moz-box-flex: 1; - transition: 150ms ease-out; - transition-property: top, left, opacity; -} - -.newtab-site[frozen] { - position: absolute; - pointer-events: none; -} - -.newtab-site[dragged] { - transition-property: none; - z-index: 10; -} - -/* LINK + THUMBNAILS */ -.newtab-link, -.newtab-thumbnail { - position: absolute; - left: 0; - top: 0; - right: 0; - bottom: 0; -} - -/* TITLES */ -.newtab-title { - overflow: hidden; - position: absolute; - right: 0; - text-align: center; -} - -.newtab-title { - bottom: 0; - white-space: nowrap; - text-overflow: ellipsis; - vertical-align: middle; -} - -.newtab-title { - left: 0; - padding: 0 4px; -} - -/* CONTROLS */ -.newtab-control { - position: absolute; - opacity: 0; - transition: opacity 100ms ease-out; -} - -.newtab-control:-moz-focusring, -.newtab-cell:not([ignorehover]) > .newtab-site:hover > .newtab-control { - opacity: 1; -} - -.newtab-control[dragged] { - opacity: 0 !important; -} - -@media (-moz-touch-enabled) { - .newtab-control { - opacity: 1; - } -} - -/* DRAG & DROP */ - -/* - * This is just a temporary drag element used for dataTransfer.setDragImage() - * so that we can use custom drag images and elements. It needs an opacity of - * 0.01 so that the core code detects that it's in fact a visible element. - */ -.newtab-drag { - width: 1px; - height: 1px; - background-color: #fff; - opacity: 0.01; -} - -/* SEARCH */ -#searchContainer { - display: -moz-box; - position: relative; - -moz-box-pack: center; - margin: 10px 0 15px; -} - -#searchForm { - width: 470px; - display: -moz-box; - position: relative; - height: 36px; /* 32 px logo + 2*1px pad + 2*1px border */ - -moz-box-flex: 1; - max-width: 600px; -} - -#searchEngineLogo { - border: 1px transparent; - padding: 2px 4px 2px 2px; - margin: 0; - width: 32px; - height: 32px; - position: absolute; -} - -#searchText { - -moz-box-flex: 1; - padding-top: 6px; - padding-bottom: 6px; - padding-inline-start: 38px; /* room for logo */ - padding-inline-end: 8px; - background: rgba(255, 255, 255, 0.9) padding-box; - border: 1px solid; - border-color: rgba(37, 46, 65, 0.15) rgba(37, 46, 65, 0.17) rgba(37, 46, 65, 0.2); - box-shadow: 0 1px 0 rgba(37, 46, 65, 0.02) inset, - 0 0 2px rgba(37, 46, 65, 0.1) inset, - 0 1px 0 rgba(255, 255, 255, 0.2); - border-radius: 2.5px 0 0 2.5px; -} - -#searchText:-moz-dir(rtl) { - border-radius: 0 2.5px 2.5px 0; -} - -#searchText:focus, -#searchText[autofocus] { - border-color: rgba(92, 133, 214, 0.6) rgba(78, 114, 188, 0.6) rgba(41, 82, 163, 0.6); -} - -#searchText::placeholder { - font-style: italic; - opacity: 0.3; -} - -#searchSubmit { - margin-inline-start: -1px; - background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1)) padding-box; - padding: 0 9px; - border: 1px solid; - border-color: rgba(37, 46, 65, 0.2) rgba(37, 46, 65, 0.2) rgba(37, 46, 65, 0.2); - border-inline-start: 1px solid transparent; - border-radius: 0 2.5px 2.5px 0; - box-shadow: 0 0 2px rgba(255, 255, 255, 0.5) inset, - 0 1px 0 rgba(255, 255, 255, 0.2); - cursor: pointer; - transition-property: background-color, border-color, box-shadow; - transition-duration: 150ms; -} - -#searchSubmit:-moz-dir(rtl) { - border-radius: 2.5px 0 0 2.5px; -} - -#searchText:focus + #searchSubmit, -#searchText + #searchSubmit:hover, -#searchText[autofocus] + #searchSubmit { - border-color: #8da1c8 #768bb5 #6579a2; - color: white; -} - -#searchText:focus + #searchSubmit, -#searchText[autofocus] + #searchSubmit { - background-image: linear-gradient(#85a8e0, #3d75cf); - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, - 0 0 0 1px rgba(255, 255, 255, 0.1) inset, - 0 1px 0 rgba(23, 46, 67, 0.03); -} - -#searchText + #searchSubmit:hover { - background-image: linear-gradient(#85a8e0, #3d75cf); - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, - 0 0 0 1px rgba(255, 255, 255, 0.1) inset, - 0 1px 0 rgba(23, 42, 79, 0.03), - 0 0 4px rgba(0, 34, 102, 0.2);} - -#searchText + #searchSubmit:hover:active { - box-shadow: 0 1px 1px rgba(3, 11, 27, 0.1) inset, - 0 0 1px rgba(3, 11, 27, 0.2) inset; - transition-duration: 0ms; -} - -.contentSearchSuggestionTable { - font: message-box; - font-size: 16px; -} diff --git a/application/palemoon/components/newtab/newTab.js b/application/palemoon/components/newtab/newTab.js deleted file mode 100644 index 0022f21bb4..0000000000 --- a/application/palemoon/components/newtab/newTab.js +++ /dev/null @@ -1,69 +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"; - -var Cu = Components.utils; -var Ci = Components.interfaces; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/PageThumbs.jsm"); -Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm"); -Cu.import("resource://gre/modules/NewTabUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "Rect", - "resource://gre/modules/Geometry.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); - -var { - links: gLinks, - allPages: gAllPages, - linkChecker: gLinkChecker, - pinnedLinks: gPinnedLinks, - blockedLinks: gBlockedLinks, - gridPrefs: gGridPrefs -} = NewTabUtils; - -XPCOMUtils.defineLazyGetter(this, "gStringBundle", function() { - return Services.strings. - createBundle("chrome://browser/locale/newTab.properties"); -}); - -function newTabString(name, args) { - let stringName = "newtab." + name; - if (!args) { - return gStringBundle.GetStringFromName(stringName); - } - return gStringBundle.formatStringFromName(stringName, args, args.length); -} - -function inPrivateBrowsingMode() { - return PrivateBrowsingUtils.isContentWindowPrivate(window); -} - -const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; -const XUL_NAMESPACE = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; - -const TILES_EXPLAIN_LINK = "https://support.mozilla.org/kb/how-do-tiles-work-firefox"; -const TILES_INTRO_LINK = "https://www.mozilla.org/firefox/tiles/"; -const TILES_PRIVACY_LINK = "https://www.mozilla.org/privacy/"; - -#include transformations.js -#include page.js -#include grid.js -#include cells.js -#include sites.js -#include drag.js -#include dragDataHelper.js -#include drop.js -#include dropTargetShim.js -#include dropPreview.js -#include updater.js -#include undo.js -#include search.js - -// Everything is loaded. Initialize the New Tab Page. -gPage.init(); diff --git a/application/palemoon/components/newtab/newTab.xhtml b/application/palemoon/components/newtab/newTab.xhtml deleted file mode 100644 index de000e723d..0000000000 --- a/application/palemoon/components/newtab/newTab.xhtml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - %newTabDTD; - - %browserDTD; - - %globalDTD; -]> - - - - &newtab.pageTitle; - - - - - - - -
-
- -
-
- - - -
-
- -
-
-
- - -
-
- -
-
-
- -
-
-
- -
- -
- - - - - - - - - - - - - - - - - diff --git a/application/palemoon/components/places/content/editBookmarkOverlay.js b/application/palemoon/components/places/content/editBookmarkOverlay.js deleted file mode 100644 index 55a95c58ab..0000000000 --- a/application/palemoon/components/places/content/editBookmarkOverlay.js +++ /dev/null @@ -1,1063 +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/. */ - -const LAST_USED_ANNO = "bookmarkPropertiesDialog/folderLastUsed"; -const MAX_FOLDER_ITEM_IN_MENU_LIST = 5; - -var gEditItemOverlay = { - _uri: null, - _itemId: -1, - _itemIds: [], - _uris: [], - _tags: [], - _allTags: [], - _keyword: null, - _multiEdit: false, - _itemType: -1, - _readOnly: false, - _hiddenRows: [], - _onPanelReady: false, - _observersAdded: false, - _staticFoldersListBuilt: false, - _initialized: false, - _titleOverride: "", - - // the first field which was edited after this panel was initialized for - // a certain item - _firstEditedField: "", - - get itemId() { - return this._itemId; - }, - - get uri() { - return this._uri; - }, - - get multiEdit() { - return this._multiEdit; - }, - - /** - * Determines the initial data for the item edited or added by this dialog - */ - _determineInfo: function(aInfo) { - // hidden rows - if (aInfo && aInfo.hiddenRows) - this._hiddenRows = aInfo.hiddenRows; - else - this._hiddenRows.splice(0, this._hiddenRows.length); - // force-read-only - this._readOnly = aInfo && aInfo.forceReadOnly; - this._titleOverride = aInfo && aInfo.titleOverride ? aInfo.titleOverride - : ""; - this._onPanelReady = aInfo && aInfo.onPanelReady; - }, - - _showHideRows: function() { - var isBookmark = this._itemId != -1 && - this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK; - var isQuery = false; - if (this._uri) - isQuery = this._uri.schemeIs("place"); - - this._element("nameRow").collapsed = this._hiddenRows.indexOf("name") != -1; - this._element("folderRow").collapsed = - this._hiddenRows.indexOf("folderPicker") != -1 || this._readOnly; - this._element("tagsRow").collapsed = !this._uri || - this._hiddenRows.indexOf("tags") != -1 || isQuery; - // Collapse the tag selector if the item does not accept tags. - if (!this._element("tagsSelectorRow").collapsed && - this._element("tagsRow").collapsed) - this.toggleTagsSelector(); - this._element("descriptionRow").collapsed = - this._hiddenRows.indexOf("description") != -1 || this._readOnly; - this._element("keywordRow").collapsed = !isBookmark || this._readOnly || - this._hiddenRows.indexOf("keyword") != -1 || isQuery; - this._element("locationRow").collapsed = !(this._uri && !isQuery) || - this._hiddenRows.indexOf("location") != -1; - this._element("loadInSidebarCheckbox").collapsed = !isBookmark || isQuery || - this._readOnly || this._hiddenRows.indexOf("loadInSidebar") != -1; - this._element("feedLocationRow").collapsed = !this._isLivemark || - this._hiddenRows.indexOf("feedLocation") != -1; - this._element("siteLocationRow").collapsed = !this._isLivemark || - this._hiddenRows.indexOf("siteLocation") != -1; - this._element("selectionCount").hidden = !this._multiEdit; - }, - - /** - * Initialize the panel - * @param aFor - * Either a places-itemId (of a bookmark, folder or a live bookmark), - * an array of itemIds (used for bulk tagging), or a URI object (in - * which case, the panel would be initialized in read-only mode). - * @param [optional] aInfo - * JS object which stores additional info for the panel - * initialization. The following properties may bet set: - * * hiddenRows (Strings array): list of rows to be hidden regardless - * of the item edited. Possible values: "title", "location", - * "description", "keyword", "loadInSidebar", "feedLocation", - * "siteLocation", folderPicker" - * * forceReadOnly - set this flag to initialize the panel to its - * read-only (view) mode even if the given item is editable. - */ - initPanel: function(aFor, aInfo) { - // For sanity ensure that the implementer has uninited the panel before - // trying to init it again, or we could end up leaking due to observers. - if (this._initialized) - this.uninitPanel(false); - - var aItemIdList; - if (Array.isArray(aFor)) { - aItemIdList = aFor; - aFor = aItemIdList[0]; - } - else if (this._multiEdit) { - this._multiEdit = false; - this._tags = []; - this._uris = []; - this._allTags = []; - this._itemIds = []; - this._element("selectionCount").hidden = true; - } - - this._folderMenuList = this._element("folderMenuList"); - this._folderTree = this._element("folderTree"); - - this._determineInfo(aInfo); - if (aFor instanceof Ci.nsIURI) { - this._itemId = -1; - this._uri = aFor; - this._readOnly = true; - } - else { - this._itemId = aFor; - // We can't store information on invalid itemIds. - this._readOnly = this._readOnly || this._itemId == -1; - - var containerId = PlacesUtils.bookmarks.getFolderIdForItem(this._itemId); - this._itemType = PlacesUtils.bookmarks.getItemType(this._itemId); - if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) { - this._uri = PlacesUtils.bookmarks.getBookmarkURI(this._itemId); - this._keyword = PlacesUtils.bookmarks.getKeywordForBookmark(this._itemId); - this._initTextField("keywordField", this._keyword); - this._element("loadInSidebarCheckbox").checked = - PlacesUtils.annotations.itemHasAnnotation(this._itemId, - PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO); - } - else { - this._uri = null; - this._isLivemark = false; - PlacesUtils.livemarks.getLivemark({id: this._itemId }) - .then(aLivemark => { - this._isLivemark = true; - this._initTextField("feedLocationField", aLivemark.feedURI.spec, true); - this._initTextField("siteLocationField", aLivemark.siteURI ? aLivemark.siteURI.spec : "", true); - this._showHideRows(); - }, () => undefined); - } - - // folder picker - this._initFolderMenuList(containerId); - - // description field - this._initTextField("descriptionField", - PlacesUIUtils.getItemDescription(this._itemId)); - } - - if (this._itemId == -1 || - this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) { - this._isLivemark = false; - - this._initTextField("locationField", this._uri.spec); - if (!aItemIdList) { - var tags = PlacesUtils.tagging.getTagsForURI(this._uri).join(", "); - this._initTextField("tagsField", tags, false); - } - else { - this._multiEdit = true; - this._allTags = []; - this._itemIds = aItemIdList; - for (var i = 0; i < aItemIdList.length; i++) { - if (aItemIdList[i] instanceof Ci.nsIURI) { - this._uris[i] = aItemIdList[i]; - this._itemIds[i] = -1; - } - else - this._uris[i] = PlacesUtils.bookmarks.getBookmarkURI(this._itemIds[i]); - this._tags[i] = PlacesUtils.tagging.getTagsForURI(this._uris[i]); - } - this._allTags = this._getCommonTags(); - this._initTextField("tagsField", this._allTags.join(", "), false); - this._element("itemsCountText").value = - PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel", - this._itemIds.length, - [this._itemIds.length]); - } - - // tags selector - this._rebuildTagsSelectorList(); - } - - // name picker - this._initNamePicker(); - - this._showHideRows(); - - // observe changes - if (!this._observersAdded) { - // Single bookmarks observe any change. History entries and multiEdit - // observe only tags changes, through bookmarks. - if (this._itemId != -1 || this._uri || this._multiEdit) - PlacesUtils.bookmarks.addObserver(this, false); - - this._element("namePicker").addEventListener("blur", this); - this._element("locationField").addEventListener("blur", this); - this._element("tagsField").addEventListener("blur", this); - this._element("keywordField").addEventListener("blur", this); - this._element("descriptionField").addEventListener("blur", this); - window.addEventListener("unload", this, false); - this._observersAdded = true; - } - - let focusElement = () => { - this._initialized = true; - }; - - if (this._onPanelReady) { - this._onPanelReady(focusElement); - } else { - focusElement(); - } - }, - - /** - * Finds tags that are in common among this._tags entries that track tags - * for each selected uri. - * The tags arrays should be kept up-to-date for this to work properly. - * - * @return array of common tags for the selected uris. - */ - _getCommonTags: function() { - return this._tags[0].filter( - function(aTag) this._tags.every( - function(aTags) aTags.indexOf(aTag) != -1 - ), this - ); - }, - - _initTextField: function(aTextFieldId, aValue, aReadOnly) { - var field = this._element(aTextFieldId); - field.readOnly = aReadOnly !== undefined ? aReadOnly : this._readOnly; - - if (field.value != aValue) { - field.value = aValue; - this._editorTransactionManagerClear(field); - } - }, - - /** - * Appends a menu-item representing a bookmarks folder to a menu-popup. - * @param aMenupopup - * The popup to which the menu-item should be added. - * @param aFolderId - * The identifier of the bookmarks folder. - * @return the new menu item. - */ - _appendFolderItemToMenupopup: - function(aMenupopup, aFolderId) { - // First make sure the folders-separator is visible - this._element("foldersSeparator").hidden = false; - - var folderMenuItem = document.createElement("menuitem"); - var folderTitle = PlacesUtils.bookmarks.getItemTitle(aFolderId) - folderMenuItem.folderId = aFolderId; - folderMenuItem.setAttribute("label", folderTitle); - folderMenuItem.className = "menuitem-iconic folder-icon"; - aMenupopup.appendChild(folderMenuItem); - return folderMenuItem; - }, - - _initFolderMenuList: function(aSelectedFolder) { - // clean up first - var menupopup = this._folderMenuList.menupopup; - while (menupopup.childNodes.length > 6) - menupopup.removeChild(menupopup.lastChild); - - const bms = PlacesUtils.bookmarks; - const annos = PlacesUtils.annotations; - - // Build the static list - var unfiledItem = this._element("unfiledRootItem"); - if (!this._staticFoldersListBuilt) { - unfiledItem.label = bms.getItemTitle(PlacesUtils.unfiledBookmarksFolderId); - unfiledItem.folderId = PlacesUtils.unfiledBookmarksFolderId; - var bmMenuItem = this._element("bmRootItem"); - bmMenuItem.label = bms.getItemTitle(PlacesUtils.bookmarksMenuFolderId); - bmMenuItem.folderId = PlacesUtils.bookmarksMenuFolderId; - var toolbarItem = this._element("toolbarFolderItem"); - toolbarItem.label = bms.getItemTitle(PlacesUtils.toolbarFolderId); - toolbarItem.folderId = PlacesUtils.toolbarFolderId; - this._staticFoldersListBuilt = true; - } - - // List of recently used folders: - var folderIds = annos.getItemsWithAnnotation(LAST_USED_ANNO); - - /** - * The value of the LAST_USED_ANNO annotation is the time (in the form of - * Date.getTime) at which the folder has been last used. - * - * First we build the annotated folders array, each item has both the - * folder identifier and the time at which it was last-used by this dialog - * set. Then we sort it descendingly based on the time field. - */ - this._recentFolders = []; - for (var i = 0; i < folderIds.length; i++) { - var lastUsed = annos.getItemAnnotation(folderIds[i], LAST_USED_ANNO); - this._recentFolders.push({ folderId: folderIds[i], lastUsed: lastUsed }); - } - this._recentFolders.sort(function(a, b) { - if (b.lastUsed < a.lastUsed) - return -1; - if (b.lastUsed > a.lastUsed) - return 1; - return 0; - }); - - var numberOfItems = Math.min(MAX_FOLDER_ITEM_IN_MENU_LIST, - this._recentFolders.length); - for (var i = 0; i < numberOfItems; i++) { - this._appendFolderItemToMenupopup(menupopup, - this._recentFolders[i].folderId); - } - - var defaultItem = this._getFolderMenuItem(aSelectedFolder); - this._folderMenuList.selectedItem = defaultItem; - - // Set a selectedIndex attribute to show special icons - this._folderMenuList.setAttribute("selectedIndex", - this._folderMenuList.selectedIndex); - - // Hide the folders-separator if no folder is annotated as recently-used - this._element("foldersSeparator").hidden = (menupopup.childNodes.length <= 6); - this._folderMenuList.disabled = this._readOnly; - }, - - QueryInterface: function(aIID) { - if (aIID.equals(Ci.nsIDOMEventListener) || - aIID.equals(Ci.nsINavBookmarkObserver) || - aIID.equals(Ci.nsISupports)) - return this; - - throw Cr.NS_ERROR_NO_INTERFACE; - }, - - _element: function(aID) { - return document.getElementById("editBMPanel_" + aID); - }, - - _editorTransactionManagerClear: function(aItem) { - // Clear the editor's undo stack - let transactionManager; - try { - transactionManager = aItem.editor.transactionManager; - } catch (e) { - // When retrieving the transaction manager, editor may be null resulting - // in a TypeError. Additionally, the transaction manager may not - // exist yet, which causes access to it to throw NS_ERROR_FAILURE. - // In either event, the transaction manager doesn't exist it, so we - // don't need to worry about clearing it. - if (!(e instanceof TypeError) && e.result != Cr.NS_ERROR_FAILURE) { - throw e; - } - } - if (transactionManager) { - transactionManager.clear(); - } - }, - - _getItemStaticTitle: function() { - if (this._titleOverride) - return this._titleOverride; - - let title = ""; - if (this._itemId == -1) { - title = PlacesUtils.history.getPageTitle(this._uri); - } - else { - title = PlacesUtils.bookmarks.getItemTitle(this._itemId); - } - return title; - }, - - _initNamePicker: function() { - var namePicker = this._element("namePicker"); - namePicker.value = this._getItemStaticTitle(); - namePicker.readOnly = this._readOnly; - this._editorTransactionManagerClear(namePicker); - }, - - uninitPanel: function(aHideCollapsibleElements) { - if (aHideCollapsibleElements) { - // hide the folder tree if it was previously visible - var folderTreeRow = this._element("folderTreeRow"); - if (!folderTreeRow.collapsed) - this.toggleFolderTreeVisibility(); - - // hide the tag selector if it was previously visible - var tagsSelectorRow = this._element("tagsSelectorRow"); - if (!tagsSelectorRow.collapsed) - this.toggleTagsSelector(); - } - - if (this._observersAdded) { - if (this._itemId != -1 || this._uri || this._multiEdit) - PlacesUtils.bookmarks.removeObserver(this); - - this._element("namePicker").removeEventListener("blur", this); - this._element("locationField").removeEventListener("blur", this); - this._element("tagsField").removeEventListener("blur", this); - this._element("keywordField").removeEventListener("blur", this); - this._element("descriptionField").removeEventListener("blur", this); - - this._observersAdded = false; - } - - this._itemId = -1; - this._uri = null; - this._uris = []; - this._tags = []; - this._allTags = []; - this._itemIds = []; - this._multiEdit = false; - this._firstEditedField = ""; - this._initialized = false; - this._titleOverride = ""; - this._readOnly = false; - }, - - onTagsFieldBlur: function() { - if (this._updateTags()) // if anything has changed - this._mayUpdateFirstEditField("tagsField"); - }, - - _updateTags: function() { - if (this._multiEdit) - return this._updateMultipleTagsForItems(); - return this._updateSingleTagForItem(); - }, - - _updateSingleTagForItem: function() { - var currentTags = PlacesUtils.tagging.getTagsForURI(this._uri); - var tags = this._getTagsArrayFromTagField(); - if (tags.length > 0 || currentTags.length > 0) { - var tagsToRemove = []; - var tagsToAdd = []; - var txns = []; - for (var i = 0; i < currentTags.length; i++) { - if (tags.indexOf(currentTags[i]) == -1) - tagsToRemove.push(currentTags[i]); - } - for (var i = 0; i < tags.length; i++) { - if (currentTags.indexOf(tags[i]) == -1) - tagsToAdd.push(tags[i]); - } - - if (tagsToRemove.length > 0) { - let untagTxn = new PlacesUntagURITransaction(this._uri, tagsToRemove); - txns.push(untagTxn); - } - if (tagsToAdd.length > 0) { - let tagTxn = new PlacesTagURITransaction(this._uri, tagsToAdd); - txns.push(tagTxn); - } - - if (txns.length > 0) { - let aggregate = new PlacesAggregatedTransaction("Update tags", txns); - PlacesUtils.transactionManager.doTransaction(aggregate); - - // Ensure the tagsField is in sync, clean it up from empty tags - var tags = PlacesUtils.tagging.getTagsForURI(this._uri).join(", "); - this._initTextField("tagsField", tags, false); - return true; - } - } - return false; - }, - - /** - * Stores the first-edit field for this dialog, if the passed-in field - * is indeed the first edited field - * @param aNewField - * the id of the field that may be set (without the "editBMPanel_" - * prefix) - */ - _mayUpdateFirstEditField: function(aNewField) { - // * The first-edit-field behavior is not applied in the multi-edit case - // * if this._firstEditedField is already set, this is not the first field, - // so there's nothing to do - if (this._multiEdit || this._firstEditedField) - return; - - this._firstEditedField = aNewField; - - // set the pref - var prefs = Cc["@mozilla.org/preferences-service;1"]. - getService(Ci.nsIPrefBranch); - prefs.setCharPref("browser.bookmarks.editDialog.firstEditField", aNewField); - }, - - _updateMultipleTagsForItems: function() { - var tags = this._getTagsArrayFromTagField(); - if (tags.length > 0 || this._allTags.length > 0) { - var tagsToRemove = []; - var tagsToAdd = []; - var txns = []; - for (var i = 0; i < this._allTags.length; i++) { - if (tags.indexOf(this._allTags[i]) == -1) - tagsToRemove.push(this._allTags[i]); - } - for (var i = 0; i < this._tags.length; i++) { - tagsToAdd[i] = []; - for (var j = 0; j < tags.length; j++) { - if (this._tags[i].indexOf(tags[j]) == -1) - tagsToAdd[i].push(tags[j]); - } - } - - if (tagsToAdd.length > 0) { - for (let i = 0; i < this._uris.length; i++) { - if (tagsToAdd[i].length > 0) { - let tagTxn = new PlacesTagURITransaction(this._uris[i], - tagsToAdd[i]); - txns.push(tagTxn); - } - } - } - if (tagsToRemove.length > 0) { - for (let i = 0; i < this._uris.length; i++) { - let untagTxn = new PlacesUntagURITransaction(this._uris[i], - tagsToRemove); - txns.push(untagTxn); - } - } - - if (txns.length > 0) { - let aggregate = new PlacesAggregatedTransaction("Update tags", txns); - PlacesUtils.transactionManager.doTransaction(aggregate); - - this._allTags = tags; - this._tags = []; - for (let i = 0; i < this._uris.length; i++) { - this._tags[i] = PlacesUtils.tagging.getTagsForURI(this._uris[i]); - } - - // Ensure the tagsField is in sync, clean it up from empty tags - this._initTextField("tagsField", tags, false); - return true; - } - } - return false; - }, - - onNamePickerBlur: function() { - if (this._itemId == -1) - return; - - var namePicker = this._element("namePicker") - - // Here we update either the item title or its cached static title - var newTitle = namePicker.value; - if (!newTitle && - PlacesUtils.bookmarks.getFolderIdForItem(this._itemId) == PlacesUtils.tagsFolderId) { - // We don't allow setting an empty title for a tag, restore the old one. - this._initNamePicker(); - } - else if (this._getItemStaticTitle() != newTitle) { - this._mayUpdateFirstEditField("namePicker"); - let txn = new PlacesEditItemTitleTransaction(this._itemId, newTitle); - PlacesUtils.transactionManager.doTransaction(txn); - } - }, - - onDescriptionFieldBlur: function() { - var description = this._element("descriptionField").value; - if (description != PlacesUIUtils.getItemDescription(this._itemId)) { - var annoObj = { name : PlacesUIUtils.DESCRIPTION_ANNO, - type : Ci.nsIAnnotationService.TYPE_STRING, - flags : 0, - value : description, - expires: Ci.nsIAnnotationService.EXPIRE_NEVER }; - var txn = new PlacesSetItemAnnotationTransaction(this._itemId, annoObj); - PlacesUtils.transactionManager.doTransaction(txn); - } - }, - - onLocationFieldBlur: function() { - var uri; - try { - uri = PlacesUIUtils.createFixedURI(this._element("locationField").value); - } - catch(ex) { return; } - - if (!this._uri.equals(uri)) { - var txn = new PlacesEditBookmarkURITransaction(this._itemId, uri); - PlacesUtils.transactionManager.doTransaction(txn); - this._uri = uri; - } - }, - - onKeywordFieldBlur: function() { - let oldKeyword = this._keyword; - let keyword = this._keyword = this._element("keywordField").value; - if (keyword != oldKeyword) { - let txn = new PlacesEditBookmarkKeywordTransaction(this._itemId, - keyword, - null, - oldKeyword); - PlacesUtils.transactionManager.doTransaction(txn); - } - }, - - onLoadInSidebarCheckboxCommand: - function() { - let annoObj = { name : PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO }; - if (this._element("loadInSidebarCheckbox").checked) - annoObj.value = true; - let txn = new PlacesSetItemAnnotationTransaction(this._itemId, annoObj); - PlacesUtils.transactionManager.doTransaction(txn); - }, - - toggleFolderTreeVisibility: function() { - var expander = this._element("foldersExpander"); - var folderTreeRow = this._element("folderTreeRow"); - if (!folderTreeRow.collapsed) { - expander.className = "expander-down"; - expander.setAttribute("tooltiptext", - expander.getAttribute("tooltiptextdown")); - folderTreeRow.collapsed = true; - this._element("chooseFolderSeparator").hidden = - this._element("chooseFolderMenuItem").hidden = false; - } - else { - expander.className = "expander-up" - expander.setAttribute("tooltiptext", - expander.getAttribute("tooltiptextup")); - folderTreeRow.collapsed = false; - - // XXXmano: Ideally we would only do this once, but for some odd reason, - // the editable mode set on this tree, together with its collapsed state - // breaks the view. - const FOLDER_TREE_PLACE_URI = - "place:excludeItems=1&excludeQueries=1&excludeReadOnlyFolders=1&folder=" + - PlacesUIUtils.allBookmarksFolderId; - this._folderTree.place = FOLDER_TREE_PLACE_URI; - - this._element("chooseFolderSeparator").hidden = - this._element("chooseFolderMenuItem").hidden = true; - var currentFolder = this._getFolderIdFromMenuList(); - this._folderTree.selectItems([currentFolder]); - this._folderTree.focus(); - } - }, - - _getFolderIdFromMenuList: - function() { - var selectedItem = this._folderMenuList.selectedItem; - NS_ASSERT("folderId" in selectedItem, - "Invalid menuitem in the folders-menulist"); - return selectedItem.folderId; - }, - - /** - * Get the corresponding menu-item in the folder-menu-list for a bookmarks - * folder if such an item exists. Otherwise, this creates a menu-item for the - * folder. If the items-count limit (see MAX_FOLDERS_IN_MENU_LIST) is reached, - * the new item replaces the last menu-item. - * @param aFolderId - * The identifier of the bookmarks folder. - */ - _getFolderMenuItem: - function(aFolderId) { - var menupopup = this._folderMenuList.menupopup; - - for (let i = 0; i < menupopup.childNodes.length; i++) { - if ("folderId" in menupopup.childNodes[i] && - menupopup.childNodes[i].folderId == aFolderId) - return menupopup.childNodes[i]; - } - - // 3 special folders + separator + folder-items-count limit - if (menupopup.childNodes.length == 4 + MAX_FOLDER_ITEM_IN_MENU_LIST) - menupopup.removeChild(menupopup.lastChild); - - return this._appendFolderItemToMenupopup(menupopup, aFolderId); - }, - - onFolderMenuListCommand: function(aEvent) { - // Set a selectedIndex attribute to show special icons - this._folderMenuList.setAttribute("selectedIndex", - this._folderMenuList.selectedIndex); - - if (aEvent.target.id == "editBMPanel_chooseFolderMenuItem") { - // reset the selection back to where it was and expand the tree - // (this menu-item is hidden when the tree is already visible - var container = PlacesUtils.bookmarks.getFolderIdForItem(this._itemId); - var item = this._getFolderMenuItem(container); - this._folderMenuList.selectedItem = item; - // XXXmano HACK: setTimeout 100, otherwise focus goes back to the - // menulist right away - setTimeout(() => this.toggleFolderTreeVisibility(), 100); - return; - } - - // Move the item - var container = this._getFolderIdFromMenuList(); - if (PlacesUtils.bookmarks.getFolderIdForItem(this._itemId) != container) { - var txn = new PlacesMoveItemTransaction(this._itemId, - container, - PlacesUtils.bookmarks.DEFAULT_INDEX); - PlacesUtils.transactionManager.doTransaction(txn); - - // Mark the containing folder as recently-used if it isn't in the - // static list - if (container != PlacesUtils.unfiledBookmarksFolderId && - container != PlacesUtils.toolbarFolderId && - container != PlacesUtils.bookmarksMenuFolderId) - this._markFolderAsRecentlyUsed(container); - } - - // Update folder-tree selection - var folderTreeRow = this._element("folderTreeRow"); - if (!folderTreeRow.collapsed) { - var selectedNode = this._folderTree.selectedNode; - if (!selectedNode || - PlacesUtils.getConcreteItemId(selectedNode) != container) - this._folderTree.selectItems([container]); - } - }, - - onFolderTreeSelect: function() { - var selectedNode = this._folderTree.selectedNode; - - // Disable the "New Folder" button if we cannot create a new folder - this._element("newFolderButton") - .disabled = !this._folderTree.insertionPoint || !selectedNode; - - if (!selectedNode) - return; - - var folderId = PlacesUtils.getConcreteItemId(selectedNode); - if (this._getFolderIdFromMenuList() == folderId) - return; - - var folderItem = this._getFolderMenuItem(folderId); - this._folderMenuList.selectedItem = folderItem; - folderItem.doCommand(); - }, - - _markFolderAsRecentlyUsed: - function(aFolderId) { - var txns = []; - - // Expire old unused recent folders - var anno = this._getLastUsedAnnotationObject(false); - while (this._recentFolders.length > MAX_FOLDER_ITEM_IN_MENU_LIST) { - var folderId = this._recentFolders.pop().folderId; - let annoTxn = new PlacesSetItemAnnotationTransaction(folderId, anno); - txns.push(annoTxn); - } - - // Mark folder as recently used - anno = this._getLastUsedAnnotationObject(true); - let annoTxn = new PlacesSetItemAnnotationTransaction(aFolderId, anno); - txns.push(annoTxn); - - let aggregate = new PlacesAggregatedTransaction("Update last used folders", txns); - PlacesUtils.transactionManager.doTransaction(aggregate); - }, - - /** - * Returns an object which could then be used to set/unset the - * LAST_USED_ANNO annotation for a folder. - * - * @param aLastUsed - * Whether to set or unset the LAST_USED_ANNO annotation. - * @returns an object representing the annotation which could then be used - * with the transaction manager. - */ - _getLastUsedAnnotationObject: - function(aLastUsed) { - var anno = { name: LAST_USED_ANNO, - type: Ci.nsIAnnotationService.TYPE_INT32, - flags: 0, - value: aLastUsed ? new Date().getTime() : null, - expires: Ci.nsIAnnotationService.EXPIRE_NEVER }; - - return anno; - }, - - _rebuildTagsSelectorList: function() { - var tagsSelector = this._element("tagsSelector"); - var tagsSelectorRow = this._element("tagsSelectorRow"); - if (tagsSelectorRow.collapsed) - return; - - // Save the current scroll position and restore it after the rebuild. - let firstIndex = tagsSelector.getIndexOfFirstVisibleRow(); - let selectedIndex = tagsSelector.selectedIndex; - let selectedTag = selectedIndex >= 0 ? tagsSelector.selectedItem.label - : null; - - while (tagsSelector.hasChildNodes()) - tagsSelector.removeChild(tagsSelector.lastChild); - - var tagsInField = this._getTagsArrayFromTagField(); - var allTags = PlacesUtils.tagging.allTags; - for (var i = 0; i < allTags.length; i++) { - var tag = allTags[i]; - var elt = document.createElement("listitem"); - elt.setAttribute("type", "checkbox"); - elt.setAttribute("label", tag); - if (tagsInField.indexOf(tag) != -1) - elt.setAttribute("checked", "true"); - tagsSelector.appendChild(elt); - if (selectedTag === tag) - selectedIndex = tagsSelector.getIndexOfItem(elt); - } - - // Restore position. - // The listbox allows to scroll only if the required offset doesn't - // overflow its capacity, thus need to adjust the index for removals. - firstIndex = - Math.min(firstIndex, - tagsSelector.itemCount - tagsSelector.getNumberOfVisibleRows()); - tagsSelector.scrollToIndex(firstIndex); - if (selectedIndex >= 0 && tagsSelector.itemCount > 0) { - selectedIndex = Math.min(selectedIndex, tagsSelector.itemCount - 1); - tagsSelector.selectedIndex = selectedIndex; - tagsSelector.ensureIndexIsVisible(selectedIndex); - } - }, - - toggleTagsSelector: function() { - var tagsSelector = this._element("tagsSelector"); - var tagsSelectorRow = this._element("tagsSelectorRow"); - var expander = this._element("tagsSelectorExpander"); - if (tagsSelectorRow.collapsed) { - expander.className = "expander-up"; - expander.setAttribute("tooltiptext", - expander.getAttribute("tooltiptextup")); - tagsSelectorRow.collapsed = false; - this._rebuildTagsSelectorList(); - - // This is a no-op if we've added the listener. - tagsSelector.addEventListener("CheckboxStateChange", this, false); - } - else { - expander.className = "expander-down"; - expander.setAttribute("tooltiptext", - expander.getAttribute("tooltiptextdown")); - tagsSelectorRow.collapsed = true; - } - }, - - /** - * Splits "tagsField" element value, returning an array of valid tag strings. - * - * @return Array of tag strings found in the field value. - */ - _getTagsArrayFromTagField: function() { - let tags = this._element("tagsField").value; - return tags.trim() - .split(/\s*,\s*/) // Split on commas and remove spaces. - .filter(tag => tag.length > 0); // Kill empty tags. - }, - - newFolder: function() { - var ip = this._folderTree.insertionPoint; - - // default to the bookmarks menu folder - if (!ip || ip.itemId == PlacesUIUtils.allBookmarksFolderId) { - ip = new InsertionPoint(PlacesUtils.bookmarksMenuFolderId, - PlacesUtils.bookmarks.DEFAULT_INDEX, - Ci.nsITreeView.DROP_ON); - } - - // XXXmano: add a separate "New Folder" string at some point... - var defaultLabel = this._element("newFolderButton").label; - var txn = new PlacesCreateFolderTransaction(defaultLabel, ip.itemId, ip.index); - PlacesUtils.transactionManager.doTransaction(txn); - this._folderTree.focus(); - this._folderTree.selectItems([this._lastNewItem]); - this._folderTree.startEditing(this._folderTree.view.selection.currentIndex, - this._folderTree.columns.getFirstColumn()); - }, - - // nsIDOMEventListener - handleEvent: function(aEvent) { - switch (aEvent.type) { - case "CheckboxStateChange": - // Update the tags field when items are checked/unchecked in the listbox - var tags = this._getTagsArrayFromTagField(); - - if (aEvent.target.checked) { - if (tags.indexOf(aEvent.target.label) == -1) - tags.push(aEvent.target.label); - } - else { - var indexOfItem = tags.indexOf(aEvent.target.label); - if (indexOfItem != -1) - tags.splice(indexOfItem, 1); - } - this._element("tagsField").value = tags.join(", "); - this._updateTags(); - break; - case "blur": - let replaceFn = (str, firstLetter) => firstLetter.toUpperCase(); - let nodeName = aEvent.target.id.replace(/editBMPanel_(\w)/, replaceFn); - this["on" + nodeName + "Blur"](); - break; - case "unload": - this.uninitPanel(false); - break; - } - }, - - // nsINavBookmarkObserver - onItemChanged: function(aItemId, aProperty, - aIsAnnotationProperty, aValue, - aLastModified, aItemType) { - if (aProperty == "tags") { - // Tags case is special, since they should be updated if either: - // - the notification is for the edited bookmark - // - the notification is for the edited history entry - // - the notification is for one of edited uris - let shouldUpdateTagsField = this._itemId == aItemId; - if (this._itemId == -1 || this._multiEdit) { - // Check if the changed uri is part of the modified ones. - let changedURI = PlacesUtils.bookmarks.getBookmarkURI(aItemId); - let uris = this._multiEdit ? this._uris : [this._uri]; - uris.forEach(function(aURI, aIndex) { - if (aURI.equals(changedURI)) { - shouldUpdateTagsField = true; - if (this._multiEdit) { - this._tags[aIndex] = PlacesUtils.tagging.getTagsForURI(this._uris[aIndex]); - } - } - }, this); - } - - if (shouldUpdateTagsField) { - if (this._multiEdit) { - this._allTags = this._getCommonTags(); - this._initTextField("tagsField", this._allTags.join(", "), false); - } - else { - let tags = PlacesUtils.tagging.getTagsForURI(this._uri).join(", "); - this._initTextField("tagsField", tags, false); - } - } - - // Any tags change should be reflected in the tags selector. - this._rebuildTagsSelectorList(); - return; - } - - if (this._itemId != aItemId) { - if (aProperty == "title") { - // If the title of a folder which is listed within the folders - // menulist has been changed, we need to update the label of its - // representing element. - var menupopup = this._folderMenuList.menupopup; - for (let i = 0; i < menupopup.childNodes.length; i++) { - if ("folderId" in menupopup.childNodes[i] && - menupopup.childNodes[i].folderId == aItemId) { - menupopup.childNodes[i].label = aValue; - break; - } - } - } - - return; - } - - switch (aProperty) { - case "title": - var namePicker = this._element("namePicker"); - if (namePicker.value != aValue) { - namePicker.value = aValue; - this._editorTransactionManagerClear(namePicker); - } - break; - case "uri": - var locationField = this._element("locationField"); - if (locationField.value != aValue) { - this._uri = Cc["@mozilla.org/network/io-service;1"]. - getService(Ci.nsIIOService). - newURI(aValue, null, null); - this._initTextField("locationField", this._uri.spec); - this._initNamePicker(); - this._initTextField("tagsField", - PlacesUtils.tagging - .getTagsForURI(this._uri).join(", "), - false); - this._rebuildTagsSelectorList(); - } - break; - case "keyword": - this._keyword = PlacesUtils.bookmarks.getKeywordForBookmark(this._itemId); - this._initTextField("keywordField", this._keyword); - break; - case PlacesUIUtils.DESCRIPTION_ANNO: - this._initTextField("descriptionField", - PlacesUIUtils.getItemDescription(this._itemId)); - break; - case PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO: - this._element("loadInSidebarCheckbox").checked = - PlacesUtils.annotations.itemHasAnnotation(this._itemId, - PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO); - break; - case PlacesUtils.LMANNO_FEEDURI: - let feedURISpec = - PlacesUtils.annotations.getItemAnnotation(this._itemId, - PlacesUtils.LMANNO_FEEDURI); - this._initTextField("feedLocationField", feedURISpec, true); - break; - case PlacesUtils.LMANNO_SITEURI: - let siteURISpec = ""; - try { - siteURISpec = - PlacesUtils.annotations.getItemAnnotation(this._itemId, - PlacesUtils.LMANNO_SITEURI); - } catch (ex) {} - this._initTextField("siteLocationField", siteURISpec, true); - break; - } - }, - - onItemMoved: function(aItemId, aOldParent, aOldIndex, - aNewParent, aNewIndex, aItemType) { - if (aItemId != this._itemId || - aNewParent == this._getFolderIdFromMenuList()) - return; - - var folderItem = this._getFolderMenuItem(aNewParent); - - // just setting selectItem _does not_ trigger oncommand, so we don't - // recurse - this._folderMenuList.selectedItem = folderItem; - }, - - onItemAdded: function(aItemId, aParentId, aIndex, aItemType, - aURI) { - this._lastNewItem = aItemId; - }, - - onItemRemoved: function() { }, - onBeginUpdateBatch: function() { }, - onEndUpdateBatch: function() { }, - onItemVisited: function() { }, -}; diff --git a/application/palemoon/components/places/content/editBookmarkOverlay.xul b/application/palemoon/components/places/content/editBookmarkOverlay.xul deleted file mode 100644 index 196369dd2e..0000000000 --- a/application/palemoon/components/places/content/editBookmarkOverlay.xul +++ /dev/null @@ -1,228 +0,0 @@ - - - -%editBookmarkOverlayDTD; -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-

&privatebrowsingpage.howToStop3;

-

&privatebrowsingpage.howToStart3;

-
- - -
-

- &privatebrowsingpage.moreInfo; -

- -
-
-
- - - diff --git a/application/palemoon/components/privatebrowsing/jar.mn b/application/palemoon/components/privatebrowsing/jar.mn deleted file mode 100644 index 5667dc338e..0000000000 --- a/application/palemoon/components/privatebrowsing/jar.mn +++ /dev/null @@ -1,6 +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/. - -browser.jar: - content/browser/aboutPrivateBrowsing.xhtml (content/aboutPrivateBrowsing.xhtml) diff --git a/application/palemoon/components/privatebrowsing/moz.build b/application/palemoon/components/privatebrowsing/moz.build deleted file mode 100644 index ecb79e730d..0000000000 --- a/application/palemoon/components/privatebrowsing/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/application/palemoon/components/search/content/engineManager.js b/application/palemoon/components/search/content/engineManager.js deleted file mode 100644 index b9ed17cbc2..0000000000 --- a/application/palemoon/components/search/content/engineManager.js +++ /dev/null @@ -1,492 +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/. */ - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Task", - "resource://gre/modules/Task.jsm"); - -const Ci = Components.interfaces; -const Cc = Components.classes; - -const ENGINE_FLAVOR = "text/x-moz-search-engine"; - -const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled"; - -var gEngineView = null; - -var gEngineManagerDialog = { - init: function() { - gEngineView = new EngineView(new EngineStore()); - - var suggestEnabled = Services.prefs.getBoolPref(BROWSER_SUGGEST_PREF); - document.getElementById("enableSuggest").checked = suggestEnabled; - - var tree = document.getElementById("engineList"); - tree.view = gEngineView; - - Services.obs.addObserver(this, "browser-search-engine-modified", false); - }, - - destroy: function() { - // Remove the observer - Services.obs.removeObserver(this, "browser-search-engine-modified"); - }, - - observe: function(aEngine, aTopic, aVerb) { - if (aTopic == "browser-search-engine-modified") { - aEngine.QueryInterface(Ci.nsISearchEngine); - switch (aVerb) { - case "engine-added": - gEngineView._engineStore.addEngine(aEngine); - gEngineView.rowCountChanged(gEngineView.lastIndex, 1); - break; - case "engine-changed": - gEngineView._engineStore.reloadIcons(); - gEngineView.invalidate(); - break; - case "engine-removed": - case "engine-current": - case "engine-default": - // Not relevant - break; - } - } - }, - - onOK: function() { - // Set the preference - var newSuggestEnabled = document.getElementById("enableSuggest").checked; - Services.prefs.setBoolPref(BROWSER_SUGGEST_PREF, newSuggestEnabled); - - // Commit the changes - gEngineView._engineStore.commit(); - }, - - onRestoreDefaults: function() { - var num = gEngineView._engineStore.restoreDefaultEngines(); - gEngineView.rowCountChanged(0, num); - gEngineView.invalidate(); - }, - - showRestoreDefaults: function(val) { - document.documentElement.getButton("extra2").disabled = !val; - }, - - loadAddEngines: function() { - this.onOK(); - window.opener.BrowserSearch.loadAddEngines(); - window.close(); - }, - - remove: function() { - gEngineView._engineStore.removeEngine(gEngineView.selectedEngine); - var index = gEngineView.selectedIndex; - gEngineView.rowCountChanged(index, -1); - gEngineView.invalidate(); - gEngineView.selection.select(Math.min(index, gEngineView.lastIndex)); - gEngineView.ensureRowIsVisible(gEngineView.currentIndex); - document.getElementById("engineList").focus(); - }, - - /** - * Moves the selected engine either up or down in the engine list - * @param aDir - * -1 to move the selected engine down, +1 to move it up. - */ - bump: function(aDir) { - var selectedEngine = gEngineView.selectedEngine; - var newIndex = gEngineView.selectedIndex - aDir; - - gEngineView._engineStore.moveEngine(selectedEngine, newIndex); - - gEngineView.invalidate(); - gEngineView.selection.select(newIndex); - gEngineView.ensureRowIsVisible(newIndex); - this.showRestoreDefaults(true); - document.getElementById("engineList").focus(); - }, - - editKeyword: Task.async(function* () { - var selectedEngine = gEngineView.selectedEngine; - if (!selectedEngine) - return; - - var alias = { value: selectedEngine.alias }; - var strings = document.getElementById("engineManagerBundle"); - var title = strings.getString("editTitle"); - var msg = strings.getFormattedString("editMsg", [selectedEngine.name]); - - while (Services.prompt.prompt(window, title, msg, alias, null, {})) { - var bduplicate = false; - var eduplicate = false; - var dupName = ""; - - if (alias.value != "") { - // Check for duplicates in Places keywords. - bduplicate = !!(yield PlacesUtils.keywords.fetch(alias.value)); - - // Check for duplicates in changes we haven't committed yet - let engines = gEngineView._engineStore.engines; - for each (let engine in engines) { - if (engine.alias == alias.value && - engine.name != selectedEngine.name) { - eduplicate = true; - dupName = engine.name; - break; - } - } - } - - // Notify the user if they have chosen an existing engine/bookmark keyword - if (eduplicate || bduplicate) { - var dtitle = strings.getString("duplicateTitle"); - var bmsg = strings.getString("duplicateBookmarkMsg"); - var emsg = strings.getFormattedString("duplicateEngineMsg", [dupName]); - - Services.prompt.alert(window, dtitle, eduplicate ? emsg : bmsg); - } else { - gEngineView._engineStore.changeEngine(selectedEngine, "alias", - alias.value); - gEngineView.invalidate(); - break; - } - } - }), - - onSelect: function() { - // Buttons only work if an engine is selected and it's not the last engine, - // the latter is true when the selected is first and last at the same time. - var lastSelected = (gEngineView.selectedIndex == gEngineView.lastIndex); - var firstSelected = (gEngineView.selectedIndex == 0); - var noSelection = (gEngineView.selectedIndex == -1); - - document.getElementById("cmd_remove") - .setAttribute("disabled", noSelection || - (firstSelected && lastSelected)); - - document.getElementById("cmd_moveup") - .setAttribute("disabled", noSelection || firstSelected); - - document.getElementById("cmd_movedown") - .setAttribute("disabled", noSelection || lastSelected); - - document.getElementById("cmd_editkeyword") - .setAttribute("disabled", noSelection); - } -}; - -function onDragEngineStart(event) { - var selectedIndex = gEngineView.selectedIndex; - if (selectedIndex >= 0) { - event.dataTransfer.setData(ENGINE_FLAVOR, selectedIndex.toString()); - event.dataTransfer.effectAllowed = "move"; - } -} - -// "Operation" objects -function EngineMoveOp(aEngineClone, aNewIndex) { - if (!aEngineClone) - throw new Error("bad args to new EngineMoveOp!"); - this._engine = aEngineClone.originalEngine; - this._newIndex = aNewIndex; -} -EngineMoveOp.prototype = { - _engine: null, - _newIndex: null, - commit: function() { - Services.search.moveEngine(this._engine, this._newIndex); - } -} - -function EngineRemoveOp(aEngineClone) { - if (!aEngineClone) - throw new Error("bad args to new EngineRemoveOp!"); - this._engine = aEngineClone.originalEngine; -} -EngineRemoveOp.prototype = { - _engine: null, - commit: function() { - Services.search.removeEngine(this._engine); - } -} - -function EngineUnhideOp(aEngineClone, aNewIndex) { - if (!aEngineClone) - throw new Error("bad args to new EngineUnhideOp!"); - this._engine = aEngineClone.originalEngine; - this._newIndex = aNewIndex; -} -EngineUnhideOp.prototype = { - _engine: null, - _newIndex: null, - commit: function() { - this._engine.hidden = false; - Services.search.moveEngine(this._engine, this._newIndex); - } -} - -function EngineChangeOp(aEngineClone, aProp, aValue) { - if (!aEngineClone) - throw new Error("bad args to new EngineChangeOp!"); - - this._engine = aEngineClone.originalEngine; - this._prop = aProp; - this._newValue = aValue; -} -EngineChangeOp.prototype = { - _engine: null, - _prop: null, - _newValue: null, - commit: function() { - this._engine[this._prop] = this._newValue; - } -} - -function EngineStore() { - this._engines = Services.search.getVisibleEngines().map(this._cloneEngine); - this._defaultEngines = Services.search.getDefaultEngines().map(this._cloneEngine); - - this._ops = []; - - // check if we need to disable the restore defaults button - var someHidden = this._defaultEngines.some(function(e) e.hidden); - gEngineManagerDialog.showRestoreDefaults(someHidden); -} -EngineStore.prototype = { - _engines: null, - _defaultEngines: null, - _ops: null, - - get engines() { - return this._engines; - }, - set engines(val) { - this._engines = val; - return val; - }, - - _getIndexForEngine: function(aEngine) { - return this._engines.indexOf(aEngine); - }, - - _getEngineByName: function(aName) { - for each (var engine in this._engines) - if (engine.name == aName) - return engine; - - return null; - }, - - _cloneEngine: function(aEngine) { - var clonedObj={}; - for (var i in aEngine) - clonedObj[i] = aEngine[i]; - clonedObj.originalEngine = aEngine; - return clonedObj; - }, - - // Callback for Array's some(). A thisObj must be passed to some() - _isSameEngine: function(aEngineClone) { - return aEngineClone.originalEngine == this.originalEngine; - }, - - commit: function() { - var currentEngine = this._cloneEngine(Services.search.currentEngine); - for (var i = 0; i < this._ops.length; i++) - this._ops[i].commit(); - - // Restore currentEngine if it is a default engine that is still visible. - // Needed if the user deletes currentEngine and then restores it. - if (this._defaultEngines.some(this._isSameEngine, currentEngine) && - !currentEngine.originalEngine.hidden) - Services.search.currentEngine = currentEngine.originalEngine; - }, - - addEngine: function(aEngine) { - this._engines.push(this._cloneEngine(aEngine)); - }, - - moveEngine: function(aEngine, aNewIndex) { - if (aNewIndex < 0 || aNewIndex > this._engines.length - 1) - throw new Error("ES_moveEngine: invalid aNewIndex!"); - var index = this._getIndexForEngine(aEngine); - if (index == -1) - throw new Error("ES_moveEngine: invalid engine?"); - - if (index == aNewIndex) - return; // nothing to do - - // Move the engine in our internal store - var removedEngine = this._engines.splice(index, 1)[0]; - this._engines.splice(aNewIndex, 0, removedEngine); - - this._ops.push(new EngineMoveOp(aEngine, aNewIndex)); - }, - - removeEngine: function(aEngine) { - var index = this._getIndexForEngine(aEngine); - if (index == -1) - throw new Error("invalid engine?"); - - this._engines.splice(index, 1); - this._ops.push(new EngineRemoveOp(aEngine)); - if (this._defaultEngines.some(this._isSameEngine, aEngine)) - gEngineManagerDialog.showRestoreDefaults(true); - }, - - restoreDefaultEngines: function() { - var added = 0; - - for (var i = 0; i < this._defaultEngines.length; ++i) { - var e = this._defaultEngines[i]; - - // If the engine is already in the list, just move it. - if (this._engines.some(this._isSameEngine, e)) { - this.moveEngine(this._getEngineByName(e.name), i); - } else { - // Otherwise, add it back to our internal store - this._engines.splice(i, 0, e); - this._ops.push(new EngineUnhideOp(e, i)); - added++; - } - } - gEngineManagerDialog.showRestoreDefaults(false); - return added; - }, - - changeEngine: function(aEngine, aProp, aNewValue) { - var index = this._getIndexForEngine(aEngine); - if (index == -1) - throw new Error("invalid engine?"); - - this._engines[index][aProp] = aNewValue; - this._ops.push(new EngineChangeOp(aEngine, aProp, aNewValue)); - }, - - reloadIcons: function() { - this._engines.forEach(function(e) { - e.uri = e.originalEngine.uri; - }); - } -} - -function EngineView(aEngineStore) { - this._engineStore = aEngineStore; -} -EngineView.prototype = { - _engineStore: null, - tree: null, - - get lastIndex() { - return this.rowCount - 1; - }, - get selectedIndex() { - var seln = this.selection; - if (seln.getRangeCount() > 0) { - var min = {}; - seln.getRangeAt(0, min, {}); - return min.value; - } - return -1; - }, - get selectedEngine() { - return this._engineStore.engines[this.selectedIndex]; - }, - - // Helpers - rowCountChanged: function(index, count) { - this.tree.rowCountChanged(index, count); - }, - - invalidate: function() { - this.tree.invalidate(); - }, - - ensureRowIsVisible: function(index) { - this.tree.ensureRowIsVisible(index); - }, - - getSourceIndexFromDrag: function(dataTransfer) { - return parseInt(dataTransfer.getData(ENGINE_FLAVOR)); - }, - - // nsITreeView - get rowCount() { - return this._engineStore.engines.length; - }, - - getImageSrc: function(index, column) { - if (column.id == "engineName" && this._engineStore.engines[index].iconURI) - return this._engineStore.engines[index].iconURI.spec; - return ""; - }, - - getCellText: function(index, column) { - if (column.id == "engineName") - return this._engineStore.engines[index].name; - else if (column.id == "engineKeyword") - return this._engineStore.engines[index].alias; - return ""; - }, - - setTree: function(tree) { - this.tree = tree; - }, - - canDrop: function(targetIndex, orientation, dataTransfer) { - var sourceIndex = this.getSourceIndexFromDrag(dataTransfer); - return (sourceIndex != -1 && - sourceIndex != targetIndex && - sourceIndex != targetIndex + orientation); - }, - - drop: function(dropIndex, orientation, dataTransfer) { - var sourceIndex = this.getSourceIndexFromDrag(dataTransfer); - var sourceEngine = this._engineStore.engines[sourceIndex]; - - if (dropIndex > sourceIndex) { - if (orientation == Ci.nsITreeView.DROP_BEFORE) - dropIndex--; - } else { - if (orientation == Ci.nsITreeView.DROP_AFTER) - dropIndex++; - } - - this._engineStore.moveEngine(sourceEngine, dropIndex); - gEngineManagerDialog.showRestoreDefaults(true); - - // Redraw, and adjust selection - this.invalidate(); - this.selection.select(dropIndex); - }, - - selection: null, - getRowProperties: function(index) { return ""; }, - getCellProperties: function(index, column) { return ""; }, - getColumnProperties: function(column) { return ""; }, - isContainer: function(index) { return false; }, - isContainerOpen: function(index) { return false; }, - isContainerEmpty: function(index) { return false; }, - isSeparator: function(index) { return false; }, - isSorted: function(index) { return false; }, - getParentIndex: function(index) { return -1; }, - hasNextSibling: function(parentIndex, index) { return false; }, - getLevel: function(index) { return 0; }, - getProgressMode: function(index, column) { }, - getCellValue: function(index, column) { }, - toggleOpenState: function(index) { }, - cycleHeader: function(column) { }, - selectionChanged: function() { }, - cycleCell: function(row, column) { }, - isEditable: function(index, column) { return false; }, - isSelectable: function(index, column) { return false; }, - setCellValue: function(index, column, value) { }, - setCellText: function(index, column, value) { }, - performAction: function(action) { }, - performActionOnRow: function(action, index) { }, - performActionOnCell: function(action, index, column) { } -}; diff --git a/application/palemoon/components/search/content/engineManager.xul b/application/palemoon/components/search/content/engineManager.xul deleted file mode 100644 index 1152ef8db3..0000000000 --- a/application/palemoon/components/search/content/engineManager.xul +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
- - - -
-
-
-
-
- - -
-
- -
- - - - -
-
-
-
- -
- -
- -
- -
- - -
-
- - - - - - - - - Current View - - -
- - -
-
-
- -
- -
- - - -
-
-
-
-
-
-
-
-
-
- - - - - - - - -
-
-
- - -
- - - -
-
- - - diff --git a/application/palemoon/extensions/pdfjs/content/web/viewer.js b/application/palemoon/extensions/pdfjs/content/web/viewer.js deleted file mode 100644 index 854a903b02..0000000000 --- a/application/palemoon/extensions/pdfjs/content/web/viewer.js +++ /dev/null @@ -1,7750 +0,0 @@ -/* Copyright 2017 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.l = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; - -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; - -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; - -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 31); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var pdfjsLib = __webpack_require__(1); -var CSS_UNITS = 96.0 / 72.0; -var DEFAULT_SCALE_VALUE = 'auto'; -var DEFAULT_SCALE = 1.0; -var MIN_SCALE = 0.25; -var MAX_SCALE = 10.0; -var UNKNOWN_SCALE = 0; -var MAX_AUTO_SCALE = 1.25; -var SCROLLBAR_PADDING = 40; -var VERTICAL_PADDING = 5; -var RendererType = { - CANVAS: 'canvas', - SVG: 'svg' -}; -var mozL10n = document.mozL10n || document.webL10n; -var PDFJS = pdfjsLib.PDFJS; -PDFJS.disableFullscreen = PDFJS.disableFullscreen === undefined ? false : PDFJS.disableFullscreen; -PDFJS.useOnlyCssZoom = PDFJS.useOnlyCssZoom === undefined ? false : PDFJS.useOnlyCssZoom; -PDFJS.maxCanvasPixels = PDFJS.maxCanvasPixels === undefined ? 16777216 : PDFJS.maxCanvasPixels; -PDFJS.disableHistory = PDFJS.disableHistory === undefined ? false : PDFJS.disableHistory; -PDFJS.disableTextLayer = PDFJS.disableTextLayer === undefined ? false : PDFJS.disableTextLayer; -PDFJS.ignoreCurrentPositionOnZoom = PDFJS.ignoreCurrentPositionOnZoom === undefined ? false : PDFJS.ignoreCurrentPositionOnZoom; -function getOutputScale(ctx) { - var devicePixelRatio = window.devicePixelRatio || 1; - var backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; - var pixelRatio = devicePixelRatio / backingStoreRatio; - return { - sx: pixelRatio, - sy: pixelRatio, - scaled: pixelRatio !== 1 - }; -} -function scrollIntoView(element, spot, skipOverflowHiddenElements) { - var parent = element.offsetParent; - if (!parent) { - console.error('offsetParent is not set -- cannot scroll'); - return; - } - var checkOverflow = skipOverflowHiddenElements || false; - var offsetY = element.offsetTop + element.clientTop; - var offsetX = element.offsetLeft + element.clientLeft; - while (parent.clientHeight === parent.scrollHeight || checkOverflow && getComputedStyle(parent).overflow === 'hidden') { - if (parent.dataset._scaleY) { - offsetY /= parent.dataset._scaleY; - offsetX /= parent.dataset._scaleX; - } - offsetY += parent.offsetTop; - offsetX += parent.offsetLeft; - parent = parent.offsetParent; - if (!parent) { - return; - } - } - if (spot) { - if (spot.top !== undefined) { - offsetY += spot.top; - } - if (spot.left !== undefined) { - offsetX += spot.left; - parent.scrollLeft = offsetX; - } - } - parent.scrollTop = offsetY; -} -function watchScroll(viewAreaElement, callback) { - var debounceScroll = function debounceScroll(evt) { - if (rAF) { - return; - } - rAF = window.requestAnimationFrame(function viewAreaElementScrolled() { - rAF = null; - var currentY = viewAreaElement.scrollTop; - var lastY = state.lastY; - if (currentY !== lastY) { - state.down = currentY > lastY; - } - state.lastY = currentY; - callback(state); - }); - }; - var state = { - down: true, - lastY: viewAreaElement.scrollTop, - _eventHandler: debounceScroll - }; - var rAF = null; - viewAreaElement.addEventListener('scroll', debounceScroll, true); - return state; -} -function parseQueryString(query) { - var parts = query.split('&'); - var params = {}; - for (var i = 0, ii = parts.length; i < ii; ++i) { - var param = parts[i].split('='); - var key = param[0].toLowerCase(); - var value = param.length > 1 ? param[1] : null; - params[decodeURIComponent(key)] = decodeURIComponent(value); - } - return params; -} -function binarySearchFirstItem(items, condition) { - var minIndex = 0; - var maxIndex = items.length - 1; - if (items.length === 0 || !condition(items[maxIndex])) { - return items.length; - } - if (condition(items[minIndex])) { - return minIndex; - } - while (minIndex < maxIndex) { - var currentIndex = minIndex + maxIndex >> 1; - var currentItem = items[currentIndex]; - if (condition(currentItem)) { - maxIndex = currentIndex; - } else { - minIndex = currentIndex + 1; - } - } - return minIndex; -} -function approximateFraction(x) { - if (Math.floor(x) === x) { - return [ - x, - 1 - ]; - } - var xinv = 1 / x; - var limit = 8; - if (xinv > limit) { - return [ - 1, - limit - ]; - } else if (Math.floor(xinv) === xinv) { - return [ - 1, - xinv - ]; - } - var x_ = x > 1 ? xinv : x; - var a = 0, b = 1, c = 1, d = 1; - while (true) { - var p = a + c, q = b + d; - if (q > limit) { - break; - } - if (x_ <= p / q) { - c = p; - d = q; - } else { - a = p; - b = q; - } - } - var result; - if (x_ - a / b < c / d - x_) { - result = x_ === x ? [ - a, - b - ] : [ - b, - a - ]; - } else { - result = x_ === x ? [ - c, - d - ] : [ - d, - c - ]; - } - return result; -} -function roundToDivide(x, div) { - var r = x % div; - return r === 0 ? x : Math.round(x - r + div); -} -function getVisibleElements(scrollEl, views, sortByVisibility) { - var top = scrollEl.scrollTop, bottom = top + scrollEl.clientHeight; - var left = scrollEl.scrollLeft, right = left + scrollEl.clientWidth; - function isElementBottomBelowViewTop(view) { - var element = view.div; - var elementBottom = element.offsetTop + element.clientTop + element.clientHeight; - return elementBottom > top; - } - var visible = [], view, element; - var currentHeight, viewHeight, hiddenHeight, percentHeight; - var currentWidth, viewWidth; - var firstVisibleElementInd = views.length === 0 ? 0 : binarySearchFirstItem(views, isElementBottomBelowViewTop); - for (var i = firstVisibleElementInd, ii = views.length; i < ii; i++) { - view = views[i]; - element = view.div; - currentHeight = element.offsetTop + element.clientTop; - viewHeight = element.clientHeight; - if (currentHeight > bottom) { - break; - } - currentWidth = element.offsetLeft + element.clientLeft; - viewWidth = element.clientWidth; - if (currentWidth + viewWidth < left || currentWidth > right) { - continue; - } - hiddenHeight = Math.max(0, top - currentHeight) + Math.max(0, currentHeight + viewHeight - bottom); - percentHeight = (viewHeight - hiddenHeight) * 100 / viewHeight | 0; - visible.push({ - id: view.id, - x: currentWidth, - y: currentHeight, - view: view, - percent: percentHeight - }); - } - var first = visible[0]; - var last = visible[visible.length - 1]; - if (sortByVisibility) { - visible.sort(function (a, b) { - var pc = a.percent - b.percent; - if (Math.abs(pc) > 0.001) { - return -pc; - } - return a.id - b.id; - }); - } - return { - first: first, - last: last, - views: visible - }; -} -function noContextMenuHandler(e) { - e.preventDefault(); -} -function getPDFFileNameFromURL(url, defaultFilename) { - if (typeof defaultFilename === 'undefined') { - defaultFilename = 'document.pdf'; - } - var reURI = /^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/; - var reFilename = /[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i; - var splitURI = reURI.exec(url); - var suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]); - if (suggestedFilename) { - suggestedFilename = suggestedFilename[0]; - if (suggestedFilename.indexOf('%') !== -1) { - try { - suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0]; - } catch (e) { - } - } - } - return suggestedFilename || defaultFilename; -} -function normalizeWheelEventDelta(evt) { - var delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY); - var angle = Math.atan2(evt.deltaY, evt.deltaX); - if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) { - delta = -delta; - } - var MOUSE_DOM_DELTA_PIXEL_MODE = 0; - var MOUSE_DOM_DELTA_LINE_MODE = 1; - var MOUSE_PIXELS_PER_LINE = 30; - var MOUSE_LINES_PER_PAGE = 30; - if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) { - delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE; - } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) { - delta /= MOUSE_LINES_PER_PAGE; - } - return delta; -} -var animationStarted = new Promise(function (resolve) { - window.requestAnimationFrame(resolve); -}); -var localized = new Promise(function (resolve, reject) { - if (!mozL10n) { - resolve(); - return; - } - if (mozL10n.getReadyState() !== 'loading') { - resolve(); - return; - } - window.addEventListener('localized', function localized(evt) { - resolve(); - }); -}); -var EventBus = function EventBusClosure() { - function EventBus() { - this._listeners = Object.create(null); - } - EventBus.prototype = { - on: function EventBus_on(eventName, listener) { - var eventListeners = this._listeners[eventName]; - if (!eventListeners) { - eventListeners = []; - this._listeners[eventName] = eventListeners; - } - eventListeners.push(listener); - }, - off: function EventBus_on(eventName, listener) { - var eventListeners = this._listeners[eventName]; - var i; - if (!eventListeners || (i = eventListeners.indexOf(listener)) < 0) { - return; - } - eventListeners.splice(i, 1); - }, - dispatch: function EventBus_dispath(eventName) { - var eventListeners = this._listeners[eventName]; - if (!eventListeners || eventListeners.length === 0) { - return; - } - var args = Array.prototype.slice.call(arguments, 1); - eventListeners.slice(0).forEach(function (listener) { - listener.apply(null, args); - }); - } - }; - return EventBus; -}(); -var ProgressBar = function ProgressBarClosure() { - function clamp(v, min, max) { - return Math.min(Math.max(v, min), max); - } - function ProgressBar(id, opts) { - this.visible = true; - this.div = document.querySelector(id + ' .progress'); - this.bar = this.div.parentNode; - this.height = opts.height || 100; - this.width = opts.width || 100; - this.units = opts.units || '%'; - this.div.style.height = this.height + this.units; - this.percent = 0; - } - ProgressBar.prototype = { - updateBar: function ProgressBar_updateBar() { - if (this._indeterminate) { - this.div.classList.add('indeterminate'); - this.div.style.width = this.width + this.units; - return; - } - this.div.classList.remove('indeterminate'); - var progressSize = this.width * this._percent / 100; - this.div.style.width = progressSize + this.units; - }, - get percent() { - return this._percent; - }, - set percent(val) { - this._indeterminate = isNaN(val); - this._percent = clamp(val, 0, 100); - this.updateBar(); - }, - setWidth: function ProgressBar_setWidth(viewer) { - if (viewer) { - var container = viewer.parentNode; - var scrollbarWidth = container.offsetWidth - viewer.offsetWidth; - if (scrollbarWidth > 0) { - this.bar.setAttribute('style', 'width: calc(100% - ' + scrollbarWidth + 'px);'); - } - } - }, - hide: function ProgressBar_hide() { - if (!this.visible) { - return; - } - this.visible = false; - this.bar.classList.add('hidden'); - document.body.classList.remove('loadingInProgress'); - }, - show: function ProgressBar_show() { - if (this.visible) { - return; - } - this.visible = true; - document.body.classList.add('loadingInProgress'); - this.bar.classList.remove('hidden'); - } - }; - return ProgressBar; -}(); -exports.CSS_UNITS = CSS_UNITS; -exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE; -exports.DEFAULT_SCALE = DEFAULT_SCALE; -exports.MIN_SCALE = MIN_SCALE; -exports.MAX_SCALE = MAX_SCALE; -exports.UNKNOWN_SCALE = UNKNOWN_SCALE; -exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE; -exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING; -exports.VERTICAL_PADDING = VERTICAL_PADDING; -exports.RendererType = RendererType; -exports.mozL10n = mozL10n; -exports.EventBus = EventBus; -exports.ProgressBar = ProgressBar; -exports.getPDFFileNameFromURL = getPDFFileNameFromURL; -exports.noContextMenuHandler = noContextMenuHandler; -exports.parseQueryString = parseQueryString; -exports.getVisibleElements = getVisibleElements; -exports.roundToDivide = roundToDivide; -exports.approximateFraction = approximateFraction; -exports.getOutputScale = getOutputScale; -exports.scrollIntoView = scrollIntoView; -exports.watchScroll = watchScroll; -exports.binarySearchFirstItem = binarySearchFirstItem; -exports.normalizeWheelEventDelta = normalizeWheelEventDelta; -exports.animationStarted = animationStarted; -exports.localized = localized; - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -{ - var pdfjsLib; - if (typeof __pdfjsdev_webpack__ === 'undefined') { - if (typeof require === 'function') { - pdfjsLib = require('../build/pdf.js'); - } else { - pdfjsLib = window['pdfjs-dist/build/pdf']; - } - } - module.exports = pdfjsLib; -} - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var EventBus = uiUtils.EventBus; -function attachDOMEventsToEventBus(eventBus) { - eventBus.on('documentload', function () { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('documentload', true, true, {}); - window.dispatchEvent(event); - }); - eventBus.on('pagerendered', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagerendered', true, true, { - pageNumber: e.pageNumber, - cssTransform: e.cssTransform - }); - e.source.div.dispatchEvent(event); - }); - eventBus.on('textlayerrendered', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('textlayerrendered', true, true, { pageNumber: e.pageNumber }); - e.source.textLayerDiv.dispatchEvent(event); - }); - eventBus.on('pagechange', function (e) { - var event = document.createEvent('UIEvents'); - event.initUIEvent('pagechange', true, true, window, 0); - event.pageNumber = e.pageNumber; - e.source.container.dispatchEvent(event); - }); - eventBus.on('pagesinit', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagesinit', true, true, null); - e.source.container.dispatchEvent(event); - }); - eventBus.on('pagesloaded', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagesloaded', true, true, { pagesCount: e.pagesCount }); - e.source.container.dispatchEvent(event); - }); - eventBus.on('scalechange', function (e) { - var event = document.createEvent('UIEvents'); - event.initUIEvent('scalechange', true, true, window, 0); - event.scale = e.scale; - event.presetValue = e.presetValue; - e.source.container.dispatchEvent(event); - }); - eventBus.on('updateviewarea', function (e) { - var event = document.createEvent('UIEvents'); - event.initUIEvent('updateviewarea', true, true, window, 0); - event.location = e.location; - e.source.container.dispatchEvent(event); - }); - eventBus.on('find', function (e) { - if (e.source === window) { - return; - } - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('find' + e.type, true, true, { - query: e.query, - phraseSearch: e.phraseSearch, - caseSensitive: e.caseSensitive, - highlightAll: e.highlightAll, - findPrevious: e.findPrevious - }); - window.dispatchEvent(event); - }); - eventBus.on('attachmentsloaded', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('attachmentsloaded', true, true, { attachmentsCount: e.attachmentsCount }); - e.source.container.dispatchEvent(event); - }); - eventBus.on('sidebarviewchanged', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('sidebarviewchanged', true, true, { view: e.view }); - e.source.outerContainer.dispatchEvent(event); - }); - eventBus.on('pagemode', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagemode', true, true, { mode: e.mode }); - e.source.pdfViewer.container.dispatchEvent(event); - }); - eventBus.on('namedaction', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('namedaction', true, true, { action: e.action }); - e.source.pdfViewer.container.dispatchEvent(event); - }); - eventBus.on('presentationmodechanged', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('presentationmodechanged', true, true, { - active: e.active, - switchInProgress: e.switchInProgress - }); - window.dispatchEvent(event); - }); - eventBus.on('outlineloaded', function (e) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('outlineloaded', true, true, { outlineCount: e.outlineCount }); - e.source.container.dispatchEvent(event); - }); -} -var globalEventBus = null; -function getGlobalEventBus() { - if (globalEventBus) { - return globalEventBus; - } - globalEventBus = new EventBus(); - attachDOMEventsToEventBus(globalEventBus); - return globalEventBus; -} -exports.attachDOMEventsToEventBus = attachDOMEventsToEventBus; -exports.getGlobalEventBus = getGlobalEventBus; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var CLEANUP_TIMEOUT = 30000; -var RenderingStates = { - INITIAL: 0, - RUNNING: 1, - PAUSED: 2, - FINISHED: 3 -}; -var PDFRenderingQueue = function PDFRenderingQueueClosure() { - function PDFRenderingQueue() { - this.pdfViewer = null; - this.pdfThumbnailViewer = null; - this.onIdle = null; - this.highestPriorityPage = null; - this.idleTimeout = null; - this.printing = false; - this.isThumbnailViewEnabled = false; - } - PDFRenderingQueue.prototype = { - setViewer: function PDFRenderingQueue_setViewer(pdfViewer) { - this.pdfViewer = pdfViewer; - }, - setThumbnailViewer: function PDFRenderingQueue_setThumbnailViewer(pdfThumbnailViewer) { - this.pdfThumbnailViewer = pdfThumbnailViewer; - }, - isHighestPriority: function PDFRenderingQueue_isHighestPriority(view) { - return this.highestPriorityPage === view.renderingId; - }, - renderHighestPriority: function PDFRenderingQueue_renderHighestPriority(currentlyVisiblePages) { - if (this.idleTimeout) { - clearTimeout(this.idleTimeout); - this.idleTimeout = null; - } - if (this.pdfViewer.forceRendering(currentlyVisiblePages)) { - return; - } - if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) { - if (this.pdfThumbnailViewer.forceRendering()) { - return; - } - } - if (this.printing) { - return; - } - if (this.onIdle) { - this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT); - } - }, - getHighestPriority: function PDFRenderingQueue_getHighestPriority(visible, views, scrolledDown) { - var visibleViews = visible.views; - var numVisible = visibleViews.length; - if (numVisible === 0) { - return false; - } - for (var i = 0; i < numVisible; ++i) { - var view = visibleViews[i].view; - if (!this.isViewFinished(view)) { - return view; - } - } - if (scrolledDown) { - var nextPageIndex = visible.last.id; - if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) { - return views[nextPageIndex]; - } - } else { - var previousPageIndex = visible.first.id - 2; - if (views[previousPageIndex] && !this.isViewFinished(views[previousPageIndex])) { - return views[previousPageIndex]; - } - } - return null; - }, - isViewFinished: function PDFRenderingQueue_isViewFinished(view) { - return view.renderingState === RenderingStates.FINISHED; - }, - renderView: function PDFRenderingQueue_renderView(view) { - var state = view.renderingState; - switch (state) { - case RenderingStates.FINISHED: - return false; - case RenderingStates.PAUSED: - this.highestPriorityPage = view.renderingId; - view.resume(); - break; - case RenderingStates.RUNNING: - this.highestPriorityPage = view.renderingId; - break; - case RenderingStates.INITIAL: - this.highestPriorityPage = view.renderingId; - var continueRendering = function () { - this.renderHighestPriority(); - }.bind(this); - view.draw().then(continueRendering, continueRendering); - break; - } - return true; - } - }; - return PDFRenderingQueue; -}(); -exports.RenderingStates = RenderingStates; -exports.PDFRenderingQueue = PDFRenderingQueue; - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtilsLib = __webpack_require__(0); -var downloadManagerLib = __webpack_require__(12); -var pdfHistoryLib = __webpack_require__(19); -var preferencesLib = __webpack_require__(7); -var pdfSidebarLib = __webpack_require__(23); -var viewHistoryLib = __webpack_require__(30); -var pdfThumbnailViewerLib = __webpack_require__(25); -var toolbarLib = __webpack_require__(29); -var secondaryToolbarLib = __webpack_require__(27); -var passwordPromptLib = __webpack_require__(15); -var pdfPresentationModeLib = __webpack_require__(22); -var pdfDocumentPropertiesLib = __webpack_require__(17); -var handToolLib = __webpack_require__(14); -var pdfViewerLib = __webpack_require__(26); -var pdfRenderingQueueLib = __webpack_require__(3); -var pdfLinkServiceLib = __webpack_require__(6); -var pdfOutlineViewerLib = __webpack_require__(20); -var overlayManagerLib = __webpack_require__(5); -var pdfAttachmentViewerLib = __webpack_require__(16); -var pdfFindControllerLib = __webpack_require__(8); -var pdfFindBarLib = __webpack_require__(18); -var domEventsLib = __webpack_require__(2); -var pdfjsLib = __webpack_require__(1); -var UNKNOWN_SCALE = uiUtilsLib.UNKNOWN_SCALE; -var DEFAULT_SCALE_VALUE = uiUtilsLib.DEFAULT_SCALE_VALUE; -var MIN_SCALE = uiUtilsLib.MIN_SCALE; -var MAX_SCALE = uiUtilsLib.MAX_SCALE; -var ProgressBar = uiUtilsLib.ProgressBar; -var getPDFFileNameFromURL = uiUtilsLib.getPDFFileNameFromURL; -var noContextMenuHandler = uiUtilsLib.noContextMenuHandler; -var mozL10n = uiUtilsLib.mozL10n; -var parseQueryString = uiUtilsLib.parseQueryString; -var PDFHistory = pdfHistoryLib.PDFHistory; -var Preferences = preferencesLib.Preferences; -var SidebarView = pdfSidebarLib.SidebarView; -var PDFSidebar = pdfSidebarLib.PDFSidebar; -var ViewHistory = viewHistoryLib.ViewHistory; -var PDFThumbnailViewer = pdfThumbnailViewerLib.PDFThumbnailViewer; -var Toolbar = toolbarLib.Toolbar; -var SecondaryToolbar = secondaryToolbarLib.SecondaryToolbar; -var PasswordPrompt = passwordPromptLib.PasswordPrompt; -var PDFPresentationMode = pdfPresentationModeLib.PDFPresentationMode; -var PDFDocumentProperties = pdfDocumentPropertiesLib.PDFDocumentProperties; -var HandTool = handToolLib.HandTool; -var PresentationModeState = pdfViewerLib.PresentationModeState; -var PDFViewer = pdfViewerLib.PDFViewer; -var RenderingStates = pdfRenderingQueueLib.RenderingStates; -var PDFRenderingQueue = pdfRenderingQueueLib.PDFRenderingQueue; -var PDFLinkService = pdfLinkServiceLib.PDFLinkService; -var PDFOutlineViewer = pdfOutlineViewerLib.PDFOutlineViewer; -var OverlayManager = overlayManagerLib.OverlayManager; -var PDFAttachmentViewer = pdfAttachmentViewerLib.PDFAttachmentViewer; -var PDFFindController = pdfFindControllerLib.PDFFindController; -var PDFFindBar = pdfFindBarLib.PDFFindBar; -var getGlobalEventBus = domEventsLib.getGlobalEventBus; -var normalizeWheelEventDelta = uiUtilsLib.normalizeWheelEventDelta; -var animationStarted = uiUtilsLib.animationStarted; -var localized = uiUtilsLib.localized; -var RendererType = uiUtilsLib.RendererType; -var DEFAULT_SCALE_DELTA = 1.1; -var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; -function configure(PDFJS) { - PDFJS.imageResourcesPath = './images/'; - PDFJS.workerSrc = '../build/pdf.worker.js'; - PDFJS.cMapUrl = '../web/cmaps/'; - PDFJS.cMapPacked = true; -} -var DefaultExernalServices = { - updateFindControlState: function (data) { - }, - initPassiveLoading: function (callbacks) { - }, - fallback: function (data, callback) { - }, - createDownloadManager: function () { - return new downloadManagerLib.DownloadManager(); - }, - supportsIntegratedFind: false, - supportsDocumentFonts: true, - supportsDocumentColors: true, - supportedMouseWheelZoomModifierKeys: { - ctrlKey: true, - metaKey: true - } -}; -var PDFViewerApplication = { - initialBookmark: document.location.hash.substring(1), - initialDestination: null, - initialized: false, - fellback: false, - appConfig: null, - pdfDocument: null, - pdfLoadingTask: null, - printService: null, - pdfViewer: null, - pdfThumbnailViewer: null, - pdfRenderingQueue: null, - pdfPresentationMode: null, - pdfDocumentProperties: null, - pdfLinkService: null, - pdfHistory: null, - pdfSidebar: null, - pdfOutlineViewer: null, - pdfAttachmentViewer: null, - store: null, - downloadManager: null, - toolbar: null, - secondaryToolbar: null, - eventBus: null, - pageRotation: 0, - isInitialViewSet: false, - viewerPrefs: { - sidebarViewOnLoad: SidebarView.NONE, - pdfBugEnabled: false, - showPreviousViewOnLoad: true, - defaultZoomValue: '', - disablePageLabels: false, - renderer: 'canvas', - enhanceTextSelection: false, - renderInteractiveForms: false, - enablePrintAutoRotate: false - }, - isViewerEmbedded: window.parent !== window, - url: '', - baseUrl: '', - externalServices: DefaultExernalServices, - initialize: function pdfViewInitialize(appConfig) { - var self = this; - var PDFJS = pdfjsLib.PDFJS; - Preferences.initialize(); - this.preferences = Preferences; - configure(PDFJS); - this.appConfig = appConfig; - return this._readPreferences().then(function () { - return self._initializeViewerComponents(); - }).then(function () { - self.bindEvents(); - self.bindWindowEvents(); - if (self.isViewerEmbedded && !PDFJS.isExternalLinkTargetSet()) { - PDFJS.externalLinkTarget = PDFJS.LinkTarget.TOP; - } - self.initialized = true; - }); - }, - _readPreferences: function () { - var self = this; - var PDFJS = pdfjsLib.PDFJS; - return Promise.all([ - Preferences.get('enableWebGL').then(function resolved(value) { - PDFJS.disableWebGL = !value; - }), - Preferences.get('sidebarViewOnLoad').then(function resolved(value) { - self.viewerPrefs['sidebarViewOnLoad'] = value; - }), - Preferences.get('pdfBugEnabled').then(function resolved(value) { - self.viewerPrefs['pdfBugEnabled'] = value; - }), - Preferences.get('showPreviousViewOnLoad').then(function resolved(value) { - self.viewerPrefs['showPreviousViewOnLoad'] = value; - }), - Preferences.get('defaultZoomValue').then(function resolved(value) { - self.viewerPrefs['defaultZoomValue'] = value; - }), - Preferences.get('enhanceTextSelection').then(function resolved(value) { - self.viewerPrefs['enhanceTextSelection'] = value; - }), - Preferences.get('disableTextLayer').then(function resolved(value) { - if (PDFJS.disableTextLayer === true) { - return; - } - PDFJS.disableTextLayer = value; - }), - Preferences.get('disableRange').then(function resolved(value) { - if (PDFJS.disableRange === true) { - return; - } - PDFJS.disableRange = value; - }), - Preferences.get('disableStream').then(function resolved(value) { - if (PDFJS.disableStream === true) { - return; - } - PDFJS.disableStream = value; - }), - Preferences.get('disableAutoFetch').then(function resolved(value) { - PDFJS.disableAutoFetch = value; - }), - Preferences.get('disableFontFace').then(function resolved(value) { - if (PDFJS.disableFontFace === true) { - return; - } - PDFJS.disableFontFace = value; - }), - Preferences.get('useOnlyCssZoom').then(function resolved(value) { - PDFJS.useOnlyCssZoom = value; - }), - Preferences.get('externalLinkTarget').then(function resolved(value) { - if (PDFJS.isExternalLinkTargetSet()) { - return; - } - PDFJS.externalLinkTarget = value; - }), - Preferences.get('renderer').then(function resolved(value) { - self.viewerPrefs['renderer'] = value; - }), - Preferences.get('renderInteractiveForms').then(function resolved(value) { - self.viewerPrefs['renderInteractiveForms'] = value; - }), - Preferences.get('disablePageLabels').then(function resolved(value) { - self.viewerPrefs['disablePageLabels'] = value; - }), - Preferences.get('enablePrintAutoRotate').then(function resolved(value) { - self.viewerPrefs['enablePrintAutoRotate'] = value; - }) - ]).catch(function (reason) { - }); - }, - _initializeViewerComponents: function () { - var self = this; - var appConfig = this.appConfig; - return new Promise(function (resolve, reject) { - var eventBus = appConfig.eventBus || getGlobalEventBus(); - self.eventBus = eventBus; - var pdfRenderingQueue = new PDFRenderingQueue(); - pdfRenderingQueue.onIdle = self.cleanup.bind(self); - self.pdfRenderingQueue = pdfRenderingQueue; - var pdfLinkService = new PDFLinkService({ eventBus: eventBus }); - self.pdfLinkService = pdfLinkService; - var downloadManager = self.externalServices.createDownloadManager(); - self.downloadManager = downloadManager; - var container = appConfig.mainContainer; - var viewer = appConfig.viewerContainer; - self.pdfViewer = new PDFViewer({ - container: container, - viewer: viewer, - eventBus: eventBus, - renderingQueue: pdfRenderingQueue, - linkService: pdfLinkService, - downloadManager: downloadManager, - renderer: self.viewerPrefs['renderer'], - enhanceTextSelection: self.viewerPrefs['enhanceTextSelection'], - renderInteractiveForms: self.viewerPrefs['renderInteractiveForms'], - enablePrintAutoRotate: self.viewerPrefs['enablePrintAutoRotate'] - }); - pdfRenderingQueue.setViewer(self.pdfViewer); - pdfLinkService.setViewer(self.pdfViewer); - var thumbnailContainer = appConfig.sidebar.thumbnailView; - self.pdfThumbnailViewer = new PDFThumbnailViewer({ - container: thumbnailContainer, - renderingQueue: pdfRenderingQueue, - linkService: pdfLinkService - }); - pdfRenderingQueue.setThumbnailViewer(self.pdfThumbnailViewer); - self.pdfHistory = new PDFHistory({ - linkService: pdfLinkService, - eventBus: eventBus - }); - pdfLinkService.setHistory(self.pdfHistory); - self.findController = new PDFFindController({ pdfViewer: self.pdfViewer }); - self.findController.onUpdateResultsCount = function (matchCount) { - if (self.supportsIntegratedFind) { - return; - } - self.findBar.updateResultsCount(matchCount); - }; - self.findController.onUpdateState = function (state, previous, matchCount) { - if (self.supportsIntegratedFind) { - self.externalServices.updateFindControlState({ - result: state, - findPrevious: previous - }); - } else { - self.findBar.updateUIState(state, previous, matchCount); - } - }; - self.pdfViewer.setFindController(self.findController); - var findBarConfig = Object.create(appConfig.findBar); - findBarConfig.findController = self.findController; - findBarConfig.eventBus = eventBus; - self.findBar = new PDFFindBar(findBarConfig); - self.overlayManager = OverlayManager; - self.handTool = new HandTool({ - container: container, - eventBus: eventBus - }); - self.pdfDocumentProperties = new PDFDocumentProperties(appConfig.documentProperties); - self.toolbar = new Toolbar(appConfig.toolbar, container, eventBus); - self.secondaryToolbar = new SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus); - if (self.supportsFullscreen) { - self.pdfPresentationMode = new PDFPresentationMode({ - container: container, - viewer: viewer, - pdfViewer: self.pdfViewer, - eventBus: eventBus, - contextMenuItems: appConfig.fullscreen - }); - } - self.passwordPrompt = new PasswordPrompt(appConfig.passwordOverlay); - self.pdfOutlineViewer = new PDFOutlineViewer({ - container: appConfig.sidebar.outlineView, - eventBus: eventBus, - linkService: pdfLinkService - }); - self.pdfAttachmentViewer = new PDFAttachmentViewer({ - container: appConfig.sidebar.attachmentsView, - eventBus: eventBus, - downloadManager: downloadManager - }); - var sidebarConfig = Object.create(appConfig.sidebar); - sidebarConfig.pdfViewer = self.pdfViewer; - sidebarConfig.pdfThumbnailViewer = self.pdfThumbnailViewer; - sidebarConfig.pdfOutlineViewer = self.pdfOutlineViewer; - sidebarConfig.eventBus = eventBus; - self.pdfSidebar = new PDFSidebar(sidebarConfig); - self.pdfSidebar.onToggled = self.forceRendering.bind(self); - resolve(undefined); - }); - }, - run: function pdfViewRun(config) { - this.initialize(config).then(webViewerInitialized); - }, - zoomIn: function pdfViewZoomIn(ticks) { - var newScale = this.pdfViewer.currentScale; - do { - newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2); - newScale = Math.ceil(newScale * 10) / 10; - newScale = Math.min(MAX_SCALE, newScale); - } while (--ticks > 0 && newScale < MAX_SCALE); - this.pdfViewer.currentScaleValue = newScale; - }, - zoomOut: function pdfViewZoomOut(ticks) { - var newScale = this.pdfViewer.currentScale; - do { - newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2); - newScale = Math.floor(newScale * 10) / 10; - newScale = Math.max(MIN_SCALE, newScale); - } while (--ticks > 0 && newScale > MIN_SCALE); - this.pdfViewer.currentScaleValue = newScale; - }, - get pagesCount() { - return this.pdfDocument ? this.pdfDocument.numPages : 0; - }, - set page(val) { - this.pdfViewer.currentPageNumber = val; - }, - get page() { - return this.pdfViewer.currentPageNumber; - }, - get printing() { - return !!this.printService; - }, - get supportsPrinting() { - return PDFPrintServiceFactory.instance.supportsPrinting; - }, - get supportsFullscreen() { - var support; - support = document.fullscreenEnabled === true || document.mozFullScreenEnabled === true; - if (support && pdfjsLib.PDFJS.disableFullscreen === true) { - support = false; - } - return pdfjsLib.shadow(this, 'supportsFullscreen', support); - }, - get supportsIntegratedFind() { - return this.externalServices.supportsIntegratedFind; - }, - get supportsDocumentFonts() { - return this.externalServices.supportsDocumentFonts; - }, - get supportsDocumentColors() { - return this.externalServices.supportsDocumentColors; - }, - get loadingBar() { - var bar = new ProgressBar('#loadingBar', {}); - return pdfjsLib.shadow(this, 'loadingBar', bar); - }, - get supportedMouseWheelZoomModifierKeys() { - return this.externalServices.supportedMouseWheelZoomModifierKeys; - }, - initPassiveLoading: function pdfViewInitPassiveLoading() { - this.externalServices.initPassiveLoading({ - onOpenWithTransport: function (url, length, transport) { - PDFViewerApplication.open(url, { range: transport }); - if (length) { - PDFViewerApplication.pdfDocumentProperties.setFileSize(length); - } - }, - onOpenWithData: function (data) { - PDFViewerApplication.open(data); - }, - onOpenWithURL: function (url, length, originalURL) { - var file = url, args = null; - if (length !== undefined) { - args = { length: length }; - } - if (originalURL !== undefined) { - file = { - file: url, - originalURL: originalURL - }; - } - PDFViewerApplication.open(file, args); - }, - onError: function (e) { - PDFViewerApplication.error(mozL10n.get('loading_error', null, 'An error occurred while loading the PDF.'), e); - }, - onProgress: function (loaded, total) { - PDFViewerApplication.progress(loaded / total); - } - }); - }, - setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) { - this.url = url; - this.baseUrl = url.split('#')[0]; - var title = getPDFFileNameFromURL(url, ''); - if (!title) { - try { - title = decodeURIComponent(pdfjsLib.getFilenameFromUrl(url)) || url; - } catch (e) { - title = url; - } - } - this.setTitle(title); - }, - setTitle: function pdfViewSetTitle(title) { - if (this.isViewerEmbedded) { - return; - } - document.title = title; - }, - close: function pdfViewClose() { - var errorWrapper = this.appConfig.errorWrapper.container; - errorWrapper.setAttribute('hidden', 'true'); - if (!this.pdfLoadingTask) { - return Promise.resolve(); - } - var promise = this.pdfLoadingTask.destroy(); - this.pdfLoadingTask = null; - if (this.pdfDocument) { - this.pdfDocument = null; - this.pdfThumbnailViewer.setDocument(null); - this.pdfViewer.setDocument(null); - this.pdfLinkService.setDocument(null, null); - } - this.store = null; - this.isInitialViewSet = false; - this.pdfSidebar.reset(); - this.pdfOutlineViewer.reset(); - this.pdfAttachmentViewer.reset(); - this.findController.reset(); - this.findBar.reset(); - this.toolbar.reset(); - this.secondaryToolbar.reset(); - if (typeof PDFBug !== 'undefined') { - PDFBug.cleanup(); - } - return promise; - }, - open: function pdfViewOpen(file, args) { - if (this.pdfLoadingTask) { - return this.close().then(function () { - Preferences.reload(); - return this.open(file, args); - }.bind(this)); - } - var parameters = Object.create(null), scale; - if (typeof file === 'string') { - this.setTitleUsingUrl(file); - parameters.url = file; - } else if (file && 'byteLength' in file) { - parameters.data = file; - } else if (file.url && file.originalUrl) { - this.setTitleUsingUrl(file.originalUrl); - parameters.url = file.url; - } - parameters.docBaseUrl = this.baseUrl; - if (args) { - for (var prop in args) { - parameters[prop] = args[prop]; - } - if (args.scale) { - scale = args.scale; - } - if (args.length) { - this.pdfDocumentProperties.setFileSize(args.length); - } - } - var self = this; - self.downloadComplete = false; - var loadingTask = pdfjsLib.getDocument(parameters); - this.pdfLoadingTask = loadingTask; - loadingTask.onPassword = function passwordNeeded(updateCallback, reason) { - self.passwordPrompt.setUpdateCallback(updateCallback, reason); - self.passwordPrompt.open(); - }; - loadingTask.onProgress = function getDocumentProgress(progressData) { - self.progress(progressData.loaded / progressData.total); - }; - loadingTask.onUnsupportedFeature = this.fallback.bind(this); - return loadingTask.promise.then(function getDocumentCallback(pdfDocument) { - self.load(pdfDocument, scale); - }, function getDocumentError(exception) { - var message = exception && exception.message; - var loadingErrorMessage = mozL10n.get('loading_error', null, 'An error occurred while loading the PDF.'); - if (exception instanceof pdfjsLib.InvalidPDFException) { - loadingErrorMessage = mozL10n.get('invalid_file_error', null, 'Invalid or corrupted PDF file.'); - } else if (exception instanceof pdfjsLib.MissingPDFException) { - loadingErrorMessage = mozL10n.get('missing_file_error', null, 'Missing PDF file.'); - } else if (exception instanceof pdfjsLib.UnexpectedResponseException) { - loadingErrorMessage = mozL10n.get('unexpected_response_error', null, 'Unexpected server response.'); - } - var moreInfo = { message: message }; - self.error(loadingErrorMessage, moreInfo); - throw new Error(loadingErrorMessage); - }); - }, - download: function pdfViewDownload() { - function downloadByUrl() { - downloadManager.downloadUrl(url, filename); - } - var url = this.baseUrl; - var filename = getPDFFileNameFromURL(this.url); - var downloadManager = this.downloadManager; - downloadManager.onerror = function (err) { - PDFViewerApplication.error('PDF failed to download.'); - }; - if (!this.pdfDocument) { - downloadByUrl(); - return; - } - if (!this.downloadComplete) { - downloadByUrl(); - return; - } - this.pdfDocument.getData().then(function getDataSuccess(data) { - var blob = pdfjsLib.createBlob(data, 'application/pdf'); - downloadManager.download(blob, url, filename); - }, downloadByUrl).then(null, downloadByUrl); - }, - fallback: function pdfViewFallback(featureId) { - if (this.fellback) { - return; - } - this.fellback = true; - this.externalServices.fallback({ - featureId: featureId, - url: this.baseUrl - }, function response(download) { - if (!download) { - return; - } - PDFViewerApplication.download(); - }); - }, - error: function pdfViewError(message, moreInfo) { - var moreInfoText = mozL10n.get('error_version_info', { - version: pdfjsLib.version || '?', - build: pdfjsLib.build || '?' - }, 'PDF.js v{{version}} (build: {{build}})') + '\n'; - if (moreInfo) { - moreInfoText += mozL10n.get('error_message', { message: moreInfo.message }, 'Message: {{message}}'); - if (moreInfo.stack) { - moreInfoText += '\n' + mozL10n.get('error_stack', { stack: moreInfo.stack }, 'Stack: {{stack}}'); - } else { - if (moreInfo.filename) { - moreInfoText += '\n' + mozL10n.get('error_file', { file: moreInfo.filename }, 'File: {{file}}'); - } - if (moreInfo.lineNumber) { - moreInfoText += '\n' + mozL10n.get('error_line', { line: moreInfo.lineNumber }, 'Line: {{line}}'); - } - } - } - console.error(message + '\n' + moreInfoText); - this.fallback(); - }, - progress: function pdfViewProgress(level) { - var percent = Math.round(level * 100); - if (percent > this.loadingBar.percent || isNaN(percent)) { - this.loadingBar.percent = percent; - if (pdfjsLib.PDFJS.disableAutoFetch && percent) { - if (this.disableAutoFetchLoadingBarTimeout) { - clearTimeout(this.disableAutoFetchLoadingBarTimeout); - this.disableAutoFetchLoadingBarTimeout = null; - } - this.loadingBar.show(); - this.disableAutoFetchLoadingBarTimeout = setTimeout(function () { - this.loadingBar.hide(); - this.disableAutoFetchLoadingBarTimeout = null; - }.bind(this), DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT); - } - } - }, - load: function pdfViewLoad(pdfDocument, scale) { - var self = this; - scale = scale || UNKNOWN_SCALE; - this.pdfDocument = pdfDocument; - this.pdfDocumentProperties.setDocumentAndUrl(pdfDocument, this.url); - var downloadedPromise = pdfDocument.getDownloadInfo().then(function () { - self.downloadComplete = true; - self.loadingBar.hide(); - }); - this.toolbar.setPagesCount(pdfDocument.numPages, false); - this.secondaryToolbar.setPagesCount(pdfDocument.numPages); - var id = this.documentFingerprint = pdfDocument.fingerprint; - var store = this.store = new ViewHistory(id); - var baseDocumentUrl; - baseDocumentUrl = this.baseUrl; - this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl); - var pdfViewer = this.pdfViewer; - pdfViewer.currentScale = scale; - pdfViewer.setDocument(pdfDocument); - var firstPagePromise = pdfViewer.firstPagePromise; - var pagesPromise = pdfViewer.pagesPromise; - var onePageRendered = pdfViewer.onePageRendered; - this.pageRotation = 0; - var pdfThumbnailViewer = this.pdfThumbnailViewer; - pdfThumbnailViewer.setDocument(pdfDocument); - firstPagePromise.then(function (pdfPage) { - downloadedPromise.then(function () { - self.eventBus.dispatch('documentload', { source: self }); - }); - self.loadingBar.setWidth(self.appConfig.viewerContainer); - if (!pdfjsLib.PDFJS.disableHistory && !self.isViewerEmbedded) { - if (!self.viewerPrefs['showPreviousViewOnLoad']) { - self.pdfHistory.clearHistoryState(); - } - self.pdfHistory.initialize(self.documentFingerprint); - if (self.pdfHistory.initialDestination) { - self.initialDestination = self.pdfHistory.initialDestination; - } else if (self.pdfHistory.initialBookmark) { - self.initialBookmark = self.pdfHistory.initialBookmark; - } - } - var initialParams = { - destination: self.initialDestination, - bookmark: self.initialBookmark, - hash: null - }; - store.initializedPromise.then(function resolved() { - var storedHash = null, sidebarView = null; - if (self.viewerPrefs['showPreviousViewOnLoad'] && store.get('exists', false)) { - var pageNum = store.get('page', '1'); - var zoom = self.viewerPrefs['defaultZoomValue'] || store.get('zoom', DEFAULT_SCALE_VALUE); - var left = store.get('scrollLeft', '0'); - var top = store.get('scrollTop', '0'); - storedHash = 'page=' + pageNum + '&zoom=' + zoom + ',' + left + ',' + top; - sidebarView = store.get('sidebarView', SidebarView.NONE); - } else if (self.viewerPrefs['defaultZoomValue']) { - storedHash = 'page=1&zoom=' + self.viewerPrefs['defaultZoomValue']; - } - self.setInitialView(storedHash, { - scale: scale, - sidebarView: sidebarView - }); - initialParams.hash = storedHash; - if (!self.isViewerEmbedded) { - self.pdfViewer.focus(); - } - }, function rejected(reason) { - console.error(reason); - self.setInitialView(null, { scale: scale }); - }); - pagesPromise.then(function resolved() { - if (!initialParams.destination && !initialParams.bookmark && !initialParams.hash) { - return; - } - if (self.hasEqualPageSizes) { - return; - } - self.initialDestination = initialParams.destination; - self.initialBookmark = initialParams.bookmark; - self.pdfViewer.currentScaleValue = self.pdfViewer.currentScaleValue; - self.setInitialView(initialParams.hash); - }); - }); - pdfDocument.getPageLabels().then(function (labels) { - if (!labels || self.viewerPrefs['disablePageLabels']) { - return; - } - var i = 0, numLabels = labels.length; - if (numLabels !== self.pagesCount) { - console.error('The number of Page Labels does not match ' + 'the number of pages in the document.'); - return; - } - while (i < numLabels && labels[i] === (i + 1).toString()) { - i++; - } - if (i === numLabels) { - return; - } - pdfViewer.setPageLabels(labels); - pdfThumbnailViewer.setPageLabels(labels); - self.toolbar.setPagesCount(pdfDocument.numPages, true); - self.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); - }); - pagesPromise.then(function () { - if (self.supportsPrinting) { - pdfDocument.getJavaScript().then(function (javaScript) { - if (javaScript.length) { - console.warn('Warning: JavaScript is not supported'); - self.fallback(pdfjsLib.UNSUPPORTED_FEATURES.javaScript); - } - var regex = /\bprint\s*\(/; - for (var i = 0, ii = javaScript.length; i < ii; i++) { - var js = javaScript[i]; - if (js && regex.test(js)) { - setTimeout(function () { - window.print(); - }); - return; - } - } - }); - } - }); - Promise.all([ - onePageRendered, - animationStarted - ]).then(function () { - pdfDocument.getOutline().then(function (outline) { - self.pdfOutlineViewer.render({ outline: outline }); - }); - pdfDocument.getAttachments().then(function (attachments) { - self.pdfAttachmentViewer.render({ attachments: attachments }); - }); - }); - pdfDocument.getMetadata().then(function (data) { - var info = data.info, metadata = data.metadata; - self.documentInfo = info; - self.metadata = metadata; - console.log('PDF ' + pdfDocument.fingerprint + ' [' + info.PDFFormatVersion + ' ' + (info.Producer || '-').trim() + ' / ' + (info.Creator || '-').trim() + ']' + ' (PDF.js: ' + (pdfjsLib.version || '-') + (!pdfjsLib.PDFJS.disableWebGL ? ' [WebGL]' : '') + ')'); - var pdfTitle; - if (metadata && metadata.has('dc:title')) { - var title = metadata.get('dc:title'); - if (title !== 'Untitled') { - pdfTitle = title; - } - } - if (!pdfTitle && info && info['Title']) { - pdfTitle = info['Title']; - } - if (pdfTitle) { - self.setTitle(pdfTitle + ' - ' + document.title); - } - if (info.IsAcroFormPresent) { - console.warn('Warning: AcroForm/XFA is not supported'); - self.fallback(pdfjsLib.UNSUPPORTED_FEATURES.forms); - } - var versionId = String(info.PDFFormatVersion).slice(-1) | 0; - var generatorId = 0; - var KNOWN_GENERATORS = [ - 'acrobat distiller', - 'acrobat pdfwriter', - 'adobe livecycle', - 'adobe pdf library', - 'adobe photoshop', - 'ghostscript', - 'tcpdf', - 'cairo', - 'dvipdfm', - 'dvips', - 'pdftex', - 'pdfkit', - 'itext', - 'prince', - 'quarkxpress', - 'mac os x', - 'microsoft', - 'openoffice', - 'oracle', - 'luradocument', - 'pdf-xchange', - 'antenna house', - 'aspose.cells', - 'fpdf' - ]; - if (info.Producer) { - KNOWN_GENERATORS.some(function (generator, s, i) { - if (generator.indexOf(s) < 0) { - return false; - } - generatorId = i + 1; - return true; - }.bind(null, info.Producer.toLowerCase())); - } - }); - }, - setInitialView: function pdfViewSetInitialView(storedHash, options) { - var scale = options && options.scale; - var sidebarView = options && options.sidebarView; - this.isInitialViewSet = true; - this.pdfSidebar.setInitialView(this.viewerPrefs['sidebarViewOnLoad'] || sidebarView | 0); - if (this.initialDestination) { - this.pdfLinkService.navigateTo(this.initialDestination); - this.initialDestination = null; - } else if (this.initialBookmark) { - this.pdfLinkService.setHash(this.initialBookmark); - this.pdfHistory.push({ hash: this.initialBookmark }, true); - this.initialBookmark = null; - } else if (storedHash) { - this.pdfLinkService.setHash(storedHash); - } else if (scale) { - this.pdfViewer.currentScaleValue = scale; - this.page = 1; - } - this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber, this.pdfViewer.currentPageLabel); - this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber); - if (!this.pdfViewer.currentScaleValue) { - this.pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE; - } - }, - cleanup: function pdfViewCleanup() { - if (!this.pdfDocument) { - return; - } - this.pdfViewer.cleanup(); - this.pdfThumbnailViewer.cleanup(); - if (this.pdfViewer.renderer !== RendererType.SVG) { - this.pdfDocument.cleanup(); - } - }, - forceRendering: function pdfViewForceRendering() { - this.pdfRenderingQueue.printing = this.printing; - this.pdfRenderingQueue.isThumbnailViewEnabled = this.pdfSidebar.isThumbnailViewVisible; - this.pdfRenderingQueue.renderHighestPriority(); - }, - beforePrint: function pdfViewSetupBeforePrint() { - if (this.printService) { - return; - } - if (!this.supportsPrinting) { - var printMessage = mozL10n.get('printing_not_supported', null, 'Warning: Printing is not fully supported by this browser.'); - this.error(printMessage); - return; - } - if (!this.pdfViewer.pageViewsReady) { - var notReadyMessage = mozL10n.get('printing_not_ready', null, 'Warning: The PDF is not fully loaded for printing.'); - window.alert(notReadyMessage); - return; - } - var pagesOverview = this.pdfViewer.getPagesOverview(); - var printContainer = this.appConfig.printContainer; - var printService = PDFPrintServiceFactory.instance.createPrintService(this.pdfDocument, pagesOverview, printContainer); - this.printService = printService; - this.forceRendering(); - printService.layout(); - }, - get hasEqualPageSizes() { - var firstPage = this.pdfViewer.getPageView(0); - for (var i = 1, ii = this.pagesCount; i < ii; ++i) { - var pageView = this.pdfViewer.getPageView(i); - if (pageView.width !== firstPage.width || pageView.height !== firstPage.height) { - return false; - } - } - return true; - }, - afterPrint: function pdfViewSetupAfterPrint() { - if (this.printService) { - this.printService.destroy(); - this.printService = null; - } - this.forceRendering(); - }, - rotatePages: function pdfViewRotatePages(delta) { - var pageNumber = this.page; - this.pageRotation = (this.pageRotation + 360 + delta) % 360; - this.pdfViewer.pagesRotation = this.pageRotation; - this.pdfThumbnailViewer.pagesRotation = this.pageRotation; - this.forceRendering(); - this.pdfViewer.currentPageNumber = pageNumber; - }, - requestPresentationMode: function pdfViewRequestPresentationMode() { - if (!this.pdfPresentationMode) { - return; - } - this.pdfPresentationMode.request(); - }, - bindEvents: function pdfViewBindEvents() { - var eventBus = this.eventBus; - eventBus.on('resize', webViewerResize); - eventBus.on('hashchange', webViewerHashchange); - eventBus.on('beforeprint', this.beforePrint.bind(this)); - eventBus.on('afterprint', this.afterPrint.bind(this)); - eventBus.on('pagerendered', webViewerPageRendered); - eventBus.on('textlayerrendered', webViewerTextLayerRendered); - eventBus.on('updateviewarea', webViewerUpdateViewarea); - eventBus.on('pagechanging', webViewerPageChanging); - eventBus.on('scalechanging', webViewerScaleChanging); - eventBus.on('sidebarviewchanged', webViewerSidebarViewChanged); - eventBus.on('pagemode', webViewerPageMode); - eventBus.on('namedaction', webViewerNamedAction); - eventBus.on('presentationmodechanged', webViewerPresentationModeChanged); - eventBus.on('presentationmode', webViewerPresentationMode); - eventBus.on('openfile', webViewerOpenFile); - eventBus.on('print', webViewerPrint); - eventBus.on('download', webViewerDownload); - eventBus.on('firstpage', webViewerFirstPage); - eventBus.on('lastpage', webViewerLastPage); - eventBus.on('nextpage', webViewerNextPage); - eventBus.on('previouspage', webViewerPreviousPage); - eventBus.on('zoomin', webViewerZoomIn); - eventBus.on('zoomout', webViewerZoomOut); - eventBus.on('pagenumberchanged', webViewerPageNumberChanged); - eventBus.on('scalechanged', webViewerScaleChanged); - eventBus.on('rotatecw', webViewerRotateCw); - eventBus.on('rotateccw', webViewerRotateCcw); - eventBus.on('documentproperties', webViewerDocumentProperties); - eventBus.on('find', webViewerFind); - eventBus.on('findfromurlhash', webViewerFindFromUrlHash); - }, - bindWindowEvents: function pdfViewBindWindowEvents() { - var eventBus = this.eventBus; - window.addEventListener('wheel', webViewerWheel); - window.addEventListener('click', webViewerClick); - window.addEventListener('keydown', webViewerKeyDown); - window.addEventListener('resize', function windowResize() { - eventBus.dispatch('resize'); - }); - window.addEventListener('hashchange', function windowHashChange() { - eventBus.dispatch('hashchange', { hash: document.location.hash.substring(1) }); - }); - window.addEventListener('beforeprint', function windowBeforePrint() { - eventBus.dispatch('beforeprint'); - }); - window.addEventListener('afterprint', function windowAfterPrint() { - eventBus.dispatch('afterprint'); - }); - } -}; -var validateFileURL; -function loadAndEnablePDFBug(enabledTabs) { - return new Promise(function (resolve, reject) { - var appConfig = PDFViewerApplication.appConfig; - var script = document.createElement('script'); - script.src = appConfig.debuggerScriptPath; - script.onload = function () { - PDFBug.enable(enabledTabs); - PDFBug.init(pdfjsLib, appConfig.mainContainer); - resolve(); - }; - script.onerror = function () { - reject(new Error('Cannot load debugger at ' + script.src)); - }; - (document.getElementsByTagName('head')[0] || document.body).appendChild(script); - }); -} -function webViewerInitialized() { - var appConfig = PDFViewerApplication.appConfig; - var file; - file = window.location.href.split('#')[0]; - var waitForBeforeOpening = []; - appConfig.toolbar.openFile.setAttribute('hidden', 'true'); - appConfig.secondaryToolbar.openFileButton.setAttribute('hidden', 'true'); - var PDFJS = pdfjsLib.PDFJS; - if (PDFViewerApplication.viewerPrefs['pdfBugEnabled']) { - var hash = document.location.hash.substring(1); - var hashParams = parseQueryString(hash); - if ('disableworker' in hashParams) { - PDFJS.disableWorker = hashParams['disableworker'] === 'true'; - } - if ('disablerange' in hashParams) { - PDFJS.disableRange = hashParams['disablerange'] === 'true'; - } - if ('disablestream' in hashParams) { - PDFJS.disableStream = hashParams['disablestream'] === 'true'; - } - if ('disableautofetch' in hashParams) { - PDFJS.disableAutoFetch = hashParams['disableautofetch'] === 'true'; - } - if ('disablefontface' in hashParams) { - PDFJS.disableFontFace = hashParams['disablefontface'] === 'true'; - } - if ('disablehistory' in hashParams) { - PDFJS.disableHistory = hashParams['disablehistory'] === 'true'; - } - if ('webgl' in hashParams) { - PDFJS.disableWebGL = hashParams['webgl'] !== 'true'; - } - if ('useonlycsszoom' in hashParams) { - PDFJS.useOnlyCssZoom = hashParams['useonlycsszoom'] === 'true'; - } - if ('verbosity' in hashParams) { - PDFJS.verbosity = hashParams['verbosity'] | 0; - } - if ('ignorecurrentpositiononzoom' in hashParams) { - PDFJS.ignoreCurrentPositionOnZoom = hashParams['ignorecurrentpositiononzoom'] === 'true'; - } - if ('textlayer' in hashParams) { - switch (hashParams['textlayer']) { - case 'off': - PDFJS.disableTextLayer = true; - break; - case 'visible': - case 'shadow': - case 'hover': - var viewer = appConfig.viewerContainer; - viewer.classList.add('textLayer-' + hashParams['textlayer']); - break; - } - } - if ('pdfbug' in hashParams) { - PDFJS.pdfBug = true; - var pdfBug = hashParams['pdfbug']; - var enabled = pdfBug.split(','); - waitForBeforeOpening.push(loadAndEnablePDFBug(enabled)); - } - } - if (!PDFViewerApplication.supportsDocumentFonts) { - PDFJS.disableFontFace = true; - console.warn(mozL10n.get('web_fonts_disabled', null, 'Web fonts are disabled: unable to use embedded PDF fonts.')); - } - if (!PDFViewerApplication.supportsPrinting) { - appConfig.toolbar.print.classList.add('hidden'); - appConfig.secondaryToolbar.printButton.classList.add('hidden'); - } - if (!PDFViewerApplication.supportsFullscreen) { - appConfig.toolbar.presentationModeButton.classList.add('hidden'); - appConfig.secondaryToolbar.presentationModeButton.classList.add('hidden'); - } - if (PDFViewerApplication.supportsIntegratedFind) { - appConfig.toolbar.viewFind.classList.add('hidden'); - } - appConfig.sidebar.mainContainer.addEventListener('transitionend', function (e) { - if (e.target === this) { - PDFViewerApplication.eventBus.dispatch('resize'); - } - }, true); - appConfig.sidebar.toggleButton.addEventListener('click', function () { - PDFViewerApplication.pdfSidebar.toggle(); - }); - Promise.all(waitForBeforeOpening).then(function () { - webViewerOpenFileViaURL(file); - }).catch(function (reason) { - PDFViewerApplication.error(mozL10n.get('loading_error', null, 'An error occurred while opening.'), reason); - }); -} -var webViewerOpenFileViaURL; -webViewerOpenFileViaURL = function webViewerOpenFileViaURL(file) { - PDFViewerApplication.setTitleUsingUrl(file); - PDFViewerApplication.initPassiveLoading(); -}; -function webViewerPageRendered(e) { - var pageNumber = e.pageNumber; - var pageIndex = pageNumber - 1; - var pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex); - if (pageNumber === PDFViewerApplication.page) { - PDFViewerApplication.toolbar.updateLoadingIndicatorState(false); - } - if (!pageView) { - return; - } - if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { - var thumbnailView = PDFViewerApplication.pdfThumbnailViewer.getThumbnail(pageIndex); - thumbnailView.setImage(pageView); - } - if (pdfjsLib.PDFJS.pdfBug && Stats.enabled && pageView.stats) { - Stats.add(pageNumber, pageView.stats); - } - if (pageView.error) { - PDFViewerApplication.error(mozL10n.get('rendering_error', null, 'An error occurred while rendering the page.'), pageView.error); - } -} -function webViewerTextLayerRendered(e) { - if (e.numTextDivs > 0 && !PDFViewerApplication.supportsDocumentColors) { - console.error(mozL10n.get('document_colors_not_allowed', null, 'PDF documents are not allowed to use their own colors: ' + '\'Allow pages to choose their own colors\' ' + 'is deactivated in the browser.')); - PDFViewerApplication.fallback(); - } -} -function webViewerPageMode(e) { - var mode = e.mode, view; - switch (mode) { - case 'thumbs': - view = SidebarView.THUMBS; - break; - case 'bookmarks': - case 'outline': - view = SidebarView.OUTLINE; - break; - case 'attachments': - view = SidebarView.ATTACHMENTS; - break; - case 'none': - view = SidebarView.NONE; - break; - default: - console.error('Invalid "pagemode" hash parameter: ' + mode); - return; - } - PDFViewerApplication.pdfSidebar.switchView(view, true); -} -function webViewerNamedAction(e) { - var action = e.action; - switch (action) { - case 'GoToPage': - PDFViewerApplication.appConfig.toolbar.pageNumber.select(); - break; - case 'Find': - if (!PDFViewerApplication.supportsIntegratedFind) { - PDFViewerApplication.findBar.toggle(); - } - break; - } -} -function webViewerPresentationModeChanged(e) { - var active = e.active; - var switchInProgress = e.switchInProgress; - PDFViewerApplication.pdfViewer.presentationModeState = switchInProgress ? PresentationModeState.CHANGING : active ? PresentationModeState.FULLSCREEN : PresentationModeState.NORMAL; -} -function webViewerSidebarViewChanged(e) { - PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible; - var store = PDFViewerApplication.store; - if (!store || !PDFViewerApplication.isInitialViewSet) { - return; - } - store.initializedPromise.then(function () { - store.set('sidebarView', e.view).catch(function () { - }); - }); -} -function webViewerUpdateViewarea(e) { - var location = e.location, store = PDFViewerApplication.store; - if (store) { - store.initializedPromise.then(function () { - store.setMultiple({ - 'exists': true, - 'page': location.pageNumber, - 'zoom': location.scale, - 'scrollLeft': location.left, - 'scrollTop': location.top - }).catch(function () { - }); - }); - } - var href = PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams); - PDFViewerApplication.appConfig.toolbar.viewBookmark.href = href; - PDFViewerApplication.appConfig.secondaryToolbar.viewBookmarkButton.href = href; - PDFViewerApplication.pdfHistory.updateCurrentBookmark(location.pdfOpenParams, location.pageNumber); - var currentPage = PDFViewerApplication.pdfViewer.getPageView(PDFViewerApplication.page - 1); - var loading = currentPage.renderingState !== RenderingStates.FINISHED; - PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading); -} -function webViewerResize() { - var currentScaleValue = PDFViewerApplication.pdfViewer.currentScaleValue; - if (currentScaleValue === 'auto' || currentScaleValue === 'page-fit' || currentScaleValue === 'page-width') { - PDFViewerApplication.pdfViewer.currentScaleValue = currentScaleValue; - } else if (!currentScaleValue) { - PDFViewerApplication.pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE; - } - PDFViewerApplication.pdfViewer.update(); -} -function webViewerHashchange(e) { - if (PDFViewerApplication.pdfHistory.isHashChangeUnlocked) { - var hash = e.hash; - if (!hash) { - return; - } - if (!PDFViewerApplication.isInitialViewSet) { - PDFViewerApplication.initialBookmark = hash; - } else { - PDFViewerApplication.pdfLinkService.setHash(hash); - } - } -} -var webViewerFileInputChange; -function webViewerPresentationMode() { - PDFViewerApplication.requestPresentationMode(); -} -function webViewerOpenFile() { - var openFileInputName = PDFViewerApplication.appConfig.openFileInputName; - document.getElementById(openFileInputName).click(); -} -function webViewerPrint() { - window.print(); -} -function webViewerDownload() { - PDFViewerApplication.download(); -} -function webViewerFirstPage() { - if (PDFViewerApplication.pdfDocument) { - PDFViewerApplication.page = 1; - } -} -function webViewerLastPage() { - if (PDFViewerApplication.pdfDocument) { - PDFViewerApplication.page = PDFViewerApplication.pagesCount; - } -} -function webViewerNextPage() { - PDFViewerApplication.page++; -} -function webViewerPreviousPage() { - PDFViewerApplication.page--; -} -function webViewerZoomIn() { - PDFViewerApplication.zoomIn(); -} -function webViewerZoomOut() { - PDFViewerApplication.zoomOut(); -} -function webViewerPageNumberChanged(e) { - var pdfViewer = PDFViewerApplication.pdfViewer; - pdfViewer.currentPageLabel = e.value; - if (e.value !== pdfViewer.currentPageNumber.toString() && e.value !== pdfViewer.currentPageLabel) { - PDFViewerApplication.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); - } -} -function webViewerScaleChanged(e) { - PDFViewerApplication.pdfViewer.currentScaleValue = e.value; -} -function webViewerRotateCw() { - PDFViewerApplication.rotatePages(90); -} -function webViewerRotateCcw() { - PDFViewerApplication.rotatePages(-90); -} -function webViewerDocumentProperties() { - PDFViewerApplication.pdfDocumentProperties.open(); -} -function webViewerFind(e) { - PDFViewerApplication.findController.executeCommand('find' + e.type, { - query: e.query, - phraseSearch: e.phraseSearch, - caseSensitive: e.caseSensitive, - highlightAll: e.highlightAll, - findPrevious: e.findPrevious - }); -} -function webViewerFindFromUrlHash(e) { - PDFViewerApplication.findController.executeCommand('find', { - query: e.query, - phraseSearch: e.phraseSearch, - caseSensitive: false, - highlightAll: true, - findPrevious: false - }); -} -function webViewerScaleChanging(e) { - PDFViewerApplication.toolbar.setPageScale(e.presetValue, e.scale); - PDFViewerApplication.pdfViewer.update(); -} -function webViewerPageChanging(e) { - var page = e.pageNumber; - PDFViewerApplication.toolbar.setPageNumber(page, e.pageLabel || null); - PDFViewerApplication.secondaryToolbar.setPageNumber(page); - if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { - PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page); - } - if (pdfjsLib.PDFJS.pdfBug && Stats.enabled) { - var pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1); - if (pageView.stats) { - Stats.add(page, pageView.stats); - } - } -} -var zoomDisabled = false, zoomDisabledTimeout; -function webViewerWheel(evt) { - var pdfViewer = PDFViewerApplication.pdfViewer; - if (pdfViewer.isInPresentationMode) { - return; - } - if (evt.ctrlKey || evt.metaKey) { - var support = PDFViewerApplication.supportedMouseWheelZoomModifierKeys; - if (evt.ctrlKey && !support.ctrlKey || evt.metaKey && !support.metaKey) { - return; - } - evt.preventDefault(); - if (zoomDisabled) { - return; - } - var previousScale = pdfViewer.currentScale; - var delta = normalizeWheelEventDelta(evt); - var MOUSE_WHEEL_DELTA_PER_PAGE_SCALE = 3.0; - var ticks = delta * MOUSE_WHEEL_DELTA_PER_PAGE_SCALE; - if (ticks < 0) { - PDFViewerApplication.zoomOut(-ticks); - } else { - PDFViewerApplication.zoomIn(ticks); - } - var currentScale = pdfViewer.currentScale; - if (previousScale !== currentScale) { - var scaleCorrectionFactor = currentScale / previousScale - 1; - var rect = pdfViewer.container.getBoundingClientRect(); - var dx = evt.clientX - rect.left; - var dy = evt.clientY - rect.top; - pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor; - pdfViewer.container.scrollTop += dy * scaleCorrectionFactor; - } - } else { - zoomDisabled = true; - clearTimeout(zoomDisabledTimeout); - zoomDisabledTimeout = setTimeout(function () { - zoomDisabled = false; - }, 1000); - } -} -function webViewerClick(evt) { - if (!PDFViewerApplication.secondaryToolbar.isOpen) { - return; - } - var appConfig = PDFViewerApplication.appConfig; - if (PDFViewerApplication.pdfViewer.containsElement(evt.target) || appConfig.toolbar.container.contains(evt.target) && evt.target !== appConfig.secondaryToolbar.toggleButton) { - PDFViewerApplication.secondaryToolbar.close(); - } -} -function webViewerKeyDown(evt) { - if (OverlayManager.active) { - return; - } - var handled = false, ensureViewerFocused = false; - var cmd = (evt.ctrlKey ? 1 : 0) | (evt.altKey ? 2 : 0) | (evt.shiftKey ? 4 : 0) | (evt.metaKey ? 8 : 0); - var pdfViewer = PDFViewerApplication.pdfViewer; - var isViewerInPresentationMode = pdfViewer && pdfViewer.isInPresentationMode; - if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) { - switch (evt.keyCode) { - case 70: - if (!PDFViewerApplication.supportsIntegratedFind) { - PDFViewerApplication.findBar.open(); - handled = true; - } - break; - case 71: - if (!PDFViewerApplication.supportsIntegratedFind) { - var findState = PDFViewerApplication.findController.state; - if (findState) { - PDFViewerApplication.findController.executeCommand('findagain', { - query: findState.query, - phraseSearch: findState.phraseSearch, - caseSensitive: findState.caseSensitive, - highlightAll: findState.highlightAll, - findPrevious: cmd === 5 || cmd === 12 - }); - } - handled = true; - } - break; - case 61: - case 107: - case 187: - case 171: - if (!isViewerInPresentationMode) { - PDFViewerApplication.zoomIn(); - } - handled = true; - break; - case 173: - case 109: - case 189: - if (!isViewerInPresentationMode) { - PDFViewerApplication.zoomOut(); - } - handled = true; - break; - case 48: - case 96: - if (!isViewerInPresentationMode) { - setTimeout(function () { - pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE; - }); - handled = false; - } - break; - case 38: - if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { - PDFViewerApplication.page = 1; - handled = true; - ensureViewerFocused = true; - } - break; - case 40: - if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { - PDFViewerApplication.page = PDFViewerApplication.pagesCount; - handled = true; - ensureViewerFocused = true; - } - break; - } - } - if (cmd === 3 || cmd === 10) { - switch (evt.keyCode) { - case 80: - PDFViewerApplication.requestPresentationMode(); - handled = true; - break; - case 71: - PDFViewerApplication.appConfig.toolbar.pageNumber.select(); - handled = true; - break; - } - } - if (handled) { - if (ensureViewerFocused && !isViewerInPresentationMode) { - pdfViewer.focus(); - } - evt.preventDefault(); - return; - } - var curElement = document.activeElement || document.querySelector(':focus'); - var curElementTagName = curElement && curElement.tagName.toUpperCase(); - if (curElementTagName === 'INPUT' || curElementTagName === 'TEXTAREA' || curElementTagName === 'SELECT') { - if (evt.keyCode !== 27) { - return; - } - } - if (cmd === 0) { - switch (evt.keyCode) { - case 38: - case 33: - case 8: - if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') { - break; - } - case 37: - if (pdfViewer.isHorizontalScrollbarEnabled) { - break; - } - case 75: - case 80: - if (PDFViewerApplication.page > 1) { - PDFViewerApplication.page--; - } - handled = true; - break; - case 27: - if (PDFViewerApplication.secondaryToolbar.isOpen) { - PDFViewerApplication.secondaryToolbar.close(); - handled = true; - } - if (!PDFViewerApplication.supportsIntegratedFind && PDFViewerApplication.findBar.opened) { - PDFViewerApplication.findBar.close(); - handled = true; - } - break; - case 40: - case 34: - case 32: - if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') { - break; - } - case 39: - if (pdfViewer.isHorizontalScrollbarEnabled) { - break; - } - case 74: - case 78: - if (PDFViewerApplication.page < PDFViewerApplication.pagesCount) { - PDFViewerApplication.page++; - } - handled = true; - break; - case 36: - if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { - PDFViewerApplication.page = 1; - handled = true; - ensureViewerFocused = true; - } - break; - case 35: - if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { - PDFViewerApplication.page = PDFViewerApplication.pagesCount; - handled = true; - ensureViewerFocused = true; - } - break; - case 72: - if (!isViewerInPresentationMode) { - PDFViewerApplication.handTool.toggle(); - } - break; - case 82: - PDFViewerApplication.rotatePages(90); - break; - } - } - if (cmd === 4) { - switch (evt.keyCode) { - case 32: - if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') { - break; - } - if (PDFViewerApplication.page > 1) { - PDFViewerApplication.page--; - } - handled = true; - break; - case 82: - PDFViewerApplication.rotatePages(-90); - break; - } - } - if (!handled && !isViewerInPresentationMode) { - if (evt.keyCode >= 33 && evt.keyCode <= 40 || evt.keyCode === 32 && curElementTagName !== 'BUTTON') { - ensureViewerFocused = true; - } - } - if (cmd === 2) { - switch (evt.keyCode) { - case 37: - if (isViewerInPresentationMode) { - PDFViewerApplication.pdfHistory.back(); - handled = true; - } - break; - case 39: - if (isViewerInPresentationMode) { - PDFViewerApplication.pdfHistory.forward(); - handled = true; - } - break; - } - } - if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) { - pdfViewer.focus(); - } - if (handled) { - evt.preventDefault(); - } -} -localized.then(function webViewerLocalized() { - document.getElementsByTagName('html')[0].dir = mozL10n.getDirection(); -}); -var PDFPrintServiceFactory = { - instance: { - supportsPrinting: false, - createPrintService: function () { - throw new Error('Not implemented: createPrintService'); - } - } -}; -exports.PDFViewerApplication = PDFViewerApplication; -exports.DefaultExernalServices = DefaultExernalServices; -exports.PDFPrintServiceFactory = PDFPrintServiceFactory; - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var OverlayManager = { - overlays: {}, - active: null, - register: function overlayManagerRegister(name, element, callerCloseMethod, canForceClose) { - return new Promise(function (resolve) { - var container; - if (!name || !element || !(container = element.parentNode)) { - throw new Error('Not enough parameters.'); - } else if (this.overlays[name]) { - throw new Error('The overlay is already registered.'); - } - this.overlays[name] = { - element: element, - container: container, - callerCloseMethod: callerCloseMethod || null, - canForceClose: canForceClose || false - }; - resolve(); - }.bind(this)); - }, - unregister: function overlayManagerUnregister(name) { - return new Promise(function (resolve) { - if (!this.overlays[name]) { - throw new Error('The overlay does not exist.'); - } else if (this.active === name) { - throw new Error('The overlay cannot be removed while it is active.'); - } - delete this.overlays[name]; - resolve(); - }.bind(this)); - }, - open: function overlayManagerOpen(name) { - return new Promise(function (resolve) { - if (!this.overlays[name]) { - throw new Error('The overlay does not exist.'); - } else if (this.active) { - if (this.overlays[name].canForceClose) { - this._closeThroughCaller(); - } else if (this.active === name) { - throw new Error('The overlay is already active.'); - } else { - throw new Error('Another overlay is currently active.'); - } - } - this.active = name; - this.overlays[this.active].element.classList.remove('hidden'); - this.overlays[this.active].container.classList.remove('hidden'); - window.addEventListener('keydown', this._keyDown); - resolve(); - }.bind(this)); - }, - close: function overlayManagerClose(name) { - return new Promise(function (resolve) { - if (!this.overlays[name]) { - throw new Error('The overlay does not exist.'); - } else if (!this.active) { - throw new Error('The overlay is currently not active.'); - } else if (this.active !== name) { - throw new Error('Another overlay is currently active.'); - } - this.overlays[this.active].container.classList.add('hidden'); - this.overlays[this.active].element.classList.add('hidden'); - this.active = null; - window.removeEventListener('keydown', this._keyDown); - resolve(); - }.bind(this)); - }, - _keyDown: function overlayManager_keyDown(evt) { - var self = OverlayManager; - if (self.active && evt.keyCode === 27) { - self._closeThroughCaller(); - evt.preventDefault(); - } - }, - _closeThroughCaller: function overlayManager_closeThroughCaller() { - if (this.overlays[this.active].callerCloseMethod) { - this.overlays[this.active].callerCloseMethod(); - } - if (this.active) { - this.close(this.active); - } - } -}; -exports.OverlayManager = OverlayManager; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var domEvents = __webpack_require__(2); -var parseQueryString = uiUtils.parseQueryString; -var PageNumberRegExp = /^\d+$/; -function isPageNumber(str) { - return PageNumberRegExp.test(str); -} -var PDFLinkService = function PDFLinkServiceClosure() { - function PDFLinkService(options) { - options = options || {}; - this.eventBus = options.eventBus || domEvents.getGlobalEventBus(); - this.baseUrl = null; - this.pdfDocument = null; - this.pdfViewer = null; - this.pdfHistory = null; - this._pagesRefCache = null; - } - PDFLinkService.prototype = { - setDocument: function PDFLinkService_setDocument(pdfDocument, baseUrl) { - this.baseUrl = baseUrl; - this.pdfDocument = pdfDocument; - this._pagesRefCache = Object.create(null); - }, - setViewer: function PDFLinkService_setViewer(pdfViewer) { - this.pdfViewer = pdfViewer; - }, - setHistory: function PDFLinkService_setHistory(pdfHistory) { - this.pdfHistory = pdfHistory; - }, - get pagesCount() { - return this.pdfDocument ? this.pdfDocument.numPages : 0; - }, - get page() { - return this.pdfViewer.currentPageNumber; - }, - set page(value) { - this.pdfViewer.currentPageNumber = value; - }, - navigateTo: function PDFLinkService_navigateTo(dest) { - var destString = ''; - var self = this; - var goToDestination = function (destRef) { - var pageNumber; - if (destRef instanceof Object) { - pageNumber = self._cachedPageNumber(destRef); - } else if ((destRef | 0) === destRef) { - pageNumber = destRef + 1; - } else { - console.error('PDFLinkService_navigateTo: "' + destRef + '" is not a valid destination reference.'); - return; - } - if (pageNumber) { - if (pageNumber < 1 || pageNumber > self.pagesCount) { - console.error('PDFLinkService_navigateTo: "' + pageNumber + '" is a non-existent page number.'); - return; - } - self.pdfViewer.scrollPageIntoView({ - pageNumber: pageNumber, - destArray: dest - }); - if (self.pdfHistory) { - self.pdfHistory.push({ - dest: dest, - hash: destString, - page: pageNumber - }); - } - } else { - self.pdfDocument.getPageIndex(destRef).then(function (pageIndex) { - self.cachePageRef(pageIndex + 1, destRef); - goToDestination(destRef); - }).catch(function () { - console.error('PDFLinkService_navigateTo: "' + destRef + '" is not a valid page reference.'); - }); - } - }; - var destinationPromise; - if (typeof dest === 'string') { - destString = dest; - destinationPromise = this.pdfDocument.getDestination(dest); - } else { - destinationPromise = Promise.resolve(dest); - } - destinationPromise.then(function (destination) { - dest = destination; - if (!(destination instanceof Array)) { - console.error('PDFLinkService_navigateTo: "' + destination + '" is not a valid destination array.'); - return; - } - goToDestination(destination[0]); - }); - }, - getDestinationHash: function PDFLinkService_getDestinationHash(dest) { - if (typeof dest === 'string') { - return this.getAnchorUrl('#' + (isPageNumber(dest) ? 'nameddest=' : '') + escape(dest)); - } - if (dest instanceof Array) { - var str = JSON.stringify(dest); - return this.getAnchorUrl('#' + escape(str)); - } - return this.getAnchorUrl(''); - }, - getAnchorUrl: function PDFLinkService_getAnchorUrl(anchor) { - return (this.baseUrl || '') + anchor; - }, - setHash: function PDFLinkService_setHash(hash) { - var pageNumber, dest; - if (hash.indexOf('=') >= 0) { - var params = parseQueryString(hash); - if ('search' in params) { - this.eventBus.dispatch('findfromurlhash', { - source: this, - query: params['search'].replace(/"/g, ''), - phraseSearch: params['phrase'] === 'true' - }); - } - if ('nameddest' in params) { - if (this.pdfHistory) { - this.pdfHistory.updateNextHashParam(params.nameddest); - } - this.navigateTo(params.nameddest); - return; - } - if ('page' in params) { - pageNumber = params.page | 0 || 1; - } - if ('zoom' in params) { - var zoomArgs = params.zoom.split(','); - var zoomArg = zoomArgs[0]; - var zoomArgNumber = parseFloat(zoomArg); - if (zoomArg.indexOf('Fit') === -1) { - dest = [ - null, - { name: 'XYZ' }, - zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, - zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, - zoomArgNumber ? zoomArgNumber / 100 : zoomArg - ]; - } else { - if (zoomArg === 'Fit' || zoomArg === 'FitB') { - dest = [ - null, - { name: zoomArg } - ]; - } else if (zoomArg === 'FitH' || zoomArg === 'FitBH' || (zoomArg === 'FitV' || zoomArg === 'FitBV')) { - dest = [ - null, - { name: zoomArg }, - zoomArgs.length > 1 ? zoomArgs[1] | 0 : null - ]; - } else if (zoomArg === 'FitR') { - if (zoomArgs.length !== 5) { - console.error('PDFLinkService_setHash: ' + 'Not enough parameters for \'FitR\'.'); - } else { - dest = [ - null, - { name: zoomArg }, - zoomArgs[1] | 0, - zoomArgs[2] | 0, - zoomArgs[3] | 0, - zoomArgs[4] | 0 - ]; - } - } else { - console.error('PDFLinkService_setHash: \'' + zoomArg + '\' is not a valid zoom value.'); - } - } - } - if (dest) { - this.pdfViewer.scrollPageIntoView({ - pageNumber: pageNumber || this.page, - destArray: dest, - allowNegativeOffset: true - }); - } else if (pageNumber) { - this.page = pageNumber; - } - if ('pagemode' in params) { - this.eventBus.dispatch('pagemode', { - source: this, - mode: params.pagemode - }); - } - } else { - dest = unescape(hash); - try { - dest = JSON.parse(dest); - if (!(dest instanceof Array)) { - dest = dest.toString(); - } - } catch (ex) { - } - if (typeof dest === 'string' || isValidExplicitDestination(dest)) { - if (this.pdfHistory) { - this.pdfHistory.updateNextHashParam(dest); - } - this.navigateTo(dest); - return; - } - console.error('PDFLinkService_setHash: \'' + unescape(hash) + '\' is not a valid destination.'); - } - }, - executeNamedAction: function PDFLinkService_executeNamedAction(action) { - switch (action) { - case 'GoBack': - if (this.pdfHistory) { - this.pdfHistory.back(); - } - break; - case 'GoForward': - if (this.pdfHistory) { - this.pdfHistory.forward(); - } - break; - case 'NextPage': - if (this.page < this.pagesCount) { - this.page++; - } - break; - case 'PrevPage': - if (this.page > 1) { - this.page--; - } - break; - case 'LastPage': - this.page = this.pagesCount; - break; - case 'FirstPage': - this.page = 1; - break; - default: - break; - } - this.eventBus.dispatch('namedaction', { - source: this, - action: action - }); - }, - onFileAttachmentAnnotation: function (params) { - this.eventBus.dispatch('fileattachmentannotation', { - source: this, - id: params.id, - filename: params.filename, - content: params.content - }); - }, - cachePageRef: function PDFLinkService_cachePageRef(pageNum, pageRef) { - var refStr = pageRef.num + ' ' + pageRef.gen + ' R'; - this._pagesRefCache[refStr] = pageNum; - }, - _cachedPageNumber: function PDFLinkService_cachedPageNumber(pageRef) { - var refStr = pageRef.num + ' ' + pageRef.gen + ' R'; - return this._pagesRefCache && this._pagesRefCache[refStr] || null; - } - }; - function isValidExplicitDestination(dest) { - if (!(dest instanceof Array)) { - return false; - } - var destLength = dest.length, allowNull = true; - if (destLength < 2) { - return false; - } - var page = dest[0]; - if (!(typeof page === 'object' && typeof page.num === 'number' && (page.num | 0) === page.num && typeof page.gen === 'number' && (page.gen | 0) === page.gen) && !(typeof page === 'number' && (page | 0) === page && page >= 0)) { - return false; - } - var zoom = dest[1]; - if (!(typeof zoom === 'object' && typeof zoom.name === 'string')) { - return false; - } - switch (zoom.name) { - case 'XYZ': - if (destLength !== 5) { - return false; - } - break; - case 'Fit': - case 'FitB': - return destLength === 2; - case 'FitH': - case 'FitBH': - case 'FitV': - case 'FitBV': - if (destLength !== 3) { - return false; - } - break; - case 'FitR': - if (destLength !== 6) { - return false; - } - allowNull = false; - break; - default: - return false; - } - for (var i = 2; i < destLength; i++) { - var param = dest[i]; - if (!(typeof param === 'number' || allowNull && param === null)) { - return false; - } - } - return true; - } - return PDFLinkService; -}(); -var SimpleLinkService = function SimpleLinkServiceClosure() { - function SimpleLinkService() { - } - SimpleLinkService.prototype = { - get page() { - return 0; - }, - set page(value) { - }, - navigateTo: function (dest) { - }, - getDestinationHash: function (dest) { - return '#'; - }, - getAnchorUrl: function (hash) { - return '#'; - }, - setHash: function (hash) { - }, - executeNamedAction: function (action) { - }, - onFileAttachmentAnnotation: function (params) { - }, - cachePageRef: function (pageNum, pageRef) { - } - }; - return SimpleLinkService; -}(); -exports.PDFLinkService = PDFLinkService; -exports.SimpleLinkService = SimpleLinkService; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var defaultPreferences = null; -function getDefaultPreferences() { - if (!defaultPreferences) { - defaultPreferences = Promise.resolve({ - "showPreviousViewOnLoad": true, - "defaultZoomValue": "", - "sidebarViewOnLoad": 0, - "enableHandToolOnLoad": false, - "enableWebGL": false, - "pdfBugEnabled": false, - "disableRange": false, - "disableStream": false, - "disableAutoFetch": false, - "disableFontFace": false, - "disableTextLayer": false, - "useOnlyCssZoom": false, - "externalLinkTarget": 0, - "enhanceTextSelection": false, - "renderer": "canvas", - "renderInteractiveForms": false, - "enablePrintAutoRotate": false, - "disablePageLabels": false - }); - } - return defaultPreferences; -} -function cloneObj(obj) { - var result = {}; - for (var i in obj) { - if (Object.prototype.hasOwnProperty.call(obj, i)) { - result[i] = obj[i]; - } - } - return result; -} -var Preferences = { - prefs: null, - isInitializedPromiseResolved: false, - initializedPromise: null, - initialize: function preferencesInitialize() { - return this.initializedPromise = getDefaultPreferences().then(function (defaults) { - Object.defineProperty(this, 'defaults', { - value: Object.freeze(defaults), - writable: false, - enumerable: true, - configurable: false - }); - this.prefs = cloneObj(defaults); - return this._readFromStorage(defaults); - }.bind(this)).then(function (prefObj) { - this.isInitializedPromiseResolved = true; - if (prefObj) { - this.prefs = prefObj; - } - }.bind(this)); - }, - _writeToStorage: function preferences_writeToStorage(prefObj) { - return Promise.resolve(); - }, - _readFromStorage: function preferences_readFromStorage(prefObj) { - return Promise.resolve(); - }, - reset: function preferencesReset() { - return this.initializedPromise.then(function () { - this.prefs = cloneObj(this.defaults); - return this._writeToStorage(this.defaults); - }.bind(this)); - }, - reload: function preferencesReload() { - return this.initializedPromise.then(function () { - this._readFromStorage(this.defaults).then(function (prefObj) { - if (prefObj) { - this.prefs = prefObj; - } - }.bind(this)); - }.bind(this)); - }, - set: function preferencesSet(name, value) { - return this.initializedPromise.then(function () { - if (this.defaults[name] === undefined) { - throw new Error('preferencesSet: \'' + name + '\' is undefined.'); - } else if (value === undefined) { - throw new Error('preferencesSet: no value is specified.'); - } - var valueType = typeof value; - var defaultType = typeof this.defaults[name]; - if (valueType !== defaultType) { - if (valueType === 'number' && defaultType === 'string') { - value = value.toString(); - } else { - throw new Error('Preferences_set: \'' + value + '\' is a \"' + valueType + '\", expected \"' + defaultType + '\".'); - } - } else { - if (valueType === 'number' && (value | 0) !== value) { - throw new Error('Preferences_set: \'' + value + '\' must be an \"integer\".'); - } - } - this.prefs[name] = value; - return this._writeToStorage(this.prefs); - }.bind(this)); - }, - get: function preferencesGet(name) { - return this.initializedPromise.then(function () { - var defaultValue = this.defaults[name]; - if (defaultValue === undefined) { - throw new Error('preferencesGet: \'' + name + '\' is undefined.'); - } else { - var prefValue = this.prefs[name]; - if (prefValue !== undefined) { - return prefValue; - } - } - return defaultValue; - }.bind(this)); - } -}; -exports.Preferences = Preferences; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var scrollIntoView = uiUtils.scrollIntoView; -var FindStates = { - FIND_FOUND: 0, - FIND_NOTFOUND: 1, - FIND_WRAPPED: 2, - FIND_PENDING: 3 -}; -var FIND_SCROLL_OFFSET_TOP = -50; -var FIND_SCROLL_OFFSET_LEFT = -400; -var CHARACTERS_TO_NORMALIZE = { - '\u2018': '\'', - '\u2019': '\'', - '\u201A': '\'', - '\u201B': '\'', - '\u201C': '"', - '\u201D': '"', - '\u201E': '"', - '\u201F': '"', - '\u00BC': '1/4', - '\u00BD': '1/2', - '\u00BE': '3/4' -}; -var PDFFindController = function PDFFindControllerClosure() { - function PDFFindController(options) { - this.pdfViewer = options.pdfViewer || null; - this.onUpdateResultsCount = null; - this.onUpdateState = null; - this.reset(); - var replace = Object.keys(CHARACTERS_TO_NORMALIZE).join(''); - this.normalizationRegex = new RegExp('[' + replace + ']', 'g'); - } - PDFFindController.prototype = { - reset: function PDFFindController_reset() { - this.startedTextExtraction = false; - this.extractTextPromises = []; - this.pendingFindMatches = Object.create(null); - this.active = false; - this.pageContents = []; - this.pageMatches = []; - this.pageMatchesLength = null; - this.matchCount = 0; - this.selected = { - pageIdx: -1, - matchIdx: -1 - }; - this.offset = { - pageIdx: null, - matchIdx: null - }; - this.pagesToSearch = null; - this.resumePageIdx = null; - this.state = null; - this.dirtyMatch = false; - this.findTimeout = null; - this.firstPagePromise = new Promise(function (resolve) { - this.resolveFirstPage = resolve; - }.bind(this)); - }, - normalize: function PDFFindController_normalize(text) { - return text.replace(this.normalizationRegex, function (ch) { - return CHARACTERS_TO_NORMALIZE[ch]; - }); - }, - _prepareMatches: function PDFFindController_prepareMatches(matchesWithLength, matches, matchesLength) { - function isSubTerm(matchesWithLength, currentIndex) { - var currentElem, prevElem, nextElem; - currentElem = matchesWithLength[currentIndex]; - nextElem = matchesWithLength[currentIndex + 1]; - if (currentIndex < matchesWithLength.length - 1 && currentElem.match === nextElem.match) { - currentElem.skipped = true; - return true; - } - for (var i = currentIndex - 1; i >= 0; i--) { - prevElem = matchesWithLength[i]; - if (prevElem.skipped) { - continue; - } - if (prevElem.match + prevElem.matchLength < currentElem.match) { - break; - } - if (prevElem.match + prevElem.matchLength >= currentElem.match + currentElem.matchLength) { - currentElem.skipped = true; - return true; - } - } - return false; - } - var i, len; - matchesWithLength.sort(function (a, b) { - return a.match === b.match ? a.matchLength - b.matchLength : a.match - b.match; - }); - for (i = 0, len = matchesWithLength.length; i < len; i++) { - if (isSubTerm(matchesWithLength, i)) { - continue; - } - matches.push(matchesWithLength[i].match); - matchesLength.push(matchesWithLength[i].matchLength); - } - }, - calcFindPhraseMatch: function PDFFindController_calcFindPhraseMatch(query, pageIndex, pageContent) { - var matches = []; - var queryLen = query.length; - var matchIdx = -queryLen; - while (true) { - matchIdx = pageContent.indexOf(query, matchIdx + queryLen); - if (matchIdx === -1) { - break; - } - matches.push(matchIdx); - } - this.pageMatches[pageIndex] = matches; - }, - calcFindWordMatch: function PDFFindController_calcFindWordMatch(query, pageIndex, pageContent) { - var matchesWithLength = []; - var queryArray = query.match(/\S+/g); - var subquery, subqueryLen, matchIdx; - for (var i = 0, len = queryArray.length; i < len; i++) { - subquery = queryArray[i]; - subqueryLen = subquery.length; - matchIdx = -subqueryLen; - while (true) { - matchIdx = pageContent.indexOf(subquery, matchIdx + subqueryLen); - if (matchIdx === -1) { - break; - } - matchesWithLength.push({ - match: matchIdx, - matchLength: subqueryLen, - skipped: false - }); - } - } - if (!this.pageMatchesLength) { - this.pageMatchesLength = []; - } - this.pageMatchesLength[pageIndex] = []; - this.pageMatches[pageIndex] = []; - this._prepareMatches(matchesWithLength, this.pageMatches[pageIndex], this.pageMatchesLength[pageIndex]); - }, - calcFindMatch: function PDFFindController_calcFindMatch(pageIndex) { - var pageContent = this.normalize(this.pageContents[pageIndex]); - var query = this.normalize(this.state.query); - var caseSensitive = this.state.caseSensitive; - var phraseSearch = this.state.phraseSearch; - var queryLen = query.length; - if (queryLen === 0) { - return; - } - if (!caseSensitive) { - pageContent = pageContent.toLowerCase(); - query = query.toLowerCase(); - } - if (phraseSearch) { - this.calcFindPhraseMatch(query, pageIndex, pageContent); - } else { - this.calcFindWordMatch(query, pageIndex, pageContent); - } - this.updatePage(pageIndex); - if (this.resumePageIdx === pageIndex) { - this.resumePageIdx = null; - this.nextPageMatch(); - } - if (this.pageMatches[pageIndex].length > 0) { - this.matchCount += this.pageMatches[pageIndex].length; - this.updateUIResultsCount(); - } - }, - extractText: function PDFFindController_extractText() { - if (this.startedTextExtraction) { - return; - } - this.startedTextExtraction = true; - this.pageContents = []; - var extractTextPromisesResolves = []; - var numPages = this.pdfViewer.pagesCount; - for (var i = 0; i < numPages; i++) { - this.extractTextPromises.push(new Promise(function (resolve) { - extractTextPromisesResolves.push(resolve); - })); - } - var self = this; - function extractPageText(pageIndex) { - self.pdfViewer.getPageTextContent(pageIndex).then(function textContentResolved(textContent) { - var textItems = textContent.items; - var str = []; - for (var i = 0, len = textItems.length; i < len; i++) { - str.push(textItems[i].str); - } - self.pageContents.push(str.join('')); - extractTextPromisesResolves[pageIndex](pageIndex); - if (pageIndex + 1 < self.pdfViewer.pagesCount) { - extractPageText(pageIndex + 1); - } - }); - } - extractPageText(0); - }, - executeCommand: function PDFFindController_executeCommand(cmd, state) { - if (this.state === null || cmd !== 'findagain') { - this.dirtyMatch = true; - } - this.state = state; - this.updateUIState(FindStates.FIND_PENDING); - this.firstPagePromise.then(function () { - this.extractText(); - clearTimeout(this.findTimeout); - if (cmd === 'find') { - this.findTimeout = setTimeout(this.nextMatch.bind(this), 250); - } else { - this.nextMatch(); - } - }.bind(this)); - }, - updatePage: function PDFFindController_updatePage(index) { - if (this.selected.pageIdx === index) { - this.pdfViewer.currentPageNumber = index + 1; - } - var page = this.pdfViewer.getPageView(index); - if (page.textLayer) { - page.textLayer.updateMatches(); - } - }, - nextMatch: function PDFFindController_nextMatch() { - var previous = this.state.findPrevious; - var currentPageIndex = this.pdfViewer.currentPageNumber - 1; - var numPages = this.pdfViewer.pagesCount; - this.active = true; - if (this.dirtyMatch) { - this.dirtyMatch = false; - this.selected.pageIdx = this.selected.matchIdx = -1; - this.offset.pageIdx = currentPageIndex; - this.offset.matchIdx = null; - this.hadMatch = false; - this.resumePageIdx = null; - this.pageMatches = []; - this.matchCount = 0; - this.pageMatchesLength = null; - var self = this; - for (var i = 0; i < numPages; i++) { - this.updatePage(i); - if (!(i in this.pendingFindMatches)) { - this.pendingFindMatches[i] = true; - this.extractTextPromises[i].then(function (pageIdx) { - delete self.pendingFindMatches[pageIdx]; - self.calcFindMatch(pageIdx); - }); - } - } - } - if (this.state.query === '') { - this.updateUIState(FindStates.FIND_FOUND); - return; - } - if (this.resumePageIdx) { - return; - } - var offset = this.offset; - this.pagesToSearch = numPages; - if (offset.matchIdx !== null) { - var numPageMatches = this.pageMatches[offset.pageIdx].length; - if (!previous && offset.matchIdx + 1 < numPageMatches || previous && offset.matchIdx > 0) { - this.hadMatch = true; - offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1; - this.updateMatch(true); - return; - } - this.advanceOffsetPage(previous); - } - this.nextPageMatch(); - }, - matchesReady: function PDFFindController_matchesReady(matches) { - var offset = this.offset; - var numMatches = matches.length; - var previous = this.state.findPrevious; - if (numMatches) { - this.hadMatch = true; - offset.matchIdx = previous ? numMatches - 1 : 0; - this.updateMatch(true); - return true; - } - this.advanceOffsetPage(previous); - if (offset.wrapped) { - offset.matchIdx = null; - if (this.pagesToSearch < 0) { - this.updateMatch(false); - return true; - } - } - return false; - }, - updateMatchPosition: function PDFFindController_updateMatchPosition(pageIndex, index, elements, beginIdx) { - if (this.selected.matchIdx === index && this.selected.pageIdx === pageIndex) { - var spot = { - top: FIND_SCROLL_OFFSET_TOP, - left: FIND_SCROLL_OFFSET_LEFT - }; - scrollIntoView(elements[beginIdx], spot, true); - } - }, - nextPageMatch: function PDFFindController_nextPageMatch() { - if (this.resumePageIdx !== null) { - console.error('There can only be one pending page.'); - } - do { - var pageIdx = this.offset.pageIdx; - var matches = this.pageMatches[pageIdx]; - if (!matches) { - this.resumePageIdx = pageIdx; - break; - } - } while (!this.matchesReady(matches)); - }, - advanceOffsetPage: function PDFFindController_advanceOffsetPage(previous) { - var offset = this.offset; - var numPages = this.extractTextPromises.length; - offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1; - offset.matchIdx = null; - this.pagesToSearch--; - if (offset.pageIdx >= numPages || offset.pageIdx < 0) { - offset.pageIdx = previous ? numPages - 1 : 0; - offset.wrapped = true; - } - }, - updateMatch: function PDFFindController_updateMatch(found) { - var state = FindStates.FIND_NOTFOUND; - var wrapped = this.offset.wrapped; - this.offset.wrapped = false; - if (found) { - var previousPage = this.selected.pageIdx; - this.selected.pageIdx = this.offset.pageIdx; - this.selected.matchIdx = this.offset.matchIdx; - state = wrapped ? FindStates.FIND_WRAPPED : FindStates.FIND_FOUND; - if (previousPage !== -1 && previousPage !== this.selected.pageIdx) { - this.updatePage(previousPage); - } - } - this.updateUIState(state, this.state.findPrevious); - if (this.selected.pageIdx !== -1) { - this.updatePage(this.selected.pageIdx); - } - }, - updateUIResultsCount: function PDFFindController_updateUIResultsCount() { - if (this.onUpdateResultsCount) { - this.onUpdateResultsCount(this.matchCount); - } - }, - updateUIState: function PDFFindController_updateUIState(state, previous) { - if (this.onUpdateState) { - this.onUpdateState(state, previous, this.matchCount); - } - } - }; - return PDFFindController; -}(); -exports.FindStates = FindStates; -exports.PDFFindController = PDFFindController; - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var app = __webpack_require__(4); -var pdfjsLib = __webpack_require__(1); -var CSS_UNITS = uiUtils.CSS_UNITS; -var PDFPrintServiceFactory = app.PDFPrintServiceFactory; -function composePage(pdfDocument, pageNumber, size, printContainer) { - var canvas = document.createElement('canvas'); - var PRINT_RESOLUTION = 150; - var PRINT_UNITS = PRINT_RESOLUTION / 72.0; - canvas.width = Math.floor(size.width * PRINT_UNITS); - canvas.height = Math.floor(size.height * PRINT_UNITS); - canvas.style.width = Math.floor(size.width * CSS_UNITS) + 'px'; - canvas.style.height = Math.floor(size.height * CSS_UNITS) + 'px'; - var canvasWrapper = document.createElement('div'); - canvasWrapper.appendChild(canvas); - printContainer.appendChild(canvasWrapper); - canvas.mozPrintCallback = function (obj) { - var ctx = obj.context; - ctx.save(); - ctx.fillStyle = 'rgb(255, 255, 255)'; - ctx.fillRect(0, 0, canvas.width, canvas.height); - ctx.restore(); - pdfDocument.getPage(pageNumber).then(function (pdfPage) { - var renderContext = { - canvasContext: ctx, - transform: [ - PRINT_UNITS, - 0, - 0, - PRINT_UNITS, - 0, - 0 - ], - viewport: pdfPage.getViewport(1, size.rotation), - intent: 'print' - }; - return pdfPage.render(renderContext).promise; - }).then(function () { - obj.done(); - }, function (error) { - console.error(error); - if ('abort' in obj) { - obj.abort(); - } else { - obj.done(); - } - }); - }; -} -function FirefoxPrintService(pdfDocument, pagesOverview, printContainer) { - this.pdfDocument = pdfDocument; - this.pagesOverview = pagesOverview; - this.printContainer = printContainer; -} -FirefoxPrintService.prototype = { - layout: function () { - var pdfDocument = this.pdfDocument; - var printContainer = this.printContainer; - var body = document.querySelector('body'); - body.setAttribute('data-pdfjsprinting', true); - for (var i = 0, ii = this.pagesOverview.length; i < ii; ++i) { - composePage(pdfDocument, i + 1, this.pagesOverview[i], printContainer); - } - }, - destroy: function () { - this.printContainer.textContent = ''; - } -}; -PDFPrintServiceFactory.instance = { - get supportsPrinting() { - var canvas = document.createElement('canvas'); - var value = 'mozPrintCallback' in canvas; - return pdfjsLib.shadow(this, 'supportsPrinting', value); - }, - createPrintService: function (pdfDocument, pagesOverview, printContainer) { - return new FirefoxPrintService(pdfDocument, pagesOverview, printContainer); - } -}; -exports.FirefoxPrintService = FirefoxPrintService; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var preferences = __webpack_require__(7); -var app = __webpack_require__(4); -var pdfjsLib = __webpack_require__(1); -var Preferences = preferences.Preferences; -var PDFViewerApplication = app.PDFViewerApplication; -var FirefoxCom = function FirefoxComClosure() { - return { - requestSync: function (action, data) { - var request = document.createTextNode(''); - document.documentElement.appendChild(request); - var sender = document.createEvent('CustomEvent'); - sender.initCustomEvent('pdf.js.message', true, false, { - action: action, - data: data, - sync: true - }); - request.dispatchEvent(sender); - var response = sender.detail.response; - document.documentElement.removeChild(request); - return response; - }, - request: function (action, data, callback) { - var request = document.createTextNode(''); - if (callback) { - document.addEventListener('pdf.js.response', function listener(event) { - var node = event.target; - var response = event.detail.response; - document.documentElement.removeChild(node); - document.removeEventListener('pdf.js.response', listener); - return callback(response); - }); - } - document.documentElement.appendChild(request); - var sender = document.createEvent('CustomEvent'); - sender.initCustomEvent('pdf.js.message', true, false, { - action: action, - data: data, - sync: false, - responseExpected: !!callback - }); - return request.dispatchEvent(sender); - } - }; -}(); -var DownloadManager = function DownloadManagerClosure() { - function DownloadManager() { - } - DownloadManager.prototype = { - downloadUrl: function DownloadManager_downloadUrl(url, filename) { - FirefoxCom.request('download', { - originalUrl: url, - filename: filename - }); - }, - downloadData: function DownloadManager_downloadData(data, filename, contentType) { - var blobUrl = pdfjsLib.createObjectURL(data, contentType, false); - FirefoxCom.request('download', { - blobUrl: blobUrl, - originalUrl: blobUrl, - filename: filename, - isAttachment: true - }); - }, - download: function DownloadManager_download(blob, url, filename) { - var blobUrl = window.URL.createObjectURL(blob); - FirefoxCom.request('download', { - blobUrl: blobUrl, - originalUrl: url, - filename: filename - }, function response(err) { - if (err && this.onerror) { - this.onerror(err); - } - window.URL.revokeObjectURL(blobUrl); - }.bind(this)); - } - }; - return DownloadManager; -}(); -Preferences._writeToStorage = function (prefObj) { - return new Promise(function (resolve) { - FirefoxCom.request('setPreferences', prefObj, resolve); - }); -}; -Preferences._readFromStorage = function (prefObj) { - return new Promise(function (resolve) { - FirefoxCom.request('getPreferences', prefObj, function (prefStr) { - var readPrefs = JSON.parse(prefStr); - resolve(readPrefs); - }); - }); -}; -(function listenFindEvents() { - var events = [ - 'find', - 'findagain', - 'findhighlightallchange', - 'findcasesensitivitychange' - ]; - var handleEvent = function (evt) { - if (!PDFViewerApplication.initialized) { - return; - } - PDFViewerApplication.eventBus.dispatch('find', { - source: window, - type: evt.type.substring('find'.length), - query: evt.detail.query, - phraseSearch: true, - caseSensitive: !!evt.detail.caseSensitive, - highlightAll: !!evt.detail.highlightAll, - findPrevious: !!evt.detail.findPrevious - }); - }; - for (var i = 0, len = events.length; i < len; i++) { - window.addEventListener(events[i], handleEvent); - } -}()); -function FirefoxComDataRangeTransport(length, initialData) { - pdfjsLib.PDFDataRangeTransport.call(this, length, initialData); -} -FirefoxComDataRangeTransport.prototype = Object.create(pdfjsLib.PDFDataRangeTransport.prototype); -FirefoxComDataRangeTransport.prototype.requestDataRange = function FirefoxComDataRangeTransport_requestDataRange(begin, end) { - FirefoxCom.request('requestDataRange', { - begin: begin, - end: end - }); -}; -FirefoxComDataRangeTransport.prototype.abort = function FirefoxComDataRangeTransport_abort() { - FirefoxCom.requestSync('abortLoading', null); -}; -PDFViewerApplication.externalServices = { - updateFindControlState: function (data) { - FirefoxCom.request('updateFindControlState', data); - }, - initPassiveLoading: function (callbacks) { - var pdfDataRangeTransport; - window.addEventListener('message', function windowMessage(e) { - if (e.source !== null) { - console.warn('Rejected untrusted message from ' + e.origin); - return; - } - var args = e.data; - if (typeof args !== 'object' || !('pdfjsLoadAction' in args)) { - return; - } - switch (args.pdfjsLoadAction) { - case 'supportsRangedLoading': - pdfDataRangeTransport = new FirefoxComDataRangeTransport(args.length, args.data); - callbacks.onOpenWithTransport(args.pdfUrl, args.length, pdfDataRangeTransport); - break; - case 'range': - pdfDataRangeTransport.onDataRange(args.begin, args.chunk); - break; - case 'rangeProgress': - pdfDataRangeTransport.onDataProgress(args.loaded); - break; - case 'progressiveRead': - pdfDataRangeTransport.onDataProgressiveRead(args.chunk); - break; - case 'progress': - callbacks.onProgress(args.loaded, args.total); - break; - case 'complete': - if (!args.data) { - callbacks.onError(args.errorCode); - break; - } - callbacks.onOpenWithData(args.data); - break; - } - }); - FirefoxCom.requestSync('initPassiveLoading', null); - }, - fallback: function (data, callback) { - FirefoxCom.request('fallback', data, callback); - }, - createDownloadManager: function () { - return new DownloadManager(); - }, - get supportsIntegratedFind() { - var support = FirefoxCom.requestSync('supportsIntegratedFind'); - return pdfjsLib.shadow(this, 'supportsIntegratedFind', support); - }, - get supportsDocumentFonts() { - var support = FirefoxCom.requestSync('supportsDocumentFonts'); - return pdfjsLib.shadow(this, 'supportsDocumentFonts', support); - }, - get supportsDocumentColors() { - var support = FirefoxCom.requestSync('supportsDocumentColors'); - return pdfjsLib.shadow(this, 'supportsDocumentColors', support); - }, - get supportedMouseWheelZoomModifierKeys() { - var support = FirefoxCom.requestSync('supportedMouseWheelZoomModifierKeys'); - return pdfjsLib.shadow(this, 'supportedMouseWheelZoomModifierKeys', support); - } -}; -document.mozL10n.setExternalLocalizerServices({ - getLocale: function () { - return FirefoxCom.requestSync('getLocale', null); - }, - getStrings: function (key) { - return FirefoxCom.requestSync('getStrings', key); - } -}); -exports.DownloadManager = DownloadManager; -exports.FirefoxCom = FirefoxCom; - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var pdfLinkService = __webpack_require__(6); -var pdfjsLib = __webpack_require__(1); -var mozL10n = uiUtils.mozL10n; -var SimpleLinkService = pdfLinkService.SimpleLinkService; -var AnnotationLayerBuilder = function AnnotationLayerBuilderClosure() { - function AnnotationLayerBuilder(options) { - this.pageDiv = options.pageDiv; - this.pdfPage = options.pdfPage; - this.renderInteractiveForms = options.renderInteractiveForms; - this.linkService = options.linkService; - this.downloadManager = options.downloadManager; - this.div = null; - } - AnnotationLayerBuilder.prototype = { - render: function AnnotationLayerBuilder_render(viewport, intent) { - var self = this; - var parameters = { intent: intent === undefined ? 'display' : intent }; - this.pdfPage.getAnnotations(parameters).then(function (annotations) { - viewport = viewport.clone({ dontFlip: true }); - parameters = { - viewport: viewport, - div: self.div, - annotations: annotations, - page: self.pdfPage, - renderInteractiveForms: self.renderInteractiveForms, - linkService: self.linkService, - downloadManager: self.downloadManager - }; - if (self.div) { - pdfjsLib.AnnotationLayer.update(parameters); - } else { - if (annotations.length === 0) { - return; - } - self.div = document.createElement('div'); - self.div.className = 'annotationLayer'; - self.pageDiv.appendChild(self.div); - parameters.div = self.div; - pdfjsLib.AnnotationLayer.render(parameters); - if (typeof mozL10n !== 'undefined') { - mozL10n.translate(self.div); - } - } - }); - }, - hide: function AnnotationLayerBuilder_hide() { - if (!this.div) { - return; - } - this.div.setAttribute('hidden', 'true'); - } - }; - return AnnotationLayerBuilder; -}(); -function DefaultAnnotationLayerFactory() { -} -DefaultAnnotationLayerFactory.prototype = { - createAnnotationLayerBuilder: function (pageDiv, pdfPage, renderInteractiveForms) { - return new AnnotationLayerBuilder({ - pageDiv: pageDiv, - pdfPage: pdfPage, - renderInteractiveForms: renderInteractiveForms, - linkService: new SimpleLinkService() - }); - } -}; -exports.AnnotationLayerBuilder = AnnotationLayerBuilder; -exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory; - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var pdfjsLib = __webpack_require__(1); - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -function GrabToPan(options) { - this.element = options.element; - this.document = options.element.ownerDocument; - if (typeof options.ignoreTarget === 'function') { - this.ignoreTarget = options.ignoreTarget; - } - this.onActiveChanged = options.onActiveChanged; - this.activate = this.activate.bind(this); - this.deactivate = this.deactivate.bind(this); - this.toggle = this.toggle.bind(this); - this._onmousedown = this._onmousedown.bind(this); - this._onmousemove = this._onmousemove.bind(this); - this._endPan = this._endPan.bind(this); - var overlay = this.overlay = document.createElement('div'); - overlay.className = 'grab-to-pan-grabbing'; -} -GrabToPan.prototype = { - CSS_CLASS_GRAB: 'grab-to-pan-grab', - activate: function GrabToPan_activate() { - if (!this.active) { - this.active = true; - this.element.addEventListener('mousedown', this._onmousedown, true); - this.element.classList.add(this.CSS_CLASS_GRAB); - if (this.onActiveChanged) { - this.onActiveChanged(true); - } - } - }, - deactivate: function GrabToPan_deactivate() { - if (this.active) { - this.active = false; - this.element.removeEventListener('mousedown', this._onmousedown, true); - this._endPan(); - this.element.classList.remove(this.CSS_CLASS_GRAB); - if (this.onActiveChanged) { - this.onActiveChanged(false); - } - } - }, - toggle: function GrabToPan_toggle() { - if (this.active) { - this.deactivate(); - } else { - this.activate(); - } - }, - ignoreTarget: function GrabToPan_ignoreTarget(node) { - return node[matchesSelector]('a[href], a[href] *, input, textarea, button, button *, select, option'); - }, - _onmousedown: function GrabToPan__onmousedown(event) { - if (event.button !== 0 || this.ignoreTarget(event.target)) { - return; - } - if (event.originalTarget) { - try { - event.originalTarget.tagName; - } catch (e) { - return; - } - } - this.scrollLeftStart = this.element.scrollLeft; - this.scrollTopStart = this.element.scrollTop; - this.clientXStart = event.clientX; - this.clientYStart = event.clientY; - this.document.addEventListener('mousemove', this._onmousemove, true); - this.document.addEventListener('mouseup', this._endPan, true); - this.element.addEventListener('scroll', this._endPan, true); - event.preventDefault(); - event.stopPropagation(); - var focusedElement = document.activeElement; - if (focusedElement && !focusedElement.contains(event.target)) { - focusedElement.blur(); - } - }, - _onmousemove: function GrabToPan__onmousemove(event) { - this.element.removeEventListener('scroll', this._endPan, true); - if (isLeftMouseReleased(event)) { - this._endPan(); - return; - } - var xDiff = event.clientX - this.clientXStart; - var yDiff = event.clientY - this.clientYStart; - var scrollTop = this.scrollTopStart - yDiff; - var scrollLeft = this.scrollLeftStart - xDiff; - if (this.element.scrollTo) { - this.element.scrollTo({ - top: scrollTop, - left: scrollLeft, - behavior: 'instant' - }); - } else { - this.element.scrollTop = scrollTop; - this.element.scrollLeft = scrollLeft; - } - if (!this.overlay.parentNode) { - document.body.appendChild(this.overlay); - } - }, - _endPan: function GrabToPan__endPan() { - this.element.removeEventListener('scroll', this._endPan, true); - this.document.removeEventListener('mousemove', this._onmousemove, true); - this.document.removeEventListener('mouseup', this._endPan, true); - this.overlay.remove(); - } -}; -var matchesSelector; -[ - 'webkitM', - 'mozM', - 'msM', - 'oM', - 'm' -].some(function (prefix) { - var name = prefix + 'atches'; - if (name in document.documentElement) { - matchesSelector = name; - } - name += 'Selector'; - if (name in document.documentElement) { - matchesSelector = name; - } - return matchesSelector; -}); -var isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9; -var chrome = window.chrome; -var isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app); -var isSafari6plus = /Apple/.test(navigator.vendor) && /Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent); -function isLeftMouseReleased(event) { - if ('buttons' in event && isNotIEorIsIE10plus) { - return !(event.buttons & 1); - } - if (isChrome15OrOpera15plus || isSafari6plus) { - return event.which === 0; - } -} -exports.GrabToPan = GrabToPan; - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var grabToPan = __webpack_require__(13); -var preferences = __webpack_require__(7); -var uiUtils = __webpack_require__(0); -var GrabToPan = grabToPan.GrabToPan; -var Preferences = preferences.Preferences; -var localized = uiUtils.localized; -var HandTool = function HandToolClosure() { - function HandTool(options) { - this.container = options.container; - this.eventBus = options.eventBus; - this.wasActive = false; - this.handTool = new GrabToPan({ - element: this.container, - onActiveChanged: function (isActive) { - this.eventBus.dispatch('handtoolchanged', { isActive: isActive }); - }.bind(this) - }); - this.eventBus.on('togglehandtool', this.toggle.bind(this)); - Promise.all([ - localized, - Preferences.get('enableHandToolOnLoad') - ]).then(function resolved(values) { - if (values[1] === true) { - this.handTool.activate(); - } - }.bind(this)).catch(function rejected(reason) { - }); - this.eventBus.on('presentationmodechanged', function (e) { - if (e.switchInProgress) { - return; - } - if (e.active) { - this.enterPresentationMode(); - } else { - this.exitPresentationMode(); - } - }.bind(this)); - } - HandTool.prototype = { - get isActive() { - return !!this.handTool.active; - }, - toggle: function HandTool_toggle() { - this.handTool.toggle(); - }, - enterPresentationMode: function HandTool_enterPresentationMode() { - if (this.isActive) { - this.wasActive = true; - this.handTool.deactivate(); - } - }, - exitPresentationMode: function HandTool_exitPresentationMode() { - if (this.wasActive) { - this.wasActive = false; - this.handTool.activate(); - } - } - }; - return HandTool; -}(); -exports.HandTool = HandTool; - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var overlayManager = __webpack_require__(5); -var pdfjsLib = __webpack_require__(1); -var mozL10n = uiUtils.mozL10n; -var OverlayManager = overlayManager.OverlayManager; -var PasswordPrompt = function PasswordPromptClosure() { - function PasswordPrompt(options) { - this.overlayName = options.overlayName; - this.container = options.container; - this.label = options.label; - this.input = options.input; - this.submitButton = options.submitButton; - this.cancelButton = options.cancelButton; - this.updateCallback = null; - this.reason = null; - this.submitButton.addEventListener('click', this.verify.bind(this)); - this.cancelButton.addEventListener('click', this.close.bind(this)); - this.input.addEventListener('keydown', function (e) { - if (e.keyCode === 13) { - this.verify(); - } - }.bind(this)); - OverlayManager.register(this.overlayName, this.container, this.close.bind(this), true); - } - PasswordPrompt.prototype = { - open: function PasswordPrompt_open() { - OverlayManager.open(this.overlayName).then(function () { - this.input.type = 'password'; - this.input.focus(); - var promptString = mozL10n.get('password_label', null, 'Enter the password to open this PDF file.'); - if (this.reason === pdfjsLib.PasswordResponses.INCORRECT_PASSWORD) { - promptString = mozL10n.get('password_invalid', null, 'Invalid password. Please try again.'); - } - this.label.textContent = promptString; - }.bind(this)); - }, - close: function PasswordPrompt_close() { - OverlayManager.close(this.overlayName).then(function () { - this.input.value = ''; - this.input.type = ''; - }.bind(this)); - }, - verify: function PasswordPrompt_verify() { - var password = this.input.value; - if (password && password.length > 0) { - this.close(); - return this.updateCallback(password); - } - }, - setUpdateCallback: function PasswordPrompt_setUpdateCallback(updateCallback, reason) { - this.updateCallback = updateCallback; - this.reason = reason; - } - }; - return PasswordPrompt; -}(); -exports.PasswordPrompt = PasswordPrompt; - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var pdfjsLib = __webpack_require__(1); -var PDFAttachmentViewer = function PDFAttachmentViewerClosure() { - function PDFAttachmentViewer(options) { - this.attachments = null; - this.container = options.container; - this.eventBus = options.eventBus; - this.downloadManager = options.downloadManager; - this._renderedCapability = pdfjsLib.createPromiseCapability(); - this.eventBus.on('fileattachmentannotation', this._appendAttachment.bind(this)); - } - PDFAttachmentViewer.prototype = { - reset: function PDFAttachmentViewer_reset(keepRenderedCapability) { - this.attachments = null; - var container = this.container; - while (container.firstChild) { - container.removeChild(container.firstChild); - } - if (!keepRenderedCapability) { - this._renderedCapability = pdfjsLib.createPromiseCapability(); - } - }, - _dispatchEvent: function PDFAttachmentViewer_dispatchEvent(attachmentsCount) { - this.eventBus.dispatch('attachmentsloaded', { - source: this, - attachmentsCount: attachmentsCount - }); - this._renderedCapability.resolve(); - }, - _bindPdfLink: function PDFAttachmentViewer_bindPdfLink(button, content, filename) { - var blobUrl; - button.onclick = function () { - if (!blobUrl) { - blobUrl = pdfjsLib.createObjectURL(content, 'application/pdf', pdfjsLib.PDFJS.disableCreateObjectURL); - } - var viewerUrl; - viewerUrl = blobUrl + '?' + encodeURIComponent(filename); - window.open(viewerUrl); - return false; - }; - }, - _bindLink: function PDFAttachmentViewer_bindLink(button, content, filename) { - button.onclick = function downloadFile(e) { - this.downloadManager.downloadData(content, filename, ''); - return false; - }.bind(this); - }, - render: function PDFAttachmentViewer_render(params) { - params = params || {}; - var attachments = params.attachments || null; - var attachmentsCount = 0; - if (this.attachments) { - var keepRenderedCapability = params.keepRenderedCapability === true; - this.reset(keepRenderedCapability); - } - this.attachments = attachments; - if (!attachments) { - this._dispatchEvent(attachmentsCount); - return; - } - var names = Object.keys(attachments).sort(function (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()); - }); - attachmentsCount = names.length; - for (var i = 0; i < attachmentsCount; i++) { - var item = attachments[names[i]]; - var filename = pdfjsLib.getFilenameFromUrl(item.filename); - filename = pdfjsLib.removeNullCharacters(filename); - var div = document.createElement('div'); - div.className = 'attachmentsItem'; - var button = document.createElement('button'); - button.textContent = filename; - if (/\.pdf$/i.test(filename)) { - this._bindPdfLink(button, item.content, filename); - } else { - this._bindLink(button, item.content, filename); - } - div.appendChild(button); - this.container.appendChild(div); - } - this._dispatchEvent(attachmentsCount); - }, - _appendAttachment: function PDFAttachmentViewer_appendAttachment(item) { - this._renderedCapability.promise.then(function (id, filename, content) { - var attachments = this.attachments; - if (!attachments) { - attachments = Object.create(null); - } else { - for (var name in attachments) { - if (id === name) { - return; - } - } - } - attachments[id] = { - filename: filename, - content: content - }; - this.render({ - attachments: attachments, - keepRenderedCapability: true - }); - }.bind(this, item.id, item.filename, item.content)); - } - }; - return PDFAttachmentViewer; -}(); -exports.PDFAttachmentViewer = PDFAttachmentViewer; - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var overlayManager = __webpack_require__(5); -var getPDFFileNameFromURL = uiUtils.getPDFFileNameFromURL; -var mozL10n = uiUtils.mozL10n; -var OverlayManager = overlayManager.OverlayManager; -var PDFDocumentProperties = function PDFDocumentPropertiesClosure() { - function PDFDocumentProperties(options) { - this.fields = options.fields; - this.overlayName = options.overlayName; - this.container = options.container; - this.rawFileSize = 0; - this.url = null; - this.pdfDocument = null; - if (options.closeButton) { - options.closeButton.addEventListener('click', this.close.bind(this)); - } - this.dataAvailablePromise = new Promise(function (resolve) { - this.resolveDataAvailable = resolve; - }.bind(this)); - OverlayManager.register(this.overlayName, this.container, this.close.bind(this)); - } - PDFDocumentProperties.prototype = { - open: function PDFDocumentProperties_open() { - Promise.all([ - OverlayManager.open(this.overlayName), - this.dataAvailablePromise - ]).then(function () { - this._getProperties(); - }.bind(this)); - }, - close: function PDFDocumentProperties_close() { - OverlayManager.close(this.overlayName); - }, - setFileSize: function PDFDocumentProperties_setFileSize(fileSize) { - if (fileSize > 0) { - this.rawFileSize = fileSize; - } - }, - setDocumentAndUrl: function PDFDocumentProperties_setDocumentAndUrl(pdfDocument, url) { - this.pdfDocument = pdfDocument; - this.url = url; - this.resolveDataAvailable(); - }, - _getProperties: function PDFDocumentProperties_getProperties() { - if (!OverlayManager.active) { - return; - } - this.pdfDocument.getDownloadInfo().then(function (data) { - if (data.length === this.rawFileSize) { - return; - } - this.setFileSize(data.length); - this._updateUI(this.fields['fileSize'], this._parseFileSize()); - }.bind(this)); - this.pdfDocument.getMetadata().then(function (data) { - var content = { - 'fileName': getPDFFileNameFromURL(this.url), - 'fileSize': this._parseFileSize(), - 'title': data.info.Title, - 'author': data.info.Author, - 'subject': data.info.Subject, - 'keywords': data.info.Keywords, - 'creationDate': this._parseDate(data.info.CreationDate), - 'modificationDate': this._parseDate(data.info.ModDate), - 'creator': data.info.Creator, - 'producer': data.info.Producer, - 'version': data.info.PDFFormatVersion, - 'pageCount': this.pdfDocument.numPages - }; - for (var identifier in content) { - this._updateUI(this.fields[identifier], content[identifier]); - } - }.bind(this)); - }, - _updateUI: function PDFDocumentProperties_updateUI(field, content) { - if (field && content !== undefined && content !== '') { - field.textContent = content; - } - }, - _parseFileSize: function PDFDocumentProperties_parseFileSize() { - var fileSize = this.rawFileSize, kb = fileSize / 1024; - if (!kb) { - return; - } else if (kb < 1024) { - return mozL10n.get('document_properties_kb', { - size_kb: (+kb.toPrecision(3)).toLocaleString(), - size_b: fileSize.toLocaleString() - }, '{{size_kb}} KB ({{size_b}} bytes)'); - } - return mozL10n.get('document_properties_mb', { - size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(), - size_b: fileSize.toLocaleString() - }, '{{size_mb}} MB ({{size_b}} bytes)'); - }, - _parseDate: function PDFDocumentProperties_parseDate(inputDate) { - var dateToParse = inputDate; - if (dateToParse === undefined) { - return ''; - } - if (dateToParse.substring(0, 2) === 'D:') { - dateToParse = dateToParse.substring(2); - } - var year = parseInt(dateToParse.substring(0, 4), 10); - var month = parseInt(dateToParse.substring(4, 6), 10) - 1; - var day = parseInt(dateToParse.substring(6, 8), 10); - var hours = parseInt(dateToParse.substring(8, 10), 10); - var minutes = parseInt(dateToParse.substring(10, 12), 10); - var seconds = parseInt(dateToParse.substring(12, 14), 10); - var utRel = dateToParse.substring(14, 15); - var offsetHours = parseInt(dateToParse.substring(15, 17), 10); - var offsetMinutes = parseInt(dateToParse.substring(18, 20), 10); - if (utRel === '-') { - hours += offsetHours; - minutes += offsetMinutes; - } else if (utRel === '+') { - hours -= offsetHours; - minutes -= offsetMinutes; - } - var date = new Date(Date.UTC(year, month, day, hours, minutes, seconds)); - var dateString = date.toLocaleDateString(); - var timeString = date.toLocaleTimeString(); - return mozL10n.get('document_properties_date_string', { - date: dateString, - time: timeString - }, '{{date}}, {{time}}'); - } - }; - return PDFDocumentProperties; -}(); -exports.PDFDocumentProperties = PDFDocumentProperties; - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var pdfFindController = __webpack_require__(8); -var mozL10n = uiUtils.mozL10n; -var FindStates = pdfFindController.FindStates; -var PDFFindBar = function PDFFindBarClosure() { - function PDFFindBar(options) { - this.opened = false; - this.bar = options.bar || null; - this.toggleButton = options.toggleButton || null; - this.findField = options.findField || null; - this.highlightAll = options.highlightAllCheckbox || null; - this.caseSensitive = options.caseSensitiveCheckbox || null; - this.findMsg = options.findMsg || null; - this.findResultsCount = options.findResultsCount || null; - this.findStatusIcon = options.findStatusIcon || null; - this.findPreviousButton = options.findPreviousButton || null; - this.findNextButton = options.findNextButton || null; - this.findController = options.findController || null; - this.eventBus = options.eventBus; - if (this.findController === null) { - throw new Error('PDFFindBar cannot be used without a ' + 'PDFFindController instance.'); - } - var self = this; - this.toggleButton.addEventListener('click', function () { - self.toggle(); - }); - this.findField.addEventListener('input', function () { - self.dispatchEvent(''); - }); - this.bar.addEventListener('keydown', function (evt) { - switch (evt.keyCode) { - case 13: - if (evt.target === self.findField) { - self.dispatchEvent('again', evt.shiftKey); - } - break; - case 27: - self.close(); - break; - } - }); - this.findPreviousButton.addEventListener('click', function () { - self.dispatchEvent('again', true); - }); - this.findNextButton.addEventListener('click', function () { - self.dispatchEvent('again', false); - }); - this.highlightAll.addEventListener('click', function () { - self.dispatchEvent('highlightallchange'); - }); - this.caseSensitive.addEventListener('click', function () { - self.dispatchEvent('casesensitivitychange'); - }); - } - PDFFindBar.prototype = { - reset: function PDFFindBar_reset() { - this.updateUIState(); - }, - dispatchEvent: function PDFFindBar_dispatchEvent(type, findPrev) { - this.eventBus.dispatch('find', { - source: this, - type: type, - query: this.findField.value, - caseSensitive: this.caseSensitive.checked, - phraseSearch: true, - highlightAll: this.highlightAll.checked, - findPrevious: findPrev - }); - }, - updateUIState: function PDFFindBar_updateUIState(state, previous, matchCount) { - var notFound = false; - var findMsg = ''; - var status = ''; - switch (state) { - case FindStates.FIND_FOUND: - break; - case FindStates.FIND_PENDING: - status = 'pending'; - break; - case FindStates.FIND_NOTFOUND: - findMsg = mozL10n.get('find_not_found', null, 'Phrase not found'); - notFound = true; - break; - case FindStates.FIND_WRAPPED: - if (previous) { - findMsg = mozL10n.get('find_reached_top', null, 'Reached top of document, continued from bottom'); - } else { - findMsg = mozL10n.get('find_reached_bottom', null, 'Reached end of document, continued from top'); - } - break; - } - if (notFound) { - this.findField.classList.add('notFound'); - } else { - this.findField.classList.remove('notFound'); - } - this.findField.setAttribute('data-status', status); - this.findMsg.textContent = findMsg; - this.updateResultsCount(matchCount); - }, - updateResultsCount: function (matchCount) { - if (!this.findResultsCount) { - return; - } - if (!matchCount) { - this.findResultsCount.classList.add('hidden'); - return; - } - this.findResultsCount.textContent = matchCount.toLocaleString(); - this.findResultsCount.classList.remove('hidden'); - }, - open: function PDFFindBar_open() { - if (!this.opened) { - this.opened = true; - this.toggleButton.classList.add('toggled'); - this.bar.classList.remove('hidden'); - } - this.findField.select(); - this.findField.focus(); - }, - close: function PDFFindBar_close() { - if (!this.opened) { - return; - } - this.opened = false; - this.toggleButton.classList.remove('toggled'); - this.bar.classList.add('hidden'); - this.findController.active = false; - }, - toggle: function PDFFindBar_toggle() { - if (this.opened) { - this.close(); - } else { - this.open(); - } - } - }; - return PDFFindBar; -}(); -exports.PDFFindBar = PDFFindBar; - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var domEvents = __webpack_require__(2); -function PDFHistory(options) { - this.linkService = options.linkService; - this.eventBus = options.eventBus || domEvents.getGlobalEventBus(); - this.initialized = false; - this.initialDestination = null; - this.initialBookmark = null; -} -PDFHistory.prototype = { - initialize: function pdfHistoryInitialize(fingerprint) { - this.initialized = true; - this.reInitialized = false; - this.allowHashChange = true; - this.historyUnlocked = true; - this.isViewerInPresentationMode = false; - this.previousHash = window.location.hash.substring(1); - this.currentBookmark = ''; - this.currentPage = 0; - this.updatePreviousBookmark = false; - this.previousBookmark = ''; - this.previousPage = 0; - this.nextHashParam = ''; - this.fingerprint = fingerprint; - this.currentUid = this.uid = 0; - this.current = {}; - var state = window.history.state; - if (this._isStateObjectDefined(state)) { - if (state.target.dest) { - this.initialDestination = state.target.dest; - } else { - this.initialBookmark = state.target.hash; - } - this.currentUid = state.uid; - this.uid = state.uid + 1; - this.current = state.target; - } else { - if (state && state.fingerprint && this.fingerprint !== state.fingerprint) { - this.reInitialized = true; - } - this._pushOrReplaceState({ fingerprint: this.fingerprint }, true); - } - var self = this; - window.addEventListener('popstate', function pdfHistoryPopstate(evt) { - if (!self.historyUnlocked) { - return; - } - if (evt.state) { - self._goTo(evt.state); - return; - } - if (self.uid === 0) { - var previousParams = self.previousHash && self.currentBookmark && self.previousHash !== self.currentBookmark ? { - hash: self.currentBookmark, - page: self.currentPage - } : { page: 1 }; - replacePreviousHistoryState(previousParams, function () { - updateHistoryWithCurrentHash(); - }); - } else { - updateHistoryWithCurrentHash(); - } - }); - function updateHistoryWithCurrentHash() { - self.previousHash = window.location.hash.slice(1); - self._pushToHistory({ hash: self.previousHash }, false, true); - self._updatePreviousBookmark(); - } - function replacePreviousHistoryState(params, callback) { - self.historyUnlocked = false; - self.allowHashChange = false; - window.addEventListener('popstate', rewriteHistoryAfterBack); - history.back(); - function rewriteHistoryAfterBack() { - window.removeEventListener('popstate', rewriteHistoryAfterBack); - window.addEventListener('popstate', rewriteHistoryAfterForward); - self._pushToHistory(params, false, true); - history.forward(); - } - function rewriteHistoryAfterForward() { - window.removeEventListener('popstate', rewriteHistoryAfterForward); - self.allowHashChange = true; - self.historyUnlocked = true; - callback(); - } - } - function pdfHistoryBeforeUnload() { - var previousParams = self._getPreviousParams(null, true); - if (previousParams) { - var replacePrevious = !self.current.dest && self.current.hash !== self.previousHash; - self._pushToHistory(previousParams, false, replacePrevious); - self._updatePreviousBookmark(); - } - window.removeEventListener('beforeunload', pdfHistoryBeforeUnload); - } - window.addEventListener('beforeunload', pdfHistoryBeforeUnload); - window.addEventListener('pageshow', function pdfHistoryPageShow(evt) { - window.addEventListener('beforeunload', pdfHistoryBeforeUnload); - }); - self.eventBus.on('presentationmodechanged', function (e) { - self.isViewerInPresentationMode = e.active; - }); - }, - clearHistoryState: function pdfHistory_clearHistoryState() { - this._pushOrReplaceState(null, true); - }, - _isStateObjectDefined: function pdfHistory_isStateObjectDefined(state) { - return state && state.uid >= 0 && state.fingerprint && this.fingerprint === state.fingerprint && state.target && state.target.hash ? true : false; - }, - _pushOrReplaceState: function pdfHistory_pushOrReplaceState(stateObj, replace) { - if (replace) { - window.history.replaceState(stateObj, ''); - } else { - window.history.pushState(stateObj, ''); - } - }, - get isHashChangeUnlocked() { - if (!this.initialized) { - return true; - } - return this.allowHashChange; - }, - _updatePreviousBookmark: function pdfHistory_updatePreviousBookmark() { - if (this.updatePreviousBookmark && this.currentBookmark && this.currentPage) { - this.previousBookmark = this.currentBookmark; - this.previousPage = this.currentPage; - this.updatePreviousBookmark = false; - } - }, - updateCurrentBookmark: function pdfHistoryUpdateCurrentBookmark(bookmark, pageNum) { - if (this.initialized) { - this.currentBookmark = bookmark.substring(1); - this.currentPage = pageNum | 0; - this._updatePreviousBookmark(); - } - }, - updateNextHashParam: function pdfHistoryUpdateNextHashParam(param) { - if (this.initialized) { - this.nextHashParam = param; - } - }, - push: function pdfHistoryPush(params, isInitialBookmark) { - if (!(this.initialized && this.historyUnlocked)) { - return; - } - if (params.dest && !params.hash) { - params.hash = this.current.hash && this.current.dest && this.current.dest === params.dest ? this.current.hash : this.linkService.getDestinationHash(params.dest).split('#')[1]; - } - if (params.page) { - params.page |= 0; - } - if (isInitialBookmark) { - var target = window.history.state.target; - if (!target) { - this._pushToHistory(params, false); - this.previousHash = window.location.hash.substring(1); - } - this.updatePreviousBookmark = this.nextHashParam ? false : true; - if (target) { - this._updatePreviousBookmark(); - } - return; - } - if (this.nextHashParam) { - if (this.nextHashParam === params.hash) { - this.nextHashParam = null; - this.updatePreviousBookmark = true; - return; - } - this.nextHashParam = null; - } - if (params.hash) { - if (this.current.hash) { - if (this.current.hash !== params.hash) { - this._pushToHistory(params, true); - } else { - if (!this.current.page && params.page) { - this._pushToHistory(params, false, true); - } - this.updatePreviousBookmark = true; - } - } else { - this._pushToHistory(params, true); - } - } else if (this.current.page && params.page && this.current.page !== params.page) { - this._pushToHistory(params, true); - } - }, - _getPreviousParams: function pdfHistory_getPreviousParams(onlyCheckPage, beforeUnload) { - if (!(this.currentBookmark && this.currentPage)) { - return null; - } else if (this.updatePreviousBookmark) { - this.updatePreviousBookmark = false; - } - if (this.uid > 0 && !(this.previousBookmark && this.previousPage)) { - return null; - } - if (!this.current.dest && !onlyCheckPage || beforeUnload) { - if (this.previousBookmark === this.currentBookmark) { - return null; - } - } else if (this.current.page || onlyCheckPage) { - if (this.previousPage === this.currentPage) { - return null; - } - } else { - return null; - } - var params = { - hash: this.currentBookmark, - page: this.currentPage - }; - if (this.isViewerInPresentationMode) { - params.hash = null; - } - return params; - }, - _stateObj: function pdfHistory_stateObj(params) { - return { - fingerprint: this.fingerprint, - uid: this.uid, - target: params - }; - }, - _pushToHistory: function pdfHistory_pushToHistory(params, addPrevious, overwrite) { - if (!this.initialized) { - return; - } - if (!params.hash && params.page) { - params.hash = 'page=' + params.page; - } - if (addPrevious && !overwrite) { - var previousParams = this._getPreviousParams(); - if (previousParams) { - var replacePrevious = !this.current.dest && this.current.hash !== this.previousHash; - this._pushToHistory(previousParams, false, replacePrevious); - } - } - this._pushOrReplaceState(this._stateObj(params), overwrite || this.uid === 0); - this.currentUid = this.uid++; - this.current = params; - this.updatePreviousBookmark = true; - }, - _goTo: function pdfHistory_goTo(state) { - if (!(this.initialized && this.historyUnlocked && this._isStateObjectDefined(state))) { - return; - } - if (!this.reInitialized && state.uid < this.currentUid) { - var previousParams = this._getPreviousParams(true); - if (previousParams) { - this._pushToHistory(this.current, false); - this._pushToHistory(previousParams, false); - this.currentUid = state.uid; - window.history.back(); - return; - } - } - this.historyUnlocked = false; - if (state.target.dest) { - this.linkService.navigateTo(state.target.dest); - } else { - this.linkService.setHash(state.target.hash); - } - this.currentUid = state.uid; - if (state.uid > this.uid) { - this.uid = state.uid; - } - this.current = state.target; - this.updatePreviousBookmark = true; - var currentHash = window.location.hash.substring(1); - if (this.previousHash !== currentHash) { - this.allowHashChange = false; - } - this.previousHash = currentHash; - this.historyUnlocked = true; - }, - back: function pdfHistoryBack() { - this.go(-1); - }, - forward: function pdfHistoryForward() { - this.go(1); - }, - go: function pdfHistoryGo(direction) { - if (this.initialized && this.historyUnlocked) { - var state = window.history.state; - if (direction === -1 && state && state.uid > 0) { - window.history.back(); - } else if (direction === 1 && state && state.uid < this.uid - 1) { - window.history.forward(); - } - } - } -}; -exports.PDFHistory = PDFHistory; - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var pdfjsLib = __webpack_require__(1); -var PDFJS = pdfjsLib.PDFJS; -var DEFAULT_TITLE = '\u2013'; -var PDFOutlineViewer = function PDFOutlineViewerClosure() { - function PDFOutlineViewer(options) { - this.outline = null; - this.lastToggleIsShow = true; - this.container = options.container; - this.linkService = options.linkService; - this.eventBus = options.eventBus; - } - PDFOutlineViewer.prototype = { - reset: function PDFOutlineViewer_reset() { - this.outline = null; - this.lastToggleIsShow = true; - var container = this.container; - while (container.firstChild) { - container.removeChild(container.firstChild); - } - }, - _dispatchEvent: function PDFOutlineViewer_dispatchEvent(outlineCount) { - this.eventBus.dispatch('outlineloaded', { - source: this, - outlineCount: outlineCount - }); - }, - _bindLink: function PDFOutlineViewer_bindLink(element, item) { - if (item.url) { - pdfjsLib.addLinkAttributes(element, { - url: item.url, - target: item.newWindow ? PDFJS.LinkTarget.BLANK : undefined - }); - return; - } - var self = this, destination = item.dest; - element.href = self.linkService.getDestinationHash(destination); - element.onclick = function () { - if (destination) { - self.linkService.navigateTo(destination); - } - return false; - }; - }, - _setStyles: function PDFOutlineViewer_setStyles(element, item) { - var styleStr = ''; - if (item.bold) { - styleStr += 'font-weight: bold;'; - } - if (item.italic) { - styleStr += 'font-style: italic;'; - } - if (styleStr) { - element.setAttribute('style', styleStr); - } - }, - _addToggleButton: function PDFOutlineViewer_addToggleButton(div) { - var toggler = document.createElement('div'); - toggler.className = 'outlineItemToggler'; - toggler.onclick = function (event) { - event.stopPropagation(); - toggler.classList.toggle('outlineItemsHidden'); - if (event.shiftKey) { - var shouldShowAll = !toggler.classList.contains('outlineItemsHidden'); - this._toggleOutlineItem(div, shouldShowAll); - } - }.bind(this); - div.insertBefore(toggler, div.firstChild); - }, - _toggleOutlineItem: function PDFOutlineViewer_toggleOutlineItem(root, show) { - this.lastToggleIsShow = show; - var togglers = root.querySelectorAll('.outlineItemToggler'); - for (var i = 0, ii = togglers.length; i < ii; ++i) { - togglers[i].classList[show ? 'remove' : 'add']('outlineItemsHidden'); - } - }, - toggleOutlineTree: function PDFOutlineViewer_toggleOutlineTree() { - if (!this.outline) { - return; - } - this._toggleOutlineItem(this.container, !this.lastToggleIsShow); - }, - render: function PDFOutlineViewer_render(params) { - var outline = params && params.outline || null; - var outlineCount = 0; - if (this.outline) { - this.reset(); - } - this.outline = outline; - if (!outline) { - this._dispatchEvent(outlineCount); - return; - } - var fragment = document.createDocumentFragment(); - var queue = [{ - parent: fragment, - items: this.outline - }]; - var hasAnyNesting = false; - while (queue.length > 0) { - var levelData = queue.shift(); - for (var i = 0, len = levelData.items.length; i < len; i++) { - var item = levelData.items[i]; - var div = document.createElement('div'); - div.className = 'outlineItem'; - var element = document.createElement('a'); - this._bindLink(element, item); - this._setStyles(element, item); - element.textContent = pdfjsLib.removeNullCharacters(item.title) || DEFAULT_TITLE; - div.appendChild(element); - if (item.items.length > 0) { - hasAnyNesting = true; - this._addToggleButton(div); - var itemsDiv = document.createElement('div'); - itemsDiv.className = 'outlineItems'; - div.appendChild(itemsDiv); - queue.push({ - parent: itemsDiv, - items: item.items - }); - } - levelData.parent.appendChild(div); - outlineCount++; - } - } - if (hasAnyNesting) { - this.container.classList.add('outlineWithDeepNesting'); - } - this.container.appendChild(fragment); - this._dispatchEvent(outlineCount); - } - }; - return PDFOutlineViewer; -}(); -exports.PDFOutlineViewer = PDFOutlineViewer; - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var pdfRenderingQueue = __webpack_require__(3); -var domEvents = __webpack_require__(2); -var pdfjsLib = __webpack_require__(1); -var CSS_UNITS = uiUtils.CSS_UNITS; -var DEFAULT_SCALE = uiUtils.DEFAULT_SCALE; -var getOutputScale = uiUtils.getOutputScale; -var approximateFraction = uiUtils.approximateFraction; -var roundToDivide = uiUtils.roundToDivide; -var RendererType = uiUtils.RendererType; -var RenderingStates = pdfRenderingQueue.RenderingStates; -var TEXT_LAYER_RENDER_DELAY = 200; -var PDFPageView = function PDFPageViewClosure() { - function PDFPageView(options) { - var container = options.container; - var id = options.id; - var scale = options.scale; - var defaultViewport = options.defaultViewport; - var renderingQueue = options.renderingQueue; - var textLayerFactory = options.textLayerFactory; - var annotationLayerFactory = options.annotationLayerFactory; - var enhanceTextSelection = options.enhanceTextSelection || false; - var renderInteractiveForms = options.renderInteractiveForms || false; - this.id = id; - this.renderingId = 'page' + id; - this.pageLabel = null; - this.rotation = 0; - this.scale = scale || DEFAULT_SCALE; - this.viewport = defaultViewport; - this.pdfPageRotate = defaultViewport.rotation; - this.hasRestrictedScaling = false; - this.enhanceTextSelection = enhanceTextSelection; - this.renderInteractiveForms = renderInteractiveForms; - this.eventBus = options.eventBus || domEvents.getGlobalEventBus(); - this.renderingQueue = renderingQueue; - this.textLayerFactory = textLayerFactory; - this.annotationLayerFactory = annotationLayerFactory; - this.renderer = options.renderer || RendererType.CANVAS; - this.paintTask = null; - this.paintedViewportMap = new WeakMap(); - this.renderingState = RenderingStates.INITIAL; - this.resume = null; - this.error = null; - this.onBeforeDraw = null; - this.onAfterDraw = null; - this.textLayer = null; - this.zoomLayer = null; - this.annotationLayer = null; - var div = document.createElement('div'); - div.className = 'page'; - div.style.width = Math.floor(this.viewport.width) + 'px'; - div.style.height = Math.floor(this.viewport.height) + 'px'; - div.setAttribute('data-page-number', this.id); - this.div = div; - container.appendChild(div); - } - PDFPageView.prototype = { - setPdfPage: function PDFPageView_setPdfPage(pdfPage) { - this.pdfPage = pdfPage; - this.pdfPageRotate = pdfPage.rotate; - var totalRotation = (this.rotation + this.pdfPageRotate) % 360; - this.viewport = pdfPage.getViewport(this.scale * CSS_UNITS, totalRotation); - this.stats = pdfPage.stats; - this.reset(); - }, - destroy: function PDFPageView_destroy() { - this.zoomLayer = null; - this.reset(); - if (this.pdfPage) { - this.pdfPage.cleanup(); - } - }, - reset: function PDFPageView_reset(keepZoomLayer, keepAnnotations) { - this.cancelRendering(); - var div = this.div; - div.style.width = Math.floor(this.viewport.width) + 'px'; - div.style.height = Math.floor(this.viewport.height) + 'px'; - var childNodes = div.childNodes; - var currentZoomLayerNode = keepZoomLayer && this.zoomLayer || null; - var currentAnnotationNode = keepAnnotations && this.annotationLayer && this.annotationLayer.div || null; - for (var i = childNodes.length - 1; i >= 0; i--) { - var node = childNodes[i]; - if (currentZoomLayerNode === node || currentAnnotationNode === node) { - continue; - } - div.removeChild(node); - } - div.removeAttribute('data-loaded'); - if (currentAnnotationNode) { - this.annotationLayer.hide(); - } else { - this.annotationLayer = null; - } - if (this.canvas && !currentZoomLayerNode) { - this.paintedViewportMap.delete(this.canvas); - this.canvas.width = 0; - this.canvas.height = 0; - delete this.canvas; - } - if (this.svg) { - this.paintedViewportMap.delete(this.svg); - delete this.svg; - } - this.loadingIconDiv = document.createElement('div'); - this.loadingIconDiv.className = 'loadingIcon'; - div.appendChild(this.loadingIconDiv); - }, - update: function PDFPageView_update(scale, rotation) { - this.scale = scale || this.scale; - if (typeof rotation !== 'undefined') { - this.rotation = rotation; - } - var totalRotation = (this.rotation + this.pdfPageRotate) % 360; - this.viewport = this.viewport.clone({ - scale: this.scale * CSS_UNITS, - rotation: totalRotation - }); - if (this.svg) { - this.cssTransform(this.svg, true); - this.eventBus.dispatch('pagerendered', { - source: this, - pageNumber: this.id, - cssTransform: true - }); - return; - } - var isScalingRestricted = false; - if (this.canvas && pdfjsLib.PDFJS.maxCanvasPixels > 0) { - var outputScale = this.outputScale; - if ((Math.floor(this.viewport.width) * outputScale.sx | 0) * (Math.floor(this.viewport.height) * outputScale.sy | 0) > pdfjsLib.PDFJS.maxCanvasPixels) { - isScalingRestricted = true; - } - } - if (this.canvas) { - if (pdfjsLib.PDFJS.useOnlyCssZoom || this.hasRestrictedScaling && isScalingRestricted) { - this.cssTransform(this.canvas, true); - this.eventBus.dispatch('pagerendered', { - source: this, - pageNumber: this.id, - cssTransform: true - }); - return; - } - if (!this.zoomLayer) { - this.zoomLayer = this.canvas.parentNode; - this.zoomLayer.style.position = 'absolute'; - } - } - if (this.zoomLayer) { - this.cssTransform(this.zoomLayer.firstChild); - } - this.reset(true, true); - }, - cancelRendering: function PDFPageView_cancelRendering() { - if (this.paintTask) { - this.paintTask.cancel(); - this.paintTask = null; - } - this.renderingState = RenderingStates.INITIAL; - this.resume = null; - if (this.textLayer) { - this.textLayer.cancel(); - this.textLayer = null; - } - }, - updatePosition: function PDFPageView_updatePosition() { - if (this.textLayer) { - this.textLayer.render(TEXT_LAYER_RENDER_DELAY); - } - }, - cssTransform: function PDFPageView_transform(target, redrawAnnotations) { - var CustomStyle = pdfjsLib.CustomStyle; - var width = this.viewport.width; - var height = this.viewport.height; - var div = this.div; - target.style.width = target.parentNode.style.width = div.style.width = Math.floor(width) + 'px'; - target.style.height = target.parentNode.style.height = div.style.height = Math.floor(height) + 'px'; - var relativeRotation = this.viewport.rotation - this.paintedViewportMap.get(target).rotation; - var absRotation = Math.abs(relativeRotation); - var scaleX = 1, scaleY = 1; - if (absRotation === 90 || absRotation === 270) { - scaleX = height / width; - scaleY = width / height; - } - var cssTransform = 'rotate(' + relativeRotation + 'deg) ' + 'scale(' + scaleX + ',' + scaleY + ')'; - CustomStyle.setProp('transform', target, cssTransform); - if (this.textLayer) { - var textLayerViewport = this.textLayer.viewport; - var textRelativeRotation = this.viewport.rotation - textLayerViewport.rotation; - var textAbsRotation = Math.abs(textRelativeRotation); - var scale = width / textLayerViewport.width; - if (textAbsRotation === 90 || textAbsRotation === 270) { - scale = width / textLayerViewport.height; - } - var textLayerDiv = this.textLayer.textLayerDiv; - var transX, transY; - switch (textAbsRotation) { - case 0: - transX = transY = 0; - break; - case 90: - transX = 0; - transY = '-' + textLayerDiv.style.height; - break; - case 180: - transX = '-' + textLayerDiv.style.width; - transY = '-' + textLayerDiv.style.height; - break; - case 270: - transX = '-' + textLayerDiv.style.width; - transY = 0; - break; - default: - console.error('Bad rotation value.'); - break; - } - CustomStyle.setProp('transform', textLayerDiv, 'rotate(' + textAbsRotation + 'deg) ' + 'scale(' + scale + ', ' + scale + ') ' + 'translate(' + transX + ', ' + transY + ')'); - CustomStyle.setProp('transformOrigin', textLayerDiv, '0% 0%'); - } - if (redrawAnnotations && this.annotationLayer) { - this.annotationLayer.render(this.viewport, 'display'); - } - }, - get width() { - return this.viewport.width; - }, - get height() { - return this.viewport.height; - }, - getPagePoint: function PDFPageView_getPagePoint(x, y) { - return this.viewport.convertToPdfPoint(x, y); - }, - draw: function PDFPageView_draw() { - if (this.renderingState !== RenderingStates.INITIAL) { - console.error('Must be in new state before drawing'); - this.reset(); - } - this.renderingState = RenderingStates.RUNNING; - var self = this; - var pdfPage = this.pdfPage; - var div = this.div; - var canvasWrapper = document.createElement('div'); - canvasWrapper.style.width = div.style.width; - canvasWrapper.style.height = div.style.height; - canvasWrapper.classList.add('canvasWrapper'); - if (this.annotationLayer && this.annotationLayer.div) { - div.insertBefore(canvasWrapper, this.annotationLayer.div); - } else { - div.appendChild(canvasWrapper); - } - var textLayerDiv = null; - var textLayer = null; - if (this.textLayerFactory) { - textLayerDiv = document.createElement('div'); - textLayerDiv.className = 'textLayer'; - textLayerDiv.style.width = canvasWrapper.style.width; - textLayerDiv.style.height = canvasWrapper.style.height; - if (this.annotationLayer && this.annotationLayer.div) { - div.insertBefore(textLayerDiv, this.annotationLayer.div); - } else { - div.appendChild(textLayerDiv); - } - textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport, this.enhanceTextSelection); - } - this.textLayer = textLayer; - var renderContinueCallback = null; - if (this.renderingQueue) { - renderContinueCallback = function renderContinueCallback(cont) { - if (!self.renderingQueue.isHighestPriority(self)) { - self.renderingState = RenderingStates.PAUSED; - self.resume = function resumeCallback() { - self.renderingState = RenderingStates.RUNNING; - cont(); - }; - return; - } - cont(); - }; - } - var finishPaintTask = function finishPaintTask(error) { - if (paintTask === self.paintTask) { - self.paintTask = null; - } - if (error === 'cancelled') { - self.error = null; - return Promise.resolve(undefined); - } - self.renderingState = RenderingStates.FINISHED; - if (self.loadingIconDiv) { - div.removeChild(self.loadingIconDiv); - delete self.loadingIconDiv; - } - if (self.zoomLayer) { - var zoomLayerCanvas = self.zoomLayer.firstChild; - self.paintedViewportMap.delete(zoomLayerCanvas); - zoomLayerCanvas.width = 0; - zoomLayerCanvas.height = 0; - if (div.contains(self.zoomLayer)) { - div.removeChild(self.zoomLayer); - } - self.zoomLayer = null; - } - self.error = error; - self.stats = pdfPage.stats; - if (self.onAfterDraw) { - self.onAfterDraw(); - } - self.eventBus.dispatch('pagerendered', { - source: self, - pageNumber: self.id, - cssTransform: false - }); - if (error) { - return Promise.reject(error); - } - return Promise.resolve(undefined); - }; - var paintTask = this.renderer === RendererType.SVG ? this.paintOnSvg(canvasWrapper) : this.paintOnCanvas(canvasWrapper); - paintTask.onRenderContinue = renderContinueCallback; - this.paintTask = paintTask; - var resultPromise = paintTask.promise.then(function () { - return finishPaintTask(null).then(function () { - if (textLayer) { - pdfPage.getTextContent({ normalizeWhitespace: true }).then(function textContentResolved(textContent) { - textLayer.setTextContent(textContent); - textLayer.render(TEXT_LAYER_RENDER_DELAY); - }); - } - }); - }, function (reason) { - return finishPaintTask(reason); - }); - if (this.annotationLayerFactory) { - if (!this.annotationLayer) { - this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(div, pdfPage, this.renderInteractiveForms); - } - this.annotationLayer.render(this.viewport, 'display'); - } - div.setAttribute('data-loaded', true); - if (this.onBeforeDraw) { - this.onBeforeDraw(); - } - return resultPromise; - }, - paintOnCanvas: function (canvasWrapper) { - var resolveRenderPromise, rejectRenderPromise; - var promise = new Promise(function (resolve, reject) { - resolveRenderPromise = resolve; - rejectRenderPromise = reject; - }); - var result = { - promise: promise, - onRenderContinue: function (cont) { - cont(); - }, - cancel: function () { - renderTask.cancel(); - } - }; - var viewport = this.viewport; - var canvas = document.createElement('canvas'); - canvas.id = 'page' + this.id; - canvas.setAttribute('hidden', 'hidden'); - var isCanvasHidden = true; - var showCanvas = function () { - if (isCanvasHidden) { - canvas.removeAttribute('hidden'); - isCanvasHidden = false; - } - }; - canvasWrapper.appendChild(canvas); - this.canvas = canvas; - canvas.mozOpaque = true; - var ctx = canvas.getContext('2d', { alpha: false }); - var outputScale = getOutputScale(ctx); - this.outputScale = outputScale; - if (pdfjsLib.PDFJS.useOnlyCssZoom) { - var actualSizeViewport = viewport.clone({ scale: CSS_UNITS }); - outputScale.sx *= actualSizeViewport.width / viewport.width; - outputScale.sy *= actualSizeViewport.height / viewport.height; - outputScale.scaled = true; - } - if (pdfjsLib.PDFJS.maxCanvasPixels > 0) { - var pixelsInViewport = viewport.width * viewport.height; - var maxScale = Math.sqrt(pdfjsLib.PDFJS.maxCanvasPixels / pixelsInViewport); - if (outputScale.sx > maxScale || outputScale.sy > maxScale) { - outputScale.sx = maxScale; - outputScale.sy = maxScale; - outputScale.scaled = true; - this.hasRestrictedScaling = true; - } else { - this.hasRestrictedScaling = false; - } - } - var sfx = approximateFraction(outputScale.sx); - var sfy = approximateFraction(outputScale.sy); - canvas.width = roundToDivide(viewport.width * outputScale.sx, sfx[0]); - canvas.height = roundToDivide(viewport.height * outputScale.sy, sfy[0]); - canvas.style.width = roundToDivide(viewport.width, sfx[1]) + 'px'; - canvas.style.height = roundToDivide(viewport.height, sfy[1]) + 'px'; - this.paintedViewportMap.set(canvas, viewport); - var transform = !outputScale.scaled ? null : [ - outputScale.sx, - 0, - 0, - outputScale.sy, - 0, - 0 - ]; - var renderContext = { - canvasContext: ctx, - transform: transform, - viewport: this.viewport, - renderInteractiveForms: this.renderInteractiveForms - }; - var renderTask = this.pdfPage.render(renderContext); - renderTask.onContinue = function (cont) { - showCanvas(); - if (result.onRenderContinue) { - result.onRenderContinue(cont); - } else { - cont(); - } - }; - renderTask.promise.then(function pdfPageRenderCallback() { - showCanvas(); - resolveRenderPromise(undefined); - }, function pdfPageRenderError(error) { - showCanvas(); - rejectRenderPromise(error); - }); - return result; - }, - paintOnSvg: function PDFPageView_paintOnSvg(wrapper) { - return { - promise: Promise.reject(new Error('SVG rendering is not supported.')), - onRenderContinue: function (cont) { - }, - cancel: function () { - } - }; - }, - setPageLabel: function PDFView_setPageLabel(label) { - this.pageLabel = typeof label === 'string' ? label : null; - if (this.pageLabel !== null) { - this.div.setAttribute('data-page-label', this.pageLabel); - } else { - this.div.removeAttribute('data-page-label'); - } - } - }; - return PDFPageView; -}(); -exports.PDFPageView = PDFPageView; - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var normalizeWheelEventDelta = uiUtils.normalizeWheelEventDelta; -var DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; -var DELAY_BEFORE_HIDING_CONTROLS = 3000; -var ACTIVE_SELECTOR = 'pdfPresentationMode'; -var CONTROLS_SELECTOR = 'pdfPresentationModeControls'; -var PDFPresentationMode = function PDFPresentationModeClosure() { - function PDFPresentationMode(options) { - this.container = options.container; - this.viewer = options.viewer || options.container.firstElementChild; - this.pdfViewer = options.pdfViewer; - this.eventBus = options.eventBus; - var contextMenuItems = options.contextMenuItems || null; - this.active = false; - this.args = null; - this.contextMenuOpen = false; - this.mouseScrollTimeStamp = 0; - this.mouseScrollDelta = 0; - this.touchSwipeState = null; - if (contextMenuItems) { - contextMenuItems.contextFirstPage.addEventListener('click', function PDFPresentationMode_contextFirstPageClick(e) { - this.contextMenuOpen = false; - this.eventBus.dispatch('firstpage'); - }.bind(this)); - contextMenuItems.contextLastPage.addEventListener('click', function PDFPresentationMode_contextLastPageClick(e) { - this.contextMenuOpen = false; - this.eventBus.dispatch('lastpage'); - }.bind(this)); - contextMenuItems.contextPageRotateCw.addEventListener('click', function PDFPresentationMode_contextPageRotateCwClick(e) { - this.contextMenuOpen = false; - this.eventBus.dispatch('rotatecw'); - }.bind(this)); - contextMenuItems.contextPageRotateCcw.addEventListener('click', function PDFPresentationMode_contextPageRotateCcwClick(e) { - this.contextMenuOpen = false; - this.eventBus.dispatch('rotateccw'); - }.bind(this)); - } - } - PDFPresentationMode.prototype = { - request: function PDFPresentationMode_request() { - if (this.switchInProgress || this.active || !this.viewer.hasChildNodes()) { - return false; - } - this._addFullscreenChangeListeners(); - this._setSwitchInProgress(); - this._notifyStateChange(); - if (this.container.requestFullscreen) { - this.container.requestFullscreen(); - } else if (this.container.mozRequestFullScreen) { - this.container.mozRequestFullScreen(); - } else if (this.container.webkitRequestFullscreen) { - this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); - } else if (this.container.msRequestFullscreen) { - this.container.msRequestFullscreen(); - } else { - return false; - } - this.args = { - page: this.pdfViewer.currentPageNumber, - previousScale: this.pdfViewer.currentScaleValue - }; - return true; - }, - _mouseWheel: function PDFPresentationMode_mouseWheel(evt) { - if (!this.active) { - return; - } - evt.preventDefault(); - var delta = normalizeWheelEventDelta(evt); - var MOUSE_SCROLL_COOLDOWN_TIME = 50; - var PAGE_SWITCH_THRESHOLD = 0.1; - var currentTime = new Date().getTime(); - var storedTime = this.mouseScrollTimeStamp; - if (currentTime > storedTime && currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) { - return; - } - if (this.mouseScrollDelta > 0 && delta < 0 || this.mouseScrollDelta < 0 && delta > 0) { - this._resetMouseScrollState(); - } - this.mouseScrollDelta += delta; - if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) { - var totalDelta = this.mouseScrollDelta; - this._resetMouseScrollState(); - var success = totalDelta > 0 ? this._goToPreviousPage() : this._goToNextPage(); - if (success) { - this.mouseScrollTimeStamp = currentTime; - } - } - }, - get isFullscreen() { - return !!(document.fullscreenElement || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement); - }, - _goToPreviousPage: function PDFPresentationMode_goToPreviousPage() { - var page = this.pdfViewer.currentPageNumber; - if (page <= 1) { - return false; - } - this.pdfViewer.currentPageNumber = page - 1; - return true; - }, - _goToNextPage: function PDFPresentationMode_goToNextPage() { - var page = this.pdfViewer.currentPageNumber; - if (page >= this.pdfViewer.pagesCount) { - return false; - } - this.pdfViewer.currentPageNumber = page + 1; - return true; - }, - _notifyStateChange: function PDFPresentationMode_notifyStateChange() { - this.eventBus.dispatch('presentationmodechanged', { - source: this, - active: this.active, - switchInProgress: !!this.switchInProgress - }); - }, - _setSwitchInProgress: function PDFPresentationMode_setSwitchInProgress() { - if (this.switchInProgress) { - clearTimeout(this.switchInProgress); - } - this.switchInProgress = setTimeout(function switchInProgressTimeout() { - this._removeFullscreenChangeListeners(); - delete this.switchInProgress; - this._notifyStateChange(); - }.bind(this), DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS); - }, - _resetSwitchInProgress: function PDFPresentationMode_resetSwitchInProgress() { - if (this.switchInProgress) { - clearTimeout(this.switchInProgress); - delete this.switchInProgress; - } - }, - _enter: function PDFPresentationMode_enter() { - this.active = true; - this._resetSwitchInProgress(); - this._notifyStateChange(); - this.container.classList.add(ACTIVE_SELECTOR); - setTimeout(function enterPresentationModeTimeout() { - this.pdfViewer.currentPageNumber = this.args.page; - this.pdfViewer.currentScaleValue = 'page-fit'; - }.bind(this), 0); - this._addWindowListeners(); - this._showControls(); - this.contextMenuOpen = false; - this.container.setAttribute('contextmenu', 'viewerContextMenu'); - window.getSelection().removeAllRanges(); - }, - _exit: function PDFPresentationMode_exit() { - var page = this.pdfViewer.currentPageNumber; - this.container.classList.remove(ACTIVE_SELECTOR); - setTimeout(function exitPresentationModeTimeout() { - this.active = false; - this._removeFullscreenChangeListeners(); - this._notifyStateChange(); - this.pdfViewer.currentScaleValue = this.args.previousScale; - this.pdfViewer.currentPageNumber = page; - this.args = null; - }.bind(this), 0); - this._removeWindowListeners(); - this._hideControls(); - this._resetMouseScrollState(); - this.container.removeAttribute('contextmenu'); - this.contextMenuOpen = false; - }, - _mouseDown: function PDFPresentationMode_mouseDown(evt) { - if (this.contextMenuOpen) { - this.contextMenuOpen = false; - evt.preventDefault(); - return; - } - if (evt.button === 0) { - var isInternalLink = evt.target.href && evt.target.classList.contains('internalLink'); - if (!isInternalLink) { - evt.preventDefault(); - this.pdfViewer.currentPageNumber += evt.shiftKey ? -1 : 1; - } - } - }, - _contextMenu: function PDFPresentationMode_contextMenu() { - this.contextMenuOpen = true; - }, - _showControls: function PDFPresentationMode_showControls() { - if (this.controlsTimeout) { - clearTimeout(this.controlsTimeout); - } else { - this.container.classList.add(CONTROLS_SELECTOR); - } - this.controlsTimeout = setTimeout(function showControlsTimeout() { - this.container.classList.remove(CONTROLS_SELECTOR); - delete this.controlsTimeout; - }.bind(this), DELAY_BEFORE_HIDING_CONTROLS); - }, - _hideControls: function PDFPresentationMode_hideControls() { - if (!this.controlsTimeout) { - return; - } - clearTimeout(this.controlsTimeout); - this.container.classList.remove(CONTROLS_SELECTOR); - delete this.controlsTimeout; - }, - _resetMouseScrollState: function PDFPresentationMode_resetMouseScrollState() { - this.mouseScrollTimeStamp = 0; - this.mouseScrollDelta = 0; - }, - _touchSwipe: function PDFPresentationMode_touchSwipe(evt) { - if (!this.active) { - return; - } - var SWIPE_MIN_DISTANCE_THRESHOLD = 50; - var SWIPE_ANGLE_THRESHOLD = Math.PI / 6; - if (evt.touches.length > 1) { - this.touchSwipeState = null; - return; - } - switch (evt.type) { - case 'touchstart': - this.touchSwipeState = { - startX: evt.touches[0].pageX, - startY: evt.touches[0].pageY, - endX: evt.touches[0].pageX, - endY: evt.touches[0].pageY - }; - break; - case 'touchmove': - if (this.touchSwipeState === null) { - return; - } - this.touchSwipeState.endX = evt.touches[0].pageX; - this.touchSwipeState.endY = evt.touches[0].pageY; - evt.preventDefault(); - break; - case 'touchend': - if (this.touchSwipeState === null) { - return; - } - var delta = 0; - var dx = this.touchSwipeState.endX - this.touchSwipeState.startX; - var dy = this.touchSwipeState.endY - this.touchSwipeState.startY; - var absAngle = Math.abs(Math.atan2(dy, dx)); - if (Math.abs(dx) > SWIPE_MIN_DISTANCE_THRESHOLD && (absAngle <= SWIPE_ANGLE_THRESHOLD || absAngle >= Math.PI - SWIPE_ANGLE_THRESHOLD)) { - delta = dx; - } else if (Math.abs(dy) > SWIPE_MIN_DISTANCE_THRESHOLD && Math.abs(absAngle - Math.PI / 2) <= SWIPE_ANGLE_THRESHOLD) { - delta = dy; - } - if (delta > 0) { - this._goToPreviousPage(); - } else if (delta < 0) { - this._goToNextPage(); - } - break; - } - }, - _addWindowListeners: function PDFPresentationMode_addWindowListeners() { - this.showControlsBind = this._showControls.bind(this); - this.mouseDownBind = this._mouseDown.bind(this); - this.mouseWheelBind = this._mouseWheel.bind(this); - this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this); - this.contextMenuBind = this._contextMenu.bind(this); - this.touchSwipeBind = this._touchSwipe.bind(this); - window.addEventListener('mousemove', this.showControlsBind); - window.addEventListener('mousedown', this.mouseDownBind); - window.addEventListener('wheel', this.mouseWheelBind); - window.addEventListener('keydown', this.resetMouseScrollStateBind); - window.addEventListener('contextmenu', this.contextMenuBind); - window.addEventListener('touchstart', this.touchSwipeBind); - window.addEventListener('touchmove', this.touchSwipeBind); - window.addEventListener('touchend', this.touchSwipeBind); - }, - _removeWindowListeners: function PDFPresentationMode_removeWindowListeners() { - window.removeEventListener('mousemove', this.showControlsBind); - window.removeEventListener('mousedown', this.mouseDownBind); - window.removeEventListener('wheel', this.mouseWheelBind); - window.removeEventListener('keydown', this.resetMouseScrollStateBind); - window.removeEventListener('contextmenu', this.contextMenuBind); - window.removeEventListener('touchstart', this.touchSwipeBind); - window.removeEventListener('touchmove', this.touchSwipeBind); - window.removeEventListener('touchend', this.touchSwipeBind); - delete this.showControlsBind; - delete this.mouseDownBind; - delete this.mouseWheelBind; - delete this.resetMouseScrollStateBind; - delete this.contextMenuBind; - delete this.touchSwipeBind; - }, - _fullscreenChange: function PDFPresentationMode_fullscreenChange() { - if (this.isFullscreen) { - this._enter(); - } else { - this._exit(); - } - }, - _addFullscreenChangeListeners: function PDFPresentationMode_addFullscreenChangeListeners() { - this.fullscreenChangeBind = this._fullscreenChange.bind(this); - window.addEventListener('fullscreenchange', this.fullscreenChangeBind); - window.addEventListener('mozfullscreenchange', this.fullscreenChangeBind); - }, - _removeFullscreenChangeListeners: function PDFPresentationMode_removeFullscreenChangeListeners() { - window.removeEventListener('fullscreenchange', this.fullscreenChangeBind); - window.removeEventListener('mozfullscreenchange', this.fullscreenChangeBind); - delete this.fullscreenChangeBind; - } - }; - return PDFPresentationMode; -}(); -exports.PDFPresentationMode = PDFPresentationMode; - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var pdfRenderingQueue = __webpack_require__(3); -var uiUtils = __webpack_require__(0); -var RenderingStates = pdfRenderingQueue.RenderingStates; -var mozL10n = uiUtils.mozL10n; -var UI_NOTIFICATION_CLASS = 'pdfSidebarNotification'; -var SidebarView = { - NONE: 0, - THUMBS: 1, - OUTLINE: 2, - ATTACHMENTS: 3 -}; -var PDFSidebar = function PDFSidebarClosure() { - function PDFSidebar(options) { - this.isOpen = false; - this.active = SidebarView.THUMBS; - this.isInitialViewSet = false; - this.onToggled = null; - this.pdfViewer = options.pdfViewer; - this.pdfThumbnailViewer = options.pdfThumbnailViewer; - this.pdfOutlineViewer = options.pdfOutlineViewer; - this.mainContainer = options.mainContainer; - this.outerContainer = options.outerContainer; - this.eventBus = options.eventBus; - this.toggleButton = options.toggleButton; - this.thumbnailButton = options.thumbnailButton; - this.outlineButton = options.outlineButton; - this.attachmentsButton = options.attachmentsButton; - this.thumbnailView = options.thumbnailView; - this.outlineView = options.outlineView; - this.attachmentsView = options.attachmentsView; - this.disableNotification = options.disableNotification || false; - this._addEventListeners(); - } - PDFSidebar.prototype = { - reset: function PDFSidebar_reset() { - this.isInitialViewSet = false; - this._hideUINotification(null); - this.switchView(SidebarView.THUMBS); - this.outlineButton.disabled = false; - this.attachmentsButton.disabled = false; - }, - get visibleView() { - return this.isOpen ? this.active : SidebarView.NONE; - }, - get isThumbnailViewVisible() { - return this.isOpen && this.active === SidebarView.THUMBS; - }, - get isOutlineViewVisible() { - return this.isOpen && this.active === SidebarView.OUTLINE; - }, - get isAttachmentsViewVisible() { - return this.isOpen && this.active === SidebarView.ATTACHMENTS; - }, - setInitialView: function PDFSidebar_setInitialView(view) { - if (this.isInitialViewSet) { - return; - } - this.isInitialViewSet = true; - if (this.isOpen && view === SidebarView.NONE) { - this._dispatchEvent(); - return; - } - var isViewPreserved = view === this.visibleView; - this.switchView(view, true); - if (isViewPreserved) { - this._dispatchEvent(); - } - }, - switchView: function PDFSidebar_switchView(view, forceOpen) { - if (view === SidebarView.NONE) { - this.close(); - return; - } - var isViewChanged = view !== this.active; - var shouldForceRendering = false; - switch (view) { - case SidebarView.THUMBS: - this.thumbnailButton.classList.add('toggled'); - this.outlineButton.classList.remove('toggled'); - this.attachmentsButton.classList.remove('toggled'); - this.thumbnailView.classList.remove('hidden'); - this.outlineView.classList.add('hidden'); - this.attachmentsView.classList.add('hidden'); - if (this.isOpen && isViewChanged) { - this._updateThumbnailViewer(); - shouldForceRendering = true; - } - break; - case SidebarView.OUTLINE: - if (this.outlineButton.disabled) { - return; - } - this.thumbnailButton.classList.remove('toggled'); - this.outlineButton.classList.add('toggled'); - this.attachmentsButton.classList.remove('toggled'); - this.thumbnailView.classList.add('hidden'); - this.outlineView.classList.remove('hidden'); - this.attachmentsView.classList.add('hidden'); - break; - case SidebarView.ATTACHMENTS: - if (this.attachmentsButton.disabled) { - return; - } - this.thumbnailButton.classList.remove('toggled'); - this.outlineButton.classList.remove('toggled'); - this.attachmentsButton.classList.add('toggled'); - this.thumbnailView.classList.add('hidden'); - this.outlineView.classList.add('hidden'); - this.attachmentsView.classList.remove('hidden'); - break; - default: - console.error('PDFSidebar_switchView: "' + view + '" is an unsupported value.'); - return; - } - this.active = view | 0; - if (forceOpen && !this.isOpen) { - this.open(); - return; - } - if (shouldForceRendering) { - this._forceRendering(); - } - if (isViewChanged) { - this._dispatchEvent(); - } - this._hideUINotification(this.active); - }, - open: function PDFSidebar_open() { - if (this.isOpen) { - return; - } - this.isOpen = true; - this.toggleButton.classList.add('toggled'); - this.outerContainer.classList.add('sidebarMoving'); - this.outerContainer.classList.add('sidebarOpen'); - if (this.active === SidebarView.THUMBS) { - this._updateThumbnailViewer(); - } - this._forceRendering(); - this._dispatchEvent(); - this._hideUINotification(this.active); - }, - close: function PDFSidebar_close() { - if (!this.isOpen) { - return; - } - this.isOpen = false; - this.toggleButton.classList.remove('toggled'); - this.outerContainer.classList.add('sidebarMoving'); - this.outerContainer.classList.remove('sidebarOpen'); - this._forceRendering(); - this._dispatchEvent(); - }, - toggle: function PDFSidebar_toggle() { - if (this.isOpen) { - this.close(); - } else { - this.open(); - } - }, - _dispatchEvent: function PDFSidebar_dispatchEvent() { - this.eventBus.dispatch('sidebarviewchanged', { - source: this, - view: this.visibleView - }); - }, - _forceRendering: function PDFSidebar_forceRendering() { - if (this.onToggled) { - this.onToggled(); - } else { - this.pdfViewer.forceRendering(); - this.pdfThumbnailViewer.forceRendering(); - } - }, - _updateThumbnailViewer: function PDFSidebar_updateThumbnailViewer() { - var pdfViewer = this.pdfViewer; - var thumbnailViewer = this.pdfThumbnailViewer; - var pagesCount = pdfViewer.pagesCount; - for (var pageIndex = 0; pageIndex < pagesCount; pageIndex++) { - var pageView = pdfViewer.getPageView(pageIndex); - if (pageView && pageView.renderingState === RenderingStates.FINISHED) { - var thumbnailView = thumbnailViewer.getThumbnail(pageIndex); - thumbnailView.setImage(pageView); - } - } - thumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber); - }, - _showUINotification: function (view) { - if (this.disableNotification) { - return; - } - this.toggleButton.title = mozL10n.get('toggle_sidebar_notification.title', null, 'Toggle Sidebar (document contains outline/attachments)'); - if (!this.isOpen) { - this.toggleButton.classList.add(UI_NOTIFICATION_CLASS); - } else if (view === this.active) { - return; - } - switch (view) { - case SidebarView.OUTLINE: - this.outlineButton.classList.add(UI_NOTIFICATION_CLASS); - break; - case SidebarView.ATTACHMENTS: - this.attachmentsButton.classList.add(UI_NOTIFICATION_CLASS); - break; - } - }, - _hideUINotification: function (view) { - if (this.disableNotification) { - return; - } - var removeNotification = function (view) { - switch (view) { - case SidebarView.OUTLINE: - this.outlineButton.classList.remove(UI_NOTIFICATION_CLASS); - break; - case SidebarView.ATTACHMENTS: - this.attachmentsButton.classList.remove(UI_NOTIFICATION_CLASS); - break; - } - }.bind(this); - if (!this.isOpen && view !== null) { - return; - } - this.toggleButton.classList.remove(UI_NOTIFICATION_CLASS); - if (view !== null) { - removeNotification(view); - return; - } - for (view in SidebarView) { - removeNotification(SidebarView[view]); - } - this.toggleButton.title = mozL10n.get('toggle_sidebar.title', null, 'Toggle Sidebar'); - }, - _addEventListeners: function PDFSidebar_addEventListeners() { - var self = this; - self.mainContainer.addEventListener('transitionend', function (evt) { - if (evt.target === this) { - self.outerContainer.classList.remove('sidebarMoving'); - } - }); - self.thumbnailButton.addEventListener('click', function () { - self.switchView(SidebarView.THUMBS); - }); - self.outlineButton.addEventListener('click', function () { - self.switchView(SidebarView.OUTLINE); - }); - self.outlineButton.addEventListener('dblclick', function () { - self.pdfOutlineViewer.toggleOutlineTree(); - }); - self.attachmentsButton.addEventListener('click', function () { - self.switchView(SidebarView.ATTACHMENTS); - }); - self.eventBus.on('outlineloaded', function (e) { - var outlineCount = e.outlineCount; - self.outlineButton.disabled = !outlineCount; - if (outlineCount) { - self._showUINotification(SidebarView.OUTLINE); - } else if (self.active === SidebarView.OUTLINE) { - self.switchView(SidebarView.THUMBS); - } - }); - self.eventBus.on('attachmentsloaded', function (e) { - var attachmentsCount = e.attachmentsCount; - self.attachmentsButton.disabled = !attachmentsCount; - if (attachmentsCount) { - self._showUINotification(SidebarView.ATTACHMENTS); - } else if (self.active === SidebarView.ATTACHMENTS) { - self.switchView(SidebarView.THUMBS); - } - }); - self.eventBus.on('presentationmodechanged', function (e) { - if (!e.active && !e.switchInProgress && self.isThumbnailViewVisible) { - self._updateThumbnailViewer(); - } - }); - } - }; - return PDFSidebar; -}(); -exports.SidebarView = SidebarView; -exports.PDFSidebar = PDFSidebar; - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var pdfRenderingQueue = __webpack_require__(3); -var mozL10n = uiUtils.mozL10n; -var getOutputScale = uiUtils.getOutputScale; -var RenderingStates = pdfRenderingQueue.RenderingStates; -var THUMBNAIL_WIDTH = 98; -var THUMBNAIL_CANVAS_BORDER_WIDTH = 1; -var PDFThumbnailView = function PDFThumbnailViewClosure() { - function getTempCanvas(width, height) { - var tempCanvas = PDFThumbnailView.tempImageCache; - if (!tempCanvas) { - tempCanvas = document.createElement('canvas'); - PDFThumbnailView.tempImageCache = tempCanvas; - } - tempCanvas.width = width; - tempCanvas.height = height; - tempCanvas.mozOpaque = true; - var ctx = tempCanvas.getContext('2d', { alpha: false }); - ctx.save(); - ctx.fillStyle = 'rgb(255, 255, 255)'; - ctx.fillRect(0, 0, width, height); - ctx.restore(); - return tempCanvas; - } - function PDFThumbnailView(options) { - var container = options.container; - var id = options.id; - var defaultViewport = options.defaultViewport; - var linkService = options.linkService; - var renderingQueue = options.renderingQueue; - var disableCanvasToImageConversion = options.disableCanvasToImageConversion || false; - this.id = id; - this.renderingId = 'thumbnail' + id; - this.pageLabel = null; - this.pdfPage = null; - this.rotation = 0; - this.viewport = defaultViewport; - this.pdfPageRotate = defaultViewport.rotation; - this.linkService = linkService; - this.renderingQueue = renderingQueue; - this.renderTask = null; - this.renderingState = RenderingStates.INITIAL; - this.resume = null; - this.disableCanvasToImageConversion = disableCanvasToImageConversion; - this.pageWidth = this.viewport.width; - this.pageHeight = this.viewport.height; - this.pageRatio = this.pageWidth / this.pageHeight; - this.canvasWidth = THUMBNAIL_WIDTH; - this.canvasHeight = this.canvasWidth / this.pageRatio | 0; - this.scale = this.canvasWidth / this.pageWidth; - var anchor = document.createElement('a'); - anchor.href = linkService.getAnchorUrl('#page=' + id); - anchor.title = mozL10n.get('thumb_page_title', { page: id }, 'Page {{page}}'); - anchor.onclick = function stopNavigation() { - linkService.page = id; - return false; - }; - this.anchor = anchor; - var div = document.createElement('div'); - div.className = 'thumbnail'; - div.setAttribute('data-page-number', this.id); - this.div = div; - if (id === 1) { - div.classList.add('selected'); - } - var ring = document.createElement('div'); - ring.className = 'thumbnailSelectionRing'; - var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; - ring.style.width = this.canvasWidth + borderAdjustment + 'px'; - ring.style.height = this.canvasHeight + borderAdjustment + 'px'; - this.ring = ring; - div.appendChild(ring); - anchor.appendChild(div); - container.appendChild(anchor); - } - PDFThumbnailView.prototype = { - setPdfPage: function PDFThumbnailView_setPdfPage(pdfPage) { - this.pdfPage = pdfPage; - this.pdfPageRotate = pdfPage.rotate; - var totalRotation = (this.rotation + this.pdfPageRotate) % 360; - this.viewport = pdfPage.getViewport(1, totalRotation); - this.reset(); - }, - reset: function PDFThumbnailView_reset() { - this.cancelRendering(); - this.pageWidth = this.viewport.width; - this.pageHeight = this.viewport.height; - this.pageRatio = this.pageWidth / this.pageHeight; - this.canvasHeight = this.canvasWidth / this.pageRatio | 0; - this.scale = this.canvasWidth / this.pageWidth; - this.div.removeAttribute('data-loaded'); - var ring = this.ring; - var childNodes = ring.childNodes; - for (var i = childNodes.length - 1; i >= 0; i--) { - ring.removeChild(childNodes[i]); - } - var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; - ring.style.width = this.canvasWidth + borderAdjustment + 'px'; - ring.style.height = this.canvasHeight + borderAdjustment + 'px'; - if (this.canvas) { - this.canvas.width = 0; - this.canvas.height = 0; - delete this.canvas; - } - if (this.image) { - this.image.removeAttribute('src'); - delete this.image; - } - }, - update: function PDFThumbnailView_update(rotation) { - if (typeof rotation !== 'undefined') { - this.rotation = rotation; - } - var totalRotation = (this.rotation + this.pdfPageRotate) % 360; - this.viewport = this.viewport.clone({ - scale: 1, - rotation: totalRotation - }); - this.reset(); - }, - cancelRendering: function PDFThumbnailView_cancelRendering() { - if (this.renderTask) { - this.renderTask.cancel(); - this.renderTask = null; - } - this.renderingState = RenderingStates.INITIAL; - this.resume = null; - }, - _getPageDrawContext: function PDFThumbnailView_getPageDrawContext(noCtxScale) { - var canvas = document.createElement('canvas'); - this.canvas = canvas; - canvas.mozOpaque = true; - var ctx = canvas.getContext('2d', { alpha: false }); - var outputScale = getOutputScale(ctx); - canvas.width = this.canvasWidth * outputScale.sx | 0; - canvas.height = this.canvasHeight * outputScale.sy | 0; - canvas.style.width = this.canvasWidth + 'px'; - canvas.style.height = this.canvasHeight + 'px'; - if (!noCtxScale && outputScale.scaled) { - ctx.scale(outputScale.sx, outputScale.sy); - } - return ctx; - }, - _convertCanvasToImage: function PDFThumbnailView_convertCanvasToImage() { - if (!this.canvas) { - return; - } - if (this.renderingState !== RenderingStates.FINISHED) { - return; - } - var id = this.renderingId; - var className = 'thumbnailImage'; - var ariaLabel = mozL10n.get('thumb_page_canvas', { page: this.pageId }, 'Thumbnail of Page {{page}}'); - if (this.disableCanvasToImageConversion) { - this.canvas.id = id; - this.canvas.className = className; - this.canvas.setAttribute('aria-label', ariaLabel); - this.div.setAttribute('data-loaded', true); - this.ring.appendChild(this.canvas); - return; - } - var image = document.createElement('img'); - image.id = id; - image.className = className; - image.setAttribute('aria-label', ariaLabel); - image.style.width = this.canvasWidth + 'px'; - image.style.height = this.canvasHeight + 'px'; - image.src = this.canvas.toDataURL(); - this.image = image; - this.div.setAttribute('data-loaded', true); - this.ring.appendChild(image); - this.canvas.width = 0; - this.canvas.height = 0; - delete this.canvas; - }, - draw: function PDFThumbnailView_draw() { - if (this.renderingState !== RenderingStates.INITIAL) { - console.error('Must be in new state before drawing'); - return Promise.resolve(undefined); - } - this.renderingState = RenderingStates.RUNNING; - var resolveRenderPromise, rejectRenderPromise; - var promise = new Promise(function (resolve, reject) { - resolveRenderPromise = resolve; - rejectRenderPromise = reject; - }); - var self = this; - function thumbnailDrawCallback(error) { - if (renderTask === self.renderTask) { - self.renderTask = null; - } - if (error === 'cancelled') { - rejectRenderPromise(error); - return; - } - self.renderingState = RenderingStates.FINISHED; - self._convertCanvasToImage(); - if (!error) { - resolveRenderPromise(undefined); - } else { - rejectRenderPromise(error); - } - } - var ctx = this._getPageDrawContext(); - var drawViewport = this.viewport.clone({ scale: this.scale }); - var renderContinueCallback = function renderContinueCallback(cont) { - if (!self.renderingQueue.isHighestPriority(self)) { - self.renderingState = RenderingStates.PAUSED; - self.resume = function resumeCallback() { - self.renderingState = RenderingStates.RUNNING; - cont(); - }; - return; - } - cont(); - }; - var renderContext = { - canvasContext: ctx, - viewport: drawViewport - }; - var renderTask = this.renderTask = this.pdfPage.render(renderContext); - renderTask.onContinue = renderContinueCallback; - renderTask.promise.then(function pdfPageRenderCallback() { - thumbnailDrawCallback(null); - }, function pdfPageRenderError(error) { - thumbnailDrawCallback(error); - }); - return promise; - }, - setImage: function PDFThumbnailView_setImage(pageView) { - if (this.renderingState !== RenderingStates.INITIAL) { - return; - } - var img = pageView.canvas; - if (!img) { - return; - } - if (!this.pdfPage) { - this.setPdfPage(pageView.pdfPage); - } - this.renderingState = RenderingStates.FINISHED; - var ctx = this._getPageDrawContext(true); - var canvas = ctx.canvas; - if (img.width <= 2 * canvas.width) { - ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height); - this._convertCanvasToImage(); - return; - } - var MAX_NUM_SCALING_STEPS = 3; - var reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS; - var reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS; - var reducedImage = getTempCanvas(reducedWidth, reducedHeight); - var reducedImageCtx = reducedImage.getContext('2d'); - while (reducedWidth > img.width || reducedHeight > img.height) { - reducedWidth >>= 1; - reducedHeight >>= 1; - } - reducedImageCtx.drawImage(img, 0, 0, img.width, img.height, 0, 0, reducedWidth, reducedHeight); - while (reducedWidth > 2 * canvas.width) { - reducedImageCtx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, reducedWidth >> 1, reducedHeight >> 1); - reducedWidth >>= 1; - reducedHeight >>= 1; - } - ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, canvas.width, canvas.height); - this._convertCanvasToImage(); - }, - get pageId() { - return this.pageLabel !== null ? this.pageLabel : this.id; - }, - setPageLabel: function PDFThumbnailView_setPageLabel(label) { - this.pageLabel = typeof label === 'string' ? label : null; - this.anchor.title = mozL10n.get('thumb_page_title', { page: this.pageId }, 'Page {{page}}'); - if (this.renderingState !== RenderingStates.FINISHED) { - return; - } - var ariaLabel = mozL10n.get('thumb_page_canvas', { page: this.pageId }, 'Thumbnail of Page {{page}}'); - if (this.image) { - this.image.setAttribute('aria-label', ariaLabel); - } else if (this.disableCanvasToImageConversion && this.canvas) { - this.canvas.setAttribute('aria-label', ariaLabel); - } - } - }; - return PDFThumbnailView; -}(); -PDFThumbnailView.tempImageCache = null; -exports.PDFThumbnailView = PDFThumbnailView; - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var pdfThumbnailView = __webpack_require__(24); -var watchScroll = uiUtils.watchScroll; -var getVisibleElements = uiUtils.getVisibleElements; -var scrollIntoView = uiUtils.scrollIntoView; -var PDFThumbnailView = pdfThumbnailView.PDFThumbnailView; -var THUMBNAIL_SCROLL_MARGIN = -19; -var PDFThumbnailViewer = function PDFThumbnailViewerClosure() { - function PDFThumbnailViewer(options) { - this.container = options.container; - this.renderingQueue = options.renderingQueue; - this.linkService = options.linkService; - this.scroll = watchScroll(this.container, this._scrollUpdated.bind(this)); - this._resetView(); - } - PDFThumbnailViewer.prototype = { - _scrollUpdated: function PDFThumbnailViewer_scrollUpdated() { - this.renderingQueue.renderHighestPriority(); - }, - getThumbnail: function PDFThumbnailViewer_getThumbnail(index) { - return this.thumbnails[index]; - }, - _getVisibleThumbs: function PDFThumbnailViewer_getVisibleThumbs() { - return getVisibleElements(this.container, this.thumbnails); - }, - scrollThumbnailIntoView: function PDFThumbnailViewer_scrollThumbnailIntoView(page) { - var selected = document.querySelector('.thumbnail.selected'); - if (selected) { - selected.classList.remove('selected'); - } - var thumbnail = document.querySelector('div.thumbnail[data-page-number="' + page + '"]'); - if (thumbnail) { - thumbnail.classList.add('selected'); - } - var visibleThumbs = this._getVisibleThumbs(); - var numVisibleThumbs = visibleThumbs.views.length; - if (numVisibleThumbs > 0) { - var first = visibleThumbs.first.id; - var last = numVisibleThumbs > 1 ? visibleThumbs.last.id : first; - if (page <= first || page >= last) { - scrollIntoView(thumbnail, { top: THUMBNAIL_SCROLL_MARGIN }); - } - } - }, - get pagesRotation() { - return this._pagesRotation; - }, - set pagesRotation(rotation) { - this._pagesRotation = rotation; - for (var i = 0, l = this.thumbnails.length; i < l; i++) { - var thumb = this.thumbnails[i]; - thumb.update(rotation); - } - }, - cleanup: function PDFThumbnailViewer_cleanup() { - var tempCanvas = PDFThumbnailView.tempImageCache; - if (tempCanvas) { - tempCanvas.width = 0; - tempCanvas.height = 0; - } - PDFThumbnailView.tempImageCache = null; - }, - _resetView: function PDFThumbnailViewer_resetView() { - this.thumbnails = []; - this._pageLabels = null; - this._pagesRotation = 0; - this._pagesRequests = []; - this.container.textContent = ''; - }, - setDocument: function PDFThumbnailViewer_setDocument(pdfDocument) { - if (this.pdfDocument) { - this._cancelRendering(); - this._resetView(); - } - this.pdfDocument = pdfDocument; - if (!pdfDocument) { - return Promise.resolve(); - } - return pdfDocument.getPage(1).then(function (firstPage) { - var pagesCount = pdfDocument.numPages; - var viewport = firstPage.getViewport(1.0); - for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { - var thumbnail = new PDFThumbnailView({ - container: this.container, - id: pageNum, - defaultViewport: viewport.clone(), - linkService: this.linkService, - renderingQueue: this.renderingQueue, - disableCanvasToImageConversion: false - }); - this.thumbnails.push(thumbnail); - } - }.bind(this)); - }, - _cancelRendering: function PDFThumbnailViewer_cancelRendering() { - for (var i = 0, ii = this.thumbnails.length; i < ii; i++) { - if (this.thumbnails[i]) { - this.thumbnails[i].cancelRendering(); - } - } - }, - setPageLabels: function PDFThumbnailViewer_setPageLabels(labels) { - if (!this.pdfDocument) { - return; - } - if (!labels) { - this._pageLabels = null; - } else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) { - this._pageLabels = null; - console.error('PDFThumbnailViewer_setPageLabels: Invalid page labels.'); - } else { - this._pageLabels = labels; - } - for (var i = 0, ii = this.thumbnails.length; i < ii; i++) { - var thumbnailView = this.thumbnails[i]; - var label = this._pageLabels && this._pageLabels[i]; - thumbnailView.setPageLabel(label); - } - }, - _ensurePdfPageLoaded: function PDFThumbnailViewer_ensurePdfPageLoaded(thumbView) { - if (thumbView.pdfPage) { - return Promise.resolve(thumbView.pdfPage); - } - var pageNumber = thumbView.id; - if (this._pagesRequests[pageNumber]) { - return this._pagesRequests[pageNumber]; - } - var promise = this.pdfDocument.getPage(pageNumber).then(function (pdfPage) { - thumbView.setPdfPage(pdfPage); - this._pagesRequests[pageNumber] = null; - return pdfPage; - }.bind(this)); - this._pagesRequests[pageNumber] = promise; - return promise; - }, - forceRendering: function () { - var visibleThumbs = this._getVisibleThumbs(); - var thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, this.thumbnails, this.scroll.down); - if (thumbView) { - this._ensurePdfPageLoaded(thumbView).then(function () { - this.renderingQueue.renderView(thumbView); - }.bind(this)); - return true; - } - return false; - } - }; - return PDFThumbnailViewer; -}(); -exports.PDFThumbnailViewer = PDFThumbnailViewer; - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var pdfPageView = __webpack_require__(21); -var pdfRenderingQueue = __webpack_require__(3); -var textLayerBuilder = __webpack_require__(28); -var annotationLayerBuilder = __webpack_require__(11); -var pdfLinkService = __webpack_require__(6); -var domEvents = __webpack_require__(2); -var pdfjsLib = __webpack_require__(1); -var UNKNOWN_SCALE = uiUtils.UNKNOWN_SCALE; -var SCROLLBAR_PADDING = uiUtils.SCROLLBAR_PADDING; -var VERTICAL_PADDING = uiUtils.VERTICAL_PADDING; -var MAX_AUTO_SCALE = uiUtils.MAX_AUTO_SCALE; -var CSS_UNITS = uiUtils.CSS_UNITS; -var DEFAULT_SCALE = uiUtils.DEFAULT_SCALE; -var DEFAULT_SCALE_VALUE = uiUtils.DEFAULT_SCALE_VALUE; -var RendererType = uiUtils.RendererType; -var scrollIntoView = uiUtils.scrollIntoView; -var watchScroll = uiUtils.watchScroll; -var getVisibleElements = uiUtils.getVisibleElements; -var PDFPageView = pdfPageView.PDFPageView; -var RenderingStates = pdfRenderingQueue.RenderingStates; -var PDFRenderingQueue = pdfRenderingQueue.PDFRenderingQueue; -var TextLayerBuilder = textLayerBuilder.TextLayerBuilder; -var AnnotationLayerBuilder = annotationLayerBuilder.AnnotationLayerBuilder; -var SimpleLinkService = pdfLinkService.SimpleLinkService; -var PresentationModeState = { - UNKNOWN: 0, - NORMAL: 1, - CHANGING: 2, - FULLSCREEN: 3 -}; -var DEFAULT_CACHE_SIZE = 10; -var PDFViewer = function pdfViewer() { - function PDFPageViewBuffer(size) { - var data = []; - this.push = function cachePush(view) { - var i = data.indexOf(view); - if (i >= 0) { - data.splice(i, 1); - } - data.push(view); - if (data.length > size) { - data.shift().destroy(); - } - }; - this.resize = function (newSize) { - size = newSize; - while (data.length > size) { - data.shift().destroy(); - } - }; - } - function isSameScale(oldScale, newScale) { - if (newScale === oldScale) { - return true; - } - if (Math.abs(newScale - oldScale) < 1e-15) { - return true; - } - return false; - } - function isPortraitOrientation(size) { - return size.width <= size.height; - } - function PDFViewer(options) { - this.container = options.container; - this.viewer = options.viewer || options.container.firstElementChild; - this.eventBus = options.eventBus || domEvents.getGlobalEventBus(); - this.linkService = options.linkService || new SimpleLinkService(); - this.downloadManager = options.downloadManager || null; - this.removePageBorders = options.removePageBorders || false; - this.enhanceTextSelection = options.enhanceTextSelection || false; - this.renderInteractiveForms = options.renderInteractiveForms || false; - this.enablePrintAutoRotate = options.enablePrintAutoRotate || false; - this.renderer = options.renderer || RendererType.CANVAS; - this.defaultRenderingQueue = !options.renderingQueue; - if (this.defaultRenderingQueue) { - this.renderingQueue = new PDFRenderingQueue(); - this.renderingQueue.setViewer(this); - } else { - this.renderingQueue = options.renderingQueue; - } - this.scroll = watchScroll(this.container, this._scrollUpdate.bind(this)); - this.presentationModeState = PresentationModeState.UNKNOWN; - this._resetView(); - if (this.removePageBorders) { - this.viewer.classList.add('removePageBorders'); - } - } - PDFViewer.prototype = { - get pagesCount() { - return this._pages.length; - }, - getPageView: function (index) { - return this._pages[index]; - }, - get pageViewsReady() { - return this._pageViewsReady; - }, - get currentPageNumber() { - return this._currentPageNumber; - }, - set currentPageNumber(val) { - if ((val | 0) !== val) { - throw new Error('Invalid page number.'); - } - if (!this.pdfDocument) { - this._currentPageNumber = val; - return; - } - this._setCurrentPageNumber(val, true); - }, - _setCurrentPageNumber: function PDFViewer_setCurrentPageNumber(val, resetCurrentPageView) { - if (this._currentPageNumber === val) { - if (resetCurrentPageView) { - this._resetCurrentPageView(); - } - return; - } - if (!(0 < val && val <= this.pagesCount)) { - console.error('PDFViewer_setCurrentPageNumber: "' + val + '" is out of bounds.'); - return; - } - var arg = { - source: this, - pageNumber: val, - pageLabel: this._pageLabels && this._pageLabels[val - 1] - }; - this._currentPageNumber = val; - this.eventBus.dispatch('pagechanging', arg); - this.eventBus.dispatch('pagechange', arg); - if (resetCurrentPageView) { - this._resetCurrentPageView(); - } - }, - get currentPageLabel() { - return this._pageLabels && this._pageLabels[this._currentPageNumber - 1]; - }, - set currentPageLabel(val) { - var pageNumber = val | 0; - if (this._pageLabels) { - var i = this._pageLabels.indexOf(val); - if (i >= 0) { - pageNumber = i + 1; - } - } - this.currentPageNumber = pageNumber; - }, - get currentScale() { - return this._currentScale !== UNKNOWN_SCALE ? this._currentScale : DEFAULT_SCALE; - }, - set currentScale(val) { - if (isNaN(val)) { - throw new Error('Invalid numeric scale'); - } - if (!this.pdfDocument) { - this._currentScale = val; - this._currentScaleValue = val !== UNKNOWN_SCALE ? val.toString() : null; - return; - } - this._setScale(val, false); - }, - get currentScaleValue() { - return this._currentScaleValue; - }, - set currentScaleValue(val) { - if (!this.pdfDocument) { - this._currentScale = isNaN(val) ? UNKNOWN_SCALE : val; - this._currentScaleValue = val.toString(); - return; - } - this._setScale(val, false); - }, - get pagesRotation() { - return this._pagesRotation; - }, - set pagesRotation(rotation) { - if (!(typeof rotation === 'number' && rotation % 90 === 0)) { - throw new Error('Invalid pages rotation angle.'); - } - this._pagesRotation = rotation; - if (!this.pdfDocument) { - return; - } - for (var i = 0, l = this._pages.length; i < l; i++) { - var pageView = this._pages[i]; - pageView.update(pageView.scale, rotation); - } - this._setScale(this._currentScaleValue, true); - if (this.defaultRenderingQueue) { - this.update(); - } - }, - setDocument: function (pdfDocument) { - if (this.pdfDocument) { - this._cancelRendering(); - this._resetView(); - } - this.pdfDocument = pdfDocument; - if (!pdfDocument) { - return; - } - var pagesCount = pdfDocument.numPages; - var self = this; - var resolvePagesPromise; - var pagesPromise = new Promise(function (resolve) { - resolvePagesPromise = resolve; - }); - this.pagesPromise = pagesPromise; - pagesPromise.then(function () { - self._pageViewsReady = true; - self.eventBus.dispatch('pagesloaded', { - source: self, - pagesCount: pagesCount - }); - }); - var isOnePageRenderedResolved = false; - var resolveOnePageRendered = null; - var onePageRendered = new Promise(function (resolve) { - resolveOnePageRendered = resolve; - }); - this.onePageRendered = onePageRendered; - var bindOnAfterAndBeforeDraw = function (pageView) { - pageView.onBeforeDraw = function pdfViewLoadOnBeforeDraw() { - self._buffer.push(this); - }; - pageView.onAfterDraw = function pdfViewLoadOnAfterDraw() { - if (!isOnePageRenderedResolved) { - isOnePageRenderedResolved = true; - resolveOnePageRendered(); - } - }; - }; - var firstPagePromise = pdfDocument.getPage(1); - this.firstPagePromise = firstPagePromise; - return firstPagePromise.then(function (pdfPage) { - var scale = this.currentScale; - var viewport = pdfPage.getViewport(scale * CSS_UNITS); - for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { - var textLayerFactory = null; - if (!pdfjsLib.PDFJS.disableTextLayer) { - textLayerFactory = this; - } - var pageView = new PDFPageView({ - container: this.viewer, - eventBus: this.eventBus, - id: pageNum, - scale: scale, - defaultViewport: viewport.clone(), - renderingQueue: this.renderingQueue, - textLayerFactory: textLayerFactory, - annotationLayerFactory: this, - enhanceTextSelection: this.enhanceTextSelection, - renderInteractiveForms: this.renderInteractiveForms, - renderer: this.renderer - }); - bindOnAfterAndBeforeDraw(pageView); - this._pages.push(pageView); - } - var linkService = this.linkService; - onePageRendered.then(function () { - if (!pdfjsLib.PDFJS.disableAutoFetch) { - var getPagesLeft = pagesCount; - for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { - pdfDocument.getPage(pageNum).then(function (pageNum, pdfPage) { - var pageView = self._pages[pageNum - 1]; - if (!pageView.pdfPage) { - pageView.setPdfPage(pdfPage); - } - linkService.cachePageRef(pageNum, pdfPage.ref); - getPagesLeft--; - if (!getPagesLeft) { - resolvePagesPromise(); - } - }.bind(null, pageNum)); - } - } else { - resolvePagesPromise(); - } - }); - self.eventBus.dispatch('pagesinit', { source: self }); - if (this.defaultRenderingQueue) { - this.update(); - } - if (this.findController) { - this.findController.resolveFirstPage(); - } - }.bind(this)); - }, - setPageLabels: function PDFViewer_setPageLabels(labels) { - if (!this.pdfDocument) { - return; - } - if (!labels) { - this._pageLabels = null; - } else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) { - this._pageLabels = null; - console.error('PDFViewer_setPageLabels: Invalid page labels.'); - } else { - this._pageLabels = labels; - } - for (var i = 0, ii = this._pages.length; i < ii; i++) { - var pageView = this._pages[i]; - var label = this._pageLabels && this._pageLabels[i]; - pageView.setPageLabel(label); - } - }, - _resetView: function () { - this._pages = []; - this._currentPageNumber = 1; - this._currentScale = UNKNOWN_SCALE; - this._currentScaleValue = null; - this._pageLabels = null; - this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE); - this._location = null; - this._pagesRotation = 0; - this._pagesRequests = []; - this._pageViewsReady = false; - this.viewer.textContent = ''; - }, - _scrollUpdate: function PDFViewer_scrollUpdate() { - if (this.pagesCount === 0) { - return; - } - this.update(); - for (var i = 0, ii = this._pages.length; i < ii; i++) { - this._pages[i].updatePosition(); - } - }, - _setScaleDispatchEvent: function pdfViewer_setScaleDispatchEvent(newScale, newValue, preset) { - var arg = { - source: this, - scale: newScale, - presetValue: preset ? newValue : undefined - }; - this.eventBus.dispatch('scalechanging', arg); - this.eventBus.dispatch('scalechange', arg); - }, - _setScaleUpdatePages: function pdfViewer_setScaleUpdatePages(newScale, newValue, noScroll, preset) { - this._currentScaleValue = newValue.toString(); - if (isSameScale(this._currentScale, newScale)) { - if (preset) { - this._setScaleDispatchEvent(newScale, newValue, true); - } - return; - } - for (var i = 0, ii = this._pages.length; i < ii; i++) { - this._pages[i].update(newScale); - } - this._currentScale = newScale; - if (!noScroll) { - var page = this._currentPageNumber, dest; - if (this._location && !pdfjsLib.PDFJS.ignoreCurrentPositionOnZoom && !(this.isInPresentationMode || this.isChangingPresentationMode)) { - page = this._location.pageNumber; - dest = [ - null, - { name: 'XYZ' }, - this._location.left, - this._location.top, - null - ]; - } - this.scrollPageIntoView({ - pageNumber: page, - destArray: dest, - allowNegativeOffset: true - }); - } - this._setScaleDispatchEvent(newScale, newValue, preset); - if (this.defaultRenderingQueue) { - this.update(); - } - }, - _setScale: function PDFViewer_setScale(value, noScroll) { - var scale = parseFloat(value); - if (scale > 0) { - this._setScaleUpdatePages(scale, value, noScroll, false); - } else { - var currentPage = this._pages[this._currentPageNumber - 1]; - if (!currentPage) { - return; - } - var hPadding = this.isInPresentationMode || this.removePageBorders ? 0 : SCROLLBAR_PADDING; - var vPadding = this.isInPresentationMode || this.removePageBorders ? 0 : VERTICAL_PADDING; - var pageWidthScale = (this.container.clientWidth - hPadding) / currentPage.width * currentPage.scale; - var pageHeightScale = (this.container.clientHeight - vPadding) / currentPage.height * currentPage.scale; - switch (value) { - case 'page-actual': - scale = 1; - break; - case 'page-width': - scale = pageWidthScale; - break; - case 'page-height': - scale = pageHeightScale; - break; - case 'page-fit': - scale = Math.min(pageWidthScale, pageHeightScale); - break; - case 'auto': - var isLandscape = currentPage.width > currentPage.height; - var horizontalScale = isLandscape ? Math.min(pageHeightScale, pageWidthScale) : pageWidthScale; - scale = Math.min(MAX_AUTO_SCALE, horizontalScale); - break; - default: - console.error('PDFViewer_setScale: "' + value + '" is an unknown zoom value.'); - return; - } - this._setScaleUpdatePages(scale, value, noScroll, true); - } - }, - _resetCurrentPageView: function () { - if (this.isInPresentationMode) { - this._setScale(this._currentScaleValue, true); - } - var pageView = this._pages[this._currentPageNumber - 1]; - scrollIntoView(pageView.div); - }, - scrollPageIntoView: function PDFViewer_scrollPageIntoView(params) { - if (!this.pdfDocument) { - return; - } - var pageNumber = params.pageNumber || 0; - var dest = params.destArray || null; - var allowNegativeOffset = params.allowNegativeOffset || false; - if (this.isInPresentationMode || !dest) { - this._setCurrentPageNumber(pageNumber, true); - return; - } - var pageView = this._pages[pageNumber - 1]; - if (!pageView) { - console.error('PDFViewer_scrollPageIntoView: ' + 'Invalid "pageNumber" parameter.'); - return; - } - var x = 0, y = 0; - var width = 0, height = 0, widthScale, heightScale; - var changeOrientation = pageView.rotation % 180 === 0 ? false : true; - var pageWidth = (changeOrientation ? pageView.height : pageView.width) / pageView.scale / CSS_UNITS; - var pageHeight = (changeOrientation ? pageView.width : pageView.height) / pageView.scale / CSS_UNITS; - var scale = 0; - switch (dest[1].name) { - case 'XYZ': - x = dest[2]; - y = dest[3]; - scale = dest[4]; - x = x !== null ? x : 0; - y = y !== null ? y : pageHeight; - break; - case 'Fit': - case 'FitB': - scale = 'page-fit'; - break; - case 'FitH': - case 'FitBH': - y = dest[2]; - scale = 'page-width'; - if (y === null && this._location) { - x = this._location.left; - y = this._location.top; - } - break; - case 'FitV': - case 'FitBV': - x = dest[2]; - width = pageWidth; - height = pageHeight; - scale = 'page-height'; - break; - case 'FitR': - x = dest[2]; - y = dest[3]; - width = dest[4] - x; - height = dest[5] - y; - var hPadding = this.removePageBorders ? 0 : SCROLLBAR_PADDING; - var vPadding = this.removePageBorders ? 0 : VERTICAL_PADDING; - widthScale = (this.container.clientWidth - hPadding) / width / CSS_UNITS; - heightScale = (this.container.clientHeight - vPadding) / height / CSS_UNITS; - scale = Math.min(Math.abs(widthScale), Math.abs(heightScale)); - break; - default: - console.error('PDFViewer_scrollPageIntoView: \'' + dest[1].name + '\' is not a valid destination type.'); - return; - } - if (scale && scale !== this._currentScale) { - this.currentScaleValue = scale; - } else if (this._currentScale === UNKNOWN_SCALE) { - this.currentScaleValue = DEFAULT_SCALE_VALUE; - } - if (scale === 'page-fit' && !dest[4]) { - scrollIntoView(pageView.div); - return; - } - var boundingRect = [ - pageView.viewport.convertToViewportPoint(x, y), - pageView.viewport.convertToViewportPoint(x + width, y + height) - ]; - var left = Math.min(boundingRect[0][0], boundingRect[1][0]); - var top = Math.min(boundingRect[0][1], boundingRect[1][1]); - if (!allowNegativeOffset) { - left = Math.max(left, 0); - top = Math.max(top, 0); - } - scrollIntoView(pageView.div, { - left: left, - top: top - }); - }, - _updateLocation: function (firstPage) { - var currentScale = this._currentScale; - var currentScaleValue = this._currentScaleValue; - var normalizedScaleValue = parseFloat(currentScaleValue) === currentScale ? Math.round(currentScale * 10000) / 100 : currentScaleValue; - var pageNumber = firstPage.id; - var pdfOpenParams = '#page=' + pageNumber; - pdfOpenParams += '&zoom=' + normalizedScaleValue; - var currentPageView = this._pages[pageNumber - 1]; - var container = this.container; - var topLeft = currentPageView.getPagePoint(container.scrollLeft - firstPage.x, container.scrollTop - firstPage.y); - var intLeft = Math.round(topLeft[0]); - var intTop = Math.round(topLeft[1]); - pdfOpenParams += ',' + intLeft + ',' + intTop; - this._location = { - pageNumber: pageNumber, - scale: normalizedScaleValue, - top: intTop, - left: intLeft, - pdfOpenParams: pdfOpenParams - }; - }, - update: function PDFViewer_update() { - var visible = this._getVisiblePages(); - var visiblePages = visible.views; - if (visiblePages.length === 0) { - return; - } - var suggestedCacheSize = Math.max(DEFAULT_CACHE_SIZE, 2 * visiblePages.length + 1); - this._buffer.resize(suggestedCacheSize); - this.renderingQueue.renderHighestPriority(visible); - var currentId = this._currentPageNumber; - var firstPage = visible.first; - for (var i = 0, ii = visiblePages.length, stillFullyVisible = false; i < ii; ++i) { - var page = visiblePages[i]; - if (page.percent < 100) { - break; - } - if (page.id === currentId) { - stillFullyVisible = true; - break; - } - } - if (!stillFullyVisible) { - currentId = visiblePages[0].id; - } - if (!this.isInPresentationMode) { - this._setCurrentPageNumber(currentId); - } - this._updateLocation(firstPage); - this.eventBus.dispatch('updateviewarea', { - source: this, - location: this._location - }); - }, - containsElement: function (element) { - return this.container.contains(element); - }, - focus: function () { - this.container.focus(); - }, - get isInPresentationMode() { - return this.presentationModeState === PresentationModeState.FULLSCREEN; - }, - get isChangingPresentationMode() { - return this.presentationModeState === PresentationModeState.CHANGING; - }, - get isHorizontalScrollbarEnabled() { - return this.isInPresentationMode ? false : this.container.scrollWidth > this.container.clientWidth; - }, - _getVisiblePages: function () { - if (!this.isInPresentationMode) { - return getVisibleElements(this.container, this._pages, true); - } - var visible = []; - var currentPage = this._pages[this._currentPageNumber - 1]; - visible.push({ - id: currentPage.id, - view: currentPage - }); - return { - first: currentPage, - last: currentPage, - views: visible - }; - }, - cleanup: function () { - for (var i = 0, ii = this._pages.length; i < ii; i++) { - if (this._pages[i] && this._pages[i].renderingState !== RenderingStates.FINISHED) { - this._pages[i].reset(); - } - } - }, - _cancelRendering: function PDFViewer_cancelRendering() { - for (var i = 0, ii = this._pages.length; i < ii; i++) { - if (this._pages[i]) { - this._pages[i].cancelRendering(); - } - } - }, - _ensurePdfPageLoaded: function (pageView) { - if (pageView.pdfPage) { - return Promise.resolve(pageView.pdfPage); - } - var pageNumber = pageView.id; - if (this._pagesRequests[pageNumber]) { - return this._pagesRequests[pageNumber]; - } - var promise = this.pdfDocument.getPage(pageNumber).then(function (pdfPage) { - pageView.setPdfPage(pdfPage); - this._pagesRequests[pageNumber] = null; - return pdfPage; - }.bind(this)); - this._pagesRequests[pageNumber] = promise; - return promise; - }, - forceRendering: function (currentlyVisiblePages) { - var visiblePages = currentlyVisiblePages || this._getVisiblePages(); - var pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, this.scroll.down); - if (pageView) { - this._ensurePdfPageLoaded(pageView).then(function () { - this.renderingQueue.renderView(pageView); - }.bind(this)); - return true; - } - return false; - }, - getPageTextContent: function (pageIndex) { - return this.pdfDocument.getPage(pageIndex + 1).then(function (page) { - return page.getTextContent({ normalizeWhitespace: true }); - }); - }, - createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport, enhanceTextSelection) { - return new TextLayerBuilder({ - textLayerDiv: textLayerDiv, - eventBus: this.eventBus, - pageIndex: pageIndex, - viewport: viewport, - findController: this.isInPresentationMode ? null : this.findController, - enhanceTextSelection: this.isInPresentationMode ? false : enhanceTextSelection - }); - }, - createAnnotationLayerBuilder: function (pageDiv, pdfPage, renderInteractiveForms) { - return new AnnotationLayerBuilder({ - pageDiv: pageDiv, - pdfPage: pdfPage, - renderInteractiveForms: renderInteractiveForms, - linkService: this.linkService, - downloadManager: this.downloadManager - }); - }, - setFindController: function (findController) { - this.findController = findController; - }, - getPagesOverview: function () { - var pagesOverview = this._pages.map(function (pageView) { - var viewport = pageView.pdfPage.getViewport(1); - return { - width: viewport.width, - height: viewport.height, - rotation: viewport.rotation - }; - }); - if (!this.enablePrintAutoRotate) { - return pagesOverview; - } - var isFirstPagePortrait = isPortraitOrientation(pagesOverview[0]); - return pagesOverview.map(function (size) { - if (isFirstPagePortrait === isPortraitOrientation(size)) { - return size; - } - return { - width: size.height, - height: size.width, - rotation: (size.rotation + 90) % 360 - }; - }); - } - }; - return PDFViewer; -}(); -exports.PresentationModeState = PresentationModeState; -exports.PDFViewer = PDFViewer; - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var SCROLLBAR_PADDING = uiUtils.SCROLLBAR_PADDING; -var mozL10n = uiUtils.mozL10n; -var SecondaryToolbar = function SecondaryToolbarClosure() { - function SecondaryToolbar(options, mainContainer, eventBus) { - this.toolbar = options.toolbar; - this.toggleButton = options.toggleButton; - this.toolbarButtonContainer = options.toolbarButtonContainer; - this.buttons = [ - { - element: options.presentationModeButton, - eventName: 'presentationmode', - close: true - }, - { - element: options.openFileButton, - eventName: 'openfile', - close: true - }, - { - element: options.printButton, - eventName: 'print', - close: true - }, - { - element: options.downloadButton, - eventName: 'download', - close: true - }, - { - element: options.viewBookmarkButton, - eventName: null, - close: true - }, - { - element: options.firstPageButton, - eventName: 'firstpage', - close: true - }, - { - element: options.lastPageButton, - eventName: 'lastpage', - close: true - }, - { - element: options.pageRotateCwButton, - eventName: 'rotatecw', - close: false - }, - { - element: options.pageRotateCcwButton, - eventName: 'rotateccw', - close: false - }, - { - element: options.toggleHandToolButton, - eventName: 'togglehandtool', - close: true - }, - { - element: options.documentPropertiesButton, - eventName: 'documentproperties', - close: true - } - ]; - this.items = { - firstPage: options.firstPageButton, - lastPage: options.lastPageButton, - pageRotateCw: options.pageRotateCwButton, - pageRotateCcw: options.pageRotateCcwButton - }; - this.mainContainer = mainContainer; - this.eventBus = eventBus; - this.opened = false; - this.containerHeight = null; - this.previousContainerHeight = null; - this.reset(); - this._bindClickListeners(); - this._bindHandToolListener(options.toggleHandToolButton); - this.eventBus.on('resize', this._setMaxHeight.bind(this)); - } - SecondaryToolbar.prototype = { - get isOpen() { - return this.opened; - }, - setPageNumber: function SecondaryToolbar_setPageNumber(pageNumber) { - this.pageNumber = pageNumber; - this._updateUIState(); - }, - setPagesCount: function SecondaryToolbar_setPagesCount(pagesCount) { - this.pagesCount = pagesCount; - this._updateUIState(); - }, - reset: function SecondaryToolbar_reset() { - this.pageNumber = 0; - this.pagesCount = 0; - this._updateUIState(); - }, - _updateUIState: function SecondaryToolbar_updateUIState() { - var items = this.items; - items.firstPage.disabled = this.pageNumber <= 1; - items.lastPage.disabled = this.pageNumber >= this.pagesCount; - items.pageRotateCw.disabled = this.pagesCount === 0; - items.pageRotateCcw.disabled = this.pagesCount === 0; - }, - _bindClickListeners: function SecondaryToolbar_bindClickListeners() { - this.toggleButton.addEventListener('click', this.toggle.bind(this)); - for (var button in this.buttons) { - var element = this.buttons[button].element; - var eventName = this.buttons[button].eventName; - var close = this.buttons[button].close; - element.addEventListener('click', function (eventName, close) { - if (eventName !== null) { - this.eventBus.dispatch(eventName, { source: this }); - } - if (close) { - this.close(); - } - }.bind(this, eventName, close)); - } - }, - _bindHandToolListener: function SecondaryToolbar_bindHandToolListener(toggleHandToolButton) { - var isHandToolActive = false; - this.eventBus.on('handtoolchanged', function (e) { - if (isHandToolActive === e.isActive) { - return; - } - isHandToolActive = e.isActive; - if (isHandToolActive) { - toggleHandToolButton.title = mozL10n.get('hand_tool_disable.title', null, 'Disable hand tool'); - toggleHandToolButton.firstElementChild.textContent = mozL10n.get('hand_tool_disable_label', null, 'Disable hand tool'); - } else { - toggleHandToolButton.title = mozL10n.get('hand_tool_enable.title', null, 'Enable hand tool'); - toggleHandToolButton.firstElementChild.textContent = mozL10n.get('hand_tool_enable_label', null, 'Enable hand tool'); - } - }); - }, - open: function SecondaryToolbar_open() { - if (this.opened) { - return; - } - this.opened = true; - this._setMaxHeight(); - this.toggleButton.classList.add('toggled'); - this.toolbar.classList.remove('hidden'); - }, - close: function SecondaryToolbar_close() { - if (!this.opened) { - return; - } - this.opened = false; - this.toolbar.classList.add('hidden'); - this.toggleButton.classList.remove('toggled'); - }, - toggle: function SecondaryToolbar_toggle() { - if (this.opened) { - this.close(); - } else { - this.open(); - } - }, - _setMaxHeight: function SecondaryToolbar_setMaxHeight() { - if (!this.opened) { - return; - } - this.containerHeight = this.mainContainer.clientHeight; - if (this.containerHeight === this.previousContainerHeight) { - return; - } - this.toolbarButtonContainer.setAttribute('style', 'max-height: ' + (this.containerHeight - SCROLLBAR_PADDING) + 'px;'); - this.previousContainerHeight = this.containerHeight; - } - }; - return SecondaryToolbar; -}(); -exports.SecondaryToolbar = SecondaryToolbar; - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var domEvents = __webpack_require__(2); -var pdfjsLib = __webpack_require__(1); -var EXPAND_DIVS_TIMEOUT = 300; -var TextLayerBuilder = function TextLayerBuilderClosure() { - function TextLayerBuilder(options) { - this.textLayerDiv = options.textLayerDiv; - this.eventBus = options.eventBus || domEvents.getGlobalEventBus(); - this.textContent = null; - this.renderingDone = false; - this.pageIdx = options.pageIndex; - this.pageNumber = this.pageIdx + 1; - this.matches = []; - this.viewport = options.viewport; - this.textDivs = []; - this.findController = options.findController || null; - this.textLayerRenderTask = null; - this.enhanceTextSelection = options.enhanceTextSelection; - this._bindMouse(); - } - TextLayerBuilder.prototype = { - _finishRendering: function TextLayerBuilder_finishRendering() { - this.renderingDone = true; - if (!this.enhanceTextSelection) { - var endOfContent = document.createElement('div'); - endOfContent.className = 'endOfContent'; - this.textLayerDiv.appendChild(endOfContent); - } - this.eventBus.dispatch('textlayerrendered', { - source: this, - pageNumber: this.pageNumber, - numTextDivs: this.textDivs.length - }); - }, - render: function TextLayerBuilder_render(timeout) { - if (!this.textContent || this.renderingDone) { - return; - } - this.cancel(); - this.textDivs = []; - var textLayerFrag = document.createDocumentFragment(); - this.textLayerRenderTask = pdfjsLib.renderTextLayer({ - textContent: this.textContent, - container: textLayerFrag, - viewport: this.viewport, - textDivs: this.textDivs, - timeout: timeout, - enhanceTextSelection: this.enhanceTextSelection - }); - this.textLayerRenderTask.promise.then(function () { - this.textLayerDiv.appendChild(textLayerFrag); - this._finishRendering(); - this.updateMatches(); - }.bind(this), function (reason) { - }); - }, - cancel: function TextLayerBuilder_cancel() { - if (this.textLayerRenderTask) { - this.textLayerRenderTask.cancel(); - this.textLayerRenderTask = null; - } - }, - setTextContent: function TextLayerBuilder_setTextContent(textContent) { - this.cancel(); - this.textContent = textContent; - }, - convertMatches: function TextLayerBuilder_convertMatches(matches, matchesLength) { - var i = 0; - var iIndex = 0; - var bidiTexts = this.textContent.items; - var end = bidiTexts.length - 1; - var queryLen = this.findController === null ? 0 : this.findController.state.query.length; - var ret = []; - if (!matches) { - return ret; - } - for (var m = 0, len = matches.length; m < len; m++) { - var matchIdx = matches[m]; - while (i !== end && matchIdx >= iIndex + bidiTexts[i].str.length) { - iIndex += bidiTexts[i].str.length; - i++; - } - if (i === bidiTexts.length) { - console.error('Could not find a matching mapping'); - } - var match = { - begin: { - divIdx: i, - offset: matchIdx - iIndex - } - }; - if (matchesLength) { - matchIdx += matchesLength[m]; - } else { - matchIdx += queryLen; - } - while (i !== end && matchIdx > iIndex + bidiTexts[i].str.length) { - iIndex += bidiTexts[i].str.length; - i++; - } - match.end = { - divIdx: i, - offset: matchIdx - iIndex - }; - ret.push(match); - } - return ret; - }, - renderMatches: function TextLayerBuilder_renderMatches(matches) { - if (matches.length === 0) { - return; - } - var bidiTexts = this.textContent.items; - var textDivs = this.textDivs; - var prevEnd = null; - var pageIdx = this.pageIdx; - var isSelectedPage = this.findController === null ? false : pageIdx === this.findController.selected.pageIdx; - var selectedMatchIdx = this.findController === null ? -1 : this.findController.selected.matchIdx; - var highlightAll = this.findController === null ? false : this.findController.state.highlightAll; - var infinity = { - divIdx: -1, - offset: undefined - }; - function beginText(begin, className) { - var divIdx = begin.divIdx; - textDivs[divIdx].textContent = ''; - appendTextToDiv(divIdx, 0, begin.offset, className); - } - function appendTextToDiv(divIdx, fromOffset, toOffset, className) { - var div = textDivs[divIdx]; - var content = bidiTexts[divIdx].str.substring(fromOffset, toOffset); - var node = document.createTextNode(content); - if (className) { - var span = document.createElement('span'); - span.className = className; - span.appendChild(node); - div.appendChild(span); - return; - } - div.appendChild(node); - } - var i0 = selectedMatchIdx, i1 = i0 + 1; - if (highlightAll) { - i0 = 0; - i1 = matches.length; - } else if (!isSelectedPage) { - return; - } - for (var i = i0; i < i1; i++) { - var match = matches[i]; - var begin = match.begin; - var end = match.end; - var isSelected = isSelectedPage && i === selectedMatchIdx; - var highlightSuffix = isSelected ? ' selected' : ''; - if (this.findController) { - this.findController.updateMatchPosition(pageIdx, i, textDivs, begin.divIdx); - } - if (!prevEnd || begin.divIdx !== prevEnd.divIdx) { - if (prevEnd !== null) { - appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); - } - beginText(begin); - } else { - appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset); - } - if (begin.divIdx === end.divIdx) { - appendTextToDiv(begin.divIdx, begin.offset, end.offset, 'highlight' + highlightSuffix); - } else { - appendTextToDiv(begin.divIdx, begin.offset, infinity.offset, 'highlight begin' + highlightSuffix); - for (var n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) { - textDivs[n0].className = 'highlight middle' + highlightSuffix; - } - beginText(end, 'highlight end' + highlightSuffix); - } - prevEnd = end; - } - if (prevEnd) { - appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); - } - }, - updateMatches: function TextLayerBuilder_updateMatches() { - if (!this.renderingDone) { - return; - } - var matches = this.matches; - var textDivs = this.textDivs; - var bidiTexts = this.textContent.items; - var clearedUntilDivIdx = -1; - for (var i = 0, len = matches.length; i < len; i++) { - var match = matches[i]; - var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx); - for (var n = begin, end = match.end.divIdx; n <= end; n++) { - var div = textDivs[n]; - div.textContent = bidiTexts[n].str; - div.className = ''; - } - clearedUntilDivIdx = match.end.divIdx + 1; - } - if (this.findController === null || !this.findController.active) { - return; - } - var pageMatches, pageMatchesLength; - if (this.findController !== null) { - pageMatches = this.findController.pageMatches[this.pageIdx] || null; - pageMatchesLength = this.findController.pageMatchesLength ? this.findController.pageMatchesLength[this.pageIdx] || null : null; - } - this.matches = this.convertMatches(pageMatches, pageMatchesLength); - this.renderMatches(this.matches); - }, - _bindMouse: function TextLayerBuilder_bindMouse() { - var div = this.textLayerDiv; - var self = this; - var expandDivsTimer = null; - div.addEventListener('mousedown', function (e) { - if (self.enhanceTextSelection && self.textLayerRenderTask) { - self.textLayerRenderTask.expandTextDivs(true); - return; - } - var end = div.querySelector('.endOfContent'); - if (!end) { - return; - } - end.classList.add('active'); - }); - div.addEventListener('mouseup', function (e) { - if (self.enhanceTextSelection && self.textLayerRenderTask) { - self.textLayerRenderTask.expandTextDivs(false); - return; - } - var end = div.querySelector('.endOfContent'); - if (!end) { - return; - } - end.classList.remove('active'); - }); - } - }; - return TextLayerBuilder; -}(); -function DefaultTextLayerFactory() { -} -DefaultTextLayerFactory.prototype = { - createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport, enhanceTextSelection) { - return new TextLayerBuilder({ - textLayerDiv: textLayerDiv, - pageIndex: pageIndex, - viewport: viewport, - enhanceTextSelection: enhanceTextSelection - }); - } -}; -exports.TextLayerBuilder = TextLayerBuilder; -exports.DefaultTextLayerFactory = DefaultTextLayerFactory; - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var uiUtils = __webpack_require__(0); -var mozL10n = uiUtils.mozL10n; -var noContextMenuHandler = uiUtils.noContextMenuHandler; -var animationStarted = uiUtils.animationStarted; -var localized = uiUtils.localized; -var DEFAULT_SCALE_VALUE = uiUtils.DEFAULT_SCALE_VALUE; -var DEFAULT_SCALE = uiUtils.DEFAULT_SCALE; -var MIN_SCALE = uiUtils.MIN_SCALE; -var MAX_SCALE = uiUtils.MAX_SCALE; -var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading'; -var SCALE_SELECT_CONTAINER_PADDING = 8; -var SCALE_SELECT_PADDING = 22; -var Toolbar = function ToolbarClosure() { - function Toolbar(options, mainContainer, eventBus) { - this.toolbar = options.container; - this.mainContainer = mainContainer; - this.eventBus = eventBus; - this.items = options; - this._wasLocalized = false; - this.reset(); - this._bindListeners(); - } - Toolbar.prototype = { - setPageNumber: function (pageNumber, pageLabel) { - this.pageNumber = pageNumber; - this.pageLabel = pageLabel; - this._updateUIState(false); - }, - setPagesCount: function (pagesCount, hasPageLabels) { - this.pagesCount = pagesCount; - this.hasPageLabels = hasPageLabels; - this._updateUIState(true); - }, - setPageScale: function (pageScaleValue, pageScale) { - this.pageScaleValue = pageScaleValue; - this.pageScale = pageScale; - this._updateUIState(false); - }, - reset: function () { - this.pageNumber = 0; - this.pageLabel = null; - this.hasPageLabels = false; - this.pagesCount = 0; - this.pageScaleValue = DEFAULT_SCALE_VALUE; - this.pageScale = DEFAULT_SCALE; - this._updateUIState(true); - }, - _bindListeners: function Toolbar_bindClickListeners() { - var eventBus = this.eventBus; - var self = this; - var items = this.items; - items.previous.addEventListener('click', function () { - eventBus.dispatch('previouspage'); - }); - items.next.addEventListener('click', function () { - eventBus.dispatch('nextpage'); - }); - items.zoomIn.addEventListener('click', function () { - eventBus.dispatch('zoomin'); - }); - items.zoomOut.addEventListener('click', function () { - eventBus.dispatch('zoomout'); - }); - items.pageNumber.addEventListener('click', function () { - this.select(); - }); - items.pageNumber.addEventListener('change', function () { - eventBus.dispatch('pagenumberchanged', { - source: self, - value: this.value - }); - }); - items.scaleSelect.addEventListener('change', function () { - if (this.value === 'custom') { - return; - } - eventBus.dispatch('scalechanged', { - source: self, - value: this.value - }); - }); - items.presentationModeButton.addEventListener('click', function (e) { - eventBus.dispatch('presentationmode'); - }); - items.openFile.addEventListener('click', function (e) { - eventBus.dispatch('openfile'); - }); - items.print.addEventListener('click', function (e) { - eventBus.dispatch('print'); - }); - items.download.addEventListener('click', function (e) { - eventBus.dispatch('download'); - }); - items.scaleSelect.oncontextmenu = noContextMenuHandler; - localized.then(this._localized.bind(this)); - }, - _localized: function Toolbar_localized() { - this._wasLocalized = true; - this._adjustScaleWidth(); - this._updateUIState(true); - }, - _updateUIState: function Toolbar_updateUIState(resetNumPages) { - function selectScaleOption(value, scale) { - var options = items.scaleSelect.options; - var predefinedValueFound = false; - for (var i = 0, ii = options.length; i < ii; i++) { - var option = options[i]; - if (option.value !== value) { - option.selected = false; - continue; - } - option.selected = true; - predefinedValueFound = true; - } - if (!predefinedValueFound) { - var customScale = Math.round(scale * 10000) / 100; - items.customScaleOption.textContent = mozL10n.get('page_scale_percent', { scale: customScale }, '{{scale}}%'); - items.customScaleOption.selected = true; - } - } - if (!this._wasLocalized) { - return; - } - var pageNumber = this.pageNumber; - var scaleValue = (this.pageScaleValue || this.pageScale).toString(); - var scale = this.pageScale; - var items = this.items; - var pagesCount = this.pagesCount; - if (resetNumPages) { - if (this.hasPageLabels) { - items.pageNumber.type = 'text'; - } else { - items.pageNumber.type = 'number'; - items.numPages.textContent = mozL10n.get('of_pages', { pagesCount: pagesCount }, 'of {{pagesCount}}'); - } - items.pageNumber.max = pagesCount; - } - if (this.hasPageLabels) { - items.pageNumber.value = this.pageLabel; - items.numPages.textContent = mozL10n.get('page_of_pages', { - pageNumber: pageNumber, - pagesCount: pagesCount - }, '({{pageNumber}} of {{pagesCount}})'); - } else { - items.pageNumber.value = pageNumber; - } - items.previous.disabled = pageNumber <= 1; - items.next.disabled = pageNumber >= pagesCount; - items.zoomOut.disabled = scale <= MIN_SCALE; - items.zoomIn.disabled = scale >= MAX_SCALE; - selectScaleOption(scaleValue, scale); - }, - updateLoadingIndicatorState: function Toolbar_updateLoadingIndicatorState(loading) { - var pageNumberInput = this.items.pageNumber; - if (loading) { - pageNumberInput.classList.add(PAGE_NUMBER_LOADING_INDICATOR); - } else { - pageNumberInput.classList.remove(PAGE_NUMBER_LOADING_INDICATOR); - } - }, - _adjustScaleWidth: function Toolbar_adjustScaleWidth() { - var container = this.items.scaleSelectContainer; - var select = this.items.scaleSelect; - animationStarted.then(function () { - if (container.clientWidth === 0) { - container.setAttribute('style', 'display: inherit;'); - } - if (container.clientWidth > 0) { - select.setAttribute('style', 'min-width: inherit;'); - var width = select.clientWidth + SCALE_SELECT_CONTAINER_PADDING; - select.setAttribute('style', 'min-width: ' + (width + SCALE_SELECT_PADDING) + 'px;'); - container.setAttribute('style', 'min-width: ' + width + 'px; ' + 'max-width: ' + width + 'px;'); - } - }); - } - }; - return Toolbar; -}(); -exports.Toolbar = Toolbar; - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20; -var ViewHistory = function ViewHistoryClosure() { - function ViewHistory(fingerprint, cacheSize) { - this.fingerprint = fingerprint; - this.cacheSize = cacheSize || DEFAULT_VIEW_HISTORY_CACHE_SIZE; - this.isInitializedPromiseResolved = false; - this.initializedPromise = this._readFromStorage().then(function (databaseStr) { - this.isInitializedPromiseResolved = true; - var database = JSON.parse(databaseStr || '{}'); - if (!('files' in database)) { - database.files = []; - } - if (database.files.length >= this.cacheSize) { - database.files.shift(); - } - var index; - for (var i = 0, length = database.files.length; i < length; i++) { - var branch = database.files[i]; - if (branch.fingerprint === this.fingerprint) { - index = i; - break; - } - } - if (typeof index !== 'number') { - index = database.files.push({ fingerprint: this.fingerprint }) - 1; - } - this.file = database.files[index]; - this.database = database; - }.bind(this)); - } - ViewHistory.prototype = { - _writeToStorage: function ViewHistory_writeToStorage() { - return new Promise(function (resolve) { - var databaseStr = JSON.stringify(this.database); - sessionStorage.setItem('pdfjs.history', databaseStr); - resolve(); - }.bind(this)); - }, - _readFromStorage: function ViewHistory_readFromStorage() { - return new Promise(function (resolve) { - resolve(sessionStorage.getItem('pdfjs.history')); - }); - }, - set: function ViewHistory_set(name, val) { - if (!this.isInitializedPromiseResolved) { - return; - } - this.file[name] = val; - return this._writeToStorage(); - }, - setMultiple: function ViewHistory_setMultiple(properties) { - if (!this.isInitializedPromiseResolved) { - return; - } - for (var name in properties) { - this.file[name] = properties[name]; - } - return this._writeToStorage(); - }, - get: function ViewHistory_get(name, defaultValue) { - if (!this.isInitializedPromiseResolved) { - return defaultValue; - } - return this.file[name] || defaultValue; - } - }; - return ViewHistory; -}(); -exports.ViewHistory = ViewHistory; - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf'; -; -var pdfjsWebApp; -{ - pdfjsWebApp = __webpack_require__(4); -} -{ - window.FirefoxCom = __webpack_require__(10).FirefoxCom; - __webpack_require__(9); -} -; -; -function getViewerConfiguration() { - return { - appContainer: document.body, - mainContainer: document.getElementById('viewerContainer'), - viewerContainer: document.getElementById('viewer'), - eventBus: null, - toolbar: { - container: document.getElementById('toolbarViewer'), - numPages: document.getElementById('numPages'), - pageNumber: document.getElementById('pageNumber'), - scaleSelectContainer: document.getElementById('scaleSelectContainer'), - scaleSelect: document.getElementById('scaleSelect'), - customScaleOption: document.getElementById('customScaleOption'), - previous: document.getElementById('previous'), - next: document.getElementById('next'), - zoomIn: document.getElementById('zoomIn'), - zoomOut: document.getElementById('zoomOut'), - viewFind: document.getElementById('viewFind'), - openFile: document.getElementById('openFile'), - print: document.getElementById('print'), - presentationModeButton: document.getElementById('presentationMode'), - download: document.getElementById('download'), - viewBookmark: document.getElementById('viewBookmark') - }, - secondaryToolbar: { - toolbar: document.getElementById('secondaryToolbar'), - toggleButton: document.getElementById('secondaryToolbarToggle'), - toolbarButtonContainer: document.getElementById('secondaryToolbarButtonContainer'), - presentationModeButton: document.getElementById('secondaryPresentationMode'), - openFileButton: document.getElementById('secondaryOpenFile'), - printButton: document.getElementById('secondaryPrint'), - downloadButton: document.getElementById('secondaryDownload'), - viewBookmarkButton: document.getElementById('secondaryViewBookmark'), - firstPageButton: document.getElementById('firstPage'), - lastPageButton: document.getElementById('lastPage'), - pageRotateCwButton: document.getElementById('pageRotateCw'), - pageRotateCcwButton: document.getElementById('pageRotateCcw'), - toggleHandToolButton: document.getElementById('toggleHandTool'), - documentPropertiesButton: document.getElementById('documentProperties') - }, - fullscreen: { - contextFirstPage: document.getElementById('contextFirstPage'), - contextLastPage: document.getElementById('contextLastPage'), - contextPageRotateCw: document.getElementById('contextPageRotateCw'), - contextPageRotateCcw: document.getElementById('contextPageRotateCcw') - }, - sidebar: { - mainContainer: document.getElementById('mainContainer'), - outerContainer: document.getElementById('outerContainer'), - toggleButton: document.getElementById('sidebarToggle'), - thumbnailButton: document.getElementById('viewThumbnail'), - outlineButton: document.getElementById('viewOutline'), - attachmentsButton: document.getElementById('viewAttachments'), - thumbnailView: document.getElementById('thumbnailView'), - outlineView: document.getElementById('outlineView'), - attachmentsView: document.getElementById('attachmentsView') - }, - findBar: { - bar: document.getElementById('findbar'), - toggleButton: document.getElementById('viewFind'), - findField: document.getElementById('findInput'), - highlightAllCheckbox: document.getElementById('findHighlightAll'), - caseSensitiveCheckbox: document.getElementById('findMatchCase'), - findMsg: document.getElementById('findMsg'), - findResultsCount: document.getElementById('findResultsCount'), - findStatusIcon: document.getElementById('findStatusIcon'), - findPreviousButton: document.getElementById('findPrevious'), - findNextButton: document.getElementById('findNext') - }, - passwordOverlay: { - overlayName: 'passwordOverlay', - container: document.getElementById('passwordOverlay'), - label: document.getElementById('passwordText'), - input: document.getElementById('password'), - submitButton: document.getElementById('passwordSubmit'), - cancelButton: document.getElementById('passwordCancel') - }, - documentProperties: { - overlayName: 'documentPropertiesOverlay', - container: document.getElementById('documentPropertiesOverlay'), - closeButton: document.getElementById('documentPropertiesClose'), - fields: { - 'fileName': document.getElementById('fileNameField'), - 'fileSize': document.getElementById('fileSizeField'), - 'title': document.getElementById('titleField'), - 'author': document.getElementById('authorField'), - 'subject': document.getElementById('subjectField'), - 'keywords': document.getElementById('keywordsField'), - 'creationDate': document.getElementById('creationDateField'), - 'modificationDate': document.getElementById('modificationDateField'), - 'creator': document.getElementById('creatorField'), - 'producer': document.getElementById('producerField'), - 'version': document.getElementById('versionField'), - 'pageCount': document.getElementById('pageCountField') - } - }, - errorWrapper: { - container: document.getElementById('errorWrapper'), - errorMessage: document.getElementById('errorMessage'), - closeButton: document.getElementById('errorClose'), - errorMoreInfo: document.getElementById('errorMoreInfo'), - moreInfoButton: document.getElementById('errorShowMore'), - lessInfoButton: document.getElementById('errorShowLess') - }, - printContainer: document.getElementById('printContainer'), - openFileInputName: 'fileInput', - debuggerScriptPath: './debugger.js', - defaultUrl: DEFAULT_URL - }; -} -function webViewerLoad() { - var config = getViewerConfiguration(); - window.PDFViewerApplication = pdfjsWebApp.PDFViewerApplication; - pdfjsWebApp.PDFViewerApplication.run(config); -} -if (document.readyState === 'interactive' || document.readyState === 'complete') { - webViewerLoad(); -} else { - document.addEventListener('DOMContentLoaded', webViewerLoad, true); -} - -/***/ }) -/******/ ]); \ No newline at end of file diff --git a/application/palemoon/extensions/pdfjs/jar.mn b/application/palemoon/extensions/pdfjs/jar.mn deleted file mode 100644 index ca1148155e..0000000000 --- a/application/palemoon/extensions/pdfjs/jar.mn +++ /dev/null @@ -1,3 +0,0 @@ -pdfjs.jar: -% resource pdf.js %content/ - content/ (content/*) diff --git a/application/palemoon/installer/Makefile.in b/application/palemoon/installer/Makefile.in deleted file mode 100644 index 4d10ea4701..0000000000 --- a/application/palemoon/installer/Makefile.in +++ /dev/null @@ -1,205 +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/. - -STANDALONE_MAKEFILE := 1 -DIST_SUBDIR := browser - -include $(topsrcdir)/config/rules.mk - -MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in - -MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in - -ifdef MOZ_MULET -MOZ_PKG_MANIFEST_P += $(topsrcdir)/b2g/installer/package-manifest.in -endif - -# Some files have been already bundled with xulrunner -ifndef MOZ_MULET -MOZ_PKG_FATAL_WARNINGS = 1 -endif - -DEFINES += -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR) - -ifdef LIBXUL_SDK -DEFINES += -DLIBXUL_SDK=1 -endif - -ifdef MOZ_DEBUG -DEFINES += -DMOZ_DEBUG=1 -endif - -ifdef MOZ_ENABLE_GNOME_COMPONENT -DEFINES += -DMOZ_ENABLE_GNOME_COMPONENT=1 -endif - -ifneq (,$(filter gtk%,$(MOZ_WIDGET_TOOLKIT))) -DEFINES += -DMOZ_GTK=1 -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3) -DEFINES += -DMOZ_GTK3=1 -endif -endif - -ifdef MOZ_SYSTEM_NSPR -DEFINES += -DMOZ_SYSTEM_NSPR=1 -endif - -ifdef MOZ_SYSTEM_NSS -DEFINES += -DMOZ_SYSTEM_NSS=1 -endif - -ifdef NSS_DISABLE_DBM -DEFINES += -DNSS_DISABLE_DBM=1 -endif - -DEFINES += -DJAREXT= - -ifdef MOZ_ANGLE_RENDERER -DEFINES += -DMOZ_ANGLE_RENDERER=$(MOZ_ANGLE_RENDERER) -ifdef MOZ_D3DCOMPILER_VISTA_DLL -DEFINES += -DMOZ_D3DCOMPILER_VISTA_DLL=$(MOZ_D3DCOMPILER_VISTA_DLL) -endif -ifdef MOZ_D3DCOMPILER_XP_DLL -DEFINES += -DMOZ_D3DCOMPILER_XP_DLL=$(MOZ_D3DCOMPILER_XP_DLL) -endif -endif - -DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) - -# Set MSVC dlls version to package, if any. -ifdef MOZ_NO_DEBUG_RTL -ifdef WIN32_REDIST_DIR -DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1 -DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL) -DEFINES += -DMSVC_CMP_RUNTIME_DLL=$(MSVC_CMP_RUNTIME_DLL) -DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL) -endif -ifdef WIN_UCRT_REDIST_DIR -DEFINES += -DMOZ_PACKAGE_WIN_UCRT_DLLS=1 -endif -endif - -ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET))) -DEFINES += -DMOZ_SHARED_MOZGLUE=1 -endif - -ifdef NECKO_WIFI -DEFINES += -DNECKO_WIFI -endif - -ifdef GKMEDIAS_SHARED_LIBRARY -DEFINES += -DGKMEDIAS_SHARED_LIBRARY -endif - -ifdef MOZ_PKG_MANIFEST_P -MOZ_PKG_MANIFEST = package-manifest - -$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS) - $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST_P) -o $@) - -GARBAGE += $(MOZ_PKG_MANIFEST) -endif - -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -MOZ_PKG_MAC_DSSTORE=branding/dsstore -MOZ_PKG_MAC_BACKGROUND=branding/background.png -MOZ_PKG_MAC_ICON=branding/disk.icns -MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ ' -endif - -NON_OMNIJAR_FILES = \ - defaults/profile/chrome/userChrome-example.css \ - defaults/profile/chrome/userContent-example.css \ - $(NULL) - -ifndef LIBXUL_SDK -INSTALL_SDK = 1 -endif - -include $(topsrcdir)/toolkit/mozapps/installer/signing.mk -include $(topsrcdir)/toolkit/mozapps/installer/packager-uxp.mk - -ifeq (bundle, $(MOZ_FS_LAYOUT)) -BINPATH = $(_BINPATH) -DEFINES += -DAPPNAME='$(_APPNAME)' -else -# Every other platform just winds up in dist/bin -BINPATH = bin -endif -DEFINES += -DBINPATH='$(BINPATH)' - -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -RESPATH = $(_APPNAME)/Contents/Resources -else -RESPATH = $(BINPATH) -endif -DEFINES += -DRESPATH='$(RESPATH)' - -AB = $(firstword $(subst -, ,$(AB_CD))) -DEFINES += -DAB=$(AB) - -DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION) -ifdef MOZ_SHARED_ICU -DEFINES += -DMOZ_SHARED_ICU -endif -ifdef MOZ_ICU_DATA_ARCHIVE -DEFINES += -DMOZ_ICU_DATA_ARCHIVE -endif -ifdef MOZ_JEMALLOC3 -DEFINES += -DMOZ_JEMALLOC3 -endif -DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX) -DEFINES += -DICU_DATA_FILE=$(ICU_DATA_FILE) -ifdef CLANG_CXX -DEFINES += -DCLANG_CXX -endif -ifdef CLANG_CL -DEFINES += -DCLANG_CL -endif -ifeq (x86,$(CPU_ARCH)) -ifdef _MSC_VER -ifndef CLANG_CL -DEFINES += -DWOW_HELPER -endif -endif -endif - -# Builds using the hybrid FasterMake/RecursiveMake backend will -# fail to produce a langpack. See bug 1255096. -make-langpack: -ifeq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS))) - $(MAKE) -C $(DEPTH)/application/palemoon/locales langpack -else - @echo WARNING: "Language Pack was not generated due to using the hybrid FasterMake/RecursiveMake backend." >&2 -endif - -libs:: make-langpack - -ifeq (WINNT,$(OS_ARCH)) -PKGCOMP_FIND_OPTS = -else -PKGCOMP_FIND_OPTS = -L -endif -ifeq (Darwin, $(OS_ARCH)) -FINDPATH = $(_APPNAME)/Contents/MacOS -else -FINDPATH=bin -endif - -package-compare:: $(MOZ_PKG_MANIFEST) -ifdef MOZ_PKG_MANIFEST_P - cd $(DIST); find $(PKGCOMP_FIND_OPTS) '$(FINDPATH)' -type f | sort > bin-list.txt - grep '^$(BINPATH)' $(MOZ_PKG_MANIFEST) | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt - -diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt - rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt -endif - -installer:: -ifdef INSTALLER_DIR - $(MAKE) -C $(INSTALLER_DIR) -endif - -ifdef ENABLE_MARIONETTE -DEFINES += -DENABLE_MARIONETTE=1 -endif diff --git a/application/palemoon/installer/moz.build b/application/palemoon/installer/moz.build deleted file mode 100644 index 1afe23d027..0000000000 --- a/application/palemoon/installer/moz.build +++ /dev/null @@ -1,5 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in deleted file mode 100644 index 23e99cd2e9..0000000000 --- a/application/palemoon/installer/package-manifest.in +++ /dev/null @@ -1,328 +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/. - -; Package file for the Firefox build. -; -; Packaging manifest is used to copy files from dist/bin -; to the staging directory. -; Some other files are built in the staging directory directly, -; so they will be implicitly packaged too. -; -; File format: -; -; [] designates a toplevel component. Example: [xpcom] -; - in front of a file specifies it to be removed from the destination -; * wildcard support to recursively copy the entire directory -; ; file comment -; - -; Due to Apple Mac OS X packaging requirements, files that are in the same -; directory on other platforms must be located in different directories on -; Mac OS X. The following defines allow specifying the Mac OS X bundle -; location which also work on other platforms. -; -; @BINPATH@ -; Equals Contents/MacOS/ on Mac OS X and is the path to the main binary on other -; platforms. -; -; @RESPATH@ -; Equals Contents/Resources/ on Mac OS X and is equivalent to @BINPATH@ on other -; platforms. - -#filter substitution - -[@AB_CD@] -@RESPATH@/browser/chrome/@AB_CD@@JAREXT@ -@RESPATH@/browser/chrome/@AB_CD@.manifest -@RESPATH@/chrome/@AB_CD@@JAREXT@ -@RESPATH@/chrome/@AB_CD@.manifest -@RESPATH@/browser/defaults/profile/bookmarks.html -@RESPATH@/browser/defaults/profile/chrome/* -@RESPATH@/browser/defaults/profile/localstore.rdf -@RESPATH@/browser/defaults/profile/mimeTypes.rdf -@RESPATH@/dictionaries/* -#if defined(XP_WIN) || defined(XP_LINUX) -@RESPATH@/fonts/* -#endif -@RESPATH@/hyphenation/* -@RESPATH@/browser/@PREF_DIR@/palemoon-l10n.js -@RESPATH@/browser/searchplugins/* -#ifdef XP_WIN32 -@BINPATH@/uninstall/helper.exe -#endif -#ifdef MOZ_UPDATER -@RESPATH@/updater.ini -#endif - -[xpcom] -@RESPATH@/dependentlibs.list -#ifdef MOZ_SHARED_MOZGLUE -@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@ -#endif -#ifndef MOZ_STATIC_JS -@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@ -#endif -#ifdef GKMEDIAS_SHARED_LIBRARY -@BINPATH@/@DLL_PREFIX@gkmedias@DLL_SUFFIX@ -#endif -#ifndef MOZ_SYSTEM_HUNSPELL -#ifndef XP_SOLARIS -@BINPATH@/@DLL_PREFIX@hunspell@DLL_SUFFIX@ -#endif -#endif -#ifndef MOZ_SYSTEM_NSPR -#ifndef MOZ_FOLD_LIBS -@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@ -#endif -#endif -@BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@ -@BINPATH@/@MOZ_CHILD_PROCESS_NAME@ -#ifdef XP_WIN32 -@BINPATH@/plugin-hang-ui@BIN_SUFFIX@ -#if MOZ_PACKAGE_MSVC_DLLS -@BINPATH@/@MSVC_C_RUNTIME_DLL@ -@BINPATH@/@MSVC_CMP_RUNTIME_DLL@ -@BINPATH@/@MSVC_CXX_RUNTIME_DLL@ -#endif -#if MOZ_PACKAGE_WIN_UCRT_DLLS -@BINPATH@/api-ms-win-*.dll -@BINPATH@/ucrtbase.dll -#endif -#endif -#ifdef MOZ_ICU_DATA_ARCHIVE -@RESPATH@/@ICU_DATA_FILE@ -#endif -#ifdef MOZ_SHARED_ICU -@BINPATH@/@DLL_PREFIX@icu@MOZ_ICU_VERSION@@DLL_SUFFIX@ -#endif -#ifdef MOZ_GTK3 -@BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@ -@BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@ -#endif - -[browser] -; [Base Browser Files] -#ifndef XP_UNIX -@BINPATH@/@MOZ_APP_NAME@.exe -@BINPATH@/@MOZ_APP_NAME@.VisualElementsManifest.xml -@BINPATH@/browser/VisualElements/VisualElements_150.png -@BINPATH@/browser/VisualElements/VisualElements_70.png -#else -@RESPATH@/@MOZ_APP_NAME@-bin -@BINPATH@/@MOZ_APP_NAME@ -#endif -@RESPATH@/application.ini -#ifdef MOZ_UPDATER -@RESPATH@/update-settings.ini -#endif -@RESPATH@/platform.ini -#ifndef MOZ_SYSTEM_SQLITE -@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@ -#endif -@BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@ -#ifdef MOZ_FFVPX -@BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@mozavcodec@DLL_SUFFIX@ -#endif -@RESPATH@/browser/blocklist.xml -@RESPATH@/browser/ua-update.json -#ifdef XP_UNIX -@RESPATH@/run-mozilla.sh -#endif - -; [Components] -@RESPATH@/components/* -@RESPATH@/browser/components/* -#ifdef MOZ_ARTIFACT_BUILDS -#endif -#ifdef ACCESSIBILITY -#ifdef XP_WIN32 -@BINPATH@/Accessible.tlb -@BINPATH@/AccessibleMarshal.dll -@BINPATH@/IA2Marshal.dll -#endif -#endif -#ifdef MOZ_WEBRTC -#endif -#ifdef MOZ_WEBSPEECH -#endif -#ifdef MOZ_GTK -#endif -#ifdef NS_PRINTING -#endif -#ifdef NECKO_WIFI -#endif -#ifdef MOZ_WEBRTC -#endif -#ifdef MOZ_ENABLE_XREMOTE -#endif - -;@RESPATH@/chrome/marionette@JAREXT@ -;@RESPATH@/chrome/marionette.manifest - -; Modules -@RESPATH@/browser/modules/* -@RESPATH@/modules/* - -; ANGLE GLES-on-D3D rendering library -#ifdef MOZ_ANGLE_RENDERER -@BINPATH@/libEGL.dll -@BINPATH@/libGLESv2.dll - -#ifdef MOZ_D3DCOMPILER_VISTA_DLL -@BINPATH@/@MOZ_D3DCOMPILER_VISTA_DLL@ -#endif - -#ifdef MOZ_D3DCOMPILER_XP_DLL -@BINPATH@/@MOZ_D3DCOMPILER_XP_DLL@ -#endif -#endif # MOZ_ANGLE_RENDERER - -; [Browser Chrome Files] -@RESPATH@/browser/chrome.manifest -@RESPATH@/browser/chrome/browser@JAREXT@ -@RESPATH@/browser/chrome/browser.manifest -@RESPATH@/browser/chrome/pdfjs.manifest -@RESPATH@/browser/chrome/pdfjs/* -@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest -@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png -@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf -@RESPATH@/chrome/toolkit@JAREXT@ -@RESPATH@/chrome/toolkit.manifest -@RESPATH@/chrome/recording.manifest -@RESPATH@/chrome/recording/* -#ifdef MOZ_GTK -@RESPATH@/browser/chrome/icons/default/default16.png -@RESPATH@/browser/chrome/icons/default/default32.png -@RESPATH@/browser/chrome/icons/default/default48.png -#endif - -#ifdef MOZ_DEVTOOLS -; [Webide Files] -@RESPATH@/browser/chrome/webide@JAREXT@ -@RESPATH@/browser/chrome/webide.manifest -@RESPATH@/browser/@PREF_DIR@/webide-prefs.js - -; DevTools -@RESPATH@/browser/chrome/devtools@JAREXT@ -@RESPATH@/browser/chrome/devtools.manifest -@RESPATH@/browser/@PREF_DIR@/devtools.js -#endif - -; shell icons -#ifdef XP_UNIX -; shell icons -@RESPATH@/browser/icons/*.png -#ifdef MOZ_UPDATER -; updater icon -@RESPATH@/icons/updater.png -#endif -#endif - -; [Default Preferences] -; All the pref files must be part of base to prevent migration bugs -@RESPATH@/browser/defaults/permissions -@RESPATH@/browser/@PREF_DIR@/palemoon.js -@RESPATH@/browser/@PREF_DIR@/palemoon-branding.js -@RESPATH@/goanna.js -@RESPATH@/defaults/autoconfig/prefcalls.js - -; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325) -; Technically this is an app pref file, but we are keeping it in the original -; gre location for now. -@RESPATH@/defaults/pref/channel-prefs.js - -#ifdef MOZ_SERVICES_SYNC -; Services (gre) prefs -@RESPATH@/defaults/pref/services-sync.js -#endif - -; [Layout Engine Resources] -; Style Sheets, Graphics and other Resources used by the layout engine. -@RESPATH@/res/EditorOverride.css -@RESPATH@/res/contenteditable.css -@RESPATH@/res/designmode.css -@RESPATH@/res/ImageDocument.css -@RESPATH@/res/TopLevelImageDocument.css -@RESPATH@/res/TopLevelVideoDocument.css -@RESPATH@/res/table-add-column-after-active.gif -@RESPATH@/res/table-add-column-after-hover.gif -@RESPATH@/res/table-add-column-after.gif -@RESPATH@/res/table-add-column-before-active.gif -@RESPATH@/res/table-add-column-before-hover.gif -@RESPATH@/res/table-add-column-before.gif -@RESPATH@/res/table-add-row-after-active.gif -@RESPATH@/res/table-add-row-after-hover.gif -@RESPATH@/res/table-add-row-after.gif -@RESPATH@/res/table-add-row-before-active.gif -@RESPATH@/res/table-add-row-before-hover.gif -@RESPATH@/res/table-add-row-before.gif -@RESPATH@/res/table-remove-column-active.gif -@RESPATH@/res/table-remove-column-hover.gif -@RESPATH@/res/table-remove-column.gif -@RESPATH@/res/table-remove-row-active.gif -@RESPATH@/res/table-remove-row-hover.gif -@RESPATH@/res/table-remove-row.gif -@RESPATH@/res/grabber.gif -@RESPATH@/res/fonts/* -@RESPATH@/res/dtd/* -@RESPATH@/res/html/* -@RESPATH@/res/language.properties -@RESPATH@/res/entityTables/* - -; svg -@RESPATH@/res/svg.css - -; [Personal Security Manager] -; -; NSS libraries are signed in the staging directory, -; meaning their .chk files are created there directly. -; -#ifndef MOZ_SYSTEM_NSS -#if defined(XP_LINUX) && !defined(ANDROID) -@BINPATH@/@DLL_PREFIX@freeblpriv3@DLL_SUFFIX@ -#elif defined(XP_SOLARIS) && defined(SPARC64) -@BINPATH@/@DLL_PREFIX@freebl_64fpu_3@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@freebl_64int_3@DLL_SUFFIX@ -#elif defined(XP_SOLARIS) && defined(SPARC) -@BINPATH@/@DLL_PREFIX@freebl_32fpu_3@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@freebl_32int64_3@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@ -#else -@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@ -#endif -@BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@nssckbi@DLL_SUFFIX@ -#ifndef NSS_DISABLE_DBM -@BINPATH@/@DLL_PREFIX@nssdbm3@DLL_SUFFIX@ -#endif -#ifndef MOZ_FOLD_LIBS -@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@ -@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@ -#endif -@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@ -#endif -@RESPATH@/chrome/pippki@JAREXT@ -@RESPATH@/chrome/pippki.manifest - -; [Updater] -; -#ifdef MOZ_UPDATER -@BINPATH@/updater@BIN_SUFFIX@ -#endif - -; Shutdown Terminator - -#if defined(CLANG_CXX) -#if defined(MOZ_ASAN) || defined(MOZ_TSAN) -@BINPATH@/llvm-symbolizer -#endif -#endif - -#if defined(MOZ_ASAN) && defined(CLANG_CL) -@BINPATH@/clang_rt.asan_dynamic-*.dll -#endif diff --git a/application/palemoon/installer/removed-files.in b/application/palemoon/installer/removed-files.in deleted file mode 100644 index d425652ba1..0000000000 --- a/application/palemoon/installer/removed-files.in +++ /dev/null @@ -1,99 +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/. - -# The removed-files.in file specifies files and directories to be removed during -# an application update that are not automatically removed by the application -# update process. The application update process handles the vast majority of -# file and directory removals automatically so this file should not be used in -# the vast majority of cases. - -# When to use removed-files.in file to remove files and directories: -# * Files and directories located in the installation's "distribution/" and -# "extensions/" directories that were added before Firefox 27. Files and -# directories located in these directories were not included in the -# application update file removals for a complete update prior to Firefox 27. -# * Empty directories that were accidentally added to the installation -# directory. -# * Third party files and directories that were added to the installation -# directory. Under normal circumstances this should only be done after release -# drivers have approved the removal of these third party files. - -# If you are not sure whether a file or directory should be removed using the -# removed-files.in file please contact one of the developers that work on -# application update. - -# Note: the "distribution/" and "browser/extensions/" directories should never -# be removed recursively since these directories are used by Partner builds and -# custom installations. - -# To specify a file to be removed add the path to the file. -# * If the file doesn't exist the update will succeed. -# * If the file exists and can't be removed (e.g. the file is locked) the -# update will fail. -# -# Example: path/to/file - -# To specify a directory to be removed only if it is empty add the path to the -# directory with a trailing forward slash. -# * If the directory doesn't exist the update will succeed. -# * If the directory can't be removed (e.g. the directory is locked, contains -# files, etc.) the update will succeed. -# -# Example: path/to/dir/ - -# To specify a directory that should be recursively removed add the path to the -# directory with a trailing forward slash and "*". -# * If the directory doesn't exist the update will succeed. -# * If all of the files the directory contains can be removed but the directory -# or a subdirectory can't be removed (e.g. the directory is locked) the update -# will succeed. -# * If a file within the directory can't be removed the update will fail. -# -# Example: path/to/dir/* - -# Due to Apple Mac OS X packaging requirements files that are in the same -# directory on other platforms must be located in different directories on -# Mac OS X. The following defines allow specifying the Mac OS X bundle -# location which also work on other platforms. -# -# @DIR_MACOS@ -# Equals Contents/MacOS/ on Mac OS X and is an empty string on other platforms. -# -# @DIR_RESOURCES@ -# Equals Contents/Resources/ on Mac OS X and is an empty string on other -# platforms. - -# Common File Removals -# This is located under the "distribution/" directory and it was added before -# Firefox 27 -@DIR_MACOS@distribution/extensions/testpilot@labs.mozilla.com.xpi - -# Common Directory removals -@DIR_MACOS@chrome/ -#ifdef XP_UNIX - chrome/icons/ - chrome/icons/default/ -#endif -@DIR_MACOS@chrome/overlayinfo/ -@DIR_MACOS@components/ -@DIR_MACOS@defaults/autoconfig/ -@DIR_MACOS@defaults/profile/ -@DIR_MACOS@defaults/profile/chrome/ -@DIR_MACOS@defaults/profile/US/* -@DIR_MACOS@defaults/profile/extensions/ -@DIR_MACOS@defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/* -@DIR_MACOS@distribution/ -@DIR_MACOS@distribution/extensions/ -@DIR_MACOS@extensions/ -@DIR_MACOS@extensions/inspector@mozilla.org/* -@DIR_MACOS@extensions/reporter@mozilla.org/* -@DIR_MACOS@extensions/talkback@mozilla.org/* -@DIR_MACOS@extensions/testpilot@labs.mozilla.com/* -@DIR_MACOS@extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/* -@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/* -@DIR_MACOS@greprefs/ -@DIR_MACOS@jssubloader/ -@DIR_MACOS@modules/ -@DIR_MACOS@searchplugins/* -@DIR_MACOS@webapprt/components/ diff --git a/application/palemoon/installer/windows/Makefile.in b/application/palemoon/installer/windows/Makefile.in deleted file mode 100644 index 4bc4da65af..0000000000 --- a/application/palemoon/installer/windows/Makefile.in +++ /dev/null @@ -1,78 +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/. - -include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk - -CONFIG_DIR = instgen - -ifdef MOZ_OFFICIAL_BRANDING -BRANDED_SFX = 1 -endif - -ifdef BRANDED_SFX -SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/lun3r/7zSD.sfx -else -SFX_MODULE = $(MOZILLA_SRCDIR)/other-licenses/7zstub/palemoon/7zSD.sfx -endif - -INSTALLER_FILES = \ - app.tag \ - nsis/installer.nsi \ - nsis/uninstaller.nsi \ - nsis/shared.nsh \ - $(NULL) - -BRANDING_FILES = \ - branding.nsi \ - appname.bmp \ - wizHeader.bmp \ - wizHeaderRTL.bmp \ - wizWatermark.bmp \ - $(NULL) - -include $(topsrcdir)/config/config.mk - -ifdef LOCALE_MERGEDIR -PPL_LOCALE_ARGS = \ - --l10n-dir=$(LOCALE_MERGEDIR)/application/palemoon/installer \ - --l10n-dir=$(call EXPAND_LOCALE_SRCDIR,application/palemoon/locales)/installer \ - --l10n-dir=$(topsrcdir)/application/palemoon/locales/en-US/installer \ - $(NULL) -else -PPL_LOCALE_ARGS=$(call EXPAND_LOCALE_SRCDIR,application/palemoon/locales)/installer -endif - -OVERRIDE_DEFAULT_GOAL := installer -installer:: - $(MAKE) -C .. installer-stage - $(MAKE) $(CONFIG_DIR)/setup.exe - -# For building the uninstaller during the application build so it can be -# included for mar file generation. -uninstaller:: - $(RM) -r $(CONFIG_DIR) - $(MKDIR) $(CONFIG_DIR) - $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR) - $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR) - $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ - $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) - $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ - --preprocess-locale $(topsrcdir) \ - $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR) - -$(CONFIG_DIR)/setup.exe:: - $(RM) -r $(CONFIG_DIR) - $(MKDIR) $(CONFIG_DIR) - $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR) - $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR) - $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ - $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) - $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ - --preprocess-locale $(topsrcdir) \ - $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR) - -GARBARGE_DIRS += instgen - -include $(topsrcdir)/config/rules.mk -include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk diff --git a/application/palemoon/installer/windows/app.tag b/application/palemoon/installer/windows/app.tag deleted file mode 100644 index d72d798e7a..0000000000 --- a/application/palemoon/installer/windows/app.tag +++ /dev/null @@ -1,4 +0,0 @@ -;!@Install@!UTF-8! -Title="Lun3r" -RunProgram="setup.exe" -;!@InstallEnd@! \ No newline at end of file diff --git a/application/palemoon/installer/windows/moz.build b/application/palemoon/installer/windows/moz.build deleted file mode 100644 index f9dac8f001..0000000000 --- a/application/palemoon/installer/windows/moz.build +++ /dev/null @@ -1,9 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -DEFINES['MOZ_APP_NAME'] = CONFIG['MOZ_APP_NAME'] -DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION'] -DEFINES['MOZILLA_VERSION'] = CONFIG['MOZILLA_VERSION'] -DEFINES['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME'] diff --git a/application/palemoon/installer/windows/nsis/defines.nsi.in b/application/palemoon/installer/windows/nsis/defines.nsi.in deleted file mode 100644 index 50ff22b5b9..0000000000 --- a/application/palemoon/installer/windows/nsis/defines.nsi.in +++ /dev/null @@ -1,65 +0,0 @@ -#filter substitution -# 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/. - -# These defines should match application.ini settings -!define AppName "@MOZ_APP_DISPLAYNAME@" -!define AppVersion "@APP_VERSION@" -!define GREVersion @MOZILLA_VERSION@ -!define AB_CD "@AB_CD@" - -!define FileMainEXE "@MOZ_APP_NAME@.exe" -!define WindowClass "@MOZ_APP_DISPLAYNAME@MessageWindow" -!define DDEApplication "@MOZ_APP_DISPLAYNAME@" -!define AppRegName "${CompanyName}\${BrandShortName}" - -!ifndef DEV_EDITION -!define BrandShortName "@MOZ_APP_DISPLAYNAME@" -!endif -!define BrandFullName "${BrandFullNameInternal}" - -!define CERTIFICATE_NAME "Mozilla Corporation" -!define CERTIFICATE_ISSUER "DigiCert SHA2 Assured ID Code Signing CA" -; Changing the name or issuer requires us to have both the old and the new -; in the registry at the same time, temporarily. -!define CERTIFICATE_NAME_PREVIOUS "Mozilla Corporation" -!define CERTIFICATE_ISSUER_PREVIOUS "DigiCert Assured ID Code Signing CA-1" - -# LSP_CATEGORIES is the permitted LSP categories for the application. Each LSP -# category value is ANDed together to set multiple permitted categories. -# See http://msdn.microsoft.com/en-us/library/ms742253%28VS.85%29.aspx -# The value below removes all LSP categories previously set. -!define LSP_CATEGORIES "0x00000000" - -!if "@MOZ_UPDATE_CHANNEL@" == "" -!define UpdateChannel "Unknown" -!else -!define UpdateChannel "@MOZ_UPDATE_CHANNEL@" -!endif - -# ARCH is used when it is necessary to differentiate the x64 registry keys from -# the x86 registry keys (e.g. the uninstall registry key). -#ifdef HAVE_64BIT_BUILD -!define HAVE_64BIT_BUILD -!define ARCH "x64" -!define MinSupportedVer "Microsoft Windows XP x64" -#else -!define ARCH "x86" -!define MinSupportedVer "Microsoft Windows XP" -#endif - -!define MinSupportedCPU "SSE2" - -# File details shared by both the installer and uninstaller -VIProductVersion "1.0.0.0" -VIAddVersionKey "ProductName" "${BrandShortName}" -VIAddVersionKey "CompanyName" "${CompanyName}" -#ifdef MOZ_OFFICIAL_BRANDING -VIAddVersionKey "LegalTrademarks" "${BrandShortName} is a Trademark of ${CompanyName}." -#endif -VIAddVersionKey "LegalCopyright" "${CompanyName}" -VIAddVersionKey "FileVersion" "${AppVersion}" -VIAddVersionKey "ProductVersion" "${AppVersion}" -# Comments is not used but left below commented out for future reference -# VIAddVersionKey "Comments" "Comments" diff --git a/application/palemoon/installer/windows/nsis/installer.nsi b/application/palemoon/installer/windows/nsis/installer.nsi deleted file mode 100644 index cc1f2e213e..0000000000 --- a/application/palemoon/installer/windows/nsis/installer.nsi +++ /dev/null @@ -1,1191 +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/. - -# Required Plugins: -# AppAssocReg http://nsis.sourceforge.net/Application_Association_Registration_plug-in -# ApplicationID http://nsis.sourceforge.net/ApplicationID_plug-in -# CityHash http://dxr.mozilla.org/mozilla-central/source/other-licenses/nsis/Contrib/CityHash -# ShellLink http://nsis.sourceforge.net/ShellLink_plug-in -# UAC http://nsis.sourceforge.net/UAC_plug-in -# ServicesHelper Mozilla specific plugin that is located in /other-licenses/nsis - -; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs -!verbose 3 - -; 7-Zip provides better compression than the lzma from NSIS so we add the files -; uncompressed and use 7-Zip to create a SFX archive of it -SetDatablockOptimize on -SetCompress off -CRCCheck on - -RequestExecutionLevel user - -; The commands inside this ifdef require NSIS 3.0a2 or greater so the ifdef can -; be removed after we require NSIS 3.0a2 or greater. -!ifdef NSIS_PACKEDVERSION - Unicode true - ManifestSupportedOS all - ManifestDPIAware true -!endif - -!addplugindir ./ - -Var TmpVal -Var InstallType -Var AddStartMenuSC -Var AddTaskbarSC -Var AddQuickLaunchSC -Var AddDesktopSC -Var InstallMaintenanceService -Var PageName -Var PreventRebootRequired -Var PrtChkb - -; By defining NO_STARTMENU_DIR an installer that doesn't provide an option for -; an application's Start Menu PROGRAMS directory and doesn't define the -; StartMenuDir variable can use the common InstallOnInitCommon macro. -!define NO_STARTMENU_DIR - -; On Vista and above attempt to elevate Standard Users in addition to users that -; are a member of the Administrators group. -!define NONADMIN_ELEVATE - -!define AbortSurveyURL "http://www.kampyle.com/feedback_form/ff-feedback-form.php?site_code=8166124&form_id=12116&url=" - -; Other included files may depend upon these includes! -; The following includes are provided by NSIS. -!include FileFunc.nsh -!include LogicLib.nsh -!include MUI.nsh -!include WinMessages.nsh -!include WinVer.nsh -!include WordFunc.nsh - -!insertmacro GetOptions -!insertmacro GetParameters -!insertmacro GetSize -!insertmacro StrFilter -!insertmacro WordFind -!insertmacro WordReplace - -; The following includes are custom. -!include branding.nsi -!include defines.nsi -!include common.nsh -!include locales.nsi - -VIAddVersionKey "FileDescription" "${BrandShortName} Installer" -VIAddVersionKey "OriginalFilename" "setup.exe" - -; Must be inserted before other macros that use logging -!insertmacro _LoggingCommon - -!insertmacro AddDisabledDDEHandlerValues -!insertmacro ChangeMUIHeaderImage -!insertmacro CheckForFilesInUse -!insertmacro CleanUpdateDirectories -!insertmacro CopyFilesFromDir -!insertmacro CreateRegKey -!insertmacro GetLongPath -!insertmacro GetPathFromString -!insertmacro GetParent -!insertmacro InitHashAppModelId -!insertmacro IsHandlerForInstallDir -!insertmacro IsPinnedToTaskBar -!insertmacro IsUserAdmin -!insertmacro LogDesktopShortcut -!insertmacro LogQuickLaunchShortcut -!insertmacro LogStartMenuShortcut -!insertmacro ManualCloseAppPrompt -!insertmacro PinnedToStartMenuLnkCount -!insertmacro RegCleanAppHandler -!insertmacro RegCleanMain -!insertmacro RegCleanUninstall -!insertmacro RemovePrecompleteEntries -!insertmacro SetAppLSPCategories -!insertmacro SetBrandNameVars -!insertmacro UpdateShortcutAppModelIDs -!insertmacro UnloadUAC -!insertmacro WriteRegStr2 -!insertmacro WriteRegDWORD2 - -!include shared.nsh - -; Helper macros for ui callbacks. Insert these after shared.nsh -!insertmacro CheckCustomCommon -!insertmacro InstallEndCleanupCommon -!insertmacro InstallOnInitCommon -!insertmacro InstallStartCleanupCommon -!insertmacro LeaveDirectoryCommon -!insertmacro LeaveOptionsCommon -!insertmacro OnEndCommon -!insertmacro PreDirectoryCommon - -Name "${BrandFullName}" -OutFile "setup.exe" -!ifdef HAVE_64BIT_BUILD - InstallDir "$PROGRAMFILES64\${CompanyName}\${BrandShortName}\" -!else - InstallDir "$PROGRAMFILES32\${CompanyName}\${BrandShortName}\" -!endif -ShowInstDetails nevershow - -################################################################################ -# Modern User Interface - MUI - -!define MOZ_MUI_CUSTOM_ABORT -!define MUI_CUSTOMFUNCTION_ABORT "CustomAbort" -!define MUI_ICON setup.ico -!define MUI_UNICON setup.ico -!define MUI_WELCOMEPAGE_TITLE_3LINES -!define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_RIGHT -!define MUI_WELCOMEFINISHPAGE_BITMAP wizWatermark.bmp - -; Use a right to left header image when the language is right to left -!ifdef ${AB_CD}_rtl -!define MUI_HEADERIMAGE_BITMAP_RTL wizHeaderRTL.bmp -!else -!define MUI_HEADERIMAGE_BITMAP wizHeader.bmp -!endif - -/** - * Installation Pages - */ -; Welcome Page -!define MUI_PAGE_CUSTOMFUNCTION_PRE preWelcome -!insertmacro MUI_PAGE_WELCOME - -; Custom Options Page -Page custom preOptions leaveOptions - -; Select Install Directory Page -!define MUI_PAGE_CUSTOMFUNCTION_PRE preDirectory -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leaveDirectory -!define MUI_DIRECTORYPAGE_VERIFYONLEAVE -!insertmacro MUI_PAGE_DIRECTORY - -; Custom Shortcuts Page -Page custom preShortcuts leaveShortcuts - -; Custom Summary Page -Page custom preSummary leaveSummary - -; Install Files Page -!insertmacro MUI_PAGE_INSTFILES - -; Finish Page -!define MUI_FINISHPAGE_TITLE_3LINES -!define MUI_FINISHPAGE_RUN -!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApp -!define MUI_FINISHPAGE_RUN_TEXT $(LAUNCH_TEXT) -!define MUI_PAGE_CUSTOMFUNCTION_PRE preFinish -!insertmacro MUI_PAGE_FINISH - -; Use the default dialog for IDD_VERIFY for a simple Banner -ChangeUI IDD_VERIFY "${NSISDIR}\Contrib\UIs\default.exe" - -################################################################################ -# Install Sections - -; Cleanup operations to perform at the start of the installation. -Section "-InstallStartCleanup" - SetDetailsPrint both - DetailPrint $(STATUS_CLEANUP) - SetDetailsPrint none - - SetOutPath "$INSTDIR" - ${StartInstallLog} "${BrandFullName}" "${AB_CD}" "${AppVersion}" "${GREVersion}" - - StrCpy $R9 "true" - StrCpy $PreventRebootRequired "false" - ${GetParameters} $R8 - ${GetOptions} "$R8" "/INI=" $R7 - ${Unless} ${Errors} - ; The configuration file must also exist - ${If} ${FileExists} "$R7" - ReadINIStr $R9 $R7 "Install" "RemoveDistributionDir" - ReadINIStr $R8 $R7 "Install" "PreventRebootRequired" - ${If} $R8 == "true" - StrCpy $PreventRebootRequired "true" - ${EndIf} - ${EndIf} - ${EndUnless} - - ; Remove directories and files we always control before parsing the uninstall - ; log so empty directories can be removed. - ${If} ${FileExists} "$INSTDIR\updates" - RmDir /r "$INSTDIR\updates" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\updated" - RmDir /r "$INSTDIR\updated" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\defaults\shortcuts" - RmDir /r "$INSTDIR\defaults\shortcuts" - ${EndIf} - ; Only remove the distribution directory if it exists and if the installer - ; isn't launched with an ini file that has RemoveDistributionDir=false in the - ; install section. - ${If} ${FileExists} "$INSTDIR\distribution" - ${AndIf} $R9 != "false" - RmDir /r "$INSTDIR\distribution" - ${EndIf} - - ; Delete the app exe if present to prevent launching the app while we are - ; installing. - ClearErrors - ${DeleteFile} "$INSTDIR\${FileMainEXE}" - ${If} ${Errors} - ; If the user closed the application it can take several seconds for it to - ; shut down completely. If the application is being used by another user we - ; can rename the file and then delete is when the system is restarted. - Sleep 5000 - ${DeleteFile} "$INSTDIR\${FileMainEXE}" - ClearErrors - ${EndIf} - - ; setup the application model id registration value - ${InitHashAppModelId} "$INSTDIR" "Software\${CompanyName}\${BrandShortName}\TaskBarIDs" - - ; Remove the updates directory for Vista and above - ${CleanUpdateDirectories} "${CompanyName}\${BrandShortName}" "${CompanyName}\updates" - - ${RemoveDeprecatedFiles} - ${RemovePrecompleteEntries} "false" - - ${If} ${FileExists} "$INSTDIR\defaults\pref\channel-prefs.js" - Delete "$INSTDIR\defaults\pref\channel-prefs.js" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\defaults\pref" - RmDir "$INSTDIR\defaults\pref" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\defaults" - RmDir "$INSTDIR\defaults" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\uninstall" - ; Remove the uninstall directory that we control - RmDir /r "$INSTDIR\uninstall" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\update-settings.ini" - Delete "$INSTDIR\update-settings.ini" - ${EndIf} - - ; Explictly remove empty webapprt dir in case it exists (bug 757978). - RmDir "$INSTDIR\webapprt\components" - RmDir "$INSTDIR\webapprt" - - ${InstallStartCleanupCommon} -SectionEnd - -Section "-Application" APP_IDX - ${StartUninstallLog} - - SetDetailsPrint both - DetailPrint $(STATUS_INSTALL_APP) - SetDetailsPrint none - - ${LogHeader} "Installing Main Files" - ${CopyFilesFromDir} "$EXEDIR\core" "$INSTDIR" \ - "$(ERROR_CREATE_DIRECTORY_PREFIX)" \ - "$(ERROR_CREATE_DIRECTORY_SUFFIX)" - - ${If} $InstallType == ${INSTALLTYPE_PORTABLE} - ${If} $PrtChkb == 1 - FileOpen $0 "$INSTDIR\browser\pmprt.mod" w - FileClose $0 - ${Else} - FileOpen $0 "$INSTDIR\browser\pmundprt.mod" w - FileClose $0 - ${EndIf} - ${Else} - ; Register DLLs - ; XXXrstrong - AccessibleMarshal.dll can be used by multiple applications but - ; is only registered for the last application installed. When the last - ; application installed is uninstalled AccessibleMarshal.dll will no longer be - ; registered. bug 338878 - ${LogHeader} "DLL Registration" - ClearErrors - ${RegisterDLL} "$INSTDIR\AccessibleMarshal.dll" - ${If} ${Errors} - ${LogMsg} "** ERROR Registering: $INSTDIR\AccessibleMarshal.dll **" - ${Else} - ${LogUninstall} "DLLReg: \AccessibleMarshal.dll" - ${LogMsg} "Registered: $INSTDIR\AccessibleMarshal.dll" - ${EndIf} - - ClearErrors - - ; Default for creating Start Menu shortcut - ; (1 = create, 0 = don't create) - ${If} $AddStartMenuSC == "" - StrCpy $AddStartMenuSC "1" - ${EndIf} - - ; Default for creating Quick Launch shortcut (1 = create, 0 = don't create) - ${If} $AddQuickLaunchSC == "" - ; Don't install the quick launch shortcut on Windows 7 - ${If} ${AtLeastWin7} - StrCpy $AddQuickLaunchSC "0" - ${Else} - StrCpy $AddQuickLaunchSC "1" - ${EndIf} - ${EndIf} - - ; Default for creating Desktop shortcut (1 = create, 0 = don't create) - ${If} $AddDesktopSC == "" - StrCpy $AddDesktopSC "1" - ${EndIf} - - ${LogHeader} "Adding Registry Entries" - SetShellVarContext current ; Set SHCTX to HKCU - ${RegCleanMain} "Software\${CompanyName}" - ${RegCleanUninstall} - ${UpdateProtocolHandlers} - - ClearErrors - WriteRegStr HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest" "Write Test" - ${If} ${Errors} - StrCpy $TmpVal "HKCU" ; used primarily for logging - ${Else} - SetShellVarContext all ; Set SHCTX to HKLM - DeleteRegValue HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest" - StrCpy $TmpVal "HKLM" ; used primarily for logging - ${RegCleanMain} "Software\${CompanyName}" - ${RegCleanUninstall} - ${UpdateProtocolHandlers} - - ReadRegStr $0 HKLM "Software\${CompanyName}" "CurrentVersion" - ${If} "$0" != "${GREVersion}" - WriteRegStr HKLM "Software\${CompanyName}" "CurrentVersion" "${GREVersion}" - ${EndIf} - ${EndIf} - - ${RemoveDeprecatedKeys} - - ; The previous installer adds several regsitry values to both HKLM and HKCU. - ; We now try to add to HKLM and if that fails to HKCU - - ; The order that reg keys and values are added is important if you use the - ; uninstall log to remove them on uninstall. When using the uninstall log you - ; MUST add children first so they will be removed first on uninstall so they - ; will be empty when the key is deleted. This allows the uninstaller to - ; specify that only empty keys will be deleted. - ${SetAppKeys} - - ${FixClassKeys} - - ; Uninstall keys can only exist under HKLM on some versions of windows. Since - ; it doesn't cause problems always add them. - ${SetUninstallKeys} - - ; On install always add the Lun3rHTML and Lun3rURL keys. - ; An empty string is used for the 5th param because Lun3rHTML is not a - ; protocol handler. - ${GetLongPath} "$INSTDIR\${FileMainEXE}" $8 - StrCpy $2 "$\"$8$\" -osint -url $\"%1$\"" - - ; In Win8, the delegate execute handler picks up the value in Lun3rURL and - ; Lun3rHTML to launch the desktop browser when it needs to. - ${AddDisabledDDEHandlerValues} "Lun3rHTML" "$2" "$8,1" \ - "${AppRegName} Document" "" - ${AddDisabledDDEHandlerValues} "Lun3rURL" "$2" "$8,1" "${AppRegName} URL" \ - "true" - - ; For pre win8, the following keys should only be set if we can write to HKLM. - ; For post win8, the keys below get set in both HKLM and HKCU. - ${If} $TmpVal == "HKLM" - ; Set the Start Menu Internet and Vista Registered App HKLM registry keys. - ${SetStartMenuInternet} "HKLM" - ${FixShellIconHandler} "HKLM" - - ; If we are writing to HKLM and create either the desktop or start menu - ; shortcuts set IconsVisible to 1 otherwise to 0. - ; Taskbar shortcuts imply having a start menu shortcut. - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo" - ${If} $AddDesktopSC == 1 - ${OrIf} $AddStartMenuSC == 1 - ${OrIf} $AddTaskbarSC == 1 - WriteRegDWORD HKLM "$0" "IconsVisible" 1 - ${Else} - WriteRegDWORD HKLM "$0" "IconsVisible" 0 - ${EndIf} - ${EndIf} - - ${If} ${AtLeastWin8} - ; Set the Start Menu Internet and Vista Registered App HKCU registry keys. - ${SetStartMenuInternet} "HKCU" - ${FixShellIconHandler} "HKCU" - - ; If we create either the desktop or start menu shortcuts, then - ; set IconsVisible to 1 otherwise to 0. - ; Taskbar shortcuts imply having a start menu shortcut. - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo" - ${If} $AddDesktopSC == 1 - ${OrIf} $AddStartMenuSC == 1 - ${OrIf} $AddTaskbarSC == 1 - WriteRegDWORD HKCU "$0" "IconsVisible" 1 - ${Else} - WriteRegDWORD HKCU "$0" "IconsVisible" 0 - ${EndIf} - ${EndIf} - - ; These need special handling on uninstall since they may be overwritten by - ; an install into a different location. - StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}" - ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0 - ${WriteRegStr2} $TmpVal "$0" "Path" "$INSTDIR" 0 - - StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\$R9" - ${CreateRegKey} "$TmpVal" "$0" 0 - StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\plugin-container.exe" - ${CreateRegKey} "$TmpVal" "$0" 0 - - ${If} $TmpVal == "HKLM" - ; Set the permitted LSP Categories for WinVista and above - ${SetAppLSPCategories} ${LSP_CATEGORIES} - ${EndIf} - - ; Create shortcuts - ${LogHeader} "Adding Shortcuts" - - ; Remove the start menu shortcuts and directory if the SMPROGRAMS section - ; exists in the shortcuts_log.ini and the SMPROGRAMS. The installer's shortcut - ; creation code will create the shortcut in the root of the Start Menu - ; Programs directory. - ${RemoveStartMenuDir} - - ; Always add the application's shortcuts to the shortcuts log ini file. The - ; DeleteShortcuts macro will do the right thing on uninstall if the - ; shortcuts don't exist. - ${LogStartMenuShortcut} "${BrandFullName}.lnk" - ${LogQuickLaunchShortcut} "${BrandFullName}.lnk" - ${LogDesktopShortcut} "${BrandFullName}.lnk" - - ; Best effort to update the Win7 taskbar and start menu shortcut app model - ; id's. The possible contexts are current user / system and the user that - ; elevated the installer. - Call FixShortcutAppModelIDs - ; If the current context is all also perform Win7 taskbar and start menu link - ; maintenance for the current user context. - ${If} $TmpVal == "HKLM" - SetShellVarContext current ; Set SHCTX to HKCU - Call FixShortcutAppModelIDs - SetShellVarContext all ; Set SHCTX to HKLM - ${EndIf} - - ; If running elevated also perform Win7 taskbar and start menu link - ; maintenance for the unelevated user context in case that is different than - ; the current user. - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $0 - ${Unless} ${Errors} - GetFunctionAddress $0 FixShortcutAppModelIDs - UAC::ExecCodeSegment $0 - ${EndUnless} - - ; UAC only allows elevating to an Admin account so there is no need to add - ; the Start Menu or Desktop shortcuts from the original unelevated process - ; since this will either add it for the user if unelevated or All Users if - ; elevated. - ${If} $AddStartMenuSC == 1 - CreateShortCut "$SMPROGRAMS\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ - "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true" - ${EndIf} - ${LogMsg} "Added Shortcut: $SMPROGRAMS\${BrandFullName}.lnk" - ${Else} - ${LogMsg} "** ERROR Adding Shortcut: $SMPROGRAMS\${BrandFullName}.lnk" - ${EndIf} - ${EndIf} - - ; Update lastwritetime of the Start Menu shortcut to clear the tile cache. - ${If} ${AtLeastWin8} - ${AndIf} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - FileOpen $0 "$SMPROGRAMS\${BrandFullName}.lnk" a - FileClose $0 - ${EndIf} - - ${If} $AddDesktopSC == 1 - CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" \ - "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID" "true" - ${EndIf} - ${LogMsg} "Added Shortcut: $DESKTOP\${BrandFullName}.lnk" - ${Else} - ${LogMsg} "** ERROR Adding Shortcut: $DESKTOP\${BrandFullName}.lnk" - ${EndIf} - ${EndIf} - - ; If elevated the Quick Launch shortcut must be added from the unelevated - ; original process. - ${If} $AddQuickLaunchSC == 1 - ${Unless} ${AtLeastWin7} - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $0 - ${If} ${Errors} - Call AddQuickLaunchShortcut - ${LogMsg} "Added Shortcut: $QUICKLAUNCH\${BrandFullName}.lnk" - ${Else} - ; It is not possible to add a log entry from the unelevated process so - ; add the log entry without the path since there is no simple way to - ; know the correct full path. - ${LogMsg} "Added Quick Launch Shortcut: ${BrandFullName}.lnk" - GetFunctionAddress $0 AddQuickLaunchShortcut - UAC::ExecCodeSegment $0 - ${EndIf} - ${EndUnless} - ${EndIf} - ${EndIf} -SectionEnd - -; Cleanup operations to perform at the end of the installation. -Section "-InstallEndCleanup" - SetDetailsPrint both - DetailPrint "$(STATUS_CLEANUP)" - SetDetailsPrint none - - ${Unless} ${Silent} - ClearErrors - ${MUI_INSTALLOPTIONS_READ} $0 "summary.ini" "Field 4" "State" - ${If} "$0" == "1" - ; NB: this code is duplicated in stub.nsi. Please keep in sync. - ; For data migration in the app, we want to know what the default browser - ; value was before we changed it. To do so, we read it here and store it - ; in our own registry key. - StrCpy $0 "" - ${If} ${AtLeastWinVista} - AppAssocReg::QueryCurrentDefault "http" "protocol" "effective" - Pop $1 - ; If the method hasn't failed, $1 will contain the progid. Check: - ${If} "$1" != "method failed" - ${AndIf} "$1" != "method not available" - ; Read the actual command from the progid - ReadRegStr $0 HKCR "$1\shell\open\command" "" - ${EndIf} - ${EndIf} - ; If using the App Association Registry didn't happen or failed, fall back - ; to the effective http default: - ${If} "$0" == "" - ReadRegStr $0 HKCR "http\shell\open\command" "" - ${EndIf} - ; If we have something other than empty string now, write the value. - ${If} "$0" != "" - ClearErrors - WriteRegStr HKCU "Software\${CompanyName}\${BrandShortName}" "OldDefaultBrowserCommand" "$0" - ${EndIf} - - ${LogHeader} "Setting as the default browser" - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $0 - ${If} ${Errors} - Call SetAsDefaultAppUserHKCU - ${Else} - GetFunctionAddress $0 SetAsDefaultAppUserHKCU - UAC::ExecCodeSegment $0 - ${EndIf} - ${ElseIfNot} ${Errors} - ${LogHeader} "Writing default-browser opt-out" - ClearErrors - WriteRegStr HKCU "Software\${CompanyName}\${BrandShortName}" "DefaultBrowserOptOut" "True" - ${If} ${Errors} - ${LogMsg} "Error writing default-browser opt-out" - ${EndIf} - ${EndIf} - ${EndUnless} - - ; Adds a pinned Task Bar shortcut (see MigrateTaskBarShortcut for details). - ${MigrateTaskBarShortcut} - - ; Add the Firewall entries during install - Call AddFirewallEntries - - ; Refresh desktop icons - System::Call "shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_DWORDFLUSH}, i 0, i 0)" - - ${InstallEndCleanupCommon} - - ${If} $PreventRebootRequired == "true" - SetRebootFlag false - ${EndIf} - - ${If} ${RebootFlag} - ; Admin is required to delete files on reboot so only add the moz-delete if - ; the user is an admin. After calling UAC::IsAdmin $0 will equal 1 if the - ; user is an admin. - UAC::IsAdmin - ${If} "$0" == "1" - ; When a reboot is required give SHChangeNotify time to finish the - ; refreshing the icons so the OS doesn't display the icons from helper.exe - Sleep 10000 - ${LogHeader} "Reboot Required To Finish Installation" - ; ${FileMainEXE}.moz-upgrade should never exist but just in case... - ${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}.moz-upgrade" - Rename "$INSTDIR\${FileMainEXE}" "$INSTDIR\${FileMainEXE}.moz-upgrade" - ${EndUnless} - - ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" - ClearErrors - Rename "$INSTDIR\${FileMainEXE}" "$INSTDIR\${FileMainEXE}.moz-delete" - ${Unless} ${Errors} - Delete /REBOOTOK "$INSTDIR\${FileMainEXE}.moz-delete" - ${EndUnless} - ${EndIf} - - ${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}" - CopyFiles /SILENT "$INSTDIR\uninstall\helper.exe" "$INSTDIR" - FileOpen $0 "$INSTDIR\${FileMainEXE}" w - FileWrite $0 "Will be deleted on restart" - Rename /REBOOTOK "$INSTDIR\${FileMainEXE}.moz-upgrade" "$INSTDIR\${FileMainEXE}" - FileClose $0 - Delete "$INSTDIR\${FileMainEXE}" - Rename "$INSTDIR\helper.exe" "$INSTDIR\${FileMainEXE}" - ${EndUnless} - ${EndIf} - ${EndIf} -SectionEnd - -################################################################################ -# Install Abort Survey Functions - -Function CustomAbort - ${If} "${AB_CD}" == "en-US" - ${AndIf} "$PageName" != "" - ${AndIf} ${FileExists} "$EXEDIR\core\distribution\distribution.ini" - ReadINIStr $0 "$EXEDIR\core\distribution\distribution.ini" "Global" "about" - ClearErrors - ${WordFind} "$0" "Funnelcake" "E#" $1 - ${Unless} ${Errors} - ; Yes = fill out the survey and exit, No = don't fill out survey and exit, - ; Cancel = don't exit. - MessageBox MB_YESNO|MB_ICONEXCLAMATION \ - "Would you like to tell us why you are canceling this installation?" \ - IDYes +1 IDNO CustomAbort_finish - ${If} "$PageName" == "Welcome" - GetFunctionAddress $0 AbortSurveyWelcome - ${ElseIf} "$PageName" == "Options" - GetFunctionAddress $0 AbortSurveyOptions - ${ElseIf} "$PageName" == "Directory" - GetFunctionAddress $0 AbortSurveyDirectory - ${ElseIf} "$PageName" == "Shortcuts" - GetFunctionAddress $0 AbortSurveyShortcuts - ${ElseIf} "$PageName" == "Summary" - GetFunctionAddress $0 AbortSurveySummary - ${EndIf} - ClearErrors - ${GetParameters} $1 - ${GetOptions} "$1" "/UAC:" $2 - ${If} ${Errors} - Call $0 - ${Else} - UAC::ExecCodeSegment $0 - ${EndIf} - - CustomAbort_finish: - Return - ${EndUnless} - ${EndIf} - - MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(MOZ_MUI_TEXT_ABORTWARNING)" \ - IDYES +1 IDNO +2 - Return - Abort -FunctionEnd - -Function AbortSurveyWelcome - ExecShell "open" "${AbortSurveyURL}step1" -FunctionEnd - -Function AbortSurveyOptions - ExecShell "open" "${AbortSurveyURL}step2" -FunctionEnd - -Function AbortSurveyDirectory - ExecShell "open" "${AbortSurveyURL}step3" -FunctionEnd - -Function AbortSurveyShortcuts - ExecShell "open" "${AbortSurveyURL}step4" -FunctionEnd - -Function AbortSurveySummary - ExecShell "open" "${AbortSurveyURL}step5" -FunctionEnd - -################################################################################ -# Helper Functions - -Function AddQuickLaunchShortcut - CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" \ - "$INSTDIR" - ${EndIf} -FunctionEnd - -Function CheckExistingInstall - ; If there is a pending file copy from a previous upgrade don't allow - ; installing until after the system has rebooted. - IfFileExists "$INSTDIR\${FileMainEXE}.moz-upgrade" +1 +4 - MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(WARN_RESTART_REQUIRED_UPGRADE)" IDNO +2 - Reboot - Quit - - ; If there is a pending file deletion from a previous uninstall don't allow - ; installing until after the system has rebooted. - IfFileExists "$INSTDIR\${FileMainEXE}.moz-delete" +1 +4 - MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(WARN_RESTART_REQUIRED_UNINSTALL)" IDNO +2 - Reboot - Quit - - ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" - ; Disable the next, cancel, and back buttons - GetDlgItem $0 $HWNDPARENT 1 ; Next button - EnableWindow $0 0 - GetDlgItem $0 $HWNDPARENT 2 ; Cancel button - EnableWindow $0 0 - GetDlgItem $0 $HWNDPARENT 3 ; Back button - EnableWindow $0 0 - - Banner::show /NOUNLOAD "$(BANNER_CHECK_EXISTING)" - - ${If} "$TmpVal" == "FoundMessageWindow" - Sleep 5000 - ${EndIf} - - ${PushFilesToCheck} - - ; Store the return value in $TmpVal so it is less likely to be accidentally - ; overwritten elsewhere. - ${CheckForFilesInUse} $TmpVal - - Banner::destroy - - ; Enable the next, cancel, and back buttons - GetDlgItem $0 $HWNDPARENT 1 ; Next button - EnableWindow $0 1 - GetDlgItem $0 $HWNDPARENT 2 ; Cancel button - EnableWindow $0 1 - GetDlgItem $0 $HWNDPARENT 3 ; Back button - EnableWindow $0 1 - - ${If} "$TmpVal" == "true" - StrCpy $TmpVal "FoundMessageWindow" - ${ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_INSTALL)" - StrCpy $TmpVal "true" - ${EndIf} - ${EndIf} -FunctionEnd - -Function LaunchApp -!ifndef DEV_EDITION - ${ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_LAUNCH)" -!endif - - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $1 - ${If} ${Errors} - Exec "$\"$INSTDIR\${FileMainEXE}$\"" - ${Else} - GetFunctionAddress $0 LaunchAppFromElevatedProcess - UAC::ExecCodeSegment $0 - ${EndIf} -FunctionEnd - -Function LaunchAppFromElevatedProcess - ; Find the installation directory when launching using GetFunctionAddress - ; from an elevated installer since $INSTDIR will not be set in this installer - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - ReadRegStr $0 HKLM "Software\Clients\StartMenuInternet\$R9\DefaultIcon" "" - ${GetPathFromString} "$0" $0 - ${GetParent} "$0" $1 - ; Set our current working directory to the application's install directory - ; otherwise the 7-Zip temp directory will be in use and won't be deleted. - SetOutPath "$1" - Exec "$\"$0$\"" -FunctionEnd - -################################################################################ -# Language - -!insertmacro MOZ_MUI_LANGUAGE 'baseLocale' -!verbose push -!verbose 3 -!include "overrideLocale.nsh" -!include "customLocale.nsh" -!verbose pop - -; Set this after the locale files to override it if it is in the locale -; using " " for BrandingText will hide the "Nullsoft Install System..." branding -BrandingText " " - -################################################################################ -# Page pre, show, and leave functions - -Function preWelcome - StrCpy $PageName "Welcome" - ${If} ${FileExists} "$EXEDIR\core\distribution\modern-wizard.bmp" - Delete "$PLUGINSDIR\modern-wizard.bmp" - CopyFiles /SILENT "$EXEDIR\core\distribution\modern-wizard.bmp" "$PLUGINSDIR\modern-wizard.bmp" - ${EndIf} -FunctionEnd - -Function preOptions - StrCpy $PageName "Options" - ${If} ${FileExists} "$EXEDIR\core\distribution\modern-header.bmp" - ${AndIf} $hHeaderBitmap == "" - Delete "$PLUGINSDIR\modern-header.bmp" - CopyFiles /SILENT "$EXEDIR\core\distribution\modern-header.bmp" "$PLUGINSDIR\modern-header.bmp" - ${ChangeMUIHeaderImage} "$PLUGINSDIR\modern-header.bmp" - ${EndIf} - !insertmacro MUI_HEADER_TEXT "$(OPTIONS_PAGE_TITLE)" "$(OPTIONS_PAGE_SUBTITLE)" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "options.ini" -FunctionEnd - -Function leaveOptions - ${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Settings" "State" - ${If} $0 != 0 - Abort - ${EndIf} - ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 2" "State" - StrCmp $R0 "1" +1 +2 - StrCpy $InstallType ${INSTALLTYPE_BASIC} - ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 3" "State" - StrCmp $R0 "1" +1 +2 - StrCpy $InstallType ${INSTALLTYPE_CUSTOM} - ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 6" "State" - StrCmp $R0 "1" +1 +2 - StrCpy $InstallType ${INSTALLTYPE_PORTABLE} - ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 7" "State" - StrCmp $R0 "1" +1 +2 - StrCpy $PrtChkb 1 - - ${LeaveOptionsCommon} - - ${If} $InstallType == ${INSTALLTYPE_BASIC} - Call CheckExistingInstall - ${EndIf} -FunctionEnd - -Function preDirectory - StrCpy $PageName "Directory" - ${PreDirectoryCommon} -FunctionEnd - -Function leaveDirectory - ${If} $InstallType == ${INSTALLTYPE_BASIC} - Call CheckExistingInstall - ${EndIf} - ${LeaveDirectoryCommon} "$(WARN_DISK_SPACE)" "$(WARN_WRITE_ACCESS)" -FunctionEnd - -Function preShortcuts - StrCpy $PageName "Shortcuts" - ${CheckCustomCommon} - !insertmacro MUI_HEADER_TEXT "$(SHORTCUTS_PAGE_TITLE)" "$(SHORTCUTS_PAGE_SUBTITLE)" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "shortcuts.ini" -FunctionEnd - -Function leaveShortcuts - ${MUI_INSTALLOPTIONS_READ} $0 "shortcuts.ini" "Settings" "State" - ${If} $0 != 0 - Abort - ${EndIf} - ${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State" - ${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State" - - ; Don't install the quick launch shortcut on Windows 7 - ${Unless} ${AtLeastWin7} - ${MUI_INSTALLOPTIONS_READ} $AddQuickLaunchSC "shortcuts.ini" "Field 4" "State" - ${EndUnless} - - ${If} $InstallType == ${INSTALLTYPE_CUSTOM} - Call CheckExistingInstall - ${EndIf} -FunctionEnd - -Function preSummary - StrCpy $PageName "Summary" - ; Setup the summary.ini file for the Custom Summary Page - WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "3" - - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Type "label" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Text "$(SUMMARY_INSTALLED_TO)" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Left "0" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Right "-1" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Top "5" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Bottom "15" - - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 2" Type "text" - ; The contents of this control must be set as follows in the pre function - ; ${MUI_INSTALLOPTIONS_READ} $1 "summary.ini" "Field 2" "HWND" - ; SendMessage $1 ${WM_SETTEXT} 0 "STR:$INSTDIR" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 2" state "" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 2" Left "0" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 2" Right "-1" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 2" Top "17" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 2" Bottom "30" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 2" flags "READONLY" - - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Type "label" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Left "0" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Right "-1" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Top "130" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Bottom "150" - - ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Text "$(SUMMARY_UPGRADE_CLICK)" - WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NextButtonText "$(UPGRADE_BUTTON)" - ${Else} - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Text "$(SUMMARY_INSTALL_CLICK)" - DeleteINIStr "$PLUGINSDIR\summary.ini" "Settings" NextButtonText - ${EndIf} - - - ; Remove the "Field 4" ini section in case the user hits back and changes the - ; installation directory which could change whether the make default checkbox - ; should be displayed. - DeleteINISec "$PLUGINSDIR\summary.ini" "Field 4" - - ; Check if it is possible to write to HKLM - ${If} $InstallType != ${INSTALLTYPE_PORTABLE} - ClearErrors - WriteRegStr HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest" "Write Test" - ${Unless} ${Errors} - DeleteRegValue HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest" - ; Check if Pale Moon is the http handler for this user. - SetShellVarContext current ; Set SHCTX to the current user - ${IsHandlerForInstallDir} "http" $R9 - ${If} $TmpVal == "HKLM" - SetShellVarContext all ; Set SHCTX to all users - ${EndIf} - ; If Pale Moon isn't the http handler for this user show the option to set - ; Pale Moon as the default browser. - ${If} "$R9" != "true" - ${AndIf} ${AtMostWin2008R2} - WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "4" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Type "checkbox" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Text "$(SUMMARY_TAKE_DEFAULTS)" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Left "0" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Right "-1" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" State "1" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Top "32" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Bottom "53" - ${EndIf} - ${EndUnless} - - ${If} "$TmpVal" == "true" - ; If there is already a Type entry in the "Field 4" section with a value of - ; checkbox then the set as the default browser checkbox is displayed and - ; this text must be moved below it. - ReadINIStr $0 "$PLUGINSDIR\summary.ini" "Field 4" "Type" - ${If} "$0" == "checkbox" - StrCpy $0 "5" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Top "53" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Bottom "68" - ${Else} - StrCpy $0 "4" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Top "35" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Bottom "50" - ${EndIf} - WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "$0" - - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Type "label" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Text "$(SUMMARY_REBOOT_REQUIRED_INSTALL)" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Left "0" - WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Right "-1" - ${EndIf} - ${EndIf} - - !insertmacro MUI_HEADER_TEXT "$(SUMMARY_PAGE_TITLE)" "$(SUMMARY_PAGE_SUBTITLE)" - - ; The Summary custom page has a textbox that will automatically receive - ; focus. This sets the focus to the Install button instead. - !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "summary.ini" - GetDlgItem $0 $HWNDPARENT 1 - System::Call "user32::SetFocus(i r0, i 0x0007, i,i)i" - ${MUI_INSTALLOPTIONS_READ} $1 "summary.ini" "Field 2" "HWND" - SendMessage $1 ${WM_SETTEXT} 0 "STR:$INSTDIR" - !insertmacro MUI_INSTALLOPTIONS_SHOW -FunctionEnd - -Function leaveSummary - ; Try to delete the app executable and if we can't delete it try to find the - ; app's message window and prompt the user to close the app. This allows - ; running an instance that is located in another directory. If for whatever - ; reason there is no message window we will just rename the app's files and - ; then remove them on restart. - ClearErrors - ${DeleteFile} "$INSTDIR\${FileMainEXE}" - ${If} ${Errors} - ${ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_INSTALL)" - ${EndIf} -FunctionEnd - -; When we add an optional action to the finish page the cancel button is -; enabled. This disables it and leaves the finish button as the only choice. -Function preFinish - StrCpy $PageName "" - ${EndInstallLog} "${BrandFullName}" - !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0" -FunctionEnd - -################################################################################ -# Initialization Functions - -Function .onInit - ; Remove the current exe directory from the search order. - ; This only effects LoadLibrary calls and not implicitly loaded DLLs. - System::Call 'kernel32::SetDllDirectoryW(w "")' - - StrCpy $PageName "" - StrCpy $LANGUAGE 0 - ${SetBrandNameVars} "$EXEDIR\core\distribution\setup.ini" - - ; Windows NT 5.0 and lower are not supported on any architecture. - ${Unless} ${AtLeastWinXP} - ${If} "$R7" == "0" - strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)" - ${Else} - strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)" - ${EndIf} - MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2 - ExecShell "open" "${URLSystemRequirements}" - Quit - ${EndUnless} - -!ifdef HAVE_64BIT_BUILD - ${Unless} ${RunningX64} - MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_OSVER_MSG)" IDCANCEL +2 - ExecShell "open" "${URLSystemRequirements}" - Quit - ${EndUnless} - SetRegView 64 -!endif - -; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be -; removed after we require NSIS 3.0a2 or greater. -!ifndef NSIS_PACKEDVERSION - ${If} ${AtLeastWinVista} - System::Call 'user32::SetProcessDPIAware()' - ${EndIf} -!endif - - !insertmacro InitInstallOptionsFile "options.ini" - !insertmacro InitInstallOptionsFile "shortcuts.ini" - !insertmacro InitInstallOptionsFile "summary.ini" - - WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "7" - - WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Type "label" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Text "$(OPTIONS_SUMMARY)" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Left "0" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Right "-1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Top "0" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Bottom "10" - - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" Type "RadioButton" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" Text "$(OPTION_STANDARD_RADIO)" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" Left "0" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" Right "-1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" Top "25" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" Bottom "35" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" State "1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 2" Flags "GROUP" - - WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" Type "RadioButton" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" Text "$(OPTION_CUSTOM_RADIO)" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" Left "0" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" Right "-1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" Top "55" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" Bottom "65" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" State "0" - - WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Type "RadioButton" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Text "$(OPTION_PORTABLE_RADIO)" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Left "0" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Right "-1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Top "85" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Bottom "95" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" State "0" - - WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Type "label" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Text "$(OPTION_STANDARD_DESC)" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Left "15" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Right "-1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Top "37" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Bottom "57" - - WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Type "label" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Text "$(OPTION_CUSTOM_DESC)" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Left "15" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Right "-1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Top "67" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Bottom "87" - - WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Type "checkbox" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Text "$(OPTION_PORTABLE_DESC)" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Left "15" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Right "-1" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Top "97" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Bottom "117" - WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" State "0" - - ; Setup the shortcuts.ini file for the Custom Shortcuts Page - ; Don't offer to install the quick launch shortcut on Windows 7 - ${If} ${AtLeastWin7} - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Settings" NumFields "3" - ${Else} - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Settings" NumFields "4" - ${EndIf} - - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Type "label" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Text "$(CREATE_ICONS_DESC)" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Left "0" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Right "-1" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Top "5" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Bottom "15" - - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Type "checkbox" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Text "$(ICONS_DESKTOP)" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Left "0" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Right "-1" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Top "20" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Bottom "30" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" State "1" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Flags "GROUP" - - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Type "checkbox" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Text "$(ICONS_STARTMENU)" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Left "0" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Right "-1" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Top "40" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Bottom "50" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" State "1" - - ; There must always be a core directory. - ${GetSize} "$EXEDIR\core\" "/S=0K" $R5 $R7 $R8 - SectionSetSize ${APP_IDX} $R5 - - ; Initialize $hHeaderBitmap to prevent redundant changing of the bitmap if - ; the user clicks the back button - StrCpy $hHeaderBitmap "" -FunctionEnd - -Function .onGUIEnd - ${OnEndCommon} -FunctionEnd diff --git a/application/palemoon/installer/windows/nsis/shared.nsh b/application/palemoon/installer/windows/nsis/shared.nsh deleted file mode 100644 index a85afb4916..0000000000 --- a/application/palemoon/installer/windows/nsis/shared.nsh +++ /dev/null @@ -1,1317 +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/. - -!macro PostUpdate - ; PostUpdate is called from both session 0 and from the user session - ; for service updates, make sure that we only register with the user session - ; Otherwise ApplicationID::Set can fail intermittently with a file in use error. - System::Call "kernel32::GetCurrentProcessId() i.r0" - System::Call "kernel32::ProcessIdToSessionId(i $0, *i ${NSIS_MAX_STRLEN} r9)" - - ; Determine if we're the protected UserChoice default or not. If so fix the - ; start menu tile. In case there are 2 PaleMoon installations, we only do - ; this if the application being updated is the default. - ReadRegStr $0 HKCU "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice" "ProgId" - ${If} $0 == "Lun3rURL" - ${AndIf} $9 != 0 ; We're not running in session 0 - ReadRegStr $0 HKCU "Software\Classes\Lun3rURL\shell\open\command" "" - ${GetPathFromString} "$0" $0 - ${GetParent} "$0" $0 - ${If} ${FileExists} "$0" - ${GetLongPath} "$0" $0 - ${EndIf} - ${EndIf} - - ${CreateShortcutsLog} - - ; Remove registry entries for non-existent apps and for apps that point to our - ; install location in the Software\Mozilla key and uninstall registry entries - ; that point to our install location for both HKCU and HKLM. - SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU) - ${RegCleanMain} "Software\Mozilla" - ${RegCleanUninstall} - ${UpdateProtocolHandlers} - - ; setup the application model id registration value - ${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs" - - ; Win7 taskbar and start menu link maintenance - Call FixShortcutAppModelIDs - - ClearErrors - WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test" - ${If} ${Errors} - StrCpy $TmpVal "HKCU" ; used primarily for logging - ${Else} - SetShellVarContext all ; Set SHCTX to all users (e.g. HKLM) - DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" - StrCpy $TmpVal "HKLM" ; used primarily for logging - ${RegCleanMain} "Software\Mozilla" - ${RegCleanUninstall} - ${UpdateProtocolHandlers} - ${FixShellIconHandler} "HKLM" - ${SetAppLSPCategories} ${LSP_CATEGORIES} - - ; Win7 taskbar and start menu link maintenance - Call FixShortcutAppModelIDs - - ; Add the Firewall entries after an update - Call AddFirewallEntries - - ; Only update the Clients\StartMenuInternet registry key values in HKLM if - ; they don't exist or this installation is the same as the one set in those - ; keys. - ${StrFilter} "${FileMainEXE}" "+" "" "" $1 - ReadRegStr $0 HKLM "Software\Clients\StartMenuInternet\$1\DefaultIcon" "" - ${GetPathFromString} "$0" $0 - ${GetParent} "$0" $0 - ${If} ${FileExists} "$0" - ${GetLongPath} "$0" $0 - ${EndIf} - ${If} "$0" == "$INSTDIR" - ${SetStartMenuInternet} "HKLM" - ${EndIf} - - ; Only update the Clients\StartMenuInternet registry key values in HKCU if - ; they don't exist or this installation is the same as the one set in those - ; keys. This is only done in Windows 8 to avoid a UAC prompt. - ${If} ${AtLeastWin8} - ReadRegStr $0 HKCU "Software\Clients\StartMenuInternet\$1\DefaultIcon" "" - ${GetPathFromString} "$0" $0 - ${GetParent} "$0" $0 - ${If} ${FileExists} "$0" - ${GetLongPath} "$0" $0 - ${EndIf} - ${If} "$0" == "$INSTDIR" - ${SetStartMenuInternet} "HKCU" - ${EndIf} - ${EndIf} - - ReadRegStr $0 HKLM "Software\mozilla.org\Mozilla" "CurrentVersion" - ${If} "$0" != "${GREVersion}" - WriteRegStr HKLM "Software\mozilla.org\Mozilla" "CurrentVersion" "${GREVersion}" - ${EndIf} - ${EndIf} - - ; Migrate the application's Start Menu directory to a single shortcut in the - ; root of the Start Menu Programs directory. - ${MigrateStartMenuShortcut} - - ; Update lastwritetime of the Start Menu shortcut to clear the tile cache. - ${If} ${AtLeastWin8} - ${AndIf} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - FileOpen $0 "$SMPROGRAMS\${BrandFullName}.lnk" a - FileClose $0 - ${EndIf} - - ; Adds a pinned Task Bar shortcut (see MigrateTaskBarShortcut for details). - ${MigrateTaskBarShortcut} - - ${RemoveDeprecatedKeys} - - ${SetAppKeys} - ${FixClassKeys} - ${SetUninstallKeys} - - ; Remove files that may be left behind by the application in the - ; VirtualStore directory. - ${CleanVirtualStore} - - ${RemoveDeprecatedFiles} - - ; Fix the distribution.ini file if applicable - ${FixDistributionsINI} - - RmDir /r /REBOOTOK "$INSTDIR\${TO_BE_DELETED}" -!macroend -!define PostUpdate "!insertmacro PostUpdate" - -!macro SetAsDefaultAppGlobal - ${RemoveDeprecatedKeys} ; Does not use SHCTX - - SetShellVarContext all ; Set SHCTX to all users (e.g. HKLM) - ${SetHandlers} ; Uses SHCTX - ${SetStartMenuInternet} "HKLM" - ${FixShellIconHandler} "HKLM" - ${ShowShortcuts} - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - WriteRegStr HKLM "Software\Clients\StartMenuInternet" "" "$R9" -!macroend -!define SetAsDefaultAppGlobal "!insertmacro SetAsDefaultAppGlobal" - -; Removes shortcuts for this installation. This should also remove the -; application from Open With for the file types the application handles -; (bug 370480). -!macro HideShortcuts - ${StrFilter} "${FileMainEXE}" "+" "" "" $0 - StrCpy $R1 "Software\Clients\StartMenuInternet\$0\InstallInfo" - WriteRegDWORD HKLM "$R1" "IconsVisible" 0 - ${If} ${AtLeastWin8} - WriteRegDWORD HKCU "$R1" "IconsVisible" 0 - ${EndIf} - - SetShellVarContext all ; Set $DESKTOP to All Users - ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - SetShellVarContext current ; Set $DESKTOP to the current user's desktop - ${EndUnless} - - ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk" - Pop $0 - ${If} "$0" == "" - ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk" - Pop $0 - ${GetLongPath} "$0" $0 - ${If} "$0" == "$INSTDIR\${FileMainEXE}" - Delete "$DESKTOP\${BrandFullName}.lnk" - ${EndIf} - ${EndIf} - ${EndIf} - - SetShellVarContext all ; Set $SMPROGRAMS to All Users - ${Unless} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - SetShellVarContext current ; Set $SMPROGRAMS to the current user's Start - ; Menu Programs directory - ${EndUnless} - - ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - ShellLink::GetShortCutArgs "$SMPROGRAMS\${BrandFullName}.lnk" - Pop $0 - ${If} "$0" == "" - ShellLink::GetShortCutTarget "$SMPROGRAMS\${BrandFullName}.lnk" - Pop $0 - ${GetLongPath} "$0" $0 - ${If} "$0" == "$INSTDIR\${FileMainEXE}" - Delete "$SMPROGRAMS\${BrandFullName}.lnk" - ${EndIf} - ${EndIf} - ${EndIf} - - ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk" - Pop $0 - ${If} "$0" == "" - ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk" - Pop $0 - ${GetLongPath} "$0" $0 - ${If} "$0" == "$INSTDIR\${FileMainEXE}" - Delete "$QUICKLAUNCH\${BrandFullName}.lnk" - ${EndIf} - ${EndIf} - ${EndIf} -!macroend -!define HideShortcuts "!insertmacro HideShortcuts" - -; Adds shortcuts for this installation. This should also add the application -; to Open With for the file types the application handles (bug 370480). -!macro ShowShortcuts - ${StrFilter} "${FileMainEXE}" "+" "" "" $0 - StrCpy $R1 "Software\Clients\StartMenuInternet\$0\InstallInfo" - WriteRegDWORD HKLM "$R1" "IconsVisible" 1 - ${If} ${AtLeastWin8} - WriteRegDWORD HKCU "$R1" "IconsVisible" 1 - ${EndIf} - - SetShellVarContext all ; Set $DESKTOP to All Users - ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID" "true" - ${EndIf} - ${Else} - SetShellVarContext current ; Set $DESKTOP to the current user's desktop - ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" \ - "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID" "true" - ${EndIf} - ${EndIf} - ${EndUnless} - ${EndIf} - ${EndUnless} - - SetShellVarContext all ; Set $SMPROGRAMS to All Users - ${Unless} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - CreateShortCut "$SMPROGRAMS\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ - "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true" - ${EndIf} - ${Else} - SetShellVarContext current ; Set $SMPROGRAMS to the current user's Start - ; Menu Programs directory - ${Unless} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - CreateShortCut "$SMPROGRAMS\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ - "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true" - ${EndIf} - ${EndIf} - ${EndUnless} - ${EndIf} - ${EndUnless} - - ; Windows 7 doesn't use the QuickLaunch directory - ${Unless} ${AtLeastWin7} - ${AndUnless} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" \ - "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" \ - "$INSTDIR" - ${EndIf} - ${EndUnless} -!macroend -!define ShowShortcuts "!insertmacro ShowShortcuts" - -!macro AddAssociationIfNoneExist FILE_TYPE - ClearErrors - EnumRegKey $7 HKCR "${FILE_TYPE}" 0 - ${If} ${Errors} - WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}" "" "Lun3rHTML" - ${EndIf} - WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}\OpenWithProgids" "Lun3rHTML" "" -!macroend -!define AddAssociationIfNoneExist "!insertmacro AddAssociationIfNoneExist" - -; Adds the protocol and file handler registry entries for making PaleMoon the -; default handler (uses SHCTX). -!macro SetHandlers - ${GetLongPath} "$INSTDIR\${FileMainEXE}" $8 - - StrCpy $0 "SOFTWARE\Classes" - StrCpy $2 "$\"$8$\" -osint -url $\"%1$\"" - - ; Associate the file handlers with Lun3rHTML - ReadRegStr $6 SHCTX "$0\.htm" "" - ${If} "$6" != "Lun3rHTML" - WriteRegStr SHCTX "$0\.htm" "" "Lun3rHTML" - ${EndIf} - - ReadRegStr $6 SHCTX "$0\.html" "" - ${If} "$6" != "Lun3rHTML" - WriteRegStr SHCTX "$0\.html" "" "Lun3rHTML" - ${EndIf} - - ReadRegStr $6 SHCTX "$0\.shtml" "" - ${If} "$6" != "Lun3rHTML" - WriteRegStr SHCTX "$0\.shtml" "" "Lun3rHTML" - ${EndIf} - - ReadRegStr $6 SHCTX "$0\.xht" "" - ${If} "$6" != "Lun3rHTML" - WriteRegStr SHCTX "$0\.xht" "" "Lun3rHTML" - ${EndIf} - - ReadRegStr $6 SHCTX "$0\.xhtml" "" - ${If} "$6" != "Lun3rHTML" - WriteRegStr SHCTX "$0\.xhtml" "" "Lun3rHTML" - ${EndIf} - - ${AddAssociationIfNoneExist} ".pdf" - ${AddAssociationIfNoneExist} ".oga" - ${AddAssociationIfNoneExist} ".ogg" - ${AddAssociationIfNoneExist} ".ogv" - ${AddAssociationIfNoneExist} ".pdf" - ${AddAssociationIfNoneExist} ".webm" - - ; An empty string is used for the 5th param because Lun3rHTML is not a - ; protocol handler - ${AddDisabledDDEHandlerValues} "Lun3rHTML" "$2" "$8,1" \ - "${AppRegName} HTML Document" "" - - ${AddDisabledDDEHandlerValues} "Lun3rURL" "$2" "$8,1" "${AppRegName} URL" \ - "true" - ; An empty string is used for the 4th & 5th params because the following - ; protocol handlers already have a display name and the additional keys - ; required for a protocol handler. - ${AddDisabledDDEHandlerValues} "ftp" "$2" "$8,1" "" "" - ${AddDisabledDDEHandlerValues} "http" "$2" "$8,1" "" "" - ${AddDisabledDDEHandlerValues} "https" "$2" "$8,1" "" "" -!macroend -!define SetHandlers "!insertmacro SetHandlers" - -; Adds the HKLM\Software\Clients\StartMenuInternet\PALEMOON.EXE registry -; entries (does not use SHCTX). -; -; The values for StartMenuInternet are only valid under HKLM and there can only -; be one installation registerred under StartMenuInternet per application since -; the key name is derived from the main application executable. -; http://support.microsoft.com/kb/297878 -; -; In Windows 8 this changes slightly, you can store StartMenuInternet entries in -; HKCU. The icon in start menu for StartMenuInternet is deprecated as of Win7, -; but the subkeys are what's important. Control panel default programs looks -; for them only in HKLM pre win8. -; -; Note: we might be able to get away with using the full path to the -; application executable for the key name in order to support multiple -; installations. -!macro SetStartMenuInternet RegKey - ${GetLongPath} "$INSTDIR\${FileMainEXE}" $8 - ${GetLongPath} "$INSTDIR\uninstall\helper.exe" $7 - - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - - StrCpy $0 "Software\Clients\StartMenuInternet\$R9" - - WriteRegStr ${RegKey} "$0" "" "${BrandFullName}" - - WriteRegStr ${RegKey} "$0\DefaultIcon" "" "$8,0" - - ; The Reinstall Command is defined at - ; http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/registeringapps.asp - WriteRegStr ${RegKey} "$0\InstallInfo" "HideIconsCommand" "$\"$7$\" /HideShortcuts" - WriteRegStr ${RegKey} "$0\InstallInfo" "ShowIconsCommand" "$\"$7$\" /ShowShortcuts" - WriteRegStr ${RegKey} "$0\InstallInfo" "ReinstallCommand" "$\"$7$\" /SetAsDefaultAppGlobal" - - ClearErrors - ReadRegDWORD $1 ${RegKey} "$0\InstallInfo" "IconsVisible" - ; If the IconsVisible name value pair doesn't exist add it otherwise the - ; application won't be displayed in Set Program Access and Defaults. - ${If} ${Errors} - ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - WriteRegDWORD ${RegKey} "$0\InstallInfo" "IconsVisible" 1 - ${Else} - WriteRegDWORD ${RegKey} "$0\InstallInfo" "IconsVisible" 0 - ${EndIf} - ${EndIf} - - WriteRegStr ${RegKey} "$0\shell\open\command" "" "$\"$8$\"" - - WriteRegStr ${RegKey} "$0\shell\properties" "" "$(CONTEXT_OPTIONS)" - WriteRegStr ${RegKey} "$0\shell\properties\command" "" "$\"$8$\" -preferences" - - WriteRegStr ${RegKey} "$0\shell\safemode" "" "$(CONTEXT_SAFE_MODE)" - WriteRegStr ${RegKey} "$0\shell\safemode\command" "" "$\"$8$\" -safe-mode" - - ; Vista Capabilities registry keys - WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationDescription" "$(REG_APP_DESC)" - WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationIcon" "$8,0" - WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationName" "${BrandShortName}" - - WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".htm" "Lun3rHTML" - WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".html" "Lun3rHTML" - WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".shtml" "Lun3rHTML" - WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xht" "Lun3rHTML" - WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xhtml" "Lun3rHTML" - - WriteRegStr ${RegKey} "$0\Capabilities\StartMenu" "StartMenuInternet" "$R9" - - WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "ftp" "Lun3rURL" - WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "http" "Lun3rURL" - WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "https" "Lun3rURL" - - ; Vista Registered Application - WriteRegStr ${RegKey} "Software\RegisteredApplications" "${AppRegName}" "$0\Capabilities" -!macroend -!define SetStartMenuInternet "!insertmacro SetStartMenuInternet" - -; The IconHandler reference for Lun3rHTML can end up in an inconsistent state -; due to changes not being detected by the IconHandler for side by side -; installs (see bug 268512). The symptoms can be either an incorrect icon or no -; icon being displayed for files associated with PaleMoon (does not use SHCTX). -!macro FixShellIconHandler RegKey - ClearErrors - ReadRegStr $1 ${RegKey} "Software\Classes\Lun3rHTML\ShellEx\IconHandler" "" - ${Unless} ${Errors} - ReadRegStr $1 ${RegKey} "Software\Classes\Lun3rHTML\DefaultIcon" "" - ${GetLongPath} "$INSTDIR\${FileMainEXE}" $2 - ${If} "$1" != "$2,1" - WriteRegStr ${RegKey} "Software\Classes\Lun3rHTML\DefaultIcon" "" "$2,1" - ${EndIf} - ${EndUnless} -!macroend -!define FixShellIconHandler "!insertmacro FixShellIconHandler" - -; Add Software\Mozilla\ registry entries (uses SHCTX). -!macro SetAppKeys - ; Check if this is an ESR release and if so add registry values so it is - ; possible to determine that this is an ESR install (bug 726781). - ClearErrors - ${WordFind} "${UpdateChannel}" "esr" "E#" $3 - ${If} ${Errors} - StrCpy $3 "" - ${Else} - StrCpy $3 " ESR" - ${EndIf} - - ${GetLongPath} "$INSTDIR" $8 - StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion}$3 (${ARCH} ${AB_CD})\Main" - ${WriteRegStr2} $TmpVal "$0" "Install Directory" "$8" 0 - ${WriteRegStr2} $TmpVal "$0" "PathToExe" "$8\${FileMainEXE}" 0 - - StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion}$3 (${ARCH} ${AB_CD})\Uninstall" - ${WriteRegStr2} $TmpVal "$0" "Description" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0 - - StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion}$3 (${ARCH} ${AB_CD})" - ${WriteRegStr2} $TmpVal "$0" "" "${AppVersion}$3 (${ARCH} ${AB_CD})" 0 - ${If} "$3" == "" - DeleteRegValue SHCTX "$0" "ESR" - ${Else} - ${WriteRegDWORD2} $TmpVal "$0" "ESR" 1 0 - ${EndIf} - - StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}$3\bin" - ${WriteRegStr2} $TmpVal "$0" "PathToExe" "$8\${FileMainEXE}" 0 - - StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}$3\extensions" - ${WriteRegStr2} $TmpVal "$0" "Components" "$8\components" 0 - ${WriteRegStr2} $TmpVal "$0" "Plugins" "$8\plugins" 0 - - StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}$3" - ${WriteRegStr2} $TmpVal "$0" "GeckoVer" "${GREVersion}" 0 - ${If} "$3" == "" - DeleteRegValue SHCTX "$0" "ESR" - ${Else} - ${WriteRegDWORD2} $TmpVal "$0" "ESR" 1 0 - ${EndIf} - - StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}$3" - ${WriteRegStr2} $TmpVal "$0" "" "${GREVersion}" 0 - ${WriteRegStr2} $TmpVal "$0" "CurrentVersion" "${AppVersion}$3 (${ARCH} ${AB_CD})" 0 -!macroend -!define SetAppKeys "!insertmacro SetAppKeys" - -; Add uninstall registry entries. This macro tests for write access to determine -; if the uninstall keys should be added to HKLM or HKCU. -!macro SetUninstallKeys - ; Check if this is an ESR release and if so add registry values so it is - ; possible to determine that this is an ESR install (bug 726781). - ClearErrors - ${WordFind} "${UpdateChannel}" "esr" "E#" $3 - ${If} ${Errors} - StrCpy $3 "" - ${Else} - StrCpy $3 " ESR" - ${EndIf} - - StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" - - StrCpy $2 "" - ClearErrors - WriteRegStr HKLM "$0" "${BrandShortName}InstallerTest" "Write Test" - ${If} ${Errors} - ; If the uninstall keys already exist in HKLM don't create them in HKCU - ClearErrors - ReadRegStr $2 "HKLM" $0 "DisplayName" - ${If} $2 == "" - ; Otherwise we don't have any keys for this product in HKLM so proceeed - ; to create them in HKCU. Better handling for this will be done in: - ; Bug 711044 - Better handling for 2 uninstall icons - StrCpy $1 "HKCU" - SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU) - ${EndIf} - ClearErrors - ${Else} - StrCpy $1 "HKLM" - SetShellVarContext all ; Set SHCTX to all users (e.g. HKLM) - DeleteRegValue HKLM "$0" "${BrandShortName}InstallerTest" - ${EndIf} - - ${If} $2 == "" - ${GetLongPath} "$INSTDIR" $8 - - ; Write the uninstall registry keys - ${WriteRegStr2} $1 "$0" "Comments" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0 - ${WriteRegStr2} $1 "$0" "DisplayIcon" "$8\${FileMainEXE},0" 0 - ${WriteRegStr2} $1 "$0" "DisplayName" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0 - ${WriteRegStr2} $1 "$0" "DisplayVersion" "${AppVersion}" 0 - ${WriteRegStr2} $1 "$0" "HelpLink" "${HelpLink}" 0 - ${WriteRegStr2} $1 "$0" "InstallLocation" "$8" 0 - ${WriteRegStr2} $1 "$0" "Publisher" "${CompanyName}" 0 - ${WriteRegStr2} $1 "$0" "UninstallString" "$\"$8\uninstall\helper.exe$\"" 0 - DeleteRegValue SHCTX "$0" "URLInfoAbout" -; Don't add URLUpdateInfo which is the release notes url except for the release -; and esr channels since nightly, aurora, and beta do not have release notes. -; Note: URLUpdateInfo is only defined in the official branding.nsi. -!ifdef URLUpdateInfo -!ifndef BETA_UPDATE_CHANNEL - ${WriteRegStr2} $1 "$0" "URLUpdateInfo" "${URLUpdateInfo}" 0 -!endif -!endif - ${WriteRegStr2} $1 "$0" "URLInfoAbout" "${URLInfoAbout}" 0 - ${WriteRegDWORD2} $1 "$0" "NoModify" 1 0 - ${WriteRegDWORD2} $1 "$0" "NoRepair" 1 0 - - ${GetSize} "$8" "/S=0K" $R2 $R3 $R4 - ${WriteRegDWORD2} $1 "$0" "EstimatedSize" $R2 0 - - ${If} "$TmpVal" == "HKLM" - SetShellVarContext all ; Set SHCTX to all users (e.g. HKLM) - ${Else} - SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU) - ${EndIf} - ${EndIf} -!macroend -!define SetUninstallKeys "!insertmacro SetUninstallKeys" - -; Due to a bug when associating some file handlers, only SHCTX was checked for -; some file types such as ".pdf". SHCTX is set to HKCU or HKLM depending on -; whether the installer has write access to HKLM. The bug would happen when -; HCKU was checked and didn't exist since programs aren't required to set the -; HKCU Software\Classes keys when associating handlers. The fix uses the merged -; view in HKCR to check for existance of an existing association. This macro -; cleans affected installations by removing the HKLM and HKCU value if it is set -; to Lun3rHTML when there is a value for PersistentHandler or by removing the -; HKCU value when the HKLM value has a value other than an empty string. -!macro FixBadFileAssociation FILE_TYPE - ; Only delete the default value in case the key has values for OpenWithList, - ; OpenWithProgids, PersistentHandler, etc. - ReadRegStr $0 HKCU "Software\Classes\${FILE_TYPE}" "" - ReadRegStr $1 HKLM "Software\Classes\${FILE_TYPE}" "" - ReadRegStr $2 HKCR "${FILE_TYPE}\PersistentHandler" "" - ${If} "$2" != "" - ; Since there is a persistent handler remove Lun3rHTML as the default - ; value from both HKCU and HKLM if it set to Lun3rHTML. - ${If} "$0" == "Lun3rHTML" - DeleteRegValue HKCU "Software\Classes\${FILE_TYPE}" "" - ${EndIf} - ${If} "$1" == "Lun3rHTML" - DeleteRegValue HKLM "Software\Classes\${FILE_TYPE}" "" - ${EndIf} - ${ElseIf} "$0" == "Lun3rHTML" - ; Since KHCU is set to Lun3rHTML remove Lun3rHTML as the default value - ; from HKCU if HKLM is set to a value other than an empty string. - ${If} "$1" != "" - DeleteRegValue HKCU "Software\Classes\${FILE_TYPE}" "" - ${EndIf} - ${EndIf} -!macroend -!define FixBadFileAssociation "!insertmacro FixBadFileAssociation" - -; Add app specific handler registry entries under Software\Classes if they -; don't exist (does not use SHCTX). -!macro FixClassKeys - StrCpy $1 "SOFTWARE\Classes" - - ; File handler keys and name value pairs that may need to be created during - ; install or upgrade. - ReadRegStr $0 HKCR ".shtml" "Content Type" - ${If} "$0" == "" - StrCpy $0 "$1\.shtml" - ${WriteRegStr2} $TmpVal "$1\.shtml" "" "shtmlfile" 0 - ${WriteRegStr2} $TmpVal "$1\.shtml" "Content Type" "text/html" 0 - ${WriteRegStr2} $TmpVal "$1\.shtml" "PerceivedType" "text" 0 - ${EndIf} - - ReadRegStr $0 HKCR ".xht" "Content Type" - ${If} "$0" == "" - ${WriteRegStr2} $TmpVal "$1\.xht" "" "xhtfile" 0 - ${WriteRegStr2} $TmpVal "$1\.xht" "Content Type" "application/xhtml+xml" 0 - ${EndIf} - - ReadRegStr $0 HKCR ".xhtml" "Content Type" - ${If} "$0" == "" - ${WriteRegStr2} $TmpVal "$1\.xhtml" "" "xhtmlfile" 0 - ${WriteRegStr2} $TmpVal "$1\.xhtml" "Content Type" "application/xhtml+xml" 0 - ${EndIf} - - ; Remove possibly badly associated file types - ${FixBadFileAssociation} ".pdf" - ${FixBadFileAssociation} ".oga" - ${FixBadFileAssociation} ".ogg" - ${FixBadFileAssociation} ".ogv" - ${FixBadFileAssociation} ".pdf" - ${FixBadFileAssociation} ".webm" -!macroend -!define FixClassKeys "!insertmacro FixClassKeys" - -; Updates protocol handlers if their registry open command value is for this -; install location (uses SHCTX). -!macro UpdateProtocolHandlers - ; Store the command to open the app with an url in a register for easy access. - ${GetLongPath} "$INSTDIR\${FileMainEXE}" $8 - StrCpy $2 "$\"$8$\" -osint -url $\"%1$\"" - - ; Only set the file and protocol handlers if the existing one under HKCR is - ; for this install location. - - ${IsHandlerForInstallDir} "Lun3rHTML" $R9 - ${If} "$R9" == "true" - ; An empty string is used for the 5th param because Lun3rHTML is not a - ; protocol handler. - ${AddDisabledDDEHandlerValues} "Lun3rHTML" "$2" "$8,1" \ - "${AppRegName} HTML Document" "" - ${EndIf} - - ${IsHandlerForInstallDir} "Lun3rURL" $R9 - ${If} "$R9" == "true" - ${AddDisabledDDEHandlerValues} "Lun3rURL" "$2" "$8,1" \ - "${AppRegName} URL" "true" - ${EndIf} - - ; An empty string is used for the 4th & 5th params because the following - ; protocol handlers already have a display name and the additional keys - ; required for a protocol handler. - ${IsHandlerForInstallDir} "ftp" $R9 - ${If} "$R9" == "true" - ${AddDisabledDDEHandlerValues} "ftp" "$2" "$8,1" "" "" - ${EndIf} - - ${IsHandlerForInstallDir} "http" $R9 - ${If} "$R9" == "true" - ${AddDisabledDDEHandlerValues} "http" "$2" "$8,1" "" "" - ${EndIf} - - ${IsHandlerForInstallDir} "https" $R9 - ${If} "$R9" == "true" - ${AddDisabledDDEHandlerValues} "https" "$2" "$8,1" "" "" - ${EndIf} -!macroend -!define UpdateProtocolHandlers "!insertmacro UpdateProtocolHandlers" - -; Removes various registry entries for reasons noted below (does not use SHCTX). -!macro RemoveDeprecatedKeys - StrCpy $0 "SOFTWARE\Classes" - ; Remove support for launching gopher urls from the shell during install or - ; update if the DefaultIcon is from palemoon.exe. - ${RegCleanAppHandler} "gopher" - - ; Remove support for launching chrome urls from the shell during install or - ; update if the DefaultIcon is from palemoon.exe (Bug 301073). - ${RegCleanAppHandler} "chrome" - - ; Remove protocol handler registry keys added by the MS shim - DeleteRegKey HKLM "Software\Classes\PaleMoon.URL" - DeleteRegKey HKCU "Software\Classes\PaleMoon.URL" - - ; Delete gopher from Capabilities\URLAssociations if it is present. - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - StrCpy $0 "Software\Clients\StartMenuInternet\$R9" - ClearErrors - ReadRegStr $2 HKLM "$0\Capabilities\URLAssociations" "gopher" - ${Unless} ${Errors} - DeleteRegValue HKLM "$0\Capabilities\URLAssociations" "gopher" - ${EndUnless} - - ; Delete gopher from the user's UrlAssociations if it points to Lun3rURL. - StrCpy $0 "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\gopher" - ReadRegStr $2 HKCU "$0\UserChoice" "Progid" - ${If} "$2" == "Lun3rURL" - DeleteRegKey HKCU "$0" - ${EndIf} -!macroend -!define RemoveDeprecatedKeys "!insertmacro RemoveDeprecatedKeys" - -; Removes various directories and files for reasons noted below. -!macro RemoveDeprecatedFiles - ; Remove talkback if it is present (remove after bug 386760 is fixed) - ${If} ${FileExists} "$INSTDIR\extensions\talkback@mozilla.org" - RmDir /r /REBOOTOK "$INSTDIR\extensions\talkback@mozilla.org" - ${EndIf} - - ; Remove the Java Console extension (bug 1165156) - ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0031-ABCDEFFEDCBA}" - RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0031-ABCDEFFEDCBA}" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0034-ABCDEFFEDCBA}" - RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0034-ABCDEFFEDCBA}" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0039-ABCDEFFEDCBA}" - RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0039-ABCDEFFEDCBA}" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0045-ABCDEFFEDCBA}" - RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0045-ABCDEFFEDCBA}" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0000-ABCDEFFEDCBA}" - RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0000-ABCDEFFEDCBA}" - ${EndIf} -!macroend -!define RemoveDeprecatedFiles "!insertmacro RemoveDeprecatedFiles" - -; Converts specific partner distribution.ini from ansi to utf-8 (bug 882989) -!macro FixDistributionsINI - StrCpy $1 "$INSTDIR\distribution\distribution.ini" - StrCpy $2 "$INSTDIR\distribution\utf8fix" - StrCpy $0 "0" ; Default to not attempting to fix - - ; Check if the distribution.ini settings are for a partner build that needs - ; to have its distribution.ini converted from ansi to utf-8. - ${If} ${FileExists} "$1" - ${Unless} ${FileExists} "$2" - ReadINIStr $3 "$1" "Preferences" "app.distributor" - ${If} "$3" == "yahoo" - ReadINIStr $3 "$1" "Preferences" "app.distributor.channel" - ${If} "$3" == "de" - ${OrIf} "$3" == "es" - ${OrIf} "$3" == "e1" - ${OrIf} "$3" == "mx" - StrCpy $0 "1" - ${EndIf} - ${EndIf} - ; Create the utf8fix so this only runs once - FileOpen $3 "$2" w - FileClose $3 - ${EndUnless} - ${EndIf} - - ${If} "$0" == "1" - StrCpy $0 "0" - ClearErrors - ReadINIStr $3 "$1" "Global" "version" - ${Unless} ${Errors} - StrCpy $4 "$3" 2 - ${If} "$4" == "1." - StrCpy $4 "$3" "" 2 ; Everything after "1." - ${If} $4 < 23 - StrCpy $0 "1" - ${EndIf} - ${EndIf} - ${EndUnless} - ${EndIf} - - ${If} "$0" == "1" - ClearErrors - FileOpen $3 "$1" r - ${If} ${Errors} - FileClose $3 - ${Else} - StrCpy $2 "$INSTDIR\distribution\distribution.new" - ClearErrors - FileOpen $4 "$2" w - ${If} ${Errors} - FileClose $3 - FileClose $4 - ${Else} - StrCpy $0 "0" ; Default to not replacing the original distribution.ini - ${Do} - FileReadByte $3 $5 - ${If} $5 == "" - ${Break} - ${EndIf} - ${If} $5 == 233 ; ansi é - StrCpy $0 "1" - FileWriteByte $4 195 - FileWriteByte $4 169 - ${ElseIf} $5 == 241 ; ansi ñ - StrCpy $0 "1" - FileWriteByte $4 195 - FileWriteByte $4 177 - ${ElseIf} $5 == 252 ; ansi ü - StrCpy $0 "1" - FileWriteByte $4 195 - FileWriteByte $4 188 - ${ElseIf} $5 < 128 - FileWriteByte $4 $5 - ${EndIf} - ${Loop} - FileClose $3 - FileClose $4 - ${If} "$0" == "1" - ClearErrors - Rename "$1" "$1.bak" - ${Unless} ${Errors} - Rename "$2" "$1" - Delete "$1.bak" - ${EndUnless} - ${Else} - Delete "$2" - ${EndIf} - ${EndIf} - ${EndIf} - ${EndIf} -!macroend -!define FixDistributionsINI "!insertmacro FixDistributionsINI" - -; Adds a pinned shortcut to Task Bar on update for Windows 7 and above if this -; macro has never been called before and the application is default (see -; PinToTaskBar for more details). -; Since defaults handling is handled by Windows in Win8 and later, we always -; attempt to pin a taskbar on that OS. If Windows sets the defaults at -; installation time, then we don't get the opportunity to run this code at -; that time. -!macro MigrateTaskBarShortcut - ${GetShortcutsLogPath} $0 - ${If} ${FileExists} "$0" - ClearErrors - ReadINIStr $1 "$0" "TASKBAR" "Migrated" - ${If} ${Errors} - ClearErrors - WriteIniStr "$0" "TASKBAR" "Migrated" "true" - ${If} ${AtLeastWin7} - ; If we didn't run the stub installer, AddTaskbarSC will be empty. - ; We determine whether to pin based on whether we're the default - ; browser, or if we're on win8 or later, we always pin. - ${If} $AddTaskbarSC == "" - ; No need to check the default on Win8 and later - ${If} ${AtMostWin2008R2} - ; Check if the Basilisk is the http handler for this user - SetShellVarContext current ; Set SHCTX to the current user - ${IsHandlerForInstallDir} "http" $R9 - ${If} $TmpVal == "HKLM" - SetShellVarContext all ; Set SHCTX to all users - ${EndIf} - ${EndIf} - ${If} "$R9" == "true" - ${OrIf} ${AtLeastWin8} - ${PinToTaskBar} - ${EndIf} - ${ElseIf} $AddTaskbarSC == "1" - ${PinToTaskBar} - ${EndIf} - ${EndIf} - ${EndIf} - ${EndIf} -!macroend -!define MigrateTaskBarShortcut "!insertmacro MigrateTaskBarShortcut" - -; Adds a pinned Task Bar shortcut on Windows 7 if there isn't one for the main -; application executable already. Existing pinned shortcuts for the same -; application model ID must be removed first to prevent breaking the pinned -; item's lists but multiple installations with the same application model ID is -; an edgecase. If removing existing pinned shortcuts with the same application -; model ID removes a pinned pinned Start Menu shortcut this will also add a -; pinned Start Menu shortcut. -!macro PinToTaskBar - ${If} ${AtLeastWin7} - StrCpy $8 "false" ; Whether a shortcut had to be created - ${IsPinnedToTaskBar} "$INSTDIR\${FileMainEXE}" $R9 - ${If} "$R9" == "false" - ; Find an existing Start Menu shortcut or create one to use for pinning - ${GetShortcutsLogPath} $0 - ${If} ${FileExists} "$0" - ClearErrors - ReadINIStr $1 "$0" "STARTMENU" "Shortcut0" - ${Unless} ${Errors} - SetShellVarContext all ; Set SHCTX to all users - ${Unless} ${FileExists} "$SMPROGRAMS\$1" - SetShellVarContext current ; Set SHCTX to the current user - ${Unless} ${FileExists} "$SMPROGRAMS\$1" - StrCpy $8 "true" - CreateShortCut "$SMPROGRAMS\$1" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$SMPROGRAMS\$1" - ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\$1" \ - "$INSTDIR" - ${If} "$AppUserModelID" != "" - ApplicationID::Set "$SMPROGRAMS\$1" "$AppUserModelID" "true" - ${EndIf} - ${EndIf} - ${EndUnless} - ${EndUnless} - - ${If} ${FileExists} "$SMPROGRAMS\$1" - ; Count of Start Menu pinned shortcuts before unpinning. - ${PinnedToStartMenuLnkCount} $R9 - - ; Having multiple shortcuts pointing to different installations with - ; the same AppUserModelID (e.g. side by side installations of the - ; same version) will make the TaskBar shortcut's lists into an bad - ; state where the lists are not shown. To prevent this first - ; uninstall the pinned item. - ApplicationID::UninstallPinnedItem "$SMPROGRAMS\$1" - - ; Count of Start Menu pinned shortcuts after unpinning. - ${PinnedToStartMenuLnkCount} $R8 - - ; If there is a change in the number of Start Menu pinned shortcuts - ; assume that unpinning unpinned a side by side installation from - ; the Start Menu and pin this installation to the Start Menu. - ${Unless} $R8 == $R9 - ; Pin the shortcut to the Start Menu. 5381 is the shell32.dll - ; resource id for the "Pin to Start Menu" string. - InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5381" - ${EndUnless} - - ; Pin the shortcut to the TaskBar. 5386 is the shell32.dll resource - ; id for the "Pin to Taskbar" string. - InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5386" - - ; Delete the shortcut if it was created - ${If} "$8" == "true" - Delete "$SMPROGRAMS\$1" - ${EndIf} - ${EndIf} - - ${If} $TmpVal == "HKCU" - SetShellVarContext current ; Set SHCTX to the current user - ${Else} - SetShellVarContext all ; Set SHCTX to all users - ${EndIf} - ${EndUnless} - ${EndIf} - ${EndIf} - ${EndIf} -!macroend -!define PinToTaskBar "!insertmacro PinToTaskBar" - -; Adds a shortcut to the root of the Start Menu Programs directory if the -; application's Start Menu Programs directory exists with a shortcut pointing to -; this installation directory. This will also remove the old shortcuts and the -; application's Start Menu Programs directory by calling the RemoveStartMenuDir -; macro. -!macro MigrateStartMenuShortcut - ${GetShortcutsLogPath} $0 - ${If} ${FileExists} "$0" - ClearErrors - ReadINIStr $5 "$0" "SMPROGRAMS" "RelativePathToDir" - ${Unless} ${Errors} - ClearErrors - ReadINIStr $1 "$0" "STARTMENU" "Shortcut0" - ${If} ${Errors} - ; The STARTMENU ini section doesn't exist. - ${LogStartMenuShortcut} "${BrandFullName}.lnk" - ${GetLongPath} "$SMPROGRAMS" $2 - ${GetLongPath} "$2\$5" $1 - ${If} "$1" != "" - ClearErrors - ReadINIStr $3 "$0" "SMPROGRAMS" "Shortcut0" - ${Unless} ${Errors} - ${If} ${FileExists} "$1\$3" - ShellLink::GetShortCutTarget "$1\$3" - Pop $4 - ${If} "$INSTDIR\${FileMainEXE}" == "$4" - CreateShortCut "$SMPROGRAMS\${BrandFullName}.lnk" \ - "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ - "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" \ - "$AppUserModelID" "true" - ${EndIf} - ${EndIf} - ${EndIf} - ${EndIf} - ${EndUnless} - ${EndIf} - ${EndIf} - ; Remove the application's Start Menu Programs directory, shortcuts, and - ; ini section. - ${RemoveStartMenuDir} - ${EndUnless} - ${EndIf} -!macroend -!define MigrateStartMenuShortcut "!insertmacro MigrateStartMenuShortcut" - -; Removes the application's start menu directory along with its shortcuts if -; they exist and if they exist creates a start menu shortcut in the root of the -; start menu directory (bug 598779). If the application's start menu directory -; is not empty after removing the shortucts the directory will not be removed -; since these additional items were not created by the installer (uses SHCTX). -!macro RemoveStartMenuDir - ${GetShortcutsLogPath} $0 - ${If} ${FileExists} "$0" - ; Delete Start Menu Programs shortcuts, directory if it is empty, and - ; parent directories if they are empty up to but not including the start - ; menu directory. - ${GetLongPath} "$SMPROGRAMS" $1 - ClearErrors - ReadINIStr $2 "$0" "SMPROGRAMS" "RelativePathToDir" - ${Unless} ${Errors} - ${GetLongPath} "$1\$2" $2 - ${If} "$2" != "" - ; Delete shortucts in the Start Menu Programs directory. - StrCpy $3 0 - ${Do} - ClearErrors - ReadINIStr $4 "$0" "SMPROGRAMS" "Shortcut$3" - ; Stop if there are no more entries - ${If} ${Errors} - ${ExitDo} - ${EndIf} - ${If} ${FileExists} "$2\$4" - ShellLink::GetShortCutTarget "$2\$4" - Pop $5 - ${If} "$INSTDIR\${FileMainEXE}" == "$5" - Delete "$2\$4" - ${EndIf} - ${EndIf} - IntOp $3 $3 + 1 ; Increment the counter - ${Loop} - ; Delete Start Menu Programs directory and parent directories - ${Do} - ; Stop if the current directory is the start menu directory - ${If} "$1" == "$2" - ${ExitDo} - ${EndIf} - ClearErrors - RmDir "$2" - ; Stop if removing the directory failed - ${If} ${Errors} - ${ExitDo} - ${EndIf} - ${GetParent} "$2" $2 - ${Loop} - ${EndIf} - DeleteINISec "$0" "SMPROGRAMS" - ${EndUnless} - ${EndIf} -!macroend -!define RemoveStartMenuDir "!insertmacro RemoveStartMenuDir" - -; Creates the shortcuts log ini file with the appropriate entries if it doesn't -; already exist. -!macro CreateShortcutsLog - ${GetShortcutsLogPath} $0 - ${Unless} ${FileExists} "$0" - ${LogStartMenuShortcut} "${BrandFullName}.lnk" - ${LogQuickLaunchShortcut} "${BrandFullName}.lnk" - ${LogDesktopShortcut} "${BrandFullName}.lnk" - ${EndUnless} -!macroend -!define CreateShortcutsLog "!insertmacro CreateShortcutsLog" - -; The files to check if they are in use during (un)install so the restart is -; required message is displayed. All files must be located in the $INSTDIR -; directory. -!macro PushFilesToCheck - ; The first string to be pushed onto the stack MUST be "end" to indicate - ; that there are no more files to check in $INSTDIR and the last string - ; should be ${FileMainEXE} so if it is in use the CheckForFilesInUse macro - ; returns after the first check. - Push "end" - Push "AccessibleMarshal.dll" - Push "IA2Marshal.dll" - Push "freebl3.dll" - Push "nssckbi.dll" - Push "nspr4.dll" - Push "nssdbm3.dll" - Push "mozsqlite3.dll" - Push "xpcom.dll" - Push "crashreporter.exe" - Push "minidump-analyzer.exe" - Push "updater.exe" - Push "${FileMainEXE}" -!macroend -!define PushFilesToCheck "!insertmacro PushFilesToCheck" - - -; Pushes the string "true" to the top of the stack if the Firewall service is -; running and pushes the string "false" to the top of the stack if it isn't. -!define SC_MANAGER_ALL_ACCESS 0x3F -!define SERVICE_QUERY_CONFIG 0x0001 -!define SERVICE_QUERY_STATUS 0x0004 -!define SERVICE_RUNNING 0x4 - -!macro IsFirewallSvcRunning - Push $R9 - Push $R8 - Push $R7 - Push $R6 - Push "false" - - System::Call 'advapi32::OpenSCManagerW(n, n, i ${SC_MANAGER_ALL_ACCESS}) i.R6' - ${If} $R6 != 0 - ; MpsSvc is the Firewall service on Windows Vista and above. - ; When opening the service with SERVICE_QUERY_CONFIG the return value will - ; be 0 if the service is not installed. - System::Call 'advapi32::OpenServiceW(i R6, t "MpsSvc", i ${SERVICE_QUERY_CONFIG}) i.R7' - ${If} $R7 != 0 - System::Call 'advapi32::CloseServiceHandle(i R7) n' - ; Open the service with SERVICE_QUERY_CONFIG so its status can be queried. - System::Call 'advapi32::OpenServiceW(i R6, t "MpsSvc", i ${SERVICE_QUERY_STATUS}) i.R7' - ${Else} - ; SharedAccess is the Firewall service on Windows XP. - ; When opening the service with SERVICE_QUERY_CONFIG the return value will - ; be 0 if the service is not installed. - System::Call 'advapi32::OpenServiceW(i R6, t "SharedAccess", i ${SERVICE_QUERY_CONFIG}) i.R7' - ${If} $R7 != 0 - System::Call 'advapi32::CloseServiceHandle(i R7) n' - ; Open the service with SERVICE_QUERY_CONFIG so its status can be - ; queried. - System::Call 'advapi32::OpenServiceW(i R6, t "SharedAccess", i ${SERVICE_QUERY_STATUS}) i.R7' - ${EndIf} - ${EndIf} - ; Did the calls to OpenServiceW succeed? - ${If} $R7 != 0 - System::Call '*(i,i,i,i,i,i,i) i.R9' - ; Query the current status of the service. - System::Call 'advapi32::QueryServiceStatus(i R7, i $R9) i' - System::Call '*$R9(i, i.R8)' - System::Free $R9 - System::Call 'advapi32::CloseServiceHandle(i R7) n' - IntFmt $R8 "0x%X" $R8 - ${If} $R8 == ${SERVICE_RUNNING} - Pop $R9 - Push "true" - ${EndIf} - ${EndIf} - System::Call 'advapi32::CloseServiceHandle(i R6) n' - ${EndIf} - - Exch 1 - Pop $R6 - Exch 1 - Pop $R7 - Exch 1 - Pop $R8 - Exch 1 - Pop $R9 -!macroend -!define IsFirewallSvcRunning "!insertmacro IsFirewallSvcRunning" -!define un.IsFirewallSvcRunning "!insertmacro IsFirewallSvcRunning" - -; Sets this installation as the default browser by setting the registry keys -; under HKEY_CURRENT_USER via registry calls and using the AppAssocReg NSIS -; plugin for Vista and above. This is a function instead of a macro so it is -; easily called from an elevated instance of the binary. Since this can be -; called by an elevated instance logging is not performed in this function. -Function SetAsDefaultAppUserHKCU - ; Only set as the user's StartMenuInternet browser if the StartMenuInternet - ; registry keys are for this install. - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - ClearErrors - ReadRegStr $0 HKCU "Software\Clients\StartMenuInternet\$R9\DefaultIcon" "" - ${If} ${Errors} - ${OrIf} ${AtMostWin2008R2} - ClearErrors - ReadRegStr $0 HKLM "Software\Clients\StartMenuInternet\$R9\DefaultIcon" "" - ${EndIf} - ${Unless} ${Errors} - ${GetPathFromString} "$0" $0 - ${GetParent} "$0" $0 - ${If} ${FileExists} "$0" - ${GetLongPath} "$0" $0 - ${If} "$0" == "$INSTDIR" - WriteRegStr HKCU "Software\Clients\StartMenuInternet" "" "$R9" - ${EndIf} - ${EndIf} - ${EndUnless} - - SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU) - - ${If} ${AtLeastWin8} - ${SetStartMenuInternet} "HKCU" - ${FixShellIconHandler} "HKCU" - ${FixClassKeys} ; Does not use SHCTX - ${EndIf} - - ${SetHandlers} - - ${If} ${AtLeastWinVista} - ; Only register as the handler on Vista and above if the app registry name - ; exists under the RegisteredApplications registry key. The protocol and - ; file handlers set previously at the user level will associate this install - ; as the default browser. - ClearErrors - ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegName}" - ${Unless} ${Errors} - ; This is all protected by a user choice hash in Windows 8 so it won't - ; help, but it also won't hurt. - AppAssocReg::SetAppAsDefaultAll "${AppRegName}" - ${EndUnless} - ${EndIf} - ${RemoveDeprecatedKeys} - ${MigrateTaskBarShortcut} -FunctionEnd - -; Helper for updating the shortcut application model IDs. -Function FixShortcutAppModelIDs - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ${UpdateShortcutAppModelIDs} "$INSTDIR\${FileMainEXE}" "$AppUserModelID" $0 - ${EndIf} -FunctionEnd - -; Helper for adding Firewall exceptions during install and after app update. -Function AddFirewallEntries - ${IsFirewallSvcRunning} - Pop $0 - ${If} "$0" == "true" - liteFirewallW::AddRule "$INSTDIR\${FileMainEXE}" "${BrandShortName} ($INSTDIR)" - ${EndIf} -FunctionEnd - -; The !ifdef NO_LOG prevents warnings when compiling the installer.nsi due to -; this function only being used by the uninstaller.nsi. -!ifdef NO_LOG - -Function SetAsDefaultAppUser - ; On Win8, we want to avoid having a UAC prompt since we'll already have - ; another action for control panel default browser selection popping up - ; to the user. Win8 is the first OS where the start menu keys can be - ; added into HKCU. The call to SetAsDefaultAppUserHKCU will have already - ; set the HKCU keys for SetStartMenuInternet. - ${If} ${AtLeastWin8} - ; Check if this is running in an elevated process - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $0 - ${If} ${Errors} ; Not elevated - Call SetAsDefaultAppUserHKCU - ${Else} ; Elevated - execute the function in the unelevated process - GetFunctionAddress $0 SetAsDefaultAppUserHKCU - UAC::ExecCodeSegment $0 - ${EndIf} - Return ; Nothing more needs to be done - ${EndIf} - - ; Before Win8, it is only possible to set this installation of the application - ; as the StartMenuInternet handler if it was added to the HKLM - ; StartMenuInternet registry keys. - ; http://support.microsoft.com/kb/297878 - - ; Check if this install location registered as the StartMenuInternet client - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - ClearErrors - ReadRegStr $0 HKCU "Software\Clients\StartMenuInternet\$R9\DefaultIcon" "" - ${If} ${Errors} - ${OrIf} ${AtMostWin2008R2} - ClearErrors - ReadRegStr $0 HKLM "Software\Clients\StartMenuInternet\$R9\DefaultIcon" "" - ${EndIf} - - ${Unless} ${Errors} - ${GetPathFromString} "$0" $0 - ${GetParent} "$0" $0 - ${If} ${FileExists} "$0" - ${GetLongPath} "$0" $0 - ${If} "$0" == "$INSTDIR" - ; Check if this is running in an elevated process - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $0 - ${If} ${Errors} ; Not elevated - Call SetAsDefaultAppUserHKCU - ${Else} ; Elevated - execute the function in the unelevated process - GetFunctionAddress $0 SetAsDefaultAppUserHKCU - UAC::ExecCodeSegment $0 - ${EndIf} - Return ; Nothing more needs to be done - ${EndIf} - ${EndIf} - ${EndUnless} - - ; The code after ElevateUAC won't be executed on Vista and above when the - ; user: - ; a) is a member of the administrators group (e.g. elevation is required) - ; b) is not a member of the administrators group and chooses to elevate - ${ElevateUAC} - - ${SetStartMenuInternet} "HKLM" - - SetShellVarContext all ; Set SHCTX to all users (e.g. HKLM) - - ${FixClassKeys} ; Does not use SHCTX - ${FixShellIconHandler} "HKLM" - ${RemoveDeprecatedKeys} ; Does not use SHCTX - - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $0 - ${If} ${Errors} - Call SetAsDefaultAppUserHKCU - ${Else} - GetFunctionAddress $0 SetAsDefaultAppUserHKCU - UAC::ExecCodeSegment $0 - ${EndIf} -FunctionEnd -!define SetAsDefaultAppUser "Call SetAsDefaultAppUser" - -!endif ; NO_LOG diff --git a/application/palemoon/installer/windows/nsis/uninstaller.nsi b/application/palemoon/installer/windows/nsis/uninstaller.nsi deleted file mode 100644 index 12ffc2ad7b..0000000000 --- a/application/palemoon/installer/windows/nsis/uninstaller.nsi +++ /dev/null @@ -1,558 +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/. - -# Required Plugins: -# AppAssocReg http://nsis.sourceforge.net/Application_Association_Registration_plug-in -# CityHash http://dxr.mozilla.org/mozilla-central/source/other-licenses/nsis/Contrib/CityHash -# ShellLink http://nsis.sourceforge.net/ShellLink_plug-in -# UAC http://nsis.sourceforge.net/UAC_plug-in - -; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs -!verbose 3 - -; 7-Zip provides better compression than the lzma from NSIS so we add the files -; uncompressed and use 7-Zip to create a SFX archive of it -SetDatablockOptimize on -SetCompress off -CRCCheck on - -RequestExecutionLevel user - -; The commands inside this ifdef require NSIS 3.0a2 or greater so the ifdef can -; be removed after we require NSIS 3.0a2 or greater. -!ifdef NSIS_PACKEDVERSION - Unicode true - ManifestSupportedOS all - ManifestDPIAware true -!endif - -!addplugindir ./ - -; On Vista and above attempt to elevate Standard Users in addition to users that -; are a member of the Administrators group. -!define NONADMIN_ELEVATE - -; prevents compiling of the reg write logging. -!define NO_LOG - -!define MaintUninstallKey \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService" - -Var TmpVal - -; Other included files may depend upon these includes! -; The following includes are provided by NSIS. -!include FileFunc.nsh -!include LogicLib.nsh -!include MUI.nsh -!include WinMessages.nsh -!include WinVer.nsh -!include WordFunc.nsh - -!insertmacro GetSize -!insertmacro StrFilter -!insertmacro WordReplace - -!insertmacro un.GetParent - -; The following includes are custom. -!include branding.nsi -!include defines.nsi -!include common.nsh -!include locales.nsi - -; This is named BrandShortName helper because we use this for software update -; post update cleanup. -VIAddVersionKey "FileDescription" "${BrandShortName} Helper" -VIAddVersionKey "OriginalFilename" "helper.exe" - -!insertmacro AddDisabledDDEHandlerValues -!insertmacro CleanVirtualStore -!insertmacro ElevateUAC -!insertmacro GetLongPath -!insertmacro GetPathFromString -!insertmacro InitHashAppModelId -!insertmacro IsHandlerForInstallDir -!insertmacro IsPinnedToTaskBar -!insertmacro IsUserAdmin -!insertmacro LogDesktopShortcut -!insertmacro LogQuickLaunchShortcut -!insertmacro LogStartMenuShortcut -!insertmacro PinnedToStartMenuLnkCount -!insertmacro RegCleanAppHandler -!insertmacro RegCleanMain -!insertmacro RegCleanUninstall -!insertmacro SetAppLSPCategories -!insertmacro SetBrandNameVars -!insertmacro UpdateShortcutAppModelIDs -!insertmacro UnloadUAC -!insertmacro WriteRegDWORD2 -!insertmacro WriteRegStr2 - -!insertmacro un.ChangeMUIHeaderImage -!insertmacro un.CheckForFilesInUse -!insertmacro un.CleanUpdateDirectories -!insertmacro un.CleanVirtualStore -!insertmacro un.DeleteShortcuts -!insertmacro un.GetLongPath -!insertmacro un.GetSecondInstallPath -!insertmacro un.InitHashAppModelId -!insertmacro un.ManualCloseAppPrompt -!insertmacro un.RegCleanAppHandler -!insertmacro un.RegCleanFileHandler -!insertmacro un.RegCleanMain -!insertmacro un.RegCleanUninstall -!insertmacro un.RegCleanProtocolHandler -!insertmacro un.RemoveQuotesFromPath -!insertmacro un.RemovePrecompleteEntries -!insertmacro un.SetAppLSPCategories -!insertmacro un.SetBrandNameVars - -!include shared.nsh - -; Helper macros for ui callbacks. Insert these after shared.nsh -!insertmacro OnEndCommon -!insertmacro UninstallOnInitCommon - -!insertmacro un.OnEndCommon -!insertmacro un.UninstallUnOnInitCommon - -Name "${BrandFullName}" -OutFile "helper.exe" -!ifdef HAVE_64BIT_BUILD - InstallDir "$PROGRAMFILES64\${CompanyName}\${BrandShortName}\" -!else - InstallDir "$PROGRAMFILES32\${CompanyName}\${BrandShortName}\" -!endif -ShowUnInstDetails nevershow - -################################################################################ -# Modern User Interface - MUI - -!define MUI_ABORTWARNING -!define MUI_ICON setup.ico -!define MUI_UNICON setup.ico -!define MUI_WELCOMEPAGE_TITLE_3LINES -!define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_RIGHT -!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp - -; Use a right to left header image when the language is right to left -!ifdef ${AB_CD}_rtl -!define MUI_HEADERIMAGE_BITMAP_RTL wizHeaderRTL.bmp -!else -!define MUI_HEADERIMAGE_BITMAP wizHeader.bmp -!endif - -/** - * Uninstall Pages - */ -; Welcome Page -!define MUI_PAGE_CUSTOMFUNCTION_PRE un.preWelcome -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.leaveWelcome -!insertmacro MUI_UNPAGE_WELCOME - -; Custom Uninstall Confirm Page -UninstPage custom un.preConfirm - -; Remove Files Page -!insertmacro MUI_UNPAGE_INSTFILES - -; Finish Page - -!insertmacro MUI_UNPAGE_FINISH - -; Use the default dialog for IDD_VERIFY for a simple Banner -ChangeUI IDD_VERIFY "${NSISDIR}\Contrib\UIs\default.exe" - -################################################################################ -# Install Sections -; Empty section required for the installer to compile as an uninstaller -Section "" -SectionEnd - -################################################################################ -# Uninstall Sections - -Section "Uninstall" - SetDetailsPrint textonly - DetailPrint $(STATUS_UNINSTALL_MAIN) - SetDetailsPrint none - - ; Delete the app exe to prevent launching the app while we are uninstalling. - ClearErrors - ${DeleteFile} "$INSTDIR\${FileMainEXE}" - ${If} ${Errors} - ; If the user closed the application it can take several seconds for it to - ; shut down completely. If the application is being used by another user we - ; can still delete the files when the system is restarted. - Sleep 5000 - ${DeleteFile} "$INSTDIR\${FileMainEXE}" - ClearErrors - ${EndIf} - - ; setup the application model id registration value - ${un.InitHashAppModelId} "$INSTDIR" "Software\${CompanyName}\${BrandShortName}\TaskBarIDs" - - SetShellVarContext current ; Set SHCTX to HKCU - ${un.RegCleanMain} "Software\${CompanyName}" - ${un.RegCleanUninstall} - ${un.DeleteShortcuts} - - ; Unregister resources associated with Win7 taskbar jump lists. - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" - ApplicationID::UninstallJumpLists "$AppUserModelID" - ${EndIf} - - ; Remove the updates directory for Vista and above - ${un.CleanUpdateDirectories} "${CompanyName}\${BrandShortName}" "${CompanyName}\updates" - - ; Remove any app model id's stored in the registry for this install path - DeleteRegValue HKCU "Software\${CompanyName}\${BrandShortName}\TaskBarIDs" "$INSTDIR" - DeleteRegValue HKLM "Software\${CompanyName}\${BrandShortName}\TaskBarIDs" "$INSTDIR" - - ClearErrors - WriteRegStr HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest" "Write Test" - ${If} ${Errors} - StrCpy $TmpVal "HKCU" ; used primarily for logging - ${Else} - SetShellVarContext all ; Set SHCTX to HKLM - DeleteRegValue HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest" - StrCpy $TmpVal "HKLM" ; used primarily for logging - ${un.RegCleanMain} "Software\${CompanyName}" - ${un.RegCleanUninstall} - ${un.DeleteShortcuts} - ${un.SetAppLSPCategories} - ${EndIf} - - ${un.RegCleanAppHandler} "Lun3rURL" - ${un.RegCleanAppHandler} "Lun3rHTML" - ${un.RegCleanProtocolHandler} "ftp" - ${un.RegCleanProtocolHandler} "http" - ${un.RegCleanProtocolHandler} "https" - - ClearErrors - ReadRegStr $R9 HKCR "Lun3rHTML" "" - ; Don't clean up the file handlers if the Lun3rHTML key still exists since - ; there should be a second installation that may be the default file handler - ${If} ${Errors} - ${un.RegCleanFileHandler} ".htm" "Lun3rHTML" - ${un.RegCleanFileHandler} ".html" "Lun3rHTML" - ${un.RegCleanFileHandler} ".shtml" "Lun3rHTML" - ${un.RegCleanFileHandler} ".xht" "Lun3rHTML" - ${un.RegCleanFileHandler} ".xhtml" "Lun3rHTML" - ${un.RegCleanFileHandler} ".oga" "Lun3rHTML" - ${un.RegCleanFileHandler} ".ogg" "Lun3rHTML" - ${un.RegCleanFileHandler} ".ogv" "Lun3rHTML" - ${un.RegCleanFileHandler} ".pdf" "Lun3rHTML" - ${un.RegCleanFileHandler} ".webm" "Lun3rHTML" - ${EndIf} - - SetShellVarContext all ; Set SHCTX to HKLM - ${un.GetSecondInstallPath} "Software\${CompanyName}" $R9 - ${If} $R9 == "false" - SetShellVarContext current ; Set SHCTX to HKCU - ${un.GetSecondInstallPath} "Software\${CompanyName}" $R9 - ${EndIf} - - StrCpy $0 "Software\Clients\StartMenuInternet\${FileMainEXE}\shell\open\command" - ReadRegStr $R1 HKLM "$0" "" - ${un.RemoveQuotesFromPath} "$R1" $R1 - ${un.GetParent} "$R1" $R1 - - ; Only remove the StartMenuInternet key if it refers to this install location. - ; The StartMenuInternet registry key is independent of the default browser - ; settings. The XPInstall base un-installer always removes this key if it is - ; uninstalling the default browser and it will always replace the keys when - ; installing even if there is another install of PaleMoon that is set as the - ; default browser. Now the key is always updated on install but it is only - ; removed if it refers to this install location. - ${If} "$INSTDIR" == "$R1" - DeleteRegKey HKLM "Software\Clients\StartMenuInternet\${FileMainEXE}" - DeleteRegValue HKLM "Software\RegisteredApplications" "${AppRegName}" - ${EndIf} - - ReadRegStr $R1 HKCU "$0" "" - ${un.RemoveQuotesFromPath} "$R1" $R1 - ${un.GetParent} "$R1" $R1 - - ; Only remove the StartMenuInternet key if it refers to this install location. - ; The StartMenuInternet registry key is independent of the default browser - ; settings. The XPInstall base un-installer always removes this key if it is - ; uninstalling the default browser and it will always replace the keys when - ; installing even if there is another install of PaleMoon that is set as the - ; default browser. Now the key is always updated on install but it is only - ; removed if it refers to this install location. - ${If} "$INSTDIR" == "$R1" - DeleteRegKey HKCU "Software\Clients\StartMenuInternet\${FileMainEXE}" - DeleteRegValue HKCU "Software\RegisteredApplications" "${AppRegName}" - ${EndIf} - - StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}" - ${If} $R9 == "false" - DeleteRegKey HKLM "$0" - DeleteRegKey HKCU "$0" - StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\${FileMainEXE}" - DeleteRegKey HKLM "$0" - DeleteRegKey HKCU "$0" - StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\plugin-container.exe" - DeleteRegKey HKLM "$0" - DeleteRegKey HKCU "$0" - StrCpy $0 "Software\Classes\MIME\Database\Content Type\application/x-xpinstall;app=${FileMainEXE}" - DeleteRegKey HKLM "$0" - DeleteRegKey HKCU "$0" - ${Else} - ReadRegStr $R1 HKLM "$0" "" - ${un.RemoveQuotesFromPath} "$R1" $R1 - ${un.GetParent} "$R1" $R1 - ${If} "$INSTDIR" == "$R1" - WriteRegStr HKLM "$0" "" "$R9" - ${un.GetParent} "$R9" $R1 - WriteRegStr HKLM "$0" "Path" "$R1" - ${EndIf} - ${EndIf} - - ; Remove directories and files we always control before parsing the uninstall - ; log so empty directories can be removed. - ${If} ${FileExists} "$INSTDIR\updates" - RmDir /r /REBOOTOK "$INSTDIR\updates" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\updated" - RmDir /r /REBOOTOK "$INSTDIR\updated" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\defaults\shortcuts" - RmDir /r /REBOOTOK "$INSTDIR\defaults\shortcuts" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\distribution" - RmDir /r /REBOOTOK "$INSTDIR\distribution" - ${EndIf} - - ; Remove files that may be left behind by the application in the - ; VirtualStore directory. - ${un.CleanVirtualStore} - - ; Only unregister the dll if the registration points to this installation - ReadRegStr $R1 HKCR "CLSID\{0D68D6D0-D93D-4D08-A30D-F00DD1F45B24}\InProcServer32" "" - ${If} "$INSTDIR\AccessibleMarshal.dll" == "$R1" - ${UnregisterDLL} "$INSTDIR\AccessibleMarshal.dll" - ${EndIf} - - ${un.RemovePrecompleteEntries} "false" - - ${If} ${FileExists} "$INSTDIR\defaults\pref\channel-prefs.js" - Delete /REBOOTOK "$INSTDIR\defaults\pref\channel-prefs.js" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\defaults\pref" - RmDir /REBOOTOK "$INSTDIR\defaults\pref" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\defaults" - RmDir /REBOOTOK "$INSTDIR\defaults" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\uninstall" - ; Remove the uninstall directory that we control - RmDir /r /REBOOTOK "$INSTDIR\uninstall" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\install.log" - Delete /REBOOTOK "$INSTDIR\install.log" - ${EndIf} - ${If} ${FileExists} "$INSTDIR\update-settings.ini" - Delete /REBOOTOK "$INSTDIR\update-settings.ini" - ${EndIf} - - ; Explicitly remove empty webapprt dir in case it exists (bug 757978). - RmDir "$INSTDIR\webapprt\components" - RmDir "$INSTDIR\webapprt" - - ; Remove the installation directory if it is empty - RmDir "$INSTDIR" - - ; If PaleMoon.exe was successfully deleted yet we still need to restart to - ; remove other files create a dummy PaleMoon.exe.moz-delete to prevent the - ; installer from allowing an install without restart when it is required - ; to complete an uninstall. - ${If} ${RebootFlag} - ; Admin is required to delete files on reboot so only add the moz-delete if - ; the user is an admin. After calling UAC::IsAdmin $0 will equal 1 if the - ; user is an admin. - UAC::IsAdmin - ${If} "$0" == "1" - ${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}.moz-delete" - FileOpen $0 "$INSTDIR\${FileMainEXE}.moz-delete" w - FileWrite $0 "Will be deleted on restart" - Delete /REBOOTOK "$INSTDIR\${FileMainEXE}.moz-delete" - FileClose $0 - ${EndUnless} - ${EndIf} - ${EndIf} - - ; Refresh desktop icons otherwise the start menu internet item won't be - ; removed and other ugly things will happen like recreation of the app's - ; clients registry key by the OS under some conditions. - System::Call "shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i 0, i 0, i 0)" - - ; Users who uninstall then reinstall expecting PaleMoon to use a clean profile - ; may be surprised during first-run. This key is checked during startup of PaleMoon and - ; subsequently deleted after checking. If the value is found during startup - ; the browser will offer to Reset PaleMoon. We use the UpdateChannel to match - ; uninstalls of PaleMoon-release with reinstalls of PaleMoon-release, for example. - WriteRegStr HKCU "Software\${CompanyName}\${BrandShortName}" "Uninstalled-${UpdateChannel}" "True" - - ${un.IsFirewallSvcRunning} - Pop $0 - ${If} "$0" == "true" - liteFirewallW::RemoveRule "$INSTDIR\${FileMainEXE}" "${BrandShortName} ($INSTDIR)" - ${EndIf} -SectionEnd - -################################################################################ -# Language - -!insertmacro MOZ_MUI_LANGUAGE 'baseLocale' -!verbose push -!verbose 3 -!include "overrideLocale.nsh" -!include "customLocale.nsh" -!verbose pop - -; Set this after the locale files to override it if it is in the locale. Using -; " " for BrandingText will hide the "Nullsoft Install System..." branding. -BrandingText " " - -################################################################################ -# Page pre, show, and leave functions - -Function un.preWelcome - ${If} ${FileExists} "$INSTDIR\distribution\modern-wizard.bmp" - Delete "$PLUGINSDIR\modern-wizard.bmp" - CopyFiles /SILENT "$INSTDIR\distribution\modern-wizard.bmp" "$PLUGINSDIR\modern-wizard.bmp" - ${EndIf} -FunctionEnd - -Function un.leaveWelcome - ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" - Banner::show /NOUNLOAD "$(BANNER_CHECK_EXISTING)" - - ; If the message window has been found previously give the app an additional - ; five seconds to close. - ${If} "$TmpVal" == "FoundMessageWindow" - Sleep 5000 - ${EndIf} - - ${PushFilesToCheck} - - ${un.CheckForFilesInUse} $TmpVal - - Banner::destroy - - ; If there are files in use $TmpVal will be "true" - ${If} "$TmpVal" == "true" - ; If the message window is found the call to ManualCloseAppPrompt will - ; abort leaving the value of $TmpVal set to "FoundMessageWindow". - StrCpy $TmpVal "FoundMessageWindow" - ${un.ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_UNINSTALL)" - ; If the message window is not found set $TmpVal to "true" so the restart - ; required message is displayed. - StrCpy $TmpVal "true" - ${EndIf} - ${EndIf} -FunctionEnd - -Function un.preConfirm - ${If} ${FileExists} "$INSTDIR\distribution\modern-header.bmp" - ${AndIf} $hHeaderBitmap == "" - Delete "$PLUGINSDIR\modern-header.bmp" - CopyFiles /SILENT "$INSTDIR\distribution\modern-header.bmp" "$PLUGINSDIR\modern-header.bmp" - ${un.ChangeMUIHeaderImage} "$PLUGINSDIR\modern-header.bmp" - ${EndIf} - - ; Setup the unconfirm.ini file for the Custom Uninstall Confirm Page - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Settings" NumFields "3" - - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 1" Type "label" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 1" Text "$(UN_CONFIRM_UNINSTALLED_FROM)" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 1" Left "0" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 1" Right "-1" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 1" Top "5" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 1" Bottom "15" - - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 2" Type "text" - ; The contents of this control must be set as follows in the pre function - ; ${MUI_INSTALLOPTIONS_READ} $1 "unconfirm.ini" "Field 2" "HWND" - ; SendMessage $1 ${WM_SETTEXT} 0 "STR:$INSTDIR" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 2" State "" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 2" Left "0" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 2" Right "-1" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 2" Top "17" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 2" Bottom "30" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 2" flags "READONLY" - - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 3" Type "label" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 3" Text "$(UN_CONFIRM_CLICK)" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 3" Left "0" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 3" Right "-1" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 3" Top "130" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 3" Bottom "150" - - ${If} "$TmpVal" == "true" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 4" Type "label" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 4" Text "$(SUMMARY_REBOOT_REQUIRED_UNINSTALL)" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 4" Left "0" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 4" Right "-1" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 4" Top "35" - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Field 4" Bottom "45" - - WriteINIStr "$PLUGINSDIR\unconfirm.ini" "Settings" NumFields "4" - ${EndIf} - - !insertmacro MUI_HEADER_TEXT "$(UN_CONFIRM_PAGE_TITLE)" "$(UN_CONFIRM_PAGE_SUBTITLE)" - ; The Summary custom page has a textbox that will automatically receive - ; focus. This sets the focus to the Install button instead. - !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "unconfirm.ini" - GetDlgItem $0 $HWNDPARENT 1 - System::Call "user32::SetFocus(i r0, i 0x0007, i,i)i" - ${MUI_INSTALLOPTIONS_READ} $1 "unconfirm.ini" "Field 2" "HWND" - SendMessage $1 ${WM_SETTEXT} 0 "STR:$INSTDIR" - !insertmacro MUI_INSTALLOPTIONS_SHOW -FunctionEnd - -################################################################################ -# Initialization Functions - -Function .onInit - ; Remove the current exe directory from the search order. - ; This only effects LoadLibrary calls and not implicitly loaded DLLs. - System::Call 'kernel32::SetDllDirectoryW(w "")' - - ; We need this set up for most of the helper.exe operations. - ${UninstallOnInitCommon} -FunctionEnd - -Function un.onInit - ; Remove the current exe directory from the search order. - ; This only effects LoadLibrary calls and not implicitly loaded DLLs. - System::Call 'kernel32::SetDllDirectoryW(w "")' - - StrCpy $LANGUAGE 0 - - ${un.UninstallUnOnInitCommon} - -; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be -; removed after we require NSIS 3.0a2 or greater. -!ifndef NSIS_PACKEDVERSION - ${If} ${AtLeastWinVista} - System::Call 'user32::SetProcessDPIAware()' - ${EndIf} -!endif - - !insertmacro InitInstallOptionsFile "unconfirm.ini" -FunctionEnd - -Function .onGUIEnd - ${OnEndCommon} -FunctionEnd - -Function un.onGUIEnd - ${un.OnEndCommon} -FunctionEnd diff --git a/application/palemoon/installer/windows/nsis/updater_append.ini b/application/palemoon/installer/windows/nsis/updater_append.ini deleted file mode 100644 index af7742c12c..0000000000 --- a/application/palemoon/installer/windows/nsis/updater_append.ini +++ /dev/null @@ -1,12 +0,0 @@ - -; IMPORTANT: This file should always start with a newline in case a locale -; provided updater.ini does not end with a newline. -; Application to launch after an update has been successfully applied. This -; must be in the same directory or a sub-directory of the directory of the -; application executable that initiated the software update. -[PostUpdateWin] -; ExeRelPath is the path to the PostUpdateWin executable relative to the -; application executable. -ExeRelPath=uninstall\helper.exe -; ExeArg is the argument to pass to the PostUpdateWin exe -ExeArg=/PostUpdate diff --git a/application/palemoon/locales/Makefile.in b/application/palemoon/locales/Makefile.in deleted file mode 100644 index 897fa0bca3..0000000000 --- a/application/palemoon/locales/Makefile.in +++ /dev/null @@ -1,222 +0,0 @@ -# vim:set ts=8 sw=8 sts=8 noet: -# 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/. - -include $(topsrcdir)/config/config.mk - -vpath %.xml @srcdir@/en-US/searchplugins -vpath %.xml $(LOCALE_SRCDIR)/searchplugins - -ifdef LOCALE_MERGEDIR -vpath book%.inc $(LOCALE_MERGEDIR)/browser/profile -endif -vpath book%.inc $(LOCALE_SRCDIR)/profile -ifdef LOCALE_MERGEDIR -vpath book%.inc @srcdir@/en-US/profile -endif - - -SUBMAKEFILES += \ - $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \ - $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \ - $(NULL) - -# This makefile uses variable overrides from the libs-% target to -# build non-default locales to non-default dist/ locations. Be aware! - -PWD := $(CURDIR) - -# These are defaulted to be compatible with the files the wget-en-US target -# pulls. You may override them if you provide your own files. You _must_ -# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not -# work in that case. -ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE) -WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe -RETRIEVE_WINDOWS_INSTALLER = 1 - -MOZ_LANGPACK_EID=langpack-$(AB_CD)@palemoon.org - -L10N_PREF_JS_EXPORTS = $(call MERGE_FILE,palemoon-l10n.js) -L10N_PREF_JS_EXPORTS_PATH = $(FINAL_TARGET)/$(PREF_DIR) -L10N_PREF_JS_EXPORTS_FLAGS = $(PREF_PPFLAGS) --silence-missing-directive-warnings -PP_TARGETS += L10N_PREF_JS_EXPORTS - -ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT))) -MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore -MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png -MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns -MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ " -endif - -ifeq (WINNT,$(OS_ARCH)) -UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \ - $(NSINSTALL) -D $(STAGEDIST)/uninstall; \ - cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \ - $(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \ - cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \ - $(NULL) - -STUB_HOOK = $(NSINSTALL) -D "$(_ABS_DIST)/$(PKG_INST_PATH)"; \ - $(RM) "$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"; \ - cp ../installer/windows/l10ngen/stub.exe "$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"; \ - chmod 0755 "$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"; \ - $(NULL) -endif - -SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) -SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins -SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES)) -# Some locale-specific search plugins may have preprocessor directives, but the -# default en-US ones do not. -SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings -PP_TARGETS += SEARCHPLUGINS - -# Required for l10n.mk - defines a list of app sub dirs that should -# be included in langpack xpis. -DIST_SUBDIRS = $(DIST_SUBDIR) - -include $(topsrcdir)/config/rules.mk - -include $(topsrcdir)/toolkit/locales/l10n.mk - -$(STAGEDIST): $(DIST)/branding - -$(DIST)/branding: - $(NSINSTALL) -D $@ - -PROFILE_FILES = \ - localstore.rdf \ - mimeTypes.rdf \ - $(NULL) - -PROFILE_CHROME = userChrome-example.css userContent-example.css - -NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD)) - -%/defaults/profile/bookmarks.html: bookmarks.inc generic/profile/bookmarks.html.in - $(SYSINSTALL) -D $(dir $@) - $(call py_action,preprocessor,$< -DAB_CD=$(NO_JA_JP_MAC_AB_CD) $(srcdir)/generic/profile/bookmarks.html.in -o $@) - -libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ; - -libs:: $(addprefix generic/profile/,$(PROFILE_FILES)) - $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile - -libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME))) - $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome - -install:: $(DESTDIR)$(mozappdir)/defaults/profile/bookmarks.html ; - -install:: $(addprefix generic/profile/,$(PROFILE_FILES)) - $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile - -install:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME))) - $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile/chrome - -# metro build calls back here for search engine plugins -searchplugins: $(addprefix $(FINAL_TARGET)/searchplugins/,$(SEARCHPLUGINS)) -.PHONY: searchplugins - -libs-%: - $(NSINSTALL) -D $(DIST)/install - @$(MAKE) -C ../../../toolkit/locales libs-$* -ifdef MOZ_SERVICES_SYNC - @$(MAKE) -C ../../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* -endif - @$(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-$* - -repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe -repackage-win32-installer: $(call ESCAPE_WILDCARD,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD) - @echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)." - $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export - $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx - $(MAKE) repackage-zip \ - AB_CD=$(AB_CD) \ - MOZ_PKG_FORMAT=SFX7Z \ - ZIP_IN="$(WIN32_INSTALLER_IN)" \ - ZIP_OUT="$(WIN32_INSTALLER_OUT)" \ - SFX_HEADER="$(PWD)/../installer/windows/l10ngen/7zSD.sfx \ - $(topsrcdir)/browser/installer/windows/app.tag" - -ifeq (WINNT,$(OS_ARCH)) -repackage-win32-installer-%: $(STAGEDIST) - @$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN="$(WIN32_INSTALLER_IN)" - -repackage-zip-%: repackage-win32-installer-% -else -repackage-win32-installer-%: ; -endif - - -clobber-zip: - $(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \ - $(STAGEDIST)/chrome/$(AB_CD).manifest \ - $(STAGEDIST)/webapprt/chrome/$(AB_CD).jar \ - $(STAGEDIST)/webapprt/chrome/$(AB_CD).manifest \ - $(STAGEDIST)/$(PREF_DIR)/palemoon-l10n.js - $(RM) -rf $(STAGEDIST)/searchplugins \ - $(STAGEDIST)/dictionaries \ - $(STAGEDIST)/hyphenation \ - $(STAGEDIST)/defaults/profile \ - $(STAGEDIST)/chrome/$(AB_CD) \ - $(STAGEDIST)/webapprt/chrome/$(AB_CD) - - -langpack: langpack-$(AB_CD) - -# This is a generic target that will make a langpack, repack ZIP (+tarball) -# builds, and repack an installer if applicable. It is called from the -# tinderbox scripts. Alter it with caution. - -installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-% - @echo "repackaging done" - -ifdef MOZ_UPDATER -# Note that we want updater.ini to be in the top directory, not the browser/ -# subdirectory, because that's where the updater is installed and runs. -libs:: $(call MERGE_FILE,updater/updater.ini) $(call mkdir_deps,$(DIST)/bin) -ifeq ($(OS_ARCH),WINNT) - cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \ - sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \ - sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \ - $(FINAL_TARGET)/../updater.ini -else - cat $< | \ - sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \ - sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \ - $(FINAL_TARGET)/../updater.ini -endif -endif - -ident: - @printf "fx_revision " - @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \ - '$(STAGEDIST)'/application.ini App SourceStamp - @printf "buildid " - @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \ - '$(STAGEDIST)'/application.ini App BuildID - -merge-%: -ifdef LOCALE_MERGEDIR - $(RM) -rf $(LOCALE_MERGEDIR) - MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $* -endif - @echo - -# test target, depends on make package -# try to repack x-test, with just toolkit/defines.inc being there -l10n-check:: INNER_UNMAKE_PACKAGE=true -l10n-check:: - $(RM) -rf x-test - $(NSINSTALL) -D x-test/toolkit - echo "#define MOZ_LANG_TITLE Just testing" > x-test/toolkit/defines.inc - $(MAKE) installers-x-test L10NBASEDIR="$(PWD)" LOCALE_MERGEDIR="$(PWD)/mergedir" - $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/unpack.py $(DIST)/l10n-stage/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) - cd $(DIST)/l10n-stage && test $$(cat $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/update.locale) = x-test diff --git a/application/palemoon/locales/all-locales b/application/palemoon/locales/all-locales deleted file mode 100644 index 54b7b62541..0000000000 --- a/application/palemoon/locales/all-locales +++ /dev/null @@ -1,97 +0,0 @@ -ach -af -ak -an -ar -as -ast -be -bg -bn-BD -bn-IN -br -bs -ca -cs -csb -cy -da -de -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy-NL -ga-IE -gd -gl -gu-IN -he -hi-IN -hr -hu -hy-AM -id -is -it -ja -ja-JP-mac -ka -kk -km -kn -ko -ku -lg -lij -lt -lv -mai -mk -ml -mn -mr -ms -nb-NO -nl -nn-NO -nso -oc -or -pa-IN -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv-SE -sw -ta -ta-LK -te -th -tr -uk -ur -vi -wo -zh-CN -zh-TW -zu diff --git a/application/palemoon/locales/en-US/chrome/browser-region/region.properties b/application/palemoon/locales/en-US/chrome/browser-region/region.properties deleted file mode 100644 index 8782ae46fc..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser-region/region.properties +++ /dev/null @@ -1,38 +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/. - -# Default search engine -browser.search.defaultenginename=DuckDuckGo - -# Search engine order (order displayed in the search bar dropdown)s -browser.search.order.1=DuckDuckGo -browser.search.order.2=Yahoo -browser.search.order.3=Bing -browser.search.order.4=Ecosia - -# This is the default set of web based feed handlers shown in the reader -# selection UI -browser.contentHandlers.types.0.title=My Yahoo! -browser.contentHandlers.types.0.uri=https://add.my.yahoo.com/rss?url=%s - -# increment this number when anything gets changed in the list below. This will -# cause Firefox to re-read these prefs and inject any new handlers into the -# profile database. Note that "new" is defined as "has a different URL"; this -# means that it's not possible to update the name of existing handler, so -# don't make any spelling errors here. -gecko.handlerService.defaultHandlersVersion=5 - -# The default set of protocol handlers for mailto: -gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail -gecko.handlerService.schemes.mailto.0.uriTemplate=https://compose.mail.yahoo.com/?To=%s -gecko.handlerService.schemes.mailto.1.name=Gmail -gecko.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s - -# The default set of protocol handlers for irc: -gecko.handlerService.schemes.irc.0.name=Mibbit -gecko.handlerService.schemes.irc.0.uriTemplate=https://www.mibbit.com/?url=%s - -# The default set of protocol handlers for ircs: -gecko.handlerService.schemes.ircs.0.name=Mibbit -gecko.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutCertError.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutCertError.dtd deleted file mode 100644 index 21c722c72d..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/aboutCertError.dtd +++ /dev/null @@ -1,40 +0,0 @@ - - - - %brandDTD; - - - - - - - -#1, but we can't confirm that your connection is secure."> - - - - - - - -Even if you trust the site, this error could mean that someone is -tampering with your connection."> - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutDialog.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutDialog.dtd deleted file mode 100644 index 26bf3cda39..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/aboutDialog.dtd +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutHome.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutHome.dtd deleted file mode 100644 index d3bd85fc80..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/aboutHome.dtd +++ /dev/null @@ -1,26 +0,0 @@ - - - -%brandDTD; -#ifdef MOZ_SERVICES_SYNC - -%syncBrandDTD; -#endif - - - - - - - - - - - - - -#ifdef MOZ_SERVICES_SYNC - -#endif \ No newline at end of file diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutPrivateBrowsing.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutPrivateBrowsing.dtd deleted file mode 100644 index ef885d0bb0..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/aboutPrivateBrowsing.dtd +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutRobots.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutRobots.dtd deleted file mode 100644 index 139603d8d3..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/aboutRobots.dtd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutSessionRestore.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutSessionRestore.dtd deleted file mode 100644 index f81fffc940..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/aboutSessionRestore.dtd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutSyncTabs.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutSyncTabs.dtd deleted file mode 100644 index 5865c12317..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/aboutSyncTabs.dtd +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd b/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd deleted file mode 100644 index dd88a3384c..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.dtd b/application/palemoon/locales/en-US/chrome/browser/browser.dtd deleted file mode 100644 index c3999e1976..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/browser.dtd +++ /dev/null @@ -1,612 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#ifdef MOZ_SERVICES_SYNC - - - - - - - - - - -#endif - - - - - - - - - -#ifdef MOZ_WEBRTC - - -#endif - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.properties b/application/palemoon/locales/en-US/chrome/browser/browser.properties deleted file mode 100644 index 66ce34d468..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/browser.properties +++ /dev/null @@ -1,426 +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/. - -nv_timeout=Timed Out -openFile=Open File - -droponhometitle=Set Home Page -droponhomemsg=Do you want this document to be your new home page? -droponhomemsgMultiple=Do you want these documents to be your new home pages? - -# context menu strings - -# LOCALIZATION NOTE (contextMenuSearch): %1$S is the search engine, -# %2$S is the selection string. -contextMenuSearch=Search %1$S for "%2$S" -contextMenuSearch.accesskey=S - -# bookmark dialog strings - -bookmarkAllTabsDefault=[Folder Name] - -xpinstallPromptWarning=%S prevented this site (%S) from asking you to install software on your computer. -xpinstallPromptAllowButton=Allow - -xpinstallPromptWarningOrigin=This add-on could not be downloaded because its origin could not be verified. -# Accessibility Note: -# Be sure you do not choose an accesskey that is used elsewhere in the active context (e.g. main menu bar, submenu of the warning popup button) -# See http://www.mozilla.org/access/keyboard/accesskey for details -xpinstallPromptAllowButton.accesskey=A -xpinstallDisabledMessageLocked=Software installation has been disabled by your system administrator. -xpinstallDisabledMessage=Software installation is currently disabled. Click Enable and try again. -xpinstallDisabledButton=Enable -xpinstallDisabledButton.accesskey=n - -# LOCALIZATION NOTE (addonDownloading, addonDownloadCancelled, addonDownloadRestart): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# Also see https://bugzilla.mozilla.org/show_bug.cgi?id=570012 for mockups -addonDownloading=Add-on downloading;Add-ons downloading -addonDownloadCancelled=Add-on download cancelled.;Add-on downloads cancelled. -addonDownloadRestart=Restart Download;Restart Downloads -addonDownloadRestart.accessKey=R -addonDownloadCancelTooltip=Cancel - -# LOCALIZATION NOTE (addonsInstalled, addonsInstalledNeedsRestart): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 first add-on's name, #2 number of add-ons, #3 application name -addonsInstalled=#1 has been installed successfully.;#2 add-ons have been installed successfully. -addonsInstalledNeedsRestart=#1 will be installed after you restart #3.;#2 add-ons will be installed after you restart #3. -addonInstallRestartButton=Restart Now -addonInstallRestartButton.accesskey=R - -# LOCALIZATION NOTE (addonError-1, addonError-2, addonError-3, addonError-4): -# #1 is the add-on name, #2 is the host name, #3 is the application name -# #4 is the application version -addonError-1=The add-on could not be downloaded because of a connection failure on #2. -addonError-2=The add-on from #2 could not be installed because it does not match the add-on #3 expected. -addonError-3=The add-on downloaded from #2 could not be installed because it appears to be corrupt. -addonError-4=#1 could not be installed because #3 cannot modify the needed file. -addonError-8=The add-on downloaded from #2 could not be installed because #3 does not support Jetpack (SDK) extensions. -addonError-9=The add-on downloaded from #2 could not be installed because #3 does not support WebExtensions. - -# LOCALIZATION NOTE (addonLocalError-1, addonLocalError-2, addonLocalError-3, addonLocalError-4, addonErrorIncompatible, addonErrorBlocklisted): -# #1 is the add-on name, #3 is the application name, #4 is the application version -addonLocalError-1=This add-on could not be installed because of a filesystem error. -addonLocalError-2=This add-on could not be installed because it does not match the add-on #3 expected. -addonLocalError-3=This add-on could not be installed because it appears to be corrupt. -addonLocalError-4=#1 could not be installed because #3 cannot modify the needed file. -addonLocalError-8=This add-on could not be installed because #3 does not support Jetpack (SDK) extensions. -addonLocalError-9=This add-on could not be installed because #3 does not support WebExtensions. -addonErrorIncompatible=#1 could not be installed because it is not compatible with #3 #4. -addonErrorBlocklisted=#1 could not be installed because it has a high risk of causing stability or security problems. - - -# LOCALIZATION NOTE (lwthemeInstallRequest.message): %S will be replaced with -# the host name of the site. -lwthemeInstallRequest.message=This site (%S) attempted to install a theme. -lwthemeInstallRequest.allowButton=Allow -lwthemeInstallRequest.allowButton.accesskey=a - -lwthemePostInstallNotification.message=A new theme has been installed. -lwthemePostInstallNotification.undoButton=Undo -lwthemePostInstallNotification.undoButton.accesskey=U -lwthemePostInstallNotification.manageButton=Manage Themes… -lwthemePostInstallNotification.manageButton.accesskey=M - -# LOCALIZATION NOTE (lwthemeNeedsRestart.message): -# %S will be replaced with the new theme name. -lwthemeNeedsRestart.message=%S will be installed after you restart. -lwthemeNeedsRestart.button=Restart Now -lwthemeNeedsRestart.accesskey=R - -# LOCALIZATION NOTE (popupWarning.message): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is brandShortName and #2 is the number of pop-ups blocked. -popupWarning.message=#1 prevented this site from opening a pop-up window.;#1 prevented this site from opening #2 pop-up windows. -popupWarningButton=Preferences -popupWarningButton.accesskey=P -popupAllow=Allow pop-ups for %S -popupBlock=Block pop-ups for %S -popupWarningDontShowFromMessage=Don't show this message when pop-ups are blocked -popupWarningDontShowFromLocationbar=Don't show info bar when pop-ups are blocked -popupShowPopupPrefix=Show '%S' - -crashedpluginsMessage.title=The %S plugin has crashed. -crashedpluginsMessage.reloadButton.label=Reload page -crashedpluginsMessage.reloadButton.accesskey=R -crashedpluginsMessage.submitButton.label=Submit a crash report -crashedpluginsMessage.submitButton.accesskey=S -crashedpluginsMessage.learnMore=Learn More… - -## Plugin doorhanger strings -# LOCALIZATION NOTE (pluginActivateNew.message): Used for newly-installed -# plugins which are not known to be unsafe. %1$S is the plugin name and %2$S -# is the site domain. -pluginActivateNew.message=Allow %2$S to run "%1$S"? -pluginActivateMultiple.message=Allow %S to run plugins? -pluginActivate.learnMore=Learn More… -# LOCALIZATION NOTE (pluginActivateOutdated.message, pluginActivateOutdated.label): -# These strings are used when an unsafe plugin has an update available. -# %1$S is the plugin name, %2$S is the domain, and %3$S is brandShortName. -pluginActivateOutdated.message=%3$S has prevented the outdated plugin "%1$S" from running on %2$S. -pluginActivateOutdated.label=Outdated plugin -pluginActivate.updateLabel=Update now… -# LOCALIZATION NOTE (pluginActivateVulnerable.message, pluginActivateVulnerable.label): -# These strings are used when an unsafe plugin has no update available. -# %1$S is the plugin name, %2$S is the domain, and %3$S is brandShortName. -pluginActivateVulnerable.message=%3$S has prevented the unsafe plugin "%1$S" from running on %2$S. -pluginActivateVulnerable.label=Vulnerable plugin! -pluginActivate.riskLabel=What's the risk? -# LOCALIZATION NOTE (pluginActivateBlocked.message): %1$S is the plugin name, %2$S is brandShortName -pluginActivateBlocked.message=%2$S has blocked "%1$S" for your protection. -pluginActivateBlocked.label=Blocked for your protection -pluginActivateDisabled.message="%S" is disabled. -pluginActivateDisabled.label=Disabled -pluginActivateDisabled.manage=Manage plugins… -pluginEnabled.message="%S" is enabled on %S. -pluginEnabledOutdated.message=Outdated plugin "%S" is enabled on %S. -pluginEnabledVulnerable.message=Insecure plugin "%S" is enabled on %S. -pluginInfo.unknownPlugin=Unknown - -# LOCALIZATION NOTE (pluginActivateNow.label, pluginActivateAlways.label, pluginBlockNow.label): These should be the same as the matching strings in browser.dtd -# LOCALIZATION NOTE (pluginActivateNow.label): This button will enable the -# plugin in the current session for an short time (about an hour), auto-renewed -# if the site keeps using the plugin. -pluginActivateNow.label=Allow Now -pluginActivateNow.accesskey=N -# LOCALIZATION NOTE (pluginActivateAlways.label): This button will enable the -# plugin for a long while (90 days), auto-renewed if the site keeps using the -# plugin. -pluginActivateAlways.label=Allow and Remember -pluginActivateAlways.accesskey=R -pluginBlockNow.label=Block Plugin -pluginBlockNow.accesskey=B -pluginContinue.label=Continue Allowing -pluginContinue.accesskey=C - -# in-page UI -PluginClickToActivate=Activate %S. -PluginVulnerableUpdatable=This plugin is vulnerable and should be updated. -PluginVulnerableNoUpdate=This plugin has security vulnerabilities. - -# Sanitize -# LOCALIZATION NOTE (sanitizeDialog2.everything.title): When "Time range to -# clear" is set to "Everything", the Clear Recent History dialog's title is -# changed to this. See UI mockup and comment 11 at bug 480169 --> -sanitizeDialog2.everything.title=Clear All History -sanitizeButtonOK=Clear Now -# LOCALIZATION NOTE (sanitizeButtonClearing): The label for the default -# button between the user clicking it and the window closing. Indicates the -# items are being cleared. -sanitizeButtonClearing=Clearing - -# LOCALIZATION NOTE (sanitizeEverythingWarning2): Warning that appears when -# "Time range to clear" is set to "Everything" in Clear Recent History dialog, -# provided that the user has not modified the default set of history items to clear. -sanitizeEverythingWarning2=All history will be cleared. -# LOCALIZATION NOTE (sanitizeSelectedWarning): Warning that appears when -# "Time range to clear" is set to "Everything" in Clear Recent History dialog, -# provided that the user has modified the default set of history items to clear. -sanitizeSelectedWarning=All selected items will be cleared. - -# Check for Updates in the About Dialog - button labels and accesskeys -# LOCALIZATION NOTE - all of the following update buttons labels will only be -# displayed one at a time. So, if a button is displayed nothing else will -# be displayed alongside of the button. The button when displayed is located -# directly under the Firefox version in the about dialog (see bug 596813 for -# screenshots). -update.checkInsideButton.label=Check for Updates -update.checkInsideButton.accesskey=C -update.resumeButton.label=Resume Downloading %S… -update.resumeButton.accesskey=D -update.openUpdateUI.applyButton.label=Update available! Apply Update… -update.openUpdateUI.applyButton.accesskey=A -update.restart.updateButton.label=Restart to Update -update.restart.updateButton.accesskey=R -update.openUpdateUI.upgradeButton.label=Update available! Upgrade Now… -update.openUpdateUI.upgradeButton.accesskey=U -update.restart.upgradeButton.label=Upgrade Now -update.restart.upgradeButton.accesskey=U - -# Check for Updates in the Help Menu -# LOCALIZATION NOTE (updatesItem_*): these are alternative labels for Check for Update item in Help menu. -# Which one is used depends on Update process state. -updatesItem_default=Check for Updates… -updatesItem_defaultFallback=Check for Updates… -updatesItem_default.accesskey=C -updatesItem_downloading=Downloading %S… -updatesItem_downloadingFallback=Downloading Update… -updatesItem_downloading.accesskey=D -updatesItem_resume=Resume Downloading %S… -updatesItem_resumeFallback=Resume Downloading Update… -updatesItem_resume.accesskey=D -updatesItem_pending=Apply Downloaded Update Now… -updatesItem_pendingFallback=Apply Downloaded Update Now… -updatesItem_pending.accesskey=D - -# RSS Pretty Print -feedShowFeedNew=Subscribe to '%S'… - -menuOpenAllInTabs.label=Open All in Tabs - -# History menu -menuRestoreAllTabs.label=Restore All Tabs -# LOCALIZATION NOTE (menuRestoreAllWindows, menuUndoCloseWindowLabel, menuUndoCloseWindowSingleTabLabel): -# see bug 394759 -menuRestoreAllWindows.label=Restore All Windows -# LOCALIZATION NOTE (menuUndoCloseWindowLabel): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 Window Title, #2 Number of tabs -menuUndoCloseWindowLabel=#1 (and #2 other tab);#1 (and #2 other tabs) -menuUndoCloseWindowSingleTabLabel=#1 - -# Unified Back-/Forward Popup -tabHistory.current=Stay on this page -tabHistory.goBack=Go back to this page -tabHistory.goForward=Go forward to this page - -# URL Bar -urlbar.placeholder=Search or enter address -urlbar.placeholderURLOnly=Enter address -pasteAndGo.label=Paste & Go - -# Block autorefresh -refreshBlocked.goButton=Allow -refreshBlocked.goButton.accesskey=A -refreshBlocked.refreshLabel=%S prevented this page from automatically reloading. -refreshBlocked.redirectLabel=%S prevented this page from automatically redirecting to another page. - -# Star button -starButtonOn.tooltip=Edit this bookmark -starButtonOff.tooltip=Bookmark this page - -# Offline web applications -offlineApps.available=This website (%S) is asking to store data on your computer for offline use. -offlineApps.allow=Allow -offlineApps.allowAccessKey=A -offlineApps.never=Never for This Site -offlineApps.neverAccessKey=e -offlineApps.notNow=Not Now -offlineApps.notNowAccessKey=N - -offlineApps.usage=This website (%S) is now storing more than %SMB of data on your computer for offline use. -offlineApps.manageUsage=Show settings -offlineApps.manageUsageAccessKey=S - -# LOCALIZATION NOTE (indexedDB.usage): %1$S is the website host name -# %2$S a number of megabytes. -indexedDB.usage=This website (%1$S) is attempting to store more than %2$S MB of data on your computer for offline use. - -identity.identified.verifier=Verified by: %S -identity.identified.verified_by_you=You have added a security exception for this site. -identity.identified.state_and_country=%S, %S - -identity.encrypted=Your connection to this website is encrypted to prevent eavesdropping. -identity.unencrypted=Your connection to this website is not encrypted. -identity.mixed_content=Your connection to this site is only partially encrypted, and does not prevent eavesdropping. - -identity.unknown.tooltip=This website does not supply identity information. - -identity.padlock.ev=Extended Validated -identity.padlock.high=Secure -identity.padlock.mixed=Mixed content -identity.padlock.low=Weak security -identity.padlock.broken=Not secure - -identity.ownerUnknown2=(unknown) - -# Edit Bookmark UI -editBookmarkPanel.pageBookmarkedTitle=Page Bookmarked -editBookmarkPanel.pageBookmarkedDescription=%S will always remember this page for you. -editBookmarkPanel.bookmarkedRemovedTitle=Bookmark Removed -editBookmarkPanel.editBookmarkTitle=Edit This Bookmark - -# LOCALIZATION NOTE (editBookmark.removeBookmarks.label): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# Replacement for #1 is the number of bookmarks to be removed. -# If this causes problems with localization you can also do "Remove Bookmarks (#1)" -# instead of "Remove #1 Bookmarks". -editBookmark.removeBookmarks.label=Remove Bookmark;Remove #1 Bookmarks - -# Post Update Notifications -pu.notifyButton.label=Details… -pu.notifyButton.accesskey=D -# LOCALIZATION NOTE %S will be replaced by the short name of the application. -puNotifyText=%S has been updated -puAlertTitle=%S Updated -puAlertText=Click here for details - -# Geolocation UI - -# LOCALIZATION NOTE (geolocation.shareLocation geolocation.alwaysShareLocation geolocation.neverShareLocation): -#If you're having trouble with the word Share, please use Allow and Block in your language. -geolocation.shareLocation=Share Location -geolocation.shareLocation.accesskey=a -geolocation.alwaysShareLocation=Always Share Location -geolocation.alwaysShareLocation.accesskey=A -geolocation.neverShareLocation=Never Share Location -geolocation.neverShareLocation.accesskey=N -geolocation.shareWithSite=Would you like to share your location with %S? -geolocation.shareWithFile=Would you like to share your location with the file %S? - -webNotifications.showForSession=Show for this session -webNotifications.showForSession.accesskey=s -webNotifications.alwaysShow=Always Show Notifications -webNotifications.alwaysShow.accesskey=A -webNotifications.neverShow=Always Block Notifications -webNotifications.neverShow.accesskey=N -webNotifications.showFromSite=Would you like to show notifications from %S? -# LOCALIZATION NOTE (webNotifications.upgradeTitle): When using native notifications on OS X, the title may be truncated around 32 characters. -webNotifications.upgradeTitle=Upgraded notifications -# LOCALIZATION NOTE (webNotifications.upgradeBody): When using native notifications on OS X, the body may be truncated around 100 characters in some views. -webNotifications.upgradeBody=You can now receive notifications from sites that are not currently loaded. Click to learn more. - -# Pointer lock UI - -pointerLock.allow2=Hide pointer -pointerLock.allow2.accesskey=H -pointerLock.alwaysAllow=Always allow hiding -pointerLock.alwaysAllow.accesskey=A -pointerLock.neverAllow=Never allow hiding -pointerLock.neverAllow.accesskey=N -pointerLock.title2=Would you like to allow the pointer to be hidden on %S? -pointerLock.autoLock.title2=%S will hide the pointer. - -# Ctrl-Tab -# LOCALIZATION NOTE (ctrlTab.showAll.label): #1 represents the number -# of tabs in the current browser window. It will always be 2 at least. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -ctrlTab.showAll.label=;Show all #1 tabs - -# LOCALIZATION NOTE (addKeywordTitleAutoFill): %S will be replaced by the page's title -# Used as the bookmark name when saving a keyword for a search field. -addKeywordTitleAutoFill=Search %S - -extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name=Default -extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description=The default theme. - -# safeModeRestart -safeModeRestartPromptTitle=Restart in Safe Mode -safeModeRestartPromptMessage=Are you sure you want to restart in Safe Mode? -safeModeRestartButton=Restart - -# LOCALIZATION NOTE - %S is brandShortName -# restart -restartPromptTitle=Restart -restartPromptMessage=Are you sure you want to restart %S? -restartButton=Restart - -# LOCALIZATION NOTE (browser.menu.showCharacterEncoding): Set to the string -# "true" (spelled and capitalized exactly that way) to show the "Character -# Encoding" menu in the main Firefox button on Windows. Any other value will -# hide it. Regardless of the value of this setting, the "Character Encoding" -# menu will always be accessible via the "Web Developer" menu. -# This is not a string to translate; it just controls whether the menu shows -# up in the Firefox button. If users frequently use the "Character Encoding" -# menu, set this to "true". Otherwise, you can leave it as "false". -browser.menu.showCharacterEncoding=false - -# Mozilla data reporting notification (Telemetry, Firefox Health Report, etc) -dataReportingNotification.message = %1$S automatically sends some data to %2$S so that we can improve your experience. -dataReportingNotification.button.label = Choose What I Share -dataReportingNotification.button.accessKey = C - -# LOCALIZATION NOTE (fullscreen.entered): displayed when we enter HTML5 fullscreen mode, %S is the domain name of the focused website (e.g. mozilla.com). -fullscreen.entered=%S is now fullscreen. - -# LOCALIZATION NOTE (getUserMedia.shareCamera.message, getUserMedia.shareMicrophone.message, getUserMedia.shareCameraAndMicrophone.message): %S is the website origin (e.g. www.mozilla.org) -# LOCALIZATION NOTE (getUserMedia.shareSelectedDevices.label): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# The number of devices can be either one or two. -getUserMedia.shareCamera.message = Would you like to share your camera with %S? -getUserMedia.shareMicrophone.message = Would you like to share your microphone with %S? -getUserMedia.shareCameraAndMicrophone.message = Would you like to share your camera and microphone with %S? -getUserMedia.noVideo.label = No Video -getUserMedia.noAudio.label = No Audio -getUserMedia.shareSelectedDevices.label = Share Selected Device;Share Selected Devices -getUserMedia.shareSelectedDevices.accesskey = S -getUserMedia.denyRequest.label = Don't Share -getUserMedia.denyRequest.accesskey = D -getUserMedia.sharingCamera.message2 = You are currently sharing your camera with this page. -getUserMedia.sharingMicrophone.message2 = You are currently sharing your microphone with this page. -getUserMedia.sharingCameraAndMicrophone.message2 = You are currently sharing your camera and microphone with this page. - -# Mixed Content Blocker Doorhanger Notification -# LOCALIZATION NOTE - %S is brandShortName -mixedContentBlocked.message = %S has blocked content that isn't secure. -mixedContentBlocked.keepBlockingButton.label = Keep Blocking -mixedContentBlocked.keepBlockingButton.accesskey = B -mixedContentBlocked.unblock.label = Disable Protection on This Page -mixedContentBlocked.unblock.accesskey = D - -# LOCALIZATION NOTE - %S is brandShortName -slowStartup.message = %S seems slow… to… start. -slowStartup.helpButton.label = Learn How to Speed It Up -slowStartup.helpButton.accesskey = L -slowStartup.disableNotificationButton.label = Don't Tell Me Again -slowStartup.disableNotificationButton.accesskey = A - -muteTab.label = Mute Tab -muteTab.accesskey = M -unmuteTab.label = Unmute Tab -unmuteTab.accesskey = M \ No newline at end of file diff --git a/application/palemoon/locales/en-US/chrome/browser/charsetMenu.dtd b/application/palemoon/locales/en-US/chrome/browser/charsetMenu.dtd deleted file mode 100644 index 5600f9b198..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/charsetMenu.dtd +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/charsetMenu.properties b/application/palemoon/locales/en-US/chrome/browser/charsetMenu.properties deleted file mode 100644 index 2ea92a641d..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/charsetMenu.properties +++ /dev/null @@ -1,103 +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/. - -# LOCALIZATION NOTE: The property keys ending with ".key" are for access keys. -# Localizations may add or delete properties where the property key ends with -# ".key" as appropriate for the localization. The code that uses this data can -# deal with the absence of an access key for an item. -# -# Make sure the keys defined here don't collide with -# charsetMenuAutodet.accesskey in charsetMenu.dtd. -# -# In the en-US version of this file, access keys are given to the following: -# * UTF-8 -# * All encodings that are the fallback encoding for some locale in Firefox -# * All encodings that are the fallback encoding for some locale in IE -# * All Japanese encodings -# -# For the items whose property key does not end in ".key" and whose value -# includes "(" U+0028 LEFT PARENTHESIS, the "(" character is significant for -# processing by CharsetMenu.jsm. If your localization does not use ASCII -# parentheses where en-US does in this file, please file a bug to make -# CharsetMenu.jsm also recognize the delimiter your localization uses. -# (When this code was developed, all localizations appeared to use -# U+0028 LEFT PARENTHESIS for this purpose.) - -# Globally-relevant -UTF-8.key = U -UTF-8 = Unicode -windows-1252.key = W -windows-1252 = Western - -# Arabic -windows-1256.key = A -windows-1256 = Arabic (Windows) -ISO-8859-6 = Arabic (ISO) - -# Baltic -windows-1257.key = B -windows-1257 = Baltic (Windows) -ISO-8859-4 = Baltic (ISO) - -# Central European -windows-1250.key = E -windows-1250 = Central European (Windows) -ISO-8859-2.key = l -ISO-8859-2 = Central European (ISO) - -# Chinese, Simplified -gbk.key = S -gbk = Chinese, Simplified (GBK) -gb18030 = Chinese, Simplified (GB18030) - -# Chinese, Traditional -Big5.key = T -Big5 = Chinese, Traditional - -# Cyrillic -windows-1251.key = C -windows-1251 = Cyrillic (Windows) -ISO-8859-5 = Cyrillic (ISO) -KOI8-R = Cyrillic (KOI8-R) -KOI8-U = Cyrillic (KOI8-U) -IBM866 = Cyrillic (DOS) - -# Greek -windows-1253.key = G -windows-1253 = Greek (Windows) -ISO-8859-7.key = O -ISO-8859-7 = Greek (ISO) - -# Hebrew -windows-1255.key = H -windows-1255 = Hebrew -# LOCALIZATION NOTE (ISO-8859-8): The value for this item should begin with -# the same word for Hebrew as the value for windows-1255 so that this item -# sorts right after that one in the collation order for your locale. -ISO-8859-8 = Hebrew, Visual - -# Japanese -Shift_JIS.key = J -Shift_JIS = Japanese (Shift_JIS) -EUC-JP.key = p -EUC-JP = Japanese (EUC-JP) -ISO-2022-JP.key = n -ISO-2022-JP = Japanese (ISO-2022-JP) - -# Korean -EUC-KR.key = K -EUC-KR = Korean - -# Thai -windows-874.key = i -windows-874 = Thai - -# Turkish -windows-1254.key = r -windows-1254 = Turkish - -# Vietnamese -windows-1258.key = V -windows-1258 = Vietnamese - diff --git a/application/palemoon/locales/en-US/chrome/browser/charsetOverlay.dtd b/application/palemoon/locales/en-US/chrome/browser/charsetOverlay.dtd deleted file mode 100644 index 11ee98b0c2..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/charsetOverlay.dtd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/downloads/downloads.dtd b/application/palemoon/locales/en-US/chrome/browser/downloads/downloads.dtd deleted file mode 100644 index feabcc8696..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/downloads/downloads.dtd +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/downloads/downloads.properties b/application/palemoon/locales/en-US/chrome/browser/downloads/downloads.properties deleted file mode 100644 index 44d9ec90e4..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/downloads/downloads.properties +++ /dev/null @@ -1,78 +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/. - -# LOCALIZATION NOTE (stateStarting): -# Indicates that the download is starting. -stateStarting=Starting… -# LOCALIZATION NOTE (stateScanning): -# Indicates that an external program is scanning the download for viruses. -stateScanning=Scanning for viruses… -# LOCALIZATION NOTE (stateFailed): -# Indicates that the download failed because of an error. -stateFailed=Failed -# LOCALIZATION NOTE (statePaused): -# Indicates that the download was paused by the user. -statePaused=Paused -# LOCALIZATION NOTE (stateCanceled): -# Indicates that the download was canceled by the user. -stateCanceled=Canceled -# LOCALIZATION NOTE (stateBlockedParentalControls): -# Indicates that the download was blocked by the Parental Controls feature of -# Windows. "Parental Controls" should be consistently named and capitalized -# with the display of this feature in Windows. The following article can -# provide a reference for the translation of "Parental Controls" in various -# languages: -# http://windows.microsoft.com/en-US/windows-vista/Set-up-Parental-Controls -stateBlockedParentalControls=Blocked by Parental Controls -# LOCALIZATION NOTE (stateBlockedPolicy): -# Indicates that the download was blocked on Windows because of the "Launching -# applications and unsafe files" setting of the "security zone" associated with -# the target site. "Security zone" should be consistently named and capitalized -# with the display of this feature in Windows. The following article can -# provide a reference for the translation of "security zone" in various -# languages: -# http://support.microsoft.com/kb/174360 -stateBlockedPolicy=Blocked by your security zone policy -# LOCALIZATION NOTE (stateDirty): -# Indicates that the download was blocked after scanning. -stateDirty=Blocked: May contain a virus or spyware - -# LOCALIZATION NOTE (sizeWithUnits): -# %1$S is replaced with the size number, and %2$S with the measurement unit. -sizeWithUnits=%1$S %2$S -sizeUnknown=Unknown size - -# LOCALIZATION NOTE (shortTimeLeftSeconds, shortTimeLeftMinutes, -# shortTimeLeftHours, shortTimeLeftDays): -# These values are displayed in the downloads indicator in the main browser -# window, where space is available for three characters maximum. %1$S is -# replaced with the time left for the given measurement unit. Even for days, -# the value is never longer than two digits. -shortTimeLeftSeconds=%1$Ss -shortTimeLeftMinutes=%1$Sm -shortTimeLeftHours=%1$Sh -shortTimeLeftDays=%1$Sd - -# LOCALIZATION NOTE (statusSeparator, statusSeparatorBeforeNumber): -# These strings define templates for the separation of different elements in the -# status line of a download item. As a separator, by default we use the Unicode -# character U+2014 'EM DASH' (long dash). Examples of status lines include -# "Canceled - 222.net", "1.1 MB - website2.com", or "Paused - 1.1 MB". Note -# that we use a wider space after the separator when it is followed by a number, -# just to avoid visually confusing it with with a minus sign with some fonts. -# If you use a different separator, this might not be necessary. However, there -# is usually no need to change the separator or the order of the substitutions, -# even for right-to-left languages, unless the defaults are not suitable. -statusSeparator=%1$S \u2014 %2$S -statusSeparatorBeforeNumber=%1$S \u2014 %2$S - -fileExecutableSecurityWarning="%S" is an executable file. Executable files may contain viruses or other malicious code that could harm your computer. Use caution when opening this file. Are you sure you want to launch "%S"? -fileExecutableSecurityWarningTitle=Open Executable File? - -# LOCALIZATION NOTE (otherDownloads2): -# This is displayed in an item at the bottom of the Downloads Panel when -# there are more downloads than can fit in the list in the panel. Use a -# semi-colon list of plural forms. -# See: http://developer.mozilla.org/en/Localization_and_Plurals -otherDownloads2=+ %1$S other download; + %1$S other downloads diff --git a/application/palemoon/locales/en-US/chrome/browser/engineManager.dtd b/application/palemoon/locales/en-US/chrome/browser/engineManager.dtd deleted file mode 100644 index 8ad9772057..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/engineManager.dtd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/engineManager.properties b/application/palemoon/locales/en-US/chrome/browser/engineManager.properties deleted file mode 100644 index 040a4caf3c..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/engineManager.properties +++ /dev/null @@ -1,9 +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/. - -editTitle=Edit Keyword -editMsg=Enter a new keyword for "%S": -duplicateTitle=Duplicate Keyword -duplicateEngineMsg=You have chosen a keyword that is currently in use by "%S". Please select another. -duplicateBookmarkMsg=You have chosen a keyword that is currently in use by a bookmark. Please select another. diff --git a/application/palemoon/locales/en-US/chrome/browser/feeds/subscribe.dtd b/application/palemoon/locales/en-US/chrome/browser/feeds/subscribe.dtd deleted file mode 100644 index 9e124196dc..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/feeds/subscribe.dtd +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/feeds/subscribe.properties b/application/palemoon/locales/en-US/chrome/browser/feeds/subscribe.properties deleted file mode 100644 index 27cf505bb7..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/feeds/subscribe.properties +++ /dev/null @@ -1,53 +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/. - -linkTitleTextFormat=Go to %S -addHandler=Add "%S" (%S) as a Feed Reader? -addHandlerAddButton=Add Feed Reader -addHandlerAddButtonAccesskey=A -handlerRegistered="%S" is already registered as a Feed Reader -liveBookmarks=Live Bookmarks -subscribeNow=Subscribe Now -chooseApplicationMenuItem=Choose Application… -chooseApplicationDialogTitle=Choose Application -alwaysUse=Always use %S to subscribe to feeds -mediaLabel=Media files - -# LOCALIZATION NOTE: The next string is for the size of the enclosed media. -# e.g. enclosureSizeText : "50.23 MB" -# %1$S = size (in bytes or megabytes, ...) -# %2$S = unit of measure (bytes, KB, MB, ...) -enclosureSizeText=%1$S %2$S - -bytes=bytes -kilobyte=KB -megabyte=MB -gigabyte=GB - -# LOCALIZATION NOTE: The next three strings explains to the user what they're -# doing. -# e.g. alwaysUseForVideoPodcasts : "Always use Miro to subscribe to video podcasts." -# %S = application to use (Miro, iTunes, ...) -alwaysUseForFeeds=Always use %S to subscribe to feeds. -alwaysUseForAudioPodcasts=Always use %S to subscribe to podcasts. -alwaysUseForVideoPodcasts=Always use %S to subscribe to video podcasts. - -subscribeFeedUsing=Subscribe to this feed using -subscribeAudioPodcastUsing=Subscribe to this podcast using -subscribeVideoPodcastUsing=Subscribe to this video podcast using - -feedSubscriptionFeed1=This is a "feed" of frequently changing content on this site. -feedSubscriptionAudioPodcast1=This is a "podcast" of frequently changing content on this site. -feedSubscriptionVideoPodcast1=This is a "video podcast" of frequently changing content on this site. - -feedSubscriptionFeed2=You can subscribe to this feed to receive updates when this content changes. -feedSubscriptionAudioPodcast2=You can subscribe to this podcast to receive updates when this content changes. -feedSubscriptionVideoPodcast2=You can subscribe to this video podcast to receive updates when this content changes. - -# Protocol Handling -# "Add %appName (%appDomain) as an application for %protocolType links?" -addProtocolHandler=Add %S (%S) as an application for %S links? -addProtocolHandlerAddButton=Add Application -# "%appName has already been added as an application for %protocolType links." -protocolHandlerRegistered=%S has already been added as an application for %S links. diff --git a/application/palemoon/locales/en-US/chrome/browser/newTab.dtd b/application/palemoon/locales/en-US/chrome/browser/newTab.dtd deleted file mode 100644 index 5853557ef6..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/newTab.dtd +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/newTab.properties b/application/palemoon/locales/en-US/chrome/browser/newTab.properties deleted file mode 100644 index 922aa58475..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/newTab.properties +++ /dev/null @@ -1,7 +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/. - -newtab.pin=Pin this site at its current position -newtab.unpin=Unpin this site -newtab.block=Remove this site diff --git a/application/palemoon/locales/en-US/chrome/browser/openLocation.dtd b/application/palemoon/locales/en-US/chrome/browser/openLocation.dtd deleted file mode 100644 index 240989220c..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/openLocation.dtd +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/openLocation.properties b/application/palemoon/locales/en-US/chrome/browser/openLocation.properties deleted file mode 100644 index 2d08ff8063..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/openLocation.properties +++ /dev/null @@ -1,5 +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/. - -chooseFileDialogTitle=Choose File diff --git a/application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd b/application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd deleted file mode 100644 index 50382a11a0..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/pageInfo.properties b/application/palemoon/locales/en-US/chrome/browser/pageInfo.properties deleted file mode 100644 index a99741eacf..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/pageInfo.properties +++ /dev/null @@ -1,56 +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/. - -pageInfo.page.title=Page Info - %S -pageInfo.frame.title=Frame Info - %S - -noPageTitle=Untitled Page: -pageTitle=%S: -unknown=Unknown -notset=Not specified -yes=Yes -no=No - -mediaImg=Image -mediaVideo=Video -mediaAudio=Audio -mediaBGImg=Background -mediaBorderImg=Border -mediaListImg=Bullet -mediaCursor=Cursor -mediaObject=Object -mediaEmbed=Embed -mediaLink=Icon -mediaInput=Input -mediaFileSize=%S KB -mediaSize=%Spx \u00D7 %Spx -mediaSelectFolder=Select a Folder to Save the Images -mediaBlockImage=Block Images from %S -mediaUnknownNotCached=Unknown (not cached) -mediaImageType=%S Image -mediaAnimatedImageType=%S Image (animated, %S frames) -mediaDimensions=%Spx \u00D7 %Spx -mediaDimensionsScaled=%Spx \u00D7 %Spx (scaled to %Spx \u00D7 %Spx) - -generalQuirksMode=Quirks mode -generalStrictMode=Standards compliance mode -generalSize=%S KB (%S bytes) -generalMetaTag=Meta (1 tag) -generalMetaTags=Meta (%S tags) -generalSiteIdentity=This website is owned by %S\nThis has been verified by %S - -feedRss=RSS -feedAtom=Atom -feedXML=XML - -securityNoOwner=This website does not supply ownership information. -securityOneVisit=Yes, once -securityNVisits=Yes, %S times - -# LOCALIZATION NOTE: The next string is for the disk usage of the -# database -# e.g. indexedDBUsage : "50.23 MB" -# %1$S = size (in bytes or megabytes, ...) -# %2$S = unit of measure (bytes, KB, MB, ...) -indexedDBUsage=This website is using %1$S %2$S diff --git a/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd b/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd deleted file mode 100644 index 4b4fac9ff3..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd +++ /dev/null @@ -1,15 +0,0 @@ - - - - -landscape changed as time went on: flowing, twisting, corrupting. The dull sheen of tainted metal shining through everywhere.
-In the trees, roots, animals, and even the mountainous valleys that had always been an oasis of difference.
-Still, our dragon continued, untainted and resolute, soaring above.
-There would be a home yet, a sanctuary, a place for all those not given in to this singular invading force that was misshaping the world.'> - -The Chronicles of the Pale Moon, 66:1'> diff --git a/application/palemoon/locales/en-US/chrome/browser/permissions/aboutPermissions.dtd b/application/palemoon/locales/en-US/chrome/browser/permissions/aboutPermissions.dtd deleted file mode 100644 index 5b220a7f0c..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/permissions/aboutPermissions.dtd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/permissions/aboutPermissions.properties b/application/palemoon/locales/en-US/chrome/browser/permissions/aboutPermissions.properties deleted file mode 100644 index ca90a6cfb6..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/permissions/aboutPermissions.properties +++ /dev/null @@ -1,14 +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/. - -# LOCALIZATION NOTE (visitCount): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the number of history visits for a site -visitCount=#1 visit;#1 visits - -# LOCALIZATION NOTE (passwordsCount, cookiesCount): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -passwordsCount=#1 password is stored for this website.;#1 passwords are stored for this website. -cookiesCount=#1 cookie is set for this website.;#1 cookies are set for this website. -pluginBlocklisted=This plugin poses a security risk and cannot be set to Allow for all sites. diff --git a/application/palemoon/locales/en-US/chrome/browser/places/bookmarkProperties.properties b/application/palemoon/locales/en-US/chrome/browser/places/bookmarkProperties.properties deleted file mode 100644 index 9bcbe78fd8..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/places/bookmarkProperties.properties +++ /dev/null @@ -1,19 +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/. - -dialogAcceptLabelAddItem=Add -dialogAcceptLabelSaveItem=Save -dialogAcceptLabelAddLivemark=Subscribe -dialogAcceptLabelAddMulti=Add Bookmarks -dialogAcceptLabelEdit=Save -dialogTitleAddBookmark=New Bookmark -dialogTitleAddLivemark=Subscribe with Live Bookmark -dialogTitleAddFolder=New Folder -dialogTitleAddMulti=New Bookmarks -dialogTitleEdit=Properties for "%S" - -bookmarkAllTabsDefault=[Folder Name] -newFolderDefault=New Folder -newBookmarkDefault=New Bookmark -newLivemarkDefault=New Live Bookmark diff --git a/application/palemoon/locales/en-US/chrome/browser/places/editBookmarkOverlay.dtd b/application/palemoon/locales/en-US/chrome/browser/places/editBookmarkOverlay.dtd deleted file mode 100644 index d78c355c24..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/places/editBookmarkOverlay.dtd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/places/moveBookmarks.dtd b/application/palemoon/locales/en-US/chrome/browser/places/moveBookmarks.dtd deleted file mode 100644 index 9f28b80984..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/places/moveBookmarks.dtd +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/places/places.dtd b/application/palemoon/locales/en-US/chrome/browser/places/places.dtd deleted file mode 100644 index 9578754d24..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/places/places.dtd +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - Z Sort Order"> - - A Sort Order"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/places/places.properties b/application/palemoon/locales/en-US/chrome/browser/places/places.properties deleted file mode 100644 index 5b16ccb307..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/places/places.properties +++ /dev/null @@ -1,95 +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/. - -load-js-data-url-error=For security reasons, javascript or data urls cannot be loaded from the history window or sidebar. -noTitle=(no title) - -bookmarksMenuEmptyFolder=(Empty) - -bookmarksBackupTitle=Bookmarks backup filename - -bookmarksRestoreAlertTitle=Revert Bookmarks -bookmarksRestoreAlert=This will replace all of your current bookmarks with the backup. Are you sure? -bookmarksRestoreTitle=Select a bookmarks backup -bookmarksRestoreFilterName=JSON - -bookmarksRestoreFormatError=Unsupported file type. -bookmarksRestoreParseError=Unable to process the backup file. - -bookmarksLivemarkLoading=Live Bookmark loading… -bookmarksLivemarkFailed=Live Bookmark feed failed to load. - -menuOpenLivemarkOrigin.label=Open "%S" - -sortByName=Sort '%S' by Name -sortByNameGeneric=Sort by Name -view.sortBy.name.label=Sort by Name -view.sortBy.name.accesskey=N -view.sortBy.url.label=Sort by Location -view.sortBy.url.accesskey=L -view.sortBy.date.label=Sort by Visit Date -view.sortBy.date.accesskey=V -view.sortBy.visitCount.label=Sort by Visit Count -view.sortBy.visitCount.accesskey=C -view.sortBy.keyword.label=Sort by Keyword -view.sortBy.keyword.accesskey=K -view.sortBy.description.label=Sort by Description -view.sortBy.description.accesskey=D -view.sortBy.dateAdded.label=Sort by Added -view.sortBy.dateAdded.accesskey=e -view.sortBy.lastModified.label=Sort by Last Modified -view.sortBy.lastModified.accesskey=M -view.sortBy.tags.label=Sort by Tags -view.sortBy.tags.accesskey=T - -searchBookmarks=Search Bookmarks -searchHistory=Search History -searchDownloads=Search Downloads -searchCurrentDefault=Search in '%S' - -tabs.openWarningTitle=Confirm open -tabs.openWarningMultipleBranded=You are about to open %S tabs. This might slow down %S while the pages are loading. Are you sure you want to continue? -tabs.openButtonMultiple=Open tabs -tabs.openWarningPromptMeBranded=Warn me when opening multiple tabs might slow down %S - -SelectImport=Import Bookmarks File -EnterExport=Export Bookmarks File - -saveSearch.title=Save Search -saveSearch.inputLabel=Name: -saveSearch.inputDefaultText=New Search - -detailsPane.noItems=No items -# LOCALIZATION NOTE (detailsPane.itemsCountLabel): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 number of items -# example: 111 items -detailsPane.itemsCountLabel=One item;#1 items - -mostVisitedTitle=Most Visited -recentlyBookmarkedTitle=Recently Bookmarked -recentTagsTitle=Recent Tags - -OrganizerQueryHistory=History -OrganizerQueryDownloads=Downloads -OrganizerQueryAllBookmarks=All Bookmarks -OrganizerQueryTags=Tags - -# LOCALIZATION NOTE (tagResultLabel) : -# Noun used to describe the location bar autocomplete result type -# to users with screen readers -# See createResultLabel() in urlbarBindings.xml -tagResultLabel=Tag -# LOCALIZATION NOTE (bookmarkResultLabel) : -# Noun used to describe the location bar autocomplete result type -# to users with screen readers -# See createResultLabel() in urlbarBindings.xml -bookmarkResultLabel=Bookmark - -# LOCALIZATION NOTE (lockPrompt.text) -# %S will be replaced with the application name. -lockPrompt.title=Browser Startup Error -lockPrompt.text=The bookmarks and history system will not be functional because one of %S's files is in use by another application. Some security software can cause this problem. -lockPromptInfoButton.label=Learn More -lockPromptInfoButton.accessKey=L diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/advanced.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/advanced.dtd deleted file mode 100644 index 32f6babf3e..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/advanced.dtd +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/applicationManager.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/applicationManager.dtd deleted file mode 100644 index d2c76e63d7..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/applicationManager.dtd +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/applicationManager.properties b/application/palemoon/locales/en-US/chrome/browser/preferences/applicationManager.properties deleted file mode 100644 index 335363a662..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/applicationManager.properties +++ /dev/null @@ -1,14 +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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=The following applications can be used to handle %S. - -handleProtocol=%S links -handleWebFeeds=Web Feeds -handleFile=%S content - -descriptionWebApp=This web application is hosted at: -descriptionLocalApp=This application is located at: diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/applications.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/applications.dtd deleted file mode 100644 index ea89c31244..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/applications.dtd +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/colors.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/colors.dtd deleted file mode 100644 index ba14b86e01..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/colors.dtd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/connection.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/connection.dtd deleted file mode 100644 index f74fbf578b..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/connection.dtd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/content.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/content.dtd deleted file mode 100644 index 8c1908f4d2..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/content.dtd +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#ifdef MOZ_FMP4 - -#endif - -#ifdef MOZ_AV1 - -#endif - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/cookies.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/cookies.dtd deleted file mode 100644 index c83331328e..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/cookies.dtd +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/fonts.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/fonts.dtd deleted file mode 100644 index f255cb201a..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/fonts.dtd +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/languages.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/languages.dtd deleted file mode 100644 index f7e67c9534..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/languages.dtd +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/main.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/main.dtd deleted file mode 100644 index ed73df206a..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/main.dtd +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/permissions.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/permissions.dtd deleted file mode 100644 index e61228b76d..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/permissions.dtd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/preferences.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/preferences.dtd deleted file mode 100644 index e87749d596..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/preferences.dtd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/preferences.properties b/application/palemoon/locales/en-US/chrome/browser/preferences/preferences.properties deleted file mode 100644 index 34f1675867..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/preferences.properties +++ /dev/null @@ -1,153 +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/. - -#### Fonts - -labelDefaultFont=Default (%S) - -#### Permissions Manager - -cookiepermissionstext=You can specify which websites are always or never allowed to use cookies or store site data. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow. -cookiepermissionstitle=Exceptions - Cookies and Site Data -addonspermissionstext=You can specify which websites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow. -addons_permissions_title=Allowed Sites - Add-ons Installation -popuppermissionstext=You can specify which websites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow. -popuppermissionstitle=Allowed Sites - Pop-ups -invalidURI=Please enter a valid hostname -invalidURITitle=Invalid Hostname Entered -savedLoginsExceptions_title=Exceptions - Saved Logins -savedLoginsExceptions_desc=Logins for the following sites will not be saved: - -#### Master Password - -pw_change2empty_in_fips_mode=You are currently in FIPS mode. FIPS requires a non-empty Master Password. -pw_change_failed_title=Password Change Failed - -#### Fonts - -# LOCALIZATION NOTE: Next two strings are for language name representations with -# and without the region. -# e.g. languageRegionCodeFormat : "French/Canada [fr-ca]" languageCodeFormat : "French [fr]" -# %1$S = language name, %2$S = region name, %3$S = language-region code -languageRegionCodeFormat=%1$S/%2$S [%3$S] -# %1$S = language name, %2$S = language-region code -languageCodeFormat=%1$S [%2$S] - -#### Downloads - -desktopFolderName=Desktop -downloadsFolderName=Downloads -chooseDownloadFolderTitle=Choose Download Folder: - -#### Applications - -fileEnding=%S file -saveFile=Save File - -# LOCALIZATION NOTE (useApp, useDefault): %S = Application name -useApp=Use %S -useDefault=Use %S (default) - -useOtherApp=Use other… -fpTitleChooseApp=Select Helper Application -manageApp=Application Details… -webFeed=Web Feed -videoPodcastFeed=Video Podcast -audioPodcastFeed=Podcast -alwaysAsk=Always ask -portableDocumentFormat=Portable Document Format (PDF) - -# LOCALIZATION NOTE (usePluginIn): -# %1$S = plugin name (for example "QuickTime Plugin-in 7.2") -# %2$S = brandShortName from brand.properties (for example "Minefield") -usePluginIn=Use %S (in %S) - -# LOCALIZATION NOTE (previewInApp, addLiveBookmarksInApp): %S = brandShortName -previewInApp=Preview in %S -addLiveBookmarksInApp=Add Live Bookmarks in %S - -# LOCALIZATION NOTE (typeDescriptionWithType): -# %1$S = type description (for example "Portable Document Format") -# %2$S = type (for example "application/pdf") -typeDescriptionWithType=%S (%S) - - -#### Cookie Viewer - -hostColon=Host: -domainColon=Domain: -forSecureOnly=Encrypted connections only -forAnyConnection=Any type of connection -expireAtEndOfSession=At end of session -can=Allow -canAccessFirstParty=Allow first party only -canSession=Allow for Session -cannot=Block -noCookieSelected= -cookiesAll=The following cookies are stored on your computer: -cookiesFiltered=The following cookies match your search: - -# LOCALIZATION NOTE (removeAllCookies, removeAllShownCookies): -# removeAllCookies and removeAllShownCookies are both used on the same one button, -# never displayed together and can share the same accesskey. -# When only partial cookies are shown as a result of keyword search, -# removeAllShownCookies is displayed as button label. -# removeAllCookies is displayed when no keyword search and all cookies are shown. -removeAllCookies.label=Remove All -removeAllCookies.accesskey=A -removeAllShownCookies.label=Remove All Shown -removeAllShownCookies.accesskey=A - -# LOCALIZATION NOTE (removeSelectedCookies): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# If you need to display the number of selected elements in your language, -# you can use #1 in your localization as a placeholder for the number. -# For example this is the English string with numbers: -# removeSelectedCookied=Remove #1 Selected;Remove #1 Selected -removeSelectedCookies.label=Remove Selected;Remove Selected -removeSelectedCookies.accesskey=R - -#### Offline apps -offlineAppRemoveTitle=Remove offline website data -offlineAppRemovePrompt=After removing this data, %S will not be available offline. Are you sure you want to remove this offline website? -offlineAppRemoveConfirm=Remove offline data - -# LOCALIZATION NOTE: The next string is for the disk usage of the -# offline application -# e.g. offlineAppUsage : "50.23 MB" -# %1$S = size (in bytes or megabytes, ...) -# %2$S = unit of measure (bytes, KB, MB, ...) -offlineAppUsage=%1$S %2$S - -offlinepermissionstext=The following websites are not allowed to store data for offline use: -offlinepermissionstitle=Offline Data - -####Preferences::Advanced::Network -#LOCALIZATION NOTE: The next string is for the disk usage of the web content cache. -# e.g., "Your web content cache is currently using 200 MB" -# %1$S = size -# %2$S = unit (MB, KB, etc.) -actualDiskCacheSize=Your web content cache is currently using %1$S %2$S of disk space - -####Preferences::Advanced::Network -#LOCALIZATION NOTE: The next string is for the disk usage of the application cache. -# e.g., "Your application cache is currently using 200 MB" -# %1$S = size -# %2$S = unit (MB, KB, etc.) -actualAppCacheSize=Your application cache is currently using %1$S %2$S of disk space - -###Preferences::Advanced::Update -#LOCALIZATION NOTE: The next string is for updating in Windows 8 only instead of updateAuto1.label. %S = brandShortName -updateAutoDesktop.label=Automatically install updates from desktop %S -updateAutoDesktop.accessKey=A - -syncUnlink.title=Do you want to unlink your device? -syncUnlink.label=This device will no longer be associated with your Sync account. All of your personal data, both on this device and in your Sync account, will remain intact. -syncUnlinkConfirm.label=Unlink - -# LOCALIZATION NOTE (featureEnableRequiresRestart, featureDisableRequiresRestart, restartTitle): %S = brandShortName -featureEnableRequiresRestart=%S must restart to enable this feature. -featureDisableRequiresRestart=%S must restart to disable this feature. -shouldRestartTitle=Restart %S diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/privacy.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/privacy.dtd deleted file mode 100644 index 19e4a22452..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/privacy.dtd +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/security.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/security.dtd deleted file mode 100644 index c18ed600a8..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/security.dtd +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/selectBookmark.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/selectBookmark.dtd deleted file mode 100644 index a6082862ad..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/selectBookmark.dtd +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/sync.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/sync.dtd deleted file mode 100644 index f6ef3b8765..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/sync.dtd +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/tabs.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/tabs.dtd deleted file mode 100644 index 0f3c0d2594..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/tabs.dtd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/quitDialog.properties b/application/palemoon/locales/en-US/chrome/browser/quitDialog.properties deleted file mode 100644 index 00f3be5fdd..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/quitDialog.properties +++ /dev/null @@ -1,13 +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/. - -quitDialogTitle=Quit %S - -quitTitle=&Quit -cancelTitle=&Cancel -saveTitle=&Save and Quit -neverAsk2=&Do not ask next time -message=Do you want %S to save your tabs and windows for the next time it starts? -messageNoWindows=Do you want %S to save your tabs for the next time it starts? -messagePrivate=You're in private browsing mode. Quitting %S now will discard all your open tabs and windows. diff --git a/application/palemoon/locales/en-US/chrome/browser/safeMode.dtd b/application/palemoon/locales/en-US/chrome/browser/safeMode.dtd deleted file mode 100644 index 79d3ca87c6..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/safeMode.dtd +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/sanitize.dtd b/application/palemoon/locales/en-US/chrome/browser/sanitize.dtd deleted file mode 100644 index b8c07d5b8a..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/sanitize.dtd +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/search.properties b/application/palemoon/locales/en-US/chrome/browser/search.properties deleted file mode 100644 index 130eb725c1..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/search.properties +++ /dev/null @@ -1,18 +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/. - -searchtip=Search using %S - -# LOCALIZATION NOTE (cmd_pasteAndSearch): "Search" is a verb, this is the -# search bar equivalent to the url bar's "Paste & Go" -cmd_pasteAndSearch=Paste & Search - -cmd_clearHistory=Clear Search History -cmd_clearHistory_accesskey=H - -cmd_showSuggestions=Show Suggestions -cmd_showSuggestions_accesskey=S - -cmd_addFoundEngine=Add "%S" - diff --git a/application/palemoon/locales/en-US/chrome/browser/setDesktopBackground.dtd b/application/palemoon/locales/en-US/chrome/browser/setDesktopBackground.dtd deleted file mode 100644 index 71aa4b6491..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/setDesktopBackground.dtd +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/shellservice.properties b/application/palemoon/locales/en-US/chrome/browser/shellservice.properties deleted file mode 100644 index 534da1a010..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/shellservice.properties +++ /dev/null @@ -1,15 +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/. - -optionsLabel=%S &Options -safeModeLabel=%S &Safe Mode -setDefaultBrowserTitle=Default Browser -setDefaultBrowserMessage=%S is not currently set as your default browser. Would you like to make it your default browser? -setDefaultBrowserDontAsk=Always perform this check when starting %S. -alreadyDefaultBrowser=%S is already set as your default browser. -PortablemodeTitle=Portable Mode -PortablemodeMessage=By pressing Yes you switch %S into standart non-portable mode, and browser will quit. -desktopBackgroundLeafNameWin=Desktop Background.bmp -DesktopBackgroundDownloading=Saving Picture… -DesktopBackgroundSet=Set Desktop Background diff --git a/application/palemoon/locales/en-US/chrome/browser/statusbar/meta.properties b/application/palemoon/locales/en-US/chrome/browser/statusbar/meta.properties deleted file mode 100644 index 24cb5c0922..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/statusbar/meta.properties +++ /dev/null @@ -1,9 +0,0 @@ -# Translator names. If there is more than one, separate with commas. Only include your name, not the locale you're translating. -translator=Moonchild - -# Extension title. This usually should not be translated. -name=Status-4-Evar - -# Extension description. This is displayed in the add-on manager. -description=Status widgets and progress indicators for Firefox 4+ - diff --git a/application/palemoon/locales/en-US/chrome/browser/statusbar/overlay.properties b/application/palemoon/locales/en-US/chrome/browser/statusbar/overlay.properties deleted file mode 100644 index cda1f6621d..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/statusbar/overlay.properties +++ /dev/null @@ -1,17 +0,0 @@ -# The #1 gets replaced with the number of active downloads. This is a semicolon list of plural forms: http://developer.mozilla.org/en/docs/Localization_and_Plurals -activeDownloads=1 Active Download;#1 Active Downloads -# The #1 gets replaced with the number of paused downloads. This is a semicolon list of plural forms: http://developer.mozilla.org/en/docs/Localization_and_Plurals -pausedDownloads=1 Paused Download;#1 Paused Downloads - -noDownloads=No Downloads - -# Page load progress strings. These should match the strings that Firefox has been using. -nv_done=Done -nv_stopped=Stopped -nv_timeout=Timed Out - -# Should be the same as status4evar.status.widget.title -statusText=Status Text - -legacyWidgetTitle=Legacy Status Bar - diff --git a/application/palemoon/locales/en-US/chrome/browser/statusbar/prefs.properties b/application/palemoon/locales/en-US/chrome/browser/statusbar/prefs.properties deleted file mode 100644 index 69f8f926f0..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/statusbar/prefs.properties +++ /dev/null @@ -1,4 +0,0 @@ -simpleEditorTitle=Switch to simple editor -simpleEditorMessage=The simple editor can not edit your current style. Do you want to discard your style? -imageSelectTitle=Select an image file - diff --git a/application/palemoon/locales/en-US/chrome/browser/statusbar/statusbar-overlay.dtd b/application/palemoon/locales/en-US/chrome/browser/statusbar/statusbar-overlay.dtd deleted file mode 100644 index d0c42120a8..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/statusbar/statusbar-overlay.dtd +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/statusbar/statusbar-prefs.dtd b/application/palemoon/locales/en-US/chrome/browser/statusbar/statusbar-prefs.dtd deleted file mode 100644 index 6a050e7f97..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/statusbar/statusbar-prefs.dtd +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/syncBrand.dtd b/application/palemoon/locales/en-US/chrome/browser/syncBrand.dtd deleted file mode 100644 index bc4d1b3e0e..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncBrand.dtd +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/syncGenericChange.properties b/application/palemoon/locales/en-US/chrome/browser/syncGenericChange.properties deleted file mode 100644 index aea86ad0e4..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncGenericChange.properties +++ /dev/null @@ -1,37 +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/. - -#LOCALIZATION NOTE (change.password.title): This (and associated change.password/passphrase) are used when the user elects to change their password. -change.password.title = Change your Password -change.password.acceptButton = Change Password -change.password.status.active = Changing your password… -change.password.status.success = Your password has been changed. -change.password.status.error = There was an error changing your password. - -change.password3.introText = Your password must be at least 8 characters long. It cannot be the same as either your user name or your Recovery Key. -change.password.warningText = Note: All of your other devices will be unable to connect to your account once you change this password. - -change.recoverykey.title = My Recovery Key -change.recoverykey.acceptButton = Change Recovery Key -change.recoverykey.label = Changing Recovery Key and uploading local data, please wait… -change.recoverykey.error = There was an error while changing your Recovery Key! -change.recoverykey.success = Your Recovery Key was successfully changed! - -change.synckey.introText2 = To ensure your total privacy, all of your data is encrypted prior to being uploaded. The key to decrypt your data is not uploaded. -# LOCALIZATION NOTE (change.recoverykey.warningText) "Sync" should match &syncBrand.shortName.label; from syncBrand.dtd -change.recoverykey.warningText = Note: Changing this will erase all data stored on the Sync server and upload new data secured by this Recovery Key. Your other devices will not sync until the new Recovery Key is entered for that device. - -new.recoverykey.label = Your Recovery Key - -# LOCALIZATION NOTE (new.password.title): This (and associated new.password/passphrase) are used on a second computer when it detects that your password or passphrase has been changed on a different device. -new.password.title = Update Password -new.password.introText = Your password was rejected by the server, please update your password. -new.password.label = Enter your new password -new.password.confirm = Confirm your new password -new.password.acceptButton = Update Password -new.password.status.incorrect = Password incorrect, please try again. - -new.recoverykey.title = Update Recovery Key -new.recoverykey.introText = Your Recovery Key was changed using another device, please enter your updated Recovery Key. -new.recoverykey.acceptButton = Update Recovery Key diff --git a/application/palemoon/locales/en-US/chrome/browser/syncKey.dtd b/application/palemoon/locales/en-US/chrome/browser/syncKey.dtd deleted file mode 100644 index f37f2c92e1..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncKey.dtd +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/syncProgress.dtd b/application/palemoon/locales/en-US/chrome/browser/syncProgress.dtd deleted file mode 100644 index db45cb935d..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncProgress.dtd +++ /dev/null @@ -1,15 +0,0 @@ - - - - %brandDTD; - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/syncQuota.dtd b/application/palemoon/locales/en-US/chrome/browser/syncQuota.dtd deleted file mode 100644 index 71174f087e..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncQuota.dtd +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/syncQuota.properties b/application/palemoon/locales/en-US/chrome/browser/syncQuota.properties deleted file mode 100644 index 0e1b857cab..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncQuota.properties +++ /dev/null @@ -1,42 +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/. - -collection.addons.label = Add-ons -collection.bookmarks.label = Bookmarks -collection.history.label = History -collection.passwords.label = Passwords -collection.prefs.label = Preferences -collection.tabs.label = Tabs - -# LOCALIZATION NOTE (quota.usageNoQuota.label): %1$S and %2$S are numeric value -# and unit (as defined in the download manager) of the amount of space occupied -# on the server -quota.usageNoQuota.label = You are currently using %1$S %2$S. -# LOCALIZATION NOTE (quota.usagePercentage.label): -# %1$S is the percentage of space used, -# %2$S and %3$S numeric value and unit (as defined in the download manager) -# of the amount of space used, -# %3$S and %4$S numeric value and unit (as defined in the download manager) -# of the total space available. -quota.usagePercentage.label = You are using %1$S%% (%2$S %3$S) of your allowed %4$S %5$S. -quota.usageError.label = Could not retrieve quota information. -quota.retrieving.label = Retrieving… -# LOCALIZATION NOTE (quota.sizeValueUnit.label): %1$S is the amount of space -# occupied by the engine, %2$K the corresponding unit (e.g. kB) as defined in -# the download manager. -quota.sizeValueUnit.label = %1$S %2$S -quota.remove.label = Remove -quota.treeCaption.label = Uncheck items to stop syncing them and free up space on the server. -# LOCALIZATION NOTE (quota.removal.label): %S is a list of engines that will be -# disabled and whose data will be removed once the user confirms. -quota.removal.label = Sync will remove the following data: %S. -# LOCALIZATION NOTE (quota.list.separator): This is the separator string used -# for the list of engines (incl. spaces where appropriate) -quota.list.separator = ,\u0020 -# LOCALIZATION NOTE (quota.freeup.label): %1$S and %2$S are numeric value -# and unit (as defined in the download manager) of the amount of space freed -# up by disabling the unchecked engines. If displayed this string is -# concatenated directly to quota.removal.label and may need to start off with -# whitespace. -quota.freeup.label = \u0020This will free up %1$S %2$S. diff --git a/application/palemoon/locales/en-US/chrome/browser/syncSetup.dtd b/application/palemoon/locales/en-US/chrome/browser/syncSetup.dtd deleted file mode 100644 index 7ee938e5d6..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncSetup.dtd +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/syncSetup.properties b/application/palemoon/locales/en-US/chrome/browser/syncSetup.properties deleted file mode 100644 index 8a5170adb0..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/syncSetup.properties +++ /dev/null @@ -1,51 +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/. - -button.syncOptions.label = Sync Options -button.syncOptionsDone.label = Done -button.syncOptionsCancel.label = Cancel - -invalidEmail.label = Invalid email address -serverInvalid.label = Please enter a valid server URL -usernameNotAvailable.label = Already in use - -verifying.label = Verifying… - -# LOCALIZATION NOTE (additionalClientCount.label): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the number of additional clients (was %S for a short while, use #1 instead, even if both work) -additionalClientCount.label = and #1 additional device;and #1 additional devices -# LOCALIZATION NOTE (bookmarksCount.label): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the number of bookmarks (was %S for a short while, use #1 instead, even if both work) -bookmarksCount.label = #1 bookmark;#1 bookmarks -# LOCALIZATION NOTE (historyDaysCount.label): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the number of days (was %S for a short while, use #1 instead, even if both work) -historyDaysCount.label = #1 day of history;#1 days of history -# LOCALIZATION NOTE (passwordsCount.label): -# Semicolon-separated list of plural forms. See: -# http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the number of passwords (was %S for a short while, use #1 instead, even if both work) -passwordsCount.label = #1 password;#1 passwords -# LOCALIZATION NOTE (addonsCount.label): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the number of add-ons, see the link above for forms -addonsCount.label = #1 addon;#1 addons - -save.recoverykey.title = Save Recovery Key -save.recoverykey.defaultfilename = Pale Moon Recovery Key.html - -newAccount.action.label = Sync is now set up to automatically sync all of your browser data. -newAccount.change.label = You can choose exactly what to sync by selecting Sync Options below. -resetClient.change2.label = Sync will now merge all this device's browser data into your Sync account. -wipeClient.change2.label = Sync will now replace all of the browser data on this device with the data in your Sync account. -wipeRemote.change2.label = Sync will now replace all of the browser data in your Sync account with the data on this device. -existingAccount.change.label = You can change this preference by selecting Sync Options below. - -# Several other strings are used (via Weave.Status.login), but they come from -# /services/sync diff --git a/application/palemoon/locales/en-US/chrome/browser/tabbrowser.dtd b/application/palemoon/locales/en-US/chrome/browser/tabbrowser.dtd deleted file mode 100644 index 6741ff8303..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/tabbrowser.dtd +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties b/application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties deleted file mode 100644 index a4a0be0a0b..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/tabbrowser.properties +++ /dev/null @@ -1,30 +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/. - -# LOCALIZATION NOTE: the following strings can be used in the tab title or -# location bar to represent various states as a web page loads: -# tabs.connecting = Firefox is sending a HTTP connection request -# tabs.encryptingConnection = Firefox is sending a HTTPS connection request -# tabs.searching = Firefox is searching for something (Awesomebar or Web search) -# tabs.loading = Firefox is loading the web page -# tabs.waiting = Firefox is waiting for a web resource to load -# tabs.downloading = Firefox is downloading a file for a helper application (PDF) -tabs.connecting=Connecting… -tabs.encryptingConnection=Securing connection… -tabs.searching=Searching… -tabs.loading=Loading… -tabs.waiting=Waiting… -tabs.downloading=Downloading… - -tabs.emptyTabTitle=New Tab -tabs.closeTab=Close Tab -tabs.close=Close -tabs.closeWarningTitle=Confirm close -tabs.closeWarningMultipleTabs=You are about to close %S tabs. Are you sure you want to continue? -tabs.closeButtonMultiple=Close tabs -tabs.closeWarningPromptMe=Warn me when I attempt to close multiple tabs - -tabs.muteAudio.tooltip=Mute tab -tabs.unmuteAudio.tooltip=Unmute tab -tabs.unblockAudio.tooltip=Play tab diff --git a/application/palemoon/locales/en-US/chrome/browser/taskbar.properties b/application/palemoon/locales/en-US/chrome/browser/taskbar.properties deleted file mode 100644 index 987d5ccf84..0000000000 --- a/application/palemoon/locales/en-US/chrome/browser/taskbar.properties +++ /dev/null @@ -1,12 +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/. - -taskbar.tasks.newTab.label=Open new tab -taskbar.tasks.newTab.description=Open a new browser tab. -taskbar.tasks.newWindow.label=Open new window -taskbar.tasks.newWindow.description=Open a new browser window. -taskbar.tasks.newPrivateWindow.label=New private window -taskbar.tasks.newPrivateWindow.description=Open a new window in private browsing mode. -taskbar.frequent.label=Frequent -taskbar.recent.label=Recent diff --git a/application/palemoon/locales/en-US/chrome/overrides/appstrings.properties b/application/palemoon/locales/en-US/chrome/overrides/appstrings.properties deleted file mode 100644 index 50e06075ef..0000000000 --- a/application/palemoon/locales/en-US/chrome/overrides/appstrings.properties +++ /dev/null @@ -1,37 +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/. - -malformedURI=The URL is not valid and cannot be loaded. -fileNotFound=Lun3r can't find the file at %S. -dnsNotFound=Lun3r can't find the server at %S. -unknownProtocolFound=Lun3r doesn't know how to open this address, because the protocol (%S) isn't associated with any program. -connectionFailure=Lun3r can't establish a connection to the server at %S. -netInterrupt=The connection to %S was interrupted while the page was loading. -netTimeout=The server at %S is taking too long to respond. -redirectLoop=Lun3r has detected that the server is redirecting the request for this address in a way that will never complete. -## LOCALIZATION NOTE (confirmRepostPrompt): In this item, don't translate "%S" -confirmRepostPrompt=To display this page, %S must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. -resendButton.label=Resend -unknownSocketType=Lun3r doesn't know how to communicate with the server. -netReset=The connection to the server was reset while the page was loading. -notCached=This document is no longer available. -netOffline=Lun3r is currently in offline mode and can't browse the Web. -isprinting=The document cannot change while Printing or in Print Preview. -deniedPortAccess=This address uses a network port which is normally used for purposes other than Web browsing. Lun3r has canceled the request for your protection. -proxyResolveFailure=Lun3r is configured to use a proxy server that can't be found. -proxyConnectFailure=Lun3r is configured to use a proxy server that is refusing connections. -contentEncodingError=The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. -unsafeContentType=The page you are trying to view cannot be shown because it is contained in a file type that may not be safe to open. Please contact the website owners to inform them of this problem. -externalProtocolTitle=External Protocol Request -externalProtocolPrompt=An external application must be launched to handle %1$S: links.\n\n\nRequested link:\n\n%2$S\n\nApplication: %3$S\n\n\nIf you were not expecting this request it may be an attempt to exploit a weakness in that other program. Cancel this request unless you are sure it is not malicious.\n -#LOCALIZATION NOTE (externalProtocolUnknown): The following string is shown if the application name can't be determined -externalProtocolUnknown= -externalProtocolChkMsg=Remember my choice for all links of this type. -externalProtocolLaunchBtn=Launch application -cspBlocked=This page has a content security policy that prevents it from being embedded in this way. -xssBlockMode=This page contains an XSS attack that has been blocked for your security. -corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected. -remoteXUL=This page uses an unsupported technology that is no longer available by default in Lun3r. -## LOCALIZATION NOTE (sslv3Used) - Do not translate "%S". -sslv3Used=Lun3r cannot guarantee the safety of your data on %S because it uses SSLv3, a broken security protocol. diff --git a/application/palemoon/locales/en-US/chrome/overrides/netError.dtd b/application/palemoon/locales/en-US/chrome/overrides/netError.dtd deleted file mode 100644 index 9e5cbc7e29..0000000000 --- a/application/palemoon/locales/en-US/chrome/overrides/netError.dtd +++ /dev/null @@ -1,254 +0,0 @@ - - - -%brandDTD; - - - - - - - - - - - - - - - - -
  • Check the address for typing errors such as - ww.example.com instead of - www.example.com
  • -
  • If you are unable to load any pages, check your computer’s network - connection.
  • -
  • If your computer or network is protected by a firewall or proxy, make sure - that &brandShortName; is permitted to access the Web.
  • - -"> - - - -
  • Check the file name for capitalization or other typing errors.
  • -
  • Check to see if the file was moved, renamed or deleted.
  • - -"> - - - -
  • It may have been removed, moved, or file permissions may be preventing access.
  • - -"> - - -&brandShortName; can’t load this page for some reason.

    -"> - - -This network may require you to login to access the internet.

    -"> - - - - - -
  • Web addresses are usually written like - http://www.example.com/
  • -
  • Make sure that you’re using forward slashes (i.e. - /).
  • - -"> - - - - - -The requested document is not available in &brandShortName;’s cache.

    • As a security precaution, &brandShortName; does not automatically re-request sensitive documents.
    • Click Try Again to re-request the document from the website.
    "> - - - -
  • Press "Try Again" to switch to online mode and reload the page.
  • - -"> - - - -
  • Please contact the website owners to inform them of this problem.
  • - -"> - - - -
  • Please contact the website owners to inform them of this problem.
  • - -"> - - - - - - - - - -
  • You might need to install other software to open this address.
  • - -"> - - - -
  • Check the proxy settings to make sure that they are correct.
  • -
  • Contact your network administrator to make sure the proxy server is - working.
  • - -"> - - - -
  • Check the proxy settings to make sure that they are correct.
  • -
  • Check to make sure your computer has a working network connection.
  • -
  • If your computer or network is protected by a firewall or proxy, make sure - that &brandShortName; is permitted to access the Web.
  • - -"> - - - -
  • This problem can sometimes be caused by disabling or refusing to accept - cookies.
  • - -"> - - - -
  • Check to make sure your system has the Personal Security Manager - installed.
  • -
  • This might be due to a non-standard configuration on the server.
  • - -"> - - - -
  • The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
  • -
  • Please contact the website owners to inform them of this problem.
  • - -"> - - - -
  • This could be a problem with the server's configuration, or it could be -someone trying to impersonate the server.
  • -
  • If you have connected to this server successfully in the past, the error may -be temporary, and you can try again later.
  • - -"> - - - has configured their website improperly. To protect your information from being stolen, &brandShortName; has not connected to this website."> - - -
  • The site could be temporarily unavailable or too busy. Try again in a few - moments.
  • -
  • If you are unable to load any pages, check your computer’s network - connection.
  • -
  • If your computer or network is protected by a firewall or proxy, make sure - that &brandShortName; is permitted to access the Web.
  • - -"> - - -&brandShortName; prevented this page from loading in this way because the page has a content security policy that disallows it.

    "> - - - -
  • &brandShortName; blocked further actions on this page, because it contains - injected JavaScript code.
  • -
  • Loading of this page has been suspended because of either the explicit request - by the website to block this page in case of XSS attacks, or because &brandShortName; - has been configured to block pages in that situation.
  • - -"> - - -The page you are trying to view cannot be shown because an error in the data transmission was detected.

    • Please contact the website owners to inform them of this problem.
    "> - -The page you are trying to view cannot be shown because an error in the data transmission was detected.

    • Please contact the website owners to inform them of this problem.
    "> - - - - - - - - -You should not add an exception if you are using an internet connection that you do not trust completely or if you are not used to seeing a warning for this server.

    - - - -"> - - -
    • Please contact the website owners to inform them of this problem.

    "> - - - - - - - - - - - - - uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe."> - using outdated security"> - - -A secure connection to isn’t possible because your clock appears to show the wrong time.

    Your computer thinks it is . To fix this problem, change your date and time settings to match the correct time.

    "> - - - - - - - - uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.

    Error code: NS_ERROR_NET_INADEQUATE_SECURITY

    "> - - - diff --git a/application/palemoon/locales/en-US/chrome/overrides/settingsChange.dtd b/application/palemoon/locales/en-US/chrome/overrides/settingsChange.dtd deleted file mode 100644 index efbdf4e46f..0000000000 --- a/application/palemoon/locales/en-US/chrome/overrides/settingsChange.dtd +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/application/palemoon/locales/en-US/crashreporter/crashreporter-override.ini b/application/palemoon/locales/en-US/crashreporter/crashreporter-override.ini deleted file mode 100644 index 3345d76810..0000000000 --- a/application/palemoon/locales/en-US/crashreporter/crashreporter-override.ini +++ /dev/null @@ -1,9 +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/. - -# This file is in the UTF-8 encoding -[Strings] -# LOCALIZATION NOTE (CrashReporterProductErrorText2): The %s is replaced with a string containing detailed information. -CrashReporterProductErrorText2=Firefox had a problem and crashed. We'll try to restore your tabs and windows when it restarts.\n\nUnfortunately the crash reporter is unable to submit a crash report.\n\nDetails: %s -CrashReporterDescriptionText2=Firefox had a problem and crashed. We'll try to restore your tabs and windows when it restarts.\n\nTo help us diagnose and fix the problem, you can send us a crash report. diff --git a/application/palemoon/locales/en-US/defines.inc b/application/palemoon/locales/en-US/defines.inc deleted file mode 100644 index 539b8096c4..0000000000 --- a/application/palemoon/locales/en-US/defines.inc +++ /dev/null @@ -1,12 +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/. -#filter emptyLines - -#define MOZ_LANGPACK_CREATOR palemoon.org - -# If non-English locales wish to credit multiple contributors, uncomment this -# variable definition and use the format specified. -# #define MOZ_LANGPACK_CONTRIBUTORS Joe Solon Suzy Solon - -#unfilter emptyLines diff --git a/application/palemoon/locales/en-US/installer/custom.properties b/application/palemoon/locales/en-US/installer/custom.properties deleted file mode 100644 index c2785f040e..0000000000 --- a/application/palemoon/locales/en-US/installer/custom.properties +++ /dev/null @@ -1,87 +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/. - -# LOCALIZATION NOTE: - -# This file must be saved as UTF8 - -# Accesskeys are defined by prefixing the letter that is to be used for the -# accesskey with an ampersand (e.g. &). - -# Do not replace $BrandShortName, $BrandFullName, or $BrandFullNameDA with a -# custom string and always use the same one as used by the en-US files. -# $BrandFullNameDA allows the string to contain an ampersand (e.g. DA stands -# for double ampersand) and prevents the letter following the ampersand from -# being used as an accesskey. - -# You can use \n to create a newline in the string but only when the string -# from en-US contains a \n. - -REG_APP_DESC=$BrandShortName delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. -CONTEXT_OPTIONS=$BrandShortName &Options -CONTEXT_SAFE_MODE=$BrandShortName &Safe Mode -OPTIONS_PAGE_TITLE=Setup Type -OPTIONS_PAGE_SUBTITLE=Choose setup options -SHORTCUTS_PAGE_TITLE=Set Up Shortcuts -SHORTCUTS_PAGE_SUBTITLE=Create Program Icons -COMPONENTS_PAGE_TITLE=Set Up Optional Components -COMPONENTS_PAGE_SUBTITLE=Optional Recommended Components -SUMMARY_PAGE_TITLE=Summary -SUMMARY_PAGE_SUBTITLE=Ready to start installing $BrandShortName -SUMMARY_INSTALLED_TO=$BrandShortName will be installed to the following location: -SUMMARY_REBOOT_REQUIRED_INSTALL=A restart of your computer may be required to complete the installation. -SUMMARY_REBOOT_REQUIRED_UNINSTALL=A restart of your computer may be required to complete the uninstall. -SUMMARY_TAKE_DEFAULTS=U&se $BrandShortName as my default web browser -SUMMARY_INSTALL_CLICK=Click Install to continue. -SUMMARY_UPGRADE_CLICK=Click Upgrade to continue. -SURVEY_TEXT=&Tell us what you thought of $BrandShortName -LAUNCH_TEXT=&Launch $BrandShortName now -CREATE_ICONS_DESC=Create icons for $BrandShortName: -ICONS_DESKTOP=On my &Desktop -ICONS_STARTMENU=In my &Start Menu Programs folder -ICONS_QUICKLAUNCH=In my &Quick Launch bar -WARN_MANUALLY_CLOSE_APP_INSTALL=$BrandShortName must be closed to proceed with the installation.\n\nPlease close $BrandShortName to continue. -WARN_MANUALLY_CLOSE_APP_UNINSTALL=$BrandShortName must be closed to proceed with the uninstall.\n\nPlease close $BrandShortName to continue. -WARN_MANUALLY_CLOSE_APP_LAUNCH=$BrandShortName is already running.\n\nPlease close $BrandShortName prior to launching the version you have just installed. -WARN_WRITE_ACCESS=You don't have access to write to the installation directory.\n\nClick OK to select a different directory. -WARN_DISK_SPACE=You don't have sufficient disk space to install to this location.\n\nClick OK to select a different location. -WARN_MIN_SUPPORTED_OSVER_MSG=Sorry, $BrandShortName can't be installed. This version of $BrandShortName requires ${MinSupportedVer} or newer. -WARN_MIN_SUPPORTED_CPU_MSG=Sorry, $BrandShortName can't be installed. This version of $BrandShortName requires a processor with ${MinSupportedCPU} support. -WARN_MIN_SUPPORTED_OSVER_CPU_MSG=Sorry, $BrandShortName can't be installed. This version of $BrandShortName requires ${MinSupportedVer} or newer and a processor with ${MinSupportedCPU} support. -WARN_RESTART_REQUIRED_UNINSTALL=Your computer must be restarted to complete a previous uninstall of $BrandShortName. Do you want to reboot now? -WARN_RESTART_REQUIRED_UPGRADE=Your computer must be restarted to complete a previous upgrade of $BrandShortName. Do you want to reboot now? -ERROR_CREATE_DIRECTORY_PREFIX=Error creating directory: -ERROR_CREATE_DIRECTORY_SUFFIX=Click Cancel to stop the installation or\nRetry to try again. - -UN_CONFIRM_PAGE_TITLE=Uninstall $BrandFullName -UN_CONFIRM_PAGE_SUBTITLE=Remove $BrandFullName from your computer. -UN_CONFIRM_UNINSTALLED_FROM=$BrandShortName will be uninstalled from the following location: -UN_CONFIRM_CLICK=Click Uninstall to continue. -UN_REMOVE_PROFILES=&Remove my $BrandShortName personal data and customizations -UN_REMOVE_PROFILES_DESC=This will permanently remove your bookmarks, saved passwords, cookies and customizations. You may wish to keep this information if you plan on installing another version of $BrandShortName in the future. - -BANNER_CHECK_EXISTING=Checking existing installation… - -STATUS_INSTALL_APP=Installing $BrandShortName… -STATUS_INSTALL_LANG=Installing Language Files (${AB_CD})… -STATUS_UNINSTALL_MAIN=Uninstalling $BrandShortName… -STATUS_CLEANUP=A Little Housekeeping… - -# _DESC strings support approximately 65 characters per line. -# One line -OPTIONS_SUMMARY=Choose the type of setup you prefer, then click Next. -# One line -OPTION_STANDARD_DESC=$BrandShortName will be installed with the most common options. -OPTION_STANDARD_RADIO=&Standard -# Two lines -OPTION_CUSTOM_DESC=You may choose individual options to be installed. Recommended for experienced users. -OPTION_CUSTOM_RADIO=&Custom -OPTION_PORTABLE_DESC=Fully portable, disable system integration functionality (no-remote). -OPTION_PORTABLE_RADIO=&Portable - -# LOCALIZATION NOTE: -# The following text replaces the Install button text on the summary page. -# Verify that the access key for InstallBtn (in override.properties) and -# UPGRADE_BUTTON is not already used by SUMMARY_TAKE_DEFAULTS. -UPGRADE_BUTTON=&Upgrade diff --git a/application/palemoon/locales/en-US/installer/mui.properties b/application/palemoon/locales/en-US/installer/mui.properties deleted file mode 100644 index c786dbba25..0000000000 --- a/application/palemoon/locales/en-US/installer/mui.properties +++ /dev/null @@ -1,61 +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/. - -# To make the l10n tinderboxen see changes to this file you can change a value -# name by adding - to the end of the name followed by chars (e.g. Branding-2). - -# LOCALIZATION NOTE: - -# This file must be saved as UTF8 - -# Accesskeys are defined by prefixing the letter that is to be used for the -# accesskey with an ampersand (e.g. &). - -# Do not replace $BrandShortName, $BrandFullName, or $BrandFullNameDA with a -# custom string and always use the same one as used by the en-US files. -# $BrandFullNameDA allows the string to contain an ampersand (e.g. DA stands -# for double ampersand) and prevents the letter following the ampersand from -# being used as an accesskey. - -# You can use \n to create a newline in the string but only when the string -# from en-US contains a \n. - -MUI_TEXT_WELCOME_INFO_TITLE=Welcome to the $BrandFullNameDA Setup Wizard -MUI_TEXT_WELCOME_INFO_TEXT=This wizard will guide you through the installation of $BrandFullNameDA.\n\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.\n\n$_CLICK -MUI_TEXT_COMPONENTS_TITLE=Choose Components -MUI_TEXT_COMPONENTS_SUBTITLE=Choose which features of $BrandFullNameDA you want to install. -MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE=Description -MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO=Position your mouse over a component to see its description. -MUI_TEXT_DIRECTORY_TITLE=Choose Install Location -MUI_TEXT_DIRECTORY_SUBTITLE=Choose the folder in which to install $BrandFullNameDA. -MUI_TEXT_INSTALLING_TITLE=Installing -MUI_TEXT_INSTALLING_SUBTITLE=Please wait while $BrandFullNameDA is being installed. -MUI_TEXT_FINISH_TITLE=Installation Complete -MUI_TEXT_FINISH_SUBTITLE=Setup was completed successfully. -MUI_TEXT_ABORT_TITLE=Installation Aborted -MUI_TEXT_ABORT_SUBTITLE=Setup was not completed successfully. -MUI_BUTTONTEXT_FINISH=&Finish -MUI_TEXT_FINISH_INFO_TITLE=Completing the $BrandFullNameDA Setup Wizard -MUI_TEXT_FINISH_INFO_TEXT=$BrandFullNameDA has been installed on your computer.\n\nClick Finish to close this wizard. -MUI_TEXT_FINISH_INFO_REBOOT=Your computer must be restarted in order to complete the installation of $BrandFullNameDA. Do you want to reboot now? -MUI_TEXT_FINISH_REBOOTNOW=Reboot now -MUI_TEXT_FINISH_REBOOTLATER=I want to manually reboot later -MUI_TEXT_STARTMENU_TITLE=Choose Start Menu Folder -MUI_TEXT_STARTMENU_SUBTITLE=Choose a Start Menu folder for the $BrandFullNameDA shortcuts. -MUI_INNERTEXT_STARTMENU_TOP=Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder. -MUI_TEXT_ABORTWARNING=Are you sure you want to quit $BrandFullName Setup? -MUI_UNTEXT_WELCOME_INFO_TITLE=Welcome to the $BrandFullNameDA Uninstall Wizard -MUI_UNTEXT_WELCOME_INFO_TEXT=This wizard will guide you through the uninstallation of $BrandFullNameDA.\n\nBefore starting the uninstallation, make sure $BrandFullNameDA is not running.\n\n$_CLICK -MUI_UNTEXT_CONFIRM_TITLE=Uninstall $BrandFullNameDA -MUI_UNTEXT_CONFIRM_SUBTITLE=Remove $BrandFullNameDA from your computer. -MUI_UNTEXT_UNINSTALLING_TITLE=Uninstalling -MUI_UNTEXT_UNINSTALLING_SUBTITLE=Please wait while $BrandFullNameDA is being uninstalled. -MUI_UNTEXT_FINISH_TITLE=Uninstallation Complete -MUI_UNTEXT_FINISH_SUBTITLE=Uninstall was completed successfully. -MUI_UNTEXT_ABORT_TITLE=Uninstallation Aborted -MUI_UNTEXT_ABORT_SUBTITLE=Uninstall was not completed successfully. -MUI_UNTEXT_FINISH_INFO_TITLE=Completing the $BrandFullNameDA Uninstall Wizard -MUI_UNTEXT_FINISH_INFO_TEXT=$BrandFullNameDA has been uninstalled from your computer.\n\nClick Finish to close this wizard. -MUI_UNTEXT_FINISH_INFO_REBOOT=Your computer must be restarted in order to complete the uninstallation of $BrandFullNameDA. Do you want to reboot now? -MUI_UNTEXT_ABORTWARNING=Are you sure you want to quit $BrandFullName Uninstall? diff --git a/application/palemoon/locales/en-US/installer/override.properties b/application/palemoon/locales/en-US/installer/override.properties deleted file mode 100644 index 288f674805..0000000000 --- a/application/palemoon/locales/en-US/installer/override.properties +++ /dev/null @@ -1,86 +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/. - -# LOCALIZATION NOTE: - -# This file must be saved as UTF8 - -# Accesskeys are defined by prefixing the letter that is to be used for the -# accesskey with an ampersand (e.g. &). - -# Do not replace $BrandShortName, $BrandFullName, or $BrandFullNameDA with a -# custom string and always use the same one as used by the en-US files. -# $BrandFullNameDA allows the string to contain an ampersand (e.g. DA stands -# for double ampersand) and prevents the letter following the ampersand from -# being used as an accesskey. - -# You can use \n to create a newline in the string but only when the string -# from en-US contains a \n. - -# Strings that require a space at the end should be enclosed with double -# quotes and the double quotes will be removed. To add quotes to the beginning -# and end of a strong enclose the add and additional double quote to the -# beginning and end of the string (e.g. ""This will include quotes""). - -SetupCaption=$BrandFullName Setup -UninstallCaption=$BrandFullName Uninstall -BackBtn=< &Back -NextBtn=&Next > -AcceptBtn=I &accept the terms in the License Agreement -DontAcceptBtn=I &do not accept the terms in the License Agreement -InstallBtn=&Install -UninstallBtn=&Uninstall -CancelBtn=Cancel -CloseBtn=&Close -BrowseBtn=B&rowse… -ShowDetailsBtn=Show &details -ClickNext=Click Next to continue. -ClickInstall=Click Install to start the installation. -ClickUninstall=Click Uninstall to start the uninstallation. -Completed=Completed -LicenseTextRB=Please review the license agreement before installing $BrandFullNameDA. If you accept all terms of the agreement, select the first option below. $_CLICK -ComponentsText=Check the components you want to install and uncheck the components you don't want to install. $_CLICK -ComponentsSubText2_NoInstTypes=Select components to install: -DirText=Setup will install $BrandFullNameDA in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK -DirSubText=Destination Folder -DirBrowseText=Select the folder to install $BrandFullNameDA in: -SpaceAvailable="Space available: " -SpaceRequired="Space required: " -UninstallingText=$BrandFullNameDA will be uninstalled from the following folder. $_CLICK -UninstallingSubText=Uninstalling from: -FileError=Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file. -FileError_NoIgnore=Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation. -CantWrite="Can't write: " -CopyFailed=Copy failed -CopyTo="Copy to " -Registering="Registering: " -Unregistering="Unregistering: " -SymbolNotFound="Could not find symbol: " -CouldNotLoad="Could not load: " -CreateFolder="Create folder: " -CreateShortcut="Create shortcut: " -CreatedUninstaller="Created uninstaller: " -Delete="Delete file: " -DeleteOnReboot="Delete on reboot: " -ErrorCreatingShortcut="Error creating shortcut: " -ErrorCreating="Error creating: " -ErrorDecompressing=Error decompressing data! Corrupted installer? -ErrorRegistering=Error registering DLL -ExecShell="ExecShell: " -Exec="Execute: " -Extract="Extract: " -ErrorWriting="Extract: error writing to file " -InvalidOpcode=Installer corrupted: invalid opcode -NoOLE="No OLE for: " -OutputFolder="Output folder: " -RemoveFolder="Remove folder: " -RenameOnReboot="Rename on reboot: " -Rename="Rename: " -Skipped="Skipped: " -CopyDetails=Copy Details To Clipboard -LogInstall=Log install process -Byte=B -Kilo=K -Mega=M -Giga=G diff --git a/application/palemoon/locales/en-US/palemoon-l10n.js b/application/palemoon/locales/en-US/palemoon-l10n.js deleted file mode 100644 index 642ad6534a..0000000000 --- a/application/palemoon/locales/en-US/palemoon-l10n.js +++ /dev/null @@ -1,7 +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/. - -#filter substitution - -pref("general.useragent.locale", "@AB_CD@"); diff --git a/application/palemoon/locales/en-US/profile/bookmarks.inc b/application/palemoon/locales/en-US/profile/bookmarks.inc deleted file mode 100644 index d2a701e52b..0000000000 --- a/application/palemoon/locales/en-US/profile/bookmarks.inc +++ /dev/null @@ -1,40 +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/. -#filter emptyLines - -# LOCALIZATION NOTE: The 'en-US' strings in the URLs will be replaced with -# your locale code, and link to your translated pages as soon as they're -# live. - -#define bookmarks_title Bookmarks -#define bookmarks_heading Bookmarks - -#define bookmarks_toolbarfolder Bookmarks Toolbar Folder -#define bookmarks_toolbarfolder_description Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar - -# LOCALIZATION NOTE (getting_started): -# link title for https://www.mozilla.org/en-US/firefox/central/ -#define getting_started Getting Started - -# LOCALIZATION NOTE (firefox_heading): -# Firefox links folder name -#define firefox_heading Mozilla Firefox - -# LOCALIZATION NOTE (firefox_help): -# link title for https://www.mozilla.org/en-US/firefox/help/ -#define firefox_help Help and Tutorials - -# LOCALIZATION NOTE (firefox_customize): -# link title for https://www.mozilla.org/en-US/firefox/customize/ -#define firefox_customize Customize Firefox - -# LOCALIZATION NOTE (firefox_community): -# link title for https://www.mozilla.org/en-US/contribute/ -#define firefox_community Get Involved - -# LOCALIZATION NOTE (firefox_about): -# link title for https://www.mozilla.org/en-US/about/ -#define firefox_about About Us - -#unfilter emptyLines diff --git a/application/palemoon/locales/en-US/profile/chrome/userChrome-example.css b/application/palemoon/locales/en-US/profile/chrome/userChrome-example.css deleted file mode 100644 index 2495795b4a..0000000000 --- a/application/palemoon/locales/en-US/profile/chrome/userChrome-example.css +++ /dev/null @@ -1,50 +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/. */ - -/* - * Edit this file and copy it as userChrome.css into your - * profile-directory/chrome/ - */ - -/* - * This file can be used to customize the look of Mozilla's user interface - * You should consider using !important on rules which you want to - * override default settings. - */ - -/* - * Do not remove the @namespace line -- it's required for correct functioning - */ -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */ - - -/* - * Some possible accessibility enhancements: - */ -/* - * Make all the default font sizes 20 pt: - * - * * { - * font-size: 20pt !important - * } - */ -/* - * Make menu items in particular 15 pt instead of the default size: - * - * menupopup > * { - * font-size: 15pt !important - * } - */ -/* - * Give the Location (URL) Bar a fixed-width font - * - * #urlbar { - * font-family: monospace !important; - * } - */ - -/* - * For more examples see http://www.mozilla.org/unix/customizing.html - */ - diff --git a/application/palemoon/locales/en-US/profile/chrome/userContent-example.css b/application/palemoon/locales/en-US/profile/chrome/userContent-example.css deleted file mode 100644 index a90694d6c9..0000000000 --- a/application/palemoon/locales/en-US/profile/chrome/userContent-example.css +++ /dev/null @@ -1,32 +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/. */ - -/* - * Edit this file and copy it as userContent.css into your - * profile-directory/chrome/ - */ - -/* - * This file can be used to apply a style to all web pages you view - * Rules without !important are overruled by author rules if the - * author sets any. Rules with !important overrule author rules. - */ - -/* - * example: give all tables a 2px border - * - * table { border: 2px solid; } - */ - -/* - * example: turn off "marquee" element - * - * marquee { -moz-binding: none; } - * - */ - -/* - * For more examples see http://www.mozilla.org/unix/customizing.html - */ - diff --git a/application/palemoon/locales/en-US/searchplugins/amazondotcom.xml b/application/palemoon/locales/en-US/searchplugins/amazondotcom.xml deleted file mode 100644 index c11dcb069e..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/amazondotcom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - -Amazon.com -Amazon.com Search -ISO-8859-1 -data:image/x-icon;base64,AAABAAIAEBAAAAAAAAC0AQAAJgAAACAgAAAAAAAA6QIAANoBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAF7SURBVDjLlZPLasJAFIaFRF+iVV+h6hO0GF+gVB9AaHwDt64qCG03tQgtdCFIuyhUelmGli66MXThSt24kNiFBUlAYi6ezjnNxSuawB/ITP7v/HNmJgQAEaZzpgHs/gwcTyTEXuXl2U6nA8ViEbK5HKler28CVRAwnB9ptVrAh8MrQuCaZ4iA8fzIqSgCxwzpTIaSuN/RWGwdYLwCUBQFZFkGSZLgqdmEE7YEN8VOAKyaSKUW4nNBAFmnYiKZpDRX1WqwBBzP089n5f/NEQsFL4WqqtsBWJlzDAJr5PwSMM1awEzzdxIbGI3Hvc6jCZeVFgRQRwpY7Qcw3ktgfpR8wLRxCPaot/X4GS95MppfF6DX9n2A3f+kAZycaT8bAZjU6r6B/duD6d3BYg9wQq/tkYzHY1blEiz5lmQyGc95mrO6r2CxgpjCBXgNsJVviolpXJiraeOIjJRE10juUa4sR8V+mO17VvmGqtuOcdNlwut8zTQJcJ0njifyB2bgTdKh6w4BAAAAAElFTkSuQmCCiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACsElEQVRYw71XQWsTURBe2LQgeNKLB+tVemt6txcteNSD/QGC6VEIGDx5s+eKPQqFgJhLNdFLBWMP7cU0oSAWjB70koC9WHbVQ5SO8+XtS14mr7svyaYDH9m87Jv55puZt1nPi4yIzjMeMj7T9OwjI88455nGC1cZX+nsDESumJmPFDwIAqrX6z00Gg1qt9vjkJgFgUeuO16Vy3RjeZkyMzM9+MY1fsM9I9h9zyV7ZAznZrA4FAoFVwJ1z+WuOysrg1lnMolkHJX4k0igzI5sARYWF7vEZEk0rvO6iyUSuJfLJUqM7zYSqRDIra4OOUZPmNZsNrsl8UVTpkJAjh1GzmaSpJ8mAWmYeZB5urHRhW5SNOfUCCDo47W1bvPZsp2qAhipy3Nz1kaLG8dUCEBqM5AvpgElqFar01NgIZsdco7Zb7VasU2YigIYL5tjqCL7Q5YkFQXKlcqQ7DbHthIALk/IWAKor82xPIhshxWABCYioDMz51sexcVi0XoG4DPLIyvJjkTArK3scDQnRvO0MdTrUHGiKZCP4tNgO6BAEI08EQH9Z2Qow0hyPypJGIa9p6JWKCn4SA8jSKmJIDgyRvPJkcRxjfUwNGr/i8+Mo32iHzWiThBD4NM60bet9P77/ubA728RlTjMiwiH6zEEfvIrwdZFtQmMJ7W/ofIDBZD5m3mVZGwJcOP2kmILIlCkE45HoPWurwCSg0+UQRD4ZyXxId+T7gQb9+4q9sioY5ltrOG3L5vqXiiJffDx/aUi83ZJ7jr2ohcEu8Hh6/m+I7OWGiVxbWKHsz+O3vSOakqFQdsFgQeJUiKD7Wv9YKXBgCeSUC3v2kM5EJhlHDh3NcgcPlG1BXZu98sDmTuBa4fsMnz9fniJUaGzs+eMC540XuR0aDO2L8Y3qPyMcdOM+R/8XcqRA3qp9gAAAABJRU5ErkJggg== - - - - -https://www.amazon.com/ - diff --git a/application/palemoon/locales/en-US/searchplugins/answers.xml b/application/palemoon/locales/en-US/searchplugins/answers.xml deleted file mode 100644 index b88b241e5a..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/answers.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - -Answers.com -Dictionary Search on Answers.com -UTF-8 -data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////K////4f////E////5f///+n////P////mv///0EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8E////fv///+//////////////////////7NnP/+LFtv/////+////of///xYAAAAAAAAAAAAAAAD///8D////lf////////////j0//bi1v/OlXf/tGU9/6FCEv/OmH3////////////////D////FgAAAAAAAAAA////avPm4P/evaz/8NbI//7r3//23M3/xYRi/5kzAP/Df1z//u/l//749P/v4dn/+PPw/////6j///8B////GP///+W/f1//smM7//bczf/+69///uvf/9ytlP+ZMwD/5se3/+/f1//AgmP/nj0N/927qv/////+////QP///2z/////8NvQ/8WCYP/+69///uvf//7r3/+7ckz/pUkb/9m1ov+ePQ3/okUW/8+fh//38O3//////////5r///+t//////7y6v/Cflv/58Cr//DRwP/mwKv/okQU/8ODYv/cuqj/yZN4//Tq5f/+9e///vDn///////////Q////yf/////+7+b/05yA/65ZLv+9dVD/sF40/5kzAP/kvKb//vTu//Tr5v/7+Pb//vfz//707f//////////6f///8X//////vDm/+K4ov/KjGz//ure/8uNbf+jRBX/+OTX/+3b0v+jSBr/pk0h/717Wv/Wrpr//Pn4/////+b///+i//////7z7f/02Mj/wn5b//vl2P+uWS7/vXhU//v49//48u//1q6a/717Wv+oUSb/tWxH//jz8P/////K////V///////+/j//ure/8aFZP/fs5v/oEAQ/9q1o/+zaEL/1ayX//718P/+9/P/+PHu//jz8P//////////h////wr////O///////38v/YpYr/tGQ7/6ZLHf/06eX/s2dB/549Df/x49z//vDn//7x6f//////////8////yoAAAAA////R/////v/////7dXI/5kzAP+7cUv//vHp/+vYzv+bNwX/vHlY//38/P///////////////30AAAAAAAAAAAAAAAD///9n////+/z5+P++e1n/3LGc//7w5//++PT/0KKL/8OIa//9/Pv//////////5X///8GAAAAAAAAAAAAAAAAAAAAAP///0n////K///////////////////////////+/v7/////5v///2z///8CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////Cv///1f///+g////xP///8n///+r////bP///xoAAAAAAAAAAAAAAAAAAAAA+B////AH///AA///wAH//4AB//+AAP//AAD//wAA//8AAP//AAD//4AA//+AAf//wAP//+AD///wD////D///w== - - - - -http://www.answers.com/ - diff --git a/application/palemoon/locales/en-US/searchplugins/bing.xml b/application/palemoon/locales/en-US/searchplugins/bing.xml deleted file mode 100644 index 22019ce40c..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/bing.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - Bing - Bing. Search by Microsoft. - UTF-8 - data:image/x-icon;base64,AAABAAIAEBAAAAEACADaCwAAJgAAACAgAAABAAgAlAIAAAAMAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIAgAAAJCRaDYAAAAJcEhZcwAACxMAAAsTAQCanBgAAApPaUNDUFBob3Rvc2hvcCBJQ0MgcHJvZmlsZQAAeNqdU2dUU+kWPffe9EJLiICUS29SFQggUkKLgBSRJiohCRBKiCGh2RVRwRFFRQQbyKCIA46OgIwVUSwMigrYB+Qhoo6Do4iKyvvhe6Nr1rz35s3+tdc+56zznbPPB8AIDJZIM1E1gAypQh4R4IPHxMbh5C5AgQokcAAQCLNkIXP9IwEA+H48PCsiwAe+AAF40wsIAMBNm8AwHIf/D+pCmVwBgIQBwHSROEsIgBQAQHqOQqYAQEYBgJ2YJlMAoAQAYMtjYuMAUC0AYCd/5tMAgJ34mXsBAFuUIRUBoJEAIBNliEQAaDsArM9WikUAWDAAFGZLxDkA2C0AMElXZkgAsLcAwM4QC7IACAwAMFGIhSkABHsAYMgjI3gAhJkAFEbyVzzxK64Q5yoAAHiZsjy5JDlFgVsILXEHV1cuHijOSRcrFDZhAmGaQC7CeZkZMoE0D+DzzAAAoJEVEeCD8/14zg6uzs42jrYOXy3qvwb/ImJi4/7lz6twQAAA4XR+0f4sL7MagDsGgG3+oiXuBGheC6B194tmsg9AtQCg6dpX83D4fjw8RaGQudnZ5eTk2ErEQlthyld9/mfCX8BX/Wz5fjz89/XgvuIkgTJdgUcE+ODCzPRMpRzPkgmEYtzmj0f8twv//B3TIsRJYrlYKhTjURJxjkSajPMypSKJQpIpxSXS/2Ti3yz7Az7fNQCwaj4Be5EtqF1jA/ZLJxBYdMDi9wAA8rtvwdQoCAOAaIPhz3f/7z/9R6AlAIBmSZJxAABeRCQuVMqzP8cIAABEoIEqsEEb9MEYLMAGHMEF3MEL/GA2hEIkxMJCEEIKZIAccmAprIJCKIbNsB0qYC/UQB00wFFohpNwDi7CVbgOPXAP+mEInsEovIEJBEHICBNhIdqIAWKKWCOOCBeZhfghwUgEEoskIMmIFFEiS5E1SDFSilQgVUgd8j1yAjmHXEa6kTvIADKC/Ia8RzGUgbJRPdQMtUO5qDcahEaiC9BkdDGajxagm9BytBo9jDah59CraA/ajz5DxzDA6BgHM8RsMC7Gw0KxOCwJk2PLsSKsDKvGGrBWrAO7ifVjz7F3BBKBRcAJNgR3QiBhHkFIWExYTthIqCAcJDQR2gk3CQOEUcInIpOoS7QmuhH5xBhiMjGHWEgsI9YSjxMvEHuIQ8Q3JBKJQzInuZACSbGkVNIS0kbSblIj6SypmzRIGiOTydpka7IHOZQsICvIheSd5MPkM+Qb5CHyWwqdYkBxpPhT4ihSympKGeUQ5TTlBmWYMkFVo5pS3aihVBE1j1pCraG2Uq9Rh6gTNHWaOc2DFklLpa2ildMaaBdo92mv6HS6Ed2VHk6X0FfSy+lH6JfoA/R3DA2GFYPHiGcoGZsYBxhnGXcYr5hMphnTixnHVDA3MeuY55kPmW9VWCq2KnwVkcoKlUqVJpUbKi9Uqaqmqt6qC1XzVctUj6leU32uRlUzU+OpCdSWq1WqnVDrUxtTZ6k7qIeqZ6hvVD+kfln9iQZZw0zDT0OkUaCxX+O8xiALYxmzeCwhaw2rhnWBNcQmsc3ZfHYqu5j9HbuLPaqpoTlDM0ozV7NS85RmPwfjmHH4nHROCecop5fzforeFO8p4ikbpjRMuTFlXGuqlpeWWKtIq1GrR+u9Nq7tp52mvUW7WfuBDkHHSidcJ0dnj84FnedT2VPdpwqnFk09OvWuLqprpRuhu0R3v26n7pievl6Ankxvp955vef6HH0v/VT9bfqn9UcMWAazDCQG2wzOGDzFNXFvPB0vx9vxUUNdw0BDpWGVYZfhhJG50Tyj1UaNRg+MacZc4yTjbcZtxqMmBiYhJktN6k3umlJNuaYppjtMO0zHzczNos3WmTWbPTHXMueb55vXm9+3YFp4Wiy2qLa4ZUmy5FqmWe62vG6FWjlZpVhVWl2zRq2drSXWu627pxGnuU6TTque1mfDsPG2ybaptxmw5dgG2662bbZ9YWdiF2e3xa7D7pO9k326fY39PQcNh9kOqx1aHX5ztHIUOlY63prOnO4/fcX0lukvZ1jPEM/YM+O2E8spxGmdU5vTR2cXZ7lzg/OIi4lLgssulz4umxvG3ci95Ep09XFd4XrS9Z2bs5vC7ajbr+427mnuh9yfzDSfKZ5ZM3PQw8hD4FHl0T8Ln5Uwa9+sfk9DT4FntecjL2MvkVet17C3pXeq92HvFz72PnKf4z7jPDfeMt5ZX8w3wLfIt8tPw2+eX4XfQ38j/2T/ev/RAKeAJQFnA4mBQYFbAvv4enwhv44/Ottl9rLZ7UGMoLlBFUGPgq2C5cGtIWjI7JCtIffnmM6RzmkOhVB+6NbQB2HmYYvDfgwnhYeFV4Y/jnCIWBrRMZc1d9HcQ3PfRPpElkTem2cxTzmvLUo1Kj6qLmo82je6NLo/xi5mWczVWJ1YSWxLHDkuKq42bmy+3/zt84fineIL43sXmC/IXXB5oc7C9IWnFqkuEiw6lkBMiE44lPBBECqoFowl8hN3JY4KecIdwmciL9E20YjYQ1wqHk7ySCpNepLskbw1eSTFM6Us5bmEJ6mQvEwNTN2bOp4WmnYgbTI9Or0xg5KRkHFCqiFNk7Zn6mfmZnbLrGWFsv7Fbou3Lx6VB8lrs5CsBVktCrZCpuhUWijXKgeyZ2VXZr/Nico5lqueK83tzLPK25A3nO+f/+0SwhLhkralhktXLR1Y5r2sajmyPHF52wrjFQUrhlYGrDy4irYqbdVPq+1Xl65+vSZ6TWuBXsHKgsG1AWvrC1UK5YV969zX7V1PWC9Z37Vh+oadGz4ViYquFNsXlxV/2CjceOUbh2/Kv5nclLSpq8S5ZM9m0mbp5t4tnlsOlqqX5pcObg3Z2rQN31a07fX2Rdsvl80o27uDtkO5o788uLxlp8nOzTs/VKRU9FT6VDbu0t21Ydf4btHuG3u89jTs1dtbvPf9Psm+21UBVU3VZtVl+0n7s/c/romq6fiW+21drU5tce3HA9ID/QcjDrbXudTVHdI9VFKP1ivrRw7HH77+ne93LQ02DVWNnMbiI3BEeeTp9wnf9x4NOtp2jHus4QfTH3YdZx0vakKa8ppGm1Oa+1tiW7pPzD7R1ureevxH2x8PnDQ8WXlK81TJadrpgtOTZ/LPjJ2VnX1+LvncYNuitnvnY87fag9v77oQdOHSRf+L5zu8O85c8rh08rLb5RNXuFearzpfbep06jz+k9NPx7ucu5quuVxrue56vbV7ZvfpG543zt30vXnxFv/W1Z45Pd2983pv98X39d8W3X5yJ/3Oy7vZdyfurbxPvF/0QO1B2UPdh9U/W/7c2O/cf2rAd6Dz0dxH9waFg8/+kfWPD0MFj5mPy4YNhuueOD45OeI/cv3p/KdDz2TPJp4X/qL+y64XFi9++NXr187RmNGhl/KXk79tfKX96sDrGa/bxsLGHr7JeDMxXvRW++3Bd9x3He+j3w9P5Hwgfyj/aPmx9VPQp/uTGZOT/wQDmPP8YzMt2wAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAABBUlEQVR42mL8v4OBJMAEZ/0nTgMLnLXtitKRO9JmCi9cNR/wsP8mrOHfP8YbL4RvvBBWFXuvI/WGsJMYSHUSMujbY8LN/ttM4bmO1BtW5n+ENdipPmndbrHjqiIn6x9DuZc2yk8tlZ7hc5Kx/AtzxecMDAzff7Mcuys9/7gOAT8wMjAUOZ9x0XhI2A98HL+Eub/vuSG/8ozGmy+cEEF+zp/YNYjxfvPTv9O63fLpBx6ICCvz32DD24EGt7Fo4Gb/zcX2Z84RPbiIqfyLZJtL4rzfsDvJUf3R91+sC09o//7LJMn/NdXmkqHsSyzeQ0t8j9/znn8s7ql9Dy34cWogIbUSCQADAJ+jWQrH9LCsAAAAAElFTkSuQmCCiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAACW0lEQVR4nGP8v5OBpoCJtsbTwQIWTKGUxe5mCi9M5V/oSL9mZf5HoQWMmHEQOD0AwuBg/WMo+8pB/ZGZwguyLcDiAzj48Zvl+D2pTz/YKLGAcBxcfSZCtulEWUAhGDQW3HstcOOF8P//jKRagC+SkQE/58/0pa7c7L9N5V+aKTw3kH3FxvKXmhYI83y3VXl64Jbs3htye2/IsbH8NZB9Zabw3FT+JR/nTypYwMDAEGBw+8AtWQj71x/mU/clT92XZGT8ry7+zlzxhbnic0n+LxRZIC/8yUju5blH4siC//8z3nghfOOF8MLj2jKCnydH7EXTRVoqCjC4g0f2yXteTEHSLNCVft0WcNhM4QXxiYmEIIIATcm3mpJvn37gmX7Q8OozYYLqycloTz/wLDulRYzpDMT4QFf6NZz95gvnyjMa+27I/SM6xxGwQJj7R6rtJQYGhk8/2NaeU9t+RfH3X2ZcihWEP5Fmgazg53qfY9zsv1ed0dh4UeXbL5yKudl/R5tdd9O6T4IFGhJvyz1OHbkts/qc2qfv7LiUMTIwOGk8irW4yo8jP2O3wEzxubHcy7I1Dq+/cOIymoGBQVn0Q5rtRTXx93jUYLFAX+b1sw88p+5L4tHGy/Er2uy6m9YDRsb/eJRht8BS+emCY7q4NDAyMLhpPYixuMbD/gu/0VD1WBtezz7w9O81vvNKEE1cTfxdmu0lZdEPxBiNzwIGBoa//xhXndFYfU4NUsnwcf6Ms7jmpPGQ1BoHpwUQcOOF0OT9RoayryJNr3Oz/ybRcCIsoBwMmkp/8FoAADmgy6ulKggYAAAAAElFTkSuQmCC - - - - - - - - https://www.bing.com/search - diff --git a/application/palemoon/locales/en-US/searchplugins/creativecommons.xml b/application/palemoon/locales/en-US/searchplugins/creativecommons.xml deleted file mode 100644 index c57b1958e3..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/creativecommons.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - -Creative Commons -Find photos, movies, music, and text to rip, sample, mash, and share. -utf-8 -data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJUSURBVDiNjZO9S1thGMXPvTfJFbnkipNkLLS0ksFg0M0lf4CboNCEgIIg/RiKtEOn0qGWTtbVoBYcIji10I9J0ApWCjp0kRaXdhHjTW4+uGnur4NJ8GOwZ3nf4TnnfZ5z3scAdBGGYdyVdN+yrGHTNNOtVqsVhuG+pO+S3gE/LtV3BIxzPDJNc8FxHGN0dNRKpVIGoJ2dndr+/r5Vr9cl6bmkN0AoSQIEyHXdj5KYnZ3F932uolKpkM/nK5KQ9FmSCZwLOI7zQBLr6+vXiFdRLBaDtsiTTve3YrFYkM/nbyR3MDU1dSKpLumO+vr6Xruui+d5AFSrVVZWVtjY2KDRaABwdHTE4uIie3t7AJTLZaLRaFXSCyUSid1MJgOA53n09/eTTqdJJpPMzc2xurqKbduMj48Tj8fZ3d0FYHBw8FjSezmOU56fnwdgeXkZ27ap1WpUKhWazSZjY2Nks1kASqVSd4zp6eljSX/MtiHdRDpnEATyfb+bkiSVSqXu3TCM8xgHBga+dkY4OzvDdV2GhoZIJBLMzMxQKBSIRqNkMhlisRhbW1sAJJPJn5I+KB6Pv7poou/7rK2tsbm5SRAEXROXlpY4ODgAoFarYdu2J+llN8ZcLvffMeZyud+SGpLuCVBPT89jSRQKhRvJxWKxISmU9JTOT5Rk9Pb2fpHE5OQkJycn14inp6dMTEx4bdM/SbKAy8sk6WEkElmwLCuSSqUYGRmxgHB7e7t+eHgYazabgaRnkt7SeZnr63xbUtYwjGHTNNNhGP4F9iR9a6/zr4v1/wDE1D9XlC4rrAAAAABJRU5ErkJggg== - - - -http://search.creativecommons.org/ - diff --git a/application/palemoon/locales/en-US/searchplugins/ddg-lite.xml b/application/palemoon/locales/en-US/searchplugins/ddg-lite.xml deleted file mode 100644 index a6adbdb4bc..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/ddg-lite.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - DuckDuckGo (Lite) - Search DuckDuckGo (Lite) - UTF-8 - DuckDuckGo Search (Lite, non-JS) - data:image/x-icon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAATCwAAEwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA11RgALs6oACbQ9wAj0v8AI9L/ACfQ9wAu0agANdUYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzzN4CNdL/oK/z//////////////////////+jsPv/BDXX/wAz0t4AAAAAAAAAAAAAAAAAAAAAAAAAAAAyzvNSduD//////8jK/v+P+Lf/IbQL/17RPP+J3Y//wOKX//////9YeuX/ADLO8wAAAAAAAAAAAAAAAAAw091piOX/8/X9/1Fx5P9xhu//WOWZ/0W9Lv9Lwjn/J8BB/xyDAP9bdfL/9fP//2mI5v8AMNPdAAAAAAc610YRQ9f//////0Zr4P8AGdD/sb32////////////wrv//wAh1/8MPab/ACPc/05r4///////EkPX/wc610YANtWkrr/y/6S48P8AJ9L/AB3R/+/w/v///////////3+D7f8AQeL/AYTw/wFr5/8AMNb/p7Tv/6698v8AM9WkADLW//////8yXt//AC3V/wAw1/////////////z///8A0P7/AKb1/wWI7P8AuPf/AJ3w/zZW3P//////ADHV/wAx2P//////AzrZ/wAu1/84ZOL////////////e////AND//wC1+f8Atff/AZbv/wY62f8ELNf//////wAw1/8AMtn//////wAw2f8ALNn/kKrz////+//cwbH////////////R////Rcb8/wDO/f8A/P//AHzo//////8AMNj/ADXa//////8vXuL/ACna/4yq9///79T/jUkg/9i+r///////r2Q0/7Cozv8BKdr/AirY/zdZ4P//////ADTa/wI72tOuv/T/prr0/wAl2v+JqPb//7yW/+bUxv/9+/n////u//W+n/+Op/L/ADPd/wAv2v+ru/T/r7/0/wI72tMLQd1DEEjg//////9Cbef/ADng///////////////////////R3///AC3g/wAy3v9SeOn//////xFI4P8LQd1DAAAAAAM64PNmiuz/9/j//2mN7f/m7P3///////////9Cb+n/ACXd/wAt3v9rju3//////2iL7P8DOuDzAAAAAAAAAAAAAAAAAT3g/0p16f//////3OT8/3OS7v8AKt3/ACPc/zhn5/+xw/b//////0956v8CPeD/AAAAAAAAAAAAAAAAAAAAAAAAAAAEPODzBUDh/5uz8//7/f7/////////////////prz0/wtF4v8FQeDzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtF5kYDQOOkADrj/wA44v8AOeP/ADzk/wVB46QPReZGAAAAAAAAAAAAAAAAAAAAAPAPAADgBwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAADAAwAA4AcAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAATCwAAEwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChIzyAnRNFwJ0TQryND0d8nRNH/J0TR/ydE0f8nRNH/I0PR3ydE0K8nRNFwKEjPIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChE00AlRdK/J0XS/ydF0v8nRdL/XXPd/11z3f94i+P/k6Lp/5Oi6f9rf+D/NVDV/ydF0v8nRdL/JUXSvyhE00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBAzxAnRNOvJ0XT/ydF0/8lRdK/KEXSYOvu+6/+/v6//v7+v/39/c////////////7+/r/J0fOAKEXSYCVF0r8nRdP/J0XT/ydE068gQM8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlRdUwJ0bT7ydG0/8nRtHPKETTQAAAAADHx8dA2vHhn5TYpN/o9+z/////////////////8PL83ydG0o8lRdUwAAAAAChE00AnRtHPJ0bT/ydG0+8lRdUwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKEXVYCdG1P8nRtT/KEbTgAAAAAAmRtZQI0PU38jIyP/F6s//Rrtk/0a7ZP9/yIr/c796/4vLkv+JpNf/M3Kq/zyWh/8zeKTfJkbWUAAAAAAoRtOAJ0bU/ydG1P8oRdVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVF1TAnR9X/J0fV/yhF1WAgQM8QJ0fTrydH1f9CW8//2tra/6Pdsv9Gu2T/Rrtk/0WzWv9Gu2T/Rrtk/0a7ZP9Gu2T/Rrtk/z6egP8nR9X/J0fTryBAzxAoRdVgJ0fV/ydH1f8lRdUwAAAAAAAAAAAAAAAAAAAAAAAAAAAgQM8QJ0fV7ydH1f8oSNVgIEDPECdH1c8nR9X/J0fV/1xwyf/t7e3/o92y/0a7ZP9Gu2T/Ra5U/0a7ZP9Gu2T/Rrtk/0a7ZP9Gu2T/Pp6A/ydH1f8nR9X/J0fVzyBAzxAoSNVgJ0fV/ydH1e8gQM8QAAAAAAAAAAAAAAAAAAAAACdH1q8nR9b/KEjVgCBQzxAnR9bPJ0fW/ydH1v8nR9b/gIzB//r6+v+j3bL/Rrtk/13Ed/+i26//ruG7/z6egf8+noH/Rrtk/0a7ZP86kI//J0fW/ydH1v8nR9b/J0fWzyBQzxAoSNWAJ0fW/ydH1q8AAAAAAAAAAAAAAAAoSNdAJkjW/yZH1s8AAAAAJEfWryZI1v8mSNb/JkjW/yZI1v+jqsT//////+j37P/R7tj////////////W3ff/JkjW/yZI1v8uZbr/PJeI/zJzrP8mSNb/JkjW/yZI1v8mSNb/JEfWrwAAAAAmR9bPJkjW/yhI10AAAAAAAAAAACVI1r8mSNf/KEjXQCZJ1lAmSNf/JkjX/yZI1/8mSNf/JkjX/9HR0f///////////////////////////5Ok6/8mSNf/JkjX/yZI1/8mSNf/JkjX/yZI1/8mSNf/JkjX/yZI1/8mSNf/JknWUChI10AmSNf/JUjWvwAAAAAoSNcgJknY/yZH2M8AAAAAI0nY3yZJ2P8mSdj/JknY/yZJ2P9KZM//39/f////////////////////////////XHfi/yZJ2P8mSdj/JknY/yZJ2P8mSdj/JknY/yZJ2P8mSdj/JknY/yZJ2P8jSdjfAAAAACZH2M8mSdj/KEjXICdJ2HAmSdj/JUjXYCVK2jAmSdj/JknY/yZJ2P8mSdj/JknY/2V4yf/t7e3///////////////////////////9cd+L/HXTj/xSf7/8Nwfj/CdL8/wnS/P8J0vz/ELDz/xt85v8mSdj/JknY/yZJ2P8lStowJUjXYCZJ2P8nSdhwJErZryZK2f8oSNcgJUnajyZK2f8mStn/JkrZ/yZK2f8mStn/iJPA////////////////////////////0ff+/xjV/P8J0vz/Drn1/xiO6/8Yjuv/GI7r/xCw8/8Lyvr/CdL8/xmF6P8mStn/JkrZ/yVJ2o8oSNcgJkrZ/yRK2a8jStrfI0rZ3wAAAAAlSdq/Jkra/yZK2v8mStr/Jkra/yZK2v+xtsf///////////////////////////8o2Pz/CdL8/wvK+v8mStr/Jkra/yZK2v8mStr/Jkra/yZK2v8iW97/Jkra/yZK2v8mStr/JUnavwAAAAAjStnfI0ra3yZK2v8lSdq/AAAAACZH2O8mStr/Jkra/yZK2v8mStr/L1HY/9HR0f///////////////////////////yjY/P8J0vz/CdL8/xCw9P8QsPT/ELD0/xSf7/8ddeX/Jkra/yZK2v8mStr/Jkra/yZK2v8mR9jvAAAAACVJ2r8mStr/Jkvb/yVJ2r8AAAAAJkvb/yZL2/8mS9v/Jkvb/yZL2/9KZtL/4+Pj////////////////////////////4Pn//0fd/f8J0vz/CdL8/wnS/P8J0vz/CdL8/wnS/P8Lyvr/Fpfu/yJc3/8mS9v/Jkvb/yZL2/8AAAAAJUnavyZL2/8mS9z/JUncvwAAAAAmS9z/Jkvc/yZL3P8mS9z/Jkvc/26AyP/x8fH//////////////////////////////////////9H3/v/C9P7/o+7+/2fa+/8Oufb/CdL8/wnS/P8J0vz/CdL8/xiP7P8mS9z/Jkvc/wAAAAAlSdy/Jkvc/yZM3P8lTNy/AAAAACZJ2e8mTNz/Jkzc/yZM3P8mTNz/iJTB////////////qnth/5VaOf/x6eX///////////////////////Hp5f/x6eX/ydL2/yZM3P8kVN7/G37o/xKo8v8QsfT/HXbm/yZM3P8mSdnvAAAAACVM3L8mTNz/I0vc3yZJ2u8AAAAAJUzevyZM3f8mTN3/Jkzd/yZM3f+fqc3///////////+VWjn/v5yI/+re1///////////////////////jk8s/7iRe//J0vb/Jkzd/yZM3f8mTN3/Jkzd/yZM3f8mTN3/Jkzd/yVM3r8AAAAAI0vc3yNL3N8kTd2vJk3d/yhQ3yAlTd2PJk3d/yZN3f8mTd3/Jk3d/6St0v////////////Hp5f/q3tf///////////////////////////+xhm7/49PK/6Cx8P8mTd3/Jk3d/yZN3f8mTd3/Jk3d/yZN3f8mTd3/JU3djyhQ3yAmTd3/JE3drydN33AmTd7/J03fcCVK3zAmTd7/Jk3e/yZN3v8mTd7/pK7S///////Sp5r/////////////////////////////////////////////////T27k/yZN3v8mTd7/Jk3e/yZN3v8mTd7/Jk3e/yZN3v8lSt8wJ03fcCZN3v8nTd9wKFDfICZO3/8mTt3PAAAAACVN3r8mTt//Jk7f/yZO3/+EltX//////+fRyv/SqaD/59LO///////////////////////at63/vIBy/7Glxf8mTt//Jk7f/yZO3/8mTt//Jk7f/yZO3/8mTt//JU3evwAAAAAmTt3PJk7f/yhQ3yAAAAAAJE/dryZO3/8oUN9AKFDfQCZO3/8mTt//Jk7f/zhb2v/o6/T/////////////////////////////////////////////////XHrn/yZO3/8mTt//Jk7f/yZO3/8mTt//Jk7f/yZO3/8oUN9AKFDfQCZO3/8kT92vAAAAAAAAAAAoUN9AJk7g/yZO4M8AAAAAJk/hnyZO4P8mTuD/Jk7g/05v5v/k6fv//////////////////////////////////////3eR7P8mTuD/Jk7g/yZO4P8mTuD/Jk7g/yZO4P8mTuD/Jk/hnwAAAAAmTuDPJk7g/yhQ30AAAAAAAAAAAAAAAAAjT+GfJU/h/yVO4Y8gUN8QIk7gzyVP4f8lT+H/SWnW/0lp1v+bq+H/8fHx/////////////////6Cy8v9OcOb/JU/h/yVP4f8lT+H/JU/h/yVP4f8lT+H/JU/h/yJO4M8gUN8QJU7hjyVP4f8jT+GfAAAAAAAAAAAAAAAAAAAAACBQ3xAlTOHvJU/h/yVQ4mAgUN8QIk7hzyVP4f+ktOv///////////////////////H0/f9phur/JU/h/yVP4f8lT+H/JU/h/yVP4f8lT+H/JU/h/yVP4f8iTuHPIFDfECVQ4mAlT+H/JUzh7yBQ3xAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ3zAlUOLvJVDi/yVQ4mAgUN8QI1Din4mb2//J0/j/ydP4/6299P93ku3/M1vk/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/I1DinyBQ3xAlUOJgJVDi/yVQ4u8lUN8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ5DAlUOLvJVDi/yVQ4o8AAAAAJFDjQCVQ4r8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDivyRQ40AAAAAAJVDijyVQ4v8lUOLvJVDkMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ5DAjUeTfJVHj/yNR5N8kUONAAAAAACVQ5DAmUuOAJVHivyNR5N8lUeP/JVHj/yNR5N8lUeK/JlLjgCVQ5DAAAAAAJFDjQCNR5N8lUeP/I1Hk3yVQ5DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBQ3xAjUuSfJVHk/yVR5P8jUeTfJFLkcChQ5yAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoUOcgJFLkcCNR5N8lUeT/JVHk/yNS5J8gUN8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkUONAI1LknyVS5P8lUuT/JVLk/yVS5O8lUeS/JVHkvyVR5L8lUeS/JVLk7yVS5P8lUuT/JVLk/yRS468kUONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFDfECVS5GAjUuWfIlPlzyVS5f8lUuX/JVLl/yVS5f8iU+XPI1LlnyVS5GAgUN8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/AA///AAD//AAAP/ggBB/wgAEP4AAAB8AAAAPAAAADiAAAEYAAAAEQAAAIAAAAAAAAAAAgAAAEIAAABCAAAAQgAAAEIAAABCAAAAQAAAAAAAAAABAAAAiAAAABiAAAEcAAAAPAAAAD4AAAB/CAAQ/4IAQf/AfgP/8AAP//wAP/ - - - - - - - - diff --git a/application/palemoon/locales/en-US/searchplugins/duckduckgo-palemoon.xml b/application/palemoon/locales/en-US/searchplugins/duckduckgo-palemoon.xml deleted file mode 100644 index ae03986141..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/duckduckgo-palemoon.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - DuckDuckGo - Search DuckDuckGo - UTF-8 - Search Plugin for DuckDuckGo (HTTPS version) - data:image/x-icon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAATCwAAEwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA11RgALs6oACbQ9wAj0v8AI9L/ACfQ9wAu0agANdUYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzzN4CNdL/oK/z//////////////////////+jsPv/BDXX/wAz0t4AAAAAAAAAAAAAAAAAAAAAAAAAAAAyzvNSduD//////8jK/v+P+Lf/IbQL/17RPP+J3Y//wOKX//////9YeuX/ADLO8wAAAAAAAAAAAAAAAAAw091piOX/8/X9/1Fx5P9xhu//WOWZ/0W9Lv9Lwjn/J8BB/xyDAP9bdfL/9fP//2mI5v8AMNPdAAAAAAc610YRQ9f//////0Zr4P8AGdD/sb32////////////wrv//wAh1/8MPab/ACPc/05r4///////EkPX/wc610YANtWkrr/y/6S48P8AJ9L/AB3R/+/w/v///////////3+D7f8AQeL/AYTw/wFr5/8AMNb/p7Tv/6698v8AM9WkADLW//////8yXt//AC3V/wAw1/////////////z///8A0P7/AKb1/wWI7P8AuPf/AJ3w/zZW3P//////ADHV/wAx2P//////AzrZ/wAu1/84ZOL////////////e////AND//wC1+f8Atff/AZbv/wY62f8ELNf//////wAw1/8AMtn//////wAw2f8ALNn/kKrz////+//cwbH////////////R////Rcb8/wDO/f8A/P//AHzo//////8AMNj/ADXa//////8vXuL/ACna/4yq9///79T/jUkg/9i+r///////r2Q0/7Cozv8BKdr/AirY/zdZ4P//////ADTa/wI72tOuv/T/prr0/wAl2v+JqPb//7yW/+bUxv/9+/n////u//W+n/+Op/L/ADPd/wAv2v+ru/T/r7/0/wI72tMLQd1DEEjg//////9Cbef/ADng///////////////////////R3///AC3g/wAy3v9SeOn//////xFI4P8LQd1DAAAAAAM64PNmiuz/9/j//2mN7f/m7P3///////////9Cb+n/ACXd/wAt3v9rju3//////2iL7P8DOuDzAAAAAAAAAAAAAAAAAT3g/0p16f//////3OT8/3OS7v8AKt3/ACPc/zhn5/+xw/b//////0956v8CPeD/AAAAAAAAAAAAAAAAAAAAAAAAAAAEPODzBUDh/5uz8//7/f7/////////////////prz0/wtF4v8FQeDzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtF5kYDQOOkADrj/wA44v8AOeP/ADzk/wVB46QPReZGAAAAAAAAAAAAAAAAAAAAAPAPAADgBwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAADAAwAA4AcAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAATCwAAEwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChIzyAnRNFwJ0TQryND0d8nRNH/J0TR/ydE0f8nRNH/I0PR3ydE0K8nRNFwKEjPIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChE00AlRdK/J0XS/ydF0v8nRdL/XXPd/11z3f94i+P/k6Lp/5Oi6f9rf+D/NVDV/ydF0v8nRdL/JUXSvyhE00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBAzxAnRNOvJ0XT/ydF0/8lRdK/KEXSYOvu+6/+/v6//v7+v/39/c////////////7+/r/J0fOAKEXSYCVF0r8nRdP/J0XT/ydE068gQM8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlRdUwJ0bT7ydG0/8nRtHPKETTQAAAAADHx8dA2vHhn5TYpN/o9+z/////////////////8PL83ydG0o8lRdUwAAAAAChE00AnRtHPJ0bT/ydG0+8lRdUwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKEXVYCdG1P8nRtT/KEbTgAAAAAAmRtZQI0PU38jIyP/F6s//Rrtk/0a7ZP9/yIr/c796/4vLkv+JpNf/M3Kq/zyWh/8zeKTfJkbWUAAAAAAoRtOAJ0bU/ydG1P8oRdVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVF1TAnR9X/J0fV/yhF1WAgQM8QJ0fTrydH1f9CW8//2tra/6Pdsv9Gu2T/Rrtk/0WzWv9Gu2T/Rrtk/0a7ZP9Gu2T/Rrtk/z6egP8nR9X/J0fTryBAzxAoRdVgJ0fV/ydH1f8lRdUwAAAAAAAAAAAAAAAAAAAAAAAAAAAgQM8QJ0fV7ydH1f8oSNVgIEDPECdH1c8nR9X/J0fV/1xwyf/t7e3/o92y/0a7ZP9Gu2T/Ra5U/0a7ZP9Gu2T/Rrtk/0a7ZP9Gu2T/Pp6A/ydH1f8nR9X/J0fVzyBAzxAoSNVgJ0fV/ydH1e8gQM8QAAAAAAAAAAAAAAAAAAAAACdH1q8nR9b/KEjVgCBQzxAnR9bPJ0fW/ydH1v8nR9b/gIzB//r6+v+j3bL/Rrtk/13Ed/+i26//ruG7/z6egf8+noH/Rrtk/0a7ZP86kI//J0fW/ydH1v8nR9b/J0fWzyBQzxAoSNWAJ0fW/ydH1q8AAAAAAAAAAAAAAAAoSNdAJkjW/yZH1s8AAAAAJEfWryZI1v8mSNb/JkjW/yZI1v+jqsT//////+j37P/R7tj////////////W3ff/JkjW/yZI1v8uZbr/PJeI/zJzrP8mSNb/JkjW/yZI1v8mSNb/JEfWrwAAAAAmR9bPJkjW/yhI10AAAAAAAAAAACVI1r8mSNf/KEjXQCZJ1lAmSNf/JkjX/yZI1/8mSNf/JkjX/9HR0f///////////////////////////5Ok6/8mSNf/JkjX/yZI1/8mSNf/JkjX/yZI1/8mSNf/JkjX/yZI1/8mSNf/JknWUChI10AmSNf/JUjWvwAAAAAoSNcgJknY/yZH2M8AAAAAI0nY3yZJ2P8mSdj/JknY/yZJ2P9KZM//39/f////////////////////////////XHfi/yZJ2P8mSdj/JknY/yZJ2P8mSdj/JknY/yZJ2P8mSdj/JknY/yZJ2P8jSdjfAAAAACZH2M8mSdj/KEjXICdJ2HAmSdj/JUjXYCVK2jAmSdj/JknY/yZJ2P8mSdj/JknY/2V4yf/t7e3///////////////////////////9cd+L/HXTj/xSf7/8Nwfj/CdL8/wnS/P8J0vz/ELDz/xt85v8mSdj/JknY/yZJ2P8lStowJUjXYCZJ2P8nSdhwJErZryZK2f8oSNcgJUnajyZK2f8mStn/JkrZ/yZK2f8mStn/iJPA////////////////////////////0ff+/xjV/P8J0vz/Drn1/xiO6/8Yjuv/GI7r/xCw8/8Lyvr/CdL8/xmF6P8mStn/JkrZ/yVJ2o8oSNcgJkrZ/yRK2a8jStrfI0rZ3wAAAAAlSdq/Jkra/yZK2v8mStr/Jkra/yZK2v+xtsf///////////////////////////8o2Pz/CdL8/wvK+v8mStr/Jkra/yZK2v8mStr/Jkra/yZK2v8iW97/Jkra/yZK2v8mStr/JUnavwAAAAAjStnfI0ra3yZK2v8lSdq/AAAAACZH2O8mStr/Jkra/yZK2v8mStr/L1HY/9HR0f///////////////////////////yjY/P8J0vz/CdL8/xCw9P8QsPT/ELD0/xSf7/8ddeX/Jkra/yZK2v8mStr/Jkra/yZK2v8mR9jvAAAAACVJ2r8mStr/Jkvb/yVJ2r8AAAAAJkvb/yZL2/8mS9v/Jkvb/yZL2/9KZtL/4+Pj////////////////////////////4Pn//0fd/f8J0vz/CdL8/wnS/P8J0vz/CdL8/wnS/P8Lyvr/Fpfu/yJc3/8mS9v/Jkvb/yZL2/8AAAAAJUnavyZL2/8mS9z/JUncvwAAAAAmS9z/Jkvc/yZL3P8mS9z/Jkvc/26AyP/x8fH//////////////////////////////////////9H3/v/C9P7/o+7+/2fa+/8Oufb/CdL8/wnS/P8J0vz/CdL8/xiP7P8mS9z/Jkvc/wAAAAAlSdy/Jkvc/yZM3P8lTNy/AAAAACZJ2e8mTNz/Jkzc/yZM3P8mTNz/iJTB////////////qnth/5VaOf/x6eX///////////////////////Hp5f/x6eX/ydL2/yZM3P8kVN7/G37o/xKo8v8QsfT/HXbm/yZM3P8mSdnvAAAAACVM3L8mTNz/I0vc3yZJ2u8AAAAAJUzevyZM3f8mTN3/Jkzd/yZM3f+fqc3///////////+VWjn/v5yI/+re1///////////////////////jk8s/7iRe//J0vb/Jkzd/yZM3f8mTN3/Jkzd/yZM3f8mTN3/Jkzd/yVM3r8AAAAAI0vc3yNL3N8kTd2vJk3d/yhQ3yAlTd2PJk3d/yZN3f8mTd3/Jk3d/6St0v////////////Hp5f/q3tf///////////////////////////+xhm7/49PK/6Cx8P8mTd3/Jk3d/yZN3f8mTd3/Jk3d/yZN3f8mTd3/JU3djyhQ3yAmTd3/JE3drydN33AmTd7/J03fcCVK3zAmTd7/Jk3e/yZN3v8mTd7/pK7S///////Sp5r/////////////////////////////////////////////////T27k/yZN3v8mTd7/Jk3e/yZN3v8mTd7/Jk3e/yZN3v8lSt8wJ03fcCZN3v8nTd9wKFDfICZO3/8mTt3PAAAAACVN3r8mTt//Jk7f/yZO3/+EltX//////+fRyv/SqaD/59LO///////////////////////at63/vIBy/7Glxf8mTt//Jk7f/yZO3/8mTt//Jk7f/yZO3/8mTt//JU3evwAAAAAmTt3PJk7f/yhQ3yAAAAAAJE/dryZO3/8oUN9AKFDfQCZO3/8mTt//Jk7f/zhb2v/o6/T/////////////////////////////////////////////////XHrn/yZO3/8mTt//Jk7f/yZO3/8mTt//Jk7f/yZO3/8oUN9AKFDfQCZO3/8kT92vAAAAAAAAAAAoUN9AJk7g/yZO4M8AAAAAJk/hnyZO4P8mTuD/Jk7g/05v5v/k6fv//////////////////////////////////////3eR7P8mTuD/Jk7g/yZO4P8mTuD/Jk7g/yZO4P8mTuD/Jk/hnwAAAAAmTuDPJk7g/yhQ30AAAAAAAAAAAAAAAAAjT+GfJU/h/yVO4Y8gUN8QIk7gzyVP4f8lT+H/SWnW/0lp1v+bq+H/8fHx/////////////////6Cy8v9OcOb/JU/h/yVP4f8lT+H/JU/h/yVP4f8lT+H/JU/h/yJO4M8gUN8QJU7hjyVP4f8jT+GfAAAAAAAAAAAAAAAAAAAAACBQ3xAlTOHvJU/h/yVQ4mAgUN8QIk7hzyVP4f+ktOv///////////////////////H0/f9phur/JU/h/yVP4f8lT+H/JU/h/yVP4f8lT+H/JU/h/yVP4f8iTuHPIFDfECVQ4mAlT+H/JUzh7yBQ3xAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ3zAlUOLvJVDi/yVQ4mAgUN8QI1Din4mb2//J0/j/ydP4/6299P93ku3/M1vk/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/I1DinyBQ3xAlUOJgJVDi/yVQ4u8lUN8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ5DAlUOLvJVDi/yVQ4o8AAAAAJFDjQCVQ4r8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDivyRQ40AAAAAAJVDijyVQ4v8lUOLvJVDkMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ5DAjUeTfJVHj/yNR5N8kUONAAAAAACVQ5DAmUuOAJVHivyNR5N8lUeP/JVHj/yNR5N8lUeK/JlLjgCVQ5DAAAAAAJFDjQCNR5N8lUeP/I1Hk3yVQ5DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBQ3xAjUuSfJVHk/yVR5P8jUeTfJFLkcChQ5yAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoUOcgJFLkcCNR5N8lUeT/JVHk/yNS5J8gUN8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkUONAI1LknyVS5P8lUuT/JVLk/yVS5O8lUeS/JVHkvyVR5L8lUeS/JVLk7yVS5P8lUuT/JVLk/yRS468kUONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFDfECVS5GAjUuWfIlPlzyVS5f8lUuX/JVLl/yVS5f8iU+XPI1LlnyVS5GAgUN8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/AA///AAD//AAAP/ggBB/wgAEP4AAAB8AAAAPAAAADiAAAEYAAAAEQAAAIAAAAAAAAAAAgAAAEIAAABCAAAAQgAAAEIAAABCAAAAQAAAAAAAAAABAAAAiAAAABiAAAEcAAAAPAAAAD4AAAB/CAAQ/4IAQf/AfgP/8AAP//wAP/ - - - - - - - - - diff --git a/application/palemoon/locales/en-US/searchplugins/eBay.xml b/application/palemoon/locales/en-US/searchplugins/eBay.xml deleted file mode 100644 index c1c641c6b8..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/eBay.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - -eBay -eBay - Online auctions -ISO-8859-1 -data:image/x-icon;base64,AAABAAIAEBAAAAAAAAB6AQAAJgAAACAgAAAAAAAAQgMAAKABAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAFBSURBVDjLtZPdK0MBGIf3J5Babhx3rinFBWuipaUskX9DYvkopqgV90q5UJpyp0OKrUWM2VrRsS9D0zZKHGaOnW1nj4vtypVtPPe/533r9746QAAOAJXfo5Yzgg44pHrcugon/6Sgo0b+XuAOZ2iZiVQmyPoDpIwmUkYTzqM7GsdDdC7F6Lbf8pzOkfWOouzqeZem2b+2AqAV8zjD8yVBqqcf2b7C66yNiMGMfixIQSvi8Mp0LEbR5ADq1QSKWM+Gx0RC9nOZ2GLzwlIWdPWiuNzk4w/EpThNkyEAXKEP2ud8KGId2sspilhPMrmNwzfCuqePr/xbSfC5I/I0MMSj2YJ3z49gDdO2cEOrLUowJpE9G0QRG1ClKbR0EIdvmOPYcnUtnN+vsnZiQC1k/qnGagQ1n3LNzySUJZVskitnmr8BlQG7T2hvgxsAAAAASUVORK5CYIKJUE5HDQoaCgAAAA1JSERSAAAAIAAAACAIBgAAAHN6evQAAAMJSURBVFjD7ZddSFNhGMeHXXQTZFFCWfR1pRhUECQlBdWVToo+6KYu1KigtDASG5qUfZgFZvahEDosECPDktKZS1FL+1DRnEvdUptjug91X2dnZzv/3vO6OZbWnR4v9sADL+fs7P97/s/znu2VAJD4UkpSSdKG+QubTyPBr+sXz8XCR64fIAHihVTis0SsUAoAVhEBrBKIHCGAEMB/ARi3F5LkbpS2WMRzYEEBXC2tsD6T03R9agsCGLNyqPw6CXmrBT06JvhbPHZwmkdwtR0B138PPKOHgzXD5jLAy3tmibo4K9weZwDAazJj/FQKRnfugfHMeRiTz0K3Ixam1HQKcPC+Fisu9NK1P08Uj4DleHgMdXC+WQ7nu3UEOhFMfTQcVUvQ1H4IN2sj8H2k7K+2TqCc3GseyA8AmDOzMBq7D9bS8sAr6nEJdNt3UbHVF1XQGtmZew8bTPT6tWoD3KpsUvlR8NxUoEICMvl6KQo+xqCwcRs4T8Ax5c8bFExjbAgAjO7aS8VsLypgq3g5nWStjztAhWRVhqAqeB6IuKTClkw1eNYEbrCQQBwD8yGGOsAooogLYejQPKBi7UPF9DkH+ezd+o141ZkUPAOC+L9SAMivNc7q46YMNSLTe4n1kaQF4XD3ZIDTPgU3XEYciKcAHrsGJS1xKFBGgyVzouiT4VbdGhjt/cEA5isyKsaz7jl3we7bg7Rqf6j0LoSldON4wWcqJDgQNGTN++l13vELA+MK6kKd6iryFOvxtidt9i5gO7owdjKJQliflNAU1pas6xQgnAzg1ux+lJEdILixNr0Pq9JUUA8NwVG9DM73G0jlcnh+V4BpjIWzJmIGQIjnXw5TiDuKSEwxurm3ITc8DNO51BnrLbIcsrW0dNA6RxgUKU1UdGVqLy5X6qGzTLvlnewiBZyGs3Yz6X8UeaYI3olvZDhzwLumZ+eHvooCCC0Q5VUsb4unwycM4YIDqA01tPqmgbzQr2EIYPECiPm33LYoDiZSsY9moh9O/Znoa4d9HkXtPg2pX/cPKCoRQ+ocZa4AAAAASUVORK5CYII= - - - - - - - -http://search.ebay.com/ - - diff --git a/application/palemoon/locales/en-US/searchplugins/ecosia.xml b/application/palemoon/locales/en-US/searchplugins/ecosia.xml deleted file mode 100644 index 04c8d229b2..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/ecosia.xml +++ /dev/null @@ -1,12 +0,0 @@ - - Ecosia - Search Ecosia - UTF-8 - info@ecosia.org - Ecosia Search - - data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAACMuAAAjLgAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8qzQBuaw3UrmsN6u5rDfruaw37bmsN+25rDfSuaw3fLmsNyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC2rTokrLFGurqsNv+5rDf/uaw3/7msN/+5rDf/uaw3/7urNP/AqS7suqw2aAAAAAAAAAAAAAAAAAAAAAC/qjApkbpn4mvJlf/EqCr/uaw3/7msN/+5rDf/uaw3/7urNP+rsUj/ib5x/7qsNv+9qzKBAAAAAAAAAAC5rDcLwKkvzom9cf813Nb/lrlh/8KoLP+5rDf/uaw3/7msN//BqS3/eMSF/yXj6v+BwHv/lbli/7atO1IAAAAAuaw3bsCqL/+Rumb/K+Di/z3ZzP+dtln/vqox/7msN/+5rDf/waku/23Ikv8s4OH/ONvS/5m4Xv+7qzXZuaw3CbmsN9DBqS7/hL93/zDe3f8v393/RdbD/7OuPv+7qzX/uqw2/8WoKf99wn//Lt/e/y/e3f99wn//v6ow/7msN0+7qzT7s64+/0bWwf8y3tn/L97d/03TuP+usET/vKoz/7isOP+vr0P/XM6n/zDe3P813Nb/L97d/5O6Zf/EpymOu6s0/7OuPv8+2cv/J+Hn/1HStP+0rjz/vasy/76qMP9zxYr/NtzV/zTd1/823NX/NtzV/zLd2f9I1b//mbheqsGpLf+gtVX/bseR/3fEhv+wr0L/vaoy/7msN/+/qjD/Wc+q/yvg4/813Nb/Md7b/zfc1P833NT/Mt7a/zbc1aqHvnT6bMiT/522WP+wr0L/vqox/7msN/+5rDf/vaoy/6C1VP8/2cr/N9zT/2vJlf9hzKD/NtzU/zbc1f813NaONdzWz3HGjv9ky53/prNN/8SoKv+8qzT/uaw3/7msOP/EqCr/ecOE/0HYx/9V0K//N9vT/zXc1v823NX/NtzVTjXc120w3tz/Lt/e/0zUu/+Fv3X/rrBF/7msN/+7qzX/vaoy/6qxSf9G1sH/L9/d/zPd2P8x3tv/L9/e2C/f3Qk23NUKNtzVzDbc1v823NX/OdvQ/0nVvv+xr0H/ta07/7+qL/+7qzT/r69D/2LMoP823NX/VNGx/2TLnVEAAAAAAAAAADbc1Sc03dfgQNnJ/2bKm/862tD/pLRP/1vOqf9S0rP/ib1x/8CpL/+4rDj/qLJM/7qsNn4AAAAAAAAAAAAAAAAAAAAAM93YI0vUvLtux5H/VdGw/3DHj/9Zz6r/Xc2m/3rDgv+5rDf/u6s1672rM2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyaYjUburNaytsUbZuK056cGpLuS/qjDGuaw3gLmsNx4AAAAAAAAAAAAAAAAAAAAA+D8AAOAPAADAAwAAgAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAgAMAAMAHAADgDwAA+B8AAA== - - - - diff --git a/application/palemoon/locales/en-US/searchplugins/ekoru.xml b/application/palemoon/locales/en-US/searchplugins/ekoru.xml deleted file mode 100644 index 84f75bddd2..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/ekoru.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Ekoru - Ekoru - fight climate change with every search - UTF-8 - Ekoru Search - data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABMLAAATCwAAAAAAAAAAAAAAAAAAxKIkAKyyPgLUmhFN2JkKwtKfEObJoxrvyaQb8NCgEenTmQvTzJQRe8CUHg/FlBYAkpLMAAAAAAAAAAAAxaEoABa5/wDUng9Z1aAJ562pI/96skP+Y7RQ9mS1Uvh3tEX/qaoi/82eB/rOmQycyJQaEsqWFQAAAAAAAAAAANagBwDSnxA606EJ45OuNP9Qt1neQbVYdDyyWDs/s1dDQrdcgFC6ZN2Psjj/zKQF/s2fCoqunzsIt54sDv9tAADQnSQN158IsJ+tKv9Ot1XiRq9QPuShCg63qiY9uqsnPt2fEA1Cs2MyTLtt0JyyLP/OpQTrvKUcR6enKnnMnhce2J4NUMalEfJht1T+Q7RTc7yqIjaKt07BZsBv+GnAbveAu1q6q687Jz65cE9hu2D1vakO/8ilCoiRqjKNw6AaddyhCKOprCX/Sblf2oesM0CTtkTMT8SC6z7Fj347xpRrSMiQ2nLAcKpxrUsYS71wx6KxK//Opge2gqs2d7ykGb7dpAjdkK82/0S1WqqxrCNzar9q/z3EioS3aWABMtSuADrKoHBVypPToLBFFUW9d6OLtkP/zKgKx3+uNW26phfk2aUG+YaxO/9Es1mHq64sj1jDfP8+wYJmQ9G0J0DOqmNBzqOrWMmRkp+WKwZCvnuniLZI/8enCrt8rz1xv6YW99mlBfuJsTr/RLRbd7KtJ4JiwnT/QMODlVLHmgtMzaNRWcmTXIC+chFEum0kRMN/2pqzO//FqA+Sd68/iMWjE/jcpgbilq80/0K4Yoi/qRxQhrlS+kLGi+ZDvHxMZpdOBGWRPAJGu3YnPcSEql/CcP+1rh/wqakiUISuNrzQogzc3KQHpLarH/9Rt1vCg6gzIK6vJ7Z1vmH/RsWK7UHDi7o9xYm0QMeM4VfEfP+hszT9w6gWilOzU1GfrCbz1qEKldajD0vTpgrweLNE+EK0WF3Cqhsota8jupi2QPt/u1r/eb1c/4u5TP+rsSruwKwXh2axRjJ4sTzHxaUQ59ifEDnMoSkJ2qIJobioGf9gtE/hQbRUTbKoJxW+qx1YuasdkbusGZ7CrBh8vaocOk+xUDR2sDu7vacT/tagCoOvmU8C1qAQANSfFifXnwjMtKgd/2qzRe5Os1CaQbNTTT2yUjRBsFI3QLJST1aySI2GrjDhwqUQ/9afCLDTnBwU1J0XALqZOwDhowAA0p4VLdafCazGpA/zpaoi/4yuLvt7rzTyfK408o2sLfuwqBn/0aMH8digCZbRnBgb1Z0OAK2OZwAAAAAAqIddAMqeEADHmyAM1Z4OUdegB6bUoQbe0aIH+NGiB/vWoAjj1Z8IqdafD0zQoyEI06MYAAAAAAAAAAAAwA8AAIAHAACAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAADAAwAA4AcAAA== - - - diff --git a/application/palemoon/locales/en-US/searchplugins/list.txt b/application/palemoon/locales/en-US/searchplugins/list.txt deleted file mode 100644 index dbfdd0a1ac..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/list.txt +++ /dev/null @@ -1,8 +0,0 @@ -duckduckgo-palemoon -bing -ddg-lite -ecosia -ekoru -twitter -wikipedia -yahoo diff --git a/application/palemoon/locales/en-US/searchplugins/twitter.xml b/application/palemoon/locales/en-US/searchplugins/twitter.xml deleted file mode 100644 index e1909e77f0..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/twitter.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - -Twitter -Realtime Twitter Search -UTF-8 -data:image/x-icon;base64,AAABAAIAEBAAAAAAAAALAgAAJgAAACAgAAAAAAAAQQQAADECAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAHSSURBVDjLfVO/axRREP6SS0ihlv4FQpoYWxHyHxgCsUxhmToBS4tF7NLZWaiIEHLv7d5dJNEQ0tgYEAmIjeAfYC57++7MGbzLjxu/Nxt27zZrBoadnZnvm3kz7wEqMpZqmdAfBBMIZBzGVGCkorbXq4kFp/yPtBgPZCJzZvYQuNZ+jKhVo75G2LyHVz9uoeFmc6bILaHaepv9v/w6iRcypXbonmNPBB9OBbv82tYfmPgn7NHTnKAaP8E+g8Ztot68k/nXDm8ooNEVhHEP1vXROBbUf/M/Wc0Jwl8zsEkHOxcMtE6Y+A42nodpLtLfR9QWRMmA9jm2eh78aXQY4eF9VvjCgKDWEewM2PIZQc4nD9Sf6hk+sohNqorzW0kN91BBdYKtO9dE/00JZITA50XxsxTHlWarqMYBh/O3UPGqrednx7ox3o+UhbIRT7O1BO9PfIsXI5V9J34WvrqN94buwFi+b3N0k0nrCjAFAp1+Nz1Czd3N2y8Tm6ywYk9JTHKqk/cD9cM17YW89WExbo6Ja1zhvgK3+4Itql+rt8PkO1f6oBysBN3brLrMVhs84wHJvpHoMwnf8CI9ygZd3nbJgymrMvxeSoLjmlCsIJf+a17lP6juZmUWkMzvAAAAAElFTkSuQmCCiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAECElEQVRYw+1XS2gTURS9ia0/EMSCCC4siCIKrly4UVwIrgRR3KgbXQmCCiIiCha7EQRR6cIupHShSeZjf6lttdWFgqBRBPGDKIqF1mQ+1Wp/SZvnvXfmTWfMpJ3U0pUPHplJ3rv33HO/Afi/5nPViTjuKm8rYlFlAoSI8a500R1SGLYUZRH+Hvee6+qqygvxW1KJ1XLd+74aUuY+0OzjoHw/BElj4zQQHxv0HDBUvjR9WQlNYmnJhSjK9dxFUC0LOsYE3M8LSI8LUKw8AmoG5ecqPtP8vgZ04zKeO+jqjUtBDi2qWY+71xPaKKpnpF0uzUpCnxDQOixQ+BSo9iR/3vsh4CF+r5of8D3F75r9udQAKUwx++AJXkhZCe9QBkGEuUSC1swTjhK0VrUmEYzw7SKCyUPrLwEP8IxufQN9aCfKPwCJwdq/lCPluvUG2n4jhQW8bD6Hu+amABvSd/LOTbEENOMjdIyicLuA1om/ADhbMqIZn/DMOMq+7iqPBanUzWfQOUGUjUFnnj5H0WdnQOlfFoxssdix3tjGgnWbrCuGKvdA4LmuSQJ6s9SN0zFwg6lS7Qmms+WngK4pEvAVg+w83MltCAAhAHSGFMwEgGQRq2quwZe2cShJkaYvtey39hEHMfsQL7cjxd1F4dBnPWUKVeMwaLmTkRggGd1oiJI9GxLcLg2NA8s5DTXzCKePbjtBJAVoVoGjmFxEwsgiCi5tFuoDDFinHcb9xWg6CBcjpS9ReReCeF9GOL5TsCEYhRkSs26HmSLXh2R2f8DlJS7Q7BZOwyhWzeZ3P2hijtJRG9wSXuQkIj27m1OKKKPUiQIiCv1ptF4x33rUh/Yb+aVqN8BjIf07HwDy0EPFzU2/ck0rgCpln8MgtOcBgOOiFizRSWt7aQCWA0GHdesSBuOAm+fFOQIoOFXVeBRqaGnvlsGIed5LwWiO/LP11KASg7tmt97fnRoz1Xj5NXc4WQP0Sliw6d4EN6mUdStyew8cbB6uQWGdXL+pPHMrjQLCVe40tHdo1NJoQ47X5XBnfKUykduBQ0U9+jEbKR5IOTc0IwfJb+tnjvwoq+3DCmxEV1iwvzyHtlzbSTnVHMRKuTm6crK8AcelDrGc/a/0r4WUsRcF3ebWzC4YCqt8Rbdo5XmO4IZj9IGSW+PFUuSVyu7BeeABIrdZMNFIfiSrCQQFouwDNHxQLyBQdK6nSPOfgftUSXWtaOlD67BkXkCLXrFV1IYJBAUifcpnspQHFjyjmi+4y8nBs6KIL1cJuRZkt6K1xzCYrvFAqdtptDCNz3dxX8V91Gsufqvn8r/CByJemd/kvJiprui/RAQkMaZR/r1i4W6a0rP/N/gXi6OvmDvBLoiyBV1/AN29Cs9hVFoUAAAAAElFTkSuQmCC -https://twitter.com/search/ - - - - - diff --git a/application/palemoon/locales/en-US/searchplugins/wikipedia.xml b/application/palemoon/locales/en-US/searchplugins/wikipedia.xml deleted file mode 100644 index 9f3ef6eea7..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/wikipedia.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - -Wikipedia (en) -Wikipedia, the free encyclopedia -UTF-8 -data:image/x-icon;base64,AAABAAIAEBAAAAAAAAA4AQAAJgAAACAgAAAAAAAAJAMAAGQBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAEFSURBVDjLxZPRDYJAEESJoQjpgBoM/9IBtoAl4KcUQQlSAjYgJWAH0gPmyNtkzEEuxkQTPzawc3Ozc3MQTc/JfVPR/wW6a+eKQ+Hyfe54B2wvrfXVqXLDfTCMd3j0VHksrTcH9bl2aZq+BCgEwCCPj9E4TdPYGj0C9CYAKdkmBrIIxiIYbvpbb2sSl8AiA+ywAbJE5YLpCImLU/WRDyIAWRgu4k1s4v50ODru4haYSCk4ntkuM0wcMAINXiPKTJQ9CfgB40phBr8DyFjGKkKEhYhCY4iCDgpAYAM2EZBlhJnsZxQUYBNkSkfBvjDd0ttPeR0mxREQ+OhfYOJ6EmL+l/qzn2kGli9cAF3BOfkAAAAASUVORK5CYIKJUE5HDQoaCgAAAA1JSERSAAAAIAAAACAIBgAAAHN6evQAAAIKSURBVFjD7ZdBSgNRDIYLguAB7FLwAkXwBl0JgiDYjQcY8ARduBJKu3I5C0EoWDxAT9AL9AK9QBeCIHQlCM/3DZOSmeZNZ2r1bQyEGV7yXv7kJZlJq6XIOXfs+crzwPPTnvnR863n05ZFufDD/T595Q4eauM37u/pWYwfeX53cegcABcuHg0AkEQE8AKAu4gAXv8BrAEMh0PXbrddt9t1vV4v406nk62laeqm02n2LjKYIuK5WCyyfeiLDF32yLn6TJ5mBFarlev3+9nBMMqsabkYhmezWcEd2ctTE/tYBwhgt14BhtmAV2VaLpdrAHioCW+VdwWy9IMAUBQjJcQFTwGqvcTD+Xy+oc8askZJyAYrnKEokCeWLpQkSSZvBIANYgSDVVEQQJaeyHQu1QIgiQNb6AmrTtaQ9+RFSLa1D4iXgfsrVITloeSFFZlaAEjAUMaXo2DJWQtVRe1OKF5aJUkf0NdglXO5VzQGoI2USwwD3LEl590CtdO3QBoT5WSFV+Q63Oha17ITgMlkslGSGBWPdeNiDR2SL1B6zQFINmOAkFOW5eTSURCdvX6OdUlapaWjsKX0dgOg26/VWHSUKhrPz35ISKwq76R9Wx+kKgC1f0o5mISsypUG3kPj2L/lDzKYvEUwzoh2JtPRdQQAo1jD6afne88H1oTMeH6ZK+x7PB/lQ/CJtvkNEgDh1dr/bVYAAAAASUVORK5CYII= - - - - - - - -http://en.wikipedia.org/wiki/Special:Search - diff --git a/application/palemoon/locales/en-US/searchplugins/yahoo.xml b/application/palemoon/locales/en-US/searchplugins/yahoo.xml deleted file mode 100644 index 244e85f4e2..0000000000 --- a/application/palemoon/locales/en-US/searchplugins/yahoo.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - -Yahoo -Yahoo Search -UTF-8 -data:image/x-icon;base64,AAABAAIAEBAAAAEACAA8DQAAJgAAACAgAAABAAgAowsAAGINAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAAJcEhZcwAACxMAAAsTAQCanBgAAApPaUNDUFBob3Rvc2hvcCBJQ0MgcHJvZmlsZQAAeNqdU2dUU+kWPffe9EJLiICUS29SFQggUkKLgBSRJiohCRBKiCGh2RVRwRFFRQQbyKCIA46OgIwVUSwMigrYB+Qhoo6Do4iKyvvhe6Nr1rz35s3+tdc+56zznbPPB8AIDJZIM1E1gAypQh4R4IPHxMbh5C5AgQokcAAQCLNkIXP9IwEA+H48PCsiwAe+AAF40wsIAMBNm8AwHIf/D+pCmVwBgIQBwHSROEsIgBQAQHqOQqYAQEYBgJ2YJlMAoAQAYMtjYuMAUC0AYCd/5tMAgJ34mXsBAFuUIRUBoJEAIBNliEQAaDsArM9WikUAWDAAFGZLxDkA2C0AMElXZkgAsLcAwM4QC7IACAwAMFGIhSkABHsAYMgjI3gAhJkAFEbyVzzxK64Q5yoAAHiZsjy5JDlFgVsILXEHV1cuHijOSRcrFDZhAmGaQC7CeZkZMoE0D+DzzAAAoJEVEeCD8/14zg6uzs42jrYOXy3qvwb/ImJi4/7lz6twQAAA4XR+0f4sL7MagDsGgG3+oiXuBGheC6B194tmsg9AtQCg6dpX83D4fjw8RaGQudnZ5eTk2ErEQlthyld9/mfCX8BX/Wz5fjz89/XgvuIkgTJdgUcE+ODCzPRMpRzPkgmEYtzmj0f8twv//B3TIsRJYrlYKhTjURJxjkSajPMypSKJQpIpxSXS/2Ti3yz7Az7fNQCwaj4Be5EtqF1jA/ZLJxBYdMDi9wAA8rtvwdQoCAOAaIPhz3f/7z/9R6AlAIBmSZJxAABeRCQuVMqzP8cIAABEoIEqsEEb9MEYLMAGHMEF3MEL/GA2hEIkxMJCEEIKZIAccmAprIJCKIbNsB0qYC/UQB00wFFohpNwDi7CVbgOPXAP+mEInsEovIEJBEHICBNhIdqIAWKKWCOOCBeZhfghwUgEEoskIMmIFFEiS5E1SDFSilQgVUgd8j1yAjmHXEa6kTvIADKC/Ia8RzGUgbJRPdQMtUO5qDcahEaiC9BkdDGajxagm9BytBo9jDah59CraA/ajz5DxzDA6BgHM8RsMC7Gw0KxOCwJk2PLsSKsDKvGGrBWrAO7ifVjz7F3BBKBRcAJNgR3QiBhHkFIWExYTthIqCAcJDQR2gk3CQOEUcInIpOoS7QmuhH5xBhiMjGHWEgsI9YSjxMvEHuIQ8Q3JBKJQzInuZACSbGkVNIS0kbSblIj6SypmzRIGiOTydpka7IHOZQsICvIheSd5MPkM+Qb5CHyWwqdYkBxpPhT4ihSympKGeUQ5TTlBmWYMkFVo5pS3aihVBE1j1pCraG2Uq9Rh6gTNHWaOc2DFklLpa2ildMaaBdo92mv6HS6Ed2VHk6X0FfSy+lH6JfoA/R3DA2GFYPHiGcoGZsYBxhnGXcYr5hMphnTixnHVDA3MeuY55kPmW9VWCq2KnwVkcoKlUqVJpUbKi9Uqaqmqt6qC1XzVctUj6leU32uRlUzU+OpCdSWq1WqnVDrUxtTZ6k7qIeqZ6hvVD+kfln9iQZZw0zDT0OkUaCxX+O8xiALYxmzeCwhaw2rhnWBNcQmsc3ZfHYqu5j9HbuLPaqpoTlDM0ozV7NS85RmPwfjmHH4nHROCecop5fzforeFO8p4ikbpjRMuTFlXGuqlpeWWKtIq1GrR+u9Nq7tp52mvUW7WfuBDkHHSidcJ0dnj84FnedT2VPdpwqnFk09OvWuLqprpRuhu0R3v26n7pievl6Ankxvp955vef6HH0v/VT9bfqn9UcMWAazDCQG2wzOGDzFNXFvPB0vx9vxUUNdw0BDpWGVYZfhhJG50Tyj1UaNRg+MacZc4yTjbcZtxqMmBiYhJktN6k3umlJNuaYppjtMO0zHzczNos3WmTWbPTHXMueb55vXm9+3YFp4Wiy2qLa4ZUmy5FqmWe62vG6FWjlZpVhVWl2zRq2drSXWu627pxGnuU6TTque1mfDsPG2ybaptxmw5dgG2662bbZ9YWdiF2e3xa7D7pO9k326fY39PQcNh9kOqx1aHX5ztHIUOlY63prOnO4/fcX0lukvZ1jPEM/YM+O2E8spxGmdU5vTR2cXZ7lzg/OIi4lLgssulz4umxvG3ci95Ep09XFd4XrS9Z2bs5vC7ajbr+427mnuh9yfzDSfKZ5ZM3PQw8hD4FHl0T8Ln5Uwa9+sfk9DT4FntecjL2MvkVet17C3pXeq92HvFz72PnKf4z7jPDfeMt5ZX8w3wLfIt8tPw2+eX4XfQ38j/2T/ev/RAKeAJQFnA4mBQYFbAvv4enwhv44/Ottl9rLZ7UGMoLlBFUGPgq2C5cGtIWjI7JCtIffnmM6RzmkOhVB+6NbQB2HmYYvDfgwnhYeFV4Y/jnCIWBrRMZc1d9HcQ3PfRPpElkTem2cxTzmvLUo1Kj6qLmo82je6NLo/xi5mWczVWJ1YSWxLHDkuKq42bmy+3/zt84fineIL43sXmC/IXXB5oc7C9IWnFqkuEiw6lkBMiE44lPBBECqoFowl8hN3JY4KecIdwmciL9E20YjYQ1wqHk7ySCpNepLskbw1eSTFM6Us5bmEJ6mQvEwNTN2bOp4WmnYgbTI9Or0xg5KRkHFCqiFNk7Zn6mfmZnbLrGWFsv7Fbou3Lx6VB8lrs5CsBVktCrZCpuhUWijXKgeyZ2VXZr/Nico5lqueK83tzLPK25A3nO+f/+0SwhLhkralhktXLR1Y5r2sajmyPHF52wrjFQUrhlYGrDy4irYqbdVPq+1Xl65+vSZ6TWuBXsHKgsG1AWvrC1UK5YV969zX7V1PWC9Z37Vh+oadGz4ViYquFNsXlxV/2CjceOUbh2/Kv5nclLSpq8S5ZM9m0mbp5t4tnlsOlqqX5pcObg3Z2rQN31a07fX2Rdsvl80o27uDtkO5o788uLxlp8nOzTs/VKRU9FT6VDbu0t21Ydf4btHuG3u89jTs1dtbvPf9Psm+21UBVU3VZtVl+0n7s/c/romq6fiW+21drU5tce3HA9ID/QcjDrbXudTVHdI9VFKP1ivrRw7HH77+ne93LQ02DVWNnMbiI3BEeeTp9wnf9x4NOtp2jHus4QfTH3YdZx0vakKa8ppGm1Oa+1tiW7pPzD7R1ureevxH2x8PnDQ8WXlK81TJadrpgtOTZ/LPjJ2VnX1+LvncYNuitnvnY87fag9v77oQdOHSRf+L5zu8O85c8rh08rLb5RNXuFearzpfbep06jz+k9NPx7ucu5quuVxrue56vbV7ZvfpG543zt30vXnxFv/W1Z45Pd2983pv98X39d8W3X5yJ/3Oy7vZdyfurbxPvF/0QO1B2UPdh9U/W/7c2O/cf2rAd6Dz0dxH9waFg8/+kfWPD0MFj5mPy4YNhuueOD45OeI/cv3p/KdDz2TPJp4X/qL+y64XFi9++NXr187RmNGhl/KXk79tfKX96sDrGa/bxsLGHr7JeDMxXvRW++3Bd9x3He+j3w9P5Hwgfyj/aPmx9VPQp/uTGZOT/wQDmPP8YzMt2wAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAACZ0lEQVR42mzSP4icZRTF4ee+38xOkp2sG5cQxVJIIaaKkICxTkqJjQhpJFYiop2F1YKFQqoUVpEoCBYSS7dfOxVFWGIsokUE/0TEye7OzPe977XYNWk83b0cDoffvXHWGxkKYjt0N1fi+FaJIzNIFSJ0kDXn0z5nF1O9Sp5PzaizamLD2NELo5W4sOwXqqX/04o1R2wg9PYs/GXUmTjqpGNxwvWdFzz19Akvjj+XUkYTggylFLfml93due+tZ7+y577BrkJnbNWke8yHmzvgi/4lq+WU1XjCsThl2p1ya3GZ4KNrt03KuhXH0SkkkbTOL5+u2PnuZ/D8axtGMTaKsbOvrINP3v/W3Y9XhCJjQCrUWRedVpaq3nvn7oHXrz8jD8PfvnEGbL0716LXytIoxqizkups4R/VwhB7hpi7sXkbXNo86bkrazK5sXnbEHND7BvMLcykOotz3vlxvZw+faRb08VEiVC64rPdSw/pZ/Ly9EutNi3TkHOLOvN3u3OnHNx7MFio5qq5Ifdce/WHhwEfXPnekPuq/UPPQhrAKOV0MFdyRFQFRefr7Z9wRrb0zfYd1aCpGmr2BvtSTkcp1wZLnX0tx4oQjeHX+UF97P75QGspM7VMqTfopVwb0aY1F4ZWlFK1SCVDHQKUEvphj0ztkEdrvZoLtOkoNS2XlkHJIlroIky7Jw8atDSJdQ/aPTUdtJBaLqVmlJpqQataCZKhY/L4HwcEI/Qbv1v8tivbIdVG1UtNnPVmFmPEoT9l/Dc9Ujp42Mx4uGl6I5pmgdjGzaLbopsdJqZHWZnqtKkXcZU8D/8OAPAMQ4kD8KK1AAAAAElFTkSuQmCCiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPBLsF+vuUlhfwX4j/rSfAJ4H1H0qZJ9dN7nR19frRTeBt4Fe9FwpwtN+2p1MXscGLHR9SXrmMgjONd1ZxKzpBeA71b4tNhj6JGoyFNp4GHgwUp9qplfmnFW5oTdy7NamcwCI49kv6fN5IAHgD+0rbyoBc3SOjczohbyS1drbq6pQdqumllRC/0ymTtej8gpbbuVwpQfyw66dqEZyxZKxtHpJn+tZnpnEdrYBbueF9qQn93S7HQGGHnYP7w6L+YGHNtd1FJitqPAR+hERCNOFi1i1alKO6RQnjKUxL1GNjwlMsiEhcPLYTEiT9ISbN15OY/jx4SMshe9LaJRpTvHr3C/ybFYP1PZAfwfYrPsMBtnE6SwN9ib7AhLwTrBDgUKcm06FSrTfSj187xPdVQWOk5Q8vxAfSiIUc7Z7xr6zY/+hpqwSyv0I0/QMTRb7RMgBxNodTfSPqdraz/sDjzKBrv4zu2+a2t0/HHzjd2Lbcc2sG7GtsL42K+xLfxtUgI7YHqKlqHK8HbCCXgjHT1cAdMlDetv4FnQ2lLasaOl6vmB0CMmwT/IPszSueHQqv6i/qluqF+oF9TfO2qEGTumJH0qfSv9KH0nfS/9TIp0Wboi/SRdlb6RLgU5u++9nyXYe69fYRPdil1o1WufNSdTTsp75BfllPy8/LI8G7AUuV8ek6fkvfDsCfbNDP0dvRh0CrNqTbV7LfEEGDQPJQadBtfGVMWEq3QWWdufk6ZSNsjG2PQjp3ZcnOWWing6noonSInvi0/Ex+IzAreevPhe+CawpgP1/pMTMDo64G0sTCXIM+KdOnFWRfQKdJvQzV1+Bt8OokmrdtY2yhVX2a+qrykJfMq4Ml3VR4cVzTQVz+UoNne4vcKLoyS+gyKO6EHe+75Fdt0Mbe5bRIf/wjvrVmhbqBN97RD1vxrahvBOfOYzoosH9bq94uejSOQGkVM6sN/7HelL4t10t9F4gPdVzydEOx83Gv+uNxo7XyL/FtFl8z9ZAHF4bBsrEwAAAAlwSFlzAAALEwAACxMBAJqcGAAAByVJREFUWAm1l1uIldcVx9d3ruMZZzRaay+pCjFJH6LSRqxQqA1NH0pBiH3Qp774kEAg4EOkxKdQSCjUFvpm6YsNVNoSaGjFtmga2yZgCIIawdv04g2kM7Uz6lzO+c758v/t/9lzTB/61Oxhn7332muv9V+3vb8pnooDVRkzZ4oY/LmK6mQZa05frX6yFJ9Ae7x4qd2IuV1FFM9WMfhaI9Z+pQBAL+aiEZ0QgNBm2YuZmxHF9VZMXqmivFaLweUyuteWYvHGVPWr2f+F7YvF/ola9DZGVJsHUXs8YvBEK1ZrXt9URDwqxY1BdGMQvWjGqkgA+iLUtazHuADUoowHYugKTilaR7SIpZjWqOMRfY090RbasS4JglpFtzWIcqwZa+pSqnWVcLLXijXpZCFpvbgb/VhMe8huMLPylWkci8/oSD8xJq7hj4WUWvXrlbqVrUyKtBYdpX3Bh9YbzsdErwRgbZKyFP+KdqxPssu4l2hDAOOxIj6bCHigKWRNCcpMCHHHB4TJLc+TXxKHnC51Ct+Qgxl/TZ0qE5Be/EdWTwjqQuJJAPIB8qAZk4kZoXJnvHH+27Hq0+0YX12PH+w7E3/8zbWkitN2M8pS7kCKZ761OV55c2fcm+nG7J1e7N/+e3m2nbyKQcAhnHWZLC86B1rxiFRvSIkIgJHFVWzZ+qk4fG5HEr4wV8buVb+Vuv5QeVZsi/HeW//eHZ1HbNfLT5+Jc2dndBav9KXugfqc+pLsv6Xxvk6kVheumnpDnXlTVMZWfHh+Li6cdOKvmGzEC69+WTskzwr1SfUJ9ZWp7z/0pWXlF9+ejQtnUdCWnAxQ+al5Tdz80lIVEP8x9eZQWCQwOTAhNc34Re+rUW8U0S+r2Ns8nWzBKgONBOeX3V3RaCpPRN7XeFcO7yYl+InML2U3VdBVHszHzbSXYLBJkuTSQzBuphoYZ7X/u8O30gFAHHxzi+Yop8ETcfDXW5JyKMd/fFuO9l3mYuwLAl5gbMg8QuKdYQg4Zjcxo7HikMeIn37vcizes9Ide9bGhs9NLPN9YX0ndnzHpbZ4vx9HXr6kc6Sobo2hIkuzOnIh0xMFRlvc0waWL+p3UePCQ/Myjjx/JSnl59CJbUkJgl75g+ZD/D978Yrc7EuMPe4ESo6OYsaasiiX7tADAyny5cGtyMHsDxzFnP0Tx6Z0SfsW27B1PHZ+c13seGZdbNo2Lo6Iu7e7cfznfxc/8ggNQBhZI9dSs2c5k+rFaHBXmZhd32xTGdlZPvzDvefj9XddlgeObYVpuf1o3zkpyrEnCJwBDjlmr9i7XP3jgrYkDamhEqRA8UOBxZ53tcOtBbgyzr53M65f8DU6sVZ1o067cfFBvP+XGzrDOa5s+JkTShIc+dBtlLOLlRpqAUDc+yqQMnViNq81edDVnPixno/vP/dXjn2svbbnPa1RiqXEHVkYQ06RWygnFEtpbZDLAJws2X1OHgfCv+hiRkZU8Y+pmbjwzjTE1D48PR1TV+5IMErgsjex2A8TJrqCHH9Cw6U0BGBkPUWrKTZnPq4L9WqIOFvEO8ml+vbRvyUB/Jw6OiUa9GydM58qQl6lTrNHyiENrwyTkOvXLziVkMlOOsesVKyIFtZB1zfDAGvdyj4xtkD7yHQ8Ynn4hCrwvYA+DOJCSlXAZl3MjNQobNzVPK7gJm0AiPsQyEg0c6s1cbEB5X08AmDz1TTLucApzHHyJgADvUqVysJMKOSicLRQl+emOIvbnaw+ot2pSTzl5zzJVjPaZ6ix7zCSN4E1shOAWnqbyYH8bOqd1h9AGJ0qtl6LRBubcBKxbo6xh60kWlbLjgG4NJ2ETkwqbl7SeUXVSCq+BF1C2bWEgEO4CxBGvOydGmu3ooXv7AEogLFqn2JtWKO8yc9xAmDxjhGiWMOQXe63zCvHtIjOpGOIwvGJlhRQepyzaiu0MQ4MnFhuT7CiJQC+sUg4jtOYO+1IH9OdCwgBSmOkP2r60CarHeXMjxw3PGyvOBnN670EgOPOc1yEYgDYCxbqTPDXki1srChi4R6lpQ+uDmVFDtkA5GH1qJEvQFgacqCFT37pyP+Y+DMJs0Y54NgbiIVn61jhEUrNARuNIi3vOQf8iUeQuNzILe4b/jFZ7RDYJhTbVRaJTxyWh8PgO93hQJCBsSa2GQyyoLlBzWDxgnm9l0JgADgNgVxElCH22xs4NCsaieSUyzWXaSTLDAPlGQB0Kt6JaqpzYjkJQT9id60aNwqZjVqlz9Kqp+JcfDjOAqhirNoCI6MelpVPAjZ/CbFv45Y9YNcicqDMKm/Xo/FPJdMlqZ9SIK7qSrrci9mbl6q3/DGQ5f7XuK347rgKeuMgiicEfLPmT0rGY1K5SdI/ryritlMbJrr/PZ8+I8qf9PF8qhMrT39QHfHLkhj/fz/bi+eb83F/VxX1b6jWvt6KdTs/AvvCmqXE235jAAAAAElFTkSuQmCC - - - - - -https://search.yahoo.com/ - diff --git a/application/palemoon/locales/en-US/updater/updater.ini b/application/palemoon/locales/en-US/updater/updater.ini deleted file mode 100644 index 6bc731f161..0000000000 --- a/application/palemoon/locales/en-US/updater/updater.ini +++ /dev/null @@ -1,10 +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/. - -; This file is in the UTF-8 encoding -; All strings must be less than 600 chars. -[Strings] -TitleText=%MOZ_APP_DISPLAYNAME% Update -InfoText=%MOZ_APP_DISPLAYNAME% is installing your updates and will start in a few moments… -MozillaMaintenanceDescription=The Mozilla Maintenance Service ensures that you have the latest and most secure version of Mozilla Firefox on your computer. Keeping Firefox up to date is very important for your online security, and Mozilla strongly recommends that you keep this service enabled. diff --git a/application/palemoon/locales/filter.py b/application/palemoon/locales/filter.py deleted file mode 100644 index 8e097db059..0000000000 --- a/application/palemoon/locales/filter.py +++ /dev/null @@ -1,37 +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/. - -def test(mod, path, entity = None): - import re - # ignore anything but Firefox - if mod not in ("netwerk", "dom", "toolkit", "security/manager", - "browser", "browser/metro", "webapprt", - "extensions/reporter", "extensions/spellcheck", - "other-licenses/branding/firefox", - "browser/branding/official", - "services/sync"): - return False - if mod != "browser" and mod != "extensions/spellcheck": - # we only have exceptions for browser and extensions/spellcheck - return True - if not entity: - if mod == "extensions/spellcheck": - return False - # browser - return not (re.match(r"searchplugins\/.+\.xml", path) or - re.match(r"chrome\/help\/images\/[A-Za-z-_]+\.png", path)) - if mod == "extensions/spellcheck": - # l10n ships en-US dictionary or something, do compare - return True - if path == "defines.inc": - return entity != "MOZ_LANGPACK_CONTRIBUTORS" - - if path != "chrome/browser-region/region.properties": - # only region.properties exceptions remain, compare all others - return True - - return not (re.match(r"browser\.search\.order\.[1-9]", entity) or - re.match(r"browser\.contentHandlers\.types\.[0-5]", entity) or - re.match(r"goanna\.handlerService\.schemes\.", entity) or - re.match(r"goanna\.handlerService\.defaultHandlersVersion", entity)) diff --git a/application/palemoon/locales/generic/extract-bookmarks.py b/application/palemoon/locales/generic/extract-bookmarks.py deleted file mode 100644 index 7bf711fff1..0000000000 --- a/application/palemoon/locales/generic/extract-bookmarks.py +++ /dev/null @@ -1,62 +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/. - -import sys -import re -import codecs -try: - from Mozilla.Parser import getParser -except ImportError: - sys.exit('''extract-bookmarks needs compare-locales - -Find that on http://pypi.python.org/pypi/compare-locales. -This script has been tested with version 0.6, and might work with future -versions.''') - -ll=re.compile('\.(title|a|dd|h[0-9])$') - -p = getParser(sys.argv[1]) -p.readFile(sys.argv[1]) - -template = '''#filter emptyLines - -# LOCALIZATION NOTE: The 'en-US' strings in the URLs will be replaced with -# your locale code, and link to your translated pages as soon as they're -# live. - -#define bookmarks_title %s -#define bookmarks_heading %s - -#define bookmarks_toolbarfolder %s -#define bookmarks_toolbarfolder_description %s - -# LOCALIZATION NOTE (getting_started): -# link title for https://www.mozilla.org/en-US/firefox/central/ -#define getting_started %s - -# LOCALIZATION NOTE (firefox_heading): -# Firefox links folder name -#define firefox_heading %s - -# LOCALIZATION NOTE (firefox_help): -# link title for https://www.mozilla.org/en-US/firefox/help/ -#define firefox_help %s - -# LOCALIZATION NOTE (firefox_customize): -# link title for https://www.mozilla.org/en-US/firefox/customize/ -#define firefox_customize %s - -# LOCALIZATION NOTE (firefox_community): -# link title for https://www.mozilla.org/en-US/contribute/ -#define firefox_community %s - -# LOCALIZATION NOTE (firefox_about): -# link title for https://www.mozilla.org/en-US/about/ -#define firefox_about %s - -#unfilter emptyLines''' - -strings = tuple(e.val for e in p if ll.search(e.key)) - -print codecs.utf_8_encode(template % strings)[0] diff --git a/application/palemoon/locales/generic/profile/bookmarks.html.in b/application/palemoon/locales/generic/profile/bookmarks.html.in deleted file mode 100644 index 30facd65df..0000000000 --- a/application/palemoon/locales/generic/profile/bookmarks.html.in +++ /dev/null @@ -1,23 +0,0 @@ -#filter substitution - -#define eclipse_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAeeSURBVFhHxVddbFxHFT4zc3fvrteON17bMYntto6bWAIlBNISQau2glbqQ1MaVaBKVR9ACAECCQmpghdeisQT8IRaVVCQeACEkChFaQmQglCC4wTFkDQWFk7q2rFd/633f+/PDN+Ze+/+ODEST5yrs2d+zpzzzZwzP0v/bxKx3JMufrgidtymTG00lZcK1Wa47pxL/WTwZvafTwTSe8wIcwxWxmAoB/WmIVomQ7MkzB8FidcvTF9Yiizdne4K4PLzRixfJuGaNYeMSWtjMnUq5S7QG6NXet/6fNOpnDFk9sXq/40a4J9D96XpmemFqKmb7gAwPRXKUmNdBSrICCF7iXT/llkbfsN99fGb2X98KaSgYIclIzFlzDYqR7XkN9bhH1NG27f6+/p/eO7tcy1lpi4A5yeXVKBTKY/CXiVNgYQe2QhX73/dffkZLPmTMNSlv5sslrjY6cVCiOQrWuuvXbl6xbcdoJbBPxy7pXS1xw2Fn0fjCEmaKIfFM+fVL5681HM2b0jHmv8Tdc02plekI78yc3nGGlT88/sji8pvKNfIYECSGBeSTjV1/ZtX6c+Pnu/5ZcZQaC1ZxtyiLymz7Ojr7hftevwZc1KH+v3VtdUZqJB486gRSq+6msIB6N6DpocCEby4FMwXfpb9DlXUNutZYqNMybLtru+mpB8UF1stnBMnZq/NLsiU3nF8rXsBdgQAToQmfLES7hT+Js9SSWwSYtZiE/Ne9d2c9IOxEiztCgjIPuysbzMS2dDljBRiANgmQgq/6pNfWPHfpevqAkEpMobBLbmbub3VB/3d/Qm37cA/wBj97NHJqUNSkMwB14HQBE8BwNGGrtJc8HdaqSxRGAbxIIvcyojj2XDZOojao9Vo67V0IpAilpZrtVp2p1x8BpOnfkFmNKDgqcAEoqSLdFNfs85LpRL5vs9o7aD2ksZGeSbWSdTepROPidoSIEYgAalarVKtXuMIPCbxk/eM/zCc7wcIKoXbtGFu23QJMbhSqWBAjYJkNToZxrrqscNWuUOyrWazQaVyiZpek50zHUcIKO8b/0EkHwXGp6ouU9WUkLCAAGbh+c0WEK+JYyoMOxwkS851yA4gIQD6gU/1eh3jy1RvNGy/JWveHJQ42/bB8WG4B4CAPNOA9KwBu4cxIJKGAjbWqNslZGbDDdR5Zs1m08oGJDtCjKFTsdLzEntROFAWMdCMDHVYgOtcgBVgELwSpGU0Ax3PNOEYjO3DKnB+sHHrHMvK0gP7aAsChMyOifXbNjgZjQ2f1lWJ7O+DUydxjguIXNPTtZSdzKDuAMYcGWwxO4yc7tJN9Kx9854EPsXZz87RRI5IU5/Z3z0o4Q4nEZCOmbXaO9s6cyXmdhkrEV7FLhB1mAo5/gzCFVkaFKNJrFp811lbbgPpdtzW52RM6ggddml0JiCcb8m0SG/AhGdDgC8lMjSoRqlX5ONkjRLQxv6OsCROOh22HSfcmcj8RXuAiiiflZLkDqrLPHtORCkcyqshGpNTKONuxEmVcHTt7HX1MFnjHdQek9iIbTK9ho4NPgl3UiI1a+ePMDDKfapA4/KD1CcGSDJEOwiSD27LXI6Y26O+tmT9qD/R7wCACr5VlL5fLpc1klAUB9TA29qEAYeAQ8FhGEqN0qQ4aZMSIyJDHY7aBiNOyrY9kZ16rbECm9z5xujg1DKvEbahLmZFz7wr3YuciBwGjtM+NUiHnCM0YU4ARCoyFhmInUYztbPeixM9HsdlIXWa3O9O5T7y62sLF+2RKIVW/DhYOagO8eu1xGGwuYDH0pAzakNxjz5OrnLJUYqUcsCQUpG09UjuZqsTs4MxjuMEObHvB8fpke89fd8X+bVsST038HWkiDRpmfax/M2i3n4AgeCVsbNLyx5yjEsqzJCXqpLBkaUwo8R4lzPbnjDXo/aUdNeH9fhLD4vTL58ef2Hry5eeaD0wxW8Pr6oMhRmcgcPI4vvnvHdeWAluP8cgeNtxVvD9sB2u0Ya/RJtqkcqZVQocTIIvlNhQRO0ah8rR6cr+8MBfjvgf/dGx7Menj+VOrTfdgv/pWTxBYrJ76jdH/u0oz805igBCHJ7zbjy76N96HsFw7d63qRlQXVdwXW+AN6kit6iRKgJIHVcH3gyCJ4V4hwhRmCU4XjiuHnztvvTUX8eciX8NiOEtmXWan7w+3IXZAvjxF66KwrmCkybqQcIMaUHjK8HyqRve9c9VdBlPNb698MtQ4huzYWrU0LjpUA5xjeOoseZSIt24Nz3x5ieyj/xqwBmey1JuWWtvx8+sN0/feKC19Am1TpWffqgo+isNlaIwKxTlcUaPYPnH5prvPLoYvPupsi5NYpekGASDieHY45s/nCWbw+rApZPZj/3uoHPoBkzfxqm4IRxdqfuBd+bm4TucM7UAMP3poXVR36pJVc+mjQjxZzPMI5iD6BrEn9Lx94LFqWK4PdYw9TwcY5dBU/S8P+KMzE+kJudd4a4hDzYBfguLVgocp1HO+/5nZ0a7U6WDugAk9OoH5sVQVjgqSKeRF1nkdA67kjOnB0MyeGM7KHOe4boXHpzWkARV1Kt4y9Sw7Rq63w2Ktxb0Z3ZO7OmciOg/NvJv1HVtOqQAAAAASUVORK5CYII= - -#define github_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHdSURBVHgBvVeLbYNADDVdoHSDG4ENwgjpBMkG6QbtBkknIBtEnaDdADoBbEA6gWuXQ3GR7wOc8qSnSPhvkzuTQSQQMaefLXFDLIiGmFvxldgRG+IX8SPLsiukAAU2xDOxx3mo2BaWgismHnE9jrZ7s6tuMR1ajO0GKRaYNrhMorh35VoSBjwzbxWDCy5Lil/ailgrPnMtAe2F2wn5Hm+J9Nbxp2AvZNKuVPwetdZrKJQuGfCPMI/0baTSOai0EJ4EKlmVC3tYCdRHwOBR5Q8wHK8aOhiO1bVorK8phqPd0/4dJIKnCxULa4dw3vEZTkK7S2oegVH0u2S3mfCpPDOcQNJKPdAK+nsJ7wW10Ixn4xA+pRwDD1x5fOUOdA6bDaQLXjpEHSfw7RC+QDrsHc+b8ZJxYXUS5OPg8b8bj2LfvvcKCxEIzshHRXkavhG3+H8HaK2zMiJoYXXrQPBKGplJsK3tjObk4gl+wXiYqfFJCHublLailZ4EysjgJ814upKdRHc4uYp4gPAIQmjRdc8oFRcwExHBjdTPFAcclOc8Kp5huNN/iI90Or5DIAGHqCM+k30DEVU41/MI26jKo4DDX3JtAidcs1vg7eM0NoEeb98EBlIBAyu50DNzKv4F8Mg9kvfoSM0AAAAASUVORK5CYII= - - - -@bookmarks_title@ -

    @bookmarks_heading@

    - -

    -

    @bookmarks_toolbarfolder@

    -
    @bookmarks_toolbarfolder_description@ -

    -

    Eclipse Main Site -
    Eclipse Community -
    Report Issues -
    Get New Releases -

    -

    diff --git a/application/palemoon/locales/generic/profile/localstore.rdf b/application/palemoon/locales/generic/profile/localstore.rdf deleted file mode 100644 index cc4b3b5105..0000000000 --- a/application/palemoon/locales/generic/profile/localstore.rdf +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/application/palemoon/locales/generic/profile/mimeTypes.rdf b/application/palemoon/locales/generic/profile/mimeTypes.rdf deleted file mode 100644 index 84079404cc..0000000000 --- a/application/palemoon/locales/generic/profile/mimeTypes.rdf +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/application/palemoon/locales/jar.mn b/application/palemoon/locales/jar.mn deleted file mode 100644 index 3558597b05..0000000000 --- a/application/palemoon/locales/jar.mn +++ /dev/null @@ -1,98 +0,0 @@ -#filter substitution -# 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/. - - -@AB_CD@.jar: -% locale browser @AB_CD@ %locale/browser/ - locale/browser/aboutCertError.dtd (%chrome/browser/aboutCertError.dtd) - locale/browser/aboutDialog.dtd (%chrome/browser/aboutDialog.dtd) - locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd) - locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd) -* locale/browser/aboutHome.dtd (%chrome/browser/aboutHome.dtd) - locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd) -#ifdef MOZ_SERVICES_SYNC - locale/browser/syncProgress.dtd (%chrome/browser/syncProgress.dtd) - locale/browser/aboutSyncTabs.dtd (%chrome/browser/aboutSyncTabs.dtd) -#endif -* locale/browser/browser.dtd (%chrome/browser/browser.dtd) - locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd) - locale/browser/charsetOverlay.dtd (%chrome/browser/charsetOverlay.dtd) - locale/browser/browser.properties (%chrome/browser/browser.properties) - locale/browser/charsetMenu.properties (%chrome/browser/charsetMenu.properties) - locale/browser/charsetMenu.dtd (%chrome/browser/charsetMenu.dtd) - locale/browser/newTab.dtd (%chrome/browser/newTab.dtd) - locale/browser/newTab.properties (%chrome/browser/newTab.properties) - locale/browser/openLocation.dtd (%chrome/browser/openLocation.dtd) - 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) - locale/browser/search.properties (%chrome/browser/search.properties) - locale/browser/searchbar.dtd (%chrome/browser/searchbar.dtd) - locale/browser/engineManager.dtd (%chrome/browser/engineManager.dtd) - locale/browser/engineManager.properties (%chrome/browser/engineManager.properties) - locale/browser/setDesktopBackground.dtd (%chrome/browser/setDesktopBackground.dtd) - locale/browser/shellservice.properties (%chrome/browser/shellservice.properties) - locale/browser/statusbar/statusbar-overlay.dtd (%chrome/browser/statusbar/statusbar-overlay.dtd) - locale/browser/statusbar/statusbar-prefs.dtd (%chrome/browser/statusbar/statusbar-prefs.dtd) - locale/browser/statusbar/meta.properties (%chrome/browser/statusbar/meta.properties) - locale/browser/statusbar/overlay.properties (%chrome/browser/statusbar/overlay.properties) - locale/browser/statusbar/prefs.properties (%chrome/browser/statusbar/prefs.properties) - locale/browser/tabbrowser.dtd (%chrome/browser/tabbrowser.dtd) - locale/browser/tabbrowser.properties (%chrome/browser/tabbrowser.properties) - locale/browser/taskbar.properties (%chrome/browser/taskbar.properties) - locale/browser/downloads/downloads.dtd (%chrome/browser/downloads/downloads.dtd) - locale/browser/downloads/downloads.properties (%chrome/browser/downloads/downloads.properties) - locale/browser/places/places.dtd (%chrome/browser/places/places.dtd) - locale/browser/places/places.properties (%chrome/browser/places/places.properties) - locale/browser/places/editBookmarkOverlay.dtd (%chrome/browser/places/editBookmarkOverlay.dtd) - locale/browser/places/bookmarkProperties.properties (%chrome/browser/places/bookmarkProperties.properties) - locale/browser/preferences/selectBookmark.dtd (%chrome/browser/preferences/selectBookmark.dtd) - locale/browser/places/moveBookmarks.dtd (%chrome/browser/places/moveBookmarks.dtd) - locale/browser/feeds/subscribe.dtd (%chrome/browser/feeds/subscribe.dtd) - locale/browser/feeds/subscribe.properties (%chrome/browser/feeds/subscribe.properties) - locale/browser/permissions/aboutPermissions.dtd (%chrome/browser/permissions/aboutPermissions.dtd) - locale/browser/permissions/aboutPermissions.properties (%chrome/browser/permissions/aboutPermissions.properties) - locale/browser/preferences/advanced.dtd (%chrome/browser/preferences/advanced.dtd) - locale/browser/preferences/applicationManager.dtd (%chrome/browser/preferences/applicationManager.dtd) - locale/browser/preferences/applicationManager.properties (%chrome/browser/preferences/applicationManager.properties) - locale/browser/preferences/colors.dtd (%chrome/browser/preferences/colors.dtd) - locale/browser/preferences/cookies.dtd (%chrome/browser/preferences/cookies.dtd) -* locale/browser/preferences/content.dtd (%chrome/browser/preferences/content.dtd) - locale/browser/preferences/connection.dtd (%chrome/browser/preferences/connection.dtd) - locale/browser/preferences/applications.dtd (%chrome/browser/preferences/applications.dtd) - locale/browser/preferences/fonts.dtd (%chrome/browser/preferences/fonts.dtd) - locale/browser/preferences/main.dtd (%chrome/browser/preferences/main.dtd) - locale/browser/preferences/languages.dtd (%chrome/browser/preferences/languages.dtd) - locale/browser/preferences/permissions.dtd (%chrome/browser/preferences/permissions.dtd) - locale/browser/preferences/preferences.dtd (%chrome/browser/preferences/preferences.dtd) - locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties) - locale/browser/preferences/privacy.dtd (%chrome/browser/preferences/privacy.dtd) - locale/browser/preferences/security.dtd (%chrome/browser/preferences/security.dtd) -#ifdef MOZ_SERVICES_SYNC - locale/browser/preferences/sync.dtd (%chrome/browser/preferences/sync.dtd) -#endif - locale/browser/preferences/tabs.dtd (%chrome/browser/preferences/tabs.dtd) -#ifdef MOZ_SERVICES_SYNC - locale/browser/syncBrand.dtd (%chrome/browser/syncBrand.dtd) - locale/browser/syncSetup.dtd (%chrome/browser/syncSetup.dtd) - locale/browser/syncSetup.properties (%chrome/browser/syncSetup.properties) - locale/browser/syncGenericChange.properties (%chrome/browser/syncGenericChange.properties) - locale/browser/syncKey.dtd (%chrome/browser/syncKey.dtd) - locale/browser/syncQuota.dtd (%chrome/browser/syncQuota.dtd) - locale/browser/syncQuota.properties (%chrome/browser/syncQuota.properties) -#endif -% locale browser-region @AB_CD@ %locale/browser-region/ - locale/browser-region/region.properties (%chrome/browser-region/region.properties) -# the following files are browser-specific overrides - locale/browser/netError.dtd (%chrome/overrides/netError.dtd) - locale/browser/appstrings.properties (%chrome/overrides/appstrings.properties) - locale/browser/downloads/settingsChange.dtd (%chrome/overrides/settingsChange.dtd) -% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd -% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties -% override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd diff --git a/application/palemoon/locales/l10n.ini b/application/palemoon/locales/l10n.ini deleted file mode 100644 index 9a466b65ed..0000000000 --- a/application/palemoon/locales/l10n.ini +++ /dev/null @@ -1,22 +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/. - -[general] -depth = ../../.. -all = application/palemoon/locales/all-locales - -[compare] -dirs = application/palemoon - extensions/reporter - other-licenses/branding/firefox - application/palemoon/branding/official - -[includes] -# non-central apps might want to use %(topsrcdir)s here, or other vars -# RFE: that needs to be supported by compare-locales, too, though -toolkit = toolkit/locales/l10n.ini -services_sync = services/sync/locales/l10n.ini - -[extras] -dirs = extensions/spellcheck diff --git a/application/palemoon/locales/moz.build b/application/palemoon/locales/moz.build deleted file mode 100644 index ecb79e730d..0000000000 --- a/application/palemoon/locales/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/application/palemoon/locales/shipped-locales b/application/palemoon/locales/shipped-locales deleted file mode 100644 index 96bd960a01..0000000000 --- a/application/palemoon/locales/shipped-locales +++ /dev/null @@ -1,90 +0,0 @@ -ach -af -ak -ar -as -ast -be -bg -bn-BD -bn-IN -br -bs -ca -cs -csb -cy -da -de -el -en-GB -en-US -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy-NL -ga-IE -gd -gl -gu-IN -he -hi-IN -hr -hu -hy-AM -id -is -it -ja linux win32 -ja-JP-mac osx -kk -km -kn -ko -ku -lg -lij -lt -lv -mai -mk -ml -mr -nb-NO -nl -nn-NO -nso -or -pa-IN -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv-SE -ta -ta-LK -te -th -tr -uk -vi -zh-CN -zh-TW -zu diff --git a/application/palemoon/modules/AboutHomeUtils.jsm b/application/palemoon/modules/AboutHomeUtils.jsm deleted file mode 100644 index 72712e1f36..0000000000 --- a/application/palemoon/modules/AboutHomeUtils.jsm +++ /dev/null @@ -1,67 +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"; - -this.EXPORTED_SYMBOLS = [ "AboutHomeUtils" ]; - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); - -this.AboutHomeUtils = { - /** - * Returns an object containing the name and searchURL of the original default - * search engine. - */ - get defaultSearchEngine() { - let defaultEngine = Services.search.defaultEngine; - let submission = defaultEngine.getSubmission("_searchTerms_", null, "homepage"); - - return Object.freeze({ - name: defaultEngine.name, - searchURL: submission.uri.spec, - postDataString: submission.postDataString - }); - }, - - /* - * showKnowYourRights - Determines if the user should be shown the - * about:rights notification. The notification should *not* be shown if - * we've already shown the current version, or if the override pref says to - * never show it. The notification *should* be shown if it's never been seen - * before, if a newer version is available, or if the override pref says to - * always show it. - */ - get showKnowYourRights() { - // Look for an unconditional override pref. If set, do what it says. - // (true --> never show, false --> always show) - try { - return !Services.prefs.getBoolPref("browser.rights.override"); - } catch (e) { } - // Ditto, for the legacy EULA pref. - try { - return !Services.prefs.getBoolPref("browser.EULA.override"); - } catch (e) { } - -#ifndef MC_OFFICIAL - // Non-official builds shouldn't show the notification. - return false; -#endif - - // Look to see if the user has seen the current version or not. - var currentVersion = Services.prefs.getIntPref("browser.rights.version"); - try { - return !Services.prefs.getBoolPref("browser.rights." + currentVersion + ".shown"); - } catch (e) { } - - // Legacy: If the user accepted a EULA, we won't annoy them with the - // equivalent about:rights page until the version changes. - try { - return !Services.prefs.getBoolPref("browser.EULA." + currentVersion + ".accepted"); - } catch (e) { } - - // We haven't shown the notification before, so do so now. - return true; - } -}; diff --git a/application/palemoon/modules/AutoCompletePopup.jsm b/application/palemoon/modules/AutoCompletePopup.jsm deleted file mode 100644 index afcc7011c7..0000000000 --- a/application/palemoon/modules/AutoCompletePopup.jsm +++ /dev/null @@ -1,303 +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"; - -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; - -this.EXPORTED_SYMBOLS = [ "AutoCompletePopup" ]; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); - -// nsITreeView implementation that feeds the autocomplete popup -// with the search data. -var AutoCompleteTreeView = { - // nsISupports - QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView, - Ci.nsIAutoCompleteController]), - - // Private variables - treeBox: null, - results: [], - - // nsITreeView - selection: null, - - get rowCount() { return this.results.length; }, - setTree: function(treeBox) { this.treeBox = treeBox; }, - getCellText: function(idx, column) { return this.results[idx].value }, - isContainer: function(idx) { return false; }, - getCellValue: function(idx, column) { return false }, - isContainerOpen: function(idx) { return false; }, - isContainerEmpty: function(idx) { return false; }, - isSeparator: function(idx) { return false; }, - isSorted: function() { return false; }, - isEditable: function(idx, column) { return false; }, - canDrop: function(idx, orientation, dt) { return false; }, - getLevel: function(idx) { return 0; }, - getParentIndex: function(idx) { return -1; }, - hasNextSibling: function(idx, after) { return idx < this.results.length - 1 }, - toggleOpenState: function(idx) { }, - getCellProperties: function(idx, column) { - if (this.results && this.results[idx]) { - return this.results[idx].style || ""; - } else { - return ""; - } - }, - getRowProperties: function(idx) { return ""; }, - getImageSrc: function(idx, column) { return null; }, - getProgressMode : function(idx, column) { }, - cycleHeader: function(column) { }, - cycleCell: function(idx, column) { }, - selectionChanged: function() { }, - performAction: function(action) { }, - performActionOnCell: function(action, index, column) { }, - getColumnProperties: function(column) { return ""; }, - - // nsIAutoCompleteController - get matchCount() { - return this.rowCount; - }, - - handleEnter: function(aIsPopupSelection) { - AutoCompletePopup.handleEnter(aIsPopupSelection); - }, - - stopSearch: function() {}, - - // Internal JS-only API - clearResults: function() { - this.results = []; - }, - - setResults: function(results) { - this.results = results; - }, -}; - -this.AutoCompletePopup = { - MESSAGES: [ - "FormAutoComplete:SelectBy", - "FormAutoComplete:GetSelectedIndex", - "FormAutoComplete:SetSelectedIndex", - "FormAutoComplete:MaybeOpenPopup", - "FormAutoComplete:ClosePopup", - "FormAutoComplete:Disconnect", - "FormAutoComplete:RemoveEntry", - "FormAutoComplete:Invalidate", - ], - - init: function() { - for (let msg of this.MESSAGES) { - Services.mm.addMessageListener(msg, this); - } - }, - - uninit: function() { - for (let msg of this.MESSAGES) { - Services.mm.removeMessageListener(msg, this); - } - }, - - handleEvent: function(evt) { - switch (evt.type) { - case "popupshowing": { - this.sendMessageToBrowser("FormAutoComplete:PopupOpened"); - break; - } - - case "popuphidden": { - this.sendMessageToBrowser("FormAutoComplete:PopupClosed"); - this.openedPopup = null; - this.weakBrowser = null; - evt.target.removeEventListener("popuphidden", this); - evt.target.removeEventListener("popupshowing", this); - break; - } - } - }, - - // Along with being called internally by the receiveMessage handler, - // this function is also called directly by the login manager, which - // uses a single message to fill in the autocomplete results. See - // "RemoteLogins:autoCompleteLogins". - showPopupWithResults: function({ browser, rect, dir, results }) { - if (!results.length || this.openedPopup) { - // We shouldn't ever be showing an empty popup, and if we - // already have a popup open, the old one needs to close before - // we consider opening a new one. - return; - } - - let window = browser.ownerDocument.defaultView; - let tabbrowser = window.gBrowser; - if (Services.focus.activeWindow != window || - tabbrowser.selectedBrowser != browser) { - // We were sent a message from a window or tab that went into the - // background, so we'll ignore it for now. - return; - } - - this.weakBrowser = Cu.getWeakReference(browser); - this.openedPopup = browser.autoCompletePopup; - this.openedPopup.hidden = false; - // don't allow the popup to become overly narrow - this.openedPopup.setAttribute("width", Math.max(100, rect.width)); - this.openedPopup.style.direction = dir; - - AutoCompleteTreeView.setResults(results); - this.openedPopup.view = AutoCompleteTreeView; - this.openedPopup.selectedIndex = -1; - this.openedPopup.invalidate(); - - if (results.length) { - // Reset fields that were set from the last time the search popup was open - this.openedPopup.mInput = null; - this.openedPopup.showCommentColumn = false; - this.openedPopup.showImageColumn = false; - this.openedPopup.addEventListener("popuphidden", this); - this.openedPopup.addEventListener("popupshowing", this); - this.openedPopup.openPopupAtScreenRect("after_start", rect.left, rect.top, - rect.width, rect.height, false, - false); - } else { - this.closePopup(); - } - }, - - invalidate(results) { - if (!this.openedPopup) { - return; - } - - if (!results.length) { - this.closePopup(); - } else { - AutoCompleteTreeView.setResults(results); - // We need to re-set the view in order for the - // tree to know the view has changed. - this.openedPopup.view = AutoCompleteTreeView; - this.openedPopup.invalidate(); - } - }, - - closePopup() { - if (this.openedPopup) { - try { - // Note that hidePopup() closes the popup immediately, - // so popuphiding or popuphidden events will be fired - // and handled during this call. - this.openedPopup.hidePopup(); - } catch(e) { - Cu.reportError(e); - } - } - AutoCompleteTreeView.clearResults(); - }, - - removeLogin(login) { - Services.logins.removeLogin(login); - }, - - receiveMessage: function(message) { - if (!message.target.autoCompletePopup) { - // Returning false to pacify ESLint, but this return value is - // ignored by the messaging infrastructure. - return false; - } - - switch (message.name) { - case "FormAutoComplete:SelectBy": { - this.openedPopup.selectBy(message.data.reverse, message.data.page); - break; - } - - case "FormAutoComplete:GetSelectedIndex": { - if (this.openedPopup) { - return this.openedPopup.selectedIndex; - } - // If the popup was closed, then the selection - // has not changed. - return -1; - } - - case "FormAutoComplete:SetSelectedIndex": { - let { index } = message.data; - if (this.openedPopup) { - this.openedPopup.selectedIndex = index; - } - break; - } - - case "FormAutoComplete:MaybeOpenPopup": { - let { results, rect, dir } = message.data; - this.showPopupWithResults({ browser: message.target, rect, dir, - results }); - break; - } - - case "FormAutoComplete:Invalidate": { - let { results } = message.data; - this.invalidate(results); - break; - } - - case "FormAutoComplete:ClosePopup": { - this.closePopup(); - break; - } - - case "FormAutoComplete:Disconnect": { - // The controller stopped controlling the current input, so clear - // any cached data. This is necessary cause otherwise we'd clear data - // only when starting a new search, but the next input could not support - // autocomplete and it would end up inheriting the existing data. - AutoCompleteTreeView.clearResults(); - break; - } - } - // Returning false to pacify ESLint, but this return value is - // ignored by the messaging infrastructure. - return false; - }, - - /** - * Despite its name, this handleEnter is only called when the user clicks on - * one of the items in the popup since the popup is rendered in the parent process. - * The real controller's handleEnter is called directly in the content process - * for other methods of completing a selection (e.g. using the tab or enter - * keys) since the field with focus is in that process. - */ - handleEnter(aIsPopupSelection) { - if (this.openedPopup) { - this.sendMessageToBrowser("FormAutoComplete:HandleEnter", { - selectedIndex: this.openedPopup.selectedIndex, - isPopupSelection: aIsPopupSelection, - }); - } - }, - - /** - * If a browser exists that AutoCompletePopup knows about, - * sends it a message. Otherwise, this is a no-op. - * - * @param {string} msgName - * The name of the message to send. - * @param {object} data - * The optional data to send with the message. - */ - sendMessageToBrowser(msgName, data) { - let browser = this.weakBrowser ? this.weakBrowser.get() - : null; - if (browser) { - browser.messageManager.sendAsyncMessage(msgName, data); - } - }, - - stopSearch: function() {} -} diff --git a/application/palemoon/modules/BrowserNewTabPreloader.jsm b/application/palemoon/modules/BrowserNewTabPreloader.jsm deleted file mode 100644 index 15d7ee2865..0000000000 --- a/application/palemoon/modules/BrowserNewTabPreloader.jsm +++ /dev/null @@ -1,436 +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"; - -this.EXPORTED_SYMBOLS = ["BrowserNewTabPreloader"]; - -const Cu = Components.utils; -const Cc = Components.classes; -const Ci = Components.interfaces; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Promise.jsm"); - -const HTML_NS = "http://www.w3.org/1999/xhtml"; -const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; -const XUL_PAGE = "data:application/vnd.mozilla.xul+xml;charset=utf-8,"; -const NEWTAB_URL = "about:newtab"; -const PREF_BRANCH = "browser.newtab."; - -// The interval between swapping in a preload docShell and kicking off the -// next preload in the background. -const PRELOADER_INTERVAL_MS = 600; -// The initial delay before we start preloading our first new tab page. The -// timer is started after the first 'browser-delayed-startup' has been sent. -const PRELOADER_INIT_DELAY_MS = 5000; -// The number of miliseconds we'll wait after we received a notification that -// causes us to update our list of browsers and tabbrowser sizes. This acts as -// kind of a damper when too many events are occuring in quick succession. -const PRELOADER_UPDATE_DELAY_MS = 3000; - -const TOPIC_TIMER_CALLBACK = "timer-callback"; -const TOPIC_DELAYED_STARTUP = "browser-delayed-startup-finished"; -const TOPIC_XUL_WINDOW_CLOSED = "xul-window-destroyed"; - -function createTimer(obj, delay) { - let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - timer.init(obj, delay, Ci.nsITimer.TYPE_ONE_SHOT); - return timer; -} - -function clearTimer(timer) { - if (timer) { - timer.cancel(); - } - return null; -} - -this.BrowserNewTabPreloader = { - init: function() { - Initializer.start(); - }, - - uninit: function() { - Initializer.stop(); - HostFrame.destroy(); - Preferences.uninit(); - HiddenBrowsers.uninit(); - }, - - newTab: function(aTab) { - let win = aTab.ownerDocument.defaultView; - if (win.gBrowser) { - let utils = win.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - - let {width, height} = utils.getBoundsWithoutFlushing(win.gBrowser); - let hiddenBrowser = HiddenBrowsers.get(width, height) - if (hiddenBrowser) { - return hiddenBrowser.swapWithNewTab(aTab); - } - } - - return false; - } -}; - -Object.freeze(BrowserNewTabPreloader); - -var Initializer = { - _timer: null, - _observing: false, - - start: function() { - Services.obs.addObserver(this, TOPIC_DELAYED_STARTUP, false); - this._observing = true; - }, - - stop: function() { - this._timer = clearTimer(this._timer); - - if (this._observing) { - Services.obs.removeObserver(this, TOPIC_DELAYED_STARTUP); - this._observing = false; - } - }, - - observe: function(aSubject, aTopic, aData) { - if (aTopic == TOPIC_DELAYED_STARTUP) { - Services.obs.removeObserver(this, TOPIC_DELAYED_STARTUP); - this._observing = false; - this._startTimer(); - } else if (aTopic == TOPIC_TIMER_CALLBACK) { - this._timer = null; - this._startPreloader(); - } - }, - - _startTimer: function() { - this._timer = createTimer(this, PRELOADER_INIT_DELAY_MS); - }, - - _startPreloader: function() { - Preferences.init(); - if (Preferences.enabled) { - HiddenBrowsers.init(); - } - } -}; - -var Preferences = { - _enabled: null, - _branch: null, - - get enabled() { - if (this._enabled === null) { - this._enabled = this._branch.getBoolPref("preload") && - !this._branch.prefHasUserValue("url"); - } - - return this._enabled; - }, - - init: function() { - this._branch = Services.prefs.getBranch(PREF_BRANCH); - this._branch.addObserver("", this, false); - }, - - uninit: function() { - if (this._branch) { - this._branch.removeObserver("", this); - this._branch = null; - } - }, - - observe: function() { - let prevEnabled = this._enabled; - this._enabled = null; - - if (prevEnabled && !this.enabled) { - HiddenBrowsers.uninit(); - } else if (!prevEnabled && this.enabled) { - HiddenBrowsers.init(); - } - }, -}; - -var HiddenBrowsers = { - _browsers: null, - _updateTimer: null, - - _topics: [ - TOPIC_DELAYED_STARTUP, - TOPIC_XUL_WINDOW_CLOSED - ], - - init: function() { - this._browsers = new Map(); - this._updateBrowserSizes(); - this._topics.forEach(t => Services.obs.addObserver(this, t, false)); - }, - - uninit: function() { - if (this._browsers) { - this._topics.forEach(t => Services.obs.removeObserver(this, t, false)); - this._updateTimer = clearTimer(this._updateTimer); - - for (let [key, browser] of this._browsers) { - browser.destroy(); - } - this._browsers = null; - } - }, - - get: function(width, height) { - // We haven't been initialized, yet. - if (!this._browsers) { - return null; - } - - let key = width + "x" + height; - if (!this._browsers.has(key)) { - // Update all browsers' sizes if we can't find a matching one. - this._updateBrowserSizes(); - } - - // We should now have a matching browser. - if (this._browsers.has(key)) { - return this._browsers.get(key); - } - - // We should never be here. Return the first browser we find. - Cu.reportError("NewTabPreloader: no matching browser found after updating"); - for (let [size, browser] of this._browsers) { - return browser; - } - - // We should really never be here. - Cu.reportError("NewTabPreloader: not even a single browser was found?"); - return null; - }, - - observe: function(subject, topic, data) { - if (topic === TOPIC_TIMER_CALLBACK) { - this._updateTimer = null; - this._updateBrowserSizes(); - } else { - this._updateTimer = clearTimer(this._updateTimer); - this._updateTimer = createTimer(this, PRELOADER_UPDATE_DELAY_MS); - } - }, - - _updateBrowserSizes: function() { - let sizes = this._collectTabBrowserSizes(); - let toRemove = []; - - // Iterate all browsers and check that they - // each can be assigned to one of the sizes. - for (let [key, browser] of this._browsers) { - if (sizes.has(key)) { - // We already have a browser for that size, great! - sizes.delete(key); - } else { - // This browser is superfluous or needs to be resized. - toRemove.push(browser); - this._browsers.delete(key); - } - } - - // Iterate all sizes that we couldn't find a browser for. - for (let [key, {width, height}] of sizes) { - let browser; - if (toRemove.length) { - // Let's just resize one of the superfluous - // browsers and put it back into the map. - browser = toRemove.shift(); - browser.resize(width, height); - } else { - // No more browsers to reuse, create a new one. - browser = new HiddenBrowser(width, height); - } - - this._browsers.set(key, browser); - } - - // Finally, remove all browsers we don't need anymore. - toRemove.forEach(b => b.destroy()); - }, - - _collectTabBrowserSizes: function() { - let sizes = new Map(); - - function tabBrowserBounds() { - let wins = Services.ww.getWindowEnumerator("navigator:browser"); - while (wins.hasMoreElements()) { - let win = wins.getNext(); - if (win.gBrowser) { - let utils = win.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - yield utils.getBoundsWithoutFlushing(win.gBrowser); - } - } - } - - // Collect the sizes of all s out there. - for (let {width, height} of tabBrowserBounds()) { - if (width > 0 && height > 0) { - let key = width + "x" + height; - if (!sizes.has(key)) { - sizes.set(key, {width: width, height: height}); - } - } - } - - return sizes; - } -}; - -function HiddenBrowser(width, height) { - this.resize(width, height); - - HostFrame.get().then(aFrame => { - let doc = aFrame.document; - this._browser = doc.createElementNS(XUL_NS, "browser"); - this._browser.setAttribute("type", "content"); - this._browser.setAttribute("src", NEWTAB_URL); - this._applySize(); - doc.getElementById("win").appendChild(this._browser); - }); -} - -HiddenBrowser.prototype = { - _width: null, - _height: null, - _timer: null, - _needsFrameScripts: true, - - get isPreloaded() { - return this._browser && - this._browser.contentDocument && - this._browser.contentDocument.readyState === "complete" && - this._browser.currentURI.spec === NEWTAB_URL; - }, - - swapWithNewTab: function(aTab) { - if (!this.isPreloaded || this._timer) { - return false; - } - - let win = aTab.ownerDocument.defaultView; - let tabbrowser = win.gBrowser; - - if (!tabbrowser) { - return false; - } - - // Swap docShells. - tabbrowser.swapNewTabWithBrowser(aTab, this._browser); - - // Load all default frame scripts. - if (this._needsFrameScripts) { - this._needsFrameScripts = false; - - let mm = aTab.linkedBrowser.messageManager; - mm.loadFrameScript("chrome://browser/content/content.js", true); - mm.loadFrameScript("chrome://browser/content/content-sessionStore.js", true); - - if ("TabView" in win) { - mm.loadFrameScript("chrome://browser/content/tabview-content.js", true); - } - } - - // Start a timer that will kick off preloading the next newtab page. - this._timer = createTimer(this, PRELOADER_INTERVAL_MS); - - // Signal that we swapped docShells. - return true; - }, - - observe: function() { - this._timer = null; - - // Start pre-loading the new tab page. - this._browser.loadURI(NEWTAB_URL); - }, - - resize: function(width, height) { - this._width = width; - this._height = height; - this._applySize(); - }, - - _applySize: function() { - if (this._browser) { - this._browser.style.width = this._width + "px"; - this._browser.style.height = this._height + "px"; - } - }, - - destroy: function() { - if (this._browser) { - this._browser.remove(); - this._browser = null; - } - - this._timer = clearTimer(this._timer); - } -}; - -var HostFrame = { - _frame: null, - _deferred: null, - - get hiddenDOMDocument() { - return Services.appShell.hiddenDOMWindow.document; - }, - - get isReady() { - return this.hiddenDOMDocument.readyState === "complete"; - }, - - get: function() { - if (!this._deferred) { - this._deferred = Promise.defer(); - this._create(); - } - - return this._deferred.promise; - }, - - destroy: function() { - if (this._frame) { - if (!Cu.isDeadWrapper(this._frame)) { - this._frame.removeEventListener("load", this, true); - this._frame.remove(); - } - - this._frame = null; - this._deferred = null; - } - }, - - handleEvent: function() { - let contentWindow = this._frame.contentWindow; - if (contentWindow.location.href === XUL_PAGE) { - this._frame.removeEventListener("load", this, true); - this._deferred.resolve(contentWindow); - } else { - contentWindow.location = XUL_PAGE; - } - }, - - _create: function() { - if (this.isReady) { - let doc = this.hiddenDOMDocument; - this._frame = doc.createElementNS(HTML_NS, "iframe"); - this._frame.addEventListener("load", this, true); - doc.documentElement.appendChild(this._frame); - } else { - let flags = Ci.nsIThread.DISPATCH_NORMAL; - Services.tm.currentThread.dispatch(() => this._create(), flags); - } - } -}; diff --git a/application/palemoon/modules/CharsetMenu.jsm b/application/palemoon/modules/CharsetMenu.jsm deleted file mode 100644 index f973088bc5..0000000000 --- a/application/palemoon/modules/CharsetMenu.jsm +++ /dev/null @@ -1,160 +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/. */ - -this.EXPORTED_SYMBOLS = [ "CharsetMenu" ]; - -const { classes: Cc, interfaces: Ci, utils: Cu} = Components; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -XPCOMUtils.defineLazyGetter(this, "gBundle", function() { - const kUrl = "chrome://browser/locale/charsetMenu.properties"; - return Services.strings.createBundle(kUrl); -}); -/** - * This set contains encodings that are in the Encoding Standard, except: - * - XSS-dangerous encodings (except ISO-2022-JP which is assumed to be - * too common not to be included). - * - x-user-defined, which practically never makes sense as an end-user-chosen - * override. - * - Encodings that IE11 doesn't have in its correspoding menu. - */ -const kEncodings = new Set([ - // Globally relevant - "UTF-8", - "windows-1252", - // Arabic - "windows-1256", - "ISO-8859-6", - // Baltic - "windows-1257", - "ISO-8859-4", - // "ISO-8859-13", // Hidden since not in menu in IE11 - // Central European - "windows-1250", - "ISO-8859-2", - // Chinese, Simplified - "gbk", - "gb18030", - // Chinese, Traditional - "Big5", - // Cyrillic - "windows-1251", - "ISO-8859-5", - "KOI8-R", - "KOI8-U", - "IBM866", // Not in menu in Chromium. Maybe drop this? - // "x-mac-cyrillic", // Not in menu in IE11 or Chromium. - // Greek - "windows-1253", - "ISO-8859-7", - // Hebrew - "windows-1255", - "ISO-8859-8-I", - "ISO-8859-8", - // Japanese - "Shift_JIS", - "EUC-JP", - "ISO-2022-JP", - // Korean - "EUC-KR", - // Thai - "windows-874", - // Turkish - "windows-1254", - // Vietnamese - "windows-1258", - // Hiding rare European encodings that aren't in the menu in IE11 and would - // make the menu messy by sorting all over the place - // "ISO-8859-3", - // "ISO-8859-10", - // "ISO-8859-14", - // "ISO-8859-15", - // "ISO-8859-16", - // "macintosh" -]); - -// Always at the start of the menu, in this order, followed by a separator. -const kPinned = [ - "UTF-8", - "windows-1252" -]; - -this.CharsetMenu = Object.freeze({ - build: function BuildCharsetMenu(event) { - let parent = event.target; - if (parent.lastChild.localName != "menuseparator") { - // Detector menu or charset menu already built - return; - } - let doc = parent.ownerDocument; - - function createItem(encoding) { - let menuItem = doc.createElement("menuitem"); - menuItem.setAttribute("type", "radio"); - menuItem.setAttribute("name", "charsetGroup"); - try { - menuItem.setAttribute("label", gBundle.GetStringFromName(encoding)); - } catch (e) { - // Localization error but put *something* in the menu to recover. - menuItem.setAttribute("label", encoding); - } - try { - menuItem.setAttribute("accesskey", - gBundle.GetStringFromName(encoding + ".key")); - } catch (e) { - // Some items intentionally don't have an accesskey - } - menuItem.setAttribute("id", "charset." + encoding); - return menuItem; - } - - // Clone the set in order to be able to remove the pinned encodings from - // the cloned set. - let encodings = new Set(kEncodings); - for (let encoding of kPinned) { - encodings.delete(encoding); - parent.appendChild(createItem(encoding)); - } - parent.appendChild(doc.createElement("menuseparator")); - let list = []; - for (let encoding of encodings) { - list.push(createItem(encoding)); - } - - list.sort(function (a, b) { - let titleA = a.getAttribute("label"); - let titleB = b.getAttribute("label"); - // Normal sorting sorts the part in parenthesis in an order that - // happens to make the less frequently-used items first. - let index; - if ((index = titleA.indexOf("(")) > -1) { - titleA = titleA.substring(0, index); - } - if ((index = titleB.indexOf("(")) > -1) { - titleA = titleB.substring(0, index); - } - let comp = titleA.localeCompare(titleB); - if (comp) { - return comp; - } - // secondarily reverse sort by encoding name to sort "windows" or - // "shift_jis" first. This works regardless of localization, because - // the ids aren't localized. - let idA = a.getAttribute("id"); - let idB = b.getAttribute("id"); - if (idA < idB) { - return 1; - } - if (idB < idA) { - return -1; - } - return 0; - }); - - for (let item of list) { - parent.appendChild(item); - } - }, -}); \ No newline at end of file diff --git a/application/palemoon/modules/FormSubmitObserver.jsm b/application/palemoon/modules/FormSubmitObserver.jsm deleted file mode 100644 index 6b2ea3c84b..0000000000 --- a/application/palemoon/modules/FormSubmitObserver.jsm +++ /dev/null @@ -1,235 +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/. */ - -/* - * Handles the validation callback from nsIFormFillController and - * the display of the help panel on invalid elements. - */ - -"use strict"; - -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; - -var HTMLInputElement = Ci.nsIDOMHTMLInputElement; -var HTMLTextAreaElement = Ci.nsIDOMHTMLTextAreaElement; -var HTMLSelectElement = Ci.nsIDOMHTMLSelectElement; -var HTMLButtonElement = Ci.nsIDOMHTMLButtonElement; - -this.EXPORTED_SYMBOLS = [ "FormSubmitObserver" ]; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/BrowserUtils.jsm"); - -function FormSubmitObserver(aWindow, aTabChildGlobal) { - this.init(aWindow, aTabChildGlobal); -} - -FormSubmitObserver.prototype = -{ - _validationMessage: "", - _content: null, - _element: null, - - /* - * Public apis - */ - - init: function(aWindow, aTabChildGlobal) - { - this._content = aWindow; - this._tab = aTabChildGlobal; - this._mm = - this._content.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDocShell) - .sameTypeRootTreeItem - .QueryInterface(Ci.nsIDocShell) - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIContentFrameMessageManager); - - // nsIFormSubmitObserver callback about invalid forms. See HTMLFormElement - // for details. - Services.obs.addObserver(this, "invalidformsubmit", false); - this._tab.addEventListener("pageshow", this, false); - this._tab.addEventListener("unload", this, false); - }, - - uninit: function() - { - Services.obs.removeObserver(this, "invalidformsubmit"); - this._content.removeEventListener("pageshow", this, false); - this._content.removeEventListener("unload", this, false); - this._mm = null; - this._element = null; - this._content = null; - this._tab = null; - }, - - /* - * Events - */ - - handleEvent: function (aEvent) { - switch (aEvent.type) { - case "pageshow": - if (this._isRootDocumentEvent(aEvent)) { - this._hidePopup(); - } - break; - case "unload": - this.uninit(); - break; - case "input": - this._onInput(aEvent); - break; - case "blur": - this._onBlur(aEvent); - break; - } - }, - - /* - * nsIFormSubmitObserver - */ - - notifyInvalidSubmit : function (aFormElement, aInvalidElements) - { - // We are going to handle invalid form submission attempt by focusing the - // first invalid element and show the corresponding validation message in a - // panel attached to the element. - if (!aInvalidElements.length) { - return; - } - - // Ensure that this is the FormSubmitObserver associated with the - // element / window this notification is about. - let element = aInvalidElements.queryElementAt(0, Ci.nsISupports); - if (this._content != element.ownerGlobal.top.document.defaultView) { - return; - } - - if (!(element instanceof HTMLInputElement || - element instanceof HTMLTextAreaElement || - element instanceof HTMLSelectElement || - element instanceof HTMLButtonElement)) { - return; - } - - // Update validation message before showing notification - this._validationMessage = element.validationMessage; - - // Don't connect up to the same element more than once. - if (this._element == element) { - this._showPopup(element); - return; - } - this._element = element; - - element.focus(); - - // Watch for input changes which may change the validation message. - element.addEventListener("input", this, false); - - // Watch for focus changes so we can disconnect our listeners and - // hide the popup. - element.addEventListener("blur", this, false); - - this._showPopup(element); - }, - - /* - * Internal - */ - - /* - * Handles input changes on the form element we've associated a popup - * with. Updates the validation message or closes the popup if form data - * becomes valid. - */ - _onInput: function (aEvent) { - let element = aEvent.originalTarget; - - // If the form input is now valid, hide the popup. - if (element.validity.valid) { - this._hidePopup(); - return; - } - - // If the element is still invalid for a new reason, we should update - // the popup error message. - if (this._validationMessage != element.validationMessage) { - this._validationMessage = element.validationMessage; - this._showPopup(element); - } - }, - - /* - * Blur event handler in which we disconnect from the form element and - * hide the popup. - */ - _onBlur: function (aEvent) { - aEvent.originalTarget.removeEventListener("input", this, false); - aEvent.originalTarget.removeEventListener("blur", this, false); - this._element = null; - this._hidePopup(); - }, - - /* - * Send the show popup message to chrome with appropriate position - * information. Can be called repetitively to update the currently - * displayed popup position and text. - */ - _showPopup: function (aElement) { - // Collect positional information and show the popup - let panelData = {}; - - panelData.message = this._validationMessage; - - // Note, this is relative to the browser and needs to be translated - // in chrome. - panelData.contentRect = BrowserUtils.getElementBoundingRect(aElement); - - // We want to show the popup at the middle of checkbox and radio buttons - // and where the content begin for the other elements. - let offset = 0; - - if (aElement.tagName == 'INPUT' && - (aElement.type == 'radio' || aElement.type == 'checkbox')) { - panelData.position = "bottomcenter topleft"; - } else { - let win = aElement.ownerGlobal; - let style = win.getComputedStyle(aElement, null); - if (style.direction == 'rtl') { - offset = parseInt(style.paddingRight) + parseInt(style.borderRightWidth); - } else { - offset = parseInt(style.paddingLeft) + parseInt(style.borderLeftWidth); - } - let zoomFactor = this._getWindowUtils().fullZoom; - panelData.offset = Math.round(offset * zoomFactor); - panelData.position = "after_start"; - } - this._mm.sendAsyncMessage("FormValidation:ShowPopup", panelData); - }, - - _hidePopup: function () { - this._mm.sendAsyncMessage("FormValidation:HidePopup", {}); - }, - - _getWindowUtils: function () { - return this._content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); - }, - - _isRootDocumentEvent: function (aEvent) { - if (this._content == null) { - return true; - } - let target = aEvent.originalTarget; - return (target == this._content.document || - (target.ownerDocument && target.ownerDocument == this._content.document)); - }, - - QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]) -}; diff --git a/application/palemoon/modules/FormValidationHandler.jsm b/application/palemoon/modules/FormValidationHandler.jsm deleted file mode 100644 index 5a2b07c004..0000000000 --- a/application/palemoon/modules/FormValidationHandler.jsm +++ /dev/null @@ -1,157 +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/. */ - -/* - * Chrome side handling of form validation popup. - */ - -"use strict"; - -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; - -this.EXPORTED_SYMBOLS = [ "FormValidationHandler" ]; - -Cu.import("resource://gre/modules/Services.jsm"); - -var FormValidationHandler = -{ - _panel: null, - _anchor: null, - - /* - * Public apis - */ - - init: function () { - let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); - mm.addMessageListener("FormValidation:ShowPopup", this); - mm.addMessageListener("FormValidation:HidePopup", this); - }, - - uninit: function () { - let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); - mm.removeMessageListener("FormValidation:ShowPopup", this); - mm.removeMessageListener("FormValidation:HidePopup", this); - this._panel = null; - this._anchor = null; - }, - - hidePopup: function () { - this._hidePopup(); - }, - - /* - * Events - */ - - receiveMessage: function (aMessage) { - let window = aMessage.target.ownerDocument.defaultView; - let json = aMessage.json; - let tabBrowser = window.gBrowser; - switch (aMessage.name) { - case "FormValidation:ShowPopup": - // target is the , make sure we're receiving a message - // from the foreground tab. - if (tabBrowser && aMessage.target != tabBrowser.selectedBrowser) { - return; - } - this._showPopup(window, json); - break; - case "FormValidation:HidePopup": - this._hidePopup(); - break; - } - }, - - observe: function (aSubject, aTopic, aData) { - this._hidePopup(); - }, - - handleEvent: function (aEvent) { - switch (aEvent.type) { - case "FullZoomChange": - case "TextZoomChange": - case "ZoomChangeUsingMouseWheel": - case "scroll": - this._hidePopup(); - break; - case "popuphiding": - this._onPopupHiding(aEvent); - break; - } - }, - - /* - * Internal - */ - - _onPopupHiding: function (aEvent) { - aEvent.originalTarget.removeEventListener("popuphiding", this, true); - let tabBrowser = aEvent.originalTarget.ownerDocument.getElementById("content"); - tabBrowser.selectedBrowser.removeEventListener("scroll", this, true); - tabBrowser.selectedBrowser.removeEventListener("FullZoomChange", this, false); - tabBrowser.selectedBrowser.removeEventListener("TextZoomChange", this, false); - tabBrowser.selectedBrowser.removeEventListener("ZoomChangeUsingMouseWheel", this, false); - - this._panel.hidden = true; - this._panel = null; - this._anchor.hidden = true; - this._anchor = null; - }, - - /* - * Shows the form validation popup at a specified position or updates the - * messaging and position if the popup is already displayed. - * - * @aWindow - the chrome window - * @aPanelData - Object that contains popup information - * aPanelData stucture detail: - * contentRect - the bounding client rect of the target element. If - * content is remote, this is relative to the browser, otherwise its - * relative to the window. - * position - popup positional string constants. - * message - the form element validation message text. - */ - _showPopup: function (aWindow, aPanelData) { - let previouslyShown = !!this._panel; - this._panel = aWindow.document.getElementById("invalid-form-popup"); - this._panel.firstChild.textContent = aPanelData.message; - this._panel.hidden = false; - - let tabBrowser = aWindow.gBrowser; - this._anchor = tabBrowser.popupAnchor; - this._anchor.left = aPanelData.contentRect.left; - this._anchor.top = Math.max(0, aPanelData.contentRect.top); - this._anchor.width = aPanelData.contentRect.width; - this._anchor.height = aPanelData.contentRect.height; - this._anchor.hidden = false; - - // Display the panel if it isn't already visible. - if (!previouslyShown) { - // Cleanup after the popup is hidden - this._panel.addEventListener("popuphiding", this, true); - - // Hide if the user scrolls the page - tabBrowser.selectedBrowser.addEventListener("scroll", this, true); - tabBrowser.selectedBrowser.addEventListener("FullZoomChange", this, false); - tabBrowser.selectedBrowser.addEventListener("TextZoomChange", this, false); - tabBrowser.selectedBrowser.addEventListener("ZoomChangeUsingMouseWheel", this, false); - - // Open the popup - this._panel.openPopup(this._anchor, aPanelData.position, 0, 0, false); - } - }, - - /* - * Hide the popup if currently displayed. Will fire an event to onPopupHiding - * above if visible. - */ - _hidePopup: function () { - if (this._panel) { - this._panel.hidePopup(); - } - } -}; diff --git a/application/palemoon/modules/NetworkPrioritizer.jsm b/application/palemoon/modules/NetworkPrioritizer.jsm deleted file mode 100644 index 859068baaa..0000000000 --- a/application/palemoon/modules/NetworkPrioritizer.jsm +++ /dev/null @@ -1,179 +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/. */ - -/* - * This module adjusts network priority for tabs in a way that gives 'important' - * tabs a higher priority. There are 3 levels of priority. Each is listed below - * with the priority adjustment used. - * - * Highest (-10): Selected tab in the focused window. - * Medium (0): Background tabs in the focused window. - * Selected tab in background windows. - * Lowest (+10): Background tabs in background windows. - */ - -this.EXPORTED_SYMBOLS = ["trackBrowserWindow"]; - -const Ci = Components.interfaces; - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - - -// Lazy getters -XPCOMUtils.defineLazyServiceGetter(this, "_focusManager", - "@mozilla.org/focus-manager;1", - "nsIFocusManager"); - - -// Constants -const TAB_EVENTS = ["TabOpen", "TabSelect"]; -const WINDOW_EVENTS = ["activate", "unload"]; -// PRIORITY DELTA is -10 because lower priority value is actually a higher priority -const PRIORITY_DELTA = -10; - - -// Variables -var _lastFocusedWindow = null; -var _windows = []; - - -// Exported symbol -this.trackBrowserWindow = function trackBrowserWindow(aWindow) { - WindowHelper.addWindow(aWindow); -} - - -// Global methods -function _handleEvent(aEvent) { - switch (aEvent.type) { - case "TabOpen": - BrowserHelper.onOpen(aEvent.target.linkedBrowser); - break; - case "TabSelect": - BrowserHelper.onSelect(aEvent.target.linkedBrowser); - break; - case "activate": - WindowHelper.onActivate(aEvent.target); - break; - case "unload": - WindowHelper.removeWindow(aEvent.currentTarget); - break; - } -} - - -// Methods that impact a browser. Put into single object for organization. -var BrowserHelper = { - onOpen: function(aBrowser) { - // If the tab is in the focused window, leave priority as it is - if (aBrowser.ownerDocument.defaultView != _lastFocusedWindow) - this.decreasePriority(aBrowser); - }, - - onSelect: function(aBrowser) { - let windowEntry = WindowHelper.getEntry(aBrowser.ownerDocument.defaultView); - if (windowEntry.lastSelectedBrowser) - this.decreasePriority(windowEntry.lastSelectedBrowser); - this.increasePriority(aBrowser); - - windowEntry.lastSelectedBrowser = aBrowser; - }, - - increasePriority: function(aBrowser) { - aBrowser.adjustPriority(PRIORITY_DELTA); - }, - - decreasePriority: function(aBrowser) { - aBrowser.adjustPriority(PRIORITY_DELTA * -1); - } -}; - - -// Methods that impact a window. Put into single object for organization. -var WindowHelper = { - addWindow: function(aWindow) { - // Build internal data object - _windows.push({ window: aWindow, lastSelectedBrowser: null }); - - // Add event listeners - TAB_EVENTS.forEach(function(event) { - aWindow.gBrowser.tabContainer.addEventListener(event, _handleEvent, false); - }); - WINDOW_EVENTS.forEach(function(event) { - aWindow.addEventListener(event, _handleEvent, false); - }); - - // This gets called AFTER activate event, so if this is the focused window - // we want to activate it. Otherwise, deprioritize it. - if (aWindow == _focusManager.activeWindow) - this.handleFocusedWindow(aWindow); - else - this.decreasePriority(aWindow); - - // Select the selected tab - BrowserHelper.onSelect(aWindow.gBrowser.selectedBrowser); - }, - - removeWindow: function(aWindow) { - if (aWindow == _lastFocusedWindow) - _lastFocusedWindow = null; - - // Delete this window from our tracking - _windows.splice(this.getEntryIndex(aWindow), 1); - - // Remove the event listeners - TAB_EVENTS.forEach(function(event) { - aWindow.gBrowser.tabContainer.removeEventListener(event, _handleEvent, false); - }); - WINDOW_EVENTS.forEach(function(event) { - aWindow.removeEventListener(event, _handleEvent, false); - }); - }, - - onActivate: function(aWindow, aHasFocus) { - // If this window was the last focused window, we don't need to do anything - if (aWindow == _lastFocusedWindow) - return; - - // handleFocusedWindow will deprioritize the current window - this.handleFocusedWindow(aWindow); - - // Lastly we should increase priority for this window - this.increasePriority(aWindow); - }, - - handleFocusedWindow: function(aWindow) { - // If we have a last focused window, we need to deprioritize it first - if (_lastFocusedWindow) - this.decreasePriority(_lastFocusedWindow); - - // aWindow is now focused - _lastFocusedWindow = aWindow; - }, - - // Auxiliary methods - increasePriority: function(aWindow) { - aWindow.gBrowser.browsers.forEach(function(aBrowser) { - BrowserHelper.increasePriority(aBrowser); - }); - }, - - decreasePriority: function(aWindow) { - aWindow.gBrowser.browsers.forEach(function(aBrowser) { - BrowserHelper.decreasePriority(aBrowser); - }); - }, - - getEntry: function(aWindow) { - return _windows[this.getEntryIndex(aWindow)]; - }, - - getEntryIndex: function(aWindow) { - // Assumes that every object has a unique window & it's in the array - for (let i = 0; i < _windows.length; i++) - if (_windows[i].window == aWindow) - return i; - } -}; - diff --git a/application/palemoon/modules/PageMenu.jsm b/application/palemoon/modules/PageMenu.jsm deleted file mode 100644 index d01f62601a..0000000000 --- a/application/palemoon/modules/PageMenu.jsm +++ /dev/null @@ -1,238 +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/. */ - -this.EXPORTED_SYMBOLS = ["PageMenu"]; - -this.PageMenu = function PageMenu() { -} - -PageMenu.prototype = { - PAGEMENU_ATTR: "pagemenu", - GENERATEDITEMID_ATTR: "generateditemid", - - _popup: null, - _builder: null, - - // Given a target node, get the context menu for it or its ancestor. - getContextMenu: function(aTarget) { - let target = aTarget; - while (target) { - let contextMenu = target.contextMenu; - if (contextMenu) { - return contextMenu; - } - target = target.parentNode; - } - - return null; - }, - - // Given a target node, generate a JSON object for any context menu - // associated with it, or null if there is no context menu. - maybeBuild: function(aTarget) { - let pageMenu = this.getContextMenu(aTarget); - if (!pageMenu) { - return null; - } - - pageMenu.QueryInterface(Components.interfaces.nsIHTMLMenu); - pageMenu.sendShowEvent(); - // the show event is not cancelable, so no need to check a result here - - this._builder = pageMenu.createBuilder(); - if (!this._builder) { - return null; - } - - pageMenu.build(this._builder); - - // This serializes then parses again, however this could be avoided in - // the single-process case with further improvement. - let menuString = this._builder.toJSONString(); - if (!menuString) { - return null; - } - - return JSON.parse(menuString); - }, - - // Given a JSON menu object and popup, add the context menu to the popup. - buildAndAttachMenuWithObject: function(aMenu, aBrowser, aPopup) { - if (!aMenu) { - return false; - } - - let insertionPoint = this.getInsertionPoint(aPopup); - if (!insertionPoint) { - return false; - } - - let fragment = aPopup.ownerDocument.createDocumentFragment(); - this.buildXULMenu(aMenu, fragment); - - let pos = insertionPoint.getAttribute(this.PAGEMENU_ATTR); - if (pos == "start") { - insertionPoint.insertBefore(fragment, - insertionPoint.firstChild); - } else if (pos.startsWith("#")) { - insertionPoint.insertBefore(fragment, insertionPoint.querySelector(pos)); - } else { - insertionPoint.appendChild(fragment); - } - - this._popup = aPopup; - - this._popup.addEventListener("command", this); - this._popup.addEventListener("popuphidden", this); - - return true; - }, - - // Construct the XUL menu structure for a given JSON object. - buildXULMenu: function(aNode, aElementForAppending) { - let document = aElementForAppending.ownerDocument; - - let children = aNode.children; - for (let child of children) { - let menuitem; - switch (child.type) { - case "menuitem": - if (!child.id) { - continue; // Ignore children without ids - } - - menuitem = document.createElement("menuitem"); - if (child.checkbox) { - menuitem.setAttribute("type", "checkbox"); - if (child.checked) { - menuitem.setAttribute("checked", "true"); - } - } - - if (child.label) { - menuitem.setAttribute("label", child.label); - } - if (child.icon) { - menuitem.setAttribute("image", child.icon); - menuitem.className = "menuitem-iconic"; - } - if (child.disabled) { - menuitem.setAttribute("disabled", true); - } - - break; - - case "separator": - menuitem = document.createElement("menuseparator"); - break; - - case "menu": - menuitem = document.createElement("menu"); - if (child.label) { - menuitem.setAttribute("label", child.label); - } - - let menupopup = document.createElement("menupopup"); - menuitem.appendChild(menupopup); - - this.buildXULMenu(child, menupopup); - break; - } - - menuitem.setAttribute(this.GENERATEDITEMID_ATTR, child.id ? child.id : 0); - aElementForAppending.appendChild(menuitem); - } - }, - - // Called when the generated menuitem is executed. - handleEvent: function(event) { - let type = event.type; - let target = event.target; - if (type == "command" && target.hasAttribute(this.GENERATEDITEMID_ATTR)) { - // If a builder is assigned, call click on it directly. Otherwise, this is - // likely a menu with data from another process, so send a message to the - // browser to execute the menuitem. - if (this._builder) { - this._builder.click(target.getAttribute(this.GENERATEDITEMID_ATTR)); - } - } else if (type == "popuphidden" && this._popup == target) { - this.removeGeneratedContent(this._popup); - - this._popup.removeEventListener("popuphidden", this); - this._popup.removeEventListener("command", this); - - this._popup = null; - this._builder = null; - } - }, - - // Get the first child of the given element with the given tag name. - getImmediateChild: function(element, tag) { - let child = element.firstChild; - while (child) { - if (child.localName == tag) { - return child; - } - child = child.nextSibling; - } - return null; - }, - - // Return the location where the generated items should be inserted into the - // given popup. They should be inserted as the next sibling of the returned - // element. - getInsertionPoint: function(aPopup) { - if (aPopup.hasAttribute(this.PAGEMENU_ATTR)) - return aPopup; - - let element = aPopup.firstChild; - while (element) { - if (element.localName == "menu") { - let popup = this.getImmediateChild(element, "menupopup"); - if (popup) { - let result = this.getInsertionPoint(popup); - if (result) { - return result; - } - } - } - element = element.nextSibling; - } - - return null; - }, - - // Returns true if custom menu items were present. - maybeBuildAndAttachMenu: function(aTarget, aPopup) { - let menuObject = this.maybeBuild(aTarget); - if (!menuObject) { - return false; - } - - return this.buildAndAttachMenuWithObject(menuObject, null, aPopup); - }, - - // Remove the generated content from the given popup. - removeGeneratedContent: function(aPopup) { - let ungenerated = []; - ungenerated.push(aPopup); - - let count; - while (0 != (count = ungenerated.length)) { - let last = count - 1; - let element = ungenerated[last]; - ungenerated.splice(last, 1); - - let i = element.childNodes.length; - while (i-- > 0) { - let child = element.childNodes[i]; - if (!child.hasAttribute(this.GENERATEDITEMID_ATTR)) { - ungenerated.push(child); - continue; - } - element.removeChild(child); - } - } - } -} diff --git a/application/palemoon/modules/PopupNotifications.jsm b/application/palemoon/modules/PopupNotifications.jsm deleted file mode 100644 index 743ef45628..0000000000 --- a/application/palemoon/modules/PopupNotifications.jsm +++ /dev/null @@ -1,994 +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/. */ - -this.EXPORTED_SYMBOLS = ["PopupNotifications"]; - -var Cc = Components.classes, Ci = Components.interfaces, Cu = Components.utils; - -Cu.import("resource://gre/modules/Services.jsm"); - -const NOTIFICATION_EVENT_DISMISSED = "dismissed"; -const NOTIFICATION_EVENT_REMOVED = "removed"; -const NOTIFICATION_EVENT_SHOWING = "showing"; -const NOTIFICATION_EVENT_SHOWN = "shown"; -const NOTIFICATION_EVENT_SWAPPING = "swapping"; - -const ICON_SELECTOR = ".notification-anchor-icon"; -const ICON_ATTRIBUTE_SHOWING = "showing"; - -const PREF_SECURITY_DELAY = "security.notification_enable_delay"; - -var popupNotificationsMap = new WeakMap(); -var gNotificationParents = new WeakMap; - -function getAnchorFromBrowser(aBrowser) { - let anchor = aBrowser.getAttribute("popupnotificationanchor") || - aBrowser.popupnotificationanchor; - if (anchor) { - if (anchor instanceof Ci.nsIDOMXULElement) { - return anchor; - } - return aBrowser.ownerDocument.getElementById(anchor); - } - return null; -} - -function getNotificationFromElement(aElement) { - // Need to find the associated notification object, which is a bit tricky - // since it isn't associated with the element directly - this is kind of - // gross and very dependent on the structure of the popupnotification - // binding's content. - let notificationEl; - let parent = aElement; - while (parent && (parent = aElement.ownerDocument.getBindingParent(parent))) - notificationEl = parent; - return notificationEl; -} - -/** - * Notification object describes a single popup notification. - * - * @see PopupNotifications.show() - */ -function Notification(id, message, anchorID, mainAction, secondaryActions, - browser, owner, options) { - this.id = id; - this.message = message; - this.anchorID = anchorID; - this.mainAction = mainAction; - this.secondaryActions = secondaryActions || []; - this.browser = browser; - this.owner = owner; - this.options = options || {}; -} - -Notification.prototype = { - - id: null, - message: null, - anchorID: null, - mainAction: null, - secondaryActions: null, - browser: null, - owner: null, - options: null, - timeShown: null, - - /** - * Removes the notification and updates the popup accordingly if needed. - */ - remove: function() { - this.owner.remove(this); - }, - - get anchorElement() { - let iconBox = this.owner.iconBox; - - let anchorElement = getAnchorFromBrowser(this.browser); - - if (!iconBox) - return anchorElement; - - if (!anchorElement && this.anchorID) - anchorElement = iconBox.querySelector("#"+this.anchorID); - - // Use a default anchor icon if it's available - if (!anchorElement) - anchorElement = iconBox.querySelector("#default-notification-icon") || - iconBox; - - return anchorElement; - }, - - reshow: function() { - this.owner._reshowNotifications(this.anchorElement, this.browser); - } -}; - -/** - * The PopupNotifications object manages popup notifications for a given browser - * window. - * @param tabbrowser - * window's . Used to observe tab switching events and - * for determining the active browser element. - * @param panel - * The element to use for notifications. The panel is - * populated with children and displayed it as - * needed. - * @param iconBox - * Reference to a container element that should be hidden or - * unhidden when notifications are hidden or shown. It should be the - * parent of anchor elements whose IDs are passed to show(). - * It is used as a fallback popup anchor if notifications specify - * invalid or non-existent anchor IDs. - */ -this.PopupNotifications = function PopupNotifications(tabbrowser, panel, iconBox) { - if (!(tabbrowser instanceof Ci.nsIDOMXULElement)) - throw "Invalid tabbrowser"; - if (iconBox && !(iconBox instanceof Ci.nsIDOMXULElement)) - throw "Invalid iconBox"; - if (!(panel instanceof Ci.nsIDOMXULElement)) - throw "Invalid panel"; - - this.window = tabbrowser.ownerDocument.defaultView; - this.panel = panel; - this.tabbrowser = tabbrowser; - this.iconBox = iconBox; - this.buttonDelay = Services.prefs.getIntPref(PREF_SECURITY_DELAY); - - this.panel.addEventListener("popuphidden", this, true); - - this.window.addEventListener("activate", this, true); - if (this.tabbrowser.tabContainer) - this.tabbrowser.tabContainer.addEventListener("TabSelect", this, true); -} - -PopupNotifications.prototype = { - - window: null, - panel: null, - tabbrowser: null, - - _iconBox: null, - set iconBox(iconBox) { - // Remove the listeners on the old iconBox, if needed - if (this._iconBox) { - this._iconBox.removeEventListener("click", this, false); - this._iconBox.removeEventListener("keypress", this, false); - } - this._iconBox = iconBox; - if (iconBox) { - iconBox.addEventListener("click", this, false); - iconBox.addEventListener("keypress", this, false); - } - }, - get iconBox() { - return this._iconBox; - }, - - /** - * Retrieve a Notification object associated with the browser/ID pair. - * @param id - * The Notification ID to search for. - * @param browser - * The browser whose notifications should be searched. If null, the - * currently selected browser's notifications will be searched. - * - * @returns the corresponding Notification object, or null if no such - * notification exists. - */ - getNotification: function(id, browser) { - let n = null; - let notifications = this._getNotificationsForBrowser(browser || this.tabbrowser.selectedBrowser); - notifications.some(function(x) x.id == id && (n = x)); - return n; - }, - - /** - * Adds a new popup notification. - * @param browser - * The element associated with the notification. Must not - * be null. - * @param id - * A unique ID that identifies the type of notification (e.g. - * "geolocation"). Only one notification with a given ID can be visible - * at a time. If a notification already exists with the given ID, it - * will be replaced. - * @param message - * The text to be displayed in the notification. - * @param anchorID - * The ID of the element that should be used as this notification - * popup's anchor. May be null, in which case the notification will be - * anchored to the iconBox. - * @param mainAction - * A JavaScript object literal describing the notification button's - * action. If present, it must have the following properties: - * - label (string): the button's label. - * - accessKey (string): the button's accessKey. - * - callback (function): a callback to be invoked when the button is - * pressed, is passed an object that contains the following fields: - * - checkboxChecked: (boolean) If the optional checkbox is checked. - * If null, the notification will not have a button, and - * secondaryActions will be ignored. - * @param secondaryActions - * An optional JavaScript array describing the notification's alternate - * actions. The array should contain objects with the same properties - * as mainAction. These are used to populate the notification button's - * dropdown menu. - * @param options - * An options JavaScript object holding additional properties for the - * notification. The following properties are currently supported: - * persistence: An integer. The notification will not automatically - * dismiss for this many page loads. - * timeout: A time in milliseconds. The notification will not - * automatically dismiss before this time. - * persistWhileVisible: - * A boolean. If true, a visible notification will always - * persist across location changes. - * dismissed: Whether the notification should be added as a dismissed - * notification. Dismissed notifications can be activated - * by clicking on their anchorElement. - * eventCallback: - * Callback to be invoked when the notification changes - * state. The callback's first argument is a string - * identifying the state change: - * "dismissed": notification has been dismissed by the - * user (e.g. by clicking away or switching - * tabs) - * "removed": notification has been removed (due to - * location change or user action) - * "showing": notification is about to be shown - * (this can be fired multiple times as - * notifications are dismissed and re-shown) - * "shown": notification has been shown (this can be fired - * multiple times as notifications are dismissed - * and re-shown) - * "swapping": the docshell of the browser that created - * the notification is about to be swapped to - * another browser. A second parameter contains - * the browser that is receiving the docshell, - * so that the event callback can transfer stuff - * specific to this notification. - * If the callback returns true, the notification - * will be moved to the new browser. - * If the callback isn't implemented, returns false, - * or doesn't return any value, the notification - * will be removed. - * neverShow: Indicate that no popup should be shown for this - * notification. Useful for just showing the anchor icon. - * removeOnDismissal: - * Notifications with this parameter set to true will be - * removed when they would have otherwise been dismissed - * (i.e. any time the popup is closed due to user - * interaction). - * checkbox: An object that allows you to add a checkbox and - * control its behavior with these fields: - * label: - * (required) Label to be shown next to the checkbox. - * checked: - * (optional) Whether the checkbox should be checked - * by default. Defaults to false. - * checkedState: - * (optional) An object that allows you to customize - * the notification state when the checkbox is checked. - * disableMainAction: - * (optional) Whether the mainAction is disabled. - * Defaults to false. - * warningLabel: - * (optional) A (warning) text that is shown below the - * checkbox. Pass null to hide. - * uncheckedState: - * (optional) An object that allows you to customize - * the notification state when the checkbox is not checked. - * Has the same attributes as checkedState. - * popupIconURL: - * A string. URL of the image to be displayed in the popup. - * Normally specified in CSS using list-style-image and the - * .popup-notification-icon[popupid=...] selector. - * learnMoreURL: - * A string URL. Setting this property will make the - * prompt display a "Learn More" link that, when clicked, - * opens the URL in a new tab. - * @returns the Notification object corresponding to the added notification. - */ - show: function(browser, id, message, anchorID, - mainAction, secondaryActions, options) { - function isInvalidAction(a) { - return !a || !(typeof(a.callback) == "function") || !a.label || !a.accessKey; - } - - if (!browser) - throw "PopupNotifications_show: invalid browser"; - if (!id) - throw "PopupNotifications_show: invalid ID"; - if (mainAction && isInvalidAction(mainAction)) - throw "PopupNotifications_show: invalid mainAction"; - if (secondaryActions && secondaryActions.some(isInvalidAction)) - throw "PopupNotifications_show: invalid secondaryActions"; - - let notification = new Notification(id, message, anchorID, mainAction, - secondaryActions, browser, this, options); - - if (options && options.dismissed) - notification.dismissed = true; - - let existingNotification = this.getNotification(id, browser); - if (existingNotification) - this._remove(existingNotification); - - let notifications = this._getNotificationsForBrowser(browser); - notifications.push(notification); - - let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager); - if (browser.docShell.isActive && fm.activeWindow == this.window) { - // show panel now - this._update(notifications, notification.anchorElement, true); - } else { - // Otherwise, update() will display the notification the next time the - // relevant tab/window is selected. - - // If the tab is selected but the window is in the background, let the OS - // tell the user that there's a notification waiting in that window. - // At some point we might want to do something about background tabs here - // too. When the user switches to this window, we'll show the panel if - // this browser is a tab (thus showing the anchor icon). For - // non-tabbrowser browsers, we need to make the icon visible now or the - // user will not be able to open the panel. - if (!notification.dismissed && browser.docShell.isActive) { - this.window.getAttention(); - if (notification.anchorElement.parentNode != this.iconBox) { - notification.anchorElement.setAttribute(ICON_ATTRIBUTE_SHOWING, "true"); - } - } - - // Notify observers that we're not showing the popup (useful for testing) - this._notify("backgroundShow"); - } - - return notification; - }, - - /** - * Returns true if the notification popup is currently being displayed. - */ - get isPanelOpen() { - let panelState = this.panel.state; - - return panelState == "showing" || panelState == "open"; - }, - - /** - * Called by the consumer to indicate that a browser's location has changed, - * so that we can update the active notifications accordingly. - */ - locationChange: function(aBrowser) { - if (!aBrowser) - throw "PopupNotifications_locationChange: invalid browser"; - - let notifications = this._getNotificationsForBrowser(aBrowser); - - notifications = notifications.filter(function(notification) { - // The persistWhileVisible option allows an open notification to persist - // across location changes - if (notification.options.persistWhileVisible && - this.isPanelOpen) { - if ("persistence" in notification.options && - notification.options.persistence) - notification.options.persistence--; - return true; - } - - // The persistence option allows a notification to persist across multiple - // page loads - if ("persistence" in notification.options && - notification.options.persistence) { - notification.options.persistence--; - return true; - } - - // The timeout option allows a notification to persist until a certain time - if ("timeout" in notification.options && - Date.now() <= notification.options.timeout) { - return true; - } - - this._fireCallback(notification, NOTIFICATION_EVENT_REMOVED); - return false; - }, this); - - this._setNotificationsForBrowser(aBrowser, notifications); - - if (aBrowser.docShell.isActive) { - // get the anchor element if the browser has defined one so it will - // _update will handle both the tabs iconBox and non-tab permission - // anchors. - let anchorElement = notifications.length > 0 ? notifications[0].anchorElement : null; - if (!anchorElement) - anchorElement = getAnchorFromBrowser(aBrowser); - this._update(notifications, anchorElement); - } - }, - - /** - * Removes a Notification. - * @param notification - * The Notification object to remove. - */ - remove: function(notification) { - this._remove(notification); - - if (notification.browser.docShell.isActive) { - let notifications = this._getNotificationsForBrowser(notification.browser); - this._update(notifications, notification.anchorElement); - } - }, - - handleEvent: function(aEvent) { - switch (aEvent.type) { - case "popuphidden": - this._onPopupHidden(aEvent); - break; - case "activate": - case "TabSelect": - let self = this; - // setTimeout(..., 0) needed, otherwise openPopup from "activate" event - // handler results in the popup being hidden again for some reason... - this.window.setTimeout(function() { - self._update(); - }, 0); - break; - case "click": - case "keypress": - this._onIconBoxCommand(aEvent); - break; - } - }, - -//////////////////////////////////////////////////////////////////////////////// -// Utility methods -//////////////////////////////////////////////////////////////////////////////// - - _ignoreDismissal: null, - _currentAnchorElement: null, - - /** - * Gets notifications for the currently selected browser. - */ - get _currentNotifications() { - return this.tabbrowser.selectedBrowser ? this._getNotificationsForBrowser(this.tabbrowser.selectedBrowser) : []; - }, - - _remove: function(notification) { - // This notification may already be removed, in which case let's just fail - // silently. - let notifications = this._getNotificationsForBrowser(notification.browser); - if (!notifications) - return; - - var index = notifications.indexOf(notification); - if (index == -1) - return; - - if (notification.browser.docShell.isActive) - notification.anchorElement.removeAttribute(ICON_ATTRIBUTE_SHOWING); - - // remove the notification - notifications.splice(index, 1); - this._fireCallback(notification, NOTIFICATION_EVENT_REMOVED); - }, - - /** - * Dismisses the notification without removing it. - */ - _dismiss: function() { - let browser = this.panel.firstChild && - this.panel.firstChild.notification.browser; - if (typeof this.panel.hidePopup === "function") { - this.panel.hidePopup(); - } - if (browser) - browser.focus(); - }, - - /** - * Hides the notification popup. - */ - _hidePanel: function() { - this._ignoreDismissal = true; - if (typeof this.panel.hidePopup === "function") { - this.panel.hidePopup(); - } - this._ignoreDismissal = false; - }, - - /** - * Removes all notifications from the notification popup. - */ - _clearPanel: function() { - let popupnotification; - while ((popupnotification = this.panel.lastChild)) { - this.panel.removeChild(popupnotification); - - // If this notification was provided by the chrome document rather than - // created ad hoc, move it back to where we got it from. - let originalParent = gNotificationParents.get(popupnotification); - if (originalParent) { - popupnotification.notification = null; - - // Remove nodes dynamically added to the notification's menu button - // in _refreshPanel. Keep popupnotificationcontent nodes; they are - // provided by the chrome document. - let contentNode = popupnotification.lastChild; - while (contentNode) { - let previousSibling = contentNode.previousSibling; - if (contentNode.nodeName != "popupnotificationcontent") - popupnotification.removeChild(contentNode); - contentNode = previousSibling; - } - - // Re-hide the notification such that it isn't rendered in the chrome - // document. _refreshPanel will unhide it again when needed. - popupnotification.hidden = true; - - originalParent.appendChild(popupnotification); - } - } - }, - - _refreshPanel: function(notificationsToShow) { - this._clearPanel(); - - const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; - - notificationsToShow.forEach(function(n) { - let doc = this.window.document; - - // Append "-notification" to the ID to try to avoid ID conflicts with other stuff - // in the document. - let popupnotificationID = n.id + "-notification"; - - // If the chrome document provides a popupnotification with this id, use - // that. Otherwise create it ad-hoc. - let popupnotification = doc.getElementById(popupnotificationID); - if (popupnotification) - gNotificationParents.set(popupnotification, popupnotification.parentNode); - else - popupnotification = doc.createElementNS(XUL_NS, "popupnotification"); - - popupnotification.setAttribute("label", n.message); - popupnotification.setAttribute("id", popupnotificationID); - popupnotification.setAttribute("popupid", n.id); - popupnotification.setAttribute("closebuttoncommand", "PopupNotifications._dismiss();"); - if (n.mainAction) { - popupnotification.setAttribute("buttonlabel", n.mainAction.label); - popupnotification.setAttribute("buttonaccesskey", n.mainAction.accessKey); - popupnotification.setAttribute("buttoncommand", "PopupNotifications._onButtonCommand(event);"); - popupnotification.setAttribute("menucommand", "PopupNotifications._onMenuCommand(event);"); - popupnotification.setAttribute("closeitemcommand", "PopupNotifications._dismiss();event.stopPropagation();"); - } else { - popupnotification.removeAttribute("buttonlabel"); - popupnotification.removeAttribute("buttonaccesskey"); - popupnotification.removeAttribute("buttoncommand"); - popupnotification.removeAttribute("menucommand"); - popupnotification.removeAttribute("closeitemcommand"); - } - - if (n.options.popupIconURL) - popupnotification.setAttribute("icon", n.options.popupIconURL); - if (n.options.learnMoreURL) - popupnotification.setAttribute("learnmoreurl", n.options.learnMoreURL); - else - popupnotification.removeAttribute("learnmoreurl"); - - popupnotification.notification = n; - - if (n.secondaryActions) { - n.secondaryActions.forEach(function(a) { - let item = doc.createElementNS(XUL_NS, "menuitem"); - item.setAttribute("label", a.label); - item.setAttribute("accesskey", a.accessKey); - item.notification = n; - item.action = a; - - popupnotification.appendChild(item); - }, this); - - if (n.secondaryActions.length) { - let closeItemSeparator = doc.createElementNS(XUL_NS, "menuseparator"); - popupnotification.appendChild(closeItemSeparator); - } - } - - let checkbox = n.options.checkbox; - if (checkbox && checkbox.label) { - let checked = n._checkboxChecked != null ? n._checkboxChecked : !!checkbox.checked; - - popupnotification.setAttribute("checkboxhidden", "false"); - popupnotification.setAttribute("checkboxchecked", checked); - popupnotification.setAttribute("checkboxlabel", checkbox.label); - - popupnotification.setAttribute("checkboxcommand", "PopupNotifications._onCheckboxCommand(event);"); - - if (checked) { - this._setNotificationUIState(popupnotification, checkbox.checkedState); - } else { - this._setNotificationUIState(popupnotification, checkbox.uncheckedState); - } - } else { - popupnotification.setAttribute("checkboxhidden", "true"); - } - - this.panel.appendChild(popupnotification); - - // The popupnotification may be hidden if we got it from the chrome - // document rather than creating it ad hoc. - popupnotification.hidden = false; - }, this); - }, - - _setNotificationUIState(notification, state={}) { - notification.setAttribute("mainactiondisabled", state.disableMainAction || "false"); - - if (state.warningLabel) { - notification.setAttribute("warninglabel", state.warningLabel); - notification.setAttribute("warninghidden", "false"); - } else { - notification.setAttribute("warninghidden", "true"); - } - }, - - _onCheckboxCommand(event) { - let notificationEl = getNotificationFromElement(event.originalTarget); - let checked = notificationEl.checkbox.checked; - let notification = notificationEl.notification; - - // Save checkbox state to be able to persist it when re-opening the doorhanger. - notification._checkboxChecked = checked; - - if (checked) { - this._setNotificationUIState(notificationEl, notification.options.checkbox.checkedState); - } else { - this._setNotificationUIState(notificationEl, notification.options.checkbox.uncheckedState); - } - }, - - _showPanel: function(notificationsToShow, anchorElement) { - this.panel.hidden = false; - - notificationsToShow.forEach(function(n) { - this._fireCallback(n, NOTIFICATION_EVENT_SHOWING); - }, this); - this._refreshPanel(notificationsToShow); - - if (this.isPanelOpen && this._currentAnchorElement == anchorElement) - return; - - // If the panel is already open but we're changing anchors, we need to hide - // it first. Otherwise it can appear in the wrong spot. (_hidePanel is - // safe to call even if the panel is already hidden.) - this._hidePanel(); - - // If the anchor element is hidden or null, use the tab as the anchor. We - // only ever show notifications for the current browser, so we can just use - // the current tab. - let selectedTab = this.tabbrowser.selectedTab; - if (anchorElement) { - let bo = anchorElement.boxObject; - if (bo.height == 0 && bo.width == 0) - anchorElement = selectedTab; // hidden - } else { - anchorElement = selectedTab; // null - } - - this._currentAnchorElement = anchorElement; - - // On OS X and Linux we need a different panel arrow color for - // click-to-play plugins, so copy the popupid and use css. - this.panel.setAttribute("popupid", this.panel.firstChild.getAttribute("popupid")); - notificationsToShow.forEach(function(n) { - // Remember the time the notification was shown for the security delay. - n.timeShown = this.window.performance.now(); - }, this); - this.panel.openPopup(anchorElement, "bottomcenter topleft"); - notificationsToShow.forEach(function(n) { - this._fireCallback(n, NOTIFICATION_EVENT_SHOWN); - }, this); - }, - - /** - * Updates the notification state in response to window activation or tab - * selection changes. - * - * @param notifications an array of Notification instances. if null, - * notifications will be retrieved off the current - * browser tab - * @param anchor is a XUL element that the notifications panel will be - * anchored to - * @param dismissShowing if true, dismiss any currently visible notifications - * if there are no notifications to show. Otherwise, - * currently displayed notifications will be left alone. - */ - _update: function(notifications, anchor, dismissShowing = false) { - let useIconBox = this.iconBox && (!anchor || anchor.parentNode == this.iconBox); - if (useIconBox) { - // hide icons of the previous tab. - this._hideIcons(); - } - - let anchorElement = anchor, notificationsToShow = []; - if (!notifications) - notifications = this._currentNotifications; - let haveNotifications = notifications.length > 0; - if (haveNotifications) { - // Only show the notifications that have the passed-in anchor (or the - // first notification's anchor, if none was passed in). Other - // notifications will be shown once these are dismissed. - anchorElement = anchor || notifications[0].anchorElement; - - if (useIconBox) { - this._showIcons(notifications); - this.iconBox.hidden = false; - } else if (anchorElement) { - anchorElement.setAttribute(ICON_ATTRIBUTE_SHOWING, "true"); - // use the anchorID as a class along with the default icon class as a - // fallback if anchorID is not defined in CSS. We always use the first - // notifications icon, so in the case of multiple notifications we'll - // only use the default icon - if (anchorElement.classList.contains("notification-anchor-icon")) { - // remove previous icon classes - let className = anchorElement.className.replace(/([-\w]+-notification-icon\s?)/g,"") - className = "default-notification-icon " + className; - if (notifications.length == 1) { - className = notifications[0].anchorID + " " + className; - } - anchorElement.className = className; - } - } - - // Also filter out notifications that have been dismissed. - notificationsToShow = notifications.filter(function(n) { - return !n.dismissed && n.anchorElement == anchorElement && - !n.options.neverShow; - }); - } - - if (notificationsToShow.length > 0) { - this._showPanel(notificationsToShow, anchorElement); - } else { - // Notify observers that we're not showing the popup (useful for testing) - this._notify("updateNotShowing"); - - // Close the panel if there are no notifications to show. - // When called from PopupNotifications.show() we should never close the - // panel, however. It may just be adding a dismissed notification, in - // which case we want to continue showing any existing notifications. - if (!dismissShowing) - this._dismiss(); - - // Only hide the iconBox if we actually have no notifications (as opposed - // to not having any showable notifications) - if (!haveNotifications) { - if (useIconBox) - this.iconBox.hidden = true; - else if (anchorElement) - anchorElement.removeAttribute(ICON_ATTRIBUTE_SHOWING); - } - } - }, - - _showIcons: function(aCurrentNotifications) { - for (let notification of aCurrentNotifications) { - let anchorElm = notification.anchorElement; - if (anchorElm) { - anchorElm.setAttribute(ICON_ATTRIBUTE_SHOWING, "true"); - } - } - }, - - _hideIcons: function() { - let icons = this.iconBox.querySelectorAll(ICON_SELECTOR); - for (let icon of icons) { - icon.removeAttribute(ICON_ATTRIBUTE_SHOWING); - } - }, - - /** - * Gets and sets notifications for the browser. - */ - _getNotificationsForBrowser: function(browser) { - let notifications = popupNotificationsMap.get(browser); - if (!notifications) { - // Initialize the WeakMap for the browser so callers can reference/manipulate the array. - notifications = []; - popupNotificationsMap.set(browser, notifications); - } - return notifications; - }, - _setNotificationsForBrowser: function(browser, notifications) { - popupNotificationsMap.set(browser, notifications); - return notifications; - }, - - _onIconBoxCommand: function(event) { - // Left click, space or enter only - let type = event.type; - if (type == "click" && event.button != 0) - return; - - if (type == "keypress" && - !(event.charCode == Ci.nsIDOMKeyEvent.DOM_VK_SPACE || - event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_RETURN)) - return; - - if (this._currentNotifications.length == 0) - return; - - // Get the anchor that is the immediate child of the icon box - let anchor = event.target; - while (anchor && anchor.parentNode != this.iconBox) - anchor = anchor.parentNode; - - this._reshowNotifications(anchor); - }, - - _reshowNotifications: function(anchor, browser) { - // Mark notifications anchored to this anchor as un-dismissed - let notifications = this._getNotificationsForBrowser(browser || this.tabbrowser.selectedBrowser); - notifications.forEach(function(n) { - if (n.anchorElement == anchor) - n.dismissed = false; - }); - - // ...and then show them. - this._update(notifications, anchor); - }, - - _swapBrowserNotifications: function(ourBrowser, otherBrowser) { - // When swaping browser docshells (e.g. dragging tab to new window) we need - // to update our notification map. - - let ourNotifications = this._getNotificationsForBrowser(ourBrowser); - let other = otherBrowser.ownerDocument.defaultView.PopupNotifications; - if (!other) { - if (ourNotifications.length > 0) - Cu.reportError("unable to swap notifications: otherBrowser doesn't support notifications"); - return; - } - let otherNotifications = other._getNotificationsForBrowser(otherBrowser); - if (ourNotifications.length < 1 && otherNotifications.length < 1) { - // No notification to swap. - return; - } - - otherNotifications = otherNotifications.filter(n => { - if (this._fireCallback(n, NOTIFICATION_EVENT_SWAPPING, ourBrowser)) { - n.browser = ourBrowser; - n.owner = this; - return true; - } - other._fireCallback(n, NOTIFICATION_EVENT_REMOVED); - return false; - }); - - ourNotifications = ourNotifications.filter(n => { - if (this._fireCallback(n, NOTIFICATION_EVENT_SWAPPING, otherBrowser)) { - n.browser = otherBrowser; - n.owner = other; - return true; - } - this._fireCallback(n, NOTIFICATION_EVENT_REMOVED); - return false; - }); - - this._setNotificationsForBrowser(otherBrowser, ourNotifications); - other._setNotificationsForBrowser(ourBrowser, otherNotifications); - - if (otherNotifications.length > 0) - this._update(otherNotifications, otherNotifications[0].anchorElement); - if (ourNotifications.length > 0) - other._update(ourNotifications, ourNotifications[0].anchorElement); - }, - - _fireCallback: function(n, event, ...args) { - try { - if (n.options.eventCallback) - return n.options.eventCallback.call(n, event, ...args); - } catch (error) { - Cu.reportError(error); - } - return undefined; - }, - - _onPopupHidden: function(event) { - if (event.target != this.panel || this._ignoreDismissal) - return; - - let browser = this.panel.firstChild && - this.panel.firstChild.notification.browser; - if (!browser) - return; - - let notifications = this._getNotificationsForBrowser(browser); - // Mark notifications as dismissed and call dismissal callbacks - Array.forEach(this.panel.childNodes, function(nEl) { - let notificationObj = nEl.notification; - // Never call a dismissal handler on a notification that's been removed. - if (notifications.indexOf(notificationObj) == -1) - return; - - // Do not mark the notification as dismissed or fire NOTIFICATION_EVENT_DISMISSED - // if the notification is removed. - if (notificationObj.options.removeOnDismissal) - this._remove(notificationObj); - else { - notificationObj.dismissed = true; - this._fireCallback(notificationObj, NOTIFICATION_EVENT_DISMISSED); - } - }, this); - - this._clearPanel(); - - this._update(); - }, - - _onButtonCommand: function(event) { - let notificationEl = getNotificationFromElement(event.originalTarget); - - if (!notificationEl) - throw "PopupNotifications_onButtonCommand: couldn't find notification element"; - - if (!notificationEl.notification) - throw "PopupNotifications_onButtonCommand: couldn't find notification"; - - let notification = notificationEl.notification; - let timeSinceShown = this.window.performance.now() - notification.timeShown; - - // Only report the first time mainAction is triggered and remember that this occurred. - if (!notification.timeMainActionFirstTriggered) { - notification.timeMainActionFirstTriggered = timeSinceShown; - } - - if (timeSinceShown < this.buttonDelay) { - Services.console.logStringMessage("PopupNotifications_onButtonCommand: " + - "Button click happened before the security delay: " + - timeSinceShown + "ms"); - return; - } - - try { - notification.mainAction.callback.call(undefined, { - checkboxChecked: notificationEl.checkbox.checked - }); - } catch (error) { - Cu.reportError(error); - } - - this._remove(notification); - this._update(); - }, - - _onMenuCommand: function(event) { - let target = event.originalTarget; - if (!target.action || !target.notification) - throw "menucommand target has no associated action/notification"; - - let notificationEl = target.parentElement; - event.stopPropagation(); - - try { - target.action.callback.call(undefined, { - checkboxChecked: notificationEl.checkbox.checked - }); - } catch (error) { - Cu.reportError(error); - } - - this._remove(target.notification); - this._update(); - }, - - _notify: function(topic) { - Services.obs.notifyObservers(null, "PopupNotifications-" + topic, ""); - }, -}; diff --git a/application/palemoon/modules/QuotaManager.jsm b/application/palemoon/modules/QuotaManager.jsm deleted file mode 100644 index 48cfe88b3b..0000000000 --- a/application/palemoon/modules/QuotaManager.jsm +++ /dev/null @@ -1,51 +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/. */ - -this.EXPORTED_SYMBOLS = ["QuotaManagerHelper"]; - -Components.utils.import('resource://gre/modules/Services.jsm'); - -const Ci = Components.interfaces; -const Cc = Components.classes; -const Cu = Components.utils; - -this.QuotaManagerHelper = { - clear: function(isShutDown) { - try { - var stord = Services.dirsvc.get("ProfD", Ci.nsIFile); - stord.append("storage"); - if (stord.exists() && stord.isDirectory()) { - var doms = {}; - for (var stor of ["default", "permanent", "temporary"]) { - var storsubd = stord.clone(); - storsubd.append(stor); - if (storsubd.exists() && storsubd.isDirectory()) { - var entries = storsubd.directoryEntries; - while(entries.hasMoreElements()) { - var host, entry = entries.getNext(); - entry.QueryInterface(Ci.nsIFile); - if ((host = /^(https?|file)\+\+\+(.+)$/.exec(entry.leafName)) !== null) { - if (isShutDown) { - entry.remove(true); - } else { - doms[host[1] + "://" + host[2]] = true; - } - } - } - } - } - var qm = Cc["@mozilla.org/dom/quota-manager-service;1"] - .getService(Ci.nsIQuotaManagerService); - for (var dom in doms) { - var uri = Services.io.newURI(dom, null, null); - let principal = Services.scriptSecurityManager - .createCodebasePrincipal(uri, {}); - qm.clearStoragesForPrincipal(principal); - } - } - } catch(er) { - Cu.reportError(er); - } - } -}; diff --git a/application/palemoon/modules/RecentWindow.jsm b/application/palemoon/modules/RecentWindow.jsm deleted file mode 100644 index bfcce17e0d..0000000000 --- a/application/palemoon/modules/RecentWindow.jsm +++ /dev/null @@ -1,68 +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"; - -this.EXPORTED_SYMBOLS = ["RecentWindow"]; - -const Cu = Components.utils; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); - -#ifndef XP_WIN -#define BROKEN_WM_Z_ORDER -#endif - -this.RecentWindow = { - /* - * Get the most recent browser window. - * - * @param aOptions an object accepting the arguments for the search. - * * private: true to restrict the search to private windows - * only, false to restrict the search to non-private only. - * Omit the property to search in both groups. - * * allowPopups: true if popup windows are permissable. - */ - getMostRecentBrowserWindow: function(aOptions) { - let checkPrivacy = typeof aOptions == "object" && - "private" in aOptions; - - let allowPopups = typeof aOptions == "object" && !!aOptions.allowPopups; - - function isSuitableBrowserWindow(win) { - return (!win.closed && - (allowPopups || win.toolbar.visible) && - (!checkPrivacy || - PrivateBrowsingUtils.permanentPrivateBrowsing || - PrivateBrowsingUtils.isWindowPrivate(win) == aOptions.private)); - } - -#ifdef BROKEN_WM_Z_ORDER - let win = Services.wm.getMostRecentWindow("navigator:browser"); - - // if we're lucky, this isn't a popup, and we can just return this - if (win && !isSuitableBrowserWindow(win)) { - win = null; - let windowList = Services.wm.getEnumerator("navigator:browser"); - // this is oldest to newest, so this gets a bit ugly - while (windowList.hasMoreElements()) { - let nextWin = windowList.getNext(); - if (isSuitableBrowserWindow(nextWin)) - win = nextWin; - } - } - return win; -#else - let windowList = Services.wm.getZOrderDOMWindowEnumerator("navigator:browser", true); - while (windowList.hasMoreElements()) { - let win = windowList.getNext(); - if (isSuitableBrowserWindow(win)) - return win; - } - return null; -#endif - } -}; - diff --git a/application/palemoon/modules/SharedFrame.jsm b/application/palemoon/modules/SharedFrame.jsm deleted file mode 100644 index b9d59bfa98..0000000000 --- a/application/palemoon/modules/SharedFrame.jsm +++ /dev/null @@ -1,221 +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"; - -this.EXPORTED_SYMBOLS = [ "SharedFrame" ]; - -const Ci = Components.interfaces; -const Cu = Components.utils; - -/** - * The purpose of this module is to create and group various iframe - * elements that are meant to all display the same content and only - * one at a time. This makes it possible to have the content loaded - * only once, while the other iframes can be kept as placeholders to - * quickly move the content to them through the swapFrameLoaders function - * when another one of the placeholder is meant to be displayed. - * */ - -var Frames = new Map(); - -/** - * The Frames map is the main data structure that holds information - * about the groups being tracked. Each entry's key is the group name, - * and the object holds information about what is the URL being displayed - * on that group, and what is the active element on the group (the frame that - * holds the loaded content). - * The reference to the activeFrame is a weak reference, which allows the - * frame to go away at any time, and when that happens the module considers that - * there are no active elements in that group. The group can be reactivated - * by changing the URL, calling preload again or adding a new element. - * - * - * Frames = { - * "messages-panel": { - * url: string, - * activeFrame: weakref - * } - * } - * - * Each object on the map is called a _SharedFrameGroup, which is an internal - * class of this module which does not automatically keep track of its state. This - * object should not be used externally, and all control should be handled by the - * module's functions. - */ - -function UNLOADED_URL(aStr) "data:text/html;charset=utf-8,"; - - -this.SharedFrame = { - /** - * Creates an iframe element and track it as part of the specified group - * The module must create the iframe itself because it needs to do some special - * handling for the element's src attribute. - * - * @param aGroupName the name of the group to which this frame belongs - * @param aParent the parent element to which the frame will be appended to - * @param aFrameAttributes an object with a list of attributes to set in the iframe - * before appending it to the DOM. The "src" attribute has - * special meaning here and if it's not blank it specifies - * the URL that will be initially assigned to this group - * @param aPreload optional, tells if the URL specified in the src attribute - * should be preloaded in the frame being created, in case - * it's not yet preloaded in any other frame of the group. - * This parameter has no meaning if src is blank. - */ - createFrame: function (aGroupName, aParent, aFrameAttributes, aPreload = true) { - let frame = aParent.ownerDocument.createElement("iframe"); - - for (let [key, val] of Iterator(aFrameAttributes)) { - frame.setAttribute(key, val); - } - - let src = aFrameAttributes.src; - if (!src) { - aPreload = false; - } - - let group = Frames.get(aGroupName); - - if (group) { - // If this group has already been created - - if (aPreload && !group.isAlive) { - // If aPreload is set and the group is not already loaded, load it. - // This can happen if: - // - aPreload was not used while creating the previous frames of this group, or - // - the previously active frame went dead in the meantime - group.url = src; - this.preload(aGroupName, frame); - } else { - // If aPreload is not set, or the group is already loaded in a different frame, - // there's not much that we need to do here: just create this frame as an - // inactivate placeholder - frame.setAttribute("src", UNLOADED_URL(aGroupName)); - } - - } else { - // This is the first time we hear about this group, so let's start tracking it, - // and also preload it if the src attribute was set and aPreload = true - group = new _SharedFrameGroup(src); - Frames.set(aGroupName, group); - - if (aPreload) { - this.preload(aGroupName, frame); - } else { - frame.setAttribute("src", UNLOADED_URL(aGroupName)); - } - } - - aParent.appendChild(frame); - return frame; - - }, - - /** - * Function that moves the loaded content from one active frame to - * another one that is currently a placeholder. If there's no active - * frame in the group, the content is loaded/reloaded. - * - * @param aGroupName the name of the group - * @param aTargetFrame the frame element to which the content should - * be moved to. - */ - setOwner: function (aGroupName, aTargetFrame) { - let group = Frames.get(aGroupName); - let frame = group.activeFrame; - - if (frame == aTargetFrame) { - // nothing to do here - return; - } - - if (group.isAlive) { - // Move document ownership to the desired frame, and make it the active one - frame.QueryInterface(Ci.nsIFrameLoaderOwner).swapFrameLoaders(aTargetFrame); - group.activeFrame = aTargetFrame; - } else { - // Previous owner was dead, reload the document at the new owner and make it the active one - aTargetFrame.setAttribute("src", group.url); - group.activeFrame = aTargetFrame; - } - }, - - /** - * Updates the current URL in use by this group, and loads it into the active frame. - * - * @param aGroupName the name of the group - * @param aURL the new url - */ - updateURL: function (aGroupName, aURL) { - let group = Frames.get(aGroupName); - group.url = aURL; - - if (group.isAlive) { - group.activeFrame.setAttribute("src", aURL); - } - }, - - /** - * Loads the group's url into a target frame, if the group doesn't have a currently - * active frame. - * - * @param aGroupName the name of the group - * @param aTargetFrame the frame element which should be made active and - * have the group's content loaded to - */ - preload: function (aGroupName, aTargetFrame) { - let group = Frames.get(aGroupName); - if (!group.isAlive) { - aTargetFrame.setAttribute("src", group.url); - group.activeFrame = aTargetFrame; - } - }, - - /** - * Tells if a group currently have an active element. - * - * @param aGroupName the name of the group - */ - isGroupAlive: function (aGroupName) { - return Frames.get(aGroupName).isAlive; - }, - - /** - * Forgets about this group. This function doesn't need to be used - * unless the group's name needs to be reused. - * - * @param aGroupName the name of the group - */ - forgetGroup: function (aGroupName) { - Frames.delete(aGroupName); - } -} - - -function _SharedFrameGroup(aURL) { - this.url = aURL; - this._activeFrame = null; -} - -_SharedFrameGroup.prototype = { - get isAlive() { - let frame = this.activeFrame; - return !!(frame && - frame.contentDocument && - frame.contentDocument.location); - }, - - get activeFrame() { - return this._activeFrame && - this._activeFrame.get(); - }, - - set activeFrame(aActiveFrame) { - this._activeFrame = aActiveFrame - ? Cu.getWeakReference(aActiveFrame) - : null; - } -} diff --git a/application/palemoon/modules/Windows8WindowFrameColor.jsm b/application/palemoon/modules/Windows8WindowFrameColor.jsm deleted file mode 100644 index 969d9ded46..0000000000 --- a/application/palemoon/modules/Windows8WindowFrameColor.jsm +++ /dev/null @@ -1,53 +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"; -const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; - -this.EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"]; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/WindowsRegistry.jsm"); - -var Windows8WindowFrameColor = { - _windowFrameColor: null, - - get_win8: function() { - if (this._windowFrameColor) - return this._windowFrameColor; - - const HKCU = Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER; - const dwmKey = "Software\\Microsoft\\Windows\\DWM"; - - // Window frame base color component values when Color Intensity is at 0. - let frameBaseColor = 217; - - let windowFrameColor = WindowsRegistry.readRegKey(HKCU, dwmKey, - "ColorizationColor"); - if (windowFrameColor == undefined) { - // Return the default color if unset or colorization not used - return this._windowFrameColor = [frameBaseColor, frameBaseColor, frameBaseColor]; - } - // The color returned from the Registry is in decimal form. - let windowFrameColorHex = windowFrameColor.toString(16); - // Zero-pad the number just to make sure that it is 8 digits. - windowFrameColorHex = ("00000000" + windowFrameColorHex).substr(-8); - let windowFrameColorArray = windowFrameColorHex.match(/../g); - let [unused, fgR, fgG, fgB] = windowFrameColorArray.map(val => parseInt(val, 16)); - let windowFrameColorBalance = WindowsRegistry.readRegKey(HKCU, dwmKey, - "ColorizationColorBalance"); - // Default to balance=78 if reg key isn't defined - if (windowFrameColorBalance == undefined) { - windowFrameColorBalance = 78; - } - let alpha = windowFrameColorBalance / 100; - - // Alpha-blend the foreground color with the frame base color. - let r = Math.round(fgR * alpha + frameBaseColor * (1 - alpha)); - let g = Math.round(fgG * alpha + frameBaseColor * (1 - alpha)); - let b = Math.round(fgB * alpha + frameBaseColor * (1 - alpha)); - return this._windowFrameColor = [r, g, b]; - } -}; diff --git a/application/palemoon/modules/WindowsJumpLists.jsm b/application/palemoon/modules/WindowsJumpLists.jsm deleted file mode 100644 index 62a8a10f76..0000000000 --- a/application/palemoon/modules/WindowsJumpLists.jsm +++ /dev/null @@ -1,591 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); - -/** - * Constants - */ - -const Cc = Components.classes; -const Ci = Components.interfaces; - -// Stop updating jumplists after some idle time. -const IDLE_TIMEOUT_SECONDS = 5 * 60; - -// Prefs -const PREF_TASKBAR_BRANCH = "browser.taskbar.lists."; -const PREF_TASKBAR_ENABLED = "enabled"; -const PREF_TASKBAR_ITEMCOUNT = "maxListItemCount"; -const PREF_TASKBAR_FREQUENT = "frequent.enabled"; -const PREF_TASKBAR_RECENT = "recent.enabled"; -const PREF_TASKBAR_TASKS = "tasks.enabled"; -const PREF_TASKBAR_REFRESH = "refreshInSeconds"; - -// Hash keys for pendingStatements. -const LIST_TYPE = { - FREQUENT: 0 -, RECENT: 1 -} - -/** - * Exports - */ - -this.EXPORTED_SYMBOLS = [ - "WinTaskbarJumpList", -]; - -/** - * Smart getters - */ - -XPCOMUtils.defineLazyGetter(this, "_prefs", function() { - return Services.prefs.getBranch(PREF_TASKBAR_BRANCH); -}); - -XPCOMUtils.defineLazyGetter(this, "_stringBundle", function() { - return Services.strings - .createBundle("chrome://browser/locale/taskbar.properties"); -}); - -XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() { - Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); - return PlacesUtils; -}); - -XPCOMUtils.defineLazyGetter(this, "NetUtil", function() { - Components.utils.import("resource://gre/modules/NetUtil.jsm"); - return NetUtil; -}); - -XPCOMUtils.defineLazyServiceGetter(this, "_idle", - "@mozilla.org/widget/idleservice;1", - "nsIIdleService"); - -XPCOMUtils.defineLazyServiceGetter(this, "_taskbarService", - "@mozilla.org/windows-taskbar;1", - "nsIWinTaskbar"); - -XPCOMUtils.defineLazyServiceGetter(this, "_winShellService", - "@mozilla.org/browser/shell-service;1", - "nsIWindowsShellService"); - -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); - -/** - * Global functions - */ - -function _getString(name) { - return _stringBundle.GetStringFromName(name); -} - -///////////////////////////////////////////////////////////////////////////// -// Task list configuration data object. - -var tasksCfg = [ - /** - * Task configuration options: title, description, args, iconIndex, open, close. - * - * title - Task title displayed in the list. (strings in the table are temp fillers.) - * description - Tooltip description on the list item. - * args - Command line args to invoke the task. - * iconIndex - Optional win icon index into the main application for the - * list item. - * open - Boolean indicates if the command should be visible after the browser opens. - * close - Boolean indicates if the command should be visible after the browser closes. - */ - // Open new tab - { - get title() { return _getString("taskbar.tasks.newTab.label"); }, - get description() { return _getString("taskbar.tasks.newTab.description"); }, - args: "-new-tab about:blank", - iconIndex: 3, // New window icon - open: true, - close: true, // The jump list already has an app launch icon, but - // we don't always update the list on shutdown. - // Thus true for consistency. - }, - - // Open new window - { - get title() { return _getString("taskbar.tasks.newWindow.label"); }, - get description() { return _getString("taskbar.tasks.newWindow.description"); }, - args: "-browser", - iconIndex: 2, // New tab icon - open: true, - close: true, // No point, but we don't always update the list on - // shutdown. Thus true for consistency. - }, - - // Open new private window - { - get title() { return _getString("taskbar.tasks.newPrivateWindow.label"); }, - get description() { return _getString("taskbar.tasks.newPrivateWindow.description"); }, - args: "-private-window", - iconIndex: 4, // Private browsing mode icon - open: true, - close: true, // No point, but we don't always update the list on - // shutdown. Thus true for consistency. - }, -]; - -///////////////////////////////////////////////////////////////////////////// -// Implementation - -this.WinTaskbarJumpList = -{ - _builder: null, - _tasks: null, - _shuttingDown: false, - - /** - * Startup, shutdown, and update - */ - - startup: function() { - // Exit if there's something wrong with getting the taskbar service. - if (!this._initTaskbar()) { - return; - } - - // Win shell shortcut maintenance. If we've gone through an update, - // this will update any pinned taskbar shortcuts. Not specific to - // jump lists, but this was a convienent place to call it. - try { - // builds may not have helper.exe, ignore failures. - this._shortcutMaintenance(); - } catch(ex) {} - - // Store our task list config data - this._tasks = tasksCfg; - - // retrieve taskbar related prefs. - this._refreshPrefs(); - - // observer for private browsing and our prefs branch - this._initObs(); - - // jump list refresh timer - this._updateTimer(); - }, - - update: function() { - // are we disabled via prefs? don't do anything! - if (!this._enabled) { - return; - } - - // do what we came here to do, update the taskbar jumplist - this._buildList(); - }, - - _shutdown: function() { - this._shuttingDown = true; - - // Correctly handle a clear history on shutdown. If there are no - // entries be sure to empty all history lists. Luckily Places caches - // this value, so it's a pretty fast call. - if (!PlacesUtils.history.hasHistoryEntries) { - this.update(); - } - - this._free(); - }, - - _shortcutMaintenance: function() { - _winShellService.shortcutMaintenance(); - }, - - /** - * List building - * - * @note Async builders must add their mozIStoragePendingStatement to - * _pendingStatements object, using a different LIST_TYPE entry for - * each statement. Once finished they must remove it and call - * commitBuild(). When there will be no more _pendingStatements, - * commitBuild() will commit for real. - */ - - _pendingStatements: {}, - _hasPendingStatements: function() { - return Object.keys(this._pendingStatements).length > 0; - }, - - _buildList: function() { - if (this._hasPendingStatements()) { - // We were requested to update the list while another update was in - // progress, this could happen at shutdown, idle or privatebrowsing. - // Abort the current list building. - for (let listType in this._pendingStatements) { - this._pendingStatements[listType].cancel(); - delete this._pendingStatements[listType]; - } - this._builder.abortListBuild(); - } - - // anything to build? - if (!this._showFrequent && !this._showRecent && !this._showTasks) { - // don't leave the last list hanging on the taskbar. - this._deleteActiveJumpList(); - return; - } - - if (!this._startBuild()) { - return; - } - - if (this._showTasks) { - this._buildTasks(); - } - - // Space for frequent items takes priority over recent. - if (this._showFrequent) { - this._buildFrequent(); - } - - if (this._showRecent) { - this._buildRecent(); - } - - this._commitBuild(); - }, - - /** - * Taskbar api wrappers - */ - - _startBuild: function() { - var removedItems = Cc["@mozilla.org/array;1"] - .createInstance(Ci.nsIMutableArray); - this._builder.abortListBuild(); - if (this._builder.initListBuild(removedItems)) { - // Prior to building, delete removed items from history. - this._clearHistory(removedItems); - return true; - } - return false; - }, - - _commitBuild: function() { - if (!this._hasPendingStatements() && !this._builder.commitListBuild()) { - this._builder.abortListBuild(); - } - }, - - _buildTasks: function() { - var items = Cc["@mozilla.org/array;1"]. - createInstance(Ci.nsIMutableArray); - this._tasks.forEach(function(task) { - if ((this._shuttingDown && !task.close) || - (!this._shuttingDown && !task.open)) { - return; - } - var item = this._getHandlerAppItem(task.title, task.description, - task.args, task.iconIndex, null); - items.appendElement(item, false); - }, this); - - if (items.length > 0) { - this._builder.addListToBuild(this._builder.JUMPLIST_CATEGORY_TASKS, items); - } - }, - - _buildCustom: function(title, items) { - if (items.length > 0) { - this._builder.addListToBuild(this._builder.JUMPLIST_CATEGORY_CUSTOMLIST, items, title); - } - }, - - _buildFrequent: function() { - // If history is empty, just bail out. - if (!PlacesUtils.history.hasHistoryEntries) { - return; - } - - // Windows supports default frequent and recent lists, - // but those depend on internal windows visit tracking - // which we don't populate. So we build our own custom - // frequent and recent lists using our nav history data. - - var items = Cc["@mozilla.org/array;1"]. - createInstance(Ci.nsIMutableArray); - // track frequent items so that we don't add them to - // the recent list. - this._frequentHashList = []; - - this._pendingStatements[LIST_TYPE.FREQUENT] = this._getHistoryResults( - Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_DESCENDING, - this._maxItemCount, - function(aResult) { - if (!aResult) { - delete this._pendingStatements[LIST_TYPE.FREQUENT]; - // The are no more results, build the list. - this._buildCustom(_getString("taskbar.frequent.label"), items); - this._commitBuild(); - return; - } - - let title = aResult.title || aResult.uri; - let faviconPageUri = Services.io.newURI(aResult.uri, null, null); - let shortcut = this._getHandlerAppItem(title, title, aResult.uri, 1, - faviconPageUri); - items.appendElement(shortcut, false); - this._frequentHashList.push(aResult.uri); - }, - this); - }, - - _buildRecent: function() { - // If history is empty, just bail out. - if (!PlacesUtils.history.hasHistoryEntries) { - return; - } - - var items = Cc["@mozilla.org/array;1"]. - createInstance(Ci.nsIMutableArray); - // Frequent items will be skipped, so we select a double amount of - // entries and stop fetching results at _maxItemCount. - var count = 0; - - this._pendingStatements[LIST_TYPE.RECENT] = this._getHistoryResults( - Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING, - this._maxItemCount * 2, - function(aResult) { - if (!aResult) { - // The are no more results, build the list. - this._buildCustom(_getString("taskbar.recent.label"), items); - delete this._pendingStatements[LIST_TYPE.RECENT]; - this._commitBuild(); - return; - } - - if (count >= this._maxItemCount) { - return; - } - - // Do not add items to recent that have already been added to frequent. - if (this._frequentHashList && - this._frequentHashList.indexOf(aResult.uri) != -1) { - return; - } - - let title = aResult.title || aResult.uri; - let faviconPageUri = Services.io.newURI(aResult.uri, null, null); - let shortcut = this._getHandlerAppItem(title, title, aResult.uri, 1, - faviconPageUri); - items.appendElement(shortcut, false); - count++; - }, - this); - }, - - _deleteActiveJumpList: function() { - this._builder.deleteActiveList(); - }, - - /** - * Jump list item creation helpers - */ - - _getHandlerAppItem: function(name, - description, - args, - iconIndex, - faviconPageUri) { - var file = Services.dirsvc.get("XREExeF", Ci.nsILocalFile); - - var handlerApp = Cc["@mozilla.org/uriloader/local-handler-app;1"]. - createInstance(Ci.nsILocalHandlerApp); - handlerApp.executable = file; - // handlers default to the leaf name if a name is not specified - if (name && name.length != 0) { - handlerApp.name = name; - } - handlerApp.detailedDescription = description; - handlerApp.appendParameter(args); - - var item = Cc["@mozilla.org/windows-jumplistshortcut;1"] - .createInstance(Ci.nsIJumpListShortcut); - item.app = handlerApp; - item.iconIndex = iconIndex; - item.faviconPageUri = faviconPageUri; - return item; - }, - - _getSeparatorItem: function() { - var item = Cc["@mozilla.org/windows-jumplistseparator;1"] - .createInstance(Ci.nsIJumpListSeparator); - return item; - }, - - /** - * Nav history helpers - */ - - _getHistoryResults: - function(aSortingMode, aLimit, aCallback, aScope) { - var options = PlacesUtils.history.getNewQueryOptions(); - options.maxResults = aLimit; - options.sortingMode = aSortingMode; - var query = PlacesUtils.history.getNewQuery(); - - // Return the pending statement to the caller, to allow cancelation. - return PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase) - .asyncExecuteLegacyQueries([query], 1, options, { - handleResult: function(aResultSet) { - for (let row; (row = aResultSet.getNextRow());) { - try { - aCallback.call(aScope, - { uri: row.getResultByIndex(1) - , title: row.getResultByIndex(2) - }); - } catch (e) {} - } - }, - handleError: function(aError) { - Components.utils.reportError( - "Async execution error (" + aError.result + "): " + aError.message); - }, - handleCompletion: function(aReason) { - aCallback.call(WinTaskbarJumpList, null); - }, - }); - }, - - _clearHistory: function(items) { - if (!items) { - return; - } - var URIsToRemove = []; - var e = items.enumerate(); - while (e.hasMoreElements()) { - let oldItem = e.getNext().QueryInterface(Ci.nsIJumpListShortcut); - if (oldItem) { - try { // in case we get a bad uri - let uriSpec = oldItem.app.getParameter(0); - URIsToRemove.push(NetUtil.newURI(uriSpec)); - } catch(err) {} - } - } - if (URIsToRemove.length > 0) { - PlacesUtils.bhistory.removePages(URIsToRemove, URIsToRemove.length, true); - } - }, - - /** - * Prefs utilities - */ - - _refreshPrefs: function() { - this._enabled = _prefs.getBoolPref(PREF_TASKBAR_ENABLED); - this._showFrequent = _prefs.getBoolPref(PREF_TASKBAR_FREQUENT); - this._showRecent = _prefs.getBoolPref(PREF_TASKBAR_RECENT); - this._showTasks = _prefs.getBoolPref(PREF_TASKBAR_TASKS); - this._maxItemCount = _prefs.getIntPref(PREF_TASKBAR_ITEMCOUNT); - }, - - /** - * Init and shutdown utilities - */ - - _initTaskbar: function() { - this._builder = _taskbarService.createJumpListBuilder(); - if (!this._builder || !this._builder.available) - return false; - - return true; - }, - - _initObs: function() { - // If the browser is closed while in private browsing mode, the "exit" - // notification is fired on quit-application-granted. - // History cleanup can happen at profile-change-teardown. - Services.obs.addObserver(this, "profile-before-change", false); - Services.obs.addObserver(this, "browser:purge-session-history", false); - _prefs.addObserver("", this, false); - }, - - _freeObs: function() { - Services.obs.removeObserver(this, "profile-before-change"); - Services.obs.removeObserver(this, "browser:purge-session-history"); - _prefs.removeObserver("", this); - }, - - _updateTimer: function() { - if (this._enabled && !this._shuttingDown && !this._timer) { - this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - this._timer.initWithCallback(this, - _prefs.getIntPref(PREF_TASKBAR_REFRESH)*1000, - this._timer.TYPE_REPEATING_SLACK); - } else if ((!this._enabled || this._shuttingDown) && this._timer) { - this._timer.cancel(); - delete this._timer; - } - }, - - _hasIdleObserver: false, - _updateIdleObserver: function() { - if (this._enabled && !this._shuttingDown && !this._hasIdleObserver) { - _idle.addIdleObserver(this, IDLE_TIMEOUT_SECONDS); - this._hasIdleObserver = true; - } else if ((!this._enabled || this._shuttingDown) && this._hasIdleObserver) { - _idle.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS); - this._hasIdleObserver = false; - } - }, - - _free: function() { - this._freeObs(); - this._updateTimer(); - this._updateIdleObserver(); - delete this._builder; - }, - - /** - * Notification handlers - */ - - notify: function(aTimer) { - // Add idle observer on the first notification so it doesn't hit startup. - this._updateIdleObserver(); - this.update(); - }, - - observe: function(aSubject, aTopic, aData) { - switch (aTopic) { - case "nsPref:changed": - if (this._enabled == true && !_prefs.getBoolPref(PREF_TASKBAR_ENABLED)) { - this._deleteActiveJumpList(); - } - this._refreshPrefs(); - this._updateTimer(); - this._updateIdleObserver(); - this.update(); - break; - - case "profile-before-change": - this._shutdown(); - break; - - case "browser:purge-session-history": - this.update(); - break; - case "idle": - if (this._timer) { - this._timer.cancel(); - delete this._timer; - } - break; - - case "back": - this._updateTimer(); - break; - } - }, -}; diff --git a/application/palemoon/modules/WindowsPreviewPerTab.jsm b/application/palemoon/modules/WindowsPreviewPerTab.jsm deleted file mode 100644 index 7ceb642380..0000000000 --- a/application/palemoon/modules/WindowsPreviewPerTab.jsm +++ /dev/null @@ -1,880 +0,0 @@ -/* vim: se cin sw=2 ts=2 et filetype=javascript : - * 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/. */ -/* - * This module implements the front end behavior for AeroPeek. The taskbar - * allows an application to expose its tabbed interface by showing thumbnail - * previews rather than the default window preview. - * Additionally, when a user hovers over a thumbnail (tab or window), - * they are shown a live preview of the window (or tab + its containing window). - * - * In Windows 7, a title, icon, close button and optional toolbar are shown for - * each preview. This feature does not make use of the toolbar. For window - * previews, the title is the window title and the icon the window icon. For - * tab previews, the title is the page title and the page's favicon. In both - * cases, the close button "does the right thing." - * - * The primary objects behind this feature are nsITaskbarTabPreview and - * nsITaskbarPreviewController. Each preview has a controller. The controller - * responds to the user's interactions on the taskbar and provides the required - * data to the preview for determining the size of the tab and thumbnail. The - * PreviewController class implements this interface. The preview will request - * the controller to provide a thumbnail or preview when the user interacts with - * the taskbar. To reduce the overhead of drawing the tab area, the controller - * implementation caches the tab's contents in a element. If no - * previews or thumbnails have been requested for some time, the controller will - * discard its cached tab contents. - * - * Screen real estate is limited so when there are too many thumbnails to fit - * on the screen, the taskbar stops displaying thumbnails and instead displays - * just the title, icon and close button in a similar fashion to previous - * versions of the taskbar. If there are still too many previews to fit on the - * screen, the taskbar resorts to a scroll up and scroll down button pair to let - * the user scroll through the list of tabs. Since this is undoubtedly - * inconvenient for users with many tabs, the AeroPeek objects turns off all of - * the tab previews. This tells the taskbar to revert to one preview per window. - * If the number of tabs falls below this magic threshold, the preview-per-tab - * behavior returns. There is no reliable way to determine when the scroll - * buttons appear on the taskbar, so a magic pref-controlled number determines - * when this threshold has been crossed. - */ -this.EXPORTED_SYMBOLS = ["AeroPeek"]; - -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; - -Cu.import("resource://gre/modules/NetUtil.jsm"); -Cu.import("resource://gre/modules/PlacesUtils.jsm"); -Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -// Pref to enable/disable preview-per-tab -const TOGGLE_PREF_NAME = "browser.taskbar.previews.enable"; -// Pref to determine the magic auto-disable threshold -const DISABLE_THRESHOLD_PREF_NAME = "browser.taskbar.previews.max"; -// Pref to control the time in seconds that tab contents live in the cache -const CACHE_EXPIRATION_TIME_PREF_NAME = "browser.taskbar.previews.cachetime"; - -const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1"; - -// Various utility properties -XPCOMUtils.defineLazyServiceGetter(this, "imgTools", - "@mozilla.org/image/tools;1", - "imgITools"); -XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs", - "resource://gre/modules/PageThumbs.jsm"); - -// nsIURI -> imgIContainer -function _imageFromURI(uri, privateMode, callback) { - let channel = NetUtil.newChannel({ - uri: uri, - loadUsingSystemPrincipal: true, - contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE - }); - - try { - channel.QueryInterface(Ci.nsIPrivateBrowsingChannel); - channel.setPrivate(privateMode); - } catch (e) { - // Ignore channels which do not support nsIPrivateBrowsingChannel - } - NetUtil.asyncFetch(channel, function(inputStream, resultCode) { - if (!Components.isSuccessCode(resultCode)) { - return; - } - try { - let out_img = { value: null }; - imgTools.decodeImageData(inputStream, channel.contentType, out_img); - callback(out_img.value); - } catch(e) { - // We failed, so use the default favicon (only if this wasn't the default - // favicon). - let defaultURI = PlacesUtils.favicons.defaultFavicon; - if (!defaultURI.equals(uri)) - _imageFromURI(defaultURI, privateMode, callback); - } - }); -} - -// string? -> imgIContainer -function getFaviconAsImage(iconurl, privateMode, callback) { - if (iconurl) { - _imageFromURI(NetUtil.newURI(iconurl), privateMode, callback); - } else { - _imageFromURI(PlacesUtils.favicons.defaultFavicon, privateMode, callback); - } -} - -// Snaps the given rectangle to be pixel-aligned at the given scale -function snapRectAtScale(r, scale) { - let x = Math.floor(r.x * scale); - let y = Math.floor(r.y * scale); - let width = Math.ceil((r.x + r.width) * scale) - x; - let height = Math.ceil((r.y + r.height) * scale) - y; - - r.x = x / scale; - r.y = y / scale; - r.width = width / scale; - r.height = height / scale; -} - -// PreviewController - -/* - * This class manages the behavior of thumbnails and previews. It has the following - * responsibilities: - * 1) Responding to requests from Windows taskbar for a thumbnail or window - * preview. - * 2) Listening for DOM events that result in a thumbnail or window preview needing - * to be refreshed, and communicating this to the taskbar. - * 3) Handling queryies and returning new thumbnail or window preview images to the - * taskbar through PageThumbs. - * - * @param win - * The TabWindow (see below) that owns the preview that this controls - * @param tab - * The that this preview is associated with - */ -function PreviewController(win, tab) { - this.win = win; - this.tab = tab; - this.linkedBrowser = tab.linkedBrowser; - this.preview = this.win.createTabPreview(this); - - this.tab.addEventListener("TabAttrModified", this, false); - - XPCOMUtils.defineLazyGetter(this, "canvasPreview", function () { - let canvas = PageThumbs.createCanvas(); - canvas.mozOpaque = true; - return canvas; - }); -} - -PreviewController.prototype = { - QueryInterface: XPCOMUtils.generateQI([Ci.nsITaskbarPreviewController, - Ci.nsIDOMEventListener]), - - destroy: function () { - this.tab.removeEventListener("TabAttrModified", this, false); - - // Break cycles, otherwise we end up leaking the window with everything - // attached to it. - delete this.win; - delete this.preview; - }, - - get wrappedJSObject() { - return this; - }, - - // Resizes the canvasPreview to 0x0, essentially freeing its memory. - resetCanvasPreview: function () { - this.canvasPreview.width = 0; - this.canvasPreview.height = 0; - }, - - /** - * Set the canvas dimensions. - */ - resizeCanvasPreview: function (aRequestedWidth, aRequestedHeight) { - this.canvasPreview.width = aRequestedWidth; - this.canvasPreview.height = aRequestedHeight; - }, - - - get zoom() { - // Note that winutils.fullZoom accounts for "quantization" of the zoom factor - // from nsIContentViewer due to conversion through appUnits. - // We do -not- want screenPixelsPerCSSPixel here, because that would -also- - // incorporate any scaling that is applied due to hi-dpi resolution options. - return this.tab.linkedBrowser.fullZoom; - }, - - get screenPixelsPerCSSPixel() { - let chromeWin = this.tab.ownerGlobal; - let windowUtils = chromeWin.getInterface(Ci.nsIDOMWindowUtils); - return windowUtils.screenPixelsPerCSSPixel; - }, - - get browserDims() { - return this.tab.linkedBrowser.getBoundingClientRect(); - }, - - cacheBrowserDims: function () { - let dims = this.browserDims; - this._cachedWidth = dims.width; - this._cachedHeight = dims.height; - }, - - testCacheBrowserDims: function () { - let dims = this.browserDims; - return this._cachedWidth == dims.width && - this._cachedHeight == dims.height; - }, - - /** - * Capture a new thumbnail image for this preview. Called by the controller - * in response to a request for a new thumbnail image. - */ - updateCanvasPreview: function (aFullScale, aCallback) { - // Update our cached browser dims so that delayed resize - // events don't trigger another invalidation if this tab becomes active. - this.cacheBrowserDims(); - PageThumbs.captureToCanvas(this.linkedBrowser, this.canvasPreview, - aCallback, { fullScale: aFullScale }); - // If we're updating the canvas, then we're in the middle of a peek so - // don't discard the cache of previews. - AeroPeek.resetCacheTimer(); - }, - - updateTitleAndTooltip: function () { - let title = this.win.tabbrowser.getWindowTitleForBrowser(this.linkedBrowser); - this.preview.title = title; - this.preview.tooltip = title; - }, - - // nsITaskbarPreviewController - - // window width and height, not browser - get width() { - return this.win.width; - }, - - // window width and height, not browser - get height() { - return this.win.height; - }, - - get thumbnailAspectRatio() { - let browserDims = this.browserDims; - // Avoid returning 0 - let tabWidth = browserDims.width || 1; - // Avoid divide by 0 - let tabHeight = browserDims.height || 1; - return tabWidth / tabHeight; - }, - - /** - * Responds to taskbar requests for window previews. Returns the results asynchronously - * through updateCanvasPreview. - * - * @param aTaskbarCallback nsITaskbarPreviewCallback results callback - */ - requestPreview: function (aTaskbarCallback) { - // Grab a high res content preview - this.resetCanvasPreview(); - this.updateCanvasPreview(true, (aPreviewCanvas) => { - let winWidth = this.win.width; - let winHeight = this.win.height; - - let composite = PageThumbs.createCanvas(); - - // Use transparency, Aero glass is drawn black without it. - composite.mozOpaque = false; - - let ctx = composite.getContext('2d'); - let scale = this.screenPixelsPerCSSPixel / this.zoom; - - composite.width = winWidth * scale; - composite.height = winHeight * scale; - - ctx.save(); - ctx.scale(scale, scale); - - // Draw chrome. Note we currently do not get scrollbars for remote frames - // in the image above. - ctx.drawWindow(this.win.win, 0, 0, winWidth, winHeight, "rgba(0,0,0,0)"); - - // Draw the content are into the composite canvas at the right location. - ctx.drawImage(aPreviewCanvas, this.browserDims.x, this.browserDims.y, - aPreviewCanvas.width, aPreviewCanvas.height); - ctx.restore(); - - // Deliver the resulting composite canvas to Windows - this.win.tabbrowser.previewTab(this.tab, function () { - aTaskbarCallback.done(composite, false); - }); - }); - }, - - /** - * Responds to taskbar requests for tab thumbnails. Returns the results asynchronously - * through updateCanvasPreview. - * - * Note Windows requests a specific width and height here, if the resulting thumbnail - * does not match these dimensions thumbnail display will fail. - * - * @param aTaskbarCallback nsITaskbarPreviewCallback results callback - * @param aRequestedWidth width of the requested thumbnail - * @param aRequestedHeight height of the requested thumbnail - */ - requestThumbnail: function (aTaskbarCallback, aRequestedWidth, aRequestedHeight) { - this.resizeCanvasPreview(aRequestedWidth, aRequestedHeight); - this.updateCanvasPreview(false, (aThumbnailCanvas) => { - aTaskbarCallback.done(aThumbnailCanvas, false); - }); - }, - - // Event handling - - onClose: function () { - this.win.tabbrowser.removeTab(this.tab); - }, - - onActivate: function () { - this.win.tabbrowser.selectedTab = this.tab; - - // Accept activation - this will restore the browser window - // if it's minimized - return true; - }, - - // nsIDOMEventListener - handleEvent: function (evt) { - switch (evt.type) { - case "TabAttrModified": - this.updateTitleAndTooltip(); - break; - } - } -}; - -XPCOMUtils.defineLazyGetter(PreviewController.prototype, "canvasPreviewFlags", - function () { let canvasInterface = Ci.nsIDOMCanvasRenderingContext2D; - return canvasInterface.DRAWWINDOW_DRAW_VIEW | - canvasInterface.DRAWWINDOW_DRAW_CARET | - canvasInterface.DRAWWINDOW_ASYNC_DECODE_IMAGES | - canvasInterface.DRAWWINDOW_DO_NOT_FLUSH; -}); - -// TabWindow - -/* - * This class monitors a browser window for changes to its tabs - * - * @param win - * The nsIDOMWindow browser window - */ -function TabWindow(win) { - this.win = win; - this.tabbrowser = win.gBrowser; - - this.previews = new Map(); - - for (let i = 0; i < this.tabEvents.length; i++) { - this.tabbrowser.tabContainer.addEventListener(this.tabEvents[i], this, false); - } - - for (let i = 0; i < this.winEvents.length; i++) { - this.win.addEventListener(this.winEvents[i], this, false); - } - - this.tabbrowser.addTabsProgressListener(this); - - AeroPeek.windows.push(this); - let tabs = this.tabbrowser.tabs; - for (let i = 0; i < tabs.length; i++) { - this.newTab(tabs[i]); - } - - this.updateTabOrdering(); - AeroPeek.checkPreviewCount(); -} - -TabWindow.prototype = { - _enabled: false, - _cachedWidth: 0, - _cachedHeight: 0, - tabEvents: ["TabOpen", "TabClose", "TabSelect", "TabMove"], - winEvents: ["resize"], - - destroy: function () { - this._destroying = true; - - let tabs = this.tabbrowser.tabs; - - this.tabbrowser.removeTabsProgressListener(this); - - for (let i = 0; i < this.winEvents.length; i++) { - this.win.removeEventListener(this.winEvents[i], this, false); - } - - for (let i = 0; i < this.tabEvents.length; i++) { - this.tabbrowser.tabContainer.removeEventListener(this.tabEvents[i], this, false); - } - - for (let i = 0; i < tabs.length; i++) { - this.removeTab(tabs[i]); - } - - let idx = AeroPeek.windows.indexOf(this.win.gTaskbarTabGroup); - AeroPeek.windows.splice(idx, 1); - AeroPeek.checkPreviewCount(); - }, - - get width () { - return this.win.innerWidth; - }, - - get height () { - return this.win.innerHeight; - }, - - cacheDims: function () { - this._cachedWidth = this.width; - this._cachedHeight = this.height; - }, - - testCacheDims: function () { - return this._cachedWidth == this.width && - this._cachedHeight == this.height; - }, - - // Invoked when the given tab is added to this window - newTab: function (tab) { - let controller = new PreviewController(this, tab); - // It's OK to add the preview now while the favicon still loads. - this.previews.set(tab, controller.preview); - AeroPeek.addPreview(controller.preview); - // updateTitleAndTooltip relies on having controller.preview which is lazily resolved. - // Now that we've updated this.previews, it will resolve successfully. - controller.updateTitleAndTooltip(); - }, - - createTabPreview: function (controller) { - let docShell = this.win - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocShell); - let preview = AeroPeek.taskbar.createTaskbarTabPreview(docShell, controller); - preview.visible = AeroPeek.enabled; - preview.active = this.tabbrowser.selectedTab == controller.tab; - this.onLinkIconAvailable(controller.tab.linkedBrowser, - controller.tab.getAttribute("image")); - return preview; - }, - - // Invoked when the given tab is closed - removeTab: function (tab) { - let preview = this.previewFromTab(tab); - preview.active = false; - preview.visible = false; - preview.move(null); - preview.controller.wrappedJSObject.destroy(); - - this.previews.delete(tab); - AeroPeek.removePreview(preview); - }, - - get enabled () { - return this._enabled; - }, - - set enabled (enable) { - this._enabled = enable; - // Because making a tab visible requires the tab it is next to be visible, - // it is far simpler to unset the 'next' tab and recreate them all at once. - for (let [, preview] of this.previews) { - preview.move(null); - preview.visible = enable; - } - this.updateTabOrdering(); - }, - - previewFromTab: function (tab) { - return this.previews.get(tab); - }, - - updateTabOrdering: function () { - let previews = this.previews; - let tabs = this.tabbrowser.tabs; - - // Previews are internally stored using a map, so we need to iterate the - // tabbrowser's array of tabs to retrieve previews in the same order. - let inorder = []; - for (let t of tabs) { - if (previews.has(t)) { - inorder.push(previews.get(t)); - } - } - - // Since the internal taskbar array has not yet been updated we must force - // on it the sorting order of our local array. To do so we must walk - // the local array backwards, otherwise we would send move requests in the - // wrong order. See bug 522610 for details. - for (let i = inorder.length - 1; i >= 0; i--) { - inorder[i].move(inorder[i + 1] || null); - } - }, - - // nsIDOMEventListener - handleEvent: function (evt) { - let tab = evt.originalTarget; - switch (evt.type) { - case "TabOpen": - this.newTab(tab); - this.updateTabOrdering(); - break; - case "TabClose": - this.removeTab(tab); - this.updateTabOrdering(); - break; - case "TabSelect": - this.previewFromTab(tab).active = true; - break; - case "TabMove": - this.updateTabOrdering(); - break; - case "resize": - if (!AeroPeek._prefenabled) { - return; - } - this.onResize(); - break; - } - }, - - // Set or reset a timer that will invalidate visible thumbnails soon. - setInvalidationTimer: function () { - if (!this.invalidateTimer) { - this.invalidateTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - } - this.invalidateTimer.cancel(); - - // delay 1 second before invalidating - this.invalidateTimer.initWithCallback(() => { - // invalidate every preview. note the internal implementation of - // invalidate ignores thumbnails that aren't visible. - this.previews.forEach(function (aPreview) { - let controller = aPreview.controller.wrappedJSObject; - if (!controller.testCacheBrowserDims()) { - controller.cacheBrowserDims(); - aPreview.invalidate(); - } - }); - }, 1000, Ci.nsITimer.TYPE_ONE_SHOT); - }, - - onResize: function () { - // Specific to a window. - - // Call invalidate on each tab thumbnail so that Windows will request an - // updated image. However don't do this repeatedly across multiple resize - // events triggered during window border drags. - - if (this.testCacheDims()) { - return; - } - - // update the window dims on our TabWindow object. - this.cacheDims(); - - // invalidate soon - this.setInvalidationTimer(); - }, - - invalidateTabPreview: function(aBrowser) { - for (let [tab, preview] of this.previews) { - if (aBrowser == tab.linkedBrowser) { - preview.invalidate(); - break; - } - } - }, - - // Browser progress listener - - onLocationChange: function (aBrowser) { - // I'm not sure we need this, onStateChange does a really good job - // of picking up page changes. - // this.invalidateTabPreview(aBrowser); - }, - - onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { - if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP && - aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) { - this.invalidateTabPreview(aBrowser); - } - }, - - directRequestProtocols: new Set([ - "file", "chrome", "resource", "about" - ]), - - onLinkIconAvailable: function (aBrowser, aIconURL) { - let self = this; - let requestURL = null; - if (aIconURL) { - let shouldRequestFaviconURL = true; - try { - let urlObject = NetUtil.newURI(aIconURL); - shouldRequestFaviconURL = - !this.directRequestProtocols.has(urlObject.scheme); - } catch(ex) {} - - requestURL = shouldRequestFaviconURL ? - "moz-anno:favicon:" + aIconURL : - aIconURL; - } - let isDefaultFavicon = !requestURL; - getFaviconAsImage( - requestURL, - PrivateBrowsingUtils.isWindowPrivate(self.win), - img => { - let index = self.tabbrowser.browsers.indexOf(aBrowser); - // Only add it if we've found the index and the URI is still the same. - // The tab could have closed, and there's no guarantee the icons - // will have finished fetching 'in order'. - if (index != -1) { - let tab = self.tabbrowser.tabs[index]; - let preview = self.previews.get(tab); - if (tab.getAttribute("image") == aIconURL || - (!preview.icon && isDefaultFavicon)) { - preview.icon = img; - } - } - } - ); - } -} - -// AeroPeek - -/* - * This object acts as global storage and external interface for this feature. - * It maintains the values of the prefs. - */ -this.AeroPeek = { - available: false, - // Does the pref say we're enabled? - __prefenabled: false, - - _enabled: true, - - initialized: false, - - // nsITaskbarTabPreview array - previews: [], - - // TabWindow array - windows: [], - - // nsIWinTaskbar service - taskbar: null, - - // Maximum number of previews - maxpreviews: 20, - - // Length of time in seconds that previews are cached - cacheLifespan: 20, - - initialize: function () { - if (!(WINTASKBAR_CONTRACTID in Cc)) { - return; - } - this.taskbar = Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar); - this.available = this.taskbar.available; - if (!this.available) { - return; - } - - this.prefs.addObserver(TOGGLE_PREF_NAME, this, true); - this.enabled = this._prefenabled = this.prefs.getBoolPref(TOGGLE_PREF_NAME); - this.initialized = true; - }, - - destroy: function destroy() { - this._enabled = false; - - if (this.cacheTimer) { - this.cacheTimer.cancel(); - } - }, - - get enabled() { - return this._enabled; - }, - - set enabled(enable) { - if (this._enabled == enable) { - return; - } - - this._enabled = enable; - - this.windows.forEach(function (win) { - win.enabled = enable; - }); - }, - - get _prefenabled() { - return this.__prefenabled; - }, - - set _prefenabled(enable) { - if (enable == this.__prefenabled) { - return; - } - this.__prefenabled = enable; - - if (enable) { - this.enable(); - } else { - this.disable(); - } - }, - - _observersAdded: false, - - enable() { - if (!this._observersAdded) { - this.prefs.addObserver(DISABLE_THRESHOLD_PREF_NAME, this, true); - this.prefs.addObserver(CACHE_EXPIRATION_TIME_PREF_NAME, this, true); - PlacesUtils.history.addObserver(this, true); - this._observersAdded = true; - } - - this.cacheLifespan = this.prefs.getIntPref(CACHE_EXPIRATION_TIME_PREF_NAME); - - this.maxpreviews = this.prefs.getIntPref(DISABLE_THRESHOLD_PREF_NAME); - - // If the user toggled us on/off while the browser was already up - // (rather than this code running on startup because the pref was - // already set to true), we must initialize previews for open windows: - if (this.initialized) { - let browserWindows = Services.wm.getEnumerator("navigator:browser"); - while (browserWindows.hasMoreElements()) { - let win = browserWindows.getNext(); - if (!win.closed) { - this.onOpenWindow(win); - } - } - } - }, - - disable() { - while (this.windows.length) { - // We can't call onCloseWindow here because it'll bail if we're not - // enabled. - let tabWinObject = this.windows[0]; - tabWinObject.destroy(); // This will remove us from the array. - delete tabWinObject.win.gTaskbarTabGroup; // Tidy up the window. - } - }, - - addPreview: function (preview) { - this.previews.push(preview); - this.checkPreviewCount(); - }, - - removePreview: function (preview) { - let idx = this.previews.indexOf(preview); - this.previews.splice(idx, 1); - this.checkPreviewCount(); - }, - - checkPreviewCount: function () { - if (!this._prefenabled) { - return; - } - this.enabled = this.previews.length <= this.maxpreviews; - }, - - onOpenWindow: function (win) { - // This occurs when the taskbar service is not available (xp, vista) - if (!this.available || !this._prefenabled) { - return; - } - - win.gTaskbarTabGroup = new TabWindow(win); - }, - - onCloseWindow: function (win) { - // This occurs when the taskbar service is not available (xp, vista) - if (!this.available || !this._prefenabled) { - return; - } - - win.gTaskbarTabGroup.destroy(); - delete win.gTaskbarTabGroup; - - if (this.windows.length == 0) { - this.destroy(); - } - }, - - resetCacheTimer: function () { - this.cacheTimer.cancel(); - this.cacheTimer.init(this, 1000*this.cacheLifespan, Ci.nsITimer.TYPE_ONE_SHOT); - }, - - // nsIObserver - observe: function (aSubject, aTopic, aData) { - if (aTopic == "nsPref:changed" && aData == TOGGLE_PREF_NAME) { - this._prefenabled = this.prefs.getBoolPref(TOGGLE_PREF_NAME); - } - if (!this._prefenabled) { - return; - } - switch (aTopic) { - case "nsPref:changed": - if (aData == CACHE_EXPIRATION_TIME_PREF_NAME) { - break; - } - - if (aData == DISABLE_THRESHOLD_PREF_NAME) { - this.maxpreviews = this.prefs.getIntPref(DISABLE_THRESHOLD_PREF_NAME); - } - // Might need to enable/disable ourselves - this.checkPreviewCount(); - break; - case "timer-callback": - this.previews.forEach(function (preview) { - let controller = preview.controller.wrappedJSObject; - controller.resetCanvasPreview(); - }); - break; - } - }, - - /* nsINavHistoryObserver implementation */ - onBeginUpdateBatch() {}, - onEndUpdateBatch() {}, - onVisit() {}, - onTitleChanged() {}, - onFrecencyChanged() {}, - onManyFrecenciesChanged() {}, - onDeleteURI() {}, - onClearHistory() {}, - onDeleteVisits() {}, - onPageChanged(uri, changedConst, newValue) { - if (this.enabled && changedConst == Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON) { - for (let win of this.windows) { - for (let [tab, ] of win.previews) { - if (tab.getAttribute("image") == newValue) { - win.onLinkIconAvailable(tab.linkedBrowser, newValue); - } - } - } - } - }, - - QueryInterface: XPCOMUtils.generateQI([ - Ci.nsISupportsWeakReference, - Ci.nsINavHistoryObserver, - Ci.nsIObserver - ]), -}; - -XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", () => - Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer) -); - -XPCOMUtils.defineLazyServiceGetter(AeroPeek, "prefs", - "@mozilla.org/preferences-service;1", - "nsIPrefBranch"); - -AeroPeek.initialize(); diff --git a/application/palemoon/modules/moz.build b/application/palemoon/modules/moz.build deleted file mode 100644 index ec2ef0fb59..0000000000 --- a/application/palemoon/modules/moz.build +++ /dev/null @@ -1,41 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -EXTRA_JS_MODULES += [ - 'AutoCompletePopup.jsm', - 'BrowserNewTabPreloader.jsm', - 'CharsetMenu.jsm', - 'FormSubmitObserver.jsm', - 'FormValidationHandler.jsm', - 'NetworkPrioritizer.jsm', - 'offlineAppCache.jsm', - 'openLocationLastURL.jsm', - 'PageMenu.jsm', - 'PopupNotifications.jsm', - 'QuotaManager.jsm', - 'SharedFrame.jsm' -] - -if CONFIG['MOZ_WEBRTC']: - EXTRA_JS_MODULES += ['webrtcUI.jsm'] - -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - EXTRA_JS_MODULES += [ - 'Windows8WindowFrameColor.jsm', - 'WindowsJumpLists.jsm', - 'WindowsPreviewPerTab.jsm', - ] - -EXTRA_PP_JS_MODULES += [ - 'AboutHomeUtils.jsm', - 'RecentWindow.jsm', -] - -# Pass down 'official build' flags -if CONFIG['MC_OFFICIAL']: - DEFINES['MC_OFFICIAL'] = 1 - -if CONFIG['MOZILLA_OFFICIAL']: - DEFINES['MOZILLA_OFFICIAL'] = 1 diff --git a/application/palemoon/modules/offlineAppCache.jsm b/application/palemoon/modules/offlineAppCache.jsm deleted file mode 100644 index 00ded09569..0000000000 --- a/application/palemoon/modules/offlineAppCache.jsm +++ /dev/null @@ -1,20 +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/. */ - -this.EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"]; - -Components.utils.import('resource://gre/modules/LoadContextInfo.jsm'); - -const Cc = Components.classes; -const Ci = Components.interfaces; - -this.OfflineAppCacheHelper = { - clear: function() { - var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService); - var appCacheStorage = cacheService.appCacheStorage(LoadContextInfo.default, null); - try { - appCacheStorage.asyncEvictStorage(null); - } catch(er) {} - } -}; diff --git a/application/palemoon/modules/openLocationLastURL.jsm b/application/palemoon/modules/openLocationLastURL.jsm deleted file mode 100644 index f63b99c037..0000000000 --- a/application/palemoon/modules/openLocationLastURL.jsm +++ /dev/null @@ -1,85 +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/. */ - -const LAST_URL_PREF = "general.open_location.last_url"; -const nsISupportsString = Components.interfaces.nsISupportsString; -const Ci = Components.interfaces; - -Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); - -this.EXPORTED_SYMBOLS = [ "OpenLocationLastURL" ]; - -var prefSvc = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); -var gOpenLocationLastURLData = ""; - -var observer = { - QueryInterface: function(aIID) { - if (aIID.equals(Components.interfaces.nsIObserver) || - aIID.equals(Components.interfaces.nsISupports) || - aIID.equals(Components.interfaces.nsISupportsWeakReference)) - return this; - throw Components.results.NS_NOINTERFACE; - }, - observe: function(aSubject, aTopic, aData) { - switch (aTopic) { - case "last-pb-context-exited": - gOpenLocationLastURLData = ""; - break; - case "browser:purge-session-history": - prefSvc.clearUserPref(LAST_URL_PREF); - gOpenLocationLastURLData = ""; - break; - } - } -}; - -var os = Components.classes["@mozilla.org/observer-service;1"] - .getService(Components.interfaces.nsIObserverService); -os.addObserver(observer, "last-pb-context-exited", true); -os.addObserver(observer, "browser:purge-session-history", true); - - -this.OpenLocationLastURL = function OpenLocationLastURL(aWindow) { - this.window = aWindow; -} - -OpenLocationLastURL.prototype = { - isPrivate: function() { - // Assume not in private browsing mode, unless the browser window is - // in private mode. - if (!this.window) - return false; - - return PrivateBrowsingUtils.isWindowPrivate(this.window); - }, - get value() { - if (this.isPrivate()) - return gOpenLocationLastURLData; - else { - try { - return prefSvc.getComplexValue(LAST_URL_PREF, nsISupportsString).data; - } - catch (e) { - return ""; - } - } - }, - set value(val) { - if (typeof val != "string") - val = ""; - if (this.isPrivate()) - gOpenLocationLastURLData = val; - else { - let str = Components.classes["@mozilla.org/supports-string;1"] - .createInstance(Components.interfaces.nsISupportsString); - str.data = val; - prefSvc.setComplexValue(LAST_URL_PREF, nsISupportsString, str); - } - }, - reset: function() { - prefSvc.clearUserPref(LAST_URL_PREF); - gOpenLocationLastURLData = ""; - } -}; diff --git a/application/palemoon/modules/webrtcUI.jsm b/application/palemoon/modules/webrtcUI.jsm deleted file mode 100644 index 819ca181f1..0000000000 --- a/application/palemoon/modules/webrtcUI.jsm +++ /dev/null @@ -1,292 +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"; - -this.EXPORTED_SYMBOLS = ["webrtcUI"]; - -const Cu = Components.utils; -const Cc = Components.classes; -const Ci = Components.interfaces; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", - "resource://gre/modules/PluralForm.jsm"); - -XPCOMUtils.defineLazyServiceGetter(this, "MediaManagerService", - "@mozilla.org/mediaManagerService;1", - "nsIMediaManagerService"); - -this.webrtcUI = { - init: function () { - Services.obs.addObserver(handleRequest, "getUserMedia:request", false); - Services.obs.addObserver(updateIndicators, "recording-device-events", false); - Services.obs.addObserver(removeBrowserSpecificIndicator, "recording-window-ended", false); - }, - - uninit: function () { - Services.obs.removeObserver(handleRequest, "getUserMedia:request"); - Services.obs.removeObserver(updateIndicators, "recording-device-events"); - Services.obs.removeObserver(removeBrowserSpecificIndicator, "recording-window-ended"); - }, - - showGlobalIndicator: false, - - get activeStreams() { - let contentWindowSupportsArray = MediaManagerService.activeMediaCaptureWindows; - let count = contentWindowSupportsArray.Count(); - let activeStreams = []; - for (let i = 0; i < count; i++) { - let contentWindow = contentWindowSupportsArray.GetElementAt(i); - let browser = getBrowserForWindow(contentWindow); - let browserWindow = browser.ownerDocument.defaultView; - let tab = browserWindow.gBrowser && - browserWindow.gBrowser._getTabForContentWindow(contentWindow.top); - activeStreams.push({ - uri: contentWindow.location.href, - tab: tab, - browser: browser - }); - } - return activeStreams; - } -} - -function getBrowserForWindowId(aWindowID) { - return getBrowserForWindow(Services.wm.getOuterWindowWithId(aWindowID)); -} - -function getBrowserForWindow(aContentWindow) { - return aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocShell) - .chromeEventHandler; -} - -function handleRequest(aSubject, aTopic, aData) { - let {windowID: windowID, callID: callID} = JSON.parse(aData); - - let params = aSubject.QueryInterface(Ci.nsIMediaStreamOptions); - - Services.wm.getMostRecentWindow(null).navigator.mozGetUserMediaDevices( - function (devices) { - prompt(windowID, callID, params.audio, params.video || params.picture, devices); - }, - function (error) { - // bug 827146 -- In the future, the UI should catch NO_DEVICES_FOUND - // and allow the user to plug in a device, instead of immediately failing. - denyRequest(callID, error); - } - ); -} - -function denyRequest(aCallID, aError) { - let msg = null; - if (aError) { - msg = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); - msg.data = aError; - } - Services.obs.notifyObservers(msg, "getUserMedia:response:deny", aCallID); -} - -function prompt(aWindowID, aCallID, aAudioRequested, aVideoRequested, aDevices) { - let audioDevices = []; - let videoDevices = []; - for (let device of aDevices) { - device = device.QueryInterface(Ci.nsIMediaDevice); - switch (device.type) { - case "audio": - if (aAudioRequested) - audioDevices.push(device); - break; - case "video": - if (aVideoRequested) - videoDevices.push(device); - break; - } - } - - let requestType; - if (audioDevices.length && videoDevices.length) - requestType = "CameraAndMicrophone"; - else if (audioDevices.length) - requestType = "Microphone"; - else if (videoDevices.length) - requestType = "Camera"; - else { - denyRequest(aCallID, "NO_DEVICES_FOUND"); - return; - } - - let contentWindow = Services.wm.getOuterWindowWithId(aWindowID); - let host = contentWindow.document.documentURIObject.host; - let browser = getBrowserForWindow(contentWindow); - let chromeDoc = browser.ownerDocument; - let chromeWin = chromeDoc.defaultView; - let stringBundle = chromeWin.gNavigatorBundle; - let message = stringBundle.getFormattedString("getUserMedia.share" + requestType + ".message", - [ host ]); - - let mainAction = { - label: PluralForm.get(requestType == "CameraAndMicrophone" ? 2 : 1, - stringBundle.getString("getUserMedia.shareSelectedDevices.label")), - accessKey: stringBundle.getString("getUserMedia.shareSelectedDevices.accesskey"), - // The real callback will be set during the "showing" event. The - // empty function here is so that PopupNotifications.show doesn't - // reject the action. - callback: function() {} - }; - - let secondaryActions = [{ - label: stringBundle.getString("getUserMedia.denyRequest.label"), - accessKey: stringBundle.getString("getUserMedia.denyRequest.accesskey"), - callback: function () { - denyRequest(aCallID); - } - }]; - - let options = { - eventCallback: function(aTopic, aNewBrowser) { - if (aTopic == "swapping") - return true; - - if (aTopic != "showing") - return false; - - let chromeDoc = this.browser.ownerDocument; - - function listDevices(menupopup, devices) { - while (menupopup.lastChild) - menupopup.removeChild(menupopup.lastChild); - - let deviceIndex = 0; - for (let device of devices) { - addDeviceToList(menupopup, device.name, deviceIndex); - deviceIndex++; - } - } - - function addDeviceToList(menupopup, deviceName, deviceIndex) { - let menuitem = chromeDoc.createElement("menuitem"); - menuitem.setAttribute("value", deviceIndex); - menuitem.setAttribute("label", deviceName); - menuitem.setAttribute("tooltiptext", deviceName); - menupopup.appendChild(menuitem); - } - - chromeDoc.getElementById("webRTC-selectCamera").hidden = !videoDevices.length; - chromeDoc.getElementById("webRTC-selectMicrophone").hidden = !audioDevices.length; - - let camMenupopup = chromeDoc.getElementById("webRTC-selectCamera-menupopup"); - let micMenupopup = chromeDoc.getElementById("webRTC-selectMicrophone-menupopup"); - listDevices(camMenupopup, videoDevices); - listDevices(micMenupopup, audioDevices); - if (requestType == "CameraAndMicrophone") { - let stringBundle = chromeDoc.defaultView.gNavigatorBundle; - addDeviceToList(camMenupopup, stringBundle.getString("getUserMedia.noVideo.label"), "-1"); - addDeviceToList(micMenupopup, stringBundle.getString("getUserMedia.noAudio.label"), "-1"); - } - - this.mainAction.callback = function() { - let allowedDevices = Cc["@mozilla.org/supports-array;1"] - .createInstance(Ci.nsISupportsArray); - if (videoDevices.length) { - let videoDeviceIndex = chromeDoc.getElementById("webRTC-selectCamera-menulist").value; - if (videoDeviceIndex != "-1") - allowedDevices.AppendElement(videoDevices[videoDeviceIndex]); - } - if (audioDevices.length) { - let audioDeviceIndex = chromeDoc.getElementById("webRTC-selectMicrophone-menulist").value; - if (audioDeviceIndex != "-1") - allowedDevices.AppendElement(audioDevices[audioDeviceIndex]); - } - - if (allowedDevices.Count() == 0) { - denyRequest(aCallID); - return; - } - - Services.obs.notifyObservers(allowedDevices, "getUserMedia:response:allow", aCallID); - }; - return true; - } - }; - - chromeWin.PopupNotifications.show(browser, "webRTC-shareDevices", message, - "webRTC-shareDevices-notification-icon", mainAction, - secondaryActions, options); -} - -function updateIndicators() { - webrtcUI.showGlobalIndicator = - MediaManagerService.activeMediaCaptureWindows.Count() > 0; - - let e = Services.wm.getEnumerator("navigator:browser"); - while (e.hasMoreElements()) - e.getNext().WebrtcIndicator.updateButton(); - - for (let {browser: browser} of webrtcUI.activeStreams) - showBrowserSpecificIndicator(browser); -} - -function showBrowserSpecificIndicator(aBrowser) { - let hasVideo = {}; - let hasAudio = {}; - MediaManagerService.mediaCaptureWindowState(aBrowser.contentWindow, - hasVideo, hasAudio); - let captureState; - if (hasVideo.value && hasAudio.value) { - captureState = "CameraAndMicrophone"; - } else if (hasVideo.value) { - captureState = "Camera"; - } else if (hasAudio.value) { - captureState = "Microphone"; - } else { - Cu.reportError("showBrowserSpecificIndicator: got neither video nor audio access"); - return; - } - - let chromeWin = aBrowser.ownerDocument.defaultView; - let stringBundle = chromeWin.gNavigatorBundle; - - let message = stringBundle.getString("getUserMedia.sharing" + captureState + ".message2"); - - let windowId = aBrowser.contentWindow - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils) - .currentInnerWindowID; - let mainAction = { - label: "Continue Sharing", //stringBundle.getString("getUserMedia.continueSharing.label"), - accessKey: "C", //stringBundle.getString("getUserMedia.continueSharing.accesskey"), - callback: function () {}, - dismiss: true - }; - let secondaryActions = [{ - label: "Stop Sharing", //stringBundle.getString("getUserMedia.stopSharing.label"), - accessKey: "S", //stringBundle.getString("getUserMedia.stopSharing.accesskey"), - callback: function () { - Services.obs.notifyObservers(null, "getUserMedia:revoke", windowId); - } - }]; - let options = { - hideNotNow: true, - dismissed: true, - eventCallback: function(aTopic) aTopic == "swapping" - }; - chromeWin.PopupNotifications.show(aBrowser, "webRTC-sharingDevices", message, - "webRTC-sharingDevices-notification-icon", mainAction, - secondaryActions, options); -} - -function removeBrowserSpecificIndicator(aSubject, aTopic, aData) { - let browser = getBrowserForWindowId(aData); - let PopupNotifications = browser.ownerDocument.defaultView.PopupNotifications; - let notification = PopupNotifications && - PopupNotifications.getNotification("webRTC-sharingDevices", - browser); - if (notification) - PopupNotifications.remove(notification); -} diff --git a/application/palemoon/moz.build b/application/palemoon/moz.build deleted file mode 100644 index beb87fb2ef..0000000000 --- a/application/palemoon/moz.build +++ /dev/null @@ -1,23 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -CONFIGURE_SUBST_FILES += ['installer/Makefile'] - -DIRS += [ - 'base', - 'components', - 'locales', - 'modules', - 'themes', - 'extensions', -] - -DIRS += ['app'] - -if CONFIG['MAKENSISU']: - DIRS += ['installer/windows'] - -DIST_SUBDIR = 'browser' -export('DIST_SUBDIR') \ No newline at end of file diff --git a/application/palemoon/moz.configure b/application/palemoon/moz.configure deleted file mode 100644 index 9ac5023796..0000000000 --- a/application/palemoon/moz.configure +++ /dev/null @@ -1,8 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -include('../../toolkit/moz.configure') - - diff --git a/application/palemoon/themes/LICENSE b/application/palemoon/themes/LICENSE deleted file mode 100644 index 39d4f8fdf5..0000000000 --- a/application/palemoon/themes/LICENSE +++ /dev/null @@ -1,2 +0,0 @@ -All files in this directory are assumed to be licensed under the MPL 2 license -which is used throughout this codebase. diff --git a/application/palemoon/themes/linux/Geolocation-16.png b/application/palemoon/themes/linux/Geolocation-16.png deleted file mode 100644 index 082b177811..0000000000 Binary files a/application/palemoon/themes/linux/Geolocation-16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Geolocation-64.png b/application/palemoon/themes/linux/Geolocation-64.png deleted file mode 100644 index 6e09ab9c32..0000000000 Binary files a/application/palemoon/themes/linux/Geolocation-64.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Go-arrow.png b/application/palemoon/themes/linux/Go-arrow.png deleted file mode 100644 index 259c8a4f01..0000000000 Binary files a/application/palemoon/themes/linux/Go-arrow.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Info.png b/application/palemoon/themes/linux/Info.png deleted file mode 100644 index d144798525..0000000000 Binary files a/application/palemoon/themes/linux/Info.png and /dev/null differ diff --git a/application/palemoon/themes/linux/KUI-close.png b/application/palemoon/themes/linux/KUI-close.png deleted file mode 100644 index 08eeb81831..0000000000 Binary files a/application/palemoon/themes/linux/KUI-close.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Makefile.in b/application/palemoon/themes/linux/Makefile.in deleted file mode 100644 index 3b81bbf312..0000000000 --- a/application/palemoon/themes/linux/Makefile.in +++ /dev/null @@ -1,8 +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/. - -ICON_FILES := icon.png -ICON_DEST = $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} -INSTALL_TARGETS += ICON - diff --git a/application/palemoon/themes/linux/Privacy-16.png b/application/palemoon/themes/linux/Privacy-16.png deleted file mode 100644 index 013cdc4b9d..0000000000 Binary files a/application/palemoon/themes/linux/Privacy-16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Privacy-32.png b/application/palemoon/themes/linux/Privacy-32.png deleted file mode 100644 index f56dd2d33e..0000000000 Binary files a/application/palemoon/themes/linux/Privacy-32.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Privacy-48.png b/application/palemoon/themes/linux/Privacy-48.png deleted file mode 100644 index 8dd0243954..0000000000 Binary files a/application/palemoon/themes/linux/Privacy-48.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Privacy-64.png b/application/palemoon/themes/linux/Privacy-64.png deleted file mode 100644 index 106afb46c1..0000000000 Binary files a/application/palemoon/themes/linux/Privacy-64.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Secure.png b/application/palemoon/themes/linux/Secure.png deleted file mode 100644 index 5ee25e9b9f..0000000000 Binary files a/application/palemoon/themes/linux/Secure.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Security-broken.png b/application/palemoon/themes/linux/Security-broken.png deleted file mode 100644 index 1ec110be4b..0000000000 Binary files a/application/palemoon/themes/linux/Security-broken.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Toolbar-small.png b/application/palemoon/themes/linux/Toolbar-small.png deleted file mode 100644 index bcc8f63dcd..0000000000 Binary files a/application/palemoon/themes/linux/Toolbar-small.png and /dev/null differ diff --git a/application/palemoon/themes/linux/Toolbar.png b/application/palemoon/themes/linux/Toolbar.png deleted file mode 100644 index 2851657eca..0000000000 Binary files a/application/palemoon/themes/linux/Toolbar.png and /dev/null differ diff --git a/application/palemoon/themes/linux/aboutCertError.css b/application/palemoon/themes/linux/aboutCertError.css deleted file mode 100644 index 100bb3d3bb..0000000000 --- a/application/palemoon/themes/linux/aboutCertError.css +++ /dev/null @@ -1,73 +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/. */ - - -html { - background: #833; -} - -body { - margin: 0; - padding: 0 1em; - color: -moz-FieldText; - font: message-box; -} - -h1 { - margin: 0 0 .6em 0; - border-bottom: 1px solid ThreeDLightShadow; - font-size: 160%; -} - -h2 { - font-size: 130%; -} - -#errorPageContainer { - position: relative; - min-width: 13em; - max-width: 52em; - margin: 4em auto; - border: 2px solid #DD0D09; - border-radius: 10px; - box-shadow: 0px 0px 8px red; - padding: 3em; - padding-inline-start: 30px; - background: url("chrome://global/skin/icons/sslWarning.png") left 0 no-repeat -moz-Field; - background-origin: content-box; -} - -#errorPageContainer:-moz-dir(rtl) { - background-position: right 0; -} - -#errorTitle { - margin-inline-start: 80px; -} - -#errorLongContent { - margin-inline-start: 80px; -} - -.expander > button { - padding-inline-start: 20px; - margin-inline-start: -20px; - background: url("chrome://browser/skin/aboutCertError_sectionExpanded.png") left center no-repeat; - border: none; - font: inherit; - color: inherit; - cursor: pointer; -} - -.expander > button:-moz-dir(rtl) { - background-position: right center; -} - -.expander[collapsed] > button { - background-image: url("chrome://browser/skin/aboutCertError_sectionCollapsed.png"); -} - -.expander[collapsed] > button:-moz-dir(rtl) { - background-image: url("chrome://browser/skin/aboutCertError_sectionCollapsed-rtl.png"); -} diff --git a/application/palemoon/themes/linux/aboutCertError_sectionCollapsed-rtl.png b/application/palemoon/themes/linux/aboutCertError_sectionCollapsed-rtl.png deleted file mode 100644 index 84ba18c0a3..0000000000 Binary files a/application/palemoon/themes/linux/aboutCertError_sectionCollapsed-rtl.png and /dev/null differ diff --git a/application/palemoon/themes/linux/aboutCertError_sectionCollapsed.png b/application/palemoon/themes/linux/aboutCertError_sectionCollapsed.png deleted file mode 100644 index c9805f654c..0000000000 Binary files a/application/palemoon/themes/linux/aboutCertError_sectionCollapsed.png and /dev/null differ diff --git a/application/palemoon/themes/linux/aboutCertError_sectionExpanded.png b/application/palemoon/themes/linux/aboutCertError_sectionExpanded.png deleted file mode 100644 index 128cef90af..0000000000 Binary files a/application/palemoon/themes/linux/aboutCertError_sectionExpanded.png and /dev/null differ diff --git a/application/palemoon/themes/linux/aboutPrivateBrowsing.css b/application/palemoon/themes/linux/aboutPrivateBrowsing.css deleted file mode 100644 index a6fd549202..0000000000 --- a/application/palemoon/themes/linux/aboutPrivateBrowsing.css +++ /dev/null @@ -1,47 +0,0 @@ -%if 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/. */ -%endif - -body.private > #errorPageContainer { - background-image: url("chrome://browser/skin/Privacy-48.png"); -} - -body.normal > #errorPageContainer { - background-image: url("moz-icon://stock/gtk-dialog-question?size=dialog"); -} - -#clearRecentHistoryDesc { - margin-top: 2em; -} - -#clearRecentHistoryDesc > p { - font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */ -} - -#startPrivateBrowsingDesc > button { - margin-inline-start: 0; -} - -#footerDesc > p { - font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */ -} - -#moreInfo { - font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */ - padding-inline-start: 25px; - background: url("moz-icon://stock/gtk-dialog-info?size=menu") no-repeat top left; -} - -#moreInfo:-moz-dir(rtl) { - background-position: top right; -} - -#moreInfoText { - margin-bottom: 0; -} - -#moreInfoLinkContainer { - margin-top: 0.5em; -} diff --git a/application/palemoon/themes/linux/aboutSessionRestore-window-icon.png b/application/palemoon/themes/linux/aboutSessionRestore-window-icon.png deleted file mode 100644 index a998323721..0000000000 Binary files a/application/palemoon/themes/linux/aboutSessionRestore-window-icon.png and /dev/null differ diff --git a/application/palemoon/themes/linux/aboutSessionRestore.css b/application/palemoon/themes/linux/aboutSessionRestore.css deleted file mode 100644 index a58c104ce8..0000000000 --- a/application/palemoon/themes/linux/aboutSessionRestore.css +++ /dev/null @@ -1,90 +0,0 @@ -%if 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/. */ -%endif - -html { - background: #f8ffd0; - height: 100%; -} - -body { - height: 100%; - text-align: center; -} - -#errorPageContainer { - background-image: url("moz-icon://stock/gtk-dialog-warning?size=dialog"); - display: -moz-box; - width: -moz-available; - max-width: 85%; - height: 75%; - max-height: 85%; - -moz-box-orient: vertical; - text-align: start; - border: 2px solid #efc; - box-shadow: 0px 0px 8px #aaa; -} - -#errorShortDesc > p { - margin-top: 0.4em; - margin-bottom: 0; -} - -#errorLongContent, #errorTrailerDesc { - display: -moz-box; - -moz-box-flex: 1; - -moz-box-orient: vertical; -} - -#tabList { - margin-top: 2.5em; - width: 100%; - min-height: 12em; -} - -treechildren::-moz-tree-image(icon), -treechildren::-moz-tree-image(noicon) { - padding-right: 2px; - margin: 0px 2px; - width: 16px; - height: 16px; -} - -treechildren::-moz-tree-image(noicon) { - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} -treechildren::-moz-tree-image(container, noicon) { - list-style-image: url("chrome://browser/skin/aboutSessionRestore-window-icon.png"); -} -treechildren::-moz-tree-image(checked) { - list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); -} -treechildren::-moz-tree-image(partial) { - list-style-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif"); -} - -/* undo odd row highlighting from tree.css */ -treechildren::-moz-tree-row(odd) { - background-color: transparent; -} -treechildren::-moz-tree-row(odd, selected, focus) { - background-color: Highlight; -} - -/* highlight "windows" instead */ -treechildren::-moz-tree-row(alternate) { - background-color: -moz-oddtreerow; -} -treechildren::-moz-tree-row(alternate, selected) { - background-color: Highlight; -} - -#buttons { - margin-inline-start: 80px; /* same as #errorLongContent in netError.css */ -} -#buttons > button { - margin-top: 2em; - margin-inline-start: 5px; -} diff --git a/application/palemoon/themes/linux/aboutSyncTabs.css b/application/palemoon/themes/linux/aboutSyncTabs.css deleted file mode 100644 index 1fcd8304f7..0000000000 --- a/application/palemoon/themes/linux/aboutSyncTabs.css +++ /dev/null @@ -1,101 +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/. */ - -#tabs-display, -#tabsList { - background-color: transparent; - -moz-appearance: none; - margin: 0; -} - -#tabsList { - width: 100%; -} - -#tabs-display { - background: #fff url(chrome://browser/skin/sync-bg.png) repeat-x center -80px; -} - -#headers { - background: url(chrome://browser/skin/sync-32.png) no-repeat; - margin-top: 4px; - width: 45em; - height: 32px; - margin-inline-start: 2em; - margin-inline-end: 2em; -} - -#tabsListHeading { - font-size: 140%; - font-weight: bold; - margin-inline-start: 40px; -} - -richlistitem { - margin-inline-end: 2em; -} - -richlistitem[selected="true"], -richlistitem:focus { - outline-style: none; -} - -richlistitem[type="tab"] { - min-height: 3em; - border: #999999 1px solid !important; - padding: 2px 5px; - margin-bottom: 4px; - margin-inline-start: 4em; - border-radius: 6px; - background-color: menu; - width: 44em; - opacity: 0.9; - box-shadow: - inset rgba(255, 255, 255, 0.5) 0 1px 0px, - inset rgba(0, 0, 0, 0.1) 0 -2px 0px, - rgba(0, 0, 0, 0.1) 0px 1px 0px; -} - -richlistitem[type="tab"][selected="true"] { - background-color: -moz-MenuHover; -} - -richlistitem[type="client"] { - min-height: 2em; - color: #000000; - margin-inline-start: 2em; - margin-top: 2px; - margin-bottom: 3px; - width: 42em; - border-radius: 6px; - background-color: transparent; - -moz-user-focus: ignore !important; -} -richlistitem.mobile[type="client"] { - list-style-image: url("chrome://browser/skin/sync-mobileIcon.png"); -} -richlistitem.desktop[type="client"] { - list-style-image: url("chrome://browser/skin/sync-desktopIcon.png"); -} - -.title, -.clientName { - color: #000000; - font-size: 1.1em; -} - -.title[selected="true"], -.url[selected="true"] { - color: inherit; -} - -.url { - color: -moz-nativehyperlinktext; - font-size: 0.95em; -} - -.tabIcon { - padding-inline-start: 2px; - padding-top: 2px; -} diff --git a/application/palemoon/themes/linux/actionicon-tab.png b/application/palemoon/themes/linux/actionicon-tab.png deleted file mode 100644 index 433c25e1a3..0000000000 Binary files a/application/palemoon/themes/linux/actionicon-tab.png and /dev/null differ diff --git a/application/palemoon/themes/linux/autocomplete.css b/application/palemoon/themes/linux/autocomplete.css deleted file mode 100644 index e23e6b001a..0000000000 --- a/application/palemoon/themes/linux/autocomplete.css +++ /dev/null @@ -1,210 +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/. */ - -/* ===== autocomplete.css ================================================= - == Styles used by the autocomplete widget. - ======================================================================= */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -@namespace html url("http://www.w3.org/1999/xhtml"); - -/* ::::: autocomplete ::::: */ - -/* .padded is used by autocomplete widgets that don't have an icon. Gross. -dwh */ -textbox:not(.padded) { - cursor: default; - padding: 0; -} - -textbox[enablehistory="true"] { - -moz-appearance: none; - border: 0; - background-color: transparent; -} - -textbox[nomatch="true"][highlightnonmatches="true"] { - color: red; -} - -.private-autocomplete-textbox-container { - -moz-box-align: center; -} - -textbox[enablehistory="true"] > .autocomplete-textbox-container { - -moz-appearance: menulist-textfield; -} - -textbox:not(.padded) .textbox-input-box { - margin: 0 3px; -} - -.textbox-input-box { - -moz-box-align: center; -} - -/* ::::: autocomplete popups ::::: */ - -panel[type="private-autocomplete"], -panel[type="private-autocomplete-richlistbox"], -.private-autocomplete-history-popup { - border-width: 1px; - -moz-border-top-colors: ThreeDDarkShadow; - -moz-border-right-colors: ThreeDDarkShadow; - -moz-border-bottom-colors: ThreeDDarkShadow; - -moz-border-left-colors: ThreeDDarkShadow; - padding: 0; - background-color: -moz-Field; -} - -.private-autocomplete-history-popup { - max-height: 180px; -} - -/* ::::: tree ::::: */ - -.private-autocomplete-tree { - -moz-appearance: none !important; - border: none !important; - background-color: transparent !important; - color: MenuText; -} - -.private-autocomplete-treecol { - -moz-appearance: none !important; - margin: 0 !important; - border: none !important; - padding: 0 !important; -} - -/* GTK calculates space for a sort arrow */ -.private-autocomplete-treecol > .treecol-sortdirection { - -moz-appearance: none !important; -} - -.private-autocomplete-treebody::-moz-tree-cell-text { - padding-inline-start: 8px; -} - -treechildren.private-autocomplete-treebody::-moz-tree-row(selected) { - background-color: Highlight; -} - -treechildren.private-autocomplete-treebody::-moz-tree-cell-text(selected) { - color: HighlightText !important; -} - -.private-autocomplete-treebody::-moz-tree-image(treecolAutoCompleteValue) { - max-width: 16px; - height: 16px; -} - -/* ::::: richlistbox autocomplete ::::: */ - -.private-autocomplete-richlistbox { - -moz-appearance: none; - margin: 1px; - background-color: transparent; -} - -.private-autocomplete-richlistitem[selected="true"] { - background-color: Highlight; - color: HighlightText; -} - -.private-autocomplete-richlistitem { - padding: 6px 2px; - color: MenuText; -} - -.ac-url-box { - /* When setting a vertical margin here, half of that needs to be added - .ac-title-box's translateY for when .ac-url-box is hidden (see below). */ - margin-top: 1px; -} - -.private-autocomplete-richlistitem[actiontype="keyword"] .ac-url-box, -.private-autocomplete-richlistitem[actiontype="searchengine"] .ac-url-box, -.private-autocomplete-richlistitem[actiontype="visiturl"] .ac-url-box, -.private-autocomplete-richlistitem[type~="autofill"] .ac-url-box { - visibility: hidden; -} - -.private-autocomplete-richlistitem[actiontype="keyword"] .ac-title-box, -.private-autocomplete-richlistitem[actiontype="searchengine"] .ac-title-box, -.private-autocomplete-richlistitem[actiontype="visiturl"] .ac-title-box, -.private-autocomplete-richlistitem[type~="autofill"] .ac-title-box { - /* Center the title by moving it down by half of .ac-url-box's height, - including vertical margins (if any). */ - transform: translateY(.5em); -} - -.ac-site-icon { - width: 16px; - height: 16px; - margin-bottom: -2px; - margin-inline-start: 3px; - margin-inline-end: 6px; -} - -.ac-type-icon { - width: 16px; - height: 16px; - margin-inline-start: 6px; - margin-inline-end: 4px; -} - -.ac-extra > .ac-result-type-tag { - margin: 0 4px; -} - -.ac-extra > .ac-comment { - padding-right: 4px; -} - -.ac-ellipsis-after { - margin: 0 !important; - padding: 0; - min-width: 1em; -} - -.ac-normal-text { - margin: 0 !important; - padding: 0; -} - -.ac-normal-text > html|span { - margin: 0 !important; - padding: 0; -} - -html|span.ac-emphasize-text { - box-shadow: inset 0 0 1px 1px rgba(0,0,0,0.1); - background-color: rgba(0,0,0,0.05); - border-radius: 2px; - text-shadow: 0 0 currentColor; /*faux bold effect*/ -} - -.ac-url-text > html|span.ac-emphasize-text, -.ac-action-text > html|span.ac-emphasize-text { - box-shadow: none; -} - -.ac-normal-text[selected="true"] > html|span.ac-emphasize-text { - box-shadow: inset 0 0 1px 1px rgba(255,255,255,0.3); - background-color: rgba(255,255,255,0.2); -} - -.ac-title, .ac-url { - overflow: hidden; -} - -/* ::::: textboxes inside toolbarpaletteitems ::::: */ - -toolbarpaletteitem > toolbaritem > textbox > hbox > hbox > html|*.textbox-input { - visibility: hidden; -} - -toolbarpaletteitem > toolbaritem > * > textbox > hbox > hbox > html|*.textbox-input { - visibility: hidden; -} diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css deleted file mode 100644 index 4948ec9d45..0000000000 --- a/application/palemoon/themes/linux/browser.css +++ /dev/null @@ -1,2219 +0,0 @@ -%if 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/. */ -%endif - -@import url("chrome://global/skin/"); - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -@namespace html url("http://www.w3.org/1999/xhtml"); - -%include ../shared/browser.inc -%filter substitution -%define toolbarHighlight rgba(255,255,255,.3) -%define selectedTabHighlight rgba(255,255,255,.8) 1px, rgba(255,255,255,.5) 3px -%define forwardTransitionLength 150ms -%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][mode=icons], #nav-bar:not([currentset])[mode=icons]) > #unified-back-forward-button -%define conditionalForwardWithUrlbar_small window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][mode=icons][iconsize=small],#nav-bar:not([currentset])[mode=icons][iconsize=small]) > #unified-back-forward-button - -#menubar-items { - -moz-box-orient: vertical; /* for flex hack */ -} - -#main-menubar { - -moz-box-flex: 1; /* make menu items expand to fill toolbar height */ -} - -#navigator-toolbox { - -moz-appearance: none; - background-color: transparent; - border-top: none; -} - -#main-window:not([disablechrome]) #navigator-toolbox[tabsontop=true] { - border-bottom: 1px solid ThreeDShadow; -} - -#navigator-toolbox[tabsontop=true] > toolbar:not(:-moz-lwtheme):not(#toolbar-menubar):not(#TabsToolbar), -#navigator-toolbox[tabsontop=false] > toolbar:not(:-moz-lwtheme):not(#toolbar-menubar) { - -moz-appearance: none; - border-style: none; - background-color: -moz-Dialog; -} - -#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) { - padding-top: 1px; - padding-bottom: 1px; -} - -#nav-bar:not(:-moz-lwtheme), -#nav-bar[collapsed=true] + toolbar:not(:-moz-lwtheme), -#nav-bar[collapsed=true] + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme), -#nav-bar[tabsontop=true], -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar, -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar { - background-image: linear-gradient(@toolbarHighlight@, rgba(255,255,255,0)); -} - -#nav-bar[tabsontop=true]:-moz-lwtheme, -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]):-moz-lwtheme + toolbar, -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]):-moz-lwtheme + #customToolbars + #PersonalToolbar { - background-image: linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,0)); -} - -#nav-bar[tabsontop=true]:-moz-lwtheme-brighttext, -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]):-moz-lwtheme-brighttext + toolbar, -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]):-moz-lwtheme-brighttext + #customToolbars + #PersonalToolbar { - background-image: linear-gradient(rgba(32,32,32,.8), rgba(32,32,32,0)); -} - -#personal-bookmarks { - min-height: 29px; -} - -#browser-bottombox { - /* opaque for layers optimization */ - background-color: -moz-Dialog; -} - -#urlbar:-moz-lwtheme:not([focused="true"]), -.searchbar-textbox:-moz-lwtheme:not([focused="true"]) { - opacity: .85; -} - -/* Places toolbar */ -toolbarbutton.bookmark-item { - margin: 0; - padding: 2px 3px; -} - -toolbarbutton.bookmark-item:hover:active, -toolbarbutton.bookmark-item[open="true"] { - padding-top: 3px; - padding-bottom: 1px; - padding-inline-start: 4px; - padding-inline-end: 2px; -} - -.bookmark-item > .toolbarbutton-icon { - width: 16px; - height: 16px; -} - -/* Prevent [mode="icons"] from hiding the label */ -.bookmark-item > .toolbarbutton-text { - display: -moz-box !important; -} - -.bookmark-item > .toolbarbutton-menu-dropmarker { - display: none; -} - -/* Dropmarker for folder bookmarks */ -.bookmark-item[container] > .toolbarbutton-menu-dropmarker { - display: -moz-box !important; -} - -#wrapper-personal-bookmarks[place="palette"] > .toolbarpaletteitem-box { - background: url("chrome://browser/skin/places/bookmarksToolbar.png") no-repeat center; -} - -.bookmarks-toolbar-customize { - max-width: 15em !important; - list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important; -} - -/* Bookmark menus */ -menu.bookmark-item, -menuitem.bookmark-item { - min-width: 0; - max-width: 32em; -} - -.bookmark-item > .menu-iconic-left { - margin-top: 0; - margin-bottom: 0; -} - -.bookmark-item > .menu-iconic-left > .menu-iconic-icon { - padding-inline-start: 0px; -} - -/* Bookmark drag and drop styles */ -.bookmark-item[dragover-into="true"] { - background: Highlight !important; - color: HighlightText !important; -} - -/* rules for menupopup drop indicators */ -.menupopup-drop-indicator-bar { - position: relative; - /* these two margins must together compensate the indicator's height */ - margin-top: -1px; - margin-bottom: -1px; -} - -.menupopup-drop-indicator { - list-style-image: none; - height: 2px; - margin-inline-end: -4em; - background-color: Highlight; -} - -/* Bookmarks toolbar */ -#PlacesToolbarDropIndicator { - list-style-image: url(chrome://browser/skin/places/toolbarDropMarker.png); -} - -/* Bookmark items */ -.bookmark-item { - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -.bookmark-item[container] { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -.bookmark-item[container][livemark] { - list-style-image: url("chrome://browser/skin/feeds/feedIcon16.png"); -} - -.bookmark-item[container][livemark] .bookmark-item { - list-style-image: url("chrome://browser/skin/places/livemark-item.png"); - -moz-image-region: rect(0px, 16px, 16px, 0px); -} - -.bookmark-item[container][livemark] .bookmark-item[visited] { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -.bookmark-item[container][query] { - list-style-image: url("chrome://browser/skin/places/query.png"); -} - -.bookmark-item[query][tagContainer] { - list-style-image: url("chrome://browser/skin/places/tag.png"); -} - -.bookmark-item[query][dayContainer] { - list-style-image: url("chrome://browser/skin/places/calendar.png"); -} - -.bookmark-item[query][hostContainer] { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -.bookmark-item[query][hostContainer][open] { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -.bookmark-item[cutting] > .toolbarbutton-icon, -.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon { - opacity: 0.5; -} - -.bookmark-item[cutting] > .toolbarbutton-text, -.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text { - opacity: 0.7; -} - -/* Stock icons for the menu bar items */ -menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) { - -moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic"); -} - -#appmenu_newNavigator, -#placesContext_open\:newwindow, -#menu_newNavigator, -#context-openlink, -#context-openframe { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 80px 16px 64px); -} - -#appmenu_newTab, -#appmenu_newTab_popup, -#placesContext_open\:newtab, -#placesContext_openContainer\:tabs, -#menu_newNavigatorTab, -#context-openlinkintab, -#context-openframeintab { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 64px 16px 48px); -} - -#appmenu_openFile, -#menu_openFile { - list-style-image: url("moz-icon://stock/gtk-open?size=menu"); -} - -#menu_close { - list-style-image: url("moz-icon://stock/gtk-close?size=menu"); -} - -#context-media-play { - list-style-image: url("moz-icon://stock/gtk-media-play?size=menu"); -} - -#context-media-pause { - list-style-image: url("moz-icon://stock/gtk-media-pause?size=menu"); -} - -#appmenu_savePage, -#menu_savePage, -#context-savelink, -#context-saveimage, -#context-savevideo, -#context-saveaudio, -#context-savepage, -#context-saveframe { - list-style-image: url("moz-icon://stock/gtk-save-as?size=menu"); -} - -#appmenu_printPreview, -#menu_printPreview { - list-style-image: url("moz-icon://stock/gtk-print-preview?size=menu"); -} - -#appmenu_print, -#appmenu_print_popup, -#menu_print, -#context-printframe { - list-style-image: url("moz-icon://stock/gtk-print?size=menu"); -} - -#appmenu-quit, -#menu_FileQuitItem { - list-style-image: url("moz-icon://stock/gtk-quit?size=menu"); -} - -#menu_undo, -#context-undo { - list-style-image: url("moz-icon://stock/gtk-undo?size=menu"); -} - -#menu_undo[disabled], -#context-undo[disabled] { - list-style-image: url("moz-icon://stock/gtk-undo?size=menu&state=disabled"); -} - -#menu_redo { - list-style-image: url("moz-icon://stock/gtk-redo?size=menu"); -} - -#menu_redo[disabled] { - list-style-image: url("moz-icon://stock/gtk-redo?size=menu&state=disabled"); -} - -#menu_cut, -#placesContext_cut, -#context-cut { - list-style-image: url("moz-icon://stock/gtk-cut?size=menu"); -} - -#menu_cut[disabled], -#placesContext_cut[disabled], -#context-cut[disabled] { - list-style-image: url("moz-icon://stock/gtk-cut?size=menu&state=disabled"); -} - -#menu_copy, -#placesContext_copy, -#context-copy, -#context-copyimage, -#context-copyvideourl, -#context-copyaudiourl, -#context-copylink, -#context-copyemail { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu"); -} - -#menu_copy[disabled], -#placesContext_copy[disabled], -#context-copy[disabled] { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu&state=disabled"); -} - -#menu_paste, -#placesContext_paste, -#context-paste { - list-style-image: url("moz-icon://stock/gtk-paste?size=menu"); -} - -#menu_paste[disabled], -#placesContext_paste[disabled], -#context-paste[disabled] { - list-style-image: url("moz-icon://stock/gtk-paste?size=menu&state=disabled"); -} - -#menu_delete, -#placesContext_delete, -#placesContext_delete_history, -#context-delete { - list-style-image: url("moz-icon://stock/gtk-delete?size=menu"); -} - -#menu_delete[disabled], -#placesContext_delete[disabled], -#placesContext_delete_history[disabled], -#context-delete[disabled] { - list-style-image: url("moz-icon://stock/gtk-delete?size=menu&state=disabled"); -} - -#menu_selectAll, -#context-selectall { - list-style-image: url("moz-icon://stock/gtk-select-all?size=menu"); -} - -#appmenu_find, -#menu_find { - list-style-image: url("moz-icon://stock/gtk-find?size=menu"); -} - -#menu_find[disabled] { - list-style-image: url("moz-icon://stock/gtk-find?size=menu&state=disabled"); -} - -#appmenu_customize, -#appmenu_preferences, -#menu_preferences { - list-style-image: url("moz-icon://stock/gtk-preferences?size=menu"); -} - -#menu_stop, -#context-stop { - list-style-image: url("moz-icon://stock/gtk-stop?size=menu"); -} - -#menu_stop[disabled], -#context-stop[disabled] { - list-style-image: url("moz-icon://stock/gtk-stop?size=menu&state=disabled"); -} - -#menu_reload, -#placesContext_reload, -#context-reload, -#context-reloadframe { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); -} - -#menu_reload[disabled], -#context-reload[disabled] { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu&state=disabled"); -} - -#menu_zoomEnlarge { - list-style-image: url("moz-icon://stock/gtk-zoom-in?size=menu"); -} - -#menu_zoomReduce { - list-style-image: url("moz-icon://stock/gtk-zoom-out?size=menu"); -} - -#menu_zoomReset { - list-style-image: url("moz-icon://stock/gtk-zoom-100?size=menu"); -} - -#historyMenuBack, -#context-back { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu"); -} - -#historyMenuBack[disabled], -#context-back[disabled] { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu&state=disabled"); -} - -#historyMenuBack:-moz-locale-dir(rtl), -#context-back:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu"); -} - -#historyMenuBack[disabled]:-moz-locale-dir(rtl), -#context-back[disabled]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu&state=disabled"); -} - -#historyMenuForward, -#context-forward { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu"); -} - -#historyMenuForward[disabled], -#context-forward[disabled] { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu&state=disabled"); -} - -#historyMenuForward:-moz-locale-dir(rtl), -#context-forward:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu"); -} - -#historyMenuForward[disabled]:-moz-locale-dir(rtl), -#context-forward[disabled]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu&state=disabled"); -} - -#historyMenuHome { - list-style-image: url("moz-icon://stock/gtk-home?size=menu"); -} - -#appmenu_history, -#appmenu_showAllHistory, -#menu_showAllHistory, -#HMB_showAllHistory { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 32px 16px 16px); -} - -#appmenu_bookmarks, -#appmenu_showAllBookmarks, -#bookmarksShowAll, -#BMB_bookmarksShowAll { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 48px 16px 32px); -} - -#appmenu_subscribeToPage:not([disabled]), -#appmenu_subscribeToPageMenu, -#subscribeToPageMenuitem:not([disabled]), -#subscribeToPageMenupopup, -#BMB_subscribeToPageMenuitem:not([disabled]), -#BMB_subscribeToPageMenupopup { - list-style-image: url("chrome://browser/skin/page-livemarks.png"); -} - -#appmenu_bookmarksToolbar, -#bookmarksToolbarFolderMenu, -#BMB_bookmarksToolbar { - list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); -} - -#appmenu_bookmarkThisPage, -#menu_bookmarkThisPage, -#BMB_bookmarkThisPage { - list-style-image: url("chrome://browser/skin/places/starPage.png"); -} - -#appmenu_unsortedBookmarks, -#menu_unsortedBookmarks, -#BMB_unsortedBookmarks { - list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png"); -} - -#appmenu_downloads, -#menu_openDownloads { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 16px 16px 0px); -} - -#appmenu_addons, -#menu_openAddons { - list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png"); -} - -#menu_pageInfo, -#context-viewinfo, -#context-viewframeinfo { - list-style-image: url("moz-icon://stock/gtk-info?size=menu"); -} - -#appmenu_privateBrowsing, -#appmenu_newPrivateWindow, -#placesContext_open\:newprivatewindow, -#privateBrowsingItem { - list-style-image: url("chrome://browser/skin/Privacy-16.png"); -} - -#placesContext_show\:info { - list-style-image: url("moz-icon://stock/gtk-properties?size=menu"); -} - -#appmenu_sanitizeHistory, -#sanitizeItem, -#HMB_sanitizeItem { - list-style-image: url("moz-icon://stock/gtk-clear?size=menu"); -} - -#appmenu_help, -#appmenu_openHelp, -#menu_openHelp { - list-style-image: url("moz-icon://stock/gtk-help?size=menu"); -} - -#appmenu_about, -#aboutName { - list-style-image: url("moz-icon://stock/gtk-about?size=menu"); -} - -#javascriptConsole { - list-style-image: url("chrome://global/skin/console/console.png"); -} - -/* Primary toolbar buttons */ -.toolbarbutton-1:not([type="menu-button"]) { - -moz-box-orient: vertical; - min-width: 0; - list-style-image: url("chrome://browser/skin/Toolbar.png"); -} - -.toolbarbutton-1 > .toolbarbutton-icon { - margin-inline-end: 0; -} - -toolbar[mode="full"] .toolbarbutton-1:not([type="menu-button"]), -toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button { - min-width: 57px; -} - -.toolbarbutton-1:not([type="menu-button"]), -.toolbarbutton-1 > .toolbarbutton-menubutton-button { - padding: 5px; -} - -.toolbarbutton-1[checked="true"] { - padding: 5px !important; -} - -/* 24px primary toolbar buttons */ -#back-button { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar"); -} -#back-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar&state=disabled"); -} - -#back-button:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar"); -} -#back-button[disabled="true"]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar&state=disabled"); -} - -#forward-button/*, - @conditionalForwardWithUrlbar@ > #forward-button */{ - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar"); -} -#forward-button:-moz-locale-dir(rtl)/*, -@conditionalForwardWithUrlbar@ > #forward-button:-moz-locale-dir(rtl) */{ - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar"); -} - -#forward-button[disabled] { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar&state=disabled"); -} -#forward-button[disabled]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar&state=disabled"); -} - -/*@conditionalForwardWithUrlbar@:not([switchingtabs]) > #forward-button { - transition: @forwardTransitionLength@ ease-out; -} - -@conditionalForwardWithUrlbar@ > #forward-button[disabled] { - transform: scale(0); - opacity: 0; - pointer-events: none; -}*/ - -#reload-button { - list-style-image: url("moz-icon://stock/gtk-refresh?size=toolbar"); -} -#reload-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-refresh?size=toolbar&state=disabled"); -} - -#stop-button { - list-style-image: url("moz-icon://stock/gtk-stop?size=toolbar"); -} -#stop-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-stop?size=toolbar&state=disabled"); -} - -#home-button { - list-style-image: url("moz-icon://stock/gtk-home?size=toolbar"); -} -#home-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-home?size=toolbar&state=disabled"); -} - -#downloads-button { - -moz-image-region: rect(0px 24px 24px 0px); -} - -#history-button, -#history-menu-button { - -moz-image-region: rect(0px 48px 24px 24px); -} - -#history-menu-button.toolbarbutton-1 { - -moz-box-orient: horizontal; -} - -#bookmarks-button, -#bookmarks-menu-button { - -moz-image-region: rect(0px 72px 24px 48px); -} - -#bookmarks-menu-button.bookmark-item { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); -} - -#bookmarks-menu-button.toolbarbutton-1 { - -moz-box-orient: horizontal; -} - -#print-button { - list-style-image: url("moz-icon://stock/gtk-print?size=toolbar"); -} -#print-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-print?size=toolbar&state=disabled"); -} - -#new-tab-button { - -moz-image-region: rect(0px 96px 24px 72px); -} - -#new-window-button { - -moz-image-region: rect(0px 120px 24px 96px); -} - -#cut-button { - list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar"); -} -#cut-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar&state=disabled"); -} - -#copy-button { - list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar"); -} -#copy-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar&state=disabled"); -} - -#paste-button { - list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar"); -} -#paste-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar&state=disabled"); -} - -#fullscreen-button { - list-style-image: url("moz-icon://stock/gtk-fullscreen?size=toolbar"); -} - -#zoom-out-button { - list-style-image: url("moz-icon://stock/gtk-zoom-out?size=toolbar"); -} - -#zoom-in-button { - list-style-image: url("moz-icon://stock/gtk-zoom-in?size=toolbar"); -} - -#sync-button { - -moz-image-region: rect(0px 144px 24px 120px); -} -#sync-button[status="active"] { - list-style-image: url("chrome://browser/skin/sync-24-throbber.png"); - -moz-image-region: rect(0px 24px 24px 0px); -} - -#feed-button { - -moz-image-region: rect(0px 168px 24px 144px); -} - -#feed-button[disabled] > .toolbarbutton-icon { - opacity: .4; -} - -%ifdef MOZ_WEBRTC -#webrtc-status-button { - -moz-image-region: rect(0px 192px 24px 168px); -} -%endif - -/* 16px primary toolbar buttons */ -toolbar[iconsize="small"] .toolbarbutton-1:not([type="menu-button"]) { - -moz-box-orient: vertical; - min-width: 0; - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); -} - -toolbar[iconsize="small"] .toolbarbutton-1[type="menu-button"] { - border: 0 !important; -} - -toolbar[iconsize="small"] #back-button { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu"); -} -.unified-nav-back[_moz-menuactive] { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu") !important; -} -toolbar[iconsize="small"] #back-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #back-button:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu"); -} -.unified-nav-back[_moz-menuactive]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu") !important; -} -toolbar[iconsize="small"] #back-button[disabled="true"]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu&state=disabled"); -} - -toolbar[iconsize=small] #forward-button, -@conditionalForwardWithUrlbar_small@ > #forward-button { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu"); -} -.unified-nav-forward[_moz-menuactive] { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu") !important; -} -toolbar[iconsize=small] #forward-button[disabled] { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu&state=disabled"); -} - -toolbar[iconsize=small] #forward-button:-moz-locale-dir(rtl), -@conditionalForwardWithUrlbar_small@ > #forward-button:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu"); -} -.unified-nav-forward[_moz-menuactive]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu") !important; -} -toolbar[iconsize=small] #forward-button[disabled]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #stop-button { - list-style-image: url("moz-icon://stock/gtk-stop?size=menu"); -} -toolbar[iconsize="small"] #stop-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-stop?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #reload-button { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); -} -toolbar[iconsize="small"] #reload-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #home-button, -#home-button.bookmark-item { - list-style-image: url("moz-icon://stock/gtk-home?size=menu"); -} -toolbar[iconsize="small"] #home-button[disabled="true"], -#home-button.bookmark-item[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-home?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #downloads-button { - -moz-image-region: rect(0px 16px 16px 0px); -} - -%ifdef MOZ_WEBRTC -toolbar[iconsize="small"] #webrtc-status-button /* temporary placeholder (bug 824825) */, -%endif -toolbar[iconsize="small"] #history-button, -toolbar[iconsize="small"] #history-menu-button { - -moz-image-region: rect(0px 32px 16px 16px); -} - -toolbar[iconsize="small"] #bookmarks-button, -toolbar[iconsize="small"] #bookmarks-menu-button, -#bookmarks-menu-button.bookmark-item { - -moz-image-region: rect(0px 48px 16px 32px); -} - -toolbar[iconsize="small"] #print-button { - list-style-image: url("moz-icon://stock/gtk-print?size=menu"); -} -toolbar[iconsize="small"] #print-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-print?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #new-tab-button { - -moz-image-region: rect(0px 64px 16px 48px); -} - -toolbar[iconsize="small"] #new-window-button { - -moz-image-region: rect(0px 80px 16px 64px); -} - -toolbar[iconsize="small"] #cut-button { - list-style-image: url("moz-icon://stock/gtk-cut?size=menu"); -} -toolbar[iconsize="small"] #cut-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-cut?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #copy-button { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu"); -} -toolbar[iconsize="small"] #copy-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #paste-button { - list-style-image: url("moz-icon://stock/gtk-paste?size=menu"); -} -toolbar[iconsize="small"] #paste-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-paste?size=menu&state=disabled"); -} - -toolbar[iconsize="small"] #fullscreen-button { - list-style-image: url("moz-icon://stock/gtk-fullscreen?size=menu"); -} - -toolbar[iconsize="small"] #zoom-out-button { - list-style-image: url("moz-icon://stock/gtk-zoom-out?size=menu"); -} - -toolbar[iconsize="small"] #zoom-in-button { - list-style-image: url("moz-icon://stock/gtk-zoom-in?size=menu"); -} - -toolbar[iconsize="small"] #sync-button { - -moz-image-region: rect(0px 96px 16px 80px); -} -toolbar[iconsize="small"] #sync-button[status="active"] { - list-style-image: url("chrome://browser/skin/sync-16-throbber.png"); - -moz-image-region: rect(0px 16px 16px 0px); -} - -toolbar[iconsize="small"] #feed-button { - -moz-image-region: rect(0px 112px 16px 96px); -} - -%ifdef MOZ_WEBRTC -toolbar[iconsize="small"] #webrtc-status-button { - -moz-image-region: rect(0px 128px 16px 112px); -} -%endif - -/* Fullscreen window controls */ -#window-controls { - -moz-box-align: start; - margin-inline-start: 10px; -} - -#minimize-button { - list-style-image: url("chrome://global/skin/icons/Minimize.gif"); -} -#restore-button { - list-style-image: url("chrome://global/skin/icons/Restore.gif"); -} -#close-button { - list-style-image: url("chrome://global/skin/icons/Close.gif"); -} - -/* Location bar */ -#urlbar { - width: 7em; - -moz-appearance: textfield; - padding: 0; -} - -.urlbar-textbox-container { - -moz-appearance: none; - -moz-box-align: stretch; -} - -.urlbar-input-box { - margin-inline-start: 0; - min-width: 4em; -} - -.urlbar-history-dropmarker { - -moz-appearance: toolbarbutton-dropdown; -} - -#urlbar-container { - -moz-box-orient: horizontal; - -moz-box-align: stretch; -} - -#urlbar-icons { - -moz-box-align: center; -} - -.urlbar-icon { - cursor: pointer; - padding: 0 3px; -} - -#urlbar-search-splitter { - -moz-appearance: none; - width: 8px; - margin-inline-start: -4px; -} - -#urlbar-search-splitter + #urlbar-container > #urlbar , -#urlbar-search-splitter + #search-container > #searchbar > .searchbar-textbox { - margin-inline-start: 0; -} - -#urlbar-display-box { - margin-top: -1px; - margin-bottom: -1px; - border-inline-end: 1px solid #AAA; - margin-inline-end: 3px; -} - -#urlbar-display { - margin-top: 0; - margin-bottom: 0; - margin-inline-start: 0; - color: GrayText; -} - -/* Favicon */ -#page-proxy-favicon { - width: 16px; - height: 16px; - margin-top: 2px; - margin-bottom: 2px; - margin-inline-start: 4px; - margin-inline-end: 3px; - list-style-image: url(chrome://browser/skin/identity-icons-generic.png); - -moz-image-region: rect(0, 16px, 16px, 0); -} - -/* Since we already have a padlock, always use the generic icon until the favicon loads -.verifiedDomain > #page-proxy-favicon[pageproxystate="valid"] { - list-style-image: url(chrome://browser/skin/identity-icons-https.png); -} - -.verifiedIdentity > #page-proxy-favicon[pageproxystate="valid"] { - list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png); -} - -.mixedActiveContent > #page-proxy-favicon[pageproxystate="valid"] { - list-style-image: url(chrome://browser/skin/identity-icons-https-mixed-active.png); -} -*/ - -#identity-box:hover > #page-proxy-favicon { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -#identity-box:hover:active > #page-proxy-favicon, -#identity-box[open=true] > #page-proxy-favicon { - -moz-image-region: rect(0, 48px, 16px, 32px); -} - -#page-proxy-favicon[pageproxystate="invalid"] { - opacity: 0.3; -} - -/* Identity indicator */ -#identity-box { - padding: 1px; - margin: -1px; - margin-inline-end: 0; - font-size: .9em; -} - -#identity-box:-moz-locale-dir(ltr) { - border-top-left-radius: 2.5px; - border-bottom-left-radius: 2.5px; -} - -#identity-box:-moz-locale-dir(rtl) { - border-top-right-radius: 2.5px; - border-bottom-right-radius: 2.5px; -} - -#identity-box:-moz-focusring { - outline: 1px dotted #000; - outline-offset: -3px; -} - -#identity-icon-labels { - padding-inline-start: 2px; - padding-inline-end: 5px; -} - -#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity { - color: rgb(95,127,67); - margin-inline-end: 4px; - background-image: linear-gradient(rgba(226,246,208,1), - rgba(203,235,177,1)); - background-position: right; - background-repeat: no-repeat; -} - -#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain { - color: rgb(51,87,137); - margin-inline-end: 4px; - background-image: linear-gradient(rgba(220,231,245,1), - rgba(207,221,242,1)); - background-position: right; - background-repeat: no-repeat; -} - -#urlbar[pageproxystate="valid"] > #identity-box.mixedContent { - color: rgb(79,79,0); - margin-inline-end: 4px; - background-image: linear-gradient(rgba(245,245,220,1), - rgba(242,242,207,1)); - background-position: right; - background-repeat: no-repeat; -} - -#identity-box.verifiedIdentity:-moz-locale-dir(rtl) { - background-position: left; -} - -/* Address bar shading for SSL */ - -#urlbar[https_color="all"][security_level="broken"], -#urlbar[https_color="all"][security_level="low"] { - box-shadow: inset 0 0 4px rgb(168,0,0); -} - -#urlbar[https_color="all"][security_level="mixed"], -#urlbar[https_color="secure-mixed"][security_level="mixed"] { - box-shadow: inset 0 0 4px rgb(168,79,0); -} - -#urlbar[https_color="all"][security_level="high"], -#urlbar[https_color="secure-mixed"][security_level="high"], -#urlbar[https_color="secure-only"][security_level="high"] { - box-shadow: inset 0 0 4px rgb(0,79,168); -} - -#urlbar[https_color="all"][security_level="ev"], -#urlbar[https_color="secure-mixed"][security_level="ev"], -#urlbar[https_color="secure-only"][security_level="ev"] { - box-shadow: inset 0 0 4px rgb(0,168,0); -} - -#urlbar[https_color="all"]:-moz-lwtheme-darktext, -#urlbar[https_color="secure-mixed"]:-moz-lwtheme-darktext, -#urlbar[https_color="secure-only"]:-moz-lwtheme-darktext { - box-shadow: inset 0 0 2px; -} - -/* Identity popup icons */ -#identity-popup-icon { - height: 64px; - width: 64px; - padding: 0; - list-style-image: url("chrome://browser/skin/identity.png"); - -moz-image-region: rect(0px, 64px, 64px, 0px); -} - -#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(64px, 64px, 128px, 0px); -} - -#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(128px, 64px, 192px, 0px); -} - -/* Identity popup body text */ -.identity-popup-description { - white-space: pre-wrap; - padding-inline-start: 15px; - margin: 2px 0 4px; -} - -.identity-popup-label { - white-space: pre-wrap; - padding-inline-start: 15px; - margin: 0; -} - -#identity-popup-content-host , -#identity-popup-content-owner { - font-weight: bold; - max-width: 300px; -} - -#identity-popup-content-host , -#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner { - font-size: 140%; -} - -#identity-popup-content-owner { - margin-bottom: 0 !important; -} - -#identity-popup-content-verifier { - margin: 4px 0 2px; -} - -#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption , -#identity-popup-content-box.verifiedDomain > #identity-popup-encryption { - margin-top: 10px; - margin-inline-start: -18px; -} - -#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon , -#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon { - list-style-image: url("chrome://browser/skin/Secure.png"); -} - -/* Identity popup bounding box */ -#identity-popup-container { - min-width: 280px; -} - -/* Notification popup */ -#notification-popup { - min-width: 280px; -} - -.popup-notification-icon { - width: 64px; - height: 64px; - margin-inline-end: 10px; -} - -.popup-notification-icon[popupid="geolocation"] { - list-style-image: url(chrome://browser/skin/Geolocation-64.png); -} - -.popup-notification-icon[popupid="push"] { - list-style-image: url(chrome://browser/skin/Push-64.png); -} - -.popup-notification-icon[popupid="xpinstall-disabled"], -.popup-notification-icon[popupid="addon-progress"], -.popup-notification-icon[popupid="addon-install-cancelled"], -.popup-notification-icon[popupid="addon-install-blocked"], -.popup-notification-icon[popupid="addon-install-origin-blocked"], -.popup-notification-icon[popupid="addon-install-failed"], -.popup-notification-icon[popupid="addon-install-complete"] { - list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric.png); - width: 32px; - height: 32px; -} - -.popup-notification-icon[popupid="click-to-play-plugins"] { - list-style-image: url(chrome://mozapps/skin/plugins/pluginBlocked-64.png); -} - -.popup-notification-icon[popupid="web-notifications"] { - list-style-image: url(chrome://browser/skin/notification-64.png); -} - -.addon-progress-description { - width: 350px; - max-width: 350px; -} - -.popup-progress-label, -.popup-progress-meter { - margin-inline-start: 0; - margin-inline-end: 0; -} - -.popup-progress-cancel { - -moz-appearance: none; - background: transparent; - border: none; - padding: 0; - margin: 0; - margin-inline-start: 5px; - min-height: 0; - min-width: 0; - list-style-image: url("moz-icon://stock/gtk-cancel?size=menu"); -} - -.popup-notification-icon[popupid="indexedDB-permissions-prompt"], -.popup-notification-icon[popupid="indexedDB-quota-prompt"], -.popup-notification-icon[popupid*="offline-app-requested"], -.popup-notification-icon[popupid="offline-app-usage"] { - list-style-image: url(chrome://global/skin/icons/question-64.png); -} - -.popup-notification-icon[popupid="password"] { - list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png); -} - -.popup-notification-icon[popupid="mixed-content-blocked"] { - list-style-image: url(chrome://browser/skin/mixed-content-blocked-64.png); -} - -%ifdef MOZ_WEBRTC -.popup-notification-icon[popupid="webRTC-sharingDevices"], -.popup-notification-icon[popupid="webRTC-shareDevices"] { - list-style-image: url(chrome://browser/skin/webRTC-shareDevice-64.png); -} -%endif - -.popup-notification-icon[popupid="pointerLock"] { - list-style-image: url(chrome://browser/skin/pointerLock-64.png); -} - -/* Notification icon box */ -#notification-popup-box { - position: relative; - background-color: #fff; - background-clip: padding-box; - padding-left: 4px; - border-radius: 2.5px 0 0 2.5px; - border-width: 0 8px 0 0; - border-style: solid; - border-image: url("chrome://browser/skin/urlbar-arrow.png") 0 8 0 0 fill; - margin-inline-end: -8px; - margin-top: -1px; - margin-bottom: -1px; -} - -#notification-popup-box:not([hidden]) + #identity-box { - padding-inline-start: 10px; - border-radius: 0; -} - -#notification-popup-box:-moz-locale-dir(rtl), -.notification-anchor-icon:-moz-locale-dir(rtl) { - transform: scaleX(-1); -} - -.notification-anchor-icon { - width: 16px; - height: 16px; - margin: 0 2px; -} - -.notification-anchor-icon:-moz-focusring { - outline: 1px dotted -moz-DialogText; -} - -.default-notification-icon, -#default-notification-icon { - list-style-image: url(chrome://global/skin/icons/information-16.png); -} - -.geo-notification-icon, -#geo-notification-icon { - list-style-image: url(chrome://browser/skin/Geolocation-16.png); -} - -#addons-notification-icon { - list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.png); -} - -.indexedDB-notification-icon, -#indexedDB-notification-icon { - list-style-image: url(chrome://global/skin/icons/question-16.png); -} - -#password-notification-icon { - list-style-image: url(chrome://mozapps/skin/passwordmgr/key-16.png); -} - -#plugins-notification-icon { - list-style-image: url(chrome://browser/skin/notification-pluginNormal.png); -} - -#alert-plugins-notification-icon { - list-style-image: url(chrome://browser/skin/notification-pluginAlert.png); -} - -#blocked-plugins-notification-icon { - list-style-image: url(chrome://browser/skin/notification-pluginBlocked.png); -} - -#plugins-notification-icon, -#alert-plugins-notification-icon, -#blocked-plugins-notification-icon { - -moz-image-region: rect(0, 16px, 16px, 0); -} - -#plugins-notification-icon:hover, -#alert-plugins-notification-icon:hover, -#blocked-plugins-notification-icon:hover { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -#plugins-notification-icon:active, -#alert-plugins-notification-icon:active, -#blocked-plugins-notification-icon:active { - -moz-image-region: rect(0, 48px, 16px, 32px); -} - -#notification-popup-box[hidden] { - /* Override display:none to make the pluginBlockedNotification animation work - when showing the notification repeatedly. */ - display: -moz-box; - visibility: collapse; -} - -#blocked-plugins-notification-icon[showing] { - animation: pluginBlockedNotification 500ms ease 0s 5 alternate both; -} - -@keyframes pluginBlockedNotification { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -.mixed-content-blocked-notification-icon, -#mixed-content-blocked-notification-icon { - list-style-image: url(chrome://browser/skin/mixed-content-blocked-16.png); -} - -%ifdef MOZ_WEBRTC -.webRTC-shareDevices-notification-icon, -#webRTC-shareDevices-notification-icon { - list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png); -} - -.webRTC-sharingDevices-notification-icon, -#webRTC-sharingDevices-notification-icon { - list-style-image: url(chrome://browser/skin/webRTC-sharingDevice-16.png); -} -%endif - -.web-notifications-notification-icon, -#web-notifications-notification-icon { - list-style-image: url(chrome://browser/skin/web-notifications-tray.svg); - -moz-image-region: rect(0, 16px, 16px, 0); -} - -.web-notifications-notification-icon:hover, -#web-notifications-notification-icon:hover { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -.web-notifications-notification-icon:hover:active, -#web-notifications-notification-icon:hover:active { - -moz-image-region: rect(0, 48px, 16px, 32px); -} - -#pointerLock-notification-icon { - list-style-image: url(chrome://browser/skin/pointerLock-16.png); -} -#pointerLock-cancel { - margin: 0px; -} - -/* Pale Moon: Feed icon */ -#ub-feed-button, -#ub-feed-button > .button-box, -#ub-feed-button:hover:active > .button-box { - padding: 0px; - margin: 0px; - border: 0px; - background-color: transparent !important; -} - -#ub-feed-button { - -moz-appearance: none; - min-width: 0px; - margin-right: 1px !important; - list-style-image: url("chrome://browser/skin/page-livemarks.png"); -} - - -#treecolAutoCompleteImage { - max-width : 36px; -} - -.ac-result-type-bookmark, -.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteImage) { - list-style-image: url("chrome://browser/skin/places/star-icons.png"); - -moz-image-region: rect(0px 32px 16px 16px); - width: 16px; - height: 16px; -} - -.ac-result-type-keyword, -.autocomplete-treebody::-moz-tree-image(keyword, treecolAutoCompleteImage) { - list-style-image: url(moz-icon://stock/gtk-find?size=menu); - width: 16px; - height: 16px; -} - -.ac-result-type-tag, -.autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) { - list-style-image: url("chrome://browser/skin/places/tag.png"); - width: 16px; - height: 16px; -} - -.ac-comment { - font-size: 1.05em; -} - -.ac-extra > .ac-comment { - font-size: inherit; -} - -.ac-url-text, -.ac-action-text { - color: -moz-nativehyperlinktext; - font-size: 0.9em; -} - -richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-icon { - list-style-image: url("chrome://browser/skin/actionicon-tab.png"); - padding: 0 3px; -} - -.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) { - color: GrayText; -} - -.ac-comment[selected="true"], -.ac-url-text[selected="true"], -.ac-action-text[selected="true"] { - color: inherit !important; -} - -.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment), -.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) { - color: GrayText; - font-size: smaller; -} - -.autocomplete-treebody::-moz-tree-cell(suggesthint) { - border-top: 1px solid GrayText; -} - -/* Combined go/reload/stop button in location bar */ - -#go-button { - padding-top: 2px; - padding-bottom: 2px; -} - -#urlbar > toolbarbutton { - -moz-appearance: none; - padding: 0; - border: none; - cursor: pointer; - width: 22px; -} - -#go-button, -#urlbar-go-button { - list-style-image: url("chrome://browser/skin/Go-arrow.png"); -} - -#go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon, -#urlbar-go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon { - transform: scaleX(-1); -} - -#urlbar-reload-button { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); -} - -#urlbar-stop-button { - list-style-image: url("moz-icon://stock/gtk-stop?size=menu"); -} - -/* Popup blocker button */ -#page-report-button { - list-style-image: url("chrome://browser/skin/Info.png"); -} - -/* Star button */ -#star-button { - list-style-image: url("chrome://browser/skin/places/starPage.png"); -} - -#star-button[starred="true"] { - list-style-image: url("chrome://browser/skin/places/pageStarred.png"); -} - -/* bookmarks menu-button */ - -#bookmarks-menu-button[disabled] > .toolbarbutton-icon, -#bookmarks-menu-button[disabled] > .toolbarbutton-menu-dropmarker, -#bookmarks-menu-button[disabled] > .toolbarbutton-menubutton-dropmarker, -#bookmarks-menu-button[disabled] > .toolbarbutton-menubutton-button > .toolbarbutton-icon, -#bookmarks-menu-button > .toolbarbutton-menubutton-button[disabled] > .toolbarbutton-icon { - opacity: .4; -} - -/* history menu-button */ - -#history-menu-button[disabled] > .toolbarbutton-icon, -#history-menu-button[disabled] > .toolbarbutton-menu-dropmarker, -#history-menu-button[disabled] > .toolbarbutton-menubutton-dropmarker, -#history-menu-button[disabled] > .toolbarbutton-menubutton-button > .toolbarbutton-icon, -#history-menu-button > .toolbarbutton-menubutton-button[disabled] > .toolbarbutton-icon { - opacity: .4; -} - -/* Bookmarking panel */ -#editBookmarkPanelStarIcon { - list-style-image: url("chrome://browser/skin/places/starred48.png"); - width: 48px; - height: 48px; -} - -#editBookmarkPanelStarIcon[unstarred] { - list-style-image: url("chrome://browser/skin/places/unstarred48.png"); -} - -#editBookmarkPanelTitle { - font-size: 130%; -} - -#editBookmarkPanelHeader, -#editBookmarkPanelContent { - margin-bottom: .5em; -} - -/* Implements editBookmarkPanel resizing on folderTree un-collapse. */ -#editBMPanel_folderTree { - min-width: 27em; -} - -/* Content area */ -#sidebar { - background-color: Window; -} - -/* Throbber */ -#navigator-throbber { - width: 16px; - min-height: 16px; - margin: 0 3px; -} - -#navigator-throbber[busy="true"] { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); -} - -#navigator-throbber, -#wrapper-navigator-throbber > #navigator-throbber { - list-style-image: url("chrome://global/skin/icons/notloading_16.png"); -} - -/* Tabstrip */ - -#TabsToolbar { - min-height: 0; - padding: 0; -} - -#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) { - -moz-appearance: menubar; - color: -moz-menubartext; - box-shadow: 0 -1px 0 rgba(0,0,0,.1) inset; -} - -#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme):-moz-system-metric(menubar-drag) { - -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag"); -} - -#TabsToolbar[tabsontop=false] { - background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, rgba(0,0,0,.05) 1px, transparent 50%); -} - -/* When the tab bar is collapsed, show a 1px border in its place. */ -#TabsToolbar[tabsontop="false"][collapsed="true"]:not([customizing="true"]) { - visibility: visible; - height: 1px; - border-bottom-width: 1px; - /* !important here to override border-style: none on the toolbar */ - border-bottom-style: solid !important; - border-bottom-color: ThreeDShadow; - overflow: hidden; -} - -.tabbrowser-tab, -.tabs-newtab-button { - position: static; - -moz-appearance: none; - background: linear-gradient(hsla(0,0%,100%,.2), hsla(0,0%,45%,.2) 2px, hsla(0,0%,32%,.2) 80%); - background-origin: border-box; - background-position: 1px 2px; - background-size: 100% calc(100% - 2px); - background-repeat: no-repeat; - color: inherit; - margin: 0; - padding: 0; - border-width: 4px 5px 3px 6px; - border-style: solid; - border-image: url(tabbrowser/tab.png) 4 5 3 6 fill repeat stretch; - border-radius: 10px 8px 0 0; - min-height: 25px; /* reserve space for the sometimes hidden close button */ -} - -.tabbrowser-tab:hover, -.tabs-newtab-button:hover { - background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.2) 4px, hsla(0,0%,75%,.2) 80%); -} - -.tabbrowser-tab[selected="true"] { - background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%), - linear-gradient(-moz-dialog, -moz-dialog); -} - -.tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) { - color: -moz-dialogtext; -} - -#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) { - background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, transparent 1px), - linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%), - linear-gradient(-moz-dialog, -moz-dialog); -} - - -.tabbrowser-tab:-moz-lwtheme:not([selected="true"]) { - opacity: 0.9; -} - -.tabbrowser-tab[selected="true"]:-moz-lwtheme { - background-image: linear-gradient(rgba(255,255,255,.6), rgba(255,255,255,.8) 50%); -} - -.tabbrowser-tab[selected="true"]:-moz-lwtheme-brighttext { - background-image: linear-gradient(rgba(128,128,128,.9), rgba(32,32,32,.9) 50%, rgba(32,32,32,.9) 80%, rgba(32,32,32,.8) 100%); -} - -.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]), -.tabs-newtab-button:-moz-lwtheme-brighttext { - background-image: linear-gradient(hsla(0,0%,25%,.4), hsla(0,0%,15%,.6) 80%); -} - -.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover, -.tabs-newtab-button:-moz-lwtheme-brighttext:hover { - background-image: linear-gradient(hsla(0,0%,60%,.4), hsla(0,0%,10%,.8) 80%); -} - -.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]), -.tabs-newtab-button:-moz-lwtheme-darktext { - background-image: linear-gradient(hsla(0,0%,75%,.4), hsla(0,0%,85%,.6) 80%); -} - -.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover, -.tabs-newtab-button:-moz-lwtheme-darktext:hover { - background-image: linear-gradient(hsla(0,0%,60%,.4), hsla(0,0%,90%,.8) 80%); -} - -.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) { - background-image: radial-gradient(circle farthest-corner at 50% 3px, rgba(233,242,252,1) 3%, rgba(172,206,255,.75) 40%, rgba(87,151,201,.5) 80%, rgba(87,151,201,0)); -} -.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover { - background-image: linear-gradient(hsla(0,0%,100%,.8), hsla(0,0%,100%,.6) 2px, hsla(0,0%,75%,.2) 80%), - radial-gradient(circle farthest-corner at 50% 3px, rgba(233,242,252,1) 3%, rgba(172,206,255,.75) 40%, rgba(87,151,201,.5) 80%, rgba(87,151,201,0)); -} - -#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab > .tab-stack > .tab-content[pinned] { - min-height: 18px; /* corresponds to the max. height of non-textual tab contents, i.e. the tab close button */ -} - -.tabbrowser-tab:focus > .tab-stack { - outline: 1px dotted; -} - -.tab-throbber, -.tab-icon-image { - width: 16px; - height: 16px; - margin-inline-end: 3px; - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -.tab-throbber { - list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png"); -} - -.tab-throbber[progress] { - list-style-image: url("chrome://browser/skin/tabbrowser/loading.png"); -} - -.tab-throbber[pinned], -.tab-icon-image[pinned], -.tabs-newtab-button > .toolbarbutton-icon { - margin-inline-start: 2px; - margin-inline-end: 2px; -} - -#context_reloadTab { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); -} - -#context_closeOtherTabs { - list-style-image: url("moz-icon://stock/gtk-clear?size=menu"); -} - -#context_closeOtherTabs[disabled] { - list-style-image: url("moz-icon://stock/gtk-clear?size=menu&state=disabled"); -} - -#context_undoCloseTab { - list-style-image: url("moz-icon://stock/gtk-undelete?size=menu"); -} - -#context_closeTab { - list-style-image: url("moz-icon://stock/gtk-close?size=menu"); -} - -/* Tab drag and drop */ -.tab-drop-indicator { - list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png); - margin-bottom: -11px; -} - -/* In-tab close button */ -.tab-close-button > .toolbarbutton-icon { - /* XXX Buttons have padding in widget/ that we don't want here but can't override with good CSS, so we must - use evil CSS to give the impression of smaller content */ - margin: -4px; -} - -.tab-close-button { - padding: 0; - margin-top: -1px; - margin-bottom: -1px; - margin-inline-end: -1px; -} - -/* Tab sound indicator */ -.tab-icon-sound { - margin-inline-start: 4px; - width: 16px; - height: 16px; - padding: 0; -} - -.allTabs-endimage[soundplaying], -.tab-icon-sound[soundplaying] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio"); -} - -.allTabs-endimage[muted], -.tab-icon-sound[muted] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-muted"); -} - -.allTabs-endimage[blocked], -.tab-icon-sound[blocked] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[soundplaying], -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[blocked], -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[muted] { - filter: invert(1); -} - -.tab-icon-sound[soundplaying-scheduledremoval]:not([muted]):not(:hover), -.tab-icon-overlay[soundplaying-scheduledremoval]:not([muted]):not(:hover) { - transition: opacity .3s linear var(--soundplaying-removal-delay); - opacity: 0; -} - -/* Tab icon overlay */ -.tab-icon-overlay { - width: 16px; - height: 16px; - margin-top: -8px; - margin-inline-start: -15px; - margin-inline-end: -1px; - position: relative; -} - -.tab-icon-overlay[soundplaying], -.tab-icon-overlay[muted]:not([crashed]), -.tab-icon-overlay[blocked]:not([crashed]) { - border-radius: 10px; -} - -.tab-icon-overlay[soundplaying]:hover, -.tab-icon-overlay[muted]:not([crashed]):hover, -.tab-icon-overlay[blocked]:not([crashed]):hover { - background-color: white; -} - -.tab-icon-overlay[soundplaying] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio"); -} - -.tab-icon-overlay[muted] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-muted"); -} - -.tab-icon-overlay[blocked] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), -.tab-icon-overlay[soundplaying][selected]:-moz-lwtheme-brighttext:not(:hover) { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), -.tab-icon-overlay[muted][selected]:-moz-lwtheme-brighttext:not(:hover) { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), -.tab-icon-overlay[blocked][selected]:-moz-lwtheme-brighttext:not(:hover) { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked"); -} - -/* Tabstrip new tab button */ -.tabs-newtab-button, -#TabsToolbar > #new-tab-button , -#TabsToolbar > #wrapper-new-tab-button > #new-tab-button { - list-style-image: url("moz-icon://stock/gtk-add?size=menu"); - -moz-image-region: auto; -} - -/* Tabstrip close button */ -.tabs-closebutton > .toolbarbutton-icon { - /* XXX Buttons have padding in widget/ that we don't want here but can't override with good CSS, so we must - use evil CSS to give the impression of smaller content */ - margin: -2px; -} - -/* Tabbrowser arrowscrollbox arrows */ -.tabbrowser-arrowscrollbox > .scrollbutton-up, -.tabbrowser-arrowscrollbox > .scrollbutton-down { - -moz-appearance: none; - margin: 0; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-up { - border-inline-start: 0; - border-inline-end: 2px solid transparent; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-down { - border-inline-start: 2px solid transparent; - border-inline-end: 0; - transition: 1s box-shadow ease-out; - border-radius: 4px; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-down[notifybgtab] { - box-shadow: 0 0 5px 5px Highlight inset; - transition: none; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):-moz-locale-dir(ltr), -.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):-moz-locale-dir(rtl) { - border-width: 0 2px 0 0; - border-style: solid; - border-image: url("chrome://browser/skin/tabbrowser/tab-overflow-border.png") 0 2 0 2 fill; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):-moz-locale-dir(ltr), -.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):-moz-locale-dir(rtl) { - border-width: 0 0 0 2px; - border-style: solid; - border-image: url("chrome://browser/skin/tabbrowser/tab-overflow-border.png") 0 2 0 2 fill; -} - -#TabsToolbar .toolbarbutton-1 > .toolbarbutton-icon, -#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menu-dropmarker, -#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon { - margin-top: -2px; - margin-bottom: -2px; -} - -#alltabs-button > .toolbarbutton-icon { - list-style-image: url("chrome://browser/skin/tabbrowser/alltabs.png"); - margin: 2px 0 1px; -} - -#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker { - margin-bottom: -2px; -} - -#alltabs-button[type="menu"] > .toolbarbutton-icon { - display: none; -} - -/* All tabs menupopup */ -.alltabs-item > .menu-iconic-left > .menu-iconic-icon { - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -.alltabs-item[selected="true"] { - font-weight: bold; -} - -.alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); -} - -.alltabs-item[tabIsVisible] { - /* box-shadow instead of background-color to work around native styling */ - box-shadow: inset -5px 0 ThreeDShadow; -} - -/* Sidebar */ -#sidebar-header > .tabs-closebutton { - margin-bottom: 0px !important; - padding: 0px 2px 0px 2px !important; -} - -#sidebar-throbber[loading="true"] { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); - margin-inline-end: 4px; -} - -toolbarbutton.chevron { - list-style-image: url("chrome://global/skin/toolbar/chevron.gif") !important; -} - -toolbarbutton.chevron:-moz-locale-dir(rtl) > .toolbarbutton-icon { - transform: scaleX(-1); -} - -toolbarbutton.chevron > .toolbarbutton-text, -toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { - display: none; -} - -toolbarbutton.chevron > .toolbarbutton-icon { - margin: 0; -} - -toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon { - display: -moz-box; /* display chevron icon in text mode */ -} - -/* ::::: Keyboard UI Panel ::::: */ - -.KUI-panel-closebutton { - list-style-image: url(KUI-close.png); -} - -.KUI-panel-closebutton > .toolbarbutton-icon { - margin: 0; -} - -/* ::::: Ctrl-Tab and All Tabs Panels ::::: */ - -.ctrlTab-preview, -.allTabs-preview { - -moz-appearance: toolbarbutton; -} - -.tabPreview-canvas { - box-shadow: 0 0 5px ThreeDShadow; -} - -.ctrlTab-preview:focus .tabPreview-canvas, -.ctrlTab-preview:hover .tabPreview-canvas, -.allTabs-preview:focus .tabPreview-canvas, -.allTabs-preview:hover .tabPreview-canvas { - box-shadow: none; -} - -.ctrlTab-favicon[src], -.allTabs-favicon[src] { - background-color: white; - width: 20px; - height: 20px; - padding: 2px; -} - -/* Ctrl-Tab */ - -#ctrlTab-panel { - padding: 10px; -} - -.ctrlTab-preview:not(#ctrlTab-showAll) .tabPreview-canvas { - margin-bottom: 2px; -} - -#ctrlTab-showAll { - -moz-appearance: button; - color: ButtonText; - padding: 0 3px; - margin-top: 10px; -} - -/* All Tabs */ - -#allTabs-panel { - padding-bottom: 10px; -} - -#allTabs-meta { - padding: 5px; -} - -#allTabs-filter { - margin-inline-start: 36px; - margin-inline-end: 0; -} - -.allTabs-preview-label { - transform: translate(0, 2px); -} - -/* Application button menu */ - -.splitmenu-menuitem { - margin-inline-end: 1px; -} - -#appmenu-toolbar-button:not(:hover):not([open]):not(:-moz-lwtheme) { - color: inherit; -} - -#appmenu-toolbar-button > .toolbarbutton-text, -#appmenu-toolbar-button > .toolbarbutton-menu-dropmarker { - margin-top: -2px !important; - margin-bottom: -2px !important; -} -#appmenuSecondaryPane { - border-inline-start: 1px solid ThreeDShadow; -} -#appmenuSecondaryPane-spacer { - min-height: 1em; -} -#appmenu-cut, -#appmenu-editmenu-cut { - list-style-image: url("moz-icon://stock/gtk-cut?size=menu"); -} -#appmenu-copy, -#appmenu-editmenu-copy { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu"); -} -#appmenu-paste, -#appmenu-editmenu-paste { - list-style-image: url("moz-icon://stock/gtk-paste?size=menu"); -} -#wrapper-appmenu-toolbar-button, -.appmenu-edit-button[disabled="true"] { - opacity: .3; -} - -/* Add-on bar */ - -#addon-bar { - box-shadow: 0 1px 0 rgba(0,0,0,.15) inset; - padding: 0; - min-height: 20px; -} - -#status-bar { - min-height: 0; - -moz-appearance: none; - background-color: transparent; - border: none; -} - -#addon-bar[customizing] > #status-bar { - opacity: .5; - background-image: repeating-linear-gradient(135deg, - rgba(255,255,255,.3), rgba(255,255,255,.3) 5px, - rgba(0,0,0,.3) 5px, rgba(0,0,0,.3) 10px); -} - -#status-bar > statusbarpanel { - border-width: 0; - -moz-appearance: none; -} - -#addonbar-closebutton > .toolbarbutton-icon { - margin-top: -2px; - margin-bottom: -2px; -} - -/* Status panel */ - -.statuspanel-label { - margin: 0; - padding: 2px 4px; - background: linear-gradient(#fff, #ddd); - border: 1px none #ccc; - border-top-style: solid; - color: #333; - text-shadow: none; -} - -.statuspanel-label:-moz-locale-dir(ltr):not([mirror]), -.statuspanel-label:-moz-locale-dir(rtl)[mirror] { - border-right-style: solid; - border-top-right-radius: .3em; - margin-right: 1em; -} - -.statuspanel-label:-moz-locale-dir(rtl):not([mirror]), -.statuspanel-label:-moz-locale-dir(ltr)[mirror] { - border-left-style: solid; - border-top-left-radius: .3em; - margin-left: 1em; -} - -#full-screen-warning-message { - background-color: hsl(0,0%,15%); - color: white; - border-radius: 8px; - margin-top: 30px; - padding: 30px 50px; - box-shadow: 0 0 2px white; -} - -.full-screen-description { - font-size: 150%; -} - -#full-screen-domain-text { - font-size: 300%; -} - -%ifdef MOZ_DEVTOOLS -%include ../../../../devtools/client/themes/responsivedesign.inc.css -%include ../../../../devtools/client/themes/commandline.inc.css -%endif -%include ../shared/plugin-doorhanger.inc.css - -%ifdef MOZ_DEVTOOLS -.gcli-panel { - padding: 0; -} - -.gclitoolbar-input-node > .textbox-input-box > html|*.textbox-input::-moz-selection { - color: hsl(210,11%,16%); -} - -/* Error counter */ - -#developer-toolbar-toolbox-button[error-count]:before { - color: #FDF3DE; - min-width: 16px; - text-shadow: none; - background-image: linear-gradient(#B4211B, #8A1915); - border-radius: 1px; - margin-inline-end: 2px; -} -%endif - -.toolbarbutton-badge-stack { - margin: 5px 3px; - position: relative; -} - -toolbar[iconsize="small"] .toolbarbutton-badge-stack { - margin: 0; -} - -.toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl)::after { - left: 2px; - right: auto; -} - -#main-window[privatebrowsingmode=temporary] #TabsToolbar::before { - display: -moz-box; - content: ""; - background: url("chrome://browser/skin/privatebrowsing-mask.png") center no-repeat; - width: 40px; -} diff --git a/application/palemoon/themes/linux/click-to-play-warning-stripes.png b/application/palemoon/themes/linux/click-to-play-warning-stripes.png deleted file mode 100644 index 29f15f7b8c..0000000000 Binary files a/application/palemoon/themes/linux/click-to-play-warning-stripes.png and /dev/null differ diff --git a/application/palemoon/themes/linux/communicator/moz.build b/application/palemoon/themes/linux/communicator/moz.build deleted file mode 100644 index ecb79e730d..0000000000 --- a/application/palemoon/themes/linux/communicator/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/application/palemoon/themes/linux/downloads/allDownloadsViewOverlay.css b/application/palemoon/themes/linux/downloads/allDownloadsViewOverlay.css deleted file mode 100644 index b417884725..0000000000 --- a/application/palemoon/themes/linux/downloads/allDownloadsViewOverlay.css +++ /dev/null @@ -1,125 +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/. */ - -#downloadsRichListBox { - /** The default listbox appearance comes with an unwanted margin. **/ - -moz-appearance: none; - margin: 0; -} - -#downloadsRichListBox > richlistitem.download { - height: 5em; - padding: 5px 8px; -} - -.downloadTypeIcon { - margin-inline-end: 8px; - /* Prevent flickering when changing states. */ - min-height: 32px; - min-width: 32px; -} - -.blockedIcon { - list-style-image: url("chrome://global/skin/icons/Error.png"); -} - -.downloadTarget { - margin-bottom: 3px; - cursor: inherit; -} - -.downloadDetails { - opacity: 0.7; - font-size: 95%; - cursor: inherit; -} - -.downloadButton { - -moz-appearance: none; - background: transparent; - min-width: 0; - min-height: 0; - margin: 3px; - border: none; - padding: 5px; - list-style-image: url("chrome://browser/skin/downloads/buttons.png"); -} - -/*** Button icons ***/ - -.downloadButton.downloadCancel { - -moz-image-region: rect(0px, 16px, 16px, 0px); -} -richlistitem.download:hover > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} -richlistitem.download:hover > .downloadButton.downloadCancel:hover { - -moz-image-region: rect(0px, 48px, 16px, 32px); -} -richlistitem.download:hover > .downloadButton.downloadCancel:active { - -moz-image-region: rect(0px, 64px, 16px, 48px); -} -richlistitem.download[selected] > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 80px, 16px, 64px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 96px, 16px, 80px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadCancel:hover { - -moz-image-region: rect(0px, 112px, 16px, 96px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadCancel:active { - -moz-image-region: rect(0px, 128px, 16px, 112px); -} - -.downloadButton.downloadShow { - -moz-image-region: rect(16px, 16px, 32px, 0px); -} -richlistitem.download:hover > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} -richlistitem.download:hover > .downloadButton.downloadShow:hover { - -moz-image-region: rect(16px, 48px, 32px, 32px); -} -richlistitem.download:hover > .downloadButton.downloadShow:active { - -moz-image-region: rect(16px, 64px, 32px, 48px); -} -richlistitem.download[selected] > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 80px, 32px, 64px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 96px, 32px, 80px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadShow:hover { - -moz-image-region: rect(16px, 112px, 32px, 96px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadShow:active { - -moz-image-region: rect(16px, 128px, 32px, 112px); -} - -.downloadButton.downloadRetry { - -moz-image-region: rect(32px, 16px, 48px, 0px); -} -richlistitem.download:hover > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} -richlistitem.download:hover > .downloadButton.downloadRetry:hover { - -moz-image-region: rect(32px, 48px, 48px, 32px); -} -richlistitem.download:hover > .downloadButton.downloadRetry:active { - -moz-image-region: rect(32px, 64px, 48px, 48px); -} -richlistitem.download[selected] > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 80px, 48px, 64px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 96px, 48px, 80px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadRetry:hover { - -moz-image-region: rect(32px, 112px, 48px, 96px); -} -richlistitem.download:hover[selected] > .downloadButton.downloadRetry:active { - -moz-image-region: rect(32px, 128px, 48px, 112px); -} - diff --git a/application/palemoon/themes/linux/downloads/buttons.png b/application/palemoon/themes/linux/downloads/buttons.png deleted file mode 100644 index 071f7f7540..0000000000 Binary files a/application/palemoon/themes/linux/downloads/buttons.png and /dev/null differ diff --git a/application/palemoon/themes/linux/downloads/contentAreaDownloadsView.css b/application/palemoon/themes/linux/downloads/contentAreaDownloadsView.css deleted file mode 100644 index 56917d7151..0000000000 --- a/application/palemoon/themes/linux/downloads/contentAreaDownloadsView.css +++ /dev/null @@ -1,11 +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/. */ - -@import url("chrome://global/skin/inContentUI.css"); - -#downloadsListEmptyDescription { - margin: 1em; - text-align: center; - color: GrayText; -} diff --git a/application/palemoon/themes/linux/downloads/download-glow-small.png b/application/palemoon/themes/linux/downloads/download-glow-small.png deleted file mode 100644 index 0dbf602c73..0000000000 Binary files a/application/palemoon/themes/linux/downloads/download-glow-small.png and /dev/null differ diff --git a/application/palemoon/themes/linux/downloads/download-glow.png b/application/palemoon/themes/linux/downloads/download-glow.png deleted file mode 100644 index 7514317fed..0000000000 Binary files a/application/palemoon/themes/linux/downloads/download-glow.png and /dev/null differ diff --git a/application/palemoon/themes/linux/downloads/download-notification-finish.png b/application/palemoon/themes/linux/downloads/download-notification-finish.png deleted file mode 100644 index 7bcc7f5699..0000000000 Binary files a/application/palemoon/themes/linux/downloads/download-notification-finish.png and /dev/null differ diff --git a/application/palemoon/themes/linux/downloads/download-notification-start.png b/application/palemoon/themes/linux/downloads/download-notification-start.png deleted file mode 100644 index bd548b1838..0000000000 Binary files a/application/palemoon/themes/linux/downloads/download-notification-start.png and /dev/null differ diff --git a/application/palemoon/themes/linux/downloads/download-summary.png b/application/palemoon/themes/linux/downloads/download-summary.png deleted file mode 100644 index c5d47545d9..0000000000 Binary files a/application/palemoon/themes/linux/downloads/download-summary.png and /dev/null differ diff --git a/application/palemoon/themes/linux/downloads/downloads.css b/application/palemoon/themes/linux/downloads/downloads.css deleted file mode 100644 index 368abd6770..0000000000 --- a/application/palemoon/themes/linux/downloads/downloads.css +++ /dev/null @@ -1,376 +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/. */ - -/*** Panel and outer controls ***/ - -#downloadsPanel > .panel-arrowcontainer > .panel-arrowcontent { - padding: 0; -} - -#downloadsListBox { - background: transparent; - padding: 4px; - color: inherit; -} - -#downloadsPanel:not([hasdownloads]) > #downloadsListBox { - display: none; -} - -#downloadsPanel[hasdownloads] > #emptyDownloads { - display: none; -} - -#emptyDownloads { - padding: 10px 20px; - max-width: 40ch; -} - -#downloadsHistory { - background: transparent; - color: -moz-nativehyperlinktext; - cursor: pointer; -} - -#downloadsFooter { - border-top: 1px solid ThreeDShadow; - background-image: linear-gradient(hsla(0,0%,0%,.15), hsla(0,0%,0%,.08) 6px); -} - -#downloadsHistory > .button-box { - margin: 1em; -} - -#downloadsPanel[keyfocus] > #downloadsFooter > #downloadsHistory:focus > .button-box { - outline: 1px -moz-dialogtext dotted; -} - -/*** Downloads Summary and List items ***/ - -#downloadsSummary, -richlistitem[type="download"] { - height: 6em; - padding-inline-end: 0; - color: inherit; -} - -#downloadsSummary { - padding: 8px 38px 8px 12px; - cursor: pointer; - -moz-user-focus: normal; -} - -#downloadsPanel[keyfocus] > #downloadsFooter > #downloadsSummary:focus { - outline: 1px -moz-dialogtext dotted; - outline-offset: -5px; -} - -#downloadsSummary > .downloadTypeIcon { - list-style-image: url("chrome://browser/skin/downloads/download-summary.png"); -} - -#downloadsSummaryDescription { - color: -moz-nativehyperlinktext; -} - -richlistitem[type="download"] { - margin: 0; - border-top: 1px solid hsla(0,0%,100%,.2); - border-bottom: 1px solid hsla(0,0%,0%,.15); - background: transparent; - padding: 8px; -} - -richlistitem[type="download"]:first-child { - border-top: 1px solid transparent; -} - -richlistitem[type="download"]:last-child { - border-bottom: 1px solid transparent; -} - -#downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] { - outline: 1px -moz-dialogtext dotted; - outline-offset: -1px; -} - -.downloadTypeIcon { - margin-inline-end: 8px; - /* Prevent flickering when changing states. */ - min-height: 32px; - min-width: 32px; -} - -.blockedIcon { - list-style-image: url("chrome://global/skin/icons/Error.png"); -} - -/* We hold .downloadDisplayName, .downloadProgress and .downloadDetails - inside of a vbox with class .downloadContainer. We set the font-size of - the entire container to 90% because: - - 1) This is the size that we want .downloadDetails to be - 2) The container's width is set by localizers by &downloadDetails.width;, - which is a ch unit. Since this is the value that should control the - panel width, we apply it to the outer container to constrain - .downloadDisplayName and .downloadProgress. - - Finally, since we want .downloadDisplayName's font-size to be at 100% of - the font-size of .downloadContainer's parent, we use calc to go from the - smaller font-size back to the original font-size. - */ -#downloadsSummaryDetails, -.downloadContainer { - font-size: 90%; -} - -#downloadsSummaryDescription, -.downloadDisplayName { - margin-bottom: 7px; - cursor: inherit; -} - -.downloadDisplayName { - font-size: calc(100%/0.9); -} - -#downloadsSummaryDetails, -.downloadDetails { - margin-top: 1px; - opacity: 0.6; - cursor: inherit; -} - -.downloadButton { - -moz-appearance: none; - min-width: 0; - min-height: 0; - margin: 3px; - border: none; - background: transparent; - padding: 5px; - list-style-image: url("chrome://browser/skin/downloads/buttons.png"); -} - -.downloadButton > .button-box { - padding: 0; -} - -.downloadButton:focus > .button-box { - outline: 1px -moz-dialogtext dotted; -} - -/*** Highlighted list items ***/ - -#downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover { - border-radius: 3px; - border-top: 1px solid hsla(0,0%,100%,.3); - border-bottom: 1px solid hsla(0,0%,0%,.2); - background-color: Highlight; - background-image: linear-gradient(hsla(0,0%,100%,.1), hsla(0,0%,100%,0)); - color: HighlightText; - cursor: pointer; -} - -/*** Button icons ***/ - -.downloadButton.downloadCancel { - -moz-image-region: rect(0px, 16px, 16px, 0px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:hover { - -moz-image-region: rect(0px, 48px, 16px, 32px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:active { - -moz-image-region: rect(0px, 64px, 16px, 48px); -} - -.downloadButton.downloadShow { - -moz-image-region: rect(16px, 16px, 32px, 0px); -} -#downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 96px, 32px, 80px); -} -#downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:hover { - -moz-image-region: rect(16px, 112px, 32px, 96px); -} -#downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:active { - -moz-image-region: rect(16px, 128px, 32px, 112px); -} - -.downloadButton.downloadRetry { - -moz-image-region: rect(32px, 16px, 48px, 0px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:hover { - -moz-image-region: rect(32px, 48px, 48px, 32px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:active { - -moz-image-region: rect(32px, 64px, 48px, 48px); -} - -/*** Status and progress indicator ***/ - -#downloads-indicator-anchor { - /* Makes the outermost stack element positioned, so that its contents are - rendered over the main browser window in the Z order. This is required by - the animated event notification. */ - position: relative; -} - -toolbar[iconsize="small"] > #downloads-indicator > #downloads-indicator-anchor { - min-width: 16px; - min-height: 16px; -} - -toolbar[iconsize="large"] > #downloads-indicator > #downloads-indicator-anchor { - min-width: 24px; - min-height: 24px; -} - -/*** Main indicator icon ***/ - -toolbar[iconsize="small"] > #downloads-indicator > #downloads-indicator-anchor > #downloads-indicator-icon { - background: -moz-image-rect(url("chrome://browser/skin/Toolbar-small.png"), - 0, 16, 16, 0) center no-repeat; -} - -toolbar[iconsize="large"] > #downloads-indicator > #downloads-indicator-anchor > #downloads-indicator-icon { - background: -moz-image-rect(url("chrome://browser/skin/Toolbar.png"), - 0, 24, 24, 0) center no-repeat; -} - -toolbar[iconsize="small"] > #downloads-indicator[attention] > #downloads-indicator-anchor > #downloads-indicator-icon { - background-image: url("chrome://browser/skin/downloads/download-glow-small.png"); -} - -toolbar[iconsize="large"] > #downloads-indicator[attention] > #downloads-indicator-anchor > #downloads-indicator-icon { - background-image: url("chrome://browser/skin/downloads/download-glow.png"); -} - -/* In the next few rules, we use :not([counter]) as a shortcut that is - equivalent to -moz-any([progress], [paused]). */ - -#downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter { - background: -moz-image-rect(url("chrome://browser/skin/Toolbar-small.png"), - 0, 16, 16, 0) center no-repeat; - background-size: 12px; -} - -#downloads-indicator:not([counter])[attention] > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter { - background-image: url("chrome://browser/skin/downloads/download-glow.png"); -} - -/*** Download notifications ***/ - -#downloads-indicator-notification { - opacity: 0; - background-size: 16px; - background-position: center; - background-repeat: no-repeat; -} - -@keyframes downloadsIndicatorNotificationStartRight { - from { opacity: 0; transform: translate(-128px, 128px) scale(8); } - 20% { opacity: .85; animation-timing-function: ease-out; } - to { opacity: 0; transform: translate(0) scale(1); } -} - -@keyframes downloadsIndicatorNotificationStartLeft { - from { opacity: 0; transform: translate(128px, 128px) scale(8); } - 20% { opacity: .85; animation-timing-function: ease-out; } - to { opacity: 0; transform: translate(0) scale(1); } -} - -#downloads-indicator[notification="start"] > #downloads-indicator-anchor > #downloads-indicator-notification { - background-image: url("chrome://browser/skin/downloads/download-notification-start.png"); - animation-name: downloadsIndicatorNotificationStartRight; - animation-duration: 1s; -} - -#downloads-indicator[notification="start"]:-moz-locale-dir(rtl) > #downloads-indicator-anchor > #downloads-indicator-notification { - animation-name: downloadsIndicatorNotificationStartLeft; -} - -@keyframes downloadsIndicatorNotificationFinish { - from { opacity: 0; transform: scale(1); } - 20% { opacity: .65; animation-timing-function: ease-in; } - to { opacity: 0; transform: scale(8); } -} - -#downloads-indicator[notification="finish"] > #downloads-indicator-anchor > #downloads-indicator-notification { - background-image: url("chrome://browser/skin/downloads/download-notification-finish.png"); - animation-name: downloadsIndicatorNotificationFinish; - animation-duration: 1s; -} - -/*** Progress bar and text ***/ - -#downloads-indicator-counter { - height: 10px; - margin: 0; - color: hsl(0,0%,30%); - text-shadow: 0 1px 0 hsla(0,0%,100%,.5); - font-size: 10px; - line-height: 10px; - text-align: center; -} - -toolbar[brighttext] #downloads-indicator-counter { - color: white; - text-shadow: 0 0 1px rgba(0,0,0,.7), - 0 1px 1.5px rgba(0,0,0,.5); -} - -#downloads-indicator-progress { - width: 16px; - height: 6px; - min-width: 0; - min-height: 0; - margin-top: 1px; - margin-bottom: 2px; - border-radius: 2px; - box-shadow: 0 1px 0 hsla(0,0%,100%,.4); -} - -#downloads-indicator-progress > .progress-bar { - -moz-appearance: none; - min-width: 0; - min-height: 0; - /* The background-clip: border-box; and background-image: none; are there to expand the background-color behind the border */ - background-clip: padding-box, border-box; - background-color: rgb(255, 135, 94); - background-image: linear-gradient(transparent 1px, rgba(255, 255, 255, 0.4) 1px, rgba(255, 255, 255, 0.4) 2px, transparent 2px), none; - border: 1px solid; - border-color: rgba(0,43,86,.6) rgba(0,43,86,.4) rgba(0,43,86,.4); - border-radius: 2px 0 0 2px; -} - -#downloads-indicator-progress > .progress-remainder { - -moz-appearance: none; - min-width: 0; - min-height: 0; - background-image: linear-gradient(#505050, #575757); - border: 1px solid; - border-color: hsla(0,0%,0%,.6) hsla(0,0%,0%,.4) hsla(0,0%,0%,.4); - border-inline-start: none; - border-radius: 0 2px 2px 0; -} - -#downloads-indicator[paused] > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-progress > .progress-bar { - background-color: rgb(220, 230, 81); -} - -#downloads-indicator[paused] > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-progress > .progress-remainder { - background-image: linear-gradient(#4b5000, #515700); -} - -toolbar[mode="full"] > #downloads-indicator > .toolbarbutton-text { - margin: 0; - text-align: center; -} diff --git a/application/palemoon/themes/linux/engineManager.css b/application/palemoon/themes/linux/engineManager.css deleted file mode 100644 index c6d42cce29..0000000000 --- a/application/palemoon/themes/linux/engineManager.css +++ /dev/null @@ -1,16 +0,0 @@ -%if 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/. */ -%endif - -#engineList treechildren::-moz-tree-image(engineName) { - margin-inline-end: 4px; - margin-inline-start: 1px; - width: 16px; - height: 16px; -} - -#engineList treechildren::-moz-tree-row { - height: 20px; -} diff --git a/application/palemoon/themes/linux/feeds/feedIcon.png b/application/palemoon/themes/linux/feeds/feedIcon.png deleted file mode 100644 index a788fffb00..0000000000 Binary files a/application/palemoon/themes/linux/feeds/feedIcon.png and /dev/null differ diff --git a/application/palemoon/themes/linux/feeds/feedIcon16.png b/application/palemoon/themes/linux/feeds/feedIcon16.png deleted file mode 100644 index f8536a4e1f..0000000000 Binary files a/application/palemoon/themes/linux/feeds/feedIcon16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/feeds/subscribe-ui.css b/application/palemoon/themes/linux/feeds/subscribe-ui.css deleted file mode 100644 index 51eb7a1174..0000000000 --- a/application/palemoon/themes/linux/feeds/subscribe-ui.css +++ /dev/null @@ -1,29 +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/. */ - -.alwaysUse { - padding: 5px; -} - -.handlersMenuPopup > menuitem { - padding-inline-start: 23px; -} - -.handlersMenuPopup > menuitem.menuitem-iconic { - padding-inline-start: 2px; -} - -.handlersMenuPopup > .menuitem-iconic > .menu-iconic-left { - display: -moz-box; - min-width: 16px; - padding-inline-end: 2px; -} - -.chooseApplicationMenuItem { - list-style-image: url("moz-icon://dummy.exe?size=16"); -} - -#feedHeader[dir="rtl"] .handlersMenuList > menupopup { - direction: rtl; -} diff --git a/application/palemoon/themes/linux/icon.png b/application/palemoon/themes/linux/icon.png deleted file mode 100644 index ff4f21f9a6..0000000000 Binary files a/application/palemoon/themes/linux/icon.png and /dev/null differ diff --git a/application/palemoon/themes/linux/identity-icons-generic.png b/application/palemoon/themes/linux/identity-icons-generic.png deleted file mode 100644 index a39e493c1e..0000000000 Binary files a/application/palemoon/themes/linux/identity-icons-generic.png and /dev/null differ diff --git a/application/palemoon/themes/linux/identity-icons-https-ev.png b/application/palemoon/themes/linux/identity-icons-https-ev.png deleted file mode 100644 index d49be13cb6..0000000000 Binary files a/application/palemoon/themes/linux/identity-icons-https-ev.png and /dev/null differ diff --git a/application/palemoon/themes/linux/identity-icons-https-mixed-active.png b/application/palemoon/themes/linux/identity-icons-https-mixed-active.png deleted file mode 100644 index 3c77bc84db..0000000000 Binary files a/application/palemoon/themes/linux/identity-icons-https-mixed-active.png and /dev/null differ diff --git a/application/palemoon/themes/linux/identity-icons-https.png b/application/palemoon/themes/linux/identity-icons-https.png deleted file mode 100644 index ffd6694269..0000000000 Binary files a/application/palemoon/themes/linux/identity-icons-https.png and /dev/null differ diff --git a/application/palemoon/themes/linux/identity.png b/application/palemoon/themes/linux/identity.png deleted file mode 100644 index f3f790e9ef..0000000000 Binary files a/application/palemoon/themes/linux/identity.png and /dev/null differ diff --git a/application/palemoon/themes/linux/imagedocument.png b/application/palemoon/themes/linux/imagedocument.png deleted file mode 100644 index ff4f21f9a6..0000000000 Binary files a/application/palemoon/themes/linux/imagedocument.png and /dev/null differ diff --git a/application/palemoon/themes/linux/jar.mn b/application/palemoon/themes/linux/jar.mn deleted file mode 100644 index a7c426bceb..0000000000 --- a/application/palemoon/themes/linux/jar.mn +++ /dev/null @@ -1,142 +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/. - -browser.jar: -% skin browser classic/1.0 %skin/classic/browser/ -% override chrome://global/skin/icons/warning-16.png moz-icon://stock/gtk-dialog-warning?size=menu - skin/classic/browser/sanitizeDialog.css -* skin/classic/browser/aboutPrivateBrowsing.css -* skin/classic/browser/aboutSessionRestore.css - skin/classic/browser/aboutSessionRestore-window-icon.png - skin/classic/browser/aboutCertError.css - skin/classic/browser/aboutCertError_sectionCollapsed.png - skin/classic/browser/aboutCertError_sectionCollapsed-rtl.png - skin/classic/browser/aboutCertError_sectionExpanded.png -#ifdef MOZ_SERVICES_SYNC - skin/classic/browser/aboutSyncTabs.css -#endif -* skin/classic/browser/autocomplete.css - skin/classic/browser/actionicon-tab.png -* skin/classic/browser/browser.css - skin/classic/browser/click-to-play-warning-stripes.png -* skin/classic/browser/engineManager.css - skin/classic/browser/Geolocation-16.png - skin/classic/browser/Geolocation-64.png - skin/classic/browser/Go-arrow.png - skin/classic/browser/identity.png - skin/classic/browser/imagedocument.png - skin/classic/browser/identity-icons-generic.png - skin/classic/browser/identity-icons-https.png - skin/classic/browser/identity-icons-https-ev.png - skin/classic/browser/identity-icons-https-mixed-active.png - skin/classic/browser/Info.png - skin/classic/browser/KUI-close.png - skin/classic/browser/mixed-content-blocked-16.png - skin/classic/browser/mixed-content-blocked-64.png - skin/classic/browser/monitor.png - skin/classic/browser/monitor_16-10.png -* skin/classic/browser/pageInfo.css - skin/classic/browser/pageInfo.png - skin/classic/browser/page-livemarks.png - skin/classic/browser/pointerLock-16.png - skin/classic/browser/pointerLock-64.png - skin/classic/browser/Privacy-16.png - skin/classic/browser/Privacy-48.png - skin/classic/browser/privatebrowsing-mask.png - skin/classic/browser/searchbar.css - skin/classic/browser/Secure.png - skin/classic/browser/Security-broken.png - skin/classic/browser/setDesktopBackground.css - skin/classic/browser/slowStartup-16.png - skin/classic/browser/Toolbar.png - skin/classic/browser/Toolbar-small.png - skin/classic/browser/urlbar-arrow.png - skin/classic/browser/web-notifications-icon.svg - skin/classic/browser/web-notifications-tray.svg -#ifdef MOZ_WEBRTC - skin/classic/browser/webRTC-shareDevice-16.png - skin/classic/browser/webRTC-shareDevice-64.png - skin/classic/browser/webRTC-sharingDevice-16.png -#endif - skin/classic/browser/downloads/buttons.png (downloads/buttons.png) - skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png) - skin/classic/browser/downloads/download-glow-small.png (downloads/download-glow-small.png) - skin/classic/browser/downloads/download-notification-finish.png (downloads/download-notification-finish.png) - skin/classic/browser/downloads/download-notification-start.png (downloads/download-notification-start.png) - skin/classic/browser/downloads/download-summary.png (downloads/download-summary.png) - skin/classic/browser/downloads/downloads.css (downloads/downloads.css) - skin/classic/browser/downloads/allDownloadsViewOverlay.css (downloads/allDownloadsViewOverlay.css) - skin/classic/browser/downloads/contentAreaDownloadsView.css (downloads/contentAreaDownloadsView.css) - skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png) - skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png) - skin/classic/browser/feeds/videoFeedIcon.png (feeds/feedIcon.png) - skin/classic/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16.png) - skin/classic/browser/feeds/audioFeedIcon.png (feeds/feedIcon.png) - skin/classic/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16.png) - skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css) - skin/classic/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css) -* skin/classic/browser/newtab/newTab.css (newtab/newTab.css) - skin/classic/browser/newtab/controls.png (../shared/newtab/controls.png) - skin/classic/browser/newtab/noise.png (../shared/newtab/noise.png) - skin/classic/browser/newtab/pinned.png (../shared/newtab/pinned.png) - skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png) - skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png) - skin/classic/browser/places/calendar.png (places/calendar.png) -* skin/classic/browser/places/editBookmarkOverlay.css (places/editBookmarkOverlay.css) - skin/classic/browser/places/livemark-item.png (places/livemark-item.png) - skin/classic/browser/places/pageStarred.png (places/pageStarred.png) - skin/classic/browser/places/star-icons.png (places/star-icons.png) - skin/classic/browser/places/starred48.png (places/starred48.png) - skin/classic/browser/places/unstarred48.png (places/unstarred48.png) - skin/classic/browser/places/places.css (places/places.css) - skin/classic/browser/places/organizer.css (places/organizer.css) - skin/classic/browser/places/organizer.xml (places/organizer.xml) - skin/classic/browser/places/query.png (places/query.png) - skin/classic/browser/places/starPage.png (places/starPage.png) - skin/classic/browser/places/tag.png (places/tag.png) - skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png) - skin/classic/browser/places/unsortedBookmarks.png (places/unsortedBookmarks.png) - skin/classic/browser/places/downloads.png (places/downloads.png) - skin/classic/browser/permissions/aboutPermissions.css (permissions/aboutPermissions.css) - skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png) - skin/classic/browser/preferences/mail.png (preferences/mail.png) - skin/classic/browser/preferences/Options.png (preferences/Options.png) -#ifdef MOZ_SERVICES_SYNC - skin/classic/browser/preferences/Options-sync.png (preferences/Options-sync.png) -#endif -* skin/classic/browser/preferences/preferences.css (preferences/preferences.css) - skin/classic/browser/preferences/applications.css (preferences/applications.css) - skin/classic/browser/statusbar/dynamic.css (../shared/statusbar/dynamic.css) -* skin/classic/browser/statusbar/overlay.css (statusbar/overlay.css) -* skin/classic/browser/statusbar/prefs.css (statusbar/prefs.css) - skin/classic/browser/statusbar/pulse.png (../shared/statusbar/pulse.png) - skin/classic/browser/statusbar/pms16.png (../shared/statusbar/pms16.png) - skin/classic/browser/statusbar/pms24.png (../shared/statusbar/pms24.png) - skin/classic/browser/statusbar/throbber-idle.png (../shared/statusbar/throbber-idle.png) - skin/classic/browser/statusbar/throbberStatic.png (../shared/statusbar/throbberStatic.png) - skin/classic/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png) - skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png) - skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png) - skin/classic/browser/tabbrowser/tab.png (tabbrowser/tab.png) - skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png) - skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) - skin/classic/browser/tabbrowser/tab-audio.svg (../shared/tabbrowser/tab-audio.svg) - skin/classic/browser/tabbrowser/tab-audio-small.svg (../shared/tabbrowser/tab-audio-small.svg) -#ifdef MOZ_SERVICES_SYNC - skin/classic/browser/sync-16-throbber.png - skin/classic/browser/sync-16.png - skin/classic/browser/sync-24-throbber.png - skin/classic/browser/sync-32.png - skin/classic/browser/sync-bg.png - skin/classic/browser/sync-128.png - skin/classic/browser/sync-desktopIcon.png - skin/classic/browser/sync-mobileIcon.png - skin/classic/browser/syncSetup.css - skin/classic/browser/syncCommon.css - skin/classic/browser/syncQuota.css - skin/classic/browser/syncProgress.css -#endif - skin/classic/browser/notification-pluginNormal.png (../shared/plugins/notification-pluginNormal.png) - skin/classic/browser/notification-pluginAlert.png (../shared/plugins/notification-pluginAlert.png) - skin/classic/browser/notification-pluginBlocked.png (../shared/plugins/notification-pluginBlocked.png) diff --git a/application/palemoon/themes/linux/mixed-content-blocked-16.png b/application/palemoon/themes/linux/mixed-content-blocked-16.png deleted file mode 100644 index 7cf33ec4c5..0000000000 Binary files a/application/palemoon/themes/linux/mixed-content-blocked-16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/mixed-content-blocked-64.png b/application/palemoon/themes/linux/mixed-content-blocked-64.png deleted file mode 100644 index cac4415140..0000000000 Binary files a/application/palemoon/themes/linux/mixed-content-blocked-64.png and /dev/null differ diff --git a/application/palemoon/themes/linux/monitor.png b/application/palemoon/themes/linux/monitor.png deleted file mode 100644 index 35e7b20562..0000000000 Binary files a/application/palemoon/themes/linux/monitor.png and /dev/null differ diff --git a/application/palemoon/themes/linux/monitor_16-10.png b/application/palemoon/themes/linux/monitor_16-10.png deleted file mode 100644 index 41950340e8..0000000000 Binary files a/application/palemoon/themes/linux/monitor_16-10.png and /dev/null differ diff --git a/application/palemoon/themes/linux/moz.build b/application/palemoon/themes/linux/moz.build deleted file mode 100644 index de50366273..0000000000 --- a/application/palemoon/themes/linux/moz.build +++ /dev/null @@ -1,8 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -DIRS += ['communicator'] - -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/application/palemoon/themes/linux/newtab/newTab.css b/application/palemoon/themes/linux/newtab/newTab.css deleted file mode 100644 index 40ca4ae4cb..0000000000 --- a/application/palemoon/themes/linux/newtab/newTab.css +++ /dev/null @@ -1,31 +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/. */ - -%include ../../shared/newtab/newTab.css.inc - -.newtab-undo-button { - -moz-appearance: none; - color: rgb(78,114,204); - cursor: pointer; - padding: 0; - margin: 0 4px; - border: 0; - background: transparent; - text-decoration: none; - min-width: 0; -} - -#newtab-undo-close-button { - background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 16, 16, 0); - background-position: center center; - background-repeat: no-repeat; -} - -#newtab-undo-close-button:hover { - background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 32, 16, 16); -} - -#newtab-undo-close-button:hover:active { - background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 48, 16, 32); -} diff --git a/application/palemoon/themes/linux/page-livemarks.png b/application/palemoon/themes/linux/page-livemarks.png deleted file mode 100644 index f8536a4e1f..0000000000 Binary files a/application/palemoon/themes/linux/page-livemarks.png and /dev/null differ diff --git a/application/palemoon/themes/linux/pageInfo.css b/application/palemoon/themes/linux/pageInfo.css deleted file mode 100644 index 805c2fa458..0000000000 --- a/application/palemoon/themes/linux/pageInfo.css +++ /dev/null @@ -1,276 +0,0 @@ -%if 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/. */ -%endif - -@import url("chrome://global/skin/"); - -/* View buttons */ -#viewGroup > radio { - list-style-image: url("chrome://browser/skin/pageInfo.png"); - -moz-box-orient: vertical; - -moz-box-align: center; - -moz-appearance: none; - min-width: 4.5em; - margin: 0; - padding: 3px; - color: -moz-FieldText; -} - -#viewGroup > radio[selected="true"] { - background-color: Highlight; - color: HighlightText; -} - -#topBar { - -moz-appearance: listbox; - margin: 8px 8px 0; -} - -#generalTab { - -moz-image-region: rect(0px, 32px, 32px, 0px) -} - -#mediaTab { - -moz-image-region: rect(0px, 64px, 32px, 32px) -} - -#feedTab { - -moz-image-region: rect(0px, 96px, 32px, 64px) -} - -#permTab { - -moz-image-region: rect(0px, 128px, 32px, 96px) -} - -#securityTab { - -moz-image-region: rect(0px, 160px, 32px, 128px) -} - -#mainDeck { - padding-left: 2px; - padding-right: 2px; -} - -deck { - padding: 10px 10px 10px 10px; -} - -/* Misc */ -tree { - margin: .5em; -} - -.gridSeparator { - width: .5em; -} - -textbox { - background: transparent !important; - border: none; - padding: 0px; - margin-top: 1px; - -moz-appearance: none; -} - -textbox.header { - margin-inline-start: 0; -} - -.iframe { - margin: .5em; - background: white; - overflow: auto; -} - -.fixedsize { - height: 8.5em; -} - -textbox[disabled] { - font-style: italic; -} - -/* General Tab */ -#generalPanel > #titletext { - margin-inline-start: 5px; -} - -groupbox.collapsable caption .caption-icon { - width: 9px; - height: 9px; - background-repeat: no-repeat; - background-position: center; - margin-inline-start: 1px; - margin-inline-end: 3px; - background-image: url("chrome://global/skin/tree/twisty-open.png"); -} - -groupbox.collapsable[closed="true"] { - border: none; -} - -groupbox.collapsable[closed="true"] caption .caption-icon { - background-image: url("chrome://global/skin/tree/twisty-clsd.png"); -} - -groupbox tree { - margin: 0; - border: none; -} - -groupbox.treebox .groupbox-body { - margin-inline-start: 5px; - margin-inline-end: 1px; - padding-top: 0; -} - -#securityBox description { - margin-inline-start: 10px; -} - -#general-security-identity { - white-space: pre-wrap; - line-height: 2em; -} - -/* Media Tab */ -#imagetree { - min-height: 10em; - margin-top: 2px; - margin-bottom: 0; -} - -#mediaSplitter { - -moz-appearance: none; - height: .8em; -} - -#mediaGrid { - min-height: 9em; -} - -#mediaLabelColumn { - min-width: 10em; -} - -#thepreviewimage { - margin: 1em; -} - -treechildren::-moz-tree-cell-text(broken) { - font-style: italic; - color: graytext; -} - -#mediaPreviewBox .inset { - -moz-appearance: listbox; - margin-bottom: 0; -} - -/* Feeds Tab */ -#feedPanel { - margin-left: 2px; - margin-right: 2px; -} - -#feedtree { - margin-bottom: 0px; -} - -#feedListbox richlistitem { - padding-top: 6px; - padding-bottom: 6px; - padding-inline-start: 7px; - padding-inline-end: 7px; - min-height: 25px; - border-bottom: 1px dotted #C0C0C0; - color: -moz-FieldText; -} - -#feedListbox richlistitem[selected="true"] { - background-color: -moz-Dialog; - color: -moz-DialogText; -} - -#feedListbox { - margin-bottom: 0; - border: 2px solid; - -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow; - -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow; - -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow; - -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; -} - -.feedTitle { - font-weight: bold; -} - -/* Permissions Tab */ -#permPanel { - margin-left: 6px; - margin-right: 6px; -} - -#permList { - -moz-appearance: listbox; - margin-top: .5em; - overflow: auto; - border: 2px solid; - -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow; - -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow; - -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow; - -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; - background-color: -moz-field; - color: -moz-FieldText; -} - -.permission { - padding-top: 6px; - padding-bottom: 6px; - padding-inline-start: 7px; - padding-inline-end: 7px; - min-height: 25px; - border-bottom: 1px dotted #C0C0C0; -} - -.permissionLabel { - font-weight: bold; -} - -.permission:hover { - background-color: -moz-dialog; - color: -moz-DialogText; -} - -/* Security Tab */ -#securityPanel .caption-icon { - display: none; -} - -#securityPanel .header { - font-size: 120%; -} - -#securityPanel .fieldLabel { - margin: 2px 10px 3px 10px; -} - -#securityPanel .fieldValue { - font-weight: bold; - margin: 2px 10px 0px 10px; -} - -/* Icons for context menus */ -menuitem:not([type]) { - -moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic"); -} - -#menu_selectall { - list-style-image: url("moz-icon://stock/gtk-select-all?size=menu"); -} - -#menu_copy { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu"); -} diff --git a/application/palemoon/themes/linux/pageInfo.png b/application/palemoon/themes/linux/pageInfo.png deleted file mode 100644 index 2cbb15df97..0000000000 Binary files a/application/palemoon/themes/linux/pageInfo.png and /dev/null differ diff --git a/application/palemoon/themes/linux/permissions/aboutPermissions.css b/application/palemoon/themes/linux/permissions/aboutPermissions.css deleted file mode 100644 index 17634e8fa7..0000000000 --- a/application/palemoon/themes/linux/permissions/aboutPermissions.css +++ /dev/null @@ -1,149 +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/. */ - -@import url("chrome://global/skin/inContentUI.css"); - -/* header */ - -#permissions-pagetitle { - font-size: 200%; - font-weight: bold; - padding-bottom: 0.5em; -} - -/* content box */ -#permissions-content { - height: 100%; -} - -/* sites box */ - -#sites-box { - padding: 10px; - width: 25em; -} - -#sites-filter { - margin: 0; -} - -#sites-list { - margin: 5px 0 0 0; -} - -.site { - padding: 4px; - border-bottom: 1px solid ThreeDLightShadow; -} - -.site-favicon { - height: 16px; - width: 16px; - margin-inline-end: 4px; - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -#all-sites-item > .site-container > .site-favicon { - list-style-image: none; -} - -/* permissions box */ - -#permissions-box { - padding-top: 10px; - overflow-y: auto; -} - -#site-description { - font-size: 125%; - margin-inline-start: 6px; /* to match button margin */ -} - -#site-label { - font-weight: bold; - margin-top: 0; - margin-bottom: 0; -} - -#defaults-description { - font-size: 125%; - font-weight: bold; - margin-inline-start: 6px; -} - -.pref-item { - margin-bottom: 10px; -} - -.pref-icon { - width: 36px; - height: 36px; - margin-inline-end: 10px; -} - -.pref-icon[type="password"] { - list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png); -} -.pref-icon[type="image"] { - list-style-image: url(chrome://global/skin/icons/question-64.png); -} -.pref-icon[type="popup"] { - list-style-image: url(chrome://global/skin/icons/question-64.png); -} -.pref-icon[type="cookie"] { - list-style-image: url(chrome://global/skin/icons/question-64.png); -} -.pref-icon[type="desktop-notification"] { - list-style-image: url(chrome://browser/skin/web-notifications-icon.svg); -} -.pref-icon[type="install"] { - list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric.png); -} -.pref-icon[type="geo"] { - list-style-image: url(chrome://browser/skin/Geolocation-64.png); -} -.pref-icon[type="plugins"] { - list-style-image: url(chrome://mozapps/skin/plugins/pluginGeneric.png); -} - -.pref-title { - font-size: 125%; - margin-bottom: 0; - font-weight: bold; - margin-right: 0; - padding-right: 0; -} - -.pref-default { - margin-left: 0.5em; - padding-left: 0; -} - -.pref-set-default { - visibility: collapse; -} - -.pref-menulist { - margin-left: 6px; - margin-right: 6px; -} - -.plugins-label { - margin-right: 0; - padding-right: 0; -} - -.plugins-vulnerable { - margin-left: 0; - padding-left: 0; - margin-right: 0; - padding-right: 0; -} - -.plugins-default { - margin-left: 0.5em; - padding-left: 0; - margin-right: 1em; - padding-right: 0; -} diff --git a/application/palemoon/themes/linux/places/bookmarksMenu.png b/application/palemoon/themes/linux/places/bookmarksMenu.png deleted file mode 100644 index 80dd2168d6..0000000000 Binary files a/application/palemoon/themes/linux/places/bookmarksMenu.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/bookmarksToolbar.png b/application/palemoon/themes/linux/places/bookmarksToolbar.png deleted file mode 100644 index 09502fe833..0000000000 Binary files a/application/palemoon/themes/linux/places/bookmarksToolbar.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/calendar.png b/application/palemoon/themes/linux/places/calendar.png deleted file mode 100644 index f7128685c0..0000000000 Binary files a/application/palemoon/themes/linux/places/calendar.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/downloads.png b/application/palemoon/themes/linux/places/downloads.png deleted file mode 100644 index d641714aab..0000000000 Binary files a/application/palemoon/themes/linux/places/downloads.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/editBookmarkOverlay.css b/application/palemoon/themes/linux/places/editBookmarkOverlay.css deleted file mode 100644 index dba6ba655d..0000000000 --- a/application/palemoon/themes/linux/places/editBookmarkOverlay.css +++ /dev/null @@ -1,71 +0,0 @@ -%if 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/. */ -%endif -/**** folder menulist ****/ -.folder-icon > .menulist-label-box > .menulist-icon { - width: 16px; - height: 16px; -} - -.folder-icon > .menu-iconic-left { - display: -moz-box; -} - -.folder-icon { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu") !important; -} - - -/**** expanders ****/ - -.expander-up, -.expander-down { - min-width: 0; - padding: 2px 0; - padding-inline-start: 2px; -} - -.expander-up > .button-box { - -moz-appearance: button-arrow-up; -} - -.expander-down > .button-box { - -moz-appearance: button-arrow-down; -} - -#editBookmarkPanelContent { - min-width: 23em; -} - -#editBMPanel_folderTree { - margin-top: 2px; - margin-bottom: 2px; -} - -/* Hide the value column of the tag autocomplete popup - * leaving only the comment column visible. This is - * so that only the tag being edited is shown in the - * popup. - */ -#editBMPanel_tagsField #treecolAutoCompleteValue { - visibility: collapse; -} - - -/* Bookmark panel dropdown menu items */ -#editBMPanel_folderMenuList[selectedIndex="0"], -#editBMPanel_toolbarFolderItem { - list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important; -} - -#editBMPanel_folderMenuList[selectedIndex="1"], -#editBMPanel_bmRootItem { - list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png") !important; -} - -#editBMPanel_folderMenuList[selectedIndex="2"], -#editBMPanel_unfiledRootItem { - list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png") !important; -} diff --git a/application/palemoon/themes/linux/places/livemark-item.png b/application/palemoon/themes/linux/places/livemark-item.png deleted file mode 100644 index 9184b95187..0000000000 Binary files a/application/palemoon/themes/linux/places/livemark-item.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/organizer.css b/application/palemoon/themes/linux/places/organizer.css deleted file mode 100644 index 16ead7212f..0000000000 --- a/application/palemoon/themes/linux/places/organizer.css +++ /dev/null @@ -1,107 +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/. */ - - -/* Toolbar */ -#placesToolbar { - border: none; -} - -/* back button */ - -#back-button { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar"); -} -#back-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar&state=disabled"); -} - -#back-button:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar"); -} -#back-button[disabled="true"]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar&state=disabled"); -} - -/* forward button */ - -#forward-button { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar"); -} -#forward-button[disabled="true"] { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar&state=disabled"); -} - -#forward-button:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar"); -} -#forward-button[disabled="true"]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar&state=disabled"); -} - -/* Menu */ -#placesMenu { - -moz-appearance: none; - border: none; -} - -#placesMenu > menu { - padding-inline-start: 4px; - -moz-binding: url("chrome://browser/skin/places/organizer.xml#toolbarbutton-dropdown"); - -moz-appearance: toolbarbutton; - color: -moz-DialogText; -} - -#placesMenu > menu:hover:not(:active):not([open="true"]) { - color: -moz-buttonhovertext; -} - -#placesMenu > menu > .menubar-right { - -moz-appearance: toolbarbutton-dropdown; - width: 12px; - height: 12px; -} - -/* Root View */ -#placesView { - background-color: Window; -} - -/* Info box */ -#detailsDeck { - padding: 5px; -} - -#infoBoxExpanderLabel { - padding-inline-start: 2px; -} - -#searchModifiers { - padding-right: 3px; -} - -#saveSearch { - list-style-image: url("moz-icon://stock/gtk-save?size=menu"); -} - -/**** menuitem stock icons ****/ -#orgClose { - list-style-image: url("moz-icon://stock/gtk-close?size=menu"); -} - -#fileImport { - list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=menu"); -} - -#fileExport { - list-style-image: url("moz-icon://stock/gtk-save-as?size=menu"); -} - -/** - * Downloads pane - */ - -#clearDownloadsButton > .toolbarbutton-icon { - display: none; -} diff --git a/application/palemoon/themes/linux/places/organizer.xml b/application/palemoon/themes/linux/places/organizer.xml deleted file mode 100644 index 8331ebb111..0000000000 --- a/application/palemoon/themes/linux/places/organizer.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/application/palemoon/themes/linux/places/pageStarred.png b/application/palemoon/themes/linux/places/pageStarred.png deleted file mode 100644 index 61a9f90e05..0000000000 Binary files a/application/palemoon/themes/linux/places/pageStarred.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/places.css b/application/palemoon/themes/linux/places/places.css deleted file mode 100644 index d2b806bc49..0000000000 --- a/application/palemoon/themes/linux/places/places.css +++ /dev/null @@ -1,221 +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/. */ - -/* Sidebars */ -.sidebar-placesTree { - margin: 0; -} - -.sidebar-placesTreechildren::-moz-tree-cell(leaf) , -.sidebar-placesTreechildren::-moz-tree-image(leaf) { - cursor: pointer; -} - -.sidebar-placesTreechildren::-moz-tree-cell-text(leaf, hover) { - cursor: pointer; - text-decoration: underline; -} - -.sidebar-placesTreechildren::-moz-tree-cell(separator) { - cursor: default; -} - -/* Trees */ -treechildren::-moz-tree-image(title) { - padding-right: 2px; - margin: 0px 2px; - width: 16px; - height: 16px; - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -treechildren::-moz-tree-image(title, livemarkItem) { - list-style-image: url("chrome://browser/skin/places/livemark-item.png"); - -moz-image-region: rect(0px, 16px, 16px, 0px); -} - -treechildren::-moz-tree-image(title, livemarkItem, visited) { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -treechildren::-moz-tree-image(title, separator) { - list-style-image: none; - width: 0; - height: 0; -} - -treechildren::-moz-tree-image(title, container) { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -treechildren::-moz-tree-image(title, container, livemark) { - list-style-image: url("chrome://browser/skin/feeds/feedIcon16.png"); - -moz-image-region: auto; -} - -treechildren::-moz-tree-image(container, OrganizerQuery_AllBookmarks) { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 48px 16px 32px); -} - -treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksToolbar) { - list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); - -moz-image-region: auto; -} - -treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksMenu) { - list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png"); - -moz-image-region: auto; -} - -treechildren::-moz-tree-image(container, OrganizerQuery_UnfiledBookmarks) { - list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png"); - -moz-image-region: auto; -} - -/* query-nodes should be styled even if they're not expandable */ -treechildren::-moz-tree-image(title, query) { - list-style-image: url("chrome://browser/skin/places/query.png"); -} - -treechildren::-moz-tree-image(query, OrganizerQuery_Downloads) { - list-style-image: url("chrome://browser/skin/places/downloads.png"); - -moz-image-region: auto; -} - -treechildren::-moz-tree-image(title, query, tagContainer), -treechildren::-moz-tree-image(query, OrganizerQuery_Tags) { - list-style-image: url("chrome://browser/skin/places/tag.png"); -} - -/* calendar icon for folders grouping items by date */ -treechildren::-moz-tree-image(title, query, dayContainer) { - list-style-image: url("chrome://browser/skin/places/calendar.png"); -} - -treechildren::-moz-tree-image(title, query, hostContainer) { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -treechildren::-moz-tree-image(title, query, hostContainer, open) { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -treechildren::-moz-tree-image(title, query, OrganizerQuery_History) { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 32px 16px 16px); -} - -/* We want some queries to look like ordinary folders. This must come - after the (title, query) selector, or it would get overridden. */ -treechildren::-moz-tree-image(title, query, folder) { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -treechildren::-moz-tree-image(cutting) { - opacity: 0.5; -} - -treechildren::-moz-tree-cell-text(cutting) { - opacity: 0.7; -} - -/**** menuitem stock icons ****/ -menuitem:not([type]) { - -moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic"); -} - -menuitem[command="cmd_cut"], -menuitem[cmd="cmd_cut"] { - list-style-image: url("moz-icon://stock/gtk-cut?size=menu"); -} - -menuitem[command="cmd_cut"][disabled], -menuitem[cmd="cmd_cut"][disabled] { - list-style-image: url("moz-icon://stock/gtk-cut?size=menu&state=disabled"); -} - -menuitem[command="cmd_copy"], -menuitem[cmd="cmd_copy"] { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu"); -} - -menuitem[command="cmd_copy"][disabled], -menuitem[cmd="cmd_copy"][disabled] { - list-style-image: url("moz-icon://stock/gtk-copy?size=menu&state=disabled"); -} - -menuitem[command="cmd_paste"], -menuitem[cmd="cmd_paste"] { - list-style-image: url("moz-icon://stock/gtk-paste?size=menu"); -} - -menuitem[command="cmd_paste"][disabled], -menuitem[cmd="cmd_paste"][disabled] { - list-style-image: url("moz-icon://stock/gtk-paste?size=menu&state=disabled"); -} - -menuitem[command="cmd_delete"], -menuitem[cmd="cmd_delete"] { - list-style-image: url("moz-icon://stock/gtk-delete?size=menu"); -} - -menuitem[command="cmd_delete"][disabled], -menuitem[cmd="cmd_delete"][disabled] { - list-style-image: url("moz-icon://stock/gtk-delete?size=menu&state=disabled"); -} - -menuitem[command="cmd_undo"], -menuitem[cmd="cmd_undo"] { - list-style-image: url("moz-icon://stock/gtk-undo?size=menu"); -} - -menuitem[command="cmd_undo"][disabled], -menuitem[cmd="cmd_undo"][disabled] { - list-style-image: url("moz-icon://stock/gtk-undo?size=menu&state=disabled"); -} - -menuitem[command="cmd_redo"] { - list-style-image: url("moz-icon://stock/gtk-redo?size=menu"); -} - -menuitem[command="cmd_redo"][disabled] { - list-style-image: url("moz-icon://stock/gtk-redo?size=menu&state=disabled"); -} - -menuitem[command="cmd_selectAll"], -menuitem[cmd="cmd_selectAll"] { - list-style-image: url("moz-icon://stock/gtk-select-all?size=menu"); -} - -menuitem[command="cmd_selectAll"][disabled], -menuitem[cmd="cmd_selectAll"][disabled] { - list-style-image: url("moz-icon://stock/gtk-select-all?size=menu&state=disabled"); -} - -#placesContext_open\:newwindow, -menuitem[command="placesCmd_open:window"] { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 80px 16px 64px); -} - -#placesContext_open\:newprivatewindow, -menuitem[command="placesCmd_open:privatewindow"] { - list-style-image: url("chrome://browser/skin/Privacy-16.png"); -} - -#placesContext_open\:newtab, -menuitem[command="placesCmd_open:tab"] { - list-style-image: url("chrome://browser/skin/Toolbar-small.png"); - -moz-image-region: rect(0px 64px 16px 48px); -} - -#placesContext_show\:info, -menuitem[command="placesCmd_show:info"] { - list-style-image: url("moz-icon://stock/gtk-properties?size=menu"); -} - -#placesContext_reload { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); -} diff --git a/application/palemoon/themes/linux/places/query.png b/application/palemoon/themes/linux/places/query.png deleted file mode 100644 index 2420dee0e8..0000000000 Binary files a/application/palemoon/themes/linux/places/query.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/star-icons.png b/application/palemoon/themes/linux/places/star-icons.png deleted file mode 100644 index 2f50c6ab97..0000000000 Binary files a/application/palemoon/themes/linux/places/star-icons.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/starPage.png b/application/palemoon/themes/linux/places/starPage.png deleted file mode 100644 index 3193a3535f..0000000000 Binary files a/application/palemoon/themes/linux/places/starPage.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/starred48.png b/application/palemoon/themes/linux/places/starred48.png deleted file mode 100644 index deefaec978..0000000000 Binary files a/application/palemoon/themes/linux/places/starred48.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/tag.png b/application/palemoon/themes/linux/places/tag.png deleted file mode 100644 index 27176cc6d5..0000000000 Binary files a/application/palemoon/themes/linux/places/tag.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/toolbarDropMarker.png b/application/palemoon/themes/linux/places/toolbarDropMarker.png deleted file mode 100644 index ed3200f6c1..0000000000 Binary files a/application/palemoon/themes/linux/places/toolbarDropMarker.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/unsortedBookmarks.png b/application/palemoon/themes/linux/places/unsortedBookmarks.png deleted file mode 100644 index 4dcf761389..0000000000 Binary files a/application/palemoon/themes/linux/places/unsortedBookmarks.png and /dev/null differ diff --git a/application/palemoon/themes/linux/places/unstarred48.png b/application/palemoon/themes/linux/places/unstarred48.png deleted file mode 100644 index 15448636e8..0000000000 Binary files a/application/palemoon/themes/linux/places/unstarred48.png and /dev/null differ diff --git a/application/palemoon/themes/linux/pointerLock-16.png b/application/palemoon/themes/linux/pointerLock-16.png deleted file mode 100644 index 862cd11c6a..0000000000 Binary files a/application/palemoon/themes/linux/pointerLock-16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/pointerLock-64.png b/application/palemoon/themes/linux/pointerLock-64.png deleted file mode 100644 index a35ce040c8..0000000000 Binary files a/application/palemoon/themes/linux/pointerLock-64.png and /dev/null differ diff --git a/application/palemoon/themes/linux/preferences/Options-sync.png b/application/palemoon/themes/linux/preferences/Options-sync.png deleted file mode 100644 index 89901fb698..0000000000 Binary files a/application/palemoon/themes/linux/preferences/Options-sync.png and /dev/null differ diff --git a/application/palemoon/themes/linux/preferences/Options.png b/application/palemoon/themes/linux/preferences/Options.png deleted file mode 100644 index 82bebd2a4f..0000000000 Binary files a/application/palemoon/themes/linux/preferences/Options.png and /dev/null differ diff --git a/application/palemoon/themes/linux/preferences/alwaysAsk.png b/application/palemoon/themes/linux/preferences/alwaysAsk.png deleted file mode 100644 index 45256d4e76..0000000000 Binary files a/application/palemoon/themes/linux/preferences/alwaysAsk.png and /dev/null differ diff --git a/application/palemoon/themes/linux/preferences/applications.css b/application/palemoon/themes/linux/preferences/applications.css deleted file mode 100644 index 8b63dfdab6..0000000000 --- a/application/palemoon/themes/linux/preferences/applications.css +++ /dev/null @@ -1,66 +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/. */ - -/** - * Line up the actions menu with action labels above and below it. - * Equalize the distance from the left side of the action box to the left side - * of the icon for both the menu and the non-menu versions of the action box. - * Also make sure the labels are the same distance away from the icons. - */ -.actionsMenu { - margin-top: -1px; - margin-bottom: -1px; - margin-inline-start: -1px; - margin-inline-end: 0; -} - -.typeIcon, -.actionIcon { - margin-inline-start: 3px; - margin-inline-end: 3px; -} - -richlistitem label { - margin-inline-start: 1px; - margin-top: 2px; -} - -richlistitem { - min-height: 25px; -} - -richlistitem[appHandlerIcon="ask"], -menuitem[appHandlerIcon="ask"] { - list-style-image: url("chrome://browser/skin/preferences/alwaysAsk.png"); -} - -richlistitem[appHandlerIcon="save"], -menuitem[appHandlerIcon="save"] { - list-style-image: url("moz-icon://stock/gtk-save?size=menu"); -} - -richlistitem[appHandlerIcon="feed"], -menuitem[appHandlerIcon="feed"] { - list-style-image: url("chrome://browser/skin/page-livemarks.png"); -} - -richlistitem[appHandlerIcon="plugin"], -menuitem[appHandlerIcon="plugin"] { - list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric-16.png"); -} - -.actionsMenu .menulist-icon { - margin-inline-end: 1px; - height: 16px; - width: 16px; -} - -.actionsMenu > menupopup > menuitem > .menu-iconic-left { - padding-inline-start: 0; - padding-inline-end: 4px !important; -} - -.actionsMenu > menupopup > menuitem { - padding-inline-start: 3px; -} diff --git a/application/palemoon/themes/linux/preferences/mail.png b/application/palemoon/themes/linux/preferences/mail.png deleted file mode 100644 index 66d2bc9e0f..0000000000 Binary files a/application/palemoon/themes/linux/preferences/mail.png and /dev/null differ diff --git a/application/palemoon/themes/linux/preferences/preferences.css b/application/palemoon/themes/linux/preferences/preferences.css deleted file mode 100644 index 52f8658728..0000000000 --- a/application/palemoon/themes/linux/preferences/preferences.css +++ /dev/null @@ -1,156 +0,0 @@ -%if 0 -/* -# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -# 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/. -*/ -%endif - -/* Global Styles */ -#BrowserPreferences radio[pane] { - list-style-image: url("chrome://browser/skin/preferences/Options.png"); -} - -radio[pane=paneMain] { - -moz-image-region: rect(0px, 32px, 32px, 0px) -} - -radio[pane=paneTabs] { - -moz-image-region: rect(0px, 64px, 32px, 32px) -} - -radio[pane=paneContent] { - -moz-image-region: rect(0px, 96px, 32px, 64px) -} - -radio[pane=paneApplications] { - -moz-image-region: rect(0px, 128px, 32px, 96px) -} - -radio[pane=panePrivacy] { - -moz-image-region: rect(0px, 160px, 32px, 128px) -} - -radio[pane=paneSecurity] { - -moz-image-region: rect(0px, 192px, 32px, 160px) -} - -radio[pane=paneAdvanced] { - -moz-image-region: rect(0px, 224px, 32px, 192px) -} - -%ifdef MOZ_SERVICES_SYNC -radio[pane=paneSync] { - list-style-image: url("chrome://browser/skin/preferences/Options-sync.png") !important; -} -%endif - -/* Applications Pane */ -#BrowserPreferences[animated="true"] #handlersView { - height: 25em; -} - -#BrowserPreferences[animated="false"] #handlersView { - -moz-box-flex: 1; -} - -/* Privacy Pane */ - -/* styles for the link elements copied from .text-link in global.css */ -.inline-link { - color: -moz-nativehyperlinktext; - text-decoration: none; -} - -.inline-link:hover { - text-decoration: underline; -} - -/* Modeless Window Dialogs */ -.windowDialog, -.windowDialog prefpane { - padding: 0px; -} - -#browserHomePage:-moz-locale-dir(rtl) input { - unicode-bidi: plaintext; - direction: rtl; -} - -.contentPane { - margin: 9px 8px 5px 8px; -} - -.actionButtons { - margin: 0px 3px 6px 3px !important; -} - -/* Cookies Manager */ -#cookiesChildren::-moz-tree-image(domainCol) { - width: 16px; - height: 16px; - margin: 0px 2px; - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -#paneApplications { - margin-left: 4px; - margin-right: 4px; - padding-left: 0; - padding-right: 0; -} - -#linksOpenInBox { - margin-top: 5px; -} - -#paneAdvanced { - padding-bottom: 10px; -} -#advancedPrefs { - margin-left: 0; - margin-right: 0; -} - -#cookiesChildren::-moz-tree-image(domainCol, container) { - list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); -} - -#cookieInfoBox { - border: 1px solid ThreeDShadow; - border-radius: 0px; - margin: 4px; - padding: 0px; -} - -/* bottom-most box containing a groupbox in a prefpane. Prevents the bottom - of the groupbox from being cutoff */ -.bottomBox { - padding-bottom: 4px; -} - -/** - * Clear Private Data - */ -#SanitizeDialogPane > groupbox { - margin-top: 0; -} - -%ifdef MOZ_SERVICES_SYNC -/* Sync Pane */ - -#syncDesc { - padding: 0 8em; -} - -#accountCaptionImage { - list-style-image: url("chrome://mozapps/skin/profile/profileicon.png"); -} - -#syncAddDeviceLabel { - margin-top: 1em; - margin-bottom: 1em; -} - -%endif diff --git a/application/palemoon/themes/linux/privatebrowsing-mask.png b/application/palemoon/themes/linux/privatebrowsing-mask.png deleted file mode 100644 index 9eaf3aec7e..0000000000 Binary files a/application/palemoon/themes/linux/privatebrowsing-mask.png and /dev/null differ diff --git a/application/palemoon/themes/linux/sanitizeDialog.css b/application/palemoon/themes/linux/sanitizeDialog.css deleted file mode 100644 index 28d4e7eb30..0000000000 --- a/application/palemoon/themes/linux/sanitizeDialog.css +++ /dev/null @@ -1,107 +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/. */ - -#sanitizeDurationChoice { - margin-inline-end: 0; -} - -/* Align the duration label with the warning box and item list */ -#sanitizeDurationLabel { - margin-inline-start: 3px; -} - - -/* Hide the duration dropdown suffix label if it's empty. Otherwise it - takes up a little space, causing the end of the dropdown to not be aligned - with the warning box. */ -#sanitizeDurationSuffixLabel[value=""] { - display: none; -} - - -/* Places tree */ -#placesTreechildren::-moz-tree-row(selected), -#placesTreechildren::-moz-tree-row(grippyRow) { - background: #999; -} - -#placesTreechildren::-moz-tree-cell-text(selected) { - color: #111; -} - - -/* Sanitize everything warning box */ -#sanitizeEverythingWarningBox { - background-color: Window; - border: 1px solid ThreeDDarkShadow; - border-radius: 5px; - padding: 16px; -} - -#sanitizeEverythingWarningIcon { - list-style-image: url("moz-icon://stock/gtk-dialog-warning?size=dialog"); - padding: 0; - margin: 0; -} - -#sanitizeEverythingWarningDescBox { - padding: 0 16px; - margin: 0; -} - - -/* Progressive disclosure button */ -#detailsExpanderWrapper { - padding: 0; - margin-top: 6px; - margin-bottom: 6px; - margin-inline-start: -6px; - margin-inline-end: 0; -} - -.expander-up, -.expander-down { - min-width: 0; - padding: 2px 0; - padding-inline-start: 2px; -} - -.expander-up { - list-style-image: url("chrome://global/skin/arrow/arrow-up.gif"); -} - -.expander-down { - list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif"); -} - -.expander-down:hover:active { - list-style-image: url("chrome://global/skin/arrow/arrow-dn-hov.gif"); -} - -.expander-up:hover:active { - list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif"); -} - - -/* Make the item list the same width as the warning box */ -#itemList { - margin-inline-start: 0; - margin-inline-end: 0; -} - -/* Without this a useless scrollbar appears in the listbox when its rows - attribute is set to the total number of listitems, as it is currently. See - bug 489958 comment 14 and bug 491788. */ -#itemList > listitem { - padding: 1px 0; -} - - -/* Align the last dialog button with the end of the warning box */ -.prefWindow-dlgbuttons { - margin-inline-end: 0; -} -.dialog-button[dlgtype="accept"] { - margin-inline-end: 0; -} diff --git a/application/palemoon/themes/linux/searchbar.css b/application/palemoon/themes/linux/searchbar.css deleted file mode 100644 index 0352e27a7c..0000000000 --- a/application/palemoon/themes/linux/searchbar.css +++ /dev/null @@ -1,72 +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/. */ - -.searchbar-textbox { - min-height: 22px; - width: 6em; - min-width: 6em; - background-color: -moz-field; -} - -.autocomplete-textbox-container { - -moz-box-align: stretch; -} - -.textbox-input-box { - margin: 0; -} - -.searchbar-engine-menuitem[selected="true"] > .menu-iconic-text { - font-weight: bold; -} - -/* Engine button */ -.searchbar-engine-image { - height: 16px; - width: 16px; - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); - margin-inline-start: 2px; -} - -.searchbar-engine-button { - -moz-appearance: none; - min-width: 0; - margin: 0; - border: 0; - -moz-box-align: center; - background-color: transparent; -} - -.searchbar-engine-button > .button-box { - -moz-appearance: none; - padding: 2px 0; - padding-inline-end: 2px; - border: 0; -} - -.searchbar-dropmarker-image { - -moz-appearance: toolbarbutton-dropdown !important; - width: 12px; - height: 12px; -} - -/* Search go button */ -.search-go-container { - -moz-box-align: center; -} - -.search-go-button { - padding: 1px; - list-style-image: url(moz-icon://stock/gtk-find?size=menu); - cursor: pointer; -} - -menuitem[cmd="cmd_clearhistory"] { - list-style-image: url("moz-icon://stock/gtk-clear?size=menu"); -} - -menuitem[cmd="cmd_clearhistory"][disabled] { - list-style-image: url("moz-icon://stock/gtk-clear?size=menu&state=disabled"); -} - diff --git a/application/palemoon/themes/linux/slowStartup-16.png b/application/palemoon/themes/linux/slowStartup-16.png deleted file mode 100644 index 834dc0f1c9..0000000000 Binary files a/application/palemoon/themes/linux/slowStartup-16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/statusbar/overlay.css b/application/palemoon/themes/linux/statusbar/overlay.css deleted file mode 100644 index d326bac3f8..0000000000 --- a/application/palemoon/themes/linux/statusbar/overlay.css +++ /dev/null @@ -1,114 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -%include ../../shared/statusbar/overlay.css - -/* - * General - */ - -#status4evar-status-text, -#status4evar-progress-bar -{ - margin: 0px 4px; -} - -/* - * Download status - */ - -#status4evar-download-progress-bar -{ - height: 6px; -} - -toolbar[iconsize="small"] #status4evar-download-progress-bar -{ - height: 4px; -} - -#status4evar-download-button[attention] #status4evar-download-icon -{ - background-image: url("chrome://browser/skin/downloads/download-glow.png"); -} - -#status4evar-download-button #status4evar-download-icon -{ - background: -moz-image-rect(url("chrome://browser/skin/Toolbar.png"), 0, 24, 24, 0) center no-repeat; - min-width: 24px; - min-height: 24px; -} - -toolbar[iconsize="small"] #status4evar-download-button #status4evar-download-icon -{ - background: -moz-image-rect(url("chrome://browser/skin/Toolbar-small.png"), 0, 16, 16, 0) center no-repeat; - min-width: 16px; - min-height: 16px; -} - -toolbar[iconsize="small"] > #status4evar-download-button[attention] #status4evar-download-icon { - background-image: url("chrome://browser/skin/downloads/download-glow-small.png"); -} - -toolbar[mode="icons"] #status4evar-download-button[forcelabel="true"] > label -{ - margin: 0px 2px !important; - margin-top: -1px !important; - margin-inline-start: 4px !important; -} - -/* - * Splitter - */ - -splitter.status4evar-status-splitter -{ - width: 8px; - margin: 0px -4px; -} - -/* - * Location bar - */ - -#urlbar-progress-alt -{ - margin: -1px; -} - -#notification-popup-box -{ - margin-inline-start: -1px; -} - -#urlbar .urlbar-over-link-box -{ - margin-top: -1px; - margin-bottom: -1px; -} - -/* - * Add-on bar - */ - -#browser-bottombox[s4eboarder="true"] :-moz-any(#status4evar-status-bar, #addon-bar) -{ - -moz-appearance: none; -} - -#browser-bottombox[s4eboarder="true"] > *:not([hidden="true"]):not([collapsed="true"]) -{ - box-shadow: none !important; - border: none !important; - border-top: 2px solid !important; - -moz-border-top-colors: ThreeDShadow ThreeDHighlight !important; -} - -#browser-bottombox[s4eboarder="true"] > *:not([hidden="true"]):not([collapsed="true"]) ~ * -{ - border: none !important; -} - diff --git a/application/palemoon/themes/linux/statusbar/prefs.css b/application/palemoon/themes/linux/statusbar/prefs.css deleted file mode 100644 index db6f24e617..0000000000 --- a/application/palemoon/themes/linux/statusbar/prefs.css +++ /dev/null @@ -1,8 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -%include ../../shared/statusbar/prefs.css - diff --git a/application/palemoon/themes/linux/sync-128.png b/application/palemoon/themes/linux/sync-128.png deleted file mode 100644 index 1ea34818ce..0000000000 Binary files a/application/palemoon/themes/linux/sync-128.png and /dev/null differ diff --git a/application/palemoon/themes/linux/sync-16-throbber.png b/application/palemoon/themes/linux/sync-16-throbber.png deleted file mode 100644 index d6f801aab3..0000000000 Binary files a/application/palemoon/themes/linux/sync-16-throbber.png and /dev/null differ diff --git a/application/palemoon/themes/linux/sync-16.png b/application/palemoon/themes/linux/sync-16.png deleted file mode 100644 index 0afb1c7192..0000000000 Binary files a/application/palemoon/themes/linux/sync-16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/sync-24-throbber.png b/application/palemoon/themes/linux/sync-24-throbber.png deleted file mode 100644 index 5587174de0..0000000000 Binary files a/application/palemoon/themes/linux/sync-24-throbber.png and /dev/null differ diff --git a/application/palemoon/themes/linux/sync-32.png b/application/palemoon/themes/linux/sync-32.png deleted file mode 100644 index 7a762cb986..0000000000 Binary files a/application/palemoon/themes/linux/sync-32.png and /dev/null differ diff --git a/application/palemoon/themes/linux/sync-desktopIcon.png b/application/palemoon/themes/linux/sync-desktopIcon.png deleted file mode 100644 index d3d1e27c32..0000000000 Binary files a/application/palemoon/themes/linux/sync-desktopIcon.png and /dev/null differ diff --git a/application/palemoon/themes/linux/sync-mobileIcon.png b/application/palemoon/themes/linux/sync-mobileIcon.png deleted file mode 100644 index a3bda57515..0000000000 Binary files a/application/palemoon/themes/linux/sync-mobileIcon.png and /dev/null differ diff --git a/application/palemoon/themes/linux/syncCommon.css b/application/palemoon/themes/linux/syncCommon.css deleted file mode 100644 index 9ad7214aae..0000000000 --- a/application/palemoon/themes/linux/syncCommon.css +++ /dev/null @@ -1,49 +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/. */ - -/* The following are used by both sync/setup.xul and sync/genericChange.xul */ -.status { - color: -moz-dialogtext; -} - -.statusIcon { - margin-inline-start: 4px; - max-height: 16px; - max-width: 16px; -} - -.statusIcon[status="active"] { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); -} - -.statusIcon[status="error"] { - list-style-image: url("moz-icon://stock/gtk-dialog-error?size=menu"); -} - -.statusIcon[status="success"] { - list-style-image: url("moz-icon://stock/gtk-dialog-info?size=menu"); -} - -/* .data is only used by sync/genericChange.xul, but it seems unnecessary to have - a separate stylesheet for it. */ -.data { - font-size: 90%; - font-weight: bold; -} - -dialog#change-dialog { - width: 40em; -} - -image#syncIcon { - list-style-image: url("chrome://browser/skin/sync-32.png"); -} - -#introText { - margin-top: 2px; -} - -#feedback { - height: 2em; -} diff --git a/application/palemoon/themes/linux/syncSetup.css b/application/palemoon/themes/linux/syncSetup.css deleted file mode 100644 index f84fd08ad0..0000000000 --- a/application/palemoon/themes/linux/syncSetup.css +++ /dev/null @@ -1,127 +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/. */ - -wizard { - -moz-appearance: none; - width: 55em; - height: 45em; - padding: 0; - background-color: Window; -} - -.wizard-page-box { - -moz-appearance: none; - padding-left: 0; - padding-right: 0; - margin: 0; -} - -wizardpage { - -moz-box-pack: center; - -moz-box-align: center; - margin: 0; - padding: 0 6em; - background-color: Window; -} - -.wizard-header { - -moz-appearance: none; - border: none; - padding: 2em 0 1em 0; - text-align: center; -} -.wizard-header-label { - font-size: 24pt; - font-weight: normal; -} - -.wizard-buttons { - background-color: rgba(0,0,0,0.1); - padding: 1em; -} - -.wizard-buttons-separator { - visibility: collapse; -} - -.wizard-header-icon { - visibility: collapse; -} - -.accountChoiceButton { - font: menu; -} - -.confirm { - border: 1px solid black; - padding: 1em; - border-radius: 5px; -} - -/* Override the text-link style from global.css */ -description > .text-link, -description > .text-link:focus { - margin: 0px; - padding: 0px; - border: 0px; -} - - -.success, -.error { - padding: 2px; - border-radius: 2px; -} - -.error { - background-color: #FF0000 !important; - color: #FFFFFF !important; -} - -.success { - background-color: #00FF00 !important; -} - -.warning { - font-weight: bold; - font-size: 100%; - color: red; -} - -.mainDesc { - font-weight: bold; - font-size: 100%; -} - -.normal { - font-size: 100%; -} - -.inputColumn { - margin-inline-end: 2px -} - -.pin { - font-size: 18pt; - width: 4em; - text-align: center; -} - -#passphraseHelpSpacer { - width: 0.5em; -} - -#pairDeviceThrobber > image, -#login-throbber > image { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); -} - -#captchaFeedback { - visibility: hidden; -} - -#successPageIcon { - /* TODO replace this with a 128px version (bug 591122) */ - list-style-image: url("chrome://browser/skin/sync-32.png"); -} diff --git a/application/palemoon/themes/linux/tabbrowser/alltabs.png b/application/palemoon/themes/linux/tabbrowser/alltabs.png deleted file mode 100644 index 2f19025196..0000000000 Binary files a/application/palemoon/themes/linux/tabbrowser/alltabs.png and /dev/null differ diff --git a/application/palemoon/themes/linux/tabbrowser/connecting.png b/application/palemoon/themes/linux/tabbrowser/connecting.png deleted file mode 100644 index e564fb5708..0000000000 Binary files a/application/palemoon/themes/linux/tabbrowser/connecting.png and /dev/null differ diff --git a/application/palemoon/themes/linux/tabbrowser/loading.png b/application/palemoon/themes/linux/tabbrowser/loading.png deleted file mode 100644 index 55f25e591f..0000000000 Binary files a/application/palemoon/themes/linux/tabbrowser/loading.png and /dev/null differ diff --git a/application/palemoon/themes/linux/tabbrowser/tab-overflow-border.png b/application/palemoon/themes/linux/tabbrowser/tab-overflow-border.png deleted file mode 100644 index 77f2462e5b..0000000000 Binary files a/application/palemoon/themes/linux/tabbrowser/tab-overflow-border.png and /dev/null differ diff --git a/application/palemoon/themes/linux/tabbrowser/tab.png b/application/palemoon/themes/linux/tabbrowser/tab.png deleted file mode 100644 index deeeb0add3..0000000000 Binary files a/application/palemoon/themes/linux/tabbrowser/tab.png and /dev/null differ diff --git a/application/palemoon/themes/linux/tabbrowser/tabDragIndicator.png b/application/palemoon/themes/linux/tabbrowser/tabDragIndicator.png deleted file mode 100644 index df7d914f8e..0000000000 Binary files a/application/palemoon/themes/linux/tabbrowser/tabDragIndicator.png and /dev/null differ diff --git a/application/palemoon/themes/linux/urlbar-arrow.png b/application/palemoon/themes/linux/urlbar-arrow.png deleted file mode 100644 index fcab253bb3..0000000000 Binary files a/application/palemoon/themes/linux/urlbar-arrow.png and /dev/null differ diff --git a/application/palemoon/themes/linux/web-notifications-icon.svg b/application/palemoon/themes/linux/web-notifications-icon.svg deleted file mode 100644 index f7186c7275..0000000000 --- a/application/palemoon/themes/linux/web-notifications-icon.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/application/palemoon/themes/linux/web-notifications-tray.svg b/application/palemoon/themes/linux/web-notifications-tray.svg deleted file mode 100644 index 314026a106..0000000000 --- a/application/palemoon/themes/linux/web-notifications-tray.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - diff --git a/application/palemoon/themes/linux/webRTC-shareDevice-16.png b/application/palemoon/themes/linux/webRTC-shareDevice-16.png deleted file mode 100644 index 8bc5b3acae..0000000000 Binary files a/application/palemoon/themes/linux/webRTC-shareDevice-16.png and /dev/null differ diff --git a/application/palemoon/themes/linux/webRTC-shareDevice-64.png b/application/palemoon/themes/linux/webRTC-shareDevice-64.png deleted file mode 100644 index d125789fbc..0000000000 Binary files a/application/palemoon/themes/linux/webRTC-shareDevice-64.png and /dev/null differ diff --git a/application/palemoon/themes/linux/webRTC-sharingDevice-16.png b/application/palemoon/themes/linux/webRTC-sharingDevice-16.png deleted file mode 100644 index a670676a01..0000000000 Binary files a/application/palemoon/themes/linux/webRTC-sharingDevice-16.png and /dev/null differ diff --git a/application/palemoon/themes/moz.build b/application/palemoon/themes/moz.build deleted file mode 100644 index 0fe67acd00..0000000000 --- a/application/palemoon/themes/moz.build +++ /dev/null @@ -1,11 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] - -if toolkit in ('gtk2', 'gtk3', 'qt'): - DIRS += ['linux'] -else: - DIRS += ['windows'] diff --git a/application/palemoon/themes/shared/browser.inc b/application/palemoon/themes/shared/browser.inc deleted file mode 100644 index 18e69ad43b..0000000000 --- a/application/palemoon/themes/shared/browser.inc +++ /dev/null @@ -1,8 +0,0 @@ -%filter substitution - -%ifndef MOZ_WEBRTC -%define primaryToolbarButtons #back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button, #downloads-button, #downloads-indicator, #history-button, #history-menu-button, #bookmarks-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #cut-button, #copy-button, #paste-button, #fullscreen-button, #zoom-out-button, #zoom-in-button, #sync-button, #feed-button, #alltabs-button -%else -%define primaryToolbarButtons #back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button, #downloads-button, #downloads-indicator, #history-button, #history-menu-button, #bookmarks-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #cut-button, #copy-button, #paste-button, #fullscreen-button, #zoom-out-button, #zoom-in-button, #sync-button, #feed-button, #alltabs-button, #webrtc-status-button -%endif - diff --git a/application/palemoon/themes/shared/newtab/controls.png b/application/palemoon/themes/shared/newtab/controls.png deleted file mode 100644 index 14f382fbdd..0000000000 Binary files a/application/palemoon/themes/shared/newtab/controls.png and /dev/null differ diff --git a/application/palemoon/themes/shared/newtab/newTab.css.inc b/application/palemoon/themes/shared/newtab/newTab.css.inc deleted file mode 100644 index 13514dfe18..0000000000 --- a/application/palemoon/themes/shared/newtab/newTab.css.inc +++ /dev/null @@ -1,204 +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/. */ - -:root { - -moz-appearance: none; - font-size: 75%; - background-color: transparent; -} - -body { - background: #eee; -} - -/* SCROLLBOX */ -#newtab-scrollbox:not([page-disabled]) { - background-color: #eee; - background-attachment: fixed; -} - -/* UNDO */ -#newtab-undo-container { - padding: 4px 3px; - border: 1px solid; - border-color: rgba(8,22,37,.12) rgba(8,22,37,.14) rgba(8,22,37,.16); - background-color: rgba(255,255,255,.4); - color: #525e69; -} - -#newtab-undo-label { - margin-top: 0; - margin-bottom: 0; -} - - -.newtab-undo-button:hover { - text-decoration: underline; -} - -.newtab-undo-button:-moz-focusring { - outline: 1px dotted; -} - -#newtab-undo-close-button { - -moz-appearance: none; - padding: 0; - border: none; - width: 16px; - height: 16px; - float: right; - right: 0; -} - -/* TOGGLE */ -#newtab-toggle { - width: 16px; - height: 16px; - padding: 0; - border: none; - background: -216px 0 transparent url(chrome://browser/skin/newtab/controls.png); -} - -#newtab-toggle[page-disabled] { - background-position: -232px 0; -} - -/* ROWS */ -.newtab-row { - margin-bottom: 20px; -} - -.newtab-row:last-child { - margin-bottom: 0; -} - -/* CELLS */ -.newtab-cell { - -moz-margin-end: 20px; - background-color: rgba(255,255,255,.3); - border: 1px solid; - border-color: rgba(8,22,37,.12) rgba(8,22,37,.14) rgba(8,22,37,.16); - border-radius: 3.5px; - transition: border-color 100ms ease-out; -} - -.newtab-cell:empty { - border: 1px dashed; - border-color: rgba(8,22,37,.15) rgba(8,22,37,.17) rgba(8,22,37,.19); -} - -.newtab-cell:last-child { - -moz-margin-end: 0; -} - -.newtab-cell:hover:not(:empty):not([dragged]) { - border-color: rgba(8,16,37,.25) rgba(8,16,37,.27) rgba(8,16,37,.3); -} - -/* SITES */ -.newtab-site { - text-decoration: none; - transition-property: top, left, opacity, box-shadow, background-color; - border-radius: 2.5px; - overflow: hidden; -} - -.newtab-site:hover, -.newtab-site[dragged] { - box-shadow: 0 3px 6px 0px rgba(75,80,89,.6); -} - -.newtab-site[dragged] { - transition-property: box-shadow, background-color; - background-color: rgb(242,242,242); -} - -/* THUMBNAILS */ -.newtab-thumbnail { - background-origin: padding-box; - background-clip: padding-box; - background-repeat: no-repeat; - background-size: cover; -} - -/* TITLES */ -.newtab-title { - padding: 0 8px 1px; - background: linear-gradient(to bottom, rgba(245, 245, 245, .95), rgba(225, 225, 225, .95)); - color: #303030; - line-height: 24px; -} - -.newtab-site[pinned] .newtab-title { - padding-inline-start: 16px; -} - -.newtab-site[pinned] .newtab-title::before { - background-image: url(chrome://browser/skin/newtab/pinned.png); - content: ""; - left: 2px; - top: 2px; - position: absolute; - width: 12px; - height: 20px; -} - -.newtab-site[pinned] .newtab-title:dir(rtl)::before { - left: auto; - right: 2px; -} - -/* CONTROLS */ -.newtab-control { - background-color: transparent; - background-size: 24px; - border: none; - height: 24px; - width: 24px; - top: 4px; - background: transparent url(chrome://browser/skin/newtab/controls.png); -} - -.newtab-control-pin:dir(ltr), -.newtab-control-block:dir(rtl) { - left: 4px; -} - -.newtab-control-block:dir(ltr), -.newtab-control-pin:dir(rtl) { - right: 4px; -} - -.newtab-control-pin:hover { - background-position: -24px 0; -} - -.newtab-control-pin:active { - background-position: -48px 0; -} - -.newtab-site[pinned] .newtab-control-pin { - background-position: -72px 0; -} - -.newtab-site[pinned] .newtab-control-pin:hover { - background-position: -96px 0; -} - -.newtab-site[pinned] .newtab-control-pin:active { - background-position: -120px 0; -} - -.newtab-control-block { - background-position: -144px 0; -} - -.newtab-control-block:hover { - background-position: -168px 0; -} - -.newtab-control-block:active { - background-position: -192px 0; -} - diff --git a/application/palemoon/themes/shared/newtab/noise.png b/application/palemoon/themes/shared/newtab/noise.png deleted file mode 100644 index 01d340aaa9..0000000000 Binary files a/application/palemoon/themes/shared/newtab/noise.png and /dev/null differ diff --git a/application/palemoon/themes/shared/newtab/pinned.png b/application/palemoon/themes/shared/newtab/pinned.png deleted file mode 100644 index ddd731bc60..0000000000 Binary files a/application/palemoon/themes/shared/newtab/pinned.png and /dev/null differ diff --git a/application/palemoon/themes/shared/plugin-doorhanger.inc.css b/application/palemoon/themes/shared/plugin-doorhanger.inc.css deleted file mode 100644 index 798be2c1de..0000000000 --- a/application/palemoon/themes/shared/plugin-doorhanger.inc.css +++ /dev/null @@ -1,53 +0,0 @@ -#notification-popup[popupid="click-to-play-plugins"] > .panel-arrowcontainer > .panel-arrowcontent { - padding: 0px; -} - -.click-to-play-plugins-notification-content { - width: 28em; -} - -.click-to-play-plugins-notification-center-box { - border: 1px solid ThreeDShadow; - margin: 10px; -} - -.plugin-popupnotification-centeritem:nth-child(odd) { - background-color: rgba(0,0,0,0.1); -} - -.center-item-label { - margin-inline-start: 6px; - margin-bottom: 0; - text-overflow: ellipsis; -} - -.center-item-warning-icon { - background-image: url("chrome://mozapps/skin/extensions/alerticon-info-negative.png"); - background-repeat: no-repeat; - width: 16px; - height: 15px; - margin-inline-start: 6px; -} - -.click-to-play-plugins-notification-button-container { - background: linear-gradient(rgba(0,0,0,0.04) 60%, transparent); - padding: 10px; - margin-top: 5px; -} - -.click-to-play-popup-button { - width: 50%; -} - -.click-to-play-plugins-notification-description-box { - padding: 10px; -} - -.click-to-play-plugins-outer-description { - margin-top: 8px; -} - -.click-to-play-plugins-notification-link, -.center-item-link { - margin: 0; -} diff --git a/application/palemoon/themes/shared/plugins/notification-pluginAlert.png b/application/palemoon/themes/shared/plugins/notification-pluginAlert.png deleted file mode 100644 index 7492fdd867..0000000000 Binary files a/application/palemoon/themes/shared/plugins/notification-pluginAlert.png and /dev/null differ diff --git a/application/palemoon/themes/shared/plugins/notification-pluginAlert@2x.png b/application/palemoon/themes/shared/plugins/notification-pluginAlert@2x.png deleted file mode 100644 index f3359969b6..0000000000 Binary files a/application/palemoon/themes/shared/plugins/notification-pluginAlert@2x.png and /dev/null differ diff --git a/application/palemoon/themes/shared/plugins/notification-pluginBlocked.png b/application/palemoon/themes/shared/plugins/notification-pluginBlocked.png deleted file mode 100644 index e2e9489004..0000000000 Binary files a/application/palemoon/themes/shared/plugins/notification-pluginBlocked.png and /dev/null differ diff --git a/application/palemoon/themes/shared/plugins/notification-pluginBlocked@2x.png b/application/palemoon/themes/shared/plugins/notification-pluginBlocked@2x.png deleted file mode 100644 index 5126be01f0..0000000000 Binary files a/application/palemoon/themes/shared/plugins/notification-pluginBlocked@2x.png and /dev/null differ diff --git a/application/palemoon/themes/shared/plugins/notification-pluginNormal.png b/application/palemoon/themes/shared/plugins/notification-pluginNormal.png deleted file mode 100644 index 979e92b7f5..0000000000 Binary files a/application/palemoon/themes/shared/plugins/notification-pluginNormal.png and /dev/null differ diff --git a/application/palemoon/themes/shared/plugins/notification-pluginNormal@2x.png b/application/palemoon/themes/shared/plugins/notification-pluginNormal@2x.png deleted file mode 100644 index c081bbb475..0000000000 Binary files a/application/palemoon/themes/shared/plugins/notification-pluginNormal@2x.png and /dev/null differ diff --git a/application/palemoon/themes/shared/statusbar/dynamic.css b/application/palemoon/themes/shared/statusbar/dynamic.css deleted file mode 100644 index 2c53cb2c88..0000000000 --- a/application/palemoon/themes/shared/statusbar/dynamic.css +++ /dev/null @@ -1,25 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -/* Progress bar/line styles */ - -#status4evar-progress-bar[s4estyle="true"] > .progress-bar -{ - -moz-appearance: none; - background: #333399; - border-radius: 3px; -} - -#status4evar-download-progress-bar[pmType^="active"] > .progress-bar -{ - background-color: #333399; -} - -#status4evar-download-progress-bar[pmType^="paused"] > .progress-bar -{ - background-color: gray; -} - diff --git a/application/palemoon/themes/shared/statusbar/overlay.css b/application/palemoon/themes/shared/statusbar/overlay.css deleted file mode 100644 index 89b3dac0cc..0000000000 --- a/application/palemoon/themes/shared/statusbar/overlay.css +++ /dev/null @@ -1,169 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -@namespace html url("http://www.w3.org/1999/xhtml"); - -/* - * General styles - */ - -#status4evar-status-widget, -#status4evar-progress-widget -{ - -moz-box-align: center; -} - -[forcevisible="true"] -{ - visibility: visible !important; -} - -#wrapper-status4evar-progress-widget progressmeter, -#wrapper-status4evar-download-button toolbarbutton -{ - visibility: visible; -} - -#wrapper-status4evar-status-widget toolbaritem label -{ - background-color: rgba(0,0,0,0.2); - padding: 2px 4px; -} - -/* - * Options button - */ - -#status4evar-options-button -{ - list-style-image: url("chrome://browser/skin/statusbar/pms24.png"); -} - -toolbar[iconsize="small"] #status4evar-options-button -{ - list-style-image: url("chrome://browser/skin/statusbar/pms16.png"); -} - -/* - * Download status - */ - -toolbar[mode="icons"] #status4evar-download-button[forcelabel="true"], -toolbar[mode="text"] #status4evar-download-button -{ - -moz-box-orient: horizontal !important; -} - -toolbar[mode="icons"] #status4evar-download-button[forcelabel="true"] > label -{ - display: -moz-box !important; -} - -#status4evar-download-progress-bar -{ - border: 1px solid gray; - -moz-appearance: none; - margin: 0px; - min-height: 0px; - min-width: 0px; -} - -#status4evar-download-progress-bar > * -{ - -moz-appearance: none; - background: #FFFFFF; -} - -#status4evar-download-progress-bar[pmType$="unknown"] > .progress-bar -{ - background-image: url("chrome://browser/skin/statusbar/pulse.png"); -} - -#status4evar-download-notification-container -{ - min-height: 1px; - min-width: 1px; - height: 1px; - margin-bottom: -1px; - position: relative; - z-index: 5; -} - -#status4evar-download-notification-icon -{ - opacity: 0; - background-size: 16px; - background-position: center; - background-repeat: no-repeat; - width: 16px; - height: 16px; -} - -@keyframes status4evar-download-notification-finish -{ - from { opacity: 0; transform: scale(1); } - 20% { opacity: .65; animation-timing-function: ease-in; } - to { opacity: 0; transform: scale(8); } -} - -#status4evar-download-notification-anchor[notification="finish"][forcevisible="true"] #status4evar-download-notification-icon -{ - background-image: url("chrome://browser/skin/downloads/download-notification-finish.png"); - animation-name: status4evar-download-notification-finish; - animation-duration: 1s; -} - -/* - * Splitter - */ - -splitter.status4evar-status-splitter -{ - -moz-appearance: splitter; - border: none; - background: transparent; - position: relative; -} - -splitter.status4evar-status-splitter:not(:hover) -{ - -moz-appearance: none; -} - -/* - * General progress - */ - -#status4evar-progress-bar[s4estyle="true"] > * -{ - border: none; -} - -#status4evar-progress-bar > .progress-remainder -{ - background-image: none; - background-color: transparent; -} - -#status4evar-progress-bar[s4estyle="true"] > .progress-bar -{ - border-right: 1px solid rgba(0,0,0,.2); -} - -#status4evar-progress-bar[s4estyle="true"][value="0"] > .progress-bar, -#status4evar-progress-bar[s4estyle="true"][value="100"] > .progress-bar -{ - border-right: none; -} - -/* - * Status bar - */ - -#status-bar > .statusbar-resizerpanel -{ - display: none !important; -} - diff --git a/application/palemoon/themes/shared/statusbar/pms16.png b/application/palemoon/themes/shared/statusbar/pms16.png deleted file mode 100644 index 830c5861a9..0000000000 Binary files a/application/palemoon/themes/shared/statusbar/pms16.png and /dev/null differ diff --git a/application/palemoon/themes/shared/statusbar/pms24.png b/application/palemoon/themes/shared/statusbar/pms24.png deleted file mode 100644 index cdc69b9b44..0000000000 Binary files a/application/palemoon/themes/shared/statusbar/pms24.png and /dev/null differ diff --git a/application/palemoon/themes/shared/statusbar/prefs.css b/application/palemoon/themes/shared/statusbar/prefs.css deleted file mode 100644 index 45b138f11c..0000000000 --- a/application/palemoon/themes/shared/statusbar/prefs.css +++ /dev/null @@ -1,38 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -#status4evar-prefs > prefpane > vbox.content-box -{ - min-height: 18em !important; -} - -radio[pane="status4evar-pane-status"] -{ - list-style-image: url("chrome://global/skin/icons/information-32.png"); -} - -radio[pane="status4evar-pane-progress"] -{ - list-style-image: url("chrome://browser/skin/statusbar/throbberStatic.png"); -} - -radio[pane="status4evar-pane-download"] -{ - list-style-image: url("chrome://mozapps/skin/downloads/downloadIcon.png"); -} - -radio[pane="status4evar-pane-addonbar"] -{ - list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.png"); -} - -radio[pane="status4evar-pane-advanced"] -{ - list-style-image: url("chrome://browser/skin/preferences/Options.png"); - -moz-image-region: rect(0px, 224px, 32px, 192px); -} - - diff --git a/application/palemoon/themes/shared/statusbar/pulse.png b/application/palemoon/themes/shared/statusbar/pulse.png deleted file mode 100644 index 374369ca12..0000000000 Binary files a/application/palemoon/themes/shared/statusbar/pulse.png and /dev/null differ diff --git a/application/palemoon/themes/shared/statusbar/throbber-idle.png b/application/palemoon/themes/shared/statusbar/throbber-idle.png deleted file mode 100644 index bcdd65b2ac..0000000000 Binary files a/application/palemoon/themes/shared/statusbar/throbber-idle.png and /dev/null differ diff --git a/application/palemoon/themes/shared/statusbar/throbberStatic.png b/application/palemoon/themes/shared/statusbar/throbberStatic.png deleted file mode 100644 index e2bf274966..0000000000 Binary files a/application/palemoon/themes/shared/statusbar/throbberStatic.png and /dev/null differ diff --git a/application/palemoon/themes/shared/tabbrowser/tab-audio-small.svg b/application/palemoon/themes/shared/tabbrowser/tab-audio-small.svg deleted file mode 100644 index abfe712685..0000000000 --- a/application/palemoon/themes/shared/tabbrowser/tab-audio-small.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/themes/shared/tabbrowser/tab-audio.svg b/application/palemoon/themes/shared/tabbrowser/tab-audio.svg deleted file mode 100644 index 274e10c295..0000000000 --- a/application/palemoon/themes/shared/tabbrowser/tab-audio.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - diff --git a/application/palemoon/themes/windows/Geolocation-16.png b/application/palemoon/themes/windows/Geolocation-16.png deleted file mode 100644 index d710e7336d..0000000000 Binary files a/application/palemoon/themes/windows/Geolocation-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Geolocation-64.png b/application/palemoon/themes/windows/Geolocation-64.png deleted file mode 100644 index 1bd46ba5e1..0000000000 Binary files a/application/palemoon/themes/windows/Geolocation-64.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Info.png b/application/palemoon/themes/windows/Info.png deleted file mode 100644 index f9c6ef2fd7..0000000000 Binary files a/application/palemoon/themes/windows/Info.png and /dev/null differ diff --git a/application/palemoon/themes/windows/KUI-background.png b/application/palemoon/themes/windows/KUI-background.png deleted file mode 100644 index 104a49f7b0..0000000000 Binary files a/application/palemoon/themes/windows/KUI-background.png and /dev/null differ diff --git a/application/palemoon/themes/windows/KUI-close.png b/application/palemoon/themes/windows/KUI-close.png deleted file mode 100644 index 08eeb81831..0000000000 Binary files a/application/palemoon/themes/windows/KUI-close.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Makefile.in b/application/palemoon/themes/windows/Makefile.in deleted file mode 100644 index 173ca68435..0000000000 --- a/application/palemoon/themes/windows/Makefile.in +++ /dev/null @@ -1,7 +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/. - -ICON_FILES := icon.png -ICON_DEST = $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} -INSTALL_TARGETS += ICON diff --git a/application/palemoon/themes/windows/Privacy-16.png b/application/palemoon/themes/windows/Privacy-16.png deleted file mode 100644 index f801bfee24..0000000000 Binary files a/application/palemoon/themes/windows/Privacy-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Privacy-32.png b/application/palemoon/themes/windows/Privacy-32.png deleted file mode 100644 index 41ecd5d933..0000000000 Binary files a/application/palemoon/themes/windows/Privacy-32.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Privacy-48.png b/application/palemoon/themes/windows/Privacy-48.png deleted file mode 100644 index 372b8235ae..0000000000 Binary files a/application/palemoon/themes/windows/Privacy-48.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Privacy-64.png b/application/palemoon/themes/windows/Privacy-64.png deleted file mode 100644 index bd8d19154f..0000000000 Binary files a/application/palemoon/themes/windows/Privacy-64.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Push-16.png b/application/palemoon/themes/windows/Push-16.png deleted file mode 100644 index d710e7336d..0000000000 Binary files a/application/palemoon/themes/windows/Push-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Push-64.png b/application/palemoon/themes/windows/Push-64.png deleted file mode 100644 index 27fecb8588..0000000000 Binary files a/application/palemoon/themes/windows/Push-64.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Secure24.png b/application/palemoon/themes/windows/Secure24.png deleted file mode 100644 index 265d79ba16..0000000000 Binary files a/application/palemoon/themes/windows/Secure24.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Toolbar-glass.png b/application/palemoon/themes/windows/Toolbar-glass.png deleted file mode 100644 index f8aac2467b..0000000000 Binary files a/application/palemoon/themes/windows/Toolbar-glass.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Toolbar-glass.svg b/application/palemoon/themes/windows/Toolbar-glass.svg deleted file mode 100644 index 9feaac251a..0000000000 --- a/application/palemoon/themes/windows/Toolbar-glass.svg +++ /dev/null @@ -1,3218 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/themes/windows/Toolbar-inverted.png b/application/palemoon/themes/windows/Toolbar-inverted.png deleted file mode 100644 index 54d83bf5f2..0000000000 Binary files a/application/palemoon/themes/windows/Toolbar-inverted.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Toolbar-inverted.svg b/application/palemoon/themes/windows/Toolbar-inverted.svg deleted file mode 100644 index ce59313e68..0000000000 --- a/application/palemoon/themes/windows/Toolbar-inverted.svg +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/themes/windows/Toolbar.png b/application/palemoon/themes/windows/Toolbar.png deleted file mode 100644 index 8ec756e03d..0000000000 Binary files a/application/palemoon/themes/windows/Toolbar.png and /dev/null differ diff --git a/application/palemoon/themes/windows/Toolbar.svg b/application/palemoon/themes/windows/Toolbar.svg deleted file mode 100644 index 7a68c06087..0000000000 --- a/application/palemoon/themes/windows/Toolbar.svg +++ /dev/null @@ -1,1356 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/themes/windows/aboutCertError.css b/application/palemoon/themes/windows/aboutCertError.css deleted file mode 100644 index 100bb3d3bb..0000000000 --- a/application/palemoon/themes/windows/aboutCertError.css +++ /dev/null @@ -1,73 +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/. */ - - -html { - background: #833; -} - -body { - margin: 0; - padding: 0 1em; - color: -moz-FieldText; - font: message-box; -} - -h1 { - margin: 0 0 .6em 0; - border-bottom: 1px solid ThreeDLightShadow; - font-size: 160%; -} - -h2 { - font-size: 130%; -} - -#errorPageContainer { - position: relative; - min-width: 13em; - max-width: 52em; - margin: 4em auto; - border: 2px solid #DD0D09; - border-radius: 10px; - box-shadow: 0px 0px 8px red; - padding: 3em; - padding-inline-start: 30px; - background: url("chrome://global/skin/icons/sslWarning.png") left 0 no-repeat -moz-Field; - background-origin: content-box; -} - -#errorPageContainer:-moz-dir(rtl) { - background-position: right 0; -} - -#errorTitle { - margin-inline-start: 80px; -} - -#errorLongContent { - margin-inline-start: 80px; -} - -.expander > button { - padding-inline-start: 20px; - margin-inline-start: -20px; - background: url("chrome://browser/skin/aboutCertError_sectionExpanded.png") left center no-repeat; - border: none; - font: inherit; - color: inherit; - cursor: pointer; -} - -.expander > button:-moz-dir(rtl) { - background-position: right center; -} - -.expander[collapsed] > button { - background-image: url("chrome://browser/skin/aboutCertError_sectionCollapsed.png"); -} - -.expander[collapsed] > button:-moz-dir(rtl) { - background-image: url("chrome://browser/skin/aboutCertError_sectionCollapsed-rtl.png"); -} diff --git a/application/palemoon/themes/windows/aboutCertError_sectionCollapsed-rtl.png b/application/palemoon/themes/windows/aboutCertError_sectionCollapsed-rtl.png deleted file mode 100644 index 84ba18c0a3..0000000000 Binary files a/application/palemoon/themes/windows/aboutCertError_sectionCollapsed-rtl.png and /dev/null differ diff --git a/application/palemoon/themes/windows/aboutCertError_sectionCollapsed.png b/application/palemoon/themes/windows/aboutCertError_sectionCollapsed.png deleted file mode 100644 index c9805f654c..0000000000 Binary files a/application/palemoon/themes/windows/aboutCertError_sectionCollapsed.png and /dev/null differ diff --git a/application/palemoon/themes/windows/aboutCertError_sectionExpanded.png b/application/palemoon/themes/windows/aboutCertError_sectionExpanded.png deleted file mode 100644 index 128cef90af..0000000000 Binary files a/application/palemoon/themes/windows/aboutCertError_sectionExpanded.png and /dev/null differ diff --git a/application/palemoon/themes/windows/aboutPrivateBrowsing.css b/application/palemoon/themes/windows/aboutPrivateBrowsing.css deleted file mode 100644 index 35843adce6..0000000000 --- a/application/palemoon/themes/windows/aboutPrivateBrowsing.css +++ /dev/null @@ -1,47 +0,0 @@ -%if 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/. */ -%endif - -body.private > #errorPageContainer { - background-image: url("chrome://browser/skin/Privacy-48.png"); -} - -body.normal > #errorPageContainer { - background-image: url("chrome://global/skin/icons/question-48.png"); -} - -#clearRecentHistoryDesc { - margin-top: 2em; -} - -#clearRecentHistoryDesc > p { - font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */ -} - -#startPrivateBrowsingDesc > button { - margin-inline-start: 0; -} - -#footerDesc > p { - font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */ -} - -#moreInfo { - font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */ - padding-inline-start: 25px; - background: url("chrome://global/skin/icons/information-16.png") no-repeat top left; -} - -#moreInfo:-moz-dir(rtl) { - background-position: top right; -} - -#moreInfoText { - margin-bottom: 0; -} - -#moreInfoLinkContainer { - margin-top: 0.5em; -} diff --git a/application/palemoon/themes/windows/aboutSessionRestore-window-icon.png b/application/palemoon/themes/windows/aboutSessionRestore-window-icon.png deleted file mode 100644 index 00774050c5..0000000000 Binary files a/application/palemoon/themes/windows/aboutSessionRestore-window-icon.png and /dev/null differ diff --git a/application/palemoon/themes/windows/aboutSessionRestore.css b/application/palemoon/themes/windows/aboutSessionRestore.css deleted file mode 100644 index 4fa490798d..0000000000 --- a/application/palemoon/themes/windows/aboutSessionRestore.css +++ /dev/null @@ -1,73 +0,0 @@ -%if 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/. */ -%endif - -html { - background: #f8ffd0; - height: 100%; -} - -body { - height: 100%; - text-align: center; -} - -#errorPageContainer { - background-image: url("chrome://global/skin/icons/warning-large.png"); - display: -moz-box; - width: -moz-available; - max-width: 85%; - height: 75%; - max-height: 85%; - -moz-box-orient: vertical; - text-align: start; - border: 2px solid #efc; - box-shadow: 0px 0px 8px #aaa; -} - -#errorShortDesc > p { - margin-top: 0.4em; - margin-bottom: 0; -} - -#errorLongContent, #errorTrailerDesc { - display: -moz-box; - -moz-box-flex: 1; - -moz-box-orient: vertical; -} - -#tabList { - margin-top: 2.5em; - width: 100%; - min-height: 12em; -} - -treechildren::-moz-tree-image(icon), -treechildren::-moz-tree-image(noicon) { - padding-right: 2px; - margin: 0px 2px; - width: 16px; - height: 16px; -} - -treechildren::-moz-tree-image(noicon) { - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} -treechildren::-moz-tree-image(container, noicon) { - list-style-image: url("chrome://browser/skin/aboutSessionRestore-window-icon.png"); -} -treechildren::-moz-tree-image(checked) { - list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); -} -treechildren::-moz-tree-image(partial) { - list-style-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif"); -} - -#buttons { - width: 100%; -} -#buttons > button { - margin-top: 2em; -} diff --git a/application/palemoon/themes/windows/actionicon-tab.png b/application/palemoon/themes/windows/actionicon-tab.png deleted file mode 100644 index ced958ebbe..0000000000 Binary files a/application/palemoon/themes/windows/actionicon-tab.png and /dev/null differ diff --git a/application/palemoon/themes/windows/appmenu-dropmarker.png b/application/palemoon/themes/windows/appmenu-dropmarker.png deleted file mode 100644 index 27deaff722..0000000000 Binary files a/application/palemoon/themes/windows/appmenu-dropmarker.png and /dev/null differ diff --git a/application/palemoon/themes/windows/appmenu-icons.png b/application/palemoon/themes/windows/appmenu-icons.png deleted file mode 100644 index 78f3658163..0000000000 Binary files a/application/palemoon/themes/windows/appmenu-icons.png and /dev/null differ diff --git a/application/palemoon/themes/windows/autocomplete.css b/application/palemoon/themes/windows/autocomplete.css deleted file mode 100644 index dbdc3f6d4f..0000000000 --- a/application/palemoon/themes/windows/autocomplete.css +++ /dev/null @@ -1,238 +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/. */ - -/* ===== autocomplete.css ================================================= - == Styles used by the autocomplete widget. - ======================================================================= */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -@namespace html url("http://www.w3.org/1999/xhtml"); - -/* ::::: autocomplete ::::: */ - -/* .padded is used by autocomplete widgets that don't have an icon. Gross. -dwh */ -textbox:not(.padded) { - cursor: default; - padding: 0; -} - -textbox[nomatch="true"][highlightnonmatches="true"] { - color: red; -} - -.private-autocomplete-textbox-container { - -moz-box-align: center; -} - -textbox:not(.padded) .textbox-input-box { - margin: 0 3px; -} - -.textbox-input-box { - -moz-box-align: center; -} - -/* ::::: autocomplete popups ::::: */ - -panel[type="private-autocomplete"], -panel[type="private-autocomplete-richlistbox"], -.private-autocomplete-history-popup { - -moz-appearance: none; - border-width: 1px; - -moz-border-top-colors: ThreeDShadow; - -moz-border-right-colors: ThreeDShadow; - -moz-border-bottom-colors: ThreeDShadow; - -moz-border-left-colors: ThreeDShadow; - padding: 0; - color: -moz-FieldText; - background-color: -moz-Field; -} - -.private-autocomplete-history-popup { - max-height: 180px; -} - -/* ::::: tree ::::: */ - -.private-autocomplete-tree { - -moz-appearance: none !important; - border: none !important; - background-color: transparent !important; -} - -.private-autocomplete-treecol { - -moz-appearance: none !important; - margin: 0 !important; - border: none !important; - padding: 0 !important; -} - -/* GTK calculates space for a sort arrow */ -.private-autocomplete-treecol > .treecol-sortdirection { - -moz-appearance: none !important; -} - -.private-autocomplete-treebody::-moz-tree-cell-text { - padding-inline-start: 8px; -} - -treechildren.private-autocomplete-treebody::-moz-tree-row(selected) { - background-color: Highlight; -} - -treechildren.private-autocomplete-treebody::-moz-tree-cell-text(selected) { - color: HighlightText !important; -} - -.private-autocomplete-treebody::-moz-tree-image(treecolAutoCompleteValue) { - max-width: 16px; - height: 16px; -} - -/* ::::: richlistbox autocomplete ::::: */ - -.private-autocomplete-richlistbox { - -moz-appearance: none; - margin: 0; -} - -.private-autocomplete-richlistitem { - padding: 1px; -} - -.private-autocomplete-richlistitem[selected="true"] { - background-color: Highlight; - color: HighlightText; -} - -%ifdef XP_WIN -@media (-moz-os-version: windows-vista) and (-moz-windows-default-theme), - (-moz-os-version: windows-win7) and (-moz-windows-default-theme) { - .private-autocomplete-richlistitem[selected="true"] { - color: inherit; - background-color: transparent; - /* four gradients for the bevel highlights on each edge, one for blue background */ - background-image: - linear-gradient(to bottom, rgba(255,255,255,0.9) 3px, transparent 3px), - linear-gradient(to right, rgba(255,255,255,0.5) 3px, transparent 3px), - linear-gradient(to left, rgba(255,255,255,0.5) 3px, transparent 3px), - linear-gradient(to top, rgba(255,255,255,0.4) 3px, transparent 3px), - linear-gradient(to bottom, rgba(163,196,247,0.3), rgba(122,180,246,0.3)); - background-clip: content-box; - border-radius: 6px; - outline: 1px solid rgb(124,163,206); - -moz-outline-radius: 3px; - outline-offset: -2px; - } -} -%endif - -.ac-title-box { - margin-top: 4px; -} - -.ac-url-box { - /* When setting a vertical margin here, half of that needs to be added - .ac-title-box's translateY for when .ac-url-box is hidden (see below). */ - margin: 1px 0 4px; -} - -.private-autocomplete-richlistitem[actiontype="keyword"] .ac-url-box, -.private-autocomplete-richlistitem[actiontype="searchengine"] .ac-url-box, -.private-autocomplete-richlistitem[actiontype="visiturl"] .ac-url-box, -.private-autocomplete-richlistitem[type~="autofill"] .ac-url-box { - visibility: hidden; -} - -.private-autocomplete-richlistitem[actiontype="keyword"] .ac-title-box, -.private-autocomplete-richlistitem[actiontype="searchengine"] .ac-title-box, -.private-autocomplete-richlistitem[actiontype="visiturl"] .ac-title-box, -.private-autocomplete-richlistitem[type~="autofill"] .ac-title-box { - /* Center the title by moving it down by half of .ac-url-box's height, - including vertical margins (if any). */ - transform: translateY(calc(.5em + 2px)); -} - -.ac-site-icon { - width: 16px; - height: 16px; - margin: 0 5px -2px; -} - -.ac-type-icon { - width: 16px; - height: 16px; - margin-inline-start: 6px; - margin-inline-end: 4px; - margin-bottom: -1px; -} - -.ac-url-box > .ac-site-icon, -.ac-url-box > .ac-type-icon { - /* Otherwise the spacer is big enough to stretch its container */ - height: auto; -} - -.ac-extra > .ac-result-type-tag { - margin: 0 4px; -} - -.ac-extra > .ac-comment { - padding-right: 4px; -} - -.ac-ellipsis-after { - margin: 0 !important; - padding: 0; - min-width: 1em; -} - -.ac-normal-text { - margin: 0 !important; - padding: 0; -} - -.ac-normal-text > html|span { - margin: 0 !important; - padding: 0; -} - -html|span.ac-emphasize-text { - box-shadow: inset 0 0 1px 1px rgba(208,208,208,0.5); - background-color: rgba(208,208,208,0.3); - border-radius: 2px; - text-shadow: 0 0 currentColor; -} - -@media (-moz-windows-default-theme) { - @media not all and (-moz-os-version: windows-xp) { - html|span.ac-emphasize-text { - box-shadow: inset 0 0 1px 1px rgba(0,0,0,0.1); - background-color: rgba(0,0,0,0.05); - } - } - - @media (-moz-os-version: windows-xp) { - .ac-url-text > html|span.ac-emphasize-text, - .ac-action-text > html|span.ac-emphasize-text { - box-shadow: inset 0 0 1px 1px rgba(202,214,201,0.3); - background-color: rgba(202,214,201,0.2); - } - } -} - -.ac-title, .ac-url { - overflow: hidden; -} - -/* ::::: textboxes inside toolbarpaletteitems ::::: */ - -toolbarpaletteitem > toolbaritem > textbox > hbox > hbox > html|*.textbox-input { - visibility: hidden; -} - -toolbarpaletteitem > toolbaritem > * > textbox > hbox > hbox > html|*.textbox-input { - visibility: hidden; -} - diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css deleted file mode 100644 index e159fba097..0000000000 --- a/application/palemoon/themes/windows/browser.css +++ /dev/null @@ -1,3977 +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/. */ - -@import url("chrome://global/skin/"); - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -@namespace html url("http://www.w3.org/1999/xhtml"); - -%include ../shared/browser.inc -%filter substitution -%define toolbarShadowColor rgba(10%,10%,10%,.4) -%define toolbarShadowOnTab linear-gradient(to top, rgba(10%,10%,10%,.4) 1px, transparent 1px) -%define navbarTextboxCustomBorder border-color: rgba(0,0,0,.32); -%define navbarLargeIcons #navigator-toolbox[iconsize=large][mode=icons] > #nav-bar -%define forwardTransitionLength 150ms -%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large][mode=icons] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button"],#nav-bar:not([currentset])) > #unified-back-forward-button -%define conditionalForwardWithUrlbar2 window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large][mode=icons] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button"]:not([currentset*="unified-back-forward-button,urlbar-container"]),#nav-bar:not([currentset])) > #unified-back-forward-button -%define conditionalForwardWithUrlbarWidth 27 -%define glassActiveBorderColor rgb(37, 44, 51) -%define glassInactiveBorderColor rgb(102, 102, 102) - -%ifdef MOZ_OFFICIAL_BRANDING -%define appMenuButtonBorderColor rgba(255,255,255,.5) rgba(6,42,83,.9) -%else -%if MOZ_UPDATE_CHANNEL == aurora -%define appMenuButtonBorderColor hsla(0,0%,100%,.5) hsla(214,89%,21%,.9) -%else -%define appMenuButtonBorderColor hsla(0,0%,100%,.5) hsla(210,59%,13%,.9) -%endif -%endif - -:root { - --fullscreen-background-color: #556; - --fullscreen-text-color: #fff; - - --toolbox-after-color: ThreeDShadow; - - --toolbar-custom-color: hsl(210,75%,92%); - --toolbar-highlight-top: rgba(255,255,255,.5); - --toolbar-highlight-bottom: transparent; - - --toolbarbutton-background-color: hsla(210,32%,93%,.3); - --toolbarbutton-border-radius: 2.5px; - --toolbarbutton-border-color: hsla(210,54%,20%,.2); - - --toolbarbutton-image: url("chrome://browser/skin/Toolbar.png"); - --toolbarbutton-glass-image: url("chrome://browser/skin/Toolbar-glass.png"); - --toolbarbutton-inverted-image: url("chrome://browser/skin/Toolbar-inverted.png"); - - --tab-background: linear-gradient(transparent, hsla(0,0%,45%,.1) 1px, hsla(0,0%,32%,.2) 80%, hsla(0,0%,0%,.2)); - --tab-background-hover: linear-gradient(hsla(0,0%,100%,.3) 1px, hsla(0,0%,75%,.2) 80%, hsla(0,0%,60%,.2)); - --tab-border-radius: 6px; - --tab-box-shadow: inset 0.5px 1px 1px var(--tab-selected-highlight); - --tab-selected-highlight: rgba(255,255,255,.7); - - --window-text-color: currentColor; -} - -/* Use SVG for HiDPI 133%+ */ -@media (min-resolution: 1.33dppx) { - :root { - --toolbarbutton-image: url("chrome://browser/skin/Toolbar.svg"); - --toolbarbutton-glass-image: url("chrome://browser/skin/Toolbar-glass.svg"); - --toolbarbutton-inverted-image: url("chrome://browser/skin/Toolbar-inverted.svg"); - } -} - -:root:-moz-lwtheme-brighttext { - --toolbar-highlight-top: rgba(32,32,32,.8); - --toolbar-highlight-bottom: rgba(32,32,32,0); -} - -:root:-moz-lwtheme-darktext { - --toolbar-highlight-top: rgba(255,255,255,.8); - - --tab-selected-highlight: rgba(255,255,255,.6); -} - -#menubar-items { - -moz-box-orient: vertical; /* for flex hack */ -} - -#main-menubar { - -moz-box-flex: 1; /* make menu items expand to fill toolbar height */ -} - -#navigator-toolbox { - -moz-appearance: none; - background-color: transparent; - border-top: none; -} - -@media (-moz-os-version: windows-win10) and (-moz-windows-theme: aero) { - #navigator-toolbox { - /* Override the global style for Windows 10 that adds a bottom border */ - border-bottom: none; - }; -} - -#navigator-toolbox::after { - content: ""; - display: -moz-box; - -moz-box-ordinal-group: 101; /* tabs toolbar is 100 */ - height: 1px; - background-color: var(--toolbox-after-color); -} -#navigator-toolbox[tabsontop=false]::after, -#main-window[disablechrome] #navigator-toolbox::after { - visibility: collapse; -} - -#navigator-toolbox > toolbar:not(:-moz-lwtheme) { - -moz-appearance: none; - border-style: none; - background-color: -moz-Dialog; -} - -@media not all and (-moz-windows-compositor) { - #main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme) { - background: linear-gradient(to top, @toolbarShadowColor@ 1px, transparent 1px), - linear-gradient(rgba(50%,50%,50%,0), ActiveCaption 85%); - color: CaptionText; - } - #main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive { - background: linear-gradient(to top, @toolbarShadowColor@ 1px, transparent 1px), - linear-gradient(rgba(50%,50%,50%,0), InactiveCaption 85%); - color: InactiveCaptionText; - } - - #main-window[tabsintitlebar] #titlebar:-moz-lwtheme { - visibility: hidden; - } - #main-window[tabsintitlebar] #titlebar-content:-moz-lwtheme { - -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox"); - visibility: visible; - } - - #main-menubar > menu:not(:-moz-lwtheme) { - color: inherit; /* allow menubar items to be styled */ - } -} - -#nav-bar[tabsontop=true], -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar, -#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar { - background-image: linear-gradient(var(--toolbar-highlight-top), var(--toolbar-highlight-bottom)); -} - -#personal-bookmarks { - min-height: 24px; -} - -#print-preview-toolbar:not(:-moz-lwtheme) { - -moz-appearance: toolbox; -} - -#browser-bottombox:not(:-moz-lwtheme) { - background-color: -moz-dialog; -} - -/* ::::: app menu button ::::: */ - -#appmenu-button { - -moz-appearance: none; - background-clip: padding-box; - border: 1px solid; - border-top: none; - color: white; - text-shadow: 0 0 1px rgba(0,0,0,.7), - 0 1px 1.5px rgba(0,0,0,.5); - font-weight: bold; - padding: 0 1.5em .05em; - margin: 0 0 2px; -} - -@media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7) { - #appmenu-button { - border-radius: 0 0 4px 4px; - } -} - -@media (-moz-windows-classic) { - #appmenu-button { - margin-bottom: 1px; - } -} - -#appmenu-button:hover:active, -#appmenu-button[open] { - border-radius: 0; -} - -%ifdef MOZ_OFFICIAL_BRANDING -@supports not -moz-bool-pref("browser.lun3r.brand") { - #appmenu-button { - background-image: linear-gradient(rgb(82,182,247), rgb(10,98,215) 95%); - border-color: rgba(6,42,83,.9); - box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, - 0 0 0 1px rgba(255,255,255,.25) inset; - } - #appmenu-button:hover:not(:active):not([open]) { - background-image: radial-gradient(farthest-side at bottom, rgba(89,240,252,.5) 10%, rgba(89,240,252,0) 70%), - radial-gradient(farthest-side at bottom, rgb(60,68,236), rgba(172,229,255,0)), - linear-gradient(rgb(69,170,246), rgb(30,40,209) 95%); - border-color: rgba(6,42,83,.9); - box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, - 0 0 2px 1px rgba(169,234,250,.7) inset, - 0 -1px 0 rgba(169,234,250,.5) inset; - } - #appmenu-button:hover:active, - #appmenu-button[open] { - background-image: linear-gradient(rgb(69,170,246), rgb(0,74,209) 95%); - box-shadow: 0 2px 3px rgba(0,0,0,.4) inset, - 0 1px 1px rgba(0,0,0,.2) inset; - } -} - -@supports -moz-bool-pref("browser.lun3r.brand") { - #appmenu-button { - background-image: linear-gradient(rgb(167,93,247), rgb(153,11,229) 95%); - border-color: rgba(61,6,84,.9); - box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, - 0 0 0 1px rgba(255,255,255,.25) inset; - } - #appmenu-button:hover:not(:active):not([open]) { - background-image: radial-gradient(farthest-side at bottom, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%), - radial-gradient(farthest-side at bottom, rgb(192,81,247), rgba(236,172,255,0)), - linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%); - border-color: rgba(61,6,84,.9); - box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, - 0 0 2px 1px rgba(199,170,250,.7) inset, - 0 -1px 0 rgba(199,170,250,.5) inset; - } - #appmenu-button:hover:active, - #appmenu-button[open] { - background-image: linear-gradient(rgb(153,55,245), rgb(147,0,200) 95%); - box-shadow: 0 2px 3px rgba(0,0,0,.4) inset, - 0 1px 1px rgba(0,0,0,.2) inset; - } -} -%else -%if MOZ_UPDATE_CHANNEL == aurora -#appmenu-button { - background-image: linear-gradient(hsl(208,99%,37%), hsl(214,90%,23%) 95%); - border-color: hsla(214,89%,21%,.9); - box-shadow: 0 1px 0 hsla(205,100%,72%,.2) inset, - 0 0 2px 1px hsla(205,100%,72%,.25) inset; -} -#appmenu-button:hover:not(:active):not([open]) { - background-image: radial-gradient(farthest-side at bottom, hsla(202,100%,85%,.5) 10%, hsla(202,100%,85%,0) 70%), - radial-gradient(farthest-side at bottom, hsla(205,100%,72%,.7), hsla(205,100%,72%,0)), - linear-gradient(hsl(208,98%,34%), hsl(213,87%,20%) 95%); - border-color: hsla(214,89%,21%,.9); - box-shadow: 0 1px 0 hsla(205,100%,72%,.15) inset, - 0 0 2px 1px hsla(205,100%,72%,.5) inset, - 0 -1px 0 hsla(205,100%,72%,.2) inset; -} -#appmenu-button:hover:active, -#appmenu-button[open] { - background-image: linear-gradient(hsl(208,95%,30%), hsl(214,85%,17%) 95%); - box-shadow: 0 2px 3px rgba(0,0,0,.4) inset, - 0 1px 1px rgba(0,0,0,.2) inset; -} -%else -#appmenu-button { - background-image: linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%); - border-color: hsla(210,59%,13%,.9); - box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset, - 0 0 2px 1px hsla(211,65%,85%,.15) inset; -} -#appmenu-button:hover:not(:active):not([open]) { - background-image: radial-gradient(farthest-side at bottom, hsla(210,48%,90%,.5) 10%, hsla(210,48%,90%,0) 70%), - radial-gradient(farthest-side at bottom, hsla(211,70%,83%,.5), hsla(211,70%,83%,0)), - linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%); - border-color: hsla(210,59%,13%,.9); - box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset, - 0 0 2px 1px hsla(210,48%,90%,.4) inset, - 0 -1px 0 hsla(210,48%,90%,.2) inset; -} -#appmenu-button:hover:active, -#appmenu-button[open] { - background-image: linear-gradient(hsl(211,33%,26%), hsl(209,53%,6%) 95%); - box-shadow: 0 2px 3px rgba(0,0,0,.4) inset, - 0 1px 1px rgba(0,0,0,.2) inset; -} -%endif -%endif - -#main-window[privatebrowsingmode=temporary] #appmenu-button { - background-image: linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%); - border-color: rgba(43,8,65,.9); -} - -#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:not(:active):not([open]) { - background-image: radial-gradient(farthest-side at bottom, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%), - radial-gradient(farthest-side at bottom, rgb(192,81,247), rgba(236,172,255,0)), - linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%); - border-color: rgba(43,8,65,.9); - box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, - 0 0 2px 1px rgba(240,193,255,.7) inset, - 0 -1px 0 rgba(240,193,255,.5) inset; -} - -#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:active, -#main-window[privatebrowsingmode=temporary] #appmenu-button[open] { - background-image: linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%); -} - - - -#appmenu-button > .button-box { - border-style: none; - padding: 0; -} - -#appmenu-button > .button-box > .button-menu-dropmarker { - list-style-image: url(appmenu-dropmarker.png); - width: auto; - height: auto; - padding: 0; - margin: 0; - margin-inline-start: .5em; -} - -.splitmenu-menuitem { - margin-inline-end: 1px; - padding-inline-end: 0.5em; -} - -.splitmenu-menu { - -moz-box-pack: end; -} - -.appmenu-edit-button { - -moz-appearance: none; - border: 1px solid transparent; - padding: 2px; - background: transparent; - border-radius: 3px; -} - -.appmenu-edit-button[disabled="true"] { - opacity: .3; -} - -#appmenuPrimaryPane { - border-inline-end: 1px solid ThreeDShadow; -} - -@media (-moz-windows-default-theme) { - #appmenu-popup { - -moz-appearance: none; - background: white; - border: 1px solid ThreeDShadow; - } - #appmenuPrimaryPane { - background-color: rgba(255,255,255,0.5); - padding: 2px; - border-inline-end: none; - } - #appmenuSecondaryPane { - background-color: #f1f5fb; - box-shadow: 1px 0 2px rgb(204,214,234) inset; - padding-inline-start: 3px; - padding-inline-end: 2px; - padding-top: 2px; - padding-bottom: 2px; - font-family: "Segoe UI Semibold", "Segoe UI", sans-serif; - } - #appmenuSecondaryPane:-moz-locale-dir(rtl) { - box-shadow: -1px 0 2px rgb(204,214,234) inset; - } - - #appmenuPrimaryPane menupopup { - -moz-appearance: none; - background-image: linear-gradient(to right, white 26px, ThreeDLightShadow 26px, - ThreeDLightShadow 27px, ThreeDHighlight 27px, - ThreeDHighlight 28px, white 28px); - border: 3px solid; - -moz-border-top-colors: ThreeDShadow white; - -moz-border-bottom-colors: ThreeDShadow white; - -moz-border-left-colors: ThreeDShadow white; - -moz-border-right-colors: ThreeDShadow white; - } - - #appmenuSecondaryPane menupopup { - -moz-appearance: none; - background-image: linear-gradient(to right, #f1f5fb 26px, ThreeDLightShadow 26px, - ThreeDLightShadow 27px, ThreeDHighlight 27px, - ThreeDHighlight 28px, #f1f5fb 28px); - border: 3px solid; - -moz-border-top-colors: ThreeDShadow #f1f5fb; - -moz-border-bottom-colors: ThreeDShadow #f1f5fb; - -moz-border-left-colors: ThreeDShadow #f1f5fb; - -moz-border-right-colors: ThreeDShadow #f1f5fb; - } - - #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, white 26px, ThreeDLightShadow 26px, - ThreeDLightShadow 27px, ThreeDHighlight 27px, - ThreeDHighlight 28px, white 28px); - } - #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, #f1f5fb 26px, ThreeDLightShadow 26px, - ThreeDLightShadow 27px, ThreeDHighlight 27px, - ThreeDHighlight 28px, #f1f5fb 28px); - } - - /* Hi-DPI overrides of the menu backgrounds, to adjust where the gutter line falls */ - @media (min-resolution: 1.25dppx) { - #appmenuPrimaryPane menupopup { - background-image: linear-gradient(to right, white 22.4px, ThreeDLightShadow 22.4px, - ThreeDLightShadow 23.2px, ThreeDHighlight 23.2px, - ThreeDHighlight 24px, white 24px); - } - #appmenuSecondaryPane menupopup { - background-image: linear-gradient(to right, #f1f5fb 22.4px, ThreeDLightShadow 22.4px, - ThreeDLightShadow 23.2px, ThreeDHighlight 23.2px, - ThreeDHighlight 24px, #f1f5fb 24px); - } - #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, white 22.4px, ThreeDLightShadow 22.4px, - ThreeDLightShadow 23.2px, ThreeDHighlight 23.2px, - ThreeDHighlight 24px, white 24px); - } - #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, #f1f5fb 22.4px, ThreeDLightShadow 22.4px, - ThreeDLightShadow 23.2px, ThreeDHighlight 23.2px, - ThreeDHighlight 24px, #f1f5fb 24px); - } - } - - @media (min-resolution: 1.5dppx) { - #appmenuPrimaryPane menupopup { - background-image: linear-gradient(to right, white 20.6667px, ThreeDLightShadow 20.6667px, - ThreeDLightShadow 21.3333px, ThreeDHighlight 21.3333px, - ThreeDHighlight 22px, white 22px); - } - #appmenuSecondaryPane menupopup { - background-image: linear-gradient(to right, #f1f5fb 20.6667px, ThreeDLightShadow 20.6667px, - ThreeDLightShadow 21.3333px, ThreeDHighlight 21.3333px, - ThreeDHighlight 22px, #f1f5fb 22px); - } - #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, white 20.6667px, ThreeDLightShadow 20.6667px, - ThreeDLightShadow 21.3333px, ThreeDHighlight 21.3333px, - ThreeDHighlight 22px, white 22px); - } - #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, #f1f5fb 20.6667px, ThreeDLightShadow 20.6667px, - ThreeDLightShadow 21.3333px, ThreeDHighlight 21.3333px, - ThreeDHighlight 22px, #f1f5fb 22px); - } - } - - @media (min-resolution: 2dppx) { - #appmenuPrimaryPane menupopup { - background-image: linear-gradient(to right, white 19.5px, ThreeDLightShadow 19.5px, - ThreeDLightShadow 20px, ThreeDHighlight 20px, - ThreeDHighlight 20.5px, white 20.5px); - } - #appmenuSecondaryPane menupopup { - background-image: linear-gradient(to right, #f1f5fb 19.5px, ThreeDLightShadow 19.5px, - ThreeDLightShadow 20px, ThreeDHighlight 20px, - ThreeDHighlight 20.5px, #f1f5fb 20.5px); - } - #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, white 19.5px, ThreeDLightShadow 19.5px, - ThreeDLightShadow 20px, ThreeDHighlight 20px, - ThreeDHighlight 20.5px, white 20.5px); - } - #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) { - background-image: linear-gradient(to left, #f1f5fb 19.5px, ThreeDLightShadow 19.5px, - ThreeDLightShadow 20px, ThreeDHighlight 20px, - ThreeDHighlight 20.5px, #f1f5fb 20.5px); - } - } - - .appmenu-menuseparator { - -moz-appearance: none; - margin-top: 3px; - margin-bottom: 3px; - margin-inline-start: 30px; - padding: 0; - border-top: 1px solid #d6e5f5; - border-bottom: none; - } - - @media (min-resolution: 1.25dppx) { - .appmenu-menuseparator { - margin-inline-start: 25px; - } - } - @media (min-resolution: 1.5dppx) { - .appmenu-menuseparator { - margin-inline-start: 24px; - } - } - @media (min-resolution: 2dppx) { - .appmenu-menuseparator { - margin-inline-start: 22px; - } - } - - .appmenu-edit-button:not([disabled]):hover { - border: 1px solid #b8d6fb; - box-shadow: inset 0 0 1px white; - background: linear-gradient(#fafbfd, #ebf3fd); - transition: .2s ease-in; - } -} - -#appmenuSecondaryPane-spacer { - min-height: 1em; -} - -#appmenu-editmenu { - -moz-box-pack: end; -} - -#appmenu_print, -#appmenu_print_popup, -.appmenu-edit-button, -#appmenu-editmenu-cut, -#appmenu-editmenu-copy, -#appmenu-editmenu-paste, -#appmenu-quit { - list-style-image: url("appmenu-icons.png"); -} - -#appmenu-cut, -#appmenu-editmenu-cut { - -moz-image-region: rect(0 16px 16px 0); -} - -#appmenu-copy, -#appmenu-editmenu-copy { - -moz-image-region: rect(0 32px 16px 16px); -} - -#appmenu-paste, -#appmenu-editmenu-paste { - -moz-image-region: rect(0 48px 16px 32px); -} - -#appmenu_print, -#appmenu_print_popup { - -moz-image-region: rect(0 64px 16px 48px); -} - -#appmenu-quit { - -moz-image-region: rect(0 80px 16px 64px); -} - -#appmenu-edit-label { - -moz-appearance: none; - background: transparent; - font-style: italic; -} - -#appmenu_bookmarks { - list-style-image: url("chrome://browser/skin/places/bookmark.png"); - -moz-image-region: rect(0px 48px 16px 32px); -} - -#appmenu_privateBrowsing, -#appmenu_newPrivateWindow { - list-style-image: url("chrome://browser/skin/Privacy-16.png"); -} - -@media (min-resolution: 1.25dppx) { - #appmenu_privateBrowsing, - #appmenu_newPrivateWindow { - list-style-image: url("chrome://browser/skin/Privacy-32.png"); - } -} - -#appmenu_addons { - list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png"); -} - -@media (min-resolution: 1.25dppx) { - #appmenu_addons { - list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.png"); - } -} - -#appmenu_showAllBookmarks, -#bookmarksShowAll, -#BMB_bookmarksShowAll { - list-style-image: url("chrome://browser/skin/places/allBookmarks.png"); -} - -#appmenu_bookmarkThisPage, -#menu_bookmarkThisPage, -#BMB_bookmarkThisPage { - list-style-image: url("chrome://browser/skin/places/bookmark.png"); - -moz-image-region: rect(0 16px 16px 0); -} - -#appmenu_showAllHistory, -#menu_showAllHistory, -#HMB_showAllHistory { - list-style-image: url("chrome://browser/skin/places/history.png"); -} - -#appmenu_sanitizeHistory, -#sanitizeItem, -#HMB_sanitizeItem { - list-style-image: url("chrome://browser/skin/sanitize.png"); -} - -/* ::::: titlebar ::::: */ - -#main-window[sizemode="normal"] > #titlebar { - -moz-appearance: -moz-window-titlebar; -} - -#main-window[sizemode="maximized"] > #titlebar { - -moz-appearance: -moz-window-titlebar-maximized; -} - -@media (-moz-windows-classic) { - #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container { - margin-top: 4px; - } -} - -#titlebar-buttonbox { - -moz-appearance: -moz-window-button-box; -} - -#main-window[sizemode="maximized"] #titlebar-buttonbox { - -moz-appearance: -moz-window-button-box-maximized; -} - -.titlebar-placeholder[type="appmenu-button"] { - margin-left: 4px; -} - -.titlebar-placeholder[type="caption-buttons"] { - margin-left: 22px; /* additional space for Aero Snap */ -} - -/* titlebar command buttons */ - -#titlebar-min { - -moz-appearance: -moz-window-button-minimize; -} - -#titlebar-max { - -moz-appearance: -moz-window-button-maximize; -} - -#main-window[sizemode="maximized"] #titlebar-max { - -moz-appearance: -moz-window-button-restore; -} - -#titlebar-close { - -moz-appearance: -moz-window-button-close; -} - -@media not all and (-moz-windows-classic) { - #titlebar-min { - margin-inline-end: 2px; - } -} - -/* ::::: bookmark buttons ::::: */ - -toolbarbutton.bookmark-item { - margin: 0; - padding: 2px 3px; -} - -toolbarbutton.bookmark-item:hover:active:not([disabled="true"]), -toolbarbutton.bookmark-item[open="true"] { - padding-top: 3px; - padding-bottom: 1px; - padding-inline-start: 4px; - padding-inline-end: 2px; -} - -.bookmark-item:not(#bookmarks-menu-button) > .toolbarbutton-icon { - width: 16px; - height: 16px; -} - -/* Prevent [mode="icons"] from hiding the label */ -.bookmark-item > .toolbarbutton-text { - display: -moz-box !important; -} - -.bookmark-item > .toolbarbutton-menu-dropmarker { - display: none; -} - -#wrapper-personal-bookmarks[place="palette"] > .toolbarpaletteitem-box { - background: url("chrome://browser/skin/places/bookmarksToolbar.png") no-repeat center; -} - -.bookmarks-toolbar-customize { - max-width: 15em !important; - list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important; -} - -/* ::::: bookmark menus ::::: */ - -menu.bookmark-item, -menuitem.bookmark-item { - min-width: 0; - max-width: 32em; -} - -.bookmark-item > .menu-iconic-left { - margin-top: 0; - margin-bottom: 0; -} - -.bookmark-item > .menu-iconic-left > .menu-iconic-icon { - padding-inline-start: 0px; -} - -/* ::::: bookmark items ::::: */ - -.bookmark-item { - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -.bookmark-item[container] { - list-style-image: url("chrome://global/skin/icons/folder-item.png"); - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -.bookmark-item[container][open] { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} - -.bookmark-item[container][livemark] { - list-style-image: url("chrome://browser/skin/livemark-folder.png"); - -moz-image-region: auto; -} - -.bookmark-item[container][livemark] .bookmark-item { - list-style-image: url("chrome://browser/skin/places/livemark-item.png"); - -moz-image-region: rect(0px, 16px, 16px, 0px); -} - -.bookmark-item[container][livemark] .bookmark-item[visited] { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -.bookmark-item[container][query] { - list-style-image: url("chrome://browser/skin/places/query.png"); - -moz-image-region: auto; -} - -.bookmark-item[query][tagContainer] { - list-style-image: url("chrome://browser/skin/places/tag.png"); - -moz-image-region: auto; -} - -.bookmark-item[query][dayContainer] { - list-style-image: url("chrome://browser/skin/places/calendar.png"); - -moz-image-region: auto; -} - -.bookmark-item[query][hostContainer] { - list-style-image: url("chrome://global/skin/icons/folder-item.png"); - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -.bookmark-item[query][hostContainer][open] { - list-style-image: url("chrome://global/skin/icons/folder-item.png"); - -moz-image-region: rect(16px, 32px, 32px, 16px); -} - -.bookmark-item[cutting] > .toolbarbutton-icon, -.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon { - opacity: 0.5; -} - -.bookmark-item[cutting] > .toolbarbutton-text, -.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text { - opacity: 0.7; -} - -/* ::::: primary toolbar buttons ::::: */ - -.toolbarbutton-1 { - list-style-image: var(--toolbarbutton-image); -} - -toolbar[brighttext] .toolbarbutton-1 { - list-style-image: var(--toolbarbutton-inverted-image); -} - -.toolbarbutton-1:not(:-moz-lwtheme) { - list-style-image: var(--toolbarbutton-glass-image); -} - -.toolbarbutton-1[disabled=true] > .toolbarbutton-icon, -.toolbarbutton-1[disabled=true] > .toolbarbutton-menu-dropmarker, -.toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-dropmarker, -.toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-button > .toolbarbutton-icon, -.toolbarbutton-1 > .toolbarbutton-menubutton-button[disabled] > .toolbarbutton-icon { - opacity: .4; -} - -.toolbarbutton-1 > .toolbarbutton-menu-dropmarker, -.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker { - list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow.png"); -} - -toolbar[brighttext] .toolbarbutton-1 > .toolbarbutton-menu-dropmarker, -toolbar[brighttext] .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker { - list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png"); -} - -.toolbarbutton-1 > .toolbarbutton-icon, -.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon { - margin-inline-end: 0; -} - -toolbar[mode=full] .toolbarbutton-1:not([type=menu-button]) { - -moz-box-orient: vertical; -} - -toolbar[mode=full] .toolbarbutton-1, -toolbar[mode=full] .toolbarbutton-1 > .toolbarbutton-menubutton-button { - min-width: 57px; -} - -#nav-bar { - /* force iconsize="small" on this toolbar */ - counter-reset: smallicons; -} - -@navbarLargeIcons@ .toolbarbutton-1, -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button { - -moz-appearance: none; - border: none; - padding: 0; - background: none; -} - -@navbarLargeIcons@ .toolbarbutton-1:not([type=menu-button]), -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button, -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker { - padding: 5px 2px; - -moz-box-pack: center; -} - -@navbarLargeIcons@ .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button) { - padding-left: 5px; - padding-right: 5px; -} - -@navbarLargeIcons@ .toolbarbutton-1 > menupopup { - margin-top: -3px; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button { - padding-inline-end: 0; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker { - padding-inline-start: 0; - -moz-box-align: center; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-badge-stack, -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { - padding: 2px 6px; - background: var(--toolbarbutton-background-color) padding-box; - background-image: linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,100%,.1)); - background-clip: padding-box; - border-radius: var(--toolbarbutton-border-radius); - border: 1px solid; - border-color: var(--toolbarbutton-border-color) var(--toolbarbutton-border-color) var(--toolbarbutton-border-color); - box-shadow: 0 1px hsla(0,0%,100%,.05) inset, - 0 1px hsla(210,54%,20%,.05), - 0 0 2px hsla(210,54%,20%,.05); -} - -@media (-moz-os-version: windows-win10) { - /* Square is the new round, courtesy of microsoft */ - :root { - --toolbarbutton-border-radius: 0px; - } -} - -@navbarLargeIcons@ .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-badge-stack, -@navbarLargeIcons@ .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-menubutton-button > .toolbarbutton-icon { - padding: 3px 7px; -} - -@navbarLargeIcons@ .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button) > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1[type=menu] > .toolbarbutton-text /* hack for add-ons that forcefully display the label */ { - padding-inline-end: 17px; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menu-dropmarker { - margin-inline-start: -15px; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon { - border-inline-end: none; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { - padding: 8px 5px 7px; -} - -@navbarLargeIcons@ .toolbarbutton-1:not(:hover):not(:active):not([open]) > .toolbarbutton-menubutton-dropmarker::before { - content: ""; - display: -moz-box; - width: 1px; - height: 18px; - margin-inline-end: -1px; - background-image: linear-gradient(var(--toolbarbutton-border-color) 0, var(--toolbarbutton-border-color) 18px); - background-clip: padding-box; - background-position: center; - background-repeat: no-repeat; - background-size: 1px 18px; - box-shadow: 0 0 0 1px hsla(0,0%,100%,.2); -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon:-moz-locale-dir(ltr), -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon:-moz-locale-dir(rtl) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon:-moz-locale-dir(rtl), -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon:-moz-locale-dir(ltr) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -@navbarLargeIcons@ .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-stack, -@navbarLargeIcons@ .toolbarbutton-1:not([disabled]):-moz-any(:hover,[open]) > .toolbarbutton-menubutton-button > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1:not([disabled]):hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon { - background-image: linear-gradient(hsla(0,0%,100%,.8), hsla(0,0%,100%,.5)); - border-color: hsla(210,54%,20%,.25) hsla(210,54%,20%,.3) hsla(210,54%,20%,.35); - box-shadow: 0 1px hsla(0,0%,100%,.3) inset, - 0 1px hsla(210,54%,20%,.03), - 0 0 2px hsla(210,54%,20%,.1); -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):not([open]):not(:active):hover > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon { - background-color: hsla(210,48%,96%,.75); - border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4); - box-shadow: 0 0 1px hsla(210,54%,20%,.03), - 0 0 2px hsla(210,54%,20%,.1); -} - -@navbarLargeIcons@ .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-stack, -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover:active > .toolbarbutton-icon, -@navbarLargeIcons@ .toolbarbutton-1[open] > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon { - background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1)); - background-color: hsla(210,54%,20%,.15); - border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4); - box-shadow: 0 1px 1px hsla(210,54%,20%,.1) inset, - 0 0 1px var(--toolbarbutton-border-color) inset, - /* allows windows-keyhole-forward-clip-path to be used for non-hover as well as hover: */ - 0 1px 0 hsla(210,54%,20%,0), - 0 0 2px hsla(210,54%,20%,0); - text-shadow: none; -} - -@navbarLargeIcons@ .toolbarbutton-1:-moz-any(:hover,[open]) > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon { - border-inline-start-color: hsla(210,54%,20%,.35); -} - -@navbarLargeIcons@ .toolbarbutton-1[checked]:not(:active):hover > .toolbarbutton-icon { - background-color: rgba(90%,90%,90%,.4); - transition: background-color .4s; -} - -:-moz-any(#TabsToolbar, #addon-bar) .toolbarbutton-1, -:-moz-any(#TabsToolbar, #addon-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button, -.tabbrowser-arrowscrollbox > .scrollbutton-up, -.tabbrowser-arrowscrollbox > .scrollbutton-down { - -moz-appearance: none; - border-style: none; - padding: 0 3px; -} - -#TabsToolbar .toolbarbutton-1:not([disabled]):hover, -#TabsToolbar .toolbarbutton-1[open], -#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover, -.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):hover, -.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):hover { - background-image: linear-gradient(var(--toolbar-highlight-bottom), var(--toolbar-highlight-top)), - linear-gradient(transparent, rgba(0,0,0,.25) 30%), - linear-gradient(transparent, rgba(0,0,0,.25) 30%); - background-position: 1px -1px, 0 -1px, 100% -1px; - background-size: calc(100% - 2px) 100%, 1px 100%, 1px 100%; - background-repeat: no-repeat; -} - -#addon-bar .toolbarbutton-1:not([disabled]):hover, -#addon-bar .toolbarbutton-1[open], -#addon-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover { - background-image: linear-gradient(to top, transparent, rgba(0,0,0,.15)), - linear-gradient(to top, transparent, rgba(0,0,0,.15) 30%), - linear-gradient(to top, transparent, rgba(0,0,0,.15) 30%); - background-position: left, left, right; - background-size: auto, 1px 100%, 1px 100%; - background-repeat: no-repeat; -} - -/* unified back/forward button */ - -#back-button { - -moz-image-region: rect(0, 18px, 18px, 0); -} - -#forward-button { - -moz-image-region: rect(0, 36px, 18px, 18px); -} - -#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon, -#forward-button:-moz-locale-dir(rtl), -#forward-button:-moz-locale-dir(rtl) > .toolbarbutton-text { - transform: scaleX(-1); -} - -@conditionalForwardWithUrlbar@ { - -moz-box-align: center; -} - -@conditionalForwardWithUrlbar@ > .toolbarbutton-1:-moz-any([disabled],:not([disabled]):not([open]):not(:active)) > .toolbarbutton-icon { - border-color: hsla(210,54%,20%,.25) hsla(210,54%,20%,.3) hsla(210,54%,20%,.35); - box-shadow: 0 1px hsla(0,0%,100%,.3) inset, - 0 1px hsla(210,54%,20%,.03), - 0 0 2px hsla(210,54%,20%,.1); -} - -@conditionalForwardWithUrlbar@ > #forward-button { - padding: 0; -} - -@conditionalForwardWithUrlbar@ > #forward-button > menupopup { - margin-top: 1px; -} - -@conditionalForwardWithUrlbar@ > #forward-button > .toolbarbutton-icon { - clip-path: url(chrome://browser/content/browser.xul#windows-keyhole-forward-clip-path); - margin-inline-start: -6px !important; - border-left-style: none; - border-radius: 0; - padding-left: 7px; - padding-right: 3px; -} - -@conditionalForwardWithUrlbar2@ > #forward-button:-moz-locale-dir(ltr) > .toolbarbutton-icon { - border-top-right-radius: var(--toolbarbutton-border-radius); - border-bottom-right-radius: var(--toolbarbutton-border-radius); -} - -@conditionalForwardWithUrlbar2@ > #forward-button:-moz-locale-dir(rtl) > .toolbarbutton-icon { - border-top-left-radius: var(--toolbarbutton-border-radius); - border-bottom-left-radius: var(--toolbarbutton-border-radius); -} - -@conditionalForwardWithUrlbar@ > #forward-button:not([disabled]):not([open]):not(:active):hover > .toolbarbutton-icon { - background-color: hsla(210,48%,96%,.75); - border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4); - box-shadow: 0 0 1px hsla(210,54%,20%,.03), - 0 0 2px hsla(210,54%,20%,.1); -} - -@conditionalForwardWithUrlbar@ > #back-button { - -moz-image-region: rect(18px, 20px, 38px, 0); - padding-top: 3px; - padding-bottom: 3px; - padding-inline-start: 5px; - padding-inline-end: 0; - position: relative; - z-index: 1; - border-radius: 0 10000px 10000px 0; -} - -@conditionalForwardWithUrlbar@ > #back-button:-moz-locale-dir(rtl) { - border-radius: 10000px 0 0 10000px; -} - -@conditionalForwardWithUrlbar@ > #back-button > menupopup { - margin-top: -1px; -} - -@conditionalForwardWithUrlbar@ > #back-button > .toolbarbutton-icon { - border-radius: 10000px; - padding: 5px; - border: none; - box-shadow: 0 1px 0 hsla(0,0%,100%,.3) inset, - 0 0 0 1px hsla(0,0%,100%,.3) inset, - 0 0 0 1px hsla(210,54%,20%,.25), - 0 1px 0 hsla(210,54%,20%,.35); -} - -@conditionalForwardWithUrlbar@ > #back-button:not([disabled="true"]):not([open="true"]):not(:active):hover > .toolbarbutton-icon { - background-color: hsla(210,48%,96%,.75); - box-shadow: 0 1px 0 hsla(0,0%,100%,.3) inset, - 0 0 0 1px hsla(0,0%,100%,.3) inset, - 0 0 0 1px hsla(210,54%,20%,.3), - 0 1px 0 hsla(210,54%,20%,.4), - 0 0 4px var(--toolbarbutton-border-color); -} - -@conditionalForwardWithUrlbar@ > #back-button:not([disabled="true"]):hover:active > .toolbarbutton-icon, -@conditionalForwardWithUrlbar@ > #back-button[open="true"] > .toolbarbutton-icon { - background-color: hsla(210,54%,20%,.15); - box-shadow: 0 1px 1px hsla(210,54%,20%,.1) inset, - 0 0 1px var(--toolbarbutton-border-color) inset, - 0 0 0 1px hsla(210,54%,20%,.4), - 0 1px 0 var(--toolbarbutton-border-color); -} - -@conditionalForwardWithUrlbar@ > #back-button[disabled] > .toolbarbutton-icon { - box-shadow: 0 0 0 1px hsla(210,54%,20%,.55), - 0 1px 0 hsla(210,54%,20%,.65); -} - -.unified-nav-back[_moz-menuactive]:-moz-locale-dir(ltr), -.unified-nav-forward[_moz-menuactive]:-moz-locale-dir(rtl) { - list-style-image: url("chrome://browser/skin/menu-back.png") !important; -} - -.unified-nav-forward[_moz-menuactive]:-moz-locale-dir(ltr), -.unified-nav-back[_moz-menuactive]:-moz-locale-dir(rtl) { - list-style-image: url("chrome://browser/skin/menu-forward.png") !important; -} - -#stop-button { - -moz-image-region: rect(0, 54px, 18px, 36px); -} - -#reload-button { - -moz-image-region: rect(0, 72px, 18px, 54px); -} - -#home-button.bookmark-item { - list-style-image: var(--toolbarbutton-image); -} -toolbar[brighttext] #home-button.bookmark-item { - list-style-image: var(--toolbarbutton-inverted-image); -} - -#home-button.bookmark-item:not(:-moz-lwtheme) { - list-style-image: var(--toolbarbutton-glass-image); -} - -#home-button { - -moz-image-region: rect(0, 90px, 18px, 72px); -} - -#downloads-button { - -moz-image-region: rect(0, 108px, 18px, 90px); -} - -#history-button, -#history-menu-button { - -moz-image-region: rect(0, 126px, 18px, 108px); -} - -#bookmarks-button, -#bookmarks-menu-button { - -moz-image-region: rect(0, 144px, 18px, 126px); -} - -#bookmarks-menu-button.bookmark-item { - list-style-image: var(--toolbarbutton-image); -} - -toolbar[brighttext] #bookmarks-menu-button.bookmark-item { - list-style-image: var(--toolbarbutton-inverted-image); -} - -#bookmarks-menu-button.bookmark-item:not(:-moz-lwtheme) { - list-style-image: var(--toolbarbutton-glass-image); -} - -#print-button { - -moz-image-region: rect(0, 162px, 18px, 144px); -} - -#new-tab-button { - -moz-image-region: rect(0, 180px, 18px, 162px); -} - -#new-window-button { - -moz-image-region: rect(0, 198px, 18px, 180px); -} - -#cut-button { - -moz-image-region: rect(0, 216px, 18px, 198px); -} - -#copy-button { - -moz-image-region: rect(0, 234px, 18px, 216px); -} - -#paste-button { - -moz-image-region: rect(0, 252px, 18px, 234px); -} - -#fullscreen-button { - -moz-image-region: rect(0, 270px, 18px, 252px); -} - -#zoom-out-button { - -moz-image-region: rect(0, 288px, 18px, 270px); -} - -#zoom-in-button { - -moz-image-region: rect(0, 306px, 18px, 288px); -} - -#sync-button { - -moz-image-region: rect(0, 324px, 18px, 306px); -} -#sync-button[status="active"] { - list-style-image: url("chrome://browser/skin/sync-throbber.png"); - -moz-image-region: rect(0, 18px, 18px, 0); -} - -#feed-button { - -moz-image-region: rect(0, 342px, 18px, 324px); -} - -%ifdef MOZ_WEBRTC -#webrtc-status-button { - -moz-image-region: rect(0, 360px, 18px, 342px); -} -%endif - -/* ::::: fullscreen window controls ::::: */ - -#window-controls { - -moz-box-align: start; - /* Make sure the window controls are always last on the toolbar */ - -moz-box-ordinal-group: 100; - margin-inline-start: 4px; -} - -#minimize-button, -#restore-button, -#close-button { - -moz-appearance: none; - border-style: none; - list-style-image: url("chrome://global/skin/icons/windowControls.png"); - margin: 0; - padding: 0; -} - -#minimize-button { - -moz-image-region: rect(0, 16px, 16px, 0); -} - -#minimize-button:hover { - -moz-image-region: rect(16px, 16px, 32px, 0); -} - -#minimize-button:hover:active { - -moz-image-region: rect(32px, 16px, 48px, 0); -} - -#restore-button { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -#restore-button:hover { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} - -#restore-button:hover:active { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} - -#close-button { - -moz-image-region: rect(0, 49px, 16px, 32px); -} - -#close-button:hover { - -moz-image-region: rect(16px, 49px, 32px, 32px); -} - -#close-button:hover:active { - -moz-image-region: rect(32px, 49px, 48px, 32px); -} - -#minimize-button:-moz-locale-dir(rtl), -#restore-button:-moz-locale-dir(rtl), -#close-button:-moz-locale-dir(rtl) { - transform: scaleX(-1); -} - -@media (-moz-os-version: windows-win10) { - #window-controls { - margin-inline-start: 0; - } - - #window-controls > toolbarbutton { - margin: 0; - padding: 2px 4px; - transition: background-color linear 120ms; - } - - #minimize-button, - #restore-button, - #close-button, - #minimize-button:hover, - #restore-button:hover, - #close-button:hover, - #minimize-button:hover:active, - #restore-button:hover:active, - #close-button:hover:active { - -moz-image-region: auto; - } -} - -/* ::::: Location Bar ::::: */ - -#urlbar, -.searchbar-textbox { - -moz-appearance: none; - margin: 1px 3px; - padding: 0; - background-clip: padding-box; - border: 1px solid ThreeDShadow; - border-radius: 2px; -} - -#urlbar { - width: 7em; - padding-inline-end: 2px; -} - -@media (-moz-windows-default-theme) { - #urlbar, - .searchbar-textbox { - @navbarTextboxCustomBorder@ - } -} - -#urlbar:-moz-lwtheme, -.searchbar-textbox:-moz-lwtheme { - background-color: rgba(255,255,255,.8); - @navbarTextboxCustomBorder@ - color: black; -} - -@conditionalForwardWithUrlbar@ + #urlbar-container { - padding-left: @conditionalForwardWithUrlbarWidth@px; - margin-inline-start: -@conditionalForwardWithUrlbarWidth@px; - position: relative; - pointer-events: none; -} - -@conditionalForwardWithUrlbar@ + #urlbar-container > #urlbar { - border-inline-start: none; - margin-left: 0; - pointer-events: all; -} - -@conditionalForwardWithUrlbar@:not([switchingtabs]) + #urlbar-container > #urlbar { - transition: margin-left @forwardTransitionLength@ ease-out; -} - -@conditionalForwardWithUrlbar@ + #urlbar-container > #urlbar:-moz-locale-dir(ltr) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -@conditionalForwardWithUrlbar@ + #urlbar-container > #urlbar:-moz-locale-dir(rtl) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -@conditionalForwardWithUrlbar@[forwarddisabled] + #urlbar-container { - clip-path: url("chrome://browser/content/browser.xul#windows-urlbar-back-button-clip-path"); -} - -@conditionalForwardWithUrlbar@ + #urlbar-container:-moz-locale-dir(rtl), -@conditionalForwardWithUrlbar@ + #urlbar-container > #urlbar:-moz-locale-dir(rtl) { - /* let windows-urlbar-back-button-mask clip the urlbar's right side for RTL */ - transform: scaleX(-1); -} - -html|*.urlbar-input:-moz-lwtheme::-moz-placeholder, -.searchbar-textbox:-moz-lwtheme > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input::-moz-placeholder { - opacity: 1.0; - color: #777; -} - -#urlbar:-moz-lwtheme[focused="true"], -.searchbar-textbox:-moz-lwtheme[focused="true"] { - background-color: white; -} - -#urlbar-container { - -moz-box-orient: horizontal; - -moz-box-align: stretch; -} - -.urlbar-textbox-container { - -moz-box-align: stretch; -} - -.urlbar-input-box { - margin-inline-start: 0; - min-width: 4em; -} - -#urlbar-icons { - -moz-box-align: center; -} - -.urlbar-icon { - padding: 0 3px; -} - -.searchbar-engine-button, -.search-go-container { - padding: 2px 2px; -} - -.urlbar-icon:hover { - background-image: radial-gradient(circle closest-side, hsla(200,100%,70%,.3), hsla(200,100%,70%,0)); -} - -.urlbar-icon[open="true"], -.urlbar-icon:hover:active { - background-image: radial-gradient(circle closest-side, hsla(200,100%,70%,.1), hsla(200,100%,70%,0)); -} - -#urlbar-search-splitter { - min-width: 6px; - margin-inline-start: -3px; - border: none; - background: transparent; -} - -#urlbar-search-splitter + #urlbar-container > #urlbar , -#urlbar-search-splitter + #search-container > #searchbar > .searchbar-textbox { - margin-inline-start: 0; -} - -#urlbar-display-box { - border-inline-end: 1px solid #AAA; - margin-inline-end: 3px; -} - -#urlbar-display { - margin-top: 0; - margin-bottom: 0; - margin-inline-start: 0; - color: GrayText; -} - -/* identity box */ - -#identity-box { - padding: 2px; - font-size: .9em; -} - -#identity-box:-moz-locale-dir(ltr) { - border-top-left-radius: 1.5px; - border-bottom-left-radius: 1.5px; -} - -#identity-box:-moz-locale-dir(rtl) { - border-top-right-radius: 1.5px; - border-bottom-right-radius: 1.5px; -} - -#notification-popup-box:not([hidden]) + #identity-box { - padding-inline-start: 10px; - border-radius: 0; -} - -@conditionalForwardWithUrlbar@ + #urlbar-container > #urlbar > #identity-box { - border-radius: 0; -} - -#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity { - color: hsl(92,100%,20%); - margin-inline-end: 4px; - background-image: -moz-linear-gradient(hsla(92,81%,16%,0), - hsla(92,81%,16%,.08) 25%, - hsla(92,81%,16%,.08) 75%, - hsla(92,81%,16%,0)); - background-position: right; - background-repeat: no-repeat; - border-right: 1px solid hsla(92,100%,20%,0.5); -} - -#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain { - color: rgb(0,79,168); - margin-inline-end: 4px; - background-image: -moz-linear-gradient(rgba(0,79,168,0), - rgba(0,79,168,.08) 25%, - rgba(0,79,168,.08) 75%, - rgba(0,79,168,0)); - background-position: right; - background-repeat: no-repeat; - border-right: 1px solid rgba(0,79,168,0.5); -} - -#urlbar[pageproxystate="valid"] > #identity-box.mixedContent { - color: rgb(79,79,0); - margin-inline-end: 4px; - background-image: -moz-linear-gradient(rgba(79,79,0,0), - rgba(79,79,0,.08) 25%, - rgba(79,79,0,.08) 75%, - rgba(79,79,0,0)); - background-position: right; - background-repeat: no-repeat; - border-right: 1px solid rgba(79,79,0,0.5); -} - -#identity-box.verifiedIdentity:-moz-locale-dir(rtl) { - background-position: left; - border-right: none; - border-left: 1px solid hsla(92,100%,20%,0.5); -} - -#identity-box.verifiedDomain:-moz-locale-dir(rtl) { - background-position: left; - border-right: none; - border-left: 1px solid rgba(0,79,168,0.5); -} - -#identity-box.mixedContent:-moz-locale-dir(rtl) { - background-position: left; - border-right: none; - border-left: 1px solid rgba(79,79,0,0.5); -} - -#identity-box:-moz-focusring { - outline: 1px dotted #000; - outline-offset: -3px; -} - -#identity-icon-labels { - padding-inline-start: 2px; - padding-inline-end: 5px; -} - -/* Address bar shading for SSL */ - -#urlbar[https_color="all"][security_level="broken"], -#urlbar[https_color="all"][security_level="low"] { - box-shadow: inset 0 0 2px rgb(168,0,0); -} - -#urlbar[https_color="all"][security_level="mixed"], -#urlbar[https_color="secure-mixed"][security_level="mixed"] { - box-shadow: inset 0 0 2px rgb(168,79,0); -} - -#urlbar[https_color="all"][security_level="high"], -#urlbar[https_color="secure-mixed"][security_level="high"], -#urlbar[https_color="secure-only"][security_level="high"] { - box-shadow: inset 0 0 2px rgb(0,79,168); -} - -#urlbar[https_color="all"][security_level="ev"], -#urlbar[https_color="secure-mixed"][security_level="ev"], -#urlbar[https_color="secure-only"][security_level="ev"] { - box-shadow: inset 0 0 2px rgb(0,168,0); -} - -#urlbar[https_color="all"][security_level="broken"]:not(:-moz-lwtheme), -#urlbar[https_color="all"][security_level="low"]:not(:-moz-lwtheme) { - box-shadow: inset 0 0 3px rgba(168,0,0,0.8); -} - -#urlbar[https_color="all"][security_level="mixed"]:not(:-moz-lwtheme), -#urlbar[https_color="secure-mixed"][security_level="mixed"]:not(:-moz-lwtheme) { - box-shadow: inset 0 0 3px rgba(168,79,0,0.8); -} - -#urlbar[https_color="all"][security_level="high"]:not(:-moz-lwtheme), -#urlbar[https_color="secure-mixed"][security_level="high"]:not(:-moz-lwtheme), -#urlbar[https_color="secure-only"][security_level="high"]:not(:-moz-lwtheme) { - box-shadow: inset 0 0 3px rgba(0,79,168,0.8); -} - -#urlbar[https_color="all"][security_level="ev"]:not(:-moz-lwtheme), -#urlbar[https_color="secure-mixed"][security_level="ev"]:not(:-moz-lwtheme), -#urlbar[https_color="secure-only"][security_level="ev"]:not(:-moz-lwtheme) { - box-shadow: inset 0 0 3px rgba(0,168,0,0.8); -} - -/* Location bar dropmarker */ - -.urlbar-history-dropmarker { - -moz-appearance: none; - padding: 0 3px; - background-color: transparent; - border: none; - width: auto; - list-style-image: url("chrome://browser/skin/urlbar-history-dropmarker.png"); - -moz-image-region: rect(0px, 11px, 14px, 0px); -} - -.urlbar-history-dropmarker:hover { - background-image: radial-gradient(circle closest-side, hsla(205,100%,70%,.3), hsla(205,100%,70%,0)); - -moz-image-region: rect(0px, 22px, 14px, 11px); -} - -.urlbar-history-dropmarker:hover:active, -.urlbar-history-dropmarker[open="true"] { - background-image: radial-gradient(circle closest-side, hsla(205,100%,70%,.1), hsla(205,100%,70%,0)); - -moz-image-region: rect(0px, 33px, 14px, 22px); -} - -/* page proxy icon */ - -#page-proxy-favicon { - width: 16px; - height: 16px; - margin-top: 1px; - margin-bottom: 1px; - margin-inline-start: 3px; - margin-inline-end: 2px; - list-style-image: url(chrome://browser/skin/identity-icons-generic.png); - -moz-image-region: rect(0, 16px, 16px, 0); -} - -@conditionalForwardWithUrlbar@ + #urlbar-container > #urlbar > #identity-box > #page-proxy-favicon { - margin-inline-end: 1px; -} - -/* Since we already have a padlock, always use the generic icon until the favicon loads -.verifiedDomain > #page-proxy-favicon[pageproxystate="valid"] { - list-style-image: url(chrome://browser/skin/identity-icons-https.png); -} - -.verifiedIdentity > #page-proxy-favicon[pageproxystate="valid"] { - list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png); -} - -.mixedActiveContent > #page-proxy-favicon[pageproxystate="valid"] { - list-style-image: url(chrome://browser/skin/identity-icons-https-mixed-active.png); -} -*/ - -#identity-box:hover > #page-proxy-favicon { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -#identity-box:hover:active > #page-proxy-favicon, -#identity-box[open=true] > #page-proxy-favicon { - -moz-image-region: rect(0, 48px, 16px, 32px); -} - -#page-proxy-favicon[pageproxystate="invalid"] { - opacity: 0.3; -} - -/* autocomplete */ - -#treecolAutoCompleteImage { - max-width: 36px; -} - -.ac-result-type-bookmark, -.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteImage) { - list-style-image: url("chrome://browser/skin/places/bookmark.png"); - -moz-image-region: rect(0px 48px 16px 32px); - width: 16px; - height: 16px; -} - -.ac-result-type-keyword, -.autocomplete-treebody::-moz-tree-image(keyword, treecolAutoCompleteImage) { - list-style-image: url(chrome://global/skin/icons/Search-glass.png); - -moz-image-region: rect(0px 32px 16px 16px); - width: 16px; - height: 16px; -} - -.ac-result-type-tag, -.autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) { - list-style-image: url("chrome://browser/skin/places/tag.png"); - width: 16px; - height: 16px; -} - -.ac-comment { - font-size: 1.06em; -} - -.ac-extra > .ac-comment { - font-size: 1em; -} - -.ac-url-text, -.ac-action-text { - font-size: 1em; - color: -moz-nativehyperlinktext; -} - -richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-icon { - list-style-image: url("chrome://browser/skin/actionicon-tab.png"); - -moz-image-region: rect(0, 16px, 11px, 0); - padding: 0 3px; -} - -@media not all and (-moz-os-version: windows-vista), - not all and (-moz-windows-default-theme) { - @media not all and (-moz-os-version: windows-win7), - not all and (-moz-windows-default-theme) { - richlistitem[type~="action"][actiontype$="tab"][selected="true"] > .ac-url-box > .ac-action-icon { - -moz-image-region: rect(11px, 16px, 22px, 0); - } - - .ac-comment[selected="true"], - .ac-url-text[selected="true"], - .ac-action-text[selected="true"] { - color: inherit !important; - } - } -} - -.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) { - color: GrayText; -} - -.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment), -.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) -{ - color: GrayText; - font-size: smaller; -} - -.autocomplete-treebody::-moz-tree-cell(suggesthint) { - border-top: 1px solid GrayText; -} - -/* combined go/reload/stop button in location bar */ - -#go-button, -#urlbar > toolbarbutton { - -moz-appearance: none; - padding: 0 2px; - background-origin: border-box; - border: none; - list-style-image: url("chrome://browser/skin/reload-stop-go.png"); -} - -#go-button { - padding: 0 3px; -} - -#urlbar-reload-button { - -moz-image-region: rect(0, 14px, 14px, 0); -} - -#urlbar-reload-button:not([disabled]):hover { - background-image: radial-gradient(circle closest-side, hsla(200,100%,70%,.2), hsla(200,100%,70%,0)); - -moz-image-region: rect(14px, 14px, 28px, 0); -} - -#urlbar-reload-button:not([disabled]):hover:active { - background-image: radial-gradient(circle closest-side, hsla(200,100%,60%,.1), hsla(200,100%,60%,0)); - -moz-image-region: rect(28px, 14px, 42px, 0); -} - -#urlbar-reload-button:-moz-locale-dir(rtl) > .toolbarbutton-icon { - transform: scaleX(-1); -} - -#go-button, -#urlbar-go-button { - -moz-image-region: rect(0, 42px, 14px, 28px); -} - -#go-button:hover, -#urlbar-go-button:hover { - background-image: radial-gradient(circle closest-side, hsla(110,70%,50%,.2), hsla(110,70%,50%,0)); - -moz-image-region: rect(14px, 42px, 28px, 28px); -} - -#go-button:hover:active, -#urlbar-go-button:hover:active { - background-image: radial-gradient(circle closest-side, hsla(110,70%,50%,.1), hsla(110,70%,50%,0)); - -moz-image-region: rect(28px, 42px, 42px, 28px); -} - -#go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon, -#urlbar-go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon { - transform: scaleX(-1); -} - -#urlbar-stop-button { - -moz-image-region: rect(0, 28px, 14px, 14px); -} - -#urlbar-stop-button:not([disabled]):hover { - background-image: radial-gradient(circle closest-side, hsla(5,100%,75%,.3), hsla(5,100%,75%,0)); - -moz-image-region: rect(14px, 28px, 28px, 14px); -} - -#urlbar-stop-button:hover:active { - background-image: radial-gradient(circle closest-side, hsla(5,100%,75%,.1), hsla(5,100%,75%,0)); - -moz-image-region: rect(28px, 28px, 42px, 14px); -} - -/* popup blocker button */ - -#page-report-button { - list-style-image: url("chrome://browser/skin/urlbar-popup-blocked.png"); - -moz-image-region: rect(0, 16px, 16px, 0); -} - -#page-report-button:hover { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -#page-report-button:hover:active, -#page-report-button[open="true"] { - -moz-image-region: rect(0, 48px, 16px, 32px); -} - -/* star button */ - -#star-button { - list-style-image: url("chrome://browser/skin/places/bookmark.png"); - -moz-image-region: rect(0px 16px 16px 0px); -} - -#star-button:hover { - background-image: radial-gradient(circle closest-side, hsla(45,100%,73%,.3), hsla(45,100%,73%,0)); - -moz-image-region: rect(0px 32px 16px 16px); -} - -#star-button:hover:active { - background-image: radial-gradient(circle closest-side, hsla(45,100%,73%,.1), hsla(45,100%,73%,0)); - -moz-image-region: rect(0px 48px 16px 32px); -} - -#star-button[starred] { - list-style-image: url("chrome://browser/skin/places/editBookmark.png"); -} - -/* bookmarking panel */ - -#editBookmarkPanelStarIcon { - list-style-image: url("chrome://browser/skin/places/starred48.png"); - width: 48px; - height: 48px; -} - -#editBookmarkPanelStarIcon[unstarred] { - list-style-image: url("chrome://browser/skin/places/unstarred48.png"); -} - -#editBookmarkPanelTitle { - font-size: 130%; -} - -#editBookmarkPanelHeader, -#editBookmarkPanelContent { - margin-bottom: .5em; -} - -/* Implements editBookmarkPanel resizing on folderTree un-collapse. */ -#editBMPanel_folderTree { - min-width: 27em; -} - -/* ::::: content area ::::: */ - -#sidebar { - background-color: Window; -} - -#sidebar-title { - padding-inline-start: 0px; -} - -/* ::::: throbber ::::: */ - -#navigator-throbber { - width: 16px; - min-height: 16px; - margin: 0 3px; -} - -#navigator-throbber[busy="true"] { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); -} - -#navigator-throbber, -#wrapper-navigator-throbber > #navigator-throbber { - list-style-image: url("chrome://global/skin/icons/notloading_16.png"); -} - -/* Tabstrip */ - -#TabsToolbar { - min-height: 0; - padding: 0; -} - -/* Make sure the Navigation toolbar buttons are more or less - vertically centered between the tabs and the AppMenu button - when the tabs are not on top and the Bookmarks toolbar is - disabled */ -#nav-bar + #customToolbars + #PersonalToolbar:-moz-any([collapsed=true],[moz-collapsed=true]) + #TabsToolbar[tabsontop=false] { - margin-top: 1px; -} - -/* Make sure the elements on the Tab bar are not "glued" right - up against the AppMenu button / the caption when the tabs are - on top and the window is unmaximized */ -#main-window[sizemode="normal"] #TabsToolbar[tabsontop=true] { - margin-top: 1px; -} - -#TabsToolbar:not(:-moz-lwtheme), -#TabsToolbar[tabsontop=false] { - background-image: linear-gradient(to top, @toolbarShadowColor@ 1px, rgba(0,0,0,.05) 1px, transparent 50%); -} - -/* When the tab bar is collapsed, show a 1px border in its place. */ -#TabsToolbar[tabsontop="false"][collapsed="true"]:not([customizing="true"]) { - visibility: visible; - height: 1px; - border-bottom-width: 1px; - /* !important here to override border-style: none on the toolbar */ - border-bottom-style: solid !important; - border-bottom-color: var(--toolbox-after-color); - overflow: hidden; -} - -.tabbrowser-tab, -.tabs-newtab-button { - -moz-appearance: none; - background: @toolbarShadowOnTab@, var(--tab-background), - linear-gradient(-moz-dialog, -moz-dialog); - background-clip: padding-box; - padding: 3px 1px 4px; - /* Setting a transparent outer border allows us to have a 1px gap - between the tabs and the top edge of the screen, even when the - tabs have a top margin of 0, which is important for Fitts' law - compliance */ - border: 1.6px solid; - border-bottom: none; - border-radius: var(--tab-border-radius) var(--tab-border-radius) 0px 0px; - -moz-border-top-colors: transparent #929292; - -moz-border-left-colors: transparent #929292; - -moz-border-right-colors: transparent #929292; - /* Hide the transparent top border by default */ - margin-top: -1px; - /* Reduce the gap between the tabs */ - margin-inline-start: -1px; - box-shadow: var(--tab-box-shadow); -} - -.tabbrowser-tab { - padding-inline-end: 3px; -} - -/* Override the default (globally-set) tab width values; increase - by 2px to compensate for the transparent outer border of the tabs */ -.tabbrowser-tab:not([pinned]) { - max-width: 252px; - min-width: 102px; -} - -/* When the tabs are on top and the window is maximized or in full- - screen mode, unhide the transparent top border of the tabs so we - have a 1px gap between the tabs and the top edge of the screen */ -#main-window[sizemode="maximized"][tabsontop=true] .tabbrowser-tab, -#main-window[sizemode="maximized"][tabsontop=true] .tabs-newtab-button, -#main-window[sizemode="fullscreen"][tabsontop=true] .tabbrowser-tab, -#main-window[sizemode="fullscreen"][tabsontop=true] .tabs-newtab-button { - margin-top: 0px; -} - -@media (-moz-os-version: windows-win8) { - /* Square is the new round, courtesy of microsoft */ - /* We keep the hinting at round here because that's the hybrid in use - on our other controls in the navigation toolbars */ - :root { - --tab-border-radius: 3.5px; - } -} - -@media (-moz-os-version: windows-win10) { - /* Square is the new round, courtesy of microsoft */ - :root { - --tab-border-radius: 0px; - --tab-box-shadow: none; - } -} - -.tabbrowser-tab:hover, -.tabs-newtab-button:hover { - background-image: @toolbarShadowOnTab@, var(--tab-background-hover), - linear-gradient(-moz-dialog, -moz-dialog); -} - -.tabbrowser-tab[selected="true"] { - background-image: linear-gradient(var(--tab-selected-highlight), var(--toolbar-highlight-top) 50%), - linear-gradient(-moz-dialog, -moz-dialog); -} - -#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) { - background-image: @toolbarShadowOnTab@, - linear-gradient(var(--tab-selected-highlight), var(--toolbar-highlight-top) 50%), - linear-gradient(-moz-dialog, -moz-dialog); -} - -.tabbrowser-tab:-moz-lwtheme { - color: inherit; - /* 0.99 opacity rquired to force an active layer, see bug #1028369 */ - opacity: 0.99; -} - -.tabbrowser-tab:-moz-lwtheme:not([selected="true"]) { - opacity: 0.9; -} - -/* Remove highlight fuzz on dark themes */ -.tabbrowser-tab:-moz-lwtheme-brighttext, -.tabs-newtab-button:-moz-lwtheme-brighttext { - box-shadow:none; - -moz-border-top-colors: transparent #707070; - -moz-border-left-colors: transparent #707070; - -moz-border-right-colors: transparent #707070; -} - -.tabbrowser-tab[selected="true"]:-moz-lwtheme { - background-image: linear-gradient(var(--tab-selected-highlight), var(--toolbar-highlight-top) 50%); -} - -.tabbrowser-tab[selected="true"]:-moz-lwtheme-brighttext { - background-image: linear-gradient(rgba(128,128,128,.9), rgba(32,32,32,.9) 50%, rgba(32,32,32,.9) 80%, var(--toolbar-highlight-top) 100%); - -moz-border-top-colors: transparent #D0D0D0; - -moz-border-left-colors: transparent #D0D0D0; - -moz-border-right-colors: transparent #D0D0D0; -} - -.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]), -.tabs-newtab-button:-moz-lwtheme-brighttext { - background-image: linear-gradient(hsla(0,0%,25%,.4), hsla(0,0%,15%,.6) 80%); -} - -.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover, -.tabs-newtab-button:-moz-lwtheme-brighttext:hover { - background-image: linear-gradient(hsla(0,0%,60%,.4), hsla(0,0%,10%,.8) 80%); -} - -.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]), -.tabs-newtab-button:-moz-lwtheme-darktext { - background-image: linear-gradient(hsla(0,0%,75%,.4), hsla(0,0%,85%,.6) 80%); -} - -.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover, -.tabs-newtab-button:-moz-lwtheme-darktext:hover { - background-image: linear-gradient(hsla(0,0%,60%,.4), hsla(0,0%,90%,.8) 80%); -} - -.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) { - background-image: radial-gradient(circle farthest-corner at 50% 3px, rgba(255,255,255,1) 3%, rgba(186,221,251,.75) 40%, rgba(127,179,255,.5) 80%, rgba(127,179,255,.25)); -} -.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover { - background-image: linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,75%,.4) 80%), - radial-gradient(circle farthest-corner at 50% 3px, rgba(255,255,255,1) 3%, rgba(186,221,251,.75) 40%, rgba(127,179,255,.5) 80%, rgba(127,179,255,.25)); -} - -.tab-throbber, -.tab-icon-image { - width: 16px; - height: 16px; - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); - margin-inline-start: 2px; - margin-inline-end: 3px; -} - -.tab-throbber { - list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png"); -} - -.tab-throbber[progress] { - list-style-image: url("chrome://browser/skin/tabbrowser/loading.png"); -} - -.tab-throbber[pinned], -.tab-icon-image[pinned] { - margin-inline-start: 5px; - margin-inline-end: 5px; -} - -/* tabbrowser-tab focus ring */ -.tabbrowser-tab:focus > .tab-stack { - outline: 1px dotted; -} - -/* Tab DnD indicator */ -.tab-drop-indicator { - list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png); - margin-bottom: -11px; -} - -/* Tab close button */ -.tab-close-button { - -moz-appearance: none; - border: none; - padding: 0px; -} - -.tab-close-button:not([selected]):not(:hover):not(:active) { - -moz-image-region: rect(0, 64px, 16px, 48px); -} - -.tab-close-button:-moz-lwtheme-brighttext { - list-style-image: url("chrome://global/skin/icons/close-inverted.svg"); -} - -/* Tab sound indicator */ -.tab-icon-sound { - margin-inline-start: 4px; - width: 16px; - height: 16px; - padding: 0; -} - -.allTabs-endimage[soundplaying], -.tab-icon-sound[soundplaying] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio"); -} - -.allTabs-endimage[muted], -.tab-icon-sound[muted] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-muted"); -} - -.allTabs-endimage[blocked], -.tab-icon-sound[blocked] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[soundplaying], -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[blocked], -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[muted] { - filter: invert(1); -} - -.tab-icon-sound[soundplaying-scheduledremoval]:not([muted]):not(:hover), -.tab-icon-overlay[soundplaying-scheduledremoval]:not([muted]):not(:hover) { - transition: opacity .3s linear var(--soundplaying-removal-delay); - opacity: 0; -} - -/* Tab icon overlay */ -.tab-icon-overlay { - width: 16px; - height: 16px; - margin-top: -8px; - margin-inline-start: -15px; - margin-inline-end: -1px; - position: relative; -} - -.tab-icon-overlay[soundplaying], -.tab-icon-overlay[muted]:not([crashed]), -.tab-icon-overlay[blocked]:not([crashed]) { - border-radius: 10px; -} - -.tab-icon-overlay[soundplaying]:hover, -.tab-icon-overlay[muted]:not([crashed]):hover, -.tab-icon-overlay[blocked]:not([crashed]):hover { - background-color: white; -} - -.tab-icon-overlay[soundplaying] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio"); -} - -.tab-icon-overlay[muted] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-muted"); -} - -.tab-icon-overlay[blocked] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), -.tab-icon-overlay[soundplaying][selected]:-moz-lwtheme-brighttext:not(:hover) { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), -.tab-icon-overlay[muted][selected]:-moz-lwtheme-brighttext:not(:hover) { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted"); -} - -#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), -.tab-icon-overlay[blocked][selected]:-moz-lwtheme-brighttext:not(:hover) { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked"); -} - -/* Tab scrollbox arrow, tabstrip new tab and all-tabs buttons */ - -.tabbrowser-arrowscrollbox > .scrollbutton-up, -.tabbrowser-arrowscrollbox > .scrollbutton-down { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-left.png"); - margin: 0; - padding-right: 2px; - border-right: 2px solid transparent; - background-origin: border-box; -} - -/* Prevent the icon from being vertically stretched when we unhide - the transparent top border of the tabs (when the tabs are on top - and the window is maximized or in full-screen mode) */ -#main-window[sizemode="maximized"][tabsontop=true] .tabbrowser-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon, -#main-window[sizemode="maximized"][tabsontop=true] .tabbrowser-arrowscrollbox > .scrollbutton-down > .toolbarbutton-icon, -#main-window[sizemode="fullscreen"][tabsontop=true] .tabbrowser-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon, -#main-window[sizemode="fullscreen"][tabsontop=true] .tabbrowser-arrowscrollbox > .scrollbutton-down > .toolbarbutton-icon { - margin-bottom: 1px; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), -.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-system-metric(windows-compositor):not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/tabbrowser/tab-arrow-left-glass.png); -} - -toolbar[brighttext] .tabbrowser-arrowscrollbox > .scrollbutton-up, -toolbar[brighttext] .tabbrowser-arrowscrollbox > .scrollbutton-down { - list-style-image: url(chrome://browser/skin/tabbrowser/tab-arrow-left-inverted.png); -} - -.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled], -.tabbrowser-arrowscrollbox > .scrollbutton-down[disabled] { - opacity: .4; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-locale-dir(rtl), -.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-locale-dir(ltr) { - transform: scaleX(-1); -} - -.tabbrowser-arrowscrollbox > .scrollbutton-down { - transition: 1s background-color ease-out; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-down[notifybgtab] { - background-color: Highlight; - transition: none; -} - -.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]), -.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]) { - border-width: 0 2px 0 0; - border-style: solid; - border-image: url("chrome://browser/skin/tabbrowser/tab-overflow-border.png") 0 2 0 2 fill; -} - -.tabs-newtab-button > .toolbarbutton-icon { - margin-top: -1px; - margin-bottom: -1px; -} - -.tabs-newtab-button, -#TabsToolbar > #new-tab-button, -#TabsToolbar > toolbarpaletteitem > #new-tab-button { - list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png); - -moz-image-region: auto; -} - -#TabsToolbar > #new-tab-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), -#TabsToolbar > toolbarpaletteitem > #new-tab-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/tabbrowser/newtab-glass.png); -} - -.tabs-newtab-button:-moz-lwtheme-brighttext, -#TabsToolbar[brighttext] > #new-tab-button, -#TabsToolbar[brighttext] > toolbarpaletteitem > #new-tab-button { - list-style-image: url(chrome://browser/skin/tabbrowser/newtab-inverted.png); -} - -.tabs-newtab-button { -/* The button has a transparent outer border, so it will appear - to be 2px narrower than the width we set for it here */ - width: 30px; -} - -#TabsToolbar > #new-tab-button { - width: 26px; -} - -#alltabs-button { - list-style-image: url("chrome://browser/skin/tabbrowser/alltabs.png"); - -moz-image-region: rect(0, 14px, 16px, 0); -} - -#alltabs-button[type="menu"] { - list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow.png"); - -moz-image-region: auto; -} - -toolbar[brighttext] #alltabs-button { - list-style-image: url("chrome://browser/skin/tabbrowser/alltabs-inverted.png"); -} - -:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > #alltabs-button[type=menu]:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), -:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > toolbarpaletteitem > #alltabs-button[type=menu]:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), -toolbar[brighttext] #alltabs-button[type="menu"] { - list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png"); -} - -#alltabs-button[type="menu"] > .toolbarbutton-icon { - margin: 0 2px; -} - -#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker { - display: none; -} - -/* All tabs menupopup */ -.alltabs-item > .menu-iconic-left > .menu-iconic-icon { - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -.alltabs-item[selected="true"] { - font-weight: bold; -} - -.alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); -} - -.alltabs-item[tabIsVisible] { - /* box-shadow instead of background-color to work around native styling */ - box-shadow: inset -5px 0 ThreeDShadow; -} - -/* Tabstrip close button */ -.tabs-closebutton { - -moz-appearance: none; - padding: 4px 2px; - margin: 0px; - border: none; -} - -toolbar[brighttext] .tabs-closebutton { - list-style-image: url("chrome://global/skin/icons/close-inverted.svg"); -} - -.tabs-closebutton > .toolbarbutton-icon { - margin-inline-end: 0px !important; - padding-inline-end: 2px !important; - padding-inline-start: 2px !important; -} - -toolbarbutton.chevron { - list-style-image: url("chrome://global/skin/toolbar/chevron.gif") !important; -} - -toolbarbutton.chevron:-moz-locale-dir(rtl) > .toolbarbutton-icon { - transform: scaleX(-1); -} - -toolbarbutton.chevron > .toolbarbutton-text, -toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { - display: none; -} - -toolbarbutton.chevron > .toolbarbutton-icon { - margin: 0; -} - -toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon { - display: -moz-box; /* display chevron icon in text mode */ -} - -#sidebar-throbber[loading="true"] { - list-style-image: url("chrome://global/skin/icons/loading_16.png"); - margin-inline-end: 4px; -} - -/* Pale Moon: Feed icon */ -#ub-feed-button, -#ub-feed-button > .button-box, -#ub-feed-button:hover:active > .button-box { - padding: 0px; - margin: 0px; - border: 0px; - background-color: transparent !important; -} - -#ub-feed-button { - -moz-appearance: none; - min-width: 0px; - list-style-image: url("chrome://browser/skin/feeds/feed-icons-16.png"); - -moz-image-region: rect(0px 16px 16px 0px); -} - -#ub-feed-button:hover { - -moz-image-region: rect(0px 32px 16px 16px); -} - -#ub-feed-button[open="true"], -#ub-feed-button:hover:active { - -moz-image-region: rect(0px 48px 16px 32px); -} - - -/* Bookmarks toolbar */ -#PlacesToolbarDropIndicator { - list-style-image: url(chrome://browser/skin/places/toolbarDropMarker.png); -} - -toolbarbutton.bookmark-item[dragover="true"][open="true"] { - -moz-appearance: none; - background: Highlight !important; - color: HighlightText !important; -} - -/* rules for menupopup drop indicators */ -.menupopup-drop-indicator-bar { - position: relative; - /* these two margins must together compensate the indicator's height */ - margin-top: -1px; - margin-bottom: -1px; -} - -.menupopup-drop-indicator { - list-style-image: none; - height: 2px; - margin-inline-end: -4em; - background-color: Highlight; -} - -/* ::::: Identity Indicator Styling ::::: */ - -/* Popup Icons */ -#identity-popup-icon { - height: 64px; - width: 64px; - padding: 0; - list-style-image: url("chrome://browser/skin/identity.png"); - -moz-image-region: rect(0px, 64px, 64px, 0px); -} - -#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(64px, 64px, 128px, 0px); -} - -#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(128px, 64px, 192px, 0px); -} - -/* Popup Body Text */ -.identity-popup-description { - white-space: pre-wrap; - padding-inline-start: 15px; - margin: 2px 0 4px; -} - -.identity-popup-label { - white-space: pre-wrap; - padding-inline-start: 15px; - margin: 0; -} - -#identity-popup-content-host, -#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner { - font-size: 1.2em; -} - -#identity-popup-content-host { - margin-top: 3px; - margin-bottom: 5px; - font-weight: bold; - max-width: 300px; -} - -#identity-popup-content-owner { - margin-top: 4px; - margin-bottom: 0 !important; - font-weight: bold; - max-width: 300px; -} - -.verifiedDomain > #identity-popup-content-owner { - font-weight: normal; -} - -#identity-popup-content-verifier { - margin: 4px 0 2px; -} - -#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption , -#identity-popup-content-box.verifiedDomain > #identity-popup-encryption { - margin-top: 10px; - margin-inline-start: -24px; -} - -#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon , -#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon { - list-style-image: url("chrome://browser/skin/Secure24.png"); -} - -#identity-popup-more-info-button { - margin-top: 6px; - margin-bottom: 0; - margin-inline-end: 0; -} - -.popup-notification-icon { - width: 64px; - height: 64px; - margin-inline-end: 10px; -} - -.popup-notification-icon[popupid="geolocation"] { - list-style-image: url(chrome://browser/skin/Geolocation-64.png); -} - -.popup-notification-icon[popupid="xpinstall-disabled"], -.popup-notification-icon[popupid="addon-progress"], -.popup-notification-icon[popupid="addon-install-cancelled"], -.popup-notification-icon[popupid="addon-install-blocked"], -.popup-notification-icon[popupid="addon-install-origin-blocked"], -.popup-notification-icon[popupid="addon-install-failed"], -.popup-notification-icon[popupid="addon-install-complete"] { - list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric.png); - width: 32px; - height: 32px; -} - -.popup-notification-icon[popupid="click-to-play-plugins"] { - list-style-image: url(chrome://mozapps/skin/plugins/pluginBlocked-64.png); -} - -.popup-notification-icon[popupid="web-notifications"] { - list-style-image: url(chrome://browser/skin/notification-64.png); -} - -.addon-progress-description { - width: 350px; - max-width: 350px; -} - -.popup-progress-label, -.popup-progress-meter { - margin-inline-start: 0; - margin-inline-end: 0; -} - -.popup-progress-cancel { - -moz-appearance: none; - background: transparent; - border: none; - padding: 0; - margin: 0; - min-height: 0; - min-width: 0; - list-style-image: url(chrome://mozapps/skin/downloads/downloadButtons.png); - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -.popup-progress-cancel:hover { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} - -.popup-progress-cancel:active { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} - -.popup-notification-icon[popupid="indexedDB-permissions-prompt"], -.popup-notification-icon[popupid="indexedDB-quota-prompt"], -.popup-notification-icon[popupid*="offline-app-requested"], -.popup-notification-icon[popupid="offline-app-usage"] { - list-style-image: url(chrome://global/skin/icons/question-64.png); -} - -.popup-notification-icon[popupid="password"] { - list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png); -} - -.popup-notification-icon[popupid="mixed-content-blocked"] { - list-style-image: url(chrome://browser/skin/mixed-content-blocked-64.png); -} - -%ifdef MOZ_WEBRTC -.popup-notification-icon[popupid="webRTC-sharingDevices"], -.popup-notification-icon[popupid="webRTC-shareDevices"] { - list-style-image: url(chrome://browser/skin/webRTC-shareDevice-64.png); -} -%endif - -.popup-notification-icon[popupid="pointerLock"] { - list-style-image: url(chrome://browser/skin/pointerLock-64.png); -} - -/* Notification icon box */ -#notification-popup-box { - position: relative; - background-color: #fff; - background-clip: padding-box; - padding-left: 3px; - border-radius: var(--toolbarbutton-border-radius) 0 0 var(--toolbarbutton-border-radius); - border-width: 0 8px 0 0; - border-style: solid; - border-image: url("chrome://browser/skin/urlbar-arrow.png") 0 8 0 0 fill; - margin-inline-end: -8px; -} - -@conditionalForwardWithUrlbar@[forwarddisabled] + #urlbar-container > #urlbar > #notification-popup-box { - padding-left: 5px; -} - -#notification-popup-box:-moz-locale-dir(rtl), -.notification-anchor-icon:-moz-locale-dir(rtl) { - transform: scaleX(-1); -} - -.notification-anchor-icon { - width: 16px; - height: 16px; - margin: 0 2px; -} - -.notification-anchor-icon:-moz-focusring { - outline: 1px dotted -moz-DialogText; - outline-offset: -3px; -} - -.default-notification-icon, -#default-notification-icon { - list-style-image: url(chrome://global/skin/icons/information-16.png); -} - -.geo-notification-icon, -#geo-notification-icon { - list-style-image: url(chrome://browser/skin/Geolocation-16.png); -} - -#addons-notification-icon { - list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.png); -} - -.indexedDB-notification-icon, -#indexedDB-notification-icon { - list-style-image: url(chrome://global/skin/icons/question-16.png); -} - -#password-notification-icon { - list-style-image: url(chrome://mozapps/skin/passwordmgr/key-16.png); -} - -#plugins-notification-icon { - list-style-image: url(chrome://browser/skin/notification-pluginNormal.png); -} - -#alert-plugins-notification-icon { - list-style-image: url(chrome://browser/skin/notification-pluginAlert.png); -} - -#blocked-plugins-notification-icon { - list-style-image: url(chrome://browser/skin/notification-pluginBlocked.png); -} - -#plugins-notification-icon, -#alert-plugins-notification-icon, -#blocked-plugins-notification-icon { - -moz-image-region: rect(0, 16px, 16px, 0); -} - -#plugins-notification-icon:hover, -#alert-plugins-notification-icon:hover, -#blocked-plugins-notification-icon:hover { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -#plugins-notification-icon:active, -#alert-plugins-notification-icon:active, -#blocked-plugins-notification-icon:active { - -moz-image-region: rect(0, 48px, 16px, 32px); -} - -#notification-popup-box[hidden] { - /* Override display:none to make the pluginBlockedNotification animation work - when showing the notification repeatedly. */ - display: -moz-box; - visibility: collapse; -} - -#blocked-plugins-notification-icon[showing] { - animation: pluginBlockedNotification 500ms ease 0s 5 alternate both; -} - -@keyframes pluginBlockedNotification { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -.mixed-content-blocked-notification-icon, -#mixed-content-blocked-notification-icon { - list-style-image: url(chrome://browser/skin/mixed-content-blocked-16.png); -} - -%ifdef MOZ_WEBRTC -.webRTC-shareDevices-notification-icon, -#webRTC-shareDevices-notification-icon { - list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png); -} - -.webRTC-sharingDevices-notification-icon, -#webRTC-sharingDevices-notification-icon { - list-style-image: url(chrome://browser/skin/webRTC-sharingDevice-16.png); -} -%endif - -.web-notifications-notification-icon, -#web-notifications-notification-icon { - list-style-image: url(chrome://browser/skin/web-notifications-tray.svg); - -moz-image-region: rect(0, 16px, 16px, 0); -} - -.web-notifications-notification-icon:hover, -#web-notifications-notification-icon:hover { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -.web-notifications-notification-icon:hover:active, -#web-notifications-notification-icon:hover:active { - -moz-image-region: rect(0, 48px, 16px, 32px); -} - -#pointerLock-notification-icon { - list-style-image: url(chrome://browser/skin/pointerLock-16.png); -} -#pointerLock-cancel { - margin: 0px; -} - -#identity-popup-container { - min-width: 280px; -} - -/* Bookmarks roots menu-items */ -#appmenu_subscribeToPage:not([disabled]), -#appmenu_subscribeToPageMenu, -#subscribeToPageMenuitem:not([disabled]), -#subscribeToPageMenupopup, -#BMB_subscribeToPageMenuitem:not([disabled]), -#BMB_subscribeToPageMenupopup { - list-style-image: url("chrome://browser/skin/feeds/feedIcon16.png"); -} - -#appmenu_bookmarksToolbar, -#bookmarksToolbarFolderMenu, -#BMB_bookmarksToolbar { - list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); - -moz-image-region: auto; -} - -#appmenu_unsortedBookmarks, -#menu_unsortedBookmarks, -#BMB_unsortedBookmarks { - list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png"); - -moz-image-region: auto; -} - -/* ::::: Keyboard UI Panel ::::: */ - -.KUI-panel { - -moz-appearance: none; - background: rgba(27%,27%,27%,.9) url(KUI-background.png) repeat-x; - color: white; - border-style: none; - border-radius: 20px; -} - -.KUI-panel[level="top"] { - background-color: rgba(27%,27%,27%,.65); -} - -.KUI-panel-closebutton { - list-style-image: url(KUI-close.png); - -moz-appearance: none; - border: none; - padding: 0; - width: 24px; - height: 24px; -} - -.KUI-panel-closebutton:not(:hover) { - opacity: .6; -} - -.KUI-panel-closebutton > .toolbarbutton-icon { - margin: 0; -} - -/* ::::: Ctrl-Tab and All Tabs Panels ::::: */ - -/* Ctrl-Tab */ - -#ctrlTab-panel { - padding: 20px 10px 10px; - font-weight: bold; - text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 2px rgb(27%,27%,27%); -} - -.ctrlTab-favicon[src] { - background-color: white; - width: 20px; - height: 20px; - padding: 2px; -} - -.ctrlTab-preview-inner > .tabPreview-canvas { - box-shadow: 1px 1px 2px rgb(12%,12%,12%); -} - -.ctrlTab-preview:not(#ctrlTab-showAll) > * > .ctrlTab-preview-inner > .tabPreview-canvas { - margin-bottom: 2px; -} - -.ctrlTab-preview-inner { - padding-bottom: 10px; -} - -@supports -moz-bool-pref("browser.tabs.fadeLabels") { - .ctrlTab-preview-inner label[_is_cropped] { - mask-image: linear-gradient(to left, transparent, black 2em); - } - - .ctrlTab-preview-inner label[_is_cropped]:-moz-locale-dir(rtl) { - mask-image: linear-gradient(to right, transparent, black 2em); - } -} - -#ctrlTab-showAll:not(:focus) > * > .ctrlTab-preview-inner { - padding: 10px; - background-color: rgba(255,255,255,.2); - border-radius: .5em; -} - -.ctrlTab-preview:focus > * > .ctrlTab-preview-inner { - color: white; - background-color: rgba(0,0,0,.6); - text-shadow: none; - padding: 8px; - border: 2px solid white; - border-radius: .5em; -} - -.ctrlTab-preview:not(#ctrlTab-showAll):focus > * > .ctrlTab-preview-inner { - margin: -10px -10px 0; -} - -#ctrlTab-showAll { - margin-top: .5em; -} - -/* All Tabs */ - -#allTabs-panel { - padding-bottom: 10px; - -moz-appearance: none; - border: none; - background: -moz-dialog; - color: -moz-dialogText; -} - -#allTabs-meta { - margin: 10px; -} - -#allTabs-filter { - margin-inline-start: 24px; - margin-inline-end: 0; -} - -#allTabs-tab-close-button > .toolbarbutton-icon { - margin: 0; -} - -/* Make sure the allTab previews always have regular close buttons */ -#allTabs-tab-close-button:-moz-lwtheme-brighttext { - list-style-image: url("chrome://global/skin/icons/close.svg"); -} - -.allTabs-favicon[src] { - background-color: -moz-dialog; - width: 22px; - height: 22px; - padding-top: 1px; - padding-bottom: 5px; - padding-inline-start: 1px; - padding-inline-end: 5px; - margin-top: -2px; - margin-inline-start: -2px; - border-bottom-right-radius: 4px; -} - -.allTabs-favicon[src]:-moz-locale-dir(rtl) { - border-bottom-right-radius: 0; - border-bottom-left-radius: 4px; -} - -.allTabs-preview-inner > .tabPreview-canvas { - background-color: rgb(60%,60%,60%); - box-shadow: 0 0 1.5px ThreeDShadow; -} - -.allTabs-preview:not(:hover):not([closebuttonhover]) > html|canvas { - opacity: .8; -} - -.allTabs-preview:focus > * > .allTabs-preview-inner { - outline: 1px dotted -moz-dialogText; -} - -/* Add-on bar */ - -#addon-bar { - -moz-appearance: none; - min-height: 20px; - border-top-style: none; - border-bottom-style: none; - padding-top: 1px; - background-image: linear-gradient(rgba(0,0,0,.15) 1px, rgba(255,255,255,.15) 1px); - background-size: 100% 2px; - background-repeat: no-repeat; -} - -#status-bar { - -moz-appearance: none; - background-color: transparent; - border: none; - min-height: 0; -} - -#addon-bar[customizing] > #status-bar { - opacity: .5; - background-image: repeating-linear-gradient(135deg, - rgba(255,255,255,.3), rgba(255,255,255,.3) 5px, - rgba(0,0,0,.3) 5px, rgba(0,0,0,.3) 10px); -} - -#status-bar > statusbarpanel { - border-width: 0; - -moz-appearance: none; -} - -#addonbar-closebutton { - border: none; - padding: 0 5px; - -moz-appearance: none; -} - -toolbar[brighttext] #addonbar-closebutton { - list-style-image: url("chrome://global/skin/icons/close-inverted.svg"); -} - -/* Status panel */ - -.statuspanel-label { - margin: 0; - padding: 2px 4px; - background: linear-gradient(#fff, #ddd); - border: 1px none #ccc; - border-top-style: solid; - color: #333; - text-shadow: none; -} - -.statuspanel-label:-moz-locale-dir(ltr):not([mirror]), -.statuspanel-label:-moz-locale-dir(rtl)[mirror] { - border-right-style: solid; - /* disabled for triggering grayscale AA (bug 659213) - border-top-right-radius: .3em; - */ - margin-right: 1em; -} - -.statuspanel-label:-moz-locale-dir(rtl):not([mirror]), -.statuspanel-label:-moz-locale-dir(ltr)[mirror] { - border-left-style: solid; - /* disabled for triggering grayscale AA (bug 659213) - border-top-left-radius: .3em; - */ - margin-left: 1em; -} - -#full-screen-warning-message { - background-color: hsl(0,0%,15%); - color: white; - border-radius: 8px; - margin-top: 30px; - padding: 30px 50px; - box-shadow: 0 0 2px white; -} - -.full-screen-description { - font-size: 150%; -} - -#full-screen-domain-text { - font-size: 300%; -} - -%ifdef MOZ_DEVTOOLS -%include ../../../../devtools/client/themes/responsivedesign.inc.css -%include ../../../../devtools/client/themes/commandline.inc.css -%endif -%include ../shared/plugin-doorhanger.inc.css - -%ifdef MOZ_DEVTOOLS -/* Error counter */ - -#developer-toolbar-toolbox-button[error-count]:before { - color: #FDF3DE; - min-width: 16px; - text-shadow: none; - background-image: linear-gradient(#B4211B, #8A1915); - border-radius: 1px; - margin-inline-end: 5px; -} -%endif - -.toolbarbutton-badge-stack { - margin: 0; - padding: 0; - position: relative; -} - -@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-badge-stack { - padding: 2px 5px; -} - -.toolbarbutton-1 > .toolbarbutton-badge-stack > .toolbar-icon { - position: absolute; - top: 2px; - right: 2px; -} - -.toolbarbutton-badge-stack > .toolbarbutton-icon[label]:not([label=""]) { - margin-inline-end: 0; -} - -@navbarLargeIcons@ *|* > .toolbarbutton-badge[badge]:not([badge=""])::after { - top: 1px; - right: 1px; -} - -.toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl)::after { - left: 0; - right: auto; -} - -@navbarLargeIcons@ *|* > .toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl)::after { - left: 1px; - right: auto; -} - -#main-window[privatebrowsingmode=temporary] #toolbar-menubar { - background-image: url("chrome://browser/skin/privatebrowsing-dark.png"); - background-position: top right; - background-repeat: no-repeat; -} - -#main-window[privatebrowsingmode=temporary] #toolbar-menubar:-moz-locale-dir(rtl) { - background-position: top left; -} - -#main-window[privatebrowsingmode=temporary] #appmenu-button > .button-box > .box-inherit > .button-icon { - list-style-image: url("chrome://browser/skin/privatebrowsing-light.png"); - width: 20px; - height: 16px; -} - -@media not all and (-moz-windows-classic) { - #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container { - margin-top: 1px; - } - - #appmenu-button { - border-width: 2px; - -moz-border-left-colors: @appMenuButtonBorderColor@; - -moz-border-bottom-colors: @appMenuButtonBorderColor@; - -moz-border-right-colors: @appMenuButtonBorderColor@; - margin-bottom: 1px; /* compensate white outer border */ - box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, - 0 0 2px 1px rgba(255,255,255,.25) inset; - } - - #main-window[privatebrowsingmode=temporary] #appmenu-button { - -moz-border-left-colors: rgba(255,255,255,.5) rgba(43,8,65,.9); - -moz-border-bottom-colors: rgba(255,255,255,.5) rgba(43,8,65,.9); - -moz-border-right-colors: rgba(255,255,255,.5) rgba(43,8,65,.9); - } - - #appmenu-popup { - margin-top: -1px; - margin-inline-start: 1px; - } - - .panel-promo-message { - font-style: italic; - } -} - -@media (-moz-windows-default-theme) { - @media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win8), - (-moz-os-version: windows-win10) { - #navigator-toolbox > toolbar:not(:-moz-lwtheme), - #browser-bottombox:not(:-moz-lwtheme) { - background-color: var(--toolbar-custom-color); - } - - .tabbrowser-tab:not(:-moz-lwtheme), - .tabs-newtab-button:not(:-moz-lwtheme) { - background-image: @toolbarShadowOnTab@, var(--tab-background), - linear-gradient(var(--toolbar-custom-color), var(--toolbar-custom-color)); - } - - .tabbrowser-tab:not(:-moz-lwtheme):hover, - .tabs-newtab-button:not(:-moz-lwtheme):hover { - background-image: @toolbarShadowOnTab@, var(--tab-background-hover), - linear-gradient(var(--toolbar-custom-color), var(--toolbar-custom-color)); - } - - .tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) { - background-image: linear-gradient(#fff, var(--toolbar-highlight-top) 50%), - linear-gradient(var(--toolbar-custom-color), var(--toolbar-custom-color)); - } - - #main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) { - background-image: @toolbarShadowOnTab@, - linear-gradient(#fff, var(--toolbar-highlight-top) 50%), - linear-gradient(var(--toolbar-custom-color), var(--toolbar-custom-color)); - } - - :root:not(:-moz-lwtheme) { - --toolbox-after-color: #aabccf; - } - } - - @media (-moz-os-version: windows-win8), - (-moz-os-version: windows-win10) { - :root { - --toolbar-custom-color: hsl(210,0%,92%); - } - - :root:not(:-moz-lwtheme) { - --toolbox-after-color: #bcbcbc; - } - } - - #navigator-toolbox[tabsontop=true] #urlbar:not(:-moz-lwtheme), - #navigator-toolbox[tabsontop=true] .searchbar-textbox:not(:-moz-lwtheme) { - border-color: hsla(210,54%,20%,.25) hsla(210,54%,20%,.27) hsla(210,54%,20%,.3); - } - - #navigator-toolbox[tabsontop=true] #urlbar:not(:-moz-lwtheme):not([focused]):hover, - #navigator-toolbox[tabsontop=true] .searchbar-textbox:not(:-moz-lwtheme):not([focused]):hover { - border-color: hsla(210,54%,20%,.35) hsla(210,54%,20%,.37) hsla(210,54%,20%,.4); - } - - #navigator-toolbox[tabsontop=true] #urlbar:not(:-moz-lwtheme)[focused], - #navigator-toolbox[tabsontop=true] .searchbar-textbox:not(:-moz-lwtheme)[focused] { - border-color: hsla(206,100%,60%,.65) hsla(206,100%,55%,.65) hsla(206,100%,50%,.65); - } - - .sidebar-splitter { - border: 0; - border-inline-end: 1px solid #A9B7C9; - min-width: 0; - width: 3px; - background-color: transparent; - margin-inline-start: -3px; - position: relative; - } - - #appcontent ~ .sidebar-splitter { - border-inline-start: 1px solid #A9B7C9; - border-inline-end: none; - margin-inline-start: 0; - margin-inline-end: -3px; - } - - .menu-accel, - .menu-iconic-accel { - color: graytext; - } - - .chatbar-button, - chatbar > chatbox { - border-color: #A9B7C9; - } -} - -@media (-moz-windows-compositor) { - #main-window { - background-color: transparent; - -moz-appearance: -moz-win-glass; - } - - /* On win 10, if we don't set this on the entire browser container, including - * the sidebar, then the accent color bleeds through in the titlebar - * if the sidebar is open. */ - #browser { - -moz-appearance: -moz-win-exclude-glass; - } - -/* ==== Windows 10 styling ==== */ - - @media (-moz-os-version: windows-win10) { - /* Draw XUL caption buttons and background on Win10 */ - @media (-moz-windows-accent-color-applies: 0) { - /* Default styling for when no accent color is applied */ - #main-window:not(:-moz-window-inactive):not(:-moz-lwtheme) { - background-color: white; - } - - :root:not(:-moz-window-inactive):not(:-moz-lwtheme) { - --window-text-color: black; - } - - #titlebar-min:not(:-moz-window-inactive):not(:-moz-lwtheme), - #minimize-button:not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize); - } - - #titlebar-max:not(:-moz-window-inactive):not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize); - } - - #main-window[sizemode="maximized"] #titlebar-max:not(:-moz-window-inactive):not(:-moz-lwtheme), - #restore-button:not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore); - } - - #titlebar-close:not(:-moz-window-inactive):not(:-moz-lwtheme), - #close-button:not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close); - } - - .titlebar-button:not(#titlebar-close):not(:-moz-window-inactive):not(:-moz-lwtheme):hover, - #window-controls > toolbarbutton:not(#close-button):not(:-moz-lwtheme):hover { - background-color: hsla(0, 0%, 0%, .17); - } - - .titlebar-button:not(#titlebar-close):not(:-moz-window-inactive):not(:-moz-lwtheme):hover:active, - #window-controls > toolbarbutton:not(#close-button):not(:-moz-lwtheme):hover:active { - background-color: hsla(0, 0%, 0%, .27); - transition: none; - } - - #titlebar-close:not(:-moz-window-inactive):not(:-moz-lwtheme):hover, - #close-button:not(:-moz-lwtheme):hover { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-highlight); - background-color: hsla(0, 86%, 49%, 1); - } - - #titlebar-close:not(:-moz-window-inactive):not(:-moz-lwtheme):hover:active, - #close-button:not(:-moz-lwtheme):hover:active { - background-color: hsla(0, 60%, 49%, 0.6); - transition: none; - } - } - - @media (-moz-windows-accent-color-applies) { - /* Styling for when an accent color is applied to the titlebar */ - #main-window:not(:-moz-window-inactive):not(:-moz-lwtheme) { - background-color: -moz-win-accentcolor; - } - - :root:not(:-moz-window-inactive):not(:-moz-lwtheme) { - --window-text-color: -moz-win-accentcolortext; - } - - #main-window[sizemode=fullscreen]:not(:-moz-lwtheme) { - --fullscreen-background-color: -moz-win-accentcolor; - --fullscreen-text-color: -moz-win-accentcolortext; - } - - #titlebar-min, - #minimize-button { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize); - } - - #titlebar-max { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize); - } - - #main-window[sizemode="maximized"] #titlebar-max, - #restore-button { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore); - } - - #titlebar-close, - #close-button { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close); - } - - .titlebar-button:hover, - #window-controls > toolbarbutton:not(#close-button):hover { - background-color: hsla(0, 0%, 0%, .17); - } - - .titlebar-button:hover:active, - #window-controls > toolbarbutton:not(#close-button):hover:active { - background-color: hsla(0, 0%, 0%, .27); - transition: none; - } - - @media (-moz-windows-accent-color-is-dark) { - /* dark accent color */ - #titlebar-min, - #minimize-button { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize-highlight); - } - - #titlebar-max { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize-highlight); - } - - #main-window[sizemode="maximized"] #titlebar-max, - #restore-button { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore-highlight); - } - - #titlebar-close { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-highlight); - } - - .titlebar-button:not(#titlebar-close):not(:-moz-window-inactive):not(:-moz-lwtheme):hover, - #window-controls > toolbarbutton:not(#close-button):not(:-moz-lwtheme):hover { - background-color: hsla(0, 0%, 100%, .17); - } - - .titlebar-button:not(#titlebar-close):not(:-moz-window-inactive):not(:-moz-lwtheme):hover:active, - #window-controls > toolbarbutton:not(#close-button):not(:-moz-lwtheme):hover:active { - background-color: hsla(0, 0%, 100%, .27); - transition: none; - } - - #titlebar-close:not(:-moz-window-inactive):not(:-moz-lwtheme):hover, - #close-button:not(:-moz-lwtheme):hover { - background-color: hsla(0, 86%, 49%, 1); - } - - #titlebar-close:not(:-moz-window-inactive):not(:-moz-lwtheme):hover:active, - #close-button:not(:-moz-lwtheme):hover:active { - background-color: hsla(0, 60%, 39%, 1); - transition: none; - } - } - } - - #main-window:-moz-window-inactive:not(:-moz-lwtheme) { - background-color: hsl(0, 0%, 95%); - } - - /* If we don't have [chromemargin], it means the menubar is active; set the - window background to transparent in that case to match it with the dwm - color and prevent a drawing delay between title bar and UI region */ - #main-window:not([chromemargin]):not(:-moz-lwtheme) { - background-color: transparent; - } - - #titlebar-buttonbox, - .titlebar-button { - -moz-appearance: none !important; - } - - .titlebar-button { - border: none; - margin: 0 !important; - padding: 9px 17px; - transition: background-color linear 120ms; - } - - #main-window[sizemode="maximized"][tabsontop=true] #tabbrowser-tabs { - min-height: 28px; - } - - #main-window[sizemode=maximized] .titlebar-button { - padding-top: 8px; - padding-bottom: 8px; - } - - .titlebar-button > .toolbarbutton-icon { - width: 12px; - height: 12px; - } - - .titlebar-button:not(:hover) > .toolbarbutton-icon:-moz-window-inactive { - opacity: 0.5; - } - - #main-window[chromemargin^="0,"][sizemode=normal] #navigator-toolbox { - margin-top: -4px; - } - - #main-window[sizemode="maximized"] #titlebar-close { - padding-right: 19px; - } - - #titlebar-close:hover, - #close-button:hover { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-highlight); - background-color: hsla(0, 86%, 49%, 1); - transition: background-color linear 160ms; - } - - #titlebar-close:hover:active, - #close-button:hover:active { - background-color: hsla(0, 86%, 49%, 0.6); - transition: none; - } - - /* inactive window */ - - #titlebar-min:-moz-window-inactive:not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize-inactive); - } - - #titlebar-max:-moz-window-inactive:not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize-inactive); - } - - #main-window[sizemode="maximized"] #titlebar-max:-moz-window-inactive:not(:-moz-lwtheme) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore-inactive); - } - - #titlebar-close:-moz-window-inactive:not(:-moz-lwtheme):not(:hover) { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-inactive); - } - - .titlebar-button:-moz-window-inactive:not(:-moz-lwtheme):hover { - background-color: hsla(0, 0%, 0%, .17); - } - - .titlebar-button:-moz-window-inactive:not(:-moz-lwtheme):hover:active { - background-color: hsla(0, 0%, 0%, .27); - transition: none; - } - - /* light persona */ - - .titlebar-button:-moz-lwtheme-darktext:hover, - #window-controls > toolbarbutton:not(#close-button):-moz-lwtheme-darktext:hover { - background-color: hsla(0, 0%, 0%, .17); - } - - .titlebar-button:-moz-lwtheme-darktext:hover:active, - #window-controls > toolbarbutton:not(#close-button):-moz-lwtheme-darktext:hover:active { - background-color: hsla(0, 0%, 0%, .27); - transition: none; - } - - #titlebar-min:-moz-lwtheme-darktext, - #minimize-button:-moz-lwtheme-darktext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize-outline); - } - - #titlebar-max:-moz-lwtheme-darktext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize-outline); - } - - #main-window[sizemode="maximized"]:-moz-lwtheme-darktext #titlebar-max:-moz-lwtheme-darktext, - #restore-button:-moz-lwtheme-darktext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore-outline); - } - - #titlebar-close:-moz-lwtheme-darktext, - #close-button:-moz-lwtheme-darktext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-outline); - } - #titlebar-close:hover:-moz-lwtheme-darktext, - #close-button:hover:-moz-lwtheme-darktext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-outline); - } - - /* dark persona */ - - .titlebar-button:-moz-lwtheme-brighttext:hover, - #window-controls > toolbarbutton:not(#close-button):-moz-lwtheme-brighttext:hover { - background-color: hsla(0, 0%, 100%, .27); - } - - .titlebar-button:-moz-lwtheme-brighttext:hover:active, - #window-controls > toolbarbutton:not(#close-button):-moz-lwtheme-brighttext:hover:active { - background-color: hsla(0, 0%, 100%, .37); - transition: none; - } - - #titlebar-min:-moz-lwtheme-brighttext, - #minimize-button:-moz-lwtheme-brighttext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize-outline-inverted); - } - - #titlebar-max:-moz-lwtheme-brighttext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize-outline-inverted); - } - - #main-window[sizemode="maximized"]:-moz-lwtheme-brighttext #titlebar-max:-moz-lwtheme-brighttext, - #restore-button:-moz-lwtheme-brighttext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore-outline-inverted); - } - - #titlebar-close:-moz-lwtheme-brighttext, - #close-button:-moz-lwtheme-brighttext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-outline-inverted); - } - #titlebar-close:hover:-moz-lwtheme-brighttext, - #close-button:hover:-moz-lwtheme-brighttext { - list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-outline-inverted); - } - - /* the 12px image renders a 10px icon, and the 10px upscaled gets rounded to 12.5, which - * rounds up to 13px, which makes the icon one pixel too big on 1.25dppx. Fix: */ - @media (min-resolution: 1.20dppx) and (max-resolution: 1.45dppx) { - .titlebar-button > .toolbarbutton-icon { - width: 11.5px; - height: 11.5px; - } - } - - /* 175% dpi should result in the same device pixel sizes as 150% dpi. */ - @media (min-resolution: 1.70dppx) and (max-resolution: 1.95dppx) { - .titlebar-button { - padding-left: 14.1px; - padding-right: 14.1px; - } - - .titlebar-button > .toolbarbutton-icon { - width: 10.8px; - height: 10.8px; - } - } - - /* 225% dpi should result in the same device pixel sizes as 200% dpi. */ - @media (min-resolution: 2.20dppx) and (max-resolution: 2.45dppx) { - .titlebar-button { - padding-left: 15.3333px; - padding-right: 15.3333px; - } - - .titlebar-button > .toolbarbutton-icon { - width: 10.8px; - height: 10.8px; - } - } - - /* 275% dpi should result in the same device pixel sizes as 250% dpi. */ - @media (min-resolution: 2.70dppx) and (max-resolution: 2.95dppx) { - .titlebar-button > .toolbarbutton-icon { - width: 10.8px; - height: 10.8px; - } - } - - #appmenu-button { - margin-top: -1px; - margin-bottom: 5px; - } - } - -/* ==== Windows Vista/7/8 styling ==== */ - - @media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win8) { - /* Make sure the native margins are correct on Win Vista/7/8. - * We can't use -moz-win-glass there because the border sizing would - * not be correct. */ - #main-window { - -moz-appearance: -moz-win-borderless-glass; - } - - /* These should be hidden w/ glass enabled. Windows draws its own buttons. */ - .titlebar-button { - display: none; - } - - /* The borders on the glass frame are ours, and inside #browser, and on - * vista and win7 we want to make sure they are "glassy", so we can't use - * #browser as the exclude-glass container. We use #appcontent instead. */ - #browser { - -moz-appearance: none; - } - - #appcontent { - -moz-appearance: -moz-win-exclude-glass; - } - - #main-window[chromemargin^="0,"][sizemode=normal] #navigator-toolbox { - margin-top: -7px; - } - - /* Artificially draw window borders that are covered by lwtheme, see bug 591930. */ - #main-window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme { - border-top: 2px solid; - -moz-border-top-colors: @glassActiveBorderColor@ rgba(255,255,255,.6); - } - - #main-window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme:-moz-window-inactive { - -moz-border-top-colors: @glassInactiveBorderColor@ rgba(255,255,255,.6); - } - - #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container:-moz-lwtheme { - margin-top: -1px; - } - - #main-window[sizemode="normal"] #titlebar-buttonbox:-moz-lwtheme { - margin-top: -2px; - } - - #appmenu-button { - margin-bottom: -1px; /* compensate white outer border */ - } - - } - -/* ==== Windows Vista/7 (true glass) styling ==== */ - - @media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7) { - #toolbar-menubar:not(:-moz-lwtheme), - #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme), - #nav-bar[tabsontop=false]:not(:-moz-lwtheme), - #nav-bar[tabsontop=false]:not(:-moz-lwtheme) .toolbarbutton-text, - #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child:not(:-moz-lwtheme) { - text-shadow: 0 0 .5em white, 0 0 .5em white, 0 1px 0 rgba(255,255,255,.4); - } - - #main-menubar:not(:-moz-lwtheme):not(:-moz-window-inactive) { - background-color: rgba(255,255,255,.7); - 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 ==== */ - - @media (-moz-os-version: windows-win8) { - /* Use a light text styling on dark window frames */ - :root[darkwindowframe="true"]:not(:-moz-lwtheme):not(:-moz-window-inactive) { - --window-text-color: white; - } - } - - @media (-moz-os-version: windows-win8), - (-moz-os-version: windows-win10) { - /* Fade text stylings on window inactivity */ - :root:not(:-moz-lwtheme):-moz-window-inactive { - --window-text-color: rgba(0, 0, 0, 0.5); - } - } - -/* ==== ==== */ - - #main-window[sizemode=fullscreen]:not(:-moz-lwtheme) { - --window-text-color: var(--fullscreen-text-color); - -moz-appearance: none; - background-color: var(--fullscreen-background-color); - } - - #toolbar-menubar:not(:-moz-lwtheme), - #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme), - #nav-bar[tabsontop=false]:not(:-moz-lwtheme), - #nav-bar[tabsontop=false]:not(:-moz-lwtheme) .toolbarbutton-text, - #nav-bar + #customToolbars + #PersonalToolbar:-moz-any([collapsed=true],[moz-collapsed=true]) + #TabsToolbar[tabsontop=false]:last-child:not(:-moz-lwtheme) { - background-color: transparent !important; - color: var(--window-text-color); - border-left-style: none !important; - 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), - #TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme), - #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#new-tab-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme), - #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); - } - -/* Show toolbar borders on vista through win8, but not on win10 and later: */ -@media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win8) { - /* Vertical toolbar border */ - #main-window[sizemode=normal] #navigator-toolbox::after, - #main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > toolbar:not(#toolbar-menubar):not(#TabsToolbar), - #main-window[sizemode=normal] #navigator-toolbox[tabsontop=false] > toolbar:not(#toolbar-menubar):not(#nav-bar) { - border-left: 1px solid @toolbarShadowColor@; - border-right: 1px solid @toolbarShadowColor@; - background-clip: padding-box; - } - #main-window[sizemode=normal] #navigator-toolbox > toolbar:-moz-lwtheme { - border-color: transparent !important; - } - #main-window[sizemode=normal] #browser-border-start, - #main-window[sizemode=normal] #browser-border-end { - display: -moz-box; - background-color: @toolbarShadowColor@; - width: 1px; - } - #main-window[sizemode=normal] #browser-bottombox { - border: 1px solid @toolbarShadowColor@; - border-top-style: none; - background-clip: padding-box; - } -} - - #main-window[sizemode=normal][tabsontop=false] #PersonalToolbar:not(:-moz-lwtheme) { - border-top-left-radius: var(--toolbarbutton-border-radius); - border-top-right-radius: var(--toolbarbutton-border-radius); - } - - #main-window[sizemode=normal] #nav-bar[tabsontop=true]:not(:-moz-lwtheme), - #main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme), - #main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme), - #main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after { - border-top-left-radius: var(--toolbarbutton-border-radius); - border-top-right-radius: var(--toolbarbutton-border-radius); - } - - /* Toolbar shadow behind tabs */ - /* This code is only needed for restored windows (i.e. sizemode=normal) - because of the border radius on the toolbar below the tab bar. */ - #main-window[sizemode=normal] #nav-bar[tabsontop=true]:not(:-moz-lwtheme), - #main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme), - #main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme), - #main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after { - border-top: 1px solid @toolbarShadowColor@; - background-clip: padding-box; - } - #main-window[sizemode=normal] #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) { - margin-bottom: -1px; - background-image: none !important; - } - #main-window[sizemode=normal] #tabbrowser-tabs[tabsontop=true] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox > .scrollbox-innerbox:not(:-moz-lwtheme) { - position: relative; - } - - #navigator-toolbox[tabsontop=false] > #PersonalToolbar { - margin-top: 3px; - } - - #navigator-toolbox[tabsontop=false] > #PersonalToolbar:not(:-moz-lwtheme) { - margin-top: 2px; - border-top: 1px solid @toolbarShadowColor@; - background-image: linear-gradient(var(--toolbar-highlight-top), var(--toolbar-highlight-bottom)); - } - - @media (-moz-os-version: windows-win10) { - /* Remove gradient and make border faded */ - #navigator-toolbox[tabsontop=false] > #PersonalToolbar:not(:-moz-lwtheme) { - border-top: 1px solid rgba(10%,10%,10%,.2); - background-image: none; - } - } - - #main-window[sizemode=normal] #TabsToolbar[tabsontop=true] { - padding-left: 4px; - padding-right: 4px; - } - - #main-window[sizemode=normal] #TabsToolbar[tabsontop=false] { - padding-left: 2px; - padding-right: 2px; - } - - /* Rounded corners for when chrome is disabled */ - #main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after { - visibility: visible; - background-color: var(--toolbar-custom-color); - background-image: linear-gradient(var(--toolbar-highlight-top), var(--toolbar-highlight-top)); - height: 4px; - } - - /* Make the window draggable by glassed toolbars (bug 555081) */ - #toolbar-menubar:not([autohide="true"]), - #TabsToolbar[tabsontop="true"], - #nav-bar[tabsontop=false], - #nav-bar + #customToolbars + #PersonalToolbar[collapsed="true"] + #TabsToolbar[tabsontop="false"]:last-child, - #navigator-toolbox > toolbar:not(#toolbar-menubar):-moz-lwtheme { - -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag"); - } - - #appcontent:not(:-moz-lwtheme) { - background-color: -moz-dialog; - } - - #navigator-toolbox[tabsontop=false] #urlbar:not(:-moz-lwtheme), - #navigator-toolbox[tabsontop=false] .searchbar-textbox:not(:-moz-lwtheme) { - background-color: rgba(255,255,255,.725); - @navbarTextboxCustomBorder@ - color: black; - } - - #navigator-toolbox[tabsontop=false] html|*.urlbar-input:not(:-moz-lwtheme)::-moz-placeholder, - #navigator-toolbox[tabsontop=false] .searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input:not(:-moz-lwtheme)::-moz-placeholder { - opacity: 1.0; - color: #777; - } - - #navigator-toolbox[tabsontop=false] #urlbar:not(:-moz-lwtheme):hover, - #navigator-toolbox[tabsontop=false] .searchbar-textbox:not(:-moz-lwtheme):hover { - background-color: rgba(255,255,255,.898); - } - - #navigator-toolbox[tabsontop=false] #urlbar:not(:-moz-lwtheme)[focused], - #navigator-toolbox[tabsontop=false] .searchbar-textbox:not(:-moz-lwtheme)[focused] { - background-color: white; - } - - .tabbrowser-tab:not(:-moz-lwtheme) { - text-shadow: none; - } - - #main-window[sizemode=normal] .statuspanel-inner { - /* align with the browser's side borders */ - padding-left: 1px; - padding-right: 1px; - } - - #allTabs-panel, - #ctrlTab-panel { - background: transparent; - -moz-appearance: -moz-win-glass; - border-radius: 0; - border: none; - font: normal 1.2em "Segoe UI"; - color: black; - text-shadow: white -1px -1px .35em, white -1px 1px .35em, white 1px 1px .35em, white 1px -1px .35em; - } -} - -@media not all and (-moz-windows-compositor) { - @media (-moz-windows-default-theme) { - @media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win8), - (-moz-os-version: windows-win10) { - #main-window { - background-color: rgb(185,209,234); - } - #main-window:-moz-window-inactive { - background-color: rgb(215,228,242); - } - } - - #toolbar-menubar:not([autohide=true]):not(:-moz-lwtheme), - #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme), - #navigator-toolbox[tabsontop=false] > toolbar:not(#toolbar-menubar):not(:-moz-lwtheme) { - -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag"); - background-color: transparent; - } - #toolbar-menubar[autohide=true] { - background-color: transparent !important; - } - } - - #print-preview-toolbar:not(:-moz-lwtheme) { - -moz-appearance: -moz-win-browsertabbar-toolbox; - } -} - -/* ::::: splitmenu highlight style that imitates Windows 7 start menu ::::: */ -@media (-moz-os-version: windows-vista) and (-moz-windows-default-theme), - (-moz-os-version: windows-win7) and (-moz-windows-default-theme) { - .splitmenu-menuitem, - .splitmenu-menu { - -moz-appearance: none; - padding-top: 2px; - padding-bottom: 2px; - border: 1px solid transparent; - } - .splitmenu-menuitem { - margin-inline-end: 0; - } - .splitmenu-menu { - margin-inline-start: -1px; - } - .splitmenu-menuitem:-moz-locale-dir(ltr), - .splitmenu-menu:-moz-locale-dir(rtl) { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - } - .splitmenu-menu:-moz-locale-dir(ltr), - .splitmenu-menuitem:-moz-locale-dir(rtl) { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - } - - .splitmenu-menuitem > .menu-text { - margin-inline-start: 1px !important; - margin-inline-end: 3px !important; - } - .splitmenu-menu > .menu-right { - margin-inline-end: -3px; - } - - .splitmenu-menuitem[iconic], - .splitmenu-menu[iconic] { - padding-bottom: 1px; - } - .splitmenu-menuitem[iconic] > .menu-iconic-left { - margin-top: -3px; - margin-bottom: -2px; - margin-inline-start: -1px; - } - .splitmenu-menuitem[iconic] > .menu-iconic-text { - margin-inline-start: 2px !important; - margin-inline-end: 3px !important; - } - .splitmenu-menu[iconic] > .menu-right { - margin-top: -1px; - } - - .splitmenu-menuitem[_moz-menuactive], - .splitmenu-menu[_moz-menuactive] { - background-color: transparent; - background-image: linear-gradient(#fafbfd, #ebf3fd); - border-color: #aeccf1; - } - - .splitmenu-menuitem[disabled][_moz-menuactive], - .splitmenu-menu[disabled][_moz-menuactive] { - background-image: linear-gradient(#f8f9f9, #eaeaea); - border-color: #d8d7d7; - } - - .splitmenu-menu[_moz-menuactive]:not(:hover):not([open]) { - background-image: none; - } -} diff --git a/application/palemoon/themes/windows/click-to-play-warning-stripes.png b/application/palemoon/themes/windows/click-to-play-warning-stripes.png deleted file mode 100644 index 29f15f7b8c..0000000000 Binary files a/application/palemoon/themes/windows/click-to-play-warning-stripes.png and /dev/null differ diff --git a/application/palemoon/themes/windows/communicator/communicator.css b/application/palemoon/themes/windows/communicator/communicator.css deleted file mode 100644 index 0b57574fd2..0000000000 --- a/application/palemoon/themes/windows/communicator/communicator.css +++ /dev/null @@ -1,6 +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/. */ - -@import url("chrome://global/skin/"); - diff --git a/application/palemoon/themes/windows/communicator/jar.mn b/application/palemoon/themes/windows/communicator/jar.mn deleted file mode 100644 index 612d133352..0000000000 --- a/application/palemoon/themes/windows/communicator/jar.mn +++ /dev/null @@ -1,7 +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/. - -browser.jar: -% skin communicator classic/1.0 %skin/classic/communicator/ - skin/classic/communicator/communicator.css diff --git a/application/palemoon/themes/windows/communicator/moz.build b/application/palemoon/themes/windows/communicator/moz.build deleted file mode 100644 index ecb79e730d..0000000000 --- a/application/palemoon/themes/windows/communicator/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/application/palemoon/themes/windows/downloads/allDownloadsViewOverlay.css b/application/palemoon/themes/windows/downloads/allDownloadsViewOverlay.css deleted file mode 100644 index 3b8e43bc84..0000000000 --- a/application/palemoon/themes/windows/downloads/allDownloadsViewOverlay.css +++ /dev/null @@ -1,178 +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/. */ - -#downloadsRichListBox { - /** The default listbox appearance comes with an unwanted margin. **/ - -moz-appearance: none; - margin: 0; -} - -#downloadsRichListBox > richlistitem.download { - height: 6em; -} - -.downloadTypeIcon { - margin-inline-start: 8px; - margin-inline-end: 8px; - /* explicitly size the icon, so size doesn't vary on hidpi systems */ - height: 32px; - width: 32px; -} - -.blockedIcon { - list-style-image: url("chrome://global/skin/icons/Error.png"); -} - -.downloadTarget { - margin-bottom: 3px; - cursor: inherit; -} - -.downloadDetails { - opacity: 0.7; - font-size: 95%; - cursor: inherit; -} - -.downloadButton { - -moz-appearance: none; - background: transparent; - min-width: 0; - min-height: 0; - margin: 3px; - border: none; - padding: 5px; - list-style-image: url("chrome://browser/skin/downloads/buttons.png"); -} - -/*** Button icons ***/ - -.downloadButton.downloadCancel { - -moz-image-region: rect(0px, 16px, 16px, 0px); -} - -richlistitem.download:hover > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} - -richlistitem.download:hover > .downloadButton.downloadCancel:hover { - -moz-image-region: rect(0px, 48px, 16px, 32px); -} - -richlistitem.download:hover > .downloadButton.downloadCancel:active { - -moz-image-region: rect(0px, 64px, 16px, 48px); -} - -.downloadButton.downloadShow { - -moz-image-region: rect(16px, 16px, 32px, 0px); -} - -richlistitem.download:hover > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} - -richlistitem.download:hover > .downloadButton.downloadShow:hover { - -moz-image-region: rect(16px, 48px, 32px, 32px); -} - -richlistitem.download:hover > .downloadButton.downloadShow:active { - -moz-image-region: rect(16px, 64px, 32px, 48px); -} - -.downloadButton.downloadRetry { - -moz-image-region: rect(32px, 16px, 48px, 0px); -} - -richlistitem.download:hover > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} - -richlistitem.download:hover > .downloadButton.downloadRetry:hover { - -moz-image-region: rect(32px, 48px, 48px, 32px); -} - -richlistitem.download:hover > .downloadButton.downloadRetry:active { - -moz-image-region: rect(32px, 64px, 48px, 48px); -} - -@media not all and (-moz-os-version: windows-vista) and (-moz-windows-default-theme) { - @media not all and (-moz-os-version: windows-win7) and (-moz-windows-default-theme) { - richlistitem.download[selected] > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 80px, 16px, 64px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 96px, 16px, 80px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadCancel:hover { - -moz-image-region: rect(0px, 112px, 16px, 96px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadCancel:active { - -moz-image-region: rect(0px, 128px, 16px, 112px); - } - - richlistitem.download[selected] > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 80px, 32px, 64px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 96px, 32px, 80px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadShow:hover { - -moz-image-region: rect(16px, 112px, 32px, 96px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadShow:active { - -moz-image-region: rect(16px, 128px, 32px, 112px); - } - - richlistitem.download[selected] > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 80px, 48px, 64px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 96px, 48px, 80px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadRetry:hover { - -moz-image-region: rect(32px, 112px, 48px, 96px); - } - - richlistitem.download[selected]:hover > .downloadButton.downloadRetry:active { - -moz-image-region: rect(32px, 128px, 48px, 112px); - } - } -} - -@media (-moz-os-version: windows-vista) and (-moz-windows-default-theme), - (-moz-os-version: windows-win7) and (-moz-windows-default-theme) { - /* - -moz-appearance: menuitem is almost right, but the hover effect is not - transparent and is lighter than desired. - - Copied from the autocomplete richlistbox styling in - toolkit/themes/windows/global/autocomplete.css - - This styling should be kept in sync with the style from the above file. - */ - #downloadsRichListBox > richlistitem.download[selected] { - color: inherit; - background-color: transparent; - /* four gradients for the bevel highlights on each edge, one for blue background */ - background-image: - linear-gradient(to bottom, rgba(255,255,255,0.9) 3px, transparent 3px), - linear-gradient(to right, rgba(255,255,255,0.5) 3px, transparent 3px), - linear-gradient(to left, rgba(255,255,255,0.5) 3px, transparent 3px), - linear-gradient(to top, rgba(255,255,255,0.4) 3px, transparent 3px), - linear-gradient(to bottom, rgba(163,196,247,0.3), rgba(122,180,246,0.3)); - background-clip: content-box; - border-radius: 6px; - outline: 1px solid rgb(124,163,206); - -moz-outline-radius: 3px; - outline-offset: -2px; - } -} diff --git a/application/palemoon/themes/windows/downloads/buttons.png b/application/palemoon/themes/windows/downloads/buttons.png deleted file mode 100644 index ca87b401b2..0000000000 Binary files a/application/palemoon/themes/windows/downloads/buttons.png and /dev/null differ diff --git a/application/palemoon/themes/windows/downloads/contentAreaDownloadsView.css b/application/palemoon/themes/windows/downloads/contentAreaDownloadsView.css deleted file mode 100644 index ece99eacd3..0000000000 --- a/application/palemoon/themes/windows/downloads/contentAreaDownloadsView.css +++ /dev/null @@ -1,22 +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/. */ - -@import url("chrome://global/skin/inContentUI.css"); - -.downloadButton { - box-shadow: none; -} - -.downloadButton:not([disabled="true"]):hover:active, -.downloadButton:not([disabled]):hover:active { - background: transparent; - border: none; - box-shadow: none; -} - -#downloadsListEmptyDescription { - margin: 1em; - text-align: center; - color: GrayText; -} diff --git a/application/palemoon/themes/windows/downloads/download-notification-finish.png b/application/palemoon/themes/windows/downloads/download-notification-finish.png deleted file mode 100644 index 5194f5d59a..0000000000 Binary files a/application/palemoon/themes/windows/downloads/download-notification-finish.png and /dev/null differ diff --git a/application/palemoon/themes/windows/downloads/download-notification-start.png b/application/palemoon/themes/windows/downloads/download-notification-start.png deleted file mode 100644 index bd548b1838..0000000000 Binary files a/application/palemoon/themes/windows/downloads/download-notification-start.png and /dev/null differ diff --git a/application/palemoon/themes/windows/downloads/download-summary.png b/application/palemoon/themes/windows/downloads/download-summary.png deleted file mode 100644 index 67003c7d7a..0000000000 Binary files a/application/palemoon/themes/windows/downloads/download-summary.png and /dev/null differ diff --git a/application/palemoon/themes/windows/downloads/downloads.css b/application/palemoon/themes/windows/downloads/downloads.css deleted file mode 100644 index 040f890714..0000000000 --- a/application/palemoon/themes/windows/downloads/downloads.css +++ /dev/null @@ -1,487 +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/. */ - -/*** Panel and outer controls ***/ - -#downloadsPanel > .panel-arrowcontainer > .panel-arrowcontent { - padding: 0; -} - -#downloadsListBox { - background-color: transparent; - padding: 4px; - color: inherit; -} - -#downloadsPanel:not([hasdownloads]) > #downloadsListBox { - display: none; -} - -#downloadsPanel[hasdownloads] > #emptyDownloads { - display: none; -} - -#emptyDownloads { - padding: 10px 20px; - max-width: 40ch; -} - -#downloadsHistory { - background: transparent; - cursor: pointer; -} - -@media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7) { - #downloadsHistory { - color: -moz-nativehyperlinktext; - } -} - -#downloadsPanel[keyfocus] > #downloadsFooter > #downloadsHistory:focus { - outline: 1px -moz-dialogtext dotted; - outline-offset: -1px; -} - -#downloadsHistory > .button-box { - border: none; - margin: 1em; -} - -#downloadsFooter { - background-color: hsla(210,4%,10%,.04); - box-shadow: 0 1px 0 hsla(210,4%,10%,.08) inset; - transition-duration: 150ms; - transition-property: background-color; -} - -#downloadsFooter:hover { - background-color: hsla(210,4%,10%,.05); -} - -#downloadsFooter:hover:active { - background-color: hsla(210,4%,10%,.1); - box-shadow: 0 2px 0 0 hsla(210,4%,10%,.1) inset; -} - -@media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7) { - @media (-moz-windows-default-theme) { - #downloadsFooter { - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - transition-duration: 0s; - } - - #downloadsFooter, - #downloadsFooter:hover, - #downloadsFooter:hover:active { - background-color: #f1f5fb; - box-shadow: 0px 1px 2px rgb(204,214,234) inset; - } - } -} - -/*** Downloads Summary and List items ***/ - -#downloadsSummary, -richlistitem[type="download"] { - height: 7em; - padding-inline-end: 0; - color: inherit; -} - -#downloadsSummary { - padding: 8px 38px 8px 12px; - cursor: pointer; - -moz-user-focus: normal; -} - -#downloadsPanel[keyfocus] > #downloadsFooter > #downloadsSummary:focus { - outline: 1px -moz-dialogtext dotted; - outline-offset: -5px; -} - -#downloadsSummary > .downloadTypeIcon { - list-style-image: url("chrome://browser/skin/downloads/download-summary.png"); -} - -#downloadsSummaryDescription { - color: -moz-nativehyperlinktext; -} - -richlistitem[type="download"] { - margin: 0; - border-top: 1px solid hsla(0,0%,100%,.3); - border-bottom: 1px solid hsla(220,18%,51%,.25); - background: transparent; - padding: 8px; -} - -@media (-moz-windows-default-theme) and (-moz-os-version: windows-vista), - (-moz-windows-default-theme) and (-moz-os-version: windows-win7) { - richlistitem[type="download"] { - border: 1px solid transparent; - border-bottom: 1px solid hsl(213,40%,90%); - } -} - -richlistitem[type="download"]:first-child { - border-top: 1px solid transparent; -} - -@media (-moz-windows-default-theme) { - richlistitem[type="download"]:last-child { - border-bottom: 1px solid transparent; - } -} - -#downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] { - outline: 1px -moz-dialogtext dotted; - outline-offset: -1px; -} - -.downloadTypeIcon { - margin-inline-end: 8px; - /* Prevent flickering when changing states. */ - height: 32px; - width: 32px; -} - -.blockedIcon { - list-style-image: url("chrome://global/skin/icons/Error.png"); -} - -/* We hold .downloadDisplayName, .downloadProgress and .downloadDetails - inside of a vbox with class .downloadContainer. We set the font-size of - the entire container to 90% because: - - 1) This is the size that we want .downloadDetails to be - 2) The container's width is set by localizers by &downloadDetails.width;, - which is a ch unit. Since this is the value that should control the - panel width, we apply it to the outer container to constrain - .downloadDisplayName and .downloadProgress. - - Finally, since we want .downloadDisplayName's font-size to be at 100% of - the font-size of .downloadContainer's parent, we use calc to go from the - smaller font-size back to the original font-size. - */ -#downloadsSummaryDetails, -.downloadContainer { - font-size: 90%; -} - -#downloadsSummaryDescription, -.downloadDisplayName { - margin-bottom: 6px; - cursor: inherit; -} - -.downloadDisplayName { - font-size: calc(100%/0.9); -} - -#downloadsSummaryDetails, -.downloadDetails { - opacity: 0.6; - cursor: inherit; -} - -.downloadButton { - -moz-appearance: none; - min-width: 0; - min-height: 0; - margin: 3px; - border: none; - background: transparent; - padding: 5px; - list-style-image: url("chrome://browser/skin/downloads/buttons.png"); -} - -.downloadButton > .button-box { - border: 1px solid transparent; - padding: 0; -} - -#downloadsPanel[keyfocus] .downloadButton:focus > .button-box { - border: 1px dotted ThreeDDarkShadow; -} - -/*** Highlighted list items ***/ - -#downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover { - background-color: hsla(210,4%,10%,.08); - outline: 1px solid hsla(210,4%,10%,.1); - outline-offset: -1px; - cursor: pointer; -} - -#downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover:active { - background-color: hsla(210,4%,10%,.15); - outline: 1px solid hsla(210,4%,10%,.15); - box-shadow: 0 1px 0 0 hsla(210,4%,10%,.05) inset; -} - -@media (-moz-os-version: windows-vista), - (-moz-os-version: windows-win7) { - #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover { - border-radius: 3px; - outline: 0; - border-top: 1px solid hsla(0,0%,100%,.2); - border-bottom: 1px solid hsla(0,0%,0%,.2); - background-color: Highlight; - color: HighlightText; - } - - #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover:active { - background-color: Highlight; - outline: 0; - box-shadow: none; - } -} - -@media (-moz-windows-default-theme) and (-moz-os-version: windows-vista), - (-moz-windows-default-theme) and (-moz-os-version: windows-win7) { - #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover { - border: 1px solid hsl(213,45%,65%); - box-shadow: 0 0 0 1px hsla(0,0%,100%,.5) inset, - 0 1px 0 hsla(0,0%,100%,.3) inset; - background-image: linear-gradient(hsl(212,86%,92%), hsl(212,91%,86%)); - color: black; - } -} - -/*** Button icons ***/ - -.downloadButton.downloadCancel { - -moz-image-region: rect(0px, 16px, 16px, 0px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel { - -moz-image-region: rect(0px, 32px, 16px, 16px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:hover { - -moz-image-region: rect(0px, 48px, 16px, 32px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:active { - -moz-image-region: rect(0px, 64px, 16px, 48px); -} - -.downloadButton.downloadShow { - -moz-image-region: rect(16px, 16px, 32px, 0px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadShow { - -moz-image-region: rect(16px, 32px, 32px, 16px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadShow:hover { - -moz-image-region: rect(16px, 48px, 32px, 32px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadShow:active { - -moz-image-region: rect(16px, 64px, 32px, 48px); -} - -.downloadButton.downloadRetry { - -moz-image-region: rect(32px, 16px, 48px, 0px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry { - -moz-image-region: rect(32px, 32px, 48px, 16px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:hover { - -moz-image-region: rect(32px, 48px, 48px, 32px); -} -richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:active { - -moz-image-region: rect(32px, 64px, 48px, 48px); -} - -/*** Status and progress indicator ***/ - -#downloads-indicator-anchor { - /* Makes the outermost stack element positioned, so that its contents are - rendered over the main browser window in the Z order. This is required by - the animated event notification. */ - position: relative; -} - -#navigator-toolbox[iconsize=large][mode=icons] > #nav-bar[brighttext] #downloads-indicator[counter] > #downloads-indicator-anchor { - /* Use a dark download button when appropriate to improve text legibility */ - background: hsla(94,56%,18%,.3) padding-box; - background-image: linear-gradient(hsla(0,0%,0%,.1), hsla(0,0%,0%,.4)); - border-color: hsla(29,12%,90%,.2) hsla(29,12%,90%,.2) hsla(29,12%,90%,.2); - box-shadow: 0 1px hsla(0,0%,0%,.05) inset, - 0 1px hsla(29,12%,90%,.05), - 0 0 2px hsla(29,12%,90%,.05); -} - -/*** Main indicator icon ***/ - -#downloads-indicator-icon { - background: -moz-image-rect(var(--toolbarbutton-image), - 0, 108, 18, 90) center no-repeat; - min-width: 18px; - min-height: 18px; -} - -toolbar[brighttext] #downloads-indicator-icon { - background: -moz-image-rect(var(--toolbarbutton-inverted-image), - 0, 108, 18, 90) center no-repeat; -} - -#downloads-indicator[attention] > #downloads-indicator-anchor > #downloads-indicator-icon { - background: -moz-image-rect(var(--toolbarbutton-image), - 19, 108, 36, 90) center no-repeat; -} - -@media (-moz-windows-compositor) { - :-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) #downloads-indicator-icon:not(:-moz-lwtheme), - #TabsToolbar[tabsontop=true] #downloads-indicator-icon:not(:-moz-lwtheme), - #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child #downloads-indicator-icon:not(:-moz-lwtheme) { - background: -moz-image-rect(var(--toolbarbutton-glass-image), - 0, 108, 18, 90) center no-repeat; - } - #downloads-indicator[attention] > #downloads-indicator-anchor > #downloads-indicator-icon { - background: -moz-image-rect(var(--toolbarbutton-glass-image), - 19, 108, 36, 90) center no-repeat; -} - - -} - -/* In the next few rules, we use :not([counter]) as a shortcut that is - equivalent to -moz-any([progress], [paused]). */ - -#downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter { - background: -moz-image-rect(var(--toolbarbutton-image), - 0, 108, 18, 90) center no-repeat; - background-size: 12px; -} - -toolbar[brighttext] #downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter { - background: -moz-image-rect(var(--toolbarbutton-inverted-image), - 0, 108, 18, 90) center no-repeat; -} - -@media (-moz-windows-compositor) { - :-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) #downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter:not(:-moz-lwtheme), - #TabsToolbar[tabsontop=true] #downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter:not(:-moz-lwtheme), - #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child #downloads-indicator:not([counter]) > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter:not(:-moz-lwtheme) { - background: -moz-image-rect(var(--toolbarbutton-glass-image), - 0, 108, 18, 90) center no-repeat; - } - #downloads-indicator:not([counter])[attention] > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-counter { - background: -moz-image-rect(var(--toolbarbutton-glass-image), - 19, 108, 36, 90) center no-repeat; - } -} - -/*** Download notifications ***/ - -#downloads-indicator-notification { - opacity: 0; - background-size: 16px; - background-position: center; - background-repeat: no-repeat; -} - -@keyframes downloadsIndicatorNotificationStartRight { - from { opacity: 0; transform: translate(-128px, 128px) scale(8); } - 20% { opacity: .85; animation-timing-function: ease-out; } - to { opacity: 0; transform: translate(0) scale(1); } -} - -@keyframes downloadsIndicatorNotificationStartLeft { - from { opacity: 0; transform: translate(128px, 128px) scale(8); } - 20% { opacity: .85; animation-timing-function: ease-out; } - to { opacity: 0; transform: translate(0) scale(1); } -} - -#downloads-indicator[notification="start"] > #downloads-indicator-anchor > #downloads-indicator-notification { - background-image: url("chrome://browser/skin/downloads/download-notification-start.png"); - animation-name: downloadsIndicatorNotificationStartRight; - animation-duration: 1s; -} - -#downloads-indicator[notification="start"]:-moz-locale-dir(rtl) > #downloads-indicator-anchor > #downloads-indicator-notification { - animation-name: downloadsIndicatorNotificationStartLeft; -} - -@keyframes downloadsIndicatorNotificationFinish { - from { opacity: 0; transform: scale(1); } - 20% { opacity: .65; animation-timing-function: ease-in; } - to { opacity: 0; transform: scale(8); } -} - -#downloads-indicator[notification="finish"] > #downloads-indicator-anchor > #downloads-indicator-notification { - background-image: url("chrome://browser/skin/downloads/download-notification-finish.png"); - animation-name: downloadsIndicatorNotificationFinish; - animation-duration: 1s; -} - -/*** Progress bar and text ***/ - -#downloads-indicator-counter { - height: 9px; - margin: -3px 0px 0px 0px; - color: hsl(0,0%,30%); - text-shadow: hsla(0,0%,100%,.5) 0 1px; - font-size: 9px; - line-height: 9px; - text-align: center; -} - -toolbar[brighttext] #downloads-indicator-counter { - color: white; - text-shadow: 0 0 1px rgba(0,0,0,.7), - 0 1px 1.5px rgba(0,0,0,.5); -} - -#downloads-indicator-progress { - width: 16px; - height: 5px; - min-width: 0; - min-height: 0; - margin-top: 1px; - margin-bottom: 2px; - border-radius: 2px; - box-shadow: 0 1px 0 hsla(0,0%,100%,.4); -} - -#downloads-indicator-progress > .progress-bar { - -moz-appearance: none; - min-width: 0; - min-height: 0; - /* The background-clip: border-box; and background-image: none; are there to expand the background-color behind the border */ - background-clip: padding-box, border-box; - background-color: rgb(90, 201, 66); - background-image: linear-gradient(transparent 1px, rgba(255, 255, 255, 0.4) 1px, rgba(255, 255, 255, 0.4) 2px, transparent 2px), none; - border: 1px solid; - border-color: rgba(0,43,86,.6) rgba(0,43,86,.4) rgba(0,43,86,.4); - border-radius: 2px 0 0 2px; -} - -#downloads-indicator-progress > .progress-remainder { - -moz-appearance: none; - min-width: 0; - min-height: 0; - background-image: linear-gradient(#505050, #575757); - border: 1px solid; - border-color: hsla(0,0%,0%,.6) hsla(0,0%,0%,.4) hsla(0,0%,0%,.4); - border-inline-start: none; - border-radius: 0 2px 2px 0; -} - -#downloads-indicator[paused] > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-progress > .progress-bar { - background-color: rgb(220, 230, 81); -} - -#downloads-indicator[paused] > #downloads-indicator-anchor > #downloads-indicator-progress-area > #downloads-indicator-progress > .progress-remainder { - background-image: linear-gradient(#4b5000, #515700); -} - -toolbar[mode="full"] > #downloads-indicator > .toolbarbutton-text { - margin: 0; - text-align: center; -} - -#downloads-indicator-counter { - margin-bottom: -1px; -} diff --git a/application/palemoon/themes/windows/engineManager.css b/application/palemoon/themes/windows/engineManager.css deleted file mode 100644 index c6d42cce29..0000000000 --- a/application/palemoon/themes/windows/engineManager.css +++ /dev/null @@ -1,16 +0,0 @@ -%if 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/. */ -%endif - -#engineList treechildren::-moz-tree-image(engineName) { - margin-inline-end: 4px; - margin-inline-start: 1px; - width: 16px; - height: 16px; -} - -#engineList treechildren::-moz-tree-row { - height: 20px; -} diff --git a/application/palemoon/themes/windows/feeds/feed-icons-16.png b/application/palemoon/themes/windows/feeds/feed-icons-16.png deleted file mode 100644 index b822aa44f7..0000000000 Binary files a/application/palemoon/themes/windows/feeds/feed-icons-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/feeds/feedIcon.png b/application/palemoon/themes/windows/feeds/feedIcon.png deleted file mode 100644 index b4d5994995..0000000000 Binary files a/application/palemoon/themes/windows/feeds/feedIcon.png and /dev/null differ diff --git a/application/palemoon/themes/windows/feeds/feedIcon16.png b/application/palemoon/themes/windows/feeds/feedIcon16.png deleted file mode 100644 index 7c3aceb66f..0000000000 Binary files a/application/palemoon/themes/windows/feeds/feedIcon16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/feeds/subscribe-ui.css b/application/palemoon/themes/windows/feeds/subscribe-ui.css deleted file mode 100644 index f21c037e67..0000000000 --- a/application/palemoon/themes/windows/feeds/subscribe-ui.css +++ /dev/null @@ -1,29 +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/. */ - -.alwaysUse { - padding: 5px; -} - -.handlersMenuPopup > menuitem { - padding-inline-start: 23px; -} - -.handlersMenuPopup > menuitem.menuitem-iconic { - padding-inline-start: 2px; -} - -.handlersMenuPopup > .menuitem-iconic > .menu-iconic-left { - display: -moz-box; - min-width: 16px; - padding-inline-end: 2px; -} - -.chooseApplicationMenuItem { - list-style-image: url("chrome://browser/skin/preferences/application.png"); -} - -#feedHeader[dir="rtl"] .handlersMenuList > menupopup { - direction: rtl; -} diff --git a/application/palemoon/themes/windows/feeds/subscribe.css b/application/palemoon/themes/windows/feeds/subscribe.css deleted file mode 100644 index d6247569b1..0000000000 --- a/application/palemoon/themes/windows/feeds/subscribe.css +++ /dev/null @@ -1,163 +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/. */ - -html { - background: -moz-Dialog; - font: 3mm tahoma,arial,helvetica,sans-serif; -} - -#feedBody { - border: 1px solid THreeDShadow; - padding: 3em; - padding-inline-start: 30px; - margin: 2em auto; - background: -moz-Field; -} - -#feedHeaderContainer { - border: 1px solid ThreeDShadow; - border-radius: 10px; - margin: -4em auto 0 auto; - background-color: InfoBackground; -} - -#feedHeader { - margin-top: 4.9em; - margin-bottom: 1em; - margin-inline-start: 1.4em; - margin-inline-end: 1em; - padding-inline-start: 2.9em; - font-size: 110%; - color: InfoText; -} - -#feedIntroText { - display: none; -} - -.feedBackground { - background: url("chrome://browser/skin/feeds/feedIcon.png") 0% 10% no-repeat InfoBackground; -} - -.videoPodcastBackground { - background: url("chrome://browser/skin/feeds/videoFeedIcon.png") 0% 10% no-repeat InfoBackground; -} - -.audioPodcastBackground { - background: url("chrome://browser/skin/feeds/audioFeedIcon.png") 0% 10% no-repeat InfoBackground; -} - -#feedHeader[dir="rtl"] { - background-position: 100% 10%; -} - -#feedHeader[firstrun="true"] #feedIntroText { - padding-top: 0.1em; - padding-inline-start: 0.6em; - display: block; -} - -#feedHeader[firstrun="true"] > #feedSubscribeLine { - padding-inline-start: 1.8em; -} - -#feedSubscribeLine { - padding-top: 0.2em; -} - -img { - max-width: 100%; -} - -/* Don't print subscription UI */ -@media print { - #feedHeaderContainer { - display: none; - } -} - -body { - margin: 0; - padding: 0 3em; - color: -moz-fieldText; - font: message-box; -} - -h1 { - font-size: 160%; - border-bottom: 2px solid ThreeDLightShadow; - margin: 0 0 .2em 0; -} - -h2 { - color: ThreeDDarkShadow; - font-size: 110%; - font-weight: normal; - margin: 0 0 .6em 0; -} - -#feedTitleLink { - float: right; - margin-inline-start: .6em; - margin-inline-end: 0; - margin-top: 0; - margin-bottom: 0; -} - -a[href] img { - border: none; -} - -#feedTitleContainer { - margin-inline-start: 0; - margin-inline-end: .6em; - margin-top: 0; - margin-bottom: 0; -} - -#feedTitleImage { - margin-inline-start: .6em; - margin-inline-end: 0; - margin-top: 0; - margin-bottom: 0; - max-width: 300px; - max-height: 150px; -} - -.feedEntryContent { - font-size: 110%; -} - -.link { - color: #0000FF; - text-decoration: underline; - cursor: pointer; -} - -.link:hover:active { - color: #FF0000; -} - -.lastUpdated { - font-size: 85%; - font-weight: normal; -} - -.type-icon { - vertical-align: bottom; - height: 16px; - width: 16px; -} - -.enclosures { - border: 1px solid THreeDShadow; - padding: 1em; - margin: 1em auto; - background: -moz-Dialog; -} - -.enclosure { - vertical-align: middle; - margin-left: 2px; -} diff --git a/application/palemoon/themes/windows/icon.png b/application/palemoon/themes/windows/icon.png deleted file mode 100644 index ff4f21f9a6..0000000000 Binary files a/application/palemoon/themes/windows/icon.png and /dev/null differ diff --git a/application/palemoon/themes/windows/identity-icons-generic.png b/application/palemoon/themes/windows/identity-icons-generic.png deleted file mode 100644 index a39e493c1e..0000000000 Binary files a/application/palemoon/themes/windows/identity-icons-generic.png and /dev/null differ diff --git a/application/palemoon/themes/windows/identity-icons-https-ev.png b/application/palemoon/themes/windows/identity-icons-https-ev.png deleted file mode 100644 index d49be13cb6..0000000000 Binary files a/application/palemoon/themes/windows/identity-icons-https-ev.png and /dev/null differ diff --git a/application/palemoon/themes/windows/identity-icons-https-mixed-active.png b/application/palemoon/themes/windows/identity-icons-https-mixed-active.png deleted file mode 100644 index 3c77bc84db..0000000000 Binary files a/application/palemoon/themes/windows/identity-icons-https-mixed-active.png and /dev/null differ diff --git a/application/palemoon/themes/windows/identity-icons-https.png b/application/palemoon/themes/windows/identity-icons-https.png deleted file mode 100644 index ffd6694269..0000000000 Binary files a/application/palemoon/themes/windows/identity-icons-https.png and /dev/null differ diff --git a/application/palemoon/themes/windows/identity.png b/application/palemoon/themes/windows/identity.png deleted file mode 100644 index 0dcccd4931..0000000000 Binary files a/application/palemoon/themes/windows/identity.png and /dev/null differ diff --git a/application/palemoon/themes/windows/imagedocument.png b/application/palemoon/themes/windows/imagedocument.png deleted file mode 100644 index ff4f21f9a6..0000000000 Binary files a/application/palemoon/themes/windows/imagedocument.png and /dev/null differ diff --git a/application/palemoon/themes/windows/jar.mn b/application/palemoon/themes/windows/jar.mn deleted file mode 100644 index f90de60a10..0000000000 --- a/application/palemoon/themes/windows/jar.mn +++ /dev/null @@ -1,169 +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/. - -browser.jar: -% skin browser classic/1.0 %skin/classic/browser/ - skin/classic/browser/sanitizeDialog.css -* skin/classic/browser/aboutPrivateBrowsing.css -* skin/classic/browser/aboutSessionRestore.css - skin/classic/browser/aboutSessionRestore-window-icon.png - skin/classic/browser/aboutCertError.css - skin/classic/browser/aboutCertError_sectionCollapsed.png - skin/classic/browser/aboutCertError_sectionCollapsed-rtl.png - skin/classic/browser/aboutCertError_sectionExpanded.png -#ifdef MOZ_SERVICES_SYNC - skin/classic/browser/aboutSyncTabs.css -#endif -* skin/classic/browser/autocomplete.css - skin/classic/browser/actionicon-tab.png - skin/classic/browser/appmenu-icons.png - skin/classic/browser/appmenu-dropmarker.png -* skin/classic/browser/browser.css - skin/classic/browser/caption-buttons.svg - skin/classic/browser/click-to-play-warning-stripes.png -* skin/classic/browser/engineManager.css - skin/classic/browser/Geolocation-16.png - skin/classic/browser/Geolocation-64.png - skin/classic/browser/Info.png - skin/classic/browser/identity.png - skin/classic/browser/imagedocument.png - skin/classic/browser/identity-icons-generic.png - skin/classic/browser/identity-icons-https.png - skin/classic/browser/identity-icons-https-ev.png - skin/classic/browser/identity-icons-https-mixed-active.png - skin/classic/browser/keyhole-forward-mask.svg - skin/classic/browser/KUI-background.png - skin/classic/browser/KUI-close.png - skin/classic/browser/livemark-folder.png - skin/classic/browser/menu-back.png - skin/classic/browser/menu-forward.png - skin/classic/browser/mixed-content-blocked-16.png - skin/classic/browser/mixed-content-blocked-64.png - skin/classic/browser/monitor.png - skin/classic/browser/monitor_16-10.png - skin/classic/browser/pageInfo.css - skin/classic/browser/pageInfo.png - skin/classic/browser/page-livemarks.png (feeds/feedIcon16.png) - skin/classic/browser/pointerLock-16.png - skin/classic/browser/pointerLock-64.png - skin/classic/browser/Privacy-16.png - skin/classic/browser/Privacy-32.png - skin/classic/browser/Privacy-48.png - skin/classic/browser/Privacy-64.png - skin/classic/browser/privatebrowsing-light.png - skin/classic/browser/privatebrowsing-dark.png - skin/classic/browser/reload-stop-go.png - skin/classic/browser/sanitize.png - skin/classic/browser/searchbar.css - skin/classic/browser/searchbar-dropdown-arrow.png - skin/classic/browser/Secure24.png - skin/classic/browser/setDesktopBackground.css - skin/classic/browser/slowStartup-16.png - skin/classic/browser/Toolbar.png - skin/classic/browser/Toolbar-glass.png - skin/classic/browser/Toolbar-inverted.png - skin/classic/browser/Toolbar.svg - skin/classic/browser/Toolbar-glass.svg - skin/classic/browser/Toolbar-inverted.svg - skin/classic/browser/toolbarbutton-dropdown-arrow.png - skin/classic/browser/toolbarbutton-dropdown-arrow-inverted.png - skin/classic/browser/urlbar-arrow.png - skin/classic/browser/urlbar-popup-blocked.png - skin/classic/browser/urlbar-history-dropmarker.png - skin/classic/browser/web-notifications-icon.svg - skin/classic/browser/web-notifications-tray.svg - skin/classic/browser/notification-pluginNormal.png (../shared/plugins/notification-pluginNormal.png) - skin/classic/browser/notification-pluginAlert.png (../shared/plugins/notification-pluginAlert.png) - skin/classic/browser/notification-pluginBlocked.png (../shared/plugins/notification-pluginBlocked.png) -#ifdef MOZ_WEBRTC - skin/classic/browser/webRTC-shareDevice-16.png - skin/classic/browser/webRTC-shareDevice-64.png - skin/classic/browser/webRTC-sharingDevice-16.png -#endif - skin/classic/browser/downloads/buttons.png (downloads/buttons.png) - skin/classic/browser/downloads/download-notification-finish.png (downloads/download-notification-finish.png) - skin/classic/browser/downloads/download-notification-start.png (downloads/download-notification-start.png) - skin/classic/browser/downloads/download-summary.png (downloads/download-summary.png) - skin/classic/browser/downloads/downloads.css (downloads/downloads.css) - skin/classic/browser/downloads/allDownloadsViewOverlay.css (downloads/allDownloadsViewOverlay.css) - skin/classic/browser/downloads/contentAreaDownloadsView.css (downloads/contentAreaDownloadsView.css) - skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png) - skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png) - skin/classic/browser/feeds/videoFeedIcon.png (feeds/feedIcon.png) - skin/classic/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16.png) - skin/classic/browser/feeds/audioFeedIcon.png (feeds/feedIcon.png) - skin/classic/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16.png) - skin/classic/browser/feeds/feed-icons-16.png (feeds/feed-icons-16.png) - skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css) - skin/classic/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css) -* skin/classic/browser/newtab/newTab.css (newtab/newTab.css) - skin/classic/browser/newtab/controls.png (../shared/newtab/controls.png) - skin/classic/browser/newtab/noise.png (../shared/newtab/noise.png) - skin/classic/browser/newtab/pinned.png (../shared/newtab/pinned.png) - skin/classic/browser/places/places.css (places/places.css) -* skin/classic/browser/places/organizer.css (places/organizer.css) - skin/classic/browser/places/editBookmark.png (places/editBookmark.png) - skin/classic/browser/places/bookmark.png (places/bookmark.png) - skin/classic/browser/places/query.png (places/query.png) - skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png) - skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png) - skin/classic/browser/places/calendar.png (places/calendar.png) - skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png) - skin/classic/browser/places/editBookmarkOverlay.css (places/editBookmarkOverlay.css) - skin/classic/browser/places/libraryToolbar.png (places/libraryToolbar.png) - skin/classic/browser/places/libraryToolbar.svg (places/libraryToolbar.svg) - skin/classic/browser/places/starred48.png (places/starred48.png) - skin/classic/browser/places/unstarred48.png (places/unstarred48.png) - skin/classic/browser/places/tag.png (places/tag.png) - skin/classic/browser/places/history.png (places/history.png) - skin/classic/browser/places/allBookmarks.png (places/allBookmarks.png) - skin/classic/browser/places/unsortedBookmarks.png (places/unsortedBookmarks.png) - skin/classic/browser/places/downloads.png (places/downloads.png) - skin/classic/browser/places/livemark-item.png (places/livemark-item.png) - skin/classic/browser/permissions/aboutPermissions.css (permissions/aboutPermissions.css) - skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png) - skin/classic/browser/preferences/application.png (preferences/application.png) - skin/classic/browser/preferences/mail.png (preferences/mail.png) - skin/classic/browser/preferences/Options.png (preferences/Options.png) -#ifdef MOZ_SERVICES_SYNC - skin/classic/browser/preferences/Options-sync.png (preferences/Options-sync.png) -#endif - skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png) -* skin/classic/browser/preferences/preferences.css (preferences/preferences.css) - skin/classic/browser/preferences/applications.css (preferences/applications.css) - skin/classic/browser/statusbar/dynamic.css (../shared/statusbar/dynamic.css) -* skin/classic/browser/statusbar/overlay.css (statusbar/overlay.css) -* skin/classic/browser/statusbar/prefs.css (statusbar/prefs.css) - skin/classic/browser/statusbar/pulse.png (../shared/statusbar/pulse.png) - skin/classic/browser/statusbar/pms16.png (../shared/statusbar/pms16.png) - skin/classic/browser/statusbar/pms24.png (../shared/statusbar/pms24.png) - skin/classic/browser/statusbar/throbber-idle.png (../shared/statusbar/throbber-idle.png) - skin/classic/browser/statusbar/throbberStatic.png (../shared/statusbar/throbberStatic.png) - skin/classic/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png) - skin/classic/browser/tabbrowser/alltabs-inverted.png (tabbrowser/alltabs-inverted.png) - skin/classic/browser/tabbrowser/newtab.png (tabbrowser/newtab.png) - skin/classic/browser/tabbrowser/newtab-glass.png (tabbrowser/newtab-glass.png) - skin/classic/browser/tabbrowser/newtab-inverted.png (tabbrowser/newtab-inverted.png) - skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png) - skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png) - skin/classic/browser/tabbrowser/tab-arrow-left.png (tabbrowser/tab-arrow-left.png) - skin/classic/browser/tabbrowser/tab-arrow-left-glass.png (tabbrowser/tab-arrow-left-glass.png) - skin/classic/browser/tabbrowser/tab-arrow-left-inverted.png (tabbrowser/tab-arrow-left-inverted.png) - skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png) - skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) - skin/classic/browser/tabbrowser/tab-audio.svg (../shared/tabbrowser/tab-audio.svg) - skin/classic/browser/tabbrowser/tab-audio-small.svg (../shared/tabbrowser/tab-audio-small.svg) -#ifdef MOZ_SERVICES_SYNC - skin/classic/browser/sync-throbber.png - skin/classic/browser/sync-16.png - skin/classic/browser/sync-32.png - skin/classic/browser/sync-128.png - skin/classic/browser/sync-bg.png - skin/classic/browser/sync-desktopIcon.png - skin/classic/browser/sync-mobileIcon.png - skin/classic/browser/syncSetup.css - skin/classic/browser/syncCommon.css - skin/classic/browser/syncQuota.css - skin/classic/browser/syncProgress.css -#endif diff --git a/application/palemoon/themes/windows/livemark-folder.png b/application/palemoon/themes/windows/livemark-folder.png deleted file mode 100644 index 79e3329451..0000000000 Binary files a/application/palemoon/themes/windows/livemark-folder.png and /dev/null differ diff --git a/application/palemoon/themes/windows/mixed-content-blocked-16.png b/application/palemoon/themes/windows/mixed-content-blocked-16.png deleted file mode 100644 index 7cf33ec4c5..0000000000 Binary files a/application/palemoon/themes/windows/mixed-content-blocked-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/mixed-content-blocked-64.png b/application/palemoon/themes/windows/mixed-content-blocked-64.png deleted file mode 100644 index cac4415140..0000000000 Binary files a/application/palemoon/themes/windows/mixed-content-blocked-64.png and /dev/null differ diff --git a/application/palemoon/themes/windows/monitor.png b/application/palemoon/themes/windows/monitor.png deleted file mode 100644 index 35e7b20562..0000000000 Binary files a/application/palemoon/themes/windows/monitor.png and /dev/null differ diff --git a/application/palemoon/themes/windows/monitor_16-10.png b/application/palemoon/themes/windows/monitor_16-10.png deleted file mode 100644 index 41950340e8..0000000000 Binary files a/application/palemoon/themes/windows/monitor_16-10.png and /dev/null differ diff --git a/application/palemoon/themes/windows/moz.build b/application/palemoon/themes/windows/moz.build deleted file mode 100644 index de50366273..0000000000 --- a/application/palemoon/themes/windows/moz.build +++ /dev/null @@ -1,8 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -DIRS += ['communicator'] - -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/application/palemoon/themes/windows/newtab/newTab.css b/application/palemoon/themes/windows/newtab/newTab.css deleted file mode 100644 index 50b036ba80..0000000000 --- a/application/palemoon/themes/windows/newtab/newTab.css +++ /dev/null @@ -1,36 +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/. */ - -%include ../../shared/newtab/newTab.css.inc - -.newtab-undo-button { - -moz-appearance: none; - color: -moz-nativehyperlinktext; - color: rgb(78,114,204); - cursor: pointer; - padding: 0; - margin: 0 4px; - border: 0; - background: transparent; - text-decoration: none; - min-width: 0; -} - -.newtab-undo-button > .button-box { - padding: 0; -} - -#newtab-undo-close-button { - background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 16, 16, 0); - background-position: center center; - background-repeat: no-repeat; -} - -#newtab-undo-close-button:hover { - background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 32, 16, 16); -} - -#newtab-undo-close-button:hover:active { - background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 48, 16, 32); -} diff --git a/application/palemoon/themes/windows/pageInfo.png b/application/palemoon/themes/windows/pageInfo.png deleted file mode 100644 index fcc713b8f0..0000000000 Binary files a/application/palemoon/themes/windows/pageInfo.png and /dev/null differ diff --git a/application/palemoon/themes/windows/permissions/aboutPermissions.css b/application/palemoon/themes/windows/permissions/aboutPermissions.css deleted file mode 100644 index d3ceed7567..0000000000 --- a/application/palemoon/themes/windows/permissions/aboutPermissions.css +++ /dev/null @@ -1,153 +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/. */ - -@import url("chrome://global/skin/inContentUI.css"); - -/* header */ - -#permissions-pagetitle { - font-size: 200%; - font-weight: bold; - padding-bottom: 0.5em; -} - -/* content box */ -#permissions-content { - height: 100%; -} - -/* sites box */ - -#sites-box { - padding: 10px; - width: 25em; -} - -#sites-filter { - margin: 0; -} - -#sites-list { - -moz-appearance: none; - border: 1px solid rgba(0, 0, 0, 0.32); - background-color: rgba(255, 255, 255, 0.4); - margin: 5px 0 0 0; -} - -.site { - padding: 4px; - border-bottom: 1px solid ThreeDLightShadow; -} - -.site-favicon { - height: 16px; - width: 16px; - margin-inline-end: 4px; - list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); -} - -#all-sites-item > .site-container > .site-favicon { - list-style-image: none; -} - -/* permissions box */ - -#permissions-box { - padding-top: 10px; - overflow-y: auto; -} - -#site-description { - font-size: 125%; - margin-inline-start: 6px; /* to match button margin */ -} - -#site-label { - font-weight: bold; - margin-top: 0; - margin-bottom: 0; -} - -#defaults-description { - font-size: 125%; - font-weight: bold; - margin-inline-start: 6px; -} - -.pref-item { - margin-bottom: 10px; -} - -.pref-icon { - width: 48px; - height: 48px; - margin-inline-end: 10px; -} - -.pref-icon[type="password"] { - list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png); -} -.pref-icon[type="image"] { - list-style-image: url(chrome://global/skin/icons/question-48.png); -} -.pref-icon[type="popup"] { - list-style-image: url(chrome://global/skin/icons/question-48.png); -} -.pref-icon[type="cookie"] { - list-style-image: url(chrome://global/skin/icons/question-48.png); -} -.pref-icon[type="desktop-notification"] { - list-style-image: url(chrome://browser/skin/web-notifications-icon.svg); -} -.pref-icon[type="install"] { - list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-48.png); -} -.pref-icon[type="geo"] { - list-style-image: url(chrome://browser/skin/Geolocation-64.png); -} -.pref-icon[type="plugins"] { - list-style-image: url(chrome://mozapps/skin/plugins/pluginGeneric-48.png); -} - -.pref-title { - font-size: 125%; - margin-bottom: 0; - font-weight: bold; - margin-right: 0; - padding-right: 0; -} - -.pref-default { - margin-left: 0.5em; - padding-left: 0; -} - -.pref-set-default { - visibility: collapse; -} - -.pref-menulist { - margin-left: 6px; - margin-right: 6px; - min-width: 10em; /* native menulists ellipsize their longest entries by default on many themes */ -} - -.plugins-label { - margin-right: 0; - padding-right: 0; -} - -.plugins-vulnerable { - margin-left: 0; - padding-left: 0; - margin-right: 0; - padding-right: 0; -} - -.plugins-default { - margin-left: 0.5em; - padding-left: 0; - margin-right: 1em; - padding-right: 0; -} diff --git a/application/palemoon/themes/windows/places/allBookmarks.png b/application/palemoon/themes/windows/places/allBookmarks.png deleted file mode 100644 index 177c31c3cf..0000000000 Binary files a/application/palemoon/themes/windows/places/allBookmarks.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/bookmark.png b/application/palemoon/themes/windows/places/bookmark.png deleted file mode 100644 index 2e9a206347..0000000000 Binary files a/application/palemoon/themes/windows/places/bookmark.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/bookmarksMenu.png b/application/palemoon/themes/windows/places/bookmarksMenu.png deleted file mode 100644 index 14c9601bb1..0000000000 Binary files a/application/palemoon/themes/windows/places/bookmarksMenu.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/bookmarksToolbar.png b/application/palemoon/themes/windows/places/bookmarksToolbar.png deleted file mode 100644 index 5a4a6935da..0000000000 Binary files a/application/palemoon/themes/windows/places/bookmarksToolbar.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/calendar.png b/application/palemoon/themes/windows/places/calendar.png deleted file mode 100644 index c0d1071592..0000000000 Binary files a/application/palemoon/themes/windows/places/calendar.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/downloads.png b/application/palemoon/themes/windows/places/downloads.png deleted file mode 100644 index d37bc40b64..0000000000 Binary files a/application/palemoon/themes/windows/places/downloads.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/editBookmark.png b/application/palemoon/themes/windows/places/editBookmark.png deleted file mode 100644 index fbca0523df..0000000000 Binary files a/application/palemoon/themes/windows/places/editBookmark.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/history.png b/application/palemoon/themes/windows/places/history.png deleted file mode 100644 index cc3b067c08..0000000000 Binary files a/application/palemoon/themes/windows/places/history.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/libraryToolbar.png b/application/palemoon/themes/windows/places/libraryToolbar.png deleted file mode 100644 index f5f3654ae0..0000000000 Binary files a/application/palemoon/themes/windows/places/libraryToolbar.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/libraryToolbar.svg b/application/palemoon/themes/windows/places/libraryToolbar.svg deleted file mode 100644 index 5fcf42ae3a..0000000000 --- a/application/palemoon/themes/windows/places/libraryToolbar.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/palemoon/themes/windows/places/livemark-item.png b/application/palemoon/themes/windows/places/livemark-item.png deleted file mode 100644 index 9184b95187..0000000000 Binary files a/application/palemoon/themes/windows/places/livemark-item.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/query.png b/application/palemoon/themes/windows/places/query.png deleted file mode 100644 index fff0fb014c..0000000000 Binary files a/application/palemoon/themes/windows/places/query.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/starred48.png b/application/palemoon/themes/windows/places/starred48.png deleted file mode 100644 index 2f7e878a73..0000000000 Binary files a/application/palemoon/themes/windows/places/starred48.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/tag.png b/application/palemoon/themes/windows/places/tag.png deleted file mode 100644 index da906245de..0000000000 Binary files a/application/palemoon/themes/windows/places/tag.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/toolbarDropMarker.png b/application/palemoon/themes/windows/places/toolbarDropMarker.png deleted file mode 100644 index 3abb7c281f..0000000000 Binary files a/application/palemoon/themes/windows/places/toolbarDropMarker.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/unsortedBookmarks.png b/application/palemoon/themes/windows/places/unsortedBookmarks.png deleted file mode 100644 index d18a5016c2..0000000000 Binary files a/application/palemoon/themes/windows/places/unsortedBookmarks.png and /dev/null differ diff --git a/application/palemoon/themes/windows/places/unstarred48.png b/application/palemoon/themes/windows/places/unstarred48.png deleted file mode 100644 index 8b82aab4b1..0000000000 Binary files a/application/palemoon/themes/windows/places/unstarred48.png and /dev/null differ diff --git a/application/palemoon/themes/windows/pointerLock-16.png b/application/palemoon/themes/windows/pointerLock-16.png deleted file mode 100644 index 862cd11c6a..0000000000 Binary files a/application/palemoon/themes/windows/pointerLock-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/pointerLock-64.png b/application/palemoon/themes/windows/pointerLock-64.png deleted file mode 100644 index a35ce040c8..0000000000 Binary files a/application/palemoon/themes/windows/pointerLock-64.png and /dev/null differ diff --git a/application/palemoon/themes/windows/preferences/Options-sync.png b/application/palemoon/themes/windows/preferences/Options-sync.png deleted file mode 100644 index 89901fb698..0000000000 Binary files a/application/palemoon/themes/windows/preferences/Options-sync.png and /dev/null differ diff --git a/application/palemoon/themes/windows/preferences/Options.png b/application/palemoon/themes/windows/preferences/Options.png deleted file mode 100644 index 2cb1f5088f..0000000000 Binary files a/application/palemoon/themes/windows/preferences/Options.png and /dev/null differ diff --git a/application/palemoon/themes/windows/preferences/alwaysAsk.png b/application/palemoon/themes/windows/preferences/alwaysAsk.png deleted file mode 100644 index d12805ef0e..0000000000 Binary files a/application/palemoon/themes/windows/preferences/alwaysAsk.png and /dev/null differ diff --git a/application/palemoon/themes/windows/preferences/application.png b/application/palemoon/themes/windows/preferences/application.png deleted file mode 100644 index d67993d593..0000000000 Binary files a/application/palemoon/themes/windows/preferences/application.png and /dev/null differ diff --git a/application/palemoon/themes/windows/preferences/mail.png b/application/palemoon/themes/windows/preferences/mail.png deleted file mode 100644 index be1ed4d389..0000000000 Binary files a/application/palemoon/themes/windows/preferences/mail.png and /dev/null differ diff --git a/application/palemoon/themes/windows/preferences/saveFile.png b/application/palemoon/themes/windows/preferences/saveFile.png deleted file mode 100644 index 1248dd30c1..0000000000 Binary files a/application/palemoon/themes/windows/preferences/saveFile.png and /dev/null differ diff --git a/application/palemoon/themes/windows/privatebrowsing-dark.png b/application/palemoon/themes/windows/privatebrowsing-dark.png deleted file mode 100644 index 9eaf3aec7e..0000000000 Binary files a/application/palemoon/themes/windows/privatebrowsing-dark.png and /dev/null differ diff --git a/application/palemoon/themes/windows/privatebrowsing-light.png b/application/palemoon/themes/windows/privatebrowsing-light.png deleted file mode 100644 index c12f507798..0000000000 Binary files a/application/palemoon/themes/windows/privatebrowsing-light.png and /dev/null differ diff --git a/application/palemoon/themes/windows/reload-stop-go.png b/application/palemoon/themes/windows/reload-stop-go.png deleted file mode 100644 index 1017be9032..0000000000 Binary files a/application/palemoon/themes/windows/reload-stop-go.png and /dev/null differ diff --git a/application/palemoon/themes/windows/sanitize.png b/application/palemoon/themes/windows/sanitize.png deleted file mode 100644 index 72eea2cfb9..0000000000 Binary files a/application/palemoon/themes/windows/sanitize.png and /dev/null differ diff --git a/application/palemoon/themes/windows/searchbar-dropdown-arrow.png b/application/palemoon/themes/windows/searchbar-dropdown-arrow.png deleted file mode 100644 index 79d8d61b40..0000000000 Binary files a/application/palemoon/themes/windows/searchbar-dropdown-arrow.png and /dev/null differ diff --git a/application/palemoon/themes/windows/searchbar.css b/application/palemoon/themes/windows/searchbar.css deleted file mode 100644 index d660772b91..0000000000 --- a/application/palemoon/themes/windows/searchbar.css +++ /dev/null @@ -1,81 +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/. */ - -.searchbar-textbox { - width: 6em; - min-width: 6em; -} - -.autocomplete-textbox-container { - -moz-box-align: stretch; -} - -.textbox-input-box { - margin: 0; -} - -/* ::::: searchbar-engine-button ::::: */ - -.searchbar-engine-image { - height: 16px; - width: 16px; - list-style-image: url("chrome://global/skin/icons/folder-item.png"); - -moz-image-region: rect(0px, 16px, 16px, 0px); - margin-inline-start: 2px; -} - -.searchbar-engine-button { - -moz-appearance: none; - min-width: 0; - margin: 0; - padding: 0; - padding-inline-end: 2px; - -moz-box-align: center; - background: none; - border: none; -} - -.searchbar-engine-button > .button-box { - -moz-appearance: none; - padding: 0; - border: 0; -} - -.searchbar-dropmarker-image { - list-style-image: url("chrome://browser/skin/searchbar-dropdown-arrow.png"); - -moz-image-region: rect(0, 13px, 11px, 0); -} - -.searchbar-engine-button[open="true"] > .searchbar-dropmarker-image { - -moz-image-region: rect(0, 26px, 11px, 13px); -} - - -/* ::::: search-go-button ::::: */ - -.search-go-container { - -moz-box-align: center; -} - -.search-go-button { - padding: 1px; - list-style-image: url("chrome://global/skin/icons/Search-glass.png"); - -moz-image-region: rect(0px 16px 16px 0px); -} - -.search-go-button:-moz-locale-dir(rtl) { - transform: scaleX(-1); -} - -.search-go-button:hover { - -moz-image-region: rect(0px 32px 16px 16px); -} - -.search-go-button:hover:active { - -moz-image-region: rect(0px, 48px, 16px, 32px); -} - -.searchbar-engine-menuitem[selected="true"] > .menu-iconic-text { - font-weight: bold; -} diff --git a/application/palemoon/themes/windows/setDesktopBackground.css b/application/palemoon/themes/windows/setDesktopBackground.css deleted file mode 100644 index 585284c7b4..0000000000 --- a/application/palemoon/themes/windows/setDesktopBackground.css +++ /dev/null @@ -1,18 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -@namespace html url("http://www.w3.org/1999/xhtml"); - -html|canvas#screen { - margin: 12px 11px 32px; -} - -#monitor { - list-style-image: url("chrome://browser/skin/monitor.png"); -} - -#monitor[aspectratio="16:10"] { - list-style-image: url("chrome://browser/skin/monitor_16-10.png"); -} diff --git a/application/palemoon/themes/windows/slowStartup-16.png b/application/palemoon/themes/windows/slowStartup-16.png deleted file mode 100644 index 5551ef054e..0000000000 Binary files a/application/palemoon/themes/windows/slowStartup-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/statusbar/overlay.css b/application/palemoon/themes/windows/statusbar/overlay.css deleted file mode 100644 index d9a36789ba..0000000000 --- a/application/palemoon/themes/windows/statusbar/overlay.css +++ /dev/null @@ -1,104 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -%include ../../shared/statusbar/overlay.css - -/* - * General - */ - -#status4evar-status-text, -#status4evar-progress-bar -{ - margin: 0px 3px; -} - -/* - * Download status - */ - -#status4evar-download-progress-bar -{ - height: 4px; -} - -#status4evar-download-button #status4evar-download-icon -{ - min-width: 18px; - min-height: 18px; -} - -#status4evar-download-button #status4evar-download-icon -{ - background: -moz-image-rect(var(--toolbarbutton-image), 0, 108, 18, 90) center no-repeat; -} - -toolbar[brighttext] #status4evar-download-button #status4evar-download-icon -{ - background: -moz-image-rect(var(--toolbarbutton-inverted-image), 0, 108, 18, 90) center no-repeat; -} - -@media (-moz-windows-compositor) -{ - :-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) #status4evar-download-button #status4evar-download-icon:not(:-moz-lwtheme), - #TabsToolbar[tabsontop=true] #status4evar-download-button #status4evar-download-icon:not(:-moz-lwtheme), - #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child #status4evar-download-button #status4evar-download-icon:not(:-moz-lwtheme) - { - background: -moz-image-rect(var(--toolbarbutton-glass-image), 0, 108, 18, 90) center no-repeat; - } -} - -#status4evar-download-button[attention] #status4evar-download-icon -{ - background: -moz-image-rect(var(--toolbarbutton-glass-image), 19, 108, 36, 90) center no-repeat; -} - -toolbar[mode="icons"] #status4evar-download-button[forcelabel="true"] > label -{ - margin-inline-start: 5px !important; -} - -/* - * Splitter - */ - -splitter.status4evar-status-splitter -{ - width: 6px; - margin: 0px -3px; -} - -/* - * Location bar - */ - -#urlbar-progress-alt -{ - margin-inline-end: -2px; -} - -/* - * Status bar - */ - -#browser-bottombox[s4eboarder="true"] :-moz-any(#status4evar-status-bar, #addon-bar) -{ - -moz-appearance: none; -} - -#browser-bottombox[s4eboarder="true"] > *:not([hidden="true"]):not([collapsed="true"]) -{ - box-shadow: none !important; - border: none !important; - border-top: 2px solid !important; - -moz-border-top-colors: ThreeDShadow ThreeDHighlight !important; -} - -#browser-bottombox[s4eboarder="true"] > *:not([hidden="true"]):not([collapsed="true"]) ~ * -{ - border: none !important; -} - diff --git a/application/palemoon/themes/windows/statusbar/prefs.css b/application/palemoon/themes/windows/statusbar/prefs.css deleted file mode 100644 index 005088b7f2..0000000000 --- a/application/palemoon/themes/windows/statusbar/prefs.css +++ /dev/null @@ -1,7 +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/. */ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -%include ../../shared/statusbar/prefs.css diff --git a/application/palemoon/themes/windows/sync-128.png b/application/palemoon/themes/windows/sync-128.png deleted file mode 100644 index 1ea34818ce..0000000000 Binary files a/application/palemoon/themes/windows/sync-128.png and /dev/null differ diff --git a/application/palemoon/themes/windows/sync-16.png b/application/palemoon/themes/windows/sync-16.png deleted file mode 100644 index 0afb1c7192..0000000000 Binary files a/application/palemoon/themes/windows/sync-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/sync-32.png b/application/palemoon/themes/windows/sync-32.png deleted file mode 100644 index 7a762cb986..0000000000 Binary files a/application/palemoon/themes/windows/sync-32.png and /dev/null differ diff --git a/application/palemoon/themes/windows/sync-bg.png b/application/palemoon/themes/windows/sync-bg.png deleted file mode 100644 index 893a27d76e..0000000000 Binary files a/application/palemoon/themes/windows/sync-bg.png and /dev/null differ diff --git a/application/palemoon/themes/windows/sync-desktopIcon.png b/application/palemoon/themes/windows/sync-desktopIcon.png deleted file mode 100644 index d3d1e27c32..0000000000 Binary files a/application/palemoon/themes/windows/sync-desktopIcon.png and /dev/null differ diff --git a/application/palemoon/themes/windows/sync-mobileIcon.png b/application/palemoon/themes/windows/sync-mobileIcon.png deleted file mode 100644 index a3bda57515..0000000000 Binary files a/application/palemoon/themes/windows/sync-mobileIcon.png and /dev/null differ diff --git a/application/palemoon/themes/windows/sync-throbber.png b/application/palemoon/themes/windows/sync-throbber.png deleted file mode 100644 index d25490b4fa..0000000000 Binary files a/application/palemoon/themes/windows/sync-throbber.png and /dev/null differ diff --git a/application/palemoon/themes/windows/syncProgress.css b/application/palemoon/themes/windows/syncProgress.css deleted file mode 100644 index d7aa599761..0000000000 --- a/application/palemoon/themes/windows/syncProgress.css +++ /dev/null @@ -1,46 +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/. */ -@import url(chrome://global/skin/inContentUI.css); - -:root { - height: 100%; - width: 100%; - padding: 0; -} - -body { - margin: 0; - padding: 0 2em; -} - -#floatingBox { - margin: 4em auto; - max-width: 40em; - min-width: 23em; - padding: 1em 1.5em; - position: relative; - text-align: center; -} - -#successLogo { - margin: 1em 2em; -} - -#loadingText { - margin: 2em 6em; -} - -#progressBar { - margin: 2em 10em; -} - -#uploadProgressBar{ - width: 100%; -} - -#bottomRow { - margin-top: 2em; - padding: 0; - text-align: end; -} diff --git a/application/palemoon/themes/windows/syncQuota.css b/application/palemoon/themes/windows/syncQuota.css deleted file mode 100644 index 1577de8a3b..0000000000 --- a/application/palemoon/themes/windows/syncQuota.css +++ /dev/null @@ -1,26 +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/. */ - -#quotaDialog { - width: 33em; - height: 25em; -} - -treechildren::-moz-tree-checkbox { - list-style-image: none; -} -treechildren::-moz-tree-checkbox(checked) { - list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); -} -treechildren::-moz-tree-checkbox(disabled) { - list-style-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif"); -} - -#treeCaption { - height: 4em; -} - -.captionWarning { - font-weight: bold; -} diff --git a/application/palemoon/themes/windows/tabbrowser/alltabs-inverted.png b/application/palemoon/themes/windows/tabbrowser/alltabs-inverted.png deleted file mode 100644 index 002bdd47fd..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/alltabs-inverted.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/alltabs.png b/application/palemoon/themes/windows/tabbrowser/alltabs.png deleted file mode 100644 index 172d425f80..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/alltabs.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/connecting.png b/application/palemoon/themes/windows/tabbrowser/connecting.png deleted file mode 100644 index e564fb5708..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/connecting.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/loading.png b/application/palemoon/themes/windows/tabbrowser/loading.png deleted file mode 100644 index ba54836e98..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/loading.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/newtab-glass.png b/application/palemoon/themes/windows/tabbrowser/newtab-glass.png deleted file mode 100644 index 15185beb6e..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/newtab-glass.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/newtab-inverted.png b/application/palemoon/themes/windows/tabbrowser/newtab-inverted.png deleted file mode 100644 index 4ac1ebaaf0..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/newtab-inverted.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/newtab.png b/application/palemoon/themes/windows/tabbrowser/newtab.png deleted file mode 100644 index 7cea7bdd8f..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/newtab.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/tab-arrow-left-glass.png b/application/palemoon/themes/windows/tabbrowser/tab-arrow-left-glass.png deleted file mode 100644 index aac93a7273..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/tab-arrow-left-glass.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/tab-arrow-left-inverted.png b/application/palemoon/themes/windows/tabbrowser/tab-arrow-left-inverted.png deleted file mode 100644 index 16cd7a2775..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/tab-arrow-left-inverted.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/tab-arrow-left.png b/application/palemoon/themes/windows/tabbrowser/tab-arrow-left.png deleted file mode 100644 index e0fb348d66..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/tab-arrow-left.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/tab-overflow-border.png b/application/palemoon/themes/windows/tabbrowser/tab-overflow-border.png deleted file mode 100644 index 77f2462e5b..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/tab-overflow-border.png and /dev/null differ diff --git a/application/palemoon/themes/windows/tabbrowser/tabDragIndicator.png b/application/palemoon/themes/windows/tabbrowser/tabDragIndicator.png deleted file mode 100644 index c67c2337d2..0000000000 Binary files a/application/palemoon/themes/windows/tabbrowser/tabDragIndicator.png and /dev/null differ diff --git a/application/palemoon/themes/windows/toolbarbutton-dropdown-arrow-inverted.png b/application/palemoon/themes/windows/toolbarbutton-dropdown-arrow-inverted.png deleted file mode 100644 index f3261f1da0..0000000000 Binary files a/application/palemoon/themes/windows/toolbarbutton-dropdown-arrow-inverted.png and /dev/null differ diff --git a/application/palemoon/themes/windows/toolbarbutton-dropdown-arrow.png b/application/palemoon/themes/windows/toolbarbutton-dropdown-arrow.png deleted file mode 100644 index a7abe73963..0000000000 Binary files a/application/palemoon/themes/windows/toolbarbutton-dropdown-arrow.png and /dev/null differ diff --git a/application/palemoon/themes/windows/urlbar-arrow.png b/application/palemoon/themes/windows/urlbar-arrow.png deleted file mode 100644 index fcab253bb3..0000000000 Binary files a/application/palemoon/themes/windows/urlbar-arrow.png and /dev/null differ diff --git a/application/palemoon/themes/windows/urlbar-history-dropmarker.png b/application/palemoon/themes/windows/urlbar-history-dropmarker.png deleted file mode 100644 index fc8b0be983..0000000000 Binary files a/application/palemoon/themes/windows/urlbar-history-dropmarker.png and /dev/null differ diff --git a/application/palemoon/themes/windows/urlbar-popup-blocked.png b/application/palemoon/themes/windows/urlbar-popup-blocked.png deleted file mode 100644 index e6fd29f7d3..0000000000 Binary files a/application/palemoon/themes/windows/urlbar-popup-blocked.png and /dev/null differ diff --git a/application/palemoon/themes/windows/web-notifications-icon.svg b/application/palemoon/themes/windows/web-notifications-icon.svg deleted file mode 100644 index f7186c7275..0000000000 --- a/application/palemoon/themes/windows/web-notifications-icon.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/application/palemoon/themes/windows/web-notifications-tray.svg b/application/palemoon/themes/windows/web-notifications-tray.svg deleted file mode 100644 index 314026a106..0000000000 --- a/application/palemoon/themes/windows/web-notifications-tray.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - diff --git a/application/palemoon/themes/windows/webRTC-shareDevice-16.png b/application/palemoon/themes/windows/webRTC-shareDevice-16.png deleted file mode 100644 index df01b33515..0000000000 Binary files a/application/palemoon/themes/windows/webRTC-shareDevice-16.png and /dev/null differ diff --git a/application/palemoon/themes/windows/webRTC-shareDevice-64.png b/application/palemoon/themes/windows/webRTC-shareDevice-64.png deleted file mode 100644 index d125789fbc..0000000000 Binary files a/application/palemoon/themes/windows/webRTC-shareDevice-64.png and /dev/null differ diff --git a/application/palemoon/themes/windows/webRTC-sharingDevice-16.png b/application/palemoon/themes/windows/webRTC-sharingDevice-16.png deleted file mode 100644 index a670676a01..0000000000 Binary files a/application/palemoon/themes/windows/webRTC-sharingDevice-16.png and /dev/null differ diff --git a/application/xulrunner/README.xulrunner b/application/xulrunner/README.xulrunner deleted file mode 100644 index 424b7a6150..0000000000 --- a/application/xulrunner/README.xulrunner +++ /dev/null @@ -1,13 +0,0 @@ -XULRunner is a package which can be used to run applications written in HTML -or XUL. It can also be used to embed the gecko rendering engine into -binary applications. - -XULRunner is not a product; it is a tool which can be used to create products. -It is a byproduct of Firefox development and the Mozilla community does not -have a strong commitment to support XULRunner development apart from Firefox -development. - -For more information about using XULRunner or how to use this binary package, -see the Mozilla Developer Center article: - -https://developer.mozilla.org/en/XULRunner diff --git a/application/xulrunner/app.mozbuild b/application/xulrunner/app.mozbuild deleted file mode 100644 index f9c5d20305..0000000000 --- a/application/xulrunner/app.mozbuild +++ /dev/null @@ -1,12 +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/. - -include('/toolkit/toolkit.mozbuild') - -if CONFIG['MOZ_EXTENSIONS']: - DIRS += ['/extensions'] - -DIRS += [ - '/application/xulrunner', -] diff --git a/application/xulrunner/app/Makefile.in b/application/xulrunner/app/Makefile.in deleted file mode 100644 index 98e377d69c..0000000000 --- a/application/xulrunner/app/Makefile.in +++ /dev/null @@ -1,75 +0,0 @@ -# vim:set ts=8 sw=8 sts=8 et: -# 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/. - -GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js) - -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -TK_LIBS := -framework Cocoa $(TK_LIBS) -endif - -ifndef MOZ_WINCONSOLE -ifdef MOZ_DEBUG -MOZ_WINCONSOLE = 1 -else -MOZ_WINCONSOLE = 0 -endif -endif - -# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that -# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall. -NSDISTMODE = copy - -include $(topsrcdir)/config/config.mk - -include $(topsrcdir)/config/rules.mk - -DEFINES += -DXULRUNNER_ICO='"$(DIST)/branding/xulrunner.ico"' -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"' - -ifdef MOZ_WIDGET_GTK -libs:: - $(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default - $(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default - $(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default -endif - -# XXX applications would need to supply this file -#export:: brand.dtd.in -# $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $^ -o brand.dtd) - -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) - -FRAMEWORK_NAME = XUL -FRAMEWORK_VERSION = $(MOZILLA_VERSION) - -FRAMEWORK_DIR = \ - $(DIST)/$(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION) - -$(FRAMEWORK_DIR)/Resources: - $(NSINSTALL) -D $@ - -tools:: $(PROGRAM) $(FRAMEWORK_DIR)/Resources - $(NSINSTALL) $(srcdir)/macbuild/InfoPlist.strings $(FRAMEWORK_DIR)/Resources - sed -e 's/APP_VERSION/$(APP_VERSION)/' $(srcdir)/macbuild/Info.plist.in > $(FRAMEWORK_DIR)/Info.plist - rsync -av $(DIST)/bin/ $(FRAMEWORK_DIR) --exclude mangle --exclude shlibsign - rm -f $(DIST)/$(FRAMEWORK_NAME).framework/Versions/Current \ - $(DIST)/$(FRAMEWORK_NAME).framework/libxpcom.dylib \ - $(DIST)/$(FRAMEWORK_NAME).framework/XUL \ - $(DIST)/$(FRAMEWORK_NAME).framework/xulrunner - ln -s $(FRAMEWORK_VERSION) $(DIST)/$(FRAMEWORK_NAME).framework/Versions/Current - ln -s Versions/Current/libxpcom.dylib $(DIST)/$(FRAMEWORK_NAME).framework/libxpcom.dylib - ln -s Versions/Current/XUL $(DIST)/$(FRAMEWORK_NAME).framework/XUL - ln -s Versions/Current/xulrunner $(DIST)/$(FRAMEWORK_NAME).framework/xulrunner - -clean clobber:: - rm -rf $(DIST)/$(FRAMEWORK_NAME).framework -endif - -README_FILE = $(srcdir)/../README.xulrunner - -libs:: - $(INSTALL) $(IFLAGS1) $(README_FILE) $(DIST)/bin - $(INSTALL) $(IFLAGS1) $(topsrcdir)/LICENSE $(DIST)/bin - $(INSTALL) $(IFLAGS1) $(srcdir)/install_app.py $(DIST)/bin - diff --git a/application/xulrunner/app/default16.png b/application/xulrunner/app/default16.png deleted file mode 100644 index e74f5cf2e4..0000000000 Binary files a/application/xulrunner/app/default16.png and /dev/null differ diff --git a/application/xulrunner/app/default32.png b/application/xulrunner/app/default32.png deleted file mode 100644 index 9145090543..0000000000 Binary files a/application/xulrunner/app/default32.png and /dev/null differ diff --git a/application/xulrunner/app/default48.png b/application/xulrunner/app/default48.png deleted file mode 100644 index 5fd71e110c..0000000000 Binary files a/application/xulrunner/app/default48.png and /dev/null differ diff --git a/application/xulrunner/app/document.ico b/application/xulrunner/app/document.ico deleted file mode 100644 index 3111163247..0000000000 Binary files a/application/xulrunner/app/document.ico and /dev/null differ diff --git a/application/xulrunner/app/install_app.py b/application/xulrunner/app/install_app.py deleted file mode 100644 index 6be8c5ecb5..0000000000 --- a/application/xulrunner/app/install_app.py +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/env python - -# 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/. - -# Min version of python is 2.7 -import sys -if ((sys.version_info.major != 2) or (sys.version_info.minor < 7)): - raise Exception("You need to use Python version 2.7 or higher") - -import os, shutil, re, zipfile -from ConfigParser import SafeConfigParser - -# Platform-specific support -# see https://developer.mozilla.org/en/XULRunner/Deploying_XULRunner_1.8 -if sys.platform.startswith('linux') or sys.platform == "win32": - def installApp(appLocation, installDir, appName, greDir): - zipApp, iniParser, appName = validateArguments(appLocation, installDir, appName, greDir) - if (zipApp): - zipApp.extractAll(installDir) - else: - shutil.copytree(appLocation, installDir) - shutil.copy2(os.path.join(greDir, xulrunnerStubName), - os.path.join(installDir, appName)) - copyGRE(greDir, os.path.join(installDir, "xulrunner")) - -if sys.platform.startswith('linux'): - xulrunnerStubName = "xulrunner-stub" - - def makeAppName(leafName): - return leafName.lower() - -elif sys.platform == "win32": - xulrunnerStubName = "xulrunner-stub.exe" - - def makeAppName(leafName): - return leafName + ".exe" - -elif sys.platform == "darwin": - xulrunnerStubName = "xulrunner-stub" - - def installApp(appLocation, installDir, appName, greDir): - zipApp, iniparser, appName = validateArguments(appLocation, installDir, appName, greDir) - installDir += "/" + appName + ".app" - resourcesDir = os.path.join(installDir, "Contents/Resources") - if (zipApp): - zipApp.extractAll(resourcesDir) - else: - shutil.copytree(appLocation, resourcesDir) - MacOSDir = os.path.join(installDir, "Contents/MacOS") - os.makedirs(MacOSDir) - shutil.copy2(os.path.join(greDir, xulrunnerStubName), MacOSDir) - copyGRE(greDir, - os.path.join(installDir, "Contents/Frameworks/XUL.framework")) - - # Contents/Info.plist - contents = """ - - - -CFBundleInfoDictionaryVersion -6.0 -CFBundlePackageType -APPL -CFBundleSignature -???? -CFBundleExecutable -xulrunner -NSAppleScriptEnabled - -CFBundleGetInfoString -$infoString -CFBundleName -$appName -CFBundleShortVersionString -$version -CFBundleVersion -$version.$buildID -CFBundleIdentifier -$reverseVendor - - -""" - version = iniparser.get("App", "Version") - buildID = iniparser.get("App", "BuildID") - infoString = appName + " " + version - reverseVendor = "com.vendor.unknown" - appID = iniparser.get("App", "ID") - colonIndex = appID.find("@") + 1 - if (colonIndex != 0): - vendor = appID[colonIndex:] - reverseVendor = ".".join(vendor.split(".")[::-1]) - contents = contents.replace("$infoString", infoString) - contents = contents.replace("$appName", appName) - contents = contents.replace("$version", version) - contents = contents.replace("$buildID", buildID) - contents = contents.replace("$reverseVendor", reverseVendor) - infoPList = open(os.path.join(installDir, "Contents/Info.plist"), "w+b") - infoPList.write(contents) - infoPList.close() - - def makeAppName(leafName): - return leafName - -else: - # Implement xulrunnerStubName, installApp and makeAppName as above. - raise Exception("This operating system isn't supported for install_app.py yet!") -# End platform-specific support - -def resolvePath(path): - return os.path.realpath(path) - -def requireINIOption(iniparser, section, option): - if not (iniparser.has_option(section, option)): - raise Exception("application.ini must have a " + option + " option under the " + section + " section") - -def checkAppINI(appLocation): - if (os.path.isdir(appLocation)): - zipApp = None - appINIPath = os.path.join(appLocation, "application.ini") - if not (os.path.isfile(appINIPath)): - raise Exception(appINIPath + " does not exist") - appINI = open(appINIPath) - elif (zipfile.is_zipfile(appLocation)): - zipApp = zipfile.ZipFile(appLocation) - if not ("application.ini" in zipApp.namelist()): - raise Exception("jar:" + appLocation + "!/application.ini does not exist") - appINI = zipApp.open("application.ini") - else: - raise Exception("appLocation must be a directory containing application.ini or a zip file with application.ini at its root") - - # application.ini verification - iniparser = SafeConfigParser() - iniparser.readfp(appINI) - if not (iniparser.has_section("App")): - raise Exception("application.ini must have an App section") - if not (iniparser.has_section("Gecko")): - raise Exception("application.ini must have a Gecko section") - requireINIOption(iniparser, "App", "Name") - requireINIOption(iniparser, "App", "Version") - requireINIOption(iniparser, "App", "BuildID") - requireINIOption(iniparser, "App", "ID") - requireINIOption(iniparser, "Gecko", "MinVersion") - - return zipApp, iniparser - pass - -def copyGRE(greDir, targetDir): - shutil.copytree(greDir, targetDir, symlinks=True) - -def validateArguments(appLocation, installDir, appName, greDir): - # application directory / zip verification - appLocation = resolvePath(appLocation) - - # target directory - installDir = resolvePath(installDir) - - if (os.path.exists(installDir)): - raise Exception("installDir must not exist: " + cmds.installDir) - - greDir = resolvePath(greDir) - xulrunnerStubPath = os.path.isfile(os.path.join(greDir, xulrunnerStubName)) - if not xulrunnerStubPath: - raise Exception("XULRunner stub executable not found: " + os.path.join(greDir, xulrunnerStubName)) - - # appName - zipApp, iniparser = checkAppINI(appLocation) - if not appName: - appName = iniparser.get("App", "Name") - appName = makeAppName(appName) - pattern = re.compile("[\\\/\:*?\"<>|\x00]") - if pattern.search(appName): - raise Exception("App name has illegal characters for at least one operating system") - return zipApp, iniparser, appName - -def handleCommandLine(): - import argparse - - # Argument parsing. - parser = argparse.ArgumentParser( - description="XULRunner application installer", - usage="""install_app.py appLocation installDir greDir [--appName APPNAME] - install_app.py -h - install_app.py --version - """ - ) - parser.add_argument( - "appLocation", - action="store", - help="The directory or ZIP file containing application.ini as a top-level child file" - ) - parser.add_argument( - "installDir", - action="store", - help="The directory to install the application to" - ) - parser.add_argument( - "--greDir", - action="store", - help="The directory containing the Gecko SDK (usually where this Python script lives)", - default=os.path.dirname(sys.argv[0]) - ) - parser.add_argument( - "--appName", - action="store", - help="The name of the application to install" - ) - parser.add_argument("--version", action="version", version="%(prog)s 1.0") - - # The command code. - cmds = parser.parse_args() - try: - installApp(cmds.appLocation, cmds.installDir, cmds.appName, cmds.greDir) - except exn: - shutil.rmtree(cmds.installDir) - raise exn - print cmds.appName + " application installed to " + cmds.installDir - -if __name__ == '__main__': - handleCommandLine() diff --git a/application/xulrunner/app/macbuild/Info.plist.in b/application/xulrunner/app/macbuild/Info.plist.in deleted file mode 100644 index 69676b80c5..0000000000 --- a/application/xulrunner/app/macbuild/Info.plist.in +++ /dev/null @@ -1,31 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - xulrunner-bin - CFBundleIdentifier - org.mozilla.xulrunner - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - XULRunner - CFBundlePackageType - FMWK - CFBundleSignature - MOZB - CFBundleVersion - APP_VERSION - LSMinimumSystemVersion - 10.5 - LSMinimumSystemVersionByArchitecture - - i386 - 10.5.0 - x86_64 - 10.6.0 - - - diff --git a/application/xulrunner/app/macbuild/InfoPlist.strings b/application/xulrunner/app/macbuild/InfoPlist.strings deleted file mode 100644 index 5d9eefd515..0000000000 Binary files a/application/xulrunner/app/macbuild/InfoPlist.strings and /dev/null differ diff --git a/application/xulrunner/app/moz.build b/application/xulrunner/app/moz.build deleted file mode 100644 index a77b0214a4..0000000000 --- a/application/xulrunner/app/moz.build +++ /dev/null @@ -1,69 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -GeckoProgram('xulrunner') - -SOURCES += [ - 'nsXULRunnerApp.cpp', -] - -DEFINES['XULRUNNER_PROGNAME'] = '"xulrunner"' -if CONFIG['MOZ_DEBUG']: - DEFINES['DEBUG'] = True - -LOCAL_INCLUDES += [ - '/toolkit/profile', - '/toolkit/xre', - '/xpcom/base', - '/xpcom/build', -] - -if CONFIG['_MSC_VER']: - # Always enter a Windows program through wmain, whether or not we're - # a console application. - WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup'] - -# Control the default heap size. -# This is the heap returned by GetProcessHeap(). -# As we use the CRT heap, the default size is too large and wastes VM. -# -# The default heap size is 1MB on Win32. -# The heap will grow if need be. -# -# Set it to 256k. See bug 127069. -if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']: - LDFLAGS += ['/HEAP:0x40000'] - -if CONFIG['OS_ARCH'] == 'WINNT': - RCINCLUDE = 'splash.rc' - OS_LIBS += [ - 'comctl32', - 'comdlg32', - 'uuid', - 'shell32', - 'ole32', - 'oleaut32', - 'version', - 'winspool', - ] - -DISABLE_STL_WRAPPING = True - -JS_PREFERENCE_PP_FILES += [ - 'xulrunner.js', -] - -if CONFIG['OS_ARCH'] == 'WINNT': - BRANDING_FILES += [ - 'document.ico', - 'xulrunner.ico', - ] - -if CONFIG['MOZ_WIDGET_GTK']: - BRANDING_FILES += [ - 'default16.png', - 'default32.png', - 'default48.png', - ] diff --git a/application/xulrunner/app/nsXULRunnerApp.cpp b/application/xulrunner/app/nsXULRunnerApp.cpp deleted file mode 100644 index d86317a856..0000000000 --- a/application/xulrunner/app/nsXULRunnerApp.cpp +++ /dev/null @@ -1,294 +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/. */ - -#include "nsXULAppAPI.h" -#include "nsXPCOMGlue.h" -#include -#include -#ifdef XP_WIN -#include -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf _snprintf -#endif -#define strcasecmp _stricmp -#endif - -#include "nsAppRunner.h" -#include "nsIFile.h" -#include "nsCOMPtr.h" -#include "nsMemory.h" -#include "nsCRTGlue.h" -#include "nsStringAPI.h" -#include "nsServiceManagerUtils.h" -#include "plstr.h" -#include "prprf.h" -#include "prenv.h" -#include "nsINIParser.h" - -#ifdef XP_WIN -#define XRE_DONT_SUPPORT_XPSP2 // See https://bugzil.la/1023941#c32 -#include "nsWindowsWMain.cpp" -#endif - -#include "BinaryPath.h" - -#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL - -using namespace mozilla; - -/** - * Output a string to the user. This method is really only meant to be used to - * output last-ditch error messages designed for developers NOT END USERS. - * - * @param isError - * Pass true to indicate severe errors. - * @param fmt - * printf-style format string followed by arguments. - */ -static void Output(bool isError, const char *fmt, ... ) -{ - va_list ap; - va_start(ap, fmt); - -#if (defined(XP_WIN) && !MOZ_WINCONSOLE) - wchar_t msg[2048]; - _vsnwprintf(msg, sizeof(msg)/sizeof(msg[0]), NS_ConvertUTF8toUTF16(fmt).get(), ap); - - UINT flags = MB_OK; - if (isError) - flags |= MB_ICONERROR; - else - flags |= MB_ICONINFORMATION; - - MessageBoxW(nullptr, msg, L"XULRunner", flags); -#else - vfprintf(stderr, fmt, ap); -#endif - - va_end(ap); -} - -/** - * Return true if |arg| matches the given argument name. - */ -static bool IsArg(const char* arg, const char* s) -{ - if (*arg == '-') - { - if (*++arg == '-') - ++arg; - return !strcasecmp(arg, s); - } - -#if defined(XP_WIN) - if (*arg == '/') - return !strcasecmp(++arg, s); -#endif - - return false; -} - -static nsresult -GetGREVersion(const char *argv0, - nsACString *aMilestone, - nsACString *aVersion) -{ - if (aMilestone) - aMilestone->AssignLiteral(""); - if (aVersion) - aVersion->AssignLiteral(""); - - nsCOMPtr iniFile; - nsresult rv = BinaryPath::GetFile(argv0, getter_AddRefs(iniFile)); - if (NS_FAILED(rv)) - return rv; - - iniFile->SetNativeLeafName(NS_LITERAL_CSTRING("platform.ini")); - - nsINIParser parser; - rv = parser.Init(iniFile); - if (NS_FAILED(rv)) - return rv; - - if (aMilestone) { - rv = parser.GetString("Build", "Milestone", *aMilestone); - if (NS_FAILED(rv)) - return rv; - } - if (aVersion) { - rv = parser.GetString("Build", "BuildID", *aVersion); - if (NS_FAILED(rv)) - return rv; - } - return NS_OK; -} - -static void Usage(const char *argv0) -{ - nsAutoCString milestone; - GetGREVersion(argv0, &milestone, nullptr); - - // display additional information (XXX make localizable?) - Output(false, - "Mozilla XULRunner %s\n\n" - "Usage: " XULRUNNER_PROGNAME " [OPTIONS]\n" - " " XULRUNNER_PROGNAME " APP-FILE [APP-OPTIONS...]\n" - "\n" - "OPTIONS\n" - " --app specify APP-FILE (optional)\n" - " -h, --help show this message\n" - " -v, --version show version\n" - " --gre-version print the GRE version string on stdout\n" - "\n" - "APP-FILE\n" - " Application initialization file.\n" - "\n" - "APP-OPTIONS\n" - " Application specific options.\n", - milestone.get()); -} - -XRE_GetFileFromPathType XRE_GetFileFromPath; -XRE_CreateAppDataType XRE_CreateAppData; -XRE_FreeAppDataType XRE_FreeAppData; -XRE_mainType XRE_main; - -static const nsDynamicFunctionLoad kXULFuncs[] = { - { "XRE_GetFileFromPath", (NSFuncPtr*) &XRE_GetFileFromPath }, - { "XRE_CreateAppData", (NSFuncPtr*) &XRE_CreateAppData }, - { "XRE_FreeAppData", (NSFuncPtr*) &XRE_FreeAppData }, - { "XRE_main", (NSFuncPtr*) &XRE_main }, - { nullptr, nullptr } -}; - -class AutoAppData -{ -public: - AutoAppData(nsIFile* aINIFile) : mAppData(nullptr) { - nsresult rv = XRE_CreateAppData(aINIFile, &mAppData); - if (NS_FAILED(rv)) - mAppData = nullptr; - } - ~AutoAppData() { - if (mAppData) - XRE_FreeAppData(mAppData); - } - - operator nsXREAppData*() const { return mAppData; } - nsXREAppData* operator -> () const { return mAppData; } - -private: - nsXREAppData* mAppData; -}; - -int main(int argc, char* argv[]) -{ - char exePath[MAXPATHLEN]; - nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); - if (NS_FAILED(rv)) { - Output(true, "Couldn't calculate the application directory.\n"); - return 255; - } - - char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]); - if (!lastSlash || (size_t(lastSlash - exePath) > MAXPATHLEN - sizeof(XPCOM_DLL) - 1)) - return 255; - - strcpy(++lastSlash, XPCOM_DLL); - - rv = XPCOMGlueStartup(exePath); - if (NS_FAILED(rv)) { - Output(true, "Couldn't load XPCOM.\n"); - return 255; - } - - if (argc > 1 && (IsArg(argv[1], "h") || - IsArg(argv[1], "help") || - IsArg(argv[1], "?"))) - { - Usage(argv[0]); - return 0; - } - - if (argc == 2 && (IsArg(argv[1], "v") || IsArg(argv[1], "version"))) - { - nsAutoCString milestone; - nsAutoCString version; - GetGREVersion(argv[0], &milestone, &version); - Output(false, "Mozilla XULRunner %s - %s\n", - milestone.get(), version.get()); - return 0; - } - - rv = XPCOMGlueLoadXULFunctions(kXULFuncs); - if (NS_FAILED(rv)) { - Output(true, "Couldn't load XRE functions.\n"); - return 255; - } - - if (argc > 1) { - nsAutoCString milestone; - rv = GetGREVersion(argv[0], &milestone, nullptr); - if (NS_FAILED(rv)) - return 2; - - if (IsArg(argv[1], "gre-version")) { - if (argc != 2) { - Usage(argv[0]); - return 1; - } - - printf("%s\n", milestone.get()); - return 0; - } - - if (IsArg(argv[1], "install-app")) { - Output(true, "--install-app support has been removed. Use 'python install-app.py' instead.\n"); - return 1; - } - } - - const char *appDataFile = getenv("XUL_APP_FILE"); - - if (!(appDataFile && *appDataFile)) { - if (argc < 2) { - Usage(argv[0]); - return 1; - } - - if (IsArg(argv[1], "app")) { - if (argc == 2) { - Usage(argv[0]); - return 1; - } - argv[1] = argv[0]; - ++argv; - --argc; - } - - appDataFile = argv[1]; - argv[1] = argv[0]; - ++argv; - --argc; - - static char kAppEnv[MAXPATHLEN]; - snprintf(kAppEnv, MAXPATHLEN, "XUL_APP_FILE=%s", appDataFile); - putenv(kAppEnv); - } - - nsCOMPtr appDataLF; - rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appDataLF)); - if (NS_FAILED(rv)) { - Output(true, "Error: unrecognized application.ini path.\n"); - return 2; - } - - AutoAppData appData(appDataLF); - if (!appData) { - Output(true, "Error: couldn't parse application.ini.\n"); - return 2; - } - - return XRE_main(argc, argv, appData, 0); -} diff --git a/application/xulrunner/app/splash.rc b/application/xulrunner/app/splash.rc deleted file mode 100644 index 5be9d60d1e..0000000000 --- a/application/xulrunner/app/splash.rc +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -#include -#include "nsNativeAppSupportWin.h" - -IDI_APPICON ICON XULRUNNER_ICO -IDI_DOCUMENT ICON DOCUMENT_ICO -IDI_APPLICATION ICON XULRUNNER_ICO - -STRINGTABLE DISCARDABLE -BEGIN -#ifdef DEBUG - IDS_STARTMENU_APPNAME, "Firefox Debug" -#else - IDS_STARTMENU_APPNAME, "Firefox" -#endif -END diff --git a/application/xulrunner/app/xulrunner.exe.manifest b/application/xulrunner/app/xulrunner.exe.manifest deleted file mode 100644 index b08eea0745..0000000000 --- a/application/xulrunner/app/xulrunner.exe.manifest +++ /dev/null @@ -1,38 +0,0 @@ - - - -Mozilla XULRunner - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/xulrunner/app/xulrunner.ico b/application/xulrunner/app/xulrunner.ico deleted file mode 100644 index 0518438a04..0000000000 Binary files a/application/xulrunner/app/xulrunner.ico and /dev/null differ diff --git a/application/xulrunner/app/xulrunner.js b/application/xulrunner/app/xulrunner.js deleted file mode 100644 index c381ce284d..0000000000 --- a/application/xulrunner/app/xulrunner.js +++ /dev/null @@ -1,22 +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/. */ - -#filter substitution - -// We need to override the default values of these preferences since all.js -// assumes these are in the navigator package, which for us is nonexistent. -// XXX(darin): perhaps all.js should not be seamonkey specific -pref("general.useragent.locale", "@AB_CD@"); -pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul"); -pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul"); -pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul"); -pref("xpinstall.dialog.progress.type.chrome", "Extension:Manager"); -pref("xpinstall.dialog.progress.type.skin", "Extension:Manager"); -pref("xpinstall.enabled", true); -#ifdef XP_WIN -pref("browser.preferences.instantApply", false); -#else -pref("browser.preferences.instantApply", true); -#endif -pref("browser.preferences.animateFadeIn", false); diff --git a/application/xulrunner/config/mozconfig b/application/xulrunner/config/mozconfig deleted file mode 100644 index 9fa972cac7..0000000000 --- a/application/xulrunner/config/mozconfig +++ /dev/null @@ -1,9 +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/. - -# This file specifies the build flags for XULRunner. You can use it by adding: -# . $topsrcdir/xulrunner/config/mozconfig -# to the top of your mozconfig file. - -ac_add_options --enable-application=xulrunner diff --git a/application/xulrunner/config/mozconfigs/common b/application/xulrunner/config/mozconfigs/common deleted file mode 100644 index a6811c575c..0000000000 --- a/application/xulrunner/config/mozconfigs/common +++ /dev/null @@ -1,7 +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/. - -# This file is included at the top of all xulrunner mozconfigs - -. "$topsrcdir/build/mozconfig.common" diff --git a/application/xulrunner/config/mozconfigs/common.override b/application/xulrunner/config/mozconfigs/common.override deleted file mode 100644 index 8d719a5b5e..0000000000 --- a/application/xulrunner/config/mozconfigs/common.override +++ /dev/null @@ -1,8 +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/. - -# This file is included at the bottom of all xulrunner mozconfigs - -. "$topsrcdir/build/mozconfig.common.override" -. "$topsrcdir/build/mozconfig.cache" diff --git a/application/xulrunner/config/mozconfigs/linux32/xulrunner b/application/xulrunner/config/mozconfigs/linux32/xulrunner deleted file mode 100644 index 171674f8c8..0000000000 --- a/application/xulrunner/config/mozconfigs/linux32/xulrunner +++ /dev/null @@ -1,9 +0,0 @@ -export MOZILLA_OFFICIAL=1 -export JAVA_HOME=/tools/jdk - -ac_add_options --enable-application=xulrunner -ac_add_options --disable-tests - -. $topsrcdir/build/unix/mozconfig.linux32 - -. "$topsrcdir/xulrunner/config/mozconfigs/common.override" diff --git a/application/xulrunner/config/mozconfigs/linux32/xulrunner-qt b/application/xulrunner/config/mozconfigs/linux32/xulrunner-qt deleted file mode 100644 index 54e4ecb8f5..0000000000 --- a/application/xulrunner/config/mozconfigs/linux32/xulrunner-qt +++ /dev/null @@ -1,15 +0,0 @@ -export MOZILLA_OFFICIAL=1 -export JAVA_HOME=/tools/jdk - -ac_add_options --enable-application=xulrunner -ac_add_options --disable-tests - -. $topsrcdir/build/unix/mozconfig.linux32 - -# QT Options -export PKG_CONFIG_PATH=/tools/qt-4.6.3/qt/lib/pkgconfig -ac_add_options --with-qtdir=/tools/qt-4.6.3/qt -ac_add_options --enable-default-toolkit=cairo-qt -ac_add_options --disable-crashreporter - -. "$topsrcdir/xulrunner/config/mozconfigs/common.override" diff --git a/application/xulrunner/config/mozconfigs/linux64/xulrunner b/application/xulrunner/config/mozconfigs/linux64/xulrunner deleted file mode 100644 index c18a12f679..0000000000 --- a/application/xulrunner/config/mozconfigs/linux64/xulrunner +++ /dev/null @@ -1,9 +0,0 @@ -export MOZILLA_OFFICIAL=1 -export JAVA_HOME=/tools/jdk - -ac_add_options --enable-application=xulrunner -ac_add_options --disable-tests - -. $topsrcdir/build/unix/mozconfig.linux - -. "$topsrcdir/xulrunner/config/mozconfigs/common.override" diff --git a/application/xulrunner/config/mozconfigs/macosx-universal/xulrunner b/application/xulrunner/config/mozconfigs/macosx-universal/xulrunner deleted file mode 100644 index ac7e24fe23..0000000000 --- a/application/xulrunner/config/mozconfigs/macosx-universal/xulrunner +++ /dev/null @@ -1,9 +0,0 @@ -. $topsrcdir/build/macosx/universal/mozconfig - -export MOZILLA_OFFICIAL=1 - -ac_add_options --enable-application=xulrunner -ac_add_options --disable-tests -ac_add_options --with-xulrunner-stub-name=xulrunner-stub - -. "$topsrcdir/xulrunner/config/mozconfigs/common.override" diff --git a/application/xulrunner/config/mozconfigs/win32/xulrunner b/application/xulrunner/config/mozconfigs/win32/xulrunner deleted file mode 100644 index 4c8b596a56..0000000000 --- a/application/xulrunner/config/mozconfigs/win32/xulrunner +++ /dev/null @@ -1,16 +0,0 @@ -. "$topsrcdir/xulrunner/config/mozconfigs/common" - -export MOZILLA_OFFICIAL=1 -export JAVA_HOME=/d/jdk1.6.0_14 - -ac_add_options --enable-application=xulrunner -ac_add_options --enable-jemalloc -ac_add_options --disable-tests - -if test "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64"; then - . $topsrcdir/build/win32/mozconfig.vs2013-win64 -else - . $topsrcdir/build/win32/mozconfig.vs2010 -fi - -. "$topsrcdir/xulrunner/config/mozconfigs/common.override" diff --git a/application/xulrunner/config/mozconfigs/win64/xulrunner b/application/xulrunner/config/mozconfigs/win64/xulrunner deleted file mode 100644 index 7dbade2bb0..0000000000 --- a/application/xulrunner/config/mozconfigs/win64/xulrunner +++ /dev/null @@ -1,15 +0,0 @@ -. "$topsrcdir/xulrunner/config/mozconfigs/common" - -ac_add_options --target=x86_64-pc-mingw32 -ac_add_options --host=x86_64-pc-mingw32 - -export MOZILLA_OFFICIAL=1 -export JAVA_HOME=/d/jdk1.6.0_14 - -ac_add_options --enable-application=xulrunner -ac_add_options --enable-jemalloc -ac_add_options --disable-tests - -. $topsrcdir/build/win64/mozconfig.vs2013 - -. "$topsrcdir/xulrunner/config/mozconfigs/common.override" diff --git a/application/xulrunner/configure.in b/application/xulrunner/configure.in deleted file mode 100644 index 825faaddd1..0000000000 --- a/application/xulrunner/configure.in +++ /dev/null @@ -1,11 +0,0 @@ -dnl -*- Mode: Autoconf; tab-width: 2; indent-tabs-mode: nil; -*- -dnl vi: set tabstop=2 shiftwidth=2 expandtab: -dnl This Source Code Form is subject to the terms of the Mozilla Public -dnl License, v. 2.0. If a copy of the MPL was not distributed with this -dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. - -dnl Things we need to carry from confvars.sh -AC_SUBST(MOZ_XULRUNNER) -AC_DEFINE(MOZ_XULRUNNER) - -dnl Optional parts of the build. diff --git a/application/xulrunner/confvars.sh b/application/xulrunner/confvars.sh deleted file mode 100644 index 794b2b4b12..0000000000 --- a/application/xulrunner/confvars.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh -# 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/. - -MOZ_XULRUNNER=1 -MC_OFFICIAL=1 - -MOZ_APP_NAME=xulrunner -MOZ_APP_DISPLAYNAME=XULRunner -MOZ_APP_VERSION=$MOZILLA_VERSION -MOZ_CHROME_FILE_FORMAT=omni - -MOZ_UPDATER=1 - -MOZ_PLACES=1 -MOZ_WEBRTC=1 -MOZ_WEBGL_CONFORMANT=1 - -MOZ_EXTENSIONS_DEFAULT=" gio" - -MOZ_SERVICES_COMMON=1 -MOZ_SERVICES_SYNC=1 -MOZ_SERVICES_HEALTHREPORT= diff --git a/application/xulrunner/examples/moz.build b/application/xulrunner/examples/moz.build deleted file mode 100644 index e13865afd2..0000000000 --- a/application/xulrunner/examples/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -DIRS += ['simple'] diff --git a/application/xulrunner/examples/simple/application.ini b/application/xulrunner/examples/simple/application.ini deleted file mode 100644 index 39c051422a..0000000000 --- a/application/xulrunner/examples/simple/application.ini +++ /dev/null @@ -1,43 +0,0 @@ -#filter substitution -[App] -; -; This field specifies your organization's name. This field is recommended, -; but optional. -Vendor=MozillaTest -; -; This field specifies your application's name. This field is required. -Name=Simple -; -; This field specifies your application's version. This field is required. -Version=0.1 -; -; This field specifies your application's build ID (timestamp). This field is -; required. -BuildID=20070625 -; -; This field specifies a compact copyright notice for your application. This -; field is optional. -Copyright=Copyright (c) 2004 Mozilla.org -; -; This ID is just an example. Every XUL app ought to have it's own unique ID. -; You can use the microsoft "guidgen" or "uuidgen" tools, or go on -; irc.mozilla.org and /msg botbot uuid. This field is optional. -ID={3aea3f07-ffe3-4060-bb03-bff3a5365e90} - -[Gecko] -; -; This field is required. It specifies the minimum Gecko version that this -; application requires. -MinVersion=@MOZILLA_VERSION_U@ -; -; This field is optional. It specifies the maximum Gecko version that this -; application requires. It should be specified if your application uses -; unfrozen interfaces. -MaxVersion=@MOZILLA_VERSION_U@ - -[Shell] -; -; This field specifies the location of your application's main icon with file -; extension excluded. NOTE: Unix style file separators are required. This -; field is optional. -Icon=chrome/icons/default/simple diff --git a/application/xulrunner/examples/simple/components/moz.build b/application/xulrunner/examples/simple/components/moz.build deleted file mode 100644 index b1d0b7597f..0000000000 --- a/application/xulrunner/examples/simple/components/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -DIRS += ['public', 'src'] diff --git a/application/xulrunner/examples/simple/components/public/moz.build b/application/xulrunner/examples/simple/components/public/moz.build deleted file mode 100644 index 911b8560ed..0000000000 --- a/application/xulrunner/examples/simple/components/public/moz.build +++ /dev/null @@ -1,12 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -XPIDL_SOURCES += [ - 'nsISimpleTest.idl', -] - -XPIDL_MODULE = 'simple' - -XPI_NAME = 'simple' diff --git a/application/xulrunner/examples/simple/components/public/nsISimpleTest.idl b/application/xulrunner/examples/simple/components/public/nsISimpleTest.idl deleted file mode 100644 index 99b9b86af2..0000000000 --- a/application/xulrunner/examples/simple/components/public/nsISimpleTest.idl +++ /dev/null @@ -1,15 +0,0 @@ -/* vim:set ts=2 sw=2 sts=2 et cin: */ -/* 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/. */ - -#include "nsISupports.idl" - -[scriptable, uuid(f2f71d91-0451-47ec-aaa0-166663a7711a)] -interface nsISimpleTest : nsISupports -{ - /** - * This interface adds two numbers together and returns the result. - */ - long add(in long a, in long b); -}; diff --git a/application/xulrunner/examples/simple/components/src/SimpleTest.cpp b/application/xulrunner/examples/simple/components/src/SimpleTest.cpp deleted file mode 100644 index 06249abddb..0000000000 --- a/application/xulrunner/examples/simple/components/src/SimpleTest.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* vim:set ts=2 sw=2 sts=2 et cin: */ -/* 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/. */ - -#include -#include "nsISimpleTest.h" -#include "mozilla/ModuleUtils.h" - -class SimpleTest : public nsISimpleTest -{ - ~SimpleTest() {} -public: - NS_DECL_ISUPPORTS - NS_DECL_NSISIMPLETEST -}; - -NS_IMPL_ISUPPORTS(SimpleTest, nsISimpleTest) - -NS_IMETHODIMP -SimpleTest::Add(int32_t a, int32_t b, int32_t *r) -{ - printf("add(%d,%d) from C++\n", a, b); - - *r = a + b; - return NS_OK; -} - -NS_GENERIC_FACTORY_CONSTRUCTOR(SimpleTest) - -// 5e14b432-37b6-4377-923b-c987418d8429 -#define SIMPLETEST_CID \ - { 0x5e14b432, 0x37b6, 0x4377, \ - { 0x92, 0x3b, 0xc9, 0x87, 0x41, 0x8d, 0x84, 0x29 } } - -NS_DEFINE_NAMED_CID(SIMPLETEST_CID); - -static const mozilla::Module::CIDEntry kSimpleCIDs[] = { - { &kSIMPLETEST_CID, false, nullptr, SimpleTestConstructor }, - { nullptr } -}; - -static const mozilla::Module::ContractIDEntry kSimpleContracts[] = { - { "@test.mozilla.org/simple-test;1?impl=c++", &kSIMPLETEST_CID }, - { nullptr } -}; - -static const mozilla::Module kSimpleModule = { - mozilla::Module::kVersion, - kSimpleCIDs, - kSimpleContracts -}; - -NSMODULE_DEFN(SimpleTestModule) = &kSimpleModule; diff --git a/application/xulrunner/examples/simple/components/src/SimpleTest.js b/application/xulrunner/examples/simple/components/src/SimpleTest.js deleted file mode 100644 index e6cf90660c..0000000000 --- a/application/xulrunner/examples/simple/components/src/SimpleTest.js +++ /dev/null @@ -1,27 +0,0 @@ -/* vim:set ts=2 sw=2 sts=2 et cin: */ -/* 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/. */ - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - -function SimpleTest() { -} - -SimpleTest.prototype = { - classID: Components.ID("{4177e257-a0dc-49b9-a774-522a000a49fa}"), - - QueryInterface: function(iid) { - if (iid.equals(Components.interfaces.nsISimpleTest) || - iid.equals(Components.interfaces.nsISupports)) - return this; - throw Components.results.NS_ERROR_NO_INTERFACE; - }, - - add: function(a, b) { - dump("add(" + a + "," + b + ") from JS\n"); - return a + b; - } -}; - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SimpleTest]); diff --git a/application/xulrunner/examples/simple/components/src/SimpleTest.manifest b/application/xulrunner/examples/simple/components/src/SimpleTest.manifest deleted file mode 100644 index c7388b9d72..0000000000 --- a/application/xulrunner/examples/simple/components/src/SimpleTest.manifest +++ /dev/null @@ -1,2 +0,0 @@ -component {4177e257-a0dc-49b9-a774-522a000a49fa} SimpleTest.js -contract @test.mozilla.org/simple-test;1?impl=js {4177e257-a0dc-49b9-a774-522a000a49fa} diff --git a/application/xulrunner/examples/simple/components/src/moz.build b/application/xulrunner/examples/simple/components/src/moz.build deleted file mode 100644 index 510c594e5d..0000000000 --- a/application/xulrunner/examples/simple/components/src/moz.build +++ /dev/null @@ -1,20 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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/. - -SOURCES += [ - 'SimpleTest.cpp', -] - -XPCOMBinaryComponent('simpletest') - -EXTRA_COMPONENTS += [ - 'SimpleTest.js', - 'SimpleTest.manifest', -] - -XPI_NAME = 'simple' - -if CONFIG['GNU_CXX']: - CXXFLAGS += ['-Wshadow'] diff --git a/application/xulrunner/examples/simple/content/contents.rdf b/application/xulrunner/examples/simple/content/contents.rdf deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/application/xulrunner/examples/simple/content/simple.js b/application/xulrunner/examples/simple/content/simple.js deleted file mode 100644 index acf6f1029d..0000000000 --- a/application/xulrunner/examples/simple/content/simple.js +++ /dev/null @@ -1,17 +0,0 @@ -/* vim:set ts=2 sw=2 sts=2 et cin: */ -/* 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/. */ - -function onButtonClick() { - var textbox = document.getElementById("textbox"); - - var contractid = (textbox.value % 2 == 0) ? - "@test.mozilla.org/simple-test;1?impl=js" : - "@test.mozilla.org/simple-test;1?impl=c++"; - - var test = Components.classes[contractid]. - createInstance(Components.interfaces.nsISimpleTest); - - textbox.value = test.add(textbox.value, 1); -} diff --git a/application/xulrunner/examples/simple/content/simple.xul b/application/xulrunner/examples/simple/content/simple.xul deleted file mode 100644 index 6ff915d0ce..0000000000 --- a/application/xulrunner/examples/simple/content/simple.xul +++ /dev/null @@ -1,20 +0,0 @@ - -# vim:set ts=8 sw=8 sts=8 noet: -# 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/. - - - - - - -