diff options
author | Moonchild <mcwerewolf@wolfbeast.com> | 2019-03-13 07:49:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 07:49:07 +0100 |
commit | bf0413359245579e9509146d42cd5547e35da695 (patch) | |
tree | 8218d4f60d9eccacbf42df8cb88094a082d401b4 /application | |
parent | 51b821b3fdc5a7eab2369cb6a6680598a6264b08 (diff) | |
parent | 709bc24e9110eba12f94cfcb8db00a8338ac4098 (diff) | |
download | UXP-bf0413359245579e9509146d42cd5547e35da695.tar UXP-bf0413359245579e9509146d42cd5547e35da695.tar.gz UXP-bf0413359245579e9509146d42cd5547e35da695.tar.lz UXP-bf0413359245579e9509146d42cd5547e35da695.tar.xz UXP-bf0413359245579e9509146d42cd5547e35da695.zip |
Merge pull request #998 from MoonchildProductions/master
Merge master into Sync-weave
Diffstat (limited to 'application')
138 files changed, 4930 insertions, 16500 deletions
diff --git a/application/basilisk/Makefile.in b/application/basilisk/Makefile.in index 2eb9e708f..92527eaa8 100644 --- a/application/basilisk/Makefile.in +++ b/application/basilisk/Makefile.in @@ -10,7 +10,4 @@ ifdef MAKENSISU # uninstaller is included with the application for mar file generation. libs:: $(MAKE) -C installer/windows uninstaller -ifdef MOZ_MAINTENANCE_SERVICE - $(MAKE) -C installer/windows maintenanceservice_installer -endif endif diff --git a/application/basilisk/app/blocklist.xml b/application/basilisk/app/blocklist.xml index 239fe43a4..435d0e78f 100644 --- a/application/basilisk/app/blocklist.xml +++ b/application/basilisk/app/blocklist.xml @@ -1,6 +1,8 @@ <?xml version='1.0' encoding='UTF-8'?> -<blocklist lastupdate="1521130300000" xmlns="http://www.mozilla.org/2006/addons-blocklist"> +<blocklist lastupdate="1547041082000" xmlns="http://www.mozilla.org/2006/addons-blocklist"> <emItems> + <!-- Basilisk --> + <!-- Inherited malware items --> <emItem blockID="i988" id="{b12785f5-d8d0-4530-a3ea-5c4263b85bef}"> <prefs/> <versionRange minVersion="0" maxVersion="*" severity="1"/> diff --git a/application/basilisk/app/permissions b/application/basilisk/app/permissions index cf0aa22fb..cc5535f21 100644 --- a/application/basilisk/app/permissions +++ b/application/basilisk/app/permissions @@ -7,6 +7,8 @@ # See nsPermissionManager.cpp for more...
# XPInstall
+origin install 1 http://addons.basilisk-browser.org
+origin install 1 https://addons.basilisk-browser.org
origin install 1 https://addons.mozilla.org
origin install 1 https://testpilot.firefox.com
diff --git a/application/basilisk/app/profile/basilisk.js b/application/basilisk/app/profile/basilisk.js index cff5f599f..24f1c582c 100644 --- a/application/basilisk/app/profile/basilisk.js +++ b/application/basilisk/app/profile/basilisk.js @@ -36,24 +36,30 @@ pref("extensions.minCompatibleAppVersion", "4.0"); pref("xpinstall.customConfirmationUI", true); +#define AM_DOMAIN addons.basilisk-browser.org +#define AM_AUS_ARGS reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE% + // Preferences for AMO integration pref("extensions.getAddons.cache.enabled", false); -pref("extensions.getAddons.maxResults", 15); -pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=%OS%&appVersion=%VERSION%"); -pref("extensions.getAddons.getWithPerformance.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%"); -pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%"); -pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=firefox"); -pref("extensions.webservice.discoverURL", "https://discovery.addons.mozilla.org/%LOCALE%/firefox/discovery/pane/%VERSION%/%OS%/%COMPATIBILITY_MODE%"); -pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=firefox"); -pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/"); +pref("extensions.getAddons.maxResults", 10); +pref("extensions.getAddons.get.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=get&addonguid=%IDS%&os=%OS%&version=%VERSION%"); +pref("extensions.getAddons.getWithPerformance.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=get&addonguid=%IDS%&os=%OS%&version=%VERSION%"); +pref("extensions.getAddons.search.browseURL", "https://@AM_DOMAIN@/search/?terms=%TERMS%"); +pref("extensions.getAddons.search.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=search&q=%TERMS%&locale=%LOCALE%&os=%OS%&version=%VERSION%"); +pref("extensions.webservice.discoverURL", "http://@AM_DOMAIN@/?component=discover"); +pref("extensions.getAddons.recommended.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=recommended&locale=%LOCALE%&os=%OS%"); +pref("extensions.getAddons.browseAddons", "http://@AM_DOMAIN@/"); +pref("extensions.getAddons.recommended.browseURL", "https://@AM_DOMAIN@/?component=integration&type=external&request=recommended"); pref("extensions.update.autoUpdateDefault", true); +// Leave these for the moment... pref("extensions.hotfix.id", "firefox-hotfix@mozilla.org"); pref("extensions.hotfix.cert.checkAttributes", true); pref("extensions.hotfix.certs.1.sha1Fingerprint", "91:53:98:0C:C1:86:DF:47:8F:35:22:9E:11:C9:A7:31:04:49:A1:AA"); pref("extensions.hotfix.certs.2.sha1Fingerprint", "39:E7:2B:7A:5B:CF:37:78:F9:5D:4A:E0:53:2D:2F:3D:68:53:C5:60"); +// Also, leave this for the moment... // Check AUS for system add-on updates. pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml"); @@ -66,11 +72,14 @@ pref("extensions.webextensions.base-content-security-policy", "script-src 'self' pref("extensions.webextensions.default-content-security-policy", "script-src 'self'; object-src 'self';"); // Require signed add-ons by default -pref("xpinstall.signatures.required", true); +pref("xpinstall.signatures.required", false); pref("xpinstall.signatures.devInfoURL", "https://wiki.mozilla.org/Addons/Extension_Signing"); // Dictionary download preference -pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/"); +pref("browser.dictionaries.download.url", "http://@AM_DOMAIN@/dictionaries/"); + +// Get More Tools link URL +pref("browser.getdevtools.url","https://@AM_DOMAIN@/?component=integration&type=external&request=devtools"); // At startup, should we check to see if the installation // date is older than some threshold @@ -135,17 +144,15 @@ pref("app.update.url", "https://aus5.mozilla.org/update/6/%PRODUCT%/%VERSION%/%B // app.update.url.manual is in branding section // app.update.url.details is in branding section +// User-settable override to app.update.url for testing purposes. +//pref("app.update.url.override", ""); + // app.update.interval is in branding section // app.update.promptWaitTime is in branding section // Show the Update Checking/Ready UI when the user was idle for x seconds pref("app.update.idletime", 60); -// Whether or not to attempt using the service for updates. -#ifdef MOZ_MAINTENANCE_SERVICE -pref("app.update.service.enabled", true); -#endif - // Symmetric (can be overridden by individual extensions) update preferences. // e.g. // extensions.{GUID}.update.enabled @@ -153,8 +160,8 @@ pref("app.update.service.enabled", true); // .. etc .. // pref("extensions.update.enabled", true); -pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=52.9&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); -pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=52.9&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); +pref("extensions.update.url", "https://@AM_DOMAIN@/?component=aus&@AM_AUS_ARGS@"); +pref("extensions.update.background.url", "https://@AM_DOMAIN@/?component=aus&@AM_AUS_ARGS@"); pref("extensions.update.interval", 86400); // Check for updates to Extensions and // Themes every day // Non-symmetric (not shared by extensions) extension-specific [update] preferences @@ -166,7 +173,7 @@ pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://browser pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties"); pref("lightweightThemes.update.enabled", true); -pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes"); +pref("lightweightThemes.getMoreURL", "http://@AM_DOMAIN@/personas/"); pref("lightweightThemes.recommendedThemes", "[{\"id\":\"recommended-1\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/a-web-browser-renaissance/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.header.jpg\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.footer.jpg\",\"textcolor\":\"#000000\",\"accentcolor\":\"#f2d9b1\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.icon.jpg\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.preview.jpg\",\"author\":\"Sean.Martell\",\"version\":\"0\"},{\"id\":\"recommended-2\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/space-fantasy/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.header.jpg\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.footer.jpg\",\"textcolor\":\"#ffffff\",\"accentcolor\":\"#d9d9d9\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.icon.jpg\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.preview.jpg\",\"author\":\"fx5800p\",\"version\":\"1.0\"},{\"id\":\"recommended-3\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/linen-light/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.header.png\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.footer.png\",\"accentcolor\":\"#ada8a8\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.icon.png\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.preview.png\",\"author\":\"DVemer\",\"version\":\"1.0\"},{\"id\":\"recommended-4\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/pastel-gradient/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.header.png\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.footer.png\",\"textcolor\":\"#000000\",\"accentcolor\":\"#000000\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.icon.png\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.preview.png\",\"author\":\"darrinhenein\",\"version\":\"1.0\"},{\"id\":\"recommended-5\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/carbon-light/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.header.png\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.footer.png\",\"textcolor\":\"#3b3b3b\",\"accentcolor\":\"#2e2e2e\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.icon.jpg\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.preview.jpg\",\"author\":\"Jaxivo\",\"version\":\"1.0\"}]"); #if defined(MOZ_ADOBE_EME) || defined(MOZ_WIDEVINE_EME) @@ -329,7 +336,7 @@ pref("browser.helperApps.deleteTempFileOnExit", true); #endif // search engines URL -pref("browser.search.searchEnginesURL", "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/"); +pref("browser.search.searchEnginesURL", "https://@AM_DOMAIN@/search-plugins/"); // pointer to the default engine name pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties"); @@ -1051,6 +1058,9 @@ sticky_pref("browser.newtabpage.enhanced", false); // enables Activity Stream inspired layout pref("browser.newtabpage.compact", false); +// Disables capturing of page thumbnails +pref("browser.pagethumbnails.capturing_disabled", false); + // enables showing basic placeholders for missing thumbnails pref("browser.newtabpage.thumbnailPlaceholder", false); @@ -1428,3 +1438,11 @@ pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false); // controlling validation are located in /services/sync/services-sync.js pref("services.sync.validation.enabled", true); #endif + +// When a user cancels this number of authentication dialogs coming from +// a single web page (eTLD+1) in a row, all following authentication dialogs +// will be blocked (automatically canceled) for that page. +// This counter is per-tab and per-domain to minimize false positives. +// The counter resets when the page is reloaded from the UI +// (content-reloads do NOT clear this to mitigate reloading tricks). +pref("prompts.authentication_dialog_abuse_limit", 3); diff --git a/application/basilisk/base/content/browser-fullScreenAndPointerLock.js b/application/basilisk/base/content/browser-fullScreenAndPointerLock.js index ebe55377f..b26a31f78 100644 --- a/application/basilisk/base/content/browser-fullScreenAndPointerLock.js +++ b/application/basilisk/base/content/browser-fullScreenAndPointerLock.js @@ -322,15 +322,9 @@ var FullScreen = { document.addEventListener("popuphidden", this._setPopupOpen, false); // If it is not safe to collapse, add the mouse position tracker or // else it won't be possible to hide the navigation toolbox again - if (!this._safeToCollapse()) { - let rect = gBrowser.mPanelContainer.getBoundingClientRect(); - this._mouseTargetRect = { - top: rect.top + 50, - bottom: rect.bottom, - left: rect.left, - right: rect.right - }; - MousePosTracker.addListener(this); + if (gPrefService.getBoolPref("browser.fullscreen.autohide")) { + gBrowser.mPanelContainer.addEventListener("mousemove", + this._collapseCallback, false); } // In DOM fullscreen mode, we hide toolbars with CSS if (!document.fullscreenElement) @@ -468,7 +462,8 @@ var FullScreen = { cleanup: function () { if (!window.fullScreen) { - MousePosTracker.removeListener(this); + gBrowser.mPanelContainer.removeEventListener("mousemove", + this._collapseCallback, false); document.removeEventListener("keypress", this._keyToggleCallback, false); document.removeEventListener("popupshown", this._setPopupOpen, false); document.removeEventListener("popuphidden", this._setPopupOpen, false); @@ -497,17 +492,12 @@ var FullScreen = { .getInterface(Ci.nsIDOMWindowUtils); }, - getMouseTargetRect: function() - { - return this._mouseTargetRect; - }, - // Event callbacks _expandCallback: function() { FullScreen.showNavToolbox(); }, - onMouseEnter: function() + _collapseCallback: function() { FullScreen.hideNavToolbox(); }, @@ -588,14 +578,8 @@ var FullScreen = { // Track whether mouse is near the toolbox if (trackMouse && !this.useLionFullScreen) { - let rect = gBrowser.mPanelContainer.getBoundingClientRect(); - this._mouseTargetRect = { - top: rect.top + 50, - bottom: rect.bottom, - left: rect.left, - right: rect.right - }; - MousePosTracker.addListener(this); + gBrowser.mPanelContainer.addEventListener("mousemove", + this._collapseCallback, false); } this._isChromeCollapsed = false; @@ -622,7 +606,8 @@ var FullScreen = { gNavToolbox.style.marginTop = -gNavToolbox.getBoundingClientRect().height + "px"; this._isChromeCollapsed = true; - MousePosTracker.removeListener(this); + gBrowser.mPanelContainer.removeEventListener("mousemove", + this._collapseCallback, false); }, _updateToolbars: function (aEnterFS) { diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js index 9fb997a42..336670fa0 100644 --- a/application/basilisk/base/content/browser.js +++ b/application/basilisk/base/content/browser.js @@ -3094,6 +3094,11 @@ function getWebNavigation() } function BrowserReloadWithFlags(reloadFlags) { + + // Reset DOS mitigation for auth prompts when user initiates a reload. + let browser = gBrowser.selectedBrowser; + delete browser.authPromptCounter; + let url = gBrowser.currentURI.spec; if (gBrowser.updateBrowserRemotenessByURL(gBrowser.selectedBrowser, url)) { // If the remoteness has changed, the new browser doesn't have any diff --git a/application/basilisk/base/content/browser.xul b/application/basilisk/base/content/browser.xul index 3208538c1..be64f1bac 100644 --- a/application/basilisk/base/content/browser.xul +++ b/application/basilisk/base/content/browser.xul @@ -997,7 +997,8 @@ contentcontextmenu="contentAreaContextMenu" autocompletepopup="PopupAutoComplete" selectmenulist="ContentSelectDropdown" - datetimepicker="DateTimePickerPanel"/> + datetimepicker="DateTimePickerPanel" + authdosprotected="true" /> </vbox> <vbox id="browser-border-end" hidden="true" layer="true"/> </hbox> diff --git a/application/basilisk/base/content/tab-content.js b/application/basilisk/base/content/tab-content.js index 6d053dd2b..7441b2140 100644 --- a/application/basilisk/base/content/tab-content.js +++ b/application/basilisk/base/content/tab-content.js @@ -9,9 +9,6 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -#ifdef MOZ_WEBEXTENSIONS -Cu.import("resource://gre/modules/ExtensionContent.jsm"); -#endif XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils", "resource:///modules/E10SUtils.jsm"); @@ -916,14 +913,6 @@ var UserContextIdNotifier = { UserContextIdNotifier.init(); -#ifdef MOZ_WEBEXTENSIONS -ExtensionContent.init(this); -addEventListener("unload", () => { - ExtensionContent.uninit(this); - RefreshBlocker.uninit(); -}); -#endif - addMessageListener("AllowScriptsToClose", () => { content.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils) diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml index 043838020..52c51db69 100644 --- a/application/basilisk/base/content/tabbrowser.xml +++ b/application/basilisk/base/content/tabbrowser.xml @@ -25,7 +25,7 @@ <xul:vbox flex="1" class="browserContainer"> <xul:stack flex="1" class="browserStack" anonid="browserStack"> <xul:browser anonid="initialBrowser" type="content-primary" message="true" messagemanagergroup="browsers" - xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker"/> + xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker,authdosprotected"/> </xul:stack> </xul:vbox> </xul:hbox> @@ -1936,6 +1936,10 @@ if (this.hasAttribute("datetimepicker")) { b.setAttribute("datetimepicker", this.getAttribute("datetimepicker")); } + + if (this.hasAttribute("authdosprotected")) { + b.setAttribute("authdosprotected", this.getAttribute("authdosprotected")); + } b.setAttribute("autoscrollpopup", this._autoScrollPopup.id); @@ -2991,7 +2995,10 @@ <parameter name="aTab"/> <body> <![CDATA[ - this.getBrowserForTab(aTab).reload(); + let browser = this.getBrowserForTab(aTab); + // Reset DOS mitigation for basic auth prompt + delete browser.authPromptCounter; + browser.reload(); ]]> </body> </method> diff --git a/application/basilisk/base/content/urlbarBindings.xml b/application/basilisk/base/content/urlbarBindings.xml index eb3150581..b9c17818a 100644 --- a/application/basilisk/base/content/urlbarBindings.xml +++ b/application/basilisk/base/content/urlbarBindings.xml @@ -56,11 +56,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. <field name="AppConstants" readonly="true"> (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants; </field> -#ifdef MOZ_WEBEXTENSIONS - <field name="ExtensionSearchHandler" readonly="true"> - (Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler; - </field> -#endif <constructor><![CDATA[ this._prefs = Components.classes["@mozilla.org/preferences-service;1"] @@ -488,15 +483,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. actionDetails ); break; -#ifdef MOZ_WEBEXTENSIONS - case "extension": - this.handleRevert(); - // Give the extension control of handling the command. - let searchString = action.params.content; - let keyword = action.params.keyword; - this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where); - return; -#endif } } else { // This is a fallback for add-ons and old testing code that directly @@ -554,6 +540,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. Cu.reportError(ex); } + // Reset DOS mitigations for the basic auth prompt. + delete browser.authPromptCounter; + let params = { postData, allowThirdPartyFixup: true, @@ -1214,11 +1203,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. this._clearNoActions(); this.formatValue(); } -#ifdef MOZ_WEBEXTENSIONS - if (ExtensionSearchHandler.hasActiveInputSession()) { - ExtensionSearchHandler.handleInputCancelled(); - } -#endif ]]></handler> <handler event="dragstart" phase="capturing"><![CDATA[ diff --git a/application/basilisk/base/jar.mn b/application/basilisk/base/jar.mn index c288685b9..ddfb0ffe8 100644 --- a/application/basilisk/base/jar.mn +++ b/application/basilisk/base/jar.mn @@ -95,7 +95,7 @@ browser.jar: #endif content/browser/browser-thumbnails.js (content/browser-thumbnails.js) content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js) -* content/browser/tab-content.js (content/tab-content.js) + content/browser/tab-content.js (content/tab-content.js) content/browser/content.js (content/content.js) content/browser/defaultthemes/1.footer.jpg (content/defaultthemes/1.footer.jpg) content/browser/defaultthemes/1.header.jpg (content/defaultthemes/1.header.jpg) @@ -163,7 +163,7 @@ browser.jar: content/browser/contentSearchUI.css (content/contentSearchUI.css) content/browser/tabbrowser.css (content/tabbrowser.css) content/browser/tabbrowser.xml (content/tabbrowser.xml) -* content/browser/urlbarBindings.xml (content/urlbarBindings.xml) + content/browser/urlbarBindings.xml (content/urlbarBindings.xml) content/browser/utilityOverlay.js (content/utilityOverlay.js) content/browser/usercontext.svg (content/usercontext.svg) content/browser/web-panels.js (content/web-panels.js) diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc index fb0e6b79b..307d889d9 100644 --- a/application/basilisk/branding/shared/uaoverrides.inc +++ b/application/basilisk/branding/shared/uaoverrides.inc @@ -26,6 +26,7 @@ pref("@GUAO_PREF@.addons.mozilla.org", "Mozilla/5.0 (@OS_SLICE@ rv:@GK_VERSION@) // Required for domains that have proven unresponsive to requests from users
pref("@GUAO_PREF@.youtube.com","Mozilla/5.0 (@OS_SLICE@ rv:42.0) @GK_SLICE@ Firefox/42.0 @APP_SLICE@");
pref("@GUAO_PREF@.gaming.youtube.com","Mozilla/5.0 (@OS_SLICE@ rv:42.0) @GK_SLICE@ Firefox/42.0");
+pref("@GUAO_PREF@.netflix.com","Mozilla/5.0 (@OS_SLICE@ rv:42.0) @GK_SLICE@ Firefox/42.0 @APP_SLICE@");
// The never-ending Facebook debacle...
@@ -36,6 +37,7 @@ pref("@GUAO_PREF@.dailymotion.com","Mozilla/5.0 (@OS_SLICE@ rv:52.0) @GK_SLICE@ // The following requires native mode. Or it blocks.. "too old firefox", breakage, etc.
// UA-Sniffing domains below have indicated no interest in supporting Pale Moon (BOO!)
+pref("@GUAO_PREF@.whatsapp.com","Mozilla/5.0 (@OS_SLICE@ rv:61.0) @GK_SLICE@ Firefox/61.0");
// UA-sniffing domains that are "app/vendor-specific" and do not like Pale Moon
diff --git a/application/basilisk/components/moz.build b/application/basilisk/components/moz.build index 07e79bc36..a7685cbfc 100644 --- a/application/basilisk/components/moz.build +++ b/application/basilisk/components/moz.build @@ -24,9 +24,6 @@ DIRS += [ 'translation', ] -if CONFIG['MOZ_WEBEXTENSIONS']: - DIRS += ['webextensions'] - DIRS += ['build'] XPIDL_SOURCES += [ diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js index 3258159b6..d77e97f87 100644 --- a/application/basilisk/components/nsBrowserGlue.js +++ b/application/basilisk/components/nsBrowserGlue.js @@ -1080,24 +1080,19 @@ BrowserGlue.prototype = { // For any add-ons that were installed disabled and can be enabled offer // them to the user. - let win = RecentWindow.getMostRecentBrowserWindow(); - AddonManager.getAllAddons(addons => { - for (let addon of addons) { - // If this add-on has already seen (or seen is undefined for non-XPI - // add-ons) then skip it. - if (addon.seen !== false) { - continue; - } - - // If this add-on cannot be enabled (either already enabled or - // appDisabled) then skip it. - if (!(addon.permissions & AddonManager.PERM_CAN_ENABLE)) { - continue; - } - - win.openUILinkIn("about:newaddon?id=" + addon.id, "tab"); - } - }); + let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED); + if (changedIDs.length > 0) { + let win = this.getMostRecentBrowserWindow(); + AddonManager.getAddonsByIDs(changedIDs, function(aAddons) { + aAddons.forEach(function(aAddon) { + // If the add-on isn't user disabled or can't be enabled then skip it. + if (!aAddon.userDisabled || !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE)) + return; + + win.openUILinkIn("about:newaddon?id=" + aAddon.id, "tab"); + }) + }); + } let signingRequired; if (AppConstants.MOZ_REQUIRE_SIGNING) { @@ -1110,6 +1105,11 @@ BrowserGlue.prototype = { let disabledAddons = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_DISABLED); AddonManager.getAddonsByIDs(disabledAddons, (addons) => { for (let addon of addons) { + // WEs return null, skip. + if (!addon) { + continue; + } + if (addon.type == "experiment") continue; diff --git a/application/basilisk/components/preferences/connection.js b/application/basilisk/components/preferences/connection.js index f6b395a2d..349139bed 100644 --- a/application/basilisk/components/preferences/connection.js +++ b/application/basilisk/components/preferences/connection.js @@ -76,7 +76,7 @@ var gConnectionsDialog = { var autologinProxyPref = document.getElementById("signon.autologin.proxy"); autologinProxyPref.disabled = proxyTypePref.value == 0; var noProxiesPref = document.getElementById("network.proxy.no_proxies_on"); - noProxiesPref.disabled = proxyTypePref.value != 1; + noProxiesPref.disabled = proxyTypePref.value == 0; var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url"); autoconfigURLPref.disabled = proxyTypePref.value != 2; diff --git a/application/basilisk/components/preferences/connection.xul b/application/basilisk/components/preferences/connection.xul index a3f0d082a..1eb0c1544 100644 --- a/application/basilisk/components/preferences/connection.xul +++ b/application/basilisk/components/preferences/connection.xul @@ -145,9 +145,6 @@ </radiogroup> </box> </row> - <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/> - <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/> - <label value="&noproxyExplain.label;" control="networkProxyNone"/> </rows> </grid> <radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/> @@ -162,6 +159,9 @@ </radiogroup> </groupbox> <separator class="thin"/> + <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/> + <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/> + <label value="&noproxyExplain.label;" control="networkProxyNone"/> <checkbox id="autologinProxy" label="&autologinproxy.label;" accesskey="&autologinproxy.accesskey;" diff --git a/application/basilisk/components/preferences/in-content/advanced.js b/application/basilisk/components/preferences/in-content/advanced.js index 5f9458eee..850f0e09f 100644 --- a/application/basilisk/components/preferences/in-content/advanced.js +++ b/application/basilisk/components/preferences/in-content/advanced.js @@ -670,25 +670,6 @@ var gAdvancedPane = { // or the binary platform or OS version is not known. // A locked pref is sufficient to disable the radiogroup. radiogroup.disabled = !canCheck || enabledPref.locked || autoPref.locked; - - if (AppConstants.MOZ_MAINTENANCE_SERVICE) { - // Check to see if the maintenance service is installed. - // If it is don't show the preference at all. - var installed; - try { - var wrk = Components.classes["@mozilla.org/windows-registry-key;1"] - .createInstance(Components.interfaces.nsIWindowsRegKey); - wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE, - "SOFTWARE\\Mozilla\\MaintenanceService", - wrk.ACCESS_READ | wrk.WOW64_64); - installed = wrk.readIntValue("Installed"); - wrk.close(); - } catch (e) { - } - if (installed != 1) { - document.getElementById("useService").hidden = true; - } - } } }, diff --git a/application/basilisk/components/preferences/in-content/advanced.xul b/application/basilisk/components/preferences/in-content/advanced.xul index 4973f8e09..50e276501 100644 --- a/application/basilisk/components/preferences/in-content/advanced.xul +++ b/application/basilisk/components/preferences/in-content/advanced.xul @@ -79,12 +79,6 @@ <preference id="app.update.disable_button.showUpdateHistory" name="app.update.disable_button.showUpdateHistory" type="bool"/> - -#ifdef MOZ_MAINTENANCE_SERVICE - <preference id="app.update.service.enabled" - name="app.update.service.enabled" - type="bool"/> -#endif #endif <preference id="browser.search.update" @@ -331,13 +325,6 @@ accesskey="&updateHistory.accesskey;" preference="app.update.disable_button.showUpdateHistory"/> </hbox> - -#ifdef MOZ_MAINTENANCE_SERVICE - <checkbox id="useService" - label="&useService.label;" - accesskey="&useService.accesskey;" - preference="app.update.service.enabled"/> -#endif </groupbox> #endif <groupbox id="updateOthers" align="start"> diff --git a/application/basilisk/components/webextensions/.eslintrc.js b/application/basilisk/components/webextensions/.eslintrc.js deleted file mode 100644 index 81a11c4ac..000000000 --- a/application/basilisk/components/webextensions/.eslintrc.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -module.exports = { // eslint-disable-line no-undef - "extends": "../../../toolkit/components/extensions/.eslintrc.js", - - "globals": { - "AllWindowEvents": true, - "browserActionFor": true, - "currentWindow": true, - "EventEmitter": true, - "getCookieStoreIdForTab": true, - "IconDetails": true, - "makeWidgetId": true, - "pageActionFor": true, - "PanelPopup": true, - "TabContext": true, - "ViewPopup": true, - "WindowEventManager": true, - "WindowListManager": true, - "WindowManager": true, - }, -}; diff --git a/application/basilisk/components/webextensions/ext-bookmarks.js b/application/basilisk/components/webextensions/ext-bookmarks.js deleted file mode 100644 index 399f6212d..000000000 --- a/application/basilisk/components/webextensions/ext-bookmarks.js +++ /dev/null @@ -1,374 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -const {classes: Cc, interfaces: Ci, utils: Cu} = Components; - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -const { - SingletonEventManager, -} = ExtensionUtils; - -XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter", - "resource://devtools/shared/event-emitter.js"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Task", - "resource://gre/modules/Task.jsm"); - -let listenerCount = 0; - -function getTree(rootGuid, onlyChildren) { - function convert(node, parent) { - let treenode = { - id: node.guid, - title: node.title || "", - index: node.index, - dateAdded: node.dateAdded / 1000, - }; - - if (parent && node.guid != PlacesUtils.bookmarks.rootGuid) { - treenode.parentId = parent.guid; - } - - if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE) { - // This isn't quite correct. Recently Bookmarked ends up here ... - treenode.url = node.uri; - } else { - treenode.dateGroupModified = node.lastModified / 1000; - - if (node.children && !onlyChildren) { - treenode.children = node.children.map(child => convert(child, node)); - } - } - - return treenode; - } - - return PlacesUtils.promiseBookmarksTree(rootGuid, { - excludeItemsCallback: item => { - if (item.type == PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR) { - return true; - } - return item.annos && - item.annos.find(a => a.name == PlacesUtils.EXCLUDE_FROM_BACKUP_ANNO); - }, - }).then(root => { - if (onlyChildren) { - let children = root.children || []; - return children.map(child => convert(child, root)); - } - // It seems like the array always just contains the root node. - return [convert(root, null)]; - }).catch(e => Promise.reject({message: e.message})); -} - -function convert(result) { - let node = { - id: result.guid, - title: result.title || "", - index: result.index, - dateAdded: result.dateAdded.getTime(), - }; - - if (result.guid != PlacesUtils.bookmarks.rootGuid) { - node.parentId = result.parentGuid; - } - - if (result.type == PlacesUtils.bookmarks.TYPE_BOOKMARK) { - node.url = result.url.href; // Output is always URL object. - } else { - node.dateGroupModified = result.lastModified.getTime(); - } - - return node; -} - -let observer = { - skipTags: true, - skipDescendantsOnItemRemoval: true, - - onBeginUpdateBatch() {}, - onEndUpdateBatch() {}, - - onItemAdded(id, parentId, index, itemType, uri, title, dateAdded, guid, parentGuid, source) { - if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) { - return; - } - - let bookmark = { - id: guid, - parentId: parentGuid, - index, - title, - dateAdded: dateAdded / 1000, - }; - - if (itemType == PlacesUtils.bookmarks.TYPE_BOOKMARK) { - bookmark.url = uri.spec; - } else { - bookmark.dateGroupModified = bookmark.dateAdded; - } - - this.emit("created", bookmark); - }, - - onItemVisited() {}, - - onItemMoved(id, oldParentId, oldIndex, newParentId, newIndex, itemType, guid, oldParentGuid, newParentGuid, source) { - if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) { - return; - } - - let info = { - parentId: newParentGuid, - index: newIndex, - oldParentId: oldParentGuid, - oldIndex, - }; - this.emit("moved", {guid, info}); - }, - - onItemRemoved(id, parentId, index, itemType, uri, guid, parentGuid, source) { - if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) { - return; - } - - let node = { - id: guid, - parentId: parentGuid, - index, - }; - - if (itemType == PlacesUtils.bookmarks.TYPE_BOOKMARK) { - node.url = uri.spec; - } - - this.emit("removed", {guid, info: {parentId: parentGuid, index, node}}); - }, - - onItemChanged(id, prop, isAnno, val, lastMod, itemType, parentId, guid, parentGuid, oldVal, source) { - if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) { - return; - } - - let info = {}; - if (prop == "title") { - info.title = val; - } else if (prop == "uri") { - info.url = val; - } else { - // Not defined yet. - return; - } - - this.emit("changed", {guid, info}); - }, -}; -EventEmitter.decorate(observer); - -function decrementListeners() { - listenerCount -= 1; - if (!listenerCount) { - PlacesUtils.bookmarks.removeObserver(observer); - } -} - -function incrementListeners() { - listenerCount++; - if (listenerCount == 1) { - PlacesUtils.bookmarks.addObserver(observer, false); - } -} - -extensions.registerSchemaAPI("bookmarks", "addon_parent", context => { - return { - bookmarks: { - get: function(idOrIdList) { - let list = Array.isArray(idOrIdList) ? idOrIdList : [idOrIdList]; - - return Task.spawn(function* () { - let bookmarks = []; - for (let id of list) { - let bookmark = yield PlacesUtils.bookmarks.fetch({guid: id}); - if (!bookmark) { - throw new Error("Bookmark not found"); - } - bookmarks.push(convert(bookmark)); - } - return bookmarks; - }).catch(error => Promise.reject({message: error.message})); - }, - - getChildren: function(id) { - // TODO: We should optimize this. - return getTree(id, true); - }, - - getTree: function() { - return getTree(PlacesUtils.bookmarks.rootGuid, false); - }, - - getSubTree: function(id) { - return getTree(id, false); - }, - - search: function(query) { - return PlacesUtils.bookmarks.search(query).then(result => result.map(convert)); - }, - - getRecent: function(numberOfItems) { - return PlacesUtils.bookmarks.getRecent(numberOfItems).then(result => result.map(convert)); - }, - - create: function(bookmark) { - let info = { - title: bookmark.title || "", - }; - - // If url is NULL or missing, it will be a folder. - if (bookmark.url !== null) { - info.type = PlacesUtils.bookmarks.TYPE_BOOKMARK; - info.url = bookmark.url || ""; - } else { - info.type = PlacesUtils.bookmarks.TYPE_FOLDER; - } - - if (bookmark.index !== null) { - info.index = bookmark.index; - } - - if (bookmark.parentId !== null) { - info.parentGuid = bookmark.parentId; - } else { - info.parentGuid = PlacesUtils.bookmarks.unfiledGuid; - } - - try { - return PlacesUtils.bookmarks.insert(info).then(convert) - .catch(error => Promise.reject({message: error.message})); - } catch (e) { - return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`}); - } - }, - - move: function(id, destination) { - let info = { - guid: id, - }; - - if (destination.parentId !== null) { - info.parentGuid = destination.parentId; - } - info.index = (destination.index === null) ? - PlacesUtils.bookmarks.DEFAULT_INDEX : destination.index; - - try { - return PlacesUtils.bookmarks.update(info).then(convert) - .catch(error => Promise.reject({message: error.message})); - } catch (e) { - return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`}); - } - }, - - update: function(id, changes) { - let info = { - guid: id, - }; - - if (changes.title !== null) { - info.title = changes.title; - } - if (changes.url !== null) { - info.url = changes.url; - } - - try { - return PlacesUtils.bookmarks.update(info).then(convert) - .catch(error => Promise.reject({message: error.message})); - } catch (e) { - return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`}); - } - }, - - remove: function(id) { - let info = { - guid: id, - }; - - // The API doesn't give you the old bookmark at the moment - try { - return PlacesUtils.bookmarks.remove(info, {preventRemovalOfNonEmptyFolders: true}).then(result => {}) - .catch(error => Promise.reject({message: error.message})); - } catch (e) { - return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`}); - } - }, - - removeTree: function(id) { - let info = { - guid: id, - }; - - try { - return PlacesUtils.bookmarks.remove(info).then(result => {}) - .catch(error => Promise.reject({message: error.message})); - } catch (e) { - return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`}); - } - }, - - onCreated: new SingletonEventManager(context, "bookmarks.onCreated", fire => { - let listener = (event, bookmark) => { - context.runSafe(fire, bookmark.id, bookmark); - }; - - observer.on("created", listener); - incrementListeners(); - return () => { - observer.off("created", listener); - decrementListeners(); - }; - }).api(), - - onRemoved: new SingletonEventManager(context, "bookmarks.onRemoved", fire => { - let listener = (event, data) => { - context.runSafe(fire, data.guid, data.info); - }; - - observer.on("removed", listener); - incrementListeners(); - return () => { - observer.off("removed", listener); - decrementListeners(); - }; - }).api(), - - onChanged: new SingletonEventManager(context, "bookmarks.onChanged", fire => { - let listener = (event, data) => { - context.runSafe(fire, data.guid, data.info); - }; - - observer.on("changed", listener); - incrementListeners(); - return () => { - observer.off("changed", listener); - decrementListeners(); - }; - }).api(), - - onMoved: new SingletonEventManager(context, "bookmarks.onMoved", fire => { - let listener = (event, data) => { - context.runSafe(fire, data.guid, data.info); - }; - - observer.on("moved", listener); - incrementListeners(); - return () => { - observer.off("moved", listener); - decrementListeners(); - }; - }).api(), - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-browserAction.js b/application/basilisk/components/webextensions/ext-browserAction.js deleted file mode 100644 index 2c82ac701..000000000 --- a/application/basilisk/components/webextensions/ext-browserAction.js +++ /dev/null @@ -1,531 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI", - "resource:///modules/CustomizableUI.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "clearTimeout", - "resource://gre/modules/Timer.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "setTimeout", - "resource://gre/modules/Timer.jsm"); - -XPCOMUtils.defineLazyServiceGetter(this, "DOMUtils", - "@mozilla.org/inspector/dom-utils;1", - "inIDOMUtils"); - -Cu.import("resource://devtools/shared/event-emitter.js"); -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -Cu.import("resource://gre/modules/Task.jsm"); - -var { - EventManager, - IconDetails, -} = ExtensionUtils; - -const POPUP_PRELOAD_TIMEOUT_MS = 200; - -const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; - -function isAncestorOrSelf(target, node) { - for (; node; node = node.parentNode) { - if (node === target) { - return true; - } - } - return false; -} - -// WeakMap[Extension -> BrowserAction] -var browserActionMap = new WeakMap(); - -// Responsible for the browser_action section of the manifest as well -// as the associated popup. -function BrowserAction(options, extension) { - this.extension = extension; - - let widgetId = makeWidgetId(extension.id); - this.id = `${widgetId}-browser-action`; - this.viewId = `PanelUI-webext-${widgetId}-browser-action-view`; - this.widget = null; - - this.pendingPopup = null; - this.pendingPopupTimeout = null; - - this.tabManager = TabManager.for(extension); - - this.defaults = { - enabled: true, - title: options.default_title || extension.name, - badgeText: "", - badgeBackgroundColor: null, - icon: IconDetails.normalize({path: options.default_icon}, extension), - popup: options.default_popup || "", - }; - - this.browserStyle = options.browser_style || false; - if (options.browser_style === null) { - this.extension.logger.warn("Please specify whether you want browser_style " + - "or not in your browser_action options."); - } - - this.tabContext = new TabContext(tab => Object.create(this.defaults), - extension); - - EventEmitter.decorate(this); -} - -BrowserAction.prototype = { - build() { - let widget = CustomizableUI.createWidget({ - id: this.id, - viewId: this.viewId, - type: "view", - removable: true, - label: this.defaults.title || this.extension.name, - tooltiptext: this.defaults.title || "", - defaultArea: CustomizableUI.AREA_NAVBAR, - - onBeforeCreated: document => { - let view = document.createElementNS(XUL_NS, "panelview"); - view.id = this.viewId; - view.setAttribute("flex", "1"); - - document.getElementById("PanelUI-multiView").appendChild(view); - }, - - onDestroyed: document => { - let view = document.getElementById(this.viewId); - if (view) { - this.clearPopup(); - CustomizableUI.hidePanelForNode(view); - view.remove(); - } - }, - - onCreated: node => { - node.classList.add("badged-button"); - node.classList.add("webextension-browser-action"); - node.setAttribute("constrain-size", "true"); - - node.onmousedown = event => this.handleEvent(event); - - this.updateButton(node, this.defaults); - }, - - onViewShowing: event => { - let document = event.target.ownerDocument; - let tabbrowser = document.defaultView.gBrowser; - - let tab = tabbrowser.selectedTab; - let popupURL = this.getProperty(tab, "popup"); - this.tabManager.addActiveTabPermission(tab); - - // Popups are shown only if a popup URL is defined; otherwise - // a "click" event is dispatched. This is done for compatibility with the - // Google Chrome onClicked extension API. - if (popupURL) { - try { - let popup = this.getPopup(document.defaultView, popupURL); - event.detail.addBlocker(popup.attach(event.target)); - } catch (e) { - Cu.reportError(e); - event.preventDefault(); - } - } else { - // This isn't not a hack, but it seems to provide the correct behavior - // with the fewest complications. - event.preventDefault(); - this.emit("click"); - } - }, - }); - - this.tabContext.on("tab-select", // eslint-disable-line mozilla/balanced-listeners - (evt, tab) => { this.updateWindow(tab.ownerGlobal); }); - - this.widget = widget; - }, - - /** - * Triggers this browser action for the given window, with the same effects as - * if it were clicked by a user. - * - * This has no effect if the browser action is disabled for, or not - * present in, the given window. - */ - triggerAction: Task.async(function* (window) { - let popup = ViewPopup.for(this.extension, window); - if (popup) { - popup.closePopup(); - return; - } - - let widget = this.widget.forWindow(window); - let tab = window.gBrowser.selectedTab; - - if (!widget || !this.getProperty(tab, "enabled")) { - return; - } - - // Popups are shown only if a popup URL is defined; otherwise - // a "click" event is dispatched. This is done for compatibility with the - // Google Chrome onClicked extension API. - if (this.getProperty(tab, "popup")) { - if (this.widget.areaType == CustomizableUI.TYPE_MENU_PANEL) { - yield window.PanelUI.show(); - } - - let event = new window.CustomEvent("command", {bubbles: true, cancelable: true}); - widget.node.dispatchEvent(event); - } else { - this.emit("click"); - } - }), - - handleEvent(event) { - let button = event.target; - let window = button.ownerDocument.defaultView; - - switch (event.type) { - case "mousedown": - if (event.button == 0) { - // Begin pre-loading the browser for the popup, so it's more likely to - // be ready by the time we get a complete click. - let tab = window.gBrowser.selectedTab; - let popupURL = this.getProperty(tab, "popup"); - let enabled = this.getProperty(tab, "enabled"); - - if (popupURL && enabled) { - // Add permission for the active tab so it will exist for the popup. - // Store the tab to revoke the permission during clearPopup. - if (!this.pendingPopup && !this.tabManager.hasActiveTabPermission(tab)) { - this.tabManager.addActiveTabPermission(tab); - this.tabToRevokeDuringClearPopup = tab; - } - - this.pendingPopup = this.getPopup(window, popupURL); - window.addEventListener("mouseup", this, true); - } else { - this.clearPopup(); - } - } - break; - - case "mouseup": - if (event.button == 0) { - this.clearPopupTimeout(); - // If we have a pending pre-loaded popup, cancel it after we've waited - // long enough that we can be relatively certain it won't be opening. - if (this.pendingPopup) { - let {node} = this.widget.forWindow(window); - if (isAncestorOrSelf(node, event.originalTarget)) { - this.pendingPopupTimeout = setTimeout(() => this.clearPopup(), - POPUP_PRELOAD_TIMEOUT_MS); - } else { - this.clearPopup(); - } - } - } - break; - } - }, - - /** - * Returns a potentially pre-loaded popup for the given URL in the given - * window. If a matching pre-load popup already exists, returns that. - * Otherwise, initializes a new one. - * - * If a pre-load popup exists which does not match, it is destroyed before a - * new one is created. - * - * @param {Window} window - * The browser window in which to create the popup. - * @param {string} popupURL - * The URL to load into the popup. - * @returns {ViewPopup} - */ - getPopup(window, popupURL) { - this.clearPopupTimeout(); - let {pendingPopup} = this; - this.pendingPopup = null; - - if (pendingPopup) { - if (pendingPopup.window === window && pendingPopup.popupURL === popupURL) { - return pendingPopup; - } - pendingPopup.destroy(); - } - - let fixedWidth = this.widget.areaType == CustomizableUI.TYPE_MENU_PANEL; - return new ViewPopup(this.extension, window, popupURL, this.browserStyle, fixedWidth); - }, - - /** - * Clears any pending pre-loaded popup and related timeouts. - */ - clearPopup() { - this.clearPopupTimeout(); - if (this.pendingPopup) { - if (this.tabToRevokeDuringClearPopup) { - this.tabManager.revokeActiveTabPermission(this.tabToRevokeDuringClearPopup); - this.tabToRevokeDuringClearPopup = null; - } - this.pendingPopup.destroy(); - this.pendingPopup = null; - } - }, - - /** - * Clears any pending timeouts to clear stale, pre-loaded popups. - */ - clearPopupTimeout() { - if (this.pendingPopup) { - this.pendingPopup.window.removeEventListener("mouseup", this, true); - } - - if (this.pendingPopupTimeout) { - clearTimeout(this.pendingPopupTimeout); - this.pendingPopupTimeout = null; - } - }, - - // Update the toolbar button |node| with the tab context data - // in |tabData|. - updateButton(node, tabData) { - let title = tabData.title || this.extension.name; - node.setAttribute("tooltiptext", title); - node.setAttribute("label", title); - - if (tabData.badgeText) { - node.setAttribute("badge", tabData.badgeText); - } else { - node.removeAttribute("badge"); - } - - if (tabData.enabled) { - node.removeAttribute("disabled"); - } else { - node.setAttribute("disabled", "true"); - } - - let badgeNode = node.ownerDocument.getAnonymousElementByAttribute(node, - "class", "toolbarbutton-badge"); - if (badgeNode) { - let color = tabData.badgeBackgroundColor; - if (color) { - color = `rgba(${color[0]}, ${color[1]}, ${color[2]}, ${color[3] / 255})`; - } - badgeNode.style.backgroundColor = color || ""; - } - - const LEGACY_CLASS = "toolbarbutton-legacy-addon"; - node.classList.remove(LEGACY_CLASS); - - let baseSize = 16; - let {icon, size} = IconDetails.getPreferredIcon(tabData.icon, this.extension, baseSize); - - // If the best available icon size is not divisible by 16, check if we have - // an 18px icon to fall back to, and trim off the padding instead. - if (size % 16 && !icon.endsWith(".svg")) { - let result = IconDetails.getPreferredIcon(tabData.icon, this.extension, 18); - - if (result.size % 18 == 0) { - baseSize = 18; - icon = result.icon; - node.classList.add(LEGACY_CLASS); - } - } - - // These URLs should already be properly escaped, but make doubly sure CSS - // string escape characters are escaped here, since they could lead to a - // sandbox break. - let escape = str => str.replace(/[\\\s"]/g, encodeURIComponent); - - let getIcon = size => escape(IconDetails.getPreferredIcon(tabData.icon, this.extension, size).icon); - - node.setAttribute("style", ` - --webextension-menupanel-image: url("${getIcon(32)}"); - --webextension-menupanel-image-2x: url("${getIcon(64)}"); - --webextension-toolbar-image: url("${escape(icon)}"); - --webextension-toolbar-image-2x: url("${getIcon(baseSize * 2)}"); - `); - }, - - // Update the toolbar button for a given window. - updateWindow(window) { - let widget = this.widget.forWindow(window); - if (widget) { - let tab = window.gBrowser.selectedTab; - this.updateButton(widget.node, this.tabContext.get(tab)); - } - }, - - // Update the toolbar button when the extension changes the icon, - // title, badge, etc. If it only changes a parameter for a single - // tab, |tab| will be that tab. Otherwise it will be null. - updateOnChange(tab) { - if (tab) { - if (tab.selected) { - this.updateWindow(tab.ownerGlobal); - } - } else { - for (let window of WindowListManager.browserWindows()) { - this.updateWindow(window); - } - } - }, - - // tab is allowed to be null. - // prop should be one of "icon", "title", "badgeText", "popup", or "badgeBackgroundColor". - setProperty(tab, prop, value) { - if (tab == null) { - this.defaults[prop] = value; - } else if (value != null) { - this.tabContext.get(tab)[prop] = value; - } else { - delete this.tabContext.get(tab)[prop]; - } - - this.updateOnChange(tab); - }, - - // tab is allowed to be null. - // prop should be one of "title", "badgeText", "popup", or "badgeBackgroundColor". - getProperty(tab, prop) { - if (tab == null) { - return this.defaults[prop]; - } - return this.tabContext.get(tab)[prop]; - }, - - shutdown() { - this.tabContext.shutdown(); - CustomizableUI.destroyWidget(this.id); - }, -}; - -BrowserAction.for = (extension) => { - return browserActionMap.get(extension); -}; - -global.browserActionFor = BrowserAction.for; - -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("manifest_browser_action", (type, directive, extension, manifest) => { - let browserAction = new BrowserAction(manifest.browser_action, extension); - browserAction.build(); - browserActionMap.set(extension, browserAction); -}); - -extensions.on("shutdown", (type, extension) => { - if (browserActionMap.has(extension)) { - browserActionMap.get(extension).shutdown(); - browserActionMap.delete(extension); - } -}); -/* eslint-enable mozilla/balanced-listeners */ - -extensions.registerSchemaAPI("browserAction", "addon_parent", context => { - let {extension} = context; - return { - browserAction: { - onClicked: new EventManager(context, "browserAction.onClicked", fire => { - let listener = () => { - let tab = TabManager.activeTab; - fire(TabManager.convert(extension, tab)); - }; - BrowserAction.for(extension).on("click", listener); - return () => { - BrowserAction.for(extension).off("click", listener); - }; - }).api(), - - enable: function(tabId) { - let tab = tabId !== null ? TabManager.getTab(tabId, context) : null; - BrowserAction.for(extension).setProperty(tab, "enabled", true); - }, - - disable: function(tabId) { - let tab = tabId !== null ? TabManager.getTab(tabId, context) : null; - BrowserAction.for(extension).setProperty(tab, "enabled", false); - }, - - setTitle: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - let title = details.title; - // Clear the tab-specific title when given a null string. - if (tab && title == "") { - title = null; - } - BrowserAction.for(extension).setProperty(tab, "title", title); - }, - - getTitle: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - let title = BrowserAction.for(extension).getProperty(tab, "title"); - return Promise.resolve(title); - }, - - setIcon: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - let icon = IconDetails.normalize(details, extension, context); - BrowserAction.for(extension).setProperty(tab, "icon", icon); - }, - - setBadgeText: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - BrowserAction.for(extension).setProperty(tab, "badgeText", details.text); - }, - - getBadgeText: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - let text = BrowserAction.for(extension).getProperty(tab, "badgeText"); - return Promise.resolve(text); - }, - - setPopup: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - // Note: Chrome resolves arguments to setIcon relative to the calling - // context, but resolves arguments to setPopup relative to the extension - // root. - // For internal consistency, we currently resolve both relative to the - // calling context. - let url = details.popup && context.uri.resolve(details.popup); - if (url && !context.checkLoadURL(url)) { - return Promise.reject({message: `Access denied for URL ${url}`}); - } - BrowserAction.for(extension).setProperty(tab, "popup", url); - }, - - getPopup: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - let popup = BrowserAction.for(extension).getProperty(tab, "popup"); - return Promise.resolve(popup); - }, - - setBadgeBackgroundColor: function(details) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - let color = details.color; - if (!Array.isArray(color)) { - let col = DOMUtils.colorToRGBA(color); - color = col && [col.r, col.g, col.b, Math.round(col.a * 255)]; - } - BrowserAction.for(extension).setProperty(tab, "badgeBackgroundColor", color); - }, - - getBadgeBackgroundColor: function(details, callback) { - let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; - - let color = BrowserAction.for(extension).getProperty(tab, "badgeBackgroundColor"); - return Promise.resolve(color || [0xd9, 0, 0, 255]); - }, - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-c-contextMenus.js b/application/basilisk/components/webextensions/ext-c-contextMenus.js deleted file mode 100644 index 9fde90808..000000000 --- a/application/basilisk/components/webextensions/ext-c-contextMenus.js +++ /dev/null @@ -1,158 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -// If id is not specified for an item we use an integer. -// This ID need only be unique within a single addon. Since all addon code that -// can use this API runs in the same process, this local variable suffices. -var gNextMenuItemID = 0; - -// Map[Extension -> Map[string or id, ContextMenusClickPropHandler]] -var gPropHandlers = new Map(); - -// The contextMenus API supports an "onclick" attribute in the create/update -// methods to register a callback. This class manages these onclick properties. -class ContextMenusClickPropHandler { - constructor(context) { - this.context = context; - // Map[string or integer -> callback] - this.onclickMap = new Map(); - this.dispatchEvent = this.dispatchEvent.bind(this); - } - - // A listener on contextMenus.onClicked that forwards the event to the only - // listener, if any. - dispatchEvent(info, tab) { - let onclick = this.onclickMap.get(info.menuItemId); - if (onclick) { - // No need for runSafe or anything because we are already being run inside - // an event handler -- the event is just being forwarded to the actual - // handler. - onclick(info, tab); - } - } - - // Sets the `onclick` handler for the given menu item. - // The `onclick` function MUST be owned by `this.context`. - setListener(id, onclick) { - if (this.onclickMap.size === 0) { - this.context.childManager.getParentEvent("contextMenus.onClicked").addListener(this.dispatchEvent); - this.context.callOnClose(this); - } - this.onclickMap.set(id, onclick); - - let propHandlerMap = gPropHandlers.get(this.context.extension); - if (!propHandlerMap) { - propHandlerMap = new Map(); - } else { - // If the current callback was created in a different context, remove it - // from the other context. - let propHandler = propHandlerMap.get(id); - if (propHandler && propHandler !== this) { - propHandler.unsetListener(id); - } - } - propHandlerMap.set(id, this); - gPropHandlers.set(this.context.extension, propHandlerMap); - } - - // Deletes the `onclick` handler for the given menu item. - // The `onclick` function MUST be owned by `this.context`. - unsetListener(id) { - if (!this.onclickMap.delete(id)) { - return; - } - if (this.onclickMap.size === 0) { - this.context.childManager.getParentEvent("contextMenus.onClicked").removeListener(this.dispatchEvent); - this.context.forgetOnClose(this); - } - let propHandlerMap = gPropHandlers.get(this.context.extension); - propHandlerMap.delete(id); - if (propHandlerMap.size === 0) { - gPropHandlers.delete(this.context.extension); - } - } - - // Deletes the `onclick` handler for the given menu item, if any, regardless - // of the context where it was created. - unsetListenerFromAnyContext(id) { - let propHandlerMap = gPropHandlers.get(this.context.extension); - let propHandler = propHandlerMap && propHandlerMap.get(id); - if (propHandler) { - propHandler.unsetListener(id); - } - } - - // Remove all `onclick` handlers of the extension. - deleteAllListenersFromExtension() { - let propHandlerMap = gPropHandlers.get(this.context.extension); - if (propHandlerMap) { - for (let [id, propHandler] of propHandlerMap) { - propHandler.unsetListener(id); - } - } - } - - // Removes all `onclick` handlers from this context. - close() { - for (let id of this.onclickMap.keys()) { - this.unsetListener(id); - } - } -} - -extensions.registerSchemaAPI("contextMenus", "addon_child", context => { - let onClickedProp = new ContextMenusClickPropHandler(context); - - return { - contextMenus: { - create(createProperties, callback) { - if (createProperties.id === null) { - createProperties.id = ++gNextMenuItemID; - } - let {onclick} = createProperties; - delete createProperties.onclick; - context.childManager.callParentAsyncFunction("contextMenus.createInternal", [ - createProperties, - ]).then(() => { - if (onclick) { - onClickedProp.setListener(createProperties.id, onclick); - } - if (callback) { - callback(); - } - }); - return createProperties.id; - }, - - update(id, updateProperties) { - let {onclick} = updateProperties; - delete updateProperties.onclick; - return context.childManager.callParentAsyncFunction("contextMenus.update", [ - id, - updateProperties, - ]).then(() => { - if (onclick) { - onClickedProp.setListener(id, onclick); - } else if (onclick === null) { - onClickedProp.unsetListenerFromAnyContext(id); - } - // else onclick is not set so it should not be changed. - }); - }, - - remove(id) { - onClickedProp.unsetListenerFromAnyContext(id); - return context.childManager.callParentAsyncFunction("contextMenus.remove", [ - id, - ]); - }, - - removeAll() { - onClickedProp.deleteAllListenersFromExtension(); - - return context.childManager.callParentAsyncFunction("contextMenus.removeAll", []); - }, - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-c-omnibox.js b/application/basilisk/components/webextensions/ext-c-omnibox.js deleted file mode 100644 index 3b9b6e2f7..000000000 --- a/application/basilisk/components/webextensions/ext-c-omnibox.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); - -var { - runSafeSyncWithoutClone, - SingletonEventManager, -} = ExtensionUtils; - -extensions.registerSchemaAPI("omnibox", "addon_child", context => { - return { - omnibox: { - onInputChanged: new SingletonEventManager(context, "omnibox.onInputChanged", fire => { - let listener = (text, id) => { - runSafeSyncWithoutClone(fire, text, suggestions => { - // TODO: Switch to using callParentFunctionNoReturn once bug 1314903 is fixed. - context.childManager.callParentAsyncFunction("omnibox_internal.addSuggestions", [ - id, - suggestions, - ]); - }); - }; - context.childManager.getParentEvent("omnibox_internal.onInputChanged").addListener(listener); - return () => { - context.childManager.getParentEvent("omnibox_internal.onInputChanged").removeListener(listener); - }; - }).api(), - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-c-tabs.js b/application/basilisk/components/webextensions/ext-c-tabs.js deleted file mode 100644 index d5ce9fbf9..000000000 --- a/application/basilisk/components/webextensions/ext-c-tabs.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -extensions.registerSchemaAPI("tabs", "addon_child", context => { - return { - tabs: { - connect: function(tabId, connectInfo) { - let name = ""; - if (connectInfo && connectInfo.name !== null) { - name = connectInfo.name; - } - let recipient = { - extensionId: context.extension.id, - tabId, - }; - if (connectInfo && connectInfo.frameId !== null) { - recipient.frameId = connectInfo.frameId; - } - return context.messenger.connect(context.messageManager, name, recipient); - }, - - sendMessage: function(tabId, message, options, responseCallback) { - let recipient = { - extensionId: context.extension.id, - tabId: tabId, - }; - if (options && options.frameId !== null) { - recipient.frameId = options.frameId; - } - return context.messenger.sendMessage(context.messageManager, message, recipient, responseCallback); - }, - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-commands.js b/application/basilisk/components/webextensions/ext-commands.js deleted file mode 100644 index b6e7ab3d1..000000000 --- a/application/basilisk/components/webextensions/ext-commands.js +++ /dev/null @@ -1,264 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -Cu.import("resource://devtools/shared/event-emitter.js"); -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); - -var { - EventManager, - PlatformInfo, -} = ExtensionUtils; - -const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; - -// WeakMap[Extension -> CommandList] -var commandsMap = new WeakMap(); - -function CommandList(manifest, extension) { - this.extension = extension; - this.id = makeWidgetId(extension.id); - this.windowOpenListener = null; - - // Map[{String} commandName -> {Object} commandProperties] - this.commands = this.loadCommandsFromManifest(manifest); - - // WeakMap[Window -> <xul:keyset>] - this.keysetsMap = new WeakMap(); - - this.register(); - EventEmitter.decorate(this); -} - -CommandList.prototype = { - /** - * Registers the commands to all open windows and to any which - * are later created. - */ - register() { - for (let window of WindowListManager.browserWindows()) { - this.registerKeysToDocument(window); - } - - this.windowOpenListener = (window) => { - if (!this.keysetsMap.has(window)) { - this.registerKeysToDocument(window); - } - }; - - WindowListManager.addOpenListener(this.windowOpenListener); - }, - - /** - * Unregisters the commands from all open windows and stops commands - * from being registered to windows which are later created. - */ - unregister() { - for (let window of WindowListManager.browserWindows()) { - if (this.keysetsMap.has(window)) { - this.keysetsMap.get(window).remove(); - } - } - - WindowListManager.removeOpenListener(this.windowOpenListener); - }, - - /** - * Creates a Map from commands for each command in the manifest.commands object. - * - * @param {Object} manifest The manifest JSON object. - * @returns {Map<string, object>} - */ - loadCommandsFromManifest(manifest) { - let commands = new Map(); - // For Windows, chrome.runtime expects 'win' while chrome.commands - // expects 'windows'. We can special case this for now. - let os = PlatformInfo.os == "win" ? "windows" : PlatformInfo.os; - for (let [name, command] of Object.entries(manifest.commands)) { - let suggested_key = command.suggested_key || {}; - let shortcut = suggested_key[os] || suggested_key.default; - shortcut = shortcut ? shortcut.replace(/\s+/g, "") : null; - commands.set(name, { - description: command.description, - shortcut, - }); - } - return commands; - }, - - /** - * Registers the commands to a document. - * @param {ChromeWindow} window The XUL window to insert the Keyset. - */ - registerKeysToDocument(window) { - let doc = window.document; - let keyset = doc.createElementNS(XUL_NS, "keyset"); - keyset.id = `ext-keyset-id-${this.id}`; - this.commands.forEach((command, name) => { - if (command.shortcut) { - let keyElement = this.buildKey(doc, name, command.shortcut); - keyset.appendChild(keyElement); - } - }); - doc.documentElement.appendChild(keyset); - this.keysetsMap.set(window, keyset); - }, - - /** - * Builds a XUL Key element and attaches an onCommand listener which - * emits a command event with the provided name when fired. - * - * @param {Document} doc The XUL document. - * @param {string} name The name of the command. - * @param {string} shortcut The shortcut provided in the manifest. - * @see https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/key - * - * @returns {Document} The newly created Key element. - */ - buildKey(doc, name, shortcut) { - let keyElement = this.buildKeyFromShortcut(doc, shortcut); - - // We need to have the attribute "oncommand" for the "command" listener to fire, - // and it is currently ignored when set to the empty string. - keyElement.setAttribute("oncommand", "//"); - - /* eslint-disable mozilla/balanced-listeners */ - // We remove all references to the key elements when the extension is shutdown, - // therefore the listeners for these elements will be garbage collected. - keyElement.addEventListener("command", (event) => { - if (name == "_execute_page_action") { - let win = event.target.ownerDocument.defaultView; - pageActionFor(this.extension).triggerAction(win); - } else if (name == "_execute_browser_action") { - let win = event.target.ownerDocument.defaultView; - browserActionFor(this.extension).triggerAction(win); - } else { - TabManager.for(this.extension) - .addActiveTabPermission(TabManager.activeTab); - this.emit("command", name); - } - }); - /* eslint-enable mozilla/balanced-listeners */ - - return keyElement; - }, - - /** - * Builds a XUL Key element from the provided shortcut. - * - * @param {Document} doc The XUL document. - * @param {string} shortcut The shortcut provided in the manifest. - * - * @see https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/key - * @returns {Document} The newly created Key element. - */ - buildKeyFromShortcut(doc, shortcut) { - let keyElement = doc.createElementNS(XUL_NS, "key"); - - let parts = shortcut.split("+"); - - // The key is always the last element. - let chromeKey = parts.pop(); - - // The modifiers are the remaining elements. - keyElement.setAttribute("modifiers", this.getModifiersAttribute(parts)); - - if (/^[A-Z]$/.test(chromeKey)) { - // We use the key attribute for all single digits and characters. - keyElement.setAttribute("key", chromeKey); - } else { - keyElement.setAttribute("keycode", this.getKeycodeAttribute(chromeKey)); - keyElement.setAttribute("event", "keydown"); - } - - return keyElement; - }, - - /** - * Determines the corresponding XUL keycode from the given chrome key. - * - * For example: - * - * input | output - * --------------------------------------- - * "PageUP" | "VK_PAGE_UP" - * "Delete" | "VK_DELETE" - * - * @param {string} chromeKey The chrome key (e.g. "PageUp", "Space", ...) - * @returns {string} The constructed value for the Key's 'keycode' attribute. - */ - getKeycodeAttribute(chromeKey) { - if (/[0-9]/.test(chromeKey)) { - return `VK_${chromeKey}`; - } - return `VK${chromeKey.replace(/([A-Z])/g, "_$&").toUpperCase()}`; - }, - - /** - * Determines the corresponding XUL modifiers from the chrome modifiers. - * - * For example: - * - * input | output - * --------------------------------------- - * ["Ctrl", "Shift"] | "accel shift" - * ["MacCtrl"] | "control" - * - * @param {Array} chromeModifiers The array of chrome modifiers. - * @returns {string} The constructed value for the Key's 'modifiers' attribute. - */ - getModifiersAttribute(chromeModifiers) { - let modifiersMap = { - "Alt": "alt", - "Command": "accel", - "Ctrl": "accel", - "MacCtrl": "control", - "Shift": "shift", - }; - return Array.from(chromeModifiers, modifier => { - return modifiersMap[modifier]; - }).join(" "); - }, -}; - - -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("manifest_commands", (type, directive, extension, manifest) => { - commandsMap.set(extension, new CommandList(manifest, extension)); -}); - -extensions.on("shutdown", (type, extension) => { - let commandsList = commandsMap.get(extension); - if (commandsList) { - commandsList.unregister(); - commandsMap.delete(extension); - } -}); -/* eslint-enable mozilla/balanced-listeners */ - -extensions.registerSchemaAPI("commands", "addon_parent", context => { - let {extension} = context; - return { - commands: { - getAll() { - let commands = commandsMap.get(extension).commands; - return Promise.resolve(Array.from(commands, ([name, command]) => { - return ({ - name, - description: command.description, - shortcut: command.shortcut, - }); - })); - }, - onCommand: new EventManager(context, "commands.onCommand", fire => { - let listener = (eventName, commandName) => { - fire(commandName); - }; - commandsMap.get(extension).on("command", listener); - return () => { - commandsMap.get(extension).off("command", listener); - }; - }).api(), - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-contextMenus.js b/application/basilisk/components/webextensions/ext-contextMenus.js deleted file mode 100644 index b3bf8aa53..000000000 --- a/application/basilisk/components/webextensions/ext-contextMenus.js +++ /dev/null @@ -1,537 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -Cu.import("resource://gre/modules/MatchPattern.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -var { - EventManager, - ExtensionError, - IconDetails, -} = ExtensionUtils; - -// Map[Extension -> Map[ID -> MenuItem]] -// Note: we want to enumerate all the menu items so -// this cannot be a weak map. -var gContextMenuMap = new Map(); - -// Map[Extension -> MenuItem] -var gRootItems = new Map(); - -// If id is not specified for an item we use an integer. -var gNextMenuItemID = 0; - -// Used to assign unique names to radio groups. -var gNextRadioGroupID = 0; - -// The max length of a menu item's label. -var gMaxLabelLength = 64; - -// When a new contextMenu is opened, this function is called and -// we populate the |xulMenu| with all the items from extensions -// to be displayed. We always clear all the items again when -// popuphidden fires. -var gMenuBuilder = { - build: function(contextData) { - let xulMenu = contextData.menu; - xulMenu.addEventListener("popuphidden", this); - this.xulMenu = xulMenu; - for (let [, root] of gRootItems) { - let rootElement = this.buildElementWithChildren(root, contextData); - if (!rootElement.firstChild || !rootElement.firstChild.childNodes.length) { - // If the root has no visible children, there is no reason to show - // the root menu item itself either. - continue; - } - rootElement.setAttribute("ext-type", "top-level-menu"); - rootElement = this.removeTopLevelMenuIfNeeded(rootElement); - - // Display the extension icon on the root element. - if (root.extension.manifest.icons) { - let parentWindow = contextData.menu.ownerGlobal; - let extension = root.extension; - - let {icon} = IconDetails.getPreferredIcon(extension.manifest.icons, extension, - 16 * parentWindow.devicePixelRatio); - - // The extension icons in the manifest are not pre-resolved, since - // they're sometimes used by the add-on manager when the extension is - // not enabled, and its URLs are not resolvable. - let resolvedURL = root.extension.baseURI.resolve(icon); - - if (rootElement.localName == "menu") { - rootElement.setAttribute("class", "menu-iconic"); - } else if (rootElement.localName == "menuitem") { - rootElement.setAttribute("class", "menuitem-iconic"); - } - rootElement.setAttribute("image", resolvedURL); - } - - xulMenu.appendChild(rootElement); - this.itemsToCleanUp.add(rootElement); - } - }, - - buildElementWithChildren(item, contextData) { - let element = this.buildSingleElement(item, contextData); - let groupName; - for (let child of item.children) { - if (child.type == "radio" && !child.groupName) { - if (!groupName) { - groupName = `webext-radio-group-${gNextRadioGroupID++}`; - } - child.groupName = groupName; - } else { - groupName = null; - } - - if (child.enabledForContext(contextData)) { - let childElement = this.buildElementWithChildren(child, contextData); - // Here element must be a menu element and its first child - // is a menupopup, we have to append its children to this - // menupopup. - element.firstChild.appendChild(childElement); - } - } - - return element; - }, - - removeTopLevelMenuIfNeeded(element) { - // If there is only one visible top level element we don't need the - // root menu element for the extension. - let menuPopup = element.firstChild; - if (menuPopup && menuPopup.childNodes.length == 1) { - let onlyChild = menuPopup.firstChild; - onlyChild.remove(); - return onlyChild; - } - - return element; - }, - - buildSingleElement(item, contextData) { - let doc = contextData.menu.ownerDocument; - let element; - if (item.children.length > 0) { - element = this.createMenuElement(doc, item); - } else if (item.type == "separator") { - element = doc.createElement("menuseparator"); - } else { - element = doc.createElement("menuitem"); - } - - return this.customizeElement(element, item, contextData); - }, - - createMenuElement(doc, item) { - let element = doc.createElement("menu"); - // Menu elements need to have a menupopup child for its menu items. - let menupopup = doc.createElement("menupopup"); - element.appendChild(menupopup); - return element; - }, - - customizeElement(element, item, contextData) { - let label = item.title; - if (label) { - if (contextData.isTextSelected && label.indexOf("%s") > -1) { - let selection = contextData.selectionText; - // The rendering engine will truncate the title if it's longer than 64 characters. - // But if it makes sense let's try truncate selection text only, to handle cases like - // 'look up "%s" in MyDictionary' more elegantly. - let maxSelectionLength = gMaxLabelLength - label.length + 2; - if (maxSelectionLength > 4) { - selection = selection.substring(0, maxSelectionLength - 3) + "..."; - } - label = label.replace(/%s/g, selection); - } - - element.setAttribute("label", label); - } - - if (item.type == "checkbox") { - element.setAttribute("type", "checkbox"); - if (item.checked) { - element.setAttribute("checked", "true"); - } - } else if (item.type == "radio") { - element.setAttribute("type", "radio"); - element.setAttribute("name", item.groupName); - if (item.checked) { - element.setAttribute("checked", "true"); - } - } - - if (!item.enabled) { - element.setAttribute("disabled", "true"); - } - - element.addEventListener("command", event => { // eslint-disable-line mozilla/balanced-listeners - if (event.target !== event.currentTarget) { - return; - } - const wasChecked = item.checked; - if (item.type == "checkbox") { - item.checked = !item.checked; - } else if (item.type == "radio") { - // Deselect all radio items in the current radio group. - for (let child of item.parent.children) { - if (child.type == "radio" && child.groupName == item.groupName) { - child.checked = false; - } - } - // Select the clicked radio item. - item.checked = true; - } - - item.tabManager.addActiveTabPermission(); - - let tab = item.tabManager.convert(contextData.tab); - let info = item.getClickInfo(contextData, wasChecked); - item.extension.emit("webext-contextmenu-menuitem-click", info, tab); - }); - - return element; - }, - - handleEvent: function(event) { - if (this.xulMenu != event.target || event.type != "popuphidden") { - return; - } - - delete this.xulMenu; - let target = event.target; - target.removeEventListener("popuphidden", this); - for (let item of this.itemsToCleanUp) { - item.remove(); - } - this.itemsToCleanUp.clear(); - }, - - itemsToCleanUp: new Set(), -}; - -function contextMenuObserver(subject, topic, data) { - subject = subject.wrappedJSObject; - gMenuBuilder.build(subject); -} - -function getContexts(contextData) { - let contexts = new Set(["all"]); - - if (contextData.inFrame) { - contexts.add("frame"); - } - - if (contextData.isTextSelected) { - contexts.add("selection"); - } - - if (contextData.onLink) { - contexts.add("link"); - } - - if (contextData.onEditableArea) { - contexts.add("editable"); - } - - if (contextData.onImage) { - contexts.add("image"); - } - - if (contextData.onVideo) { - contexts.add("video"); - } - - if (contextData.onAudio) { - contexts.add("audio"); - } - - if (contexts.size == 1) { - contexts.add("page"); - } - - return contexts; -} - -function MenuItem(extension, createProperties, isRoot = false) { - this.extension = extension; - this.children = []; - this.parent = null; - this.tabManager = TabManager.for(extension); - - this.setDefaults(); - this.setProps(createProperties); - if (!this.hasOwnProperty("_id")) { - this.id = gNextMenuItemID++; - } - // If the item is not the root and has no parent - // it must be a child of the root. - if (!isRoot && !this.parent) { - this.root.addChild(this); - } -} - -MenuItem.prototype = { - setProps(createProperties) { - for (let propName in createProperties) { - if (createProperties[propName] === null) { - // Omitted optional argument. - continue; - } - this[propName] = createProperties[propName]; - } - - if (createProperties.documentUrlPatterns != null) { - this.documentUrlMatchPattern = new MatchPattern(this.documentUrlPatterns); - } - - if (createProperties.targetUrlPatterns != null) { - this.targetUrlMatchPattern = new MatchPattern(this.targetUrlPatterns); - } - }, - - setDefaults() { - this.setProps({ - type: "normal", - checked: false, - contexts: ["all"], - enabled: true, - }); - }, - - set id(id) { - if (this.hasOwnProperty("_id")) { - throw new Error("Id of a MenuItem cannot be changed"); - } - let isIdUsed = gContextMenuMap.get(this.extension).has(id); - if (isIdUsed) { - throw new Error("Id already exists"); - } - this._id = id; - }, - - get id() { - return this._id; - }, - - ensureValidParentId(parentId) { - if (parentId === undefined) { - return; - } - let menuMap = gContextMenuMap.get(this.extension); - if (!menuMap.has(parentId)) { - throw new Error("Could not find any MenuItem with id: " + parentId); - } - for (let item = menuMap.get(parentId); item; item = item.parent) { - if (item === this) { - throw new ExtensionError("MenuItem cannot be an ancestor (or self) of its new parent."); - } - } - }, - - set parentId(parentId) { - this.ensureValidParentId(parentId); - - if (this.parent) { - this.parent.detachChild(this); - } - - if (parentId === undefined) { - this.root.addChild(this); - } else { - let menuMap = gContextMenuMap.get(this.extension); - menuMap.get(parentId).addChild(this); - } - }, - - get parentId() { - return this.parent ? this.parent.id : undefined; - }, - - addChild(child) { - if (child.parent) { - throw new Error("Child MenuItem already has a parent."); - } - this.children.push(child); - child.parent = this; - }, - - detachChild(child) { - let idx = this.children.indexOf(child); - if (idx < 0) { - throw new Error("Child MenuItem not found, it cannot be removed."); - } - this.children.splice(idx, 1); - child.parent = null; - }, - - get root() { - let extension = this.extension; - if (!gRootItems.has(extension)) { - let root = new MenuItem(extension, - {title: extension.name}, - /* isRoot = */ true); - gRootItems.set(extension, root); - } - - return gRootItems.get(extension); - }, - - remove() { - if (this.parent) { - this.parent.detachChild(this); - } - let children = this.children.slice(0); - for (let child of children) { - child.remove(); - } - - let menuMap = gContextMenuMap.get(this.extension); - menuMap.delete(this.id); - if (this.root == this) { - gRootItems.delete(this.extension); - } - }, - - getClickInfo(contextData, wasChecked) { - let mediaType; - if (contextData.onVideo) { - mediaType = "video"; - } - if (contextData.onAudio) { - mediaType = "audio"; - } - if (contextData.onImage) { - mediaType = "image"; - } - - let info = { - menuItemId: this.id, - editable: contextData.onEditableArea, - }; - - function setIfDefined(argName, value) { - if (value !== undefined) { - info[argName] = value; - } - } - - setIfDefined("parentMenuItemId", this.parentId); - setIfDefined("mediaType", mediaType); - setIfDefined("linkUrl", contextData.linkUrl); - setIfDefined("srcUrl", contextData.srcUrl); - setIfDefined("pageUrl", contextData.pageUrl); - setIfDefined("frameUrl", contextData.frameUrl); - setIfDefined("selectionText", contextData.selectionText); - - if ((this.type === "checkbox") || (this.type === "radio")) { - info.checked = this.checked; - info.wasChecked = wasChecked; - } - - return info; - }, - - enabledForContext(contextData) { - let contexts = getContexts(contextData); - if (!this.contexts.some(n => contexts.has(n))) { - return false; - } - - let docPattern = this.documentUrlMatchPattern; - let pageURI = Services.io.newURI(contextData.pageUrl, null, null); - if (docPattern && !docPattern.matches(pageURI)) { - return false; - } - - let targetPattern = this.targetUrlMatchPattern; - if (targetPattern) { - let targetUrls = []; - if (contextData.onImage || contextData.onAudio || contextData.onVideo) { - // TODO: double check if srcUrl is always set when we need it - targetUrls.push(contextData.srcUrl); - } - if (contextData.onLink) { - targetUrls.push(contextData.linkUrl); - } - if (!targetUrls.some(targetUrl => targetPattern.matches(NetUtil.newURI(targetUrl)))) { - return false; - } - } - - return true; - }, -}; - -var gExtensionCount = 0; -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("startup", (type, extension) => { - gContextMenuMap.set(extension, new Map()); - if (++gExtensionCount == 1) { - Services.obs.addObserver(contextMenuObserver, - "on-build-contextmenu", - false); - } -}); - -extensions.on("shutdown", (type, extension) => { - gContextMenuMap.delete(extension); - gRootItems.delete(extension); - if (--gExtensionCount == 0) { - Services.obs.removeObserver(contextMenuObserver, - "on-build-contextmenu"); - } -}); -/* eslint-enable mozilla/balanced-listeners */ - -extensions.registerSchemaAPI("contextMenus", "addon_parent", context => { - let {extension} = context; - return { - contextMenus: { - createInternal: function(createProperties) { - // Note that the id is required by the schema. If the addon did not set - // it, the implementation of contextMenus.create in the child should - // have added it. - let menuItem = new MenuItem(extension, createProperties); - gContextMenuMap.get(extension).set(menuItem.id, menuItem); - }, - - update: function(id, updateProperties) { - let menuItem = gContextMenuMap.get(extension).get(id); - if (menuItem) { - menuItem.setProps(updateProperties); - } - }, - - remove: function(id) { - let menuItem = gContextMenuMap.get(extension).get(id); - if (menuItem) { - menuItem.remove(); - } - }, - - removeAll: function() { - let root = gRootItems.get(extension); - if (root) { - root.remove(); - } - }, - - onClicked: new EventManager(context, "contextMenus.onClicked", fire => { - let listener = (event, info, tab) => { - fire(info, tab); - }; - - extension.on("webext-contextmenu-menuitem-click", listener); - return () => { - extension.off("webext-contextmenu-menuitem-click", listener); - }; - }).api(), - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-desktop-runtime.js b/application/basilisk/components/webextensions/ext-desktop-runtime.js deleted file mode 100644 index 0fdb45562..000000000 --- a/application/basilisk/components/webextensions/ext-desktop-runtime.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("uninstall", (msg, extension) => { - if (extension.uninstallURL) { - let browser = WindowManager.topWindow.gBrowser; - browser.addTab(extension.uninstallURL, {relatedToCurrent: true}); - } -}); - -global.openOptionsPage = (extension) => { - let window = WindowManager.topWindow; - if (!window) { - return Promise.reject({message: "No browser window available"}); - } - - if (extension.manifest.options_ui.open_in_tab) { - window.switchToTabHavingURI(extension.manifest.options_ui.page, true); - return Promise.resolve(); - } - - let viewId = `addons://detail/${encodeURIComponent(extension.id)}/preferences`; - - return window.BrowserOpenAddonsMgr(viewId); -}; - diff --git a/application/basilisk/components/webextensions/ext-history.js b/application/basilisk/components/webextensions/ext-history.js deleted file mode 100644 index a47df1621..000000000 --- a/application/basilisk/components/webextensions/ext-history.js +++ /dev/null @@ -1,246 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -const {classes: Cc, interfaces: Ci, utils: Cu} = Components; - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter", - "resource://devtools/shared/event-emitter.js"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); - -const { - normalizeTime, - SingletonEventManager, -} = ExtensionUtils; - -let nsINavHistoryService = Ci.nsINavHistoryService; -const TRANSITION_TO_TRANSITION_TYPES_MAP = new Map([ - ["link", nsINavHistoryService.TRANSITION_LINK], - ["typed", nsINavHistoryService.TRANSITION_TYPED], - ["auto_bookmark", nsINavHistoryService.TRANSITION_BOOKMARK], - ["auto_subframe", nsINavHistoryService.TRANSITION_EMBED], - ["manual_subframe", nsINavHistoryService.TRANSITION_FRAMED_LINK], -]); - -let TRANSITION_TYPE_TO_TRANSITIONS_MAP = new Map(); -for (let [transition, transitionType] of TRANSITION_TO_TRANSITION_TYPES_MAP) { - TRANSITION_TYPE_TO_TRANSITIONS_MAP.set(transitionType, transition); -} - -function getTransitionType(transition) { - // cannot set a default value for the transition argument as the framework sets it to null - transition = transition || "link"; - let transitionType = TRANSITION_TO_TRANSITION_TYPES_MAP.get(transition); - if (!transitionType) { - throw new Error(`|${transition}| is not a supported transition for history`); - } - return transitionType; -} - -function getTransition(transitionType) { - return TRANSITION_TYPE_TO_TRANSITIONS_MAP.get(transitionType) || "link"; -} - -/* - * Converts a nsINavHistoryResultNode into a HistoryItem - * - * https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavHistoryResultNode - */ -function convertNodeToHistoryItem(node) { - return { - id: node.pageGuid, - url: node.uri, - title: node.title, - lastVisitTime: PlacesUtils.toDate(node.time).getTime(), - visitCount: node.accessCount, - }; -} - -/* - * Converts a nsINavHistoryResultNode into a VisitItem - * - * https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavHistoryResultNode - */ -function convertNodeToVisitItem(node) { - return { - id: node.pageGuid, - visitId: node.visitId, - visitTime: PlacesUtils.toDate(node.time).getTime(), - referringVisitId: node.fromVisitId, - transition: getTransition(node.visitType), - }; -} - -/* - * Converts a nsINavHistoryContainerResultNode into an array of objects - * - * https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavHistoryContainerResultNode - */ -function convertNavHistoryContainerResultNode(container, converter) { - let results = []; - container.containerOpen = true; - for (let i = 0; i < container.childCount; i++) { - let node = container.getChild(i); - results.push(converter(node)); - } - container.containerOpen = false; - return results; -} - -var _observer; - -function getObserver() { - if (!_observer) { - _observer = { - onDeleteURI: function(uri, guid, reason) { - this.emit("visitRemoved", {allHistory: false, urls: [uri.spec]}); - }, - onVisit: function(uri, visitId, time, sessionId, referringId, transitionType, guid, hidden, visitCount, typed) { - let data = { - id: guid, - url: uri.spec, - title: "", - lastVisitTime: time / 1000, // time from Places is microseconds, - visitCount, - typedCount: typed, - }; - this.emit("visited", data); - }, - onBeginUpdateBatch: function() {}, - onEndUpdateBatch: function() {}, - onTitleChanged: function() {}, - onClearHistory: function() { - this.emit("visitRemoved", {allHistory: true, urls: []}); - }, - onPageChanged: function() {}, - onFrecencyChanged: function() {}, - onManyFrecenciesChanged: function() {}, - onDeleteVisits: function(uri, time, guid, reason) { - this.emit("visitRemoved", {allHistory: false, urls: [uri.spec]}); - }, - }; - EventEmitter.decorate(_observer); - PlacesUtils.history.addObserver(_observer, false); - } - return _observer; -} - -extensions.registerSchemaAPI("history", "addon_parent", context => { - return { - history: { - addUrl: function(details) { - let transition, date; - try { - transition = getTransitionType(details.transition); - } catch (error) { - return Promise.reject({message: error.message}); - } - if (details.visitTime) { - date = normalizeTime(details.visitTime); - } - let pageInfo = { - title: details.title, - url: details.url, - visits: [ - { - transition, - date, - }, - ], - }; - try { - return PlacesUtils.history.insert(pageInfo).then(() => undefined); - } catch (error) { - return Promise.reject({message: error.message}); - } - }, - - deleteAll: function() { - return PlacesUtils.history.clear(); - }, - - deleteRange: function(filter) { - let newFilter = { - beginDate: normalizeTime(filter.startTime), - endDate: normalizeTime(filter.endTime), - }; - // History.removeVisitsByFilter returns a boolean, but our API should return nothing - return PlacesUtils.history.removeVisitsByFilter(newFilter).then(() => undefined); - }, - - deleteUrl: function(details) { - let url = details.url; - // History.remove returns a boolean, but our API should return nothing - return PlacesUtils.history.remove(url).then(() => undefined); - }, - - search: function(query) { - let beginTime = (query.startTime == null) ? - PlacesUtils.toPRTime(Date.now() - 24 * 60 * 60 * 1000) : - PlacesUtils.toPRTime(normalizeTime(query.startTime)); - let endTime = (query.endTime == null) ? - Number.MAX_VALUE : - PlacesUtils.toPRTime(normalizeTime(query.endTime)); - if (beginTime > endTime) { - return Promise.reject({message: "The startTime cannot be after the endTime"}); - } - - let options = PlacesUtils.history.getNewQueryOptions(); - options.sortingMode = options.SORT_BY_DATE_DESCENDING; - options.maxResults = query.maxResults || 100; - - let historyQuery = PlacesUtils.history.getNewQuery(); - historyQuery.searchTerms = query.text; - historyQuery.beginTime = beginTime; - historyQuery.endTime = endTime; - let queryResult = PlacesUtils.history.executeQuery(historyQuery, options).root; - let results = convertNavHistoryContainerResultNode(queryResult, convertNodeToHistoryItem); - return Promise.resolve(results); - }, - - getVisits: function(details) { - let url = details.url; - if (!url) { - return Promise.reject({message: "A URL must be provided for getVisits"}); - } - - let options = PlacesUtils.history.getNewQueryOptions(); - options.sortingMode = options.SORT_BY_DATE_DESCENDING; - options.resultType = options.RESULTS_AS_VISIT; - - let historyQuery = PlacesUtils.history.getNewQuery(); - historyQuery.uri = NetUtil.newURI(url); - let queryResult = PlacesUtils.history.executeQuery(historyQuery, options).root; - let results = convertNavHistoryContainerResultNode(queryResult, convertNodeToVisitItem); - return Promise.resolve(results); - }, - - onVisited: new SingletonEventManager(context, "history.onVisited", fire => { - let listener = (event, data) => { - context.runSafe(fire, data); - }; - - getObserver().on("visited", listener); - return () => { - getObserver().off("visited", listener); - }; - }).api(), - - onVisitRemoved: new SingletonEventManager(context, "history.onVisitRemoved", fire => { - let listener = (event, data) => { - context.runSafe(fire, data); - }; - - getObserver().on("visitRemoved", listener); - return () => { - getObserver().off("visitRemoved", listener); - }; - }).api(), - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-omnibox.js b/application/basilisk/components/webextensions/ext-omnibox.js deleted file mode 100644 index 9b2f60ca4..000000000 --- a/application/basilisk/components/webextensions/ext-omnibox.js +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSearchHandler", - "resource://gre/modules/ExtensionSearchHandler.jsm"); -var { - SingletonEventManager, -} = ExtensionUtils; - -// WeakMap[extension -> keyword] -let gKeywordMap = new WeakMap(); - -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("manifest_omnibox", (type, directive, extension, manifest) => { - let keyword = manifest.omnibox.keyword; - try { - // This will throw if the keyword is already registered. - ExtensionSearchHandler.registerKeyword(keyword, extension); - gKeywordMap.set(extension, keyword); - } catch (e) { - extension.manifestError(e.message); - } -}); - -extensions.on("shutdown", (type, extension) => { - let keyword = gKeywordMap.get(extension); - if (keyword) { - ExtensionSearchHandler.unregisterKeyword(keyword); - gKeywordMap.delete(extension); - } -}); -/* eslint-enable mozilla/balanced-listeners */ - -extensions.registerSchemaAPI("omnibox", "addon_parent", context => { - let {extension} = context; - return { - omnibox: { - setDefaultSuggestion(suggestion) { - let keyword = gKeywordMap.get(extension); - try { - // This will throw if the keyword failed to register. - ExtensionSearchHandler.setDefaultSuggestion(keyword, suggestion); - } catch (e) { - return Promise.reject(e.message); - } - }, - - onInputStarted: new SingletonEventManager(context, "omnibox.onInputStarted", fire => { - let listener = (eventName) => { - fire(); - }; - extension.on(ExtensionSearchHandler.MSG_INPUT_STARTED, listener); - return () => { - extension.off(ExtensionSearchHandler.MSG_INPUT_STARTED, listener); - }; - }).api(), - - onInputCancelled: new SingletonEventManager(context, "omnibox.onInputCancelled", fire => { - let listener = (eventName) => { - fire(); - }; - extension.on(ExtensionSearchHandler.MSG_INPUT_CANCELLED, listener); - return () => { - extension.off(ExtensionSearchHandler.MSG_INPUT_CANCELLED, listener); - }; - }).api(), - - onInputEntered: new SingletonEventManager(context, "omnibox.onInputEntered", fire => { - let listener = (eventName, text, disposition) => { - fire(text, disposition); - }; - extension.on(ExtensionSearchHandler.MSG_INPUT_ENTERED, listener); - return () => { - extension.off(ExtensionSearchHandler.MSG_INPUT_ENTERED, listener); - }; - }).api(), - }, - - omnibox_internal: { - addSuggestions(id, suggestions) { - let keyword = gKeywordMap.get(extension); - try { - ExtensionSearchHandler.addSuggestions(keyword, id, suggestions); - } catch (e) { - // Silently fail because the extension developer can not know for sure if the user - // has already invalidated the callback when asynchronously providing suggestions. - } - }, - - onInputChanged: new SingletonEventManager(context, "omnibox_internal.onInputChanged", fire => { - let listener = (eventName, text, id) => { - fire(text, id); - }; - extension.on(ExtensionSearchHandler.MSG_INPUT_CHANGED, listener); - return () => { - extension.off(ExtensionSearchHandler.MSG_INPUT_CHANGED, listener); - }; - }).api(), - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-pageAction.js b/application/basilisk/components/webextensions/ext-pageAction.js deleted file mode 100644 index 5bf3a9c70..000000000 --- a/application/basilisk/components/webextensions/ext-pageAction.js +++ /dev/null @@ -1,290 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -Cu.import("resource://gre/modules/Task.jsm"); -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -var { - EventManager, - IconDetails, -} = ExtensionUtils; - -// WeakMap[Extension -> PageAction] -var pageActionMap = new WeakMap(); - -// Handles URL bar icons, including the |page_action| manifest entry -// and associated API. -function PageAction(options, extension) { - this.extension = extension; - this.id = makeWidgetId(extension.id) + "-page-action"; - - this.tabManager = TabManager.for(extension); - - this.defaults = { - show: false, - title: options.default_title || extension.name, - icon: IconDetails.normalize({path: options.default_icon}, extension), - popup: options.default_popup || "", - }; - - this.browserStyle = options.browser_style || false; - if (options.browser_style === null) { - this.extension.logger.warn("Please specify whether you want browser_style " + - "or not in your page_action options."); - } - - this.tabContext = new TabContext(tab => Object.create(this.defaults), - extension); - - this.tabContext.on("location-change", this.handleLocationChange.bind(this)); // eslint-disable-line mozilla/balanced-listeners - - // WeakMap[ChromeWindow -> <xul:image>] - this.buttons = new WeakMap(); - - EventEmitter.decorate(this); -} - -PageAction.prototype = { - // Returns the value of the property |prop| for the given tab, where - // |prop| is one of "show", "title", "icon", "popup". - getProperty(tab, prop) { - return this.tabContext.get(tab)[prop]; - }, - - // Sets the value of the property |prop| for the given tab to the - // given value, symmetrically to |getProperty|. - // - // If |tab| is currently selected, updates the page action button to - // reflect the new value. - setProperty(tab, prop, value) { - if (value != null) { - this.tabContext.get(tab)[prop] = value; - } else { - delete this.tabContext.get(tab)[prop]; - } - - if (tab.selected) { - this.updateButton(tab.ownerGlobal); - } - }, - - // Updates the page action button in the given window to reflect the - // properties of the currently selected tab: - // - // Updates "tooltiptext" and "aria-label" to match "title" property. - // Updates "image" to match the "icon" property. - // Shows or hides the icon, based on the "show" property. - updateButton(window) { - let tabData = this.tabContext.get(window.gBrowser.selectedTab); - - if (!(tabData.show || this.buttons.has(window))) { - // Don't bother creating a button for a window until it actually - // needs to be shown. - return; - } - - let button = this.getButton(window); - - if (tabData.show) { - // Update the title and icon only if the button is visible. - - let title = tabData.title || this.extension.name; - button.setAttribute("tooltiptext", title); - button.setAttribute("aria-label", title); - - // These URLs should already be properly escaped, but make doubly sure CSS - // string escape characters are escaped here, since they could lead to a - // sandbox break. - let escape = str => str.replace(/[\\\s"]/g, encodeURIComponent); - - let getIcon = size => escape(IconDetails.getPreferredIcon(tabData.icon, this.extension, size).icon); - - button.setAttribute("style", ` - --webextension-urlbar-image: url("${getIcon(16)}"); - --webextension-urlbar-image-2x: url("${getIcon(32)}"); - `); - - button.classList.add("webextension-page-action"); - } - - button.hidden = !tabData.show; - }, - - // Create an |image| node and add it to the |urlbar-icons| - // container in the given window. - addButton(window) { - let document = window.document; - - let button = document.createElement("image"); - button.id = this.id; - button.setAttribute("class", "urlbar-icon"); - - button.addEventListener("click", event => { // eslint-disable-line mozilla/balanced-listeners - if (event.button == 0) { - this.handleClick(window); - } - }); - - document.getElementById("urlbar-icons").appendChild(button); - - return button; - }, - - // Returns the page action button for the given window, creating it if - // it doesn't already exist. - getButton(window) { - if (!this.buttons.has(window)) { - let button = this.addButton(window); - this.buttons.set(window, button); - } - - return this.buttons.get(window); - }, - - /** - * Triggers this page action for the given window, with the same effects as - * if it were clicked by a user. - * - * This has no effect if the page action is hidden for the selected tab. - * - * @param {Window} window - */ - triggerAction(window) { - let pageAction = pageActionMap.get(this.extension); - if (pageAction.getProperty(window.gBrowser.selectedTab, "show")) { - pageAction.handleClick(window); - } - }, - - // Handles a click event on the page action button for the given - // window. - // If the page action has a |popup| property, a panel is opened to - // that URL. Otherwise, a "click" event is emitted, and dispatched to - // the any click listeners in the add-on. - handleClick(window) { - let tab = window.gBrowser.selectedTab; - let popupURL = this.tabContext.get(tab).popup; - - this.tabManager.addActiveTabPermission(tab); - - // If the widget has a popup URL defined, we open a popup, but do not - // dispatch a click event to the extension. - // If it has no popup URL defined, we dispatch a click event, but do not - // open a popup. - if (popupURL) { - new PanelPopup(this.extension, this.getButton(window), popupURL, - this.browserStyle); - } else { - this.emit("click", tab); - } - }, - - handleLocationChange(eventType, tab, fromBrowse) { - if (fromBrowse) { - this.tabContext.clear(tab); - } - this.updateButton(tab.ownerGlobal); - }, - - shutdown() { - this.tabContext.shutdown(); - - for (let window of WindowListManager.browserWindows()) { - if (this.buttons.has(window)) { - this.buttons.get(window).remove(); - } - } - }, -}; - -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("manifest_page_action", (type, directive, extension, manifest) => { - let pageAction = new PageAction(manifest.page_action, extension); - pageActionMap.set(extension, pageAction); -}); - -extensions.on("shutdown", (type, extension) => { - if (pageActionMap.has(extension)) { - pageActionMap.get(extension).shutdown(); - pageActionMap.delete(extension); - } -}); -/* eslint-enable mozilla/balanced-listeners */ - -PageAction.for = extension => { - return pageActionMap.get(extension); -}; - -global.pageActionFor = PageAction.for; - -extensions.registerSchemaAPI("pageAction", "addon_parent", context => { - let {extension} = context; - return { - pageAction: { - onClicked: new EventManager(context, "pageAction.onClicked", fire => { - let listener = (evt, tab) => { - fire(TabManager.convert(extension, tab)); - }; - let pageAction = PageAction.for(extension); - - pageAction.on("click", listener); - return () => { - pageAction.off("click", listener); - }; - }).api(), - - show(tabId) { - let tab = TabManager.getTab(tabId, context); - PageAction.for(extension).setProperty(tab, "show", true); - }, - - hide(tabId) { - let tab = TabManager.getTab(tabId, context); - PageAction.for(extension).setProperty(tab, "show", false); - }, - - setTitle(details) { - let tab = TabManager.getTab(details.tabId, context); - - // Clear the tab-specific title when given a null string. - PageAction.for(extension).setProperty(tab, "title", details.title || null); - }, - - getTitle(details) { - let tab = TabManager.getTab(details.tabId, context); - - let title = PageAction.for(extension).getProperty(tab, "title"); - return Promise.resolve(title); - }, - - setIcon(details) { - let tab = TabManager.getTab(details.tabId, context); - - let icon = IconDetails.normalize(details, extension, context); - PageAction.for(extension).setProperty(tab, "icon", icon); - }, - - setPopup(details) { - let tab = TabManager.getTab(details.tabId, context); - - // Note: Chrome resolves arguments to setIcon relative to the calling - // context, but resolves arguments to setPopup relative to the extension - // root. - // For internal consistency, we currently resolve both relative to the - // calling context. - let url = details.popup && context.uri.resolve(details.popup); - if (url && !context.checkLoadURL(url)) { - return Promise.reject({message: `Access denied for URL ${url}`}); - } - PageAction.for(extension).setProperty(tab, "popup", url); - }, - - getPopup(details) { - let tab = TabManager.getTab(details.tabId, context); - - let popup = PageAction.for(extension).getProperty(tab, "popup"); - return Promise.resolve(popup); - }, - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-sessions.js b/application/basilisk/components/webextensions/ext-sessions.js deleted file mode 100644 index 4c13a1ac3..000000000 --- a/application/basilisk/components/webextensions/ext-sessions.js +++ /dev/null @@ -1,92 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -var { - promiseObserved, -} = ExtensionUtils; - -XPCOMUtils.defineLazyModuleGetter(this, "SessionStore", - "resource:///modules/sessionstore/SessionStore.jsm"); - -function getRecentlyClosed(maxResults, extension) { - let recentlyClosed = []; - - // Get closed windows - let closedWindowData = SessionStore.getClosedWindowData(false); - for (let window of closedWindowData) { - recentlyClosed.push({ - lastModified: window.closedAt, - window: WindowManager.convertFromSessionStoreClosedData(window, extension)}); - } - - // Get closed tabs - for (let window of WindowListManager.browserWindows()) { - let closedTabData = SessionStore.getClosedTabData(window, false); - for (let tab of closedTabData) { - recentlyClosed.push({ - lastModified: tab.closedAt, - tab: TabManager.for(extension).convertFromSessionStoreClosedData(tab, window)}); - } - } - - // Sort windows and tabs - recentlyClosed.sort((a, b) => b.lastModified - a.lastModified); - return recentlyClosed.slice(0, maxResults); -} - -function createSession(restored, extension, sessionId) { - if (!restored) { - return Promise.reject({message: `Could not restore object using sessionId ${sessionId}.`}); - } - let sessionObj = {lastModified: Date.now()}; - if (restored instanceof Ci.nsIDOMChromeWindow) { - return promiseObserved("sessionstore-single-window-restored", subject => subject == restored).then(() => { - sessionObj.window = WindowManager.convert(extension, restored, {populate: true}); - return Promise.resolve([sessionObj]); - }); - } - sessionObj.tab = TabManager.for(extension).convert(restored); - return Promise.resolve([sessionObj]); -} - -extensions.registerSchemaAPI("sessions", "addon_parent", context => { - let {extension} = context; - return { - sessions: { - getRecentlyClosed: function(filter) { - let maxResults = filter.maxResults == undefined ? this.MAX_SESSION_RESULTS : filter.maxResults; - return Promise.resolve(getRecentlyClosed(maxResults, extension)); - }, - restore: function(sessionId) { - let session, closedId; - if (sessionId) { - closedId = sessionId; - session = SessionStore.undoCloseById(closedId); - } else if (SessionStore.lastClosedObjectType == "window") { - // If the most recently closed object is a window, just undo closing the most recent window. - session = SessionStore.undoCloseWindow(0); - } else { - // It is a tab, and we cannot call SessionStore.undoCloseTab without a window, - // so we must find the tab in which case we can just use its closedId. - let recentlyClosedTabs = []; - for (let window of WindowListManager.browserWindows()) { - let closedTabData = SessionStore.getClosedTabData(window, false); - for (let tab of closedTabData) { - recentlyClosedTabs.push(tab); - } - } - - // Sort the tabs. - recentlyClosedTabs.sort((a, b) => b.closedAt - a.closedAt); - - // Use the closedId of the most recently closed tab to restore it. - closedId = recentlyClosedTabs[0].closedId; - session = SessionStore.undoCloseById(closedId); - } - return createSession(session, extension, closedId); - }, - }, - }; -}); diff --git a/application/basilisk/components/webextensions/ext-tabs.js b/application/basilisk/components/webextensions/ext-tabs.js deleted file mode 100644 index bb575aaab..000000000 --- a/application/basilisk/components/webextensions/ext-tabs.js +++ /dev/null @@ -1,1093 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService", - "@mozilla.org/browser/aboutnewtab-service;1", - "nsIAboutNewTabService"); - -XPCOMUtils.defineLazyModuleGetter(this, "MatchPattern", - "resource://gre/modules/MatchPattern.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils", - "resource://gre/modules/PromiseUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Services", - "resource://gre/modules/Services.jsm"); - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); - -var { - EventManager, - ignoreEvent, -} = ExtensionUtils; - -// This function is pretty tightly tied to Extension.jsm. -// Its job is to fill in the |tab| property of the sender. -function getSender(extension, target, sender) { - if ("tabId" in sender) { - // The message came from an ExtensionContext. In that case, it should - // include a tabId property (which is filled in by the page-open - // listener below). - let tab = TabManager.getTab(sender.tabId, null, null); - delete sender.tabId; - if (tab) { - sender.tab = TabManager.convert(extension, tab); - return; - } - } - if (target instanceof Ci.nsIDOMXULElement) { - // If the message was sent from a content script to a <browser> element, - // then we can just get the `tab` from `target`. - let tabbrowser = target.ownerGlobal.gBrowser; - if (tabbrowser) { - let tab = tabbrowser.getTabForBrowser(target); - - // `tab` can be `undefined`, e.g. for extension popups. This condition is - // reached if `getSender` is called for a popup without a valid `tabId`. - if (tab) { - sender.tab = TabManager.convert(extension, tab); - } - } - } -} - -// Used by Extension.jsm -global.tabGetSender = getSender; - -/* eslint-disable mozilla/balanced-listeners */ - -extensions.on("page-shutdown", (type, context) => { - if (context.viewType == "tab") { - if (context.extension.id !== context.xulBrowser.contentPrincipal.addonId) { - // Only close extension tabs. - // This check prevents about:addons from closing when it contains a - // WebExtension as an embedded inline options page. - return; - } - let {gBrowser} = context.xulBrowser.ownerGlobal; - if (gBrowser) { - let tab = gBrowser.getTabForBrowser(context.xulBrowser); - if (tab) { - gBrowser.removeTab(tab); - } - } - } -}); - -extensions.on("fill-browser-data", (type, browser, data) => { - data.tabId = browser ? TabManager.getBrowserId(browser) : -1; -}); -/* eslint-enable mozilla/balanced-listeners */ - -global.currentWindow = function(context) { - let {xulWindow} = context; - if (xulWindow && context.viewType != "background") { - return xulWindow; - } - return WindowManager.topWindow; -}; - -let tabListener = { - init() { - if (this.initialized) { - return; - } - - this.adoptedTabs = new WeakMap(); - - this.handleWindowOpen = this.handleWindowOpen.bind(this); - this.handleWindowClose = this.handleWindowClose.bind(this); - - AllWindowEvents.addListener("TabClose", this); - AllWindowEvents.addListener("TabOpen", this); - WindowListManager.addOpenListener(this.handleWindowOpen); - WindowListManager.addCloseListener(this.handleWindowClose); - - EventEmitter.decorate(this); - - this.initialized = true; - }, - - handleEvent(event) { - switch (event.type) { - case "TabOpen": - if (event.detail.adoptedTab) { - this.adoptedTabs.set(event.detail.adoptedTab, event.target); - } - - // We need to delay sending this event until the next tick, since the - // tab does not have its final index when the TabOpen event is dispatched. - Promise.resolve().then(() => { - if (event.detail.adoptedTab) { - this.emitAttached(event.originalTarget); - } else { - this.emitCreated(event.originalTarget); - } - }); - break; - - case "TabClose": - let tab = event.originalTarget; - - if (event.detail.adoptedBy) { - this.emitDetached(tab, event.detail.adoptedBy); - } else { - this.emitRemoved(tab, false); - } - break; - } - }, - - handleWindowOpen(window) { - if (window.arguments[0] instanceof window.XULElement) { - // If the first window argument is a XUL element, it means the - // window is about to adopt a tab from another window to replace its - // initial tab. - // - // Note that this event handler depends on running before the - // delayed startup code in browser.js, which is currently triggered - // by the first MozAfterPaint event. That code handles finally - // adopting the tab, and clears it from the arguments list in the - // process, so if we run later than it, we're too late. - let tab = window.arguments[0]; - this.adoptedTabs.set(tab, window.gBrowser.tabs[0]); - - // We need to be sure to fire this event after the onDetached event - // for the original tab. - let listener = (event, details) => { - if (details.tab == tab) { - this.off("tab-detached", listener); - - Promise.resolve().then(() => { - this.emitAttached(details.adoptedBy); - }); - } - }; - - this.on("tab-detached", listener); - } else { - for (let tab of window.gBrowser.tabs) { - this.emitCreated(tab); - } - } - }, - - handleWindowClose(window) { - for (let tab of window.gBrowser.tabs) { - if (this.adoptedTabs.has(tab)) { - this.emitDetached(tab, this.adoptedTabs.get(tab)); - } else { - this.emitRemoved(tab, true); - } - } - }, - - emitAttached(tab) { - let newWindowId = WindowManager.getId(tab.ownerGlobal); - let tabId = TabManager.getId(tab); - - this.emit("tab-attached", {tab, tabId, newWindowId, newPosition: tab._tPos}); - }, - - emitDetached(tab, adoptedBy) { - let oldWindowId = WindowManager.getId(tab.ownerGlobal); - let tabId = TabManager.getId(tab); - - this.emit("tab-detached", {tab, adoptedBy, tabId, oldWindowId, oldPosition: tab._tPos}); - }, - - emitCreated(tab) { - this.emit("tab-created", {tab}); - }, - - emitRemoved(tab, isWindowClosing) { - let windowId = WindowManager.getId(tab.ownerGlobal); - let tabId = TabManager.getId(tab); - - // When addons run in-process, `window.close()` is synchronous. Most other - // addon-invoked calls are asynchronous since they go through a proxy - // context via the message manager. This includes event registrations such - // as `tabs.onRemoved.addListener`. - // So, even if `window.close()` were to be called (in-process) after calling - // `tabs.onRemoved.addListener`, then the tab would be closed before the - // event listener is registered. To make sure that the event listener is - // notified, we dispatch `tabs.onRemoved` asynchronously. - Services.tm.mainThread.dispatch(() => { - this.emit("tab-removed", {tab, tabId, windowId, isWindowClosing}); - }, Ci.nsIThread.DISPATCH_NORMAL); - }, - - tabReadyInitialized: false, - tabReadyPromises: new WeakMap(), - initializingTabs: new WeakSet(), - - initTabReady() { - if (!this.tabReadyInitialized) { - AllWindowEvents.addListener("progress", this); - - this.tabReadyInitialized = true; - } - }, - - onLocationChange(browser, webProgress, request, locationURI, flags) { - if (webProgress.isTopLevel) { - let gBrowser = browser.ownerGlobal.gBrowser; - let tab = gBrowser.getTabForBrowser(browser); - - // Now we are certain that the first page in the tab was loaded. - this.initializingTabs.delete(tab); - - // browser.innerWindowID is now set, resolve the promises if any. - let deferred = this.tabReadyPromises.get(tab); - if (deferred) { - deferred.resolve(tab); - this.tabReadyPromises.delete(tab); - } - } - }, - - /** - * Returns a promise that resolves when the tab is ready. - * Tabs created via the `tabs.create` method are "ready" once the location - * changes to the requested URL. Other tabs are assumed to be ready once their - * inner window ID is known. - * - * @param {XULElement} tab The <tab> element. - * @returns {Promise} Resolves with the given tab once ready. - */ - awaitTabReady(tab) { - let deferred = this.tabReadyPromises.get(tab); - if (!deferred) { - deferred = PromiseUtils.defer(); - if (!this.initializingTabs.has(tab) && tab.linkedBrowser.innerWindowID) { - deferred.resolve(tab); - } else { - this.initTabReady(); - this.tabReadyPromises.set(tab, deferred); - } - } - return deferred.promise; - }, -}; - -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("startup", () => { - tabListener.init(); -}); -/* eslint-enable mozilla/balanced-listeners */ - -extensions.registerSchemaAPI("tabs", "addon_parent", context => { - let {extension} = context; - let self = { - tabs: { - onActivated: new WindowEventManager(context, "tabs.onActivated", "TabSelect", (fire, event) => { - let tab = event.originalTarget; - let tabId = TabManager.getId(tab); - let windowId = WindowManager.getId(tab.ownerGlobal); - fire({tabId, windowId}); - }).api(), - - onCreated: new EventManager(context, "tabs.onCreated", fire => { - let listener = (eventName, event) => { - fire(TabManager.convert(extension, event.tab)); - }; - - tabListener.on("tab-created", listener); - return () => { - tabListener.off("tab-created", listener); - }; - }).api(), - - /** - * Since multiple tabs currently can't be highlighted, onHighlighted - * essentially acts an alias for self.tabs.onActivated but returns - * the tabId in an array to match the API. - * @see https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/Tabs/onHighlighted - */ - onHighlighted: new WindowEventManager(context, "tabs.onHighlighted", "TabSelect", (fire, event) => { - let tab = event.originalTarget; - let tabIds = [TabManager.getId(tab)]; - let windowId = WindowManager.getId(tab.ownerGlobal); - fire({tabIds, windowId}); - }).api(), - - onAttached: new EventManager(context, "tabs.onAttached", fire => { - let listener = (eventName, event) => { - fire(event.tabId, {newWindowId: event.newWindowId, newPosition: event.newPosition}); - }; - - tabListener.on("tab-attached", listener); - return () => { - tabListener.off("tab-attached", listener); - }; - }).api(), - - onDetached: new EventManager(context, "tabs.onDetached", fire => { - let listener = (eventName, event) => { - fire(event.tabId, {oldWindowId: event.oldWindowId, oldPosition: event.oldPosition}); - }; - - tabListener.on("tab-detached", listener); - return () => { - tabListener.off("tab-detached", listener); - }; - }).api(), - - onRemoved: new EventManager(context, "tabs.onRemoved", fire => { - let listener = (eventName, event) => { - fire(event.tabId, {windowId: event.windowId, isWindowClosing: event.isWindowClosing}); - }; - - tabListener.on("tab-removed", listener); - return () => { - tabListener.off("tab-removed", listener); - }; - }).api(), - - onReplaced: ignoreEvent(context, "tabs.onReplaced"), - - onMoved: new EventManager(context, "tabs.onMoved", fire => { - // There are certain circumstances where we need to ignore a move event. - // - // Namely, the first time the tab is moved after it's created, we need - // to report the final position as the initial position in the tab's - // onAttached or onCreated event. This is because most tabs are inserted - // in a temporary location and then moved after the TabOpen event fires, - // which generates a TabOpen event followed by a TabMove event, which - // does not match the contract of our API. - let ignoreNextMove = new WeakSet(); - - let openListener = event => { - ignoreNextMove.add(event.target); - // Remove the tab from the set on the next tick, since it will already - // have been moved by then. - Promise.resolve().then(() => { - ignoreNextMove.delete(event.target); - }); - }; - - let moveListener = event => { - let tab = event.originalTarget; - - if (ignoreNextMove.has(tab)) { - ignoreNextMove.delete(tab); - return; - } - - fire(TabManager.getId(tab), { - windowId: WindowManager.getId(tab.ownerGlobal), - fromIndex: event.detail, - toIndex: tab._tPos, - }); - }; - - AllWindowEvents.addListener("TabMove", moveListener); - AllWindowEvents.addListener("TabOpen", openListener); - return () => { - AllWindowEvents.removeListener("TabMove", moveListener); - AllWindowEvents.removeListener("TabOpen", openListener); - }; - }).api(), - - onUpdated: new EventManager(context, "tabs.onUpdated", fire => { - function sanitize(extension, changeInfo) { - let result = {}; - let nonempty = false; - for (let prop in changeInfo) { - if ((prop != "favIconUrl" && prop != "url") || extension.hasPermission("tabs")) { - nonempty = true; - result[prop] = changeInfo[prop]; - } - } - return [nonempty, result]; - } - - let fireForBrowser = (browser, changed) => { - let [needed, changeInfo] = sanitize(extension, changed); - if (needed) { - let gBrowser = browser.ownerGlobal.gBrowser; - let tabElem = gBrowser.getTabForBrowser(browser); - - let tab = TabManager.convert(extension, tabElem); - fire(tab.id, changeInfo, tab); - } - }; - - let listener = event => { - let needed = []; - if (event.type == "TabAttrModified") { - let changed = event.detail.changed; - if (changed.includes("image")) { - needed.push("favIconUrl"); - } - if (changed.includes("muted")) { - needed.push("mutedInfo"); - } - if (changed.includes("soundplaying")) { - needed.push("audible"); - } - } else if (event.type == "TabPinned") { - needed.push("pinned"); - } else if (event.type == "TabUnpinned") { - needed.push("pinned"); - } - - if (needed.length && !extension.hasPermission("tabs")) { - needed = needed.filter(attr => attr != "url" && attr != "favIconUrl"); - } - - if (needed.length) { - let tab = TabManager.convert(extension, event.originalTarget); - - let changeInfo = {}; - for (let prop of needed) { - changeInfo[prop] = tab[prop]; - } - fire(tab.id, changeInfo, tab); - } - }; - let progressListener = { - onStateChange(browser, webProgress, request, stateFlags, statusCode) { - if (!webProgress.isTopLevel) { - return; - } - - let status; - if (stateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) { - if (stateFlags & Ci.nsIWebProgressListener.STATE_START) { - status = "loading"; - } else if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP) { - status = "complete"; - } - } else if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP && - statusCode == Cr.NS_BINDING_ABORTED) { - status = "complete"; - } - - fireForBrowser(browser, {status}); - }, - - onLocationChange(browser, webProgress, request, locationURI, flags) { - if (!webProgress.isTopLevel) { - return; - } - - fireForBrowser(browser, { - status: webProgress.isLoadingDocument ? "loading" : "complete", - url: locationURI.spec, - }); - }, - }; - - AllWindowEvents.addListener("progress", progressListener); - AllWindowEvents.addListener("TabAttrModified", listener); - AllWindowEvents.addListener("TabPinned", listener); - AllWindowEvents.addListener("TabUnpinned", listener); - - return () => { - AllWindowEvents.removeListener("progress", progressListener); - AllWindowEvents.removeListener("TabAttrModified", listener); - AllWindowEvents.removeListener("TabPinned", listener); - AllWindowEvents.removeListener("TabUnpinned", listener); - }; - }).api(), - - create: function(createProperties) { - return new Promise((resolve, reject) => { - let window = createProperties.windowId !== null ? - WindowManager.getWindow(createProperties.windowId, context) : - WindowManager.topWindow; - if (!window.gBrowser) { - let obs = (finishedWindow, topic, data) => { - if (finishedWindow != window) { - return; - } - Services.obs.removeObserver(obs, "browser-delayed-startup-finished"); - resolve(window); - }; - Services.obs.addObserver(obs, "browser-delayed-startup-finished", false); - } else { - resolve(window); - } - }).then(window => { - let url; - - if (createProperties.url !== null) { - url = context.uri.resolve(createProperties.url); - - if (!context.checkLoadURL(url, {dontReportErrors: true})) { - return Promise.reject({message: `Illegal URL: ${url}`}); - } - } - - if (createProperties.cookieStoreId && !extension.hasPermission("cookies")) { - return Promise.reject({message: `No permission for cookieStoreId: ${createProperties.cookieStoreId}`}); - } - - let options = {}; - if (createProperties.cookieStoreId) { - if (!global.isValidCookieStoreId(createProperties.cookieStoreId)) { - return Promise.reject({message: `Illegal cookieStoreId: ${createProperties.cookieStoreId}`}); - } - - let privateWindow = PrivateBrowsingUtils.isBrowserPrivate(window.gBrowser); - if (privateWindow && !global.isPrivateCookieStoreId(createProperties.cookieStoreId)) { - return Promise.reject({message: `Illegal to set non-private cookieStorageId in a private window`}); - } - - if (!privateWindow && global.isPrivateCookieStoreId(createProperties.cookieStoreId)) { - return Promise.reject({message: `Illegal to set private cookieStorageId in a non-private window`}); - } - - if (global.isContainerCookieStoreId(createProperties.cookieStoreId)) { - let containerId = global.getContainerForCookieStoreId(createProperties.cookieStoreId); - if (!containerId) { - return Promise.reject({message: `No cookie store exists with ID ${createProperties.cookieStoreId}`}); - } - - options.userContextId = containerId; - } - } - - tabListener.initTabReady(); - let tab = window.gBrowser.addTab(url || window.BROWSER_NEW_TAB_URL, options); - - let active = true; - if (createProperties.active !== null) { - active = createProperties.active; - } - if (active) { - window.gBrowser.selectedTab = tab; - } - - if (createProperties.index !== null) { - window.gBrowser.moveTabTo(tab, createProperties.index); - } - - if (createProperties.pinned) { - window.gBrowser.pinTab(tab); - } - - if (createProperties.url && !createProperties.url.startsWith("about:")) { - // We can't wait for a location change event for about:newtab, - // since it may be pre-rendered, in which case its initial - // location change event has already fired. - - // Mark the tab as initializing, so that operations like - // `executeScript` wait until the requested URL is loaded in - // the tab before dispatching messages to the inner window - // that contains the URL we're attempting to load. - tabListener.initializingTabs.add(tab); - } - - return TabManager.convert(extension, tab); - }); - }, - - remove: function(tabs) { - if (!Array.isArray(tabs)) { - tabs = [tabs]; - } - - for (let tabId of tabs) { - let tab = TabManager.getTab(tabId, context); - tab.ownerGlobal.gBrowser.removeTab(tab); - } - - return Promise.resolve(); - }, - - update: function(tabId, updateProperties) { - let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - let tabbrowser = tab.ownerGlobal.gBrowser; - - if (updateProperties.url !== null) { - let url = context.uri.resolve(updateProperties.url); - - if (!context.checkLoadURL(url, {dontReportErrors: true})) { - return Promise.reject({message: `Illegal URL: ${url}`}); - } - - tab.linkedBrowser.loadURI(url); - } - - if (updateProperties.active !== null) { - if (updateProperties.active) { - tabbrowser.selectedTab = tab; - } else { - // Not sure what to do here? Which tab should we select? - } - } - if (updateProperties.muted !== null) { - if (tab.muted != updateProperties.muted) { - tab.toggleMuteAudio(extension.uuid); - } - } - if (updateProperties.pinned !== null) { - if (updateProperties.pinned) { - tabbrowser.pinTab(tab); - } else { - tabbrowser.unpinTab(tab); - } - } - // FIXME: highlighted/selected, openerTabId - - return Promise.resolve(TabManager.convert(extension, tab)); - }, - - reload: function(tabId, reloadProperties) { - let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE; - if (reloadProperties && reloadProperties.bypassCache) { - flags |= Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE; - } - tab.linkedBrowser.reloadWithFlags(flags); - - return Promise.resolve(); - }, - - get: function(tabId) { - let tab = TabManager.getTab(tabId, context); - - return Promise.resolve(TabManager.convert(extension, tab)); - }, - - getCurrent() { - let tab; - if (context.tabId) { - tab = TabManager.convert(extension, TabManager.getTab(context.tabId, context)); - } - return Promise.resolve(tab); - }, - - query: function(queryInfo) { - let pattern = null; - if (queryInfo.url !== null) { - if (!extension.hasPermission("tabs")) { - return Promise.reject({message: 'The "tabs" permission is required to use the query API with the "url" parameter'}); - } - - pattern = new MatchPattern(queryInfo.url); - } - - function matches(tab) { - let props = ["active", "pinned", "highlighted", "status", "title", "index"]; - for (let prop of props) { - if (queryInfo[prop] !== null && queryInfo[prop] != tab[prop]) { - return false; - } - } - - if (queryInfo.audible !== null) { - if (queryInfo.audible != tab.audible) { - return false; - } - } - - if (queryInfo.muted !== null) { - if (queryInfo.muted != tab.mutedInfo.muted) { - return false; - } - } - - if (queryInfo.cookieStoreId !== null && - tab.cookieStoreId != queryInfo.cookieStoreId) { - return false; - } - - if (pattern && !pattern.matches(Services.io.newURI(tab.url, null, null))) { - return false; - } - - return true; - } - - let result = []; - for (let window of WindowListManager.browserWindows()) { - let lastFocused = window === WindowManager.topWindow; - if (queryInfo.lastFocusedWindow !== null && queryInfo.lastFocusedWindow !== lastFocused) { - continue; - } - - let windowType = WindowManager.windowType(window); - if (queryInfo.windowType !== null && queryInfo.windowType !== windowType) { - continue; - } - - if (queryInfo.windowId !== null) { - if (queryInfo.windowId === WindowManager.WINDOW_ID_CURRENT) { - if (currentWindow(context) !== window) { - continue; - } - } else if (queryInfo.windowId !== WindowManager.getId(window)) { - continue; - } - } - - if (queryInfo.currentWindow !== null) { - let eq = window === currentWindow(context); - if (queryInfo.currentWindow != eq) { - continue; - } - } - - let tabs = TabManager.for(extension).getTabs(window); - for (let tab of tabs) { - if (matches(tab)) { - result.push(tab); - } - } - } - return Promise.resolve(result); - }, - - captureVisibleTab: function(windowId, options) { - if (!extension.hasPermission("<all_urls>")) { - return Promise.reject({message: "The <all_urls> permission is required to use the captureVisibleTab API"}); - } - - let window = windowId == null ? - WindowManager.topWindow : - WindowManager.getWindow(windowId, context); - - let tab = window.gBrowser.selectedTab; - return tabListener.awaitTabReady(tab).then(() => { - let browser = tab.linkedBrowser; - let recipient = { - innerWindowID: browser.innerWindowID, - }; - - if (!options) { - options = {}; - } - if (options.format == null) { - options.format = "png"; - } - if (options.quality == null) { - options.quality = 92; - } - - let message = { - options, - width: browser.clientWidth, - height: browser.clientHeight, - }; - - return context.sendMessage(browser.messageManager, "Extension:Capture", - message, {recipient}); - }); - }, - - detectLanguage: function(tabId) { - let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - return tabListener.awaitTabReady(tab).then(() => { - let browser = tab.linkedBrowser; - let recipient = {innerWindowID: browser.innerWindowID}; - - return context.sendMessage(browser.messageManager, "Extension:DetectLanguage", - {}, {recipient}); - }); - }, - - // Used to executeScript, insertCSS and removeCSS. - _execute: function(tabId, details, kind, method) { - let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - let options = { - js: [], - css: [], - remove_css: method == "removeCSS", - }; - - // We require a `code` or a `file` property, but we can't accept both. - if ((details.code === null) == (details.file === null)) { - return Promise.reject({message: `${method} requires either a 'code' or a 'file' property, but not both`}); - } - - if (details.frameId !== null && details.allFrames) { - return Promise.reject({message: `'frameId' and 'allFrames' are mutually exclusive`}); - } - - if (TabManager.for(extension).hasActiveTabPermission(tab)) { - // If we have the "activeTab" permission for this tab, ignore - // the host whitelist. - options.matchesHost = ["<all_urls>"]; - } else { - options.matchesHost = extension.whiteListedHosts.serialize(); - } - - if (details.code !== null) { - options[kind + "Code"] = details.code; - } - if (details.file !== null) { - let url = context.uri.resolve(details.file); - if (!extension.isExtensionURL(url)) { - return Promise.reject({message: "Files to be injected must be within the extension"}); - } - options[kind].push(url); - } - if (details.allFrames) { - options.all_frames = details.allFrames; - } - if (details.frameId !== null) { - options.frame_id = details.frameId; - } - if (details.matchAboutBlank) { - options.match_about_blank = details.matchAboutBlank; - } - if (details.runAt !== null) { - options.run_at = details.runAt; - } else { - options.run_at = "document_idle"; - } - - return tabListener.awaitTabReady(tab).then(() => { - let browser = tab.linkedBrowser; - let recipient = { - innerWindowID: browser.innerWindowID, - }; - - return context.sendMessage(browser.messageManager, "Extension:Execute", {options}, {recipient}); - }); - }, - - executeScript: function(tabId, details) { - return self.tabs._execute(tabId, details, "js", "executeScript"); - }, - - insertCSS: function(tabId, details) { - return self.tabs._execute(tabId, details, "css", "insertCSS").then(() => {}); - }, - - removeCSS: function(tabId, details) { - return self.tabs._execute(tabId, details, "css", "removeCSS").then(() => {}); - }, - - move: function(tabIds, moveProperties) { - let index = moveProperties.index; - let tabsMoved = []; - if (!Array.isArray(tabIds)) { - tabIds = [tabIds]; - } - - let destinationWindow = null; - if (moveProperties.windowId !== null) { - destinationWindow = WindowManager.getWindow(moveProperties.windowId, context); - // Fail on an invalid window. - if (!destinationWindow) { - return Promise.reject({message: `Invalid window ID: ${moveProperties.windowId}`}); - } - } - - /* - Indexes are maintained on a per window basis so that a call to - move([tabA, tabB], {index: 0}) - -> tabA to 0, tabB to 1 if tabA and tabB are in the same window - move([tabA, tabB], {index: 0}) - -> tabA to 0, tabB to 0 if tabA and tabB are in different windows - */ - let indexMap = new Map(); - - let tabs = tabIds.map(tabId => TabManager.getTab(tabId, context)); - for (let tab of tabs) { - // If the window is not specified, use the window from the tab. - let window = destinationWindow || tab.ownerGlobal; - let gBrowser = window.gBrowser; - - let insertionPoint = indexMap.get(window) || index; - // If the index is -1 it should go to the end of the tabs. - if (insertionPoint == -1) { - insertionPoint = gBrowser.tabs.length; - } - - // We can only move pinned tabs to a point within, or just after, - // the current set of pinned tabs. Unpinned tabs, likewise, can only - // be moved to a position after the current set of pinned tabs. - // Attempts to move a tab to an illegal position are ignored. - let numPinned = gBrowser._numPinnedTabs; - let ok = tab.pinned ? insertionPoint <= numPinned : insertionPoint >= numPinned; - if (!ok) { - continue; - } - - indexMap.set(window, insertionPoint + 1); - - if (tab.ownerGlobal != window) { - // If the window we are moving the tab in is different, then move the tab - // to the new window. - tab = gBrowser.adoptTab(tab, insertionPoint, false); - } else { - // If the window we are moving is the same, just move the tab. - gBrowser.moveTabTo(tab, insertionPoint); - } - tabsMoved.push(tab); - } - - return Promise.resolve(tabsMoved.map(tab => TabManager.convert(extension, tab))); - }, - - duplicate: function(tabId) { - let tab = TabManager.getTab(tabId, context); - - let gBrowser = tab.ownerGlobal.gBrowser; - let newTab = gBrowser.duplicateTab(tab); - - return new Promise(resolve => { - // We need to use SSTabRestoring because any attributes set before - // are ignored. SSTabRestored is too late and results in a jump in - // the UI. See http://bit.ly/session-store-api for more information. - newTab.addEventListener("SSTabRestoring", function listener() { - // As the tab is restoring, move it to the correct position. - newTab.removeEventListener("SSTabRestoring", listener); - // Pinned tabs that are duplicated are inserted - // after the existing pinned tab and pinned. - if (tab.pinned) { - gBrowser.pinTab(newTab); - } - gBrowser.moveTabTo(newTab, tab._tPos + 1); - }); - - newTab.addEventListener("SSTabRestored", function listener() { - // Once it has been restored, select it and return the promise. - newTab.removeEventListener("SSTabRestored", listener); - gBrowser.selectedTab = newTab; - return resolve(TabManager.convert(extension, newTab)); - }); - }); - }, - - getZoom(tabId) { - let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - let {ZoomManager} = tab.ownerGlobal; - let zoom = ZoomManager.getZoomForBrowser(tab.linkedBrowser); - - return Promise.resolve(zoom); - }, - - setZoom(tabId, zoom) { - let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - let {FullZoom, ZoomManager} = tab.ownerGlobal; - - if (zoom === 0) { - // A value of zero means use the default zoom factor. - return FullZoom.reset(tab.linkedBrowser); - } else if (zoom >= ZoomManager.MIN && zoom <= ZoomManager.MAX) { - FullZoom.setZoom(zoom, tab.linkedBrowser); - } else { - return Promise.reject({ - message: `Zoom value ${zoom} out of range (must be between ${ZoomManager.MIN} and ${ZoomManager.MAX})`, - }); - } - - return Promise.resolve(); - }, - - _getZoomSettings(tabId) { - let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - let {FullZoom} = tab.ownerGlobal; - - return { - mode: "automatic", - scope: FullZoom.siteSpecific ? "per-origin" : "per-tab", - defaultZoomFactor: 1, - }; - }, - - getZoomSettings(tabId) { - return Promise.resolve(this._getZoomSettings(tabId)); - }, - - setZoomSettings(tabId, settings) { - let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab; - - let currentSettings = this._getZoomSettings(tab.id); - - if (!Object.keys(settings).every(key => settings[key] === currentSettings[key])) { - return Promise.reject(`Unsupported zoom settings: ${JSON.stringify(settings)}`); - } - return Promise.resolve(); - }, - - onZoomChange: new EventManager(context, "tabs.onZoomChange", fire => { - let getZoomLevel = browser => { - let {ZoomManager} = browser.ownerGlobal; - - return ZoomManager.getZoomForBrowser(browser); - }; - - // Stores the last known zoom level for each tab's browser. - // WeakMap[<browser> -> number] - let zoomLevels = new WeakMap(); - - // Store the zoom level for all existing tabs. - for (let window of WindowListManager.browserWindows()) { - for (let tab of window.gBrowser.tabs) { - let browser = tab.linkedBrowser; - zoomLevels.set(browser, getZoomLevel(browser)); - } - } - - let tabCreated = (eventName, event) => { - let browser = event.tab.linkedBrowser; - zoomLevels.set(browser, getZoomLevel(browser)); - }; - - - let zoomListener = event => { - let browser = event.originalTarget; - - // For non-remote browsers, this event is dispatched on the document - // rather than on the <browser>. - if (browser instanceof Ci.nsIDOMDocument) { - browser = browser.defaultView.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDocShell) - .chromeEventHandler; - } - - let {gBrowser} = browser.ownerGlobal; - let tab = gBrowser.getTabForBrowser(browser); - if (!tab) { - // We only care about zoom events in the top-level browser of a tab. - return; - } - - let oldZoomFactor = zoomLevels.get(browser); - let newZoomFactor = getZoomLevel(browser); - - if (oldZoomFactor != newZoomFactor) { - zoomLevels.set(browser, newZoomFactor); - - let tabId = TabManager.getId(tab); - fire({ - tabId, - oldZoomFactor, - newZoomFactor, - zoomSettings: self.tabs._getZoomSettings(tabId), - }); - } - }; - - tabListener.on("tab-attached", tabCreated); - tabListener.on("tab-created", tabCreated); - - AllWindowEvents.addListener("FullZoomChange", zoomListener); - AllWindowEvents.addListener("TextZoomChange", zoomListener); - return () => { - tabListener.off("tab-attached", tabCreated); - tabListener.off("tab-created", tabCreated); - - AllWindowEvents.removeListener("FullZoomChange", zoomListener); - AllWindowEvents.removeListener("TextZoomChange", zoomListener); - }; - }).api(), - }, - }; - return self; -}); diff --git a/application/basilisk/components/webextensions/ext-utils.js b/application/basilisk/components/webextensions/ext-utils.js deleted file mode 100644 index 75b2f4bd4..000000000 --- a/application/basilisk/components/webextensions/ext-utils.js +++ /dev/null @@ -1,1239 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI", - "resource:///modules/CustomizableUI.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Task", - "resource://gre/modules/Task.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "setTimeout", - "resource://gre/modules/Timer.jsm"); - -XPCOMUtils.defineLazyServiceGetter(this, "styleSheetService", - "@mozilla.org/content/style-sheet-service;1", - "nsIStyleSheetService"); - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -Cu.import("resource://gre/modules/AppConstants.jsm"); - -const POPUP_LOAD_TIMEOUT_MS = 200; - -const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; - -var { - DefaultWeakMap, - EventManager, - promiseEvent, -} = ExtensionUtils; - -// This file provides some useful code for the |tabs| and |windows| -// modules. All of the code is installed on |global|, which is a scope -// shared among the different ext-*.js scripts. - -global.makeWidgetId = id => { - id = id.toLowerCase(); - // FIXME: This allows for collisions. - return id.replace(/[^a-z0-9_-]/g, "_"); -}; - -function promisePopupShown(popup) { - return new Promise(resolve => { - if (popup.state == "open") { - resolve(); - } else { - popup.addEventListener("popupshown", function onPopupShown(event) { - popup.removeEventListener("popupshown", onPopupShown); - resolve(); - }); - } - }); -} - -XPCOMUtils.defineLazyGetter(this, "popupStylesheets", () => { - let stylesheets = ["chrome://browser/content/extension.css"]; - - if (AppConstants.platform === "macosx") { - stylesheets.push("chrome://browser/content/extension-mac.css"); - } - return stylesheets; -}); - -XPCOMUtils.defineLazyGetter(this, "standaloneStylesheets", () => { - let stylesheets = []; - - if (AppConstants.platform === "macosx") { - stylesheets.push("chrome://browser/content/extension-mac-panel.css"); - } - if (AppConstants.platform === "win") { - stylesheets.push("chrome://browser/content/extension-win-panel.css"); - } - return stylesheets; -}); - -class BasePopup { - constructor(extension, viewNode, popupURL, browserStyle, fixedWidth = false) { - this.extension = extension; - this.popupURL = popupURL; - this.viewNode = viewNode; - this.browserStyle = browserStyle; - this.window = viewNode.ownerGlobal; - this.destroyed = false; - this.fixedWidth = fixedWidth; - - extension.callOnClose(this); - - this.contentReady = new Promise(resolve => { - this._resolveContentReady = resolve; - }); - - this.viewNode.addEventListener(this.DESTROY_EVENT, this); - - let doc = viewNode.ownerDocument; - let arrowContent = doc.getAnonymousElementByAttribute(this.panel, "class", "panel-arrowcontent"); - this.borderColor = doc.defaultView.getComputedStyle(arrowContent).borderTopColor; - - this.browser = null; - this.browserLoaded = new Promise((resolve, reject) => { - this.browserLoadedDeferred = {resolve, reject}; - }); - this.browserReady = this.createBrowser(viewNode, popupURL); - - BasePopup.instances.get(this.window).set(extension, this); - } - - static for(extension, window) { - return BasePopup.instances.get(window).get(extension); - } - - close() { - this.closePopup(); - } - - destroy() { - this.extension.forgetOnClose(this); - - this.destroyed = true; - this.browserLoadedDeferred.reject(new Error("Popup destroyed")); - return this.browserReady.then(() => { - this.destroyBrowser(this.browser); - this.browser.remove(); - - this.viewNode.removeEventListener(this.DESTROY_EVENT, this); - this.viewNode.style.maxHeight = ""; - - if (this.panel) { - this.panel.style.removeProperty("--arrowpanel-background"); - this.panel.style.removeProperty("--panel-arrow-image-vertical"); - } - - BasePopup.instances.get(this.window).delete(this.extension); - - this.browser = null; - this.viewNode = null; - }); - } - - destroyBrowser(browser) { - let mm = browser.messageManager; - // If the browser has already been removed from the document, because the - // popup was closed externally, there will be no message manager here. - if (mm) { - mm.removeMessageListener("DOMTitleChanged", this); - mm.removeMessageListener("Extension:BrowserBackgroundChanged", this); - mm.removeMessageListener("Extension:BrowserContentLoaded", this); - mm.removeMessageListener("Extension:BrowserResized", this); - mm.removeMessageListener("Extension:DOMWindowClose", this); - } - } - - // Returns the name of the event fired on `viewNode` when the popup is being - // destroyed. This must be implemented by every subclass. - get DESTROY_EVENT() { - throw new Error("Not implemented"); - } - - get STYLESHEETS() { - let sheets = []; - - if (this.browserStyle) { - sheets.push(...popupStylesheets); - } - if (!this.fixedWidth) { - sheets.push(...standaloneStylesheets); - } - - return sheets; - } - - get panel() { - let panel = this.viewNode; - while (panel && panel.localName != "panel") { - panel = panel.parentNode; - } - return panel; - } - - receiveMessage({name, data}) { - switch (name) { - case "DOMTitleChanged": - this.viewNode.setAttribute("aria-label", this.browser.contentTitle); - break; - - case "Extension:BrowserBackgroundChanged": - this.setBackground(data.background); - break; - - case "Extension:BrowserContentLoaded": - this.browserLoadedDeferred.resolve(); - break; - - case "Extension:BrowserResized": - this._resolveContentReady(); - if (this.ignoreResizes) { - this.dimensions = data; - } else { - this.resizeBrowser(data); - } - break; - - case "Extension:DOMWindowClose": - this.closePopup(); - break; - } - } - - handleEvent(event) { - switch (event.type) { - case this.DESTROY_EVENT: - this.destroy(); - break; - } - } - - createBrowser(viewNode, popupURL = null) { - let document = viewNode.ownerDocument; - this.browser = document.createElementNS(XUL_NS, "browser"); - this.browser.setAttribute("type", "content"); - this.browser.setAttribute("disableglobalhistory", "true"); - this.browser.setAttribute("transparent", "true"); - this.browser.setAttribute("class", "webextension-popup-browser"); - this.browser.setAttribute("tooltip", "aHTMLTooltip"); - - // We only need flex sizing for the sake of the slide-in sub-views of the - // main menu panel, so that the browser occupies the full width of the view, - // and also takes up any extra height that's available to it. - this.browser.setAttribute("flex", "1"); - - // Note: When using noautohide panels, the popup manager will add width and - // height attributes to the panel, breaking our resize code, if the browser - // starts out smaller than 30px by 10px. This isn't an issue now, but it - // will be if and when we popup debugging. - - viewNode.appendChild(this.browser); - - extensions.emit("extension-browser-inserted", this.browser); - let windowId = WindowManager.getId(this.browser.ownerGlobal); - this.browser.messageManager.sendAsyncMessage("Extension:InitExtensionView", { - viewType: "popup", - windowId, - }); - // TODO(robwu): Rework this to use the Extension:ExtensionViewLoaded message - // to detect loads and so on. And definitely move this content logic inside - // a file in the child process. - - let initBrowser = browser => { - let mm = browser.messageManager; - mm.addMessageListener("DOMTitleChanged", this); - mm.addMessageListener("Extension:BrowserBackgroundChanged", this); - mm.addMessageListener("Extension:BrowserContentLoaded", this); - mm.addMessageListener("Extension:BrowserResized", this); - mm.addMessageListener("Extension:DOMWindowClose", this, true); - }; - - if (!popupURL) { - initBrowser(this.browser); - return this.browser; - } - - return promiseEvent(this.browser, "load").then(() => { - initBrowser(this.browser); - - let mm = this.browser.messageManager; - - mm.loadFrameScript( - "chrome://extensions/content/ext-browser-content.js", false); - - mm.sendAsyncMessage("Extension:InitBrowser", { - allowScriptsToClose: true, - fixedWidth: this.fixedWidth, - maxWidth: 800, - maxHeight: 600, - stylesheets: this.STYLESHEETS, - }); - - this.browser.setAttribute("src", popupURL); - }); - } - - resizeBrowser({width, height, detail}) { - if (this.fixedWidth) { - // Figure out how much extra space we have on the side of the panel - // opposite the arrow. - let side = this.panel.getAttribute("side") == "top" ? "bottom" : "top"; - let maxHeight = this.viewHeight + this.extraHeight[side]; - - height = Math.min(height, maxHeight); - this.browser.style.height = `${height}px`; - - // Set a maximum height on the <panelview> element to our preferred - // maximum height, so that the PanelUI resizing code can make an accurate - // calculation. If we don't do this, the flex sizing logic will prevent us - // from ever reporting a preferred size smaller than the height currently - // available to us in the panel. - height = Math.max(height, this.viewHeight); - this.viewNode.style.maxHeight = `${height}px`; - } else { - this.browser.style.width = `${width}px`; - this.browser.style.height = `${height}px`; - } - - let event = new this.window.CustomEvent("WebExtPopupResized", {detail}); - this.browser.dispatchEvent(event); - } - - setBackground(background) { - let panelBackground = ""; - let panelArrow = ""; - - if (background) { - let borderColor = this.borderColor || background; - - panelBackground = background; - panelArrow = `url("data:image/svg+xml,${encodeURIComponent(`<?xml version="1.0" encoding="UTF-8"?> - <svg xmlns="http://www.w3.org/2000/svg" width="20" height="10"> - <path d="M 0,10 L 10,0 20,10 z" fill="${borderColor}"/> - <path d="M 1,10 L 10,1 19,10 z" fill="${background}"/> - </svg> - `)}")`; - } - - this.panel.style.setProperty("--arrowpanel-background", panelBackground); - this.panel.style.setProperty("--panel-arrow-image-vertical", panelArrow); - this.background = background; - } -} - -/** - * A map of active popups for a given browser window. - * - * WeakMap[window -> WeakMap[Extension -> BasePopup]] - */ -BasePopup.instances = new DefaultWeakMap(() => new WeakMap()); - -class PanelPopup extends BasePopup { - constructor(extension, imageNode, popupURL, browserStyle) { - let document = imageNode.ownerDocument; - - let panel = document.createElement("panel"); - panel.setAttribute("id", makeWidgetId(extension.id) + "-panel"); - panel.setAttribute("class", "browser-extension-panel"); - panel.setAttribute("tabspecific", "true"); - panel.setAttribute("type", "arrow"); - panel.setAttribute("role", "group"); - - document.getElementById("mainPopupSet").appendChild(panel); - - super(extension, panel, popupURL, browserStyle); - - this.contentReady.then(() => { - panel.openPopup(imageNode, "bottomcenter topright", 0, 0, false, false); - - let event = new this.window.CustomEvent("WebExtPopupLoaded", { - bubbles: true, - detail: {extension}, - }); - this.browser.dispatchEvent(event); - }); - } - - get DESTROY_EVENT() { - return "popuphidden"; - } - - destroy() { - super.destroy(); - this.viewNode.remove(); - } - - closePopup() { - promisePopupShown(this.viewNode).then(() => { - // Make sure we're not already destroyed. - if (this.viewNode) { - this.viewNode.hidePopup(); - } - }); - } -} - -class ViewPopup extends BasePopup { - constructor(extension, window, popupURL, browserStyle, fixedWidth) { - let document = window.document; - - // Create a temporary panel to hold the browser while it pre-loads its - // content. This panel will never be shown, but the browser's docShell will - // be swapped with the browser in the real panel when it's ready. - let panel = document.createElement("panel"); - panel.setAttribute("type", "arrow"); - document.getElementById("mainPopupSet").appendChild(panel); - - super(extension, panel, popupURL, browserStyle, fixedWidth); - - this.ignoreResizes = true; - - this.attached = false; - this.tempPanel = panel; - - this.browser.classList.add("webextension-preload-browser"); - } - - /** - * Attaches the pre-loaded browser to the given view node, and reserves a - * promise which resolves when the browser is ready. - * - * @param {Element} viewNode - * The node to attach the browser to. - * @returns {Promise<boolean>} - * Resolves when the browser is ready. Resolves to `false` if the - * browser was destroyed before it was fully loaded, and the popup - * should be closed, or `true` otherwise. - */ - attach(viewNode) { - return Task.spawn(function* () { - this.viewNode = viewNode; - this.viewNode.addEventListener(this.DESTROY_EVENT, this); - - // Wait until the browser element is fully initialized, and give it at least - // a short grace period to finish loading its initial content, if necessary. - // - // In practice, the browser that was created by the mousdown handler should - // nearly always be ready by this point. - yield Promise.all([ - this.browserReady, - Promise.race([ - // This promise may be rejected if the popup calls window.close() - // before it has fully loaded. - this.browserLoaded.catch(() => {}), - new Promise(resolve => setTimeout(resolve, POPUP_LOAD_TIMEOUT_MS)), - ]), - ]); - - if (!this.destroyed && !this.panel) { - this.destroy(); - } - - if (this.destroyed) { - return false; - } - - this.attached = true; - - // Store the initial height of the view, so that we never resize menu panel - // sub-views smaller than the initial height of the menu. - this.viewHeight = this.viewNode.boxObject.height; - - // Calculate the extra height available on the screen above and below the - // menu panel. Use that to calculate the how much the sub-view may grow. - let popupRect = this.panel.getBoundingClientRect(); - - this.setBackground(this.background); - - let win = this.window; - let popupBottom = win.mozInnerScreenY + popupRect.bottom; - let popupTop = win.mozInnerScreenY + popupRect.top; - - let screenBottom = win.screen.availTop + win.screen.availHeight; - this.extraHeight = { - bottom: Math.max(0, screenBottom - popupBottom), - top: Math.max(0, popupTop - win.screen.availTop), - }; - - // Create a new browser in the real popup. - let browser = this.browser; - this.createBrowser(this.viewNode); - - this.browser.swapDocShells(browser); - this.destroyBrowser(browser); - - this.ignoreResizes = false; - if (this.dimensions) { - this.resizeBrowser(this.dimensions); - } - - this.tempPanel.remove(); - this.tempPanel = null; - - let event = new this.window.CustomEvent("WebExtPopupLoaded", { - bubbles: true, - detail: {extension: this.extension}, - }); - this.browser.dispatchEvent(event); - - return true; - }.bind(this)); - } - - destroy() { - return super.destroy().then(() => { - if (this.tempPanel) { - this.tempPanel.remove(); - this.tempPanel = null; - } - }); - } - - get DESTROY_EVENT() { - return "ViewHiding"; - } - - closePopup() { - if (this.attached) { - CustomizableUI.hidePanelForNode(this.viewNode); - } else { - this.destroy(); - } - } -} - -Object.assign(global, {PanelPopup, ViewPopup}); - -// Manages tab-specific context data, and dispatching tab select events -// across all windows. -global.TabContext = function TabContext(getDefaults, extension) { - this.extension = extension; - this.getDefaults = getDefaults; - - this.tabData = new WeakMap(); - this.lastLocation = new WeakMap(); - - AllWindowEvents.addListener("progress", this); - AllWindowEvents.addListener("TabSelect", this); - - EventEmitter.decorate(this); -}; - -TabContext.prototype = { - get(tab) { - if (!this.tabData.has(tab)) { - this.tabData.set(tab, this.getDefaults(tab)); - } - - return this.tabData.get(tab); - }, - - clear(tab) { - this.tabData.delete(tab); - }, - - handleEvent(event) { - if (event.type == "TabSelect") { - let tab = event.target; - this.emit("tab-select", tab); - this.emit("location-change", tab); - } - }, - - onStateChange(browser, webProgress, request, stateFlags, statusCode) { - let flags = Ci.nsIWebProgressListener; - - if (!(~stateFlags & (flags.STATE_IS_WINDOW | flags.STATE_START) || - this.lastLocation.has(browser))) { - this.lastLocation.set(browser, request.URI); - } - }, - - onLocationChange(browser, webProgress, request, locationURI, flags) { - let gBrowser = browser.ownerGlobal.gBrowser; - let lastLocation = this.lastLocation.get(browser); - if (browser === gBrowser.selectedBrowser && - !(lastLocation && lastLocation.equalsExceptRef(browser.currentURI))) { - let tab = gBrowser.getTabForBrowser(browser); - this.emit("location-change", tab, true); - } - this.lastLocation.set(browser, browser.currentURI); - }, - - shutdown() { - AllWindowEvents.removeListener("progress", this); - AllWindowEvents.removeListener("TabSelect", this); - }, -}; - -// Manages tab mappings and permissions for a specific extension. -function ExtensionTabManager(extension) { - this.extension = extension; - - // A mapping of tab objects to the inner window ID the extension currently has - // the active tab permission for. The active permission for a given tab is - // valid only for the inner window that was active when the permission was - // granted. If the tab navigates, the inner window ID changes, and the - // permission automatically becomes stale. - // - // WeakMap[tab => inner-window-id<int>] - this.hasTabPermissionFor = new WeakMap(); -} - -ExtensionTabManager.prototype = { - addActiveTabPermission(tab = TabManager.activeTab) { - if (this.extension.hasPermission("activeTab")) { - // Note that, unlike Chrome, we don't currently clear this permission with - // the tab navigates. If the inner window is revived from BFCache before - // we've granted this permission to a new inner window, the extension - // maintains its permissions for it. - this.hasTabPermissionFor.set(tab, tab.linkedBrowser.innerWindowID); - } - }, - - revokeActiveTabPermission(tab = TabManager.activeTab) { - this.hasTabPermissionFor.delete(tab); - }, - - // Returns true if the extension has the "activeTab" permission for this tab. - // This is somewhat more permissive than the generic "tabs" permission, as - // checked by |hasTabPermission|, in that it also allows programmatic script - // injection without an explicit host permission. - hasActiveTabPermission(tab) { - // This check is redundant with addTabPermission, but cheap. - if (this.extension.hasPermission("activeTab")) { - return (this.hasTabPermissionFor.has(tab) && - this.hasTabPermissionFor.get(tab) === tab.linkedBrowser.innerWindowID); - } - return false; - }, - - hasTabPermission(tab) { - return this.extension.hasPermission("tabs") || this.hasActiveTabPermission(tab); - }, - - convert(tab) { - let window = tab.ownerGlobal; - let browser = tab.linkedBrowser; - - let mutedInfo = {muted: tab.muted}; - if (tab.muteReason === null) { - mutedInfo.reason = "user"; - } else if (tab.muteReason) { - mutedInfo.reason = "extension"; - mutedInfo.extensionId = tab.muteReason; - } - - let result = { - id: TabManager.getId(tab), - index: tab._tPos, - windowId: WindowManager.getId(window), - selected: tab.selected, - highlighted: tab.selected, - active: tab.selected, - pinned: tab.pinned, - status: TabManager.getStatus(tab), - incognito: WindowManager.isBrowserPrivate(browser), - width: browser.frameLoader.lazyWidth || browser.clientWidth, - height: browser.frameLoader.lazyHeight || browser.clientHeight, - audible: tab.soundPlaying, - mutedInfo, - }; - if (this.extension.hasPermission("cookies")) { - result.cookieStoreId = getCookieStoreIdForTab(result, tab); - } - - if (this.hasTabPermission(tab)) { - result.url = browser.currentURI.spec; - let title = browser.contentTitle || tab.label; - if (title) { - result.title = title; - } - let icon = window.gBrowser.getIcon(tab); - if (icon) { - result.favIconUrl = icon; - } - } - - return result; - }, - - // Converts tabs returned from SessionStore.getClosedTabData and - // SessionStore.getClosedWindowData into API tab objects - convertFromSessionStoreClosedData(tab, window) { - let result = { - sessionId: String(tab.closedId), - index: tab.pos ? tab.pos : 0, - windowId: WindowManager.getId(window), - selected: false, - highlighted: false, - active: false, - pinned: false, - incognito: Boolean(tab.state && tab.state.isPrivate), - }; - - if (this.hasTabPermission(tab)) { - let entries = tab.state ? tab.state.entries : tab.entries; - result.url = entries[0].url; - result.title = entries[0].title; - if (tab.image) { - result.favIconUrl = tab.image; - } - } - - return result; - }, - - getTabs(window) { - return Array.from(window.gBrowser.tabs) - .filter(tab => !tab.closing) - .map(tab => this.convert(tab)); - }, -}; - -// Sends the tab and windowId upon request. This is primarily used to support -// the synchronous `browser.extension.getViews` API. -let onGetTabAndWindowId = { - receiveMessage({name, target, sync}) { - let {gBrowser} = target.ownerGlobal; - let tab = gBrowser && gBrowser.getTabForBrowser(target); - if (tab) { - let reply = { - tabId: TabManager.getId(tab), - windowId: WindowManager.getId(tab.ownerGlobal), - }; - if (sync) { - return reply; - } - target.messageManager.sendAsyncMessage("Extension:SetTabAndWindowId", reply); - } - }, -}; -/* eslint-disable mozilla/balanced-listeners */ -Services.mm.addMessageListener("Extension:GetTabAndWindowId", onGetTabAndWindowId); -/* eslint-enable mozilla/balanced-listeners */ - - -// Manages global mappings between XUL tabs and extension tab IDs. -global.TabManager = { - _tabs: new WeakMap(), - _nextId: 1, - _initialized: false, - - // We begin listening for TabOpen and TabClose events once we've started - // assigning IDs to tabs, so that we can remap the IDs of tabs which are moved - // between windows. - initListener() { - if (this._initialized) { - return; - } - - AllWindowEvents.addListener("TabOpen", this); - AllWindowEvents.addListener("TabClose", this); - WindowListManager.addOpenListener(this.handleWindowOpen.bind(this)); - - this._initialized = true; - }, - - handleEvent(event) { - if (event.type == "TabOpen") { - let {adoptedTab} = event.detail; - if (adoptedTab) { - // This tab is being created to adopt a tab from a different window. - // Copy the ID from the old tab to the new. - let tab = event.target; - this._tabs.set(tab, this.getId(adoptedTab)); - - tab.linkedBrowser.messageManager.sendAsyncMessage("Extension:SetTabAndWindowId", { - windowId: WindowManager.getId(tab.ownerGlobal), - }); - } - } else if (event.type == "TabClose") { - let {adoptedBy} = event.detail; - if (adoptedBy) { - // This tab is being closed because it was adopted by a new window. - // Copy its ID to the new tab, in case it was created as the first tab - // of a new window, and did not have an `adoptedTab` detail when it was - // opened. - this._tabs.set(adoptedBy, this.getId(event.target)); - - adoptedBy.linkedBrowser.messageManager.sendAsyncMessage("Extension:SetTabAndWindowId", { - windowId: WindowManager.getId(adoptedBy), - }); - } - } - }, - - handleWindowOpen(window) { - if (window.arguments && window.arguments[0] instanceof window.XULElement) { - // If the first window argument is a XUL element, it means the - // window is about to adopt a tab from another window to replace its - // initial tab. - let adoptedTab = window.arguments[0]; - - this._tabs.set(window.gBrowser.tabs[0], this.getId(adoptedTab)); - } - }, - - getId(tab) { - if (this._tabs.has(tab)) { - return this._tabs.get(tab); - } - this.initListener(); - - let id = this._nextId++; - this._tabs.set(tab, id); - return id; - }, - - getBrowserId(browser) { - let gBrowser = browser.ownerGlobal.gBrowser; - // Some non-browser windows have gBrowser but not - // getTabForBrowser! - if (gBrowser && gBrowser.getTabForBrowser) { - let tab = gBrowser.getTabForBrowser(browser); - if (tab) { - return this.getId(tab); - } - } - return -1; - }, - - /** - * Returns the XUL <tab> element associated with the given tab ID. If no tab - * with the given ID exists, and no default value is provided, an error is - * raised, belonging to the scope of the given context. - * - * @param {integer} tabId - * The ID of the tab to retrieve. - * @param {ExtensionContext} context - * The context of the caller. - * This value may be omitted if `default_` is not `undefined`. - * @param {*} default_ - * The value to return if no tab exists with the given ID. - * @returns {Element<tab>} - * A XUL <tab> element. - */ - getTab(tabId, context, default_ = undefined) { - // FIXME: Speed this up without leaking memory somehow. - for (let window of WindowListManager.browserWindows()) { - if (!window.gBrowser) { - continue; - } - for (let tab of window.gBrowser.tabs) { - if (this.getId(tab) == tabId) { - return tab; - } - } - } - if (default_ !== undefined) { - return default_; - } - throw new context.cloneScope.Error(`Invalid tab ID: ${tabId}`); - }, - - get activeTab() { - let window = WindowManager.topWindow; - if (window && window.gBrowser) { - return window.gBrowser.selectedTab; - } - return null; - }, - - getStatus(tab) { - return tab.getAttribute("busy") == "true" ? "loading" : "complete"; - }, - - convert(extension, tab) { - return TabManager.for(extension).convert(tab); - }, -}; - -// WeakMap[Extension -> ExtensionTabManager] -let tabManagers = new WeakMap(); - -// Returns the extension-specific tab manager for the given extension, or -// creates one if it doesn't already exist. -TabManager.for = function(extension) { - if (!tabManagers.has(extension)) { - tabManagers.set(extension, new ExtensionTabManager(extension)); - } - return tabManagers.get(extension); -}; - -/* eslint-disable mozilla/balanced-listeners */ -extensions.on("shutdown", (type, extension) => { - tabManagers.delete(extension); -}); -/* eslint-enable mozilla/balanced-listeners */ - -function memoize(fn) { - let weakMap = new DefaultWeakMap(fn); - return weakMap.get.bind(weakMap); -} - -// Manages mapping between XUL windows and extension window IDs. -global.WindowManager = { - _windows: new WeakMap(), - _nextId: 0, - - // Note: These must match the values in windows.json. - WINDOW_ID_NONE: -1, - WINDOW_ID_CURRENT: -2, - - get topWindow() { - return Services.wm.getMostRecentWindow("navigator:browser"); - }, - - windowType(window) { - // TODO: Make this work. - - let {chromeFlags} = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDocShell) - .treeOwner.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIXULWindow); - - if (chromeFlags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_DIALOG) { - return "popup"; - } - - return "normal"; - }, - - updateGeometry(window, options) { - if (options.left !== null || options.top !== null) { - let left = options.left !== null ? options.left : window.screenX; - let top = options.top !== null ? options.top : window.screenY; - window.moveTo(left, top); - } - - if (options.width !== null || options.height !== null) { - let width = options.width !== null ? options.width : window.outerWidth; - let height = options.height !== null ? options.height : window.outerHeight; - window.resizeTo(width, height); - } - }, - - isBrowserPrivate: memoize(browser => { - return PrivateBrowsingUtils.isBrowserPrivate(browser); - }), - - getId(window) { - if (this._windows.has(window)) { - return this._windows.get(window); - } - let id = this._nextId++; - this._windows.set(window, id); - return id; - }, - - getWindow(id, context) { - if (id == this.WINDOW_ID_CURRENT) { - return currentWindow(context); - } - - for (let window of WindowListManager.browserWindows(true)) { - if (this.getId(window) == id) { - return window; - } - } - return null; - }, - - getState(window) { - const STATES = { - [window.STATE_MAXIMIZED]: "maximized", - [window.STATE_MINIMIZED]: "minimized", - [window.STATE_NORMAL]: "normal", - }; - let state = STATES[window.windowState]; - if (window.fullScreen) { - state = "fullscreen"; - } - return state; - }, - - setState(window, state) { - if (state != "fullscreen" && window.fullScreen) { - window.fullScreen = false; - } - - switch (state) { - case "maximized": - window.maximize(); - break; - - case "minimized": - case "docked": - window.minimize(); - break; - - case "normal": - // Restore sometimes returns the window to its previous state, rather - // than to the "normal" state, so it may need to be called anywhere from - // zero to two times. - window.restore(); - if (window.windowState != window.STATE_NORMAL) { - window.restore(); - } - if (window.windowState != window.STATE_NORMAL) { - // And on OS-X, where normal vs. maximized is basically a heuristic, - // we need to cheat. - window.sizeToContent(); - } - break; - - case "fullscreen": - window.fullScreen = true; - break; - - default: - throw new Error(`Unexpected window state: ${state}`); - } - }, - - convert(extension, window, getInfo) { - let xulWindow = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDocShell) - .treeOwner.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIXULWindow); - - let result = { - id: this.getId(window), - focused: window.document.hasFocus(), - top: window.screenY, - left: window.screenX, - width: window.outerWidth, - height: window.outerHeight, - incognito: PrivateBrowsingUtils.isWindowPrivate(window), - type: this.windowType(window), - state: this.getState(window), - alwaysOnTop: xulWindow.zLevel >= Ci.nsIXULWindow.raisedZ, - }; - - if (getInfo && getInfo.populate) { - result.tabs = TabManager.for(extension).getTabs(window); - } - - return result; - }, - - // Converts windows returned from SessionStore.getClosedWindowData - // into API window objects - convertFromSessionStoreClosedData(window, extension) { - let result = { - sessionId: String(window.closedId), - focused: false, - incognito: false, - type: "normal", // this is always "normal" for a closed window - state: this.getState(window), - alwaysOnTop: false, - }; - - if (window.tabs.length) { - result.tabs = []; - window.tabs.forEach((tab, index) => { - result.tabs.push(TabManager.for(extension).convertFromSessionStoreClosedData(tab, window, index)); - }); - } - - return result; - }, -}; - -// Manages listeners for window opening and closing. A window is -// considered open when the "load" event fires on it. A window is -// closed when a "domwindowclosed" notification fires for it. -global.WindowListManager = { - _openListeners: new Set(), - _closeListeners: new Set(), - - // Returns an iterator for all browser windows. Unless |includeIncomplete| is - // true, only fully-loaded windows are returned. - * browserWindows(includeIncomplete = false) { - // The window type parameter is only available once the window's document - // element has been created. This means that, when looking for incomplete - // browser windows, we need to ignore the type entirely for windows which - // haven't finished loading, since we would otherwise skip browser windows - // in their early loading stages. - // This is particularly important given that the "domwindowcreated" event - // fires for browser windows when they're in that in-between state, and just - // before we register our own "domwindowcreated" listener. - - let e = Services.wm.getEnumerator(""); - while (e.hasMoreElements()) { - let window = e.getNext(); - - let ok = includeIncomplete; - if (window.document.readyState == "complete") { - ok = window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; - } - - if (ok) { - yield window; - } - } - }, - - addOpenListener(listener) { - if (this._openListeners.size == 0 && this._closeListeners.size == 0) { - Services.ww.registerNotification(this); - } - this._openListeners.add(listener); - - for (let window of this.browserWindows(true)) { - if (window.document.readyState != "complete") { - window.addEventListener("load", this); - } - } - }, - - removeOpenListener(listener) { - this._openListeners.delete(listener); - if (this._openListeners.size == 0 && this._closeListeners.size == 0) { - Services.ww.unregisterNotification(this); - } - }, - - addCloseListener(listener) { - if (this._openListeners.size == 0 && this._closeListeners.size == 0) { - Services.ww.registerNotification(this); - } - this._closeListeners.add(listener); - }, - - removeCloseListener(listener) { - this._closeListeners.delete(listener); - if (this._openListeners.size == 0 && this._closeListeners.size == 0) { - Services.ww.unregisterNotification(this); - } - }, - - handleEvent(event) { - event.currentTarget.removeEventListener(event.type, this); - let window = event.target.defaultView; - if (window.document.documentElement.getAttribute("windowtype") != "navigator:browser") { - return; - } - - for (let listener of this._openListeners) { - listener(window); - } - }, - - observe(window, topic, data) { - if (topic == "domwindowclosed") { - if (window.document.documentElement.getAttribute("windowtype") != "navigator:browser") { - return; - } - - window.removeEventListener("load", this); - for (let listener of this._closeListeners) { - listener(window); - } - } else { - window.addEventListener("load", this); - } - }, -}; - -// Provides a facility to listen for DOM events across all XUL windows. -global.AllWindowEvents = { - _listeners: new Map(), - - // If |type| is a normal event type, invoke |listener| each time - // that event fires in any open window. If |type| is "progress", add - // a web progress listener that covers all open windows. - addListener(type, listener) { - if (type == "domwindowopened") { - return WindowListManager.addOpenListener(listener); - } else if (type == "domwindowclosed") { - return WindowListManager.addCloseListener(listener); - } - - if (this._listeners.size == 0) { - WindowListManager.addOpenListener(this.openListener); - } - - if (!this._listeners.has(type)) { - this._listeners.set(type, new Set()); - } - let list = this._listeners.get(type); - list.add(listener); - - // Register listener on all existing windows. - for (let window of WindowListManager.browserWindows()) { - this.addWindowListener(window, type, listener); - } - }, - - removeListener(eventType, listener) { - if (eventType == "domwindowopened") { - return WindowListManager.removeOpenListener(listener); - } else if (eventType == "domwindowclosed") { - return WindowListManager.removeCloseListener(listener); - } - - let listeners = this._listeners.get(eventType); - listeners.delete(listener); - if (listeners.size == 0) { - this._listeners.delete(eventType); - if (this._listeners.size == 0) { - WindowListManager.removeOpenListener(this.openListener); - } - } - - // Unregister listener from all existing windows. - let useCapture = eventType === "focus" || eventType === "blur"; - for (let window of WindowListManager.browserWindows()) { - if (eventType == "progress") { - window.gBrowser.removeTabsProgressListener(listener); - } else { - window.removeEventListener(eventType, listener, useCapture); - } - } - }, - - /* eslint-disable mozilla/balanced-listeners */ - addWindowListener(window, eventType, listener) { - let useCapture = eventType === "focus" || eventType === "blur"; - - if (eventType == "progress") { - window.gBrowser.addTabsProgressListener(listener); - } else { - window.addEventListener(eventType, listener, useCapture); - } - }, - /* eslint-enable mozilla/balanced-listeners */ - - // Runs whenever the "load" event fires for a new window. - openListener(window) { - for (let [eventType, listeners] of AllWindowEvents._listeners) { - for (let listener of listeners) { - this.addWindowListener(window, eventType, listener); - } - } - }, -}; - -AllWindowEvents.openListener = AllWindowEvents.openListener.bind(AllWindowEvents); - -// Subclass of EventManager where we just need to call -// add/removeEventListener on each XUL window. -global.WindowEventManager = function(context, name, event, listener) { - EventManager.call(this, context, name, fire => { - let listener2 = (...args) => listener(fire, ...args); - AllWindowEvents.addListener(event, listener2); - return () => { - AllWindowEvents.removeListener(event, listener2); - }; - }); -}; - -WindowEventManager.prototype = Object.create(EventManager.prototype); diff --git a/application/basilisk/components/webextensions/ext-windows.js b/application/basilisk/components/webextensions/ext-windows.js deleted file mode 100644 index 5956ae15b..000000000 --- a/application/basilisk/components/webextensions/ext-windows.js +++ /dev/null @@ -1,231 +0,0 @@ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ -"use strict"; - -XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService", - "@mozilla.org/browser/aboutnewtab-service;1", - "nsIAboutNewTabService"); -XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", - "resource://gre/modules/AppConstants.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -var { - EventManager, - promiseObserved, -} = ExtensionUtils; - -function onXULFrameLoaderCreated({target}) { - target.messageManager.sendAsyncMessage("AllowScriptsToClose", {}); -} - -extensions.registerSchemaAPI("windows", "addon_parent", context => { - let {extension} = context; - return { - windows: { - onCreated: - new WindowEventManager(context, "windows.onCreated", "domwindowopened", (fire, window) => { - fire(WindowManager.convert(extension, window)); - }).api(), - - onRemoved: - new WindowEventManager(context, "windows.onRemoved", "domwindowclosed", (fire, window) => { - fire(WindowManager.getId(window)); - }).api(), - - onFocusChanged: new EventManager(context, "windows.onFocusChanged", fire => { - // Keep track of the last windowId used to fire an onFocusChanged event - let lastOnFocusChangedWindowId; - - let listener = event => { - // Wait a tick to avoid firing a superfluous WINDOW_ID_NONE - // event when switching focus between two Firefox windows. - Promise.resolve().then(() => { - let window = Services.focus.activeWindow; - let windowId = window ? WindowManager.getId(window) : WindowManager.WINDOW_ID_NONE; - if (windowId !== lastOnFocusChangedWindowId) { - fire(windowId); - lastOnFocusChangedWindowId = windowId; - } - }); - }; - AllWindowEvents.addListener("focus", listener); - AllWindowEvents.addListener("blur", listener); - return () => { - AllWindowEvents.removeListener("focus", listener); - AllWindowEvents.removeListener("blur", listener); - }; - }).api(), - - get: function(windowId, getInfo) { - let window = WindowManager.getWindow(windowId, context); - return Promise.resolve(WindowManager.convert(extension, window, getInfo)); - }, - - getCurrent: function(getInfo) { - let window = currentWindow(context); - return Promise.resolve(WindowManager.convert(extension, window, getInfo)); - }, - - getLastFocused: function(getInfo) { - let window = WindowManager.topWindow; - return Promise.resolve(WindowManager.convert(extension, window, getInfo)); - }, - - getAll: function(getInfo) { - let windows = Array.from(WindowListManager.browserWindows(), - window => WindowManager.convert(extension, window, getInfo)); - return Promise.resolve(windows); - }, - - create: function(createData) { - let needResize = (createData.left !== null || createData.top !== null || - createData.width !== null || createData.height !== null); - - if (needResize) { - if (createData.state !== null && createData.state != "normal") { - return Promise.reject({message: `"state": "${createData.state}" may not be combined with "left", "top", "width", or "height"`}); - } - createData.state = "normal"; - } - - function mkstr(s) { - let result = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); - result.data = s; - return result; - } - - let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray); - - if (createData.tabId !== null) { - if (createData.url !== null) { - return Promise.reject({message: "`tabId` may not be used in conjunction with `url`"}); - } - - if (createData.allowScriptsToClose) { - return Promise.reject({message: "`tabId` may not be used in conjunction with `allowScriptsToClose`"}); - } - - let tab = TabManager.getTab(createData.tabId, context); - - // Private browsing tabs can only be moved to private browsing - // windows. - let incognito = PrivateBrowsingUtils.isBrowserPrivate(tab.linkedBrowser); - if (createData.incognito !== null && createData.incognito != incognito) { - return Promise.reject({message: "`incognito` property must match the incognito state of tab"}); - } - createData.incognito = incognito; - - args.appendElement(tab, /* weak = */ false); - } else if (createData.url !== null) { - if (Array.isArray(createData.url)) { - let array = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray); - for (let url of createData.url) { - array.appendElement(mkstr(url), /* weak = */ false); - } - args.appendElement(array, /* weak = */ false); - } else { - args.appendElement(mkstr(createData.url), /* weak = */ false); - } - } else { - args.appendElement(mkstr(aboutNewTabService.newTabURL), /* weak = */ false); - } - - let features = ["chrome"]; - - if (createData.type === null || createData.type == "normal") { - features.push("dialog=no", "all"); - } else { - // All other types create "popup"-type windows by default. - features.push("dialog", "resizable", "minimizable", "centerscreen", "titlebar", "close"); - } - - if (createData.incognito !== null) { - if (createData.incognito) { - features.push("private"); - } else { - features.push("non-private"); - } - } - - let {allowScriptsToClose, url} = createData; - if (allowScriptsToClose === null) { - allowScriptsToClose = typeof url === "string" && url.startsWith("moz-extension://"); - } - - let window = Services.ww.openWindow(null, "chrome://browser/content/browser.xul", "_blank", - features.join(","), args); - - WindowManager.updateGeometry(window, createData); - - // TODO: focused, type - - return new Promise(resolve => { - window.addEventListener("load", function listener() { - window.removeEventListener("load", listener); - if (["maximized", "normal"].includes(createData.state)) { - window.document.documentElement.setAttribute("sizemode", createData.state); - } - resolve(promiseObserved("browser-delayed-startup-finished", win => win == window)); - }); - }).then(() => { - // Some states only work after delayed-startup-finished - if (["minimized", "fullscreen", "docked"].includes(createData.state)) { - WindowManager.setState(window, createData.state); - } - if (allowScriptsToClose) { - for (let {linkedBrowser} of window.gBrowser.tabs) { - onXULFrameLoaderCreated({target: linkedBrowser}); - linkedBrowser.addEventListener( // eslint-disable-line mozilla/balanced-listeners - "XULFrameLoaderCreated", onXULFrameLoaderCreated); - } - } - return WindowManager.convert(extension, window, {populate: true}); - }); - }, - - update: function(windowId, updateInfo) { - if (updateInfo.state !== null && updateInfo.state != "normal") { - if (updateInfo.left !== null || updateInfo.top !== null || - updateInfo.width !== null || updateInfo.height !== null) { - return Promise.reject({message: `"state": "${updateInfo.state}" may not be combined with "left", "top", "width", or "height"`}); - } - } - - let window = WindowManager.getWindow(windowId, context); - if (updateInfo.focused) { - Services.focus.activeWindow = window; - } - - if (updateInfo.state !== null) { - WindowManager.setState(window, updateInfo.state); - } - - if (updateInfo.drawAttention) { - // Bug 1257497 - Firefox can't cancel attention actions. - window.getAttention(); - } - - WindowManager.updateGeometry(window, updateInfo); - - // TODO: All the other properties, focused=false... - - return Promise.resolve(WindowManager.convert(extension, window)); - }, - - remove: function(windowId) { - let window = WindowManager.getWindow(windowId, context); - window.close(); - - return new Promise(resolve => { - let listener = () => { - AllWindowEvents.removeListener("domwindowclosed", listener); - resolve(); - }; - AllWindowEvents.addListener("domwindowclosed", listener); - }); - }, - }, - }; -}); diff --git a/application/basilisk/components/webextensions/extension-mac-panel.css b/application/basilisk/components/webextensions/extension-mac-panel.css deleted file mode 100644 index 2e9ed6bdb..000000000 --- a/application/basilisk/components/webextensions/extension-mac-panel.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - border-radius: 3.5px; -} diff --git a/application/basilisk/components/webextensions/extension-mac.css b/application/basilisk/components/webextensions/extension-mac.css deleted file mode 100644 index 49cd3b359..000000000 --- a/application/basilisk/components/webextensions/extension-mac.css +++ /dev/null @@ -1,11 +0,0 @@ -button, -select, -input[type="checkbox"] + label::before { - border-radius: 4px; -} - -.panel-section-footer { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - overflow: hidden; -} diff --git a/application/basilisk/components/webextensions/extension-win-panel.css b/application/basilisk/components/webextensions/extension-win-panel.css deleted file mode 100644 index 9da6da14c..000000000 --- a/application/basilisk/components/webextensions/extension-win-panel.css +++ /dev/null @@ -1,5 +0,0 @@ -@media (-moz-os-version: windows-win7) { - body { - border-radius: 4px; - } -} diff --git a/application/basilisk/components/webextensions/extension.css b/application/basilisk/components/webextensions/extension.css deleted file mode 100644 index 6b59033e3..000000000 --- a/application/basilisk/components/webextensions/extension.css +++ /dev/null @@ -1,572 +0,0 @@ -/* stylelint-disable property-no-vendor-prefix */ -/* stylelint-disable property-no-vendor-prefix */ -/* Base */ -button, -select, -option, -input { - -moz-appearance: none; -} - -/* Variables */ -html, -body { - background: transparent; - box-sizing: border-box; - color: #222426; - cursor: default; - display: flex; - flex-direction: column; - font: caption; - margin: 0; - padding: 0; - -moz-user-select: none; -} - -body * { - box-sizing: border-box; - text-align: start; -} - -/* stylelint-disable property-no-vendor-prefix */ -/* Buttons */ -button, -select { - background-color: #fbfbfb; - border: 1px solid #b1b1b1; - box-shadow: 0 0 0 0 transparent; - font: caption; - height: 24px; - outline: 0 !important; - padding: 0 8px 0; - transition-duration: 250ms; - transition-property: box-shadow, border; -} - -select { - background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==); - background-position: calc(100% - 4px) center; - background-repeat: no-repeat; - padding-inline-end: 24px; - text-overflow: ellipsis; -} - -label { - font: caption; -} - -button::-moz-focus-inner { - border: 0; - outline: 0; -} - -/* Dropdowns */ -select { - background-color: #fbfbfb; - border: 1px solid #b1b1b1; - box-shadow: 0 0 0 0 transparent; - font: caption; - height: 24px; - outline: 0 !important; - padding: 0 8px 0; - transition-duration: 250ms; - transition-property: box-shadow, border; -} - -select { - background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==); - background-position: calc(100% - 4px) center; - background-repeat: no-repeat; - padding-inline-end: 24px; - text-overflow: ellipsis; -} - -select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 #000; -} - -select:-moz-focusring * { - color: #000; - text-shadow: none; -} - -button.hover, -select.hover { - background-color: #ebebeb; - border: 1px solid #b1b1b1; -} - -button.pressed, -select.pressed { - background-color: #d4d4d4; - border: 1px solid #858585; -} - -button.disabled, -select.disabled { - color: #999; - opacity: .5; -} - -button.focused, -select.focused { - border-color: #fff; - box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75); -} - -button.default { - background-color: #0996f8; - border-color: #0670cc; - color: #fff; -} - -button.default.hover { - background-color: #0670cc; - border-color: #005bab; -} - -button.default.pressed { - background-color: #005bab; - border-color: #004480; -} - -button.default.focused { - border-color: #fff; -} - -/* Radio Buttons */ -.radioItem { - margin-bottom: 6px; - text-align: left; -} - -input[type="radio"] { - display: none; -} - -input[type="radio"] + label { - -moz-user-select: none; -} - -input[type="radio"] + label::before { - background-color: #fff; - background-position: center; - border: 1px solid #b1b1b1; - border-radius: 50%; - content: ""; - display: inline-block; - height: 16px; - margin-right: 6px; - vertical-align: text-top; - width: 16px; -} - -input[type="radio"]:hover + label::before, -.radioItem.hover input[type="radio"]:not(active) + label::before { - background-color: #fbfbfb; - border-color: #b1b1b1; -} - -input[type="radio"]:hover:active + label::before, -.radioItem.pressed input[type="radio"]:not(active) + label::before { - background-color: #ebebeb; - border-color: #858585; -} - -input[type="radio"]:checked + label::before { - background-color: #0996f8; - background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iOCIgcj0iNCIgZmlsbD0iI2ZmZiIgLz4KPC9zdmc+Cg==); - border-color: #0670cc; -} - -input[type="radio"]:checked:hover + label::before, -.radioItem.hover input[type="radio"]:checked:not(active) + label::before { - background-color: #0670cc; - border-color: #005bab; -} - -input[type="radio"]:checked:hover:active + label::before, -.radioItem.pressed input[type="radio"]:checked:not(active) + label::before { - background-color: #005bab; - border-color: #004480; -} - -.radioItem.disabled input[type="radio"] + label, -.radioItem.disabled input[type="radio"]:hover + label, -.radioItem.disabled input[type="radio"]:hover:active + label { - color: #999; - opacity: .5; -} - -.radioItem.focused input[type="radio"] + label::before { - border-color: #0996f8; - box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75); -} - -.radioItem.focused input[type="radio"]:checked + label::before { - border-color: #fff; -} - -/* Checkboxes */ -.checkboxItem { - margin-bottom: 6px; - text-align: left; -} - -input[type="checkbox"] { - display: none; -} - -input[type="checkbox"] + label { - -moz-user-select: none; -} - -input[type="checkbox"] + label::before { - background-color: #fff; - background-position: center; - border: 1px solid #b1b1b1; - content: ""; - display: inline-block; - height: 16px; - margin-right: 6px; - vertical-align: text-top; - width: 16px; -} - -input[type="checkbox"]:hover + label::before, -.checkboxItem.hover input[type="checkbox"]:not(active) + label::before { - background-color: #fbfbfb; - border-color: #b1b1b1; -} - -input[type="checkbox"]:hover:active + label::before, -.checkboxItem.pressed input[type="checkbox"]:not(active) + label::before { - background-color: #ebebeb; - border-color: #858585; -} - -input[type="checkbox"]:checked + label::before { - background-color: #0996f8; - background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNNy43LDEyLjkgQzcuNCwxMy4zIDYuOCwxMy40IDYuNCwxMyBMMy4yLDkuOCBDMi44LDkuNCAyLjgsOC42IDMuMiw4LjIgQzMuNiw3LjggNC40LDcuOCA0LjgsOC4yIEw2LjksMTAuMyBMMTEuMSw0LjQgQzExLjUsMy45IDEyLjIsMy44IDEyLjcsNC4xIEMxMy4yLDQuNSAxMy4zLDUuMiAxMyw1LjcgTDcuNywxMi45IEw3LjcsMTIuOSBaIiBmaWxsPSIjZmZmIiAvPgo8L3N2Zz4K); - border-color: #0670cc; -} - -input[type="checkbox"]:checked:hover + label::before, -.checkboxItem.hover input[type="checkbox"]:checked:not(active) + label::before { - background-color: #0670cc; - border-color: #005bab; -} - -input[type="checkbox"]:checked:hover:active + label::before, -.checkboxItem.pressed input[type="checkbox"]:checked:not(active) + label::before { - background-color: #005bab; - border-color: #004480; -} - -.checkboxItem.disabled input[type="checkbox"] + label, -.checkboxItem.disabled input[type="checkbox"]:hover + label, -.checkboxItem.disabled input[type="checkbox"]:hover:active + label { - color: #999; - opacity: .5; -} - -.checkboxItem.focused input[type="checkbox"] + label::before { - border-color: #0996f8; - box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75); -} - -.checkboxItem.focused input[type="checkbox"]:checked + label::before { - border-color: #fff; -} - -/* Expander Button */ -button.expander { - background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==); - background-position: center; - background-repeat: no-repeat; - height: 24px; - padding: 0; - width: 24px; -} - -/* Interactive States */ -button:hover:not(.pressed):not(.disabled):not(.focused), -select:hover:not(.pressed):not(.disabled):not(.focused) { - background-color: #ebebeb; - border: 1px solid #b1b1b1; -} - -button:hover:active:not(.hover):not(.disabled):not(.focused), -select:hover:active:not(.hover):not(.disabled):not(.focused) { - background-color: #d4d4d4; - border: 1px solid #858585; -} - -button.default:hover:not(.pressed):not(.disabled):not(.focused) { - background-color: #0670cc; - border-color: #005bab; -} - -button.default:hover:active:not(.hover):not(.disabled):not(.focused) { - background-color: #005bab; - border-color: #004480; -} - -button:focus:not(.disabled) { - border-color: #fff !important; - box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75); -} - -/* Fields */ -input[type="text"], -textarea { - background-color: #fff; - border: 1px solid #b1b1b1; - box-shadow: 0 0 0 0 rgba(97, 181, 255, 0); - font: caption; - padding: 0 6px 0; - transition-duration: 250ms; - transition-property: box-shadow; -} - -input[type="text"] { - height: 24px; -} - -input[type="text"].hover, -textarea.hover { - border: 1px solid #858585; -} - -input[type="text"].disabled, -textarea.disabled { - color: #999; - opacity: .5; -} - -input[type="text"].focused, -textarea.focused { - border-color: #0996f8; - box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75); -} - -/* Interactive States */ -input[type="text"]:not(disabled):hover, -textarea:not(disabled):hover { - border: 1px solid #858585; -} - -input[type="text"]:focus, -input[type="text"]:focus:hover, -textarea:focus, -textarea:focus:hover { - border-color: #0996f8; - box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75); -} - -/* stylelint-disable property-no-vendor-prefix */ -.panel-section { - display: flex; - flex-direction: row; -} - -.panel-section-separator { - background-color: rgba(0, 0, 0, 0.15); - min-height: 1px; -} - -/* Panel Section - Header */ -.panel-section-header { - border-bottom: 1px solid rgba(0, 0, 0, 0.15); - padding: 16px; -} - -.panel-section-header > .icon-section-header { - background-position: center center; - background-repeat: no-repeat; - height: 32px; - margin-right: 16px; - position: relative; - width: 32px; -} - -.panel-section-header > .text-section-header { - align-self: center; - font-size: 1.385em; - font-weight: lighter; -} - -/* Panel Section - List */ -.panel-section-list { - flex-direction: column; - padding: 4px 0; -} - -.panel-list-item { - align-items: center; - display: flex; - flex-direction: row; - height: 24px; - padding: 0 16px; -} - -.panel-list-item:not(.disabled):hover { - background-color: rgba(0, 0, 0, 0.06); - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - border-top: 1px solid rgba(0, 0, 0, 0.1); -} - -.panel-list-item:not(.disabled):hover:active { - background-color: rgba(0, 0, 0, 0.1); -} - -.panel-list-item.disabled { - color: #999; -} - -.panel-list-item > .icon { - flex-grow: 0; - flex-shrink: 0; -} - -.panel-list-item > .text { - flex-grow: 10; -} - -.panel-list-item > .text-shortcut { - color: #808080; - font-family: "Lucida Grande", caption; - font-size: .847em; - justify-content: flex-end; -} - -.panel-section-list .panel-section-separator { - margin: 4px 0; -} - -/* Panel Section - Form Elements */ -.panel-section-formElements { - display: flex; - flex-direction: column; - padding: 16px; -} - -.panel-formElements-item { - align-items: center; - display: flex; - flex-direction: row; - margin-bottom: 12px; -} - -.panel-formElements-item:last-child { - margin-bottom: 0; -} - -.panel-formElements-item label { - flex-shrink: 0; - margin-right: 6px; - text-align: right; -} - -.panel-formElements-item input[type="text"], -.panel-formElements-item select { - flex-grow: 1; -} - -/* Panel Section - Footer */ -.panel-section-footer { - background-color: rgba(0, 0, 0, 0.06); - border-top: 1px solid rgba(0, 0, 0, 0.15); - color: #1a1a1a; - display: flex; - flex-direction: row; - height: 41px; - margin-top: -1px; - padding: 0; -} - -.panel-section-footer-button { - flex: 1 1 auto; - height: 100%; - margin: 0 -1px; - padding: 12px; - text-align: center; -} - -.panel-section-footer-button > .text-shortcut { - color: #808080; - font-family: "Lucida Grande", caption; - font-size: .847em; -} - -.panel-section-footer-button:hover { - background-color: rgba(0, 0, 0, 0.06); -} - -.panel-section-footer-button:hover:active { - background-color: rgba(0, 0, 0, 0.1); -} - -.panel-section-footer-button.default { - background-color: #0996f8; - box-shadow: 0 1px 0 #0670cc inset; - color: #fff; -} - -.panel-section-footer-button.default:hover { - background-color: #0670cc; - box-shadow: 0 1px 0 #005bab inset; -} - -.panel-section-footer-button.default:hover:active { - background-color: #005bab; - box-shadow: 0 1px 0 #004480 inset; -} - -.panel-section-footer-separator { - background-color: rgba(0, 0, 0, 0.1); - width: 1px; - z-index: 99; -} - -/* Panel Section - Tabs */ -.panel-section-tabs { - color: #1a1a1a; - display: flex; - flex-direction: row; - height: 41px; - margin-bottom: -1px; - padding: 0; -} - -.panel-section-tabs-button { - flex: 1 1 auto; - height: 100%; - margin: 0 -1px; - padding: 12px; - text-align: center; -} - -.panel-section-tabs-button:hover { - background-color: rgba(0, 0, 0, 0.06); -} - -.panel-section-tabs-button:hover:active { - background-color: rgba(0, 0, 0, 0.1); -} - -.panel-section-tabs-button.selected { - box-shadow: 0 -1px 0 #0670cc inset, 0 -4px 0 #0996f8 inset; - color: #0996f8; -} - -.panel-section-tabs-button.selected:hover { - color: #0670cc; -} - -.panel-section-tabs-separator { - background-color: rgba(0, 0, 0, 0.1); - width: 1px; - z-index: 99; -} diff --git a/application/basilisk/components/webextensions/extension.svg b/application/basilisk/components/webextensions/extension.svg deleted file mode 100644 index a16455253..000000000 --- a/application/basilisk/components/webextensions/extension.svg +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- 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/. --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - width="64" height="64" viewBox="0 0 64 64"> - <defs> - <style> - .style-puzzle-piece { - fill: url('#gradient-linear-puzzle-piece'); - } - </style> - <linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%"> - <stop offset="0%" stop-color="#66cc52" stop-opacity="1"/> - <stop offset="100%" stop-color="#60bf4c" stop-opacity="1"/> - </linearGradient> - </defs> - <path class="style-puzzle-piece" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,6.3-4,6.3c-4,0-4.2-4.1-7.3-4.1c-4.8,0-4.4,5.8-4.4,5.8L2,58 c0,2.2,1.8,4,4,4H19c0,0,6.3,0.4,6.3-4.4c0-3.1-4-3.6-4-7.7c0-2,2.2-4.5,6.4-4.5c4.2,0,6.6,2.5,6.6,4.5c0,4-3.9,4.6-3.9,7.7 c0,4.9,6.3,4.4,6.3,4.4H42z"/> -</svg> diff --git a/application/basilisk/components/webextensions/extensions-browser.manifest b/application/basilisk/components/webextensions/extensions-browser.manifest deleted file mode 100644 index ed5cca813..000000000 --- a/application/basilisk/components/webextensions/extensions-browser.manifest +++ /dev/null @@ -1,31 +0,0 @@ -# scripts -category webextension-scripts bookmarks chrome://browser/content/ext-bookmarks.js -category webextension-scripts browserAction chrome://browser/content/ext-browserAction.js -category webextension-scripts commands chrome://browser/content/ext-commands.js -category webextension-scripts contextMenus chrome://browser/content/ext-contextMenus.js -category webextension-scripts desktop-runtime chrome://browser/content/ext-desktop-runtime.js -category webextension-scripts history chrome://browser/content/ext-history.js -category webextension-scripts omnibox chrome://browser/content/ext-omnibox.js -category webextension-scripts pageAction chrome://browser/content/ext-pageAction.js -category webextension-scripts sessions chrome://browser/content/ext-sessions.js -category webextension-scripts tabs chrome://browser/content/ext-tabs.js -category webextension-scripts utils chrome://browser/content/ext-utils.js -category webextension-scripts windows chrome://browser/content/ext-windows.js - -# scripts that must run in the same process as addon code. -category webextension-scripts-addon contextMenus chrome://browser/content/ext-c-contextMenus.js -category webextension-scripts-addon omnibox chrome://browser/content/ext-c-omnibox.js -category webextension-scripts-addon tabs chrome://browser/content/ext-c-tabs.js - -# schemas -category webextension-schemas bookmarks chrome://browser/content/schemas/bookmarks.json -category webextension-schemas browser_action chrome://browser/content/schemas/browser_action.json -category webextension-schemas commands chrome://browser/content/schemas/commands.json -category webextension-schemas context_menus chrome://browser/content/schemas/context_menus.json -category webextension-schemas context_menus_internal chrome://browser/content/schemas/context_menus_internal.json -category webextension-schemas history chrome://browser/content/schemas/history.json -category webextension-schemas omnibox chrome://browser/content/schemas/omnibox.json -category webextension-schemas page_action chrome://browser/content/schemas/page_action.json -category webextension-schemas sessions chrome://browser/content/schemas/sessions.json -category webextension-schemas tabs chrome://browser/content/schemas/tabs.json -category webextension-schemas windows chrome://browser/content/schemas/windows.json diff --git a/application/basilisk/components/webextensions/jar.mn b/application/basilisk/components/webextensions/jar.mn deleted file mode 100644 index a7b506ec4..000000000 --- a/application/basilisk/components/webextensions/jar.mn +++ /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/. - -browser.jar: - content/browser/extension.css -#ifdef XP_MACOSX - content/browser/extension-mac.css - content/browser/extension-mac-panel.css -#endif -#ifdef XP_WIN - content/browser/extension-win-panel.css -#endif - content/browser/extension.svg - content/browser/ext-bookmarks.js - content/browser/ext-browserAction.js - content/browser/ext-commands.js - content/browser/ext-contextMenus.js - content/browser/ext-desktop-runtime.js - content/browser/ext-history.js - content/browser/ext-omnibox.js - content/browser/ext-pageAction.js - content/browser/ext-sessions.js - content/browser/ext-tabs.js - content/browser/ext-utils.js - content/browser/ext-windows.js - content/browser/ext-c-contextMenus.js - content/browser/ext-c-omnibox.js - content/browser/ext-c-tabs.js diff --git a/application/basilisk/components/webextensions/moz.build b/application/basilisk/components/webextensions/moz.build deleted file mode 100644 index 116e90415..000000000 --- a/application/basilisk/components/webextensions/moz.build +++ /dev/null @@ -1,14 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=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/. - -JAR_MANIFESTS += ['jar.mn'] - -EXTRA_COMPONENTS += [ - 'extensions-browser.manifest', -] - -DIRS += ['schemas'] - diff --git a/application/basilisk/components/webextensions/schemas/LICENSE b/application/basilisk/components/webextensions/schemas/LICENSE deleted file mode 100644 index 9314092fd..000000000 --- a/application/basilisk/components/webextensions/schemas/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/application/basilisk/components/webextensions/schemas/bookmarks.json b/application/basilisk/components/webextensions/schemas/bookmarks.json deleted file mode 100644 index fb74c633e..000000000 --- a/application/basilisk/components/webextensions/schemas/bookmarks.json +++ /dev/null @@ -1,568 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "Permission", - "choices": [{ - "type": "string", - "enum": [ - "bookmarks" - ] - }] - } - ] - }, - { - "namespace": "bookmarks", - "description": "Use the <code>browser.bookmarks</code> API to create, organize, and otherwise manipulate bookmarks. Also see $(topic:override)[Override Pages], which you can use to create a custom Bookmark Manager page.", - "permissions": ["bookmarks"], - "types": [ - { - "id": "BookmarkTreeNodeUnmodifiable", - "type": "string", - "enum": ["managed"], - "description": "Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default)." - }, - { - "id": "BookmarkTreeNode", - "type": "object", - "description": "A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted." - }, - "parentId": { - "type": "string", - "optional": true, - "description": "The <code>id</code> of the parent folder. Omitted for the root node." - }, - "index": { - "type": "integer", - "optional": true, - "description": "The 0-based position of this node within its parent folder." - }, - "url": { - "type": "string", - "optional": true, - "description": "The URL navigated to when a user clicks the bookmark. Omitted for folders." - }, - "title": { - "type": "string", - "description": "The text displayed for the node." - }, - "dateAdded": { - "type": "number", - "optional": true, - "description": "When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>)." - }, - "dateGroupModified": { - "type": "number", - "optional": true, - "description": "When the contents of this folder last changed, in milliseconds since the epoch." - }, - "unmodifiable": { - "$ref": "BookmarkTreeNodeUnmodifiable", - "optional": true, - "description": "Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default)." - }, - "children": { - "type": "array", - "optional": true, - "items": { "$ref": "BookmarkTreeNode" }, - "description": "An ordered list of children of this node." - } - } - }, - { - "id": "CreateDetails", - "description": "Object passed to the create() function.", - "type": "object", - "properties": { - "parentId": { - "type": "string", - "optional": true, - "description": "Defaults to the Other Bookmarks folder." - }, - "index": { - "type": "integer", - "minimum": 0, - "optional": true - }, - "title": { - "type": "string", - "optional": true - }, - "url": { - "type": "string", - "optional": true - } - } - } - ], - "functions": [ - { - "name": "get", - "type": "function", - "description": "Retrieves the specified BookmarkTreeNode(s).", - "async": "callback", - "parameters": [ - { - "name": "idOrIdList", - "description": "A single string-valued id, or an array of string-valued ids", - "choices": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - ] - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { "$ref": "BookmarkTreeNode" } - } - ] - } - ] - }, - { - "name": "getChildren", - "type": "function", - "description": "Retrieves the children of the specified BookmarkTreeNode id.", - "async": "callback", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { "$ref": "BookmarkTreeNode"} - } - ] - } - ] - }, - { - "name": "getRecent", - "type": "function", - "description": "Retrieves the recently added bookmarks.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "minimum": 1, - "name": "numberOfItems", - "description": "The maximum number of items to return." - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { "$ref": "BookmarkTreeNode" } - } - ] - } - ] - }, - { - "name": "getTree", - "type": "function", - "description": "Retrieves the entire Bookmarks hierarchy.", - "async": "callback", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { "$ref": "BookmarkTreeNode" } - } - ] - } - ] - }, - { - "name": "getSubTree", - "type": "function", - "description": "Retrieves part of the Bookmarks hierarchy, starting at the specified node.", - "async": "callback", - "parameters": [ - { - "type": "string", - "name": "id", - "description": "The ID of the root of the subtree to retrieve." - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { "$ref": "BookmarkTreeNode" } - } - ] - } - ] - }, - { - "name": "search", - "type": "function", - "description": "Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.", - "async": "callback", - "parameters": [ - { - "name": "query", - "description": "Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or an object. If an object, the properties <code>query</code>, <code>url</code>, and <code>title</code> may be specified and bookmarks matching all specified properties will be produced.", - "choices": [ - { - "type": "string", - "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles." - }, - { - "type": "object", - "description": "An object specifying properties and values to match when searching. Produces bookmarks matching all properties.", - "properties": { - "query": { - "type": "string", - "optional": true, - "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles." - }, - "url": { - "type": "string", - "format": "url", - "optional": true, - "description": "The URL of the bookmark; matches verbatim. Note that folders have no URL." - }, - "title": { - "type": "string", - "optional": true, - "description": "The title of the bookmark; matches verbatim." - } - } - } - ] - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { "$ref": "BookmarkTreeNode" } - } - ] - } - ] - }, - { - "name": "create", - "type": "function", - "description": "Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.", - "async": "callback", - "parameters": [ - { - "$ref": "CreateDetails", - "name": "bookmark" - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "result", - "$ref": "BookmarkTreeNode" - } - ] - } - ] - }, - { - "name": "move", - "type": "function", - "description": "Moves the specified BookmarkTreeNode to the provided location.", - "async": "callback", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "object", - "name": "destination", - "properties": { - "parentId": { - "type": "string", - "optional": true - }, - "index": { - "type": "integer", - "minimum": 0, - "optional": true - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "result", - "$ref": "BookmarkTreeNode" - } - ] - } - ] - }, - { - "name": "update", - "type": "function", - "description": "Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.", - "async": "callback", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "object", - "name": "changes", - "properties": { - "title": { - "type": "string", - "optional": true - }, - "url": { - "type": "string", - "optional": true - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "result", - "$ref": "BookmarkTreeNode" - } - ] - } - ] - }, - { - "name": "remove", - "type": "function", - "description": "Removes a bookmark or an empty bookmark folder.", - "async": "callback", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "removeTree", - "type": "function", - "description": "Recursively removes a bookmark folder.", - "async": "callback", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "import", - "unsupported": true, - "type": "function", - "description": "Imports bookmarks from an html bookmark file", - "async": "callback", - "parameters": [ - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "export", - "unsupported": true, - "type": "function", - "description": "Exports bookmarks to an html bookmark file", - "async": "callback", - "parameters": [ - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - } - ], - "events": [ - { - "name": "onCreated", - "type": "function", - "description": "Fired when a bookmark or folder is created.", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "$ref": "BookmarkTreeNode", - "name": "bookmark" - } - ] - }, - { - "name": "onRemoved", - "type": "function", - "description": "Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "object", - "name": "removeInfo", - "properties": { - "parentId": { "type": "string" }, - "index": { "type": "integer" }, - "node": { "$ref": "BookmarkTreeNode" } - } - } - ] - }, - { - "name": "onChanged", - "type": "function", - "description": "Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "object", - "name": "changeInfo", - "properties": { - "title": { "type": "string" }, - "url": { - "type": "string", - "optional": true - } - } - } - ] - }, - { - "name": "onMoved", - "type": "function", - "description": "Fired when a bookmark or folder is moved to a different parent folder.", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "object", - "name": "moveInfo", - "properties": { - "parentId": { "type": "string" }, - "index": { "type": "integer" }, - "oldParentId": { "type": "string" }, - "oldIndex": { "type": "integer" } - } - } - ] - }, - { - "name": "onChildrenReordered", - "unsupported": true, - "type": "function", - "description": "Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move().", - "parameters": [ - { - "type": "string", - "name": "id" - }, - { - "type": "object", - "name": "reorderInfo", - "properties": { - "childIds": { - "type": "array", - "items": { "type": "string" } - } - } - } - ] - }, - { - "name": "onImportBegan", - "unsupported": true, - "type": "function", - "description": "Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately.", - "parameters": [] - }, - { - "name": "onImportEnded", - "unsupported": true, - "type": "function", - "description": "Fired when a bookmark import session is ended.", - "parameters": [] - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/browser_action.json b/application/basilisk/components/webextensions/schemas/browser_action.json deleted file mode 100644 index 1a7da956a..000000000 --- a/application/basilisk/components/webextensions/schemas/browser_action.json +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "WebExtensionManifest", - "properties": { - "browser_action": { - "type": "object", - "additionalProperties": { "$ref": "UnrecognizedProperty" }, - "properties": { - "default_title": { - "type": "string", - "optional": true, - "preprocess": "localize" - }, - "default_icon": { - "$ref": "IconPath", - "optional": true - }, - "default_popup": { - "type": "string", - "format": "relativeUrl", - "optional": true, - "preprocess": "localize" - }, - "browser_style": { - "type": "boolean", - "optional": true - } - }, - "optional": true - } - } - } - ] - }, - { - "namespace": "browserAction", - "description": "Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.", - "permissions": ["manifest:browser_action"], - "types": [ - { - "id": "ColorArray", - "type": "array", - "items": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "minItems": 4, - "maxItems": 4 - }, - { - "id": "ImageDataType", - "type": "object", - "isInstanceOf": "ImageData", - "additionalProperties": { "type": "any" }, - "postprocess": "convertImageDataToURL", - "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)." - } - ], - "functions": [ - { - "name": "setTitle", - "type": "function", - "description": "Sets the title of the browser action. This shows up in the tooltip.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "The string the browser action should display when moused over." - }, - "tabId": { - "type": "integer", - "optional": true, - "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "getTitle", - "type": "function", - "description": "Gets the title of the browser action.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": { - "type": "integer", - "optional": true, - "description": "Specify the tab to get the title from. If no tab is specified, the non-tab-specific title is returned." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "string" - } - ] - } - ] - }, - { - "name": "setIcon", - "type": "function", - "description": "Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "imageData": { - "choices": [ - { "$ref": "ImageDataType" }, - { - "type": "object", - "additionalProperties": {"$ref": "ImageDataType"} - } - ], - "optional": true, - "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'" - }, - "path": { - "choices": [ - { "type": "string" }, - { - "type": "object", - "additionalProperties": {"type": "string"} - } - ], - "optional": true, - "description": "Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'" - }, - "tabId": { - "type": "integer", - "optional": true, - "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "setPopup", - "type": "function", - "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": { - "type": "integer", - "optional": true, - "minimum": 0, - "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed." - }, - "popup": { - "type": "string", - "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "getPopup", - "type": "function", - "description": "Gets the html document set as the popup for this browser action.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": { - "type": "integer", - "optional": true, - "description": "Specify the tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "string" - } - ] - } - ] - }, - { - "name": "setBadgeText", - "type": "function", - "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "text": { - "type": "string", - "description": "Any number of characters can be passed, but only about four can fit in the space." - }, - "tabId": { - "type": "integer", - "optional": true, - "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "getBadgeText", - "type": "function", - "description": "Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": { - "type": "integer", - "optional": true, - "description": "Specify the tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "string" - } - ] - } - ] - }, - { - "name": "setBadgeBackgroundColor", - "type": "function", - "description": "Sets the background color for the badge.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "color": { - "description": "An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value, with opaque red being <code>#FF0000</code> or <code>#F00</code>.", - "choices": [ - {"type": "string"}, - {"$ref": "ColorArray"} - ] - }, - "tabId": { - "type": "integer", - "optional": true, - "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "getBadgeBackgroundColor", - "type": "function", - "description": "Gets the background color of the browser action.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": { - "type": "integer", - "optional": true, - "description": "Specify the tab to get the badge background color from. If no tab is specified, the non-tab-specific badge background color is returned." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "$ref": "ColorArray" - } - ] - } - ] - }, - { - "name": "enable", - "type": "function", - "description": "Enables the browser action for a tab. By default, browser actions are enabled.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "optional": true, - "name": "tabId", - "minimum": 0, - "description": "The id of the tab for which you want to modify the browser action." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "disable", - "type": "function", - "description": "Disables the browser action for a tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "optional": true, - "name": "tabId", - "minimum": 0, - "description": "The id of the tab for which you want to modify the browser action." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "openPopup", - "type": "function", - "description": "Opens the extension popup window in the active window but does not grant tab permissions.", - "unsupported": true, - "async": "callback", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "popupView", - "type": "object", - "optional": true, - "description": "JavaScript 'window' object for the popup window if it was succesfully opened.", - "additionalProperties": { "type": "any" } - } - ] - } - ] - } - ], - "events": [ - { - "name": "onClicked", - "type": "function", - "description": "Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.", - "parameters": [ - { - "name": "tab", - "$ref": "tabs.Tab" - } - ] - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/commands.json b/application/basilisk/components/webextensions/schemas/commands.json deleted file mode 100644 index a1632088e..000000000 --- a/application/basilisk/components/webextensions/schemas/commands.json +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "id": "KeyName", - "choices": [ - { - "type": "string", - "pattern": "^\\s*(Alt|Ctrl|Command|MacCtrl)\\s*\\+\\s*(Shift\\s*\\+\\s*)?([A-Z0-9]|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)\\s*$" - }, - { - "type": "string", - "pattern": "^(MediaNextTrack|MediaPlayPause|MediaPrevTrack|MediaStop)$" - } - ] - }, - { - "$extend": "WebExtensionManifest", - "properties": { - "commands": { - "type": "object", - "optional": true, - "additionalProperties": { - "type": "object", - "additionalProperties": { "$ref": "UnrecognizedProperty" }, - "properties": { - "suggested_key": { - "type": "object", - "optional": true, - "properties": { - "default": { - "$ref": "KeyName", - "optional": true - }, - "mac": { - "$ref": "KeyName", - "optional": true - }, - "linux": { - "$ref": "KeyName", - "optional": true - }, - "windows": { - "$ref": "KeyName", - "optional": true - }, - "chromeos": { - "type": "string", - "optional": true - }, - "android": { - "type": "string", - "optional": true - }, - "ios": { - "type": "string", - "optional": true - }, - "additionalProperties": { - "type": "string", - "deprecated": "Unknown platform name", - "optional": true - } - } - }, - "description": { - "type": "string", - "optional": true - } - } - } - } - } - } - ] - }, - { - "namespace": "commands", - "description": "Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the xtension.", - "permissions": ["manifest:commands"], - "types": [ - { - "id": "Command", - "type": "object", - "properties": { - "name": { - "type": "string", - "optional": true, - "description": "The name of the Extension Command" - }, - "description": { - "type": "string", - "optional": true, - "description": "The Extension Command description" - }, - "shortcut": { - "type": "string", - "optional": true, - "description": "The shortcut active for this command, or blank if not active." - } - } - } - ], - "events": [ - { - "name": "onCommand", - "description": "Fired when a registered command is activated using a keyboard shortcut.", - "type": "function", - "parameters": [ - { - "name": "command", - "type": "string" - } - ] - } - ], - "functions": [ - { - "name": "getAll", - "type": "function", - "async": "callback", - "description": "Returns all the registered extension commands for this extension and their shortcut (if active).", - "parameters": [ - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "commands", - "type": "array", - "items": { - "$ref": "Command" - } - } - ], - "description": "Called to return the registered commands." - } - ] - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/context_menus.json b/application/basilisk/components/webextensions/schemas/context_menus.json deleted file mode 100644 index b31af51f3..000000000 --- a/application/basilisk/components/webextensions/schemas/context_menus.json +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "Permission", - "choices": [{ - "type": "string", - "enum": [ - "contextMenus" - ] - }] - } - ] - }, - { - "namespace": "contextMenus", - "description": "Use the <code>browser.contextMenus</code> API to add items to the browser's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.", - "permissions": ["contextMenus"], - "properties": { - "ACTION_MENU_TOP_LEVEL_LIMIT": { - "value": 6, - "description": "The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored." - } - }, - "types": [ - { - "id": "ContextType", - "type": "string", - "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher", "browser_action", "page_action"], - "description": "The different contexts a menu can appear in. Specifying 'all' is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is only supported by apps and is used to add menu items to the context menu that appears when clicking on the app icon in the launcher/taskbar/dock/etc. Different platforms might put limitations on what is actually supported in a launcher context menu." - }, - { - "id": "ItemType", - "type": "string", - "enum": ["normal", "checkbox", "radio", "separator"], - "description": "The type of menu item." - }, - { - "id": "OnClickData", - "type": "object", - "description": "Information sent when a context menu item is clicked.", - "properties": { - "menuItemId": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "description": "The ID of the menu item that was clicked." - }, - "parentMenuItemId": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "optional": true, - "description": "The parent ID, if any, for the item clicked." - }, - "mediaType": { - "type": "string", - "optional": true, - "description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements." - }, - "linkUrl": { - "type": "string", - "optional": true, - "description": "If the element is a link, the URL it points to." - }, - "srcUrl": { - "type": "string", - "optional": true, - "description": "Will be present for elements with a 'src' URL." - }, - "pageUrl": { - "type": "string", - "optional": true, - "description": "The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu." - }, - "frameUrl": { - "type": "string", - "optional": true, - "description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame." - }, - "selectionText": { - "type": "string", - "optional": true, - "description": "The text for the context selection, if any." - }, - "editable": { - "type": "boolean", - "description": "A flag indicating whether the element is editable (text input, textarea, etc.)." - }, - "wasChecked": { - "type": "boolean", - "optional": true, - "description": "A flag indicating the state of a checkbox or radio item before it was clicked." - }, - "checked": { - "type": "boolean", - "optional": true, - "description": "A flag indicating the state of a checkbox or radio item after it is clicked." - } - } - } - ], - "functions": [ - { - "name": "create", - "type": "function", - "description": "Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in $(ref:runtime.lastError)).", - "returns": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "description": "The ID of the newly created item." - }, - "parameters": [ - { - "type": "object", - "name": "createProperties", - "properties": { - "type": { - "$ref": "ItemType", - "optional": true, - "description": "The type of menu item. Defaults to 'normal' if not specified." - }, - "id": { - "type": "string", - "optional": true, - "description": "The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension." - }, - "title": { - "type": "string", - "optional": true, - "description": "The text to be displayed in the item; this is <em>required</em> unless <code>type</code> is 'separator'. When the context is 'selection', you can use <code>%s</code> within the string to show the selected text. For example, if this parameter's value is \"Translate '%s' to Pig Latin\" and the user selects the word \"cool\", the context menu item for the selection is \"Translate 'cool' to Pig Latin\"." - }, - "checked": { - "type": "boolean", - "optional": true, - "description": "The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items." - }, - "contexts": { - "type": "array", - "items": { - "$ref": "ContextType" - }, - "minItems": 1, - "optional": true, - "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified." - }, - "onclick": { - "type": "function", - "optional": true, - "description": "A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for $(ref:contextMenus.onClicked).", - "parameters": [ - { - "name": "info", - "$ref": "contextMenusInternal.OnClickData", - "description": "Information about the item clicked and the context where the click happened." - }, - { - "name": "tab", - "$ref": "tabs.Tab", - "description": "The details of the tab where the click took place. Note: this parameter only present for extensions." - } - ] - }, - "parentId": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "optional": true, - "description": "The ID of a parent menu item; this makes the item a child of a previously added item." - }, - "documentUrlPatterns": { - "type": "array", - "items": {"type": "string"}, - "optional": true, - "description": "Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see $(topic:match_patterns)[Match Patterns]." - }, - "targetUrlPatterns": { - "type": "array", - "items": {"type": "string"}, - "optional": true, - "description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags." - }, - "enabled": { - "type": "boolean", - "optional": true, - "description": "Whether this context menu item is enabled or disabled. Defaults to true." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "description": "Called when the item has been created in the browser. If there were any problems creating the item, details will be available in $(ref:runtime.lastError).", - "parameters": [] - } - ] - }, - { - "name": "createInternal", - "type": "function", - "allowedContexts": ["addon_parent_only"], - "async": "callback", - "description": "Identical to contextMenus.create, except: the 'id' field is required and allows an integer, 'onclick' is not allowed, and the method is async (and the return value is not a menu item ID).", - "parameters": [ - { - "type": "object", - "name": "createProperties", - "properties": { - "type": { - "$ref": "ItemType", - "optional": true - }, - "id": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ] - }, - "title": { - "type": "string", - "optional": true - }, - "checked": { - "type": "boolean", - "optional": true - }, - "contexts": { - "type": "array", - "items": { - "$ref": "ContextType" - }, - "minItems": 1, - "optional": true - }, - "parentId": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "optional": true - }, - "documentUrlPatterns": { - "type": "array", - "items": {"type": "string"}, - "optional": true - }, - "targetUrlPatterns": { - "type": "array", - "items": {"type": "string"}, - "optional": true - }, - "enabled": { - "type": "boolean", - "optional": true - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "update", - "type": "function", - "description": "Updates a previously created context menu item.", - "async": "callback", - "parameters": [ - { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "name": "id", - "description": "The ID of the item to update." - }, - { - "type": "object", - "name": "updateProperties", - "description": "The properties to update. Accepts the same values as the create function.", - "properties": { - "type": { - "$ref": "ItemType", - "optional": true - }, - "title": { - "type": "string", - "optional": true - }, - "checked": { - "type": "boolean", - "optional": true - }, - "contexts": { - "type": "array", - "items": { - "$ref": "ContextType" - }, - "minItems": 1, - "optional": true - }, - "onclick": { - "type": "function", - "optional": "omit-key-if-missing", - "parameters": [ - { - "name": "info", - "$ref": "contextMenusInternal.OnClickData" - }, - { - "name": "tab", - "$ref": "tabs.Tab", - "description": "The details of the tab where the click took place. Note: this parameter only present for extensions." - } - ] - }, - "parentId": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "optional": true, - "description": "Note: You cannot change an item to be a child of one of its own descendants." - }, - "documentUrlPatterns": { - "type": "array", - "items": {"type": "string"}, - "optional": true - }, - "targetUrlPatterns": { - "type": "array", - "items": {"type": "string"}, - "optional": true - }, - "enabled": { - "type": "boolean", - "optional": true - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [], - "description": "Called when the context menu has been updated." - } - ] - }, - { - "name": "remove", - "type": "function", - "description": "Removes a context menu item.", - "async": "callback", - "parameters": [ - { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "name": "menuItemId", - "description": "The ID of the context menu item to remove." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [], - "description": "Called when the context menu has been removed." - } - ] - }, - { - "name": "removeAll", - "type": "function", - "description": "Removes all context menu items added by this extension.", - "async": "callback", - "parameters": [ - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [], - "description": "Called when removal is complete." - } - ] - } - ], - "events": [ - { - "name": "onClicked", - "type": "function", - "description": "Fired when a context menu item is clicked.", - "parameters": [ - { - "name": "info", - "$ref": "OnClickData", - "description": "Information about the item clicked and the context where the click happened." - }, - { - "name": "tab", - "$ref": "tabs.Tab", - "description": "The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing.", - "optional": true - } - ] - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/context_menus_internal.json b/application/basilisk/components/webextensions/schemas/context_menus_internal.json deleted file mode 100644 index c3cb7aff0..000000000 --- a/application/basilisk/components/webextensions/schemas/context_menus_internal.json +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "contextMenusInternal", - "description": "Use the <code>browser.contextMenus</code> API to add items to the browser's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.", - "types": [ - { - "id": "OnClickData", - "type": "object", - "description": "Information sent when a context menu item is clicked.", - "properties": { - "menuItemId": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "description": "The ID of the menu item that was clicked." - }, - "parentMenuItemId": { - "choices": [ - { "type": "integer" }, - { "type": "string" } - ], - "optional": true, - "description": "The parent ID, if any, for the item clicked." - }, - "mediaType": { - "type": "string", - "optional": true, - "description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements." - }, - "linkUrl": { - "type": "string", - "optional": true, - "description": "If the element is a link, the URL it points to." - }, - "srcUrl": { - "type": "string", - "optional": true, - "description": "Will be present for elements with a 'src' URL." - }, - "pageUrl": { - "type": "string", - "optional": true, - "description": "The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu." - }, - "frameUrl": { - "type": "string", - "optional": true, - "description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame." - }, - "selectionText": { - "type": "string", - "optional": true, - "description": "The text for the context selection, if any." - }, - "editable": { - "type": "boolean", - "description": "A flag indicating whether the element is editable (text input, textarea, etc.)." - }, - "wasChecked": { - "type": "boolean", - "optional": true, - "description": "A flag indicating the state of a checkbox or radio item before it was clicked." - }, - "checked": { - "type": "boolean", - "optional": true, - "description": "A flag indicating the state of a checkbox or radio item after it is clicked." - } - } - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/history.json b/application/basilisk/components/webextensions/schemas/history.json deleted file mode 100644 index e05569e38..000000000 --- a/application/basilisk/components/webextensions/schemas/history.json +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "Permission", - "choices": [{ - "type": "string", - "enum": [ - "history" - ] - }] - } - ] - }, - { - "namespace": "history", - "description": "Use the <code>browser.history</code> API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see $(topic:override)[Override Pages].", - "permissions": ["history"], - "types": [ - { - "id": "TransitionType", - "type": "string", - "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated"], - "description": "The $(topic:transition-types)[transition type] for this visit from its referrer." - }, - { - "id": "HistoryItem", - "type": "object", - "description": "An object encapsulating one result of a history query.", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the item." - }, - "url": { - "type": "string", - "optional": true, - "description": "The URL navigated to by a user." - }, - "title": { - "type": "string", - "optional": true, - "description": "The title of the page when it was last loaded." - }, - "lastVisitTime": { - "type": "number", - "optional": true, - "description": "When this page was last loaded, represented in milliseconds since the epoch." - }, - "visitCount": { - "type": "integer", - "optional": true, - "description": "The number of times the user has navigated to this page." - }, - "typedCount": { - "type": "integer", - "optional": true, - "description": "The number of times the user has navigated to this page by typing in the address." - } - } - }, - { - "id": "VisitItem", - "type": "object", - "description": "An object encapsulating one visit to a URL.", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the item." - }, - "visitId": { - "type": "string", - "description": "The unique identifier for this visit." - }, - "visitTime": { - "type": "number", - "optional": true, - "description": "When this visit occurred, represented in milliseconds since the epoch." - }, - "referringVisitId": { - "type": "string", - "description": "The visit ID of the referrer." - }, - "transition": { - "$ref": "TransitionType", - "description": "The $(topic:transition-types)[transition type] for this visit from its referrer." - } - } - } - ], - "functions": [ - { - "name": "search", - "type": "function", - "description": "Searches the history for the last visit time of each page matching the query.", - "async": "callback", - "parameters": [ - { - "name": "query", - "type": "object", - "properties": { - "text": { - "type": "string", - "description": "A free-text query to the history service. Leave empty to retrieve all pages." - }, - "startTime": { - "$ref": "extensionTypes.Date", - "optional": true, - "description": "Limit results to those visited after this date. If not specified, this defaults to 24 hours in the past." - }, - "endTime": { - "$ref": "extensionTypes.Date", - "optional": true, - "description": "Limit results to those visited before this date." - }, - "maxResults": { - "type": "integer", - "optional": true, - "minimum": 1, - "description": "The maximum number of results to retrieve. Defaults to 100." - } - } - }, - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { - "$ref": "HistoryItem" - } - } - ] - } - ] - }, - { - "name": "getVisits", - "type": "function", - "description": "Retrieves information about visits to a URL.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "The URL for which to retrieve visit information. It must be in the format as returned from a call to history.search." - } - } - }, - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "results", - "type": "array", - "items": { - "$ref": "VisitItem" - } - } - ] - } - ] - }, - { - "name": "addUrl", - "type": "function", - "description": "Adds a URL to the history with a default visitTime of the current time and a default $(topic:transition-types)[transition type] of \"link\".", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "The URL to add. Must be a valid URL that can be added to history." - }, - "title": { - "type": "string", - "optional": true, - "description": "The title of the page." - }, - "transition": { - "$ref": "TransitionType", - "optional": true, - "description": "The $(topic:transition-types)[transition type] for this visit from its referrer." - }, - "visitTime": { - "$ref": "extensionTypes.Date", - "optional": true, - "description": "The date when this visit occurred." - } - } - }, - { - "name": "callback", - "type": "function", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "deleteUrl", - "type": "function", - "description": "Removes all occurrences of the given URL from the history.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "The URL to remove." - } - } - }, - { - "name": "callback", - "type": "function", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "deleteRange", - "type": "function", - "description": "Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.", - "async": "callback", - "parameters": [ - { - "name": "range", - "type": "object", - "properties": { - "startTime": { - "$ref": "extensionTypes.Date", - "description": "Items added to history after this date." - }, - "endTime": { - "$ref": "extensionTypes.Date", - "description": "Items added to history before this date." - } - } - }, - { - "name": "callback", - "type": "function", - "parameters": [] - } - ] - }, - { - "name": "deleteAll", - "type": "function", - "description": "Deletes all items from the history.", - "async": "callback", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [] - } - ] - } - ], - "events": [ - { - "name": "onVisited", - "type": "function", - "description": "Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded.", - "parameters": [ - { - "name": "result", - "$ref": "HistoryItem" - } - ] - }, - { - "name": "onVisitRemoved", - "type": "function", - "description": "Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history.", - "parameters": [ - { - "name": "removed", - "type": "object", - "properties": { - "allHistory": { - "type": "boolean", - "description": "True if all history was removed. If true, then urls will be empty." - }, - "urls": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/jar.mn b/application/basilisk/components/webextensions/schemas/jar.mn deleted file mode 100644 index c9fc9a808..000000000 --- a/application/basilisk/components/webextensions/schemas/jar.mn +++ /dev/null @@ -1,16 +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/schemas/bookmarks.json - content/browser/schemas/browser_action.json - content/browser/schemas/commands.json - content/browser/schemas/context_menus.json - content/browser/schemas/context_menus_internal.json - content/browser/schemas/history.json - content/browser/schemas/omnibox.json - content/browser/schemas/page_action.json - content/browser/schemas/sessions.json - content/browser/schemas/tabs.json - content/browser/schemas/windows.json diff --git a/application/basilisk/components/webextensions/schemas/moz.build b/application/basilisk/components/webextensions/schemas/moz.build deleted file mode 100644 index aac3a838c..000000000 --- a/application/basilisk/components/webextensions/schemas/moz.build +++ /dev/null @@ -1,7 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=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/. - -JAR_MANIFESTS += ['jar.mn'] diff --git a/application/basilisk/components/webextensions/schemas/omnibox.json b/application/basilisk/components/webextensions/schemas/omnibox.json deleted file mode 100644 index 34428fab7..000000000 --- a/application/basilisk/components/webextensions/schemas/omnibox.json +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "WebExtensionManifest", - "properties": { - "omnibox": { - "type": "object", - "additionalProperties": { "$ref": "UnrecognizedProperty" }, - "properties": { - "keyword": { - "type": "string", - "pattern": "^[^?\\s:]([^\\s:]*[^/\\s:])?$" - } - }, - "optional": true - } - } - } - ] - }, - { - "namespace": "omnibox", - "description": "The omnibox API allows you to register a keyword with Firefox's address bar.", - "permissions": ["manifest:omnibox"], - "types": [ - { - "id": "DescriptionStyleType", - "type": "string", - "description": "The style type.", - "enum": ["url", "match", "dim"] - }, - { - "id": "OnInputEnteredDisposition", - "type": "string", - "enum": ["currentTab", "newForegroundTab", "newBackgroundTab"], - "description": "The window disposition for the omnibox query. This is the recommended context to display results. For example, if the omnibox command is to navigate to a certain URL, a disposition of 'newForegroundTab' means the navigation should take place in a new selected tab." - }, - { - "id": "SuggestResult", - "type": "object", - "description": "A suggest result.", - "properties": { - "content": { - "type": "string", - "minLength": 1, - "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry." - }, - "description": { - "type": "string", - "minLength": 1, - "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>. You must escape the five predefined entities to display them as text: stackoverflow.com/a/1091953/89484 " - }, - "descriptionStyles": { - "optional": true, - "unsupported": true, - "type": "array", - "description": "An array of style ranges for the description, as provided by the extension.", - "items": { - "type": "object", - "description": "The style ranges for the description, as provided by the extension.", - "properties": { - "offset": { "type": "integer" }, - "type": { "description": "The style type", "$ref": "DescriptionStyleType"}, - "length": { "type": "integer", "optional": true } - } - } - }, - "descriptionStylesRaw": { - "optional": true, - "unsupported": true, - "type": "array", - "description": "An array of style ranges for the description, as provided by ToValue().", - "items": { - "type": "object", - "description": "The style ranges for the description, as provided by ToValue().", - "properties": { - "offset": { "type": "integer" }, - "type": { "type": "integer" } - } - } - } - } - }, - { - "id": "DefaultSuggestResult", - "type": "object", - "description": "A suggest result.", - "properties": { - "description": { - "type": "string", - "minLength": 1, - "description": "The text that is displayed in the URL dropdown." - }, - "descriptionStyles": { - "optional": true, - "unsupported": true, - "type": "array", - "description": "An array of style ranges for the description, as provided by the extension.", - "items": { - "type": "object", - "description": "The style ranges for the description, as provided by the extension.", - "properties": { - "offset": { "type": "integer" }, - "type": { "description": "The style type", "$ref": "DescriptionStyleType"}, - "length": { "type": "integer", "optional": true } - } - } - }, - "descriptionStylesRaw": { - "optional": true, - "unsupported": true, - "type": "array", - "description": "An array of style ranges for the description, as provided by ToValue().", - "items": { - "type": "object", - "description": "The style ranges for the description, as provided by ToValue().", - "properties": { - "offset": { "type": "integer" }, - "type": { "type": "integer" } - } - } - } - } - } - ], - "functions": [ - { - "name": "setDefaultSuggestion", - "type": "function", - "description": "Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.", - "parameters": [ - { - "name": "suggestion", - "$ref": "DefaultSuggestResult", - "description": "A partial SuggestResult object, without the 'content' parameter." - } - ] - } - ], - "events": [ - { - "name": "onInputStarted", - "type": "function", - "description": "User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events.", - "parameters": [] - }, - { - "name": "onInputChanged", - "type": "function", - "description": "User has changed what is typed into the omnibox.", - "parameters": [ - { - "type": "string", - "name": "text" - }, - { - "name": "suggest", - "type": "function", - "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.", - "parameters": [ - { - "name": "suggestResults", - "type": "array", - "description": "Array of suggest results", - "items": { - "$ref": "SuggestResult" - } - } - ] - } - ] - }, - { - "name": "onInputEntered", - "type": "function", - "description": "User has accepted what is typed into the omnibox.", - "parameters": [ - { - "type": "string", - "name": "text" - }, - { - "name": "disposition", - "$ref": "OnInputEnteredDisposition" - } - ] - }, - { - "name": "onInputCancelled", - "type": "function", - "description": "User has ended the keyword input session without accepting the input.", - "parameters": [] - } - ] - }, - { - "namespace": "omnibox_internal", - "description": "The internal namespace used by the omnibox API.", - "defaultContexts": ["addon_parent_only"], - "functions": [ - { - "name": "addSuggestions", - "type": "function", - "async": "callback", - "description": "Internal function used by omnibox.onInputChanged for adding search suggestions", - "parameters": [ - { - "name": "id", - "type": "integer", - "description": "The ID of the callback received by onInputChangedInternal" - }, - { - "name": "suggestResults", - "type": "array", - "description": "Array of suggest results", - "items": { - "$ref": "omnibox.SuggestResult" - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - } - ], - "events": [ - { - "name": "onInputChanged", - "type": "function", - "description": "Identical to omnibox.onInputChanged except no 'suggest' callback is provided.", - "parameters": [ - { - "type": "string", - "name": "text" - } - ] - } - ] - } -]
\ No newline at end of file diff --git a/application/basilisk/components/webextensions/schemas/page_action.json b/application/basilisk/components/webextensions/schemas/page_action.json deleted file mode 100644 index 126378ca5..000000000 --- a/application/basilisk/components/webextensions/schemas/page_action.json +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "WebExtensionManifest", - "properties": { - "page_action": { - "type": "object", - "additionalProperties": { "$ref": "UnrecognizedProperty" }, - "properties": { - "default_title": { - "type": "string", - "optional": true, - "preprocess": "localize" - }, - "default_icon": { - "$ref": "IconPath", - "optional": true - }, - "default_popup": { - "type": "string", - "format": "relativeUrl", - "optional": true, - "preprocess": "localize" - }, - "browser_style": { - "type": "boolean", - "optional": true - } - }, - "optional": true - } - } - } - ] - }, - { - "namespace": "pageAction", - "description": "Use the <code>browser.pageAction</code> API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.", - "permissions": ["manifest:page_action"], - "types": [ - { - "id": "ImageDataType", - "type": "object", - "isInstanceOf": "ImageData", - "additionalProperties": { "type": "any" }, - "postprocess": "convertImageDataToURL", - "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)." - } - ], - "functions": [ - { - "name": "show", - "type": "function", - "async": "callback", - "description": "Shows the page action. The page action is shown whenever the tab is selected.", - "parameters": [ - {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "hide", - "type": "function", - "async": "callback", - "description": "Hides the page action.", - "parameters": [ - {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "setTitle", - "type": "function", - "description": "Sets the title of the page action. This is displayed in a tooltip over the page action.", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}, - "title": {"type": "string", "description": "The tooltip string."} - } - } - ] - }, - { - "name": "getTitle", - "type": "function", - "description": "Gets the title of the page action.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": { - "type": "integer", - "description": "Specify the tab to get the title from." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "string" - } - ] - } - ] - }, - { - "name": "setIcon", - "type": "function", - "description": "Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}, - "imageData": { - "choices": [ - { "$ref": "ImageDataType" }, - { - "type": "object", - "additionalProperties": {"$ref": "ImageDataType"} - } - ], - "optional": true, - "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'" - }, - "path": { - "choices": [ - { "type": "string" }, - { - "type": "object", - "additionalProperties": {"type": "string"} - } - ], - "optional": true, - "description": "Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'" - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "setPopup", - "type": "function", - "async": true, - "description": "Sets the html document to be opened as a popup when the user clicks on the page action's icon.", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}, - "popup": { - "type": "string", - "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown." - } - } - } - ] - }, - { - "name": "getPopup", - "type": "function", - "description": "Gets the html document set as the popup for this page action.", - "async": "callback", - "parameters": [ - { - "name": "details", - "type": "object", - "properties": { - "tabId": { - "type": "integer", - "description": "Specify the tab to get the popup from." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "string" - } - ] - } - ] - } - ], - "events": [ - { - "name": "onClicked", - "type": "function", - "description": "Fired when a page action icon is clicked. This event will not fire if the page action has a popup.", - "parameters": [ - { - "name": "tab", - "$ref": "tabs.Tab" - } - ] - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/sessions.json b/application/basilisk/components/webextensions/schemas/sessions.json deleted file mode 100644 index 690bb8ebc..000000000 --- a/application/basilisk/components/webextensions/schemas/sessions.json +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "Permission", - "choices": [{ - "type": "string", - "enum": [ - "sessions" - ] - }] - } - ] - }, - { - "namespace": "sessions", - "description": "Use the <code>chrome.sessions</code> API to query and restore tabs and windows from a browsing session.", - "permissions": ["sessions"], - "types": [ - { - "id": "Filter", - "type": "object", - "properties": { - "maxResults": { - "type": "integer", - "minimum": 0, - "maximum": 25, - "optional": true, - "description": "The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ($(ref:sessions.MAX_SESSION_RESULTS))." - } - } - }, - { - "id": "Session", - "type": "object", - "properties": { - "lastModified": {"type": "integer", "description": "The time when the window or tab was closed or modified, represented in milliseconds since the epoch."}, - "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(ref:tabs.Tab), if this entry describes a tab. Either this or $(ref:sessions.Session.window) will be set."}, - "window": {"$ref": "windows.Window", "optional": true, "description": "The $(ref:windows.Window), if this entry describes a window. Either this or $(ref:sessions.Session.tab) will be set."} - } - }, - { - "id": "Device", - "type": "object", - "properties": { - "info": {"type": "string"}, - "deviceName": {"type": "string", "description": "The name of the foreign device."}, - "sessions": {"type": "array", "items": {"$ref": "Session"}, "description": "A list of open window sessions for the foreign device, sorted from most recently to least recently modified session."} - } - } - ], - "functions": [ - { - "name": "getRecentlyClosed", - "type": "function", - "description": "Gets the list of recently closed tabs and/or windows.", - "async": "callback", - "parameters": [ - { - "$ref": "Filter", - "name": "filter", - "optional": true, - "default": {} - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "sessions", "type": "array", "items": { "$ref": "Session" }, "description": "The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index <code>0</code>). The entries may contain either tabs or windows." - } - ] - } - ] - }, - { - "name": "getDevices", - "unsupported": true, - "type": "function", - "description": "Retrieves all devices with synced sessions.", - "async": "callback", - "parameters": [ - { - "$ref": "Filter", - "name": "filter", - "optional": true - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $(ref:sessions.Device) objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. $(ref:tabs.Tab) objects are sorted by recency in the $(ref:windows.Window) of the $(ref:sessions.Session) objects." - } - ] - } - ] - }, - { - "name": "restore", - "type": "function", - "description": "Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored.", - "async": "callback", - "parameters": [ - { - "type": "string", - "name": "sessionId", - "optional": true, - "description": "The $(ref:windows.Window.sessionId), or $(ref:tabs.Tab.sessionId) to restore. If this parameter is not specified, the most recently closed session is restored." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "$ref": "Session", - "name": "restoredSession", - "description": "A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or $(ref:tabs.Tab) object." - } - ] - } - ] - } - ], - "events": [ - { - "name": "onChanged", - "unsupported": true, - "description": "Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes.", - "type": "function" - } - ], - "properties": { - "MAX_SESSION_RESULTS": { - "value": 25, - "description": "The maximum number of $(ref:sessions.Session) that will be included in a requested list." - } - } - } -] diff --git a/application/basilisk/components/webextensions/schemas/tabs.json b/application/basilisk/components/webextensions/schemas/tabs.json deleted file mode 100644 index 23ce33a4b..000000000 --- a/application/basilisk/components/webextensions/schemas/tabs.json +++ /dev/null @@ -1,1295 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "manifest", - "types": [ - { - "$extend": "Permission", - "choices": [{ - "type": "string", - "enum": [ - "activeTab", - "tabs" - ] - }] - } - ] - }, - { - "namespace": "tabs", - "description": "Use the <code>browser.tabs</code> API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.", - "types": [ - { "id": "MutedInfoReason", - "type": "string", - "description": "An event that caused a muted state change.", - "enum": [ - {"name": "user", "description": "A user input action has set/overridden the muted state."}, - {"name": "capture", "description": "Tab capture started, forcing a muted state change."}, - {"name": "extension", "description": "An extension, identified by the extensionId field, set the muted state."} - ] - }, - { - "id": "MutedInfo", - "type": "object", - "description": "Tab muted state and the reason for the last state change.", - "properties": { - "muted": { - "type": "boolean", - "description": "Whether the tab is prevented from playing sound (but hasn't necessarily recently produced sound). Equivalent to whether the muted audio indicator is showing." - }, - "reason": { - "$ref": "MutedInfoReason", - "optional": true, - "description": "The reason the tab was muted or unmuted. Not set if the tab's mute state has never been changed." - }, - "extensionId": { - "type": "string", - "optional": true, - "description": "The ID of the extension that changed the muted state. Not set if an extension was not the reason the muted state last changed." - } - } - }, - { - "id": "Tab", - "type": "object", - "properties": { - "id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to $(ref:tabs.TAB_ID_NONE) for apps and devtools windows."}, - "index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."}, - "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."}, - "openerTabId": {"unsupported": true, "type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."}, - "selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted).", "unsupported": true}, - "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."}, - "active": {"type": "boolean", "description": "Whether the tab is active in its window. (Does not necessarily mean the window is focused.)"}, - "pinned": {"type": "boolean", "description": "Whether the tab is pinned."}, - "audible": {"type": "boolean", "optional": true, "description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing."}, - "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "Current tab muted state and the reason for the last state change."}, - "url": {"type": "string", "optional": true, "permissions": ["tabs"], "description": "The URL the tab is displaying. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."}, - "title": {"type": "string", "optional": true, "permissions": ["tabs"], "description": "The title of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."}, - "favIconUrl": {"type": "string", "optional": true, "permissions": ["tabs"], "description": "The URL of the tab's favicon. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission. It may also be an empty string if the tab is loading."}, - "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."}, - "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}, - "width": {"type": "integer", "optional": true, "description": "The width of the tab in pixels."}, - "height": {"type": "integer", "optional": true, "description": "The height of the tab in pixels."}, - "sessionId": {"unsupported": true, "type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API."}, - "cookieStoreId": {"type": "string", "description": "The CookieStoreId used for the tab."} - } - }, - { - "id": "ZoomSettingsMode", - "type": "string", - "description": "Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.", - "enum": [ - { - "name": "automatic", - "description": "Zoom changes are handled automatically by the browser." - }, - { - "name": "manual", - "description": "Overrides the automatic handling of zoom changes. The <code>onZoomChange</code> event will still be dispatched, and it is the responsibility of the extension to listen for this event and manually scale the page. This mode does not support <code>per-origin</code> zooming, and will thus ignore the <code>scope</code> zoom setting and assume <code>per-tab</code>." - }, - { - "name": "disabled", - "description": "Disables all zooming in the tab. The tab will revert to the default zoom level, and all attempted zoom changes will be ignored." - } - ] - }, - { - "id": "ZoomSettingsScope", - "type": "string", - "description": "Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.", - "enum": [ - { - "name": "per-origin", - "description": "Zoom changes will persist in the zoomed page's origin, i.e. all other tabs navigated to that same origin will be zoomed as well. Moreover, <code>per-origin</code> zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. The <code>per-origin</code> scope is only available in the <code>automatic</code> mode." - }, - { - "name": "per-tab", - "description": "Zoom changes only take effect in this tab, and zoom changes in other tabs will not affect the zooming of this tab. Also, <code>per-tab</code> zoom changes are reset on navigation; navigating a tab will always load pages with their <code>per-origin</code> zoom factors." - } - ] - }, - { - "id": "ZoomSettings", - "type": "object", - "description": "Defines how zoom changes in a tab are handled and at what scope.", - "properties": { - "mode": { - "$ref": "ZoomSettingsMode", - "description": "Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.", - "optional": true - }, - "scope": { - "$ref": "ZoomSettingsScope", - "description": "Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.", - "optional": true - }, - "defaultZoomFactor": { - "type": "number", - "optional": true, - "description": "Used to return the default zoom level for the current tab in calls to tabs.getZoomSettings." - } - } - }, - { - "id": "TabStatus", - "type": "string", - "enum": ["loading", "complete"], - "description": "Whether the tabs have completed loading." - }, - { - "id": "WindowType", - "type": "string", - "enum": ["normal", "popup", "panel", "app", "devtools"], - "description": "The type of window." - } - ], - "properties": { - "TAB_ID_NONE": { - "value": -1, - "description": "An ID which represents the absence of a browser tab." - } - }, - "functions": [ - { - "name": "get", - "type": "function", - "description": "Retrieves details about the specified tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0 - }, - { - "type": "function", - "name": "callback", - "parameters": [ - {"name": "tab", "$ref": "Tab"} - ] - } - ] - }, - { - "name": "getCurrent", - "type": "function", - "description": "Gets the tab that this script call is being made from. May be undefined if called from a non-tab context (for example: a background page or popup view).", - "async": "callback", - "parameters": [ - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "tab", - "$ref": "Tab", - "optional": true - } - ] - } - ] - }, - { - "name": "connect", - "type": "function", - "description": "Connects to the content script(s) in the specified tab. The $(ref:runtime.onConnect) event is fired in each content script running in the specified tab for the current extension. For more details, see $(topic:messaging)[Content Script Messaging].", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0 - }, - { - "type": "object", - "name": "connectInfo", - "properties": { - "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connection event." }, - "frameId": { - "type": "integer", - "optional": true, - "minimum": 0, - "description": "Open a port to a specific $(topic:frame_ids)[frame] identified by <code>frameId</code> instead of all frames in the tab." - } - }, - "optional": true - } - ], - "returns": { - "$ref": "runtime.Port", - "description": "A port that can be used to communicate with the content scripts running in the specified tab. The port's $(ref:runtime.Port) event is fired if the tab closes or does not exist. " - } - }, - { - "name": "sendRequest", - "deprecated": "Please use $(ref:runtime.sendMessage).", - "unsupported": true, - "type": "function", - "description": "Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $(ref:extension.onRequest) event is fired in each content script running in the specified tab for the current extension.", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0 - }, - { - "type": "any", - "name": "request" - }, - { - "type": "function", - "name": "responseCallback", - "optional": true, - "parameters": [ - { - "name": "response", - "type": "any", - "description": "The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message." - } - ] - } - ] - }, - { - "name": "sendMessage", - "type": "function", - "description": "Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $(ref:runtime.onMessage) event is fired in each content script running in the specified tab for the current extension.", - "async": "responseCallback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0 - }, - { - "type": "any", - "name": "message" - }, - { - "type": "object", - "name": "options", - "properties": { - "frameId": { - "type": "integer", - "optional": true, - "minimum": 0, - "description": "Send a message to a specific $(topic:frame_ids)[frame] identified by <code>frameId</code> instead of all frames in the tab." - } - }, - "optional": true - }, - { - "type": "function", - "name": "responseCallback", - "optional": true, - "parameters": [ - { - "name": "response", - "type": "any", - "description": "The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message." - } - ] - } - ] - }, - { - "name": "getSelected", - "deprecated": "Please use $(ref:tabs.query) <code>{active: true}</code>.", - "unsupported": true, - "type": "function", - "description": "Gets the tab that is selected in the specified window.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": -2, - "optional": true, - "description": "Defaults to the $(topic:current-window)[current window]." - }, - { - "type": "function", - "name": "callback", - "parameters": [ - {"name": "tab", "$ref": "Tab"} - ] - } - ] - }, - { - "name": "getAllInWindow", - "deprecated": "Please use $(ref:tabs.query) <code>{windowId: windowId}</code>.", - "unsupported": true, - "type": "function", - "description": "Gets details about all tabs in the specified window.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": -2, - "optional": true, - "description": "Defaults to the $(topic:current-window)[current window]." - }, - { - "type": "function", - "name": "callback", - "parameters": [ - {"name": "tabs", "type": "array", "items": { "$ref": "Tab" } } - ] - } - ] - }, - { - "name": "create", - "type": "function", - "description": "Creates a new tab.", - "async": "callback", - "parameters": [ - { - "type": "object", - "name": "createProperties", - "properties": { - "windowId": { - "type": "integer", - "minimum": -2, - "optional": true, - "description": "The window to create the new tab in. Defaults to the $(topic:current-window)[current window]." - }, - "index": { - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The position the tab should take in the window. The provided value will be clamped to between zero and the number of tabs in the window." - }, - "url": { - "type": "string", - "optional": true, - "description": "The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page." - }, - "active": { - "type": "boolean", - "optional": true, - "description": "Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see $(ref:windows.update)). Defaults to <var>true</var>." - }, - "selected": { - "deprecated": "Please use <em>active</em>.", - "unsupported": true, - "type": "boolean", - "optional": true, - "description": "Whether the tab should become the selected tab in the window. Defaults to <var>true</var>" - }, - "pinned": { - "type": "boolean", - "optional": true, - "description": "Whether the tab should be pinned. Defaults to <var>false</var>" - }, - "openerTabId": { - "unsupported": true, - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab." - }, - "cookieStoreId": { - "type": "string", - "optional": true, - "description": "The CookieStoreId for the tab that opened this tab." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "tab", - "$ref": "Tab", - "description": "Details about the created tab. Will contain the ID of the new tab." - } - ] - } - ] - }, - { - "name": "duplicate", - "type": "function", - "description": "Duplicates a tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "description": "The ID of the tab which is to be duplicated." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "tab", - "optional": true, - "description": "Details about the duplicated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested.", - "$ref": "Tab" - } - ] - } - ] - }, - { - "name": "query", - "type": "function", - "description": "Gets all tabs that have the specified properties, or all tabs if no properties are specified.", - "async": "callback", - "parameters": [ - { - "type": "object", - "name": "queryInfo", - "properties": { - "active": { - "type": "boolean", - "optional": true, - "description": "Whether the tabs are active in their windows." - }, - "pinned": { - "type": "boolean", - "optional": true, - "description": "Whether the tabs are pinned." - }, - "audible": { - "type": "boolean", - "optional": true, - "description": "Whether the tabs are audible." - }, - "muted": { - "type": "boolean", - "optional": true, - "description": "Whether the tabs are muted." - }, - "highlighted": { - "type": "boolean", - "optional": true, - "description": "Whether the tabs are highlighted." - }, - "currentWindow": { - "type": "boolean", - "optional": true, - "description": "Whether the tabs are in the $(topic:current-window)[current window]." - }, - "lastFocusedWindow": { - "type": "boolean", - "optional": true, - "description": "Whether the tabs are in the last focused window." - }, - "status": { - "$ref": "TabStatus", - "optional": true, - "description": "Whether the tabs have completed loading." - }, - "title": { - "type": "string", - "optional": true, - "description": "Match page titles against a pattern." - }, - "url": { - "choices": [ - {"type": "string"}, - {"type": "array", "items": {"type": "string"}} - ], - "optional": true, - "description": "Match tabs against one or more $(topic:match_patterns)[URL patterns]. Note that fragment identifiers are not matched." - }, - "windowId": { - "type": "integer", - "optional": true, - "minimum": -2, - "description": "The ID of the parent window, or $(ref:windows.WINDOW_ID_CURRENT) for the $(topic:current-window)[current window]." - }, - "windowType": { - "$ref": "WindowType", - "optional": true, - "description": "The type of window the tabs are in." - }, - "index": { - "type": "integer", - "optional": true, - "minimum": 0, - "description": "The position of the tabs within their windows." - }, - "cookieStoreId": { - "type": "string", - "optional": true, - "description": "The CookieStoreId used for the tab." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "result", - "type": "array", - "items": { - "$ref": "Tab" - } - } - ] - } - ] - }, - { - "name": "highlight", - "type": "function", - "description": "Highlights the given tabs.", - "async": "callback", - "parameters": [ - { - "type": "object", - "name": "highlightInfo", - "properties": { - "windowId": { - "type": "integer", - "optional": true, - "description": "The window that contains the tabs.", - "minimum": -2 - }, - "tabs": { - "description": "One or more tab indices to highlight.", - "choices": [ - {"type": "array", "items": {"type": "integer", "minimum": 0}}, - {"type": "integer"} - ] - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "window", - "$ref": "windows.Window", - "description": "Contains details about the window whose tabs were highlighted." - } - ] - } - ] - }, - { - "name": "update", - "type": "function", - "description": "Modifies the properties of a tab. Properties that are not specified in <var>updateProperties</var> are not modified.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "Defaults to the selected tab of the $(topic:current-window)[current window]." - }, - { - "type": "object", - "name": "updateProperties", - "properties": { - "url": { - "type": "string", - "optional": true, - "description": "A URL to navigate the tab to." - }, - "active": { - "type": "boolean", - "optional": true, - "description": "Whether the tab should be active. Does not affect whether the window is focused (see $(ref:windows.update))." - }, - "highlighted": { - "unsupported": true, - "type": "boolean", - "optional": true, - "description": "Adds or removes the tab from the current selection." - }, - "selected": { - "unsupported": true, - "deprecated": "Please use <em>highlighted</em>.", - "type": "boolean", - "optional": true, - "description": "Whether the tab should be selected." - }, - "pinned": { - "type": "boolean", - "optional": true, - "description": "Whether the tab should be pinned." - }, - "muted": { - "type": "boolean", - "optional": true, - "description": "Whether the tab should be muted." - }, - "openerTabId": { - "unsupported": true, - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as this tab." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "tab", - "$ref": "Tab", - "optional": true, - "description": "Details about the updated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested." - } - ] - } - ] - }, - { - "name": "move", - "type": "function", - "description": "Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === \"normal\") windows.", - "async": "callback", - "parameters": [ - { - "name": "tabIds", - "description": "The tab or list of tabs to move.", - "choices": [ - {"type": "integer", "minimum": 0}, - {"type": "array", "items": {"type": "integer", "minimum": 0}} - ] - }, - { - "type": "object", - "name": "moveProperties", - "properties": { - "windowId": { - "type": "integer", - "minimum": -2, - "optional": true, - "description": "Defaults to the window the tab is currently in." - }, - "index": { - "type": "integer", - "minimum": -1, - "description": "The position to move the window to. -1 will place the tab at the end of the window." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "tabs", - "description": "Details about the moved tabs.", - "choices": [ - {"$ref": "Tab"}, - {"type": "array", "items": {"$ref": "Tab"}} - ] - } - ] - } - ] - }, - { - "name": "reload", - "type": "function", - "description": "Reload a tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "The ID of the tab to reload; defaults to the selected tab of the current window." - }, - { - "type": "object", - "name": "reloadProperties", - "optional": true, - "properties": { - "bypassCache": { - "type": "boolean", - "optional": true, - "description": "Whether using any local cache. Default is false." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "remove", - "type": "function", - "description": "Closes one or more tabs.", - "async": "callback", - "parameters": [ - { - "name": "tabIds", - "description": "The tab or list of tabs to close.", - "choices": [ - {"type": "integer", "minimum": 0}, - {"type": "array", "items": {"type": "integer", "minimum": 0}} - ] - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - }, - { - "name": "detectLanguage", - "type": "function", - "description": "Detects the primary language of the content in a tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "Defaults to the active tab of the $(topic:current-window)[current window]." - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "type": "string", - "name": "language", - "description": "An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc'>kLanguageInfoTable</a>. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, <code>und</code> will be returned." - } - ] - } - ] - }, - { - "name": "captureVisibleTab", - "type": "function", - "description": "Captures the visible area of the currently active tab in the specified window. You must have $(topic:declare_permissions)[<all_urls>] permission to use this method.", - "permissions": ["<all_urls>"], - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": -2, - "optional": true, - "description": "The target window. Defaults to the $(topic:current-window)[current window]." - }, - { - "$ref": "extensionTypes.ImageDetails", - "name": "options", - "optional": true - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "type": "string", - "name": "dataUrl", - "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display." - } - ] - } - ] - }, - { - "name": "executeScript", - "type": "function", - "description": "Injects JavaScript code into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "The ID of the tab in which to run the script; defaults to the active tab of the current window." - }, - { - "$ref": "extensionTypes.InjectDetails", - "name": "details", - "description": "Details of the script to run." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "description": "Called after all the JavaScript has been executed.", - "parameters": [ - { - "name": "result", - "optional": true, - "type": "array", - "items": {"type": "any"}, - "description": "The result of the script in every injected frame." - } - ] - } - ] - }, - { - "name": "insertCSS", - "type": "function", - "description": "Injects CSS into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "The ID of the tab in which to insert the CSS; defaults to the active tab of the current window." - }, - { - "$ref": "extensionTypes.InjectDetails", - "name": "details", - "description": "Details of the CSS text to insert." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "description": "Called when all the CSS has been inserted.", - "parameters": [] - } - ] - }, - { - "name": "removeCSS", - "type": "function", - "description": "Removes injected CSS from a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "The ID of the tab from which to remove the injected CSS; defaults to the active tab of the current window." - }, - { - "$ref": "extensionTypes.InjectDetails", - "name": "details", - "description": "Details of the CSS text to remove." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "description": "Called when all the CSS has been removed.", - "parameters": [] - } - ] - }, - { - "name": "setZoom", - "type": "function", - "description": "Zooms a specified tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "The ID of the tab to zoom; defaults to the active tab of the current window." - }, - { - "type": "number", - "name": "zoomFactor", - "description": "The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "description": "Called after the zoom factor has been changed.", - "parameters": [] - } - ] - }, - { - "name": "getZoom", - "type": "function", - "description": "Gets the current zoom factor of a specified tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "optional": true, - "description": "The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window." - }, - { - "type": "function", - "name": "callback", - "description": "Called with the tab's current zoom factor after it has been fetched.", - "parameters": [ - { - "type": "number", - "name": "zoomFactor", - "description": "The tab's current zoom factor." - } - ] - } - ] - }, - { - "name": "setZoomSettings", - "type": "function", - "description": "Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "optional": true, - "minimum": 0, - "description": "The ID of the tab to change the zoom settings for; defaults to the active tab of the current window." - }, - { - "$ref": "ZoomSettings", - "name": "zoomSettings", - "description": "Defines how zoom changes are handled and at what scope." - }, - { - "type": "function", - "name": "callback", - "optional": true, - "description": "Called after the zoom settings have been changed.", - "parameters": [] - } - ] - }, - { - "name": "getZoomSettings", - "type": "function", - "description": "Gets the current zoom settings of a specified tab.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "optional": true, - "minimum": 0, - "description": "The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window." - }, - { - "type": "function", - "name": "callback", - "description": "Called with the tab's current zoom settings.", - "parameters": [ - { - "$ref": "ZoomSettings", - "name": "zoomSettings", - "description": "The tab's current zoom settings." - } - ] - } - ] - } - ], - "events": [ - { - "name": "onCreated", - "type": "function", - "description": "Fired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.", - "parameters": [ - { - "$ref": "Tab", - "name": "tab", - "description": "Details of the tab that was created." - } - ] - }, - { - "name": "onUpdated", - "type": "function", - "description": "Fired when a tab is updated.", - "parameters": [ - {"type": "integer", "name": "tabId", "minimum": 0}, - { - "type": "object", - "name": "changeInfo", - "description": "Lists the changes to the state of the tab that was updated.", - "properties": { - "status": { - "type": "string", - "optional": true, - "description": "The status of the tab. Can be either <em>loading</em> or <em>complete</em>." - }, - "url": { - "type": "string", - "optional": true, - "description": "The tab's URL if it has changed." - }, - "pinned": { - "type": "boolean", - "optional": true, - "description": "The tab's new pinned state." - }, - "audible": { - "type": "boolean", - "optional": true, - "description": "The tab's new audible state." - }, - "mutedInfo": { - "$ref": "MutedInfo", - "optional": true, - "description": "The tab's new muted state and the reason for the change." - }, - "favIconUrl": { - "type": "string", - "optional": true, - "description": "The tab's new favicon URL." - } - } - }, - { - "$ref": "Tab", - "name": "tab", - "description": "Gives the state of the tab that was updated." - } - ] - }, - { - "name": "onMoved", - "type": "function", - "description": "Fired when a tab is moved within a window. Only one move event is fired, representing the tab the user directly moved. Move events are not fired for the other tabs that must move in response. This event is not fired when a tab is moved between windows. For that, see $(ref:tabs.onDetached).", - "parameters": [ - {"type": "integer", "name": "tabId", "minimum": 0}, - { - "type": "object", - "name": "moveInfo", - "properties": { - "windowId": {"type": "integer", "minimum": 0}, - "fromIndex": {"type": "integer", "minimum": 0}, - "toIndex": {"type": "integer", "minimum": 0} - } - } - ] - }, - { - "name": "onSelectionChanged", - "deprecated": "Please use $(ref:tabs.onActivated).", - "unsupported": true, - "type": "function", - "description": "Fires when the selected tab in a window changes.", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "description": "The ID of the tab that has become active." - }, - { - "type": "object", - "name": "selectInfo", - "properties": { - "windowId": { - "type": "integer", - "minimum": 0, - "description": "The ID of the window the selected tab changed inside of." - } - } - } - ] - }, - { - "name": "onActiveChanged", - "deprecated": "Please use $(ref:tabs.onActivated).", - "unsupported": true, - "type": "function", - "description": "Fires when the selected tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to $(ref:tabs.onUpdated) events to be notified when a URL is set.", - "parameters": [ - { - "type": "integer", - "name": "tabId", - "minimum": 0, - "description": "The ID of the tab that has become active." - }, - { - "type": "object", - "name": "selectInfo", - "properties": { - "windowId": { - "type": "integer", - "minimum": 0, - "description": "The ID of the window the selected tab changed inside of." - } - } - } - ] - }, - { - "name": "onActivated", - "type": "function", - "description": "Fires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.", - "parameters": [ - { - "type": "object", - "name": "activeInfo", - "properties": { - "tabId": { - "type": "integer", - "minimum": 0, - "description": "The ID of the tab that has become active." - }, - "windowId": { - "type": "integer", - "minimum": 0, - "description": "The ID of the window the active tab changed inside of." - } - } - } - ] - }, - { - "name": "onHighlightChanged", - "deprecated": "Please use $(ref:tabs.onHighlighted).", - "unsupported": true, - "type": "function", - "description": "Fired when the highlighted or selected tabs in a window changes.", - "parameters": [ - { - "type": "object", - "name": "selectInfo", - "properties": { - "windowId": { - "type": "integer", - "minimum": 0, - "description": "The window whose tabs changed." - }, - "tabIds": { - "type": "array", - "items": {"type": "integer", "minimum": 0}, - "description": "All highlighted tabs in the window." - } - } - } - ] - }, - { - "name": "onHighlighted", - "type": "function", - "description": "Fired when the highlighted or selected tabs in a window changes.", - "parameters": [ - { - "type": "object", - "name": "highlightInfo", - "properties": { - "windowId": { - "type": "integer", - "minimum": 0, - "description": "The window whose tabs changed." - }, - "tabIds": { - "type": "array", - "items": {"type": "integer", "minimum": 0}, - "description": "All highlighted tabs in the window." - } - } - } - ] - }, - { - "name": "onDetached", - "type": "function", - "description": "Fired when a tab is detached from a window, for example because it is being moved between windows.", - "parameters": [ - {"type": "integer", "name": "tabId", "minimum": 0}, - { - "type": "object", - "name": "detachInfo", - "properties": { - "oldWindowId": {"type": "integer", "minimum": 0}, - "oldPosition": {"type": "integer", "minimum": 0} - } - } - ] - }, - { - "name": "onAttached", - "type": "function", - "description": "Fired when a tab is attached to a window, for example because it was moved between windows.", - "parameters": [ - {"type": "integer", "name": "tabId", "minimum": 0}, - { - "type": "object", - "name": "attachInfo", - "properties": { - "newWindowId": {"type": "integer", "minimum": 0}, - "newPosition": {"type": "integer", "minimum": 0} - } - } - ] - }, - { - "name": "onRemoved", - "type": "function", - "description": "Fired when a tab is closed.", - "parameters": [ - {"type": "integer", "name": "tabId", "minimum": 0}, - { - "type": "object", - "name": "removeInfo", - "properties": { - "windowId": {"type": "integer", "minimum": 0, "description": "The window whose tab is closed." }, - "isWindowClosing": {"type": "boolean", "description": "True when the tab is being closed because its window is being closed." } - } - } - ] - }, - { - "name": "onReplaced", - "type": "function", - "description": "Fired when a tab is replaced with another tab due to prerendering or instant.", - "parameters": [ - {"type": "integer", "name": "addedTabId", "minimum": 0}, - {"type": "integer", "name": "removedTabId", "minimum": 0} - ] - }, - { - "name": "onZoomChange", - "type": "function", - "description": "Fired when a tab is zoomed.", - "parameters": [{ - "type": "object", - "name": "ZoomChangeInfo", - "properties": { - "tabId": {"type": "integer", "minimum": 0}, - "oldZoomFactor": {"type": "number"}, - "newZoomFactor": {"type": "number"}, - "zoomSettings": {"$ref": "ZoomSettings"} - } - }] - } - ] - } -] diff --git a/application/basilisk/components/webextensions/schemas/windows.json b/application/basilisk/components/webextensions/schemas/windows.json deleted file mode 100644 index 8453358b5..000000000 --- a/application/basilisk/components/webextensions/schemas/windows.json +++ /dev/null @@ -1,508 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - { - "namespace": "windows", - "description": "Use the <code>browser.windows</code> API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.", - "types": [ - { - "id": "WindowType", - "type": "string", - "description": "The type of browser window this is. Under some circumstances a Window may not be assigned type property, for example when querying closed windows from the $(ref:sessions) API.", - "enum": ["normal", "popup", "panel", "app", "devtools"] - }, - { - "id": "WindowState", - "type": "string", - "description": "The state of this browser window. Under some circumstances a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API.", - "enum": ["normal", "minimized", "maximized", "fullscreen", "docked"] - }, - { - "id": "Window", - "type": "object", - "properties": { - "id": { - "type": "integer", - "optional": true, - "minimum": 0, - "description": "The ID of the window. Window IDs are unique within a browser session. Under some circumstances a Window may not be assigned an ID, for example when querying windows using the $(ref:sessions) API, in which case a session ID may be present." - }, - "focused": { - "type": "boolean", - "description": "Whether the window is currently the focused window." - }, - "top": { - "type": "integer", - "optional": true, - "description": "The offset of the window from the top edge of the screen in pixels. Under some circumstances a Window may not be assigned top property, for example when querying closed windows from the $(ref:sessions) API." - }, - "left": { - "type": "integer", - "optional": true, - "description": "The offset of the window from the left edge of the screen in pixels. Under some circumstances a Window may not be assigned left property, for example when querying closed windows from the $(ref:sessions) API." - }, - "width": { - "type": "integer", - "optional": true, - "description": "The width of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned width property, for example when querying closed windows from the $(ref:sessions) API." - }, - "height": { - "type": "integer", - "optional": true, - "description": "The height of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned height property, for example when querying closed windows from the $(ref:sessions) API." - }, - "tabs": { - "type": "array", - "items": { "$ref": "tabs.Tab" }, - "optional": true, - "description": "Array of $(ref:tabs.Tab) objects representing the current tabs in the window." - }, - "incognito": { - "type": "boolean", - "description": "Whether the window is incognito." - }, - "type": { - "$ref": "WindowType", - "optional": true, - "description": "The type of browser window this is." - }, - "state": { - "$ref": "WindowState", - "optional": true, - "description": "The state of this browser window." - }, - "alwaysOnTop": { - "type": "boolean", - "description": "Whether the window is set to be always on top." - }, - "sessionId": { - "type": "string", - "optional": true, - "description": "The session ID used to uniquely identify a Window obtained from the $(ref:sessions) API." - } - } - }, - { - "id": "CreateType", - "type": "string", - "description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.", - "enum": ["normal", "popup", "panel", "detached_panel"] - } - ], - "properties": { - "WINDOW_ID_NONE": { - "value": -1, - "description": "The windowId value that represents the absence of a browser window." - }, - "WINDOW_ID_CURRENT": { - "value": -2, - "description": "The windowId value that represents the $(topic:current-window)[current window]." - } - }, - "functions": [ - { - "name": "get", - "type": "function", - "description": "Gets details about a window.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": -2 - }, - { - "type": "object", - "name": "getInfo", - "optional": true, - "description": "", - "properties": { - "populate": { - "type": "boolean", - "optional": true, - "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." - }, - "windowTypes": { - "type": "array", - "items": { - "$ref": "WindowType" - }, - "optional": true, - "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "window", - "$ref": "Window" - } - ] - } - ] - }, - { - "name": "getCurrent", - "type": "function", - "description": "Gets the $(topic:current-window)[current window].", - "async": "callback", - "parameters": [ - { - "type": "object", - "name": "getInfo", - "optional": true, - "description": "", - "properties": { - "populate": { - "type": "boolean", - "optional": true, - "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." - }, - "windowTypes": { - "type": "array", - "items": { "$ref": "WindowType" }, - "optional": true, - "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "window", - "$ref": "Window" - } - ] - } - ] - }, - { - "name": "getLastFocused", - "type": "function", - "description": "Gets the window that was most recently focused — typically the window 'on top'.", - "async": "callback", - "parameters": [ - { - "type": "object", - "name": "getInfo", - "optional": true, - "description": "", - "properties": { - "populate": { - "type": "boolean", - "optional": true, - "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." - }, - "windowTypes": { - "type": "array", - "items": { "$ref": "WindowType" }, - "optional": true, - "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "window", - "$ref": "Window" - } - ] - } - ] - }, - { - "name": "getAll", - "type": "function", - "description": "Gets all windows.", - "async": "callback", - "parameters": [ - { - "type": "object", - "name": "getInfo", - "optional": true, - "description": "", - "properties": { - "populate": { - "type": "boolean", - "optional": true, - "description": "If true, each $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects for that window. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." - }, - "windowTypes": { - "type": "array", - "items": { "$ref": "WindowType" }, - "optional": true, - "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows." - } - } - }, - { - "type": "function", - "name": "callback", - "parameters": [ - { - "name": "windows", - "type": "array", - "items": { "$ref": "Window" } - } - ] - } - ] - }, - { - "name": "create", - "type": "function", - "description": "Creates (opens) a new browser with any optional sizing, position or default URL provided.", - "async": "callback", - "parameters": [ - { - "type": "object", - "name": "createData", - "optional": true, - "default": {}, - "properties": { - "url": { - "description": "A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.", - "optional": true, - "choices": [ - { "type": "string", "format": "relativeUrl" }, - { - "type": "array", - "items": { "type": "string", "format": "relativeUrl" } - } - ] - }, - "tabId": { - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The id of the tab for which you want to adopt to the new window." - }, - "left": { - "type": "integer", - "optional": true, - "description": "The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels." - }, - "top": { - "type": "integer", - "optional": true, - "description": "The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels." - }, - "width": { - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The width in pixels of the new window, including the frame. If not specified defaults to a natural width." - }, - "height": { - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The height in pixels of the new window, including the frame. If not specified defaults to a natural height." - }, - "focused": { - "unsupported": true, - "type": "boolean", - "optional": true, - "description": "If true, opens an active window. If false, opens an inactive window." - }, - "incognito": { - "type": "boolean", - "optional": true, - "description": "Whether the new window should be an incognito window." - }, - "type": { - "$ref": "CreateType", - "optional": true, - "description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set." - }, - "state": { - "$ref": "WindowState", - "optional": true, - "description": "The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'." - }, - "allowScriptsToClose": { - "type": "boolean", - "optional": true, - "description": "Allow scripts to close the window." - } - }, - "optional": true - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "window", - "$ref": "Window", - "description": "Contains details about the created window.", - "optional": true - } - ] - } - ] - }, - { - "name": "update", - "type": "function", - "description": "Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": -2 - }, - { - "type": "object", - "name": "updateInfo", - "properties": { - "left": { - "type": "integer", - "optional": true, - "description": "The offset from the left edge of the screen to move the window to in pixels. This value is ignored for panels." - }, - "top": { - "type": "integer", - "optional": true, - "description": "The offset from the top edge of the screen to move the window to in pixels. This value is ignored for panels." - }, - "width": { - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The width to resize the window to in pixels. This value is ignored for panels." - }, - "height": { - "type": "integer", - "minimum": 0, - "optional": true, - "description": "The height to resize the window to in pixels. This value is ignored for panels." - }, - "focused": { - "type": "boolean", - "optional": true, - "description": "If true, brings the window to the front. If false, brings the next window in the z-order to the front." - }, - "drawAttention": { - "type": "boolean", - "optional": true, - "description": "If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request." - }, - "state": { - "$ref": "WindowState", - "optional": true, - "description": "The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'." - } - } - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [ - { - "name": "window", - "$ref": "Window" - } - ] - } - ] - }, - { - "name": "remove", - "type": "function", - "description": "Removes (closes) a window, and all the tabs inside it.", - "async": "callback", - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": 0 - }, - { - "type": "function", - "name": "callback", - "optional": true, - "parameters": [] - } - ] - } - ], - "events": [ - { - "name": "onCreated", - "type": "function", - "description": "Fired when a window is created.", - "filters": [ - { - "name": "windowTypes", - "type": "array", - "items": { "$ref": "WindowType" }, - "description": "Conditions that the window's type being created must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows." - } - ], - "parameters": [ - { - "$ref": "Window", - "name": "window", - "description": "Details of the window that was created." - } - ] - }, - { - "name": "onRemoved", - "type": "function", - "description": "Fired when a window is removed (closed).", - "filters": [ - { - "name": "windowTypes", - "type": "array", - "items": { "$ref": "WindowType" }, - "description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows." - } - ], - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": 0, - "description": "ID of the removed window." - } - ] - }, - { - "name": "onFocusChanged", - "type": "function", - "description": "Fired when the currently focused window changes. Will be $(ref:windows.WINDOW_ID_NONE) if all browser windows have lost focus. Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one browser window to another.", - "filters": [ - { - "name": "windowTypes", - "type": "array", - "items": { "$ref": "WindowType" }, - "description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows." - } - ], - "parameters": [ - { - "type": "integer", - "name": "windowId", - "minimum": -1, - "description": "ID of the newly focused window." - } - ] - } - ] - } -] diff --git a/application/basilisk/configure.in b/application/basilisk/configure.in index 8527d218c..4e7a06390 100644 --- a/application/basilisk/configure.in +++ b/application/basilisk/configure.in @@ -16,16 +16,3 @@ AC_SUBST(MC_BASILISK) dnl Optional parts of the build. -dnl ======================================================== -dnl = Disable WebExtensions -dnl ======================================================== -MOZ_ARG_DISABLE_BOOL(webextensions, -[ --disable-webextensions Disable WebExtensions], - MOZ_WEBEXTENSIONS=, - MOZ_WEBEXTENSIONS=1) - -if test -n "$MOZ_WEBEXTENSIONS"; then - AC_DEFINE(MOZ_WEBEXTENSIONS) -fi - -AC_SUBST(MOZ_WEBEXTENSIONS)
\ No newline at end of file diff --git a/application/basilisk/confvars.sh b/application/basilisk/confvars.sh index 62aa1a84f..2df7e826a 100644 --- a/application/basilisk/confvars.sh +++ b/application/basilisk/confvars.sh @@ -15,10 +15,6 @@ if test "$OS_ARCH" = "WINNT" -o \ MOZ_BUNDLED_FONTS=1 fi -if test "$OS_ARCH" = "WINNT"; then - MOZ_MAINTENANCE_SERVICE= -fi - # For Basilisk we want to use 52.9.YYYY.MM.DD as MOZ_APP_VERSION in release # builds so add-on developers have something to target while maintaining # Firefox compatiblity. @@ -55,7 +51,6 @@ MOZ_APP_STATIC_INI=1 MOZ_WEBGL_CONFORMANT=1 MOZ_JSDOWNLOADS=1 MOZ_WEBRTC=1 -MOZ_WEBEXTENSIONS=1 MOZ_DEVTOOLS=1 MOZ_SERVICES_COMMON=1 MOZ_SERVICES_SYNC=1 diff --git a/application/basilisk/installer/package-manifest.in b/application/basilisk/installer/package-manifest.in index 485bc4917..7e12e3af2 100644 --- a/application/basilisk/installer/package-manifest.in +++ b/application/basilisk/installer/package-manifest.in @@ -58,8 +58,8 @@ #ifdef HAVE_MAKENSISU @BINPATH@/uninstall/helper.exe #endif -#ifdef MOZ_UPDATER @RESPATH@/update.locale +#ifdef MOZ_UPDATER @RESPATH@/updater.ini #endif @@ -397,15 +397,9 @@ @RESPATH@/components/addonManager.js @RESPATH@/components/amContentHandler.js @RESPATH@/components/amInstallTrigger.js -#ifdef MOZ_WEBEXTENSIONS -@RESPATH@/components/amWebAPI.js -#endif @RESPATH@/components/amWebInstallListener.js @RESPATH@/components/nsBlocklistService.js @RESPATH@/components/blocklist.manifest -#ifdef MOZ_WEBEXTENSIONS -@RESPATH@/components/nsBlocklistServiceContent.js -#endif #ifdef MOZ_UPDATER @RESPATH@/components/nsUpdateService.manifest @RESPATH@/components/nsUpdateService.js @@ -554,12 +548,6 @@ @RESPATH@/components/TestInterfaceJSMaplike.js #endif -#ifdef MOZ_WEBEXTENSIONS -; [Extensions] -@RESPATH@/components/extensions-toolkit.manifest -@RESPATH@/browser/components/extensions-browser.manifest -#endif - ; Modules @RESPATH@/browser/modules/* @RESPATH@/modules/* @@ -738,13 +726,6 @@ bin/libfreebl_32int64_3.so #endif #endif -; [MaintenanceService] -; -#ifdef MOZ_MAINTENANCE_SERVICE -@BINPATH@/maintenanceservice.exe -@BINPATH@/maintenanceservice_installer.exe -#endif - @RESPATH@/components/dom_audiochannel.xpt ; Shutdown Terminator diff --git a/application/basilisk/installer/windows/Makefile.in b/application/basilisk/installer/windows/Makefile.in index bab6ded1a..5326ab897 100644 --- a/application/basilisk/installer/windows/Makefile.in +++ b/application/basilisk/installer/windows/Makefile.in @@ -14,12 +14,6 @@ INSTALLER_FILES = \ nsis/shared.nsh \ $(NULL) -ifdef MOZ_MAINTENANCE_SERVICE -INSTALLER_FILES += \ - nsis/maintenanceservice_installer.nsi \ - $(NULL) -endif - BRANDING_FILES = \ branding.nsi \ appname.bmp \ diff --git a/application/basilisk/installer/windows/nsis/defines.nsi.in b/application/basilisk/installer/windows/nsis/defines.nsi.in index dbb58ca33..8981bbde8 100644 --- a/application/basilisk/installer/windows/nsis/defines.nsi.in +++ b/application/basilisk/installer/windows/nsis/defines.nsi.in @@ -51,10 +51,6 @@ !define MinSupportedCPU "SSE2" -#ifdef MOZ_MAINTENANCE_SERVICE -!define MOZ_MAINTENANCE_SERVICE -#endif - # File details shared by both the installer and uninstaller VIProductVersion "1.0.0.0" VIAddVersionKey "ProductName" "${BrandShortName}" diff --git a/application/basilisk/installer/windows/nsis/installer.nsi b/application/basilisk/installer/windows/nsis/installer.nsi index 994c09279..fa8e95775 100644 --- a/application/basilisk/installer/windows/nsis/installer.nsi +++ b/application/basilisk/installer/windows/nsis/installer.nsi @@ -165,11 +165,6 @@ Page custom preOptions leaveOptions !define MUI_DIRECTORYPAGE_VERIFYONLEAVE !insertmacro MUI_PAGE_DIRECTORY -; Custom Components Page -!ifdef MOZ_MAINTENANCE_SERVICE -Page custom preComponents leaveComponents -!endif - ; Custom Shortcuts Page Page custom preShortcuts leaveShortcuts @@ -427,41 +422,6 @@ Section "-Application" APP_IDX ${EndIf} ${EndIf} -!ifdef MOZ_MAINTENANCE_SERVICE - ; If the maintenance service page was displayed then a value was already - ; explicitly selected for installing the maintenance service and - ; and so InstallMaintenanceService will already be 0 or 1. - ; If the maintenance service page was not displayed then - ; InstallMaintenanceService will be equal to "". - ${If} $InstallMaintenanceService == "" - Call IsUserAdmin - Pop $R0 - ${If} $R0 == "true" - ; Only proceed if we have HKLM write access - ${AndIf} $TmpVal == "HKLM" - ; On Windows < XP SP3 we do not install the maintenance service. - ${If} ${IsWinXP} - ${AndIf} ${AtMostServicePack} 2 - StrCpy $InstallMaintenanceService "0" - ${Else} - ; The user is an admin, so we should default to installing the service. - StrCpy $InstallMaintenanceService "1" - ${EndIf} - ${Else} - ; The user is not admin, so we can't install the service. - StrCpy $InstallMaintenanceService "0" - ${EndIf} - ${EndIf} - - ${If} $InstallMaintenanceService == "1" - ; The user wants to install the maintenance service, so execute - ; the pre-packaged maintenance service installer. - ; This option can only be turned on if the user is an admin so there - ; is no need to use ExecShell w/ verb runas to enforce elevated. - nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\"" - ${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}" @@ -578,13 +538,6 @@ Section "-Application" APP_IDX ${EndIf} ${EndUnless} ${EndIf} - -!ifdef MOZ_MAINTENANCE_SERVICE - ${If} $TmpVal == "HKLM" - ; Add the registry keys for allowed certificates. - ${AddMaintCertKeys} - ${EndIf} -!endif SectionEnd ; Cleanup operations to perform at the end of the installation. @@ -948,59 +901,6 @@ Function leaveShortcuts ${EndIf} FunctionEnd -!ifdef MOZ_MAINTENANCE_SERVICE -Function preComponents - ; If the service already exists, don't show this page - ServicesHelper::IsInstalled "MozillaMaintenance" - Pop $R9 - ${If} $R9 == 1 - ; The service already exists so don't show this page. - Abort - ${EndIf} - - ; On Windows < XP SP3 we do not install the maintenance service. - ${If} ${IsWinXP} - ${AndIf} ${AtMostServicePack} 2 - Abort - ${EndIf} - - ; Don't show the custom components page if the - ; user is not an admin - Call IsUserAdmin - Pop $R9 - ${If} $R9 != "true" - Abort - ${EndIf} - - ; Only show the maintenance service page if we have write access to HKLM - ClearErrors - WriteRegStr HKLM "Software\Mozilla" \ - "${BrandShortName}InstallerTest" "Write Test" - ${If} ${Errors} - ClearErrors - Abort - ${Else} - DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" - ${EndIf} - - StrCpy $PageName "Components" - ${CheckCustomCommon} - !insertmacro MUI_HEADER_TEXT "$(COMPONENTS_PAGE_TITLE)" "$(COMPONENTS_PAGE_SUBTITLE)" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini" -FunctionEnd - -Function leaveComponents - ${MUI_INSTALLOPTIONS_READ} $0 "components.ini" "Settings" "State" - ${If} $0 != 0 - Abort - ${EndIf} - ${MUI_INSTALLOPTIONS_READ} $InstallMaintenanceService "components.ini" "Field 2" "State" - ${If} $InstallType == ${INSTALLTYPE_CUSTOM} - Call CheckExistingInstall - ${EndIf} -FunctionEnd -!endif - Function preSummary StrCpy $PageName "Summary" ; Setup the summary.ini file for the Custom Summary Page diff --git a/application/basilisk/installer/windows/nsis/maintenanceservice_installer.nsi b/application/basilisk/installer/windows/nsis/maintenanceservice_installer.nsi deleted file mode 100644 index 1f73bac6a..000000000 --- a/application/basilisk/installer/windows/nsis/maintenanceservice_installer.nsi +++ /dev/null @@ -1,332 +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/. - -; 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 admin - -; 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 ./ - -; Variables -Var TempMaintServiceName -Var BrandFullNameDA -Var BrandFullName - -; 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 - -; The test slaves use this fallback key to run tests. -; And anyone that wants to run tests themselves should already have -; this installed. -!define FallbackKey \ - "SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4" - -!define CompanyName "Mozilla Corporation" -!define BrandFullNameInternal "" - -; The following includes are custom. -!include defines.nsi -; We keep defines.nsi defined so that we get other things like -; the version number, but we redefine BrandFullName -!define MaintFullName "Mozilla Maintenance Service" -!undef BrandFullName -!define BrandFullName "${MaintFullName}" - -!include common.nsh -!include locales.nsi - -VIAddVersionKey "FileDescription" "${MaintFullName} Installer" -VIAddVersionKey "OriginalFilename" "maintenanceservice_installer.exe" - -Name "${MaintFullName}" -OutFile "maintenanceservice_installer.exe" - -; Get installation folder from registry if available -InstallDirRegKey HKLM "Software\Mozilla\MaintenanceService" "" - -SetOverwrite on - -; serviceinstall.cpp also uses this key, in case the path is changed, update -; there too. -!define MaintUninstallKey \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService" - -; Always install into the 32-bit location even if we have a 64-bit build. -; This is because we use only 1 service for all Basilisk channels. -; Allow either x86 and x64 builds to exist at this location, depending on -; what is the latest build. -InstallDir "$PROGRAMFILES32\${MaintFullName}\" -ShowUnInstDetails nevershow - -################################################################################ -# Modern User Interface - MUI - -!define MUI_ICON setup.ico -!define MUI_UNICON setup.ico -!define MUI_WELCOMEPAGE_TITLE_3LINES -!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp - -;Interface Settings -!define MUI_ABORTWARNING - -; Uninstaller Pages -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES - -################################################################################ -# 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 " " - -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 "")' - - SetSilent silent - - ${Unless} ${AtLeastWin7} - Abort - ${EndUnless} -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 "")' - -; 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 - - StrCpy $BrandFullNameDA "${MaintFullName}" - StrCpy $BrandFullName "${MaintFullName}" -FunctionEnd - -Section "MaintenanceService" - AllowSkipFiles off - - CreateDirectory $INSTDIR - SetOutPath $INSTDIR - - ; If the service already exists, then it will be stopped when upgrading it - ; via the maintenanceservice_tmp.exe command executed below. - ; The maintenanceservice_tmp.exe command will rename the file to - ; maintenanceservice.exe if maintenanceservice_tmp.exe is newer. - ; If the service does not exist yet, we install it and drop the file on - ; disk as maintenanceservice.exe directly. - StrCpy $TempMaintServiceName "maintenanceservice.exe" - IfFileExists "$INSTDIR\maintenanceservice.exe" 0 skipAlreadyExists - StrCpy $TempMaintServiceName "maintenanceservice_tmp.exe" - skipAlreadyExists: - - ; We always write out a copy and then decide whether to install it or - ; not via calling its 'install' cmdline which works by version comparison. - CopyFiles "$EXEDIR\maintenanceservice.exe" "$INSTDIR\$TempMaintServiceName" - - ; The updater.ini file is only used when performing an install or upgrade, - ; and only if that install or upgrade is successful. If an old updater.ini - ; happened to be copied into the maintenance service installation directory - ; but the service was not newer, the updater.ini file would be unused. - ; It is used to fill the description of the service on success. - CopyFiles "$EXEDIR\updater.ini" "$INSTDIR\updater.ini" - - ; Install the application maintenance service. - ; If a service already exists, the command line parameter will stop the - ; service and only install itself if it is newer than the already installed - ; service. If successful it will remove the old maintenanceservice.exe - ; and replace it with maintenanceservice_tmp.exe. - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/Upgrade" $0 - ${If} ${Errors} - ExecWait '"$INSTDIR\$TempMaintServiceName" install' - ${Else} - ; The upgrade cmdline is the same as install except - ; It will fail if the service isn't already installed. - ExecWait '"$INSTDIR\$TempMaintServiceName" upgrade' - ${EndIf} - - WriteUninstaller "$INSTDIR\Uninstall.exe" - WriteRegStr HKLM "${MaintUninstallKey}" "DisplayName" "${MaintFullName}" - WriteRegStr HKLM "${MaintUninstallKey}" "UninstallString" \ - '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "${MaintUninstallKey}" "DisplayIcon" \ - "$INSTDIR\Uninstall.exe,0" - WriteRegStr HKLM "${MaintUninstallKey}" "DisplayVersion" "${AppVersion}" - WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Mozilla" - WriteRegStr HKLM "${MaintUninstallKey}" "Comments" "${BrandFullName}" - WriteRegDWORD HKLM "${MaintUninstallKey}" "NoModify" 1 - ${GetSize} "$INSTDIR" "/S=0K" $R2 $R3 $R4 - WriteRegDWORD HKLM "${MaintUninstallKey}" "EstimatedSize" $R2 - - ; Write out that a maintenance service was attempted. - ; We do this because on upgrades we will check this value and we only - ; want to install once on the first upgrade to maintenance service. - ; Also write out that we are currently installed, preferences will check - ; this value to determine if we should show the service update pref. - ; Since the Maintenance service can be installed either x86 or x64, - ; always use the 64-bit registry for checking if an attempt was made. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1 - WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1 - DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled" - - ; Included here for debug purposes only. - ; These keys are used to bypass the installation dir is a valid installation - ; check from the service so that tests can be run. - ; WriteRegStr HKLM "${FallbackKey}\0" "name" "Mozilla Corporation" - ; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "DigiCert SHA2 Assured ID Code Signing CA" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} -SectionEnd - -; By renaming before deleting we improve things slightly in case -; there is a file in use error. In this case a new install can happen. -Function un.RenameDelete - Pop $9 - ; If the .moz-delete file already exists previously, delete it - ; If it doesn't exist, the call is ignored. - ; We don't need to pass /REBOOTOK here since it was already marked that way - ; if it exists. - Delete "$9.moz-delete" - Rename "$9" "$9.moz-delete" - ${If} ${Errors} - Delete /REBOOTOK "$9" - ${Else} - Delete /REBOOTOK "$9.moz-delete" - ${EndIf} - ClearErrors -FunctionEnd - -Section "Uninstall" - ; Delete the service so that no updates will be attempted - ExecWait '"$INSTDIR\maintenanceservice.exe" uninstall' - - Push "$INSTDIR\updater.ini" - Call un.RenameDelete - Push "$INSTDIR\maintenanceservice.exe" - Call un.RenameDelete - Push "$INSTDIR\maintenanceservice_tmp.exe" - Call un.RenameDelete - Push "$INSTDIR\maintenanceservice.old" - Call un.RenameDelete - Push "$INSTDIR\Uninstall.exe" - Call un.RenameDelete - Push "$INSTDIR\update\updater.ini" - Call un.RenameDelete - Push "$INSTDIR\update\updater.exe" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-1.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-2.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-3.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-4.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-5.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-6.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-7.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-8.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-9.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-10.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-install.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-uninstall.log" - Call un.RenameDelete - SetShellVarContext all - Push "$APPDATA\Mozilla\logs\maintenanceservice.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-1.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-2.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-3.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-4.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-5.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-6.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-7.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-8.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-9.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-10.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-install.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-uninstall.log" - Call un.RenameDelete - RMDir /REBOOTOK "$APPDATA\Mozilla\logs" - RMDir /REBOOTOK "$APPDATA\Mozilla" - RMDir /REBOOTOK "$INSTDIR\logs" - RMDir /REBOOTOK "$INSTDIR\update" - RMDir /REBOOTOK "$INSTDIR" - - DeleteRegKey HKLM "${MaintUninstallKey}" - - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "Installed" - DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled" - DeleteRegKey HKLM "${FallbackKey}\" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} -SectionEnd diff --git a/application/basilisk/installer/windows/nsis/shared.nsh b/application/basilisk/installer/windows/nsis/shared.nsh index fb2239d24..f5bbef389 100644 --- a/application/basilisk/installer/windows/nsis/shared.nsh +++ b/application/basilisk/installer/windows/nsis/shared.nsh @@ -124,51 +124,6 @@ ${FixDistributionsINI} RmDir /r /REBOOTOK "$INSTDIR\${TO_BE_DELETED}" - -!ifdef MOZ_MAINTENANCE_SERVICE - Call IsUserAdmin - Pop $R0 - ${If} $R0 == "true" - ; Only proceed if we have HKLM write access - ${AndIf} $TmpVal == "HKLM" - ; On Windows 2000 we do not install the maintenance service. - ${AndIf} ${AtLeastWinXP} - ; We check to see if the maintenance service install was already attempted. - ; Since the Maintenance service can be installed either x86 or x64, - ; always use the 64-bit registry for checking if an attempt was made. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - ReadRegDWORD $5 HKLM "Software\Mozilla\MaintenanceService" "Attempted" - ClearErrors - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} - - ; Add the registry keys for allowed certificates. - ${AddMaintCertKeys} - - ; If the maintenance service is already installed, do nothing. - ; The maintenance service will launch: - ; maintenanceservice_installer.exe /Upgrade to upgrade the maintenance - ; service if necessary. If the update was done from updater.exe without - ; the service (i.e. service is failing), updater.exe will do the update of - ; the service. The reasons we do not do it here is because we don't want - ; to have to prompt for limited user accounts when the service isn't used - ; and we currently call the PostUpdate twice, once for the user and once - ; for the SYSTEM account. Also, this would stop the maintenance service - ; and we need a return result back to the service when run that way. - ${If} $5 == "" - ; An install of maintenance service was never attempted. - ; We know we are an Admin and that we have write access into HKLM - ; based on the above checks, so attempt to just run the EXE. - ; In the worst case, in case there is some edge case with the - ; IsAdmin check and the permissions check, the maintenance service - ; will just fail to be attempted to be installed. - nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\"" - ${EndIf} - ${EndIf} -!endif !macroend !define PostUpdate "!insertmacro PostUpdate" @@ -720,54 +675,6 @@ !macroend !define UpdateProtocolHandlers "!insertmacro UpdateProtocolHandlers" -!ifdef MOZ_MAINTENANCE_SERVICE -; Adds maintenance service certificate keys for the install dir. -; For the cert to work, it must also be signed by a trusted cert for the user. -!macro AddMaintCertKeys - Push $R0 - ; Allow main Mozilla cert information for updates - ; This call will push the needed key on the stack - ServicesHelper::PathToUniqueRegistryPath "$INSTDIR" - Pop $R0 - ${If} $R0 != "" - ; More than one certificate can be specified in a different subfolder - ; for example: $R0\1, but each individual binary can be signed - ; with at most one certificate. A fallback certificate can only be used - ; if the binary is replaced with a different certificate. - ; We always use the 64bit registry for certs. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - - ; PrefetchProcessName was originally used to experiment with deleting - ; Windows prefetch as a speed optimization. It is no longer used though. - DeleteRegValue HKLM "$R0" "prefetchProcessName" - - ; Setting the Attempted value will ensure that a new Maintenance Service - ; install will never be attempted again after this from updates. The value - ; is used only to see if updates should attempt new service installs. - WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1 - - ; These values associate the allowed certificates for the current - ; installation. - WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}" - WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}" - ; These values associate the allowed certificates for the previous - ; installation, so that we can update from it cleanly using the - ; old updater.exe (which will still have this signature). - WriteRegStr HKLM "$R0\1" "name" "${CERTIFICATE_NAME_PREVIOUS}" - WriteRegStr HKLM "$R0\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} - ClearErrors - ${EndIf} - ; Restore the previously used value back - Pop $R0 -!macroend -!define AddMaintCertKeys "!insertmacro AddMaintCertKeys" -!endif - ; Removes various registry entries for reasons noted below (does not use SHCTX). !macro RemoveDeprecatedKeys StrCpy $0 "SOFTWARE\Classes" diff --git a/application/basilisk/installer/windows/nsis/uninstaller.nsi b/application/basilisk/installer/windows/nsis/uninstaller.nsi index 87f4d838a..c556b0a90 100644 --- a/application/basilisk/installer/windows/nsis/uninstaller.nsi +++ b/application/basilisk/installer/windows/nsis/uninstaller.nsi @@ -450,24 +450,6 @@ Section "Uninstall" ; uninstalls of Basilisk-release with reinstalls of Basilisk-release, for example. WriteRegStr HKCU "Software\Mozilla\Basilisk" "Uninstalled-${UpdateChannel}" "True" -!ifdef MOZ_MAINTENANCE_SERVICE - ; Get the path the allowed cert is at and remove it - ; Keep this block of code last since it modfies the reg view - ServicesHelper::PathToUniqueRegistryPath "$INSTDIR" - Pop $MaintCertKey - ${If} $MaintCertKey != "" - ; Always use the 64bit registry for certs on 64bit systems. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - DeleteRegKey HKLM "$MaintCertKey" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} - ${EndIf} - Call un.UninstallServiceIfNotUsed -!endif - ${un.IsFirewallSvcRunning} Pop $0 ${If} "$0" == "true" diff --git a/application/basilisk/modules/WindowsPreviewPerTab.jsm b/application/basilisk/modules/WindowsPreviewPerTab.jsm index 6586b5d3b..81c2f229f 100644 --- a/application/basilisk/modules/WindowsPreviewPerTab.jsm +++ b/application/basilisk/modules/WindowsPreviewPerTab.jsm @@ -597,6 +597,7 @@ TabWindow.prototype = { "file", "chrome", "resource", "about" ]), onLinkIconAvailable: function (aBrowser, aIconURL) { + let self = this; let requestURL = null; if (aIconURL) { let shouldRequestFaviconURL = true; @@ -613,15 +614,15 @@ TabWindow.prototype = { let isDefaultFavicon = !requestURL; getFaviconAsImage( requestURL, - PrivateBrowsingUtils.isWindowPrivate(this.win), + PrivateBrowsingUtils.isWindowPrivate(self.win), img => { - let index = this.tabbrowser.browsers.indexOf(aBrowser); + 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 = this.tabbrowser.tabs[index]; - let preview = this.previews.get(tab); + let tab = self.tabbrowser.tabs[index]; + let preview = self.previews.get(tab); if (tab.getAttribute("image") == aIconURL || (!preview.icon && isDefaultFavicon)) { preview.icon = img; diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js index 1c6016f0f..3df5d7194 100644 --- a/application/palemoon/app/profile/palemoon.js +++ b/application/palemoon/app/profile/palemoon.js @@ -37,20 +37,20 @@ pref("extensions.strictCompatibility", false); // for it to be compatible by default. pref("extensions.minCompatibleAppVersion", "1.5"); -// Preferences for APO integration -#define APO_AM_URL addons.palemoon.org/integration/addon-manager -#define APO_AUS_ARGS reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE% +#define AM_DOMAIN addons.palemoon.org +#define AM_AUS_ARGS reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE% +// Preferences for AMO integration pref("extensions.getAddons.cache.enabled", false); pref("extensions.getAddons.maxResults", 10); -pref("extensions.getAddons.get.url", "https://@APO_AM_URL@/internal/get?addonguid=%IDS%&os=%OS%&version=%VERSION%"); -pref("extensions.getAddons.getWithPerformance.url", "https://@APO_AM_URL@/internal/get?addonguid=%IDS%&os=%OS%&version=%VERSION%"); -pref("extensions.getAddons.search.browseURL", "https://@APO_AM_URL@/external/recommended"); -pref("extensions.getAddons.search.url", "https://@APO_AM_URL@/internal/search?q=%TERMS%&locale=%LOCALE%&os=%OS%&version=%VERSION%"); -pref("extensions.webservice.discoverURL", "http://@APO_AM_URL@/internal/discover/"); -pref("extensions.getAddons.recommended.url", "https://@APO_AM_URL@/internal/recommended?locale=%LOCALE%&os=%OS%"); -pref("extensions.getAddons.browseAddons", "https://addons.palemoon.org"); -pref("extensions.getAddons.recommended.browseURL", "https://@APO_AM_URL@/external/recommended"); +pref("extensions.getAddons.get.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=get&addonguid=%IDS%&os=%OS%&version=%VERSION%"); +pref("extensions.getAddons.getWithPerformance.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=get&addonguid=%IDS%&os=%OS%&version=%VERSION%"); +pref("extensions.getAddons.search.browseURL", "https://@AM_DOMAIN@/search/?terms=%TERMS%"); +pref("extensions.getAddons.search.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=search&q=%TERMS%&locale=%LOCALE%&os=%OS%&version=%VERSION%"); +pref("extensions.webservice.discoverURL", "http://@AM_DOMAIN@/?component=discover"); +pref("extensions.getAddons.recommended.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=recommended&locale=%LOCALE%&os=%OS%"); +pref("extensions.getAddons.browseAddons", "http://@AM_DOMAIN@/"); +pref("extensions.getAddons.recommended.browseURL", "https://@AM_DOMAIN@/?component=integration&type=external&request=recommended"); // Blocklist preferences pref("extensions.blocklist.enabled", true); @@ -70,10 +70,10 @@ pref("extensions.update.autoUpdateDefault", true); pref("extensions.autoDisableScopes", 15); // Dictionary download preference -pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/"); +pref("browser.dictionaries.download.url", "https://@AM_DOMAIN@/dictionaries/"); // Get More Tools link URL -pref("browser.getdevtools.url","https://@APO_AM_URL@/external/devtools"); +pref("browser.getdevtools.url","https://@AM_DOMAIN@/?component=integration&type=external&request=devtools"); // Feedback URL pref("browser.feedback.url", "https://forum.palemoon.org"); @@ -194,8 +194,8 @@ pref("app.update.incompatible.mode", 0); // .. etc .. // pref("extensions.update.enabled", true); -pref("extensions.update.url", "https://@APO_AM_URL@/internal/update?@APO_AUS_ARGS@"); -pref("extensions.update.background.url", "https://@APO_AM_URL@/internal/update?@APO_AUS_ARGS@"); +pref("extensions.update.url", "https://@AM_DOMAIN@/?component=aus&@AM_AUS_ARGS@"); +pref("extensions.update.background.url", "https://@AM_DOMAIN@/?component=aus&@AM_AUS_ARGS@"); pref("extensions.update.interval", 86400); // Check for updates to Extensions and // Themes every day // Non-symmetric (not shared by extensions) extension-specific [update] preferences @@ -362,7 +362,7 @@ pref("browser.download.panel.shown", false); pref("browser.download.panel.firstSessionCompleted", false); // search engines URL -pref("browser.search.searchEnginesURL", "https://@APO_AM_URL@/external/searchplugins"); +pref("browser.search.searchEnginesURL", "https://@AM_DOMAIN@/?component=integration&type=external&request=searchplugins"); // pointer to the default engine name pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties"); @@ -1072,6 +1072,8 @@ pref("prompts.tab_modal.focusSwitch", true); // Defines the url to be used for new tabs. pref("browser.newtab.url", "about:logopage"); +pref("browser.newtab.choice", 1); + // Activates preloading of the new tab url. pref("browser.newtab.preload", false); @@ -1081,6 +1083,9 @@ pref("browser.newtabpage.enabled", true); // XXX: Remove this when "enhanced" tiles are dead pref("browser.newtabpage.enhanced", false); +// Disables capturing of page thumbnails +pref("browser.pagethumbnails.capturing_disabled", false); + // enables showing basic placeholders for missing thumbnails pref("browser.newtabpage.thumbnailPlaceholder", false); @@ -1155,6 +1160,14 @@ pref("toolkit.pageThumbs.minHeight", 180); pref("ui.key.menuAccessKeyFocuses", true); #endif +// When a user cancels this number of authentication dialogs coming from +// a single web page (eTLD+1) in a row, all following authentication dialogs +// will be blocked (automatically canceled) for that page. +// This counter is per-tab and per-domain to minimize false positives. +// The counter resets when the page is reloaded from the UI +// (content-reloads do NOT clear this to mitigate reloading tricks). +pref("prompts.authentication_dialog_abuse_limit", 3); + // ****************** s4e prefs ****************** pref("status4evar.addonbar.borderStyle", false); pref("status4evar.addonbar.closeButton", false); diff --git a/application/palemoon/base/content/aboutDialog.css b/application/palemoon/base/content/aboutDialog.css index d171a0bc1..d96eba5a2 100644 --- a/application/palemoon/base/content/aboutDialog.css +++ b/application/palemoon/base/content/aboutDialog.css @@ -2,56 +2,53 @@ * 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/. */ -#PMaboutDialog { - width: 620px; +#aboutPMDialogContainer { + width: 700px; + height: 410px; } -#PMrightBox { - background-image: url("chrome://branding/content/about-wordmark.png"); - background-repeat: no-repeat; - /* padding-top creates room for the wordmark */ - padding-top: 38px; - margin-top:20px; +#aboutVersionBox { + font-family: Arial, helvetica; + height: 38 px; } -#PMrightBox:-moz-locale-dir(rtl) { - background-position: 100% 0; -} - -#PMbottomBox { - padding: 15px 10px 0; -} - -#PMversion { - margin-top: 10px; - -moz-margin-start: 0; +#aboutVersion { + text-align: center; + font-size: 18px; + font-weight: bold; + margin: 4px; } #distribution, #distributionId { + text-align: center; + font-size: 14px; font-weight: bold; display: none; margin-top: 0; margin-bottom: 0; } -.text-blurb { - margin-bottom: 10px; - -moz-margin-start: 0; - -moz-padding-start: 0; +#aboutTextBox { + font-family: Arial, helvetica; + font-size: 14px; + margin: 5px 20px; + padding: 4px 10px 0px; + border-radius: 3px; + color: black; + background-color: rgba(240, 240, 240, .6); +} + +#aboutLinkBox { + font-family: Arial, helvetica; } -#updateButton, -#updateDeck > hbox > label { - -moz-margin-start: 0; - -moz-padding-start: 0; +.text-credits { + margin: 5px 0px; } -.update-throbber { - width: 16px; - min-height: 16px; - -moz-margin-end: 3px; - list-style-image: url("chrome://global/skin/icons/loading_16.png"); +.text-center { + text-align: center; } .text-link, @@ -63,5 +60,15 @@ .bottom-link, .bottom-link:focus { text-align: center; + text-decoration: none !important; + padding: 4px; + border-radius: 3px; + color: #244C8A; + background-color: rgba(240, 240, 240, .7); margin: 0 40px; + transition: background-color 0.5s ease-out; +} + +.bottom-link:hover { + background-color: rgba(240, 240, 255, .95); } diff --git a/application/palemoon/base/content/aboutDialog.js b/application/palemoon/base/content/aboutDialog.js index f4c2a990c..e4e18f2cf 100644 --- a/application/palemoon/base/content/aboutDialog.js +++ b/application/palemoon/base/content/aboutDialog.js @@ -42,13 +42,9 @@ function init(aEvent) if (/[ab]\d+$/.test(version)) { let buildID = Services.appinfo.appBuildID; let buildDate = buildID.slice(0,4) + "-" + buildID.slice(4,6) + "-" + buildID.slice(6,8); - document.getElementById("PMversion").textContent += " (" + buildDate + ")"; + document.getElementById("aboutVersion").textContent += " (" + buildDate + ")"; } -#ifdef MOZ_UPDATER - gAppUpdater = new appUpdater(); -#endif - #ifdef XP_MACOSX // it may not be sized at this point, and we need its width to calculate its position window.sizeToContent(); @@ -64,527 +60,3 @@ function init(aEvent) relnotes.setAttribute("href", releaseNotesURL); } } - -#ifdef MOZ_UPDATER -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); -Components.utils.import("resource://gre/modules/AddonManager.jsm"); - -var gAppUpdater; - -function onUnload(aEvent) { - if (gAppUpdater.isChecking) - gAppUpdater.checker.stopChecking(Components.interfaces.nsIUpdateChecker.CURRENT_CHECK); - // Safe to call even when there isn't a download in progress. - gAppUpdater.removeDownloadListener(); - gAppUpdater = null; -} - - -function appUpdater() -{ - this.updateDeck = document.getElementById("updateDeck"); - - // Hide the update deck when there is already an update window open to avoid - // syncing issues between them. - if (Services.wm.getMostRecentWindow("Update:Wizard")) { - this.updateDeck.hidden = true; - return; - } - - XPCOMUtils.defineLazyServiceGetter(this, "aus", - "@mozilla.org/updates/update-service;1", - "nsIApplicationUpdateService"); - XPCOMUtils.defineLazyServiceGetter(this, "checker", - "@mozilla.org/updates/update-checker;1", - "nsIUpdateChecker"); - XPCOMUtils.defineLazyServiceGetter(this, "um", - "@mozilla.org/updates/update-manager;1", - "nsIUpdateManager"); - - this.bundle = Services.strings. - createBundle("chrome://browser/locale/browser.properties"); - - this.updateBtn = document.getElementById("updateButton"); - - // The button label value must be set so its height is correct. - this.setupUpdateButton("update.checkInsideButton"); - - let manualURL = Services.urlFormatter.formatURLPref("app.update.url.manual"); - let manualLink = document.getElementById("manualLink"); - manualLink.value = manualURL; - manualLink.href = manualURL; - document.getElementById("failedLink").href = manualURL; - - if (this.updateDisabledAndLocked) { - this.selectPanel("adminDisabled"); - return; - } - - if (this.isPending || this.isApplied) { - this.setupUpdateButton("update.restart." + - (this.isMajor ? "upgradeButton" : "updateButton")); - return; - } - - if (this.aus.isOtherInstanceHandlingUpdates) { - this.selectPanel("otherInstanceHandlingUpdates"); - return; - } - - if (this.isDownloading) { - this.startDownload(); - return; - } - - if (this.updateEnabled && this.updateAuto) { - this.selectPanel("checkingForUpdates"); - this.isChecking = true; - this.checker.checkForUpdates(this.updateCheckListener, true); - return; - } -} - -appUpdater.prototype = -{ - // true when there is an update check in progress. - isChecking: false, - - // true when there is an update already staged / ready to be applied. - get isPending() { - if (this.update) { - return this.update.state == "pending" || - this.update.state == "pending-service"; - } - return this.um.activeUpdate && - (this.um.activeUpdate.state == "pending" || - this.um.activeUpdate.state == "pending-service"); - }, - - // true when there is an update already installed in the background. - get isApplied() { - if (this.update) - return this.update.state == "applied" || - this.update.state == "applied-service"; - return this.um.activeUpdate && - (this.um.activeUpdate.state == "applied" || - this.um.activeUpdate.state == "applied-service"); - }, - - // true when there is an update download in progress. - get isDownloading() { - if (this.update) - return this.update.state == "downloading"; - return this.um.activeUpdate && - this.um.activeUpdate.state == "downloading"; - }, - - // true when the update type is major. - get isMajor() { - if (this.update) - return this.update.type == "major"; - return this.um.activeUpdate.type == "major"; - }, - - // true when updating is disabled by an administrator. - get updateDisabledAndLocked() { - return !this.updateEnabled && - Services.prefs.prefIsLocked("app.update.enabled"); - }, - - // true when updating is enabled. - get updateEnabled() { - try { - return Services.prefs.getBoolPref("app.update.enabled"); - } - catch (e) { } - return true; // Firefox default is true - }, - - // true when updating in background is enabled. - get backgroundUpdateEnabled() { - return this.updateEnabled && - gAppUpdater.aus.canStageUpdates; - }, - - // true when updating is automatic. - get updateAuto() { - try { - return Services.prefs.getBoolPref("app.update.auto"); - } - catch (e) { } - return true; // Firefox default is true - }, - - /** - * Sets the deck's selected panel. - * - * @param aChildID - * The id of the deck's child to select. - */ - selectPanel: function(aChildID) { - this.updateDeck.selectedPanel = document.getElementById(aChildID); - this.updateBtn.disabled = (aChildID != "updateButtonBox"); - }, - - /** - * Sets the update button's label and accesskey. - * - * @param aKeyPrefix - * The prefix for the properties file entry to use for setting the - * label and accesskey. - */ - setupUpdateButton: function(aKeyPrefix) { - this.updateBtn.label = this.bundle.GetStringFromName(aKeyPrefix + ".label"); - this.updateBtn.accessKey = this.bundle.GetStringFromName(aKeyPrefix + ".accesskey"); - if (!document.commandDispatcher.focusedElement || - document.commandDispatcher.focusedElement == this.updateBtn) - this.updateBtn.focus(); - }, - - /** - * Handles oncommand for the update button. - */ - buttonOnCommand: function() { - if (this.isPending || this.isApplied) { - // Notify all windows that an application quit has been requested. - let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]. - createInstance(Components.interfaces.nsISupportsPRBool); - Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart"); - - // Something aborted the quit process. - if (cancelQuit.data) - return; - - let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]. - getService(Components.interfaces.nsIAppStartup); - - // If already in safe mode restart in safe mode (bug 327119) - if (Services.appinfo.inSafeMode) { - appStartup.restartInSafeMode(Components.interfaces.nsIAppStartup.eAttemptQuit); - return; - } - - appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit | - Components.interfaces.nsIAppStartup.eRestart); - return; - } - - const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul"; - // Firefox no longer displays a license for updates and the licenseURL check - // is just in case a distibution does. - if (this.update) { - var ary = null; - ary = Components.classes["@mozilla.org/supports-array;1"]. - createInstance(Components.interfaces.nsISupportsArray); - ary.AppendElement(this.update); - var openFeatures = "chrome,centerscreen,dialog=no,resizable=no,titlebar,toolbar=no"; - Services.ww.openWindow(null, URI_UPDATE_PROMPT_DIALOG, "", openFeatures, ary); - window.close(); - return; - } - - this.selectPanel("checkingForUpdates"); - this.isChecking = true; - this.checker.checkForUpdates(this.updateCheckListener, true); - }, - - /** - * Implements nsIUpdateCheckListener. The methods implemented by - * nsIUpdateCheckListener are in a different scope from nsIIncrementalDownload - * to make it clear which are used by each interface. - */ - updateCheckListener: { - /** - * See nsIUpdateService.idl - */ - onCheckComplete: function(aRequest, aUpdates, aUpdateCount) { - gAppUpdater.isChecking = false; - gAppUpdater.update = gAppUpdater.aus. - selectUpdate(aUpdates, aUpdates.length); - if (!gAppUpdater.update) { - gAppUpdater.selectPanel("noUpdatesFound"); - return; - } - - if (gAppUpdater.update.unsupported) { - if (gAppUpdater.update.detailsURL) { - let unsupportedLink = document.getElementById("unsupportedLink"); - unsupportedLink.href = gAppUpdater.update.detailsURL; - } - gAppUpdater.selectPanel("unsupportedSystem"); - return; - } - - if (!gAppUpdater.aus.canApplyUpdates) { - gAppUpdater.selectPanel("manualUpdate"); - return; - } - - gAppUpdater.selectPanel("updateButtonBox"); - gAppUpdater.setupUpdateButton("update.openUpdateUI." + - (this.isMajor ? "upgradeButton" - : "applyButton")); - }, - - /** - * See nsIUpdateService.idl - */ - onError: function(aRequest, aUpdate) { - // Errors in the update check are treated as no updates found. If the - // update check fails repeatedly without a success the user will be - // notified with the normal app update user interface so this is safe. - gAppUpdater.isChecking = false; - gAppUpdater.selectPanel("noUpdatesFound"); - }, - - /** - * See nsISupports.idl - */ - QueryInterface: function(aIID) { - if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) && - !aIID.equals(Components.interfaces.nsISupports)) - throw Components.results.NS_ERROR_NO_INTERFACE; - return this; - } - }, - - /** - * Checks the compatibility of add-ons for the application update. - */ - checkAddonCompatibility: function() { - var self = this; - AddonManager.getAllAddons(function(aAddons) { - self.addons = []; - self.addonsCheckedCount = 0; - aAddons.forEach(function(aAddon) { - // Protect against code that overrides the add-ons manager and doesn't - // implement the isCompatibleWith or the findUpdates method. - if (!("isCompatibleWith" in aAddon) || !("findUpdates" in aAddon)) { - let errMsg = "Add-on doesn't implement either the isCompatibleWith " + - "or the findUpdates method!"; - if (aAddon.id) - errMsg += " Add-on ID: " + aAddon.id; - Components.utils.reportError(errMsg); - return; - } - - // If an add-on isn't appDisabled and isn't userDisabled then it is - // either active now or the user expects it to be active after the - // restart. If that is the case and the add-on is not installed by the - // application and is not compatible with the new application version - // then the user should be warned that the add-on will become - // incompatible. If an addon's type equals plugin it is skipped since - // checking plugins compatibility information isn't supported and - // getting the scope property of a plugin breaks in some environments - // (see bug 566787). - try { - if (aAddon.type != "plugin" && aAddon.isCompatible && - !aAddon.appDisabled && !aAddon.userDisabled && - aAddon.scope != AddonManager.SCOPE_APPLICATION && - !aAddon.isCompatibleWith(self.update.appVersion, - self.update.platformVersion)) - self.addons.push(aAddon); - } - catch (e) { - Components.utils.reportError(e); - } - }); - self.addonsTotalCount = self.addons.length; - if (self.addonsTotalCount == 0) { - self.startDownload(); - return; - } - - self.checkAddonsForUpdates(); - }); - }, - - /** - * Checks if there are updates for add-ons that are incompatible with the - * application update. - */ - checkAddonsForUpdates: function() { - this.addons.forEach(function(aAddon) { - aAddon.findUpdates(this, AddonManager.UPDATE_WHEN_NEW_APP_DETECTED, - this.update.appVersion, - this.update.platformVersion); - }, this); - }, - - /** - * See XPIProvider.jsm - */ - onCompatibilityUpdateAvailable: function(aAddon) { - for (var i = 0; i < this.addons.length; ++i) { - if (this.addons[i].id == aAddon.id) { - this.addons.splice(i, 1); - break; - } - } - }, - - /** - * See XPIProvider.jsm - */ - onUpdateAvailable: function(aAddon, aInstall) { - if (!Services.blocklist.isAddonBlocklisted(aAddon.id, aInstall.version, - this.update.appVersion, - this.update.platformVersion)) { - // Compatibility or new version updates mean the same thing here. - this.onCompatibilityUpdateAvailable(aAddon); - } - }, - - /** - * See XPIProvider.jsm - */ - onUpdateFinished: function(aAddon) { - ++this.addonsCheckedCount; - - if (this.addonsCheckedCount < this.addonsTotalCount) - return; - - if (this.addons.length == 0) { - // Compatibility updates or new version updates were found for all add-ons - this.startDownload(); - return; - } - - this.selectPanel("updateButtonBox"); - this.setupUpdateButton("update.openUpdateUI." + - (this.isMajor ? "upgradeButton" : "applyButton")); - }, - - /** - * Starts the download of an update mar. - */ - startDownload: function() { - if (!this.update) - this.update = this.um.activeUpdate; - this.update.QueryInterface(Components.interfaces.nsIWritablePropertyBag); - this.update.setProperty("foregroundDownload", "true"); - - this.aus.pauseDownload(); - let state = this.aus.downloadUpdate(this.update, false); - if (state == "failed") { - this.selectPanel("downloadFailed"); - return; - } - - this.setupDownloadingUI(); - }, - - /** - * Switches to the UI responsible for tracking the download. - */ - setupDownloadingUI: function() { - this.downloadStatus = document.getElementById("downloadStatus"); - this.downloadStatus.value = - DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size); - this.selectPanel("downloading"); - this.aus.addDownloadListener(this); - }, - - removeDownloadListener: function() { - if (this.aus) { - this.aus.removeDownloadListener(this); - } - }, - - /** - * See nsIRequestObserver.idl - */ - onStartRequest: function(aRequest, aContext) { - }, - - /** - * See nsIRequestObserver.idl - */ - onStopRequest: function(aRequest, aContext, aStatusCode) { - switch (aStatusCode) { - case Components.results.NS_ERROR_UNEXPECTED: - if (this.update.selectedPatch.state == "download-failed" && - (this.update.isCompleteUpdate || this.update.patchCount != 2)) { - // Verification error of complete patch, informational text is held in - // the update object. - this.removeDownloadListener(); - this.selectPanel("downloadFailed"); - break; - } - // Verification failed for a partial patch, complete patch is now - // downloading so return early and do NOT remove the download listener! - break; - case Components.results.NS_BINDING_ABORTED: - // Do not remove UI listener since the user may resume downloading again. - break; - case Components.results.NS_OK: - this.removeDownloadListener(); - if (this.backgroundUpdateEnabled) { - this.selectPanel("applying"); - let update = this.um.activeUpdate; - let self = this; - Services.obs.addObserver(function (aSubject, aTopic, aData) { - // Update the UI when the background updater is finished - let status = aData; - if (status == "applied" || status == "applied-service" || - status == "pending" || status == "pending-service") { - // If the update is successfully applied, or if the updater has - // fallen back to non-staged updates, show the Restart to Update - // button. - self.selectPanel("updateButtonBox"); - self.setupUpdateButton("update.restart." + - (self.isMajor ? "upgradeButton" : "updateButton")); - } else if (status == "failed") { - // Background update has failed, let's show the UI responsible for - // prompting the user to update manually. - self.selectPanel("downloadFailed"); - } else if (status == "downloading") { - // We've fallen back to downloading the full update because the - // partial update failed to get staged in the background. - // Therefore we need to keep our observer. - self.setupDownloadingUI(); - return; - } - Services.obs.removeObserver(arguments.callee, "update-staged"); - }, "update-staged", false); - } else { - this.selectPanel("updateButtonBox"); - this.setupUpdateButton("update.restart." + - (this.isMajor ? "upgradeButton" : "updateButton")); - } - break; - default: - this.removeDownloadListener(); - this.selectPanel("downloadFailed"); - break; - } - - }, - - /** - * See nsIProgressEventSink.idl - */ - onStatus: function(aRequest, aContext, aStatus, aStatusArg) { - }, - - /** - * See nsIProgressEventSink.idl - */ - onProgress: function(aRequest, aContext, aProgress, aProgressMax) { - this.downloadStatus.value = - DownloadUtils.getTransferTotal(aProgress, aProgressMax); - }, - - /** - * See nsISupports.idl - */ - QueryInterface: function(aIID) { - if (!aIID.equals(Components.interfaces.nsIProgressEventSink) && - !aIID.equals(Components.interfaces.nsIRequestObserver) && - !aIID.equals(Components.interfaces.nsISupports)) - throw Components.results.NS_ERROR_NO_INTERFACE; - return this; - } -}; -#endif diff --git a/application/palemoon/base/content/aboutDialog.xul b/application/palemoon/base/content/aboutDialog.xul index 5c344f55d..a34923a0a 100644 --- a/application/palemoon/base/content/aboutDialog.xul +++ b/application/palemoon/base/content/aboutDialog.xul @@ -38,86 +38,48 @@ <script type="application/javascript" src="chrome://browser/content/aboutDialog.js"/> - <vbox id="aboutPMDialogContainer"> - <hbox id="PMclientBox"> - <vbox id="PMleftBox" flex="1"/> - <vbox id="PMrightBox" flex="1"> + <vbox id="aboutPMDialogContainer" flex="1"> + <vbox id="aboutHeaderBox" /> + <vbox id="aboutVersionBox" flex="3"> #ifdef HAVE_64BIT_BUILD -#expand <label id="PMversion">Version: __MOZ_APP_VERSION__ (64-bit)</label> +#expand <label id="aboutVersion">Version: __MOZ_APP_VERSION__ (64-bit)</label> #else -#expand <label id="PMversion">Version: __MOZ_APP_VERSION__ (32-bit)</label> +#expand <label id="aboutVersion">Version: __MOZ_APP_VERSION__ (32-bit)</label> #endif <label id="distribution" class="text-blurb"/> <label id="distributionId" class="text-blurb"/> - <vbox id="detailsBox"> - <vbox id="updateBox"> -#ifdef MOZ_UPDATER - <deck id="updateDeck" orient="vertical"> - <hbox id="updateButtonBox" align="center"> - <button id="updateButton" align="start" - oncommand="gAppUpdater.buttonOnCommand();"/> - <spacer flex="1"/> - </hbox> - <hbox id="checkingForUpdates" align="center"> - <image class="update-throbber"/><label>&update.checkingForUpdates;</label> - </hbox> - <hbox id="checkingAddonCompat" align="center"> - <image class="update-throbber"/><label>&update.checkingAddonCompat;</label> - </hbox> - <hbox id="downloading" align="center"> - <image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label> - </hbox> - <hbox id="applying" align="center"> - <image class="update-throbber"/><label>&update.applying;</label> - </hbox> - <hbox id="downloadFailed" align="center"> - <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label> - </hbox> - <hbox id="adminDisabled" align="center"> - <label>&update.adminDisabled;</label> - </hbox> - <hbox id="noUpdatesFound" align="center"> - <label>&update.noUpdatesFound;</label> - </hbox> - <hbox id="manualUpdate" align="center"> - <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label> - </hbox> - </deck> -#endif - </vbox> - - <description class="text-pmcreds"> + </vbox> + <vbox id="aboutTextBox" flex="1"> + <description class="text-credits text-center"> #if defined(MOZ_OFFICIAL_BRANDING) || defined(MC_OFFICIAL) #ifdef MC_PRIVATE_BUILD This is a private build of Pale Moon. If you did not manually build this copy from source yourself, then please download an official version from the <label class="text-link" href="http://www.palemoon.org/">Pale Moon website</label>. #else - Pale Moon is released by <label class="text-link" href="http://www.moonchildproductions.info">Moonchild Productions</label>. + <label class="text-link" href="http://www.palemoon.org">Pale Moon</label> is released by <label class="text-link" href="http://www.moonchildproductions.info">Moonchild Productions</label>. </description> - <description class="text-pmcreds"> + <description class="text-credits text-center"> Special thanks to all our supporters and donors for making this browser possible! </description> - <description class="text-blurb"> + <description class="text-credits"> If you wish to contribute, please consider helping out by providing support to other users on the <label class="text-link" href="https://forum.palemoon.org/">Pale Moon forum</label> or getting involved in our development by tackling some of the issues found in our GitHub issue tracker. #endif #else &brandFullName; is released by &vendorShortName;. </description> - <description class="text-blurb"> + <description class="text-credits"> This is an unofficial build of Pale Moon. For official builds, please go to <label class="text-link" href="http://www.palemoon.org/">the Pale Moon website</label>. #endif </description> - </vbox> - </vbox> - </hbox> - <vbox id="PMbottomBox"> + </vbox> + <vbox id="aboutLinkBox"> <hbox pack="center"> - <label class="text-link bottom-link" href="about:license">Licensing information</label> <label class="text-link bottom-link" href="about:rights">End-user rights</label> + <label class="text-link bottom-link" href="about:license">Licensing information</label> <label class="text-link bottom-link" id="releaseNotesURL">Release notes</label> </hbox> - <description id="PMtrademark">&trademarkInfo.part1;</description> + <description id="aboutPMtrademark">&trademarkInfo.part1;</description> </vbox> </vbox> diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul index e9019dc55..a006ed5c6 100644 --- a/application/palemoon/base/content/baseMenuOverlay.xul +++ b/application/palemoon/base/content/baseMenuOverlay.xul @@ -41,7 +41,7 @@ label="&helpMenu.label;" accesskey="&helpMenu.accesskey;"> #endif - <menupopup id="menu_HelpPopup"> + <menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();"> <menuitem id="menu_openHelp" oncommand="openHelpLink('firefox-help')" onclick="checkForMiddleClick(this, event);" @@ -66,6 +66,14 @@ accesskey="&helpSafeMode.accesskey;" label="&helpSafeMode.label;" oncommand="restart(true);"/> + <menuseparator id="updatesSeparator"/> + <menuitem id="checkForUpdates" class="menuitem-iconic" +#ifdef MOZ_UPDATER + label="&updateCmd.label;" + oncommand="checkForUpdates();"/> +#else + hidden="true"/> +#endif <menuseparator id="aboutSeparator"/> <menuitem id="aboutName" accesskey="&aboutProduct.accesskey;" diff --git a/application/palemoon/base/content/browser-appmenu.inc b/application/palemoon/base/content/browser-appmenu.inc index cfc855484..ffb117a60 100644 --- a/application/palemoon/base/content/browser-appmenu.inc +++ b/application/palemoon/base/content/browser-appmenu.inc @@ -341,7 +341,7 @@ <splitmenu id="appmenu_help" label="&helpMenu.label;" oncommand="openHelpLink('firefox-help')"> - <menupopup id="appmenu_helpMenupopup"> + <menupopup id="appmenu_helpMenupopup" onpopupshowing="buildHelpMenu();"> <menuitem id="appmenu_openHelp" label="&helpMenu.label;" oncommand="openHelpLink('firefox-help')" @@ -358,6 +358,13 @@ <menuitem id="appmenu_safeMode" label="&appMenuSafeMode.label;" oncommand="restart(true);"/> +#ifdef MOZ_UPDATER + <menuseparator/> + <menuitem id="appmenu_checkForUpdates" + class="menuitem-iconic" + label="&updateCmd.label;" + oncommand="checkForUpdates();"/> +#endif <menuseparator/> <menuitem id="appmenu_about" label="&aboutProduct.label;" diff --git a/application/palemoon/base/content/browser-context.inc b/application/palemoon/base/content/browser-context.inc index f672ede61..38c472508 100644 --- a/application/palemoon/base/content/browser-context.inc +++ b/application/palemoon/base/content/browser-context.inc @@ -70,7 +70,7 @@ label="&mediaUnmute.label;" accesskey="&mediaUnmute.accesskey;" oncommand="gContextMenu.mediaCommand('unmute');"/> - <menu id="context-media-playbackrate" label="&mediaPlaybackRate.label;" accesskey="&mediaPlaybackRate.accesskey;"> + <menu id="context-media-playbackrate" label="&mediaPlaybackRate2.label;" accesskey="&mediaPlaybackRate2.accesskey;"> <menupopup> <menuitem id="context-media-playbackrate-050x" label="&mediaPlaybackRate050x.label;" @@ -99,6 +99,11 @@ oncommand="gContextMenu.mediaCommand('playbackRate', 2.0);"/> </menupopup> </menu> + <menuitem id="context-media-loop" + label="&mediaLoop.label;" + accesskey="&mediaLoop.accesskey;" + type="checkbox" + oncommand="gContextMenu.mediaCommand('loop');"/> <menuitem id="context-media-showcontrols" label="&mediaShowControls.label;" accesskey="&mediaShowControls.accesskey;" diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js index b1235a8d3..e816ce5c1 100644 --- a/application/palemoon/base/content/browser-fullScreen.js +++ b/application/palemoon/base/content/browser-fullScreen.js @@ -53,17 +53,9 @@ var FullScreen = { document.addEventListener("popupshown", this._setPopupOpen, false); document.addEventListener("popuphidden", this._setPopupOpen, false); this._shouldAnimate = true; - // If it is not safe to collapse, add the mouse position tracker or - // else it won't be possible to hide the navigation toolbox again - if (!this._safeToCollapse(document.mozFullScreen)) { - let rect = gBrowser.mPanelContainer.getBoundingClientRect(); - this._mouseTargetRect = { - top: rect.top + 50, - bottom: rect.bottom, - left: rect.left, - right: rect.right - }; - MousePosTracker.addListener(this); + if (gPrefService.getBoolPref("browser.fullscreen.autohide")) { + gBrowser.mPanelContainer.addEventListener("mousemove", + this._collapseCallback, false); } // We don't animate the toolbar collapse if in DOM full-screen mode, // as the size of the content area would still be changing after the @@ -149,7 +141,8 @@ var FullScreen = { cleanup: function () { if (!window.fullScreen) { - MousePosTracker.removeListener(this); + gBrowser.mPanelContainer.removeEventListener("mousemove", + this._collapseCallback, false); document.removeEventListener("keypress", this._keyToggleCallback, false); document.removeEventListener("popupshown", this._setPopupOpen, false); document.removeEventListener("popuphidden", this._setPopupOpen, false); @@ -164,17 +157,12 @@ var FullScreen = { } }, - getMouseTargetRect: function() - { - return this._mouseTargetRect; - }, - // Event callbacks _expandCallback: function() { FullScreen.showNavToolbox(); }, - onMouseEnter: function() + _collapseCallback: function() { FullScreen.hideNavToolbox(); }, @@ -328,14 +316,8 @@ var FullScreen = { // Track whether mouse is near the toolbox this._isChromeCollapsed = false; if (trackMouse) { - let rect = gBrowser.mPanelContainer.getBoundingClientRect(); - this._mouseTargetRect = { - top: rect.top + 50, - bottom: rect.bottom, - left: rect.left, - right: rect.right - }; - MousePosTracker.addListener(this); + gBrowser.mPanelContainer.addEventListener("mousemove", + this._collapseCallback, false); } }, @@ -378,7 +360,8 @@ var FullScreen = { gNavToolbox.style.marginTop = -gNavToolbox.getBoundingClientRect().height + "px"; this._isChromeCollapsed = true; - MousePosTracker.removeListener(this); + gBrowser.mPanelContainer.removeEventListener("mousemove", + this._collapseCallback, false); }, showXULChrome: function(aTag, aShow) diff --git a/application/palemoon/base/content/browser-title.css b/application/palemoon/base/content/browser-title.css index 66b5e6731..5f7e77564 100644 --- a/application/palemoon/base/content/browser-title.css +++ b/application/palemoon/base/content/browser-title.css @@ -50,13 +50,6 @@ right: -12px; } -/* Lightweight Themes */ - -#main-window:-moz-lwtheme::after { - color: inherit; - text-shadow: inherit; -} - /* Windows Classic theme */ @media all and (-moz-windows-classic) { @@ -192,6 +185,13 @@ } +/* Lightweight Themes */ + +#main-window:-moz-lwtheme::after { + color: inherit; + text-shadow: inherit; +} + /* Hide for small windows */ diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 591d00fbb..4e753d422 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -2456,7 +2456,7 @@ function BrowserOnAboutPageLoad(doc) { docElt.setAttribute("searchEnginePostData", engine.postDataString || ""); docElt.setAttribute("searchEngineURL", engine.searchURL); } - updateSearchEngine(); + Services.search.init(updateSearchEngine); // Listen for the event that's triggered when the user changes search engine. // At this point we simply reload about:home to reflect the change. @@ -2481,7 +2481,7 @@ function BrowserOnAboutPageLoad(doc) { docElt.setAttribute("searchEnginePostData", engine.postDataString || ""); docElt.setAttribute("searchEngineURL", engine.searchURL); } - updateSearchEngine(); + Services.search.init(updateSearchEngine); // Listen for the event that's triggered when the user changes search engine. // At this point we simply reload about:newtab to reflect the change. @@ -2661,6 +2661,11 @@ function getWebNavigation() } function BrowserReloadWithFlags(reloadFlags) { + + // Reset DOS mitigation for auth prompts when user initiates a reload. + let browser = gBrowser.selectedBrowser; + delete browser.authPromptCounter; + /* First, we'll try to use the session history object to reload so * that framesets are handled properly. If we're in a special * window (such as view-source) that has no session history, fall @@ -3046,7 +3051,9 @@ const DOMLinkHandler = { /^(?:https?|ftp):/i.test(link.href) && !PrivateBrowsingUtils.isWindowPrivate(window)) { var engine = { title: link.title, href: link.href }; - BrowserSearch.addEngine(engine, link.ownerDocument); + Services.search.init(function () { + BrowserSearch.addEngine(engine, link.ownerDocument); + }); searchAdded = true; } } @@ -4406,7 +4413,13 @@ nsBrowserAccess.prototype = { openURI: function (aURI, aOpener, aWhere, aContext) { var newWindow = null; - var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL); + var isExternal = !!(aContext & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL); + + if (aOpener && isExternal) { + Cu.reportError("nsBrowserAccess.openURI did not expect an opener to be " + + "passed if the context is OPEN_EXTERNAL."); + throw Cr.NS_ERROR_FAILURE; + } if (isExternal && aURI && aURI.schemeIs("chrome")) { dump("use -chrome command-line option to load external chrome urls\n"); diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul index ce2a7c5a8..ddc305a7b 100644 --- a/application/palemoon/base/content/browser.xul +++ b/application/palemoon/base/content/browser.xul @@ -965,7 +965,8 @@ tabcontainer="tabbrowser-tabs" contentcontextmenu="contentAreaContextMenu" autocompletepopup="PopupAutoComplete" - datetimepicker="DateTimePickerPanel"/> + datetimepicker="DateTimePickerPanel" + authdosprotected="true"/> <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/> <statuspanel id="statusbar-display" inactive="true"/> </vbox> diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js index 1d4f88816..916dd2637 100644 --- a/application/palemoon/base/content/nsContextMenu.js +++ b/application/palemoon/base/content/nsContextMenu.js @@ -381,6 +381,7 @@ nsContextMenu.prototype = { this.showItem("context-media-mute", onMedia && !this.target.muted); this.showItem("context-media-unmute", onMedia && this.target.muted); this.showItem("context-media-playbackrate", onMedia); + this.showItem("context-media-loop", onMedia); this.showItem("context-media-showcontrols", onMedia && !this.target.controls); this.showItem("context-media-hidecontrols", onMedia && this.target.controls); this.showItem("context-video-fullscreen", this.onVideo && this.target.ownerDocument.mozFullScreenElement == null); @@ -394,6 +395,7 @@ nsContextMenu.prototype = { this.setItemAttr("context-media-playbackrate-100x", "checked", this.target.playbackRate == 1.0); this.setItemAttr("context-media-playbackrate-150x", "checked", this.target.playbackRate == 1.5); this.setItemAttr("context-media-playbackrate-200x", "checked", this.target.playbackRate == 2.0); + this.setItemAttr("context-media-loop", "checked", this.target.loop); var hasError = this.target.error != null || this.target.networkState == this.target.NETWORK_NO_SOURCE; this.setItemAttr("context-media-play", "disabled", hasError); @@ -1531,6 +1533,9 @@ nsContextMenu.prototype = { case "pause": media.pause(); break; + case "loop": + media.loop = !media.loop; + break; case "mute": media.muted = true; break; diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index 988cae55c..cbe029af0 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -30,7 +30,7 @@ <xul:vbox flex="1" class="browserContainer"> <xul:stack flex="1" class="browserStack" anonid="browserStack"> <xul:browser anonid="initialBrowser" type="content-primary" message="true" disablehistory="true" - xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,datetimepicker"/> + xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,datetimepicker,authdosprotected"/> </xul:stack> </xul:vbox> </xul:hbox> @@ -1588,6 +1588,10 @@ if (this.hasAttribute("datetimepicker")) { b.setAttribute("datetimepicker", this.getAttribute("datetimepicker")); } + + if (this.hasAttribute("authdosprotected")) { + b.setAttribute("authdosprotected", this.getAttribute("authdosprotected")); + } // Create the browserStack container var stack = document.createElementNS(NS_XUL, "stack"); @@ -2458,7 +2462,10 @@ <parameter name="aTab"/> <body> <![CDATA[ - this.getBrowserForTab(aTab).reload(); + let browser = this.getBrowserForTab(aTab); + // Reset DOS mitigation for basic auth prompt + delete browser.authPromptCounter; + browser.reload(); ]]> </body> </method> diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml index d188e6658..d2d9cc720 100644 --- a/application/palemoon/base/content/urlbarBindings.xml +++ b/application/palemoon/base/content/urlbarBindings.xml @@ -302,6 +302,10 @@ // but don't let that interfere with the loading of the url. Cu.reportError(ex); } + + // Reset DOS mitigations for the basic auth prompt. + let browser = gBrowser.selectedBrowser; + delete browser.authPromptCounter; function loadCurrent() { let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP; diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index 2c1a95f83..fe148ad04 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -541,6 +541,117 @@ function isBidiEnabled() { return rv; } +#ifdef MOZ_UPDATER +/** + * Opens the update manager and checks for updates to the application. + */ +function checkForUpdates() +{ + var um = + Components.classes["@mozilla.org/updates/update-manager;1"]. + getService(Components.interfaces.nsIUpdateManager); + var prompter = + Components.classes["@mozilla.org/updates/update-prompt;1"]. + createInstance(Components.interfaces.nsIUpdatePrompt); + + // If there's an update ready to be applied, show the "Update Downloaded" + // UI instead and let the user know they have to restart the application for + // the changes to be applied. + if (um.activeUpdate && um.activeUpdate.state == "pending") + prompter.showUpdateDownloaded(um.activeUpdate); + else + prompter.checkForUpdates(); +} +#endif + +/** + * Set up the help menu software update items to show proper status, + * also disabling the items if update is disabled. + */ +function buildHelpMenu() +{ +#ifdef MOZ_UPDATER + var updates = + Components.classes["@mozilla.org/updates/update-service;1"]. + getService(Components.interfaces.nsIApplicationUpdateService); + var um = + Components.classes["@mozilla.org/updates/update-manager;1"]. + getService(Components.interfaces.nsIUpdateManager); + + // Disable the UI if the update enabled pref has been locked by the + // administrator or if we cannot update for some other reason. + var checkForUpdates = document.getElementById("checkForUpdates"); + var appMenuCheckForUpdates = document.getElementById("appmenu_checkForUpdates"); + var canCheckForUpdates = updates.canCheckForUpdates; + checkForUpdates.setAttribute("disabled", !canCheckForUpdates); + appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates); + if (!canCheckForUpdates) + return; + + var strings = document.getElementById("bundle_browser"); + var activeUpdate = um.activeUpdate; + + // If there's an active update, substitute its name into the label + // we show for this item, otherwise display a generic label. + function getStringWithUpdateName(key) { + if (activeUpdate && activeUpdate.name) + return strings.getFormattedString(key, [activeUpdate.name]); + return strings.getString(key + "Fallback"); + } + + // By default, show "Check for Updates..." from updatesItem_default or + // updatesItem_defaultFallback + var key = "default"; + if (activeUpdate) { + switch (activeUpdate.state) { + case "downloading": + // If we're downloading an update at present, show the text: + // "Downloading Thunderbird x.x..." from updatesItem_downloading or + // updatesItem_downloadingFallback, otherwise we're paused, and show + // "Resume Downloading Thunderbird x.x..." from updatesItem_resume or + // updatesItem_resumeFallback + key = updates.isDownloading ? "downloading" : "resume"; + break; + case "pending": + // If we're waiting for the user to restart, show: "Apply Downloaded + // Updates Now..." from updatesItem_pending or + // updatesItem_pendingFallback + key = "pending"; + break; + } + } + + checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key); + appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key); + // updatesItem_default.accesskey, updatesItem_downloading.accesskey, + // updatesItem_resume.accesskey or updatesItem_pending.accesskey + checkForUpdates.accessKey = strings.getString("updatesItem_" + key + + ".accesskey"); + appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key + + ".accesskey"); + if (um.activeUpdate && updates.isDownloading) { + checkForUpdates.setAttribute("loading", "true"); + appMenuCheckForUpdates.setAttribute("loading", "true"); + } else { + checkForUpdates.removeAttribute("loading"); + appMenuCheckForUpdates.removeAttribute("loading"); + } +#else +#ifndef XP_MACOSX + // Some extensions may rely on these being present so only hide the about + // separator when there are no elements besides the check for updates menuitem + // in between the about separator and the updates separator. + var updatesSeparator = document.getElementById("updatesSeparator"); + var aboutSeparator = document.getElementById("aboutSeparator"); + var checkForUpdates = document.getElementById("checkForUpdates"); + if (updatesSeparator.nextSibling === checkForUpdates && + checkForUpdates.nextSibling === aboutSeparator) + updatesSeparator.hidden = true; +#endif +#endif +} + + function openAboutDialog() { var enumerator = Services.wm.getEnumerator("Browser:About"); while (enumerator.hasMoreElements()) { diff --git a/application/palemoon/branding/official/content/about-background.jpg b/application/palemoon/branding/official/content/about-background.jpg Binary files differnew file mode 100644 index 000000000..21e97986a --- /dev/null +++ b/application/palemoon/branding/official/content/about-background.jpg diff --git a/application/palemoon/branding/official/content/about-background.png b/application/palemoon/branding/official/content/about-background.png Binary files differdeleted file mode 100644 index 99dd74e58..000000000 --- a/application/palemoon/branding/official/content/about-background.png +++ /dev/null diff --git a/application/palemoon/branding/official/content/about-wordmark.png b/application/palemoon/branding/official/content/about-wordmark.png Binary files differindex 5d51e1d4d..bf09f15a0 100644 --- a/application/palemoon/branding/official/content/about-wordmark.png +++ b/application/palemoon/branding/official/content/about-wordmark.png diff --git a/application/palemoon/branding/official/content/about-wordmark.svg b/application/palemoon/branding/official/content/about-wordmark.svg index e0dcc255f..166ea2c37 100644 --- a/application/palemoon/branding/official/content/about-wordmark.svg +++ b/application/palemoon/branding/official/content/about-wordmark.svg @@ -9,24 +9,57 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="245.75363" - height="34.463379" + width="314.56464" + height="44.113129" id="svg2" version="1.1" - inkscape:version="0.48.5 r10040" - sodipodi:docname="drawing.svg"> + inkscape:version="0.92.1 r15371" + sodipodi:docname="about-wordmark.svg"> <defs - id="defs4" /> + id="defs4"> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Drop Shadow" + id="filter4610"> + <feFlood + flood-opacity="1" + flood-color="rgb(252,252,247)" + result="flood" + id="feFlood4600" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="in" + result="composite1" + id="feComposite4602" /> + <feGaussianBlur + in="composite1" + stdDeviation="1" + result="blur" + id="feGaussianBlur4604" /> + <feOffset + dx="2.77556e-017" + dy="0" + result="offset" + id="feOffset4606" /> + <feComposite + in="SourceGraphic" + in2="offset" + operator="over" + result="composite2" + id="feComposite4608" /> + </filter> + </defs> <sodipodi:namedview id="base" - pagecolor="#ffffff" + pagecolor="#000000" bordercolor="#666666" borderopacity="1.0" - inkscape:pageopacity="0.0" + inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:zoom="1.979899" - inkscape:cx="122.96783" - inkscape:cy="-35.932748" + inkscape:cx="140.32026" + inkscape:cy="-32.25665" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -55,77 +88,91 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(-51.826283,-53.778809)"> + transform="translate(-29.067649,-53.687969)"> <text xml:space="preserve" - style="font-size:48px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500" - x="32.324883" - y="30.087807" - id="text2985" - sodipodi:linespacing="125%"><tspan + style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672" + x="34.479874" + y="32.093662" + id="text2985"><tspan sodipodi:role="line" id="tspan2987" - x="32.324883" - y="30.087807" /></text> + x="34.479874" + y="32.093662" + style="font-size:51.20000076px;line-height:1.25;stroke-width:1.06666672">Â </tspan></text> <flowRoot xml:space="preserve" id="flowRoot2989" - style="font-size:48px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500"><flowRegion - id="flowRegion2991"><rect + style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0.01%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672"><flowRegion + id="flowRegion2991" + style="stroke-width:1.06666672"><rect id="rect2993" - width="654.57886" - height="371.73615" - x="44.446712" - y="104.8391" /></flowRegion><flowPara - id="flowPara2995" /></flowRoot> <g - id="g3795"> + width="698.21747" + height="396.51855" + x="47.409828" + y="111.82838" + style="stroke-width:1.13777781" /></flowRegion><flowPara + id="flowPara2995" + style="font-size:51.20000076px;line-height:1.25;stroke-width:1.06666672">Â </flowPara></flowRoot> <g + id="g3795" + style="filter:url(#filter4610)"> <g id="text2997" - style="font-size:48px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500"> + style="font-style:normal;font-weight:normal;font-size:48px;line-height:125%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none"> <path id="path3779" - d="m 54.9464,87.666504 0,-29.759766 -3.120117,0 0,-4.127929 14.928222,0 c 3.135722,3.3e-5 5.687722,0.96805 7.656006,2.904052 1.968235,1.936065 2.952365,4.503933 2.952393,7.703614 -2.8e-5,3.199727 -0.99197,5.791765 -2.97583,7.776123 -1.98391,1.984388 -4.528097,2.976575 -7.632569,2.976562 l -7.007812,0 0,12.527344 z m 4.800293,-16.655274 6.240234,0 c 1.983381,1.7e-5 3.55125,-0.592023 4.703613,-1.776123 1.152322,-1.184062 1.728494,-2.800027 1.728516,-4.8479 -2.2e-5,-2.016576 -0.568137,-3.600803 -1.704346,-4.752686 -1.13625,-1.151826 -2.696063,-1.727753 -4.679443,-1.727783 l -6.288574,0 z" - inkscape:connector-curvature="0" /> + d="M 58.609493,93.510938 V 61.767187 h -3.328124 v -4.403124 h 15.923436 c 3.34477,3.5e-5 6.066904,1.032587 8.166407,3.097655 2.09945,2.065136 3.149189,4.804196 3.149219,8.217189 -3e-5,3.413042 -1.058101,6.177882 -3.174219,8.294531 -2.11617,2.11668 -4.82997,3.175013 -8.141407,3.174999 h -7.474999 v 13.362501 z m 5.120313,-17.765626 h 6.656249 c 2.115607,1.8e-5 3.788,-0.631491 5.017188,-1.894531 1.229143,-1.263 1.843727,-2.986696 1.84375,-5.171094 -2.3e-5,-2.151014 -0.606013,-3.840856 -1.817969,-5.069531 -1.212,-1.228615 -2.875801,-1.842937 -4.991406,-1.842969 h -6.707812 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3781" - d="m 80.184193,80.850586 c -2e-6,-1.248039 0.256101,-2.360098 0.76831,-3.336182 0.512204,-0.976063 1.224362,-1.744128 2.136475,-2.304199 0.912104,-0.560045 1.856194,-1.031969 2.832275,-1.415771 0.976066,-0.383775 2.080069,-0.663804 3.312012,-0.840088 1.231921,-0.176255 2.24779,-0.288315 3.047607,-0.336182 0.79979,-0.04784 1.647934,-0.07176 2.544434,-0.07178 l 1.056152,0 0,-0.240235 c -1.7e-5,-2.11131 -0.416032,-3.607158 -1.248047,-4.487548 -0.832046,-0.880351 -2.208021,-1.320536 -4.127929,-1.320557 -0.896496,2.1e-5 -1.784679,0.136007 -2.664551,0.407959 -0.879891,0.271993 -1.319832,0.76003 -1.319824,1.464111 l 0,1.393067 -4.368164,0 0,-2.400879 c -4e-6,-0.927713 0.312007,-1.719705 0.936035,-2.375977 0.624018,-0.656227 1.431878,-1.12815 2.423584,-1.415771 0.991691,-0.287574 1.887686,-0.487525 2.687988,-0.599854 0.800282,-0.11228 1.584217,-0.168432 2.351807,-0.168457 3.680648,2.5e-5 6.264874,0.840112 7.752685,2.520264 1.487772,1.680196 2.231668,4.008075 2.231688,6.983642 l 0,10.319825 c -2e-5,0.704105 0.35203,1.056156 1.05615,1.056152 l 1.96729,0 0,3.984375 -4.3667,0 c -2.01662,0 -3.02492,-0.928222 -3.024902,-2.784668 l 0.09668,-1.439941 -0.09668,0 c -0.06349,0.127933 -0.143329,0.303959 -0.239502,0.528076 -0.09621,0.224124 -0.360369,0.608157 -0.792481,1.152099 -0.432145,0.543948 -0.920182,1.023928 -1.464111,1.439942 -0.54396,0.416016 -1.279799,0.800049 -2.20752,1.152099 -0.927746,0.352051 -1.935558,0.528076 -3.023437,0.528076 -2.240242,0 -4.17652,-0.656005 -5.808838,-1.968017 -1.632327,-1.312009 -2.448488,-3.119869 -2.448486,-5.423584 z m 5.66455,-2.831543 c -0.639655,0.671884 -0.959479,1.535653 -0.959472,2.591309 -7e-6,1.05567 0.399895,1.967534 1.199707,2.735595 0.799796,0.76807 1.919912,1.152103 3.360351,1.1521 1.855456,3e-6 3.399156,-0.807857 4.631104,-2.423584 1.231917,-1.615716 1.847883,-3.383536 1.8479,-5.303467 l 0,-0.815918 -1.199707,0 c -1.183609,1.2e-5 -2.21559,0.03981 -3.095947,0.119385 -0.880383,0.0796 -1.904552,0.255626 -3.07251,0.528076 -1.167978,0.272472 -2.071785,0.744639 -2.711426,1.416504 z" - inkscape:connector-curvature="0" /> + d="m 85.529806,86.240625 c -2e-6,-1.331242 0.273174,-2.517438 0.819531,-3.558594 0.54635,-1.041134 1.305986,-1.860403 2.278906,-2.457812 0.972911,-0.597382 1.97994,-1.100767 3.021094,-1.510156 1.041137,-0.40936 2.21874,-0.708058 3.532812,-0.896094 1.314049,-0.188005 2.397643,-0.307536 3.250781,-0.358594 0.853109,-0.05103 1.7578,-0.07654 2.71406,-0.07656 h 1.12657 v -0.256251 c -2e-5,-2.252064 -0.44377,-3.847635 -1.33125,-4.786718 -0.88752,-0.939041 -2.355227,-1.408572 -4.403129,-1.408594 -0.956263,2.2e-5 -1.903658,0.145074 -2.842188,0.435156 -0.93855,0.290126 -1.407821,0.810699 -1.407812,1.561719 v 1.485938 h -4.659375 v -2.560938 c -4e-6,-0.98956 0.332807,-1.834352 0.998437,-2.534375 0.665619,-0.699976 1.527337,-1.20336 2.585156,-1.510156 1.057804,-0.306746 2.013532,-0.520027 2.867188,-0.639844 0.853634,-0.119766 1.689831,-0.179661 2.508594,-0.179688 3.926029,2.7e-5 6.682529,0.89612 8.269529,2.688282 1.58696,1.792209 2.38045,4.27528 2.38047,7.449218 v 11.007813 c -2e-5,0.751046 0.3755,1.126567 1.12656,1.126562 h 2.09844 v 4.25 h -4.65781 c -2.15106,0 -3.22658,-0.990103 -3.22656,-2.970312 l 0.10312,-1.535937 h -0.10312 c -0.0677,0.136462 -0.15289,0.324223 -0.25547,0.563281 -0.10263,0.239065 -0.3844,0.648701 -0.84532,1.228905 -0.46095,0.580212 -0.98152,1.09219 -1.561714,1.535939 -0.580224,0.44375 -1.365119,0.853385 -2.354688,1.228905 -0.989596,0.375521 -2.064596,0.563281 -3.225,0.563281 -2.389591,0 -4.454955,-0.699738 -6.196094,-2.099218 -1.741149,-1.399476 -2.61172,-3.32786 -2.611718,-5.785156 z m 6.042187,-3.020312 c -0.682299,0.716676 -1.023445,1.638029 -1.023437,2.764062 -8e-6,1.126048 0.426554,2.098703 1.279687,2.917968 0.853116,0.819275 2.047906,1.22891 3.584375,1.228907 1.979153,3e-6 3.625766,-0.861714 4.939842,-2.585156 1.31405,-1.723431 1.97108,-3.609105 1.9711,-5.657032 V 81.01875 h -1.27969 c -1.262519,1.3e-5 -2.363298,0.04246 -3.302346,0.127344 -0.939075,0.08491 -2.031522,0.272668 -3.277344,0.563281 -1.245843,0.290637 -2.209904,0.794282 -2.892187,1.510938 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3783" - d="m 108.54943,84.594727 0,-25.776856 c -1e-5,-0.703095 -0.35206,-1.054658 -1.05616,-1.054687 l -1.96875,0 0,-3.984375 4.6084,0 c 1.08789,3.3e-5 1.87182,0.240023 2.35181,0.71997 0.47997,0.480013 0.71996,1.263948 0.71997,2.351807 l 0,25.775391 c -1e-5,0.704105 0.35204,1.056156 1.05615,1.056152 l 1.96875,0 0,3.984375 -4.6084,0 c -1.08789,0 -1.87183,-0.23999 -2.3518,-0.719971 -0.47999,-0.479979 -0.71998,-1.263914 -0.71997,-2.351806 z" - inkscape:connector-curvature="0" /> + d="M 115.78606,90.234375 V 62.739062 c -1e-5,-0.749968 -0.37553,-1.124968 -1.12657,-1.124999 h -2.1 v -4.25 h 4.91562 c 1.16042,3.5e-5 1.99661,0.256024 2.5086,0.767968 0.51197,0.512014 0.76796,1.348211 0.76797,2.508594 v 27.49375 c -10e-6,0.751046 0.37551,1.126567 1.12656,1.126563 h 2.1 v 4.25 h -4.91563 c -1.16041,0 -1.99662,-0.25599 -2.50858,-0.767969 -0.51199,-0.511978 -0.76798,-1.348175 -0.76797,-2.508594 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3785" - d="m 119.13732,75.522949 c 0,-3.808578 1.15185,-6.88084 3.45556,-9.216797 2.30371,-2.335913 5.21581,-3.503881 8.73633,-3.503906 3.29588,2.5e-5 5.86375,1.072045 7.70362,3.216065 1.83982,2.144062 2.75974,4.86403 2.75976,8.159912 l -0.14355,1.92041 -17.71289,0 c 0.1289,2.496103 0.99315,4.472175 2.59277,5.928222 1.5996,1.456059 3.51952,2.184086 5.75976,2.184082 1.24804,4e-6 2.4641,-0.239986 3.6482,-0.71997 1.18406,-0.479976 2.04807,-0.944087 2.59204,-1.392334 l 0.86426,-0.720703 2.01562,3.312011 c -0.25588,0.256839 -0.63991,0.585208 -1.1521,0.985108 -0.51223,0.399904 -1.58425,0.927735 -3.21606,1.583496 -1.63186,0.655761 -3.29592,0.983642 -4.99219,0.983642 -3.80763,0 -6.91138,-1.208007 -9.31128,-3.624023 -2.3999,-2.41601 -3.59985,-5.447745 -3.59985,-9.095215 z m 4.99219,-2.833008 12.86279,0 c -0.0635,-1.951155 -0.63918,-3.470928 -1.72705,-4.559326 -1.08791,-1.088358 -2.41603,-1.632547 -3.98438,-1.632568 -1.82423,2.1e-5 -3.38429,0.536153 -4.68017,1.608398 -1.29591,1.072284 -2.11964,2.600115 -2.47119,4.583496 z" - inkscape:connector-curvature="0" /> + d="m 127.07981,80.557812 c 0,-4.062483 1.22864,-7.339562 3.68593,-9.83125 2.45729,-2.49164 5.56353,-3.737473 9.31875,-3.7375 3.51561,2.7e-5 6.25467,1.143515 8.2172,3.43047 1.96247,2.286999 2.94372,5.188298 2.94374,8.703906 l -0.15312,2.048437 h -18.89375 c 0.13749,2.66251 1.05936,4.77032 2.76562,6.323437 1.70624,1.55313 3.75416,2.329692 6.14375,2.329687 1.33124,5e-6 2.62837,-0.255985 3.89141,-0.767968 1.263,-0.511974 2.18461,-1.007026 2.76484,-1.485156 l 0.92188,-0.76875 2.14999,3.532812 c -0.27294,0.273962 -0.68257,0.624222 -1.2289,1.050782 -0.54638,0.426564 -1.68987,0.989584 -3.43047,1.689062 -1.74065,0.699479 -3.51565,1.049218 -5.325,1.049218 -4.06147,0 -7.37214,-1.28854 -9.93203,-3.865624 -2.5599,-2.577077 -3.83984,-5.810928 -3.83984,-9.701563 z m 5.325,-3.021875 h 13.72031 c -0.0677,-2.081232 -0.68179,-3.702323 -1.84219,-4.863281 -1.16043,-1.160915 -2.5771,-1.741383 -4.25,-1.741406 -1.94585,2.3e-5 -3.60991,0.571897 -4.99218,1.715625 -1.38231,1.143769 -2.26095,2.773456 -2.63594,4.889062 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3787" - d="m 157.83702,87.666504 0,-4.12793 1.63184,0 c 0.64062,4e-6 0.99267,-0.352046 1.05615,-1.056152 l 2.3042,-28.703613 4.94385,0 7.96875,17.95166 1.68018,4.271484 0.0952,0 c 0.57615,-1.631823 1.13621,-3.055649 1.68018,-4.271484 l 7.96875,-17.95166 4.94384,0 2.3042,28.703613 c 0.0634,0.704106 0.415,1.056156 1.05469,1.056152 l 1.58496,0 0,4.12793 -4.27295,0 c -1.0557,0 -1.81546,-0.23999 -2.27929,-0.719971 -0.4639,-0.479979 -0.72806,-1.263914 -0.79248,-2.351806 l -1.39161,-17.904786 -0.0952,-4.990722 -0.0967,0 c -0.63968,2.111352 -1.23148,3.774924 -1.77539,4.990722 l -6.86426,14.879883 -4.03271,0 -6.86426,-14.879883 c -0.25587,-0.511697 -0.53566,-1.191628 -0.83936,-2.039795 -0.30372,-0.84812 -0.53565,-1.559789 -0.6958,-2.135009 l -0.28857,-0.864258 -0.0952,0 c 0.0312,2.015649 -9.8e-4,3.695335 -0.0967,5.039062 l -1.34326,17.904786 c -0.0645,1.087892 -0.32862,1.871827 -0.79248,2.351806 -0.46387,0.479981 -1.23975,0.719971 -2.32764,0.719971 z" - inkscape:connector-curvature="0" /> + d="m 168.35949,93.510938 v -4.403126 h 1.74063 c 0.68333,5e-6 1.05885,-0.375515 1.12656,-1.126562 l 2.45781,-30.617187 h 5.27344 l 8.5,19.148437 1.79219,4.55625 h 0.10155 c 0.61456,-1.740611 1.21196,-3.259359 1.79219,-4.55625 l 8.5,-19.148437 h 5.27343 l 2.45781,30.617187 c 0.0676,0.751047 0.44267,1.126567 1.12501,1.126562 h 1.69062 v 4.403126 h -4.55781 c -1.12608,0 -1.93649,-0.25599 -2.43125,-0.767969 -0.49482,-0.511978 -0.77659,-1.348175 -0.84531,-2.508594 L 200.87198,71.135937 200.77043,65.8125 h -0.10314 c -0.68233,2.252109 -1.31358,4.026586 -1.89375,5.323437 l -7.32188,15.871875 h -4.30156 l -7.32188,-15.871875 c -0.27292,-0.54581 -0.57137,-1.27107 -0.89531,-2.175781 -0.32397,-0.904662 -0.57136,-1.663775 -0.74219,-2.277343 l -0.30781,-0.921875 h -0.10154 c 0.0333,2.150025 -0.001,3.94169 -0.10315,5.374999 l -1.43281,19.098438 c -0.0688,1.160419 -0.35053,1.996616 -0.84531,2.508594 -0.4948,0.511979 -1.3224,0.767969 -2.48282,0.767969 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3789" - d="m 203.55333,84.594727 c -2.52734,-2.432612 -3.79101,-5.472892 -3.79101,-9.12085 0,-3.647933 1.26391,-6.671856 3.79175,-9.071777 2.52782,-2.399879 5.61595,-3.599829 9.2644,-3.599854 3.67967,2.5e-5 6.78343,1.199975 9.31128,3.599854 2.5278,2.399921 3.79172,5.423844 3.79175,9.071777 -3e-5,3.647958 -1.272,6.687994 -3.81592,9.120117 -2.54397,2.43213 -5.63991,3.648193 -9.28784,3.648193 -3.64796,0 -6.73609,-1.215819 -9.26441,-3.64746 z m 3.38379,-15.312012 c -1.61524,1.631853 -2.42286,3.695815 -2.42285,6.191894 -1e-5,2.496104 0.80785,4.57618 2.42358,6.240235 1.61572,1.664067 3.57592,2.496097 5.88062,2.496093 2.33592,4e-6 4.31175,-0.82397 5.92749,-2.471923 1.6157,-1.647942 2.42356,-3.736075 2.42358,-6.264405 -2e-5,-2.496079 -0.80788,-4.560041 -2.42358,-6.191894 -1.61574,-1.631816 -3.59157,-2.447733 -5.92749,-2.447754 -2.3047,2.1e-5 -4.26515,0.815938 -5.88135,2.447754 z" - inkscape:connector-curvature="0" /> + d="m 217.12355,90.234375 c -2.69583,-2.594786 -4.04374,-5.837751 -4.04374,-9.728906 0,-3.891129 1.34817,-7.116647 4.04453,-9.676562 2.69634,-2.559871 5.99035,-3.839818 9.88203,-3.839845 3.92498,2.7e-5 7.23566,1.279974 9.93203,3.839845 2.69632,2.559915 4.0445,5.785433 4.04453,9.676562 -3e-5,3.891155 -1.3568,7.13386 -4.07031,9.728125 -2.71357,2.594272 -6.01591,3.891405 -9.90703,3.891405 -3.89116,0 -7.18516,-1.296873 -9.88204,-3.890624 z m 3.60938,-16.332812 c -1.72292,1.740643 -2.58439,3.942202 -2.58438,6.604687 -1e-5,2.662511 0.86171,4.881258 2.58516,6.65625 1.72343,1.775005 3.81431,2.662504 6.27266,2.662499 2.49165,5e-6 4.5992,-0.878901 6.32265,-2.636717 1.72342,-1.757805 2.58513,-3.985147 2.58516,-6.682032 -3e-5,-2.662485 -0.86174,-4.864044 -2.58516,-6.604687 -1.72345,-1.740604 -3.831,-2.610916 -6.32265,-2.610938 -2.45835,2.2e-5 -4.5495,0.870334 -6.27344,2.610938 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3791" - d="m 233.17833,84.594727 c -2.52734,-2.432612 -3.79101,-5.472892 -3.79101,-9.12085 0,-3.647933 1.26391,-6.671856 3.79175,-9.071777 2.52782,-2.399879 5.61595,-3.599829 9.2644,-3.599854 3.67967,2.5e-5 6.78343,1.199975 9.31128,3.599854 2.5278,2.399921 3.79172,5.423844 3.79175,9.071777 -3e-5,3.647958 -1.272,6.687994 -3.81592,9.120117 -2.54397,2.43213 -5.63991,3.648193 -9.28784,3.648193 -3.64796,0 -6.73609,-1.215819 -9.26441,-3.64746 z m 3.38379,-15.312012 c -1.61524,1.631853 -2.42286,3.695815 -2.42285,6.191894 -1e-5,2.496104 0.80785,4.57618 2.42358,6.240235 1.61572,1.664067 3.57592,2.496097 5.88062,2.496093 2.33592,4e-6 4.31175,-0.82397 5.92749,-2.471923 1.6157,-1.647942 2.42356,-3.736075 2.42358,-6.264405 -2e-5,-2.496079 -0.80788,-4.560041 -2.42358,-6.191894 -1.61574,-1.631816 -3.59157,-2.447733 -5.92749,-2.447754 -2.3047,2.1e-5 -4.26515,0.815938 -5.88135,2.447754 z" - inkscape:connector-curvature="0" /> + d="m 248.72355,90.234375 c -2.69583,-2.594786 -4.04374,-5.837751 -4.04374,-9.728906 0,-3.891129 1.34817,-7.116647 4.04453,-9.676562 2.69634,-2.559871 5.99035,-3.839818 9.88203,-3.839845 3.92498,2.7e-5 7.23566,1.279974 9.93203,3.839845 2.69632,2.559915 4.0445,5.785433 4.04453,9.676562 -3e-5,3.891155 -1.3568,7.13386 -4.07031,9.728125 -2.71357,2.594272 -6.01591,3.891405 -9.90703,3.891405 -3.89116,0 -7.18516,-1.296873 -9.88204,-3.890624 z m 3.60938,-16.332812 c -1.72292,1.740643 -2.58439,3.942202 -2.58438,6.604687 -1e-5,2.662511 0.86171,4.881258 2.58516,6.65625 1.72343,1.775005 3.81431,2.662504 6.27266,2.662499 2.49165,5e-6 4.5992,-0.878901 6.32265,-2.636717 1.72342,-1.757805 2.58513,-3.985147 2.58516,-6.682032 -3e-5,-2.662485 -0.86174,-4.864044 -2.58516,-6.604687 -1.72345,-1.740604 -3.831,-2.610916 -6.32265,-2.610938 -2.45835,2.2e-5 -4.5495,0.870334 -6.27344,2.610938 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3793" - d="m 261.36339,87.666504 0,-19.248047 c 0,-0.704082 -0.35205,-1.056132 -1.05615,-1.056152 l -1.96729,0 0,-3.984375 4.46338,0 c 2.04785,2.4e-5 3.07177,0.896019 3.07178,2.687988 l 0,0.912598 -0.0952,1.391601 0.0952,0 c 0.64062,-1.375956 1.72899,-2.647927 3.26514,-3.815918 1.53612,-1.167944 3.48777,-1.751928 5.85498,-1.751953 2.84861,2.5e-5 4.95286,0.768091 6.31274,2.304199 1.35984,1.536154 2.03977,3.872089 2.0398,7.007813 l 0,10.511719 c -3e-5,0.704105 0.35202,1.056156 1.05615,1.056152 l 1.96728,0 0,3.984375 -4.60693,0 c -1.08791,0 -1.87185,-0.23999 -2.35181,-0.719971 -0.48,-0.479979 -0.71999,-1.263914 -0.71997,-2.351806 l 0,-11.424317 c -2e-5,-1.952132 -0.31203,-3.456037 -0.93603,-4.511719 -0.62405,-1.055644 -1.83205,-1.583475 -3.62403,-1.583496 -1.85646,2.1e-5 -3.48072,0.552022 -4.8728,1.656006 -1.3921,1.104022 -2.32789,2.535905 -2.80737,4.295654 -0.2881,0.832046 -0.43214,1.919935 -0.43213,3.263672 l 0,11.375977 z" - inkscape:connector-curvature="0" /> + d="M 278.78762,93.510938 V 72.979687 c 0,-0.75102 -0.37552,-1.12654 -1.12656,-1.126562 h -2.09845 v -4.25 h 4.76094 c 2.18438,2.6e-5 3.27656,0.955754 3.27657,2.867188 v 0.973437 l -0.10155,1.484375 h 0.10155 c 0.68333,-1.467687 1.84425,-2.824456 3.48281,-4.070313 1.63853,-1.245807 3.72029,-1.868723 6.24532,-1.86875 3.03851,2.7e-5 5.28305,0.819297 6.73358,2.457813 1.4505,1.638564 2.17576,4.130228 2.17579,7.475 v 11.2125 c -3e-5,0.751046 0.37549,1.126567 1.12656,1.126563 h 2.09843 v 4.25 h -4.91406 c -1.16043,0 -1.99664,-0.25599 -2.50859,-0.767969 -0.512,-0.511978 -0.76799,-1.348175 -0.76797,-2.508594 V 78.048437 c -2e-5,-2.082274 -0.33283,-3.686439 -0.99843,-4.8125 -0.66566,-1.12602 -1.95419,-1.68904 -3.86563,-1.689062 -1.98023,2.2e-5 -3.71277,0.588823 -5.19766,1.766406 -1.4849,1.177624 -2.48308,2.704965 -2.99453,4.582031 -0.3073,0.887516 -0.46095,2.047931 -0.46093,3.48125 v 12.134376 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> </g> <g id="text3769" - style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500"> + style="font-style:normal;font-weight:normal;font-size:10px;line-height:125%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none"> <path id="path3774" - d="m 285.52277,60.897457 0,-6.199951 -1.41999,0 c -0.14669,6e-6 -0.22003,0.07335 -0.22003,0.220032 l 0,0.449829 -0.88989,0 0,-0.929871 c 0,-0.226637 0.0433,-0.383294 0.12985,-0.469971 0.0866,-0.08666 0.24328,-0.129997 0.47012,-0.130004 l 4.85993,0 c 0.22664,7e-6 0.38329,0.04334 0.46997,0.130004 0.0867,0.08668 0.13,0.243334 0.13,0.469971 l 0,0.929871 -0.88989,0 0,-0.449829 c 0,-0.146682 -0.0734,-0.220026 -0.22003,-0.220032 l -1.41998,0 0,6.199951 z" - inkscape:connector-curvature="0" /> + d="m 304.55762,64.957287 v -6.613281 h -1.51465 c -0.15647,7e-6 -0.2347,0.07824 -0.2347,0.234701 v 0.479818 h -0.94922 v -0.991863 c 0,-0.241746 0.0462,-0.408847 0.13851,-0.501302 0.0924,-0.09244 0.2595,-0.138663 0.50146,-0.138671 h 5.18392 c 0.24175,8e-6 0.40885,0.04623 0.50131,0.138671 0.0925,0.09246 0.13866,0.259556 0.13866,0.501302 v 0.991863 h -0.94921 v -0.479818 c 0,-0.156461 -0.0783,-0.234694 -0.2347,-0.234701 h -1.51465 v 6.613281 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> <path id="path3776" - d="m 289.40979,60.897457 0,-0.859985 0.33997,0 c 0.13346,10e-7 0.2068,-0.07334 0.22003,-0.220032 l 0.48004,-5.979919 1.02997,0 1.66015,3.739929 0.35004,0.889892 0.0198,0 c 0.12003,-0.339963 0.23671,-0.636593 0.35003,-0.889892 l 1.66016,-3.739929 1.02997,0 0.48004,5.979919 c 0.0132,0.146689 0.0865,0.220033 0.21973,0.220032 l 0.3302,0 0,0.859985 -0.8902,0 c -0.21994,0 -0.37822,-0.05 -0.47486,-0.149994 -0.0966,-0.09999 -0.15167,-0.263315 -0.1651,-0.489959 l -0.28991,-3.730164 -0.0198,-1.039734 -0.0201,0 c -0.13327,0.439865 -0.25656,0.786443 -0.36987,1.039734 l -1.43006,3.099976 -0.84015,0 -1.43005,-3.099976 c -0.0533,-0.106604 -0.11159,-0.248256 -0.17487,-0.424957 -0.0633,-0.176692 -0.11159,-0.324957 -0.14495,-0.444794 l -0.0601,-0.180054 -0.0198,0 c 0.007,0.419927 -2.1e-4,0.769862 -0.0201,1.049805 l -0.27985,3.730164 c -0.0134,0.226644 -0.0685,0.389964 -0.1651,0.489959 -0.0966,0.1 -0.25828,0.149994 -0.48492,0.149994 z" - inkscape:connector-curvature="0" /> + d="M 308.70378,64.957287 V 64.03997 h 0.36263 c 0.14236,10e-7 0.22059,-0.07823 0.2347,-0.234701 l 0.51204,-6.37858 h 1.09864 l 1.77082,3.989258 0.37338,0.949218 h 0.0211 c 0.12803,-0.362627 0.25249,-0.679033 0.37336,-0.949218 l 1.77084,-3.989258 h 1.09864 l 0.51204,6.37858 c 0.0141,0.156469 0.0923,0.234702 0.23438,0.234701 h 0.35221 v 0.917317 h -0.94955 c -0.2346,0 -0.40343,-0.05333 -0.50651,-0.159993 -0.10304,-0.106656 -0.16178,-0.280869 -0.17611,-0.522623 l -0.30924,-3.978842 -0.0211,-1.109049 h -0.0214 c -0.14215,0.469189 -0.27366,0.838872 -0.39452,1.109049 l -1.5254,3.306641 h -0.89616 l -1.52539,-3.306641 c -0.0568,-0.113711 -0.11903,-0.264806 -0.18653,-0.453287 -0.0675,-0.188472 -0.11903,-0.346621 -0.15461,-0.474447 l -0.0641,-0.192058 h -0.0211 c 0.007,0.447922 -2.2e-4,0.821186 -0.0214,1.119792 l -0.2985,3.978842 c -0.0143,0.241754 -0.0731,0.415962 -0.17611,0.522623 -0.10304,0.106667 -0.2755,0.159993 -0.51725,0.159993 z" + inkscape:connector-curvature="0" + style="stroke-width:1.06666672" /> </g> </g> </g> diff --git a/application/palemoon/branding/official/content/aboutDialog.css b/application/palemoon/branding/official/content/aboutDialog.css index dbf04ae0a..5bcc229e7 100644 --- a/application/palemoon/branding/official/content/aboutDialog.css +++ b/application/palemoon/branding/official/content/aboutDialog.css @@ -3,41 +3,51 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #aboutPMDialogContainer { - background-image: url("chrome://branding/content/about-background.png"); + background-image: url("chrome://branding/content/about-background.jpg"); background-repeat: no-repeat; - background-color: #F7F7F7; - background-size: cover; - color: #000020; + background-color: #9ABCD5; + color: #101020; } -#PMleftBox { - /* background-image: url("chrome://branding/content/about-logo.png"); */ +#aboutHeaderBox { + background-image: url("chrome://branding/content/about-wordmark.png"); background-repeat: no-repeat; - /* min-width and min-height create room for the logo */ - min-width: 210px; - min-height: 210px; - margin-top:20px; - -moz-margin-start: 30px; + background-position: center center; + height: 44px; } -#PMrightBox { - margin-left: 30px; - margin-right: 30px; +#aboutVersionBox { + text-shadow: 1px 1px 0px #9ABCD5; } -#PMbottomBox { - padding: 15px 10px 0; - background-color: rgba(240,240,255,.7); -} +#aboutTextBox { + animation: 3s fadeIn; + animation-fill-mode: forwards; + text-shadow: 1px 1px 0px #9ABCD5; + color: #101020; +} -#PMupdateDeck > hbox > label:not([class="text-link"]) { - color: #909090; +@keyframes fadeIn { + 0% { + opacity: 0; + } + 50% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +#aboutLinkBox { + padding: 15px 10px 0; } -#PMtrademark { - font-size: xx-small; +#aboutPMtrademark { + font-size: 10px; text-align: center; - color: #999999; + color: #C0C0C0; + text-shadow: 1px 1px 0px #000000; margin-top: 10px; margin-bottom: 10px; } diff --git a/application/palemoon/branding/official/content/jar.mn b/application/palemoon/branding/official/content/jar.mn index d8038bf9e..83ef1ed15 100644 --- a/application/palemoon/branding/official/content/jar.mn +++ b/application/palemoon/branding/official/content/jar.mn @@ -5,7 +5,7 @@ browser.jar: % content branding %content/branding/ contentaccessible=yes content/branding/about.png (about.png) - content/branding/about-background.png (about-background.png) + content/branding/about-background.jpg (about-background.jpg) content/branding/about-logo.png (about-logo.png) content/branding/about-logo@2x.png (about-logo@2x.png) content/branding/about-wordmark.png (about-wordmark.png) diff --git a/application/palemoon/branding/shared/pref/preferences.inc b/application/palemoon/branding/shared/pref/preferences.inc index 721c2c90e..8b085c417 100644 --- a/application/palemoon/branding/shared/pref/preferences.inc +++ b/application/palemoon/branding/shared/pref/preferences.inc @@ -1,6 +1,3 @@ -#define APO_AM_URL addons.palemoon.org/integration/addon-manager -#define APO_AUS_ARGS reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE% - // ===| General |============================================================== pref("startup.homepage_welcome_url","http://www.palemoon.org/firstrun.shtml"); @@ -29,15 +26,12 @@ pref("app.update.promptWaitTime", 172800); // ===| Add-ons Manager |====================================================== // Add-on window fixes -pref("extensions.getMoreThemesURL", "https://@APO_AM_URL@/external/themes"); +pref("extensions.getMoreThemesURL", "https://addons.palemoon.org/themes/"); // Extensions Blocklist pref("extensions.blocklist.url","http://blocklist.palemoon.org/%VERSION%/blocklist.xml"); pref("extensions.blocklist.itemURL", "http://blocklist.palemoon.org/info/?id=%blockID%"); -// Dictionary URL -pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/"); - pref("extensions.update.autoUpdateDefault", true); // Automatically update extensions by default pref("extensions.getAddons.maxResults", 10); pref("extensions.getAddons.cache.enabled", false); diff --git a/application/palemoon/branding/unofficial/content/about-background.png b/application/palemoon/branding/unofficial/content/about-background.png Binary files differindex 006818637..c034041f6 100644 --- a/application/palemoon/branding/unofficial/content/about-background.png +++ b/application/palemoon/branding/unofficial/content/about-background.png diff --git a/application/palemoon/branding/unofficial/content/about-wordmark.png b/application/palemoon/branding/unofficial/content/about-wordmark.png Binary files differdeleted file mode 100644 index 41889ba39..000000000 --- a/application/palemoon/branding/unofficial/content/about-wordmark.png +++ /dev/null diff --git a/application/palemoon/branding/unofficial/content/about-wordmark.svg b/application/palemoon/branding/unofficial/content/about-wordmark.svg deleted file mode 100644 index fd0f1745e..000000000 --- a/application/palemoon/branding/unofficial/content/about-wordmark.svg +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - -<svg version="1.1" id="aboutWordmark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="132px" height="48px" viewBox="0 0 132 48" xml:space="preserve"> - - <path fill="#55575C"/> - -</svg> diff --git a/application/palemoon/branding/unofficial/content/aboutDialog.css b/application/palemoon/branding/unofficial/content/aboutDialog.css index 3f7c5ec23..5cc6b428a 100644 --- a/application/palemoon/branding/unofficial/content/aboutDialog.css +++ b/application/palemoon/branding/unofficial/content/aboutDialog.css @@ -9,16 +9,11 @@ color: #fff; } -.text-link { - color: #eef !important; +#aboutVersionBox { + /* No wordmark: leave empty space */ + margin-top: 20px; } -#PMrightBox { - /* this margin prevents text from overlapping the planet image */ - margin-left: 280px; - margin-right: 20px; -} - -#PMbottomBox { - background-color: rgba(0,0,0,.7); +#aboutLinkBox { + padding: 15px 10px 20px; } diff --git a/application/palemoon/branding/unofficial/content/jar.mn b/application/palemoon/branding/unofficial/content/jar.mn index bdb1e8129..353695792 100644 --- a/application/palemoon/branding/unofficial/content/jar.mn +++ b/application/palemoon/branding/unofficial/content/jar.mn @@ -8,7 +8,6 @@ browser.jar: content/branding/about-background.png (about-background.png) content/branding/about-logo.png (about-logo.png) content/branding/about-logo@2x.png (about-logo@2x.png) - content/branding/about-wordmark.svg (about-wordmark.svg) content/branding/icon48.png (icon48.png) content/branding/icon64.png (icon64.png) content/branding/icon16.png (../default16.png) diff --git a/application/palemoon/branding/unstable/content/about-background.jpg b/application/palemoon/branding/unstable/content/about-background.jpg Binary files differnew file mode 100644 index 000000000..a33b33183 --- /dev/null +++ b/application/palemoon/branding/unstable/content/about-background.jpg diff --git a/application/palemoon/branding/unstable/content/about-background.png b/application/palemoon/branding/unstable/content/about-background.png Binary files differdeleted file mode 100644 index 3d20e0658..000000000 --- a/application/palemoon/branding/unstable/content/about-background.png +++ /dev/null diff --git a/application/palemoon/branding/unstable/content/about-wordmark.png b/application/palemoon/branding/unstable/content/about-wordmark.png Binary files differindex deb60b6b9..bf09f15a0 100644 --- a/application/palemoon/branding/unstable/content/about-wordmark.png +++ b/application/palemoon/branding/unstable/content/about-wordmark.png diff --git a/application/palemoon/branding/unstable/content/about-wordmark.svg b/application/palemoon/branding/unstable/content/about-wordmark.svg deleted file mode 100644 index fd0f1745e..000000000 --- a/application/palemoon/branding/unstable/content/about-wordmark.svg +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - -<svg version="1.1" id="aboutWordmark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="132px" height="48px" viewBox="0 0 132 48" xml:space="preserve"> - - <path fill="#55575C"/> - -</svg> diff --git a/application/palemoon/branding/unstable/content/aboutDialog.css b/application/palemoon/branding/unstable/content/aboutDialog.css index 9af49ba10..de71f259c 100644 --- a/application/palemoon/branding/unstable/content/aboutDialog.css +++ b/application/palemoon/branding/unstable/content/aboutDialog.css @@ -3,45 +3,51 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #aboutPMDialogContainer { - background-image: url("chrome://branding/content/about-background.png"); + background-image: url("chrome://branding/content/about-background.jpg"); background-repeat: no-repeat; - background-color: #100000; - background-size: cover; - color: #E0E0FF; + background-color: #D5BC9A; + color: #202010; } -#PMleftBox { - background-image: url("chrome://branding/content/about-logo.png"); +#aboutHeaderBox { + background-image: url("chrome://branding/content/about-wordmark.png"); background-repeat: no-repeat; - /* min-width and min-height create room for the logo */ - min-width: 210px; - min-height: 210px; - margin-top:20px; - -moz-margin-start: 30px; + background-position: center center; + height: 44px; } -#PMrightBox { - margin-left: 30px; - margin-right: 30px; +#aboutVersionBox { + text-shadow: 1px 1px 0px #D5BC9A; } -#detailsBox > description > .text-link { - color: #CDC36F; +#aboutTextBox { + animation: 3s fadeIn; + animation-fill-mode: forwards; + text-shadow: 1px 1px 0px #D5BC9A; + color: #202010; } -#PMbottomBox { - padding: 15px 10px 0; - background-color: rgba(240,240,255,.7); -} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 50% { + opacity: 0; + } + 100% { + opacity: 1; + } +} -#PMupdateDeck > hbox > label:not([class="text-link"]) { - color: #909090; +#aboutLinkBox { + padding: 15px 10px 0; } -#PMtrademark { - font-size: xx-small; +#aboutPMtrademark { + font-size: 10px; text-align: center; - color: #333333; + color: #C0C0C0; + text-shadow: 1px 1px 0px #000000; margin-top: 10px; margin-bottom: 10px; } diff --git a/application/palemoon/branding/unstable/content/jar.mn b/application/palemoon/branding/unstable/content/jar.mn index 6903e9ac5..fcb789031 100644 --- a/application/palemoon/branding/unstable/content/jar.mn +++ b/application/palemoon/branding/unstable/content/jar.mn @@ -5,7 +5,7 @@ browser.jar: % content branding %content/branding/ contentaccessible=yes content/branding/about.png (about.png) - content/branding/about-background.png (about-background.png) + content/branding/about-background.jpg (about-background.jpg) content/branding/about-logo.png (about-logo.png) content/branding/about-logo@2x.png (about-logo@2x.png) content/branding/about-wordmark.png (about-wordmark.png) diff --git a/application/palemoon/components/downloads/DownloadsCommon.jsm b/application/palemoon/components/downloads/DownloadsCommon.jsm index bd5d55a73..efe31ce05 100644 --- a/application/palemoon/components/downloads/DownloadsCommon.jsm +++ b/application/palemoon/components/downloads/DownloadsCommon.jsm @@ -21,15 +21,9 @@ this.EXPORTED_SYMBOLS = [ * * DownloadsData * Retrieves the list of past and completed downloads from the underlying - * Download Manager data, and provides asynchronous notifications allowing + * Downloads API data, and provides asynchronous notifications allowing * to build a consistent view of the available data. * - * DownloadsDataItem - * Represents a single item in the list of downloads. This object either wraps - * an existing nsIDownload from the Download Manager, or provides the same - * information read directly from the downloads database, with the possibility - * of querying the nsIDownload lazily, for performance reasons. - * * 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 @@ -57,6 +51,8 @@ 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", @@ -94,11 +90,6 @@ const kDownloadsStringsRequiringPluralForm = { otherDownloads2: true }; -XPCOMUtils.defineLazyGetter(this, "DownloadsLocalFileCtor", function () { - return Components.Constructor("@mozilla.org/file/local;1", - "nsILocalFile", "initWithPath"); -}); - const kPartialDownloadSuffix = ".part"; const kPrefBranch = Services.prefs.getBranch("browser.download."); @@ -382,17 +373,27 @@ this.DownloadsCommon = { }, /** - * Given an iterable collection of DownloadDataItems, generates and returns + * 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 aDataItems An iterable collection of DownloadDataItems. + * @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. - * numScanning : The total number of downloads being scanned. * 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 @@ -402,55 +403,48 @@ this.DownloadsCommon = { * complete. * percentComplete : The percentage of bytes successfully downloaded. */ - summarizeDownloads: function DC_summarizeDownloads(aDataItems) - { + summarizeDownloads(downloads) { let summary = { numActive: 0, numPaused: 0, - numScanning: 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 - // dataItems. + // download. slowestSpeed: Infinity, rawTimeLeft: -1, percentComplete: -1 } - for (let dataItem of aDataItems) { + for (let download of downloads) { summary.numActive++; - switch (dataItem.state) { - case nsIDM.DOWNLOAD_PAUSED: - summary.numPaused++; - break; - case nsIDM.DOWNLOAD_SCANNING: - summary.numScanning++; - break; - case nsIDM.DOWNLOAD_DOWNLOADING: - summary.numDownloading++; - if (dataItem.maxBytes > 0 && dataItem.speed > 0) { - let sizeLeft = dataItem.maxBytes - dataItem.currBytes; - summary.rawTimeLeft = Math.max(summary.rawTimeLeft, - sizeLeft / dataItem.speed); - summary.slowestSpeed = Math.min(summary.slowestSpeed, - dataItem.speed); - } - break; + + 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 (dataItem.maxBytes > 0 && - dataItem.state != nsIDM.DOWNLOAD_CANCELED && - dataItem.state != nsIDM.DOWNLOAD_FAILED) { - summary.totalSize += dataItem.maxBytes; - summary.totalTransferred += dataItem.currBytes; + 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.numActive != 0 && summary.totalSize != 0 && - summary.numActive != summary.numScanning) { + if (summary.totalSize != 0) { summary.percentComplete = (summary.totalTransferred / summary.totalSize) * 100; } @@ -501,7 +495,7 @@ this.DownloadsCommon = { /** * Opens a downloaded file. - * If you've a dataItem, you should call dataItem.openLocalFile. + * * @param aFile * the downloaded file to be opened. * @param aMimeInfo @@ -574,7 +568,6 @@ this.DownloadsCommon = { /** * Show a downloaded file in the system file manager. - * If you have a dataItem, use dataItem.showLocalFile. * * @param aFile * a downloaded file. @@ -651,19 +644,12 @@ XPCOMUtils.defineLazyGetter(DownloadsCommon, "useJSTransfer", function () { function DownloadsDataCtor(aPrivate) { this._isPrivate = aPrivate; - // This Object contains all the available DownloadsDataItem objects, indexed by - // their globally unique identifier. The identifiers of downloads that have - // been removed from the Download Manager data are still present, however the - // associated objects are replaced with the value "null". This is required to - // prevent race conditions when populating the list asynchronously. - this.dataItems = {}; + // 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 = []; - - // Maps Download objects to DownloadDataItem objects. - this._downloadToDataItemMap = new Map(); } DownloadsDataCtor.prototype = { @@ -690,12 +676,19 @@ DownloadsDataCtor.prototype = { }, /** + * Iterator for all the available Download objects. This is empty until the + * data has been loaded using the JavaScript API for downloads. + */ + get downloads() this.oldDownloadStates.keys(), + + /** * True if there are finished downloads that can be removed from the list. */ get canRemoveFinished() { - for (let [, dataItem] of Iterator(this.dataItems)) { - if (dataItem && !dataItem.inProgress) { + 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; } } @@ -716,103 +709,87 @@ DownloadsDataCtor.prototype = { ////////////////////////////////////////////////////////////////////////////// //// Integration with the asynchronous Downloads back-end - onDownloadAdded: function (aDownload) - { - let dataItem = new DownloadsDataItem(aDownload); - this._downloadToDataItemMap.set(aDownload, dataItem); - this.dataItems[dataItem.downloadGuid] = dataItem; - - for (let view of this._views) { - view.onDataItemAdded(dataItem, true); - } - - this._updateDataItemState(dataItem); - }, - - onDownloadChanged: function (aDownload) - { - let dataItem = this._downloadToDataItemMap.get(aDownload); - if (!dataItem) { - Cu.reportError("Download doesn't exist."); - return; - } + 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._updateDataItemState(dataItem); - }, + this.oldDownloadStates.set(download, + DownloadsCommon.stateOfDownload(download)); - onDownloadRemoved: function (aDownload) - { - let dataItem = this._downloadToDataItemMap.get(aDownload); - if (!dataItem) { - Cu.reportError("Download doesn't exist."); - return; - } - - this._downloadToDataItemMap.delete(aDownload); - this.dataItems[dataItem.downloadGuid] = null; for (let view of this._views) { - view.onDataItemRemoved(dataItem); - } - }, - - /** - * Updates the given data item and sends related notifications. - */ - _updateDataItemState: function (aDataItem) - { - let oldState = aDataItem.state; - let wasInProgress = aDataItem.inProgress; - let wasDone = aDataItem.done; - - aDataItem.updateFromJSDownload(); - - if (wasInProgress && !aDataItem.inProgress) { - aDataItem.endTime = Date.now(); - } + 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); + } + } + } - if (oldState != aDataItem.state) { for (let view of this._views) { try { - view.getViewItem(aDataItem).onStateChange(oldState); + view.onDownloadStateChanged(download); } catch (ex) { Cu.reportError(ex); } } - // 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 && !aDataItem.inProgress) { - try { - let downloadMetaData = { state: aDataItem.state, - endTime: aDataItem.endTime }; - if (aDataItem.done) { - downloadMetaData.fileSize = aDataItem.maxBytes; - } - - // RRR: Annotation service throws here. commented out for now. - /*PlacesUtils.annotations.setPageAnnotation( - NetUtil.newURI(aDataItem.uri), "downloads/metaData", - JSON.stringify(downloadMetaData), 0, - PlacesUtils.annotations.EXPIRE_WITH_HISTORY);*/ - } catch (ex) { - Cu.reportError(ex); - } + if (download.succeeded || + (download.error && download.error.becauseBlocked)) { + this._notifyDownloadEvent("finish"); } } - if (!aDataItem.newDownloadNotified) { - aDataItem.newDownloadNotified = true; + if (!download.newDownloadNotified) { + download.newDownloadNotified = true; this._notifyDownloadEvent("start"); } - if (!wasDone && aDataItem.done) { - this._notifyDownloadEvent("finish"); + for (let view of this._views) { + view.onDownloadChanged(download); } + }, + + onDownloadRemoved(download) { + this.oldDownloadStates.delete(download); for (let view of this._views) { - view.getViewItem(aDataItem).onProgressChange(); + view.onDownloadRemoved(download); } }, @@ -864,19 +841,9 @@ DownloadsDataCtor.prototype = { //let loadedItemsArray = [dataItem // for each (dataItem in this.dataItems) // if (dataItem)]; - - let loadedItemsArray = []; - - for each (let dataItem in this.dataItems) { - if (dataItem) { - loadedItemsArray.push(dataItem); - } - } - - loadedItemsArray.sort(function(a, b) b.startTime - a.startTime); - loadedItemsArray.forEach( - function (dataItem) aView.onDataItemAdded(dataItem, false) - ); + 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) { @@ -1328,410 +1295,6 @@ XPCOMUtils.defineLazyGetter(this, "DownloadsData", function() { }); //////////////////////////////////////////////////////////////////////////////// -//// DownloadsDataItem - -/** - * Represents a single item in the list of downloads. This object either wraps - * an existing nsIDownload from the Download Manager, or provides the same - * information read directly from the downloads database, with the possibility - * of querying the nsIDownload lazily, for performance reasons. - * - * @param aSource - * Object containing the data with which the item should be initialized. - * This should implement either nsIDownload or mozIStorageRow. If the - * JavaScript API for downloads is enabled, this is a Download object. - */ -function DownloadsDataItem(aSource) -{ - this._initFromJSDownload(aSource); -} - -DownloadsDataItem.prototype = { - /** - * The JavaScript API does not need identifiers for Download objects, so they - * are generated sequentially for the corresponding DownloadDataItem. - */ - get _autoIncrementId() ++DownloadsDataItem.prototype.__lastId, - __lastId: 0, - - /** - * Initializes this object from the JavaScript API for downloads. - * - * The endTime property is initialized to the current date and time. - * - * @param aDownload - * The Download object with the current state. - */ - _initFromJSDownload: function (aDownload) - { - this._download = aDownload; - - this.downloadGuid = "id:" + this._autoIncrementId; - this.file = aDownload.target.path; - this.target = OS.Path.basename(aDownload.target.path); - this.uri = aDownload.source.url; - this.endTime = Date.now(); - - this.updateFromJSDownload(); - }, - - /** - * Updates this object from the JavaScript API for downloads. - */ - updateFromJSDownload: function () - { - // Collapse state using the correct priority. - if (this._download.succeeded) { - this.state = nsIDM.DOWNLOAD_FINISHED; - } else if (this._download.error && - this._download.error.becauseBlockedByParentalControls) { - this.state = nsIDM.DOWNLOAD_BLOCKED_PARENTAL; - } else if (this._download.error) { - this.state = nsIDM.DOWNLOAD_FAILED; - } else if (this._download.canceled && this._download.hasPartialData) { - this.state = nsIDM.DOWNLOAD_PAUSED; - } else if (this._download.canceled) { - this.state = nsIDM.DOWNLOAD_CANCELED; - } else if (this._download.stopped) { - this.state = nsIDM.DOWNLOAD_NOTSTARTED; - } else { - this.state = nsIDM.DOWNLOAD_DOWNLOADING; - } - - this.referrer = this._download.source.referrer; - this.startTime = this._download.startTime; - this.currBytes = this._download.currentBytes; - this.resumable = this._download.hasPartialData; - this.speed = this._download.speed; - - if (this._download.succeeded) { - // If the download succeeded, show the final size if available, otherwise - // use the last known number of bytes transferred. The final size on disk - // will be available when bug 941063 is resolved. - this.maxBytes = this._download.hasProgress ? - this._download.totalBytes : - this._download.currentBytes; - this.percentComplete = 100; - } else if (this._download.hasProgress) { - // If the final size and progress are known, use them. - this.maxBytes = this._download.totalBytes; - this.percentComplete = this._download.progress; - } else { - // The download final size and progress percentage is unknown. - this.maxBytes = -1; - this.percentComplete = -1; - } - }, - - /** - * Initializes this object from a download object of the Download Manager. - * - * The endTime property is initialized to the current date and time. - * - * @param aDownload - * The nsIDownload with the current state. - */ - _initFromDownload: function DDI_initFromDownload(aDownload) - { - this._download = aDownload; - - // Fetch all the download properties eagerly. - this.downloadGuid = aDownload.guid; - this.file = aDownload.target.spec; - this.target = aDownload.displayName; - this.uri = aDownload.source.spec; - this.referrer = aDownload.referrer && aDownload.referrer.spec; - this.state = aDownload.state; - this.startTime = Math.round(aDownload.startTime / 1000); - this.endTime = Date.now(); - this.currBytes = aDownload.amountTransferred; - this.maxBytes = aDownload.size; - this.resumable = aDownload.resumable; - this.speed = aDownload.speed; - this.percentComplete = aDownload.percentComplete; - }, - - /** - * Initializes this object from a data row in the downloads database, without - * querying the associated nsIDownload object, to improve performance when - * loading the list of downloads asynchronously. - * - * When this object is initialized in this way, accessing the "download" - * property loads the underlying nsIDownload object synchronously, and should - * be avoided unless the object is really required. - * - * @param aStorageRow - * The mozIStorageRow from the downloads database. - */ - _initFromDataRow: function DDI_initFromDataRow(aStorageRow) - { - // Get the download properties from the data row. - this._download = null; - this.downloadGuid = aStorageRow.getResultByName("guid"); - this.file = aStorageRow.getResultByName("target"); - this.target = aStorageRow.getResultByName("name"); - this.uri = aStorageRow.getResultByName("source"); - this.referrer = aStorageRow.getResultByName("referrer"); - this.state = aStorageRow.getResultByName("state"); - this.startTime = Math.round(aStorageRow.getResultByName("startTime") / 1000); - this.endTime = Math.round(aStorageRow.getResultByName("endTime") / 1000); - this.currBytes = aStorageRow.getResultByName("currBytes"); - this.maxBytes = aStorageRow.getResultByName("maxBytes"); - - // Now we have to determine if the download is resumable, but don't want to - // access the underlying download object unnecessarily. The only case where - // the property is relevant is when we are currently downloading data, and - // in this case the download object is already loaded in memory or will be - // loaded very soon in any case. In all the other cases, including a paused - // download, we assume that the download is resumable. The property will be - // updated as soon as the underlying download state changes. - - // We'll start by assuming we're resumable, and then if we're downloading, - // update resumable property in case we were wrong. - this.resumable = true; - - if (this.state == nsIDM.DOWNLOAD_DOWNLOADING) { - this.getDownload(function(aDownload) { - this.resumable = aDownload.resumable; - }.bind(this)); - } - - // Compute the other properties without accessing the download object. - this.speed = 0; - this.percentComplete = this.maxBytes <= 0 - ? -1 - : Math.round(this.currBytes / this.maxBytes * 100); - }, - - /** - * Asynchronous getter for the download object corresponding to this data item. - * - * @param aCallback - * A callback function which will be called when the download object is - * available. It should accept one argument which will be the download - * object. - */ - getDownload: function DDI_getDownload(aCallback) { - if (this._download) { - // Return the download object asynchronously to the caller - let download = this._download; - Services.tm.mainThread.dispatch(function () aCallback(download), - Ci.nsIThread.DISPATCH_NORMAL); - } else { - Services.downloads.getDownloadByGUID(this.downloadGuid, - function(aStatus, aResult) { - if (!Components.isSuccessCode(aStatus)) { - Cu.reportError( - new Components.Exception("Cannot retrieve download for GUID: " + - this.downloadGuid)); - } else { - this._download = aResult; - aCallback(aResult); - } - }.bind(this)); - } - }, - - /** - * Indicates whether the download is proceeding normally, and not finished - * yet. This includes paused downloads. When this property is true, the - * "progress" property represents the current progress of the download. - */ - get inProgress() - { - return [ - nsIDM.DOWNLOAD_NOTSTARTED, - nsIDM.DOWNLOAD_QUEUED, - nsIDM.DOWNLOAD_DOWNLOADING, - nsIDM.DOWNLOAD_PAUSED, - nsIDM.DOWNLOAD_SCANNING, - ].indexOf(this.state) != -1; - }, - - /** - * This is true during the initial phases of a download, before the actual - * download of data bytes starts. - */ - get starting() - { - return this.state == nsIDM.DOWNLOAD_NOTSTARTED || - this.state == nsIDM.DOWNLOAD_QUEUED; - }, - - /** - * Indicates whether the download is paused. - */ - get paused() - { - return this.state == nsIDM.DOWNLOAD_PAUSED; - }, - - /** - * Indicates whether the download is in a final state, either because it - * completed successfully or because it was blocked. - */ - get done() - { - return [ - nsIDM.DOWNLOAD_FINISHED, - nsIDM.DOWNLOAD_BLOCKED_PARENTAL, - nsIDM.DOWNLOAD_BLOCKED_POLICY, - nsIDM.DOWNLOAD_DIRTY, - ].indexOf(this.state) != -1; - }, - - /** - * Indicates whether the download is finished and can be opened. - */ - get openable() - { - return this.state == nsIDM.DOWNLOAD_FINISHED; - }, - - /** - * Indicates whether the download stopped because of an error, and can be - * resumed manually. - */ - get canRetry() - { - return this.state == nsIDM.DOWNLOAD_CANCELED || - this.state == nsIDM.DOWNLOAD_FAILED; - }, - - /** - * Returns the nsILocalFile for the download target. - * - * @throws if the native path is not valid. This can happen if the same - * profile is used on different platforms, for example if a native - * Windows path is stored and then the item is accessed on a Mac. - */ - get localFile() - { - return this._getFile(this.file); - }, - - /** - * Returns the nsILocalFile for the partially downloaded target. - * - * @throws if the native path is not valid. This can happen if the same - * profile is used on different platforms, for example if a native - * Windows path is stored and then the item is accessed on a Mac. - */ - get partFile() - { - return this._getFile(this.file + kPartialDownloadSuffix); - }, - - /** - * Returns an nsILocalFile for aFilename. aFilename might be a file URL or - * a native path. - * - * @param aFilename the filename of the file to retrieve. - * @return an nsILocalFile for the file. - * @throws if the native path is not valid. This can happen if the same - * profile is used on different platforms, for example if a native - * Windows path is stored and then the item is accessed on a Mac. - * @note This function makes no guarantees about the file's existence - - * callers should check that the returned file exists. - */ - _getFile: function DDI__getFile(aFilename) - { - // The download database may contain targets stored as file URLs or native - // paths. This can still be true for previously stored items, even if new - // items are stored using their file URL. See also bug 239948 comment 12. - if (aFilename.startsWith("file:")) { - // Assume the file URL we obtained from the downloads database or from the - // "spec" property of the target has the UTF-8 charset. - let fileUrl = NetUtil.newURI(aFilename).QueryInterface(Ci.nsIFileURL); - return fileUrl.file.clone().QueryInterface(Ci.nsILocalFile); - } else { - // The downloads database contains a native path. Try to create a local - // file, though this may throw an exception if the path is invalid. - return new DownloadsLocalFileCtor(aFilename); - } - }, - - /** - * Open the target file for this download. - * - * @param aOwnerWindow - * The window with which the required action is associated. - * @throws if the file cannot be opened. - */ - openLocalFile: function DDI_openLocalFile(aOwnerWindow) { - this._download.launch().then(null, Cu.reportError); - return; - }, - - /** - * Show the downloaded file in the system file manager. - */ - showLocalFile: function DDI_showLocalFile() { - DownloadsCommon.showDownloadedFile(this.localFile); - }, - - /** - * Resumes the download if paused, pauses it if active. - * @throws if the download is not resumable or if has already done. - */ - togglePauseResume: function DDI_togglePauseResume() { - if (this._download.stopped) { - this._download.start(); - } else { - this._download.cancel(); - } - return; - }, - - /** - * Attempts to retry the download. - * @throws if we cannot. - */ - retry: function DDI_retry() { - this._download.start(); - return; - }, - - /** - * Support function that deletes the local file for a download. This is - * used in cases where the Download Manager service doesn't delete the file - * from disk when cancelling. See bug 732924. - */ - _ensureLocalFileRemoved: function DDI__ensureLocalFileRemoved() - { - try { - let localFile = this.localFile; - if (localFile.exists()) { - localFile.remove(false); - } - } catch (ex) { } - }, - - /** - * Cancels the download. - * @throws if the download is already done. - */ - cancel: function() { - this._download.cancel(); - this._download.removePartialData().then(null, Cu.reportError); - return; - }, - - /** - * Remove the download. - */ - remove: function DDI_remove() { - let promiseList = this._download.source.isPrivate - ? Downloads.getList(Downloads.PUBLIC) - : Downloads.getList(Downloads.PRIVATE); - promiseList.then(list => list.remove(this._download)) - .then(() => this._download.finalize(true)) - .then(null, Cu.reportError); - return; - } -}; - -//////////////////////////////////////////////////////////////////////////////// //// DownloadsViewPrototype /** @@ -1858,9 +1421,9 @@ const DownloadsViewPrototype = { * Called when a new download data item is available, either during the * asynchronous data load or when a new download is started. * - * @param aDataItem - * DownloadsDataItem object that was just added. - * @param aNewest + * @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 @@ -1869,37 +1432,46 @@ const DownloadsViewPrototype = { * * @note Subclasses should override this. */ - onDataItemAdded: function DVP_onDataItemAdded(aDataItem, aNewest) - { + onDownloadAdded(download, newest) { 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. + * 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. * - * @param aDataItem - * DownloadsDataItem object that is being removed. + * The onDownloadChanged notification will always be sent afterwards. * * @note Subclasses should override this. */ - onDataItemRemoved: function DVP_onDataItemRemoved(aDataItem) - { + onDownloadStateChanged(download) { throw Components.results.NS_ERROR_NOT_IMPLEMENTED; }, /** - * Returns the view item associated with the provided data item for this view. + * Called every time any state property of a Download may have changed, + * including progress properties. * - * @param aDataItem - * DownloadsDataItem object for which the view item is requested. + * 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. * - * @return Object that can be used to notify item status events. + * @param download + * Download object that is being removed. * * @note Subclasses should override this. */ - getViewItem: function DID_getViewItem(aDataItem) - { + onDownloadRemoved(download) { throw Components.results.NS_ERROR_NOT_IMPLEMENTED; }, @@ -1963,9 +1535,6 @@ DownloadsIndicatorDataCtor.prototype = { ////////////////////////////////////////////////////////////////////////////// //// Callback functions from DownloadsData - /** - * Called after data loading finished. - */ onDataLoadCompleted: function DID_onDataLoadCompleted() { DownloadsViewPrototype.onDataLoadCompleted.call(this); @@ -1982,69 +1551,28 @@ DownloadsIndicatorDataCtor.prototype = { this._itemCount = 0; }, - /** - * Called when a new download data item is available, either during the - * asynchronous data load or when a new download is started. - * - * @param aDataItem - * DownloadsDataItem object that was just added. - * @param aNewest - * 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. - */ - onDataItemAdded: function DID_onDataItemAdded(aDataItem, aNewest) - { + onDownloadAdded(download, newest) { this._itemCount++; this._updateViews(); }, - /** - * Called when a data item is removed, ensures that the widget associated with - * the view item is removed from the user interface. - * - * @param aDataItem - * DownloadsDataItem object that is being removed. - */ - onDataItemRemoved: function DID_onDataItemRemoved(aDataItem) - { - this._itemCount--; - this._updateViews(); - }, + onDownloadStateChanged(download) { + if (download.succeeded || download.error) { + this.attention = true; + } - /** - * Returns the view item associated with the provided data item for this view. - * - * @param aDataItem - * DownloadsDataItem object for which the view item is requested. - * - * @return Object that can be used to notify item status events. - */ - getViewItem: function DID_getViewItem(aDataItem) - { - let data = this._isPrivate ? PrivateDownloadsIndicatorData - : DownloadsIndicatorData; - return Object.freeze({ - onStateChange: function DIVI_onStateChange(aOldState) - { - if (aDataItem.state == nsIDM.DOWNLOAD_FINISHED || - aDataItem.state == nsIDM.DOWNLOAD_FAILED) { - data.attention = true; - } + // Since the state of a download changed, reset the estimated time left. + this._lastRawTimeLeft = -1; + this._lastTimeLeft = -1; + }, - // Since the state of a download changed, reset the estimated time left. - data._lastRawTimeLeft = -1; - data._lastTimeLeft = -1; + onDownloadChanged(download) { + this._updateViews(); + }, - data._updateViews(); - }, - onProgressChange: function DIVI_onProgressChange() - { - data._updateViews(); - } - }); + onDownloadRemoved(download) { + this._itemCount--; + this._updateViews(); }, ////////////////////////////////////////////////////////////////////////////// @@ -2135,18 +1663,17 @@ DownloadsIndicatorDataCtor.prototype = { _lastTimeLeft: -1, /** - * A generator function for the dataItems that this summary is currently + * 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 dataItems we care about - in this case, - * it's all dataItems for active downloads. - */ - _activeDataItems: function DID_activeDataItems() - { - let dataItems = this._isPrivate ? PrivateDownloadsData.dataItems - : DownloadsData.dataItems; - for each (let dataItem in dataItems) { - if (dataItem && dataItem.inProgress) { - yield dataItem; + * 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; } } }, @@ -2157,7 +1684,7 @@ DownloadsIndicatorDataCtor.prototype = { _refreshProperties: function DID_refreshProperties() { let summary = - DownloadsCommon.summarizeDownloads(this._activeDataItems()); + DownloadsCommon.summarizeDownloads(this._activeDownloads()); // Determine if the indicator should be shown or get attention. this._hasDownloads = (this._itemCount > 0); @@ -2218,7 +1745,7 @@ function DownloadsSummaryData(aIsPrivate, aNumToExclude) { // completely separated from one another. this._loading = false; - this._dataItems = []; + 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 @@ -2258,9 +1785,9 @@ DownloadsSummaryData.prototype = { DownloadsViewPrototype.removeView.call(this, aView); if (this._views.length == 0) { - // Clear out our collection of DownloadDataItems. If we ever have + // Clear out our collection of Download objects. If we ever have // another view registered with us, this will get re-populated. - this._dataItems = []; + this._downloads = []; } }, @@ -2280,40 +1807,30 @@ DownloadsSummaryData.prototype = { this._dataItems = []; }, - onDataItemAdded: function DSD_onDataItemAdded(aDataItem, aNewest) - { - if (aNewest) { - this._dataItems.unshift(aDataItem); + onDownloadAdded(download, newest) { + if (newest) { + this._downloads.unshift(download); } else { - this._dataItems.push(aDataItem); + this._downloads.push(download); } this._updateViews(); }, - onDataItemRemoved: function DSD_onDataItemRemoved(aDataItem) - { - let itemIndex = this._dataItems.indexOf(aDataItem); - this._dataItems.splice(itemIndex, 1); + onDownloadStateChanged() { + // Since the state of a download changed, reset the estimated time left. + this._lastRawTimeLeft = -1; + this._lastTimeLeft = -1; + }, + + onDownloadChanged() { this._updateViews(); }, - getViewItem: function DSD_getViewItem(aDataItem) - { - let self = this; - return Object.freeze({ - onStateChange: function DIVI_onStateChange(aOldState) - { - // Since the state of a download changed, reset the estimated time left. - self._lastRawTimeLeft = -1; - self._lastTimeLeft = -1; - self._updateViews(); - }, - onProgressChange: function DIVI_onProgressChange() - { - self._updateViews(); - } - }); + onDownloadRemoved(download) { + let itemIndex = this._downloads.indexOf(download); + this._downloads.splice(itemIndex, 1); + this._updateViews(); }, ////////////////////////////////////////////////////////////////////////////// @@ -2351,17 +1868,16 @@ DownloadsSummaryData.prototype = { //// Property updating based on current download status /** - * A generator function for the dataItems that this summary is currently + * 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 dataItems we care about - in this case, - * it's the dataItems in this._dataItems after the first few to exclude, + * 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. */ - _dataItemsForSummary: function DSD_dataItemsForSummary() - { - if (this._dataItems.length > 0) { - for (let i = this._numToExclude; i < this._dataItems.length; ++i) { - yield this._dataItems[i]; + * _downloadsForSummary() { + if (this._downloads.length > 0) { + for (let i = this._numToExclude; i < this._downloads.length; ++i) { + yield this._downloads[i]; } } }, @@ -2373,7 +1889,7 @@ DownloadsSummaryData.prototype = { { // Pre-load summary with default values. let summary = - DownloadsCommon.summarizeDownloads(this._dataItemsForSummary()); + DownloadsCommon.summarizeDownloads(this._downloadsForSummary()); this._description = DownloadsCommon.strings .otherDownloads2(summary.numActive); diff --git a/application/palemoon/components/downloads/DownloadsViewUI.jsm b/application/palemoon/components/downloads/DownloadsViewUI.jsm new file mode 100644 index 000000000..ede593e22 --- /dev/null +++ b/application/palemoon/components/downloads/DownloadsViewUI.jsm @@ -0,0 +1,250 @@ +/* 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 referrer = this.download.source.referrer || + this.download.source.url; + let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer); + return s.statusSeparator(this.displayName, displayHost); + }, + + get extendedDisplayNameTip() { + let s = DownloadsCommon.strings; + let referrer = this.download.source.referrer || + this.download.source.url; + let [displayHost, 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() 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.js b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js index 054f0405f..4830f2128 100644 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js +++ b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js @@ -2,30 +2,32 @@ * 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 PLACES VIEW IMPLEMENTED IN THIS FILE HAS A VERY PARTICULAR USE CASE. - * IT IS HIGHLY RECOMMENDED NOT TO EXTEND IT FOR ANY OTHER USE CASES OR RELY - * ON IT AS AN API. - */ - -var Cu = Components.utils; -var Ci = Components.interfaces; -var Cc = Components.classes; +var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/NetUtil.jsm"); -Cu.import("resource://gre/modules/DownloadUtils.jsm"); -Cu.import("resource:///modules/DownloadsCommon.jsm"); -Cu.import("resource://gre/modules/PlacesUtils.jsm"); -Cu.import("resource://gre/modules/osfile.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.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; @@ -38,549 +40,268 @@ const DOWNLOAD_VIEW_SUPPORTED_COMMANDS = "downloadsCmd_open", "downloadsCmd_show", "downloadsCmd_retry", "downloadsCmd_openReferrer", "downloadsCmd_clearDownloads"]; -const NOT_AVAILABLE = Number.MAX_VALUE; - /** - * A download element shell is responsible for handling the commands and the - * displayed data for a single download view element. The download element - * could represent either a past download (for which we get data from places) or - * a "session" download (using a data-item object. See DownloadsCommon.jsm), or both. - * - * Once initialized with either a data item or a places node, the created richlistitem - * can be accessed through the |element| getter, and can then be inserted/removed from - * a richlistbox. - * - * The shell doesn't take care of inserting the item, or removing it when it's no longer - * valid. That's the caller (a DownloadsPlacesView object) responsibility. + * Represents a download from the browser history. It implements part of the + * interface of the Download object. * - * The caller is also responsible for "passing over" notification from both the - * download-view and the places-result-observer, in the following manner: - * - The DownloadsPlacesView object implements getViewItem of the download-view - * pseudo interface. It returns this object (therefore we implement - * onStateChangea and onProgressChange here). - * - The DownloadsPlacesView object adds itself as a places result observer and - * calls this object's placesNodeIconChanged, placesNodeTitleChanged and - * placeNodeAnnotationChanged from its callbacks. - * - * @param [optional] aDataItem - * The data item of a the session download. Required if aPlacesNode is not set - * @param [optional] aPlacesNode - * The places node for a past download. Required if aDataItem is not set. - * @param [optional] aAnnotations - * Map containing annotations values, to speed up the initial loading. + * @param aPlacesNode + * The Places node from which the history download should be initialized. */ -function DownloadElementShell(aDataItem, aPlacesNode, aAnnotations) { - this._element = document.createElement("richlistitem"); - this._element._shell = this; - - this._element.classList.add("download"); - this._element.classList.add("download-state"); - - if (aAnnotations) - this._annotations = aAnnotations; - if (aDataItem) - this.dataItem = aDataItem; - if (aPlacesNode) - this.placesNode = aPlacesNode; +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; } -DownloadElementShell.prototype = { - // The richlistitem for the download - get element() this._element, - +HistoryDownload.prototype = { /** - * Manages the "active" state of the shell. By default all the shells - * without a dataItem are inactive, thus their UI is not updated. They must - * be activated when entering the visible area. Session downloads are - * always active since they always have a dataItem. + * Pushes information from Places metadata into this object. */ - ensureActive: function DES_ensureActive() { - if (!this._active) { - this._active = true; - this._element.setAttribute("active", true); - this._updateUI(); - } - }, - get active() !!this._active, - - // The data item for the download - _dataItem: null, - get dataItem() this._dataItem, - - set dataItem(aValue) { - if (this._dataItem != aValue) { - if (!aValue && !this._placesNode) - throw new Error("Should always have either a dataItem or a placesNode"); - - this._dataItem = aValue; - if (!this.active) - this.ensureActive(); - else - this._updateUI(); + 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; } - return aValue; - }, - - _placesNode: null, - get placesNode() this._placesNode, - set placesNode(aValue) { - if (this._placesNode != aValue) { - if (!aValue && !this._dataItem) - throw new Error("Should always have either a dataItem or a placesNode"); - - // Preserve the annotations map if this is the first loading and we got - // cached values. - if (this._placesNode || !this._annotations) { - this._annotations = new Map(); - } - - this._placesNode = aValue; - // We don't need to update the UI if we had a data item, because - // the places information isn't used in this case. - if (!this._dataItem && this.active) - this._updateUI(); + 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; } - return aValue; - }, - - // The download uri (as a string) - get downloadURI() { - if (this._dataItem) - return this._dataItem.uri; - if (this._placesNode) - return this._placesNode.uri; - throw new Error("Unexpected download element state"); }, - get _downloadURIObj() { - if (!("__downloadURIObj" in this)) - this.__downloadURIObj = NetUtil.newURI(this.downloadURI); - return this.__downloadURIObj; - }, - - _getIcon: function DES__getIcon() { - let metaData = this.getDownloadMetaData(); - if ("filePath" in metaData) - return "moz-icon://" + metaData.filePath + "?size=32"; - - if (this._placesNode) { - // Try to extract an extension from the uri. - let ext = this._downloadURIObj.QueryInterface(Ci.nsIURL).fileExtension; - if (ext) - return "moz-icon://." + ext + "?size=32"; - return this._placesNode.icon || "moz-icon://.unknown?size=32"; - } - if (this._dataItem) - throw new Error("Session-download items should always have a target file uri"); + /** + * History downloads are never in progress. + */ + stopped: true, - throw new Error("Unexpected download element state"); - }, + /** + * No percentage indication is shown for history downloads. + */ + hasProgress: false, - // Helper for getting a places annotation set for the download. - _getAnnotation: function DES__getAnnotation(aAnnotation, aDefaultValue) { - let value; - if (this._annotations.has(aAnnotation)) - value = this._annotations.get(aAnnotation); + /** + * 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, - // If the value is cached, or we know it doesn't exist, avoid a database - // lookup. - if (value === undefined) { - try { - value = PlacesUtils.annotations.getPageAnnotation( - this._downloadURIObj, aAnnotation); - } - catch(ex) { - value = NOT_AVAILABLE; - } - } + /** + * 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; - if (value === NOT_AVAILABLE) { - if (aDefaultValue === undefined) { - throw new Error("Could not get required annotation '" + aAnnotation + - "' for download with url '" + this.downloadURI + "'"); - } - value = aDefaultValue; - } + // 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); - this._annotations.set(aAnnotation, value); - return value; + return Promise.resolve(); }, - _fetchTargetFileInfo: function DES__fetchTargetFileInfo(aUpdateMetaDataAndStatusUI = false) { - if (this._targetFileInfoFetched) - throw new Error("_fetchTargetFileInfo should not be called if the information was already fetched"); - if (!this.active) - throw new Error("Trying to _fetchTargetFileInfo on an inactive download shell"); - - let path = this.getDownloadMetaData().filePath; - - // In previous version, the target file annotations were not set, - // so we cannot tell where is the file. - if (path === undefined) { - this._targetFileInfoFetched = true; - this._targetFileExists = false; - if (aUpdateMetaDataAndStatusUI) { - this._metaData = null; - this._updateDownloadStatusUI(); - } - // Here we don't need to update the download commands, - // as the state is unknown as it was. - return; + /** + * 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; } + }), +}; - OS.File.stat(path).then( - function onSuccess(fileInfo) { - this._targetFileInfoFetched = true; - this._targetFileExists = true; - this._targetFileSize = fileInfo.size; - if (aUpdateMetaDataAndStatusUI) { - this._metaData = null; - this._updateDownloadStatusUI(); - } - if (this._element.selected) - goUpdateDownloadCommands(); - }.bind(this), - - function onFailure(reason) { - if (reason instanceof OS.File.Error && reason.becauseNoSuchFile) { - this._targetFileInfoFetched = true; - this._targetFileExists = false; - } - else { - Cu.reportError("Could not fetch info for target file (reason: " + - reason + ")"); - } +/** + * 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; - if (aUpdateMetaDataAndStatusUI) { - this._metaData = null; - this._updateDownloadStatusUI(); - } + this.element.classList.add("download"); + this.element.classList.add("download-state"); - if (this._element.selected) - goUpdateDownloadCommands(); - }.bind(this) - ); - }, + if (aSessionDownload) { + this.sessionDownload = aSessionDownload; + } + if (aHistoryDownload) { + this.historyDownload = aHistoryDownload; + } +} - _getAnnotatedMetaData: function DES__getAnnotatedMetaData() - JSON.parse(this._getAnnotation(DOWNLOAD_META_DATA_ANNO)), +HistoryDownloadElementShell.prototype = { + __proto__: DownloadsViewUI.DownloadElementShell.prototype, - _extractFilePathAndNameFromFileURI: - function DES__extractFilePathAndNameFromFileURI(aFileURI) { - let file = Cc["@mozilla.org/network/protocol;1?name=file"] - .getService(Ci.nsIFileProtocolHandler) - .getFileFromURLSpec(aFileURI); - return [file.path, file.leafName]; + /** + * 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 DES_ensureActive() { + if (!this._active) { + this._active = true; + this.element.setAttribute("active", true); + this._updateUI(); + } }, + get active() !!this._active, /** - * Retrieve the meta data object for the download. The following fields - * may be set. - * - * - state - any download state defined in nsIDownloadManager. If this field - * is not set, the download state is unknown. - * - endTime: the end time of the download. - * - filePath: the downloaded file path on the file system, when it - * was downloaded. The file may not exist. This is set for session - * downloads that have a local file set, and for history downloads done - * after the landing of bug 591289. - * - fileName: the downloaded file name on the file system. Set if filePath - * is set. - * - displayName: the user-facing label for the download. This is always - * set. If available, it's set to the downloaded file name. If not, - * the places title for the download uri is used. As a last resort, - * we fallback to the download uri. - * - fileSize (only set for downloads which completed successfully): - * the downloaded file size. For downloads done after the landing of - * bug 826991, this value is "static" - that is, it does not necessarily - * mean that the file is in place and has this size. + * Overrides the base getter to return the Download or HistoryDownload object + * for displaying information and executing commands in the user interface. */ - getDownloadMetaData: function DES_getDownloadMetaData() { - if (!this._metaData) { - if (this._dataItem) { - let s = DownloadsCommon.strings; - let referrer = this._dataItem.referrer || this._dataItem.uri; - let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer); - this._metaData = { - state: this._dataItem.state, - endTime: this._dataItem.endTime, - fileName: this._dataItem.target, - displayName: this._dataItem.target, - extendedDisplayName: s.statusSeparator(this._dataItem.target, displayHost), - extendedDisplayNameTip: s.statusSeparator(this._dataItem.target, fullHost) - }; - if (this._dataItem.done) - this._metaData.fileSize = this._dataItem.maxBytes; - if (this._dataItem.localFile) - this._metaData.filePath = this._dataItem.localFile.path; + get download() this._sessionDownload || this._historyDownload, + + _sessionDownload: null, + get sessionDownload() 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"); } - else { - try { - this._metaData = this._getAnnotatedMetaData(); - } - catch(ex) { - this._metaData = { }; - if (this._targetFileInfoFetched && this._targetFileExists) { - this._metaData.state = this._targetFileSize > 0 ? - nsIDM.DOWNLOAD_FINISHED : nsIDM.DOWNLOAD_FAILED; - this._metaData.fileSize = this._targetFileSize; - } - // This is actually the start-time, but it's the best we can get. - this._metaData.endTime = this._placesNode.time / 1000; - } + this._sessionDownload = aValue; - try { - let targetFileURI = this._getAnnotation(DESTINATION_FILE_URI_ANNO); - [this._metaData.filePath, this._metaData.fileName] = - this._extractFilePathAndNameFromFileURI(targetFileURI); - this._metaData.displayName = this._metaData.fileName; - } - catch(ex) { - this._metaData.displayName = this._placesNode.title || this.downloadURI; - } - } + this.ensureActive(); + this._updateUI(); } - return this._metaData; + return aValue; }, - // The status text for the download - _getStatusText: function DES__getStatusText() { - let s = DownloadsCommon.strings; - if (this._dataItem && this._dataItem.inProgress) { - if (this._dataItem.paused) { - let transfer = - DownloadUtils.getTransferTotal(this._dataItem.currBytes, - this._dataItem.maxBytes); - - // We use the same XUL label to display both the state and the amount - // transferred, for example "Paused - 1.1 MB". - return s.statusSeparatorBeforeNumber(s.statePaused, transfer); - } - if (this._dataItem.state == nsIDM.DOWNLOAD_DOWNLOADING) { - let [status, newEstimatedSecondsLeft] = - DownloadUtils.getDownloadStatus(this.dataItem.currBytes, - this.dataItem.maxBytes, - this.dataItem.speed, - this._lastEstimatedSecondsLeft || Infinity); - this._lastEstimatedSecondsLeft = newEstimatedSecondsLeft; - return status; - } - if (this._dataItem.starting) { - return s.stateStarting; - } - if (this._dataItem.state == nsIDM.DOWNLOAD_SCANNING) { - return s.stateScanning; + _historyDownload: null, + get historyDownload() 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"); } - throw new Error("_getStatusText called with a bogus download state"); - } + this._historyDownload = aValue; - // This is a not-in-progress or history download. - let stateLabel = ""; - let state = this.getDownloadMetaData().state; - switch (state) { - case nsIDM.DOWNLOAD_FAILED: - stateLabel = s.stateFailed; - break; - case nsIDM.DOWNLOAD_CANCELED: - stateLabel = s.stateCanceled; - break; - case nsIDM.DOWNLOAD_BLOCKED_PARENTAL: - stateLabel = s.stateBlockedParentalControls; - break; - case nsIDM.DOWNLOAD_BLOCKED_POLICY: - stateLabel = s.stateBlockedPolicy; - break; - case nsIDM.DOWNLOAD_DIRTY: - stateLabel = s.stateDirty; - break; - case nsIDM.DOWNLOAD_FINISHED:{ - // For completed downloads, show the file size (e.g. "1.5 MB") - let metaData = this.getDownloadMetaData(); - if ("fileSize" in metaData) { - let [size, unit] = DownloadUtils.convertByteUnits(metaData.fileSize); - stateLabel = s.sizeWithUnits(size, unit); - break; - } - // Fallback to default unknown state. + // 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(); } - default: - stateLabel = s.sizeUnknown; - break; - } - - // TODO (bug 829201): history downloads should get the referrer from Places. - let referrer = this._dataItem && this._dataItem.referrer || - this.downloadURI; - let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer); - - let date = new Date(this.getDownloadMetaData().endTime); - let [displayDate, fullDate] = DownloadUtils.getReadableDates(date); - - // We use the same XUL label to display the state, the host name, and the - // end time. - let firstPart = s.statusSeparator(stateLabel, displayHost); - return s.statusSeparator(firstPart, displayDate); - }, - - // The progressmeter element for the download - get _progressElement() { - if (!("__progressElement" in this)) { - this.__progressElement = - document.getAnonymousElementByAttribute(this._element, "anonid", - "progressmeter"); } - return this.__progressElement; + return aValue; }, - // Updates the download state attribute (and by that hide/unhide the - // appropriate buttons and context menu items), the status text label, - // and the progress meter. - _updateDownloadStatusUI: function DES__updateDownloadStatusUI() { - if (!this.active) - throw new Error("_updateDownloadStatusUI called for an inactive item."); - - let state = this.getDownloadMetaData().state; - if (state !== undefined) - this._element.setAttribute("state", state); - - this._element.setAttribute("status", this._getStatusText()); - - // For past-downloads, we're done. For session-downloads, we may also need - // to update the progress-meter. - if (!this._dataItem) + _updateUI() { + // There is nothing to do if the item has always been invisible. + if (!this.active) { return; - - // Copied from updateProgress in downloads.js. - if (this._dataItem.starting) { - // Before the download starts, the progress meter has its initial value. - this._element.setAttribute("progressmode", "normal"); - this._element.setAttribute("progress", "0"); - } - else if (this._dataItem.state == nsIDM.DOWNLOAD_SCANNING || - this._dataItem.percentComplete == -1) { - // We might not know the progress of a running download, and we don't know - // the remaining time during the malware scanning phase. - this._element.setAttribute("progressmode", "undetermined"); } - else { - // This is a running download of which we know the progress. - this._element.setAttribute("progressmode", "normal"); - this._element.setAttribute("progress", this._dataItem.percentComplete); - } - - // Dispatch the ValueChange event for accessibility, if possible. - if (this._progressElement) { - let event = document.createEvent("Events"); - event.initEvent("ValueChange", true, true); - this._progressElement.dispatchEvent(event); - } - }, - - _updateDisplayNameAndIcon: function DES__updateDisplayNameAndIcon() { - let metaData = this.getDownloadMetaData(); - this._element.setAttribute("displayName", metaData.displayName); - if ("extendedDisplayName" in metaData) - this._element.setAttribute("extendedDisplayName", metaData.extendedDisplayName); - if ("extendedDisplayNameTip" in metaData) - this._element.setAttribute("extendedDisplayNameTip", metaData.extendedDisplayNameTip); - this._element.setAttribute("image", this._getIcon()); - }, - - _updateUI: function DES__updateUI() { - if (!this.active) - throw new Error("Trying to _updateUI on an inactive download shell"); - - this._metaData = null; - this._targetFileInfoFetched = false; - this._updateDisplayNameAndIcon(); + // Since the state changed, we may need to check the target file again. + this._targetFileChecked = false; - // For history downloads done in past releases, the downloads/metaData - // annotation is not set, and therefore we cannot tell the download - // state without the target file information. - if (this._dataItem || this.getDownloadMetaData().state !== undefined) - this._updateDownloadStatusUI(); - else - this._fetchTargetFileInfo(true); + this._updateState(); }, - placesNodeIconChanged: function DES_placesNodeIconChanged() { - if (!this._dataItem) - this._element.setAttribute("image", this._getIcon()); - }, + get statusTextAndTip() { + let status = this.rawStatusTextAndTip; - placesNodeTitleChanged: function DES_placesNodeTitleChanged() { - // If there's a file path, we use the leaf name for the title. - if (!this._dataItem && this.active && !this.getDownloadMetaData().filePath) { - this._metaData = null; - this._updateDisplayNameAndIcon(); + // 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 = ""; - placesNodeAnnotationChanged: function DES_placesNodeAnnotationChanged(aAnnoName) { - this._annotations.delete(aAnnoName); - if (!this._dataItem && this.active) { - if (aAnnoName == DOWNLOAD_META_DATA_ANNO) { - let metaData = this.getDownloadMetaData(); - let annotatedMetaData = this._getAnnotatedMetaData(); - metaData.endTime = annotatedMetaData.endTime; - if ("fileSize" in annotatedMetaData) - metaData.fileSize = annotatedMetaData.fileSize; - else - delete metaData.fileSize; - - if (metaData.state != annotatedMetaData.state) { - metaData.state = annotatedMetaData.state; - if (this._element.selected) - goUpdateDownloadCommands(); - } - - this._updateDownloadStatusUI(); - } - else if (aAnnoName == DESTINATION_FILE_URI_ANNO) { - let metaData = this.getDownloadMetaData(); - let targetFileURI = this._getAnnotation(DESTINATION_FILE_URI_ANNO); - [metaData.filePath, metaData.fileName] = - this._extractFilePathAndNameFromFileURI(targetFileURI); - metaData.displayName = metaData.fileName; - this._updateDisplayNameAndIcon(); - - if (this._targetFileInfoFetched) { - // This will also update the download commands if necessary. - this._targetFileInfoFetched = false; - this._fetchTargetFileInfo(); - } - } - } + return status; }, - /* DownloadView */ - onStateChange: function DES_onStateChange(aOldState) { - let metaData = this.getDownloadMetaData(); - metaData.state = this.dataItem.state; - if (aOldState != nsIDM.DOWNLOAD_FINISHED && aOldState != metaData.state) { - // See comment in DVI_onStateChange in downloads.js (the panel-view) - this._element.setAttribute("image", this._getIcon() + "&state=normal"); - metaData.fileSize = this._dataItem.maxBytes; - if (this._targetFileInfoFetched) { - this._targetFileInfoFetched = false; - this._fetchTargetFileInfo(); - } - } + onStateChanged() { + this.element.setAttribute("image", this.image); + this.element.setAttribute("state", + DownloadsCommon.stateOfDownload(this.download)); - this._updateDownloadStatusUI(); - if (this._element.selected) + if (this.element.selected) { goUpdateDownloadCommands(); - else + } else { goUpdateCommand("downloadsCmd_clearDownloads"); + } }, - /* DownloadView */ - onProgressChange: function DES_onProgressChange() { - this._updateDownloadStatusUI(); + onChanged() { + this._updateProgress(); }, /* nsIController */ @@ -589,109 +310,79 @@ DownloadElementShell.prototype = { if (!this.active && aCommand != "cmd_delete") return false; switch (aCommand) { - case "downloadsCmd_open": { - // We cannot open a session download file unless it's done ("openable"). - // If it's finished, we need to make sure the file was not removed, - // as we do for past downloads. - if (this._dataItem && !this._dataItem.openable) - return false; - - if (this._targetFileInfoFetched) - return this._targetFileExists; - - // If the target file information is not yet fetched, - // temporarily assume that the file is in place. - return this.getDownloadMetaData().state == nsIDM.DOWNLOAD_FINISHED; - } - case "downloadsCmd_show": { + 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._dataItem && - this._dataItem.partFile && this._dataItem.partFile.exists()) - return true; - - if (this._targetFileInfoFetched) - return this._targetFileExists; + if (this._sessionDownload && this.download.target.partFilePath) { + let partFile = new FileUtils.File(this.download.target.partFilePath); + if (partFile.exists()) { + return true; + } + } - // If the target file information is not yet fetched, - // temporarily assume that the file is in place. - return this.getDownloadMetaData().state == nsIDM.DOWNLOAD_FINISHED; - } + // This property is false if the download did not succeed. + return this.download.target.exists; case "downloadsCmd_pauseResume": - return this._dataItem && this._dataItem.inProgress && this._dataItem.resumable; + return this.download.hasPartialData && !this.download.error; case "downloadsCmd_retry": - // An history download can always be retried. - return !this._dataItem || this._dataItem.canRetry; + return this.download.canceled || this.download.error; case "downloadsCmd_openReferrer": - return this._dataItem && !!this._dataItem.referrer; + return !!this.download.source.referrer; case "cmd_delete": - // The behavior in this case is somewhat unexpected, so we disallow that. - if (this._placesNode && this._dataItem && this._dataItem.inProgress) - return false; - return true; + // We don't want in-progress downloads to be removed accidentally. + return this.download.stopped; case "downloadsCmd_cancel": - return this._dataItem != null; + return !!this._sessionDownload; } return false; }, - _retryAsHistoryDownload: function DES__retryAsHistoryDownload() { - // In future we may try to download into the same original target uri, when - // we have it. Though that requires verifying the path is still valid and - // may surprise the user if he wants to be requested every time. - let browserWin = RecentWindow.getMostRecentBrowserWindow(); - let initiatingDoc = browserWin ? browserWin.document : document; - DownloadURL(this.downloadURI, this.getDownloadMetaData().fileName, - initiatingDoc); - }, - /* nsIController */ doCommand: function DES_doCommand(aCommand) { switch (aCommand) { case "downloadsCmd_open": { - let file = this._dataItem ? - this.dataItem.localFile : - new FileUtils.File(this.getDownloadMetaData().filePath); - + let file = new FileUtils.File(this.download.target.path); DownloadsCommon.openDownloadedFile(file, null, window); break; } case "downloadsCmd_show": { - if (this._dataItem) { - this._dataItem.showLocalFile(); - } - else { - let file = new FileUtils.File(this.getDownloadMetaData().filePath); - DownloadsCommon.showDownloadedFile(file); - } + let file = new FileUtils.File(this.download.target.path); + DownloadsCommon.showDownloadedFile(file); break; } case "downloadsCmd_openReferrer": { - openURL(this._dataItem.referrer); + openURL(this.download.source.referrer); break; } case "downloadsCmd_cancel": { - this._dataItem.cancel(); + this.download.cancel().catch(() => {}); + this.download.removePartialData().catch(Cu.reportError); break; } case "cmd_delete": { - if (this._dataItem) - Downloads.getList(Downloads.ALL) - .then(list => list.remove(this._dataItem._download)) - .then(() => this._dataItem._download.finalize(true)) - .catch(Cu.reportError); - if (this._placesNode) - PlacesUtils.bhistory.removePage(this._downloadURIObj); + 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": { - if (this._dataItem) - this._dataItem.retry(); - else - this._retryAsHistoryDownload(); + // Errors when retrying are already reported as download failures. + this.download.start().catch(() => {}); break; } case "downloadsCmd_pauseResume": { - this._dataItem.togglePauseResume(); + // This command is only enabled for session downloads. + if (this.download.stopped) { + this.download.start(); + } else { + this.download.cancel(); + } break; } } @@ -704,8 +395,8 @@ DownloadElementShell.prototype = { if (!aTerm) return true; aTerm = aTerm.toLowerCase(); - return this.getDownloadMetaData().displayName.toLowerCase().includes(aTerm) || - this.downloadURI.toLowerCase().includes(aTerm); + return this.displayName.toLowerCase().contains(aTerm) || + this.download.source.url.toLowerCase().contains(aTerm); }, // Handles return keypress on the element (the keypress listener is @@ -732,30 +423,57 @@ DownloadElementShell.prototype = { } return ""; } - let command = getDefaultCommandForState(this.getDownloadMetaData().state); + let state = DownloadsCommon.stateOfDownload(this.download); + let command = getDefaultCommandForState(state); if (command && this.isCommandEnabled(command)) this.doCommand(command); }, /** - * At the first time an item is selected, we don't yet have - * the target file information. Thus the call to goUpdateDownloadCommands - * in DPV_onSelect would result in best-guess enabled/disabled result. - * That way we let the user perform command immediately. However, once - * we have the target file information, we can update the commands - * appropriately (_fetchTargetFileInfo() calls goUpdateDownloadCommands). + * 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 DES_onSelect() { if (!this.active) return; - if (!this._targetFileInfoFetched) - this._fetchTargetFileInfo(); - } + + // 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 current "session"-downloads. + * 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. @@ -774,7 +492,7 @@ function DownloadsPlacesView(aRichListBox, aActive = true) { this._downloadElementsShellsForURI = new Map(); // Map download data items to their element shells. - this._viewItemsForDataItems = new WeakMap(); + 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. @@ -817,44 +535,83 @@ DownloadsPlacesView.prototype = { return this._active; }, - _forEachDownloadElementShellForURI: - function DPV__forEachDownloadElementShellForURI(aURI, aCallback) { - if (this._downloadElementsShellsForURI.has(aURI)) { - let downloadElementShells = this._downloadElementsShellsForURI.get(aURI); - for (let des of downloadElementShells) { - aCallback(des); + /** + * 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) {} } - } - }, - _getAnnotationsFor: function DPV_getAnnotationsFor(aURI) { - if (!this._cachedAnnotations) { - this._cachedAnnotations = new Map(); - for (let name of [ DESTINATION_FILE_URI_ANNO, - DOWNLOAD_META_DATA_ANNO ]) { - let results = PlacesUtils.annotations.getAnnotationsWithName(name); - for (let result of results) { - let url = result.uri.spec; - if (!this._cachedAnnotations.has(url)) - this._cachedAnnotations.set(url, new Map()); - let m = this._cachedAnnotations.get(url); - m.set(result.annotationName, result.annotationValue); + // 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; } } - let annotations = this._cachedAnnotations.get(aURI); - if (!annotations) { - // There are no annotations for this entry, that means it is quite old. - // Make up a fake annotations entry with default values. - annotations = new Map(); - annotations.set(DESTINATION_FILE_URI_ANNO, NOT_AVAILABLE); - } - // The meta-data annotation has been added recently, so it's likely missing. - if (!annotations.has(DOWNLOAD_META_DATA_ANNO)) { - annotations.set(DOWNLOAD_META_DATA_ANNO, NOT_AVAILABLE); - } - return annotations; + 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; }, /** @@ -869,14 +626,12 @@ DownloadsPlacesView.prototype = { * alongside the other session downloads. If we don't, then we go ahead * and create a new element for the download. * - * @param aDataItem - * The data item of a session download. Set to null for history - * downloads data. + * @param [optional] sessionDownload + * A Download object, or null for history downloads. * @param [optional] aPlacesNode - * The places node for a history download. Required if there's no data - * item. + * The Places node for a history download, or null for session downloads. * @param [optional] aNewest - * @see onDataItemAdded. Ignored for history downloads. + * @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), @@ -884,16 +639,28 @@ DownloadsPlacesView.prototype = { * be appended. It's the caller's job to ensure the fragment is merged * to the richlistbox at the end. */ - _addDownloadData: - function DPV_addDownloadData(aDataItem, aPlacesNode, aNewest = false, + _addDownloadData(sessionDownload, aPlacesNode, aNewest = false, aDocumentFragment = null) { - let downloadURI = aPlacesNode ? aPlacesNode.uri : aDataItem.uri; + 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 @@ -911,44 +678,64 @@ DownloadsPlacesView.prototype = { // item). // // Note: If a cancelled session download is already in the list, and the - // download is retired, onDataItemAdded is called again for the same + // 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 && - aDataItem && this.getViewItem(aDataItem) == null) { + 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.dataItem) { + if (!shell.sessionDownload) { shouldCreateShell = false; - shell.dataItem = aDataItem; + shell.sessionDownload = sessionDownload; newOrUpdatedShell = shell; - this._viewItemsForDataItems.set(aDataItem, shell); + this._viewItemsForDownloads.set(sessionDownload, shell); break; } } } if (shouldCreateShell) { - // Bug 836271: The annotations for a url should be cached only when the - // places node is available, i.e. when we know we we'd be notified for - // annotation changes. - // Otherwise we may cache NOT_AVILABLE values first for a given session - // download, and later use these NOT_AVILABLE values when a history - // download for the same URL is added. - let cachedAnnotations = aPlacesNode ? this._getAnnotationsFor(downloadURI) : null; - let shell = new DownloadElementShell(aDataItem, aPlacesNode, cachedAnnotations); + // 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 (aDataItem) - this._viewItemsForDataItems.set(aDataItem, 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.placesNode != aPlacesNode) - shell.placesNode = aPlacesNode; + if (!shell.historyDownload) { + // Create the element to host the metadata when needed. + shell.historyDownload = new HistoryDownload(aPlacesNode); + } + shell.element._placesNode = aPlacesNode; } } @@ -963,8 +750,7 @@ DownloadsPlacesView.prototype = { // 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 (aDataItem) { + } else if (sessionDownload) { let before = this._lastSessionDownloadElement ? this._lastSessionDownloadElement.nextSibling : this._richlistbox.firstChild; this._richlistbox.insertBefore(newOrUpdatedShell.element, before); @@ -1015,8 +801,8 @@ DownloadsPlacesView.prototype = { let shellsForURI = this._downloadElementsShellsForURI.get(downloadURI); if (shellsForURI) { for (let shell of shellsForURI) { - if (shell.dataItem) { - shell.placesNode = null; + if (shell.sessionDownload) { + shell.historyDownload = null; } else { this._removeElement(shell.element); @@ -1028,13 +814,13 @@ DownloadsPlacesView.prototype = { } }, - _removeSessionDownloadFromView: - function DPV__removeSessionDownloadFromView(aDataItem) { - let shells = this._downloadElementsShellsForURI.get(aDataItem.uri); + _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.getViewItem(aDataItem); + let shell = this._viewItemsForDownloads.get(download); if (!shells.has(shell)) throw new Error("Missing download element shell in shells list for url"); @@ -1042,14 +828,22 @@ DownloadsPlacesView.prototype = { // 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.placesNode) { + if (shells.size > 1 || !shell.historyDownload) { this._removeElement(shell.element); shells.delete(shell); if (shells.size == 0) - this._downloadElementsShellsForURI.delete(aDataItem.uri); + this._downloadElementsShellsForURI.delete(download.source.url); } else { - shell.dataItem = null; + // 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; @@ -1157,13 +951,9 @@ DownloadsPlacesView.prototype = { }, get selectedNodes() { - let placesNodes = []; - let selectedElements = this._richlistbox.selectedItems; - for (let elt of selectedElements) { - if (elt._shell.placesNode) - placesNodes.push(elt._shell.placesNode); - } - return placesNodes; + return [for (element of this._richlistbox.selectedItems) + if (element._placesNode) + element._placesNode]; }, get selectedNode() { @@ -1193,8 +983,9 @@ DownloadsPlacesView.prototype = { // 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._shell.placesNode) - this._removeHistoryDownloadFromView(element._shell.placesNode); + if (element._placesNode) { + this._removeHistoryDownloadFromView(element._placesNode); + } } } finally { @@ -1254,24 +1045,9 @@ DownloadsPlacesView.prototype = { this._removeHistoryDownloadFromView(aPlacesNode); }, - nodeIconChanged: function DPV_nodeIconChanged(aNode) { - this._forEachDownloadElementShellForURI(aNode.uri, function(aDownloadElementShell) { - aDownloadElementShell.placesNodeIconChanged(); - }); - }, - - nodeAnnotationChanged: function DPV_nodeAnnotationChanged(aNode, aAnnoName) { - this._forEachDownloadElementShellForURI(aNode.uri, function(aDownloadElementShell) { - aDownloadElementShell.placesNodeAnnotationChanged(aAnnoName); - }); - }, - - nodeTitleChanged: function DPV_nodeTitleChanged(aNode, aNewTitle) { - this._forEachDownloadElementShellForURI(aNode.uri, function(aDownloadElementShell) { - aDownloadElementShell.placesNodeTitleChanged(); - }); - }, - + nodeAnnotationChanged() {}, + nodeIconChanged() {}, + nodeTitleChanged() {}, nodeKeywordChanged: function() {}, nodeDateAddedChanged: function() {}, nodeLastModifiedChanged: function() {}, @@ -1334,16 +1110,21 @@ DownloadsPlacesView.prototype = { this._ensureInitialSelection(); }, - onDataItemAdded: function DPV_onDataItemAdded(aDataItem, aNewest) { - this._addDownloadData(aDataItem, null, aNewest); + onDownloadAdded(download, newest) { + this._addDownloadData(download, null, newest); }, - onDataItemRemoved: function DPV_onDataItemRemoved(aDataItem) { - this._removeSessionDownloadFromView(aDataItem); + onDownloadStateChanged(download) { + this._viewItemsForDownloads.get(download).onStateChanged(); }, - getViewItem: function(aDataItem) - this._viewItemsForDataItems.get(aDataItem, null), + onDownloadChanged(download) { + this._viewItemsForDownloads.get(download).onChanged(); + }, + + onDownloadRemoved(download) { + this._removeSessionDownloadFromView(download); + }, supportsCommand: function DPV_supportsCommand(aCommand) { if (DOWNLOAD_VIEW_SUPPORTED_COMMANDS.indexOf(aCommand) != -1) { @@ -1386,8 +1167,11 @@ DownloadsPlacesView.prototype = { // 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) { - if (elt._shell.placesNode || !elt._shell.dataItem.inProgress) + // 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; }, @@ -1395,10 +1179,11 @@ DownloadsPlacesView.prototype = { _copySelectedDownloadsToClipboard: function DPV__copySelectedDownloadsToClipboard() { let urls = [for (element of this._richlistbox.selectedItems) - element._shell.downloadURI]; + element._shell.download.source.url]; - Cc["@mozilla.org/widget/clipboardhelper;1"]. - getService(Ci.nsIClipboardHelper).copyString(urls.join("\n")); + Cc["@mozilla.org/widget/clipboardhelper;1"] + .getService(Ci.nsIClipboardHelper) + .copyString(urls.join("\n"), document); }, _getURLFromClipboardData: function DPV__getURLFromClipboardData() { @@ -1486,15 +1271,13 @@ DownloadsPlacesView.prototype = { // Set the state attribute so that only the appropriate items are displayed. let contextMenu = document.getElementById("downloadsContextMenu"); - let state = element._shell.getDownloadMetaData().state; - if (state !== undefined) - contextMenu.setAttribute("state", state); - else - contextMenu.removeAttribute("state"); - - if (state == nsIDM.DOWNLOAD_DOWNLOADING) { - // The resumable property of a download may change at any time, so - // ensure we update the related command now. + 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; @@ -1555,10 +1338,13 @@ DownloadsPlacesView.prototype = { if (!selectedItem) return; - let metaData = selectedItem._shell.getDownloadMetaData(); - if (!("filePath" in metaData)) + let targetPath = selectedItem._shell.download.target.path; + if (!targetPath) { return; - let file = new FileUtils.File(metaData.filePath); + } + + // We must check for existence synchronously because this is a DOM event. + let file = new FileUtils.File(targetPath); if (!file.exists()) return; diff --git a/application/palemoon/components/downloads/content/downloads.js b/application/palemoon/components/downloads/content/downloads.js index 833d7d72f..ee1c6902e 100644 --- a/application/palemoon/components/downloads/content/downloads.js +++ b/application/palemoon/components/downloads/content/downloads.js @@ -4,6 +4,23 @@ * 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, "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, "PlacesUtils", + "resource://gre/modules/PlacesUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Services", + "resource://gre/modules/Services.jsm"); + /** * Handles the Downloads panel user interface for each browser window. * @@ -65,22 +82,6 @@ "use strict"; //////////////////////////////////////////////////////////////////////////////// -//// Globals - -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"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); - -//////////////////////////////////////////////////////////////////////////////// //// DownloadsPanel /** @@ -570,8 +571,8 @@ const DownloadsPanel = { // still exist, and update the allowed items interactions accordingly. We // do these checks on a background thread, and don't prevent the panel to // be displayed while these checks are being performed. - for each (let viewItem in DownloadsView._viewItems) { - viewItem.verifyTargetExists(); + for (let viewItem of DownloadsView._visibleViewItems.values()) { + viewItem.download.refresh().catch(Cu.reportError); } if (aAnchor) { @@ -703,19 +704,19 @@ const DownloadsView = { loading: false, /** - * Ordered array of all DownloadsDataItem objects. We need to keep this array - * because only a limited number of items are shown at once, and if an item - * that is currently visible is removed from the list, we might need to take - * another item from the array and make it appear at the bottom. + * Ordered array of all Download objects. We need to keep this array because + * only a limited number of items are shown at once, and if an item that is + * currently visible is removed from the list, we might need to take another + * item from the array and make it appear at the bottom. */ - _dataItems: [], + _downloads: [], /** - * Object containing the available DownloadsViewItem objects, indexed by their - * numeric download identifier. There is a limited number of view items in - * the panel at any given time. + * Associates the visible Download objects with their corresponding + * DownloadsViewItem object. There is a limited number of view items in the + * panel at any given time. */ - _viewItems: {}, + _visibleViewItems: new Map(), /** * Called when the number of items in the list changes. @@ -723,8 +724,8 @@ const DownloadsView = { _itemCountChanged: function DV_itemCountChanged() { DownloadsCommon.log("The downloads item count has changed - we are tracking", - this._dataItems.length, "downloads in total."); - let count = this._dataItems.length; + this._downloads.length, "downloads in total."); + let count = this._downloads.length; let hiddenCount = count - this.kItemCountLimit; if (count > 0) { @@ -813,8 +814,8 @@ const DownloadsView = { * Called when a new download data item is available, either during the * asynchronous data load or when a new download is started. * - * @param aDataItem - * DownloadsDataItem object that was just added. + * @param aDownload + * Download object that was just added. * @param aNewest * 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 @@ -822,28 +823,27 @@ const DownloadsView = { * and should be appended. The latter generally happens during the * asynchronous data load. */ - onDataItemAdded: function DV_onDataItemAdded(aDataItem, aNewest) - { + onDownloadAdded(download, aNewest) { DownloadsCommon.log("A new download data item was added - aNewest =", aNewest); if (aNewest) { - this._dataItems.unshift(aDataItem); + this._downloads.unshift(download); } else { - this._dataItems.push(aDataItem); + this._downloads.push(download); } - let itemsNowOverflow = this._dataItems.length > this.kItemCountLimit; + let itemsNowOverflow = this._downloads.length > this.kItemCountLimit; if (aNewest || !itemsNowOverflow) { // The newly added item is visible in the panel and we must add the // corresponding element. This is either because it is the first item, or // because it was added at the bottom but the list still doesn't overflow. - this._addViewItem(aDataItem, aNewest); + this._addViewItem(download, aNewest); } if (aNewest && itemsNowOverflow) { // If the list overflows, remove the last item from the panel to make room // for the new one that we just added at the top. - this._removeViewItem(this._dataItems[this.kItemCountLimit]); + this._removeViewItem(this._downloads[this.kItemCountLimit]); } // For better performance during batch loads, don't update the count for @@ -853,26 +853,39 @@ const DownloadsView = { } }, + onDownloadStateChanged(download) { + let viewItem = this._visibleViewItems.get(download); + if (viewItem) { + viewItem.onStateChanged(); + } + }, + + onDownloadChanged(download) { + let viewItem = this._visibleViewItems.get(download); + if (viewItem) { + viewItem.onChanged(); + } + }, + /** * Called when a data item is removed. Ensures that the widget associated * with the view item is removed from the user interface. * - * @param aDataItem - * DownloadsDataItem object that is being removed. + * @param download + * Download object that is being removed. */ - onDataItemRemoved: function DV_onDataItemRemoved(aDataItem) - { + onDownloadRemoved(download) { DownloadsCommon.log("A download data item was removed."); - let itemIndex = this._dataItems.indexOf(aDataItem); - this._dataItems.splice(itemIndex, 1); + let itemIndex = this._downloads.indexOf(download); + this._downloads.splice(itemIndex, 1); if (itemIndex < this.kItemCountLimit) { // The item to remove is visible in the panel. - this._removeViewItem(aDataItem); - if (this._dataItems.length >= this.kItemCountLimit) { + this._removeViewItem(download); + if (this._downloads.length >= this.kItemCountLimit) { // Reinsert the next item into the panel. - this._addViewItem(this._dataItems[this.kItemCountLimit - 1], false); + this._addViewItem(this._downloads[this.kItemCountLimit - 1], false); } } @@ -880,43 +893,29 @@ const DownloadsView = { }, /** - * Returns the view item associated with the provided data item for this view. - * - * @param aDataItem - * DownloadsDataItem object for which the view item is requested. - * - * @return Object that can be used to notify item status events. + * Associates each richlistitem for a download with its corresponding + * DownloadsViewItemController object. */ - getViewItem: function DV_getViewItem(aDataItem) - { - // If the item is visible, just return it, otherwise return a mock object - // that doesn't react to notifications. - if (aDataItem.downloadGuid in this._viewItems) { - return this._viewItems[aDataItem.downloadGuid]; - } - return this._invisibleViewItem; - }, + _controllersForElements: new Map(), - /** - * Mock DownloadsDataItem object that doesn't react to notifications. - */ - _invisibleViewItem: Object.freeze({ - onStateChange: function () { }, - onProgressChange: function () { } - }), + controllerForElement(element) { + return this._controllersForElements.get(element); + }, /** * Creates a new view item associated with the specified data item, and adds * it to the top or the bottom of the list. */ - _addViewItem: function DV_addViewItem(aDataItem, aNewest) + _addViewItem(download, aNewest) { DownloadsCommon.log("Adding a new DownloadsViewItem to the downloads list.", "aNewest =", aNewest); let element = document.createElement("richlistitem"); - let viewItem = new DownloadsViewItem(aDataItem, element); - this._viewItems[aDataItem.downloadGuid] = viewItem; + let viewItem = new DownloadsViewItem(download, element); + this._visibleViewItems.set(download, viewItem); + let viewItemController = new DownloadsViewItemController(download); + this._controllersForElements.set(element, viewItemController); if (aNewest) { this.richListBox.insertBefore(element, this.richListBox.firstChild); } else { @@ -927,17 +926,17 @@ const DownloadsView = { /** * Removes the view item associated with the specified data item. */ - _removeViewItem: function DV_removeViewItem(aDataItem) - { + _removeViewItem(download) { DownloadsCommon.log("Removing a DownloadsViewItem from the downloads list."); - let element = this.getViewItem(aDataItem)._element; + let element = this._visibleViewItems.get(download).element; let previousSelectedIndex = this.richListBox.selectedIndex; this.richListBox.removeChild(element); if (previousSelectedIndex != -1) { this.richListBox.selectedIndex = Math.min(previousSelectedIndex, this.richListBox.itemCount - 1); } - delete this._viewItems[aDataItem.downloadGuid]; + this._visibleViewItems.delete(download); + this._controllersForElements.delete(element); }, ////////////////////////////////////////////////////////////////////////////// @@ -959,7 +958,7 @@ const DownloadsView = { while (target.nodeName != "richlistitem") { target = target.parentNode; } - new DownloadsViewItemController(target).doCommand(aCommand); + DownloadsView.controllerForElement(target).doCommand(aCommand); }, onDownloadClick: function DV_onDownloadClick(aEvent) @@ -1038,8 +1037,9 @@ const DownloadsView = { return; } - let controller = new DownloadsViewItemController(element); - let localFile = controller.dataItem.localFile; + // We must check for existence synchronously because this is a DOM event. + let localFile = new FileUtils.File(DownloadsView.controllerForElement(element) + .download.target.path); if (!localFile.exists()) { return; } @@ -1065,259 +1065,39 @@ XPCOMUtils.defineConstant(this, "DownloadsView", DownloadsView); * Builds and updates a single item in the downloads list widget, responding to * changes in the download state and real-time data. * - * @param aDataItem - * DownloadsDataItem to be associated with the view item. + * @param download + * Download object to be associated with the view item. * @param aElement * XUL element corresponding to the single download item in the view. */ -function DownloadsViewItem(aDataItem, aElement) -{ - this._element = aElement; - this.dataItem = aDataItem; - - this.lastEstimatedSecondsLeft = Infinity; - - // Set the URI that represents the correct icon for the target file. As soon - // as bug 239948 comment 12 is handled, the "file" property will be always a - // file URL rather than a file name. At that point we should remove the "//" - // (double slash) from the icon URI specification (see test_moz_icon_uri.js). - this.image = "moz-icon://" + this.dataItem.file + "?size=32"; - - let s = DownloadsCommon.strings; - let [displayHost, fullHost] = - DownloadUtils.getURIHost(this.dataItem.referrer || this.dataItem.uri); - - let attributes = { - "type": "download", - "class": "download-state", - "id": "downloadsItem_" + this.dataItem.downloadGuid, - "downloadGuid": this.dataItem.downloadGuid, - "state": this.dataItem.state, - "progress": this.dataItem.inProgress ? this.dataItem.percentComplete : 100, - "displayName": this.dataItem.target, - "extendedDisplayName": s.statusSeparator(this.dataItem.target, displayHost), - "extendedDisplayNameTip": s.statusSeparator(this.dataItem.target, fullHost), - "image": this.image - }; - - for (let attributeName in attributes) { - this._element.setAttribute(attributeName, attributes[attributeName]); - } +function DownloadsViewItem(download, aElement) { + this.download = download; + + this.element = aElement; + this.element._shell = this; - // Initialize more complex attributes. - this._updateProgress(); - this._updateStatusLine(); - this.verifyTargetExists(); + this.element.setAttribute("type", "download"); + this.element.classList.add("download-state"); + + this._updateState(); } DownloadsViewItem.prototype = { - /** - * The DownloadDataItem associated with this view item. - */ - dataItem: null, + __proto__: DownloadsViewUI.DownloadElementShell.prototype, /** * The XUL element corresponding to the associated richlistbox item. */ _element: null, - /** - * The inner XUL element for the progress bar, or null if not available. - */ - _progressElement: null, - - ////////////////////////////////////////////////////////////////////////////// - //// Callback functions from DownloadsData - - /** - * Called when the download state might have changed. Sometimes the state of - * the download might be the same as before, if the data layer received - * multiple events for the same download. - */ - onStateChange: function DVI_onStateChange(aOldState) - { - // If a download just finished successfully, it means that the target file - // now exists and we can extract its specific icon. To ensure that the icon - // is reloaded, we must change the URI used by the XUL image element, for - // example by adding a query parameter. Since this URI has a "moz-icon" - // scheme, this only works if we add one of the parameters explicitly - // supported by the nsIMozIconURI interface. - if (aOldState != Ci.nsIDownloadManager.DOWNLOAD_FINISHED && - aOldState != this.dataItem.state) { - this._element.setAttribute("image", this.image + "&state=normal"); - - // We assume the existence of the target of a download that just completed - // successfully, without checking the condition in the background. If the - // panel is already open, this will take effect immediately. If the panel - // is opened later, a new background existence check will be performed. - this._element.setAttribute("exists", "true"); - } - - // Update the user interface after switching states. - this._element.setAttribute("state", this.dataItem.state); - this._updateProgress(); - this._updateStatusLine(); + onStateChanged() { + this.element.setAttribute("image", this.image); + this.element.setAttribute("state", + DownloadsCommon.stateOfDownload(this.download)); }, - /** - * Called when the download progress has changed. - */ - onProgressChange: function DVI_onProgressChange() { + onChanged() { this._updateProgress(); - this._updateStatusLine(); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Functions for updating the user interface - - /** - * Updates the progress bar. - */ - _updateProgress: function DVI_updateProgress() { - if (this.dataItem.starting) { - // Before the download starts, the progress meter has its initial value. - this._element.setAttribute("progressmode", "normal"); - this._element.setAttribute("progress", "0"); - } else if (this.dataItem.state == Ci.nsIDownloadManager.DOWNLOAD_SCANNING || - this.dataItem.percentComplete == -1) { - // We might not know the progress of a running download, and we don't know - // the remaining time during the malware scanning phase. - this._element.setAttribute("progressmode", "undetermined"); - } else { - // This is a running download of which we know the progress. - this._element.setAttribute("progressmode", "normal"); - this._element.setAttribute("progress", this.dataItem.percentComplete); - } - - // Find the progress element as soon as the download binding is accessible. - if (!this._progressElement) { - this._progressElement = - document.getAnonymousElementByAttribute(this._element, "anonid", - "progressmeter"); - } - - // Dispatch the ValueChange event for accessibility, if possible. - if (this._progressElement) { - let event = document.createEvent("Events"); - event.initEvent("ValueChange", true, true); - this._progressElement.dispatchEvent(event); - } - }, - - /** - * Updates the main status line, including bytes transferred, bytes total, - * download rate, and time remaining. - */ - _updateStatusLine: function DVI_updateStatusLine() { - const nsIDM = Ci.nsIDownloadManager; - - let status = ""; - let statusTip = ""; - - if (this.dataItem.paused) { - let transfer = DownloadUtils.getTransferTotal(this.dataItem.currBytes, - this.dataItem.maxBytes); - - // We use the same XUL label to display both the state and the amount - // transferred, for example "Paused - 1.1 MB". - status = DownloadsCommon.strings.statusSeparatorBeforeNumber( - DownloadsCommon.strings.statePaused, - transfer); - } else if (this.dataItem.state == nsIDM.DOWNLOAD_DOWNLOADING) { - // We don't show the rate for each download in order to reduce clutter. - // The remaining time per download is likely enough information for the - // panel. - [status] = - DownloadUtils.getDownloadStatusNoRate(this.dataItem.currBytes, - this.dataItem.maxBytes, - this.dataItem.speed, - this.lastEstimatedSecondsLeft); - - // We are, however, OK with displaying the rate in the tooltip. - let newEstimatedSecondsLeft; - [statusTip, newEstimatedSecondsLeft] = - DownloadUtils.getDownloadStatus(this.dataItem.currBytes, - this.dataItem.maxBytes, - this.dataItem.speed, - this.lastEstimatedSecondsLeft); - this.lastEstimatedSecondsLeft = newEstimatedSecondsLeft; - } else if (this.dataItem.starting) { - status = DownloadsCommon.strings.stateStarting; - } else if (this.dataItem.state == nsIDM.DOWNLOAD_SCANNING) { - status = DownloadsCommon.strings.stateScanning; - } else if (!this.dataItem.inProgress) { - let stateLabel = function () { - let s = DownloadsCommon.strings; - switch (this.dataItem.state) { - case nsIDM.DOWNLOAD_FAILED: return s.stateFailed; - case nsIDM.DOWNLOAD_CANCELED: return s.stateCanceled; - case nsIDM.DOWNLOAD_BLOCKED_PARENTAL: return s.stateBlockedParentalControls; - case nsIDM.DOWNLOAD_BLOCKED_POLICY: return s.stateBlockedPolicy; - case nsIDM.DOWNLOAD_DIRTY: return s.stateDirty; - case nsIDM.DOWNLOAD_FINISHED: return this._fileSizeText; - } - return null; - }.apply(this); - - let [displayHost, fullHost] = - DownloadUtils.getURIHost(this.dataItem.referrer || this.dataItem.uri); - - let end = new Date(this.dataItem.endTime); - let [displayDate, fullDate] = DownloadUtils.getReadableDates(end); - - // We use the same XUL label to display the state, the host name, and the - // end time, for example "Canceled - 222.net - 11:15" or "1.1 MB - - // website2.com - Yesterday". We show the full host and the complete date - // in the tooltip. - let firstPart = DownloadsCommon.strings.statusSeparator(stateLabel, - displayHost); - status = DownloadsCommon.strings.statusSeparator(firstPart, displayDate); - statusTip = DownloadsCommon.strings.statusSeparator(fullHost, fullDate); - } - - this._element.setAttribute("status", status); - this._element.setAttribute("statusTip", statusTip || status); - }, - - /** - * Localized string representing the total size of completed downloads, for - * example "1.5 MB" or "Unknown size". - */ - get _fileSizeText() - { - // Display the file size, but show "Unknown" for negative sizes. - let fileSize = this.dataItem.maxBytes; - if (fileSize < 0) { - return DownloadsCommon.strings.sizeUnknown; - } - let [size, unit] = DownloadUtils.convertByteUnits(fileSize); - return DownloadsCommon.strings.sizeWithUnits(size, unit); - }, - - ////////////////////////////////////////////////////////////////////////////// - //// Functions called by the panel - - /** - * Starts checking whether the target file of a finished download is still - * available on disk, and sets an attribute that controls how the item is - * presented visually. - * - * The existence check is executed on a background thread. - */ - verifyTargetExists: function DVI_verifyTargetExists() { - // We don't need to check if the download is not finished successfully. - if (!this.dataItem.openable) { - return; - } - - OS.File.exists(this.dataItem.localFile.path).then( - function DVI_RTE_onSuccess(aExists) { - if (aExists) { - this._element.setAttribute("exists", "true"); - } else { - this._element.removeAttribute("exists"); - } - }.bind(this), Cu.reportError); }, }; @@ -1372,8 +1152,8 @@ const DownloadsViewController = { // Other commands are selection-specific. let element = DownloadsView.richListBox.selectedItem; - return element && - new DownloadsViewItemController(element).isCommandEnabled(aCommand); + return element && DownloadsView.controllerForElement(element) + .isCommandEnabled(aCommand); }, doCommand: function DVC_doCommand(aCommand) @@ -1388,7 +1168,7 @@ const DownloadsViewController = { let element = DownloadsView.richListBox.selectedItem; if (element) { // The doCommand function also checks if the command is enabled. - new DownloadsViewItemController(element).doCommand(aCommand); + DownloadsView.controllerForElement(element).doCommand(aCommand); } }, @@ -1428,36 +1208,41 @@ XPCOMUtils.defineConstant(this, "DownloadsViewController", DownloadsViewControll * Handles all the user interaction events, in particular the "commands", * related to a single item in the downloads list widgets. */ -function DownloadsViewItemController(aElement) { - let downloadGuid = aElement.getAttribute("downloadGuid"); - this.dataItem = DownloadsCommon.getData(window).dataItems[downloadGuid]; +function DownloadsViewItemController(download) { + this.download = download; } DownloadsViewItemController.prototype = { - ////////////////////////////////////////////////////////////////////////////// - //// Command dispatching - - /** - * The DownloadDataItem controlled by this object. - */ - dataItem: null, - isCommandEnabled: function DVIC_isCommandEnabled(aCommand) { switch (aCommand) { case "downloadsCmd_open": { - return this.dataItem.openable && this.dataItem.localFile.exists(); + if (!this.download.succeeded) { + return false; + } + + let file = new FileUtils.File(this.download.target.path); + return file.exists(); } case "downloadsCmd_show": { - return this.dataItem.localFile.exists() || - this.dataItem.partFile.exists(); + let file = new FileUtils.File(this.download.target.path); + if (file.exists()) { + return true; + } + + if (!this.download.target.partFilePath) { + return false; + } + + let partFile = new FileUtils.File(this.download.target.partFilePath); + return partFile.exists(); } case "downloadsCmd_pauseResume": - return this.dataItem.inProgress && this.dataItem.resumable; + return this.download.hasPartialData && !this.download.error; case "downloadsCmd_retry": - return this.dataItem.canRetry; + return this.download.canceled || this.download.error; case "downloadsCmd_openReferrer": - return !!this.dataItem.referrer; + return !!this.download.source.referrer; case "cmd_delete": case "downloadsCmd_cancel": case "downloadsCmd_copyLocation": @@ -1485,21 +1270,21 @@ DownloadsViewItemController.prototype = { commands: { cmd_delete: function DVIC_cmd_delete() { - Downloads.getList(Downloads.ALL) - .then(list => list.remove(this.dataItem._download)) - .then(() => this.dataItem._download.finalize(true)) - .catch(Cu.reportError); - PlacesUtils.bhistory.removePage(NetUtil.newURI(this.dataItem.uri)); + DownloadsCommon.removeAndFinalizeDownload(this.download); + PlacesUtils.bhistory.removePage( + NetUtil.newURI(this.download.source.url)); }, downloadsCmd_cancel: function DVIC_downloadsCmd_cancel() { - this.dataItem.cancel(); + this.download.cancel().catch(() => {}); + this.download.removePartialData().catch(Cu.reportError); }, downloadsCmd_open: function DVIC_downloadsCmd_open() { - this.dataItem.openLocalFile(window); + this.download.launch().catch(Cu.reportError); + // We explicitly close the panel here to give the user the feedback that // their click has been received, and we're handling the action. // Otherwise, we'd have to wait for the file-type handler to execute @@ -1510,7 +1295,8 @@ DownloadsViewItemController.prototype = { downloadsCmd_show: function DVIC_downloadsCmd_show() { - this.dataItem.showLocalFile(); + let file = new FileUtils.File(this.download.target.path); + DownloadsCommon.showDownloadedFile(file); // We explicitly close the panel here to give the user the feedback that // their click has been received, and we're handling the action. @@ -1522,24 +1308,28 @@ DownloadsViewItemController.prototype = { downloadsCmd_pauseResume: function DVIC_downloadsCmd_pauseResume() { - this.dataItem.togglePauseResume(); + if (this.download.stopped) { + this.download.start(); + } else { + this.download.cancel(); + } }, downloadsCmd_retry: function DVIC_downloadsCmd_retry() { - this.dataItem.retry(); + this.download.start().catch(() => {}); }, downloadsCmd_openReferrer: function DVIC_downloadsCmd_openReferrer() { - openURL(this.dataItem.referrer); + openURL(this.download.source.referrer); }, downloadsCmd_copyLocation: function DVIC_downloadsCmd_copyLocation() { let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"] .getService(Ci.nsIClipboardHelper); - clipboard.copyString(this.dataItem.uri, document); + clipboard.copyString(this.download.source.url, document); }, downloadsCmd_doDefault: function DVIC_downloadsCmd_doDefault() @@ -1548,7 +1338,7 @@ DownloadsViewItemController.prototype = { // Determine the default command for the current item. let defaultCommand = function () { - switch (this.dataItem.state) { + switch (DownloadsCommon.stateOfDownload(this.download)) { case nsIDM.DOWNLOAD_NOTSTARTED: return "downloadsCmd_cancel"; case nsIDM.DOWNLOAD_FINISHED: return "downloadsCmd_open"; case nsIDM.DOWNLOAD_FAILED: return "downloadsCmd_retry"; diff --git a/application/palemoon/components/downloads/moz.build b/application/palemoon/components/downloads/moz.build index 61d8c0f62..abfaab7df 100644 --- a/application/palemoon/components/downloads/moz.build +++ b/application/palemoon/components/downloads/moz.build @@ -15,6 +15,7 @@ EXTRA_COMPONENTS += [ EXTRA_JS_MODULES += [ 'DownloadsLogger.jsm', 'DownloadsTaskbar.jsm', + 'DownloadsViewUI.jsm', ] EXTRA_PP_JS_MODULES += [ diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index f0a7aa22a..ad48dab29 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -552,14 +552,6 @@ BrowserGlue.prototype = { this._showPlacesLockedNotificationBox(); } - // If there are plugins installed that are outdated, and the user hasn't - // been warned about them yet, open the plugins update page. - // Pale Moon: disable this functionality, people are already notified - // if they visit a page with an outdated plugin, and they can check - // properly from the plugins page as well. -// if (Services.prefs.getBoolPref(PREF_PLUGINS_NOTIFYUSER)) -// this._showPluginUpdatePage(); - // For any add-ons that were installed disabled and can be enabled offer // them to the user. let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED); diff --git a/application/palemoon/components/places/content/places.js b/application/palemoon/components/places/content/places.js index a94193823..40dbcb9b8 100644 --- a/application/palemoon/components/places/content/places.js +++ b/application/palemoon/components/places/content/places.js @@ -491,7 +491,7 @@ var PlacesOrganizer = { Task.spawn(function() { try { - yield BookmarkJSONUtils.importFromFile(aFile, true); + yield BookmarkJSONUtils.importFromFile(aFile.path, true); } catch(ex) { PlacesOrganizer._showErrorAlert(PlacesUIUtils.getString("bookmarksRestoreParseError")); } @@ -519,7 +519,7 @@ var PlacesOrganizer = { let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker); let fpCallback = function fpCallback_done(aResult) { if (aResult != Ci.nsIFilePicker.returnCancel) { - BookmarkJSONUtils.exportToFile(fp.file); + BookmarkJSONUtils.exportToFile(fp.file.path); } }; diff --git a/application/palemoon/components/preferences/advanced.xul b/application/palemoon/components/preferences/advanced.xul index 3bd5becb3..34998c1b8 100644 --- a/application/palemoon/components/preferences/advanced.xul +++ b/application/palemoon/components/preferences/advanced.xul @@ -27,10 +27,7 @@ <!--XXX button prefs --> <!-- General tab --> -<!-- Pale Moon: remove accessibility features, they confuse people anyway --> -<!-- <preference id="accessibility.browsewithcaret" name="accessibility.browsewithcaret" type="bool"/> --> <preference id="accessibility.typeaheadfind" name="accessibility.typeaheadfind" type="bool"/> -<!-- <preference id="accessibility.blockautorefresh" name="accessibility.blockautorefresh" type="bool"/> --> <preference id="general.autoScroll" name="general.autoScroll" type="bool"/> <preference id="general.smoothScroll" name="general.smoothScroll" type="bool"/> @@ -51,8 +48,8 @@ type="bool"/> #endif <preference id="pref.general.compatmode" name="general.useragent.compatMode" type="int"/> - - <!-- Data Choices tab --> + + <preference id="pref.general.captiveportal" name="network.captive-portal-service.enabled" type="bool"/> <!-- Network tab --> <preference id="browser.cache.disk.capacity" name="browser.cache.disk.capacity" type="int"/> @@ -136,22 +133,13 @@ <tabpanel id="generalPanel" orient="vertical"> <!-- Accessibility --> -<!-- Pale Moon: remove accessibility features, they confuse people anyway --> <groupbox id="accessibilityGroup" align="start"> <caption label="&accessibility.label;"/> -<!-- <checkbox id="useCursorNavigation" - label="&useCursorNavigation.label;" - accesskey="&useCursorNavigation.accesskey;" - preference="accessibility.browsewithcaret"/> --> <checkbox id="searchStartTyping" label="&searchStartTyping.label;" accesskey="&searchStartTyping.accesskey;" preference="accessibility.typeaheadfind"/> -<!-- <checkbox id="blockAutoRefresh" - label="&blockAutoRefresh.label;" - accesskey="&blockAutoRefresh.accesskey;" - preference="accessibility.blockautorefresh"/> --> </groupbox> <!-- Browsing --> @@ -193,6 +181,7 @@ </hbox> </groupbox> #endif + <!-- User Agent compatibility --> <groupbox id="UACompatGroup" orient="vertical"> <caption label="&UACompatGroup.label;"/> <hbox align="center"> @@ -206,6 +195,15 @@ </menulist> </hbox> </groupbox> + + <!-- Captive portal detection --> + <groupbox id="captivePortalGroup" orient="vertical"> + <caption label="&captivePortalGroup.label;"/> + <checkbox id="captivePortalDetect" + label="&captivePortalDetect.label;" + preference="pref.general.captiveportal"/> + </groupbox> + </tabpanel> <!-- Network --> diff --git a/application/palemoon/components/preferences/connection.js b/application/palemoon/components/preferences/connection.js index c1dd1bb6d..da038c925 100644 --- a/application/palemoon/components/preferences/connection.js +++ b/application/palemoon/components/preferences/connection.js @@ -63,7 +63,7 @@ var gConnectionsDialog = { autologinProxyPref.disabled = proxyTypePref.value == 0; var noProxiesPref = document.getElementById("network.proxy.no_proxies_on"); - noProxiesPref.disabled = proxyTypePref.value != 1; + noProxiesPref.disabled = proxyTypePref.value == 0; var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url"); autoconfigURLPref.disabled = proxyTypePref.value != 2; diff --git a/application/palemoon/components/preferences/connection.xul b/application/palemoon/components/preferences/connection.xul index 491bf4878..e6079dd54 100644 --- a/application/palemoon/components/preferences/connection.xul +++ b/application/palemoon/components/preferences/connection.xul @@ -138,9 +138,6 @@ <radio id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;"/> </radiogroup> </row> - <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/> - <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/> - <label value="&noproxyExplain.label;" control="networkProxyNone"/> </rows> </grid> <radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/> @@ -154,6 +151,9 @@ </hbox> </radiogroup> <separator class="thin"/> + <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/> + <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/> + <label value="&noproxyExplain.label;" control="networkProxyNone"/> <checkbox id="autologinProxy" preference="signon.autologin.proxy" label="&autologinproxy.label;" accesskey="&autologinproxy.accesskey;" tooltiptext="&autologinproxy.tooltip;"/> diff --git a/application/palemoon/components/preferences/security.xul b/application/palemoon/components/preferences/security.xul index b12946f2a..bc1625275 100644 --- a/application/palemoon/components/preferences/security.xul +++ b/application/palemoon/components/preferences/security.xul @@ -43,8 +43,8 @@ <!-- Security Protocols --> - <preference id="network.stricttransportsecurity.preloadlist" - name="network.stricttransportsecurity.preloadlist" + <preference id="network.stricttransportsecurity.enabled" + name="network.stricttransportsecurity.enabled" type="bool"/> <preference id="security.cert_pinning.enforcement_level" name="security.cert_pinning.enforcement_level" @@ -146,7 +146,7 @@ <checkbox id="enableHSTS" label="&enableHSTS.label;" accesskey="&enableHSTS.accesskey;" - preference="network.stricttransportsecurity.preloadlist" /> + preference="network.stricttransportsecurity.enabled" /> <checkbox id="enableHPKP" label="&enableHPKP.label;" accesskey="&enableHPKP.accesskey;" diff --git a/application/palemoon/config/version.txt b/application/palemoon/config/version.txt index 4efefb316..dc6d77132 100644 --- a/application/palemoon/config/version.txt +++ b/application/palemoon/config/version.txt @@ -1 +1 @@ -28.3.0a1
\ No newline at end of file +28.5.0a1
\ No newline at end of file diff --git a/application/palemoon/confvars.sh b/application/palemoon/confvars.sh index 26b02fc85..6216cba5b 100644 --- a/application/palemoon/confvars.sh +++ b/application/palemoon/confvars.sh @@ -99,7 +99,6 @@ if test "$OS_ARCH" = "WINNT" -o \ fi # Short-circuit a few services to be removed -MOZ_MAINTENANCE_SERVICE= MOZ_SERVICES_HEALTHREPORT= MOZ_ADDON_SIGNING=0 MOZ_REQUIRE_SIGNING=0 diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in index a218a3487..1247d3171 100644 --- a/application/palemoon/installer/package-manifest.in +++ b/application/palemoon/installer/package-manifest.in @@ -59,8 +59,8 @@ #ifdef XP_WIN32 @BINPATH@/uninstall/helper.exe #endif -#ifdef MOZ_UPDATER @RESPATH@/update.locale +#ifdef MOZ_UPDATER @RESPATH@/updater.ini #endif diff --git a/application/palemoon/installer/windows/Makefile.in b/application/palemoon/installer/windows/Makefile.in index 9b0f697c8..d2be8aec2 100644 --- a/application/palemoon/installer/windows/Makefile.in +++ b/application/palemoon/installer/windows/Makefile.in @@ -14,12 +14,6 @@ INSTALLER_FILES = \ nsis/shared.nsh \ $(NULL) -ifdef MOZ_MAINTENANCE_SERVICE -INSTALLER_FILES += \ - nsis/maintenanceservice_installer.nsi \ - $(NULL) -endif - BRANDING_FILES = \ branding.nsi \ appname.bmp \ @@ -58,17 +52,6 @@ uninstaller:: --preprocess-locale $(topsrcdir) \ $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR) -# For building the maintenanceservice installer -ifdef MOZ_MAINTENANCE_SERVICE -maintenanceservice_installer:: - $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_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) -endif - $(CONFIG_DIR)/setup.exe:: $(RM) -r $(CONFIG_DIR) $(MKDIR) $(CONFIG_DIR) diff --git a/application/palemoon/installer/windows/nsis/defines.nsi.in b/application/palemoon/installer/windows/nsis/defines.nsi.in index edef802a9..1764b10c4 100644 --- a/application/palemoon/installer/windows/nsis/defines.nsi.in +++ b/application/palemoon/installer/windows/nsis/defines.nsi.in @@ -51,10 +51,6 @@ !define MinSupportedCPU "SSE2" -#ifdef MOZ_MAINTENANCE_SERVICE -!define MOZ_MAINTENANCE_SERVICE -#endif - # File details shared by both the installer and uninstaller VIProductVersion "1.0.0.0" VIAddVersionKey "ProductName" "${BrandShortName}" diff --git a/application/palemoon/installer/windows/nsis/installer.nsi b/application/palemoon/installer/windows/nsis/installer.nsi index 276b94f74..50bab5586 100644 --- a/application/palemoon/installer/windows/nsis/installer.nsi +++ b/application/palemoon/installer/windows/nsis/installer.nsi @@ -165,11 +165,6 @@ Page custom preOptions leaveOptions !define MUI_DIRECTORYPAGE_VERIFYONLEAVE !insertmacro MUI_PAGE_DIRECTORY -; Custom Components Page -!ifdef MOZ_MAINTENANCE_SERVICE -Page custom preComponents leaveComponents -!endif - ; Custom Shortcuts Page Page custom preShortcuts leaveShortcuts @@ -427,41 +422,6 @@ Section "-Application" APP_IDX ${EndIf} ${EndIf} -!ifdef MOZ_MAINTENANCE_SERVICE - ; If the maintenance service page was displayed then a value was already - ; explicitly selected for installing the maintenance service and - ; and so InstallMaintenanceService will already be 0 or 1. - ; If the maintenance service page was not displayed then - ; InstallMaintenanceService will be equal to "". - ${If} $InstallMaintenanceService == "" - Call IsUserAdmin - Pop $R0 - ${If} $R0 == "true" - ; Only proceed if we have HKLM write access - ${AndIf} $TmpVal == "HKLM" - ; On Windows < XP SP3 we do not install the maintenance service. - ${If} ${IsWinXP} - ${AndIf} ${AtMostServicePack} 2 - StrCpy $InstallMaintenanceService "0" - ${Else} - ; The user is an admin, so we should default to installing the service. - StrCpy $InstallMaintenanceService "1" - ${EndIf} - ${Else} - ; The user is not admin, so we can't install the service. - StrCpy $InstallMaintenanceService "0" - ${EndIf} - ${EndIf} - - ${If} $InstallMaintenanceService == "1" - ; The user wants to install the maintenance service, so execute - ; the pre-packaged maintenance service installer. - ; This option can only be turned on if the user is an admin so there - ; is no need to use ExecShell w/ verb runas to enforce elevated. - nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\"" - ${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}" @@ -578,13 +538,6 @@ Section "-Application" APP_IDX ${EndIf} ${EndUnless} ${EndIf} - -!ifdef MOZ_MAINTENANCE_SERVICE - ${If} $TmpVal == "HKLM" - ; Add the registry keys for allowed certificates. - ${AddMaintCertKeys} - ${EndIf} -!endif SectionEnd ; Cleanup operations to perform at the end of the installation. @@ -948,59 +901,6 @@ Function leaveShortcuts ${EndIf} FunctionEnd -!ifdef MOZ_MAINTENANCE_SERVICE -Function preComponents - ; If the service already exists, don't show this page - ServicesHelper::IsInstalled "MozillaMaintenance" - Pop $R9 - ${If} $R9 == 1 - ; The service already exists so don't show this page. - Abort - ${EndIf} - - ; On Windows < XP SP3 we do not install the maintenance service. - ${If} ${IsWinXP} - ${AndIf} ${AtMostServicePack} 2 - Abort - ${EndIf} - - ; Don't show the custom components page if the - ; user is not an admin - Call IsUserAdmin - Pop $R9 - ${If} $R9 != "true" - Abort - ${EndIf} - - ; Only show the maintenance service page if we have write access to HKLM - ClearErrors - WriteRegStr HKLM "Software\Mozilla" \ - "${BrandShortName}InstallerTest" "Write Test" - ${If} ${Errors} - ClearErrors - Abort - ${Else} - DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" - ${EndIf} - - StrCpy $PageName "Components" - ${CheckCustomCommon} - !insertmacro MUI_HEADER_TEXT "$(COMPONENTS_PAGE_TITLE)" "$(COMPONENTS_PAGE_SUBTITLE)" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini" -FunctionEnd - -Function leaveComponents - ${MUI_INSTALLOPTIONS_READ} $0 "components.ini" "Settings" "State" - ${If} $0 != 0 - Abort - ${EndIf} - ${MUI_INSTALLOPTIONS_READ} $InstallMaintenanceService "components.ini" "Field 2" "State" - ${If} $InstallType == ${INSTALLTYPE_CUSTOM} - Call CheckExistingInstall - ${EndIf} -FunctionEnd -!endif - Function preSummary StrCpy $PageName "Summary" ; Setup the summary.ini file for the Custom Summary Page diff --git a/application/palemoon/installer/windows/nsis/maintenanceservice_installer.nsi b/application/palemoon/installer/windows/nsis/maintenanceservice_installer.nsi deleted file mode 100644 index 1f73bac6a..000000000 --- a/application/palemoon/installer/windows/nsis/maintenanceservice_installer.nsi +++ /dev/null @@ -1,332 +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/. - -; 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 admin - -; 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 ./ - -; Variables -Var TempMaintServiceName -Var BrandFullNameDA -Var BrandFullName - -; 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 - -; The test slaves use this fallback key to run tests. -; And anyone that wants to run tests themselves should already have -; this installed. -!define FallbackKey \ - "SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4" - -!define CompanyName "Mozilla Corporation" -!define BrandFullNameInternal "" - -; The following includes are custom. -!include defines.nsi -; We keep defines.nsi defined so that we get other things like -; the version number, but we redefine BrandFullName -!define MaintFullName "Mozilla Maintenance Service" -!undef BrandFullName -!define BrandFullName "${MaintFullName}" - -!include common.nsh -!include locales.nsi - -VIAddVersionKey "FileDescription" "${MaintFullName} Installer" -VIAddVersionKey "OriginalFilename" "maintenanceservice_installer.exe" - -Name "${MaintFullName}" -OutFile "maintenanceservice_installer.exe" - -; Get installation folder from registry if available -InstallDirRegKey HKLM "Software\Mozilla\MaintenanceService" "" - -SetOverwrite on - -; serviceinstall.cpp also uses this key, in case the path is changed, update -; there too. -!define MaintUninstallKey \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService" - -; Always install into the 32-bit location even if we have a 64-bit build. -; This is because we use only 1 service for all Basilisk channels. -; Allow either x86 and x64 builds to exist at this location, depending on -; what is the latest build. -InstallDir "$PROGRAMFILES32\${MaintFullName}\" -ShowUnInstDetails nevershow - -################################################################################ -# Modern User Interface - MUI - -!define MUI_ICON setup.ico -!define MUI_UNICON setup.ico -!define MUI_WELCOMEPAGE_TITLE_3LINES -!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp - -;Interface Settings -!define MUI_ABORTWARNING - -; Uninstaller Pages -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES - -################################################################################ -# 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 " " - -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 "")' - - SetSilent silent - - ${Unless} ${AtLeastWin7} - Abort - ${EndUnless} -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 "")' - -; 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 - - StrCpy $BrandFullNameDA "${MaintFullName}" - StrCpy $BrandFullName "${MaintFullName}" -FunctionEnd - -Section "MaintenanceService" - AllowSkipFiles off - - CreateDirectory $INSTDIR - SetOutPath $INSTDIR - - ; If the service already exists, then it will be stopped when upgrading it - ; via the maintenanceservice_tmp.exe command executed below. - ; The maintenanceservice_tmp.exe command will rename the file to - ; maintenanceservice.exe if maintenanceservice_tmp.exe is newer. - ; If the service does not exist yet, we install it and drop the file on - ; disk as maintenanceservice.exe directly. - StrCpy $TempMaintServiceName "maintenanceservice.exe" - IfFileExists "$INSTDIR\maintenanceservice.exe" 0 skipAlreadyExists - StrCpy $TempMaintServiceName "maintenanceservice_tmp.exe" - skipAlreadyExists: - - ; We always write out a copy and then decide whether to install it or - ; not via calling its 'install' cmdline which works by version comparison. - CopyFiles "$EXEDIR\maintenanceservice.exe" "$INSTDIR\$TempMaintServiceName" - - ; The updater.ini file is only used when performing an install or upgrade, - ; and only if that install or upgrade is successful. If an old updater.ini - ; happened to be copied into the maintenance service installation directory - ; but the service was not newer, the updater.ini file would be unused. - ; It is used to fill the description of the service on success. - CopyFiles "$EXEDIR\updater.ini" "$INSTDIR\updater.ini" - - ; Install the application maintenance service. - ; If a service already exists, the command line parameter will stop the - ; service and only install itself if it is newer than the already installed - ; service. If successful it will remove the old maintenanceservice.exe - ; and replace it with maintenanceservice_tmp.exe. - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/Upgrade" $0 - ${If} ${Errors} - ExecWait '"$INSTDIR\$TempMaintServiceName" install' - ${Else} - ; The upgrade cmdline is the same as install except - ; It will fail if the service isn't already installed. - ExecWait '"$INSTDIR\$TempMaintServiceName" upgrade' - ${EndIf} - - WriteUninstaller "$INSTDIR\Uninstall.exe" - WriteRegStr HKLM "${MaintUninstallKey}" "DisplayName" "${MaintFullName}" - WriteRegStr HKLM "${MaintUninstallKey}" "UninstallString" \ - '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "${MaintUninstallKey}" "DisplayIcon" \ - "$INSTDIR\Uninstall.exe,0" - WriteRegStr HKLM "${MaintUninstallKey}" "DisplayVersion" "${AppVersion}" - WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Mozilla" - WriteRegStr HKLM "${MaintUninstallKey}" "Comments" "${BrandFullName}" - WriteRegDWORD HKLM "${MaintUninstallKey}" "NoModify" 1 - ${GetSize} "$INSTDIR" "/S=0K" $R2 $R3 $R4 - WriteRegDWORD HKLM "${MaintUninstallKey}" "EstimatedSize" $R2 - - ; Write out that a maintenance service was attempted. - ; We do this because on upgrades we will check this value and we only - ; want to install once on the first upgrade to maintenance service. - ; Also write out that we are currently installed, preferences will check - ; this value to determine if we should show the service update pref. - ; Since the Maintenance service can be installed either x86 or x64, - ; always use the 64-bit registry for checking if an attempt was made. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1 - WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1 - DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled" - - ; Included here for debug purposes only. - ; These keys are used to bypass the installation dir is a valid installation - ; check from the service so that tests can be run. - ; WriteRegStr HKLM "${FallbackKey}\0" "name" "Mozilla Corporation" - ; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "DigiCert SHA2 Assured ID Code Signing CA" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} -SectionEnd - -; By renaming before deleting we improve things slightly in case -; there is a file in use error. In this case a new install can happen. -Function un.RenameDelete - Pop $9 - ; If the .moz-delete file already exists previously, delete it - ; If it doesn't exist, the call is ignored. - ; We don't need to pass /REBOOTOK here since it was already marked that way - ; if it exists. - Delete "$9.moz-delete" - Rename "$9" "$9.moz-delete" - ${If} ${Errors} - Delete /REBOOTOK "$9" - ${Else} - Delete /REBOOTOK "$9.moz-delete" - ${EndIf} - ClearErrors -FunctionEnd - -Section "Uninstall" - ; Delete the service so that no updates will be attempted - ExecWait '"$INSTDIR\maintenanceservice.exe" uninstall' - - Push "$INSTDIR\updater.ini" - Call un.RenameDelete - Push "$INSTDIR\maintenanceservice.exe" - Call un.RenameDelete - Push "$INSTDIR\maintenanceservice_tmp.exe" - Call un.RenameDelete - Push "$INSTDIR\maintenanceservice.old" - Call un.RenameDelete - Push "$INSTDIR\Uninstall.exe" - Call un.RenameDelete - Push "$INSTDIR\update\updater.ini" - Call un.RenameDelete - Push "$INSTDIR\update\updater.exe" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-1.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-2.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-3.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-4.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-5.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-6.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-7.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-8.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-9.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-10.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-install.log" - Call un.RenameDelete - Push "$INSTDIR\logs\maintenanceservice-uninstall.log" - Call un.RenameDelete - SetShellVarContext all - Push "$APPDATA\Mozilla\logs\maintenanceservice.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-1.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-2.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-3.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-4.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-5.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-6.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-7.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-8.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-9.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-10.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-install.log" - Call un.RenameDelete - Push "$APPDATA\Mozilla\logs\maintenanceservice-uninstall.log" - Call un.RenameDelete - RMDir /REBOOTOK "$APPDATA\Mozilla\logs" - RMDir /REBOOTOK "$APPDATA\Mozilla" - RMDir /REBOOTOK "$INSTDIR\logs" - RMDir /REBOOTOK "$INSTDIR\update" - RMDir /REBOOTOK "$INSTDIR" - - DeleteRegKey HKLM "${MaintUninstallKey}" - - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "Installed" - DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled" - DeleteRegKey HKLM "${FallbackKey}\" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} -SectionEnd diff --git a/application/palemoon/installer/windows/nsis/shared.nsh b/application/palemoon/installer/windows/nsis/shared.nsh index 294e3e6fc..815853ae7 100644 --- a/application/palemoon/installer/windows/nsis/shared.nsh +++ b/application/palemoon/installer/windows/nsis/shared.nsh @@ -124,51 +124,6 @@ ${FixDistributionsINI} RmDir /r /REBOOTOK "$INSTDIR\${TO_BE_DELETED}" - -!ifdef MOZ_MAINTENANCE_SERVICE - Call IsUserAdmin - Pop $R0 - ${If} $R0 == "true" - ; Only proceed if we have HKLM write access - ${AndIf} $TmpVal == "HKLM" - ; On Windows 2000 we do not install the maintenance service. - ${AndIf} ${AtLeastWinXP} - ; We check to see if the maintenance service install was already attempted. - ; Since the Maintenance service can be installed either x86 or x64, - ; always use the 64-bit registry for checking if an attempt was made. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - ReadRegDWORD $5 HKLM "Software\Mozilla\MaintenanceService" "Attempted" - ClearErrors - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} - - ; Add the registry keys for allowed certificates. - ${AddMaintCertKeys} - - ; If the maintenance service is already installed, do nothing. - ; The maintenance service will launch: - ; maintenanceservice_installer.exe /Upgrade to upgrade the maintenance - ; service if necessary. If the update was done from updater.exe without - ; the service (i.e. service is failing), updater.exe will do the update of - ; the service. The reasons we do not do it here is because we don't want - ; to have to prompt for limited user accounts when the service isn't used - ; and we currently call the PostUpdate twice, once for the user and once - ; for the SYSTEM account. Also, this would stop the maintenance service - ; and we need a return result back to the service when run that way. - ${If} $5 == "" - ; An install of maintenance service was never attempted. - ; We know we are an Admin and that we have write access into HKLM - ; based on the above checks, so attempt to just run the EXE. - ; In the worst case, in case there is some edge case with the - ; IsAdmin check and the permissions check, the maintenance service - ; will just fail to be attempted to be installed. - nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\"" - ${EndIf} - ${EndIf} -!endif !macroend !define PostUpdate "!insertmacro PostUpdate" @@ -718,54 +673,6 @@ !macroend !define UpdateProtocolHandlers "!insertmacro UpdateProtocolHandlers" -!ifdef MOZ_MAINTENANCE_SERVICE -; Adds maintenance service certificate keys for the install dir. -; For the cert to work, it must also be signed by a trusted cert for the user. -!macro AddMaintCertKeys - Push $R0 - ; Allow main Mozilla cert information for updates - ; This call will push the needed key on the stack - ServicesHelper::PathToUniqueRegistryPath "$INSTDIR" - Pop $R0 - ${If} $R0 != "" - ; More than one certificate can be specified in a different subfolder - ; for example: $R0\1, but each individual binary can be signed - ; with at most one certificate. A fallback certificate can only be used - ; if the binary is replaced with a different certificate. - ; We always use the 64bit registry for certs. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - - ; PrefetchProcessName was originally used to experiment with deleting - ; Windows prefetch as a speed optimization. It is no longer used though. - DeleteRegValue HKLM "$R0" "prefetchProcessName" - - ; Setting the Attempted value will ensure that a new Maintenance Service - ; install will never be attempted again after this from updates. The value - ; is used only to see if updates should attempt new service installs. - WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1 - - ; These values associate the allowed certificates for the current - ; installation. - WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}" - WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}" - ; These values associate the allowed certificates for the previous - ; installation, so that we can update from it cleanly using the - ; old updater.exe (which will still have this signature). - WriteRegStr HKLM "$R0\1" "name" "${CERTIFICATE_NAME_PREVIOUS}" - WriteRegStr HKLM "$R0\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} - ClearErrors - ${EndIf} - ; Restore the previously used value back - Pop $R0 -!macroend -!define AddMaintCertKeys "!insertmacro AddMaintCertKeys" -!endif - ; Removes various registry entries for reasons noted below (does not use SHCTX). !macro RemoveDeprecatedKeys StrCpy $0 "SOFTWARE\Classes" diff --git a/application/palemoon/installer/windows/nsis/uninstaller.nsi b/application/palemoon/installer/windows/nsis/uninstaller.nsi index 333fd33d6..c85af3656 100644 --- a/application/palemoon/installer/windows/nsis/uninstaller.nsi +++ b/application/palemoon/installer/windows/nsis/uninstaller.nsi @@ -450,24 +450,6 @@ Section "Uninstall" ; uninstalls of PaleMoon-release with reinstalls of PaleMoon-release, for example. WriteRegStr HKCU "Software\Mozilla\PaleMoon" "Uninstalled-${UpdateChannel}" "True" -!ifdef MOZ_MAINTENANCE_SERVICE - ; Get the path the allowed cert is at and remove it - ; Keep this block of code last since it modfies the reg view - ServicesHelper::PathToUniqueRegistryPath "$INSTDIR" - Pop $MaintCertKey - ${If} $MaintCertKey != "" - ; Always use the 64bit registry for certs on 64bit systems. - ${If} ${RunningX64} - SetRegView 64 - ${EndIf} - DeleteRegKey HKLM "$MaintCertKey" - ${If} ${RunningX64} - SetRegView lastused - ${EndIf} - ${EndIf} - Call un.UninstallServiceIfNotUsed -!endif - ${un.IsFirewallSvcRunning} Pop $0 ${If} "$0" == "true" diff --git a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd b/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd index a926b0ed2..27de3797f 100644 --- a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd +++ b/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd @@ -14,6 +14,7 @@ for the help button in the menubar but Gnome does not. --> <!ENTITY helpMenuWin.label "Help"> <!ENTITY helpMenuWin.accesskey "H"> +<!ENTITY updateCmd.label "Check for Updates…"> <!ENTITY aboutProduct.label "About &brandShortName;"> <!ENTITY aboutProduct.accesskey "A"> <!ENTITY productHelp.label "&brandShortName; Help"> diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.dtd b/application/palemoon/locales/en-US/chrome/browser/browser.dtd index 439057a84..c810b074e 100644 --- a/application/palemoon/locales/en-US/chrome/browser/browser.dtd +++ b/application/palemoon/locales/en-US/chrome/browser/browser.dtd @@ -417,8 +417,8 @@ items are mutually exclusive. --> <!ENTITY mediaMute.accesskey "M"> <!ENTITY mediaUnmute.label "Unmute"> <!ENTITY mediaUnmute.accesskey "m"> -<!ENTITY mediaPlaybackRate.label "Play Speed"> -<!ENTITY mediaPlaybackRate.accesskey "l"> +<!ENTITY mediaPlaybackRate2.label "Play Speed"> +<!ENTITY mediaPlaybackRate2.accesskey "d"> <!ENTITY mediaPlaybackRate050x.label "Slow Motion (0.5×)"> <!ENTITY mediaPlaybackRate050x.accesskey "S"> <!ENTITY mediaPlaybackRate100x.label "Normal Speed"> @@ -430,6 +430,8 @@ movie "Space Balls" and is meant to say that this speed is very fast. --> <!ENTITY mediaPlaybackRate200x.label "Ludicrous Speed (2×)"> <!ENTITY mediaPlaybackRate200x.accesskey "L"> +<!ENTITY mediaLoop.label "Loop"> +<!ENTITY mediaLoop.accesskey "L"> <!-- LOCALIZATION NOTE: The access keys for "Show Controls" and "Hide Controls" are the same because the two context-menu items are mutually exclusive. --> diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.properties b/application/palemoon/locales/en-US/chrome/browser/browser.properties index dbe6dbaa1..4c45e2513 100644 --- a/application/palemoon/locales/en-US/chrome/browser/browser.properties +++ b/application/palemoon/locales/en-US/chrome/browser/browser.properties @@ -201,6 +201,22 @@ 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'… diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/advanced.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/advanced.dtd index 6ef29c680..dcb7b0e90 100644 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/advanced.dtd +++ b/application/palemoon/locales/en-US/chrome/browser/preferences/advanced.dtd @@ -33,6 +33,15 @@ <!ENTITY setDefault.accesskey "d"> <!ENTITY isDefault.label "&brandShortName; is currently your default browser"> +<!ENTITY UACompatGroup.label "Compatibility"> +<!ENTITY UACompat.label "User Agent Mode:"> +<!ENTITY UACompat.Native "Native"> +<!ENTITY UACompat.Gecko "Gecko Compatibility"> +<!ENTITY UACompat.Firefox "Firefox Compatibility"> + +<!ENTITY captivePortalGroup.label "Captive portals"> +<!ENTITY captivePortalDetect.label "Detect restricted network access"> + <!ENTITY dataChoicesTab.label "Data Choices"> <!ENTITY crashReporterSection.label "Crash Reporter"> @@ -126,12 +135,6 @@ <!ENTITY viewSecurityDevices.label "Security Devices"> <!ENTITY viewSecurityDevices.accesskey "y"> -<!ENTITY UACompatGroup.label "Compatibility"> -<!ENTITY UACompat.label "User Agent Mode:"> -<!ENTITY UACompat.Native "Native"> -<!ENTITY UACompat.Gecko "Gecko Compatibility"> -<!ENTITY UACompat.Firefox "Firefox Compatibility"> - <!ENTITY scrollparamTab.label "Scrolling"> <!ENTITY smoothscroll.explain.label "The parameters below only have an effect if smooth scrolling is enabled overall with the checkbox above."> <!ENTITY smoothscroll.to "to"> diff --git a/application/palemoon/modules/FormSubmitObserver.jsm b/application/palemoon/modules/FormSubmitObserver.jsm index e4d3e765e..6b2ea3c84 100644 --- a/application/palemoon/modules/FormSubmitObserver.jsm +++ b/application/palemoon/modules/FormSubmitObserver.jsm @@ -42,10 +42,10 @@ FormSubmitObserver.prototype = { this._content = aWindow; this._tab = aTabChildGlobal; - this._mm =
- this._content.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDocShell)
- .sameTypeRootTreeItem
+ this._mm = + this._content.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIDocShell) + .sameTypeRootTreeItem .QueryInterface(Ci.nsIDocShell) .QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIContentFrameMessageManager); @@ -104,13 +104,13 @@ FormSubmitObserver.prototype = return; } - // Insure that this is the FormSubmitObserver associated with the form + // Ensure that this is the FormSubmitObserver associated with the // element / window this notification is about. - if (this._content != aFormElement.ownerDocument.defaultView.top.document.defaultView) { + let element = aInvalidElements.queryElementAt(0, Ci.nsISupports); + if (this._content != element.ownerGlobal.top.document.defaultView) { return; } - let element = aInvalidElements.queryElementAt(0, Ci.nsISupports); if (!(element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement || @@ -118,6 +118,9 @@ FormSubmitObserver.prototype = 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); @@ -127,8 +130,6 @@ FormSubmitObserver.prototype = element.focus(); - this._validationMessage = element.validationMessage; - // Watch for input changes which may change the validation message. element.addEventListener("input", this, false); @@ -142,7 +143,7 @@ FormSubmitObserver.prototype = /* * 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 @@ -189,18 +190,17 @@ FormSubmitObserver.prototype = // Note, this is relative to the browser and needs to be translated // in chrome. - panelData.contentRect = this._msgRect(aElement); + 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; - let position = ""; if (aElement.tagName == 'INPUT' && (aElement.type == 'radio' || aElement.type == 'checkbox')) { panelData.position = "bottomcenter topleft"; } else { - let win = aElement.ownerDocument.defaultView; + let win = aElement.ownerGlobal; let style = win.getComputedStyle(aElement, null); if (style.direction == 'rtl') { offset = parseInt(style.paddingRight) + parseInt(style.borderRightWidth); @@ -218,8 +218,8 @@ FormSubmitObserver.prototype = this._mm.sendAsyncMessage("FormValidation:HidePopup", {}); }, - _getWindowUtils: function () {
- return this._content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
+ _getWindowUtils: function () { + return this._content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); }, _isRootDocumentEvent: function (aEvent) { @@ -231,21 +231,5 @@ FormSubmitObserver.prototype = (target.ownerDocument && target.ownerDocument == this._content.document)); }, - /* - * Return a message manager rect for the element's bounding client rect - * in top level browser coords. - */ - _msgRect: function (aElement) { - let domRect = aElement.getBoundingClientRect(); - let zoomFactor = this._getWindowUtils().fullZoom; - let { offsetX, offsetY } = BrowserUtils.offsetToTopLevelWindow(this._content, aElement); - return { - left: (domRect.left + offsetX) * zoomFactor, - top: (domRect.top + offsetY) * zoomFactor, - width: domRect.width * zoomFactor, - height: domRect.height * zoomFactor - }; - }, - QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]) }; diff --git a/application/palemoon/modules/WindowsPreviewPerTab.jsm b/application/palemoon/modules/WindowsPreviewPerTab.jsm index 243a00aae..4b5030ad4 100644 --- a/application/palemoon/modules/WindowsPreviewPerTab.jsm +++ b/application/palemoon/modules/WindowsPreviewPerTab.jsm @@ -595,6 +595,7 @@ TabWindow.prototype = { "file", "chrome", "resource", "about" ]), onLinkIconAvailable: function (aBrowser, aIconURL) { + let self = this; let requestURL = null; if (aIconURL) { let shouldRequestFaviconURL = true; @@ -611,15 +612,15 @@ TabWindow.prototype = { let isDefaultFavicon = !requestURL; getFaviconAsImage( requestURL, - PrivateBrowsingUtils.isWindowPrivate(this.win), + PrivateBrowsingUtils.isWindowPrivate(self.win), img => { - let index = this.tabbrowser.browsers.indexOf(aBrowser); + 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 = this.tabbrowser.tabs[index]; - let preview = this.previews.get(tab); + let tab = self.tabbrowser.tabs[index]; + let preview = self.previews.get(tab); if (tab.getAttribute("image") == aIconURL || (!preview.icon && isDefaultFavicon)) { preview.icon = img; diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css index 516677fe6..b545b06cb 100644 --- a/application/palemoon/themes/linux/browser.css +++ b/application/palemoon/themes/linux/browser.css @@ -1781,9 +1781,9 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-sound[soundplaying], -#TabsToolbar[brighttext] .tab-icon-sound[blocked], -#TabsToolbar[brighttext] .tab-icon-sound[muted] { +#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); } @@ -1827,17 +1827,17 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), +#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[brighttext] .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), +#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[brighttext] .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), +#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"); } diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css index a7bd683bd..ddf050785 100644 --- a/application/palemoon/themes/osx/browser.css +++ b/application/palemoon/themes/osx/browser.css @@ -1844,9 +1844,9 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-sound[soundplaying], -#TabsToolbar[brighttext] .tab-icon-sound[blocked], -#TabsToolbar[brighttext] .tab-icon-sound[muted] { +#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); } @@ -1890,17 +1890,17 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), +#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[brighttext] .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), +#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[brighttext] .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), +#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"); } diff --git a/application/palemoon/themes/windows/Toolbar-glass.png b/application/palemoon/themes/windows/Toolbar-glass.png Binary files differnew file mode 100644 index 000000000..f8aac2467 --- /dev/null +++ b/application/palemoon/themes/windows/Toolbar-glass.png diff --git a/application/palemoon/themes/windows/Toolbar-glass.svg b/application/palemoon/themes/windows/Toolbar-glass.svg index 5212e45e7..9feaac251 100644 --- a/application/palemoon/themes/windows/Toolbar-glass.svg +++ b/application/palemoon/themes/windows/Toolbar-glass.svg @@ -6,14 +6,14 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - enable-background="new 0 0 378 38" - viewBox="0 0 378 38" - height="38" - width="378" - y="0px" - x="0px" + version="1.1" id="PaleMoonToolbarSVG" - version="1.1"> + x="0px" + y="0px" + width="378" + height="38" + viewBox="0 0 378 38" + enable-background="new 0 0 378 38"> <metadata id="metadata146"> <rdf:RDF> @@ -29,1972 +29,3016 @@ <defs id="defs144"> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.1087088,0,-1.2351844)" - r="7.1399999" - fy="14.778796" - fx="10.529827" - cy="14.778796" - cx="10.529827" + xlink:href="#linearGradient4635" id="radialGradient4669" - xlink:href="#linearGradient4635" /> + cx="10.529827" + cy="14.778796" + fx="10.529827" + fy="14.778796" + r="7.1399999" + gradientTransform="matrix(1,0,0,1.1087088,0,-1.2351844)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4635"> <stop - id="stop4631" + style="stop-color:#6198cb;stop-opacity:1" offset="0" - style="stop-color:#6198cb;stop-opacity:1" /> + id="stop4631" /> <stop - id="stop4633" + style="stop-color:#3a78b2;stop-opacity:1" offset="1" - style="stop-color:#3a78b2;stop-opacity:1" /> + id="stop4633" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0853313,0,-3.029369)" - r="8.7600002" - fy="38.79744" - fx="11.063469" - cy="38.79744" - cx="11.063469" + xlink:href="#linearGradient4635" id="radialGradient4637" - xlink:href="#linearGradient4635" /> + cx="11.063469" + cy="38.79744" + fx="11.063469" + fy="38.79744" + r="8.7600002" + gradientTransform="matrix(1,0,0,1.0853313,0,-3.029369)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.1003056,0,-1.1335797)" - r="7.1399999" - fy="14.552581" - fx="34.841751" - cy="14.552581" - cx="34.841751" + xlink:href="#linearGradient4635" id="radialGradient4677" - xlink:href="#linearGradient4635" /> + cx="34.841751" + cy="14.552581" + fx="34.841751" + fy="14.552581" + r="7.1399999" + gradientTransform="matrix(1,0,0,1.1003056,0,-1.1335797)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.99218759,0,0.09141507)" - r="7.6799994" - fy="12.761739" - fx="58.062626" - cy="12.761739" - cx="58.062626" + xlink:href="#linearGradient4603" id="radialGradient4605" - xlink:href="#linearGradient4603" /> + cx="58.062626" + cy="12.761739" + fx="58.062626" + fy="12.761739" + r="7.6799994" + gradientTransform="matrix(1,0,0,0.99218759,0,0.09141507)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4603"> <stop - id="stop4599" + style="stop-color:#e72b1d;stop-opacity:1" offset="0" - style="stop-color:#e72b1d;stop-opacity:1" /> + id="stop4599" /> <stop - id="stop4601" + style="stop-color:#cc4338;stop-opacity:1" offset="1" - style="stop-color:#cc4338;stop-opacity:1" /> + id="stop4601" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0769231,0,-0.86932835)" - r="7.8000002" - fy="13.939252" - fx="79.305222" - cy="13.939252" - cx="79.305222" + xlink:href="#linearGradient4523-3" id="radialGradient4525" - xlink:href="#linearGradient4523-3" /> + cx="79.305222" + cy="13.939252" + fx="79.305222" + fy="13.939252" + r="7.8000002" + gradientTransform="matrix(1,0,0,1.0769231,0,-0.86932835)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4523-3"> <stop - id="stop4519" + style="stop-color:#4fb55d;stop-opacity:1" offset="0" - style="stop-color:#4fb55d;stop-opacity:1" /> + id="stop4519" /> <stop - id="stop4521" + style="stop-color:#2d8539;stop-opacity:1" offset="1" - style="stop-color:#2d8539;stop-opacity:1" /> + id="stop4521" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.87507716,0,1.3868386)" - r="9.5995998" - fy="12.664675" - fx="103.23091" - cy="12.664675" - cx="103.23091" + xlink:href="#linearGradient4527" id="radialGradient4529" - xlink:href="#linearGradient4527" /> + cx="103.23091" + cy="12.664675" + fx="103.23091" + fy="12.664675" + r="9.5995998" + gradientTransform="matrix(1,0,0,0.87507716,0,1.3868386)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4527"> <stop - id="stop4523" + style="stop-color:#3f6bbd;stop-opacity:1" offset="0" - style="stop-color:#3f6bbd;stop-opacity:1" /> + id="stop4523" /> <stop - id="stop4525" + style="stop-color:#29467b;stop-opacity:1" offset="1" - style="stop-color:#29467b;stop-opacity:1" /> + id="stop4525" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0032611,0,-0.03620244)" - r="8.3726959" - fy="16.659737" - fx="125.30523" - cy="16.659737" - cx="125.30523" + xlink:href="#linearGradient4707" id="radialGradient4709" - xlink:href="#linearGradient4707" /> + cx="125.30523" + cy="16.659737" + fx="125.30523" + fy="16.659737" + r="8.3726959" + gradientTransform="matrix(1,0,0,1.0032611,0,-0.03620244)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4707"> <stop - id="stop4703" + style="stop-color:#8c9ba5;stop-opacity:1" offset="0" - style="stop-color:#8c9ba5;stop-opacity:1" /> + id="stop4703" /> <stop - id="stop4705" + style="stop-color:#607480;stop-opacity:1" offset="1" - style="stop-color:#607480;stop-opacity:1" /> + id="stop4705" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.993055,0,0.07848724)" - r="8.6400051" - fy="12.784631" - fx="149.26262" - cy="12.784631" - cx="149.26262" + xlink:href="#linearGradient4727" id="radialGradient4729" - xlink:href="#linearGradient4727" /> + cx="149.26262" + cy="12.784631" + fx="149.26262" + fy="12.784631" + r="8.6400051" + gradientTransform="matrix(1,0,0,0.993055,0,0.07848724)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4727"> <stop - id="stop4723" + style="stop-color:#3eb796;stop-opacity:1" offset="0" - style="stop-color:#3eb796;stop-opacity:1" /> + id="stop4723" /> <stop - id="stop4725" + style="stop-color:#31a886;stop-opacity:1" offset="1" - style="stop-color:#31a886;stop-opacity:1" /> + id="stop4725" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.79035186,0,0,0.79508811,-0.14216924,6.9389816e-4)" - r="9.6007004" - fy="12.037849" - fx="466.94476" - cy="12.037849" - cx="466.94476" + xlink:href="#linearGradient5023" id="radialGradient5017" - xlink:href="#linearGradient5023" /> + cx="466.94476" + cy="12.037849" + fx="466.94476" + fy="12.037849" + r="9.6007004" + gradientTransform="matrix(0.79035186,0,0,0.79508811,-0.14216924,6.9389816e-4)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient5023"> <stop - style="stop-color:#c6cdd2;stop-opacity:1" + id="stop5019" offset="0" - id="stop5019" /> + style="stop-color:#c6cdd2;stop-opacity:1" /> <stop - style="stop-color:#9cabb4;stop-opacity:1" + id="stop5021" offset="1" - id="stop5021" /> + style="stop-color:#9cabb4;stop-opacity:1" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.87500048,0,1.3876528)" - r="9.5999947" - fy="13.746766" - fx="194.44176" - cy="13.746766" - cx="194.44176" + xlink:href="#linearGradient4707" id="radialGradient4793" - xlink:href="#linearGradient4707" /> + cx="194.44176" + cy="13.746766" + fx="194.44176" + fy="13.746766" + r="9.5999947" + gradientTransform="matrix(1,0,0,0.87500048,0,1.3876528)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.87500002,0,1.3876579)" - r="9.6000004" - fy="11.101265" - fx="239.2" - cy="11.101265" - cx="239.2" + xlink:href="#linearGradient4707" id="radialGradient4833" - xlink:href="#linearGradient4707" /> + cx="239.2" + cy="11.101265" + fx="239.2" + fy="11.101265" + r="9.6000004" + gradientTransform="matrix(1,0,0,0.87500002,0,1.3876579)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.79274533,0,0,0.78327978,-0.14435628,0.11758726)" - r="3.5288758" - fy="12.418613" - fx="242.0894" - cy="12.418613" - cx="242.0894" + xlink:href="#linearGradient4707" id="radialGradient4841" - xlink:href="#linearGradient4707" /> + cx="242.0894" + cy="12.418613" + fx="242.0894" + fy="12.418613" + r="3.5288758" + gradientTransform="matrix(0.79274533,0,0,0.78327978,-0.14435628,0.11758726)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.99992718,0,0.00247197)" - r="9.7507105" - fy="31.105829" - fx="466.39926" - cy="31.105829" - cx="466.39926" + xlink:href="#linearGradient5037" id="radialGradient5031" - xlink:href="#linearGradient5037" /> + cx="466.39926" + cy="31.105829" + fx="466.39926" + fy="31.105829" + r="9.7507105" + gradientTransform="matrix(1,0,0,0.99992718,0,0.00247197)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient5037"> <stop - style="stop-color:#e8e1a1;stop-opacity:1" + id="stop5033" offset="0" - id="stop5033" /> + style="stop-color:#e8e1a1;stop-opacity:1" /> <stop - style="stop-color:#baad3e;stop-opacity:1" + id="stop5035" offset="1" - id="stop5035" /> + style="stop-color:#baad3e;stop-opacity:1" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.8160434,0,2.0506693)" - r="10.35937" - fy="16.56296" - fx="217.95329" - cy="16.56296" - cx="217.95329" + xlink:href="#linearGradient4707" id="radialGradient4813" - xlink:href="#linearGradient4707" /> + cx="217.95329" + cy="16.56296" + fx="217.95329" + fy="16.56296" + r="10.35937" + gradientTransform="matrix(1,0,0,0.8160434,0,2.0506693)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.9969072,0,0.03528241)" - r="8.5577164" - fy="15.840806" - fx="262.79288" - cy="15.840806" - cx="262.79288" + xlink:href="#linearGradient4707" id="radialGradient4861" - xlink:href="#linearGradient4707" /> + cx="262.79288" + cy="15.840806" + fx="262.79288" + fy="15.840806" + r="8.5577164" + gradientTransform="matrix(1,0,0,0.9969072,0,0.03528241)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - r="8.53125" - fy="14.171478" - fx="286.58698" - cy="14.171478" - cx="286.58698" + xlink:href="#linearGradient4707" id="radialGradient4881" - xlink:href="#linearGradient4707" /> + cx="286.58698" + cy="14.171478" + fx="286.58698" + fy="14.171478" + r="8.53125" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.4,0,-4.4901397)" - r="6.09375" - fy="14.457072" - fx="308.97141" - cy="14.457072" - cx="308.97141" + xlink:href="#linearGradient4707" id="radialGradient4901" - xlink:href="#linearGradient4707" /> + cx="308.97141" + cy="14.457072" + fx="308.97141" + fy="14.457072" + r="6.09375" + gradientTransform="matrix(1,0,0,1.4,0,-4.4901397)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - r="8.53125" - fy="13.119289" - fx="331.15933" - cy="13.119289" - cx="331.15933" + xlink:href="#linearGradient4707" id="radialGradient4921" - xlink:href="#linearGradient4707" /> + cx="331.15933" + cy="13.119289" + fx="331.15933" + fy="13.119289" + r="8.53125" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.79035186,0,0,0.15902921,-0.14216924,7.1987363)" - r="6.09375" - fy="11.316628" - fx="353.15076" - cy="11.316628" - cx="353.15076" + xlink:href="#linearGradient4707" id="radialGradient4941" - xlink:href="#linearGradient4707" /> - <radialGradient - gradientUnits="userSpaceOnUse" + cx="353.15076" + cy="11.316628" + fx="353.15076" + fy="11.316628" r="6.09375" - fy="11.407905" - fx="375.97003" - cy="11.407905" - cx="375.97003" - id="radialGradient4949" + gradientTransform="matrix(0.79035186,0,0,0.15902921,-0.14216924,7.1987363)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + gradientTransform="matrix(0.79035186,0,0,0.79514603,-0.14216924,3.8580698e-5)" xlink:href="#linearGradient4707" - gradientTransform="matrix(0.79035186,0,0,0.79514603,-0.14216924,3.8580698e-5)" /> + id="radialGradient4949" + cx="375.97003" + cy="11.407905" + fx="375.97003" + fy="11.407905" + r="6.09375" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.99701325,0,0.03407254)" - r="8.5350475" - fy="13.518586" - fx="400.5007" - cy="13.518586" - cx="400.5007" + xlink:href="#linearGradient4707" id="radialGradient4957" - xlink:href="#linearGradient4707" /> + cx="400.5007" + cy="13.518586" + fx="400.5007" + fy="13.518586" + r="8.5350475" + gradientTransform="matrix(1,0,0,0.99701325,0,0.03407254)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.357667,-0.02466618,0.02411975,1.3275908,-149.53429,5.1574131)" - r="8.53125" - fy="15.742972" - fx="417.02075" - cy="15.742972" - cx="417.02075" + xlink:href="#linearGradient4975" id="radialGradient4977" - xlink:href="#linearGradient4975" /> + cx="417.02075" + cy="15.742972" + fx="417.02075" + fy="15.742972" + r="8.53125" + gradientTransform="matrix(1.357667,-0.02466618,0.02411975,1.3275908,-149.53429,5.1574131)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4975"> <stop - id="stop4971" + style="stop-color:#f79729;stop-opacity:1" offset="0" - style="stop-color:#f79729;stop-opacity:1" /> + id="stop4971" /> <stop - id="stop4973" + style="stop-color:#d2831f;stop-opacity:1" offset="1" - style="stop-color:#d2831f;stop-opacity:1" /> + id="stop4973" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.71428563,0,3.2333231)" - r="8.53125" - fy="11.316628" - fx="444.33652" - cy="11.316628" - cx="444.33652" + xlink:href="#linearGradient4707" id="radialGradient4997" - xlink:href="#linearGradient4707" /> + cx="444.33652" + cy="11.316628" + fx="444.33652" + fy="11.316628" + r="8.53125" + gradientTransform="matrix(1,0,0,0.71428563,0,3.2333231)" + gradientUnits="userSpaceOnUse" /> <radialGradient - r="7.9746099" - fy="9" - fx="134.97461" - cy="9" - cx="134.97461" - gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" - gradientUnits="userSpaceOnUse" + xlink:href="#linearGradient4747" id="radialGradient4710" - xlink:href="#linearGradient4747" /> + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="134.97461" + cy="9" + fx="134.97461" + fy="9" + r="7.9746099" /> <linearGradient id="linearGradient4747"> <stop - id="stop4743" + style="stop-color:#c5b631;stop-opacity:1" offset="0" - style="stop-color:#c5b631;stop-opacity:1" /> + id="stop4743" /> <stop - id="stop4745" + style="stop-color:#baad3e;stop-opacity:1" offset="1" - style="stop-color:#baad3e;stop-opacity:1" /> + id="stop4745" /> </linearGradient> <radialGradient - r="7.9746099" - fy="9.0947113" - fx="132.6468" - cy="9.0947113" - cx="132.6468" - gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" - gradientUnits="userSpaceOnUse" + xlink:href="#linearGradient5037" id="radialGradient4712" - xlink:href="#linearGradient5037" /> - <radialGradient - r="7.9746099" - fy="9" - fx="134.97461" - cy="9" - cx="134.97461" - gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" gradientUnits="userSpaceOnUse" - id="radialGradient4714" - xlink:href="#linearGradient4747" /> + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="132.6468" + cy="9.0947113" + fx="132.6468" + fy="9.0947113" + r="7.9746099" /> <radialGradient + xlink:href="#linearGradient4747" + id="radialGradient4714" gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,28.000001,0,-310.09784)" - r="0.31640625" - fy="11.485105" - fx="166.37157" - cy="11.485105" - cx="166.37157" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="134.97461" + cy="9" + fx="134.97461" + fy="9" + r="7.9746099" /> + <radialGradient + xlink:href="#linearGradient4707" id="radialGradient4750" - xlink:href="#linearGradient4707" /> + cx="166.37157" + cy="11.485105" + fx="166.37157" + fy="11.485105" + r="0.31640625" + gradientTransform="matrix(1,0,0,28.000001,0,-310.09784)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0032611,0.11563445,22.233158)" - r="8.3726959" - fy="16.659737" - fx="125.30523" - cy="16.659737" - cx="125.30523" + xlink:href="#linearGradient4832" id="radialGradient4709-1" - xlink:href="#linearGradient4832" /> + cx="125.30523" + cy="16.659737" + fx="125.30523" + fy="16.659737" + r="8.3726959" + gradientTransform="matrix(1,0,0,1.0032611,0.11563445,22.233158)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4832"> <stop - style="stop-color:#22e23d;stop-opacity:1" + id="stop5029" offset="0" - id="stop5029" /> + style="stop-color:#22e23d;stop-opacity:1" /> <stop - style="stop-color:#38a748;stop-opacity:1" + id="stop4830" offset="1" - id="stop4830" /> + style="stop-color:#38a748;stop-opacity:1" /> </linearGradient> <filter - id="filter4883" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4883"> <feFlood - id="feFlood4873" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4873" /> <feComposite - id="feComposite4875" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4875" /> <feGaussianBlur - id="feGaussianBlur4877" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4877" /> <feOffset - id="feOffset4879" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4879" /> <feComposite - id="feComposite4881" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4881" /> <feColorMatrix - id="feColorMatrix6673" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6673" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6675" flood-opacity="1" - id="feFlood6675" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6677" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6679" in="composite1" - id="feGaussianBlur6679" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6681" dx="2.77556e-017" - id="feOffset6681" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6683" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4895" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4895"> <feFlood - id="feFlood4885" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4885" /> <feComposite - id="feComposite4887" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4887" /> <feGaussianBlur - id="feGaussianBlur4889" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4889" /> <feOffset - id="feOffset4891" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4891" /> <feComposite - id="feComposite4893" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4893" /> <feColorMatrix - id="feColorMatrix6685" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6685" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6687" flood-opacity="1" - id="feFlood6687" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6689" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6691" in="composite1" - id="feGaussianBlur6691" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6693" dx="2.77556e-017" - id="feOffset6693" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6695" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4907" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4907"> <feFlood - id="feFlood4897" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4897" /> <feComposite - id="feComposite4899" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4899" /> <feGaussianBlur - id="feGaussianBlur4901" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4901" /> <feOffset - id="feOffset4903" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4903" /> <feComposite - id="feComposite4905" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4905" /> <feColorMatrix - id="feColorMatrix6697" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6697" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6699" flood-opacity="1" - id="feFlood6699" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6701" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6703" in="composite1" - id="feGaussianBlur6703" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6705" dx="2.77556e-017" - id="feOffset6705" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6707" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4919" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4919"> <feFlood - id="feFlood4909" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4909" /> <feComposite - id="feComposite4911" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4911" /> <feGaussianBlur - id="feGaussianBlur4913" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4913" /> <feOffset - id="feOffset4915" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4915" /> <feComposite - id="feComposite4917" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4917" /> <feColorMatrix - id="feColorMatrix6709" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6709" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6711" flood-opacity="1" - id="feFlood6711" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6713" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6715" in="composite1" - id="feGaussianBlur6715" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6717" dx="2.77556e-017" - id="feOffset6717" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6719" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4931" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4931"> <feFlood - id="feFlood4921" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4921" /> <feComposite - id="feComposite4923" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4923" /> <feGaussianBlur - id="feGaussianBlur4925" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4925" /> <feOffset - id="feOffset4927" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4927" /> <feComposite - id="feComposite4929" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4929" /> <feColorMatrix - id="feColorMatrix6721" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6721" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6723" flood-opacity="1" - id="feFlood6723" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6725" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6727" in="composite1" - id="feGaussianBlur6727" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6729" dx="2.77556e-017" - id="feOffset6729" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6731" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4943" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4943"> <feFlood - id="feFlood4933" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4933" /> <feComposite - id="feComposite4935" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4935" /> <feGaussianBlur - id="feGaussianBlur4937" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4937" /> <feOffset - id="feOffset4939" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4939" /> <feComposite - id="feComposite4941" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4941" /> <feColorMatrix - id="feColorMatrix6733" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6733" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6735" flood-opacity="1" - id="feFlood6735" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6737" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6739" in="composite1" - id="feGaussianBlur6739" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6741" dx="2.77556e-017" - id="feOffset6741" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6743" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4955" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4955"> <feFlood - id="feFlood4945" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4945" /> <feComposite - id="feComposite4947" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4947" /> <feGaussianBlur - id="feGaussianBlur4949" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4949" /> <feOffset - id="feOffset4951" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4951" /> <feComposite - id="feComposite4953" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4953" /> <feColorMatrix - id="feColorMatrix6745" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6745" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6747" flood-opacity="1" - id="feFlood6747" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6749" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6751" in="composite1" - id="feGaussianBlur6751" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6753" dx="2.77556e-017" - id="feOffset6753" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6755" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4967" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4967"> <feFlood - id="feFlood4957" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4957" /> <feComposite - id="feComposite4959" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4959" /> <feGaussianBlur - id="feGaussianBlur4961" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4961" /> <feOffset - id="feOffset4963" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4963" /> <feComposite - id="feComposite4965" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4965" /> <feColorMatrix - id="feColorMatrix6757" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6757" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6759" flood-opacity="1" - id="feFlood6759" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6761" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6763" in="composite1" - id="feGaussianBlur6763" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6765" dx="2.77556e-017" - id="feOffset6765" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6767" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4979" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4979"> <feFlood - id="feFlood4969" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4969" /> <feComposite - id="feComposite4971" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4971" /> <feGaussianBlur - id="feGaussianBlur4973" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4973" /> <feOffset - id="feOffset4975" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4975" /> <feComposite - id="feComposite4977" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4977" /> <feColorMatrix - id="feColorMatrix6769" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6769" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6771" flood-opacity="1" - id="feFlood6771" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6773" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6775" in="composite1" - id="feGaussianBlur6775" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6777" dx="2.77556e-017" - id="feOffset6777" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6779" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter4991" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter4991"> <feFlood - id="feFlood4981" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4981" /> <feComposite - id="feComposite4983" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4983" /> <feGaussianBlur - id="feGaussianBlur4985" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4985" /> <feOffset - id="feOffset4987" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4987" /> <feComposite - id="feComposite4989" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite4989" /> <feColorMatrix - id="feColorMatrix6781" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6781" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6783" flood-opacity="1" - id="feFlood6783" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6785" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6787" in="composite1" - id="feGaussianBlur6787" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6789" dx="2.77556e-017" - id="feOffset6789" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6791" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5003" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5003"> <feFlood - id="feFlood4993" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4993" /> <feComposite - id="feComposite4995" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4995" /> <feGaussianBlur - id="feGaussianBlur4997" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4997" /> <feOffset - id="feOffset4999" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4999" /> <feComposite - id="feComposite5001" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5001" /> <feColorMatrix - id="feColorMatrix6793" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6793" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6795" flood-opacity="1" - id="feFlood6795" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6797" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6799" in="composite1" - id="feGaussianBlur6799" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6801" dx="2.77556e-017" - id="feOffset6801" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6803" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5015" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5015"> <feFlood - id="feFlood5005" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5005" /> <feComposite - id="feComposite5007" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5007" /> <feGaussianBlur - id="feGaussianBlur5009" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5009" /> <feOffset - id="feOffset5011" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5011" /> <feComposite - id="feComposite5013" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5013" /> <feColorMatrix - id="feColorMatrix6805" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6805" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6807" flood-opacity="1" - id="feFlood6807" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6809" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6811" in="composite1" - id="feGaussianBlur6811" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6813" dx="2.77556e-017" - id="feOffset6813" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6815" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5027" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5027"> <feFlood - id="feFlood5017" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5017" /> <feComposite - id="feComposite5019" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5019" /> <feGaussianBlur - id="feGaussianBlur5021" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5021" /> <feOffset - id="feOffset5023" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5023" /> <feComposite - id="feComposite5025" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5025" /> <feColorMatrix - id="feColorMatrix6817" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6817" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6819" flood-opacity="1" - id="feFlood6819" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6821" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6823" in="composite1" - id="feGaussianBlur6823" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6825" dx="2.77556e-017" - id="feOffset6825" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6827" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5039" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5039"> <feFlood - id="feFlood5029" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5029" /> <feComposite - id="feComposite5031" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5031" /> <feGaussianBlur - id="feGaussianBlur5033" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5033" /> <feOffset - id="feOffset5035" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5035" /> <feComposite - id="feComposite5037" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5037" /> <feColorMatrix - id="feColorMatrix6829" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6829" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6831" flood-opacity="1" - id="feFlood6831" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6833" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6835" in="composite1" - id="feGaussianBlur6835" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6837" dx="2.77556e-017" - id="feOffset6837" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6839" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5051" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5051"> <feFlood - id="feFlood5041" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5041" /> <feComposite - id="feComposite5043" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5043" /> <feGaussianBlur - id="feGaussianBlur5045" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5045" /> <feOffset - id="feOffset5047" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5047" /> <feComposite - id="feComposite5049" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5049" /> <feColorMatrix - id="feColorMatrix6841" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6841" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6843" flood-opacity="1" - id="feFlood6843" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6845" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6847" in="composite1" - id="feGaussianBlur6847" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6849" dx="2.77556e-017" - id="feOffset6849" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6851" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5063" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5063"> <feFlood - id="feFlood5053" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5053" /> <feComposite - id="feComposite5055" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5055" /> <feGaussianBlur - id="feGaussianBlur5057" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5057" /> <feOffset - id="feOffset5059" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5059" /> <feComposite - id="feComposite5061" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5061" /> <feColorMatrix - id="feColorMatrix6853" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6853" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6855" flood-opacity="1" - id="feFlood6855" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6857" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6859" in="composite1" - id="feGaussianBlur6859" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6861" dx="2.77556e-017" - id="feOffset6861" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6863" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5075" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5075"> <feFlood - id="feFlood5065" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5065" /> <feComposite - id="feComposite5067" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5067" /> <feGaussianBlur - id="feGaussianBlur5069" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5069" /> <feOffset - id="feOffset5071" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5071" /> <feComposite - id="feComposite5073" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5073" /> <feColorMatrix - id="feColorMatrix6865" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6865" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6867" flood-opacity="1" - id="feFlood6867" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6869" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6871" in="composite1" - id="feGaussianBlur6871" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6873" dx="2.77556e-017" - id="feOffset6873" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6875" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5087" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5087"> <feFlood - id="feFlood5077" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5077" /> <feComposite - id="feComposite5079" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5079" /> <feGaussianBlur - id="feGaussianBlur5081" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5081" /> <feOffset - id="feOffset5083" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5083" /> <feComposite - id="feComposite5085" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5085" /> <feColorMatrix - id="feColorMatrix6877" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6877" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6879" flood-opacity="1" - id="feFlood6879" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6881" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6883" in="composite1" - id="feGaussianBlur6883" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6885" dx="2.77556e-017" - id="feOffset6885" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6887" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5099" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5099"> <feFlood - id="feFlood5089" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5089" /> <feComposite - id="feComposite5091" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5091" /> <feGaussianBlur - id="feGaussianBlur5093" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5093" /> <feOffset - id="feOffset5095" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5095" /> <feComposite - id="feComposite5097" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5097" /> <feColorMatrix - id="feColorMatrix6889" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6889" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6891" flood-opacity="1" - id="feFlood6891" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6893" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6895" in="composite1" - id="feGaussianBlur6895" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6897" dx="2.77556e-017" - id="feOffset6897" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6899" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5111" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5111"> <feFlood - id="feFlood5101" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5101" /> <feComposite - id="feComposite5103" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5103" /> <feGaussianBlur - id="feGaussianBlur5105" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5105" /> <feOffset - id="feOffset5107" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5107" /> <feComposite - id="feComposite5109" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5109" /> <feColorMatrix - id="feColorMatrix6901" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6901" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6903" flood-opacity="1" - id="feFlood6903" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6905" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6907" in="composite1" - id="feGaussianBlur6907" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6909" dx="2.77556e-017" - id="feOffset6909" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6911" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5123" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5123"> <feFlood - id="feFlood5113" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5113" /> <feComposite - id="feComposite5115" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5115" /> <feGaussianBlur - id="feGaussianBlur5117" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5117" /> <feOffset - id="feOffset5119" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5119" /> <feComposite - id="feComposite5121" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5121" /> <feColorMatrix - id="feColorMatrix6913" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6913" /> <feFlood - in="fbSourceGraphic" - result="flood" - flood-color="rgb(255,255,255)" + id="feFlood6915" flood-opacity="1" - id="feFlood6915" /> + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> <feComposite - result="composite1" - operator="in" - in="flood" + in2="fbSourceGraphic" id="feComposite6917" - in2="fbSourceGraphic" /> + in="flood" + operator="in" + result="composite1" /> <feGaussianBlur - result="blur" - stdDeviation="1" + id="feGaussianBlur6919" in="composite1" - id="feGaussianBlur6919" /> + stdDeviation="1" + result="blur" /> <feOffset - result="offset" - dy="0" + id="feOffset6921" dx="2.77556e-017" - id="feOffset6921" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" - in="fbSourceGraphic" + in2="offset" id="feComposite6923" - in2="offset" /> + in="fbSourceGraphic" + operator="over" + result="composite2" /> </filter> <filter - id="filter5135" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter5135"> <feFlood - id="feFlood5125" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood5125" /> <feComposite - id="feComposite5127" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5127" /> <feGaussianBlur - id="feGaussianBlur5129" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5129" /> <feOffset - id="feOffset5131" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset5131" /> <feComposite - id="feComposite5133" - result="fbSourceGraphic" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="fbSourceGraphic" + id="feComposite5133" /> <feColorMatrix - id="feColorMatrix6925" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + result="fbSourceGraphicAlpha" in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6925" /> <feFlood - in="fbSourceGraphic" - result="flood" + id="feFlood6927" + flood-opacity="1" flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> + <feComposite + in2="fbSourceGraphic" + id="feComposite6929" + in="flood" + operator="in" + result="composite1" /> + <feGaussianBlur + id="feGaussianBlur6931" + in="composite1" + stdDeviation="1" + result="blur" /> + <feOffset + id="feOffset6933" + dx="2.77556e-017" + dy="0" + result="offset" /> + <feComposite + in2="offset" + id="feComposite6935" + in="fbSourceGraphic" + operator="over" + result="composite2" /> + </filter> + <filter + style="color-interpolation-filters:sRGB;" + id="filter5147"> + <feFlood flood-opacity="1" - id="feFlood6927" /> + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood5137" /> <feComposite + in="flood" + in2="SourceGraphic" + operator="out" result="composite1" + id="feComposite5139" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur5141" /> + <feOffset + dx="2.77556e-017" + dy="0" + result="offset" + id="feOffset5143" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="fbSourceGraphic" + id="feComposite5145" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6937" /> + <feFlood + id="feFlood6939" + flood-opacity="1" + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> + <feComposite + in2="fbSourceGraphic" + id="feComposite6941" + in="flood" operator="in" + result="composite1" /> + <feGaussianBlur + id="feGaussianBlur6943" + in="composite1" + stdDeviation="1" + result="blur" /> + <feOffset + id="feOffset6945" + dx="2.77556e-017" + dy="0" + result="offset" /> + <feComposite + in2="offset" + id="feComposite6947" + in="fbSourceGraphic" + operator="over" + result="composite2" /> + </filter> + <filter + style="color-interpolation-filters:sRGB;" + id="filter5159"> + <feFlood + flood-opacity="1" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood5149" /> + <feComposite in="flood" - id="feComposite6929" - in2="fbSourceGraphic" /> + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite5151" /> <feGaussianBlur + in="composite1" + stdDeviation="0.5" result="blur" + id="feGaussianBlur5153" /> + <feOffset + dx="2.77556e-017" + dy="0" + result="offset" + id="feOffset5155" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="fbSourceGraphic" + id="feComposite5157" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6949" /> + <feFlood + id="feFlood6951" + flood-opacity="1" + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> + <feComposite + in2="fbSourceGraphic" + id="feComposite6953" + in="flood" + operator="in" + result="composite1" /> + <feGaussianBlur + id="feGaussianBlur6955" + in="composite1" stdDeviation="1" + result="blur" /> + <feOffset + id="feOffset6957" + dx="2.77556e-017" + dy="0" + result="offset" /> + <feComposite + in2="offset" + id="feComposite6959" + in="fbSourceGraphic" + operator="over" + result="composite2" /> + </filter> + <filter + style="color-interpolation-filters:sRGB;" + id="filter5171"> + <feFlood + flood-opacity="1" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood5161" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite5163" /> + <feGaussianBlur in="composite1" - id="feGaussianBlur6931" /> + stdDeviation="0.5" + result="blur" + id="feGaussianBlur5165" /> <feOffset - result="offset" + dx="2.77556e-017" dy="0" + result="offset" + id="feOffset5167" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="fbSourceGraphic" + id="feComposite5169" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix6961" /> + <feFlood + id="feFlood6963" + flood-opacity="1" + flood-color="rgb(255,255,255)" + result="flood" + in="fbSourceGraphic" /> + <feComposite + in2="fbSourceGraphic" + id="feComposite6965" + in="flood" + operator="in" + result="composite1" /> + <feGaussianBlur + id="feGaussianBlur6967" + in="composite1" + stdDeviation="1" + result="blur" /> + <feOffset + id="feOffset6969" dx="2.77556e-017" - id="feOffset6933" /> + dy="0" + result="offset" /> <feComposite - result="composite2" - operator="over" + in2="offset" + id="feComposite6971" in="fbSourceGraphic" - id="feComposite6935" - in2="offset" /> + operator="over" + result="composite2" /> </filter> + <radialGradient + xlink:href="#linearGradient4635" + id="radialGradient4669-9" + cx="10.529827" + cy="14.778796" + fx="10.529827" + fy="14.778796" + r="7.1399999" + gradientTransform="matrix(1,0,0,1.1087088,0,-1.2351844)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter5147" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB" + id="filter4701"> <feFlood - id="feFlood5137" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4691" /> <feComposite - id="feComposite5139" + in="flood" + in2="SourceGraphic" + operator="out" result="composite1" + id="feComposite4693" /> + <feGaussianBlur + in="composite1" + stdDeviation="1" + result="blur" + id="feGaussianBlur4695" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4697" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4699" /> + </filter> + <radialGradient + xlink:href="#linearGradient4635" + id="radialGradient4637-5" + cx="11.063469" + cy="38.79744" + fx="11.063469" + fy="38.79744" + r="8.7600002" + gradientTransform="matrix(1,0,0,1.0853313,0,-3.029369)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4661"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4651" /> + <feComposite + in="flood" + in2="SourceGraphic" operator="out" + result="composite1" + id="feComposite4653" /> + <feGaussianBlur + in="composite1" + stdDeviation="1" + result="blur" + id="feGaussianBlur4655" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4657" /> + <feComposite + in="offset" in2="SourceGraphic" - in="flood" /> + operator="atop" + result="composite2" + id="feComposite4659" /> + </filter> + <radialGradient + xlink:href="#linearGradient4635" + id="radialGradient4677-0" + cx="34.841751" + cy="14.552581" + fx="34.841751" + fy="14.552581" + r="7.1399999" + gradientTransform="matrix(1,0,0,1.1003056,0,-1.1335797)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4689"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4679" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4681" /> <feGaussianBlur - id="feGaussianBlur5141" + in="composite1" + stdDeviation="1" result="blur" - stdDeviation="0.5" - in="composite1" /> + id="feGaussianBlur4683" /> <feOffset - id="feOffset5143" + dx="0" + dy="0" result="offset" + id="feOffset4685" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4687" /> + </filter> + <radialGradient + xlink:href="#linearGradient4603" + id="radialGradient4605-8" + cx="58.062626" + cy="12.761739" + fx="58.062626" + fy="12.761739" + r="7.6799994" + gradientTransform="matrix(1,0,0,0.99218759,0,0.09141507)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4629"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4619" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4621" /> + <feGaussianBlur + in="composite1" + stdDeviation="1" + result="blur" + id="feGaussianBlur4623" /> + <feOffset + dx="0" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4625" /> <feComposite - id="feComposite5145" - result="fbSourceGraphic" + in="offset" + in2="SourceGraphic" operator="atop" + result="composite2" + id="feComposite4627" /> + </filter> + <radialGradient + xlink:href="#linearGradient4523-3" + id="radialGradient4525-6" + cx="79.305222" + cy="13.939252" + fx="79.305222" + fy="13.939252" + r="7.8000002" + gradientTransform="matrix(1,0,0,1.0769231,0,-0.86932835)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4597"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4587" /> + <feComposite + in="flood" in2="SourceGraphic" - in="offset" /> - <feColorMatrix - id="feColorMatrix6937" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" - in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + operator="out" + result="composite1" + id="feComposite4589" /> + <feGaussianBlur + in="composite1" + stdDeviation="1" + result="blur" + id="feGaussianBlur4591" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4593" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4595" /> + </filter> + <radialGradient + xlink:href="#linearGradient4527" + id="radialGradient4529-9" + cx="103.23091" + cy="12.664675" + fx="103.23091" + fy="12.664675" + r="9.5995998" + gradientTransform="matrix(1,0,0,0.87507716,0,1.3868386)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4783"> <feFlood - in="fbSourceGraphic" + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" result="flood" - flood-color="rgb(255,255,255)" - flood-opacity="1" - id="feFlood6939" /> + id="feFlood4773" /> <feComposite + in="flood" + in2="SourceGraphic" + operator="out" result="composite1" - operator="in" + id="feComposite4775" /> + <feGaussianBlur + in="composite1" + stdDeviation="1" + result="blur" + id="feGaussianBlur4777" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4779" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4781" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4709-11" + cx="125.30523" + cy="16.659737" + fx="125.30523" + fy="16.659737" + r="8.3726959" + gradientTransform="matrix(1,0,0,1.0032611,0,-0.03620244)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4721"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4711" /> + <feComposite in="flood" - id="feComposite6941" - in2="fbSourceGraphic" /> + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4713" /> <feGaussianBlur + in="composite1" + stdDeviation="1" result="blur" + id="feGaussianBlur4715" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4717" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4719" /> + </filter> + <radialGradient + xlink:href="#linearGradient4727" + id="radialGradient4729-5" + cx="149.26262" + cy="12.784631" + fx="149.26262" + fy="12.784631" + r="8.6400051" + gradientTransform="matrix(1,0,0,0.993055,0,0.07848724)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4741"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4731" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4733" /> + <feGaussianBlur + in="composite1" stdDeviation="1" + result="blur" + id="feGaussianBlur4735" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4737" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4739" /> + </filter> + <radialGradient + xlink:href="#linearGradient5023" + id="radialGradient5017-9" + cx="466.94476" + cy="12.037849" + fx="466.94476" + fy="12.037849" + r="9.6007004" + gradientTransform="matrix(0.79035186,0,0,0.79508811,-0.14216924,6.9389816e-4)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4793-8" + cx="194.44176" + cy="13.746766" + fx="194.44176" + fy="13.746766" + r="9.5999947" + gradientTransform="matrix(1,0,0,0.87500048,0,1.3876528)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4805"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4795" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4797" /> + <feGaussianBlur in="composite1" - id="feGaussianBlur6943" /> + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4799" /> <feOffset + dx="0" + dy="0" result="offset" + id="feOffset4801" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4803" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4833-4" + cx="239.2" + cy="11.101265" + fx="239.2" + fy="11.101265" + r="9.6000004" + gradientTransform="matrix(1,0,0,0.87500002,0,1.3876579)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4853"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4843" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4845" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4847" /> + <feOffset + dx="0" dy="0" - dx="2.77556e-017" - id="feOffset6945" /> + result="offset" + id="feOffset4849" /> <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" result="composite2" - operator="over" - in="fbSourceGraphic" - id="feComposite6947" - in2="offset" /> + id="feComposite4851" /> </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4841-0" + cx="242.26164" + cy="12.423289" + fx="242.26164" + fy="12.423289" + r="3.5288758" + gradientTransform="matrix(0.79274531,0,0,0.78327977,-0.14435628,0.11758726)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient8829" + cx="242.26164" + cy="12.423289" + fx="242.26164" + fy="12.423289" + r="3.5288758" + gradientTransform="matrix(0.79274531,0,0,0.78327977,-0.14435628,0.11758726)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + xlink:href="#linearGradient5037" + id="radialGradient5031-1" + cx="466.39926" + cy="31.105829" + fx="466.39926" + fy="31.105829" + r="9.7507105" + gradientTransform="matrix(1,0,0,0.99992718,0,0.00247197)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter5159" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB" + id="filter5049"> <feFlood - id="feFlood5149" + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" result="flood" + id="feFlood5039" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite5041" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur5043" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset5045" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite5047" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4813-2" + cx="217.95329" + cy="16.56296" + fx="217.95329" + fy="16.56296" + r="10.35937" + gradientTransform="matrix(1,0,0,0.8160434,0,2.0506693)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4825"> + <feFlood + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood4815" /> <feComposite - id="feComposite5151" + in="flood" + in2="SourceGraphic" + operator="out" result="composite1" + id="feComposite4817" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4819" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4821" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4823" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4861-6" + cx="262.79288" + cy="15.840806" + fx="262.79288" + fy="15.840806" + r="8.5577164" + gradientTransform="matrix(1,0,0,0.9969072,0,0.03528241)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4873"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4863" /> + <feComposite + in="flood" + in2="SourceGraphic" operator="out" + result="composite1" + id="feComposite4865" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4867" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4869" /> + <feComposite + in="offset" in2="SourceGraphic" - in="flood" /> + operator="atop" + result="composite2" + id="feComposite4871" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4881-9" + cx="286.58698" + cy="14.171478" + fx="286.58698" + fy="14.171478" + r="8.53125" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4893"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4883" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4885" /> <feGaussianBlur - id="feGaussianBlur5153" + in="composite1" + stdDeviation="0.5" result="blur" + id="feGaussianBlur4887" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4889" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4891" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4901-6" + cx="308.97141" + cy="14.457072" + fx="308.97141" + fy="14.457072" + r="6.09375" + gradientTransform="matrix(1,0,0,1.4,0,-4.4901397)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4913"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4903" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4905-1" /> + <feGaussianBlur + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4907" /> <feOffset - id="feOffset5155" + dx="0" + dy="0" result="offset" + id="feOffset4909" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4911-2" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4921-8" + cx="331.15933" + cy="13.119289" + fx="331.15933" + fy="13.119289" + r="8.53125" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4933"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4923" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4925" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4927" /> + <feOffset + dx="0" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4929" /> <feComposite - id="feComposite5157" - result="fbSourceGraphic" + in="offset" + in2="SourceGraphic" operator="atop" + result="composite2" + id="feComposite4931" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4941-9" + cx="353.15076" + cy="11.316628" + fx="353.15076" + fy="11.316628" + r="6.09375" + gradientTransform="matrix(0.79035186,0,0,0.15902921,-0.14216924,7.1987363)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + gradientTransform="matrix(0.79035186,0,0,0.79514603,-0.14216924,3.8580698e-5)" + xlink:href="#linearGradient4707" + id="radialGradient4949-5" + cx="375.97003" + cy="11.407905" + fx="375.97003" + fy="11.407905" + r="6.09375" + gradientUnits="userSpaceOnUse" /> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4957-2" + cx="400.5007" + cy="13.518586" + fx="400.5007" + fy="13.518586" + r="8.5350475" + gradientTransform="matrix(1,0,0,0.99701325,0,0.03407254)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4969"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4959" /> + <feComposite + in="flood" in2="SourceGraphic" - in="offset" /> - <feColorMatrix - id="feColorMatrix6949" - values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" - in="fbSourceGraphic" - result="fbSourceGraphicAlpha" /> + operator="out" + result="composite1" + id="feComposite4961" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4963" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4965" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4967" /> + </filter> + <radialGradient + xlink:href="#linearGradient4975" + id="radialGradient4977-4" + cx="417.02075" + cy="15.742972" + fx="417.02075" + fy="15.742972" + r="8.53125" + gradientTransform="matrix(1.357667,-0.02466618,0.02411975,1.3275908,-149.53429,5.1574131)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4989"> <feFlood - in="fbSourceGraphic" + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" result="flood" - flood-color="rgb(255,255,255)" - flood-opacity="1" - id="feFlood6951" /> + id="feFlood4979" /> <feComposite + in="flood" + in2="SourceGraphic" + operator="out" result="composite1" - operator="in" + id="feComposite4981" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4983" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset4985" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4987" /> + </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4997-5" + cx="444.33652" + cy="11.316628" + fx="444.33652" + fy="11.316628" + r="8.53125" + gradientTransform="matrix(1,0,0,0.71428563,0,3.2333231)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter5009"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4999" /> + <feComposite in="flood" - id="feComposite6953" - in2="fbSourceGraphic" /> + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite5001-8" /> <feGaussianBlur + in="composite1" + stdDeviation="0.5" result="blur" - stdDeviation="1" + id="feGaussianBlur5003" /> + <feOffset + dx="0" + dy="0" + result="offset" + id="feOffset5005" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite5007-3" /> + </filter> + <radialGradient + xlink:href="#linearGradient4747" + id="radialGradient4710-4" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="134.97461" + cy="9" + fx="134.97461" + fy="9" + r="7.9746099" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4729"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4719" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4721" /> + <feGaussianBlur in="composite1" - id="feGaussianBlur6955" /> + stdDeviation="1" + result="blur" + id="feGaussianBlur4723" /> <feOffset + dx="2.77556e-017" + dy="0" result="offset" + id="feOffset4725" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4727" /> + </filter> + <radialGradient + xlink:href="#linearGradient5037" + id="radialGradient4712-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="132.6468" + cy="9.0947113" + fx="132.6468" + fy="9.0947113" + r="7.9746099" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4774"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4764" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4766" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4768" /> + <feOffset + dx="2.77556e-017" dy="0" + result="offset" + id="feOffset4770" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite4772" /> + </filter> + <radialGradient + xlink:href="#linearGradient4747" + id="radialGradient4714-4" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="134.97461" + cy="9" + fx="134.97461" + fy="9" + r="7.9746099" /> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient4750-3" + cx="166.37157" + cy="11.485105" + fx="166.37157" + fy="11.485105" + r="0.31640625" + gradientTransform="matrix(0.99998863,-0.00473886,0.08838422,18.426509,-1.0132111,-199.35688)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + xlink:href="#linearGradient4832" + id="radialGradient4709-1-2" + cx="125.30523" + cy="16.659737" + fx="125.30523" + fy="16.659737" + r="8.3726959" + gradientTransform="matrix(1,0,0,1.0032611,0.11563445,22.233158)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="filter4844"> + <feFlood + flood-opacity="0.498039" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4834" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite4836" /> + <feGaussianBlur + in="composite1" + stdDeviation="0.5" + result="blur" + id="feGaussianBlur4838" /> + <feOffset dx="2.77556e-017" - id="feOffset6957" /> + dy="0" + result="offset" + id="feOffset4840" /> <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" result="composite2" - operator="over" - in="fbSourceGraphic" - id="feComposite6959" - in2="offset" /> + id="feComposite4842" /> </filter> + <radialGradient + xlink:href="#linearGradient4707" + id="radialGradient9039" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.79274531,0,0,0.78327977,-0.14435628,0.11758726)" + cx="242.26164" + cy="12.423289" + fx="242.26164" + fy="12.423289" + r="3.5288758" /> <filter - id="filter5171" + id="filter10217" style="color-interpolation-filters:sRGB;"> <feFlood - id="feFlood5161" + id="feFlood10207" result="flood" flood-color="rgb(0,0,0)" flood-opacity="1" /> <feComposite - id="feComposite5163" + id="feComposite10209" result="composite1" operator="out" in2="SourceGraphic" in="flood" /> <feGaussianBlur - id="feGaussianBlur5165" + id="feGaussianBlur10211" result="blur" stdDeviation="0.5" in="composite1" /> <feOffset - id="feOffset5167" + id="feOffset10213" result="offset" dy="0" dx="2.77556e-017" /> <feComposite - id="feComposite5169" + id="feComposite10215" result="fbSourceGraphic" operator="atop" in2="SourceGraphic" in="offset" /> <feColorMatrix - id="feColorMatrix6961" + id="feColorMatrix10219" values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" in="fbSourceGraphic" result="fbSourceGraphicAlpha" /> @@ -2003,172 +3047,172 @@ result="flood" flood-color="rgb(255,255,255)" flood-opacity="1" - id="feFlood6963" /> + id="feFlood10221" /> <feComposite result="composite1" operator="in" in="flood" - id="feComposite6965" + id="feComposite10223" in2="fbSourceGraphic" /> <feGaussianBlur result="blur" stdDeviation="1" in="composite1" - id="feGaussianBlur6967" /> + id="feGaussianBlur10225" /> <feOffset result="offset" dy="0" dx="2.77556e-017" - id="feOffset6969" /> + id="feOffset10227" /> <feComposite result="composite2" operator="over" in="fbSourceGraphic" - id="feComposite6971" + id="feComposite10229" in2="offset" /> </filter> </defs> <g - id="layer1"> + style="filter:url(#filter10217)" + id="g7757"> <path - id="path4" - d="m 17.311578,13.702319 h -5.76 l 2.28,2.28 c 0.6,0.6 0.72,1.44 0.24,1.92 l -0.96,1.08 c -0.48,0.48 -1.32,0.36 -1.92,-0.24 l -6.4800001,-6.6 c -0.12,0 -0.36,-0.48 -0.48,-0.84 0,-0.359999 0.36,-0.719999 0.48,-0.839999 l 6.3600001,-6.48 c 0.6,-0.6000001 1.44,-0.7200001 1.92,-0.24 l 0.96,1.0799999 c 0.48,0.48 0.36,1.32 -0.24,1.9200001 l -2.16,2.1599999 h 5.76 c 0.72,0 1.2,0.48 1.2,1.2000001 v 2.399999 c 0,0.72 -0.48,1.2 -1.2,1.2 z" - style="display:inline;fill:url(#radialGradient4669);fill-opacity:1;stroke-width:1;filter:url(#filter4883)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4669-9);fill-opacity:1;stroke-width:1;filter:url(#filter4701)" + d="m 17.870749,13.841269 -6.303534,-0.0074 2.264363,2.148431 c 0.615648,0.584128 0.72,1.44 0.24,1.92 l -0.96,1.08 c -0.48,0.48 -1.32,0.36 -1.92,-0.24 0,0 -6.4200001,-6.6 -6.4800001,-6.6 -0.06,0 -0.36,-0.48 -0.48,-0.84 0,-0.359999 0.36,-0.719999 0.48,-0.839999 l 6.3600001,-6.48 c 0.6,-0.6000001 1.44,-0.7200001 1.92,-0.24 l 0.96,1.0799999 c 0.48,0.48 0.36,1.32 -0.24,1.9200001 l -2.144363,2.0610645 6.359451,0.043374 c 0.719983,0.00491 1.227959,0.50779 1.227959,1.2277905 v 2.483369 c 0,0.72 -0.563877,1.284215 -1.283876,1.28337 z" + id="path4" /> <path - d="m 19.271765,37.987692 h -7.987059 l 3.607059,3.507571 c 0.515294,0.50108 0.644117,1.377974 0.257648,1.753785 l -1.545884,1.503245 C 13.217059,45.128104 12.315294,45.128104 11.8,44.501752 L 3.5552941,36.609718 c 0,0 -0.5152941,-0.626352 -0.5152941,-1.127434 0,-0.501081 0.5152941,-1.002163 0.5152941,-1.002163 L 11.8,26.462816 c 0.515294,-0.50108 1.417059,-0.626351 1.803529,-0.25054 l 1.545884,1.503245 c 0.386469,0.375811 0.386469,1.252704 -0.257648,1.753785 l -3.478236,3.50757 h 7.858236 c 0.772941,0 1.288236,0.501082 1.288236,1.252705 v 2.505407 c 0,0.751622 -0.515295,1.252704 -1.288236,1.252704 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4637-5);fill-opacity:1;stroke-width:1;filter:url(#filter4661)" id="path4154" - style="display:inline;fill:url(#radialGradient4637);fill-opacity:1;stroke-width:1;filter:url(#filter4895)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 19.187889,37.765372 -7.620674,-0.0365 3.352509,3.266174 c 0.515294,0.50108 0.829738,1.388534 0.443269,1.764345 l -1.759464,1.992905 c -0.356609,0.403923 -1.52102,-0.108922 -2.036314,-0.735274 L 3.9756591,36.471238 c 0,0 -0.7399492,-0.710192 -0.7399492,-1.211274 0,-0.501081 0.7399492,-1.303987 0.7399492,-1.303987 l 7.5915559,-7.545783 c 0.515294,-0.50108 1.613776,-1.093109 1.980397,-0.698138 l 1.815381,1.955768 c 0.386469,0.375811 0.172889,1.300401 -0.471228,1.801482 l -3.32455,3.229041 7.620674,0.02842 c 0.772936,0.0029 1.344153,0.417712 1.344153,1.169335 v 2.560987 c 0,0.751622 -0.571221,1.311987 -1.344153,1.308283 z" /> <path - d="m 26.86,12.501265 v -2.4 c 0,-0.7200003 0.48,-1.2000003 1.2,-1.2000003 h 5.76 L 31.66,6.7412646 c -0.6,-0.5999999 -0.72,-1.4399999 -0.24,-1.92 l 0.96,-1.08 c 0.48,-0.48 1.32,-0.36 1.92,0.24 l 6.36,6.4800004 c 0.12,0.12 0.48,0.48 0.48,0.84 0,0.36 -0.36,0.84 -0.48,0.84 l -6.48,6.48 c -0.6,0.6 -1.44,0.72 -1.92,0.24 l -0.96,-1.08 c -0.48,-0.48 -0.36,-1.32 0.24,-1.92 l 2.28,-2.16 h -5.76 c -0.72,0 -1.2,-0.48 -1.2,-1.2 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4677-0);fill-opacity:1;stroke-width:1;filter:url(#filter4689)" id="path4165" - style="display:inline;fill:url(#radialGradient4677);fill-opacity:1;stroke-width:1;filter:url(#filter4907)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 26.776124,12.612425 v -2.53895 c 0,-0.7200003 0.480206,-1.3282747 1.2,-1.3111602 l 5.76,0.041051 L 31.66,6.7412646 c -0.602042,-0.5979755 -0.72,-1.4399999 -0.24,-1.92 l 0.96,-1.08 c 0.48,-0.48 1.32,-0.36 1.92,0.24 l 6.36,6.4800004 c 0.12,0.12 0.48,0.48 0.48,0.84 0,0.36 -0.36,0.84 -0.48,0.84 l -6.48,6.48 c -0.6,0.6 -1.44,0.72 -1.92,0.24 l -0.96,-1.08 c -0.48,-0.48 -0.36,-1.32 0.24,-1.92 L 33.736124,13.833888 28.06,13.868005 c -0.719987,0.0043 -1.283876,-0.53558 -1.283876,-1.25558 z" /> <path - d="m 64.48,6.6012647 -5.039999,5.0400003 5.039999,5.04 -2.519999,2.52 -5.16,-4.92 -5.04,5.04 -2.52,-2.52 5.04,-5.16 -5.16,-5.0400003 2.52,-2.5200001 5.16,5.04 5.04,-5.04 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4605-8);fill-opacity:1;stroke-width:1;filter:url(#filter4629)" id="path4176" - style="display:inline;fill:url(#radialGradient4605);fill-opacity:1;stroke-width:1;filter:url(#filter4919)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 64.708108,6.2881044 -5.061037,5.0305226 5.061037,5.030522 -2.530518,2.515261 -5.061038,-5.030522 -5.061037,5.030522 -2.530519,-2.515261 5.061037,-5.030522 -5.061037,-5.0305226 2.530519,-2.5152612 5.061037,5.0305223 5.061038,-5.0305223 z" /> <path - d="m 87.000001,11.301265 h -8.4 l 3.36,-3.3600004 c -0.84,-0.6 -1.68,-0.84 -2.76,-0.84 -2.64,0 -4.8,2.1600001 -4.8,4.8000004 0,2.64 2.16,4.8 4.8,4.8 1.68,0 3.24,-0.84 4.08,-2.28 l 2.76,1.2 c -1.32,2.4 -3.84,4.08 -6.84,4.08 -4.32,0 -7.8,-3.48 -7.8,-7.8 0,-4.3200004 3.48,-7.8000004 7.8,-7.8000004 1.8,0 3.48,0.6 4.92,1.6800001 l 2.88,-2.8800001 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4525-6);fill-opacity:1;stroke-width:1;filter:url(#filter4597)" id="path4187" - style="display:inline;fill:url(#radialGradient4525);fill-opacity:1;stroke-width:1;filter:url(#filter4931)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 87.482777,11.318627 h -8.856816 l 3.13833,-3.0716727 C 81.15648,7.545735 80.363876,6.712205 79.283876,6.712205 c -2.64,0 -5.107543,1.9376803 -5.107543,4.577681 0,2.64 2.411627,5.050109 5.051627,5.050109 1.68,0 3.619039,-1.066107 4.459039,-2.506107 l 2.530518,1.25763 c -1.32,2.4 -3.961599,4.443007 -6.961599,4.443007 -4.32,0 -8.219378,-3.896849 -8.219378,-8.216849 0,-4.3200008 3.927337,-7.633261 8.247337,-7.633261 1.8,0 3.619792,0.8778997 5.059792,1.9578998 l 3.139108,-3.1271021 z" /> <path - id="path4209" - d="M 102.59961,2.7011715 93,11.101561 h 2.400391 l 1.242188,-0.03516 -0.04297,0.03516 v 8.400392 h 4.800781 v -6.000001 h 2.40039 v 6.000001 h 4.79884 v -8.400392 l -0.043,-0.03516 1.24415,0.03516 h 2.39843 z" - style="display:inline;fill:url(#radialGradient4529);fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1;filter:url(#filter4943)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4529-9);fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1;filter:url(#filter4783)" + d="M 102.66589,2.5152127 92.543814,11.318627 h 3.795778 v 7.545783 h 5.061038 v -5.030522 h 2.53052 v 5.030522 h 5.06104 v -7.545783 h 3.79577 z" + id="path4209" /> <path - d="m 133.15407,12.421265 -6.72001,6.6 c -0.24,0.36 -0.72,0.48 -1.2,0.48 -0.48,0 -0.96,-0.12 -1.32,-0.48 l -6.72,-6.6 c -0.6,-0.72 -0.48,-1.32 0.48,-1.32 h 3.96 V 3.9012646 c 0,-0.72 0.48,-1.2 1.2,-1.2 h 4.8 c 0.72,0 1.2,0.48 1.2,1.2 v 7.2000004 h 3.84 c 0.96001,0 1.20001,0.6 0.48001,1.32 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4709-11);fill-opacity:1;stroke-width:1;filter:url(#filter4721)" id="path4214" - style="display:inline;fill:url(#radialGradient4709);fill-opacity:1;stroke-width:1;filter:url(#filter4955)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 133.03211,12.576257 -6.32629,6.288153 c -0.24,0.36 -0.82401,0.692435 -1.30401,0.692435 -0.48,0 -0.86651,-0.332435 -1.22651,-0.692435 l -6.3263,-6.288153 c -0.79571,-0.72 -0.93921,-1.286268 0.0208,-1.280462 l 3.77501,0.02283 -0.0107,-7.5841022 c -0.001,-0.7199993 0.50796,-1.1722101 1.22796,-1.1722101 h 5.10754 c 0.72,0 1.22426,0.4800094 1.22796,1.2 l 0.0388,7.5563123 3.80118,-0.05062 c 0.95992,-0.01278 0.71459,0.588252 -0.005,1.308252 z" /> <path - d="m 148,19.881265 c -4.8,0 -8.64,-3.84 -8.64,-8.64 0,-4.6800004 3.84,-8.5200004 8.64,-8.5200004 4.8,0 8.64001,3.84 8.64001,8.6400004 0,4.68 -3.84001,8.52 -8.64001,8.52 z m 0,-14.5200003 c -3.36,0 -6,2.6399999 -6,6.0000003 0,3.24 2.64,6 6,6 3.36,0 6.00001,-2.64 6.00001,-6 0,-3.3600004 -2.64001,-6.0000003 -6.00001,-6.0000003 z m -0.36,7.0800003 c -0.48,-0.12 -0.84,-0.6 -0.84,-1.08 V 7.7612646 c 0,-0.72 0.48,-1.2 1.2,-1.2 0.72,0 1.2,0.48 1.2,1.2 v 3.3600004 c 1.32,1.32 2.4,3.84 2.4,3.84 0,0 -2.64,-1.2 -3.96,-2.52 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4729-5);fill-opacity:1;stroke-width:1;filter:url(#filter4741)" id="path4225" - style="display:inline;fill:url(#radialGradient4729);fill-opacity:1;stroke-width:1;filter:url(#filter4967)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 148.19571,20.103585 c -4.8,0 -8.89163,-3.97895 -8.89163,-8.77895 0,-4.6800005 4.11959,-8.7145303 8.91959,-8.7145303 4.8,0 8.80776,3.9511599 8.80776,8.7511603 0,4.68 -4.03572,8.74232 -8.83572,8.74232 z m 0.0559,-15.04801 c -3.36,0 -6.39142,2.9178996 -6.39142,6.2779 0,3.24 2.9755,6.22232 6.3355,6.22232 3.36,0 6.33551,-2.86232 6.33551,-6.22232 0,-3.3600004 -2.91959,-6.2779 -6.27959,-6.2779 z m -0.63959,7.520682 c -0.48,-0.12 -0.63716,-0.735044 -0.64429,-1.214992 l -0.0559,-3.7667402 c -0.0107,-0.7199217 0.53592,-1.28337 1.25592,-1.28337 0.72,0 1.27834,0.535601 1.28388,1.25558 l 0.0289,3.7518922 c 1.32,1.32 2.53051,3.772891 2.53051,3.772891 0,0 -3.07896,-1.195261 -4.39896,-2.515261 z" /> <path - d="m 369.00476,4.7878231 0.94842,1.9083504 0.47422,0.858758 0.94842,0.190835 2.18136,0.3816699 -1.61231,1.7175156 -0.6639,0.667923 0.0948,0.954175 0.37937,2.290022 -1.89685,-0.954178 -0.85358,-0.477086 -0.85358,0.477086 -1.89685,0.954178 0.37938,-2.290022 0.0948,-0.954175 -0.6639,-0.667923 -1.61232,-1.7175156 2.27622,-0.3816699 0.94842,-0.190835 0.37936,-0.858758 0.94843,-1.9083504 m 0,-3.4350309 c -0.28454,0 -0.56906,0.1908348 -0.75874,0.667922 l -1.89683,3.9121193 -4.07821,0.6679227 c -0.94842,0.190835 -1.13812,0.8587576 -0.47421,1.5266802 l 2.94011,3.1487776 -0.66391,4.389208 c -0.0948,0.572504 0.1897,0.954174 0.66391,0.954174 0.18967,0 0.37936,-0.09542 0.56905,-0.190835 l 3.69885,-2.003768 3.69884,2.003768 c 0.18969,0.09543 0.47421,0.190835 0.56906,0.190835 0.4742,0 0.75873,-0.38167 0.6639,-1.049592 l -0.6639,-4.389207 2.9401,-3.1487781 c 0.66391,-0.6679226 0.37938,-1.3358454 -0.4742,-1.5266803 L 371.66031,5.837416 369.76347,1.9252968 C 369.5738,1.543627 369.28926,1.3527922 369.00474,1.3527922 Z" + style="display:inline;fill:url(#radialGradient5017-9);fill-opacity:1;stroke-width:0.79274529" id="path4355" - style="display:inline;fill:url(#radialGradient5017);fill-opacity:1;stroke-width:0.79274529;filter:url(#filter4979)" /> + d="m 369.00476,4.7878231 0.94842,1.9083504 0.47422,0.858758 0.94842,0.190835 2.18136,0.3816699 -1.61231,1.7175156 -0.6639,0.667923 0.0948,0.954175 0.37937,2.290022 -1.89685,-0.954178 -0.85358,-0.477086 -0.85358,0.477086 -1.89685,0.954178 0.37938,-2.290022 0.0948,-0.954175 -0.6639,-0.667923 -1.61232,-1.7175156 2.27622,-0.3816699 0.94842,-0.190835 0.37936,-0.858758 0.94843,-1.9083504 m 0,-3.4350309 c -0.28454,0 -0.56906,0.1908348 -0.75874,0.667922 l -1.89683,3.9121193 -4.07821,0.6679227 c -0.94842,0.190835 -1.13812,0.8587576 -0.47421,1.5266802 l 2.94011,3.1487776 -0.66391,4.389208 c -0.0948,0.572504 0.1897,0.954174 0.66391,0.954174 0.18967,0 0.37936,-0.09542 0.56905,-0.190835 l 3.69885,-2.003768 3.69884,2.003768 c 0.18969,0.09543 0.47421,0.190835 0.56906,0.190835 0.4742,0 0.75873,-0.38167 0.6639,-1.049592 l -0.6639,-4.389207 2.9401,-3.1487781 c 0.66391,-0.6679226 0.37938,-1.3358454 -0.4742,-1.5266803 L 371.66031,5.837416 369.76347,1.9252968 C 369.5738,1.543627 369.28926,1.3527922 369.00474,1.3527922 Z" /> <path - d="m 202,17.101265 h -2.4 l 1.2,2.4 h -14.39999 l 1.2,-2.4 h -2.4 c -0.72,0 -1.2,-0.48 -1.2,-1.2 V 9.9012647 c 0,-0.7200001 0.48,-1.2000001 1.2,-1.2000001 h 1.2 V 6.3012647 c 0,-0.7200001 0.48,-1.2000001 1.2,-1.2000001 v -1.2 c 0,-0.72 0.48,-1.2 1.2,-1.2 H 198.4 c 0.72,0 1.2,0.48 1.2,1.2 v 1.2 c 0.72,0 1.2,0.48 1.2,1.2000001 v 2.3999999 h 1.2 c 0.72,0 1.2,0.48 1.2,1.2000001 v 6.0000003 c 0,0.72 -0.48,1.2 -1.2,1.2 z m -14.39999,0 0.6,-1.2 h -0.6 z m 0.6,-6 h -0.6 -0.6 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z M 198.4,5.1012646 c 0,-0.72 -0.48,-1.2 -1.2,-1.2 h -7.19999 c -0.72,0 -1.2,0.48 -1.2,1.2 v 3.6 c 0,0.7200001 0.48,1.2000001 1.2,1.2000001 H 197.2 c 0.72,0 1.2,-0.48 1.2,-1.2000001 z m -1.08,10.8000004 h -7.43999 l -1.08,2.4 H 198.4 Z m 2.28,0 H 199 l 0.6,1.2 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4793-8);fill-opacity:1;stroke-width:1;filter:url(#filter4805)" id="path4366" - style="display:inline;fill:url(#radialGradient4793);fill-opacity:1;stroke-width:1;filter:url(#filter4991)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 202.62125,17.648005 -2.53039,-0.04122 1.26526,2.515261 h -15.18311 l 1.26526,-2.515261 -2.51784,0.02249 c -0.71997,0.0064 -1.31817,-0.563397 -1.31184,-1.28337 l 0.0559,-6.3612693 c 0.006,-0.7199727 0.59192,-1.2112687 1.31183,-1.2000001 l 1.19667,0.018731 0.0313,-2.5298907 c 0.009,-0.7199457 0.51397,-1.243001 1.23397,-1.243001 l 0.022,-1.2403691 c 0.0127,-0.7198886 0.6198,-1.2535885 1.33979,-1.2555799 l 10.04733,-0.02779 c 0.72,-0.00199 1.21931,0.5078413 1.22796,1.22779 l 0.0156,1.295949 c 0.72,0 1.2692,0.5785813 1.26831,1.2985809 l -0.003,2.4743108 1.26513,-1e-7 c 0.71992,-0.010711 1.26205,0.5376375 1.26526,1.2576305 v 6.288153 c 0,0.729621 -0.61509,1.257631 -1.26526,1.257631 z m -15.18298,-0.04122 1.26526,-2.515262 h -1.26526 z m 0.6,-6.288153 h -0.6 -0.6 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.25348,-0.503016 -0.6,-0.6 z M 198.8256,5.0304738 c 0,-0.72 -0.54528,-1.2523398 -1.26526,-1.2576306 h -7.59155 c -0.71998,-0.00529 -1.28117,0.5378043 -1.26526,1.2576306 v 3.7728917 c 0.0159,0.7198264 0.54528,1.2629215 1.26526,1.2576305 h 7.59155 c 0.71999,-0.0053 1.24942,-0.5078188 1.25592,-1.2277899 z m -1.26526,10.0610482 h -7.59155 l -1.26526,3.772892 h 10.12207 z m 2.53052,0 h -1.26526 l 1.26526,2.515262 z" /> <path - d="m 247,19.501265 h -15.6 c -0.96,0 -1.8,-0.84 -1.8,-1.8 V 4.5012646 c 0,-0.9599999 0.84,-1.8 1.8,-1.8 H 247 c 0.96,0 1.8,0.8400001 1.8,1.8 V 17.701265 c 0,0.96 -0.84,1.8 -1.8,1.8 z M 239.8,3.9012646 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 2.28,0 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.36,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 3.72,0 h -1.2 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 0.6,4.8 c 0,-0.72 -0.48,-1.1999999 -1.2,-1.1999999 h -12 c -0.72,0 -1.2,0.4799999 -1.2,1.1999999 v 7.2000004 c 0,0.72 0.48,1.2 1.2,1.2 h 12 c 0.72,0 1.2,-0.48 1.2,-1.2 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4833-4);fill-opacity:1;stroke-width:1;filter:url(#filter4853)" id="path4388" - style="display:inline;fill:url(#radialGradient4833);fill-opacity:1;stroke-width:1;filter:url(#filter5003)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> - <text - transform="scale(0.98484982,1.0153832)" - id="text4409" - y="12.608931" - x="188.06316" - style="font-style:normal;font-weight:normal;font-size:9.51294327px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:url(#radialGradient4841);fill-opacity:1;stroke:none;stroke-width:0.79274535px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter5015)" - xml:space="preserve"><tspan - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:8.55116463px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#radialGradient4841);fill-opacity:1;stroke-width:0.79274535px;" - y="12.608931" - x="188.06316" - id="tspan4411">+</tspan></text> + d="m 248.17426,18.945466 -16.43876,-0.02779 c -0.96,-0.0016 -1.40468,-0.339789 -1.40858,-1.299781 l -0.0559,-13.7557998 c -0.004,-0.959992 0.47654,-1.3847678 1.43653,-1.3831504 l 16.49468,0.02779 c 0.96,0.00162 1.24473,0.3675784 1.24083,1.3275705 l -0.0559,13.7557997 c -0.004,0.959992 -0.25287,1.356983 -1.21287,1.355361 z M 239.88388,3.8178947 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 2.64346,0 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.36,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 3.72,0 h -1.2 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 0.65592,4.9945298 c 0.005,-0.7199803 -0.53592,-1.2538267 -1.25592,-1.2555798 l -11.41287,-0.02779 c -0.72,-0.00175 -1.22533,0.5077946 -1.22796,1.2277899 l -0.028,7.6724304 c -0.003,0.719994 0.50796,1.175707 1.22795,1.172209 l 11.44083,-0.05558 c 0.71999,-0.0035 1.19464,-0.507809 1.2,-1.227789 z" /> + <g + aria-label="+" + transform="scale(0.98484984,1.0153832)" + style="font-style:normal;font-weight:normal;font-size:9.51294327px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:url(#radialGradient4841-0);fill-opacity:1;stroke:none;stroke-width:0.79274535px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="text4409"> + <path + d="m 194.95358,9.8484986 h -2.03077 v 1.9696994 h -1.01538 V 9.8484986 h -2.03077 V 8.8636487 h 2.03077 V 6.893949 h 1.01538 v 1.9696997 h 2.03077 z" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:8.55116463px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#radialGradient9039);fill-opacity:1;stroke-width:0.79274535px" + id="path7725" /> + </g> <path - style="display:inline;fill:url(#radialGradient5031);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5027)" - id="path6182" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" d="m 467.25784,24.196945 c -0.36562,0 -0.73125,0.24375 -0.975,0.853125 l -2.4375,4.996876 -5.24062,0.853125 c -1.21875,0.24375 -1.4625,1.096875 -0.60938,1.95 l 3.77813,4.021875 -0.85313,5.60625 c -0.12181,0.73125 0.24375,1.21875 0.85313,1.21875 0.24375,0 0.4875,-0.121875 0.73125,-0.24375 l 4.75312,-2.559375 4.75313,2.559375 c 0.24375,0.121875 0.60937,0.24375 0.73125,0.24375 0.60937,0 0.975,-0.4875 0.85312,-1.340625 l -0.85312,-5.60625 3.77812,-4.021875 c 0.85313,-0.853125 0.4875,-1.70625 -0.60937,-1.95 l -5.24063,-0.853125 -2.4375,-4.996876 c -0.24375,-0.4875 -0.60937,-0.73125 -0.975,-0.73125 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path6182" + style="display:inline;fill:url(#radialGradient5031-1);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5049)" /> <path - style="display:inline;fill:url(#radialGradient4813);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5039)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 226.66131,15.091518 -0.0388,3.707848 c -0.007,0.673061 -0.5177,1.245488 -1.19079,1.24654 l -17.77799,0.02779 c -0.6731,0.0011 -1.2416,-0.573462 -1.24671,-1.24654 l -0.028,-3.688049 c -0.005,-0.673078 0.6302,-1.305219 1.30331,-1.305219 1.26531,-1.257631 1.03718,-3.269047 1.26531,-5.0305225 0.4278,-2.8226251 0.0953,-6.2244545 3.80878,-6.2479747 l 7.52682,-0.047673 c 3.73297,-0.023644 3.4173,3.4730226 3.84751,6.2956477 0.41438,2.7153765 0,3.7728915 1.26526,5.0305225 0.70548,0 1.26526,0.515815 1.26526,1.25763 z m -7.68106,-4.410561 h -1.82811 V 8.8528316 c 0,-0.8124995 -1.21875,-0.8124995 -1.21875,0 v 1.8281254 h -1.82814 c -0.8125,0 -0.8125,1.218749 0,1.218749 h 1.82814 v 1.828125 c 0,0.812501 1.21875,0.812501 1.21875,0 v -1.828125 h 1.82811 c 0.8125,0 0.8125,-1.218749 0,-1.218749 z" id="path7318" - d="m 226.73438,15.945016 v 2.437501 c 0,0.673097 -0.54566,1.21875 -1.21875,1.21875 h -18.28124 c -0.67311,0 -1.21875,-0.545653 -1.21875,-1.21875 v -2.437501 c 0,-0.673097 0.54564,-1.21875 1.21875,-1.21875 h -1.04571 c 2.80313,0 2.36053,-3.256168 2.77368,-5.9703239 0.4278,-2.8226251 0.1927,-6.1069689 3.90598,-6.0616014 l 7.47091,0.091277 c 3.73276,0.045605 3.22143,3.1476992 3.65164,5.9703243 0.41438,2.715376 -0.20346,5.970324 2.60942,5.970324 h -1.08468 c 0.67309,0 1.21875,0.545653 1.21875,1.21875 z m -7.92188,-4.874999 h -1.82811 V 9.2418912 c 0,-0.8124995 -1.21875,-0.8124995 -1.21875,0 v 1.8281258 h -1.82814 c -0.8125,0 -0.8125,1.218749 0,1.218749 h 1.82814 v 1.828125 c 0,0.812501 1.21875,0.812501 1.21875,0 v -1.828125 h 1.82811 c 0.8125,0 0.8125,-1.218749 0,-1.218749 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4813-2);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4825)" /> <path - style="display:inline;fill:url(#radialGradient4861);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5051)" - id="path7886" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" d="m 269.02823,19.939154 c -0.975,0 -1.82813,-0.24375 -2.80313,-1.584375 -0.975,-1.340625 -2.07187,-3.046875 -2.07187,-3.046875 0,0 -0.85313,-1.096875 -1.34063,-1.95 -0.60937,-0.853125 -1.34062,-0.609375 -1.34062,-0.609375 0,0 -3.53438,-5.7281239 -4.14375,-6.581249 -0.73125,-1.21875 0.73125,-3.290625 0.73125,-3.290625 l 5.3625,8.531249 c 0,0 1.70625,2.315625 2.31562,2.803125 0.60938,0.4875 1.70625,-0.4875 3.4125,1.096875 2.31563,2.19375 1.58438,4.63125 -0.12181,4.63125 z m -0.36563,-3.534375 c -1.09687,-1.21875 -2.07187,-1.096875 -2.31562,-0.73125 -0.24375,0.365625 0,1.4625 0.4875,2.071875 0.4875,0.609375 0.975,0.853125 1.70625,0.853125 0.73125,0.121875 1.34062,-0.853125 0.1218,-2.19375 z m -4.63125,-5.728124 -1.4625,-2.19375 3.53438,-5.60625 c 0,0 1.4625,2.071875 0.73125,3.290625 -0.36563,0.4875001 -1.70625,2.803125 -2.80313,4.509375 z m -5.60625,3.534374 c 0.36563,-0.365625 1.21875,-1.340625 1.70625,-2.071875 l 0.975,1.4625 c -0.4875,0.73125 -1.09687,1.70625 -1.09687,1.70625 0,0 -1.09688,1.70625 -2.07188,3.046875 -0.85312,1.340625 -1.70625,1.584375 -2.80312,1.584375 -1.70625,0 -2.55938,-2.4375 -0.12181,-4.63125 1.70625,-1.4625 2.80312,-0.609375 3.4125,-1.096875 z m -2.925,2.19375 c -1.09687,1.21875 -0.4875,2.19375 0.24375,2.19375 0.73125,0 1.21875,-0.24375 1.70625,-0.853125 0.4875,-0.609375 0.73125,-1.828125 0.4875,-2.071875 -0.36562,-0.365625 -1.34062,-0.4875 -2.4375,0.73125 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path7886" + style="display:inline;fill:url(#radialGradient4861-6);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4873)" /> <path - style="display:inline;fill:url(#radialGradient4881);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5063)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 292.45286,20.11787 h -7.56413 c -0.73125,0 -1.32549,-0.515308 -1.33058,-1.24654 l -0.028,-4.017519 v -3.16875 -2.9250003 c 0,-0.73125 0.4875,-1.21875 1.21875,-1.21875 l 6.44059,0.00442 2.53052,2.5152613 0.0354,8.810334 c 0.003,0.731244 -0.57138,1.24654 -1.30263,1.24654 z M 289.62394,8.7600607 v 2.4375003 h 2.4375 z m -7.3125,-0.6736655 0.0213,0.7169703 v 2.5152615 3.772891 l -5.06403,0.04019 c -0.73123,0.0058 -1.21672,-0.598663 -1.21875,-1.32991 l -0.028,-10.0556901 c -0.002,-0.7312471 0.4875,-1.21875 1.21875,-1.21875 h 6.09375 l 2.79402,2.5031129 v 1.81343 h -2.53052 c -0.67317,-0.017075 -1.31624,0.241688 -1.28654,1.2424914 z m 0.0213,-4.7304016 v 2.4596813 l 2.53052,-0.02779 z" id="path8454" - d="m 292.00552,19.7566 h -7.3125 c -0.73125,0 -1.21875,-0.4875 -1.21875,-1.21875 v -3.656249 -3.16875 -2.9250003 c 0,-0.73125 0.4875,-1.21875 1.21875,-1.21875 0,0 3.9,0 6.09375,0 0,0 2.4375,2.4375003 2.4375,2.4375003 0,2.68125 0,8.531249 0,8.531249 0,0.73125 -0.4875,1.21875 -1.21875,1.21875 z m -2.4375,-10.9687493 v 2.4375003 h 2.4375 z m -7.3125,-1.3406249 v 1.3406249 2.3156253 3.778125 h -4.875 c -0.73125,0 -1.21875,-0.4875 -1.21875,-1.21875 V 3.9128507 c 0,-0.7312499 0.4875,-1.21875 1.21875,-1.21875 0,0 3.9,0 6.09375,0 0,0 2.4375,2.4375 2.4375,2.4375 0,0.4875 0,0.9750001 0,1.5843751 h -3.04688 c -0.36562,0.121875 -0.60937,0.365625 -0.60937,0.73125 z m 0,-3.5343751 v 2.4375001 h 2.4375 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4881-9);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4893)" /> <path - style="display:inline;fill:url(#radialGradient4901);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5075)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 312.76384,20.20124 -10.1808,-0.02779 c -0.75126,-0.0021 -1.21143,-0.547743 -1.21303,-1.272325 l -0.028,-12.6083588 c -0.002,-0.9749978 0.29395,-1.2762443 1.26895,-1.2723257 l 2.49639,0.010033 c 0,0 0.0587,-2.5309032 2.49616,-2.5309032 2.4375,0 2.56487,2.5309032 2.56487,2.5309032 l 2.48359,0.017757 c 0.97497,0.00697 1.35938,0.3251372 1.35283,1.3001156 l -0.0839,12.4971989 c -0.005,0.808245 -0.51762,1.35744 -1.15713,1.355695 z m -1.86968,-13.8508896 -1.34061,-0.609375 c 0,0 0,-1.8281249 -1.95,-1.8281249 -1.95,0 -1.95,1.8281249 -1.95,1.8281249 l -1.34063,0.609375 -0.47079,1.1953846 h 7.59155 z m 0.53952,2.4530151 h -6.32629 l -2.53052,2.5152615 2.53052,5.030522 7.59155,-5.030522 z" id="path9022" - d="m 311.86917,19.7566 h -8.53125 c -0.97501,0 -1.82812,-0.853125 -1.82812,-1.828124 V 6.9597255 c 0,-0.9750001 0.85311,-1.8281251 1.82812,-1.8281251 h 1.82813 c 0,0 0,-2.4375 2.4375,-2.4375 2.4375,0 2.4375,2.4375 2.4375,2.4375 h 1.82812 c 0.975,0 1.82813,0.853125 1.82813,1.8281251 V 17.928476 c 0,0.974999 -0.85313,1.828124 -1.82813,1.828124 z m -0.97501,-13.4062496 -1.34061,-0.609375 c 0,0 0,-1.8281249 -1.95,-1.8281249 -1.95,0 -1.95,1.8281249 -1.95,1.8281249 l -1.34063,0.609375 -0.60937,1.2187501 h 3.04687 3.9 0.975 z m 0.12182,2.071875 h -5.72812 l -3.65625,2.0718756 3.4125,5.971875 8.04375,-4.63125 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4901-6);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4913)" /> <path - style="display:inline;fill:url(#radialGradient4921);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5087)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="M 335.47361,15.091518 V 7.545735 l 3.79578,3.772892 z m -8.85681,1.257631 h 7.59155 l -3.79578,3.772892 z m 6.32629,-1.257631 h -5.06103 c -0.73124,-0.0041 -1.26114,-0.526392 -1.26526,-1.25763 V 8.8033655 c -0.004,-0.7312386 0.53401,-1.2576305 1.26526,-1.2576305 h 5.06103 c 0.73125,0 1.26526,0.5263804 1.26526,1.2576305 v 5.0305225 c 0,0.609375 -0.53402,1.261705 -1.26526,1.25763 z m 0,-3.772891 c 0,-0.73125 -0.53401,-1.257631 -1.26526,-1.257631 h -2.53052 c -0.73125,0 -1.26525,0.526381 -1.26525,1.257631 v 1.25763 c 0,0.73125 0.534,1.257631 1.26525,1.257631 h 2.53052 c 0.73125,0 1.26526,-0.526381 1.26526,-1.257631 z m -2.53052,-8.8034143 3.79578,3.7728917 h -7.59155 z m -5.06103,5.0305223 v 7.545783 l -3.79578,-3.772891 z" id="path9590" - d="M 335.29779,14.881601 V 7.5691009 l 3.65625,3.6562501 z m -8.53125,1.21875 h 7.3125 l -3.65625,3.656249 z m 6.09375,-1.21875 h -4.875 c -0.73125,0 -1.21875,-0.4875 -1.21875,-1.21875 v -4.875 c 0,-0.7312501 0.4875,-1.2187501 1.21875,-1.2187501 h 4.875 c 0.73125,0 1.21875,0.4875 1.21875,1.2187501 v 4.875 c 0,0.609375 -0.4875,1.21875 -1.21875,1.21875 z m 0,-3.65625 c 0,-0.73125 -0.4875,-1.21875 -1.21875,-1.21875 h -2.4375 c -0.73125,0 -1.21875,0.4875 -1.21875,1.21875 v 1.21875 c 0,0.73125 0.4875,1.21875 1.21875,1.21875 h 2.4375 c 0.73125,0 1.21875,-0.4875 1.21875,-1.21875 z m -2.4375,-8.5312501 3.65625,3.6562501 h -7.3125 z m -4.875,4.875 v 7.3125001 l -3.65625,-3.65625 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4921-8);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4933)" /> <path - style="display:inline;fill:url(#radialGradient4941);fill-opacity:1;stroke-width:0.96615839;filter:url(#filter5099)" + d="m 274,8 h 10 v 2 h -10 z" id="path10158" - d="m 274.15498,8.0293266 h 9.6324 v 1.9381685 h -9.6324 z" /> + style="display:inline;fill:url(#radialGradient4941-9);fill-opacity:1;stroke-width:0.96615839" /> <path - style="display:inline;fill:url(#radialGradient4949);fill-opacity:1;stroke-width:0.96615839;filter:url(#filter5111)" + d="m 302,10 h -4 v 4 h -2 v -4 h -4 V 8 h 4 V 4 h 2 v 4 h 4 z" id="path10726" - d="m 301.82263,10.040073 h -3.85298 v 3.876338 h -1.92648 v -3.876338 h -3.85298 V 8.1019059 h 3.85298 V 4.2255681 h 1.92648 v 3.8763378 h 3.85298 z" /> + style="display:inline;fill:url(#radialGradient4949-5);fill-opacity:1;stroke-width:0.96615839" /> <path - style="display:inline;fill:url(#radialGradient4957);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5123)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 406.82037,12.583531 c -0.12181,0.73125 -0.24375,1.4625 -0.4875,2.071875 -0.4875,1.584375 -1.4625,3.046875 -3.04686,4.021874 0.4875,0.4875 1.58436,1.096875 1.58436,1.096875 0,0 -2.4375,0.365625 -4.99686,0.365625 l -0.12181,-0.121875 v 0.121875 c -1.21875,0 -2.4375,-0.365625 -3.65625,-0.73125 0.85311,-0.73125 1.4625,-1.584374 1.95,-2.559374 0.73125,-1.4625 0.73125,-3.65625 0.73125,-3.65625 0,0 1.09686,1.828125 1.70625,2.559375 1.4625,-0.73125 2.4375,-2.19375 2.55936,-3.65625 0.12181,-1.096875 -0.24375,-2.071875 -0.73125,-2.8031253 -0.4875,-0.8531251 -1.21875,-1.3406251 -2.07186,-1.7062501 0.24375,-0.4874999 0.60936,-1.0968749 0.975,-1.584375 0.4875,-0.73125 1.09686,-1.21875 1.58436,-1.4625 2.55939,1.340625 4.3875,4.5093751 4.02189,8.0437504 z m -8.53125,-2.4375 c 0,0 -1.34061,-1.8281254 -1.95,-2.4375004 -1.70625,0.853125 -2.68125,2.4375004 -2.68125,4.1437504 0.12181,1.828125 1.34064,3.290625 2.925,4.021875 -0.36561,0.609375 -0.73125,1.21875 -1.21875,1.70625 -0.4875,0.609375 -1.09686,0.974999 -1.4625,1.340624 -2.80311,-1.706249 -4.50936,-4.874999 -4.02186,-8.287499 0.1218,-0.8531253 0.36561,-1.7062504 0.60936,-2.4375004 0.4875,-1.3406249 1.34064,-2.4375 2.55939,-3.290625 0.1218,-0.121875 0.24375,-0.121875 0.36561,-0.24375 -0.4875,-0.4875 -1.95,-0.975 -1.95,-0.975 0,0 3.04689,-0.975 8.2875,-0.365625 -1.58436,2.315625 -1.4625,6.8250004 -1.4625,6.8250004 z" id="path11294" - d="m 407.09514,12.361211 c -0.12181,0.73125 -0.24375,1.4625 -0.4875,2.071875 -0.4875,1.584375 -1.4625,3.046875 -3.04686,4.021874 0.4875,0.4875 1.58436,1.096875 1.58436,1.096875 0,0 -2.4375,0.365625 -4.99686,0.365625 0,0 -0.12181,-0.121875 -0.12181,-0.121875 v 0.121875 c -1.21875,0 -2.4375,-0.365625 -3.65625,-0.73125 0.85311,-0.73125 1.4625,-1.584374 1.95,-2.559374 0.73125,-1.4625 0.73125,-3.65625 0.73125,-3.65625 0,0 1.09686,1.828125 1.70625,2.559375 1.4625,-0.73125 2.4375,-2.19375 2.55936,-3.65625 0.12181,-1.096875 -0.24375,-2.0718751 -0.73125,-2.8031251 -0.4875,-0.8531251 -1.21875,-1.3406251 -2.07186,-1.7062501 0.24375,-0.4874999 0.60936,-1.0968749 0.975,-1.584375 0.4875,-0.73125 1.09686,-1.21875 1.58436,-1.4625 2.55939,1.340625 4.3875,4.5093751 4.02189,8.0437502 z m -8.53125,-2.4375001 c 0,0 -1.34061,-1.8281251 -1.95,-2.4375001 -1.70625,0.853125 -2.68125,2.4375001 -2.68125,4.1437502 0.12181,1.828125 1.34064,3.290625 2.925,4.021875 -0.36561,0.609375 -0.73125,1.21875 -1.21875,1.70625 -0.4875,0.609375 -1.09686,0.974999 -1.4625,1.340624 -2.80311,-1.706249 -4.50936,-4.874999 -4.02186,-8.287499 0.1218,-0.8531251 0.36561,-1.7062502 0.60936,-2.4375002 0.4875,-1.3406249 1.34064,-2.4375 2.55939,-3.290625 0.1218,-0.121875 0.24375,-0.121875 0.36561,-0.24375 -0.4875,-0.4875 -1.95,-0.975 -1.95,-0.975 0,0 3.04689,-0.975 8.2875,-0.365625 -1.58436,2.315625 -1.4625,6.8250001 -1.4625,6.8250001 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4957-2);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4969)" /> <path - style="display:inline;fill:url(#radialGradient4977);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5135)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 429.73975,20.187746 -2.55504,0.05558 c -0.48738,0.0106 -0.61242,-0.769541 -0.61242,-1.378916 0,0 0.31966,-4.276424 -3.79578,-8.803414 -3.20233,-3.5225593 -8.85682,-3.7728916 -8.85682,-3.7728916 -0.60938,0 -1.26177,-0.171597 -1.25602,-0.6590635 l 0.028,-2.3732094 c 0.006,-0.4874666 0.61868,-0.7406188 1.22806,-0.7406188 0,0 7.05132,0.3003217 11.38734,5.0305223 3.72704,4.065871 5.06103,11.318675 5.06103,11.318675 0,0.4875 -0.0191,1.310083 -0.62831,1.323336 z M 413.91969,8.8033655 c 0,0 4.48239,0.7421569 7.0114,3.0905195 2.59016,2.40515 3.11068,6.970525 3.11068,6.970525 0,0.4875 -0.7448,1.278471 -1.23236,1.278471 h -1.35283 c -0.4875,0 -1.21059,-0.669096 -1.21059,-1.278471 0,0 0.4472,-2.304652 -1.91012,-4.45401 -1.78736,-1.629677 -4.41618,-1.834143 -4.41618,-1.834143 -0.60938,0 -1.23946,-0.793663 -1.22806,-1.281032 l 0.028,-1.195314 c 0.0114,-0.4873685 0.59073,-1.2965455 1.20011,-1.2965455 z m 1.20944,6.3426395 c 1.34062,0 2.54933,1.124665 2.54933,2.46529 0,1.340626 -1.09688,2.576451 -2.4375,2.576451 -1.34063,0 -2.54933,-1.208035 -2.54933,-2.548661 0,-1.340625 1.09687,-2.49308 2.4375,-2.49308 z" id="path11862" - d="m 429.01283,20.243326 h -1.82812 c -0.4875,0 -0.975,-0.365625 -0.975,-0.975 0,0 0.36562,-4.387501 -3.9,-8.775 -3.04688,-3.6562503 -8.53125,-3.9000003 -8.53125,-3.9000003 -0.60938,0 -0.975,-0.365625 -0.975,-0.8531249 V 4.0339507 c 0,-0.4875 0.36562,-0.853125 0.975,-0.853125 0,0 7.67812,0.4875 11.7,5.4843751 4.02187,3.7781242 4.3875,10.7250002 4.3875,10.7250002 0,0.4875 -0.24375,0.853125 -0.85313,0.853125 z M 413.77846,9.2745758 c 0,0 4.50937,0.609375 7.06875,2.9249992 2.55937,2.4375 3.04687,7.190626 3.04687,7.190626 0,0.4875 -0.12181,0.975 -0.60937,0.975 h -1.82813 c -0.4875,0 -0.73125,-0.365625 -0.73125,-0.975 0,0 0.12181,-2.925001 -2.19375,-5.118751 -1.82812,-1.584375 -4.75312,-1.70625 -4.75312,-1.70625 -0.60938,0 -0.975,-0.365625 -0.975,-0.853125 v -1.584374 c 0,-0.4875002 0.36562,-0.8531252 0.975,-0.8531252 z m 1.4625,6.0937492 c 1.34062,0 2.4375,1.096875 2.4375,2.4375 0,1.340626 -1.09688,2.437501 -2.4375,2.437501 -1.34063,0 -2.4375,-1.096875 -2.4375,-2.437501 0,-1.340625 1.09687,-2.4375 2.4375,-2.4375 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4977-4);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4989)" /> <path - style="display:inline;fill:url(#radialGradient4997);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5147)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 448.08169,13.833888 v 2.515261 c 0,0.975 -0.41214,1.257631 -1.26525,1.257631 h -10.12208 c -0.85314,0 -1.26526,-0.282631 -1.26526,-1.257631 V 6.2881044 c 0,-0.9750001 0.41212,-1.2576306 1.26526,-1.2576306 h 10.12208 c 0.85311,0 1.26525,0.2826305 1.26525,1.2576306 v 2.5152611 l 5.06104,-2.5152611 V 16.349149 Z" id="path12430" - d="m 451.64901,16.435377 -3.65625,-3.290625 v 2.559375 c 0,0.975 -0.73125,1.70625 -1.58436,1.70625 h -9.01875 c -0.85314,0 -1.58439,-0.73125 -1.58439,-1.70625 V 6.9291285 c 0,-0.9750001 0.73125,-1.7062501 1.58439,-1.7062501 h 9.01875 c 0.85311,0 1.58436,0.73125 1.58436,1.7062501 v 2.437499 l 3.65625,-3.2906241 c 0.36564,-0.365625 0.73125,-0.4875 1.21875,-0.365625 V 16.801002 c -0.36561,0.121875 -0.85311,0 -1.21875,-0.365625 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4997-5);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5009)" /> <g - id="g4779" - style="display:inline;filter:url(#filter5159)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)"> + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline" + id="g4779"> <path - style="fill:url(#radialGradient4710);fill-opacity:1;stroke-width:1.265625;" - d="M 165.73984,2.6257296 V 20.34448 h 9.42792 0.69708 2.46698 c 1.25518,-0.32709 2.23657,-1.314095 2.53125,-2.53125 v -2.53125 -7.5937504 -2.53125 c -0.29468,-1.2171559 -1.27607,-2.2041601 -2.53125,-2.53125 h -2.07148 -1.09258 z m 7.73958,3.0577697 1.33485,2.2420349 c 0,0 0.36967,0.6174141 0.65753,0.813263 0.26974,0.1834496 0.93438,0.2892151 0.93438,0.2892151 h 2.72901 l -1.89596,3.0800167 c 0,0 -0.27577,0.604831 -0.41281,0.907196 -0.20593,0.452534 0.006,1.243536 0.0742,1.982484 0.10732,1.162403 0.19033,2.286529 0.19033,2.286529 l -2.21484,-1.132141 c 0,0 -0.90763,-0.426918 -1.39416,-0.427644 -0.5721,0 -1.64383,0.496858 -1.64383,0.496858 l -2.2198,1.065398 c 0,0 0.16319,-1.013778 0.33866,-2.128325 0.11606,-0.733074 0.43611,-1.567458 0.17798,-2.071473 -0.13995,-0.274086 -0.42023,-0.820679 -0.42023,-0.820679 L 167.532,9.0996981 h 2.71169 c 0,0 0.88228,-0.06226 1.24339,-0.2892151 0.27408,-0.1711231 0.61056,-0.7539368 0.61056,-0.7539368 z" - id="bookmarks-star-4" /> + id="bookmarks-star-4" + d="M 165.92886,2.5152127 V 20.122041 h 8.85681 1.26526 2.53052 c 1.26526,0 2.53052,-1.257631 2.53052,-2.515261 V 15.091518 7.545735 5.0304738 c 0,-1.2576306 -1.26526,-2.5152611 -2.53052,-2.5152611 h -2.53052 -1.26526 z m 7.59155,2.5152611 1.26526,2.5152612 c 0,0 0.39827,0.9972133 0.68613,1.1930622 0.26974,0.1834496 1.07417,0.064568 1.07417,0.064568 h 3.30074 l -2.53052,3.1379238 c 0,0 -0.38069,0.332603 -0.51773,0.634968 -0.20593,0.452534 -0.18971,0.518683 -0.12151,1.257631 0.10732,1.162403 0.63924,3.772892 0.63924,3.772892 l -2.53052,-1.257631 c 0,0 -0.77873,-0.42944 -1.26526,-0.430166 -0.5721,0 -1.26526,0.430166 -1.26526,0.430166 l -2.53051,1.257631 c 0,0 0.56012,-2.658345 0.73559,-3.772892 0.11606,-0.733074 0.10061,-0.753616 -0.15752,-1.257631 -0.13995,-0.274086 -0.57807,-0.782455 -0.57807,-0.782455 l -2.53052,-2.9904368 h 3.02161 c 0,0 0.91024,-0.099407 1.27135,-0.3263622 0.27408,-0.1711231 0.76807,-0.9312683 0.76807,-0.9312683 z" + style="fill:url(#radialGradient4710-4);fill-opacity:1;stroke-width:1.265625;filter:url(#filter4729)" /> <path - style="fill:url(#radialGradient4712);fill-opacity:1;stroke:none;stroke-width:1.265625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers stroke fill;" - d="m 163.20859,2.6257296 c -1.25519,0.3270899 -2.23658,1.3140942 -2.53125,2.53125 v 2.53125 7.5937504 2.53125 c 0.29467,1.217155 1.27606,2.20416 2.53125,2.53125 h 3.16406 v -5.0625 -7.5937504 -5.0625 z" - id="bookmarks-overlay-1" /> + id="bookmarks-overlay-1" + d="m 163.39834,2.5152127 c -1.26526,0 -2.53052,1.2576305 -2.53052,2.5152611 v 2.5152612 7.545783 2.515262 c 0,1.25763 1.26526,2.515261 2.53052,2.515261 h 2.91839 l 0.0559,-4.840061 V 7.6882296 l 0.028,-5.1730169 z" + style="fill:url(#radialGradient4712-2);fill-opacity:1;stroke:none;stroke-width:1.265625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers stroke fill;filter:url(#filter4774)" /> <path - style="opacity:0.66300001;fill:url(#radialGradient4714);fill-opacity:1;stroke:url(#radialGradient4750);stroke-width:0.6328125;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" - d="M 166.37156,2.6257296 V 20.34448" - id="bookmarks-divider-7" /> + id="bookmarks-divider-7" + d="M 165.92886,2.5152127 V 20.122041" + style="opacity:0.66300001;fill:url(#radialGradient4714-4);fill-opacity:1;stroke:url(#radialGradient4750-3);stroke-width:1.2614392;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> </g> <path - d="m 133.26971,34.690626 -6.72001,6.6 c -0.24,0.36 -0.72,0.48 -1.2,0.48 -0.48,0 -0.96,-0.12 -1.32,-0.48 l -6.72,-6.6 c -0.6,-0.72 -0.48,-1.32 0.48,-1.32 h 3.96 v -7.200001 c 0,-0.72 0.48,-1.2 1.2,-1.2 h 4.8 c 0.72,0 1.2,0.48 1.2,1.2 v 7.200001 h 3.84 c 0.96001,0 1.20001,0.6 0.48001,1.32 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + style="display:inline;fill:url(#radialGradient4709-1-2);fill-opacity:1;stroke-width:1;filter:url(#filter4844)" id="path4214-3" - style="display:inline;fill:url(#radialGradient4709-1);fill-opacity:1;stroke-width:1;filter:url(#filter5171)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 133.03211,35.213608 -6.32629,6.288153 c -0.24,0.36 -0.8202,0.518975 -1.3002,0.518975 -0.48,0 -0.87032,-0.158975 -1.23032,-0.518975 l -6.3263,-6.288153 c -0.6,-0.72 -0.96335,-1.29465 -0.003,-1.287183 l 3.79916,0.02955 -0.0908,-7.535242 c -0.009,-0.719949 0.67572,-1.307177 1.39571,-1.31116 l 5.02367,-0.02779 c 0.71999,-0.004 1.25401,0.619416 1.22796,1.33895 l 0.035,7.535242 3.80499,-0.02955 c 0.95998,-0.0075 0.71078,0.567183 -0.009,1.287183 z" /> </g> </svg> diff --git a/application/palemoon/themes/windows/Toolbar-inverted.png b/application/palemoon/themes/windows/Toolbar-inverted.png Binary files differnew file mode 100644 index 000000000..54d83bf5f --- /dev/null +++ b/application/palemoon/themes/windows/Toolbar-inverted.png diff --git a/application/palemoon/themes/windows/Toolbar.png b/application/palemoon/themes/windows/Toolbar.png Binary files differnew file mode 100644 index 000000000..8ec756e03 --- /dev/null +++ b/application/palemoon/themes/windows/Toolbar.png diff --git a/application/palemoon/themes/windows/Toolbar.svg b/application/palemoon/themes/windows/Toolbar.svg index 314e020fb..7a68c0608 100644 --- a/application/palemoon/themes/windows/Toolbar.svg +++ b/application/palemoon/themes/windows/Toolbar.svg @@ -6,14 +6,14 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - enable-background="new 0 0 378 38" - viewBox="0 0 378 38" - height="38" - width="378" - y="0px" - x="0px" + version="1.1" id="PaleMoonToolbarSVG" - version="1.1"> + x="0px" + y="0px" + width="378" + height="38" + viewBox="0 0 378 38" + enable-background="new 0 0 378 38"> <metadata id="metadata146"> <rdf:RDF> @@ -29,1329 +29,1328 @@ <defs id="defs144"> <radialGradient - cy="0.69999999" - id="globalGradient"> + id="globalGradient" + cy="0.69999999"> <stop - style="stop-color:#87939b;stop-opacity:1" + offset="0.05" id="stop4" - offset="0.05" /> + style="stop-color:#87939b;stop-opacity:1" /> <stop - style="stop-color:#45555f;stop-opacity:1" + offset="1" id="stop6" - offset="1" /> + style="stop-color:#45555f;stop-opacity:1" /> </radialGradient> <filter id="insetShadow"> <feFlood - id="feFlood1875" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood1875" /> <feComposite - id="feComposite1877" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite1877" /> <feGaussianBlur - id="feGaussianBlur1879" - result="blur" + in="composite1" stdDeviation="2" - in="composite1" /> + result="blur" + id="feGaussianBlur1879" /> <feOffset - id="feOffset1881" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset1881" /> <feComposite - id="feComposite1883" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite1883" /> </filter> <filter - id="filter2164" - style="color-interpolation-filters:sRGB;"> + style="color-interpolation-filters:sRGB;" + id="filter2164"> <feFlood - id="feFlood2154" - result="flood" + flood-opacity="1" flood-color="rgb(0,0,0)" - flood-opacity="1" /> + result="flood" + id="feFlood2154" /> <feComposite - id="feComposite2156" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite2156" /> <feGaussianBlur - id="feGaussianBlur2158" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur2158" /> <feOffset - id="feOffset2160" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset2160" /> <feComposite - id="feComposite2162" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite2162" /> </filter> <radialGradient - cy="12.21416" - id="globalGradient-8" - gradientTransform="matrix(1.0350983,0,0,0.96609178,0,18)" - cx="95.643087" - fx="95.643087" - fy="12.21416" + gradientUnits="userSpaceOnUse" r="7.2456884" - gradientUnits="userSpaceOnUse"> + fy="12.21416" + fx="95.643087" + cx="95.643087" + gradientTransform="matrix(1.0350983,0,0,0.96609178,0,18)" + id="globalGradient-8" + cy="12.21416"> <stop - style="stop-color:#12d92d;stop-opacity:1" + offset="0.05" id="stop4-5" - offset="0.05" /> + style="stop-color:#12d92d;stop-opacity:1" /> <stop - style="stop-color:#01b222;stop-opacity:1" + offset="1" id="stop6-5" - offset="1" /> + style="stop-color:#01b222;stop-opacity:1" /> </radialGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.1087088,0,-1.2351844)" - r="7.1399999" - fy="14.778796" - fx="10.529827" - cy="14.778796" - cx="10.529827" + xlink:href="#linearGradient4635" id="radialGradient4669" - xlink:href="#linearGradient4635" /> + cx="10.529827" + cy="14.778796" + fx="10.529827" + fy="14.778796" + r="7.1399999" + gradientTransform="matrix(1,0,0,1.1087088,0,-1.2351844)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4635"> <stop - id="stop4631" + style="stop-color:#6198cb;stop-opacity:1" offset="0" - style="stop-color:#6198cb;stop-opacity:1" /> + id="stop4631" /> <stop - id="stop4633" + style="stop-color:#3a78b2;stop-opacity:1" offset="1" - style="stop-color:#3a78b2;stop-opacity:1" /> + id="stop4633" /> </linearGradient> <filter - id="filter4701" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4701"> <feFlood - id="feFlood4691" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4691" /> <feComposite - id="feComposite4693" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4693" /> <feGaussianBlur - id="feGaussianBlur4695" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4695" /> <feOffset - id="feOffset4697" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4697" /> <feComposite - id="feComposite4699" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4699" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0853313,0,-3.029369)" - r="8.7600002" - fy="38.79744" - fx="11.063469" - cy="38.79744" - cx="11.063469" + xlink:href="#linearGradient4635" id="radialGradient4637" - xlink:href="#linearGradient4635" /> + cx="11.063469" + cy="38.79744" + fx="11.063469" + fy="38.79744" + r="8.7600002" + gradientTransform="matrix(1,0,0,1.0853313,0,-3.029369)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4661" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4661"> <feFlood - id="feFlood4651" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4651" /> <feComposite - id="feComposite4653" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4653" /> <feGaussianBlur - id="feGaussianBlur4655" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4655" /> <feOffset - id="feOffset4657" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4657" /> <feComposite - id="feComposite4659" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4659" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.1003056,0,-1.1335797)" - r="7.1399999" - fy="14.552581" - fx="34.841751" - cy="14.552581" - cx="34.841751" + xlink:href="#linearGradient4635" id="radialGradient4677" - xlink:href="#linearGradient4635" /> + cx="34.841751" + cy="14.552581" + fx="34.841751" + fy="14.552581" + r="7.1399999" + gradientTransform="matrix(1,0,0,1.1003056,0,-1.1335797)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4689" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4689"> <feFlood - id="feFlood4679" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4679" /> <feComposite - id="feComposite4681" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4681" /> <feGaussianBlur - id="feGaussianBlur4683" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4683" /> <feOffset - id="feOffset4685" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4685" /> <feComposite - id="feComposite4687" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4687" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.99218759,0,0.09141507)" - r="7.6799994" - fy="12.761739" - fx="58.062626" - cy="12.761739" - cx="58.062626" + xlink:href="#linearGradient4603" id="radialGradient4605" - xlink:href="#linearGradient4603" /> + cx="58.062626" + cy="12.761739" + fx="58.062626" + fy="12.761739" + r="7.6799994" + gradientTransform="matrix(1,0,0,0.99218759,0,0.09141507)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4603"> <stop - id="stop4599" + style="stop-color:#e72b1d;stop-opacity:1" offset="0" - style="stop-color:#e72b1d;stop-opacity:1" /> + id="stop4599" /> <stop - id="stop4601" + style="stop-color:#cc4338;stop-opacity:1" offset="1" - style="stop-color:#cc4338;stop-opacity:1" /> + id="stop4601" /> </linearGradient> <filter - id="filter4629" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4629"> <feFlood - id="feFlood4619" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4619" /> <feComposite - id="feComposite4621" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4621" /> <feGaussianBlur - id="feGaussianBlur4623" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4623" /> <feOffset - id="feOffset4625" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4625" /> <feComposite - id="feComposite4627" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4627" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0769231,0,-0.86932835)" - r="7.8000002" - fy="13.939252" - fx="79.305222" - cy="13.939252" - cx="79.305222" + xlink:href="#linearGradient4523-3" id="radialGradient4525" - xlink:href="#linearGradient4523-3" /> + cx="79.305222" + cy="13.939252" + fx="79.305222" + fy="13.939252" + r="7.8000002" + gradientTransform="matrix(1,0,0,1.0769231,0,-0.86932835)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4523-3"> <stop - id="stop4519" + style="stop-color:#4fb55d;stop-opacity:1" offset="0" - style="stop-color:#4fb55d;stop-opacity:1" /> + id="stop4519" /> <stop - id="stop4521" + style="stop-color:#2d8539;stop-opacity:1" offset="1" - style="stop-color:#2d8539;stop-opacity:1" /> + id="stop4521" /> </linearGradient> <filter - id="filter4597" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4597"> <feFlood - id="feFlood4587" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4587" /> <feComposite - id="feComposite4589" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4589" /> <feGaussianBlur - id="feGaussianBlur4591" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4591" /> <feOffset - id="feOffset4593" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4593" /> <feComposite - id="feComposite4595" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4595" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.87507716,0,1.3868386)" - r="9.5995998" - fy="12.664675" - fx="103.23091" - cy="12.664675" - cx="103.23091" + xlink:href="#linearGradient4527" id="radialGradient4529" - xlink:href="#linearGradient4527" /> + cx="103.23091" + cy="12.664675" + fx="103.23091" + fy="12.664675" + r="9.5995998" + gradientTransform="matrix(1,0,0,0.87507716,0,1.3868386)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4527"> <stop - id="stop4523" + style="stop-color:#3f6bbd;stop-opacity:1" offset="0" - style="stop-color:#3f6bbd;stop-opacity:1" /> + id="stop4523" /> <stop - id="stop4525" + style="stop-color:#29467b;stop-opacity:1" offset="1" - style="stop-color:#29467b;stop-opacity:1" /> + id="stop4525" /> </linearGradient> <filter - id="filter4783" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4783"> <feFlood - id="feFlood4773" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4773" /> <feComposite - id="feComposite4775" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4775" /> <feGaussianBlur - id="feGaussianBlur4777" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4777" /> <feOffset - id="feOffset4779" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4779" /> <feComposite - id="feComposite4781" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4781" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0032611,0,-0.03620244)" - r="8.3726959" - fy="16.659737" - fx="125.30523" - cy="16.659737" - cx="125.30523" + xlink:href="#linearGradient4707" id="radialGradient4709" - xlink:href="#linearGradient4707" /> + cx="125.30523" + cy="16.659737" + fx="125.30523" + fy="16.659737" + r="8.3726959" + gradientTransform="matrix(1,0,0,1.0032611,0,-0.03620244)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4707"> <stop - id="stop4703" + style="stop-color:#8c9ba5;stop-opacity:1" offset="0" - style="stop-color:#8c9ba5;stop-opacity:1" /> + id="stop4703" /> <stop - id="stop4705" + style="stop-color:#607480;stop-opacity:1" offset="1" - style="stop-color:#607480;stop-opacity:1" /> + id="stop4705" /> </linearGradient> <filter - id="filter4721" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4721"> <feFlood - id="feFlood4711" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4711" /> <feComposite - id="feComposite4713" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4713" /> <feGaussianBlur - id="feGaussianBlur4715" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4715" /> <feOffset - id="feOffset4717" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4717" /> <feComposite - id="feComposite4719" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4719" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.993055,0,0.07848724)" - r="8.6400051" - fy="12.784631" - fx="149.26262" - cy="12.784631" - cx="149.26262" + xlink:href="#linearGradient4727" id="radialGradient4729" - xlink:href="#linearGradient4727" /> + cx="149.26262" + cy="12.784631" + fx="149.26262" + fy="12.784631" + r="8.6400051" + gradientTransform="matrix(1,0,0,0.993055,0,0.07848724)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4727"> <stop - id="stop4723" + style="stop-color:#3eb796;stop-opacity:1" offset="0" - style="stop-color:#3eb796;stop-opacity:1" /> + id="stop4723" /> <stop - id="stop4725" + style="stop-color:#31a886;stop-opacity:1" offset="1" - style="stop-color:#31a886;stop-opacity:1" /> + id="stop4725" /> </linearGradient> <filter - id="filter4741" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4741"> <feFlood - id="feFlood4731" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4731" /> <feComposite - id="feComposite4733" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4733" /> <feGaussianBlur - id="feGaussianBlur4735" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4735" /> <feOffset - id="feOffset4737" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4737" /> <feComposite - id="feComposite4739" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4739" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.79035186,0,0,0.79508811,-0.14216924,6.9389816e-4)" - r="9.6007004" - fy="12.037849" - fx="466.94476" - cy="12.037849" - cx="466.94476" + xlink:href="#linearGradient5023" id="radialGradient5017" - xlink:href="#linearGradient5023" /> + cx="466.94476" + cy="12.037849" + fx="466.94476" + fy="12.037849" + r="9.6007004" + gradientTransform="matrix(0.79035186,0,0,0.79508811,-0.14216924,6.9389816e-4)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient5023"> <stop - style="stop-color:#c6cdd2;stop-opacity:1" + id="stop5019" offset="0" - id="stop5019" /> + style="stop-color:#c6cdd2;stop-opacity:1" /> <stop - style="stop-color:#9cabb4;stop-opacity:1" + id="stop5021" offset="1" - id="stop5021" /> + style="stop-color:#9cabb4;stop-opacity:1" /> </linearGradient> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.87500048,0,1.3876528)" - r="9.5999947" - fy="13.746766" - fx="194.44176" - cy="13.746766" - cx="194.44176" + xlink:href="#linearGradient4707" id="radialGradient4793" - xlink:href="#linearGradient4707" /> + cx="194.44176" + cy="13.746766" + fx="194.44176" + fy="13.746766" + r="9.5999947" + gradientTransform="matrix(1,0,0,0.87500048,0,1.3876528)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4805" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4805"> <feFlood - id="feFlood4795" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4795" /> <feComposite - id="feComposite4797" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4797" /> <feGaussianBlur - id="feGaussianBlur4799" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4799" /> <feOffset - id="feOffset4801" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4801" /> <feComposite - id="feComposite4803" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4803" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.87500002,0,1.3876579)" - r="9.6000004" - fy="11.101265" - fx="239.2" - cy="11.101265" - cx="239.2" + xlink:href="#linearGradient4707" id="radialGradient4833" - xlink:href="#linearGradient4707" /> + cx="239.2" + cy="11.101265" + fx="239.2" + fy="11.101265" + r="9.6000004" + gradientTransform="matrix(1,0,0,0.87500002,0,1.3876579)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4853" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4853"> <feFlood - id="feFlood4843" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4843" /> <feComposite - id="feComposite4845" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4845" /> <feGaussianBlur - id="feGaussianBlur4847" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4847" /> <feOffset - id="feOffset4849" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4849" /> <feComposite - id="feComposite4851" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4851" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.79274533,0,0,0.78327978,-0.14435628,0.11758726)" - r="3.5288758" - fy="12.418613" - fx="242.0894" - cy="12.418613" - cx="242.0894" + xlink:href="#linearGradient4707" id="radialGradient4841" - xlink:href="#linearGradient4707" /> - <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.9880597,0,0.14828194)" + cx="242.26164" + cy="12.423289" + fx="242.26164" + fy="12.423289" r="3.5288758" - fy="12.418613" - fx="242.0894" - cy="12.418613" - cx="242.0894" + gradientTransform="matrix(0.79274531,0,0,0.78327977,-0.14435628,0.11758726)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + xlink:href="#linearGradient4707" id="radialGradient4858" - xlink:href="#linearGradient4707" /> + cx="242.0894" + cy="12.418613" + fx="242.0894" + fy="12.418613" + r="3.5288758" + gradientTransform="matrix(1,0,0,0.9880597,0,0.14828194)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.99992718,0,0.00247197)" - r="9.7507105" - fy="31.105829" - fx="466.39926" - cy="31.105829" - cx="466.39926" + xlink:href="#linearGradient5037" id="radialGradient5031" - xlink:href="#linearGradient5037" /> + cx="466.39926" + cy="31.105829" + fx="466.39926" + fy="31.105829" + r="9.7507105" + gradientTransform="matrix(1,0,0,0.99992718,0,0.00247197)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient5037"> <stop - style="stop-color:#e8e1a1;stop-opacity:1" + id="stop5033" offset="0" - id="stop5033" /> + style="stop-color:#e8e1a1;stop-opacity:1" /> <stop - style="stop-color:#baad3e;stop-opacity:1" + id="stop5035" offset="1" - id="stop5035" /> + style="stop-color:#baad3e;stop-opacity:1" /> </linearGradient> <filter - id="filter5049" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter5049"> <feFlood - id="feFlood5039" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood5039" /> <feComposite - id="feComposite5041" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5041" /> <feGaussianBlur - id="feGaussianBlur5043" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5043" /> <feOffset - id="feOffset5045" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset5045" /> <feComposite - id="feComposite5047" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite5047" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.8160434,0,2.0506693)" - r="10.35937" - fy="16.56296" - fx="217.95329" - cy="16.56296" - cx="217.95329" + xlink:href="#linearGradient4707" id="radialGradient4813" - xlink:href="#linearGradient4707" /> + cx="217.95329" + cy="16.56296" + fx="217.95329" + fy="16.56296" + r="10.35937" + gradientTransform="matrix(1,0,0,0.8160434,0,2.0506693)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4825" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4825"> <feFlood - id="feFlood4815" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4815" /> <feComposite - id="feComposite4817" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4817" /> <feGaussianBlur - id="feGaussianBlur4819" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4819" /> <feOffset - id="feOffset4821" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4821" /> <feComposite - id="feComposite4823" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4823" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.9969072,0,0.03528241)" - r="8.5577164" - fy="15.840806" - fx="262.79288" - cy="15.840806" - cx="262.79288" + xlink:href="#linearGradient4707" id="radialGradient4861" - xlink:href="#linearGradient4707" /> + cx="262.79288" + cy="15.840806" + fx="262.79288" + fy="15.840806" + r="8.5577164" + gradientTransform="matrix(1,0,0,0.9969072,0,0.03528241)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4873" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4873"> <feFlood - id="feFlood4863" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4863" /> <feComposite - id="feComposite4865" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4865" /> <feGaussianBlur - id="feGaussianBlur4867" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4867" /> <feOffset - id="feOffset4869" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4869" /> <feComposite - id="feComposite4871" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4871" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - r="8.53125" - fy="14.171478" - fx="286.58698" - cy="14.171478" - cx="286.58698" + xlink:href="#linearGradient4707" id="radialGradient4881" - xlink:href="#linearGradient4707" /> + cx="286.58698" + cy="14.171478" + fx="286.58698" + fy="14.171478" + r="8.53125" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4893" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4893"> <feFlood - id="feFlood4883" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4883" /> <feComposite - id="feComposite4885" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4885" /> <feGaussianBlur - id="feGaussianBlur4887" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4887" /> <feOffset - id="feOffset4889" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4889" /> <feComposite - id="feComposite4891" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4891" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.4,0,-4.4901397)" - r="6.09375" - fy="14.457072" - fx="308.97141" - cy="14.457072" - cx="308.97141" + xlink:href="#linearGradient4707" id="radialGradient4901" - xlink:href="#linearGradient4707" /> + cx="308.97141" + cy="14.457072" + fx="308.97141" + fy="14.457072" + r="6.09375" + gradientTransform="matrix(1,0,0,1.4,0,-4.4901397)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4913" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4913"> <feFlood - id="feFlood4903" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4903" /> <feComposite - id="feComposite4905" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4905" /> <feGaussianBlur - id="feGaussianBlur4907" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4907" /> <feOffset - id="feOffset4909" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4909" /> <feComposite - id="feComposite4911" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4911" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - r="8.53125" - fy="13.119289" - fx="331.15933" - cy="13.119289" - cx="331.15933" + xlink:href="#linearGradient4707" id="radialGradient4921" - xlink:href="#linearGradient4707" /> + cx="331.15933" + cy="13.119289" + fx="331.15933" + fy="13.119289" + r="8.53125" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4933" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4933"> <feFlood - id="feFlood4923" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4923" /> <feComposite - id="feComposite4925" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4925" /> <feGaussianBlur - id="feGaussianBlur4927" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4927" /> <feOffset - id="feOffset4929" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4929" /> <feComposite - id="feComposite4931" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4931" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.79035186,0,0,0.15902921,-0.14216924,7.1987363)" - r="6.09375" - fy="11.316628" - fx="353.15076" - cy="11.316628" - cx="353.15076" + xlink:href="#linearGradient4707" id="radialGradient4941" - xlink:href="#linearGradient4707" /> - <radialGradient - gradientUnits="userSpaceOnUse" + cx="353.15076" + cy="11.316628" + fx="353.15076" + fy="11.316628" r="6.09375" - fy="11.407905" - fx="375.97003" - cy="11.407905" - cx="375.97003" - id="radialGradient4949" + gradientTransform="matrix(0.79035186,0,0,0.15902921,-0.14216924,7.1987363)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + gradientTransform="matrix(0.79035186,0,0,0.79514603,-0.14216924,3.8580698e-5)" xlink:href="#linearGradient4707" - gradientTransform="matrix(0.79035186,0,0,0.79514603,-0.14216924,3.8580698e-5)" /> + id="radialGradient4949" + cx="375.97003" + cy="11.407905" + fx="375.97003" + fy="11.407905" + r="6.09375" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.99701325,0,0.03407254)" - r="8.5350475" - fy="13.518586" - fx="400.5007" - cy="13.518586" - cx="400.5007" + xlink:href="#linearGradient4707" id="radialGradient4957" - xlink:href="#linearGradient4707" /> + cx="400.5007" + cy="13.518586" + fx="400.5007" + fy="13.518586" + r="8.5350475" + gradientTransform="matrix(1,0,0,0.99701325,0,0.03407254)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter4969" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4969"> <feFlood - id="feFlood4959" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4959" /> <feComposite - id="feComposite4961" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4961" /> <feGaussianBlur - id="feGaussianBlur4963" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4963" /> <feOffset - id="feOffset4965" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4965" /> <feComposite - id="feComposite4967" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4967" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.357667,-0.02466618,0.02411975,1.3275908,-149.53429,5.1574131)" - r="8.53125" - fy="15.742972" - fx="417.02075" - cy="15.742972" - cx="417.02075" + xlink:href="#linearGradient4975" id="radialGradient4977" - xlink:href="#linearGradient4975" /> + cx="417.02075" + cy="15.742972" + fx="417.02075" + fy="15.742972" + r="8.53125" + gradientTransform="matrix(1.357667,-0.02466618,0.02411975,1.3275908,-149.53429,5.1574131)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4975"> <stop - id="stop4971" + style="stop-color:#f79729;stop-opacity:1" offset="0" - style="stop-color:#f79729;stop-opacity:1" /> + id="stop4971" /> <stop - id="stop4973" + style="stop-color:#d2831f;stop-opacity:1" offset="1" - style="stop-color:#d2831f;stop-opacity:1" /> + id="stop4973" /> </linearGradient> <filter - id="filter4989" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4989"> <feFlood - id="feFlood4979" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4979" /> <feComposite - id="feComposite4981" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4981" /> <feGaussianBlur - id="feGaussianBlur4983" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4983" /> <feOffset - id="feOffset4985" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset4985" /> <feComposite - id="feComposite4987" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4987" /> </filter> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,0.71428563,0,3.2333231)" - r="8.53125" - fy="11.316628" - fx="444.33652" - cy="11.316628" - cx="444.33652" + xlink:href="#linearGradient4707" id="radialGradient4997" - xlink:href="#linearGradient4707" /> + cx="444.33652" + cy="11.316628" + fx="444.33652" + fy="11.316628" + r="8.53125" + gradientTransform="matrix(1,0,0,0.71428563,0,3.2333231)" + gradientUnits="userSpaceOnUse" /> <filter - id="filter5009" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter5009"> <feFlood - id="feFlood4999" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4999" /> <feComposite - id="feComposite5001" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite5001" /> <feGaussianBlur - id="feGaussianBlur5003" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur5003" /> <feOffset - id="feOffset5005" - result="offset" + dx="0" dy="0" - dx="0" /> + result="offset" + id="feOffset5005" /> <feComposite - id="feComposite5007" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite5007" /> </filter> <radialGradient - r="7.9746099" - fy="9" - fx="134.97461" - cy="9" - cx="134.97461" - gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" - gradientUnits="userSpaceOnUse" + xlink:href="#linearGradient4747" id="radialGradient4710" - xlink:href="#linearGradient4747" /> + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="134.97461" + cy="9" + fx="134.97461" + fy="9" + r="7.9746099" /> <linearGradient id="linearGradient4747"> <stop - id="stop4743" + style="stop-color:#c5b631;stop-opacity:1" offset="0" - style="stop-color:#c5b631;stop-opacity:1" /> + id="stop4743" /> <stop - id="stop4745" + style="stop-color:#baad3e;stop-opacity:1" offset="1" - style="stop-color:#baad3e;stop-opacity:1" /> + id="stop4745" /> </linearGradient> <filter - id="filter4729" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4729"> <feFlood - id="feFlood4719" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4719" /> <feComposite - id="feComposite4721" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4721" /> <feGaussianBlur - id="feGaussianBlur4723" - result="blur" + in="composite1" stdDeviation="1" - in="composite1" /> + result="blur" + id="feGaussianBlur4723" /> <feOffset - id="feOffset4725" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4725" /> <feComposite - id="feComposite4727" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4727" /> </filter> <radialGradient - r="7.9746099" - fy="9.0947113" - fx="132.6468" - cy="9.0947113" - cx="132.6468" - gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" - gradientUnits="userSpaceOnUse" + xlink:href="#linearGradient5037" id="radialGradient4712" - xlink:href="#linearGradient5037" /> + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="132.6468" + cy="9.0947113" + fx="132.6468" + fy="9.0947113" + r="7.9746099" /> <filter - id="filter4774" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4774"> <feFlood - id="feFlood4764" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4764" /> <feComposite - id="feComposite4766" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4766" /> <feGaussianBlur - id="feGaussianBlur4768" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4768" /> <feOffset - id="feOffset4770" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4770" /> <feComposite - id="feComposite4772" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4772" /> </filter> <radialGradient - r="7.9746099" - fy="9" - fx="134.97461" - cy="9" - cx="134.97461" - gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" - gradientUnits="userSpaceOnUse" + xlink:href="#linearGradient4747" id="radialGradient4714" - xlink:href="#linearGradient4747" /> - <radialGradient gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,28.000001,0,-310.09784)" - r="0.31640625" - fy="11.485105" - fx="166.37157" - cy="11.485105" - cx="166.37157" + gradientTransform="matrix(1.265625,0,0,1.1109477,-0.05703897,1.4865748)" + cx="134.97461" + cy="9" + fx="134.97461" + fy="9" + r="7.9746099" /> + <radialGradient + xlink:href="#linearGradient4707" id="radialGradient4750" - xlink:href="#linearGradient4707" /> + cx="166.37157" + cy="11.485105" + fx="166.37157" + fy="11.485105" + r="0.31640625" + gradientTransform="matrix(0.99998863,-0.00473886,0.08838422,18.426509,-1.0132111,-199.35688)" + gradientUnits="userSpaceOnUse" /> <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1,0,0,1.0032611,0.11563445,22.233158)" - r="8.3726959" - fy="16.659737" - fx="125.30523" - cy="16.659737" - cx="125.30523" + xlink:href="#linearGradient4832" id="radialGradient4709-1" - xlink:href="#linearGradient4832" /> + cx="125.30523" + cy="16.659737" + fx="125.30523" + fy="16.659737" + r="8.3726959" + gradientTransform="matrix(1,0,0,1.0032611,0.11563445,22.233158)" + gradientUnits="userSpaceOnUse" /> <linearGradient id="linearGradient4832"> <stop - style="stop-color:#22e23d;stop-opacity:1" + id="stop5029" offset="0" - id="stop5029" /> + style="stop-color:#22e23d;stop-opacity:1" /> <stop - style="stop-color:#38a748;stop-opacity:1" + id="stop4830" offset="1" - id="stop4830" /> + style="stop-color:#38a748;stop-opacity:1" /> </linearGradient> <filter - id="filter4844" - style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB" + id="filter4844"> <feFlood - id="feFlood4834" - result="flood" + flood-opacity="0.498039" flood-color="rgb(0,0,0)" - flood-opacity="0.498039" /> + result="flood" + id="feFlood4834" /> <feComposite - id="feComposite4836" - result="composite1" - operator="out" + in="flood" in2="SourceGraphic" - in="flood" /> + operator="out" + result="composite1" + id="feComposite4836" /> <feGaussianBlur - id="feGaussianBlur4838" - result="blur" + in="composite1" stdDeviation="0.5" - in="composite1" /> + result="blur" + id="feGaussianBlur4838" /> <feOffset - id="feOffset4840" - result="offset" + dx="2.77556e-017" dy="0" - dx="2.77556e-017" /> + result="offset" + id="feOffset4840" /> <feComposite - id="feComposite4842" - result="composite2" - operator="atop" + in="offset" in2="SourceGraphic" - in="offset" /> + operator="atop" + result="composite2" + id="feComposite4842" /> </filter> </defs> <g - id="layer1"> + id="g7757"> <path - id="path4" - d="m 17.311578,13.702319 h -5.76 l 2.28,2.28 c 0.6,0.6 0.72,1.44 0.24,1.92 l -0.96,1.08 c -0.48,0.48 -1.32,0.36 -1.92,-0.24 l -6.4800001,-6.6 c -0.12,0 -0.36,-0.48 -0.48,-0.84 0,-0.359999 0.36,-0.719999 0.48,-0.839999 l 6.3600001,-6.48 c 0.6,-0.6000001 1.44,-0.7200001 1.92,-0.24 l 0.96,1.0799999 c 0.48,0.48 0.36,1.32 -0.24,1.9200001 l -2.16,2.1599999 h 5.76 c 0.72,0 1.2,0.48 1.2,1.2000001 v 2.399999 c 0,0.72 -0.48,1.2 -1.2,1.2 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4669);fill-opacity:1;stroke-width:1;filter:url(#filter4701)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="m 17.870749,13.841269 -6.303534,-0.0074 2.264363,2.148431 c 0.615648,0.584128 0.72,1.44 0.24,1.92 l -0.96,1.08 c -0.48,0.48 -1.32,0.36 -1.92,-0.24 0,0 -6.4200001,-6.6 -6.4800001,-6.6 -0.06,0 -0.36,-0.48 -0.48,-0.84 0,-0.359999 0.36,-0.719999 0.48,-0.839999 l 6.3600001,-6.48 c 0.6,-0.6000001 1.44,-0.7200001 1.92,-0.24 l 0.96,1.0799999 c 0.48,0.48 0.36,1.32 -0.24,1.9200001 l -2.144363,2.0610645 6.359451,0.043374 c 0.719983,0.00491 1.227959,0.50779 1.227959,1.2277905 v 2.483369 c 0,0.72 -0.563877,1.284215 -1.283876,1.28337 z" + id="path4" /> <path - d="m 19.271765,37.987692 h -7.987059 l 3.607059,3.507571 c 0.515294,0.50108 0.644117,1.377974 0.257648,1.753785 l -1.545884,1.503245 C 13.217059,45.128104 12.315294,45.128104 11.8,44.501752 L 3.5552941,36.609718 c 0,0 -0.5152941,-0.626352 -0.5152941,-1.127434 0,-0.501081 0.5152941,-1.002163 0.5152941,-1.002163 L 11.8,26.462816 c 0.515294,-0.50108 1.417059,-0.626351 1.803529,-0.25054 l 1.545884,1.503245 c 0.386469,0.375811 0.386469,1.252704 -0.257648,1.753785 l -3.478236,3.50757 h 7.858236 c 0.772941,0 1.288236,0.501082 1.288236,1.252705 v 2.505407 c 0,0.751622 -0.515295,1.252704 -1.288236,1.252704 z" - id="path4154" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4637);fill-opacity:1;stroke-width:1;filter:url(#filter4661)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4154" + d="m 19.187889,37.765372 -7.620674,-0.0365 3.352509,3.266174 c 0.515294,0.50108 0.829738,1.388534 0.443269,1.764345 l -1.759464,1.992905 c -0.356609,0.403923 -1.52102,-0.108922 -2.036314,-0.735274 L 3.9756591,36.471238 c 0,0 -0.7399492,-0.710192 -0.7399492,-1.211274 0,-0.501081 0.7399492,-1.303987 0.7399492,-1.303987 l 7.5915559,-7.545783 c 0.515294,-0.50108 1.613776,-1.093109 1.980397,-0.698138 l 1.815381,1.955768 c 0.386469,0.375811 0.172889,1.300401 -0.471228,1.801482 l -3.32455,3.229041 7.620674,0.02842 c 0.772936,0.0029 1.344153,0.417712 1.344153,1.169335 v 2.560987 c 0,0.751622 -0.571221,1.311987 -1.344153,1.308283 z" /> <path - d="m 26.86,12.501265 v -2.4 c 0,-0.7200003 0.48,-1.2000003 1.2,-1.2000003 h 5.76 L 31.66,6.7412646 c -0.6,-0.5999999 -0.72,-1.4399999 -0.24,-1.92 l 0.96,-1.08 c 0.48,-0.48 1.32,-0.36 1.92,0.24 l 6.36,6.4800004 c 0.12,0.12 0.48,0.48 0.48,0.84 0,0.36 -0.36,0.84 -0.48,0.84 l -6.48,6.48 c -0.6,0.6 -1.44,0.72 -1.92,0.24 l -0.96,-1.08 c -0.48,-0.48 -0.36,-1.32 0.24,-1.92 l 2.28,-2.16 h -5.76 c -0.72,0 -1.2,-0.48 -1.2,-1.2 z" - id="path4165" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4677);fill-opacity:1;stroke-width:1;filter:url(#filter4689)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4165" + d="m 26.776124,12.612425 v -2.53895 c 0,-0.7200003 0.480206,-1.3282747 1.2,-1.3111602 l 5.76,0.041051 L 31.66,6.7412646 c -0.602042,-0.5979755 -0.72,-1.4399999 -0.24,-1.92 l 0.96,-1.08 c 0.48,-0.48 1.32,-0.36 1.92,0.24 l 6.36,6.4800004 c 0.12,0.12 0.48,0.48 0.48,0.84 0,0.36 -0.36,0.84 -0.48,0.84 l -6.48,6.48 c -0.6,0.6 -1.44,0.72 -1.92,0.24 l -0.96,-1.08 c -0.48,-0.48 -0.36,-1.32 0.24,-1.92 L 33.736124,13.833888 28.06,13.868005 c -0.719987,0.0043 -1.283876,-0.53558 -1.283876,-1.25558 z" /> <path - d="m 64.48,6.6012647 -5.039999,5.0400003 5.039999,5.04 -2.519999,2.52 -5.16,-4.92 -5.04,5.04 -2.52,-2.52 5.04,-5.16 -5.16,-5.0400003 2.52,-2.5200001 5.16,5.04 5.04,-5.04 z" - id="path4176" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4605);fill-opacity:1;stroke-width:1;filter:url(#filter4629)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4176" + d="m 64.708108,6.2881044 -5.061037,5.0305226 5.061037,5.030522 -2.530518,2.515261 -5.061038,-5.030522 -5.061037,5.030522 -2.530519,-2.515261 5.061037,-5.030522 -5.061037,-5.0305226 2.530519,-2.5152612 5.061037,5.0305223 5.061038,-5.0305223 z" /> <path - d="m 87.000001,11.301265 h -8.4 l 3.36,-3.3600004 c -0.84,-0.6 -1.68,-0.84 -2.76,-0.84 -2.64,0 -4.8,2.1600001 -4.8,4.8000004 0,2.64 2.16,4.8 4.8,4.8 1.68,0 3.24,-0.84 4.08,-2.28 l 2.76,1.2 c -1.32,2.4 -3.84,4.08 -6.84,4.08 -4.32,0 -7.8,-3.48 -7.8,-7.8 0,-4.3200004 3.48,-7.8000004 7.8,-7.8000004 1.8,0 3.48,0.6 4.92,1.6800001 l 2.88,-2.8800001 z" - id="path4187" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4525);fill-opacity:1;stroke-width:1;filter:url(#filter4597)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4187" + d="m 87.482777,11.318627 h -8.856816 l 3.13833,-3.0716727 C 81.15648,7.545735 80.363876,6.712205 79.283876,6.712205 c -2.64,0 -5.107543,1.9376803 -5.107543,4.577681 0,2.64 2.411627,5.050109 5.051627,5.050109 1.68,0 3.619039,-1.066107 4.459039,-2.506107 l 2.530518,1.25763 c -1.32,2.4 -3.961599,4.443007 -6.961599,4.443007 -4.32,0 -8.219378,-3.896849 -8.219378,-8.216849 0,-4.3200008 3.927337,-7.633261 8.247337,-7.633261 1.8,0 3.619792,0.8778997 5.059792,1.9578998 l 3.139108,-3.1271021 z" /> <path - id="path4209" - d="M 102.59961,2.7011715 93,11.101561 h 2.400391 l 1.242188,-0.03516 -0.04297,0.03516 v 8.400392 h 4.800781 v -6.000001 h 2.40039 v 6.000001 h 4.79884 v -8.400392 l -0.043,-0.03516 1.24415,0.03516 h 2.39843 z" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4529);fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1;filter:url(#filter4783)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + d="M 102.66589,2.5152127 92.543814,11.318627 h 3.795778 v 7.545783 h 5.061038 v -5.030522 h 2.53052 v 5.030522 h 5.06104 v -7.545783 h 3.79577 z" + id="path4209" /> <path - d="m 133.15407,12.421265 -6.72001,6.6 c -0.24,0.36 -0.72,0.48 -1.2,0.48 -0.48,0 -0.96,-0.12 -1.32,-0.48 l -6.72,-6.6 c -0.6,-0.72 -0.48,-1.32 0.48,-1.32 h 3.96 V 3.9012646 c 0,-0.72 0.48,-1.2 1.2,-1.2 h 4.8 c 0.72,0 1.2,0.48 1.2,1.2 v 7.2000004 h 3.84 c 0.96001,0 1.20001,0.6 0.48001,1.32 z" - id="path4214" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4709);fill-opacity:1;stroke-width:1;filter:url(#filter4721)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4214" + d="m 133.03211,12.576257 -6.32629,6.288153 c -0.24,0.36 -0.82401,0.692435 -1.30401,0.692435 -0.48,0 -0.86651,-0.332435 -1.22651,-0.692435 l -6.3263,-6.288153 c -0.79571,-0.72 -0.93921,-1.286268 0.0208,-1.280462 l 3.77501,0.02283 -0.0107,-7.5841022 c -0.001,-0.7199993 0.50796,-1.1722101 1.22796,-1.1722101 h 5.10754 c 0.72,0 1.22426,0.4800094 1.22796,1.2 l 0.0388,7.5563123 3.80118,-0.05062 c 0.95992,-0.01278 0.71459,0.588252 -0.005,1.308252 z" /> <path - d="m 148,19.881265 c -4.8,0 -8.64,-3.84 -8.64,-8.64 0,-4.6800004 3.84,-8.5200004 8.64,-8.5200004 4.8,0 8.64001,3.84 8.64001,8.6400004 0,4.68 -3.84001,8.52 -8.64001,8.52 z m 0,-14.5200003 c -3.36,0 -6,2.6399999 -6,6.0000003 0,3.24 2.64,6 6,6 3.36,0 6.00001,-2.64 6.00001,-6 0,-3.3600004 -2.64001,-6.0000003 -6.00001,-6.0000003 z m -0.36,7.0800003 c -0.48,-0.12 -0.84,-0.6 -0.84,-1.08 V 7.7612646 c 0,-0.72 0.48,-1.2 1.2,-1.2 0.72,0 1.2,0.48 1.2,1.2 v 3.3600004 c 1.32,1.32 2.4,3.84 2.4,3.84 0,0 -2.64,-1.2 -3.96,-2.52 z" - id="path4225" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4729);fill-opacity:1;stroke-width:1;filter:url(#filter4741)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4225" + d="m 148.19571,20.103585 c -4.8,0 -8.89163,-3.97895 -8.89163,-8.77895 0,-4.6800005 4.11959,-8.7145303 8.91959,-8.7145303 4.8,0 8.80776,3.9511599 8.80776,8.7511603 0,4.68 -4.03572,8.74232 -8.83572,8.74232 z m 0.0559,-15.04801 c -3.36,0 -6.39142,2.9178996 -6.39142,6.2779 0,3.24 2.9755,6.22232 6.3355,6.22232 3.36,0 6.33551,-2.86232 6.33551,-6.22232 0,-3.3600004 -2.91959,-6.2779 -6.27959,-6.2779 z m -0.63959,7.520682 c -0.48,-0.12 -0.63716,-0.735044 -0.64429,-1.214992 l -0.0559,-3.7667402 c -0.0107,-0.7199217 0.53592,-1.28337 1.25592,-1.28337 0.72,0 1.27834,0.535601 1.28388,1.25558 l 0.0289,3.7518922 c 1.32,1.32 2.53051,3.772891 2.53051,3.772891 0,0 -3.07896,-1.195261 -4.39896,-2.515261 z" /> <path - d="m 369.00476,4.7878231 0.94842,1.9083504 0.47422,0.858758 0.94842,0.190835 2.18136,0.3816699 -1.61231,1.7175156 -0.6639,0.667923 0.0948,0.954175 0.37937,2.290022 -1.89685,-0.954178 -0.85358,-0.477086 -0.85358,0.477086 -1.89685,0.954178 0.37938,-2.290022 0.0948,-0.954175 -0.6639,-0.667923 -1.61232,-1.7175156 2.27622,-0.3816699 0.94842,-0.190835 0.37936,-0.858758 0.94843,-1.9083504 m 0,-3.4350309 c -0.28454,0 -0.56906,0.1908348 -0.75874,0.667922 l -1.89683,3.9121193 -4.07821,0.6679227 c -0.94842,0.190835 -1.13812,0.8587576 -0.47421,1.5266802 l 2.94011,3.1487776 -0.66391,4.389208 c -0.0948,0.572504 0.1897,0.954174 0.66391,0.954174 0.18967,0 0.37936,-0.09542 0.56905,-0.190835 l 3.69885,-2.003768 3.69884,2.003768 c 0.18969,0.09543 0.47421,0.190835 0.56906,0.190835 0.4742,0 0.75873,-0.38167 0.6639,-1.049592 l -0.6639,-4.389207 2.9401,-3.1487781 c 0.66391,-0.6679226 0.37938,-1.3358454 -0.4742,-1.5266803 L 371.66031,5.837416 369.76347,1.9252968 C 369.5738,1.543627 369.28926,1.3527922 369.00474,1.3527922 Z" + style="display:inline;fill:url(#radialGradient5017);fill-opacity:1;stroke-width:0.79274529" id="path4355" - style="display:inline;fill:url(#radialGradient5017);fill-opacity:1;stroke-width:0.79274529" /> + d="m 369.00476,4.7878231 0.94842,1.9083504 0.47422,0.858758 0.94842,0.190835 2.18136,0.3816699 -1.61231,1.7175156 -0.6639,0.667923 0.0948,0.954175 0.37937,2.290022 -1.89685,-0.954178 -0.85358,-0.477086 -0.85358,0.477086 -1.89685,0.954178 0.37938,-2.290022 0.0948,-0.954175 -0.6639,-0.667923 -1.61232,-1.7175156 2.27622,-0.3816699 0.94842,-0.190835 0.37936,-0.858758 0.94843,-1.9083504 m 0,-3.4350309 c -0.28454,0 -0.56906,0.1908348 -0.75874,0.667922 l -1.89683,3.9121193 -4.07821,0.6679227 c -0.94842,0.190835 -1.13812,0.8587576 -0.47421,1.5266802 l 2.94011,3.1487776 -0.66391,4.389208 c -0.0948,0.572504 0.1897,0.954174 0.66391,0.954174 0.18967,0 0.37936,-0.09542 0.56905,-0.190835 l 3.69885,-2.003768 3.69884,2.003768 c 0.18969,0.09543 0.47421,0.190835 0.56906,0.190835 0.4742,0 0.75873,-0.38167 0.6639,-1.049592 l -0.6639,-4.389207 2.9401,-3.1487781 c 0.66391,-0.6679226 0.37938,-1.3358454 -0.4742,-1.5266803 L 371.66031,5.837416 369.76347,1.9252968 C 369.5738,1.543627 369.28926,1.3527922 369.00474,1.3527922 Z" /> <path - d="m 202,17.101265 h -2.4 l 1.2,2.4 h -14.39999 l 1.2,-2.4 h -2.4 c -0.72,0 -1.2,-0.48 -1.2,-1.2 V 9.9012647 c 0,-0.7200001 0.48,-1.2000001 1.2,-1.2000001 h 1.2 V 6.3012647 c 0,-0.7200001 0.48,-1.2000001 1.2,-1.2000001 v -1.2 c 0,-0.72 0.48,-1.2 1.2,-1.2 H 198.4 c 0.72,0 1.2,0.48 1.2,1.2 v 1.2 c 0.72,0 1.2,0.48 1.2,1.2000001 v 2.3999999 h 1.2 c 0.72,0 1.2,0.48 1.2,1.2000001 v 6.0000003 c 0,0.72 -0.48,1.2 -1.2,1.2 z m -14.39999,0 0.6,-1.2 h -0.6 z m 0.6,-6 h -0.6 -0.6 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z M 198.4,5.1012646 c 0,-0.72 -0.48,-1.2 -1.2,-1.2 h -7.19999 c -0.72,0 -1.2,0.48 -1.2,1.2 v 3.6 c 0,0.7200001 0.48,1.2000001 1.2,1.2000001 H 197.2 c 0.72,0 1.2,-0.48 1.2,-1.2000001 z m -1.08,10.8000004 h -7.43999 l -1.08,2.4 H 198.4 Z m 2.28,0 H 199 l 0.6,1.2 z" - id="path4366" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4793);fill-opacity:1;stroke-width:1;filter:url(#filter4805)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4366" + d="m 202.62125,17.648005 -2.53039,-0.04122 1.26526,2.515261 h -15.18311 l 1.26526,-2.515261 -2.51784,0.02249 c -0.71997,0.0064 -1.31817,-0.563397 -1.31184,-1.28337 l 0.0559,-6.3612693 c 0.006,-0.7199727 0.59192,-1.2112687 1.31183,-1.2000001 l 1.19667,0.018731 0.0313,-2.5298907 c 0.009,-0.7199457 0.51397,-1.243001 1.23397,-1.243001 l 0.022,-1.2403691 c 0.0127,-0.7198886 0.6198,-1.2535885 1.33979,-1.2555799 l 10.04733,-0.02779 c 0.72,-0.00199 1.21931,0.5078413 1.22796,1.22779 l 0.0156,1.295949 c 0.72,0 1.2692,0.5785813 1.26831,1.2985809 l -0.003,2.4743108 1.26513,-10e-8 c 0.71992,-0.010711 1.26205,0.5376375 1.26526,1.2576305 v 6.288153 c 0,0.729621 -0.61509,1.257631 -1.26526,1.257631 z m -15.18298,-0.04122 1.26526,-2.515262 h -1.26526 z m 0.6,-6.288153 h -0.6 -0.6 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.25348,-0.503016 -0.6,-0.6 z M 198.8256,5.0304738 c 0,-0.72 -0.54528,-1.2523398 -1.26526,-1.2576306 h -7.59155 c -0.71998,-0.00529 -1.28117,0.5378043 -1.26526,1.2576306 v 3.7728917 c 0.0159,0.7198264 0.54528,1.2629215 1.26526,1.2576305 h 7.59155 c 0.71999,-0.0053 1.24942,-0.5078188 1.25592,-1.2277899 z m -1.26526,10.0610482 h -7.59155 l -1.26526,3.772892 h 10.12207 z m 2.53052,0 h -1.26526 l 1.26526,2.515262 z" /> <path - d="m 247,19.501265 h -15.6 c -0.96,0 -1.8,-0.84 -1.8,-1.8 V 4.5012646 c 0,-0.9599999 0.84,-1.8 1.8,-1.8 H 247 c 0.96,0 1.8,0.8400001 1.8,1.8 V 17.701265 c 0,0.96 -0.84,1.8 -1.8,1.8 z M 239.8,3.9012646 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 2.28,0 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.36,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 3.72,0 h -1.2 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 0.6,4.8 c 0,-0.72 -0.48,-1.1999999 -1.2,-1.1999999 h -12 c -0.72,0 -1.2,0.4799999 -1.2,1.1999999 v 7.2000004 c 0,0.72 0.48,1.2 1.2,1.2 h 12 c 0.72,0 1.2,-0.48 1.2,-1.2 z" - id="path4388" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4833);fill-opacity:1;stroke-width:1;filter:url(#filter4853)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> - <text - transform="scale(0.98484982,1.0153832)" - id="text4409" - y="12.608931" - x="188.06316" + id="path4388" + d="m 248.17426,18.945466 -16.43876,-0.02779 c -0.96,-0.0016 -1.40468,-0.339789 -1.40858,-1.299781 l -0.0559,-13.7557998 c -0.004,-0.959992 0.47654,-1.3847678 1.43653,-1.3831504 l 16.49468,0.02779 c 0.96,0.00162 1.24473,0.3675784 1.24083,1.3275705 l -0.0559,13.7557997 c -0.004,0.959992 -0.25287,1.356983 -1.21287,1.355361 z M 239.88388,3.8178947 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 2.64346,0 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.36,0.6 0.6,0.6 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 3.72,0 h -1.2 c -0.36,0 -0.6,0.24 -0.6,0.6 0,0.36 0.24,0.6 0.6,0.6 h 1.2 c 0.36,0 0.6,-0.24 0.6,-0.6 0,-0.36 -0.24,-0.6 -0.6,-0.6 z m 0.65592,4.9945298 c 0.005,-0.7199803 -0.53592,-1.2538267 -1.25592,-1.2555798 l -11.41287,-0.02779 c -0.72,-0.00175 -1.22533,0.5077946 -1.22796,1.2277899 l -0.028,7.6724304 c -0.003,0.719994 0.50796,1.175707 1.22795,1.172209 l 11.44083,-0.05558 c 0.71999,-0.0035 1.19464,-0.507809 1.2,-1.227789 z" /> + <g + aria-label="+" + transform="scale(0.98484984,1.0153832)" style="font-style:normal;font-weight:normal;font-size:9.51294327px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:url(#radialGradient4841);fill-opacity:1;stroke:none;stroke-width:0.79274535px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - xml:space="preserve"><tspan + id="text4409"> + <path + d="m 194.95358,9.8484986 h -2.03077 v 1.9696994 h -1.01538 V 9.8484986 h -2.03077 V 8.8636487 h 2.03077 V 6.893949 h 1.01538 v 1.9696997 h 2.03077 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:8.55116463px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#radialGradient4841);fill-opacity:1;stroke-width:0.79274535px" - y="12.608931" - x="188.06316" - id="tspan4411">+</tspan></text> + id="path7725" /> + </g> <path - style="display:inline;fill:url(#radialGradient5031);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5049)" - id="path6182" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" d="m 467.25784,24.196945 c -0.36562,0 -0.73125,0.24375 -0.975,0.853125 l -2.4375,4.996876 -5.24062,0.853125 c -1.21875,0.24375 -1.4625,1.096875 -0.60938,1.95 l 3.77813,4.021875 -0.85313,5.60625 c -0.12181,0.73125 0.24375,1.21875 0.85313,1.21875 0.24375,0 0.4875,-0.121875 0.73125,-0.24375 l 4.75312,-2.559375 4.75313,2.559375 c 0.24375,0.121875 0.60937,0.24375 0.73125,0.24375 0.60937,0 0.975,-0.4875 0.85312,-1.340625 l -0.85312,-5.60625 3.77812,-4.021875 c 0.85313,-0.853125 0.4875,-1.70625 -0.60937,-1.95 l -5.24063,-0.853125 -2.4375,-4.996876 c -0.24375,-0.4875 -0.60937,-0.73125 -0.975,-0.73125 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path6182" + style="display:inline;fill:url(#radialGradient5031);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5049)" /> <path - style="display:inline;fill:url(#radialGradient4813);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4825)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 226.66131,15.091518 -0.0388,3.707848 c -0.007,0.673061 -0.5177,1.245488 -1.19079,1.24654 l -17.77799,0.02779 c -0.6731,0.0011 -1.2416,-0.573462 -1.24671,-1.24654 l -0.028,-3.688049 c -0.005,-0.673078 0.6302,-1.305219 1.30331,-1.305219 1.26531,-1.257631 1.03718,-3.269047 1.26531,-5.0305225 0.4278,-2.8226251 0.0953,-6.2244545 3.80878,-6.2479747 l 7.52682,-0.047673 c 3.73297,-0.023644 3.4173,3.4730226 3.84751,6.2956477 0.41438,2.7153765 0,3.7728915 1.26526,5.0305225 0.70548,0 1.26526,0.515815 1.26526,1.25763 z m -7.68106,-4.410561 h -1.82811 V 8.8528316 c 0,-0.8124995 -1.21875,-0.8124995 -1.21875,0 v 1.8281254 h -1.82814 c -0.8125,0 -0.8125,1.218749 0,1.218749 h 1.82814 v 1.828125 c 0,0.812501 1.21875,0.812501 1.21875,0 v -1.828125 h 1.82811 c 0.8125,0 0.8125,-1.218749 0,-1.218749 z" id="path7318" - d="m 226.73438,15.945016 v 2.437501 c 0,0.673097 -0.54566,1.21875 -1.21875,1.21875 h -18.28124 c -0.67311,0 -1.21875,-0.545653 -1.21875,-1.21875 v -2.437501 c 0,-0.673097 0.54564,-1.21875 1.21875,-1.21875 h -1.04571 c 2.80313,0 2.36053,-3.256168 2.77368,-5.9703239 0.4278,-2.8226251 0.1927,-6.1069689 3.90598,-6.0616014 l 7.47091,0.091277 c 3.73276,0.045605 3.22143,3.1476992 3.65164,5.9703243 0.41438,2.715376 -0.20346,5.970324 2.60942,5.970324 h -1.08468 c 0.67309,0 1.21875,0.545653 1.21875,1.21875 z m -7.92188,-4.874999 h -1.82811 V 9.2418912 c 0,-0.8124995 -1.21875,-0.8124995 -1.21875,0 v 1.8281258 h -1.82814 c -0.8125,0 -0.8125,1.218749 0,1.218749 h 1.82814 v 1.828125 c 0,0.812501 1.21875,0.812501 1.21875,0 v -1.828125 h 1.82811 c 0.8125,0 0.8125,-1.218749 0,-1.218749 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4813);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4825)" /> <path - style="display:inline;fill:url(#radialGradient4861);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4873)" - id="path7886" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" d="m 269.02823,19.939154 c -0.975,0 -1.82813,-0.24375 -2.80313,-1.584375 -0.975,-1.340625 -2.07187,-3.046875 -2.07187,-3.046875 0,0 -0.85313,-1.096875 -1.34063,-1.95 -0.60937,-0.853125 -1.34062,-0.609375 -1.34062,-0.609375 0,0 -3.53438,-5.7281239 -4.14375,-6.581249 -0.73125,-1.21875 0.73125,-3.290625 0.73125,-3.290625 l 5.3625,8.531249 c 0,0 1.70625,2.315625 2.31562,2.803125 0.60938,0.4875 1.70625,-0.4875 3.4125,1.096875 2.31563,2.19375 1.58438,4.63125 -0.12181,4.63125 z m -0.36563,-3.534375 c -1.09687,-1.21875 -2.07187,-1.096875 -2.31562,-0.73125 -0.24375,0.365625 0,1.4625 0.4875,2.071875 0.4875,0.609375 0.975,0.853125 1.70625,0.853125 0.73125,0.121875 1.34062,-0.853125 0.1218,-2.19375 z m -4.63125,-5.728124 -1.4625,-2.19375 3.53438,-5.60625 c 0,0 1.4625,2.071875 0.73125,3.290625 -0.36563,0.4875001 -1.70625,2.803125 -2.80313,4.509375 z m -5.60625,3.534374 c 0.36563,-0.365625 1.21875,-1.340625 1.70625,-2.071875 l 0.975,1.4625 c -0.4875,0.73125 -1.09687,1.70625 -1.09687,1.70625 0,0 -1.09688,1.70625 -2.07188,3.046875 -0.85312,1.340625 -1.70625,1.584375 -2.80312,1.584375 -1.70625,0 -2.55938,-2.4375 -0.12181,-4.63125 1.70625,-1.4625 2.80312,-0.609375 3.4125,-1.096875 z m -2.925,2.19375 c -1.09687,1.21875 -0.4875,2.19375 0.24375,2.19375 0.73125,0 1.21875,-0.24375 1.70625,-0.853125 0.4875,-0.609375 0.73125,-1.828125 0.4875,-2.071875 -0.36562,-0.365625 -1.34062,-0.4875 -2.4375,0.73125 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path7886" + style="display:inline;fill:url(#radialGradient4861);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4873)" /> <path - style="display:inline;fill:url(#radialGradient4881);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4893)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 292.45286,20.11787 -7.56413,0 c -0.73125,0 -1.32549,-0.515308 -1.33058,-1.24654 l -0.028,-4.017519 v -3.16875 -2.9250003 c 0,-0.73125 0.4875,-1.21875 1.21875,-1.21875 l 6.44059,0.00442 2.53052,2.515261 0.0354,8.810334 c 0.003,0.731244 -0.57138,1.24654 -1.30263,1.24654 z M 289.62394,8.7600607 v 2.4375003 h 2.4375 z m -7.3125,-0.6736655 0.0213,0.7169703 v 2.5152615 3.772891 l -5.06403,0.04019 c -0.73123,0.0058 -1.21672,-0.598663 -1.21875,-1.32991 l -0.028,-10.0556901 c -0.002,-0.7312471 0.4875,-1.21875 1.21875,-1.21875 h 6.09375 l 2.79402,2.5031129 v 1.81343 h -2.53052 c -0.67317,-0.017075 -1.31624,0.241688 -1.28654,1.2424914 z m 0.0213,-4.7304016 v 2.4596813 l 2.53052,-0.02779 z" id="path8454" - d="m 292.00552,19.7566 h -7.3125 c -0.73125,0 -1.21875,-0.4875 -1.21875,-1.21875 v -3.656249 -3.16875 -2.9250003 c 0,-0.73125 0.4875,-1.21875 1.21875,-1.21875 0,0 3.9,0 6.09375,0 0,0 2.4375,2.4375003 2.4375,2.4375003 0,2.68125 0,8.531249 0,8.531249 0,0.73125 -0.4875,1.21875 -1.21875,1.21875 z m -2.4375,-10.9687493 v 2.4375003 h 2.4375 z m -7.3125,-1.3406249 v 1.3406249 2.3156253 3.778125 h -4.875 c -0.73125,0 -1.21875,-0.4875 -1.21875,-1.21875 V 3.9128507 c 0,-0.7312499 0.4875,-1.21875 1.21875,-1.21875 0,0 3.9,0 6.09375,0 0,0 2.4375,2.4375 2.4375,2.4375 0,0.4875 0,0.9750001 0,1.5843751 h -3.04688 c -0.36562,0.121875 -0.60937,0.365625 -0.60937,0.73125 z m 0,-3.5343751 v 2.4375001 h 2.4375 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4881);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4893)" /> <path - style="display:inline;fill:url(#radialGradient4901);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4913)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 312.76384,20.20124 -10.1808,-0.02779 c -0.75126,-0.0021 -1.21143,-0.547743 -1.21303,-1.272325 l -0.028,-12.6083588 c -0.002,-0.9749978 0.29395,-1.2762443 1.26895,-1.2723257 l 2.49639,0.010033 c 0,0 0.0587,-2.5309032 2.49616,-2.5309032 2.4375,0 2.56487,2.5309032 2.56487,2.5309032 l 2.48359,0.017757 c 0.97497,0.00697 1.35938,0.3251372 1.35283,1.3001156 l -0.0839,12.4971989 c -0.005,0.808245 -0.51762,1.35744 -1.15713,1.355695 z m -1.86968,-13.8508896 -1.34061,-0.609375 c 0,0 0,-1.8281249 -1.95,-1.8281249 -1.95,0 -1.95,1.8281249 -1.95,1.8281249 l -1.34063,0.609375 -0.47079,1.1953846 h 7.59155 z m 0.53952,2.4530151 h -6.32629 l -2.53052,2.5152615 2.53052,5.030522 7.59155,-5.030522 z" id="path9022" - d="m 311.86917,19.7566 h -8.53125 c -0.97501,0 -1.82812,-0.853125 -1.82812,-1.828124 V 6.9597255 c 0,-0.9750001 0.85311,-1.8281251 1.82812,-1.8281251 h 1.82813 c 0,0 0,-2.4375 2.4375,-2.4375 2.4375,0 2.4375,2.4375 2.4375,2.4375 h 1.82812 c 0.975,0 1.82813,0.853125 1.82813,1.8281251 V 17.928476 c 0,0.974999 -0.85313,1.828124 -1.82813,1.828124 z m -0.97501,-13.4062496 -1.34061,-0.609375 c 0,0 0,-1.8281249 -1.95,-1.8281249 -1.95,0 -1.95,1.8281249 -1.95,1.8281249 l -1.34063,0.609375 -0.60937,1.2187501 h 3.04687 3.9 0.975 z m 0.12182,2.071875 h -5.72812 l -3.65625,2.0718756 3.4125,5.971875 8.04375,-4.63125 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4901);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4913)" /> <path - style="display:inline;fill:url(#radialGradient4921);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4933)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="M 335.47361,15.091518 V 7.545735 l 3.79578,3.772892 z m -8.85681,1.257631 h 7.59155 l -3.79578,3.772892 z m 6.32629,-1.257631 h -5.06103 c -0.73124,-0.0041 -1.26114,-0.526392 -1.26526,-1.25763 V 8.8033655 c -0.004,-0.7312386 0.53401,-1.2576305 1.26526,-1.2576305 h 5.06103 c 0.73125,0 1.26526,0.5263804 1.26526,1.2576305 v 5.0305225 c 0,0.609375 -0.53402,1.261705 -1.26526,1.25763 z m 0,-3.772891 c 0,-0.73125 -0.53401,-1.257631 -1.26526,-1.257631 h -2.53052 c -0.73125,0 -1.26525,0.526381 -1.26525,1.257631 v 1.25763 c 0,0.73125 0.534,1.257631 1.26525,1.257631 h 2.53052 c 0.73125,0 1.26526,-0.526381 1.26526,-1.257631 z m -2.53052,-8.8034143 3.79578,3.7728917 h -7.59155 z m -5.06103,5.0305223 v 7.545783 l -3.79578,-3.772891 z" id="path9590" - d="M 335.29779,14.881601 V 7.5691009 l 3.65625,3.6562501 z m -8.53125,1.21875 h 7.3125 l -3.65625,3.656249 z m 6.09375,-1.21875 h -4.875 c -0.73125,0 -1.21875,-0.4875 -1.21875,-1.21875 v -4.875 c 0,-0.7312501 0.4875,-1.2187501 1.21875,-1.2187501 h 4.875 c 0.73125,0 1.21875,0.4875 1.21875,1.2187501 v 4.875 c 0,0.609375 -0.4875,1.21875 -1.21875,1.21875 z m 0,-3.65625 c 0,-0.73125 -0.4875,-1.21875 -1.21875,-1.21875 h -2.4375 c -0.73125,0 -1.21875,0.4875 -1.21875,1.21875 v 1.21875 c 0,0.73125 0.4875,1.21875 1.21875,1.21875 h 2.4375 c 0.73125,0 1.21875,-0.4875 1.21875,-1.21875 z m -2.4375,-8.5312501 3.65625,3.6562501 h -7.3125 z m -4.875,4.875 v 7.3125001 l -3.65625,-3.65625 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4921);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4933)" /> <path - style="display:inline;fill:url(#radialGradient4941);fill-opacity:1;stroke-width:0.96615839" + d="m 274,8 h 10 v 2 h -10 z" id="path10158" - d="m 274.15498,8.0293266 h 9.6324 v 1.9381685 h -9.6324 z" /> + style="display:inline;fill:url(#radialGradient4941);fill-opacity:1;stroke-width:0.96615839" /> <path - style="display:inline;fill:url(#radialGradient4949);fill-opacity:1;stroke-width:0.96615839" + d="m 302,10 h -4 v 4 h -2 v -4 h -4 V 8 h 4 V 4 h 2 v 4 h 4 z" id="path10726" - d="m 301.82263,10.040073 h -3.85298 v 3.876338 h -1.92648 v -3.876338 h -3.85298 V 8.1019059 h 3.85298 V 4.2255681 h 1.92648 v 3.8763378 h 3.85298 z" /> + style="display:inline;fill:url(#radialGradient4949);fill-opacity:1;stroke-width:0.96615839" /> <path - style="display:inline;fill:url(#radialGradient4957);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4969)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 406.82037,12.583531 c -0.12181,0.73125 -0.24375,1.4625 -0.4875,2.071875 -0.4875,1.584375 -1.4625,3.046875 -3.04686,4.021874 0.4875,0.4875 1.58436,1.096875 1.58436,1.096875 0,0 -2.4375,0.365625 -4.99686,0.365625 l -0.12181,-0.121875 v 0.121875 c -1.21875,0 -2.4375,-0.365625 -3.65625,-0.73125 0.85311,-0.73125 1.4625,-1.584374 1.95,-2.559374 0.73125,-1.4625 0.73125,-3.65625 0.73125,-3.65625 0,0 1.09686,1.828125 1.70625,2.559375 1.4625,-0.73125 2.4375,-2.19375 2.55936,-3.65625 0.12181,-1.096875 -0.24375,-2.071875 -0.73125,-2.8031253 -0.4875,-0.8531251 -1.21875,-1.3406251 -2.07186,-1.7062501 0.24375,-0.4874999 0.60936,-1.0968749 0.975,-1.584375 0.4875,-0.73125 1.09686,-1.21875 1.58436,-1.4625 2.55939,1.340625 4.3875,4.5093751 4.02189,8.0437504 z m -8.53125,-2.4375 c 0,0 -1.34061,-1.8281254 -1.95,-2.4375004 -1.70625,0.853125 -2.68125,2.4375004 -2.68125,4.1437504 0.12181,1.828125 1.34064,3.290625 2.925,4.021875 -0.36561,0.609375 -0.73125,1.21875 -1.21875,1.70625 -0.4875,0.609375 -1.09686,0.974999 -1.4625,1.340624 -2.80311,-1.706249 -4.50936,-4.874999 -4.02186,-8.287499 0.1218,-0.8531253 0.36561,-1.7062504 0.60936,-2.4375004 0.4875,-1.3406249 1.34064,-2.4375 2.55939,-3.290625 0.1218,-0.121875 0.24375,-0.121875 0.36561,-0.24375 -0.4875,-0.4875 -1.95,-0.975 -1.95,-0.975 0,0 3.04689,-0.975 8.2875,-0.365625 -1.58436,2.315625 -1.4625,6.8250004 -1.4625,6.8250004 z" id="path11294" - d="m 407.09514,12.361211 c -0.12181,0.73125 -0.24375,1.4625 -0.4875,2.071875 -0.4875,1.584375 -1.4625,3.046875 -3.04686,4.021874 0.4875,0.4875 1.58436,1.096875 1.58436,1.096875 0,0 -2.4375,0.365625 -4.99686,0.365625 0,0 -0.12181,-0.121875 -0.12181,-0.121875 v 0.121875 c -1.21875,0 -2.4375,-0.365625 -3.65625,-0.73125 0.85311,-0.73125 1.4625,-1.584374 1.95,-2.559374 0.73125,-1.4625 0.73125,-3.65625 0.73125,-3.65625 0,0 1.09686,1.828125 1.70625,2.559375 1.4625,-0.73125 2.4375,-2.19375 2.55936,-3.65625 0.12181,-1.096875 -0.24375,-2.0718751 -0.73125,-2.8031251 -0.4875,-0.8531251 -1.21875,-1.3406251 -2.07186,-1.7062501 0.24375,-0.4874999 0.60936,-1.0968749 0.975,-1.584375 0.4875,-0.73125 1.09686,-1.21875 1.58436,-1.4625 2.55939,1.340625 4.3875,4.5093751 4.02189,8.0437502 z m -8.53125,-2.4375001 c 0,0 -1.34061,-1.8281251 -1.95,-2.4375001 -1.70625,0.853125 -2.68125,2.4375001 -2.68125,4.1437502 0.12181,1.828125 1.34064,3.290625 2.925,4.021875 -0.36561,0.609375 -0.73125,1.21875 -1.21875,1.70625 -0.4875,0.609375 -1.09686,0.974999 -1.4625,1.340624 -2.80311,-1.706249 -4.50936,-4.874999 -4.02186,-8.287499 0.1218,-0.8531251 0.36561,-1.7062502 0.60936,-2.4375002 0.4875,-1.3406249 1.34064,-2.4375 2.55939,-3.290625 0.1218,-0.121875 0.24375,-0.121875 0.36561,-0.24375 -0.4875,-0.4875 -1.95,-0.975 -1.95,-0.975 0,0 3.04689,-0.975 8.2875,-0.365625 -1.58436,2.315625 -1.4625,6.8250001 -1.4625,6.8250001 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4957);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4969)" /> <path - style="display:inline;fill:url(#radialGradient4977);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4989)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 429.73975,20.187746 -2.55504,0.05558 c -0.48738,0.0106 -0.61242,-0.769541 -0.61242,-1.378916 0,0 0.31966,-4.276424 -3.79578,-8.803414 -3.20233,-3.5225593 -8.85682,-3.7728916 -8.85682,-3.7728916 -0.60938,0 -1.26177,-0.171597 -1.25602,-0.6590635 l 0.028,-2.3732094 c 0.006,-0.4874666 0.61868,-0.7406188 1.22806,-0.7406188 0,0 7.05132,0.3003217 11.38734,5.0305223 3.72704,4.065871 5.06103,11.318675 5.06103,11.318675 0,0.4875 -0.0191,1.310083 -0.62831,1.323336 z M 413.91969,8.8033655 c 0,0 4.48239,0.7421569 7.0114,3.0905195 2.59016,2.40515 3.11068,6.970525 3.11068,6.970525 0,0.4875 -0.7448,1.278471 -1.23236,1.278471 h -1.35283 c -0.4875,0 -1.21059,-0.669096 -1.21059,-1.278471 0,0 0.4472,-2.304652 -1.91012,-4.45401 -1.78736,-1.629677 -4.41618,-1.834143 -4.41618,-1.834143 -0.60938,0 -1.23946,-0.793663 -1.22806,-1.281032 l 0.028,-1.195314 c 0.0114,-0.4873685 0.59073,-1.2965455 1.20011,-1.2965455 z m 1.20944,6.3426395 c 1.34062,0 2.54933,1.124665 2.54933,2.46529 0,1.340626 -1.09688,2.576451 -2.4375,2.576451 -1.34063,0 -2.54933,-1.208035 -2.54933,-2.548661 0,-1.340625 1.09687,-2.49308 2.4375,-2.49308 z" id="path11862" - d="m 429.01283,20.243326 h -1.82812 c -0.4875,0 -0.975,-0.365625 -0.975,-0.975 0,0 0.36562,-4.387501 -3.9,-8.775 -3.04688,-3.6562503 -8.53125,-3.9000003 -8.53125,-3.9000003 -0.60938,0 -0.975,-0.365625 -0.975,-0.8531249 V 4.0339507 c 0,-0.4875 0.36562,-0.853125 0.975,-0.853125 0,0 7.67812,0.4875 11.7,5.4843751 4.02187,3.7781242 4.3875,10.7250002 4.3875,10.7250002 0,0.4875 -0.24375,0.853125 -0.85313,0.853125 z M 413.77846,9.2745758 c 0,0 4.50937,0.609375 7.06875,2.9249992 2.55937,2.4375 3.04687,7.190626 3.04687,7.190626 0,0.4875 -0.12181,0.975 -0.60937,0.975 h -1.82813 c -0.4875,0 -0.73125,-0.365625 -0.73125,-0.975 0,0 0.12181,-2.925001 -2.19375,-5.118751 -1.82812,-1.584375 -4.75312,-1.70625 -4.75312,-1.70625 -0.60938,0 -0.975,-0.365625 -0.975,-0.853125 v -1.584374 c 0,-0.4875002 0.36562,-0.8531252 0.975,-0.8531252 z m 1.4625,6.0937492 c 1.34062,0 2.4375,1.096875 2.4375,2.4375 0,1.340626 -1.09688,2.437501 -2.4375,2.437501 -1.34063,0 -2.4375,-1.096875 -2.4375,-2.437501 0,-1.340625 1.09687,-2.4375 2.4375,-2.4375 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4977);fill-opacity:1;stroke-width:1.21875;filter:url(#filter4989)" /> <path - style="display:inline;fill:url(#radialGradient4997);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5009)" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" + d="m 448.08169,13.833888 v 2.515261 c 0,0.975 -0.41214,1.257631 -1.26525,1.257631 h -10.12208 c -0.85314,0 -1.26526,-0.282631 -1.26526,-1.257631 V 6.2881044 c 0,-0.9750001 0.41212,-1.2576306 1.26526,-1.2576306 h 10.12208 c 0.85311,0 1.26525,0.2826305 1.26525,1.2576306 v 2.5152611 l 5.06104,-2.5152611 V 16.349149 Z" id="path12430" - d="m 451.64901,16.435377 -3.65625,-3.290625 v 2.559375 c 0,0.975 -0.73125,1.70625 -1.58436,1.70625 h -9.01875 c -0.85314,0 -1.58439,-0.73125 -1.58439,-1.70625 V 6.9291285 c 0,-0.9750001 0.73125,-1.7062501 1.58439,-1.7062501 h 9.01875 c 0.85311,0 1.58436,0.73125 1.58436,1.7062501 v 2.437499 l 3.65625,-3.2906241 c 0.36564,-0.365625 0.73125,-0.4875 1.21875,-0.365625 V 16.801002 c -0.36561,0.121875 -0.85311,0 -1.21875,-0.365625 z" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + style="display:inline;fill:url(#radialGradient4997);fill-opacity:1;stroke-width:1.21875;filter:url(#filter5009)" /> <g - id="g4779" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)"> + id="g4779"> <path - style="fill:url(#radialGradient4710);fill-opacity:1;stroke-width:1.265625;filter:url(#filter4729)" - d="M 165.73984,2.6257296 V 20.34448 h 9.42792 0.69708 2.46698 c 1.25518,-0.32709 2.23657,-1.314095 2.53125,-2.53125 v -2.53125 -7.5937504 -2.53125 c -0.29468,-1.2171559 -1.27607,-2.2041601 -2.53125,-2.53125 h -2.07148 -1.09258 z m 7.73958,3.0577697 1.33485,2.2420349 c 0,0 0.36967,0.6174141 0.65753,0.813263 0.26974,0.1834496 0.93438,0.2892151 0.93438,0.2892151 h 2.72901 l -1.89596,3.0800167 c 0,0 -0.27577,0.604831 -0.41281,0.907196 -0.20593,0.452534 0.006,1.243536 0.0742,1.982484 0.10732,1.162403 0.19033,2.286529 0.19033,2.286529 l -2.21484,-1.132141 c 0,0 -0.90763,-0.426918 -1.39416,-0.427644 -0.5721,0 -1.64383,0.496858 -1.64383,0.496858 l -2.2198,1.065398 c 0,0 0.16319,-1.013778 0.33866,-2.128325 0.11606,-0.733074 0.43611,-1.567458 0.17798,-2.071473 -0.13995,-0.274086 -0.42023,-0.820679 -0.42023,-0.820679 L 167.532,9.0996981 h 2.71169 c 0,0 0.88228,-0.06226 1.24339,-0.2892151 0.27408,-0.1711231 0.61056,-0.7539368 0.61056,-0.7539368 z" - id="bookmarks-star-4" /> + id="bookmarks-star-4" + d="M 165.92886,2.5152127 V 20.122041 h 8.85681 1.26526 2.53052 c 1.26526,0 2.53052,-1.257631 2.53052,-2.515261 V 15.091518 7.545735 5.0304738 c 0,-1.2576306 -1.26526,-2.5152611 -2.53052,-2.5152611 h -2.53052 -1.26526 z m 7.59155,2.5152611 1.26526,2.5152612 c 0,0 0.39827,0.9972133 0.68613,1.1930622 0.26974,0.1834496 1.07417,0.064568 1.07417,0.064568 h 3.30074 l -2.53052,3.1379238 c 0,0 -0.38069,0.332603 -0.51773,0.634968 -0.20593,0.452534 -0.18971,0.518683 -0.12151,1.257631 0.10732,1.162403 0.63924,3.772892 0.63924,3.772892 l -2.53052,-1.257631 c 0,0 -0.77873,-0.42944 -1.26526,-0.430166 -0.5721,0 -1.26526,0.430166 -1.26526,0.430166 l -2.53051,1.257631 c 0,0 0.56012,-2.658345 0.73559,-3.772892 0.11606,-0.733074 0.10061,-0.753616 -0.15752,-1.257631 -0.13995,-0.274086 -0.57807,-0.782455 -0.57807,-0.782455 l -2.53052,-2.9904368 h 3.02161 c 0,0 0.91024,-0.099407 1.27135,-0.3263622 0.27408,-0.1711231 0.76807,-0.9312683 0.76807,-0.9312683 z" + style="fill:url(#radialGradient4710);fill-opacity:1;stroke-width:1.265625;filter:url(#filter4729)" /> <path - style="fill:url(#radialGradient4712);fill-opacity:1;stroke:none;stroke-width:1.265625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers stroke fill;filter:url(#filter4774)" - d="m 163.20859,2.6257296 c -1.25519,0.3270899 -2.23658,1.3140942 -2.53125,2.53125 v 2.53125 7.5937504 2.53125 c 0.29467,1.217155 1.27606,2.20416 2.53125,2.53125 h 3.16406 v -5.0625 -7.5937504 -5.0625 z" - id="bookmarks-overlay-1" /> + id="bookmarks-overlay-1" + d="m 163.39834,2.5152127 c -1.26526,0 -2.53052,1.2576305 -2.53052,2.5152611 v 2.5152612 7.545783 2.515262 c 0,1.25763 1.26526,2.515261 2.53052,2.515261 h 2.91839 l 0.0559,-4.840061 V 7.6882296 l 0.028,-5.1730169 z" + style="fill:url(#radialGradient4712);fill-opacity:1;stroke:none;stroke-width:1.265625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers stroke fill;filter:url(#filter4774)" /> <path - style="opacity:0.66300001;fill:url(#radialGradient4714);fill-opacity:1;stroke:url(#radialGradient4750);stroke-width:0.6328125;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="M 166.37156,2.6257296 V 20.34448" - id="bookmarks-divider-7" /> + id="bookmarks-divider-7" + d="M 165.92886,2.5152127 V 20.122041" + style="opacity:0.66300001;fill:url(#radialGradient4714);fill-opacity:1;stroke:url(#radialGradient4750);stroke-width:1.2614392;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> </g> <path - d="m 133.26971,34.690626 -6.72001,6.6 c -0.24,0.36 -0.72,0.48 -1.2,0.48 -0.48,0 -0.96,-0.12 -1.32,-0.48 l -6.72,-6.6 c -0.6,-0.72 -0.48,-1.32 0.48,-1.32 h 3.96 v -7.200001 c 0,-0.72 0.48,-1.2 1.2,-1.2 h 4.8 c 0.72,0 1.2,0.48 1.2,1.2 v 7.200001 h 3.84 c 0.96001,0 1.20001,0.6 0.48001,1.32 z" - id="path4214-3" + transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" style="display:inline;fill:url(#radialGradient4709-1);fill-opacity:1;stroke-width:1;filter:url(#filter4844)" - transform="matrix(0.79035179,0,0,0.79514606,-0.14216927,3.8570695e-5)" /> + id="path4214-3" + d="m 133.03211,35.213608 -6.32629,6.288153 c -0.24,0.36 -0.8202,0.518975 -1.3002,0.518975 -0.48,0 -0.87032,-0.158975 -1.23032,-0.518975 l -6.3263,-6.288153 c -0.6,-0.72 -0.96335,-1.29465 -0.003,-1.287183 l 3.79916,0.02955 -0.0908,-7.535242 c -0.009,-0.719949 0.67572,-1.307177 1.39571,-1.31116 l 5.02367,-0.02779 c 0.71999,-0.004 1.25401,0.619416 1.22796,1.33895 l 0.035,7.535242 3.80499,-0.02955 c 0.95998,-0.0075 0.71078,0.567183 -0.009,1.287183 z" /> </g> </svg> diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css index f921554df..56a8318da 100644 --- a/application/palemoon/themes/windows/browser.css +++ b/application/palemoon/themes/windows/browser.css @@ -39,9 +39,9 @@ --toolbarbutton-border-radius: 2.5px; --toolbarbutton-border-color: hsla(210,54%,20%,.2); - --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"); + --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)); @@ -52,6 +52,15 @@ --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); @@ -2041,9 +2050,9 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-sound[soundplaying], -#TabsToolbar[brighttext] .tab-icon-sound[blocked], -#TabsToolbar[brighttext] .tab-icon-sound[muted] { +#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); } @@ -2087,17 +2096,17 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), +#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[brighttext] .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), +#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[brighttext] .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), +#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"); } diff --git a/application/palemoon/themes/windows/downloads/download-glow.png b/application/palemoon/themes/windows/downloads/download-glow.png Binary files differdeleted file mode 100644 index 53182d7a4..000000000 --- a/application/palemoon/themes/windows/downloads/download-glow.png +++ /dev/null diff --git a/application/palemoon/themes/windows/jar.mn b/application/palemoon/themes/windows/jar.mn index 8a00d8b70..604466c9f 100644 --- a/application/palemoon/themes/windows/jar.mn +++ b/application/palemoon/themes/windows/jar.mn @@ -60,6 +60,9 @@ browser.jar: 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 diff --git a/application/palemoon/themes/windows/places/organizer.css b/application/palemoon/themes/windows/places/organizer.css index 16a0ab09c..45851d0da 100644 --- a/application/palemoon/themes/windows/places/organizer.css +++ b/application/palemoon/themes/windows/places/organizer.css @@ -8,6 +8,13 @@ --toolbarbutton-image: url("chrome://browser/skin/Toolbar.png"); } +/* Use SVG for HiDPI 133%+ */ +@media (min-resolution: 1.33dppx) { + :root { + --toolbarbutton-image: url("chrome://browser/skin/Toolbar.svg"); + } +} + /* Toolbar */ #placesToolbar { padding: 3px; diff --git a/application/palemoon/themes/windows/statusbar/overlay.css b/application/palemoon/themes/windows/statusbar/overlay.css index 77e8d8732..7f9a5982f 100644 --- a/application/palemoon/themes/windows/statusbar/overlay.css +++ b/application/palemoon/themes/windows/statusbar/overlay.css @@ -53,7 +53,7 @@ toolbar[brighttext] #status4evar-download-button #status4evar-download-icon #status4evar-download-button[attention] #status4evar-download-icon { - background-image: url("chrome://browser/skin/downloads/download-glow.png"); + background: -moz-image-rect(var(--toolbarbutton-glass-image), 19, 108, 36, 90) center no-repeat; } toolbar[mode="icons"] #status4evar-download-button[forcelabel="true"] > label diff --git a/application/xulrunner/confvars.sh b/application/xulrunner/confvars.sh index a317df2a6..794b2b4b1 100644 --- a/application/xulrunner/confvars.sh +++ b/application/xulrunner/confvars.sh @@ -13,10 +13,6 @@ MOZ_CHROME_FILE_FORMAT=omni MOZ_UPDATER=1 -if test "$OS_ARCH" = "WINNT"; then - MOZ_MAINTENANCE_SERVICE= -fi - MOZ_PLACES=1 MOZ_WEBRTC=1 MOZ_WEBGL_CONFORMANT=1 |