From 6d614170cbfa958564eb5f824234ad5a9e484344 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 05:06:10 -0500 Subject: Revert "Add Basilisk" This reverts commit e72ef92b5bdc43cd2584198e2e54e951b70299e8. --- .../base/content/aboutDialog-appUpdater.js | 425 - application/basilisk/base/content/aboutDialog.css | 97 - application/basilisk/base/content/aboutDialog.js | 83 - application/basilisk/base/content/aboutDialog.xul | 151 - .../basilisk/base/content/aboutNetError.xhtml | 696 -- .../basilisk/base/content/aboutRobots-icon.png | Bin 9817 -> 0 bytes .../base/content/aboutRobots-widget-left.png | Bin 2224 -> 0 bytes .../basilisk/base/content/aboutRobots.xhtml | 107 - .../basilisk/base/content/aboutTabCrashed.css | 11 - .../basilisk/base/content/aboutTabCrashed.js | 308 - .../basilisk/base/content/aboutTabCrashed.xhtml | 97 - .../base/content/aboutaccounts/aboutaccounts.css | 24 - .../base/content/aboutaccounts/aboutaccounts.js | 539 -- .../base/content/aboutaccounts/aboutaccounts.xhtml | 111 - .../base/content/aboutaccounts/images/fox.png | Bin 1951 -> 0 bytes .../basilisk/base/content/aboutaccounts/main.css | 166 - .../base/content/aboutaccounts/normalize.css | 402 - .../base/content/abouthealthreport/abouthealth.css | 15 - .../base/content/abouthealthreport/abouthealth.js | 178 - .../content/abouthealthreport/abouthealth.xhtml | 31 - .../basilisk/base/content/abouthome/aboutHome.css | 371 - .../basilisk/base/content/abouthome/aboutHome.js | 113 - .../base/content/abouthome/aboutHome.xhtml | 68 - .../basilisk/base/content/abouthome/addons.png | Bin 1444 -> 0 bytes .../basilisk/base/content/abouthome/addons@2x.png | Bin 3783 -> 0 bytes .../basilisk/base/content/abouthome/bookmarks.png | Bin 1276 -> 0 bytes .../base/content/abouthome/bookmarks@2x.png | Bin 2946 -> 0 bytes .../basilisk/base/content/abouthome/downloads.png | Bin 898 -> 0 bytes .../base/content/abouthome/downloads@2x.png | Bin 2018 -> 0 bytes .../basilisk/base/content/abouthome/history.png | Bin 1654 -> 0 bytes .../basilisk/base/content/abouthome/history@2x.png | Bin 4629 -> 0 bytes .../base/content/abouthome/restore-large.png | Bin 2841 -> 0 bytes .../base/content/abouthome/restore-large@2x.png | Bin 7267 -> 0 bytes .../basilisk/base/content/abouthome/restore.png | Bin 1796 -> 0 bytes .../basilisk/base/content/abouthome/restore@2x.png | Bin 4810 -> 0 bytes .../basilisk/base/content/abouthome/settings.png | Bin 1557 -> 0 bytes .../base/content/abouthome/settings@2x.png | Bin 3836 -> 0 bytes .../basilisk/base/content/abouthome/sync.png | Bin 1879 -> 0 bytes .../basilisk/base/content/abouthome/sync@2x.png | Bin 4615 -> 0 bytes .../basilisk/base/content/baseMenuOverlay.xul | 118 - .../basilisk/base/content/blockedSite.xhtml | 191 - .../basilisk/base/content/browser-addons.js | 869 -- .../basilisk/base/content/browser-captivePortal.js | 257 - .../basilisk/base/content/browser-charsetmenu.inc | 12 - .../basilisk/base/content/browser-compacttheme.js | 106 - .../basilisk/base/content/browser-context.inc | 452 -- .../basilisk/base/content/browser-ctrlTab.js | 586 -- .../basilisk/base/content/browser-customization.js | 101 - .../content/browser-data-submission-info-bar.js | 126 - .../basilisk/base/content/browser-doctype.inc | 23 - application/basilisk/base/content/browser-feeds.js | 640 -- .../content/browser-fullScreenAndPointerLock.js | 666 -- .../basilisk/base/content/browser-fullZoom.js | 526 -- .../basilisk/base/content/browser-fxaccounts.js | 489 -- .../base/content/browser-gestureSupport.js | 1240 --- application/basilisk/base/content/browser-media.js | 351 - .../basilisk/base/content/browser-menubar.inc | 527 -- .../basilisk/base/content/browser-places.js | 2018 ----- .../basilisk/base/content/browser-plugins.js | 544 -- .../base/content/browser-refreshblocker.js | 84 - .../basilisk/base/content/browser-safebrowsing.js | 48 - application/basilisk/base/content/browser-sets.inc | 382 - .../basilisk/base/content/browser-sidebar.js | 337 - .../basilisk/base/content/browser-syncui.js | 547 -- .../basilisk/base/content/browser-tabPreviews.xml | 37 - .../base/content/browser-tabsintitlebar-stub.js | 17 - .../base/content/browser-tabsintitlebar.js | 310 - .../basilisk/base/content/browser-thumbnails.js | 142 - .../base/content/browser-trackingprotection.js | 237 - application/basilisk/base/content/browser.css | 1235 --- application/basilisk/base/content/browser.js | 8317 -------------------- application/basilisk/base/content/browser.xul | 1112 --- .../basilisk/base/content/browserMountPoints.inc | 12 - application/basilisk/base/content/content.js | 1448 ---- .../basilisk/base/content/contentSearchUI.css | 161 - .../basilisk/base/content/contentSearchUI.js | 896 --- .../basilisk/base/content/default-theme-icon.svg | 13 - .../base/content/defaultthemes/1.footer.jpg | Bin 151200 -> 0 bytes .../base/content/defaultthemes/1.header.jpg | Bin 266398 -> 0 bytes .../basilisk/base/content/defaultthemes/1.icon.jpg | Bin 1093 -> 0 bytes .../base/content/defaultthemes/1.preview.jpg | Bin 7953 -> 0 bytes .../base/content/defaultthemes/2.footer.jpg | Bin 81134 -> 0 bytes .../base/content/defaultthemes/2.header.jpg | Bin 173983 -> 0 bytes .../basilisk/base/content/defaultthemes/2.icon.jpg | Bin 509 -> 0 bytes .../base/content/defaultthemes/2.preview.jpg | Bin 2877 -> 0 bytes .../base/content/defaultthemes/3.footer.png | Bin 180454 -> 0 bytes .../base/content/defaultthemes/3.header.png | Bin 293504 -> 0 bytes .../basilisk/base/content/defaultthemes/3.icon.png | Bin 896 -> 0 bytes .../base/content/defaultthemes/3.preview.png | Bin 56585 -> 0 bytes .../base/content/defaultthemes/4.footer.png | Bin 384076 -> 0 bytes .../base/content/defaultthemes/4.header.png | Bin 769368 -> 0 bytes .../basilisk/base/content/defaultthemes/4.icon.png | Bin 731 -> 0 bytes .../base/content/defaultthemes/4.preview.png | Bin 95328 -> 0 bytes .../base/content/defaultthemes/5.footer.png | Bin 9760 -> 0 bytes .../base/content/defaultthemes/5.header.png | Bin 9760 -> 0 bytes .../basilisk/base/content/defaultthemes/5.icon.jpg | Bin 267 -> 0 bytes .../base/content/defaultthemes/5.preview.jpg | Bin 2837 -> 0 bytes .../base/content/defaultthemes/compact.header.png | Bin 95 -> 0 bytes .../content/defaultthemes/compactdark.icon.svg | 16 - .../content/defaultthemes/compactlight.icon.svg | 15 - .../content/docs/sslerrorreport/dataformat.rst | 54 - .../base/content/docs/sslerrorreport/index.rst | 15 - .../content/docs/sslerrorreport/preferences.rst | 23 - application/basilisk/base/content/gcli_sec_bad.svg | 7 - .../basilisk/base/content/gcli_sec_good.svg | 4 - .../basilisk/base/content/gcli_sec_moderate.svg | 4 - .../basilisk/base/content/global-scripts.inc | 38 - application/basilisk/base/content/hiddenWindow.xul | 20 - .../basilisk/base/content/jsConsoleOverlay.xul | 18 - .../basilisk/base/content/macBrowserOverlay.xul | 66 - .../content/newtab/alternativeDefaultSites.json | 50 - application/basilisk/base/content/newtab/cells.js | 126 - .../basilisk/base/content/newtab/customize.js | 124 - application/basilisk/base/content/newtab/drag.js | 151 - .../basilisk/base/content/newtab/dragDataHelper.js | 22 - application/basilisk/base/content/newtab/drop.js | 150 - .../basilisk/base/content/newtab/dropPreview.js | 222 - .../basilisk/base/content/newtab/dropTargetShim.js | 232 - application/basilisk/base/content/newtab/grid.js | 279 - .../basilisk/base/content/newtab/newTab.css | 654 -- .../base/content/newtab/newTab.inadjacent.json | 3209 -------- application/basilisk/base/content/newtab/newTab.js | 71 - .../basilisk/base/content/newtab/newTab.xhtml | 89 - application/basilisk/base/content/newtab/page.js | 297 - application/basilisk/base/content/newtab/search.js | 15 - application/basilisk/base/content/newtab/sites.js | 440 -- .../base/content/newtab/transformations.js | 270 - application/basilisk/base/content/newtab/undo.js | 116 - .../basilisk/base/content/newtab/updater.js | 177 - application/basilisk/base/content/nsContextMenu.js | 1836 ----- .../base/content/overrides/app-license.html | 7 - .../basilisk/base/content/pageinfo/feeds.js | 29 - .../basilisk/base/content/pageinfo/feeds.xml | 40 - .../basilisk/base/content/pageinfo/pageInfo.css | 26 - .../basilisk/base/content/pageinfo/pageInfo.js | 1082 --- .../basilisk/base/content/pageinfo/pageInfo.xml | 20 - .../basilisk/base/content/pageinfo/pageInfo.xul | 438 -- .../basilisk/base/content/pageinfo/permissions.js | 320 - .../basilisk/base/content/pageinfo/security.js | 375 - .../basilisk/base/content/popup-notifications.inc | 89 - .../base/content/report-phishing-overlay.xul | 35 - application/basilisk/base/content/safeMode.css | 8 - application/basilisk/base/content/safeMode.js | 82 - application/basilisk/base/content/safeMode.xul | 51 - application/basilisk/base/content/sanitize.js | 887 --- application/basilisk/base/content/sanitize.xul | 183 - .../basilisk/base/content/sanitizeDialog.css | 23 - .../basilisk/base/content/sanitizeDialog.js | 889 --- .../base/content/softwareUpdateOverlay.xul | 18 - .../base/content/sync/aboutSyncTabs-bindings.xml | 46 - .../basilisk/base/content/sync/aboutSyncTabs.css | 11 - .../basilisk/base/content/sync/aboutSyncTabs.js | 363 - .../basilisk/base/content/sync/aboutSyncTabs.xul | 68 - .../basilisk/base/content/sync/addDevice.js | 157 - .../basilisk/base/content/sync/addDevice.xul | 129 - .../basilisk/base/content/sync/customize.css | 28 - .../basilisk/base/content/sync/customize.js | 25 - .../basilisk/base/content/sync/customize.xul | 62 - .../basilisk/base/content/sync/genericChange.js | 226 - .../basilisk/base/content/sync/genericChange.xul | 123 - application/basilisk/base/content/sync/key.xhtml | 54 - application/basilisk/base/content/sync/setup.js | 1057 --- application/basilisk/base/content/sync/setup.xul | 490 -- application/basilisk/base/content/sync/utils.js | 231 - application/basilisk/base/content/tab-content.js | 1061 --- .../basilisk/base/content/tab-shape.inc.svg | 11 - application/basilisk/base/content/tabbrowser.css | 110 - application/basilisk/base/content/tabbrowser.xml | 7631 ------------------ .../basilisk/base/content/urlbarBindings.xml | 2665 ------- application/basilisk/base/content/usercontext.svg | 23 - .../basilisk/base/content/utilityOverlay.js | 943 --- .../basilisk/base/content/viewSourceOverlay.xul | 26 - application/basilisk/base/content/web-panels.js | 96 - application/basilisk/base/content/web-panels.xul | 71 - .../basilisk/base/content/webrtcIndicator.js | 189 - .../basilisk/base/content/webrtcIndicator.xul | 35 - 176 files changed, 58513 deletions(-) delete mode 100644 application/basilisk/base/content/aboutDialog-appUpdater.js delete mode 100644 application/basilisk/base/content/aboutDialog.css delete mode 100644 application/basilisk/base/content/aboutDialog.js delete mode 100644 application/basilisk/base/content/aboutDialog.xul delete mode 100644 application/basilisk/base/content/aboutNetError.xhtml delete mode 100644 application/basilisk/base/content/aboutRobots-icon.png delete mode 100644 application/basilisk/base/content/aboutRobots-widget-left.png delete mode 100644 application/basilisk/base/content/aboutRobots.xhtml delete mode 100644 application/basilisk/base/content/aboutTabCrashed.css delete mode 100644 application/basilisk/base/content/aboutTabCrashed.js delete mode 100644 application/basilisk/base/content/aboutTabCrashed.xhtml delete mode 100644 application/basilisk/base/content/aboutaccounts/aboutaccounts.css delete mode 100644 application/basilisk/base/content/aboutaccounts/aboutaccounts.js delete mode 100644 application/basilisk/base/content/aboutaccounts/aboutaccounts.xhtml delete mode 100644 application/basilisk/base/content/aboutaccounts/images/fox.png delete mode 100644 application/basilisk/base/content/aboutaccounts/main.css delete mode 100644 application/basilisk/base/content/aboutaccounts/normalize.css delete mode 100644 application/basilisk/base/content/abouthealthreport/abouthealth.css delete mode 100644 application/basilisk/base/content/abouthealthreport/abouthealth.js delete mode 100644 application/basilisk/base/content/abouthealthreport/abouthealth.xhtml delete mode 100644 application/basilisk/base/content/abouthome/aboutHome.css delete mode 100644 application/basilisk/base/content/abouthome/aboutHome.js delete mode 100644 application/basilisk/base/content/abouthome/aboutHome.xhtml delete mode 100644 application/basilisk/base/content/abouthome/addons.png delete mode 100644 application/basilisk/base/content/abouthome/addons@2x.png delete mode 100644 application/basilisk/base/content/abouthome/bookmarks.png delete mode 100644 application/basilisk/base/content/abouthome/bookmarks@2x.png delete mode 100644 application/basilisk/base/content/abouthome/downloads.png delete mode 100644 application/basilisk/base/content/abouthome/downloads@2x.png delete mode 100644 application/basilisk/base/content/abouthome/history.png delete mode 100644 application/basilisk/base/content/abouthome/history@2x.png delete mode 100644 application/basilisk/base/content/abouthome/restore-large.png delete mode 100644 application/basilisk/base/content/abouthome/restore-large@2x.png delete mode 100644 application/basilisk/base/content/abouthome/restore.png delete mode 100644 application/basilisk/base/content/abouthome/restore@2x.png delete mode 100644 application/basilisk/base/content/abouthome/settings.png delete mode 100644 application/basilisk/base/content/abouthome/settings@2x.png delete mode 100644 application/basilisk/base/content/abouthome/sync.png delete mode 100644 application/basilisk/base/content/abouthome/sync@2x.png delete mode 100644 application/basilisk/base/content/baseMenuOverlay.xul delete mode 100644 application/basilisk/base/content/blockedSite.xhtml delete mode 100644 application/basilisk/base/content/browser-addons.js delete mode 100644 application/basilisk/base/content/browser-captivePortal.js delete mode 100644 application/basilisk/base/content/browser-charsetmenu.inc delete mode 100644 application/basilisk/base/content/browser-compacttheme.js delete mode 100644 application/basilisk/base/content/browser-context.inc delete mode 100644 application/basilisk/base/content/browser-ctrlTab.js delete mode 100644 application/basilisk/base/content/browser-customization.js delete mode 100644 application/basilisk/base/content/browser-data-submission-info-bar.js delete mode 100644 application/basilisk/base/content/browser-doctype.inc delete mode 100644 application/basilisk/base/content/browser-feeds.js delete mode 100644 application/basilisk/base/content/browser-fullScreenAndPointerLock.js delete mode 100644 application/basilisk/base/content/browser-fullZoom.js delete mode 100644 application/basilisk/base/content/browser-fxaccounts.js delete mode 100644 application/basilisk/base/content/browser-gestureSupport.js delete mode 100644 application/basilisk/base/content/browser-media.js delete mode 100644 application/basilisk/base/content/browser-menubar.inc delete mode 100644 application/basilisk/base/content/browser-places.js delete mode 100644 application/basilisk/base/content/browser-plugins.js delete mode 100644 application/basilisk/base/content/browser-refreshblocker.js delete mode 100644 application/basilisk/base/content/browser-safebrowsing.js delete mode 100644 application/basilisk/base/content/browser-sets.inc delete mode 100644 application/basilisk/base/content/browser-sidebar.js delete mode 100644 application/basilisk/base/content/browser-syncui.js delete mode 100644 application/basilisk/base/content/browser-tabPreviews.xml delete mode 100644 application/basilisk/base/content/browser-tabsintitlebar-stub.js delete mode 100644 application/basilisk/base/content/browser-tabsintitlebar.js delete mode 100644 application/basilisk/base/content/browser-thumbnails.js delete mode 100644 application/basilisk/base/content/browser-trackingprotection.js delete mode 100644 application/basilisk/base/content/browser.css delete mode 100644 application/basilisk/base/content/browser.js delete mode 100644 application/basilisk/base/content/browser.xul delete mode 100644 application/basilisk/base/content/browserMountPoints.inc delete mode 100644 application/basilisk/base/content/content.js delete mode 100644 application/basilisk/base/content/contentSearchUI.css delete mode 100644 application/basilisk/base/content/contentSearchUI.js delete mode 100644 application/basilisk/base/content/default-theme-icon.svg delete mode 100644 application/basilisk/base/content/defaultthemes/1.footer.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/1.header.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/1.icon.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/1.preview.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/2.footer.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/2.header.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/2.icon.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/2.preview.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/3.footer.png delete mode 100644 application/basilisk/base/content/defaultthemes/3.header.png delete mode 100644 application/basilisk/base/content/defaultthemes/3.icon.png delete mode 100644 application/basilisk/base/content/defaultthemes/3.preview.png delete mode 100644 application/basilisk/base/content/defaultthemes/4.footer.png delete mode 100644 application/basilisk/base/content/defaultthemes/4.header.png delete mode 100644 application/basilisk/base/content/defaultthemes/4.icon.png delete mode 100644 application/basilisk/base/content/defaultthemes/4.preview.png delete mode 100644 application/basilisk/base/content/defaultthemes/5.footer.png delete mode 100644 application/basilisk/base/content/defaultthemes/5.header.png delete mode 100644 application/basilisk/base/content/defaultthemes/5.icon.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/5.preview.jpg delete mode 100644 application/basilisk/base/content/defaultthemes/compact.header.png delete mode 100644 application/basilisk/base/content/defaultthemes/compactdark.icon.svg delete mode 100644 application/basilisk/base/content/defaultthemes/compactlight.icon.svg delete mode 100644 application/basilisk/base/content/docs/sslerrorreport/dataformat.rst delete mode 100644 application/basilisk/base/content/docs/sslerrorreport/index.rst delete mode 100644 application/basilisk/base/content/docs/sslerrorreport/preferences.rst delete mode 100644 application/basilisk/base/content/gcli_sec_bad.svg delete mode 100644 application/basilisk/base/content/gcli_sec_good.svg delete mode 100644 application/basilisk/base/content/gcli_sec_moderate.svg delete mode 100644 application/basilisk/base/content/global-scripts.inc delete mode 100644 application/basilisk/base/content/hiddenWindow.xul delete mode 100644 application/basilisk/base/content/jsConsoleOverlay.xul delete mode 100644 application/basilisk/base/content/macBrowserOverlay.xul delete mode 100644 application/basilisk/base/content/newtab/alternativeDefaultSites.json delete mode 100644 application/basilisk/base/content/newtab/cells.js delete mode 100644 application/basilisk/base/content/newtab/customize.js delete mode 100644 application/basilisk/base/content/newtab/drag.js delete mode 100644 application/basilisk/base/content/newtab/dragDataHelper.js delete mode 100644 application/basilisk/base/content/newtab/drop.js delete mode 100644 application/basilisk/base/content/newtab/dropPreview.js delete mode 100644 application/basilisk/base/content/newtab/dropTargetShim.js delete mode 100644 application/basilisk/base/content/newtab/grid.js delete mode 100644 application/basilisk/base/content/newtab/newTab.css delete mode 100644 application/basilisk/base/content/newtab/newTab.inadjacent.json delete mode 100644 application/basilisk/base/content/newtab/newTab.js delete mode 100644 application/basilisk/base/content/newtab/newTab.xhtml delete mode 100644 application/basilisk/base/content/newtab/page.js delete mode 100644 application/basilisk/base/content/newtab/search.js delete mode 100644 application/basilisk/base/content/newtab/sites.js delete mode 100644 application/basilisk/base/content/newtab/transformations.js delete mode 100644 application/basilisk/base/content/newtab/undo.js delete mode 100644 application/basilisk/base/content/newtab/updater.js delete mode 100644 application/basilisk/base/content/nsContextMenu.js delete mode 100644 application/basilisk/base/content/overrides/app-license.html delete mode 100644 application/basilisk/base/content/pageinfo/feeds.js delete mode 100644 application/basilisk/base/content/pageinfo/feeds.xml delete mode 100644 application/basilisk/base/content/pageinfo/pageInfo.css delete mode 100644 application/basilisk/base/content/pageinfo/pageInfo.js delete mode 100644 application/basilisk/base/content/pageinfo/pageInfo.xml delete mode 100644 application/basilisk/base/content/pageinfo/pageInfo.xul delete mode 100644 application/basilisk/base/content/pageinfo/permissions.js delete mode 100644 application/basilisk/base/content/pageinfo/security.js delete mode 100644 application/basilisk/base/content/popup-notifications.inc delete mode 100644 application/basilisk/base/content/report-phishing-overlay.xul delete mode 100644 application/basilisk/base/content/safeMode.css delete mode 100644 application/basilisk/base/content/safeMode.js delete mode 100644 application/basilisk/base/content/safeMode.xul delete mode 100644 application/basilisk/base/content/sanitize.js delete mode 100644 application/basilisk/base/content/sanitize.xul delete mode 100644 application/basilisk/base/content/sanitizeDialog.css delete mode 100644 application/basilisk/base/content/sanitizeDialog.js delete mode 100644 application/basilisk/base/content/softwareUpdateOverlay.xul delete mode 100644 application/basilisk/base/content/sync/aboutSyncTabs-bindings.xml delete mode 100644 application/basilisk/base/content/sync/aboutSyncTabs.css delete mode 100644 application/basilisk/base/content/sync/aboutSyncTabs.js delete mode 100644 application/basilisk/base/content/sync/aboutSyncTabs.xul delete mode 100644 application/basilisk/base/content/sync/addDevice.js delete mode 100644 application/basilisk/base/content/sync/addDevice.xul delete mode 100644 application/basilisk/base/content/sync/customize.css delete mode 100644 application/basilisk/base/content/sync/customize.js delete mode 100644 application/basilisk/base/content/sync/customize.xul delete mode 100644 application/basilisk/base/content/sync/genericChange.js delete mode 100644 application/basilisk/base/content/sync/genericChange.xul delete mode 100644 application/basilisk/base/content/sync/key.xhtml delete mode 100644 application/basilisk/base/content/sync/setup.js delete mode 100644 application/basilisk/base/content/sync/setup.xul delete mode 100644 application/basilisk/base/content/sync/utils.js delete mode 100644 application/basilisk/base/content/tab-content.js delete mode 100644 application/basilisk/base/content/tab-shape.inc.svg delete mode 100644 application/basilisk/base/content/tabbrowser.css delete mode 100644 application/basilisk/base/content/tabbrowser.xml delete mode 100644 application/basilisk/base/content/urlbarBindings.xml delete mode 100644 application/basilisk/base/content/usercontext.svg delete mode 100644 application/basilisk/base/content/utilityOverlay.js delete mode 100644 application/basilisk/base/content/viewSourceOverlay.xul delete mode 100644 application/basilisk/base/content/web-panels.js delete mode 100644 application/basilisk/base/content/web-panels.xul delete mode 100644 application/basilisk/base/content/webrtcIndicator.js delete mode 100644 application/basilisk/base/content/webrtcIndicator.xul (limited to 'application/basilisk/base/content') diff --git a/application/basilisk/base/content/aboutDialog-appUpdater.js b/application/basilisk/base/content/aboutDialog-appUpdater.js deleted file mode 100644 index e5fa77a34..000000000 --- a/application/basilisk/base/content/aboutDialog-appUpdater.js +++ /dev/null @@ -1,425 +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/. */ - -// Note: this file is included in aboutDialog.xul if MOZ_UPDATER is defined. - -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils", - "resource://gre/modules/UpdateUtils.jsm"); - -const PREF_APP_UPDATE_CANCELATIONS_OSX = "app.update.cancelations.osx"; -const PREF_APP_UPDATE_ELEVATE_NEVER = "app.update.elevate.never"; - -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() { - 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.updateDeck = document.getElementById("updateDeck"); - - // Hide the update deck when the update window is already open and it's not - // already applied, to avoid syncing issues between them. Applied updates - // don't have any information to sync between the windows as they both just - // show the "Restart to continue"-type button. - if (Services.wm.getMostRecentWindow("Update:Wizard") && - !this.isApplied) { - this.updateDeck.hidden = true; - return; - } - - this.bundle = Services.strings. - createBundle("chrome://browser/locale/browser.properties"); - - 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.selectPanel("apply"); - return; - } - - if (this.aus.isOtherInstanceHandlingUpdates) { - this.selectPanel("otherInstanceHandlingUpdates"); - return; - } - - if (this.isDownloading) { - this.startDownload(); - // selectPanel("downloading") is called from setupDownloadingUI(). - return; - } - - // Honor the "Never check for updates" option by not only disabling background - // update checks, but also in the About dialog, by presenting a - // "Check for updates" button. - // If updates are found, the user is then asked if he wants to "Update to ". - if (!this.updateEnabled || - Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) { - this.selectPanel("checkForUpdates"); - return; - } - - // That leaves the options - // "Check for updates, but let me choose whether to install them", and - // "Automatically install updates". - // In both cases, we check for updates without asking. - // In the "let me choose" case, we ask before downloading though, in onCheckComplete. - this.checkForUpdates(); -} - -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" || - this.update.state == "pending-elevate"; - } - return this.um.activeUpdate && - (this.um.activeUpdate.state == "pending" || - this.um.activeUpdate.state == "pending-service" || - this.um.activeUpdate.state == "pending-elevate"); - }, - - // 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 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 panel of the updateDeck. - * - * @param aChildID - * The id of the deck's child to select, e.g. "apply". - */ - selectPanel(aChildID) { - let panel = document.getElementById(aChildID); - - let button = panel.querySelector("button"); - if (button) { - if (aChildID == "downloadAndInstall") { - let updateVersion = gAppUpdater.update.displayVersion; - button.label = this.bundle.formatStringFromName("update.downloadAndInstallButton.label", [updateVersion], 1); - button.accessKey = this.bundle.GetStringFromName("update.downloadAndInstallButton.accesskey"); - } - this.updateDeck.selectedPanel = panel; - if (!document.commandDispatcher.focusedElement || // don't steal the focus - document.commandDispatcher.focusedElement.localName == "button") // except from the other buttons - button.focus(); - - } else { - this.updateDeck.selectedPanel = panel; - } - }, - - /** - * Check for updates - */ - checkForUpdates() { - // Clear prefs that could prevent a user from discovering available updates. - if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS_OSX)) { - Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX); - } - if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) { - Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_NEVER); - } - this.selectPanel("checkingForUpdates"); - this.isChecking = true; - this.checker.checkForUpdates(this.updateCheckListener, true); - // after checking, onCheckComplete() is called - }, - - /** - * Handles oncommand for the "Restart to Update" button - * which is presented after the download has been downloaded. - */ - buttonRestartAfterDownload() { - if (!this.isPending && !this.isApplied) { - return; - } - - gAppUpdater.selectPanel("restarting"); - - // 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) { - gAppUpdater.selectPanel("apply"); - 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); - }, - - /** - * 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(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; - } - - if (gAppUpdater.updateAuto) // automatically download and install - gAppUpdater.startDownload(); - else // ask - gAppUpdater.selectPanel("downloadAndInstall"); - }, - - /** - * See nsIUpdateService.idl - */ - onError(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(aIID) { - if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) && - !aIID.equals(Components.interfaces.nsISupports)) - throw Components.results.NS_ERROR_NO_INTERFACE; - return this; - } - }, - - /** - * Starts the download of an update mar. - */ - startDownload() { - 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() { - this.downloadStatus = document.getElementById("downloadStatus"); - this.downloadStatus.value = - DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size); - this.selectPanel("downloading"); - this.aus.addDownloadListener(this); - }, - - removeDownloadListener() { - if (this.aus) { - this.aus.removeDownloadListener(this); - } - }, - - /** - * See nsIRequestObserver.idl - */ - onStartRequest(aRequest, aContext) { - }, - - /** - * See nsIRequestObserver.idl - */ - onStopRequest(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 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" || - status == "pending-elevate") { - // 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("apply"); - } 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("apply"); - } - break; - default: - this.removeDownloadListener(); - this.selectPanel("downloadFailed"); - break; - } - }, - - /** - * See nsIProgressEventSink.idl - */ - onStatus(aRequest, aContext, aStatus, aStatusArg) { - }, - - /** - * See nsIProgressEventSink.idl - */ - onProgress(aRequest, aContext, aProgress, aProgressMax) { - this.downloadStatus.value = - DownloadUtils.getTransferTotal(aProgress, aProgressMax); - }, - - /** - * See nsISupports.idl - */ - QueryInterface(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; - } -}; diff --git a/application/basilisk/base/content/aboutDialog.css b/application/basilisk/base/content/aboutDialog.css deleted file mode 100644 index baeeada7a..000000000 --- a/application/basilisk/base/content/aboutDialog.css +++ /dev/null @@ -1,97 +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/. */ - -#aboutDialog { - width: 620px; - /* Set an explicit line-height to avoid discrepancies in 'auto' spacing - across screens with different device DPI, which may cause font metrics - to round differently. */ - line-height: 1.5; -} - -#rightBox { - background-image: url("chrome://branding/content/about-wordmark.svg"); - background-repeat: no-repeat; - /* padding-top creates room for the wordmark */ - padding-top: 38px; - margin-top:20px; -} - -#rightBox:-moz-locale-dir(rtl) { - background-position: 100% 0; -} - -#bottomBox { - padding: 15px 10px 0; -} - -#version { - font-weight: bold; - margin-top: 10px; - margin-left: 0; - -moz-user-select: text; - -moz-user-focus: normal; - cursor: text; -} - -#version:-moz-locale-dir(rtl) { - direction: ltr; - text-align: right; - margin-left: 5px; - margin-right: 0; -} - -#releasenotes { - margin-top: 10px; -} - -#distribution, -#distributionId { - display: none; - margin-top: 0; - margin-bottom: 0; -} - -.text-blurb { - margin-bottom: 10px; - margin-inline-start: 0; - padding-inline-start: 0; -} - -#updateButton, -#updateDeck > hbox > label { - margin-inline-start: 0; - padding-inline-start: 0; -} - -.update-throbber { - width: 16px; - min-height: 16px; - margin-inline-end: 3px; - list-style-image: url("chrome://global/skin/icons/loading.png"); -} - -@media (min-resolution: 1.1dppx) { - .update-throbber { - list-style-image: url("chrome://global/skin/icons/loading@2x.png"); - } -} - -description > .text-link, -description > .text-link:focus { - margin: 0px; - padding: 0px; -} - -.bottom-link, -.bottom-link:focus { - text-align: center; - margin: 0 40px; -} - -#currentChannel { - margin: 0; - padding: 0; - font-weight: bold; -} diff --git a/application/basilisk/base/content/aboutDialog.js b/application/basilisk/base/content/aboutDialog.js deleted file mode 100644 index d8965ec55..000000000 --- a/application/basilisk/base/content/aboutDialog.js +++ /dev/null @@ -1,83 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -// Services = object with smart getters for common XPCOM services -Components.utils.import("resource://gre/modules/Services.jsm"); - -function init(aEvent) { - if (aEvent.target != document) - return; - - try { - var distroId = Services.prefs.getCharPref("distribution.id"); - if (distroId) { - var distroVersion = Services.prefs.getCharPref("distribution.version"); - - var distroIdField = document.getElementById("distributionId"); - distroIdField.value = distroId + " - " + distroVersion; - distroIdField.style.display = "block"; - - try { - // This is in its own try catch due to bug 895473 and bug 900925. - var distroAbout = Services.prefs.getComplexValue("distribution.about", - Components.interfaces.nsISupportsString); - var distroField = document.getElementById("distribution"); - distroField.value = distroAbout; - distroField.style.display = "block"; - } catch (ex) { - // Pref is unset - Components.utils.reportError(ex); - } - } - } catch (e) { - // Pref is unset - } - - // Include the build ID - let versionField = document.getElementById("version"); - let version = Services.appinfo.version; - let buildID = Services.appinfo.appBuildID; - let year = buildID.slice(0, 4); - let month = buildID.slice(4, 6); - let day = buildID.slice(6, 8); - let hour = buildID.slice(8, 10); - let minute = buildID.slice(10, 12); - if (Services.prefs.getBoolPref("general.useragent.appVersionIsBuildID")) { - versionField.textContent = `${year}.${month}.${day}`; - } else { - versionField.textContent = `v` + version + ` (${year}-${month}-${day})`; - } - - // Display warning if this is an "a#" (nightly or aurora) build - if (/a\d+$/.test(version)) { - document.getElementById("experimental").hidden = false; - document.getElementById("communityDesc").hidden = true; - } - - // Append "(32-bit)" or "(64-bit)" build architecture to the version number: - let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); - let archResource = Services.appinfo.is64Bit - ? "aboutDialog.architecture.sixtyFourBit" - : "aboutDialog.architecture.thirtyTwoBit"; - let arch = bundle.GetStringFromName(archResource); - versionField.textContent += ` (${arch})`; - -#ifdef MOZ_UPDATER - gAppUpdater = new appUpdater(); - - let channelLabel = document.getElementById("currentChannel"); - let currentChannelText = document.getElementById("currentChannelText"); - channelLabel.value = UpdateUtils.UpdateChannel; - if (/^release($|\-)/.test(channelLabel.value)) - currentChannelText.hidden = true; -#endif - -#ifdef XP_MACOSX - // it may not be sized at this point, and we need its width to calculate its position - window.sizeToContent(); - window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5); -#endif -} diff --git a/application/basilisk/base/content/aboutDialog.xul b/application/basilisk/base/content/aboutDialog.xul deleted file mode 100644 index b77896b95..000000000 --- a/application/basilisk/base/content/aboutDialog.xul +++ /dev/null @@ -1,151 +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/. - - - - - - -%brandDTD; - -%aboutDialogDTD; -]> - -#ifdef XP_MACOSX - -#endif - - - - - - - - - - - - -
-
-

&generic.title;

-

&captivePortal.title;

-

&dnsNotFound.title;

-

&fileNotFound.title;

-

&fileAccessDenied.title;

-

&malformedURI.title;

-

&unknownProtocolFound.title;

-

&connectionFailure.title;

-

&netTimeout.title;

-

&redirectLoop.title;

-

&unknownSocketType.title;

-

&netReset.title;

-

¬Cached.title;

-

&netOffline.title;

-

&netInterrupt.title;

-

&deniedPortAccess.title;

-

&proxyResolveFailure.title;

-

&proxyConnectFailure.title;

-

&contentEncodingError.title;

-

&unsafeContentType.title;

-

&nssFailure2.title;

-

&certerror.longpagetitle1;

-

&cspBlocked.title;

-

&remoteXUL.title;

-

&corruptedContentErrorv2.title;

-

&sslv3Used.title;

-

&weakCryptoUsed.title;

-

&inadequateSecurityError.title;

-
-
-
&generic.longDesc;
-
&captivePortal.longDesc;
-
&dnsNotFound.longDesc;
-
&fileNotFound.longDesc;
-
&fileAccessDenied.longDesc;
-
&malformedURI.longDesc;
-
&unknownProtocolFound.longDesc;
-
&connectionFailure.longDesc;
-
&netTimeout.longDesc;
-
&redirectLoop.longDesc;
-
&unknownSocketType.longDesc;
-
&netReset.longDesc;
-
¬Cached.longDesc;
-
&netOffline.longDesc2;
-
&netInterrupt.longDesc;
-
&deniedPortAccess.longDesc;
-
&proxyResolveFailure.longDesc;
-
&proxyConnectFailure.longDesc;
-
&contentEncodingError.longDesc;
-
&unsafeContentType.longDesc;
-
&nssFailure2.longDesc2;
-
&certerror.introPara;
-
&cspBlocked.longDesc;
-
&remoteXUL.longDesc;
-
&corruptedContentErrorv2.longDesc;
-
&sslv3Used.longDesc2;
-
&weakCryptoUsed.longDesc2;
-
&inadequateSecurityError.longDesc;
-
-
- - -
- - -
-

-

- - -
- - -
-

-

- - - - - - - -
- - - -
-

&prefReset.longDesc;

- -
- -
- - -
- -
-
- -
- -
- - -
-

- - -

-
- -
-
-
-

&weakCryptoAdvanced.longDesc;

-
- - -
-

- -

-
- -
- -
- -
- -
- - - - - - diff --git a/application/basilisk/base/content/aboutRobots-icon.png b/application/basilisk/base/content/aboutRobots-icon.png deleted file mode 100644 index 1c4899aaf..000000000 Binary files a/application/basilisk/base/content/aboutRobots-icon.png and /dev/null differ diff --git a/application/basilisk/base/content/aboutRobots-widget-left.png b/application/basilisk/base/content/aboutRobots-widget-left.png deleted file mode 100644 index 3a1e48d5f..000000000 Binary files a/application/basilisk/base/content/aboutRobots-widget-left.png and /dev/null differ diff --git a/application/basilisk/base/content/aboutRobots.xhtml b/application/basilisk/base/content/aboutRobots.xhtml deleted file mode 100644 index 1cef8fe16..000000000 --- a/application/basilisk/base/content/aboutRobots.xhtml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - %htmlDTD; - - %netErrorDTD; - - %globalDTD; - - %aboutrobotsDTD; -]> - - - - &robots.pagetitle; - - - - - - - - - - - -
- - -
-

&robots.errorTitleText;

-
- - -
- - -
-

&robots.errorShortDescText;

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

&robots.errorTrailerDescText;

-
- -
- - - - - - -
- - - diff --git a/application/basilisk/base/content/aboutTabCrashed.css b/application/basilisk/base/content/aboutTabCrashed.css deleted file mode 100644 index de0eabe8b..000000000 --- a/application/basilisk/base/content/aboutTabCrashed.css +++ /dev/null @@ -1,11 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -html:not(.crashDumpSubmitted) #reportSent, -html:not(.crashDumpAvailable) #reportBox, -.container[multiple="true"] > .offers > #offerHelpMessageSingle, -.container[multiple="false"] > .offers > #offerHelpMessageMultiple, -.container[multiple="false"] > .button-container > #restoreAll { - display: none; -} \ No newline at end of file diff --git a/application/basilisk/base/content/aboutTabCrashed.js b/application/basilisk/base/content/aboutTabCrashed.js deleted file mode 100644 index 23400c743..000000000 --- a/application/basilisk/base/content/aboutTabCrashed.js +++ /dev/null @@ -1,308 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -var AboutTabCrashed = { - /** - * This can be set to true once this page receives a message from the - * parent saying whether or not a crash report is available. - */ - hasReport: false, - - /** - * The messages that we might receive from the parent. - */ - MESSAGES: [ - "SetCrashReportAvailable", - "CrashReportSent", - "UpdateCount", - ], - - /** - * Items for which we will listen for click events. - */ - CLICK_TARGETS: [ - "closeTab", - "restoreTab", - "restoreAll", - "sendReport", - ], - - /** - * Returns information about this crashed tab. - * - * @return (Object) An object with the following properties: - * title (String): - * The title of the page that crashed. - * URL (String): - * The URL of the page that crashed. - */ - get pageData() { - delete this.pageData; - - let URL = document.documentURI; - let queryString = URL.replace(/^about:tabcrashed?e=tabcrashed/, ""); - - let titleMatch = queryString.match(/d=([^&]*)/); - let URLMatch = queryString.match(/u=([^&]*)/); - - return this.pageData = { - title: titleMatch && titleMatch[1] ? decodeURIComponent(titleMatch[1]) : "", - URL: URLMatch && URLMatch[1] ? decodeURIComponent(URLMatch[1]) : "", - }; - }, - - init() { - this.MESSAGES.forEach((msg) => addMessageListener(msg, this.receiveMessage.bind(this))); - addEventListener("DOMContentLoaded", this); - - document.title = this.pageData.title; - }, - - receiveMessage(message) { - switch (message.name) { - case "UpdateCount": { - this.setMultiple(message.data.count > 1); - break; - } - case "SetCrashReportAvailable": { - this.onSetCrashReportAvailable(message); - break; - } - case "CrashReportSent": { - this.onCrashReportSent(); - break; - } - } - }, - - handleEvent(event) { - switch (event.type) { - case "DOMContentLoaded": { - this.onDOMContentLoaded(); - break; - } - case "click": { - this.onClick(event); - break; - } - case "input": { - this.onInput(event); - break; - } - } - }, - - onDOMContentLoaded() { - this.CLICK_TARGETS.forEach((targetID) => { - let el = document.getElementById(targetID); - el.addEventListener("click", this); - }); - - // For setting "emailMe" checkbox automatically on email value change. - document.getElementById("email").addEventListener("input", this); - - // Error pages are loaded as LOAD_BACKGROUND, so they don't get load events. - let event = new CustomEvent("AboutTabCrashedLoad", {bubbles:true}); - document.dispatchEvent(event); - - sendAsyncMessage("Load"); - }, - - onClick(event) { - switch (event.target.id) { - case "closeTab": { - this.sendMessage("closeTab"); - break; - } - - case "restoreTab": { - this.sendMessage("restoreTab"); - break; - } - - case "restoreAll": { - this.sendMessage("restoreAll"); - break; - } - - case "sendReport": { - this.showCrashReportUI(event.target.checked); - break; - } - } - }, - - onInput(event) { - switch (event.target.id) { - case "email": { - document.getElementById("emailMe").checked = !!event.target.value; - break; - } - } - }, - /** - * After this page tells the parent that it has loaded, the parent - * will respond with whether or not a crash report is available. This - * method handles that message. - * - * @param message - * The message from the parent, which should contain a data - * Object property with the following properties: - * - * hasReport (bool): - * Whether or not there is a crash report. - * - * sendReport (bool): - * Whether or not the the user prefers to send the report - * by default. - * - * includeURL (bool): - * Whether or not the user prefers to send the URL of - * the tab that crashed. - * - * emailMe (bool): - * Whether or not to send the email address of the user - * in the report. - * - * email (String): - * The email address of the user (empty if emailMe is false). - * - * requestAutoSubmit (bool): - * Whether or not we should ask the user to automatically - * submit backlogged crash reports. - * - */ - onSetCrashReportAvailable(message) { - let data = message.data; - - if (data.hasReport) { - this.hasReport = true; - document.documentElement.classList.add("crashDumpAvailable"); - - document.getElementById("sendReport").checked = data.sendReport; - document.getElementById("includeURL").checked = data.includeURL; - - if (data.requestEmail) { - document.getElementById("requestEmail").hidden = false; - document.getElementById("emailMe").checked = data.emailMe; - if (data.emailMe) { - document.getElementById("email").value = data.email; - } - } - - this.showCrashReportUI(data.sendReport); - } else { - this.showCrashReportUI(false); - } - - if (data.requestAutoSubmit) { - document.getElementById("requestAutoSubmit").hidden = false; - } - - let event = new CustomEvent("AboutTabCrashedReady", {bubbles:true}); - document.dispatchEvent(event); - }, - - /** - * Handler for when the parent reports that the crash report associated - * with this about:tabcrashed page has been sent. - */ - onCrashReportSent() { - document.documentElement.classList.remove("crashDumpAvailable"); - document.documentElement.classList.add("crashDumpSubmitted"); - }, - - /** - * Toggles the display of the crash report form. - * - * @param shouldShow (bool) - * True if the crash report form should be shown - */ - showCrashReportUI(shouldShow) { - let options = document.getElementById("options"); - options.hidden = !shouldShow; - }, - - /** - * Toggles whether or not the page is one of several visible pages - * showing the crash reporter. This controls some of the language - * on the page, along with what the "primary" button is. - * - * @param hasMultiple (bool) - * True if there are multiple crash report pages being shown. - */ - setMultiple(hasMultiple) { - let main = document.getElementById("main"); - main.setAttribute("multiple", hasMultiple); - - let restoreTab = document.getElementById("restoreTab"); - - // The "Restore All" button has the "primary" class by default, so - // we only need to modify the "Restore Tab" button. - if (hasMultiple) { - restoreTab.classList.remove("primary"); - } else { - restoreTab.classList.add("primary"); - } - }, - - /** - * Sends a message to the parent in response to the user choosing - * one of the actions available on the page. This might also send up - * crash report information if the user has chosen to submit a crash - * report. - * - * @param messageName (String) - * The message to send to the parent - */ - sendMessage(messageName) { - let comments = ""; - let email = ""; - let URL = ""; - let sendReport = false; - let emailMe = false; - let includeURL = false; - let autoSubmit = false; - - if (this.hasReport) { - sendReport = document.getElementById("sendReport").checked; - if (sendReport) { - comments = document.getElementById("comments").value.trim(); - - includeURL = document.getElementById("includeURL").checked; - if (includeURL) { - URL = this.pageData.URL.trim(); - } - - if (!document.getElementById("requestEmail").hidden) { - emailMe = document.getElementById("emailMe").checked; - if (emailMe) { - email = document.getElementById("email").value.trim(); - } - } - } - } - - let requestAutoSubmit = document.getElementById("requestAutoSubmit"); - if (requestAutoSubmit.hidden) { - // The checkbox is hidden if the user has already opted in to sending - // backlogged crash reports. - autoSubmit = true; - } else { - autoSubmit = document.getElementById("autoSubmit").checked; - } - - sendAsyncMessage(messageName, { - sendReport, - comments, - email, - emailMe, - includeURL, - URL, - autoSubmit, - }); - }, -}; - -AboutTabCrashed.init(); diff --git a/application/basilisk/base/content/aboutTabCrashed.xhtml b/application/basilisk/base/content/aboutTabCrashed.xhtml deleted file mode 100644 index c7a7a199c..000000000 --- a/application/basilisk/base/content/aboutTabCrashed.xhtml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - %htmlDTD; - - %globalDTD; - - %brandDTD; - - %tabCrashedDTD; -]> - - - - - - - - - -
- -
-

&tabCrashed.header2;

-
- -
-

&tabCrashed.offerHelp;

-

&tabCrashed.single.offerHelpMessage;

-

&tabCrashed.multiple.offerHelpMessage;

-
- -
-

&tabCrashed.requestHelp;

-

&tabCrashed.requestHelpMessage;

- -

&tabCrashed.requestReport;

- -
- - -
- -
    -
  • - -
  • - -
  • - - -
  • - - -
- - -
- -

&tabCrashed.reportSent;

- -
- - - -
-
- - - - - -
- - -
-

&safeb.blocked.phishingPage.title2;

-

&safeb.blocked.malwarePage.title;

-

&safeb.blocked.unwantedPage.title;

-
- -
- - -
-

&safeb.blocked.phishingPage.shortDesc2;

-

&safeb.blocked.malwarePage.shortDesc;

-

&safeb.blocked.unwantedPage.shortDesc;

-
- - -
-

&safeb.blocked.phishingPage.longDesc2;

-

&safeb.blocked.malwarePage.longDesc;

-

&safeb.blocked.unwantedPage.longDesc;

-
- - -
- - -
- -
-
-
- -
-
- - - - diff --git a/application/basilisk/base/content/browser-addons.js b/application/basilisk/base/content/browser-addons.js deleted file mode 100644 index 378437b2b..000000000 --- a/application/basilisk/base/content/browser-addons.js +++ /dev/null @@ -1,869 +0,0 @@ -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -// Removes a doorhanger notification if all of the installs it was notifying -// about have ended in some way. -function removeNotificationOnEnd(notification, installs) { - let count = installs.length; - - function maybeRemove(install) { - install.removeListener(this); - - if (--count == 0) { - // Check that the notification is still showing - let current = PopupNotifications.getNotification(notification.id, notification.browser); - if (current === notification) - notification.remove(); - } - } - - for (let install of installs) { - install.addListener({ - onDownloadCancelled: maybeRemove, - onDownloadFailed: maybeRemove, - onInstallFailed: maybeRemove, - onInstallEnded: maybeRemove - }); - } -} - -const gXPInstallObserver = { - _findChildShell(aDocShell, aSoughtShell) { - if (aDocShell == aSoughtShell) - return aDocShell; - - var node = aDocShell.QueryInterface(Components.interfaces.nsIDocShellTreeItem); - for (var i = 0; i < node.childCount; ++i) { - var docShell = node.getChildAt(i); - docShell = this._findChildShell(docShell, aSoughtShell); - if (docShell == aSoughtShell) - return docShell; - } - return null; - }, - - _getBrowser(aDocShell) { - for (let browser of gBrowser.browsers) { - if (this._findChildShell(browser.docShell, aDocShell)) - return browser; - } - return null; - }, - - pendingInstalls: new WeakMap(), - - showInstallConfirmation(browser, installInfo, height = undefined) { - // If the confirmation notification is already open cache the installInfo - // and the new confirmation will be shown later - if (PopupNotifications.getNotification("addon-install-confirmation", browser)) { - let pending = this.pendingInstalls.get(browser); - if (pending) { - pending.push(installInfo); - } else { - this.pendingInstalls.set(browser, [installInfo]); - } - return; - } - - let showNextConfirmation = () => { - // Make sure the browser is still alive. - if (gBrowser.browsers.indexOf(browser) == -1) - return; - - let pending = this.pendingInstalls.get(browser); - if (pending && pending.length) - this.showInstallConfirmation(browser, pending.shift()); - } - - // If all installs have already been cancelled in some way then just show - // the next confirmation - if (installInfo.installs.every(i => i.state != AddonManager.STATE_DOWNLOADED)) { - showNextConfirmation(); - return; - } - - const anchorID = "addons-notification-icon"; - - // Make notifications persistent - var options = { - displayURI: installInfo.originatingURI, - persistent: true, - }; - - let acceptInstallation = () => { - for (let install of installInfo.installs) - install.install(); - installInfo = null; - - Services.telemetry - .getHistogramById("SECURITY_UI") - .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL_CLICK_THROUGH); - }; - - let cancelInstallation = () => { - if (installInfo) { - for (let install of installInfo.installs) { - // The notification may have been closed because the add-ons got - // cancelled elsewhere, only try to cancel those that are still - // pending install. - if (install.state != AddonManager.STATE_CANCELLED) - install.cancel(); - } - } - - showNextConfirmation(); - }; - - let unsigned = installInfo.installs.filter(i => i.addon.signedState <= AddonManager.SIGNEDSTATE_MISSING); - let someUnsigned = unsigned.length > 0 && unsigned.length < installInfo.installs.length; - - options.eventCallback = (aEvent) => { - switch (aEvent) { - case "removed": - cancelInstallation(); - break; - case "shown": - let addonList = document.getElementById("addon-install-confirmation-content"); - while (addonList.firstChild) - addonList.firstChild.remove(); - - for (let install of installInfo.installs) { - let container = document.createElement("hbox"); - - let name = document.createElement("label"); - name.setAttribute("value", install.addon.name); - name.setAttribute("class", "addon-install-confirmation-name"); - container.appendChild(name); - - if (someUnsigned && install.addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) { - let unsignedLabel = document.createElement("label"); - unsignedLabel.setAttribute("value", - gNavigatorBundle.getString("addonInstall.unsigned")); - unsignedLabel.setAttribute("class", - "addon-install-confirmation-unsigned"); - container.appendChild(unsignedLabel); - } - - addonList.appendChild(container); - } - break; - } - }; - - options.learnMoreURL = Services.urlFormatter.formatURLPref("app.support.baseURL"); - - let messageString; - let notification = document.getElementById("addon-install-confirmation-notification"); - if (unsigned.length == installInfo.installs.length) { - // None of the add-ons are verified - messageString = gNavigatorBundle.getString("addonConfirmInstallUnsigned.message"); - notification.setAttribute("warning", "true"); - options.learnMoreURL += "unsigned-addons"; - } else if (unsigned.length == 0) { - // All add-ons are verified or don't need to be verified - messageString = gNavigatorBundle.getString("addonConfirmInstall.message"); - notification.removeAttribute("warning"); - options.learnMoreURL += "find-and-install-add-ons"; - } else { - // Some of the add-ons are unverified, the list of names will indicate - // which - messageString = gNavigatorBundle.getString("addonConfirmInstallSomeUnsigned.message"); - notification.setAttribute("warning", "true"); - options.learnMoreURL += "unsigned-addons"; - } - - let brandBundle = document.getElementById("bundle_brand"); - let brandShortName = brandBundle.getString("brandShortName"); - - messageString = PluralForm.get(installInfo.installs.length, messageString); - messageString = messageString.replace("#1", brandShortName); - messageString = messageString.replace("#2", installInfo.installs.length); - - let action = { - label: gNavigatorBundle.getString("addonInstall.acceptButton.label"), - accessKey: gNavigatorBundle.getString("addonInstall.acceptButton.accesskey"), - callback: acceptInstallation, - }; - - let secondaryAction = { - label: gNavigatorBundle.getString("addonInstall.cancelButton.label"), - accessKey: gNavigatorBundle.getString("addonInstall.cancelButton.accesskey"), - callback: () => {}, - }; - - if (height) { - notification.style.minHeight = height + "px"; - } - - let tab = gBrowser.getTabForBrowser(browser); - if (tab) { - gBrowser.selectedTab = tab; - } - - let popup = PopupNotifications.show(browser, "addon-install-confirmation", - messageString, anchorID, action, - [secondaryAction], options); - - removeNotificationOnEnd(popup, installInfo.installs); - - Services.telemetry - .getHistogramById("SECURITY_UI") - .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL); - }, - - observe(aSubject, aTopic, aData) { - var brandBundle = document.getElementById("bundle_brand"); - var installInfo = aSubject.wrappedJSObject; - var browser = installInfo.browser; - - // Make sure the browser is still alive. - if (!browser || gBrowser.browsers.indexOf(browser) == -1) - return; - - const anchorID = "addons-notification-icon"; - var messageString, action; - var brandShortName = brandBundle.getString("brandShortName"); - - var notificationID = aTopic; - // Make notifications persistent - var options = { - displayURI: installInfo.originatingURI, - persistent: true, - hideClose: true, - timeout: Date.now() + 30000, - }; - - switch (aTopic) { - case "addon-install-disabled": { - notificationID = "xpinstall-disabled"; - let secondaryActions = null; - - if (gPrefService.prefIsLocked("xpinstall.enabled")) { - messageString = gNavigatorBundle.getString("xpinstallDisabledMessageLocked"); - buttons = []; - } else { - messageString = gNavigatorBundle.getString("xpinstallDisabledMessage"); - - action = { - label: gNavigatorBundle.getString("xpinstallDisabledButton"), - accessKey: gNavigatorBundle.getString("xpinstallDisabledButton.accesskey"), - callback: function editPrefs() { - gPrefService.setBoolPref("xpinstall.enabled", true); - } - }; - - secondaryActions = [{ - label: gNavigatorBundle.getString("addonInstall.cancelButton.label"), - accessKey: gNavigatorBundle.getString("addonInstall.cancelButton.accesskey"), - callback: () => {}, - }]; - } - - PopupNotifications.show(browser, notificationID, messageString, anchorID, - action, secondaryActions, options); - break; } - case "addon-install-origin-blocked": { - messageString = gNavigatorBundle.getFormattedString("xpinstallPromptMessage", - [brandShortName]); - - options.removeOnDismissal = true; - options.persistent = false; - - let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI"); - secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED); - let popup = PopupNotifications.show(browser, notificationID, - messageString, anchorID, - null, null, options); - removeNotificationOnEnd(popup, installInfo.installs); - break; } - case "addon-install-blocked": { - messageString = gNavigatorBundle.getFormattedString("xpinstallPromptMessage", - [brandShortName]); - - let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI"); - action = { - label: gNavigatorBundle.getString("xpinstallPromptAllowButton"), - accessKey: gNavigatorBundle.getString("xpinstallPromptAllowButton.accesskey"), - callback() { - secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH); - installInfo.install(); - } - }; - let secondaryAction = { - label: gNavigatorBundle.getString("xpinstallPromptMessage.dontAllow"), - accessKey: gNavigatorBundle.getString("xpinstallPromptMessage.dontAllow.accesskey"), - callback: () => {}, - }; - - secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED); - let popup = PopupNotifications.show(browser, notificationID, - messageString, anchorID, - action, [secondaryAction], options); - removeNotificationOnEnd(popup, installInfo.installs); - break; } - case "addon-install-started": { - let needsDownload = function needsDownload(aInstall) { - return aInstall.state != AddonManager.STATE_DOWNLOADED; - } - // If all installs have already been downloaded then there is no need to - // show the download progress - if (!installInfo.installs.some(needsDownload)) - return; - notificationID = "addon-progress"; - messageString = gNavigatorBundle.getString("addonDownloadingAndVerifying"); - messageString = PluralForm.get(installInfo.installs.length, messageString); - messageString = messageString.replace("#1", installInfo.installs.length); - options.installs = installInfo.installs; - options.contentWindow = browser.contentWindow; - options.sourceURI = browser.currentURI; - options.eventCallback = function(aEvent) { - switch (aEvent) { - case "shown": - let notificationElement = [...this.owner.panel.childNodes] - .find(n => n.notification == this); - if (notificationElement) { - if (Preferences.get("xpinstall.customConfirmationUI", false)) { - notificationElement.setAttribute("mainactiondisabled", "true"); - } else { - notificationElement.button.hidden = true; - } - } - break; - case "removed": - options.contentWindow = null; - options.sourceURI = null; - break; - } - }; - action = { - label: gNavigatorBundle.getString("addonInstall.acceptButton.label"), - accessKey: gNavigatorBundle.getString("addonInstall.acceptButton.accesskey"), - callback: () => {}, - }; - let secondaryAction = { - label: gNavigatorBundle.getString("addonInstall.cancelButton.label"), - accessKey: gNavigatorBundle.getString("addonInstall.cancelButton.accesskey"), - callback: () => { - for (let install of installInfo.installs) { - if (install.state != AddonManager.STATE_CANCELLED) { - install.cancel(); - } - } - }, - }; - let notification = PopupNotifications.show(browser, notificationID, messageString, - anchorID, action, - [secondaryAction], options); - notification._startTime = Date.now(); - - break; } - case "addon-install-failed": { - options.removeOnDismissal = true; - options.persistent = false; - - // TODO This isn't terribly ideal for the multiple failure case - for (let install of installInfo.installs) { - let host; - try { - host = options.displayURI.host; - } catch (e) { - // displayURI might be missing or 'host' might throw for non-nsStandardURL nsIURIs. - } - - if (!host) - host = (install.sourceURI instanceof Ci.nsIStandardURL) && - install.sourceURI.host; - - let error = (host || install.error == 0) ? "addonInstallError" : "addonLocalInstallError"; - let args; - if (install.error < 0) { - error += install.error; - args = [brandShortName, install.name]; - } else if (install.addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) { - error += "Blocklisted"; - args = [install.name]; - } else { - error += "Incompatible"; - args = [brandShortName, Services.appinfo.version, install.name]; - } - - // Add Learn More link when refusing to install an unsigned add-on - if (install.error == AddonManager.ERROR_SIGNEDSTATE_REQUIRED) { - options.learnMoreURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "unsigned-addons"; - } - - messageString = gNavigatorBundle.getFormattedString(error, args); - - PopupNotifications.show(browser, notificationID, messageString, anchorID, - action, null, options); - - // Can't have multiple notifications with the same ID, so stop here. - break; - } - this._removeProgressNotification(browser); - break; } - case "addon-install-confirmation": { - let showNotification = () => { - let height = undefined; - - if (PopupNotifications.isPanelOpen) { - let rect = document.getElementById("addon-progress-notification").getBoundingClientRect(); - height = rect.height; - } - - this._removeProgressNotification(browser); - this.showInstallConfirmation(browser, installInfo, height); - }; - - let progressNotification = PopupNotifications.getNotification("addon-progress", browser); - if (progressNotification) { - let downloadDuration = Date.now() - progressNotification._startTime; - let securityDelay = Services.prefs.getIntPref("security.dialog_enable_delay") - downloadDuration; - if (securityDelay > 0) { - setTimeout(() => { - // The download may have been cancelled during the security delay - if (PopupNotifications.getNotification("addon-progress", browser)) - showNotification(); - }, securityDelay); - break; - } - } - showNotification(); - break; } - case "addon-install-complete": { - let needsRestart = installInfo.installs.some(function(i) { - return i.addon.pendingOperations != AddonManager.PENDING_NONE; - }); - - let secondaryActions = null; - - if (needsRestart) { - notificationID = "addon-install-restart"; - messageString = gNavigatorBundle.getString("addonsInstalledNeedsRestart"); - action = { - label: gNavigatorBundle.getString("addonInstallRestartButton"), - accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"), - callback() { - BrowserUtils.restartApplication(); - } - }; - secondaryActions = [{ - label: gNavigatorBundle.getString("addonInstallRestartIgnoreButton"), - accessKey: gNavigatorBundle.getString("addonInstallRestartIgnoreButton.accesskey"), - callback: () => {}, - }]; - } else { - messageString = gNavigatorBundle.getString("addonsInstalled"); - action = null; - } - - messageString = PluralForm.get(installInfo.installs.length, messageString); - messageString = messageString.replace("#1", installInfo.installs[0].name); - messageString = messageString.replace("#2", installInfo.installs.length); - messageString = messageString.replace("#3", brandShortName); - - // Remove notification on dismissal, since it's possible to cancel the - // install through the addons manager UI, making the "restart" prompt - // irrelevant. - options.removeOnDismissal = true; - options.persistent = false; - - PopupNotifications.show(browser, notificationID, messageString, anchorID, - action, secondaryActions, options); - break; } - } - }, - _removeProgressNotification(aBrowser) { - let notification = PopupNotifications.getNotification("addon-progress", aBrowser); - if (notification) - notification.remove(); - } -}; - -const gExtensionsNotifications = { - initialized: false, - init() { - this.updateAlerts(); - this.boundUpdate = this.updateAlerts.bind(this); - ExtensionsUI.on("change", this.boundUpdate); - this.initialized = true; - }, - - uninit() { - // uninit() can race ahead of init() in some cases, if that happens, - // we have no handler to remove. - if (!this.initialized) { - return; - } - ExtensionsUI.off("change", this.boundUpdate); - }, - - updateAlerts() { - let sideloaded = ExtensionsUI.sideloaded; - let updates = ExtensionsUI.updates; - if (sideloaded.size + updates.size == 0) { - gMenuButtonBadgeManager.removeBadge(gMenuButtonBadgeManager.BADGEID_ADDONS); - } else { - gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_ADDONS, - "addon-alert"); - } - - let container = document.getElementById("PanelUI-footer-addons"); - - while (container.firstChild) { - container.firstChild.remove(); - } - - const DEFAULT_EXTENSION_ICON = - "chrome://mozapps/skin/extensions/extensionGeneric.svg"; - let items = 0; - for (let update of updates) { - if (++items > 4) { - break; - } - - let button = document.createElement("toolbarbutton"); - let text = gNavigatorBundle.getFormattedString("webextPerms.updateMenuItem", [update.addon.name]); - button.setAttribute("label", text); - - let icon = update.addon.iconURL || DEFAULT_EXTENSION_ICON; - button.setAttribute("image", icon); - - button.addEventListener("click", evt => { - ExtensionsUI.showUpdate(gBrowser, update); - }); - - container.appendChild(button); - } - - let appName; - for (let addon of sideloaded) { - if (++items > 4) { - break; - } - if (!appName) { - let brandBundle = document.getElementById("bundle_brand"); - appName = brandBundle.getString("brandShortName"); - } - - let button = document.createElement("toolbarbutton"); - let text = gNavigatorBundle.getFormattedString("webextPerms.sideloadMenuItem", [addon.name, appName]); - button.setAttribute("label", text); - - let icon = addon.iconURL || DEFAULT_EXTENSION_ICON; - button.setAttribute("image", icon); - - button.addEventListener("click", evt => { - ExtensionsUI.showSideloaded(gBrowser, addon); - }); - - container.appendChild(button); - } - }, -}; - -var LightWeightThemeWebInstaller = { - init() { - let mm = window.messageManager; - mm.addMessageListener("LightWeightThemeWebInstaller:Install", this); - mm.addMessageListener("LightWeightThemeWebInstaller:Preview", this); - mm.addMessageListener("LightWeightThemeWebInstaller:ResetPreview", this); - }, - - receiveMessage(message) { - // ignore requests from background tabs - if (message.target != gBrowser.selectedBrowser) { - return; - } - - let data = message.data; - - switch (message.name) { - case "LightWeightThemeWebInstaller:Install": { - this._installRequest(data.themeData, data.baseURI); - break; - } - case "LightWeightThemeWebInstaller:Preview": { - this._preview(data.themeData, data.baseURI); - break; - } - case "LightWeightThemeWebInstaller:ResetPreview": { - this._resetPreview(data && data.baseURI); - break; - } - } - }, - - handleEvent(event) { - switch (event.type) { - case "TabSelect": { - this._resetPreview(); - break; - } - } - }, - - get _manager() { - let temp = {}; - Cu.import("resource://gre/modules/LightweightThemeManager.jsm", temp); - delete this._manager; - return this._manager = temp.LightweightThemeManager; - }, - - _installRequest(dataString, baseURI) { - let data = this._manager.parseTheme(dataString, baseURI); - - if (!data) { - return; - } - - let uri = makeURI(baseURI); - - // A notification bar with the option to undo is normally shown after a - // theme is installed. But the discovery pane served from the url(s) - // below has its own toggle switch for quick undos, so don't show the - // notification in that case. - let notify = uri.prePath != "https://discovery.addons.mozilla.org"; - if (notify) { - try { - if (Services.prefs.getBoolPref("extensions.webapi.testing") - && (uri.prePath == "https://discovery.addons.allizom.org" - || uri.prePath == "https://discovery.addons-dev.allizom.org")) { - notify = false; - } - } catch (e) { - // getBoolPref() throws if the testing pref isn't set. ignore it. - } - } - - if (this._isAllowed(baseURI)) { - this._install(data, notify); - return; - } - - let allowButtonText = - gNavigatorBundle.getString("lwthemeInstallRequest.allowButton"); - let allowButtonAccesskey = - gNavigatorBundle.getString("lwthemeInstallRequest.allowButton.accesskey"); - let message = - gNavigatorBundle.getFormattedString("lwthemeInstallRequest.message", - [uri.host]); - let buttons = [{ - label: allowButtonText, - accessKey: allowButtonAccesskey, - callback() { - LightWeightThemeWebInstaller._install(data, notify); - } - }]; - - this._removePreviousNotifications(); - - let notificationBox = gBrowser.getNotificationBox(); - let notificationBar = - notificationBox.appendNotification(message, "lwtheme-install-request", "", - notificationBox.PRIORITY_INFO_MEDIUM, - buttons); - notificationBar.persistence = 1; - }, - - _install(newLWTheme, notify) { - let previousLWTheme = this._manager.currentTheme; - - let listener = { - onEnabling(aAddon, aRequiresRestart) { - if (!aRequiresRestart) { - return; - } - - let messageString = gNavigatorBundle.getFormattedString("lwthemeNeedsRestart.message", - [aAddon.name], 1); - - let action = { - label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"), - accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"), - callback() { - BrowserUtils.restartApplication(); - } - }; - - let options = { - persistent: true - }; - - PopupNotifications.show(gBrowser.selectedBrowser, "addon-theme-change", - messageString, "addons-notification-icon", - action, null, options); - }, - - onEnabled(aAddon) { - if (notify) { - LightWeightThemeWebInstaller._postInstallNotification(newLWTheme, previousLWTheme); - } - } - }; - - AddonManager.addAddonListener(listener); - this._manager.currentTheme = newLWTheme; - AddonManager.removeAddonListener(listener); - }, - - _postInstallNotification(newTheme, previousTheme) { - function text(id) { - return gNavigatorBundle.getString("lwthemePostInstallNotification." + id); - } - - let buttons = [{ - label: text("undoButton"), - accessKey: text("undoButton.accesskey"), - callback() { - LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id); - LightWeightThemeWebInstaller._manager.currentTheme = previousTheme; - } - }, { - label: text("manageButton"), - accessKey: text("manageButton.accesskey"), - callback() { - BrowserOpenAddonsMgr("addons://list/theme"); - } - }]; - - this._removePreviousNotifications(); - - let notificationBox = gBrowser.getNotificationBox(); - let notificationBar = - notificationBox.appendNotification(text("message"), - "lwtheme-install-notification", "", - notificationBox.PRIORITY_INFO_MEDIUM, - buttons); - notificationBar.persistence = 1; - notificationBar.timeout = Date.now() + 20000; // 20 seconds - }, - - _removePreviousNotifications() { - let box = gBrowser.getNotificationBox(); - - ["lwtheme-install-request", - "lwtheme-install-notification"].forEach(function(value) { - let notification = box.getNotificationWithValue(value); - if (notification) - box.removeNotification(notification); - }); - }, - - _preview(dataString, baseURI) { - if (!this._isAllowed(baseURI)) - return; - - let data = this._manager.parseTheme(dataString, baseURI); - if (!data) - return; - - this._resetPreview(); - gBrowser.tabContainer.addEventListener("TabSelect", this); - this._manager.previewTheme(data); - }, - - _resetPreview(baseURI) { - if (baseURI && !this._isAllowed(baseURI)) - return; - gBrowser.tabContainer.removeEventListener("TabSelect", this); - this._manager.resetPreview(); - }, - - _isAllowed(srcURIString) { - let uri; - try { - uri = makeURI(srcURIString); - } catch (e) { - // makeURI fails if srcURIString is a nonsense URI - return false; - } - - if (!uri.schemeIs("https")) { - return false; - } - - let pm = Services.perms; - return pm.testPermission(uri, "install") == pm.ALLOW_ACTION; - } -}; - -/* - * Listen for Lightweight Theme styling changes and update the browser's theme accordingly. - */ -var LightweightThemeListener = { - _modifiedStyles: [], - - init() { - XPCOMUtils.defineLazyGetter(this, "styleSheet", function() { - for (let i = document.styleSheets.length - 1; i >= 0; i--) { - let sheet = document.styleSheets[i]; - if (sheet.href == "chrome://browser/skin/browser-lightweightTheme.css") - return sheet; - } - return undefined; - }); - - Services.obs.addObserver(this, "lightweight-theme-styling-update", false); - Services.obs.addObserver(this, "lightweight-theme-optimized", false); - if (document.documentElement.hasAttribute("lwtheme")) - this.updateStyleSheet(document.documentElement.style.backgroundImage); - }, - - uninit() { - Services.obs.removeObserver(this, "lightweight-theme-styling-update"); - Services.obs.removeObserver(this, "lightweight-theme-optimized"); - }, - - /** - * Append the headerImage to the background-image property of all rulesets in - * browser-lightweightTheme.css. - * - * @param headerImage - a string containing a CSS image for the lightweight theme header. - */ - updateStyleSheet(headerImage) { - if (!this.styleSheet) - return; - this.substituteRules(this.styleSheet.cssRules, headerImage); - }, - - substituteRules(ruleList, headerImage, existingStyleRulesModified = 0) { - let styleRulesModified = 0; - for (let i = 0; i < ruleList.length; i++) { - let rule = ruleList[i]; - if (rule instanceof Ci.nsIDOMCSSGroupingRule) { - // Add the number of modified sub-rules to the modified count - styleRulesModified += this.substituteRules(rule.cssRules, headerImage, existingStyleRulesModified + styleRulesModified); - } else if (rule instanceof Ci.nsIDOMCSSStyleRule) { - if (!rule.style.backgroundImage) - continue; - let modifiedIndex = existingStyleRulesModified + styleRulesModified; - if (!this._modifiedStyles[modifiedIndex]) - this._modifiedStyles[modifiedIndex] = { backgroundImage: rule.style.backgroundImage }; - - rule.style.backgroundImage = this._modifiedStyles[modifiedIndex].backgroundImage + ", " + headerImage; - styleRulesModified++; - } else { - Cu.reportError("Unsupported rule encountered"); - } - } - return styleRulesModified; - }, - - // nsIObserver - observe(aSubject, aTopic, aData) { - if ((aTopic != "lightweight-theme-styling-update" && aTopic != "lightweight-theme-optimized") || - !this.styleSheet) - return; - - if (aTopic == "lightweight-theme-optimized" && aSubject != window) - return; - - let themeData = JSON.parse(aData); - if (!themeData) - return; - this.updateStyleSheet("url(" + themeData.headerURL + ")"); - }, -}; diff --git a/application/basilisk/base/content/browser-captivePortal.js b/application/basilisk/base/content/browser-captivePortal.js deleted file mode 100644 index c2e45c4ed..000000000 --- a/application/basilisk/base/content/browser-captivePortal.js +++ /dev/null @@ -1,257 +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/. */ - -XPCOMUtils.defineLazyServiceGetter(this, "cps", - "@mozilla.org/network/captive-portal-service;1", - "nsICaptivePortalService"); - -var CaptivePortalWatcher = { - /** - * This constant is chosen to be large enough for a portal recheck to complete, - * and small enough that the delay in opening a tab isn't too noticeable. - * Please see comments for _delayedCaptivePortalDetected for more details. - */ - PORTAL_RECHECK_DELAY_MS: Preferences.get("captivedetect.portalRecheckDelayMS", 500), - - // This is the value used to identify the captive portal notification. - PORTAL_NOTIFICATION_VALUE: "captive-portal-detected", - - // This holds a weak reference to the captive portal tab so that we - // don't leak it if the user closes it. - _captivePortalTab: null, - - /** - * If a portal is detected when we don't have focus, we first wait for focus - * and then add the tab if, after a recheck, the portal is still active. This - * is set to true while we wait so that in the unlikely event that we receive - * another notification while waiting, we don't do things twice. - */ - _delayedCaptivePortalDetectedInProgress: false, - - // In the situation above, this is set to true while we wait for the recheck. - // This flag exists so that tests can appropriately simulate a recheck. - _waitingForRecheck: false, - - get _captivePortalNotification() { - let nb = document.getElementById("high-priority-global-notificationbox"); - return nb.getNotificationWithValue(this.PORTAL_NOTIFICATION_VALUE); - }, - - get canonicalURL() { - return Services.prefs.getCharPref("captivedetect.canonicalURL"); - }, - - get _browserBundle() { - delete this._browserBundle; - return this._browserBundle = - Services.strings.createBundle("chrome://browser/locale/browser.properties"); - }, - - init() { - Services.obs.addObserver(this, "captive-portal-login", false); - Services.obs.addObserver(this, "captive-portal-login-abort", false); - Services.obs.addObserver(this, "captive-portal-login-success", false); - - if (cps.state == cps.LOCKED_PORTAL) { - // A captive portal has already been detected. - this._captivePortalDetected(); - - // Automatically open a captive portal tab if there's no other browser window. - let windows = Services.wm.getEnumerator("navigator:browser"); - if (windows.getNext() == window && !windows.hasMoreElements()) { - this.ensureCaptivePortalTab(); - } - } - - cps.recheckCaptivePortal(); - }, - - uninit() { - Services.obs.removeObserver(this, "captive-portal-login"); - Services.obs.removeObserver(this, "captive-portal-login-abort"); - Services.obs.removeObserver(this, "captive-portal-login-success"); - - - if (this._delayedCaptivePortalDetectedInProgress) { - Services.obs.removeObserver(this, "xul-window-visible"); - } - }, - - observe(aSubject, aTopic, aData) { - switch (aTopic) { - case "captive-portal-login": - this._captivePortalDetected(); - break; - case "captive-portal-login-abort": - case "captive-portal-login-success": - this._captivePortalGone(); - break; - case "xul-window-visible": - this._delayedCaptivePortalDetected(); - break; - } - }, - - _captivePortalDetected() { - if (this._delayedCaptivePortalDetectedInProgress) { - return; - } - - let win = RecentWindow.getMostRecentBrowserWindow(); - // If no browser window has focus, open and show the tab when we regain focus. - // This is so that if a different application was focused, when the user - // (re-)focuses a browser window, we open the tab immediately in that window - // so they can log in before continuing to browse. - if (win != Services.ww.activeWindow) { - this._delayedCaptivePortalDetectedInProgress = true; - Services.obs.addObserver(this, "xul-window-visible", false); - } - - this._showNotification(); - }, - - /** - * Called after we regain focus if we detect a portal while a browser window - * doesn't have focus. Triggers a portal recheck to reaffirm state, and adds - * the tab if needed after a short delay to allow the recheck to complete. - */ - _delayedCaptivePortalDetected() { - if (!this._delayedCaptivePortalDetectedInProgress) { - return; - } - - let win = RecentWindow.getMostRecentBrowserWindow(); - if (win != Services.ww.activeWindow) { - // The window that got focused was not a browser window. - return; - } - Services.obs.removeObserver(this, "xul-window-visible"); - this._delayedCaptivePortalDetectedInProgress = false; - - if (win != window) { - // Some other browser window got focus, we don't have to do anything. - return; - } - // Trigger a portal recheck. The user may have logged into the portal via - // another client, or changed networks. - cps.recheckCaptivePortal(); - this._waitingForRecheck = true; - let requestTime = Date.now(); - - let self = this; - Services.obs.addObserver(function observer() { - let time = Date.now() - requestTime; - Services.obs.removeObserver(observer, "captive-portal-check-complete"); - self._waitingForRecheck = false; - if (cps.state != cps.LOCKED_PORTAL) { - // We're free of the portal! - return; - } - - if (time <= self.PORTAL_RECHECK_DELAY_MS) { - // The amount of time elapsed since we requested a recheck (i.e. since - // the browser window was focused) was small enough that we can add and - // focus a tab with the login page with no noticeable delay. - self.ensureCaptivePortalTab(); - } - }, "captive-portal-check-complete", false); - }, - - _captivePortalGone() { - if (this._delayedCaptivePortalDetectedInProgress) { - Services.obs.removeObserver(this, "xul-window-visible"); - this._delayedCaptivePortalDetectedInProgress = false; - } - - this._removeNotification(); - }, - - handleEvent(aEvent) { - if (aEvent.type != "TabSelect" || !this._captivePortalTab || !this._captivePortalNotification) { - return; - } - - let tab = this._captivePortalTab.get(); - let n = this._captivePortalNotification; - if (!tab || !n) { - return; - } - - let doc = tab.ownerDocument; - let button = n.querySelector("button.notification-button"); - if (doc.defaultView.gBrowser.selectedTab == tab) { - button.style.visibility = "hidden"; - } else { - button.style.visibility = "visible"; - } - }, - - _showNotification() { - let buttons = [ - { - label: this._browserBundle.GetStringFromName("captivePortal.showLoginPage"), - callback: () => { - this.ensureCaptivePortalTab(); - - // Returning true prevents the notification from closing. - return true; - }, - isDefault: true, - }, - ]; - - let message = this._browserBundle.GetStringFromName("captivePortal.infoMessage2"); - - let closeHandler = (aEventName) => { - if (aEventName != "removed") { - return; - } - gBrowser.tabContainer.removeEventListener("TabSelect", this); - }; - - let nb = document.getElementById("high-priority-global-notificationbox"); - nb.appendNotification(message, this.PORTAL_NOTIFICATION_VALUE, "", - nb.PRIORITY_INFO_MEDIUM, buttons, closeHandler); - - gBrowser.tabContainer.addEventListener("TabSelect", this); - }, - - _removeNotification() { - let n = this._captivePortalNotification; - if (!n || !n.parentNode) { - return; - } - n.close(); - }, - - ensureCaptivePortalTab() { - let tab; - if (this._captivePortalTab) { - tab = this._captivePortalTab.get(); - } - - // If the tab is gone or going, we need to open a new one. - if (!tab || tab.closing || !tab.parentNode) { - tab = gBrowser.addTab(this.canonicalURL, { ownerTab: gBrowser.selectedTab }); - this._captivePortalTab = Cu.getWeakReference(tab); - } - - gBrowser.selectedTab = tab; - - let canonicalURI = makeURI(this.canonicalURL); - - // When we are no longer captive, close the tab if it's at the canonical URL. - let tabCloser = () => { - Services.obs.removeObserver(tabCloser, "captive-portal-login-abort"); - Services.obs.removeObserver(tabCloser, "captive-portal-login-success"); - if (!tab || tab.closing || !tab.parentNode || !tab.linkedBrowser || - !tab.linkedBrowser.currentURI.equalsExceptRef(canonicalURI)) { - return; - } - gBrowser.removeTab(tab); - } - Services.obs.addObserver(tabCloser, "captive-portal-login-abort", false); - Services.obs.addObserver(tabCloser, "captive-portal-login-success", false); - }, -}; diff --git a/application/basilisk/base/content/browser-charsetmenu.inc b/application/basilisk/base/content/browser-charsetmenu.inc deleted file mode 100644 index 806b1cf03..000000000 --- a/application/basilisk/base/content/browser-charsetmenu.inc +++ /dev/null @@ -1,12 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - - - - diff --git a/application/basilisk/base/content/browser-compacttheme.js b/application/basilisk/base/content/browser-compacttheme.js deleted file mode 100644 index 87095df51..000000000 --- a/application/basilisk/base/content/browser-compacttheme.js +++ /dev/null @@ -1,106 +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/. */ - -/** - * Listeners for the compact theme. This adds an extra stylesheet - * to browser.xul if a pref is set and no other themes are applied. - */ -var CompactTheme = { - styleSheetLocation: "chrome://browser/skin/compacttheme.css", - styleSheet: null, - initialized: false, - - get isStyleSheetEnabled() { - return this.styleSheet && !this.styleSheet.sheet.disabled; - }, - - get isThemeCurrentlyApplied() { - let theme = LightweightThemeManager.currentTheme; - return theme && ( - theme.id == "firefox-compact-dark@mozilla.org" || - theme.id == "firefox-compact-light@mozilla.org"); - }, - - init() { - this.initialized = true; - Services.obs.addObserver(this, "lightweight-theme-styling-update", false); - - if (this.isThemeCurrentlyApplied) { - this._toggleStyleSheet(true); - } - }, - - createStyleSheet() { - let styleSheetAttr = `href="${this.styleSheetLocation}" type="text/css"`; - this.styleSheet = document.createProcessingInstruction( - "xml-stylesheet", styleSheetAttr); - this.styleSheet.addEventListener("load", this); - document.insertBefore(this.styleSheet, document.documentElement); - this.styleSheet.sheet.disabled = true; - }, - - observe(subject, topic, data) { - if (topic == "lightweight-theme-styling-update") { - let newTheme = JSON.parse(data); - if (newTheme && ( - newTheme.id == "firefox-compact-light@mozilla.org" || - newTheme.id == "firefox-compact-dark@mozilla.org")) { - // We are using the theme ID on this object instead of always referencing - // LightweightThemeManager.currentTheme in case this is a preview - this._toggleStyleSheet(true); - } else { - this._toggleStyleSheet(false); - } - - } - }, - - handleEvent(e) { - if (e.type === "load") { - this.styleSheet.removeEventListener("load", this); - this.refreshBrowserDisplay(); - } - }, - - refreshBrowserDisplay() { - // Don't touch things on the browser if gBrowserInit.onLoad hasn't - // yet fired. - if (this.initialized) { - gBrowser.tabContainer._positionPinnedTabs(); - } - }, - - _toggleStyleSheet(enabled) { - let wasEnabled = this.isStyleSheetEnabled; - if (enabled) { - // The stylesheet may not have been created yet if it wasn't - // needed on initial load. Make it now. - if (!this.styleSheet) { - this.createStyleSheet(); - } - this.styleSheet.sheet.disabled = false; - this.refreshBrowserDisplay(); - } else if (!enabled && wasEnabled) { - this.styleSheet.sheet.disabled = true; - this.refreshBrowserDisplay(); - } - }, - - uninit() { - Services.obs.removeObserver(this, "lightweight-theme-styling-update"); - if (this.styleSheet) { - this.styleSheet.removeEventListener("load", this); - } - this.styleSheet = null; - } -}; - -#ifdef INSTALL_COMPACT_THEMES -// If the compact theme is going to be applied in gBrowserInit.onLoad, -// then preload it now. This prevents a flash of unstyled content where the -// normal theme is applied while the compact theme stylesheet is loading. -if (this != Services.appShell.hiddenDOMWindow && CompactTheme.isThemeCurrentlyApplied) { - CompactTheme.createStyleSheet(); -} -#endif diff --git a/application/basilisk/base/content/browser-context.inc b/application/basilisk/base/content/browser-context.inc deleted file mode 100644 index fbad5e584..000000000 --- a/application/basilisk/base/content/browser-context.inc +++ /dev/null @@ -1,452 +0,0 @@ -# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# NB: IF YOU ADD ITEMS TO THIS FILE, PLEASE UPDATE THE WHITELIST IN -# BrowserUITelemetry.jsm. SEE BUG 991757 FOR DETAILS. - - - - - - - - - - - - - - - -# label and data-usercontextid are dynamically set. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#ifdef CONTEXT_COPY_IMAGE_CONTENTS - -#endif - - - - - - - - - - - - - - - - - - - - - -