summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-22 20:58:36 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-22 20:58:36 +0000
commitab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14 (patch)
tree55a1e7c2bf2007f88cc5518052419bee63126688 /application
parent9ffed6e8bfb35c090caf5f8bca7a0f8bd4cbec94 (diff)
parent1d7664d3a1db098024c7624650b0d272a26635e0 (diff)
downloadUXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar
UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar.gz
UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar.lz
UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar.xz
UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.zip
Merge branch 'master' into Pale_Moon-release
# Conflicts: # application/palemoon/config/version.txt # old-configure.in
Diffstat (limited to 'application')
-rw-r--r--application/basilisk/Makefile.in3
-rw-r--r--application/basilisk/app/profile/basilisk.js74
-rw-r--r--application/basilisk/base/content/aboutRobots-icon.pngbin9817 -> 0 bytes
-rw-r--r--application/basilisk/base/content/aboutRobots-widget-left.pngbin2224 -> 0 bytes
-rw-r--r--application/basilisk/base/content/aboutRobots.xhtml108
-rw-r--r--application/basilisk/base/content/aboutaccounts/aboutaccounts.css24
-rw-r--r--application/basilisk/base/content/aboutaccounts/aboutaccounts.js543
-rw-r--r--application/basilisk/base/content/aboutaccounts/aboutaccounts.xhtml112
-rw-r--r--application/basilisk/base/content/aboutaccounts/images/fox.pngbin1951 -> 0 bytes
-rw-r--r--application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro.pngbin6441 -> 0 bytes
-rw-r--r--application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro@2x.pngbin12852 -> 0 bytes
-rw-r--r--application/basilisk/base/content/aboutaccounts/main.css166
-rw-r--r--application/basilisk/base/content/aboutaccounts/normalize.css402
-rw-r--r--application/basilisk/base/content/abouthome/aboutHome.css4
-rw-r--r--application/basilisk/base/content/abouthome/aboutHome.xhtml2
-rw-r--r--application/basilisk/base/content/browser-context.inc30
-rw-r--r--application/basilisk/base/content/browser-doctype.inc2
-rw-r--r--application/basilisk/base/content/browser-fxaccounts.js314
-rw-r--r--application/basilisk/base/content/browser-menubar.inc43
-rw-r--r--application/basilisk/base/content/browser-places.js13
-rw-r--r--application/basilisk/base/content/browser-sets.inc7
-rw-r--r--application/basilisk/base/content/browser-syncui.js599
-rw-r--r--application/basilisk/base/content/browser.css12
-rw-r--r--application/basilisk/base/content/browser.js181
-rw-r--r--application/basilisk/base/content/browser.xul81
-rw-r--r--application/basilisk/base/content/content.js6
-rw-r--r--application/basilisk/base/content/global-scripts.inc2
-rw-r--r--application/basilisk/base/content/nsContextMenu.js39
-rw-r--r--application/basilisk/base/content/sync/customize.css28
-rw-r--r--application/basilisk/base/content/sync/customize.js25
-rw-r--r--application/basilisk/base/content/sync/customize.xul62
-rw-r--r--application/basilisk/base/content/tab-content.js38
-rw-r--r--application/basilisk/base/content/tabbrowser.xml210
-rw-r--r--application/basilisk/base/content/urlbarBindings.xml22
-rw-r--r--application/basilisk/base/content/utilityOverlay.js101
-rw-r--r--application/basilisk/base/content/web-panels.xul1
-rw-r--r--application/basilisk/base/jar.mn42
-rw-r--r--application/basilisk/branding/shared/uaoverrides.inc2
-rw-r--r--application/basilisk/components/about/AboutRedirector.cpp15
-rw-r--r--application/basilisk/components/build/nsModule.cpp5
-rw-r--r--application/basilisk/components/contextualidentity/content/usercontext.css91
-rw-r--r--application/basilisk/components/contextualidentity/jar.mn6
-rw-r--r--application/basilisk/components/contextualidentity/moz.build7
-rw-r--r--application/basilisk/components/customizableui/CustomizableUI.jsm23
-rw-r--r--application/basilisk/components/customizableui/CustomizableWidgets.jsm228
-rw-r--r--application/basilisk/components/customizableui/CustomizeMode.jsm9
-rw-r--r--application/basilisk/components/customizableui/content/panelUI.inc.xul110
-rw-r--r--application/basilisk/components/customizableui/moz.build5
-rw-r--r--application/basilisk/components/distribution.js19
-rw-r--r--application/basilisk/components/feeds/FeedWriter.js7
-rw-r--r--application/basilisk/components/feeds/WebContentConverter.js9
-rw-r--r--application/basilisk/components/moz.build9
-rw-r--r--application/basilisk/components/nsBrowserContentHandler.js15
-rw-r--r--application/basilisk/components/nsBrowserGlue.js152
-rw-r--r--application/basilisk/components/places/PlacesUIUtils.jsm6
-rw-r--r--application/basilisk/components/places/moz.build2
-rw-r--r--application/basilisk/components/preferences/containers.js176
-rw-r--r--application/basilisk/components/preferences/containers.xul52
-rw-r--r--application/basilisk/components/preferences/cookies.js39
-rw-r--r--application/basilisk/components/preferences/cookies.xul4
-rw-r--r--application/basilisk/components/preferences/handlers.css4
-rw-r--r--application/basilisk/components/preferences/handlers.xml23
-rw-r--r--application/basilisk/components/preferences/in-content/advanced.js19
-rw-r--r--application/basilisk/components/preferences/in-content/advanced.xul13
-rw-r--r--application/basilisk/components/preferences/in-content/containers.js73
-rw-r--r--application/basilisk/components/preferences/in-content/containers.xul54
-rw-r--r--application/basilisk/components/preferences/in-content/jar.mn5
-rw-r--r--application/basilisk/components/preferences/in-content/preferences.js3
-rw-r--r--application/basilisk/components/preferences/in-content/preferences.xul19
-rw-r--r--application/basilisk/components/preferences/in-content/privacy.js88
-rw-r--r--application/basilisk/components/preferences/in-content/privacy.xul25
-rw-r--r--application/basilisk/components/preferences/in-content/sync.js451
-rw-r--r--application/basilisk/components/preferences/in-content/sync.xul327
-rw-r--r--application/basilisk/components/preferences/jar.mn2
-rw-r--r--application/basilisk/components/sessionstore/ContentRestore.jsm4
-rw-r--r--application/basilisk/components/sessionstore/SessionHistory.jsm3
-rw-r--r--application/basilisk/components/sessionstore/SessionStore.jsm42
-rw-r--r--application/basilisk/components/sessionstore/TabState.jsm4
-rw-r--r--application/basilisk/components/sync/aboutSyncTabs-bindings.xml (renamed from application/basilisk/base/content/sync/aboutSyncTabs-bindings.xml)0
-rw-r--r--application/basilisk/components/sync/aboutSyncTabs.css (renamed from application/basilisk/base/content/sync/aboutSyncTabs.css)0
-rw-r--r--application/basilisk/components/sync/aboutSyncTabs.js (renamed from application/basilisk/base/content/sync/aboutSyncTabs.js)121
-rw-r--r--application/basilisk/components/sync/aboutSyncTabs.xul (renamed from application/basilisk/base/content/sync/aboutSyncTabs.xul)0
-rw-r--r--application/basilisk/components/sync/addDevice.js (renamed from application/basilisk/base/content/sync/addDevice.js)0
-rw-r--r--application/basilisk/components/sync/addDevice.xul (renamed from application/basilisk/base/content/sync/addDevice.xul)2
-rw-r--r--application/basilisk/components/sync/genericChange.js (renamed from application/basilisk/base/content/sync/genericChange.js)15
-rw-r--r--application/basilisk/components/sync/genericChange.xul (renamed from application/basilisk/base/content/sync/genericChange.xul)4
-rw-r--r--application/basilisk/components/sync/jar.mn22
-rw-r--r--application/basilisk/components/sync/key.xhtml (renamed from application/basilisk/base/content/sync/key.xhtml)2
-rw-r--r--application/basilisk/components/sync/moz.build (renamed from application/basilisk/components/webextensions/schemas/moz.build)3
-rw-r--r--application/basilisk/components/sync/notification.xml129
-rw-r--r--application/basilisk/components/sync/progress.js71
-rw-r--r--application/basilisk/components/sync/progress.xhtml55
-rw-r--r--application/basilisk/components/sync/quota.js (renamed from application/basilisk/base/content/sync/quota.js)0
-rw-r--r--application/basilisk/components/sync/quota.xul (renamed from application/basilisk/base/content/sync/quota.xul)0
-rw-r--r--application/basilisk/components/sync/setup.js (renamed from application/basilisk/base/content/sync/setup.js)35
-rw-r--r--application/basilisk/components/sync/setup.xul (renamed from application/basilisk/base/content/sync/setup.xul)15
-rw-r--r--application/basilisk/components/sync/utils.js (renamed from application/basilisk/base/content/sync/utils.js)29
-rw-r--r--application/basilisk/components/syncedtabs/EventEmitter.jsm45
-rw-r--r--application/basilisk/components/syncedtabs/SyncedTabsDeckComponent.js169
-rw-r--r--application/basilisk/components/syncedtabs/SyncedTabsDeckStore.js60
-rw-r--r--application/basilisk/components/syncedtabs/SyncedTabsDeckView.js116
-rw-r--r--application/basilisk/components/syncedtabs/SyncedTabsListStore.js235
-rw-r--r--application/basilisk/components/syncedtabs/TabListComponent.js138
-rw-r--r--application/basilisk/components/syncedtabs/TabListView.js568
-rw-r--r--application/basilisk/components/syncedtabs/jar.mn7
-rw-r--r--application/basilisk/components/syncedtabs/moz.build17
-rw-r--r--application/basilisk/components/syncedtabs/sidebar.js30
-rw-r--r--application/basilisk/components/syncedtabs/sidebar.xhtml114
-rw-r--r--application/basilisk/components/syncedtabs/util.js23
-rw-r--r--application/basilisk/components/webextensions/.eslintrc.js22
-rw-r--r--application/basilisk/components/webextensions/ext-bookmarks.js374
-rw-r--r--application/basilisk/components/webextensions/ext-browserAction.js531
-rw-r--r--application/basilisk/components/webextensions/ext-c-contextMenus.js158
-rw-r--r--application/basilisk/components/webextensions/ext-c-omnibox.js32
-rw-r--r--application/basilisk/components/webextensions/ext-c-tabs.js35
-rw-r--r--application/basilisk/components/webextensions/ext-commands.js264
-rw-r--r--application/basilisk/components/webextensions/ext-contextMenus.js537
-rw-r--r--application/basilisk/components/webextensions/ext-desktop-runtime.js26
-rw-r--r--application/basilisk/components/webextensions/ext-history.js246
-rw-r--r--application/basilisk/components/webextensions/ext-omnibox.js104
-rw-r--r--application/basilisk/components/webextensions/ext-pageAction.js290
-rw-r--r--application/basilisk/components/webextensions/ext-sessions.js92
-rw-r--r--application/basilisk/components/webextensions/ext-tabs.js1093
-rw-r--r--application/basilisk/components/webextensions/ext-utils.js1239
-rw-r--r--application/basilisk/components/webextensions/ext-windows.js231
-rw-r--r--application/basilisk/components/webextensions/extension-mac-panel.css3
-rw-r--r--application/basilisk/components/webextensions/extension-mac.css11
-rw-r--r--application/basilisk/components/webextensions/extension-win-panel.css5
-rw-r--r--application/basilisk/components/webextensions/extension.css572
-rw-r--r--application/basilisk/components/webextensions/extension.svg19
-rw-r--r--application/basilisk/components/webextensions/extensions-browser.manifest31
-rw-r--r--application/basilisk/components/webextensions/jar.mn29
-rw-r--r--application/basilisk/components/webextensions/moz.build14
-rw-r--r--application/basilisk/components/webextensions/schemas/LICENSE27
-rw-r--r--application/basilisk/components/webextensions/schemas/bookmarks.json568
-rw-r--r--application/basilisk/components/webextensions/schemas/browser_action.json430
-rw-r--r--application/basilisk/components/webextensions/schemas/commands.json148
-rw-r--r--application/basilisk/components/webextensions/schemas/context_menus.json424
-rw-r--r--application/basilisk/components/webextensions/schemas/context_menus_internal.json78
-rw-r--r--application/basilisk/components/webextensions/schemas/history.json316
-rw-r--r--application/basilisk/components/webextensions/schemas/jar.mn16
-rw-r--r--application/basilisk/components/webextensions/schemas/omnibox.json248
-rw-r--r--application/basilisk/components/webextensions/schemas/page_action.json235
-rw-r--r--application/basilisk/components/webextensions/schemas/sessions.json146
-rw-r--r--application/basilisk/components/webextensions/schemas/tabs.json1295
-rw-r--r--application/basilisk/components/webextensions/schemas/windows.json508
-rw-r--r--application/basilisk/configure.in16
-rw-r--r--application/basilisk/confvars.sh5
-rw-r--r--application/basilisk/extensions/pdfjs/content/PdfJs.jsm23
-rw-r--r--application/basilisk/extensions/pdfjs/content/PdfStreamConverter.jsm38
-rw-r--r--application/basilisk/installer/allowed-dupes.mn2
-rw-r--r--application/basilisk/installer/package-manifest.in28
-rw-r--r--application/basilisk/installer/windows/Makefile.in6
-rw-r--r--application/basilisk/installer/windows/nsis/defines.nsi.in4
-rw-r--r--application/basilisk/installer/windows/nsis/installer.nsi131
-rw-r--r--application/basilisk/installer/windows/nsis/maintenanceservice_installer.nsi332
-rw-r--r--application/basilisk/installer/windows/nsis/shared.nsh93
-rw-r--r--application/basilisk/installer/windows/nsis/uninstaller.nsi18
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/aboutAccounts.dtd16
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/aboutHome.dtd4
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/aboutRobots.dtd29
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/browser.dtd66
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/browser.properties31
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/preferences/containers.dtd24
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/preferences/containers.properties31
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/preferences/cookies.dtd1
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/preferences/preferences.dtd1
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/preferences/preferences.properties14
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/preferences/privacy.dtd7
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd73
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd1
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/syncKey.dtd8
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/syncProgress.dtd15
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/syncQuota.properties2
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd18
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/syncSetup.properties28
-rw-r--r--application/basilisk/locales/en-US/installer/custom.properties4
-rw-r--r--application/basilisk/locales/jar.mn15
-rw-r--r--application/basilisk/modules/AboutHome.jsm2
-rw-r--r--application/basilisk/modules/ContentClick.jsm5
-rw-r--r--application/basilisk/modules/DirectoryLinksProvider.jsm6
-rw-r--r--application/basilisk/modules/ProcessHangMonitor.jsm2
-rw-r--r--application/basilisk/themes/linux/jar.mn6
-rw-r--r--application/basilisk/themes/linux/syncProgress.css46
-rw-r--r--application/basilisk/themes/linux/syncedtabs/sidebar.css69
-rw-r--r--application/basilisk/themes/osx/jar.mn10
-rw-r--r--application/basilisk/themes/osx/syncProgress.css46
-rw-r--r--application/basilisk/themes/osx/syncedtabs/sidebar.css154
-rw-r--r--application/basilisk/themes/shared/browser.inc2
-rw-r--r--application/basilisk/themes/shared/customizableui/panelUI.inc.css276
-rw-r--r--application/basilisk/themes/shared/incontentprefs/containers.css32
-rw-r--r--application/basilisk/themes/shared/incontentprefs/preferences.inc.css3
-rw-r--r--application/basilisk/themes/shared/jar.inc.mn2
-rw-r--r--application/basilisk/themes/shared/menupanel.inc.css19
-rw-r--r--application/basilisk/themes/shared/preferences/containers.css53
-rw-r--r--application/basilisk/themes/shared/syncedtabs/sidebar.inc.css234
-rw-r--r--application/basilisk/themes/shared/toolbarbuttons.inc.css46
-rw-r--r--application/basilisk/themes/windows/jar.mn8
-rw-r--r--application/basilisk/themes/windows/syncProgress.css46
-rw-r--r--application/basilisk/themes/windows/syncedtabs/sidebar.css132
-rw-r--r--application/palemoon/app/blocklist.xml7
-rw-r--r--application/palemoon/app/profile/palemoon.js10
-rw-r--r--application/palemoon/base/content/aboutDialog.css71
-rw-r--r--application/palemoon/base/content/aboutDialog.js530
-rw-r--r--application/palemoon/base/content/aboutDialog.xul73
-rw-r--r--application/palemoon/base/content/aboutRobots-icon.pngbin9817 -> 0 bytes
-rw-r--r--application/palemoon/base/content/aboutRobots-widget-left.pngbin2224 -> 0 bytes
-rw-r--r--application/palemoon/base/content/aboutRobots.xhtml108
-rw-r--r--application/palemoon/base/content/baseMenuOverlay.xul10
-rw-r--r--application/palemoon/base/content/browser-appmenu.inc9
-rw-r--r--application/palemoon/base/content/browser-context.inc7
-rw-r--r--application/palemoon/base/content/browser-menudragging.js26
-rw-r--r--application/palemoon/base/content/browser-syncui.js26
-rw-r--r--application/palemoon/base/content/browser.js17
-rw-r--r--application/palemoon/base/content/browser.xul3
-rw-r--r--application/palemoon/base/content/content.js2
-rw-r--r--application/palemoon/base/content/nsContextMenu.js5
-rw-r--r--application/palemoon/base/content/palemoon.xhtml6
-rw-r--r--application/palemoon/base/content/tabbrowser.xml43
-rw-r--r--application/palemoon/base/content/urlbarBindings.xml4
-rw-r--r--application/palemoon/base/content/utilityOverlay.js133
-rw-r--r--application/palemoon/base/jar.mn3
-rw-r--r--application/palemoon/branding/official/content/about-background.jpgbin0 -> 111893 bytes
-rw-r--r--application/palemoon/branding/official/content/about-background.pngbin151947 -> 0 bytes
-rw-r--r--application/palemoon/branding/official/content/about-wordmark.pngbin2197 -> 11708 bytes
-rw-r--r--application/palemoon/branding/official/content/about-wordmark.svg141
-rw-r--r--application/palemoon/branding/official/content/aboutDialog.css56
-rw-r--r--application/palemoon/branding/official/content/jar.mn2
-rw-r--r--application/palemoon/branding/unofficial/content/about-background.pngbin67058 -> 95145 bytes
-rw-r--r--application/palemoon/branding/unofficial/content/about-wordmark.pngbin251 -> 0 bytes
-rw-r--r--application/palemoon/branding/unofficial/content/about-wordmark.svg8
-rw-r--r--application/palemoon/branding/unofficial/content/aboutDialog.css15
-rw-r--r--application/palemoon/branding/unofficial/content/jar.mn1
-rw-r--r--application/palemoon/branding/unstable/content/about-background.jpgbin0 -> 115006 bytes
-rw-r--r--application/palemoon/branding/unstable/content/about-background.pngbin330757 -> 0 bytes
-rw-r--r--application/palemoon/branding/unstable/content/about-wordmark.pngbin2197 -> 11708 bytes
-rw-r--r--application/palemoon/branding/unstable/content/about-wordmark.svg8
-rw-r--r--application/palemoon/branding/unstable/content/aboutDialog.css56
-rw-r--r--application/palemoon/branding/unstable/content/jar.mn2
-rw-r--r--application/palemoon/components/BrowserComponents.manifest1
-rw-r--r--application/palemoon/components/distribution.js14
-rw-r--r--application/palemoon/components/feeds/FeedWriter.js19
-rw-r--r--application/palemoon/components/feeds/WebContentConverter.js9
-rw-r--r--application/palemoon/components/nsAboutRedirector.js4
-rw-r--r--application/palemoon/components/nsBrowserContentHandler.js15
-rw-r--r--application/palemoon/components/nsBrowserGlue.js15
-rw-r--r--application/palemoon/components/preferences/newtaburl.js36
-rw-r--r--application/palemoon/components/preferences/tabs.js29
-rw-r--r--application/palemoon/configure.in4
-rw-r--r--application/palemoon/confvars.sh1
-rw-r--r--application/palemoon/installer/package-manifest.in7
-rw-r--r--application/palemoon/installer/windows/Makefile.in17
-rw-r--r--application/palemoon/installer/windows/nsis/defines.nsi.in4
-rw-r--r--application/palemoon/installer/windows/nsis/installer.nsi131
-rw-r--r--application/palemoon/installer/windows/nsis/maintenanceservice_installer.nsi332
-rw-r--r--application/palemoon/installer/windows/nsis/shared.nsh93
-rw-r--r--application/palemoon/installer/windows/nsis/uninstaller.nsi18
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/aboutRobots.dtd29
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd1
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/browser.dtd6
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/browser.properties16
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/palemoon.dtd17
-rw-r--r--application/palemoon/locales/jar.mn1
-rw-r--r--application/palemoon/themes/linux/browser.css11
-rw-r--r--application/palemoon/themes/osx/browser.css11
-rw-r--r--application/palemoon/themes/windows/browser.css25
-rw-r--r--application/xulrunner/confvars.sh4
267 files changed, 1842 insertions, 20561 deletions
diff --git a/application/basilisk/Makefile.in b/application/basilisk/Makefile.in
index 2eb9e708f..92527eaa8 100644
--- a/application/basilisk/Makefile.in
+++ b/application/basilisk/Makefile.in
@@ -10,7 +10,4 @@ ifdef MAKENSISU
# uninstaller is included with the application for mar file generation.
libs::
$(MAKE) -C installer/windows uninstaller
-ifdef MOZ_MAINTENANCE_SERVICE
- $(MAKE) -C installer/windows maintenanceservice_installer
-endif
endif
diff --git a/application/basilisk/app/profile/basilisk.js b/application/basilisk/app/profile/basilisk.js
index 4a8880f35..fc3b4546b 100644
--- a/application/basilisk/app/profile/basilisk.js
+++ b/application/basilisk/app/profile/basilisk.js
@@ -78,6 +78,9 @@ pref("xpinstall.signatures.devInfoURL", "https://wiki.mozilla.org/Addons/Extensi
// Dictionary download preference
pref("browser.dictionaries.download.url", "http://@AM_DOMAIN@/dictionaries/");
+// Get More Tools link URL
+pref("browser.getdevtools.url","https://@AM_DOMAIN@/?component=integration&type=external&request=devtools");
+
// At startup, should we check to see if the installation
// date is older than some threshold
pref("app.update.checkInstallTime", true);
@@ -141,17 +144,15 @@ pref("app.update.url", "https://aus5.mozilla.org/update/6/%PRODUCT%/%VERSION%/%B
// app.update.url.manual is in branding section
// app.update.url.details is in branding section
+// User-settable override to app.update.url for testing purposes.
+//pref("app.update.url.override", "");
+
// app.update.interval is in branding section
// app.update.promptWaitTime is in branding section
// Show the Update Checking/Ready UI when the user was idle for x seconds
pref("app.update.idletime", 60);
-// Whether or not to attempt using the service for updates.
-#ifdef MOZ_MAINTENANCE_SERVICE
-pref("app.update.service.enabled", true);
-#endif
-
// Symmetric (can be overridden by individual extensions) update preferences.
// e.g.
// extensions.{GUID}.update.enabled
@@ -335,7 +336,7 @@ pref("browser.helperApps.deleteTempFileOnExit", true);
#endif
// search engines URL
-pref("browser.search.searchEnginesURL", "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
+pref("browser.search.searchEnginesURL", "https://@AM_DOMAIN@/search-plugins/");
// pointer to the default engine name
pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties");
@@ -1170,53 +1171,11 @@ pref("browser.uiCustomization.debug", false);
// CustomizableUI state of the browser's user interface
pref("browser.uiCustomization.state", "");
-// The remote content URL shown for FxA signup. Must use HTTPS.
-pref("identity.fxaccounts.remote.signup.uri", "https://accounts.firefox.com/signup?service=sync&context=fx_desktop_v3");
-
-// The URL where remote content that forces re-authentication for Firefox Accounts
-// should be fetched. Must use HTTPS.
-pref("identity.fxaccounts.remote.force_auth.uri", "https://accounts.firefox.com/force_auth?service=sync&context=fx_desktop_v3");
-
-// The remote content URL shown for signin in. Must use HTTPS.
-pref("identity.fxaccounts.remote.signin.uri", "https://accounts.firefox.com/signin?service=sync&context=fx_desktop_v3");
-
-// The remote content URL where FxAccountsWebChannel messages originate.
-pref("identity.fxaccounts.remote.webchannel.uri", "https://accounts.firefox.com/");
-
-// The value of the context query parameter passed in some fxa requests when config
-// discovery is enabled.
-pref("identity.fxaccounts.contextParam", "fx_desktop_v3");
-
-// The URL we take the user to when they opt to "manage" their Firefox Account.
-// Note that this will always need to be in the same TLD as the
-// "identity.fxaccounts.remote.signup.uri" pref.
-pref("identity.fxaccounts.settings.uri", "https://accounts.firefox.com/settings?service=sync&context=fx_desktop_v3");
-
-// The remote URL of the FxA Profile Server
-pref("identity.fxaccounts.remote.profile.uri", "https://profile.accounts.firefox.com/v1");
-
-// The remote URL of the FxA OAuth Server
-pref("identity.fxaccounts.remote.oauth.uri", "https://oauth.accounts.firefox.com/v1");
-
-// Whether we display profile images in the UI or not.
-pref("identity.fxaccounts.profile_image.enabled", true);
-
-// Token server used by the FxA Sync identity.
-pref("identity.sync.tokenserver.uri", "https://token.services.mozilla.com/1.0/sync/1.5");
-
// URLs for promo links to mobile browsers. Note that consumers are expected to
// append a value for utm_campaign.
pref("identity.mobilepromo.android", "https://www.mozilla.org/firefox/android/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=");
pref("identity.mobilepromo.ios", "https://www.mozilla.org/firefox/ios/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=");
-// Migrate any existing Firefox Account data from the default profile to the
-// Developer Edition profile.
-#ifdef MOZ_DEV_EDITION
-pref("identity.fxaccounts.migrateToDevEdition", true);
-#else
-pref("identity.fxaccounts.migrateToDevEdition", false);
-#endif
-
// On GTK, we now default to showing the menubar only when alt is pressed:
#ifdef MOZ_WIDGET_GTK
pref("ui.key.menuAccessKeyFocuses", true);
@@ -1292,17 +1251,6 @@ pref("privacy.trackingprotection.ui.enabled", true);
pref("privacy.trackingprotection.ui.enabled", false);
#endif
-// Enable Contextual Identity Containers
-#ifdef NIGHTLY_BUILD
-pref("privacy.userContext.enabled", true);
-pref("privacy.userContext.ui.enabled", true);
-pref("privacy.usercontext.about_newtab_segregation.enabled", true);
-#else
-pref("privacy.userContext.enabled", false);
-pref("privacy.userContext.ui.enabled", false);
-pref("privacy.usercontext.about_newtab_segregation.enabled", false);
-#endif
-
#ifndef RELEASE_OR_BETA
// At the moment, autostart.2 is used, while autostart.1 is unused.
// We leave it here set to false to reset users' defaults and allow
@@ -1437,3 +1385,11 @@ pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
// controlling validation are located in /services/sync/services-sync.js
pref("services.sync.validation.enabled", true);
#endif
+
+// When a user cancels this number of authentication dialogs coming from
+// a single web page (eTLD+1) in a row, all following authentication dialogs
+// will be blocked (automatically canceled) for that page.
+// This counter is per-tab and per-domain to minimize false positives.
+// The counter resets when the page is reloaded from the UI
+// (content-reloads do NOT clear this to mitigate reloading tricks).
+pref("prompts.authentication_dialog_abuse_limit", 3);
diff --git a/application/basilisk/base/content/aboutRobots-icon.png b/application/basilisk/base/content/aboutRobots-icon.png
deleted file mode 100644
index 1c4899aaf..000000000
--- a/application/basilisk/base/content/aboutRobots-icon.png
+++ /dev/null
Binary files 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
--- a/application/basilisk/base/content/aboutRobots-widget-left.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/base/content/aboutRobots.xhtml b/application/basilisk/base/content/aboutRobots.xhtml
deleted file mode 100644
index 23fe3ba17..000000000
--- a/application/basilisk/base/content/aboutRobots.xhtml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE html [
- <!ENTITY % htmlDTD
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "DTD/xhtml1-strict.dtd">
- %htmlDTD;
- <!ENTITY % netErrorDTD
- SYSTEM "chrome://global/locale/netError.dtd">
- %netErrorDTD;
- <!ENTITY % globalDTD
- SYSTEM "chrome://global/locale/global.dtd">
- %globalDTD;
- <!ENTITY % aboutrobotsDTD
- SYSTEM "chrome://browser/locale/aboutRobots.dtd">
- %aboutrobotsDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>&robots.pagetitle;</title>
- <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
- <link rel="icon" type="image/png" id="favicon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACGFjVEwAAAASAAAAAJNtBPIAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAALuAD6AABhIDeugAAALhJREFUOI2Nk8sNxCAMRDlGohauXFOMpfTiAlxICqAELltHLqlgctg1InzMRhpFAc%2BLGWTnmoeZYamt78zXdZmaQtQMADlnU0OIAlbmJUBEcO4bRKQY2rUXIPmAGnDuG%2FBx3%2FfvOPVaDUg%2BoAPUf1PArIMCSD5glMEsUGaG%2BkyAFWIBaCsKuA%2BHGCNijLgP133XgOEtaPFMy2vUolEGJoCIzBmoRUR9%2B7rxj16DZaW%2FmgtmxnJ8V3oAnApQwNS5zpcAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAB4D6AIB52fclgAAACpmZEFUAAAAAjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9WF%2Bu8QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAHgPoAgEK8Q9%2FAAAAFmZkQVQAAAAEOI1jYBgFo2AUjAIIAAAEEAAB0xIn4wAAABpmY1RMAAAABQAAABAAAAAQAAAAAAAAAAAAHgPoAgHnO30FAAAAQGZkQVQAAAAGOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVfozYcAAAABpmY1RMAAAABwAAABAAAAAQAAAAAAAAAAAAHgPoAgEKra7sAAAAFmZkQVQAAAAIOI1jYBgFo2AUjAIIAAAEEAABM9s3hAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAHgPoAgHn3p%2BwAAAAKmZkQVQAAAAKOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F1BhPl6AAAAGmZjVEwAAAALAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQpITFkAAAAWZmRBVAAAAAw4jWNgGAWjYBSMAggAAAQQAAHaszpmAAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeeCPiMAAABAZmRBVAAAAA44jWNgGJ5gpxrDf2LEcIL%2FpzAVYxPDavP%2FUwz%2FpW79%2F%2F%2F%2FFMP%2FnWoQjC5GOxcgu4QYsVEwCmAAAOE0KxUmBL0KAAAAGmZjVEwAAAAPAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQoU7coAAAAWZmRBVAAAABA4jWNgGAWjYBSMAggAAAQQAAEpOBELAAAAGmZjVEwAAAARAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeYVWtoAAAAqZmRBVAAAABI4jWNgGAVYQXNz839ixHBq3qnG8B9ZAzYx2rlgFIwCcgAA8psX%2FWvpAecAAAAaZmNUTAAAABMAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC4OJMwAAABZmZEFUAAAAFDiNY2AYBaNgFIwCCAAABBAAAcBQHOkAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5kn7SQAAAEBmZEFUAAAAFjiNY2AYnmCnGsN%2FYsRwgv%2BnMBVjE8Nq8%2F9TDP%2Blbv3%2F%2F%2F8Uw%2F%2BdahCMLkY7FyC7hBixUTAKYAAA4TQrFc%2BcEoQAAAAaZmNUTAAAABcAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC98ooAAAABZmZEFUAAAAGDiNY2AYBaNgFIwCCAAABBAAASCZDI4AAAAaZmNUTAAAABkAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5qwZ%2FAAAACpmZEFUAAAAGjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9cjJWbAAAABpmY1RMAAAAGwAAABAAAAAQAAAAAAAAAAAAHgPoAgELOsoVAAAAFmZkQVQAAAAcOI1jYBgFo2AUjAIIAAAEEAAByfEBbAAAABpmY1RMAAAAHQAAABAAAAAQAAAAAAAAAAAAHgPoAgHm8LhvAAAAQGZkQVQAAAAeOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVlxR3%2FgAAABpmY1RMAAAAHwAAABAAAAAQAAAAAAAAAAAAHgPoAgELZmuGAAAAFmZkQVQAAAAgOI1jYBgFo2AUjAIIAAAEEAABHP5cFQAAABpmY1RMAAAAIQAAABAAAAAQAAAAAAAAAAAAHgPoAgHlgtAOAAAAKmZkQVQAAAAiOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F0%2FMvDdAAAAAElFTkSuQmCC"/>
-
- <script type="application/javascript"><![CDATA[
- var buttonClicked = false;
- function robotButton()
- {
- var button = document.getElementById('errorTryAgain');
- if (buttonClicked) {
- button.style.visibility = "hidden";
- } else {
- var newLabel = button.getAttribute("label2");
- button.textContent = newLabel;
- buttonClicked = true;
- }
- }
- ]]></script>
-
- <style type="text/css"><![CDATA[
- #errorPageContainer {
- background-image: none;
- }
-
- #errorPageContainer:before {
- content: url('chrome://browser/content/aboutRobots-icon.png');
- position: absolute;
- }
-
- body[dir=rtl] #icon,
- body[dir=rtl] #errorPageContainer:before {
- transform: scaleX(-1);
- }
- ]]></style>
- </head>
-
- <body dir="&locale.dir;">
-
- <!-- PAGE CONTAINER (for styling purposes only) -->
- <div id="errorPageContainer">
-
- <!-- Error Title -->
- <div id="errorTitle">
- <h1 id="errorTitleText">&robots.errorTitleText;</h1>
- </div>
-
- <!-- LONG CONTENT (the section most likely to require scrolling) -->
- <div id="errorLongContent">
-
- <!-- Short Description -->
- <div id="errorShortDesc">
- <p id="errorShortDescText">&robots.errorShortDescText;</p>
- </div>
-
- <!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
- <div id="errorLongDesc">
- <ul>
- <li>&robots.errorLongDesc1;</li>
- <li>&robots.errorLongDesc2;</li>
- <li>&robots.errorLongDesc3;</li>
- <li>&robots.errorLongDesc4;</li>
- </ul>
- </div>
-
- <!-- Short Description -->
- <div id="errorTrailerDesc">
- <p id="errorTrailerDescText">&robots.errorTrailerDescText;</p>
- </div>
-
- </div>
-
- <!-- Button -->
- <button id="errorTryAgain"
- label2="&robots.dontpress;"
- onclick="robotButton();">&retry.label;</button>
-
- <img src="chrome://browser/content/aboutRobots-widget-left.png"
- style="position: absolute; bottom: -12px; left: -10px;"/>
- <img src="chrome://browser/content/aboutRobots-widget-left.png"
- style="position: absolute; bottom: -12px; right: -10px; transform: scaleX(-1);"/>
- </div>
-
- </body>
-</html>
diff --git a/application/basilisk/base/content/aboutaccounts/aboutaccounts.css b/application/basilisk/base/content/aboutaccounts/aboutaccounts.css
deleted file mode 100644
index a2c5cb8f0..000000000
--- a/application/basilisk/base/content/aboutaccounts/aboutaccounts.css
+++ /dev/null
@@ -1,24 +0,0 @@
-html, body {
- height: 100%;
-}
-
-#remote {
- width: 100%;
- height: 100%;
- border: 0;
- display: none;
-}
-
-#networkError, #manage, #intro, #stage, #configError {
- display: none;
-}
-
-#oldsync {
- background: none;
- border: 0;
- color: #0095dd;
-}
-
-#oldsync:focus {
- outline: 1px dotted #0095dd;
-}
diff --git a/application/basilisk/base/content/aboutaccounts/aboutaccounts.js b/application/basilisk/base/content/aboutaccounts/aboutaccounts.js
deleted file mode 100644
index a05c1ea75..000000000
--- a/application/basilisk/base/content/aboutaccounts/aboutaccounts.js
+++ /dev/null
@@ -1,543 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/FxAccounts.jsm");
-
-var fxAccountsCommon = {};
-Cu.import("resource://gre/modules/FxAccountsCommon.js", fxAccountsCommon);
-
-// for master-password utilities
-Cu.import("resource://services-sync/util.js");
-
-const PREF_LAST_FXA_USER = "identity.fxaccounts.lastSignedInUserHash";
-const PREF_SYNC_SHOW_CUSTOMIZATION = "services.sync-setup.ui.showCustomizationDialog";
-
-const ACTION_URL_PARAM = "action";
-
-const OBSERVER_TOPICS = [
- fxAccountsCommon.ONVERIFIED_NOTIFICATION,
- fxAccountsCommon.ONLOGOUT_NOTIFICATION,
-];
-
-function log(msg) {
- // dump("FXA: " + msg + "\n");
-}
-
-function error(msg) {
- console.log("Firefox Account Error: " + msg + "\n");
-}
-
-function getPreviousAccountNameHash() {
- try {
- return Services.prefs.getComplexValue(PREF_LAST_FXA_USER, Ci.nsISupportsString).data;
- } catch (_) {
- return "";
- }
-}
-
-function setPreviousAccountNameHash(acctName) {
- let string = Cc["@mozilla.org/supports-string;1"]
- .createInstance(Ci.nsISupportsString);
- string.data = sha256(acctName);
- Services.prefs.setComplexValue(PREF_LAST_FXA_USER, Ci.nsISupportsString, string);
-}
-
-function needRelinkWarning(acctName) {
- let prevAcctHash = getPreviousAccountNameHash();
- return prevAcctHash && prevAcctHash != sha256(acctName);
-}
-
-// Given a string, returns the SHA265 hash in base64
-function sha256(str) {
- let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
- .createInstance(Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- // Data is an array of bytes.
- let data = converter.convertToByteArray(str, {});
- let hasher = Cc["@mozilla.org/security/hash;1"]
- .createInstance(Ci.nsICryptoHash);
- hasher.init(hasher.SHA256);
- hasher.update(data, data.length);
-
- return hasher.finish(true);
-}
-
-function promptForRelink(acctName) {
- let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
- let continueLabel = sb.GetStringFromName("continue.label");
- let title = sb.GetStringFromName("relinkVerify.title");
- let description = sb.formatStringFromName("relinkVerify.description",
- [acctName], 1);
- let body = sb.GetStringFromName("relinkVerify.heading") +
- "\n\n" + description;
- let ps = Services.prompt;
- let buttonFlags = (ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING) +
- (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL) +
- ps.BUTTON_POS_1_DEFAULT;
- let pressed = Services.prompt.confirmEx(window, title, body, buttonFlags,
- continueLabel, null, null, null,
- {});
- return pressed == 0; // 0 is the "continue" button
-}
-
-// If the last fxa account used for sync isn't this account, we display
-// a modal dialog checking they really really want to do this...
-// (This is sync-specific, so ideally would be in sync's identity module,
-// but it's a little more seamless to do here, and sync is currently the
-// only fxa consumer, so...
-function shouldAllowRelink(acctName) {
- return !needRelinkWarning(acctName) || promptForRelink(acctName);
-}
-
-function updateDisplayedEmail(user) {
- let emailDiv = document.getElementById("email");
- if (emailDiv && user) {
- emailDiv.textContent = user.email;
- }
-}
-
-var wrapper = {
- iframe: null,
-
- init: function (url, urlParams) {
- // If a master-password is enabled, we want to encourage the user to
- // unlock it. Things still work if not, but the user will probably need
- // to re-auth next startup (in which case we will get here again and
- // re-prompt)
- Utils.ensureMPUnlocked();
-
- let iframe = document.getElementById("remote");
- this.iframe = iframe;
- this.iframe.QueryInterface(Ci.nsIFrameLoaderOwner);
- let docShell = this.iframe.frameLoader.docShell;
- docShell.QueryInterface(Ci.nsIWebProgress);
- docShell.addProgressListener(this.iframeListener, Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
- iframe.addEventListener("load", this);
-
- // Ideally we'd just merge urlParams with new URL(url).searchParams, but our
- // URLSearchParams implementation doesn't support iteration (bug 1085284).
- let urlParamStr = urlParams.toString();
- if (urlParamStr) {
- url += (url.includes("?") ? "&" : "?") + urlParamStr;
- }
- this.url = url;
- // Set the iframe's location with loadURI/LOAD_FLAGS_REPLACE_HISTORY to
- // avoid having a new history entry being added. REPLACE_HISTORY is used
- // to replace the current entry, which is `about:blank`.
- let webNav = iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
- webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, null, null, null);
- },
-
- retry: function () {
- let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
- webNav.loadURI(this.url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
- },
-
- iframeListener: {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
- Ci.nsISupportsWeakReference,
- Ci.nsISupports]),
-
- onStateChange: function(aWebProgress, aRequest, aState, aStatus) {
- let failure = false;
-
- // Captive portals sometimes redirect users
- if ((aState & Ci.nsIWebProgressListener.STATE_REDIRECTING)) {
- failure = true;
- } else if ((aState & Ci.nsIWebProgressListener.STATE_STOP)) {
- if (aRequest instanceof Ci.nsIHttpChannel) {
- try {
- failure = aRequest.responseStatus != 200;
- } catch (e) {
- failure = aStatus != Components.results.NS_OK;
- }
- }
- }
-
- // Calling cancel() will raise some OnStateChange notifications by itself,
- // so avoid doing that more than once
- if (failure && aStatus != Components.results.NS_BINDING_ABORTED) {
- aRequest.cancel(Components.results.NS_BINDING_ABORTED);
- setErrorPage("networkError");
- }
- },
-
- onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {
- if (aRequest && aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
- aRequest.cancel(Components.results.NS_BINDING_ABORTED);
- setErrorPage("networkError");
- }
- },
-
- onProgressChange: function() {},
- onStatusChange: function() {},
- onSecurityChange: function() {},
- },
-
- handleEvent: function (evt) {
- switch (evt.type) {
- case "load":
- this.iframe.contentWindow.addEventListener("FirefoxAccountsCommand", this);
- this.iframe.removeEventListener("load", this);
- break;
- case "FirefoxAccountsCommand":
- this.handleRemoteCommand(evt);
- break;
- }
- },
-
- /**
- * onLogin handler receives user credentials from the jelly after a
- * sucessful login and stores it in the fxaccounts service
- *
- * @param accountData the user's account data and credentials
- */
- onLogin: function (accountData) {
- log("Received: 'login'. Data:" + JSON.stringify(accountData));
-
- if (accountData.customizeSync) {
- Services.prefs.setBoolPref(PREF_SYNC_SHOW_CUSTOMIZATION, true);
- }
- delete accountData.customizeSync;
- // sessionTokenContext is erroneously sent by the content server.
- // https://github.com/mozilla/fxa-content-server/issues/2766
- // To avoid having the FxA storage manager not knowing what to do with
- // it we delete it here.
- delete accountData.sessionTokenContext;
-
- // We need to confirm a relink - see shouldAllowRelink for more
- let newAccountEmail = accountData.email;
- // The hosted code may have already checked for the relink situation
- // by sending the can_link_account command. If it did, then
- // it will indicate we don't need to ask twice.
- if (!accountData.verifiedCanLinkAccount && !shouldAllowRelink(newAccountEmail)) {
- // we need to tell the page we successfully received the message, but
- // then bail without telling fxAccounts
- this.injectData("message", { status: "login" });
- // after a successful login we return to preferences
- openPrefs();
- return;
- }
- delete accountData.verifiedCanLinkAccount;
-
- // Remember who it was so we can log out next time.
- setPreviousAccountNameHash(newAccountEmail);
-
- // A sync-specific hack - we want to ensure sync has been initialized
- // before we set the signed-in user.
- let xps = Cc["@mozilla.org/weave/service;1"]
- .getService(Ci.nsISupports)
- .wrappedJSObject;
- xps.whenLoaded().then(() => {
- updateDisplayedEmail(accountData);
- return fxAccounts.setSignedInUser(accountData);
- }).then(() => {
- // If the user data is verified, we want it to immediately look like
- // they are signed in without waiting for messages to bounce around.
- if (accountData.verified) {
- openPrefs();
- }
- this.injectData("message", { status: "login" });
- // until we sort out a better UX, just leave the jelly page in place.
- // If the account email is not yet verified, it will tell the user to
- // go check their email, but then it will *not* change state after
- // the verification completes (the browser will begin syncing, but
- // won't notify the user). If the email has already been verified,
- // the jelly will say "Welcome! You are successfully signed in as
- // EMAIL", but it won't then say "syncing started".
- }, (err) => this.injectData("message", { status: "error", error: err })
- );
- },
-
- onCanLinkAccount: function(accountData) {
- // We need to confirm a relink - see shouldAllowRelink for more
- let ok = shouldAllowRelink(accountData.email);
- this.injectData("message", { status: "can_link_account", data: { ok: ok } });
- },
-
- /**
- * onSignOut handler erases the current user's session from the fxaccounts service
- */
- onSignOut: function () {
- log("Received: 'sign_out'.");
-
- fxAccounts.signOut().then(
- () => this.injectData("message", { status: "sign_out" }),
- (err) => this.injectData("message", { status: "error", error: err })
- );
- },
-
- handleRemoteCommand: function (evt) {
- log('command: ' + evt.detail.command);
- let data = evt.detail.data;
-
- switch (evt.detail.command) {
- case "login":
- this.onLogin(data);
- break;
- case "can_link_account":
- this.onCanLinkAccount(data);
- break;
- case "sign_out":
- this.onSignOut(data);
- break;
- default:
- log("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
- break;
- }
- },
-
- injectData: function (type, content) {
- return fxAccounts.promiseAccountsSignUpURI().then(authUrl => {
- let data = {
- type: type,
- content: content
- };
- this.iframe.contentWindow.postMessage(data, authUrl);
- })
- .catch(e => {
- console.log("Failed to inject data", e);
- setErrorPage("configError");
- });
- },
-};
-
-
-// Button onclick handlers
-function handleOldSync() {
- let chromeWin = window
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow)
- .QueryInterface(Ci.nsIDOMChromeWindow);
- let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "old-sync";
- chromeWin.switchToTabHavingURI(url, true);
-}
-
-function getStarted() {
- show("remote");
-}
-
-function retry() {
- show("remote");
- wrapper.retry();
-}
-
-function openPrefs() {
- // Bug 1199303 calls for this tab to always be replaced with Preferences
- // rather than it opening in a different tab.
- window.location = "about:preferences#sync";
-}
-
-function init() {
- fxAccounts.getSignedInUser().then(user => {
- // tests in particular might cause the window to start closing before
- // getSignedInUser has returned.
- if (window.closed) {
- return Promise.resolve();
- }
-
- updateDisplayedEmail(user);
-
- // Ideally we'd use new URL(document.URL).searchParams, but for about: URIs,
- // searchParams is empty.
- let urlParams = new URLSearchParams(document.URL.split("?")[1] || "");
- let action = urlParams.get(ACTION_URL_PARAM);
- urlParams.delete(ACTION_URL_PARAM);
-
- switch (action) {
- case "signin":
- if (user) {
- // asking to sign-in when already signed in just shows manage.
- show("stage", "manage");
- } else {
- return fxAccounts.promiseAccountsSignInURI().then(url => {
- show("remote");
- wrapper.init(url, urlParams);
- });
- }
- break;
- case "signup":
- if (user) {
- // asking to sign-up when already signed in just shows manage.
- show("stage", "manage");
- } else {
- return fxAccounts.promiseAccountsSignUpURI().then(url => {
- show("remote");
- wrapper.init(url, urlParams);
- });
- }
- break;
- case "reauth":
- // ideally we would only show this when we know the user is in a
- // "must reauthenticate" state - but we don't.
- // As the email address will be included in the URL returned from
- // promiseAccountsForceSigninURI, just always show it.
- return fxAccounts.promiseAccountsForceSigninURI().then(url => {
- show("remote");
- wrapper.init(url, urlParams);
- });
- default:
- // No action specified.
- if (user) {
- show("stage", "manage");
- } else {
- // Attempt a migration if enabled or show the introductory page
- // otherwise.
- return migrateToDevEdition(urlParams).then(migrated => {
- if (!migrated) {
- show("stage", "intro");
- // load the remote frame in the background
- return fxAccounts.promiseAccountsSignUpURI().then(uri =>
- wrapper.init(uri, urlParams));
- }
- return Promise.resolve();
- });
- }
- break;
- }
- return Promise.resolve();
- }).catch(err => {
- console.log("Configuration or sign in error", err);
- setErrorPage("configError");
- });
-}
-
-function setErrorPage(errorType) {
- show("stage", errorType);
-}
-
-// Causes the "top-level" element with |id| to be shown - all other top-level
-// elements are hidden. Optionally, ensures that only 1 "second-level" element
-// inside the top-level one is shown.
-function show(id, childId) {
- // top-level items are either <div> or <iframe>
- let allTop = document.querySelectorAll("body > div, iframe");
- for (let elt of allTop) {
- if (elt.getAttribute("id") == id) {
- elt.style.display = 'block';
- } else {
- elt.style.display = 'none';
- }
- }
- if (childId) {
- // child items are all <div>
- let allSecond = document.querySelectorAll("#" + id + " > div");
- for (let elt of allSecond) {
- if (elt.getAttribute("id") == childId) {
- elt.style.display = 'block';
- } else {
- elt.style.display = 'none';
- }
- }
- }
-}
-
-// Migrate sync data from the default profile to the dev-edition profile.
-// Returns a promise of a true value if migration succeeded, or false if it
-// failed.
-function migrateToDevEdition(urlParams) {
- let defaultProfilePath;
- try {
- defaultProfilePath = window.getDefaultProfilePath();
- } catch (e) {} // no default profile.
- let migrateSyncCreds = false;
- if (defaultProfilePath) {
- try {
- migrateSyncCreds = Services.prefs.getBoolPref("identity.fxaccounts.migrateToDevEdition");
- } catch (e) {}
- }
-
- if (!migrateSyncCreds) {
- return Promise.resolve(false);
- }
-
- Cu.import("resource://gre/modules/osfile.jsm");
- let fxAccountsStorage = OS.Path.join(defaultProfilePath, fxAccountsCommon.DEFAULT_STORAGE_FILENAME);
- return OS.File.read(fxAccountsStorage, { encoding: "utf-8" }).then(text => {
- let accountData = JSON.parse(text).accountData;
- updateDisplayedEmail(accountData);
- return fxAccounts.setSignedInUser(accountData);
- }).then(() => {
- return fxAccounts.promiseAccountsForceSigninURI().then(url => {
- show("remote");
- wrapper.init(url, urlParams);
- });
- }).then(null, error => {
- log("Failed to migrate FX Account: " + error);
- show("stage", "intro");
- // load the remote frame in the background
- fxAccounts.promiseAccountsSignUpURI().then(uri => {
- wrapper.init(uri, urlParams)
- }).catch(e => {
- console.log("Failed to load signup page", e);
- setErrorPage("configError");
- });
- }).then(() => {
- // Reset the pref after migration.
- Services.prefs.setBoolPref("identity.fxaccounts.migrateToDevEdition", false);
- return true;
- }).then(null, err => {
- Cu.reportError("Failed to reset the migrateToDevEdition pref: " + err);
- return false;
- });
-}
-
-// Helper function that returns the path of the default profile on disk. Will be
-// overridden in tests.
-function getDefaultProfilePath() {
- let defaultProfile = Cc["@mozilla.org/toolkit/profile-service;1"]
- .getService(Ci.nsIToolkitProfileService)
- .defaultProfile;
- return defaultProfile.rootDir.path;
-}
-
-document.addEventListener("DOMContentLoaded", function onload() {
- document.removeEventListener("DOMContentLoaded", onload, true);
- init();
- var buttonGetStarted = document.getElementById('buttonGetStarted');
- buttonGetStarted.addEventListener('click', getStarted);
-
- var buttonRetry = document.getElementById('buttonRetry');
- buttonRetry.addEventListener('click', retry);
-
- var oldsync = document.getElementById('oldsync');
- oldsync.addEventListener('click', handleOldSync);
-
- var buttonOpenPrefs = document.getElementById('buttonOpenPrefs')
- buttonOpenPrefs.addEventListener('click', openPrefs);
-}, true);
-
-function initObservers() {
- function observe(subject, topic, data) {
- log("about:accounts observed " + topic);
- if (topic == fxAccountsCommon.ONLOGOUT_NOTIFICATION) {
- // All about:account windows get changed to action=signin on logout.
- window.location = "about:accounts?action=signin";
- return;
- }
-
- // must be onverified - we want to open preferences.
- openPrefs();
- }
-
- for (let topic of OBSERVER_TOPICS) {
- Services.obs.addObserver(observe, topic, false);
- }
- window.addEventListener("unload", function(event) {
- log("about:accounts unloading")
- for (let topic of OBSERVER_TOPICS) {
- Services.obs.removeObserver(observe, topic);
- }
- });
-}
-initObservers();
diff --git a/application/basilisk/base/content/aboutaccounts/aboutaccounts.xhtml b/application/basilisk/base/content/aboutaccounts/aboutaccounts.xhtml
deleted file mode 100644
index 475f0e86f..000000000
--- a/application/basilisk/base/content/aboutaccounts/aboutaccounts.xhtml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<!DOCTYPE html [
- <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
- %htmlDTD;
- <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
- %brandDTD;
- <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
- %globalDTD;
- <!ENTITY % aboutAccountsDTD SYSTEM "chrome://browser/locale/aboutAccounts.dtd">
- %aboutAccountsDTD;
- <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
- %syncBrandDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml" dir="&locale.dir;">
- <head>
- <title>&syncBrand.fullName.label;</title>
- <meta name="viewport" content="width=device-width"/>
-
-
- <link rel="icon" type="image/png" id="favicon"
- href="chrome://branding/content/icon32.png"/>
- <link rel="stylesheet"
- href="chrome://browser/content/aboutaccounts/normalize.css"
- type="text/css" />
- <link rel="stylesheet"
- href="chrome://browser/content/aboutaccounts/main.css"
- type="text/css" />
- <link rel="stylesheet"
- href="chrome://browser/content/aboutaccounts/aboutaccounts.css"
- type="text/css" />
- </head>
- <body>
- <div id="stage">
-
- <div id="manage">
- <header>
- <h1>&aboutAccounts.connected;</h1>
- <div id="email"></div>
- </header>
-
- <section>
- <div class="graphic graphic-sync-intro"> </div>
-
- <div class="button-row">
- <button id="buttonOpenPrefs" class="button" href="#" tabindex="0">&aboutAccountsConfig.syncPreferences.label;</button>
- </div>
- </section>
- </div>
-
- <div id="intro">
- <header>
- <h1>&aboutAccounts.welcome;</h1>
- </header>
-
- <section>
- <div class="graphic graphic-sync-intro"> </div>
-
- <div class="description">&aboutAccountsConfig.description;</div>
-
- <div class="button-row">
- <button id="buttonGetStarted" class="button" tabindex="1">&aboutAccountsConfig.startButton.label;</button>
- </div>
-
- <div class="links">
- <button id="oldsync" tabindex="2">&aboutAccountsConfig.useOldSync.label;</button>
- </div>
- </section>
- </div>
-
- <div id="networkError">
- <header>
- <h1>&aboutAccounts.noConnection.title;</h1>
- </header>
-
- <section>
- <div class="graphic graphic-sync-intro"> </div>
-
- <div class="description">&aboutAccounts.noConnection.description;</div>
-
- <div class="button-row">
- <button id="buttonRetry" class="button" tabindex="3">&aboutAccounts.noConnection.retry;</button>
- </div>
- </section>
- </div>
-
- <div id="configError">
- <header>
- <h1>&aboutAccounts.badConfig.title;</h1>
- </header>
-
- <section>
- <div class="graphic graphic-sync-intro"> </div>
-
- <div class="description">&aboutAccounts.badConfig.description;</div>
-
- </section>
- </div>
-
- </div>
-
- <iframe mozframetype="content" id="remote" />
-
- <script type="application/javascript;version=1.8"
- src="chrome://browser/content/utilityOverlay.js"/>
- <script type="text/javascript;version=1.8"
- src="chrome://browser/content/aboutaccounts/aboutaccounts.js" />
- </body>
-</html>
diff --git a/application/basilisk/base/content/aboutaccounts/images/fox.png b/application/basilisk/base/content/aboutaccounts/images/fox.png
deleted file mode 100644
index 83af78d6c..000000000
--- a/application/basilisk/base/content/aboutaccounts/images/fox.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro.png b/application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro.png
deleted file mode 100644
index ff5f482f0..000000000
--- a/application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro@2x.png b/application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro@2x.png
deleted file mode 100644
index 89fda0681..000000000
--- a/application/basilisk/base/content/aboutaccounts/images/graphic_sync_intro@2x.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/base/content/aboutaccounts/main.css b/application/basilisk/base/content/aboutaccounts/main.css
deleted file mode 100644
index 8f4c3b34e..000000000
--- a/application/basilisk/base/content/aboutaccounts/main.css
+++ /dev/null
@@ -1,166 +0,0 @@
-*,
-*:before,
-*:after {
- box-sizing: border-box;
-}
-
-html {
- background-color: #F2F2F2;
- height: 100%;
-}
-
-body {
- color: #424f59;
- font: message-box;
- font-size: 14px;
- height: 100%;
-}
-
-a {
- color: #0095dd;
- cursor: pointer; /* Use the correct cursor for anchors without an href */
-}
-
-a:active {
- outline: none;
-}
-
-a:focus {
- outline: 1px dotted #0095dd;
-}
-
-
-a.no-underline {
- text-decoration: none;
-}
-
-#stage {
- background:#fff;
- border-radius: 5px;
- box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.25);
- margin: 0 auto;
- min-height: 300px;
- padding: 60px 40px 40px 40px;
- position: relative;
- text-align: center;
- top: 80px;
- width: 420px;
-}
-
-header h1
-{
- font-size: 24px;
- font-weight: 200;
- line-height: 1em;
-}
-
-#intro header h1 {
- margin: 0 0 32px 0;
-}
-
-#manage header h1 {
- margin: 0 0 12px 0;
-}
-
-#manage header #email {
- margin-bottom: 23px;
- color: rgb(138, 155, 168);
- font-size: 19px;
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
-}
-
-.description {
- font-size: 18px;
-}
-
-.button-row {
- margin-top: 45px;
- margin-bottom:20px;
-}
-
-.button-row button,
-.button-row a.button {
- background: #0095dd;
- border: none;
- border-radius: 5px;
- color: #FFFFFF;
- cursor: pointer;
- font-size: 24px;
- padding: 15px 0;
- transition-duration: 150ms;
- transition-property: background-color;
- width: 100%;
-}
-
-.button-row a.button {
- display: inline-block;
- text-decoration: none;
-}
-
-.button-row a.button:active,
-.button-row a.button:hover,
-.button-row a.button:focus,
-.button-row button:active,
-.button-row button:hover,
-.button-row button:focus {
- background: #08c;
-}
-
-
-.graphic-sync-intro {
- background-image: url(images/graphic_sync_intro.png);
- background-repeat: no-repeat;
- background-size: 150px 195px;
- height: 195px;
- margin: 0 auto;
- overflow: hidden;
- text-indent: 100%;
- white-space: nowrap;
- width: 150px;
-}
-
-.description,
-.button-row {
- margin-top: 30px;
-}
-
-.links {
- margin: 20px 0;
-}
-
-@media only screen and (max-width: 500px) {
- html {
- background: #fff;
- }
-
- #stage {
- box-shadow: none;
- margin: 30px auto 0 auto;
- min-height: none;
- min-width: 320px;
- padding: 0 10px;
- width: 100%;
- }
-
- .button-row {
- margin-top: 20px;
- }
-
- .button-row button,
- .button-row a.button {
- padding: 10px 0;
- }
-
-}
-
-/* Retina */
-@media
-only screen and (min-device-pixel-ratio: 2),
-only screen and ( min-resolution: 192dpi),
-only screen and ( min-resolution: 2dppx) {
- .graphic-sync-intro {
- background-image: url(images/graphic_sync_intro@2x.png);
- }
-}
diff --git a/application/basilisk/base/content/aboutaccounts/normalize.css b/application/basilisk/base/content/aboutaccounts/normalize.css
deleted file mode 100644
index c02ab25de..000000000
--- a/application/basilisk/base/content/aboutaccounts/normalize.css
+++ /dev/null
@@ -1,402 +0,0 @@
-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
-
-/* ==========================================================================
- HTML5 display definitions
- ========================================================================== */
-
-/**
- * Correct `block` display not defined in IE 8/9.
- */
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-nav,
-section,
-summary {
- display: block;
-}
-
-/**
- * Correct `inline-block` display not defined in IE 8/9.
- */
-
-audio,
-canvas,
-video {
- display: inline-block;
-}
-
-/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-
-/**
- * Address `[hidden]` styling not present in IE 8/9.
- * Hide the `template` element in IE, Safari, and Firefox < 22.
- */
-
-[hidden],
-template {
- display: none;
-}
-
-/* ==========================================================================
- Base
- ========================================================================== */
-
-/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS text size adjust after orientation change, without disabling
- * user zoom.
- */
-
-html {
- font-family: sans-serif; /* 1 */
- -ms-text-size-adjust: 100%; /* 2 */
- -webkit-text-size-adjust: 100%; /* 2 */
-}
-
-/**
- * Remove default margin.
- */
-
-body {
- margin: 0;
-}
-
-/* ==========================================================================
- Links
- ========================================================================== */
-
-/**
- * Remove the gray background color from active links in IE 10.
- */
-
-a {
- background: transparent;
-}
-
-/**
- * Address `outline` inconsistency between Chrome and other browsers.
- */
-
-a:focus {
- outline: thin dotted;
-}
-
-/**
- * Improve readability when focused and also mouse hovered in all browsers.
- */
-
-a:active,
-a:hover {
- outline: 0;
-}
-
-/* ==========================================================================
- Typography
- ========================================================================== */
-
-/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari 5, and Chrome.
- */
-
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
-
-/**
- * Address styling not present in IE 8/9, Safari 5, and Chrome.
- */
-
-abbr[title] {
- border-bottom: 1px dotted;
-}
-
-/**
- * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
- */
-
-b,
-strong {
- font-weight: bold;
-}
-
-/**
- * Address styling not present in Safari 5 and Chrome.
- */
-
-dfn {
- font-style: italic;
-}
-
-/**
- * Address differences between Firefox and other browsers.
- */
-
-hr {
- box-sizing: content-box;
- height: 0;
-}
-
-/**
- * Address styling not present in IE 8/9.
- */
-
-mark {
- background: #ff0;
- color: #000;
-}
-
-/**
- * Correct font family set oddly in Safari 5 and Chrome.
- */
-
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, serif;
- font-size: 1em;
-}
-
-/**
- * Improve readability of pre-formatted text in all browsers.
- */
-
-pre {
- white-space: pre-wrap;
-}
-
-/**
- * Set consistent quote types.
- */
-
-q {
- quotes: "\201C" "\201D" "\2018" "\2019";
-}
-
-/**
- * Address inconsistent and variable font size in all browsers.
- */
-
-small {
- font-size: 80%;
-}
-
-/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
- */
-
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}
-
-sup {
- top: -0.5em;
-}
-
-sub {
- bottom: -0.25em;
-}
-
-/* ==========================================================================
- Embedded content
- ========================================================================== */
-
-/**
- * Remove border when inside `a` element in IE 8/9.
- */
-
-img {
- border: 0;
-}
-
-/**
- * Correct overflow displayed oddly in IE 9.
- */
-
-svg:not(:root) {
- overflow: hidden;
-}
-
-/* ==========================================================================
- Figures
- ========================================================================== */
-
-/**
- * Address margin not present in IE 8/9 and Safari 5.
- */
-
-figure {
- margin: 0;
-}
-
-/* ==========================================================================
- Forms
- ========================================================================== */
-
-/**
- * Define consistent border, margin, and padding.
- */
-
-fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
-}
-
-/**
- * 1. Correct `color` not being inherited in IE 8/9.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- */
-
-legend {
- border: 0; /* 1 */
- padding: 0; /* 2 */
-}
-
-/**
- * 1. Correct font family not being inherited in all browsers.
- * 2. Correct font size not being inherited in all browsers.
- * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
- */
-
-button,
-input,
-select,
-textarea {
- font-family: inherit; /* 1 */
- font-size: 100%; /* 2 */
- margin: 0; /* 3 */
-}
-
-/**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-
-button,
-input {
- line-height: normal;
-}
-
-/**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
- * Correct `select` style inheritance in Firefox 4+ and Opera.
- */
-
-button,
-select {
- text-transform: none;
-}
-
-/**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- * `input` and others.
- */
-
-button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
- -webkit-appearance: button; /* 2 */
- cursor: pointer; /* 3 */
-}
-
-/**
- * Re-set default cursor for disabled elements.
- */
-
-button[disabled],
-html input[disabled] {
- cursor: default;
-}
-
-/**
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- */
-
-input[type="checkbox"],
-input[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
-}
-
-/**
- * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome.
- */
-
-input[type="search"] {
- -webkit-appearance: textfield; /* 1 */
- box-sizing: content-box; /* 2 */
-}
-
-/**
- * Remove inner padding and search cancel button in Safari 5 and Chrome
- * on OS X.
- */
-
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-
-/**
- * Remove inner padding and border in Firefox 4+.
- */
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
-
-/**
- * 1. Remove default vertical scrollbar in IE 8/9.
- * 2. Improve readability and alignment in all browsers.
- */
-
-textarea {
- overflow: auto; /* 1 */
- vertical-align: top; /* 2 */
-}
-
-/* ==========================================================================
- Tables
- ========================================================================== */
-
-/**
- * Remove most spacing between table cells.
- */
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
diff --git a/application/basilisk/base/content/abouthome/aboutHome.css b/application/basilisk/base/content/abouthome/aboutHome.css
index bc3f9882c..86f74727f 100644
--- a/application/basilisk/base/content/abouthome/aboutHome.css
+++ b/application/basilisk/base/content/abouthome/aboutHome.css
@@ -283,9 +283,11 @@ body[narrow] #restorePreviousSession {
content: url("chrome://browser/content/abouthome/addons.png");
}
+%ifdef MOZ_SERVICES_SYNC
#sync::before {
content: url("chrome://browser/content/abouthome/sync.png");
}
+%endif
#settings::before {
content: url("chrome://browser/content/abouthome/settings.png");
@@ -369,9 +371,11 @@ body[narrow] #restorePreviousSession::before {
content: url("chrome://browser/content/abouthome/addons@2x.png");
}
+%ifdef MOZ_SERVICES_SYNC
#sync::before {
content: url("chrome://browser/content/abouthome/sync@2x.png");
}
+%endif
#settings::before {
content: url("chrome://browser/content/abouthome/settings@2x.png");
diff --git a/application/basilisk/base/content/abouthome/aboutHome.xhtml b/application/basilisk/base/content/abouthome/aboutHome.xhtml
index 22bf2e7e8..90daad2dc 100644
--- a/application/basilisk/base/content/abouthome/aboutHome.xhtml
+++ b/application/basilisk/base/content/abouthome/aboutHome.xhtml
@@ -54,7 +54,9 @@
<button class="launchButton" id="bookmarks">&abouthome.bookmarksButton.label;</button>
<button class="launchButton" id="history">&abouthome.historyButton.label;</button>
<button class="launchButton" id="addons">&abouthome.addonsButton.label;</button>
+#ifdef MOZ_SERVICES_SYNC
<button class="launchButton" id="sync">&abouthome.syncButton.label;</button>
+#endif
#ifdef XP_WIN
<button class="launchButton" id="settings">&abouthome.preferencesButtonWin.label;</button>
#else
diff --git a/application/basilisk/base/content/browser-context.inc b/application/basilisk/base/content/browser-context.inc
index 36e0478af..d400cd0b2 100644
--- a/application/basilisk/base/content/browser-context.inc
+++ b/application/basilisk/base/content/browser-context.inc
@@ -51,23 +51,11 @@
label="&openLinkCmdInCurrent.label;"
accesskey="&openLinkCmdInCurrent.accesskey;"
oncommand="gContextMenu.openLinkInCurrent();"/>
-# label and data-usercontextid are dynamically set.
- <menuitem id="context-openlinkincontainertab"
- accesskey="&openLinkCmdInTab.accesskey;"
- oncommand="gContextMenu.openLinkInTab(event);"/>
+# label is dynamically set.
<menuitem id="context-openlinkintab"
label="&openLinkCmdInTab.label;"
accesskey="&openLinkCmdInTab.accesskey;"
- data-usercontextid="0"
- oncommand="gContextMenu.openLinkInTab(event);"/>
-
- <menu id="context-openlinkinusercontext-menu"
- label="&openLinkCmdInContainerTab.label;"
- accesskey="&openLinkCmdInContainerTab.accesskey;"
- hidden="true">
- <menupopup oncommand="gContextMenu.openLinkInTab(event);"
- onpopupshowing="return gContextMenu.createContainerMenu(event);" />
- </menu>
+ oncommand="gContextMenu.openLinkInTab();"/>
<menuitem id="context-openlink"
label="&openLinkCmd.label;"
@@ -261,13 +249,6 @@
accesskey="&savePageCmd.accesskey2;"
oncommand="gContextMenu.savePageAs();"/>
<menuseparator id="context-sep-sendpagetodevice" hidden="true"/>
- <menu id="context-sendpagetodevice"
- label="&sendPageToDevice.label;"
- accesskey="&sendPageToDevice.accesskey;"
- hidden="true">
- <menupopup id="context-sendpagetodevice-popup"
- onpopupshowing="(() => { let browser = gBrowser || getPanelBrowser(); gFxAccounts.populateSendTabToDevicesMenu(event.target, browser.currentURI.spec, browser.contentTitle); })()"/>
- </menu>
<menuseparator id="context-sep-viewbgimage"/>
<menuitem id="context-viewbgimage"
label="&viewBGImageCmd.label;"
@@ -308,13 +289,6 @@
<menuitem id="context-searchselect"
oncommand="BrowserSearch.loadSearchFromContext(this.searchTerms);"/>
<menuseparator id="context-sep-sendlinktodevice" hidden="true"/>
- <menu id="context-sendlinktodevice"
- label="&sendLinkToDevice.label;"
- accesskey="&sendLinkToDevice.accesskey;"
- hidden="true">
- <menupopup id="context-sendlinktodevice-popup"
- onpopupshowing="gFxAccounts.populateSendTabToDevicesMenu(event.target, gContextMenu.linkURL, gContextMenu.linkTextStr);"/>
- </menu>
<menuseparator id="frame-sep"/>
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
<menupopup>
diff --git a/application/basilisk/base/content/browser-doctype.inc b/application/basilisk/base/content/browser-doctype.inc
index ad08f4b03..30d70ccea 100644
--- a/application/basilisk/base/content/browser-doctype.inc
+++ b/application/basilisk/base/content/browser-doctype.inc
@@ -19,7 +19,9 @@
#endif
<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
%aboutHomeDTD;
+#ifdef MOZ_SERVICES_SYNC
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
%syncBrandDTD;
+#endif
]>
diff --git a/application/basilisk/base/content/browser-fxaccounts.js b/application/basilisk/base/content/browser-fxaccounts.js
deleted file mode 100644
index e1d556bff..000000000
--- a/application/basilisk/base/content/browser-fxaccounts.js
+++ /dev/null
@@ -1,314 +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 gFxAccounts = {
-
- _initialized: false,
- _inCustomizationMode: false,
- _cachedProfile: null,
-
- get weave() {
- delete this.weave;
- return this.weave = Cc["@mozilla.org/weave/service;1"]
- .getService(Ci.nsISupports)
- .wrappedJSObject;
- },
-
- get topics() {
- // Do all this dance to lazy-load FxAccountsCommon.
- delete this.topics;
- return this.topics = [
- "weave:service:ready",
- "weave:service:login:change",
- "weave:service:setup-complete",
- "weave:service:sync:error",
- "weave:ui:login:error",
- this.FxAccountsCommon.ONLOGIN_NOTIFICATION,
- this.FxAccountsCommon.ONLOGOUT_NOTIFICATION,
- this.FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION,
- ];
- },
-
- get panelUIFooter() {
- delete this.panelUIFooter;
- return this.panelUIFooter = document.getElementById("PanelUI-footer-fxa");
- },
-
- get panelUIStatus() {
- delete this.panelUIStatus;
- return this.panelUIStatus = document.getElementById("PanelUI-fxa-status");
- },
-
- get panelUIAvatar() {
- delete this.panelUIAvatar;
- return this.panelUIAvatar = document.getElementById("PanelUI-fxa-avatar");
- },
-
- get panelUILabel() {
- delete this.panelUILabel;
- return this.panelUILabel = document.getElementById("PanelUI-fxa-label");
- },
-
- get panelUIIcon() {
- delete this.panelUIIcon;
- return this.panelUIIcon = document.getElementById("PanelUI-fxa-icon");
- },
-
- get strings() {
- delete this.strings;
- return this.strings = Services.strings.createBundle(
- "chrome://browser/locale/accounts.properties"
- );
- },
-
- get loginFailed() {
- // Referencing Weave.Service will implicitly initialize sync, and we don't
- // want to force that - so first check if it is ready.
- let service = Cc["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
- if (!service.ready) {
- return false;
- }
- // LOGIN_FAILED_LOGIN_REJECTED explicitly means "you must log back in".
- // All other login failures are assumed to be transient and should go
- // away by themselves, so aren't reflected here.
- return Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED;
- },
-
- init: function () {
- // Bail out if we're already initialized and for pop-up windows.
- if (this._initialized || !window.toolbar.visible) {
- return;
- }
-
- for (let topic of this.topics) {
- Services.obs.addObserver(this, topic, false);
- }
-
- gNavToolbox.addEventListener("customizationstarting", this);
- gNavToolbox.addEventListener("customizationending", this);
-
- EnsureFxAccountsWebChannel();
- this._initialized = true;
-
- this.updateUI();
- },
-
- uninit: function () {
- if (!this._initialized) {
- return;
- }
-
- for (let topic of this.topics) {
- Services.obs.removeObserver(this, topic);
- }
-
- this._initialized = false;
- },
-
- observe: function (subject, topic, data) {
- switch (topic) {
- case this.FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION:
- this._cachedProfile = null;
- // Fallthrough intended
- default:
- this.updateUI();
- break;
- }
- },
-
- handleEvent: function (event) {
- this._inCustomizationMode = event.type == "customizationstarting";
- this.updateAppMenuItem();
- },
-
- updateUI: function () {
- // It's possible someone signed in to FxA after seeing our notification
- // about "Legacy Sync migration" (which now is actually "Legacy Sync
- // auto-disconnect") so kill that notification if it still exists.
- let nb = window.document.getElementById("global-notificationbox");
- let n = nb.getNotificationWithValue(this.SYNC_MIGRATION_NOTIFICATION_TITLE);
- if (n) {
- nb.removeNotification(n, true);
- }
-
- this.updateAppMenuItem();
- },
-
- // Note that updateAppMenuItem() returns a Promise that's only used by tests.
- updateAppMenuItem: function () {
- let profileInfoEnabled = false;
- try {
- profileInfoEnabled = Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled");
- } catch (e) { }
-
- this.panelUIFooter.hidden = false;
-
- // Make sure the button is disabled in customization mode.
- if (this._inCustomizationMode) {
- this.panelUIStatus.setAttribute("disabled", "true");
- this.panelUILabel.setAttribute("disabled", "true");
- this.panelUIAvatar.setAttribute("disabled", "true");
- this.panelUIIcon.setAttribute("disabled", "true");
- } else {
- this.panelUIStatus.removeAttribute("disabled");
- this.panelUILabel.removeAttribute("disabled");
- this.panelUIAvatar.removeAttribute("disabled");
- this.panelUIIcon.removeAttribute("disabled");
- }
-
- let defaultLabel = this.panelUIStatus.getAttribute("defaultlabel");
- let errorLabel = this.panelUIStatus.getAttribute("errorlabel");
- let unverifiedLabel = this.panelUIStatus.getAttribute("unverifiedlabel");
- let settingslabel = this.panelUIStatus.getAttribute("settingslabel");
- // The localization string is for the signed in text, but it's the default text as well
- let defaultTooltiptext = this.panelUIStatus.getAttribute("signedinTooltiptext");
-
- let updateWithUserData = (userData) => {
- // Window might have been closed while fetching data.
- if (window.closed) {
- return;
- }
-
- // Reset the button to its original state.
- this.panelUILabel.setAttribute("label", defaultLabel);
- this.panelUIStatus.setAttribute("tooltiptext", defaultTooltiptext);
- this.panelUIFooter.removeAttribute("fxastatus");
- this.panelUIFooter.removeAttribute("fxaprofileimage");
- this.panelUIAvatar.style.removeProperty("list-style-image");
-
- if (Weave.Status.service == Weave.CLIENT_NOT_CONFIGURED) {
- // Leave the default state
- return;
- }
-
- if (this.loginFailed) {
- this.panelUIFooter.setAttribute("fxastatus", "error");
- this.panelUILabel.setAttribute("label", errorLabel);
- } else {
- this.panelUIFooter.setAttribute("fxastatus", "signedin");
- this.panelUILabel.setAttribute("label", settingslabel);
- this.panelUIStatus.setAttribute("tooltiptext", "");
- }
- }
-
- let updateWithProfile = (profile) => {
- if (profileInfoEnabled) {
- if (profile.displayName) {
- this.panelUILabel.setAttribute("label", profile.displayName);
- }
- if (profile.avatar) {
- this.panelUIFooter.setAttribute("fxaprofileimage", "set");
- let bgImage = "url(\"" + profile.avatar + "\")";
- this.panelUIAvatar.style.listStyleImage = bgImage;
-
- let img = new Image();
- img.onerror = () => {
- // Clear the image if it has trouble loading. Since this callback is asynchronous
- // we check to make sure the image is still the same before we clear it.
- if (this.panelUIAvatar.style.listStyleImage === bgImage) {
- this.panelUIFooter.removeAttribute("fxaprofileimage");
- this.panelUIAvatar.style.removeProperty("list-style-image");
- }
- };
- img.src = profile.avatar;
- }
- }
- }
-
- return fxAccounts.getSignedInUser().then(userData => {
- // userData may be null here when the user is not signed-in, but that's expected
- updateWithUserData(userData);
- // unverified users cause us to spew log errors fetching an OAuth token
- // to fetch the profile, so don't even try in that case.
- if (!userData || !userData.verified || !profileInfoEnabled) {
- return null; // don't even try to grab the profile.
- }
- if (this._cachedProfile) {
- return this._cachedProfile;
- }
- return fxAccounts.getSignedInUserProfile().catch(err => {
- // Not fetching the profile is sad but the FxA logs will already have noise.
- return null;
- });
- }).then(profile => {
- if (!profile) {
- return;
- }
- updateWithProfile(profile);
- this._cachedProfile = profile; // Try to avoid fetching the profile on every UI update
- }).catch(error => {
- // This is most likely in tests, were we quickly log users in and out.
- // The most likely scenario is a user logged out, so reflect that.
- // Bug 995134 calls for better errors so we could retry if we were
- // sure this was the failure reason.
- this.FxAccountsCommon.log.error("Error updating FxA account info", error);
- updateWithUserData(null);
- });
- },
-
- onMenuPanelCommand: function () {
-
- switch (this.panelUIFooter.getAttribute("fxastatus")) {
- case "signedin":
- this.openPreferences();
- break;
- case "error":
- if (this.panelUIFooter.getAttribute("unverified")) {
- this.openPreferences();
- } else {
- this.openSignInAgainPage("menupanel");
- }
- break;
- default:
- this.openPreferences();
- break;
- }
-
- PanelUI.hide();
- },
-
- openPreferences: function () {
- openPreferences("paneSync", { urlParams: { entrypoint: "menupanel" } });
- },
-
- openAccountsPage: function (action, urlParams={}) {
- let params = new URLSearchParams();
- if (action) {
- params.set("action", action);
- }
- for (let name in urlParams) {
- if (urlParams[name] !== undefined) {
- params.set(name, urlParams[name]);
- }
- }
- let url = "about:accounts?" + params;
- switchToTabHavingURI(url, true, {
- replaceQueryString: true
- });
- },
-
- openSignInAgainPage: function (entryPoint) {
- this.openAccountsPage("reauth", { entrypoint: entryPoint });
- },
-
- updateTabContextMenu: function (aPopupMenu) {
- // STUB
- },
-
- initPageContextMenu: function (contextMenu) {
- // STUB
- }
-};
-
-XPCOMUtils.defineLazyGetter(gFxAccounts, "FxAccountsCommon", function () {
- return Cu.import("resource://gre/modules/FxAccountsCommon.js", {});
-});
-
-XPCOMUtils.defineLazyModuleGetter(gFxAccounts, "fxaMigrator",
- "resource://services-sync/FxaMigrator.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "EnsureFxAccountsWebChannel",
- "resource://gre/modules/FxAccountsWebChannel.jsm");
diff --git a/application/basilisk/base/content/browser-menubar.inc b/application/basilisk/base/content/browser-menubar.inc
index 41734711c..b6ab23be5 100644
--- a/application/basilisk/base/content/browser-menubar.inc
+++ b/application/basilisk/base/content/browser-menubar.inc
@@ -11,19 +11,12 @@
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
<menu id="file-menu" label="&fileMenu.label;"
accesskey="&fileMenu.accesskey;">
- <menupopup id="menu_FilePopup"
- onpopupshowing="updateUserContextUIVisibility();">
+ <menupopup id="menu_FilePopup">
<menuitem id="menu_newNavigatorTab"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"
key="key_newNavigatorTab"
accesskey="&tabCmd.accesskey;"/>
- <menu id="menu_newUserContext"
- label="&newUserContext.label;"
- accesskey="&newUserContext.accesskey;"
- hidden="true">
- <menupopup onpopupshowing="return createUserContextMenu(event);" />
- </menu>
<menuitem id="menu_newNavigator"
label="&newNavigatorCmd.label;"
accesskey="&newNavigatorCmd.accesskey;"
@@ -202,9 +195,6 @@
key="key_gotoHistory"
observes="viewHistorySidebar"
label="&historyButton.label;"/>
- <menuitem id="menu_tabsSidebar"
- observes="viewTabsSidebar"
- label="&syncedTabs.sidebar.label;"/>
</menupopup>
</menu>
<menuseparator/>
@@ -324,11 +314,13 @@
key="key_sanitize"
command="Tools:Sanitize"/>
<menuseparator id="sanitizeSeparator"/>
+#ifdef MOZ_SERVICES_SYNC
<menuitem id="sync-tabs-menuitem"
class="syncTabsMenuItem"
- label="&syncTabsMenu3.label;"
+ label="&syncTabsMenu2.label;"
oncommand="BrowserOpenSyncTabs();"
- hidden="true"/>
+ disabled="true"/>
+#endif
<menuitem id="historyRestoreLastSession"
label="&historyRestoreLastSession.label;"
command="Browser:RestoreLastSession"/>
@@ -447,11 +439,10 @@
accesskey="&toolsMenu.accesskey;"
onpopupshowing="mirrorShow(this)">
<menupopup id="menu_ToolsPopup"
-# We have to use setTimeout() here to avoid a flickering menu bar when opening
-# the Tools menu, see bug 970769. This can be removed once we got rid of the
-# event loop spinning in Weave.Status._authManager.
- onpopupshowing="setTimeout(() => gSyncUI.updateUI());"
- >
+#ifdef MOZ_SERVICES_SYNC
+ onpopupshowing="gSyncUI.updateUI();"
+#endif
+ >
<menuitem id="menu_openDownloads"
label="&downloads.label;"
accesskey="&downloads.accesskey;"
@@ -462,23 +453,19 @@
accesskey="&addons.accesskey;"
key="key_openAddons"
command="Tools:Addons"/>
-
- <!-- only one of sync-setup, sync-syncnowitem or sync-reauthitem will be showing at once -->
+#ifdef MOZ_SERVICES_SYNC
+ <!-- only one of sync-setup or sync-menu will be showing at once -->
<menuitem id="sync-setup"
- label="&syncSignIn.label;"
- accesskey="&syncSignIn.accesskey;"
+ label="&syncSetup.label;"
+ accesskey="&syncSetup.accesskey;"
observes="sync-setup-state"
- oncommand="gSyncUI.openSetup(null, 'menubar')"/>
+ oncommand="gSyncUI.openSetup()"/>
<menuitem id="sync-syncnowitem"
label="&syncSyncNowItem.label;"
accesskey="&syncSyncNowItem.accesskey;"
observes="sync-syncnow-state"
oncommand="gSyncUI.doSync(event);"/>
- <menuitem id="sync-reauthitem"
- label="&syncReAuthItem.label;"
- accesskey="&syncReAuthItem.accesskey;"
- observes="sync-reauth-state"
- oncommand="gSyncUI.openSignInAgainPage('menubar');"/>
+#endif
<menuseparator id="devToolsSeparator"/>
<menu id="webDeveloperMenu"
label="&webDeveloperMenu.label;"
diff --git a/application/basilisk/base/content/browser-places.js b/application/basilisk/base/content/browser-places.js
index 83c737977..87734140f 100644
--- a/application/basilisk/base/content/browser-places.js
+++ b/application/basilisk/base/content/browser-places.js
@@ -804,18 +804,29 @@ HistoryMenu.prototype = {
},
toggleTabsFromOtherComputers: function PHM_toggleTabsFromOtherComputers() {
+ // This is a no-op if MOZ_SERVICES_SYNC isn't defined
+#ifdef MOZ_SERVICES_SYNC
// Enable/disable the Tabs From Other Computers menu. Some of the menus handled
// by HistoryMenu do not have this menuitem.
let menuitem = this._rootElt.getElementsByClassName("syncTabsMenuItem")[0];
if (!menuitem)
return;
- if (!PlacesUIUtils.shouldShowTabsFromOtherComputersMenuitem()) {
+ // If Sync isn't configured yet, then don't show the menuitem.
+ if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
+ Weave.Svc.Prefs.get("firstSync", "") == "notReady") {
menuitem.setAttribute("hidden", true);
return;
}
+ // The tabs engine might never be inited (if services.sync.registerEngines
+ // is modified), so make sure we avoid undefined errors.
+ let enabled = Weave.Service.isLoggedIn &&
+ Weave.Service.engineManager.get("tabs") &&
+ Weave.Service.engineManager.get("tabs").enabled;
+ menuitem.setAttribute("disabled", !enabled);
menuitem.setAttribute("hidden", false);
+#endif
},
_onPopupShowing: function HM__onPopupShowing(aEvent) {
diff --git a/application/basilisk/base/content/browser-sets.inc b/application/basilisk/base/content/browser-sets.inc
index 6ea057d93..d6a9310ed 100644
--- a/application/basilisk/base/content/browser-sets.inc
+++ b/application/basilisk/base/content/browser-sets.inc
@@ -163,16 +163,13 @@
<!-- A broadcaster of a number of attributes suitable for "sync now" UI -
A 'syncstatus' attribute is set while actively syncing, and the label
attribute which changes from "sync now" to "syncing" etc. -->
+#ifdef MOZ_SERVICES_SYNC
<broadcaster id="sync-status"/>
<!-- broadcasters of the "hidden" attribute to reflect setup state for
menus -->
<broadcaster id="sync-setup-state"/>
<broadcaster id="sync-syncnow-state" hidden="true"/>
- <broadcaster id="sync-reauth-state" hidden="true"/>
- <broadcaster id="viewTabsSidebar" autoCheck="false" sidebartitle="&syncedTabs.sidebar.label;"
- type="checkbox" group="sidebar"
- sidebarurl="chrome://browser/content/syncedtabs/sidebar.xhtml"
- oncommand="SidebarUI.toggle('viewTabsSidebar');"/>
+#endif
<broadcaster id="workOfflineMenuitemState"/>
<broadcaster id="devtoolsMenuBroadcaster_ErrorConsole"
diff --git a/application/basilisk/base/content/browser-syncui.js b/application/basilisk/base/content/browser-syncui.js
index 3a57140f2..f57472658 100644
--- a/application/basilisk/base/content/browser-syncui.js
+++ b/application/basilisk/base/content/browser-syncui.js
@@ -1,63 +1,37 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+# This 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/.
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-#ifdef MOZ_SERVICES_CLOUDSYNC
-XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
- "resource://gre/modules/CloudSync.jsm");
-#endif
-
-XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
- "resource://gre/modules/FxAccounts.jsm");
-
-const MIN_STATUS_ANIMATION_DURATION = 1600;
-
-// gSyncUI handles updating the tools menu and displaying notifications.
+// gSyncUI handles updating the tools menu
var gSyncUI = {
_obs: ["weave:service:sync:start",
- "weave:service:sync:finish",
- "weave:service:sync:error",
+ "weave:service:sync:delayed",
"weave:service:quota:remaining",
"weave:service:setup-complete",
"weave:service:login:start",
"weave:service:login:finish",
- "weave:service:login:error",
"weave:service:logout:finish",
"weave:service:start-over",
- "weave:service:start-over:finish",
"weave:ui:login:error",
"weave:ui:sync:error",
"weave:ui:sync:finish",
"weave:ui:clear-error",
- "weave:engine:sync:finish"
],
_unloaded: false,
- // The last sync start time. Used to calculate the leftover animation time
- // once syncing completes (bug 1239042).
- _syncStartTime: 0,
- _syncAnimationTimer: 0,
-
- init: function () {
- Cu.import("resource://services-common/stringbundle.js");
+ init: function SUI_init() {
// Proceed to set up the UI if Sync has already started up.
// Otherwise we'll do it when Sync is firing up.
- if (this.weaveService.ready) {
+ let xps = Components.classes["@mozilla.org/weave/service;1"]
+ .getService(Components.interfaces.nsISupports)
+ .wrappedJSObject;
+ if (xps.ready) {
this.initUI();
return;
}
- // Sync isn't ready yet, but we can still update the UI with an initial
- // state - we haven't called initUI() yet, but that's OK - that's more
- // about observers for state changes, and will be called once Sync is
- // ready to start sending notifications.
- this.updateUI();
-
Services.obs.addObserver(this, "weave:service:ready", true);
- Services.obs.addObserver(this, "quit-application", true);
// Remove the observer if the window is closed before the observer
// was triggered.
@@ -65,7 +39,6 @@ var gSyncUI = {
gSyncUI._unloaded = true;
window.removeEventListener("unload", onUnload, false);
Services.obs.removeObserver(gSyncUI, "weave:service:ready");
- Services.obs.removeObserver(gSyncUI, "quit-application");
if (Weave.Status.ready) {
gSyncUI._obs.forEach(function(topic) {
@@ -85,161 +58,136 @@ var gSyncUI = {
Services.obs.addObserver(this, topic, true);
}, this);
- // initial label for the sync buttons.
- let broadcaster = document.getElementById("sync-status");
- broadcaster.setAttribute("label", this._stringBundle.GetStringFromName("syncnow.label"));
-
- this.maybeMoveSyncedTabsButton();
-
+ if (gBrowser && Weave.Notifications.notifications.length) {
+ this.initNotifications();
+ }
this.updateUI();
},
+ initNotifications: function SUI_initNotifications() {
+ const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ let notificationbox = document.createElementNS(XULNS, "notificationbox");
+ notificationbox.id = "sync-notifications";
+ notificationbox.setAttribute("flex", "1");
- // Returns a promise that resolves with true if Sync needs to be configured,
- // false otherwise.
- _needsSetup() {
- // If Sync is configured for FxAccounts then we do that promise-dance.
- if (this.weaveService.fxAccountsEnabled) {
- return fxAccounts.getSignedInUser().then(user => {
- // We want to treat "account needs verification" as "needs setup".
- return !(user && user.verified);
- });
- }
- // We are using legacy sync - check that.
- let firstSync = "";
- try {
- firstSync = Services.prefs.getCharPref("services.sync.firstSync");
- } catch (e) { }
-
- return Promise.resolve(Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
- firstSync == "notReady");
+ let bottombox = document.getElementById("browser-bottombox");
+ bottombox.insertBefore(notificationbox, bottombox.firstChild);
+
+ // Force a style flush to ensure that our binding is attached.
+ notificationbox.clientTop;
+
+ // notificationbox will listen to observers from now on.
+ Services.obs.removeObserver(this, "weave:notification:added");
},
- // Returns a promise that resolves with true if the user currently signed in
- // to Sync needs to be verified, false otherwise.
- _needsVerification() {
- // For callers who care about the distinction between "needs setup" and
- // "needs verification"
- if (this.weaveService.fxAccountsEnabled) {
- return fxAccounts.getSignedInUser().then(user => {
- // If there is no user, they can't be in a "needs verification" state.
- if (!user) {
- return false;
- }
- return !user.verified;
- });
- }
+ _wasDelayed: false,
- // Otherwise we are configured for legacy Sync, which has no verification
- // concept.
- return Promise.resolve(false);
+ _needsSetup: function SUI__needsSetup() {
+ let firstSync = Services.prefs.getCharPref("services.sync.firstSync", "");
+ return Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
+ firstSync == "notReady";
},
- // Note that we don't show login errors in a notification bar here, but do
- // still need to track a login-failed state so the "Tools" menu updates
- // with the correct state.
- _loginFailed: function () {
- // If Sync isn't already ready, we don't want to force it to initialize
- // by referencing Weave.Status - and it isn't going to be accurate before
- // Sync is ready anyway.
- if (!this.weaveService.ready) {
- this.log.debug("_loginFailed has sync not ready, so returning false");
- return false;
+ updateUI: function SUI_updateUI() {
+ let needsSetup = this._needsSetup();
+ document.getElementById("sync-setup-state").hidden = !needsSetup;
+ document.getElementById("sync-syncnow-state").hidden = needsSetup;
+
+ if (!gBrowser) {
+ return;
}
- this.log.debug("_loginFailed has sync state=${sync}",
- { sync: Weave.Status.login});
- return Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED;
- },
- // Kick off an update of the UI - does *not* return a promise.
- updateUI() {
- this._promiseUpdateUI().catch(err => {
- this.log.error("updateUI failed", err);
- })
- },
+ let button = document.getElementById("sync-button");
+ if (!button) {
+ return;
+ }
- // Updates the UI - returns a promise.
- _promiseUpdateUI() {
- return this._needsSetup().then(needsSetup => {
- if (!gBrowser)
- return Promise.resolve();
-
- let loginFailed = this._loginFailed();
-
- // Start off with a clean slate
- document.getElementById("sync-reauth-state").hidden = true;
- document.getElementById("sync-setup-state").hidden = true;
- document.getElementById("sync-syncnow-state").hidden = true;
-
-#ifdef MOZ_SERVICES_CLOUDSYNC
- if (CloudSync && CloudSync.ready && CloudSync().adapters.count) {
- document.getElementById("sync-syncnow-state").hidden = false;
- } else if (loginFailed) {
-#else
- if (loginFailed) {
-#endif
- // unhiding this element makes the menubar show the login failure state.
- document.getElementById("sync-reauth-state").hidden = false;
- } else if (needsSetup) {
- document.getElementById("sync-setup-state").hidden = false;
- } else {
- document.getElementById("sync-syncnow-state").hidden = false;
- }
+ button.removeAttribute("status");
+
+ this._updateLastSyncTime();
- return this._updateSyncButtonsTooltip();
- });
+ if (needsSetup) {
+ button.removeAttribute("tooltiptext");
+ button.setAttribute("label", this._stringBundle.GetStringFromName("setupsync.label"));
+ } else {
+ button.setAttribute("label", this._stringBundle.GetStringFromName("syncnow.label"));
+ }
},
+
// Functions called by observers
- onActivityStart() {
+ onActivityStart: function SUI_onActivityStart() {
if (!gBrowser)
return;
- this.log.debug("onActivityStart");
+ let button = document.getElementById("sync-button");
+ if (!button)
+ return;
- clearTimeout(this._syncAnimationTimer);
- this._syncStartTime = Date.now();
+ button.setAttribute("status", "active");
+ button.setAttribute("label", this._stringBundle.GetStringFromName("syncing2.label"));
+ },
- let broadcaster = document.getElementById("sync-status");
- broadcaster.setAttribute("syncstatus", "active");
- broadcaster.setAttribute("label", this._stringBundle.GetStringFromName("syncing2.label"));
- broadcaster.setAttribute("disabled", "true");
+ onSyncDelay: function SUI_onSyncDelay() {
+ // basically, we want to just inform users that stuff is going to take a while
+ let title = this._stringBundle.GetStringFromName("error.sync.no_node_found.title");
+ let description = this._stringBundle.GetStringFromName("error.sync.no_node_found");
+ let buttons = [new Weave.NotificationButton(
+ this._stringBundle.GetStringFromName("error.sync.serverStatusButton.label"),
+ this._stringBundle.GetStringFromName("error.sync.serverStatusButton.accesskey"),
+ function() { gSyncUI.openServerStatus(); return true; }
+ )];
+ let notification = new Weave.Notification(
+ title, description, null, Weave.Notifications.PRIORITY_INFO, buttons);
+ Weave.Notifications.replaceTitle(notification);
+ this._wasDelayed = true;
+ },
- this.updateUI();
+ onLoginFinish: function SUI_onLoginFinish() {
+ // Clear out any login failure notifications
+ let title = this._stringBundle.GetStringFromName("error.login.title");
+ this.clearError(title);
},
- _updateSyncStatus() {
- if (!gBrowser)
- return;
- let broadcaster = document.getElementById("sync-status");
- broadcaster.removeAttribute("syncstatus");
- broadcaster.removeAttribute("disabled");
- broadcaster.setAttribute("label", this._stringBundle.GetStringFromName("syncnow.label"));
- this.updateUI();
+ onSetupComplete: function SUI_onSetupComplete() {
+ this.onLoginFinish();
},
- onActivityStop() {
- if (!gBrowser)
+ onLoginError: function SUI_onLoginError() {
+ // if login fails, any other notifications are essentially moot
+ Weave.Notifications.removeAll();
+
+ // if we haven't set up the client, don't show errors
+ if (this._needsSetup()) {
+ this.updateUI();
return;
- this.log.debug("onActivityStop");
+ }
- let now = Date.now();
- let syncDuration = now - this._syncStartTime;
+ let title = this._stringBundle.GetStringFromName("error.login.title");
- if (syncDuration < MIN_STATUS_ANIMATION_DURATION) {
- let animationTime = MIN_STATUS_ANIMATION_DURATION - syncDuration;
- clearTimeout(this._syncAnimationTimer);
- this._syncAnimationTimer = setTimeout(() => this._updateSyncStatus(), animationTime);
+ let description;
+ if (Weave.Status.sync == Weave.PROLONGED_SYNC_FAILURE) {
+ // Convert to days
+ let lastSync =
+ Services.prefs.getIntPref("services.sync.errorhandler.networkFailureReportTimeout") / 86400;
+ description =
+ this._stringBundle.formatStringFromName("error.sync.prolonged_failure", [lastSync], 1);
} else {
- this._updateSyncStatus();
+ let reason = Weave.Utils.getErrorString(Weave.Status.login);
+ description =
+ this._stringBundle.formatStringFromName("error.sync.description", [reason], 1);
}
- },
- onLoginError: function SUI_onLoginError() {
- this.log.debug("onLoginError: login=${login}, sync=${sync}", Weave.Status);
+ let buttons = [];
+ buttons.push(new Weave.NotificationButton(
+ this._stringBundle.GetStringFromName("error.login.prefs.label"),
+ this._stringBundle.GetStringFromName("error.login.prefs.accesskey"),
+ function() { gSyncUI.openPrefs(); return true; }
+ ));
- // We don't show any login errors here; browser-fxaccounts shows them in
- // the hamburger menu.
+ let notification = new Weave.Notification(title, description, null,
+ Weave.Notifications.PRIORITY_WARNING, buttons);
+ Weave.Notifications.replaceTitle(notification);
this.updateUI();
},
@@ -247,6 +195,10 @@ var gSyncUI = {
this.updateUI();
},
+ onStartOver: function SUI_onStartOver() {
+ this.clearError();
+ },
+
onQuotaNotice: function onQuotaNotice(subject, data) {
let title = this._stringBundle.GetStringFromName("warning.sync.quota.label");
let description = this._stringBundle.GetStringFromName("warning.sync.quota.description");
@@ -262,40 +214,26 @@ var gSyncUI = {
Weave.Notifications.replaceTitle(notification);
},
- _getAppName: function () {
- let brand = new StringBundle("chrome://branding/locale/brand.properties");
- return brand.get("brandShortName");
+ openServerStatus: function () {
+ let statusURL = Services.prefs.getCharPref("services.sync.statusURL");
+ window.openUILinkIn(statusURL, "tab");
},
// Commands
- // doSync forces a sync - it *does not* return a promise as it is called
- // via the various UI components.
- doSync() {
- this._needsSetup().then(needsSetup => {
- if (!needsSetup) {
- setTimeout(() => Weave.Service.errorHandler.syncAndReportErrors(), 0);
- }
- Services.obs.notifyObservers(null, "cloudsync:user-sync", null);
- }).catch(err => {
- this.log.error("Failed to force a sync", err);
- });
+ doSync: function SUI_doSync() {
+ setTimeout(function() Weave.Service.errorHandler.syncAndReportErrors(), 0);
},
- // Handle clicking the toolbar button - which either opens the Sync setup
- // pages or forces a sync now. Does *not* return a promise as it is called
- // via the UI.
- handleToolbarButton() {
- this._needsSetup().then(needsSetup => {
- if (needsSetup || this._loginFailed()) {
- this.openSetup();
- } else {
- this.doSync();
- }
- }).catch(err => {
- this.log.error("Failed to handle toolbar button command", err);
- });
+ handleToolbarButton: function SUI_handleStatusbarButton() {
+ if (this._needsSetup())
+ this.openSetup();
+ else
+ this.doSync();
},
+ //XXXzpao should be part of syncCommon.js - which we might want to make a module...
+ // To be fixed in a followup (bug 583366)
+
/**
* Invoke the Sync setup wizard.
*
@@ -304,11 +242,9 @@ var gSyncUI = {
* null -- regular set up wizard
* "pair" -- pair a device first
* "reset" -- reset sync
- * @param entryPoint
- * Indicates the entrypoint from where this method was called.
*/
- openSetup: function SUI_openSetup(wizardType, entryPoint = "syncbutton") {
+ openSetup: function SUI_openSetup(wizardType) {
let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
if (win)
win.focus();
@@ -319,7 +255,6 @@ var gSyncUI = {
}
},
- // Open the legacy-sync device pairing UI. Note used for FxA Sync.
openAddDevice: function () {
if (!Weave.Utils.ensureMPUnlocked())
return;
@@ -332,202 +267,181 @@ var gSyncUI = {
"syncAddDevice", "centerscreen,chrome,resizable=no");
},
- openPrefs: function (entryPoint) {
- openPreferences("paneSync", { urlParams: { entrypoint: entryPoint } });
+ openQuotaDialog: function SUI_openQuotaDialog() {
+ let win = Services.wm.getMostRecentWindow("Sync:ViewQuota");
+ if (win)
+ win.focus();
+ else
+ Services.ww.activeWindow.openDialog(
+ "chrome://browser/content/sync/quota.xul", "",
+ "centerscreen,chrome,dialog,modal");
},
- openSignInAgainPage: function (entryPoint = "syncbutton") {
- gFxAccounts.openSignInAgainPage(entryPoint);
+ openPrefs: function SUI_openPrefs() {
+ openPreferences("paneSync");
},
- /* After Sync is initialized we perform a once-only check for the sync
- button being in "customize purgatory" and if so, move it to the panel.
- This is done primarily for profiles created before SyncedTabs landed,
- where the button defaulted to being in that purgatory.
- We use a preference to ensure we only do it once, so people can still
- customize it away and have it stick.
- */
- maybeMoveSyncedTabsButton() {
- const prefName = "browser.migrated-sync-button";
- let migrated = false;
- try {
- migrated = Services.prefs.getBoolPref(prefName);
- } catch (_) {}
- if (migrated) {
+ // Helpers
+ _updateLastSyncTime: function SUI__updateLastSyncTime() {
+ if (!gBrowser)
return;
- }
- if (!CustomizableUI.getPlacementOfWidget("sync-button")) {
- CustomizableUI.addWidgetToArea("sync-button", CustomizableUI.AREA_PANEL);
- }
- Services.prefs.setBoolPref(prefName, true);
- },
- /* Update the tooltip for the sync-status broadcaster (which will update the
- Sync Toolbar button and the Sync spinner in the FxA hamburger area.)
- If Sync is configured, the tooltip is when the last sync occurred,
- otherwise the tooltip reflects the fact that Sync needs to be
- (re-)configured.
- */
- _updateSyncButtonsTooltip: Task.async(function* () {
- if (!gBrowser)
+ let syncButton = document.getElementById("sync-button");
+ if (!syncButton)
return;
- let email;
- try {
- email = Services.prefs.getCharPref("services.sync.username");
- } catch (ex) {}
-
- let needsSetup = yield this._needsSetup();
- let needsVerification = yield this._needsVerification();
- let loginFailed = this._loginFailed();
- // This is a little messy as the Sync buttons are 1/2 Sync related and
- // 1/2 FxA related - so for some strings we use Sync strings, but for
- // others we reach into gFxAccounts for strings.
- let tooltiptext;
- if (needsVerification) {
- // "needs verification"
- tooltiptext = gFxAccounts.strings.formatStringFromName("verifyDescription", [email], 1);
- } else if (needsSetup) {
- // "needs setup".
- tooltiptext = this._stringBundle.GetStringFromName("signInToSync.description");
- } else if (loginFailed) {
- // "need to reconnect/re-enter your password"
- tooltiptext = gFxAccounts.strings.formatStringFromName("reconnectDescription", [email], 1);
- } else {
- // Sync appears configured - format the "last synced at" time.
- try {
- let lastSync = new Date(Services.prefs.getCharPref("services.sync.lastSync"));
- tooltiptext = this.formatLastSyncDate(lastSync);
- }
- catch (e) {
- // pref doesn't exist (which will be the case until we've seen the
- // first successful sync) or is invalid (which should be impossible!)
- // Just leave tooltiptext as the empty string in these cases, which
- // will cause the tooltip to be removed below.
- }
+ let lastSync = Services.prefs.getCharPref("services.sync.lastSync", "");
+ if (!lastSync || this._needsSetup()) {
+ syncButton.removeAttribute("tooltiptext");
+ return;
}
- // We've done all our promise-y work and ready to update the UI - make
- // sure it hasn't been torn down since we started.
- if (!gBrowser)
- return;
+ // Show the day-of-week and time (HH:MM) of last sync
+ let lastSyncDate = new Date(lastSync).toLocaleFormat("%a %H:%M");
+ let lastSyncLabel =
+ this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDate], 1);
- let broadcaster = document.getElementById("sync-status");
- if (broadcaster) {
- if (tooltiptext) {
- broadcaster.setAttribute("tooltiptext", tooltiptext);
- } else {
- broadcaster.removeAttribute("tooltiptext");
- }
- }
- }),
-
- formatLastSyncDate: function(date) {
- let dateFormat;
- let sixDaysAgo = (() => {
- let date = new Date();
- date.setDate(date.getDate() - 6);
- date.setHours(0, 0, 0, 0);
- return date;
- })();
- // It may be confusing for the user to see "Last Sync: Monday" when the last sync was a indeed a Monday but 3 weeks ago
- if (date < sixDaysAgo) {
- dateFormat = {month: 'long', day: 'numeric'};
- } else {
- dateFormat = {weekday: 'long', hour: 'numeric', minute: 'numeric'};
- }
- let lastSyncDateString = date.toLocaleDateString(undefined, dateFormat);
- return this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDateString], 1);
+ syncButton.setAttribute("tooltiptext", lastSyncLabel);
},
- onClientsSynced: function() {
- let broadcaster = document.getElementById("sync-syncnow-state");
- if (broadcaster) {
- if (Weave.Service.clientsEngine.stats.numClients > 1) {
- broadcaster.setAttribute("devices-status", "multi");
- } else {
- broadcaster.setAttribute("devices-status", "single");
- }
+ clearError: function SUI_clearError(errorString) {
+ Weave.Notifications.removeAll(errorString);
+ this.updateUI();
+ },
+
+ onSyncFinish: function SUI_onSyncFinish() {
+ let title = this._stringBundle.GetStringFromName("error.sync.title");
+
+ // Clear out sync failures on a successful sync
+ this.clearError(title);
+
+ if (this._wasDelayed && Weave.Status.sync != Weave.NO_SYNC_NODE_FOUND) {
+ title = this._stringBundle.GetStringFromName("error.sync.no_node_found.title");
+ this.clearError(title);
+ this._wasDelayed = false;
}
},
onSyncError: function SUI_onSyncError() {
- this.log.debug("onSyncError: login=${login}, sync=${sync}", Weave.Status);
let title = this._stringBundle.GetStringFromName("error.sync.title");
- let error = Weave.Utils.getErrorString(Weave.Status.sync);
- let description =
+
+ if (Weave.Status.login != Weave.LOGIN_SUCCEEDED) {
+ this.onLoginError();
+ return;
+ }
+
+ let description;
+ if (Weave.Status.sync == Weave.PROLONGED_SYNC_FAILURE) {
+ // Convert to days
+ let lastSync =
+ Services.prefs.getIntPref("services.sync.errorhandler.networkFailureReportTimeout") / 86400;
+ description =
+ this._stringBundle.formatStringFromName("error.sync.prolonged_failure", [lastSync], 1);
+ } else {
+ let error = Weave.Utils.getErrorString(Weave.Status.sync);
+ description =
this._stringBundle.formatStringFromName("error.sync.description", [error], 1);
+ }
let priority = Weave.Notifications.PRIORITY_WARNING;
let buttons = [];
- if (Weave.Status.sync == Weave.OVER_QUOTA) {
- description = this._stringBundle.GetStringFromName("error.sync.quota.description");
+ // Check if the client is outdated in some way
+ let outdated = Weave.Status.sync == Weave.VERSION_OUT_OF_DATE;
+ for (let [engine, reason] in Iterator(Weave.Status.engines))
+ outdated = outdated || reason == Weave.VERSION_OUT_OF_DATE;
+
+ if (outdated) {
+ description = this._stringBundle.GetStringFromName(
+ "error.sync.needUpdate.description");
+ buttons.push(new Weave.NotificationButton(
+ this._stringBundle.GetStringFromName("error.sync.needUpdate.label"),
+ this._stringBundle.GetStringFromName("error.sync.needUpdate.accesskey"),
+ function() {
+ window.openUILinkIn(Services.prefs.getCharPref("services.sync.outdated.url"), "tab");
+ return true;
+ }
+ ));
+ }
+ else if (Weave.Status.sync == Weave.OVER_QUOTA) {
+ description = this._stringBundle.GetStringFromName(
+ "error.sync.quota.description");
buttons.push(new Weave.NotificationButton(
- this._stringBundle.GetStringFromName("error.sync.viewQuotaButton.label"),
- this._stringBundle.GetStringFromName("error.sync.viewQuotaButton.accesskey"),
+ this._stringBundle.GetStringFromName(
+ "error.sync.viewQuotaButton.label"),
+ this._stringBundle.GetStringFromName(
+ "error.sync.viewQuotaButton.accesskey"),
function() { gSyncUI.openQuotaDialog(); return true; } )
);
- // Only show the notification bar on Quota error. the panel will show the rest.
- let notification =
- new Weave.Notification(title, description, null, priority, buttons);
- Weave.Notifications.replaceTitle(notification);
+ }
+ else if (Weave.Status.enforceBackoff) {
+ priority = Weave.Notifications.PRIORITY_INFO;
+ buttons.push(new Weave.NotificationButton(
+ this._stringBundle.GetStringFromName("error.sync.serverStatusButton.label"),
+ this._stringBundle.GetStringFromName("error.sync.serverStatusButton.accesskey"),
+ function() { gSyncUI.openServerStatus(); return true; }
+ ));
+ }
+ else {
+ priority = Weave.Notifications.PRIORITY_INFO;
+ buttons.push(new Weave.NotificationButton(
+ this._stringBundle.GetStringFromName("error.sync.tryAgainButton.label"),
+ this._stringBundle.GetStringFromName("error.sync.tryAgainButton.accesskey"),
+ function() { gSyncUI.doSync(); return true; }
+ ));
+ }
+
+ let notification =
+ new Weave.Notification(title, description, null, priority, buttons);
+ Weave.Notifications.replaceTitle(notification);
+
+ if (this._wasDelayed && Weave.Status.sync != Weave.NO_SYNC_NODE_FOUND) {
+ title = this._stringBundle.GetStringFromName("error.sync.no_node_found.title");
+ Weave.Notifications.removeAll(title);
+ this._wasDelayed = false;
}
this.updateUI();
},
-
observe: function SUI_observe(subject, topic, data) {
- this.log.debug("observed", topic);
if (this._unloaded) {
Cu.reportError("SyncUI observer called after unload: " + topic);
return;
}
- // Unwrap, just like Svc.Obs, but without pulling in that dependency.
- if (subject && typeof subject == "object" &&
- ("wrappedJSObject" in subject) &&
- ("observersModuleSubjectWrapper" in subject.wrappedJSObject)) {
- subject = subject.wrappedJSObject.object;
- }
-
- // First handle "activity" only.
switch (topic) {
case "weave:service:sync:start":
this.onActivityStart();
break;
- case "weave:service:sync:finish":
- case "weave:service:sync:error":
- this.onActivityStop();
- break;
- }
- // Now non-activity state (eg, enabled, errors, etc)
- // Note that sync uses the ":ui:" notifications for errors because sync.
- switch (topic) {
case "weave:ui:sync:finish":
- // Do nothing.
+ this.onSyncFinish();
break;
case "weave:ui:sync:error":
this.onSyncError();
break;
- case "weave:service:setup-complete":
- case "weave:service:login:finish":
- case "weave:service:login:start":
- case "weave:service:start-over":
- this.updateUI();
+ case "weave:service:sync:delayed":
+ this.onSyncDelay();
break;
case "weave:service:quota:remaining":
this.onQuotaNotice();
break;
+ case "weave:service:setup-complete":
+ this.onSetupComplete();
+ break;
+ case "weave:service:login:start":
+ this.onActivityStart();
+ break;
+ case "weave:service:login:finish":
+ this.onLoginFinish();
+ break;
case "weave:ui:login:error":
- case "weave:service:login:error":
this.onLoginError();
break;
case "weave:service:logout:finish":
this.onLogout();
break;
- case "weave:service:start-over:finish":
- this.updateUI();
+ case "weave:service:start-over":
+ this.onStartOver();
break;
case "weave:service:ready":
this.initUI();
@@ -535,16 +449,8 @@ var gSyncUI = {
case "weave:notification:added":
this.initNotifications();
break;
- case "weave:engine:sync:finish":
- if (data != "clients") {
- return;
- }
- this.onClientsSynced();
- break;
- case "quit-application":
- // Stop the animation timer on shutdown, since we can't update the UI
- // after this.
- clearTimeout(this._syncAnimationTimer);
+ case "weave:ui:clear-error":
+ this.clearError();
break;
}
},
@@ -556,19 +462,10 @@ var gSyncUI = {
};
XPCOMUtils.defineLazyGetter(gSyncUI, "_stringBundle", function() {
- // XXXzpao these strings should probably be moved from /services to /browser... (bug 583381)
+ //XXXzpao these strings should probably be moved from /services to /browser... (bug 583381)
// but for now just make it work
return Cc["@mozilla.org/intl/stringbundle;1"].
getService(Ci.nsIStringBundleService).
createBundle("chrome://weave/locale/services/sync.properties");
});
-XPCOMUtils.defineLazyGetter(gSyncUI, "log", function() {
- return Log.repository.getLogger("browserwindow.syncui");
-});
-
-XPCOMUtils.defineLazyGetter(gSyncUI, "weaveService", function() {
- return Components.classes["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
-});
diff --git a/application/basilisk/base/content/browser.css b/application/basilisk/base/content/browser.css
index 517c1c5eb..a2c2559d6 100644
--- a/application/basilisk/base/content/browser.css
+++ b/application/basilisk/base/content/browser.css
@@ -687,6 +687,18 @@ window[chromehidden~="toolbar"] toolbar:not(#nav-bar):not(#TabsToolbar):not(#pri
min-width: 1px;
}
+%ifdef MOZ_SERVICES_SYNC
+/* Sync notification UI */
+#sync-notifications {
+ -moz-binding: url("chrome://browser/content/sync/notification.xml#notificationbox");
+ overflow-y: visible !important;
+}
+
+#sync-notifications notification {
+ -moz-binding: url("chrome://browser/content/sync/notification.xml#notification");
+}
+%endif
+
/* History Swipe Animation */
#historySwipeAnimationContainer {
diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js
index 9fb997a42..926a369dd 100644
--- a/application/basilisk/base/content/browser.js
+++ b/application/basilisk/base/content/browser.js
@@ -8,7 +8,6 @@ var Cu = Components.utils;
var Cc = Components.classes;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/ContextualIdentityService.jsm");
Cu.import("resource://gre/modules/NotificationDB.jsm");
// lazy module getters
@@ -47,7 +46,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["Task", "resource://gre/modules/Task.jsm"],
["UpdateUtils", "resource://gre/modules/UpdateUtils.jsm"],
["Weave", "resource://services-sync/main.js"],
- ["fxAccounts", "resource://gre/modules/FxAccounts.jsm"],
#ifdef MOZ_DEVTOOLS
// Note: Do not delete! It is used for: base/content/nsContextMenu.js
["gDevTools", "resource://devtools/client/framework/gDevTools.jsm"],
@@ -104,6 +102,12 @@ XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
return new tmp.PageMenuParent();
});
+#ifdef MOZ_SERVICES_SYNC
+XPCOMUtils.defineLazyModuleGetter(this, "Weave",
+ "resource://services-sync/main.js");
+#endif
+
+
XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () {
let tmp = {};
Cu.import("resource://gre/modules/PopupNotifications.jsm", tmp);
@@ -209,6 +213,10 @@ var gInitialPages = [
"about:logopage"
];
+#ifdef MOZ_SERVICES_SYNC
+#include browser-syncui.js
+#endif
+
function* browserWindows() {
let windows = Services.wm.getEnumerator("navigator:browser");
while (windows.hasMoreElements())
@@ -827,10 +835,6 @@ function _loadURIWithFlags(browser, uri, params) {
}
try {
if (!mustChangeProcess) {
- if (params.userContextId) {
- browser.webNavigation.setOriginAttributesBeforeLoading({ userContextId: params.userContextId });
- }
-
browser.webNavigation.loadURIWithOptions(uri, flags,
referrer, referrerPolicy,
postData, null, null, triggeringPrincipal);
@@ -856,10 +860,6 @@ function _loadURIWithFlags(browser, uri, params) {
postData: postData
}
- if (params.userContextId) {
- loadParams.userContextId = params.userContextId;
- }
-
LoadInOtherProcess(browser, loadParams);
}
} catch (e) {
@@ -872,10 +872,6 @@ function _loadURIWithFlags(browser, uri, params) {
Cu.reportError(e);
gBrowser.updateBrowserRemotenessByURL(browser, uri);
- if (params.userContextId) {
- browser.webNavigation.setOriginAttributesBeforeLoading({ userContextId: params.userContextId });
- }
-
browser.webNavigation.loadURIWithOptions(uri, flags, referrer, referrerPolicy,
postData, null, null, triggeringPrincipal);
} else {
@@ -939,16 +935,6 @@ addEventListener("DOMContentLoaded", function onDCL() {
let initBrowser =
document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
- // The window's first argument is a tab if and only if we are swapping tabs.
- // We must set the browser's usercontextid before updateBrowserRemoteness(),
- // so that the newly created remote tab child has the correct usercontextid.
- if (window.arguments) {
- let tabToOpen = window.arguments[0];
- if (tabToOpen instanceof XULElement && tabToOpen.hasAttribute("usercontextid")) {
- initBrowser.setAttribute("usercontextid", tabToOpen.getAttribute("usercontextid"));
- }
- }
-
gBrowser.updateBrowserRemoteness(initBrowser, gMultiProcessBrowser);
});
@@ -1133,13 +1119,6 @@ var gBrowserInit = {
// make sure it has a docshell
gBrowser.docShell;
- // We must set usercontextid before updateBrowserRemoteness()
- // so that the newly created remote tab child has correct usercontextid
- if (tabToOpen.hasAttribute("usercontextid")) {
- let usercontextid = tabToOpen.getAttribute("usercontextid");
- gBrowser.selectedBrowser.setAttribute("usercontextid", usercontextid);
- }
-
// If the browser that we're swapping in was remote, then we'd better
// be able to support remote browsers, and then make our selectedTab
// remote.
@@ -1165,9 +1144,8 @@ var gBrowserInit = {
// [3]: postData (nsIInputStream)
// [4]: allowThirdPartyFixup (bool)
// [5]: referrerPolicy (int)
- // [6]: userContextId (int)
- // [7]: originPrincipal (nsIPrincipal)
- // [8]: triggeringPrincipal (nsIPrincipal)
+ // [6]: originPrincipal (nsIPrincipal)
+ // [7]: triggeringPrincipal (nsIPrincipal)
else if (window.arguments.length >= 3) {
let referrerURI = window.arguments[2];
if (typeof(referrerURI) == "string") {
@@ -1179,13 +1157,11 @@ var gBrowserInit = {
}
let referrerPolicy = (window.arguments[5] != undefined ?
window.arguments[5] : Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT);
- let userContextId = (window.arguments[6] != undefined ?
- window.arguments[6] : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID);
loadURI(uriToLoad, referrerURI, window.arguments[3] || null,
- window.arguments[4] || false, referrerPolicy, userContextId,
+ window.arguments[4] || false, referrerPolicy,
// pass the origin principal (if any) and force its use to create
// an initial about:blank viewer if present:
- window.arguments[7], !!window.arguments[7], window.arguments[8]);
+ window.arguments[6], !!window.arguments[6], window.arguments[7]);
window.focus();
}
// Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
@@ -1277,7 +1253,7 @@ var gBrowserInit = {
// Setup click-and-hold gestures access to the session history
// menus if global click-and-hold isn't turned on
- if (!getBoolPref("ui.click_hold_context_menus", false))
+ if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
let NP = {};
@@ -1338,13 +1314,14 @@ var gBrowserInit = {
FullScreen.init();
PointerLock.init();
- // initialize the sync UI
- gSyncUI.init();
- gFxAccounts.init();
-
if (AppConstants.MOZ_DATA_REPORTING)
gDataNotificationInfoBar.init();
+#ifdef MOZ_SERVICES_SYNC
+ // initialize the sync UI
+ gSyncUI.init();
+#endif
+
gBrowserThumbnails.init();
gMenuButtonBadgeManager.init();
@@ -1478,8 +1455,6 @@ var gBrowserInit = {
FullScreen.uninit();
- gFxAccounts.uninit();
-
Services.obs.removeObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed");
try {
@@ -1640,8 +1615,10 @@ if (AppConstants.platform == "macosx") {
// initialize the private browsing UI
gPrivateBrowsingUI.init();
+#ifdef MOZ_SERVICES_SYNC
// initialize the sync UI
gSyncUI.init();
+#endif
};
gBrowserInit.nonBrowserWindowShutdown = function() {
@@ -1868,7 +1845,7 @@ function BrowserGoHome(aEvent) {
case "tabshifted":
case "tab":
urls = homePage.split("|");
- var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false);
+ var loadInBackground = Services.prefs.getBoolPref("browser.tabs.loadBookmarksInBackground", false);
gBrowser.loadTabs(urls, loadInBackground);
break;
case "window":
@@ -2070,7 +2047,7 @@ function BrowserTryToCloseWindow()
}
function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
- userContextId, originPrincipal, forceAboutBlankViewerInCurrent,
+ originPrincipal, forceAboutBlankViewerInCurrent,
triggeringPrincipal) {
try {
openLinkIn(uri, "current",
@@ -2078,7 +2055,6 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
referrerPolicy: referrerPolicy,
postData: postData,
allowThirdPartyFixup: allowThirdPartyFixup,
- userContextId: userContextId,
originPrincipal,
triggeringPrincipal,
forceAboutBlankViewerInCurrent,
@@ -2613,15 +2589,9 @@ var gMenuButtonUpdateBadge = {
cancelObserverRegistered: false,
init: function () {
- try {
- this.enabled = Services.prefs.getBoolPref("app.update.badge");
- } catch (e) {}
+ this.enabled = Services.prefs.getBoolPref("app.update.badge", false);
if (this.enabled) {
- try {
- this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime");
- } catch (e) {
- this.badgeWaitTime = 345600; // 4 days
- }
+ this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime", 345600); // 4 days
Services.obs.addObserver(this, "update-staged", false);
Services.obs.addObserver(this, "update-downloaded", false);
}
@@ -3094,6 +3064,11 @@ function getWebNavigation()
}
function BrowserReloadWithFlags(reloadFlags) {
+
+ // Reset DOS mitigation for auth prompts when user initiates a reload.
+ let browser = gBrowser.selectedBrowser;
+ delete browser.authPromptCounter;
+
let url = gBrowser.currentURI.spec;
if (gBrowser.updateBrowserRemotenessByURL(gBrowser.selectedBrowser, url)) {
// If the remoteness has changed, the new browser doesn't have any
@@ -3210,12 +3185,14 @@ var PrintPreviewListener = {
this._chromeState.globalNotificationsOpen = !globalNotificationBox.notificationsHidden;
globalNotificationBox.notificationsHidden = true;
+#ifdef MOZ_SERVICES_SYNC
this._chromeState.syncNotificationsOpen = false;
var syncNotifications = document.getElementById("sync-notifications");
if (syncNotifications) {
this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden;
syncNotifications.notificationsHidden = true;
}
+#endif
},
_showChrome: function () {
if (this._chromeState.notificationsOpen)
@@ -3227,8 +3204,10 @@ var PrintPreviewListener = {
if (this._chromeState.globalNotificationsOpen)
document.getElementById("global-notificationbox").notificationsHidden = false;
+#ifdef MOZ_SERVICES_SYNC
if (this._chromeState.syncNotificationsOpen)
document.getElementById("sync-notifications").notificationsHidden = false;
+#endif
if (this._chromeState.sidebarOpen)
SidebarUI.show(this._sidebarCommand);
@@ -3946,66 +3925,6 @@ function updateEditUIVisibility()
}
/**
- * Opens a new tab with the userContextId specified as an attribute of
- * sourceEvent. This attribute is propagated to the top level originAttributes
- * living on the tab's docShell.
- *
- * @param event
- * A click event on a userContext File Menu option
- */
-function openNewUserContextTab(event)
-{
- openUILinkIn(BROWSER_NEW_TAB_URL, "tab", {
- userContextId: parseInt(event.target.getAttribute('data-usercontextid')),
- });
-}
-
-/**
- * Updates File Menu User Context UI visibility depending on
- * privacy.userContext.enabled pref state.
- */
-function updateUserContextUIVisibility()
-{
- let menu = document.getElementById("menu_newUserContext");
- menu.hidden = !Services.prefs.getBoolPref("privacy.userContext.enabled");
- if (PrivateBrowsingUtils.isWindowPrivate(window)) {
- menu.setAttribute("disabled", "true");
- }
-}
-
-/**
- * Updates the User Context UI indicators if the browser is in a non-default context
- */
-function updateUserContextUIIndicator()
-{
- let hbox = document.getElementById("userContext-icons");
-
- let userContextId = gBrowser.selectedBrowser.getAttribute("usercontextid");
- if (!userContextId) {
- hbox.setAttribute("data-identity-color", "");
- hbox.hidden = true;
- return;
- }
-
- let identity = ContextualIdentityService.getIdentityFromId(userContextId);
- if (!identity) {
- hbox.setAttribute("data-identity-color", "");
- hbox.hidden = true;
- return;
- }
-
- hbox.setAttribute("data-identity-color", identity.color);
-
- let label = document.getElementById("userContext-label");
- label.setAttribute("value", ContextualIdentityService.getUserContextLabel(userContextId));
-
- let indicator = document.getElementById("userContext-indicator");
- indicator.setAttribute("data-identity-icon", identity.icon);
-
- hbox.hidden = false;
-}
-
-/**
* Makes the Character Encoding menu enabled or disabled as appropriate.
* To be called when the View menu or the app menu is opened.
*/
@@ -4685,7 +4604,6 @@ nsBrowserAccess.prototype = {
_openURIInNewTab: function(aURI, aReferrer, aReferrerPolicy, aIsPrivate,
aIsExternal, aForceNotRemote=false,
- aUserContextId=Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID,
aOpener = null, aTriggeringPrincipal = null) {
let win, needToFocusWin;
@@ -4714,7 +4632,6 @@ nsBrowserAccess.prototype = {
triggeringPrincipal: aTriggeringPrincipal,
referrerURI: aReferrer,
referrerPolicy: aReferrerPolicy,
- userContextId: aUserContextId,
fromExternal: aIsExternal,
inBackground: loadInBackground,
forceNotRemote: aForceNotRemote,
@@ -4791,13 +4708,10 @@ nsBrowserAccess.prototype = {
// will do the job of shuttling off the newly opened browser to run in
// the right process once it starts loading a URI.
let forceNotRemote = !!aOpener;
- let userContextId = aOpener && aOpener.document
- ? aOpener.document.nodePrincipal.originAttributes.userContextId
- : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID;
let openerWindow = (aFlags & Ci.nsIBrowserDOMWindow.OPEN_NO_OPENER) ? null : aOpener;
let browser = this._openURIInNewTab(aURI, referrer, referrerPolicy,
isPrivate, isExternal,
- forceNotRemote, userContextId,
+ forceNotRemote,
openerWindow, triggeringPrincipal);
if (browser)
newWindow = browser.contentWindow;
@@ -4829,16 +4743,10 @@ nsBrowserAccess.prototype = {
var isExternal = !!(aFlags & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
- var userContextId = aParams.openerOriginAttributes &&
- ("userContextId" in aParams.openerOriginAttributes)
- ? aParams.openerOriginAttributes.userContextId
- : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID
-
let browser = this._openURIInNewTab(aURI, aParams.referrer,
aParams.referrerPolicy,
aParams.isPrivate,
isExternal, false,
- userContextId, null,
aParams.triggeringPrincipal);
if (browser)
return browser.QueryInterface(Ci.nsIFrameLoaderOwner);
@@ -5395,11 +5303,6 @@ function handleLinkClick(event, href, linkNode) {
triggeringPrincipal: doc.nodePrincipal,
};
- // The new tab/window must use the same userContextId
- if (doc.nodePrincipal.originAttributes.userContextId) {
- params.userContextId = doc.nodePrincipal.originAttributes.userContextId;
- }
-
openLinkIn(href, where, params);
event.preventDefault();
return true;
@@ -5471,8 +5374,6 @@ function handleDroppedLink(event, urlOrLinks, name)
let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;
- let userContextId = gBrowser.selectedBrowser.getAttribute("usercontextid");
-
// event is null if links are dropped in content process.
// inBackground should be false, as it's loading into current browser.
let inBackground = false;
@@ -5496,7 +5397,6 @@ function handleDroppedLink(event, urlOrLinks, name)
replace: true,
allowThirdPartyFixup: false,
postDatas,
- userContextId,
});
}
});
@@ -6346,9 +6246,14 @@ function checkEmptyPageOrigin(browser = gBrowser.selectedBrowser,
return ssm.isSystemPrincipal(contentPrincipal);
}
+#ifdef MOZ_SERVICES_SYNC
function BrowserOpenSyncTabs() {
- switchToTabHavingURI("about:sync-tabs", true);
+ if (gSyncUI._needsSetup())
+ gSyncUI.openSetup();
+ else
+ switchToTabHavingURI("about:sync-tabs", true);
}
+#endif
/**
* Format a URL
@@ -7648,8 +7553,6 @@ var TabContextMenu = {
this.contextTab.addEventListener("TabAttrModified", this, false);
aPopupMenu.addEventListener("popuphiding", this, false);
-
- gFxAccounts.updateTabContextMenu(aPopupMenu);
},
handleEvent(aEvent) {
switch (aEvent.type) {
diff --git a/application/basilisk/base/content/browser.xul b/application/basilisk/base/content/browser.xul
index 3208538c1..91299de29 100644
--- a/application/basilisk/base/content/browser.xul
+++ b/application/basilisk/base/content/browser.xul
@@ -8,7 +8,6 @@
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
#ifdef MOZ_DEVTOOLS
<?xml-stylesheet href="chrome://devtools/skin/devtools-browser.css" type="text/css"?>
#endif
@@ -101,11 +100,6 @@
tbattr="tabbrowser-multiple"
oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
<menuseparator id="context_sendTabToDevice_separator" hidden="true"/>
- <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
- accesskey="&sendTabToDevice.accesskey;" hidden="true">
- <menupopup id="context_sendTabToDevicePopupMenu"
- onpopupshowing="gFxAccounts.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
- </menu>
<menuseparator/>
<menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
tbattr="tabbrowser-multiple-visible"
@@ -391,59 +385,6 @@
<tooltip id="dynamic-shortcut-tooltip"
onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
-
- <menupopup id="SyncedTabsSidebarContext">
- <menuitem label="&syncedTabs.context.open.label;"
- accesskey="&syncedTabs.context.open.accesskey;"
- id="syncedTabsOpenSelected" where="current"/>
- <menuitem label="&syncedTabs.context.openInNewTab.label;"
- accesskey="&syncedTabs.context.openInNewTab.accesskey;"
- id="syncedTabsOpenSelectedInTab" where="tab"/>
- <menuitem label="&syncedTabs.context.openInNewWindow.label;"
- accesskey="&syncedTabs.context.openInNewWindow.accesskey;"
- id="syncedTabsOpenSelectedInWindow" where="window"/>
- <menuitem label="&syncedTabs.context.openInNewPrivateWindow.label;"
- accesskey="&syncedTabs.context.openInNewPrivateWindow.accesskey;"
- id="syncedTabsOpenSelectedInPrivateWindow" where="window" private="true"/>
- <menuseparator/>
- <menuitem label="&syncedTabs.context.bookmarkSingleTab.label;"
- accesskey="&syncedTabs.context.bookmarkSingleTab.accesskey;"
- id="syncedTabsBookmarkSelected"/>
- <menuitem label="&syncedTabs.context.copy.label;"
- accesskey="&syncedTabs.context.copy.accesskey;"
- id="syncedTabsCopySelected"/>
- <menuseparator/>
- <menuitem label="&syncSyncNowItem.label;"
- accesskey="&syncSyncNowItem.accesskey;"
- id="syncedTabsRefresh"/>
- </menupopup>
- <menupopup id="SyncedTabsSidebarTabsFilterContext"
- class="textbox-contextmenu">
- <menuitem label="&undoCmd.label;"
- accesskey="&undoCmd.accesskey;"
- cmd="cmd_undo"/>
- <menuseparator/>
- <menuitem label="&cutCmd.label;"
- accesskey="&cutCmd.accesskey;"
- cmd="cmd_cut"/>
- <menuitem label="&copyCmd.label;"
- accesskey="&copyCmd.accesskey;"
- cmd="cmd_copy"/>
- <menuitem label="&pasteCmd.label;"
- accesskey="&pasteCmd.accesskey;"
- cmd="cmd_paste"/>
- <menuitem label="&deleteCmd.label;"
- accesskey="&deleteCmd.accesskey;"
- cmd="cmd_delete"/>
- <menuseparator/>
- <menuitem label="&selectAllCmd.label;"
- accesskey="&selectAllCmd.accesskey;"
- cmd="cmd_selectAll"/>
- <menuseparator/>
- <menuitem label="&syncSyncNowItem.label;"
- accesskey="&syncSyncNowItem.accesskey;"
- id="syncedTabsRefreshFilter"/>
- </menupopup>
</popupset>
#ifdef CAN_DRAW_IN_TITLEBAR
@@ -551,12 +492,7 @@
key="key_undoCloseTab"
label="&undoCloseTab.label;"
observes="History:UndoCloseTab"/>
- <menuseparator id="alltabs-popup-separator-1"/>
- <menu id="alltabs_containersTab"
- label="&newUserContext.label;">
- <menupopup id="alltabs_containersMenuTab" />
- </menu>
- <menuseparator id="alltabs-popup-separator-2"/>
+ <menuseparator id="alltabs-popup-separator"/>
</menupopup>
</toolbarbutton>
@@ -970,6 +906,18 @@
type="checkbox"
label="&fullScreenCmd.label;"
tooltip="dynamic-shortcut-tooltip"/>
+
+#ifdef MOZ_SERVICES_SYNC
+ <toolbarbutton id="sync-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncToolbarButton.label;"
+ oncommand="gSyncUI.handleToolbarButton();"/>>
+
+ <toolbarbutton id="sync-tabs-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncTabsToolbarButton.label;"
+ oncommand="BrowserOpenSyncTabs();"/>
+#endif
</toolbarpalette>
</toolbox>
@@ -997,7 +945,8 @@
contentcontextmenu="contentAreaContextMenu"
autocompletepopup="PopupAutoComplete"
selectmenulist="ContentSelectDropdown"
- datetimepicker="DateTimePickerPanel"/>
+ datetimepicker="DateTimePickerPanel"
+ authdosprotected="true" />
</vbox>
<vbox id="browser-border-end" hidden="true" layer="true"/>
</hbox>
diff --git a/application/basilisk/base/content/content.js b/application/basilisk/base/content/content.js
index 5accbdf7b..d2a70ba11 100644
--- a/application/basilisk/base/content/content.js
+++ b/application/basilisk/base/content/content.js
@@ -162,9 +162,6 @@ var handleContentContextMenu = function (event) {
let selectionInfo = BrowserUtils.getSelectionDetails(content);
- let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
- let userContextId = loadContext.originAttributes.userContextId;
-
if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
let editFlags = SpellCheckHelper.isEditable(event.target, content);
let spellInfo;
@@ -188,7 +185,7 @@ var handleContentContextMenu = function (event) {
principal, docLocation, charSet, baseURI, referrer,
referrerPolicy, contentType, contentDisposition,
frameOuterWindowID, selectionInfo, disableSetDesktopBg,
- loginFillInfo, parentAllowsMixedContent, userContextId },
+ loginFillInfo, parentAllowsMixedContent },
{ event, popupNode: event.target });
}
else {
@@ -212,7 +209,6 @@ var handleContentContextMenu = function (event) {
disableSetDesktopBackground: disableSetDesktopBg,
loginFillInfo,
parentAllowsMixedContent,
- userContextId,
};
}
}
diff --git a/application/basilisk/base/content/global-scripts.inc b/application/basilisk/base/content/global-scripts.inc
index eef21e15e..db8496cfc 100644
--- a/application/basilisk/base/content/global-scripts.inc
+++ b/application/basilisk/base/content/global-scripts.inc
@@ -27,7 +27,6 @@
<script type="application/javascript" src="chrome://browser/content/browser-safebrowsing.js"/>
#endif
<script type="application/javascript" src="chrome://browser/content/browser-sidebar.js"/>
-<script type="application/javascript" src="chrome://browser/content/browser-syncui.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-tabsintitlebar.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-thumbnails.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-trackingprotection.js"/>
@@ -36,4 +35,3 @@
<script type="application/javascript" src="chrome://browser/content/browser-data-submission-info-bar.js"/>
#endif
-<script type="application/javascript" src="chrome://browser/content/browser-fxaccounts.js"/>
diff --git a/application/basilisk/base/content/nsContextMenu.js b/application/basilisk/base/content/nsContextMenu.js
index 3f77dcb90..370e5ba60 100644
--- a/application/basilisk/base/content/nsContextMenu.js
+++ b/application/basilisk/base/content/nsContextMenu.js
@@ -4,7 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
Components.utils.import("resource://gre/modules/LoginManagerContextMenu.jsm");
@@ -113,7 +112,6 @@ nsContextMenu.prototype = {
this.initLeaveDOMFullScreenItems();
this.initClickToPlayItems();
this.initPasswordManagerItems();
- this.initSyncItems();
},
initPageMenuSeparator: function CM_initPageMenuSeparator() {
@@ -142,28 +140,11 @@ nsContextMenu.prototype = {
this.onPlainTextLink = true;
}
- var inContainer = false;
- if (gContextMenuContentData.userContextId) {
- inContainer = true;
- var item = document.getElementById("context-openlinkincontainertab");
-
- item.setAttribute("data-usercontextid", gContextMenuContentData.userContextId);
-
- var label =
- ContextualIdentityService.getUserContextLabel(gContextMenuContentData.userContextId);
- item.setAttribute("label",
- gBrowserBundle.formatStringFromName("userContextOpenLink.label",
- [label], 1));
- }
-
var shouldShow = this.onSaveableLink || isMailtoInternal || this.onPlainTextLink;
var isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
- var showContainers = Services.prefs.getBoolPref("privacy.userContext.enabled");
this.showItem("context-openlink", shouldShow && !isWindowPrivate);
this.showItem("context-openlinkprivate", shouldShow);
- this.showItem("context-openlinkintab", shouldShow && !inContainer);
- this.showItem("context-openlinkincontainertab", shouldShow && inContainer);
- this.showItem("context-openlinkinusercontext-menu", shouldShow && !isWindowPrivate && showContainers);
+ this.showItem("context-openlinkintab", shouldShow);
this.showItem("context-openlinkincurrent", this.onPlainTextLink);
this.showItem("context-sep-open", shouldShow);
},
@@ -540,10 +521,6 @@ nsContextMenu.prototype = {
popup.insertBefore(fragment, insertBeforeElement);
},
- initSyncItems: function() {
- gFxAccounts.initPageContextMenu(this);
- },
-
openPasswordManager: function() {
LoginHelper.openPasswordManager(window, gContextMenuContentData.documentURIObject.host);
},
@@ -958,13 +935,6 @@ nsContextMenu.prototype = {
params[p] = extra[p];
}
- // If we want to change userContextId, we must be sure that we don't
- // propagate the referrer.
- if ("userContextId" in params &&
- params.userContextId != gContextMenuContentData.userContextId) {
- params.noReferrer = true;
- }
-
return params;
},
@@ -982,7 +952,7 @@ nsContextMenu.prototype = {
},
// Open linked-to URL in a new tab.
- openLinkInTab: function(event) {
+ openLinkInTab: function() {
urlSecurityCheck(this.linkURL, this.principal);
let referrerURI = gContextMenuContentData.documentURIObject;
@@ -1003,7 +973,6 @@ nsContextMenu.prototype = {
let params = {
allowMixedContent: persistAllowMixedContentInChildTab,
- userContextId: parseInt(event.target.getAttribute('data-usercontextid')),
};
openLinkIn(this.linkURL, "tab", this._openLinkInParameters(params));
@@ -1779,8 +1748,4 @@ nsContextMenu.prototype = {
menuItem.label = menuLabel;
menuItem.accessKey = gNavigatorBundle.getString("contextMenuSearch.accesskey");
},
- createContainerMenu: function(aEvent) {
- return createUserContextMenu(aEvent, true,
- gContextMenuContentData.userContextId);
- },
};
diff --git a/application/basilisk/base/content/sync/customize.css b/application/basilisk/base/content/sync/customize.css
deleted file mode 100644
index 2bb62595d..000000000
--- a/application/basilisk/base/content/sync/customize.css
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-:root {
- font-size: 80%;
-}
-
-#sync-customize-pane {
- padding-inline-start: 74px;
- background: top left url(chrome://browser/skin/sync-128.png) no-repeat;
- background-size: 64px;
-}
-
-#sync-customize-title {
- margin-inline-start: 0;
- padding-bottom: 0.5em;
- font-weight: bold;
-}
-
-#sync-customize-subtitle {
- font-size: 90%;
-}
-
-checkbox {
- margin: 0;
- padding: 0.5em 0 0;
-}
diff --git a/application/basilisk/base/content/sync/customize.js b/application/basilisk/base/content/sync/customize.js
deleted file mode 100644
index f431ac58c..000000000
--- a/application/basilisk/base/content/sync/customize.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-addEventListener("dialogaccept", function () {
- let pane = document.getElementById("sync-customize-pane");
- // First determine what the preference for the "global" sync enabled pref
- // should be based on the engines selected.
- let prefElts = pane.querySelectorAll("preferences > preference");
- let syncEnabled = false;
- for (let elt of prefElts) {
- if (elt.name.startsWith("services.sync.") && elt.value) {
- syncEnabled = true;
- break;
- }
- }
- Services.prefs.setBoolPref("services.sync.enabled", syncEnabled);
- // and write the individual prefs.
- pane.writePreferences(true);
- window.arguments[0].accepted = true;
-});
diff --git a/application/basilisk/base/content/sync/customize.xul b/application/basilisk/base/content/sync/customize.xul
deleted file mode 100644
index 827edf565..000000000
--- a/application/basilisk/base/content/sync/customize.xul
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.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/. -->
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/sync/customize.css" type="text/css"?>
-
-<!DOCTYPE dialog [
-<!ENTITY % syncCustomizeDTD SYSTEM "chrome://browser/locale/syncCustomize.dtd">
-%syncCustomizeDTD;
-]>
-<dialog id="sync-customize"
- windowtype="Sync:Customize"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- title="&syncCustomize.dialog.title;"
- buttonlabelaccept="&syncCustomize.acceptButton.label;"
- buttons="accept">
-
- <prefpane id="sync-customize-pane">
- <preferences>
- <preference id="engine.bookmarks" name="services.sync.engine.bookmarks" type="bool"/>
- <preference id="engine.history" name="services.sync.engine.history" type="bool"/>
- <preference id="engine.tabs" name="services.sync.engine.tabs" type="bool"/>
- <preference id="engine.passwords" name="services.sync.engine.passwords" type="bool"/>
- <preference id="engine.addons" name="services.sync.engine.addons" type="bool"/>
- <preference id="engine.prefs" name="services.sync.engine.prefs" type="bool"/>
- </preferences>
-
- <label id="sync-customize-title" value="&syncCustomize.title;"/>
- <description id="sync-customize-subtitle"
- value="&syncCustomize.description;"/>
-
- <vbox align="start">
- <checkbox label="&engine.tabs.label;"
- accesskey="&engine.tabs.accesskey;"
- preference="engine.tabs"/>
- <checkbox label="&engine.bookmarks.label;"
- accesskey="&engine.bookmarks.accesskey;"
- preference="engine.bookmarks"/>
- <checkbox label="&engine.passwords.label;"
- accesskey="&engine.passwords.accesskey;"
- preference="engine.passwords"/>
- <checkbox label="&engine.history.label;"
- accesskey="&engine.history.accesskey;"
- preference="engine.history"/>
- <checkbox label="&engine.addons.label;"
- accesskey="&engine.addons.accesskey;"
- preference="engine.addons"/>
- <checkbox label="&engine.prefs.label;"
- accesskey="&engine.prefs.accesskey;"
- preference="engine.prefs"/>
- </vbox>
-
- </prefpane>
-
- <script type="application/javascript"
- src="chrome://browser/content/sync/customize.js" />
-
-</dialog>
diff --git a/application/basilisk/base/content/tab-content.js b/application/basilisk/base/content/tab-content.js
index 6d053dd2b..35ef8ceb2 100644
--- a/application/basilisk/base/content/tab-content.js
+++ b/application/basilisk/base/content/tab-content.js
@@ -9,9 +9,6 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-#ifdef MOZ_WEBEXTENSIONS
-Cu.import("resource://gre/modules/ExtensionContent.jsm");
-#endif
XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
"resource:///modules/E10SUtils.jsm");
@@ -889,41 +886,6 @@ var RefreshBlocker = {
RefreshBlocker.init();
-var UserContextIdNotifier = {
- init() {
- addEventListener("DOMWindowCreated", this);
- },
-
- uninit() {
- removeEventListener("DOMWindowCreated", this);
- },
-
- handleEvent(aEvent) {
- // When the window is created, we want to inform the tabbrowser about
- // the userContextId in use in order to update the UI correctly.
- // Just because we cannot change the userContextId from an active docShell,
- // we don't need to check DOMContentLoaded again.
- this.uninit();
-
- // We use the docShell because content.document can have been loaded before
- // setting the originAttributes.
- let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
- let userContextId = loadContext.originAttributes.userContextId;
-
- sendAsyncMessage("Browser:WindowCreated", { userContextId });
- }
-};
-
-UserContextIdNotifier.init();
-
-#ifdef MOZ_WEBEXTENSIONS
-ExtensionContent.init(this);
-addEventListener("unload", () => {
- ExtensionContent.uninit(this);
- RefreshBlocker.uninit();
-});
-#endif
-
addMessageListener("AllowScriptsToClose", () => {
content.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml
index 043838020..0e819a3ed 100644
--- a/application/basilisk/base/content/tabbrowser.xml
+++ b/application/basilisk/base/content/tabbrowser.xml
@@ -25,7 +25,7 @@
<xul:vbox flex="1" class="browserContainer">
<xul:stack flex="1" class="browserStack" anonid="browserStack">
<xul:browser anonid="initialBrowser" type="content-primary" message="true" messagemanagergroup="browsers"
- xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker"/>
+ xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker,authdosprotected"/>
</xul:stack>
</xul:vbox>
</xul:hbox>
@@ -814,10 +814,8 @@
}
let unifiedComplete = this.mTabBrowser._unifiedComplete;
- let userContextId = this.mBrowser.getAttribute("usercontextid") || 0;
if (this.mBrowser.registeredOpenURI) {
- unifiedComplete.unregisterOpenPage(this.mBrowser.registeredOpenURI,
- userContextId);
+ unifiedComplete.unregisterOpenPage(this.mBrowser.registeredOpenURI);
delete this.mBrowser.registeredOpenURI;
}
// Tabs in private windows aren't registered as "Open" so
@@ -825,7 +823,7 @@
if (!isBlankPageURL(aLocation.spec) &&
(!PrivateBrowsingUtils.isWindowPrivate(window) ||
PrivateBrowsingUtils.permanentPrivateBrowsing)) {
- unifiedComplete.registerOpenPage(aLocation, userContextId);
+ unifiedComplete.registerOpenPage(aLocation);
this.mBrowser.registeredOpenURI = aLocation;
}
}
@@ -1230,7 +1228,6 @@
this._adjustFocusAfterTabSwitch(this.mCurrentTab);
}
- updateUserContextUIIndicator();
gIdentityHandler.updateSharingIndicator();
this.tabContainer._setPositionalAttributes();
@@ -1486,7 +1483,6 @@
var aSkipAnimation;
var aForceNotRemote;
var aNoReferrer;
- var aUserContextId;
var aRelatedBrowser;
var aOriginPrincipal;
var aOpener;
@@ -1507,7 +1503,6 @@
aSkipAnimation = params.skipAnimation;
aForceNotRemote = params.forceNotRemote;
aNoReferrer = params.noReferrer;
- aUserContextId = params.userContextId;
aRelatedBrowser = params.relatedBrowser;
aOriginPrincipal = params.originPrincipal;
aOpener = params.opener;
@@ -1530,7 +1525,6 @@
allowMixedContent: aAllowMixedContent,
forceNotRemote: aForceNotRemote,
noReferrer: aNoReferrer,
- userContextId: aUserContextId,
originPrincipal: aOriginPrincipal,
relatedBrowser: aRelatedBrowser,
opener: aOpener });
@@ -1551,7 +1545,6 @@
let aTargetTab;
let aNewIndex = -1;
let aPostDatas = [];
- let aUserContextId;
if (arguments.length == 2 &&
typeof arguments[1] == "object") {
let params = arguments[1];
@@ -1562,7 +1555,6 @@
aNewIndex = typeof params.newIndex === "number" ?
params.newIndex : aNewIndex;
aPostDatas = params.postDatas || aPostDatas;
- aUserContextId = params.userContextId;
}
if (!aURIs.length)
@@ -1611,8 +1603,7 @@
ownerTab: owner,
skipAnimation: multiple,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- postData: aPostDatas[0],
- userContextId: aUserContextId
+ postData: aPostDatas[0]
});
if (aNewIndex !== -1) {
this.moveTabTo(firstTabAdded, aNewIndex);
@@ -1625,8 +1616,7 @@
let tab = this.addTab(aURIs[i], {
skipAnimation: true,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- postData: aPostDatas[i],
- userContextId: aUserContextId
+ postData: aPostDatas[i]
});
if (targetTabIndex !== -1)
this.moveTabTo(tab, ++tabNum);
@@ -1899,7 +1889,7 @@
<body>
<![CDATA[
// Supported parameters:
- // userContextId, remote, isPreloadBrowser, uriIsAboutBlank, permanentKey
+ // remote, isPreloadBrowser, uriIsAboutBlank, permanentKey
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@@ -1911,10 +1901,6 @@
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
- if (aParams.userContextId) {
- b.setAttribute("usercontextid", aParams.userContextId);
- }
-
if (aParams.remote) {
b.setAttribute("remote", "true");
}
@@ -1936,6 +1922,10 @@
if (this.hasAttribute("datetimepicker")) {
b.setAttribute("datetimepicker", this.getAttribute("datetimepicker"));
}
+
+ if (this.hasAttribute("authdosprotected")) {
+ b.setAttribute("authdosprotected", this.getAttribute("authdosprotected"));
+ }
b.setAttribute("autoscrollpopup", this._autoScrollPopup.id);
@@ -1989,7 +1979,7 @@
"use strict";
// Supported parameters:
- // forceNotRemote, userContextId
+ // forceNotRemote
let uriIsAboutBlank = !aURI || aURI == "about:blank";
@@ -2007,7 +1997,6 @@
// Private windows are not included because both the label and the
// icon for the tab would be set incorrectly (see bug 1195981).
if (aURI == BROWSER_NEW_TAB_URL &&
- !aParams.userContextId &&
!PrivateBrowsingUtils.isWindowPrivate(window)) {
browser = this._getPreloadedBrowser();
if (browser) {
@@ -2021,7 +2010,6 @@
browser = this._createBrowser({permanentKey: aTab.permanentKey,
remote: remote,
uriIsAboutBlank: uriIsAboutBlank,
- userContextId: aParams.userContextId,
relatedBrowser: aParams.relatedBrowser,
opener: aParams.opener});
}
@@ -2096,7 +2084,6 @@
var aAllowMixedContent;
var aForceNotRemote;
var aNoReferrer;
- var aUserContextId;
var aEventDetail;
var aRelatedBrowser;
var aOriginPrincipal;
@@ -2119,7 +2106,6 @@
aAllowMixedContent = params.allowMixedContent;
aForceNotRemote = params.forceNotRemote;
aNoReferrer = params.noReferrer;
- aUserContextId = params.userContextId;
aEventDetail = params.eventDetail;
aRelatedBrowser = params.relatedBrowser;
aOriginPrincipal = params.originPrincipal;
@@ -2146,11 +2132,6 @@
t.setAttribute("label", aURI);
}
- if (aUserContextId) {
- t.setAttribute("usercontextid", aUserContextId);
- ContextualIdentityService.setTabStyle(t);
- }
-
t.setAttribute("crop", "end");
t.setAttribute("onerror", "this.removeAttribute('image');");
@@ -2200,7 +2181,6 @@
// of tab.linkedBrowser.
let browserParams = {
forceNotRemote: aForceNotRemote,
- userContextId: aUserContextId,
relatedBrowser: aRelatedBrowser,
opener: aOpener,
};
@@ -2579,8 +2559,7 @@
listener.destroy();
if (browser.registeredOpenURI && !aAdoptedByTab) {
- this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
@@ -2779,11 +2758,6 @@
if (ourBrowser.isRemoteBrowser != otherBrowser.isRemoteBrowser)
return;
- // Keep the userContextId if set on other browser
- if (otherBrowser.hasAttribute("usercontextid")) {
- ourBrowser.setAttribute("usercontextid", otherBrowser.getAttribute("usercontextid"));
- }
-
// That's gBrowser for the other window, not the tab's browser!
var remoteBrowser = aOtherTab.ownerDocument.defaultView.gBrowser;
var isPending = aOtherTab.hasAttribute("pending");
@@ -2816,10 +2790,6 @@
aOurTab.setAttribute("soundplaying", "true");
modifiedAttrs.push("soundplaying");
}
- if (aOtherTab.hasAttribute("usercontextid")) {
- aOurTab.setUserContextId(aOtherTab.getAttribute("usercontextid"));
- modifiedAttrs.push("usercontextid");
- }
if (aOtherTab.hasAttribute("sharing")) {
aOurTab.setAttribute("sharing", aOtherTab.getAttribute("sharing"));
modifiedAttrs.push("sharing");
@@ -2957,8 +2927,7 @@
<![CDATA[
// If the current URI is registered as open remove it from the list.
if (aOurBrowser.registeredOpenURI) {
- this._unifiedComplete.unregisterOpenPage(aOurBrowser.registeredOpenURI,
- aOurBrowser.getAttribute("usercontextid") || 0);
+ this._unifiedComplete.unregisterOpenPage(aOurBrowser.registeredOpenURI);
delete aOurBrowser.registeredOpenURI;
}
@@ -2991,7 +2960,10 @@
<parameter name="aTab"/>
<body>
<![CDATA[
- this.getBrowserForTab(aTab).reload();
+ let browser = this.getBrowserForTab(aTab);
+ // Reset DOS mitigation for basic auth prompt
+ delete browser.authPromptCounter;
+ browser.reload();
]]>
</body>
</method>
@@ -3295,10 +3267,6 @@
// it in the other window (making it seem to have moved between
// windows).
let params = { eventDetail: { adoptedTab: aTab } };
- if (aTab.hasAttribute("usercontextid")) {
- // new tab must have the same usercontextid as the old one
- params.userContextId = aTab.getAttribute("usercontextid");
- }
let newTab = this.addTab("about:blank", params);
let newBrowser = this.getBrowserForTab(newTab);
let newURL = aTab.linkedBrowser.currentURI.spec;
@@ -4167,11 +4135,7 @@
return true;
if (this._logInit)
return this._shouldLog;
- let result = false;
- try {
- result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming");
- } catch (ex) {
- }
+ let result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming", false);
this._shouldLog = result;
this._logInit = true;
return this._shouldLog;
@@ -4618,7 +4582,6 @@
disableSetDesktopBackground: data.disableSetDesktopBg,
loginFillInfo: data.loginFillInfo,
parentAllowsMixedContent: data.parentAllowsMixedContent,
- userContextId: data.userContextId,
};
let popup = browser.ownerDocument.getElementById("contentAreaContextMenu");
let event = gContextMenuContentData.event;
@@ -4645,17 +4608,6 @@
}
case "Browser:WindowCreated": {
let tab = this.getTabForBrowser(browser);
- if (tab && data.userContextId) {
- ContextualIdentityService.telemetry(data.userContextId);
- tab.setUserContextId(data.userContextId);
- }
-
- // We don't want to update the container icon and identifier if
- // this is not the selected browser.
- if (browser == gBrowser.selectedBrowser) {
- updateUserContextUIIndicator();
- }
-
break;
}
case "Findbar:Keypress": {
@@ -4838,8 +4790,7 @@
for (let tab of this.tabs) {
let browser = tab.linkedBrowser;
if (browser.registeredOpenURI) {
- this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
let filter = this._tabFilters.get(tab);
@@ -5240,7 +5191,7 @@
</xul:arrowscrollbox>
</content>
- <implementation implements="nsIDOMEventListener, nsIObserver">
+ <implementation implements="nsIDOMEventListener">
<constructor>
<![CDATA[
this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
@@ -5253,23 +5204,11 @@
window.addEventListener("resize", this, false);
window.addEventListener("load", this, false);
- try {
- this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled");
- } catch (ex) {
- this._tabAnimationLoggingEnabled = false;
- }
+ this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled", false);
this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled");
- this.observe(null, "nsPref:changed", "privacy.userContext.enabled");
- Services.prefs.addObserver("privacy.userContext.enabled", this, false);
]]>
</constructor>
- <destructor>
- <![CDATA[
- Services.prefs.removeObserver("privacy.userContext.enabled", this);
- ]]>
- </destructor>
-
<field name="tabbrowser" readonly="true">
document.getElementById(this.getAttribute("tabbrowser"));
</field>
@@ -5295,55 +5234,6 @@
<field name="_afterHoveredTab">null</field>
<field name="_hoveredTab">null</field>
- <method name="observe">
- <parameter name="aSubject"/>
- <parameter name="aTopic"/>
- <parameter name="aData"/>
- <body><![CDATA[
- switch (aTopic) {
- case "nsPref:changed":
- // This is the only pref observed.
- let containersEnabled = Services.prefs.getBoolPref("privacy.userContext.enabled");
-
- const newTab = document.getElementById("new-tab-button");
- const newTab2 = document.getAnonymousElementByAttribute(this, "anonid", "tabs-newtab-button")
-
- if (containersEnabled) {
- for (let parent of [newTab, newTab2]) {
- if (!parent)
- continue;
- let popup = document.createElementNS(
- "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
- "menupopup");
- if (parent.id) {
- popup.id = "newtab-popup";
- } else {
- popup.setAttribute("anonid", "newtab-popup");
- }
- popup.className = "new-tab-popup";
- popup.setAttribute("position", "after_end");
- parent.appendChild(popup);
-
- gClickAndHoldListenersOnElement.add(parent);
- parent.setAttribute("type", "menu");
- }
- } else {
- for (let parent of [newTab, newTab2]) {
- if (!parent)
- continue;
- gClickAndHoldListenersOnElement.remove(parent);
- parent.removeAttribute("type");
- if (!parent.firstChild)
- continue;
- parent.firstChild.remove();
- }
- }
-
- break;
- }
- ]]></body>
- </method>
-
<property name="_isCustomizing" readonly="true">
<getter>
let root = document.documentElement;
@@ -6444,7 +6334,6 @@
inBackground = !inBackground;
let targetTab = this._getDragTargetTab(event, true);
- let userContextId = this.selectedItem.getAttribute("usercontextid");
let replace = !!targetTab;
let newIndex = this._getDropIndex(event, true);
let urls = links.map(link => link.url);
@@ -6454,7 +6343,6 @@
allowThirdPartyFixup: true,
targetTab,
newIndex,
- userContextId,
});
}
@@ -6715,14 +6603,6 @@
-->
<field name="muteReason">undefined</field>
- <property name="userContextId" readonly="true">
- <getter>
- return this.hasAttribute("usercontextid")
- ? parseInt(this.getAttribute("usercontextid"))
- : 0;
- </getter>
- </property>
-
<property name="soundPlaying" readonly="true">
<getter>
return this.getAttribute("soundplaying") == "true";
@@ -6850,27 +6730,6 @@
]]>
</body>
</method>
-
- <method name="setUserContextId">
- <parameter name="aUserContextId"/>
- <body>
- <![CDATA[
- if (aUserContextId) {
- if (this.linkedBrowser) {
- this.linkedBrowser.setAttribute("usercontextid", aUserContextId);
- }
- this.setAttribute("usercontextid", aUserContextId);
- } else {
- if (this.linkedBrowser) {
- this.linkedBrowser.removeAttribute("usercontextid");
- }
- this.removeAttribute("usercontextid");
- }
-
- ContextualIdentityService.setTabStyle(this);
- ]]>
- </body>
- </method>
</implementation>
<handlers>
@@ -7047,30 +6906,9 @@
<handlers>
<handler event="popupshowing">
<![CDATA[
- if (event.target.getAttribute("id") == "alltabs_containersMenuTab") {
- createUserContextMenu(event);
- return;
- }
-
- let containersEnabled = Services.prefs.getBoolPref("privacy.userContext.enabled");
-
- if (event.target.getAttribute("anonid") == "newtab-popup" ||
- event.target.id == "newtab-popup") {
- createUserContextMenu(event);
- } else {
- document.getElementById("alltabs-popup-separator-1").hidden = !containersEnabled;
- let containersTab = document.getElementById("alltabs_containersTab");
-
- containersTab.hidden = !containersEnabled;
- if (PrivateBrowsingUtils.isWindowPrivate(window)) {
- containersTab.setAttribute("disabled", "true");
- }
-
document.getElementById("alltabs_undoCloseTab").disabled =
SessionStore.getClosedTabCount(window) == 0;
- var tabcontainer = gBrowser.tabContainer;
-
// Listen for changes in the tab bar.
tabcontainer.addEventListener("TabAttrModified", this, false);
tabcontainer.addEventListener("TabClose", this, false);
@@ -7087,9 +6925,6 @@
<handler event="popuphidden">
<![CDATA[
- if (event.target.getAttribute("id") == "alltabs_containersMenuTab") {
- return;
- }
// clear out the menu popup and remove the listeners
for (let i = this.childNodes.length - 1; i > 0; i--) {
@@ -7098,9 +6933,6 @@
menuItem.tab.mCorrespondingMenuitem = null;
this.removeChild(menuItem);
}
- if (menuItem.hasAttribute("usercontextid")) {
- this.removeChild(menuItem);
- }
}
var tabcontainer = gBrowser.tabContainer;
tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
diff --git a/application/basilisk/base/content/urlbarBindings.xml b/application/basilisk/base/content/urlbarBindings.xml
index eb3150581..b9c17818a 100644
--- a/application/basilisk/base/content/urlbarBindings.xml
+++ b/application/basilisk/base/content/urlbarBindings.xml
@@ -56,11 +56,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<field name="AppConstants" readonly="true">
(Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants;
</field>
-#ifdef MOZ_WEBEXTENSIONS
- <field name="ExtensionSearchHandler" readonly="true">
- (Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler;
- </field>
-#endif
<constructor><![CDATA[
this._prefs = Components.classes["@mozilla.org/preferences-service;1"]
@@ -488,15 +483,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
actionDetails
);
break;
-#ifdef MOZ_WEBEXTENSIONS
- case "extension":
- this.handleRevert();
- // Give the extension control of handling the command.
- let searchString = action.params.content;
- let keyword = action.params.keyword;
- this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where);
- return;
-#endif
}
} else {
// This is a fallback for add-ons and old testing code that directly
@@ -554,6 +540,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
Cu.reportError(ex);
}
+ // Reset DOS mitigations for the basic auth prompt.
+ delete browser.authPromptCounter;
+
let params = {
postData,
allowThirdPartyFixup: true,
@@ -1214,11 +1203,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
this._clearNoActions();
this.formatValue();
}
-#ifdef MOZ_WEBEXTENSIONS
- if (ExtensionSearchHandler.hasActiveInputSession()) {
- ExtensionSearchHandler.handleInputCancelled();
- }
-#endif
]]></handler>
<handler event="dragstart" phase="capturing"><![CDATA[
diff --git a/application/basilisk/base/content/utilityOverlay.js b/application/basilisk/base/content/utilityOverlay.js
index 38ca82f55..f3ebf3b7e 100644
--- a/application/basilisk/base/content/utilityOverlay.js
+++ b/application/basilisk/base/content/utilityOverlay.js
@@ -5,7 +5,6 @@
// Services = object with smart getters for common XPCOM services
Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
@@ -61,16 +60,6 @@ function openTopWin(url) {
openUILinkIn(url, "current");
}
-function getBoolPref(prefname, def)
-{
- try {
- return Services.prefs.getBoolPref(prefname);
- }
- catch (er) {
- return def;
- }
-}
-
/* openUILink handles clicks on UI elements that cause URLs to load.
*
* As the third argument, you may pass an object with the same properties as
@@ -137,7 +126,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
// ignoreButton allows "middle-click paste" to use function without always opening in a new window.
var middle = !ignoreButton && e.button == 1;
- var middleUsesTabs = getBoolPref("browser.tabs.opentabfor.middleclick", true);
+ var middleUsesTabs = Services.prefs.getBoolPref("browser.tabs.opentabfor.middleclick", true);
// Don't do anything special with right-mouse clicks. They're probably clicks on context menu items.
@@ -145,7 +134,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
if (metaKey || (middle && middleUsesTabs))
return shift ? "tabshifted" : "tab";
- if (alt && getBoolPref("browser.altClickSave", false))
+ if (alt && Services.prefs.getBoolPref("browser.altClickSave", false))
return "save";
if (shift || (middle && !middleUsesTabs))
@@ -176,7 +165,6 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
* skipTabAnimation (boolean)
* allowPinnedTabHostChange (boolean)
* allowPopups (boolean)
- * userContextId (unsigned int)
*/
function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI) {
var params;
@@ -222,7 +210,6 @@ function openLinkIn(url, where, params) {
var aAllowPinnedTabHostChange = !!params.allowPinnedTabHostChange;
var aNoReferrer = params.noReferrer;
var aAllowPopups = !!params.allowPopups;
- var aUserContextId = params.userContextId;
var aIndicateErrorPageLoad = params.indicateErrorPageLoad;
var aPrincipal = params.originPrincipal;
var aTriggeringPrincipal = params.triggeringPrincipal;
@@ -268,7 +255,6 @@ function openLinkIn(url, where, params) {
function useOAForPrincipal(principal) {
if (principal && principal.isCodebasePrincipal) {
let attrs = {
- userContextId: aUserContextId,
privateBrowsingId: aIsPrivate || (w && PrivateBrowsingUtils.isWindowPrivate(w)),
};
return Services.scriptSecurityManager.createCodebasePrincipal(principal.URI, attrs);
@@ -315,17 +301,12 @@ function openLinkIn(url, where, params) {
createInstance(Ci.nsISupportsPRUint32);
referrerPolicySupports.data = aReferrerPolicy;
- var userContextIdSupports = Cc["@mozilla.org/supports-PRUint32;1"].
- createInstance(Ci.nsISupportsPRUint32);
- userContextIdSupports.data = aUserContextId;
-
sa.appendElement(wuri, /* weak =*/ false);
sa.appendElement(charset, /* weak =*/ false);
sa.appendElement(referrerURISupports, /* weak =*/ false);
sa.appendElement(aPostData, /* weak =*/ false);
sa.appendElement(allowThirdPartyFixupSupports, /* weak =*/ false);
sa.appendElement(referrerPolicySupports, /* weak =*/ false);
- sa.appendElement(userContextIdSupports, /* weak =*/ false);
sa.appendElement(aPrincipal, /* weak =*/ false);
sa.appendElement(aTriggeringPrincipal, /* weak =*/ false);
@@ -342,7 +323,7 @@ function openLinkIn(url, where, params) {
if (loadInBackground == null) {
loadInBackground = aFromChrome ?
false :
- getBoolPref("browser.tabs.loadInBackground");
+ Services.prefs.getBoolPref("browser.tabs.loadInBackground");
}
let uriObj;
@@ -418,8 +399,7 @@ function openLinkIn(url, where, params) {
flags: flags,
referrerURI: aNoReferrer ? null : aReferrerURI,
referrerPolicy: aReferrerPolicy,
- postData: aPostData,
- userContextId: aUserContextId
+ postData: aPostData
});
browserUsedForLoad = aCurrentBrowser;
break;
@@ -438,7 +418,6 @@ function openLinkIn(url, where, params) {
skipAnimation: aSkipTabAnimation,
allowMixedContent: aAllowMixedContent,
noReferrer: aNoReferrer,
- userContextId: aUserContextId,
originPrincipal: aPrincipal,
triggeringPrincipal: aTriggeringPrincipal,
});
@@ -482,74 +461,6 @@ function checkForMiddleClick(node, event) {
}
}
-// Populate a menu with user-context menu items. This method should be called
-// by onpopupshowing passing the event as first argument.
-function createUserContextMenu(event, isContextMenu = false, excludeUserContextId = 0) {
- while (event.target.hasChildNodes()) {
- event.target.removeChild(event.target.firstChild);
- }
-
- let bundle = document.getElementById("bundle_browser");
- let docfrag = document.createDocumentFragment();
-
- // If we are excluding a userContextId, we want to add a 'no-container' item.
- if (excludeUserContextId) {
- let menuitem = document.createElement("menuitem");
- menuitem.setAttribute("data-usercontextid", "0");
- menuitem.setAttribute("label", bundle.getString("userContextNone.label"));
- menuitem.setAttribute("accesskey", bundle.getString("userContextNone.accesskey"));
-
- // We don't set an oncommand/command attribute because if we have
- // to exclude a userContextId we are generating the contextMenu and
- // isContextMenu will be true.
-
- docfrag.appendChild(menuitem);
-
- let menuseparator = document.createElement("menuseparator");
- docfrag.appendChild(menuseparator);
- }
-
- ContextualIdentityService.getIdentities().forEach(identity => {
- if (identity.userContextId == excludeUserContextId) {
- return;
- }
-
- let menuitem = document.createElement("menuitem");
- menuitem.setAttribute("data-usercontextid", identity.userContextId);
- menuitem.setAttribute("label", ContextualIdentityService.getUserContextLabel(identity.userContextId));
-
- if (identity.accessKey) {
- menuitem.setAttribute("accesskey", bundle.getString(identity.accessKey));
- }
-
- menuitem.classList.add("menuitem-iconic");
- menuitem.setAttribute("data-identity-color", identity.color);
-
- if (!isContextMenu) {
- menuitem.setAttribute("command", "Browser:NewUserContextTab");
- }
-
- menuitem.setAttribute("data-identity-icon", identity.icon);
-
- docfrag.appendChild(menuitem);
- });
-
- if (!isContextMenu) {
- docfrag.appendChild(document.createElement("menuseparator"));
-
- let menuitem = document.createElement("menuitem");
- menuitem.setAttribute("label",
- bundle.getString("userContext.aboutPage.label"));
- menuitem.setAttribute("accesskey",
- bundle.getString("userContext.aboutPage.accesskey"));
- menuitem.setAttribute("command", "Browser:OpenAboutContainers");
- docfrag.appendChild(menuitem);
- }
-
- event.target.appendChild(docfrag);
- return true;
-}
-
// Closes all popups that are ancestors of the node.
function closeMenus(node)
{
@@ -652,7 +563,7 @@ function getShellService()
function isBidiEnabled() {
// first check the pref.
- if (getBoolPref("bidi.browser.ui", false))
+ if (Services.prefs.getBoolPref("bidi.browser.ui", false))
return true;
// then check intl.uidirection.<locale>
@@ -914,7 +825,7 @@ function openHelpLink(aHelpTopic, aCalledFromModal, aWhere) {
function openPrefsHelp() {
// non-instant apply prefwindows are usually modal, so we can't open in the topmost window,
// since its probably behind the window.
- var instantApply = getBoolPref("browser.preferences.instantApply");
+ var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
var helpTopic = document.getElementsByTagName("prefwindow")[0].currentPane.helpTopic;
openHelpLink(helpTopic, !instantApply);
diff --git a/application/basilisk/base/content/web-panels.xul b/application/basilisk/base/content/web-panels.xul
index ed868c24a..78f8954c1 100644
--- a/application/basilisk/base/content/web-panels.xul
+++ b/application/basilisk/base/content/web-panels.xul
@@ -23,7 +23,6 @@
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
- <script type="application/javascript" src="chrome://browser/content/browser-fxaccounts.js"/>
<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
<script type="application/javascript" src="chrome://browser/content/web-panels.js"/>
diff --git a/application/basilisk/base/jar.mn b/application/basilisk/base/jar.mn
index c288685b9..72061a622 100644
--- a/application/basilisk/base/jar.mn
+++ b/application/basilisk/base/jar.mn
@@ -15,7 +15,6 @@ browser.jar:
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
content/browser/aboutDialog.js (content/aboutDialog.js)
content/browser/aboutDialog.css (content/aboutDialog.css)
- content/browser/aboutRobots.xhtml (content/aboutRobots.xhtml)
* content/browser/abouthome/aboutHome.xhtml (content/abouthome/aboutHome.xhtml)
content/browser/abouthome/aboutHome.js (content/abouthome/aboutHome.js)
* content/browser/abouthome/aboutHome.css (content/abouthome/aboutHome.css)
@@ -25,7 +24,9 @@ browser.jar:
content/browser/abouthome/bookmarks.png (content/abouthome/bookmarks.png)
content/browser/abouthome/history.png (content/abouthome/history.png)
content/browser/abouthome/addons.png (content/abouthome/addons.png)
+#ifdef MOZ_SERVICES_SYNC
content/browser/abouthome/sync.png (content/abouthome/sync.png)
+#endif
content/browser/abouthome/settings.png (content/abouthome/settings.png)
content/browser/abouthome/restore.png (content/abouthome/restore.png)
content/browser/abouthome/restore-large.png (content/abouthome/restore-large.png)
@@ -36,7 +37,9 @@ browser.jar:
content/browser/abouthome/bookmarks@2x.png (content/abouthome/bookmarks@2x.png)
content/browser/abouthome/history@2x.png (content/abouthome/history@2x.png)
content/browser/abouthome/addons@2x.png (content/abouthome/addons@2x.png)
+#ifdef MOZ_SERVICES_SYNC
content/browser/abouthome/sync@2x.png (content/abouthome/sync@2x.png)
+#endif
content/browser/abouthome/settings@2x.png (content/abouthome/settings@2x.png)
content/browser/abouthome/restore@2x.png (content/abouthome/restore@2x.png)
content/browser/abouthome/restore-large@2x.png (content/abouthome/restore-large@2x.png)
@@ -49,18 +52,6 @@ browser.jar:
content/browser/abouthealthreport/abouthealth.js (content/abouthealthreport/abouthealth.js)
content/browser/abouthealthreport/abouthealth.css (content/abouthealthreport/abouthealth.css)
#endif
- content/browser/aboutaccounts/aboutaccounts.xhtml (content/aboutaccounts/aboutaccounts.xhtml)
- content/browser/aboutaccounts/aboutaccounts.js (content/aboutaccounts/aboutaccounts.js)
- content/browser/aboutaccounts/aboutaccounts.css (content/aboutaccounts/aboutaccounts.css)
- content/browser/aboutaccounts/main.css (content/aboutaccounts/main.css)
- content/browser/aboutaccounts/normalize.css (content/aboutaccounts/normalize.css)
- content/browser/aboutaccounts/images/fox.png (content/aboutaccounts/images/fox.png)
- content/browser/aboutaccounts/images/graphic_sync_intro.png (content/aboutaccounts/images/graphic_sync_intro.png)
- content/browser/aboutaccounts/images/graphic_sync_intro@2x.png (content/aboutaccounts/images/graphic_sync_intro@2x.png)
-
-
- content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
- content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css)
content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
@@ -76,17 +67,15 @@ browser.jar:
content/browser/browser-feeds.js (content/browser-feeds.js)
content/browser/browser-fullScreenAndPointerLock.js (content/browser-fullScreenAndPointerLock.js)
content/browser/browser-fullZoom.js (content/browser-fullZoom.js)
- content/browser/browser-fxaccounts.js (content/browser-fxaccounts.js)
content/browser/browser-gestureSupport.js (content/browser-gestureSupport.js)
* content/browser/browser-media.js (content/browser-media.js)
- content/browser/browser-places.js (content/browser-places.js)
+* content/browser/browser-places.js (content/browser-places.js)
content/browser/browser-plugins.js (content/browser-plugins.js)
content/browser/browser-refreshblocker.js (content/browser-refreshblocker.js)
#ifdef MOZ_SAFE_BROWSING
content/browser/browser-safebrowsing.js (content/browser-safebrowsing.js)
#endif
content/browser/browser-sidebar.js (content/browser-sidebar.js)
-* content/browser/browser-syncui.js (content/browser-syncui.js)
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
#ifdef CAN_DRAW_IN_TITLEBAR
content/browser/browser-tabsintitlebar.js (content/browser-tabsintitlebar.js)
@@ -95,7 +84,7 @@ browser.jar:
#endif
content/browser/browser-thumbnails.js (content/browser-thumbnails.js)
content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js)
-* content/browser/tab-content.js (content/tab-content.js)
+ content/browser/tab-content.js (content/tab-content.js)
content/browser/content.js (content/content.js)
content/browser/defaultthemes/1.footer.jpg (content/defaultthemes/1.footer.jpg)
content/browser/defaultthemes/1.header.jpg (content/defaultthemes/1.header.jpg)
@@ -135,23 +124,6 @@ browser.jar:
content/browser/pageinfo/feeds.xml (content/pageinfo/feeds.xml)
content/browser/pageinfo/permissions.js (content/pageinfo/permissions.js)
content/browser/pageinfo/security.js (content/pageinfo/security.js)
- content/browser/sync/aboutSyncTabs.xul (content/sync/aboutSyncTabs.xul)
-* content/browser/sync/aboutSyncTabs.js (content/sync/aboutSyncTabs.js)
- content/browser/sync/aboutSyncTabs.css (content/sync/aboutSyncTabs.css)
- content/browser/sync/aboutSyncTabs-bindings.xml (content/sync/aboutSyncTabs-bindings.xml)
- content/browser/sync/setup.xul (content/sync/setup.xul)
- content/browser/sync/addDevice.js (content/sync/addDevice.js)
- content/browser/sync/addDevice.xul (content/sync/addDevice.xul)
- content/browser/sync/setup.js (content/sync/setup.js)
- content/browser/sync/genericChange.xul (content/sync/genericChange.xul)
- content/browser/sync/genericChange.js (content/sync/genericChange.js)
- content/browser/sync/key.xhtml (content/sync/key.xhtml)
- content/browser/sync/utils.js (content/sync/utils.js)
- content/browser/sync/customize.xul (content/sync/customize.xul)
- content/browser/sync/customize.js (content/sync/customize.js)
- content/browser/sync/customize.css (content/sync/customize.css)
- content/browser/sync/quota.xul (content/sync/quota.xul)
- content/browser/sync/quota.js (content/sync/quota.js)
content/browser/safeMode.css (content/safeMode.css)
content/browser/safeMode.js (content/safeMode.js)
content/browser/safeMode.xul (content/safeMode.xul)
@@ -163,7 +135,7 @@ browser.jar:
content/browser/contentSearchUI.css (content/contentSearchUI.css)
content/browser/tabbrowser.css (content/tabbrowser.css)
content/browser/tabbrowser.xml (content/tabbrowser.xml)
-* content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
+ content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
content/browser/utilityOverlay.js (content/utilityOverlay.js)
content/browser/usercontext.svg (content/usercontext.svg)
content/browser/web-panels.js (content/web-panels.js)
diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc
index fb0e6b79b..307d889d9 100644
--- a/application/basilisk/branding/shared/uaoverrides.inc
+++ b/application/basilisk/branding/shared/uaoverrides.inc
@@ -26,6 +26,7 @@ pref("@GUAO_PREF@.addons.mozilla.org", "Mozilla/5.0 (@OS_SLICE@ rv:@GK_VERSION@)
// Required for domains that have proven unresponsive to requests from users
pref("@GUAO_PREF@.youtube.com","Mozilla/5.0 (@OS_SLICE@ rv:42.0) @GK_SLICE@ Firefox/42.0 @APP_SLICE@");
pref("@GUAO_PREF@.gaming.youtube.com","Mozilla/5.0 (@OS_SLICE@ rv:42.0) @GK_SLICE@ Firefox/42.0");
+pref("@GUAO_PREF@.netflix.com","Mozilla/5.0 (@OS_SLICE@ rv:42.0) @GK_SLICE@ Firefox/42.0 @APP_SLICE@");
// The never-ending Facebook debacle...
@@ -36,6 +37,7 @@ pref("@GUAO_PREF@.dailymotion.com","Mozilla/5.0 (@OS_SLICE@ rv:52.0) @GK_SLICE@
// The following requires native mode. Or it blocks.. "too old firefox", breakage, etc.
// UA-Sniffing domains below have indicated no interest in supporting Pale Moon (BOO!)
+pref("@GUAO_PREF@.whatsapp.com","Mozilla/5.0 (@OS_SLICE@ rv:61.0) @GK_SLICE@ Firefox/61.0");
// UA-sniffing domains that are "app/vendor-specific" and do not like Pale Moon
diff --git a/application/basilisk/components/about/AboutRedirector.cpp b/application/basilisk/components/about/AboutRedirector.cpp
index b77949ea7..d52b063e2 100644
--- a/application/basilisk/components/about/AboutRedirector.cpp
+++ b/application/basilisk/components/about/AboutRedirector.cpp
@@ -80,11 +80,6 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::ALLOW_SCRIPT
},
{
- "robots", "chrome://browser/content/aboutRobots.xhtml",
- nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
- nsIAboutModule::ALLOW_SCRIPT
- },
- {
"searchreset", "chrome://browser/content/search/searchReset.xhtml",
nsIAboutModule::ALLOW_SCRIPT |
nsIAboutModule::HIDE_FROM_ABOUTABOUT
@@ -97,10 +92,16 @@ static RedirEntry kRedirMap[] = {
"welcomeback", "chrome://browser/content/aboutWelcomeBack.xhtml",
nsIAboutModule::ALLOW_SCRIPT
},
+#ifdef MOZ_SERVICES_SYNC
+ {
+ "sync-progress", "chrome://browser/content/sync/progress.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
{
"sync-tabs", "chrome://browser/content/sync/aboutSyncTabs.xul",
nsIAboutModule::ALLOW_SCRIPT
},
+#endif
{ "home", "chrome://browser/content/abouthome/aboutHome.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
@@ -128,10 +129,6 @@ static RedirEntry kRedirMap[] = {
},
#endif
{
- "accounts", "chrome://browser/content/aboutaccounts/aboutaccounts.xhtml",
- nsIAboutModule::ALLOW_SCRIPT
- },
- {
"reader", "chrome://global/content/reader/aboutReader.html",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT |
diff --git a/application/basilisk/components/build/nsModule.cpp b/application/basilisk/components/build/nsModule.cpp
index 1baccd710..3fdde8823 100644
--- a/application/basilisk/components/build/nsModule.cpp
+++ b/application/basilisk/components/build/nsModule.cpp
@@ -94,16 +94,17 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
- { NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "searchreset", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "welcomeback", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+#ifdef MOZ_SERVICES_SYNC
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-tabs", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-progress", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+#endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "newtab", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "preferences", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "downloads", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
- { NS_ABOUT_MODULE_CONTRACTID_PREFIX "accounts", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
#ifdef MOZ_SERVICES_HEALTHREPORT
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "healthreport", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
#endif
diff --git a/application/basilisk/components/contextualidentity/content/usercontext.css b/application/basilisk/components/contextualidentity/content/usercontext.css
deleted file mode 100644
index 728275d9f..000000000
--- a/application/basilisk/components/contextualidentity/content/usercontext.css
+++ /dev/null
@@ -1,91 +0,0 @@
-[data-identity-color="blue"] {
- --identity-tab-color: #0996f8;
- --identity-icon-color: #00a7e0;
-}
-
-[data-identity-color="turquoise"] {
- --identity-tab-color: #01bdad;
- --identity-icon-color: #01bdad;
-}
-
-[data-identity-color="green"] {
- --identity-tab-color: #57bd35;
- --identity-icon-color: #7dc14c;
-}
-
-[data-identity-color="yellow"] {
- --identity-tab-color: #ffcb00;
- --identity-icon-color: #ffcb00;
-}
-
-[data-identity-color="orange"] {
- --identity-tab-color: #ff9216;
- --identity-icon-color: #ff9216;
-}
-
-[data-identity-color="red"] {
- --identity-tab-color: #d92215;
- --identity-icon-color: #d92215;
-}
-
-[data-identity-color="pink"] {
- --identity-tab-color: #ea385e;
- --identity-icon-color: #ee5195;
-}
-
-[data-identity-color="purple"] {
- --identity-tab-color: #7a2f7a;
- --identity-icon-color: #7a2f7a;
-}
-
-[data-identity-icon="fingerprint"] {
- --identity-icon: url("chrome://browser/content/usercontext.svg#fingerprint");
-}
-
-[data-identity-icon="briefcase"] {
- --identity-icon: url("chrome://browser/content/usercontext.svg#briefcase");
-}
-
-[data-identity-icon="dollar"] {
- --identity-icon: url("chrome://browser/content/usercontext.svg#dollar");
-}
-
-[data-identity-icon="cart"] {
- --identity-icon: url("chrome://browser/content/usercontext.svg#cart");
-}
-
-[data-identity-icon="circle"] {
- --identity-icon: url("chrome://browser/content/usercontext.svg#circle");
-}
-
-#userContext-indicator {
- height: 16px;
- width: 16px;
-}
-
-#userContext-label {
- margin-inline-end: 3px;
- color: var(--identity-tab-color);
-}
-
-#userContext-icons {
- -moz-box-align: center;
-}
-
-.tabbrowser-tab[usercontextid] {
- background-image: linear-gradient(to right, transparent 20%, var(--identity-tab-color) 30%, var(--identity-tab-color) 70%, transparent 80%);
- background-size: auto 2px;
- background-repeat: no-repeat;
-}
-
-.userContext-icon,
-.menuitem-iconic[data-usercontextid] > .menu-iconic-left > .menu-iconic-icon,
-.subviewbutton[usercontextid] > .toolbarbutton-icon,
-#userContext-indicator {
- background-image: var(--identity-icon);
- filter: url(chrome://browser/skin/filters.svg#fill);
- fill: var(--identity-icon-color);
- background-size: contain;
- background-repeat: no-repeat;
- background-position: center center;
-}
diff --git a/application/basilisk/components/contextualidentity/jar.mn b/application/basilisk/components/contextualidentity/jar.mn
deleted file mode 100644
index 848245949..000000000
--- a/application/basilisk/components/contextualidentity/jar.mn
+++ /dev/null
@@ -1,6 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-browser.jar:
- content/browser/usercontext/usercontext.css (content/usercontext.css)
diff --git a/application/basilisk/components/contextualidentity/moz.build b/application/basilisk/components/contextualidentity/moz.build
deleted file mode 100644
index aac3a838c..000000000
--- a/application/basilisk/components/contextualidentity/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-JAR_MANIFESTS += ['jar.mn']
diff --git a/application/basilisk/components/customizableui/CustomizableUI.jsm b/application/basilisk/components/customizableui/CustomizableUI.jsm
index cb0f519b2..d56d63d99 100644
--- a/application/basilisk/components/customizableui/CustomizableUI.jsm
+++ b/application/basilisk/components/customizableui/CustomizableUI.jsm
@@ -158,10 +158,7 @@ var gUIStateBeforeReset = {
XPCOMUtils.defineLazyGetter(this, "log", () => {
let scope = {};
Cu.import("resource://gre/modules/Console.jsm", scope);
- let debug;
- try {
- debug = Services.prefs.getBoolPref(kPrefCustomizationDebug);
- } catch (ex) {}
+ let debug = Services.prefs.getBoolPref(kPrefCustomizationDebug, false);
let consoleOptions = {
maxLogLevel: debug ? "all" : "log",
prefix: "CustomizableUI",
@@ -200,7 +197,6 @@ var CustomizableUIInternal = {
"find-button",
"preferences-button",
"add-ons-button",
- "sync-button",
];
if (!AppConstants.MOZ_DEV_EDITION) {
@@ -1915,16 +1911,10 @@ var CustomizableUIInternal = {
// state immediately when a browser window opens, which is important for
// other consumers of this API.
loadSavedState: function() {
- let state = null;
- try {
- state = Services.prefs.getCharPref(kPrefCustomizationState);
- } catch (e) {
- log.debug("No saved state found");
- // This will fail if nothing has been customized, so silently fall back to
- // the defaults.
- }
-
+ let state = Services.prefs.getCharPref(kPrefCustomizationState, "");
if (!state) {
+ log.debug("No saved state found");
+ // Nothing has been customized, so silently fall back to the defaults.
return;
}
try {
@@ -2209,10 +2199,7 @@ var CustomizableUIInternal = {
this.notifyListeners("onWidgetAdded", widget.id, widget.currentArea,
widget.currentPosition);
} else if (widgetMightNeedAutoAdding) {
- let autoAdd = true;
- try {
- autoAdd = Services.prefs.getBoolPref(kPrefCustomizationAutoAdd);
- } catch (e) {}
+ let autoAdd = Services.prefs.getBoolPref(kPrefCustomizationAutoAdd, true);
// If the widget doesn't have an existing placement, and it hasn't been
// seen before, then add it to its default area so it can be used.
diff --git a/application/basilisk/components/customizableui/CustomizableWidgets.jsm b/application/basilisk/components/customizableui/CustomizableWidgets.jsm
index 09b3f167e..d4a191a97 100644
--- a/application/basilisk/components/customizableui/CustomizableWidgets.jsm
+++ b/application/basilisk/components/customizableui/CustomizableWidgets.jsm
@@ -23,8 +23,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "CharsetMenu",
"resource://gre/modules/CharsetMenu.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
- "resource://gre/modules/ContextualIdentityService.jsm");
XPCOMUtils.defineLazyGetter(this, "CharsetBundle", function() {
const kCharsetBundle = "chrome://global/locale/charsetMenu.properties";
@@ -42,10 +40,7 @@ const kWidePanelItemClass = "panel-wide-item";
XPCOMUtils.defineLazyGetter(this, "log", () => {
let scope = {};
Cu.import("resource://gre/modules/Console.jsm", scope);
- let debug;
- try {
- debug = Services.prefs.getBoolPref(kPrefCustomizationDebug);
- } catch (ex) {}
+ let debug = Services.prefs.getBoolPref(kPrefCustomizationDebug, false);
let consoleOptions = {
maxLogLevel: debug ? "all" : "log",
prefix: "CustomizableWidgets",
@@ -288,144 +283,6 @@ const CustomizableWidgets = [
log.debug("History view is being hidden!");
}
}, {
- id: "sync-button",
- label: "remotetabs-panelmenu.label",
- tooltiptext: "remotetabs-panelmenu.tooltiptext2",
- type: "view",
- viewId: "PanelUI-remotetabs",
- defaultArea: CustomizableUI.AREA_PANEL,
- deckIndices: {
- DECKINDEX_TABS: 0,
- DECKINDEX_TABSDISABLED: 1,
- DECKINDEX_FETCHING: 2,
- DECKINDEX_NOCLIENTS: 3,
- },
- onCreated(aNode) {
- // Add an observer to the button so we get the animation during sync.
- // (Note the observer sets many attributes, including label and
- // tooltiptext, but we only want the 'syncstatus' attribute for the
- // animation)
- let doc = aNode.ownerDocument;
- let obnode = doc.createElementNS(kNSXUL, "observes");
- obnode.setAttribute("element", "sync-status");
- obnode.setAttribute("attribute", "syncstatus");
- aNode.appendChild(obnode);
- },
- setDeckIndex(index) {
- let deck = this._tabsList.ownerDocument.getElementById("PanelUI-remotetabs-deck");
- // We call setAttribute instead of relying on the XBL property setter due
- // to things going wrong when we try and set the index before the XBL
- // binding has been created - see bug 1241851 for the gory details.
- deck.setAttribute("selectedIndex", index);
- },
-
- _showTabsPromise: Promise.resolve(),
- // Update the tab list after any existing in-flight updates are complete.
- _showTabs() {
- this._showTabsPromise = this._showTabsPromise.then(() => {
- return this.__showTabs();
- });
- },
- // Return a new promise to update the tab list.
- __showTabs() {
- let doc = this._tabsList.ownerDocument;
- return SyncedTabs.getTabClients().then(clients => {
- // The view may have been hidden while the promise was resolving.
- if (!this._tabsList) {
- return;
- }
- if (clients.length === 0 && !SyncedTabs.hasSyncedThisSession) {
- // the "fetching tabs" deck is being shown - let's leave it there.
- // When that first sync completes we'll be notified and update.
- return;
- }
-
- if (clients.length === 0) {
- this.setDeckIndex(this.deckIndices.DECKINDEX_NOCLIENTS);
- return;
- }
-
- this.setDeckIndex(this.deckIndices.DECKINDEX_TABS);
- this._clearTabList();
- SyncedTabs.sortTabClientsByLastUsed(clients, 50 /* maxTabs */);
- let fragment = doc.createDocumentFragment();
-
- for (let client of clients) {
- // add a menu separator for all clients other than the first.
- if (fragment.lastChild) {
- let separator = doc.createElementNS(kNSXUL, "menuseparator");
- fragment.appendChild(separator);
- }
- this._appendClient(client, fragment);
- }
- this._tabsList.appendChild(fragment);
- }).catch(err => {
- Cu.reportError(err);
- }).then(() => {
- // an observer for tests.
- Services.obs.notifyObservers(null, "synced-tabs-menu:test:tabs-updated", null);
- });
- },
- _clearTabList () {
- let list = this._tabsList;
- while (list.lastChild) {
- list.lastChild.remove();
- }
- },
- _showNoClientMessage() {
- this._appendMessageLabel("notabslabel");
- },
- _appendMessageLabel(messageAttr, appendTo = null) {
- if (!appendTo) {
- appendTo = this._tabsList;
- }
- let message = this._tabsList.getAttribute(messageAttr);
- let doc = this._tabsList.ownerDocument;
- let messageLabel = doc.createElementNS(kNSXUL, "label");
- messageLabel.textContent = message;
- appendTo.appendChild(messageLabel);
- return messageLabel;
- },
- _appendClient: function (client, attachFragment) {
- let doc = attachFragment.ownerDocument;
- // Create the element for the remote client.
- let clientItem = doc.createElementNS(kNSXUL, "label");
- clientItem.setAttribute("itemtype", "client");
- let window = doc.defaultView;
- clientItem.setAttribute("tooltiptext",
- window.gSyncUI.formatLastSyncDate(new Date(client.lastModified)));
- clientItem.textContent = client.name;
-
- attachFragment.appendChild(clientItem);
-
- if (client.tabs.length == 0) {
- let label = this._appendMessageLabel("notabsforclientlabel", attachFragment);
- label.setAttribute("class", "PanelUI-remotetabs-notabsforclient-label");
- } else {
- for (let tab of client.tabs) {
- let tabEnt = this._createTabElement(doc, tab);
- attachFragment.appendChild(tabEnt);
- }
- }
- },
- _createTabElement(doc, tabInfo) {
- let item = doc.createElementNS(kNSXUL, "toolbarbutton");
- let tooltipText = (tabInfo.title ? tabInfo.title + "\n" : "") + tabInfo.url;
- item.setAttribute("itemtype", "tab");
- item.setAttribute("class", "subviewbutton");
- item.setAttribute("targetURI", tabInfo.url);
- item.setAttribute("label", tabInfo.title != "" ? tabInfo.title : tabInfo.url);
- item.setAttribute("image", tabInfo.icon);
- item.setAttribute("tooltiptext", tooltipText);
- // We need to use "click" instead of "command" here so openUILink
- // respects different buttons (eg, to open in a new tab).
- item.addEventListener("click", e => {
- doc.defaultView.openUILink(tabInfo.url, e);
- CustomizableUI.hidePanelForNode(item);
- });
- return item;
- },
- }, {
id: "privatebrowsing-button",
shortcutId: "key_privatebrowsing",
defaultArea: CustomizableUI.AREA_PANEL,
@@ -977,89 +834,6 @@ const CustomizableWidgets = [
let win = aEvent.view;
win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser)
}
- }, {
- id: "containers-panelmenu",
- type: "view",
- viewId: "PanelUI-containers",
- hasObserver: false,
- onCreated: function(aNode) {
- let doc = aNode.ownerDocument;
- let win = doc.defaultView;
- let items = doc.getElementById("PanelUI-containersItems");
-
- let onItemCommand = function (aEvent) {
- let item = aEvent.target;
- if (item.hasAttribute("usercontextid")) {
- let userContextId = parseInt(item.getAttribute("usercontextid"));
- win.openUILinkIn(win.BROWSER_NEW_TAB_URL, "tab", {userContextId});
- }
- };
- items.addEventListener("command", onItemCommand);
-
- if (PrivateBrowsingUtils.isWindowPrivate(win)) {
- aNode.setAttribute("disabled", "true");
- }
-
- this.updateVisibility(aNode);
-
- if (!this.hasObserver) {
- Services.prefs.addObserver("privacy.userContext.enabled", this, true);
- this.hasObserver = true;
- }
- },
- onViewShowing: function(aEvent) {
- let doc = aEvent.target.ownerDocument;
-
- let items = doc.getElementById("PanelUI-containersItems");
-
- while (items.firstChild) {
- items.firstChild.remove();
- }
-
- let fragment = doc.createDocumentFragment();
- let bundle = doc.getElementById("bundle_browser");
-
- ContextualIdentityService.getIdentities().forEach(identity => {
- let label = ContextualIdentityService.getUserContextLabel(identity.userContextId);
-
- let item = doc.createElementNS(kNSXUL, "toolbarbutton");
- item.setAttribute("label", label);
- item.setAttribute("usercontextid", identity.userContextId);
- item.setAttribute("class", "subviewbutton");
- item.setAttribute("data-identity-color", identity.color);
- item.setAttribute("data-identity-icon", identity.icon);
-
- fragment.appendChild(item);
- });
-
- fragment.appendChild(doc.createElementNS(kNSXUL, "menuseparator"));
-
- let item = doc.createElementNS(kNSXUL, "toolbarbutton");
- item.setAttribute("label", bundle.getString("userContext.aboutPage.label"));
- item.setAttribute("command", "Browser:OpenAboutContainers");
- item.setAttribute("class", "subviewbutton");
- fragment.appendChild(item);
-
- items.appendChild(fragment);
- },
-
- updateVisibility(aNode) {
- aNode.hidden = !Services.prefs.getBoolPref("privacy.userContext.enabled");
- },
-
- observe(aSubject, aTopic, aData) {
- let {instances} = CustomizableUI.getWidget("containers-panelmenu");
- for (let {node} of instances) {
- if (node) {
- this.updateVisibility(node);
- }
- }
- },
-
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsISupportsWeakReference,
- Ci.nsIObserver
- ]),
}];
let preferencesButton = {
diff --git a/application/basilisk/components/customizableui/CustomizeMode.jsm b/application/basilisk/components/customizableui/CustomizeMode.jsm
index 4365ddfbc..2958655d2 100644
--- a/application/basilisk/components/customizableui/CustomizeMode.jsm
+++ b/application/basilisk/components/customizableui/CustomizeMode.jsm
@@ -40,9 +40,7 @@ let gDebug;
XPCOMUtils.defineLazyGetter(this, "log", () => {
let scope = {};
Cu.import("resource://gre/modules/Console.jsm", scope);
- try {
- gDebug = Services.prefs.getBoolPref(kPrefCustomizationDebug);
- } catch (ex) {}
+ gDebug = Services.prefs.getBoolPref(kPrefCustomizationDebug, false);
let consoleOptions = {
maxLogLevel: gDebug ? "all" : "log",
prefix: "CustomizeMode",
@@ -1503,10 +1501,7 @@ CustomizeMode.prototype = {
if (!AppConstants.CAN_DRAW_IN_TITLEBAR) {
return;
}
- let drawInTitlebar = true;
- try {
- drawInTitlebar = Services.prefs.getBoolPref(kDrawInTitlebarPref);
- } catch (ex) { }
+ let drawInTitlebar = Services.prefs.getBoolPref(kDrawInTitlebarPref, true);
let button = this.document.getElementById("customization-titlebar-visibility-button");
// Drawing in the titlebar means 'hiding' the titlebar:
if (drawInTitlebar) {
diff --git a/application/basilisk/components/customizableui/content/panelUI.inc.xul b/application/basilisk/components/customizableui/content/panelUI.inc.xul
index 8ebd93327..da8077554 100644
--- a/application/basilisk/components/customizableui/content/panelUI.inc.xul
+++ b/application/basilisk/components/customizableui/content/panelUI.inc.xul
@@ -20,27 +20,6 @@
oncommand="gMenuButtonUpdateBadge.onMenuPanelCommand(event);"
wrap="true"
hidden="true"/>
- <hbox id="PanelUI-footer-fxa">
- <hbox id="PanelUI-fxa-status"
- defaultlabel="&fxaSignIn.label;"
- signedinTooltiptext="&syncSettings.label;"
- tooltiptext="&syncSettings.label;"
- errorlabel="&fxaSignInError.label;"
- unverifiedlabel="&fxaUnverified.label;"
- settingslabel="&syncSettings.label;"
- onclick="if (event.which == 1) gFxAccounts.onMenuPanelCommand();">
- <image id="PanelUI-fxa-avatar"/>
- <toolbarbutton id="PanelUI-fxa-label"
- fxabrandname="&syncBrand.fxAccount.label;"/>
- </hbox>
- <toolbarseparator/>
- <toolbarbutton id="PanelUI-fxa-icon"
- oncommand="gSyncUI.doSync();"
- closemenu="none">
- <observes element="sync-status" attribute="syncstatus"/>
- <observes element="sync-status" attribute="tooltiptext"/>
- </toolbarbutton>
- </hbox>
<hbox id="PanelUI-footer-inner">
<toolbarbutton id="PanelUI-customize" label="&appMenuCustomize.label;"
@@ -103,95 +82,6 @@
oncommand="PlacesCommandHook.showPlacesOrganizer('History'); CustomizableUI.hidePanelForNode(this);"/>
</panelview>
- <panelview id="PanelUI-remotetabs" flex="1" class="PanelUI-subView">
- <label value="&appMenuRemoteTabs.label;" class="panel-subview-header"/>
- <vbox class="panel-subview-body">
- <!-- this widget has 3 boxes in the body, but only 1 is ever visible -->
- <!-- When Sync is ready to sync -->
- <vbox id="PanelUI-remotetabs-main" observes="sync-syncnow-state">
- <vbox id="PanelUI-remotetabs-buttons">
- <toolbarbutton id="PanelUI-remotetabs-view-sidebar"
- class="subviewbutton"
- oncommand="BrowserOpenSyncTabs();"
- label="&appMenuRemoteTabs.sidebar.label;"/>
- <toolbarbutton id="PanelUI-remotetabs-syncnow"
- observes="sync-status"
- class="subviewbutton"
- oncommand="gSyncUI.doSync();"
- closemenu="none"/>
- <menuseparator id="PanelUI-remotetabs-separator"/>
- </vbox>
- <deck id="PanelUI-remotetabs-deck">
- <!-- Sync is ready to Sync and the "tabs" engine is enabled -->
- <vbox id="PanelUI-remotetabs-tabspane">
- <vbox id="PanelUI-remotetabs-tabslist"
- notabsforclientlabel="&appMenuRemoteTabs.notabs.label;"
- />
- </vbox>
- <!-- Sync is ready to Sync but the "tabs" engine isn't enabled-->
- <hbox id="PanelUI-remotetabs-tabsdisabledpane" pack="center" flex="1">
- <vbox class="PanelUI-remotetabs-instruction-box">
- <hbox pack="center">
- <image class="fxaSyncIllustration" alt=""/>
- </hbox>
- <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.tabsnotsyncing.label;</label>
- <hbox pack="center">
- <toolbarbutton class="PanelUI-remotetabs-prefs-button"
- label="&appMenuRemoteTabs.openprefs.label;"
- oncommand="gSyncUI.openSetup(null, 'synced-tabs');"/>
- </hbox>
- </vbox>
- </hbox>
- <!-- Sync is ready to Sync but we are still fetching the tabs to show -->
- <vbox id="PanelUI-remotetabs-fetching">
- <!-- Show intentionally blank panel, see bug 1239845 -->
- </vbox>
- <!-- Sync has only 1 (ie, this) device connected -->
- <hbox id="PanelUI-remotetabs-nodevicespane" pack="center" flex="1">
- <vbox class="PanelUI-remotetabs-instruction-box">
- <hbox pack="center">
- <image class="fxaSyncIllustration" alt=""/>
- </hbox>
- <label class="PanelUI-remotetabs-instruction-title">&appMenuRemoteTabs.noclients.title;</label>
- <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.noclients.subtitle;</label>
- <!-- The inner HTML for PanelUI-remotetabs-mobile-promo is built at runtime -->
- <label id="PanelUI-remotetabs-mobile-promo" fxAccountsBrand="&syncBrand.fxAccount.label;"/>
- </vbox>
- </hbox>
- </deck>
- </vbox>
- <!-- a box to ensure contained boxes are centered horizonally -->
- <hbox pack="center" flex="1">
- <!-- When Sync is not configured -->
- <vbox id="PanelUI-remotetabs-setupsync"
- flex="1"
- align="center"
- class="PanelUI-remotetabs-instruction-box"
- observes="sync-setup-state">
- <image class="fxaSyncIllustration" alt=""/>
- <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
- <toolbarbutton class="PanelUI-remotetabs-prefs-button"
- label="&appMenuRemoteTabs.signin.label;"
- oncommand="gSyncUI.openSetup(null, 'synced-tabs');"/>
- </vbox>
- <!-- When Sync needs re-authentication. This uses the exact same messaging
- as "Sync is not configured" but remains a separate box so we get
- the goodness of observing broadcasters to manage the hidden states -->
- <vbox id="PanelUI-remotetabs-reauthsync"
- flex="1"
- align="center"
- class="PanelUI-remotetabs-instruction-box"
- observes="sync-reauth-state">
- <image class="fxaSyncIllustration" alt=""/>
- <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
- <toolbarbutton class="PanelUI-remotetabs-prefs-button"
- label="&appMenuRemoteTabs.signin.label;"
- oncommand="gSyncUI.openSetup(null, 'synced-tabs');"/>
- </vbox>
- </hbox>
- </vbox>
- </panelview>
-
<panelview id="PanelUI-bookmarks" flex="1" class="PanelUI-subView">
<label value="&bookmarksMenu.label;" class="panel-subview-header"/>
<vbox class="panel-subview-body">
diff --git a/application/basilisk/components/customizableui/moz.build b/application/basilisk/components/customizableui/moz.build
index 034630dc9..5797a03b0 100644
--- a/application/basilisk/components/customizableui/moz.build
+++ b/application/basilisk/components/customizableui/moz.build
@@ -9,7 +9,6 @@ DIRS += [
]
EXTRA_JS_MODULES += [
- 'CustomizableUI.jsm',
'CustomizableWidgets.jsm',
'CustomizeMode.jsm',
'DragPositionManager.jsm',
@@ -17,5 +16,9 @@ EXTRA_JS_MODULES += [
'ScrollbarSampler.jsm',
]
+EXTRA_PP_JS_MODULES += [
+ 'CustomizableUI.jsm',
+]
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
diff --git a/application/basilisk/components/distribution.js b/application/basilisk/components/distribution.js
index 589129a5a..c30e4dcfe 100644
--- a/application/basilisk/components/distribution.js
+++ b/application/basilisk/components/distribution.js
@@ -22,10 +22,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
this.DistributionCustomizer = function DistributionCustomizer() {
// For parallel xpcshell testing purposes allow loading the distribution.ini
// file from the profile folder through an hidden pref.
- let loadFromProfile = false;
- try {
- loadFromProfile = Services.prefs.getBoolPref("distribution.testing.loadFromProfile");
- } catch (ex) {}
+ loadFromProfile = Services.prefs.getBoolPref("distribution.testing.loadFromProfile", false);
let dirSvc = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIProperties);
try {
@@ -60,13 +57,7 @@ DistributionCustomizer.prototype = {
},
get _locale() {
- let locale;
- try {
- locale = this._prefs.getCharPref("general.useragent.locale");
- }
- catch (e) {
- locale = "en-US";
- }
+ let locale = this._prefs.getCharPref("general.useragent.locale", "en-US");
this.__defineGetter__("_locale", () => locale);
return this._locale;
},
@@ -291,11 +282,7 @@ DistributionCustomizer.prototype = {
this._ini.getString("Global", "id") + ".bookmarksProcessed";
}
- let bmProcessed = false;
- try {
- bmProcessed = this._prefs.getBoolPref(bmProcessedPref);
- }
- catch (e) {}
+ let bmProcessed = this._prefs.getBoolPref(bmProcessedPref, false);
if (!bmProcessed) {
if (sections["BookmarksMenu"])
diff --git a/application/basilisk/components/feeds/FeedWriter.js b/application/basilisk/components/feeds/FeedWriter.js
index 20f1399b0..ceb2a7e2f 100644
--- a/application/basilisk/components/feeds/FeedWriter.js
+++ b/application/basilisk/components/feeds/FeedWriter.js
@@ -19,12 +19,7 @@ function LOG(str) {
let prefB = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
- let shouldLog = false;
- try {
- shouldLog = prefB.getBoolPref("feeds.log");
- }
- catch (ex) {
- }
+ let shouldLog = prefB.getBoolPref("feeds.log", false);
if (shouldLog)
dump("*** Feeds: " + str + "\n");
diff --git a/application/basilisk/components/feeds/WebContentConverter.js b/application/basilisk/components/feeds/WebContentConverter.js
index 2cb5cd145..159eca7c2 100644
--- a/application/basilisk/components/feeds/WebContentConverter.js
+++ b/application/basilisk/components/feeds/WebContentConverter.js
@@ -187,13 +187,8 @@ const Utils = {
// check if it is in the black list
let pb = Services.prefs;
- let allowed;
- try {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
- }
- catch (e) {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
- }
+ let allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol,
+ pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default"));
if (!allowed) {
throw this.getSecurityError(
`Not allowed to register a protocol handler for ${aProtocol}`,
diff --git a/application/basilisk/components/moz.build b/application/basilisk/components/moz.build
index 07e79bc36..a9c29936b 100644
--- a/application/basilisk/components/moz.build
+++ b/application/basilisk/components/moz.build
@@ -6,7 +6,6 @@
DIRS += [
'about',
- 'contextualidentity',
'customizableui',
'dirprovider',
'downloads',
@@ -20,12 +19,11 @@ DIRS += [
'sessionstore',
'shell',
'selfsupport',
- 'syncedtabs',
'translation',
]
-if CONFIG['MOZ_WEBEXTENSIONS']:
- DIRS += ['webextensions']
+if CONFIG['MOZ_SERVICES_SYNC']:
+ DIRS += ['sync']
DIRS += ['build']
@@ -39,6 +37,9 @@ XPIDL_MODULE = 'browsercompsbase'
EXTRA_COMPONENTS += [
'BrowserComponents.manifest',
'nsBrowserContentHandler.js',
+]
+
+EXTRA_PP_COMPONENTS += [
'nsBrowserGlue.js',
]
diff --git a/application/basilisk/components/nsBrowserContentHandler.js b/application/basilisk/components/nsBrowserContentHandler.js
index 74144fc1b..d65e52594 100644
--- a/application/basilisk/components/nsBrowserContentHandler.js
+++ b/application/basilisk/components/nsBrowserContentHandler.js
@@ -100,20 +100,14 @@ const OVERRIDE_NEW_BUILD_ID = 3;
* OVERRIDE_NONE otherwise.
*/
function needHomepageOverride(prefb) {
- var savedmstone = null;
- try {
- savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone");
- } catch (e) {}
+ var savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone", "");
if (savedmstone == "ignore")
return OVERRIDE_NONE;
var mstone = Services.appinfo.platformVersion;
- var savedBuildID = null;
- try {
- savedBuildID = prefb.getCharPref("browser.startup.homepage_override.buildID");
- } catch (e) {}
+ var savedBuildID = prefb.getCharPref("browser.startup.homepage_override.buildID", "");
var buildID = Services.appinfo.platformBuildID;
@@ -489,10 +483,7 @@ nsBrowserContentHandler.prototype = {
// URL if we do end up showing an overridePage. This makes it possible
// to have the overridePage's content vary depending on the version we're
// upgrading from.
- let old_mstone = "unknown";
- try {
- old_mstone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone");
- } catch (ex) {}
+ let old_mstone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone", "unknown");
override = needHomepageOverride(prefb);
if (override != OVERRIDE_NONE) {
switch (override) {
diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js
index d77e97f87..b4256523f 100644
--- a/application/basilisk/components/nsBrowserGlue.js
+++ b/application/basilisk/components/nsBrowserGlue.js
@@ -143,6 +143,7 @@ BrowserGlue.prototype = {
Services.prefs.savePrefFile(null);
},
+#ifdef MOZ_SERVICES_SYNC
_setSyncAutoconnectDelay: function BG__setSyncAutoconnectDelay() {
// Assume that a non-zero value for services.sync.autoconnectDelay should override
if (Services.prefs.prefHasUserValue("services.sync.autoconnectDelay")) {
@@ -164,6 +165,7 @@ BrowserGlue.prototype = {
Cu.import("resource://services-sync/main.js");
Weave.Service.scheduler.delayedAutoConnect(delay);
},
+#endif
// nsIObserver implementation
observe: function BG_observe(subject, topic, data) {
@@ -210,18 +212,14 @@ BrowserGlue.prototype = {
this._setPrefToSaveSession();
}
break;
+#ifdef MOZ_SERVICES_SYNC
case "weave:service:ready":
this._setSyncAutoconnectDelay();
break;
- case "fxaccounts:onverified":
- this._showSyncStartedDoorhanger();
- break;
- case "fxaccounts:device_disconnected":
- this._onDeviceDisconnected();
- break;
- case "weave:engine:clients:display-uris":
- this._onDisplaySyncURIs(subject);
- break;
+ case "weave:engine:clients:display-uri":
+ this._onDisplaySyncURI(subject);
+ break;
+#endif
case "session-save":
this._setPrefToSaveSession(true);
subject.QueryInterface(Ci.nsISupportsPRBool);
@@ -428,10 +426,10 @@ BrowserGlue.prototype = {
os.addObserver(this, "browser-lastwindow-close-requested", false);
os.addObserver(this, "browser-lastwindow-close-granted", false);
}
+#ifdef MOZ_SERVICES_SYNC
os.addObserver(this, "weave:service:ready", false);
- os.addObserver(this, "fxaccounts:onverified", false);
- os.addObserver(this, "fxaccounts:device_disconnected", false);
- os.addObserver(this, "weave:engine:clients:display-uris", false);
+ os.addObserver(this, "weave:engine:clients:display-uri", false);
+#endif
os.addObserver(this, "session-save", false);
os.addObserver(this, "places-init-complete", false);
this._isPlacesInitObserver = true;
@@ -479,10 +477,10 @@ BrowserGlue.prototype = {
os.removeObserver(this, "browser-lastwindow-close-requested");
os.removeObserver(this, "browser-lastwindow-close-granted");
}
+#ifdef MOZ_SERVICES_SYNC
os.removeObserver(this, "weave:service:ready");
- os.removeObserver(this, "fxaccounts:onverified");
- os.removeObserver(this, "fxaccounts:device_disconnected");
- os.removeObserver(this, "weave:engine:clients:display-uris");
+ os.removeObserver(this, "weave:engine:clients:display-uri");
+#endif
os.removeObserver(this, "session-save");
if (this._bookmarksBackupIdleTime) {
this._idleService.removeIdleObserver(this, this._bookmarksBackupIdleTime);
@@ -963,10 +961,7 @@ BrowserGlue.prototype = {
// Offer to reset a user's profile if it hasn't been used for 60 days.
const OFFER_PROFILE_RESET_INTERVAL_MS = 60 * 24 * 60 * 60 * 1000;
let lastUse = Services.appinfo.replacedLockTime;
- let disableResetPrompt = false;
- try {
- disableResetPrompt = Services.prefs.getBoolPref("browser.disableResetPrompt");
- } catch (e) {}
+ let disableResetPrompt = Services.prefs.getBoolPref("browser.disableResetPrompt", false);
if (!disableResetPrompt && lastUse &&
Date.now() - lastUse >= OFFER_PROFILE_RESET_INTERVAL_MS) {
@@ -1507,10 +1502,7 @@ BrowserGlue.prototype = {
} catch (ex) {}
// Support legacy bookmarks.html format for apps that depend on that format.
- let autoExportHTML = false;
- try {
- autoExportHTML = Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML");
- } catch (ex) {} // Do not export.
+ let autoExportHTML = Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML", false); // Do not export.
if (autoExportHTML) {
// Sqlite.jsm and Places shutdown happen at profile-before-change, thus,
// to be on the safe side, this should run earlier.
@@ -1580,10 +1572,7 @@ BrowserGlue.prototype = {
// An import operation is about to run.
// Don't try to recreate smart bookmarks if autoExportHTML is true or
// smart bookmarks are disabled.
- let smartBookmarksVersion = 0;
- try {
- smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion");
- } catch (ex) {}
+ let smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion", 0);
if (!autoExportHTML && smartBookmarksVersion != -1)
Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
@@ -1934,10 +1923,7 @@ BrowserGlue.prototype = {
// Refactor urlbar suggestion preferences to make it extendable and
// allow new suggestion types (e.g: search suggestions).
let types = ["history", "bookmark", "openpage"];
- let defaultBehavior = 0;
- try {
- defaultBehavior = Services.prefs.getIntPref("browser.urlbar.default.behavior");
- } catch (ex) {}
+ let defaultBehavior = Services.prefs.getIntPref("browser.urlbar.default.behavior", 0);
try {
let autocompleteEnabled = Services.prefs.getBoolPref("browser.urlbar.autocomplete.enabled");
if (!autocompleteEnabled) {
@@ -1990,12 +1976,8 @@ BrowserGlue.prototype = {
if (currentUIVersion < 30) {
// Convert old devedition theme pref to lightweight theme storage
- let lightweightThemeSelected = false;
- let selectedThemeID = null;
- try {
- lightweightThemeSelected = Services.prefs.prefHasUserValue("lightweightThemes.selectedThemeID");
- selectedThemeID = Services.prefs.getCharPref("lightweightThemes.selectedThemeID");
- } catch (e) {}
+ let lightweightThemeSelected = Services.prefs.prefHasUserValue("lightweightThemes.selectedThemeID", false);
+ let selectedThemeID = Services.prefs.getCharPref("lightweightThemes.selectedThemeID", "");
let defaultThemeSelected = false;
try {
@@ -2145,10 +2127,7 @@ BrowserGlue.prototype = {
const MAX_RESULTS = 10;
// Get current smart bookmarks version. If not set, create them.
- let smartBookmarksCurrentVersion = 0;
- try {
- smartBookmarksCurrentVersion = Services.prefs.getIntPref(SMART_BOOKMARKS_PREF);
- } catch (ex) {}
+ let smartBookmarksCurrentVersion = Services.prefs.getIntPref(SMART_BOOKMARKS_PREF, 0);
// If version is current, or smart bookmarks are disabled, bail out.
if (smartBookmarksCurrentVersion == -1 ||
@@ -2274,90 +2253,29 @@ BrowserGlue.prototype = {
chromeWindow.openPreferences(...args);
},
+#ifdef MOZ_SERVICES_SYNC
/**
- * Called as an observer when Sync's "display URIs" notification is fired.
+ * Called as an observer when Sync's "display URI" notification is fired.
*
- * We open the received URIs in background tabs.
+ * We open the received URI in a background tab.
+ *
+ * Eventually, this will likely be replaced by a more robust tab syncing
+ * feature. This functionality is considered somewhat evil by UX because it
+ * opens a new tab automatically without any prompting. However, it is a
+ * lesser evil than sending a tab to a specific device (from e.g. Fennec)
+ * and having nothing happen on the receiving end.
*/
- _onDisplaySyncURIs: function _onDisplaySyncURIs(data) {
+ _onDisplaySyncURI: function _onDisplaySyncURI(data) {
try {
- // The payload is wrapped weirdly because of how Sync does notifications.
- const URIs = data.wrappedJSObject.object;
-
- const findWindow = () => RecentWindow.getMostRecentBrowserWindow({private: false});
-
- // win can be null, but it's ok, we'll assign it later in openTab()
- let win = findWindow();
+ let tabbrowser = RecentWindow.getMostRecentBrowserWindow({private: false}).gBrowser;
- const openTab = URI => {
- let tab;
- if (!win) {
- Services.appShell.hiddenDOMWindow.open(URI.uri);
- win = findWindow();
- tab = win.gBrowser.tabs[0];
- } else {
- tab = win.gBrowser.addTab(URI.uri);
- }
- tab.setAttribute("attention", true);
- return tab;
- };
-
- const firstTab = openTab(URIs[0]);
- URIs.slice(1).forEach(URI => openTab(URI));
-
- let title, body;
- const deviceName = Weave.Service.clientsEngine.getClientName(URIs[0].clientId);
- const bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties");
- if (URIs.length == 1) {
- // Due to bug 1305895, tabs from iOS may not have device information, so
- // we have separate strings to handle those cases. (See Also
- // unnamedTabsArrivingNotificationNoDevice.body below)
- if (deviceName) {
- title = bundle.formatStringFromName("tabArrivingNotificationWithDevice.title", [deviceName], 1);
- } else {
- title = bundle.GetStringFromName("tabArrivingNotification.title");
- }
- // Use the page URL as the body. We strip the fragment and query to
- // reduce size, and also format it the same way that the url bar would.
- body = URIs[0].uri.replace(/[?#].*$/, "");
- if (win.gURLBar) {
- body = win.gURLBar.trimValue(body);
- }
- } else {
- title = bundle.GetStringFromName("tabsArrivingNotification.title");
- const allSameDevice = URIs.every(URI => URI.clientId == URIs[0].clientId);
- const unknownDevice = allSameDevice && !deviceName;
- let tabArrivingBody;
- if (unknownDevice) {
- tabArrivingBody = "unnamedTabsArrivingNotificationNoDevice.body";
- } else if (allSameDevice) {
- tabArrivingBody = "unnamedTabsArrivingNotification2.body";
- } else {
- tabArrivingBody = "unnamedTabsArrivingNotificationMultiple2.body"
- }
-
- body = bundle.GetStringFromName(tabArrivingBody);
- body = PluralForm.get(URIs.length, body);
- body = body.replace("#1", URIs.length);
- body = body.replace("#2", deviceName);
- }
-
- const clickCallback = (subject, topic, data) => {
- if (topic == "alertclickcallback") {
- win.gBrowser.selectedTab = firstTab;
- }
- }
-
- // Specify an icon because on Windows no icon is shown at the moment
- let imageURL;
- if (AppConstants.platform == "win") {
- imageURL = "chrome://branding/content/icon64.png";
- }
- AlertsService.showAlertNotification(imageURL, title, body, true, null, clickCallback);
+ // The payload is wrapped weirdly because of how Sync does notifications.
+ tabbrowser.addTab(data.wrappedJSObject.object.uri);
} catch (ex) {
- Cu.reportError("Error displaying tab(s) received by Sync: " + ex);
+ Cu.reportError("Error displaying tab received by Sync: " + ex);
}
},
+#endif
_onDeviceDisconnected() {
let bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties");
diff --git a/application/basilisk/components/places/PlacesUIUtils.jsm b/application/basilisk/components/places/PlacesUIUtils.jsm
index 17fa276aa..035fc12c2 100644
--- a/application/basilisk/components/places/PlacesUIUtils.jsm
+++ b/application/basilisk/components/places/PlacesUIUtils.jsm
@@ -1418,9 +1418,9 @@ this.PlacesUIUtils = {
},
shouldShowTabsFromOtherComputersMenuitem: function() {
- let weaveOK = Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED &&
- Weave.Svc.Prefs.get("firstSync", "") != "notReady";
- return weaveOK;
+#ifdef MOZ_SERVICES_SYNC
+ // Weave code to enable menu item
+#endif
},
/**
diff --git a/application/basilisk/components/places/moz.build b/application/basilisk/components/places/moz.build
index 9e5a2c074..ea6d43538 100644
--- a/application/basilisk/components/places/moz.build
+++ b/application/basilisk/components/places/moz.build
@@ -6,6 +6,6 @@
JAR_MANIFESTS += ['jar.mn']
-EXTRA_JS_MODULES += [
+EXTRA_PP_JS_MODULES += [
'PlacesUIUtils.jsm',
]
diff --git a/application/basilisk/components/preferences/containers.js b/application/basilisk/components/preferences/containers.js
deleted file mode 100644
index 6ca5853f7..000000000
--- a/application/basilisk/components/preferences/containers.js
+++ /dev/null
@@ -1,176 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
-
-const containersBundle = Services.strings.createBundle("chrome://browser/locale/preferences/containers.properties");
-
-const HTMLNS = "http://www.w3.org/1999/xhtml";
-
-let gContainersManager = {
- icons: [
- "fingerprint",
- "briefcase",
- "dollar",
- "cart",
- "circle"
- ],
-
- colors: [
- "blue",
- "turquoise",
- "green",
- "yellow",
- "orange",
- "red",
- "pink",
- "purple"
- ],
-
- onLoad() {
- let params = window.arguments[0] || {};
- this.init(params);
- },
-
- init(aParams) {
- this.userContextId = aParams.userContextId || null;
- this.identity = aParams.identity;
-
- if (aParams.windowTitle) {
- document.title = aParams.windowTitle;
- }
-
- const iconWrapper = document.getElementById("iconWrapper");
- iconWrapper.appendChild(this.createIconButtons());
-
- const colorWrapper = document.getElementById("colorWrapper");
- colorWrapper.appendChild(this.createColorSwatches());
-
- if (this.identity.name) {
- const name = document.getElementById("name");
- name.value = this.identity.name;
- this.checkForm();
- }
-
- this.setLabelsMinWidth();
-
- // This is to prevent layout jank caused by the svgs and outlines rendering at different times
- document.getElementById("containers-content").removeAttribute("hidden");
- },
-
- setLabelsMinWidth() {
- const labelMinWidth = containersBundle.GetStringFromName("containers.labelMinWidth");
- const labels = [
- document.getElementById("nameLabel"),
- document.getElementById("iconLabel"),
- document.getElementById("colorLabel")
- ];
- for (let label of labels) {
- label.style.minWidth = labelMinWidth;
- }
- },
-
- uninit() {
- },
-
- // Check if name string as to if the form can be submitted
- checkForm() {
- const name = document.getElementById("name");
- let btnApplyChanges = document.getElementById("btnApplyChanges");
- if (!name.value) {
- btnApplyChanges.setAttribute("disabled", true);
- } else {
- btnApplyChanges.removeAttribute("disabled");
- }
- },
-
- createIconButtons(defaultIcon) {
- let radiogroup = document.createElement("radiogroup");
- radiogroup.setAttribute("id", "icon");
- radiogroup.className = "icon-buttons";
-
- for (let icon of this.icons) {
- let iconSwatch = document.createElement("radio");
- iconSwatch.id = "iconbutton-" + icon;
- iconSwatch.name = "icon";
- iconSwatch.type = "radio";
- iconSwatch.value = icon;
-
- if (this.identity.icon && this.identity.icon == icon) {
- iconSwatch.setAttribute("selected", true);
- }
-
- iconSwatch.setAttribute("label",
- containersBundle.GetStringFromName(`containers.${icon}.label`));
- let iconElement = document.createElement("hbox");
- iconElement.className = 'userContext-icon';
- iconElement.setAttribute("data-identity-icon", icon);
-
- iconSwatch.appendChild(iconElement);
- radiogroup.appendChild(iconSwatch);
- }
-
- return radiogroup;
- },
-
- createColorSwatches(defaultColor) {
- let radiogroup = document.createElement("radiogroup");
- radiogroup.setAttribute("id", "color");
-
- for (let color of this.colors) {
- let colorSwatch = document.createElement("radio");
- colorSwatch.id = "colorswatch-" + color;
- colorSwatch.name = "color";
- colorSwatch.type = "radio";
- colorSwatch.value = color;
-
- if (this.identity.color && this.identity.color == color) {
- colorSwatch.setAttribute("selected", true);
- }
-
- colorSwatch.setAttribute("label",
- containersBundle.GetStringFromName(`containers.${color}.label`));
- let iconElement = document.createElement("hbox");
- iconElement.className = 'userContext-icon';
- iconElement.setAttribute("data-identity-icon", "circle");
- iconElement.setAttribute("data-identity-color", color);
-
- colorSwatch.appendChild(iconElement);
- radiogroup.appendChild(colorSwatch);
- }
- return radiogroup;
- },
-
- onApplyChanges() {
- let icon = document.getElementById("icon").value;
- let color = document.getElementById("color").value;
- let name = document.getElementById("name").value;
-
- if (this.icons.indexOf(icon) == -1) {
- throw "Internal error. The icon value doesn't match.";
- }
-
- if (this.colors.indexOf(color) == -1) {
- throw "Internal error. The color value doesn't match.";
- }
-
- if (this.userContextId) {
- ContextualIdentityService.update(this.userContextId,
- name,
- icon,
- color);
- } else {
- ContextualIdentityService.create(name,
- icon,
- color);
- }
- window.parent.location.reload()
- },
-
- onWindowKeyPress(aEvent) {
- if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
- window.close();
- }
-}
diff --git a/application/basilisk/components/preferences/containers.xul b/application/basilisk/components/preferences/containers.xul
deleted file mode 100644
index 62a775fe4..000000000
--- a/application/basilisk/components/preferences/containers.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.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/. -->
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/containers.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/containers.dtd" >
-
-<window id="ContainersDialog" class="windowDialog"
- windowtype="Browser:Permissions"
- title="&window.title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- style="width: &window.width;;"
- onload="gContainersManager.onLoad();"
- onunload="gContainersManager.uninit();"
- persist="screenX screenY width height"
- onkeypress="gContainersManager.onWindowKeyPress(event);">
-
- <script src="chrome://global/content/treeUtils.js"/>
- <script src="chrome://browser/content/preferences/containers.js"/>
-
- <stringbundle id="bundlePreferences"
- src="chrome://browser/locale/preferences/preferences.properties"/>
-
- <keyset>
- <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
- </keyset>
-
- <vbox class="contentPane largeDialogContainer" flex="1" hidden="true" id="containers-content">
- <description id="permissionsText" control="url"/>
- <separator class="thin"/>
- <hbox align="start">
- <label id="nameLabel" control="url" value="&name.label;" accesskey="&name.accesskey;"/>
- <textbox id="name" flex="1" onkeyup="gContainersManager.checkForm();" />
- </hbox>
- <hbox align="center" id="iconWrapper">
- <label id="iconLabel" control="url" value="&icon.label;" accesskey="&icon.accesskey;"/>
- </hbox>
- <hbox align="center" id="colorWrapper">
- <label id="colorLabel" control="url" value="&color.label;" accesskey="&color.accesskey;"/>
- </hbox>
- </vbox>
- <vbox>
- <hbox class="actionButtons" align="right" flex="1">
- <button id="btnApplyChanges" disabled="true" oncommand="gContainersManager.onApplyChanges();" icon="save"
- label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
- </hbox>
- </vbox>
-</window>
diff --git a/application/basilisk/components/preferences/cookies.js b/application/basilisk/components/preferences/cookies.js
index c420855f8..4ede5b6e6 100644
--- a/application/basilisk/components/preferences/cookies.js
+++ b/application/basilisk/components/preferences/cookies.js
@@ -7,12 +7,8 @@ const nsICookie = Components.interfaces.nsICookie;
Components.utils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm")
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
- "resource://gre/modules/ContextualIdentityService.jsm");
-
var gCookiesWindow = {
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager),
@@ -38,10 +34,6 @@ var gCookiesWindow = {
this._populateList(true);
document.getElementById("filter").focus();
-
- if (!Services.prefs.getBoolPref("privacy.userContext.enabled")) {
- document.getElementById("userContextRow").hidden = true;
- }
},
uninit: function () {
@@ -82,24 +74,11 @@ var gCookiesWindow = {
aCookieB.originAttributes);
},
- _isPrivateCookie: function (aCookie) {
- let { userContextId } = aCookie.originAttributes;
- if (!userContextId) {
- // Default identity is public.
- return false;
- }
- return !ContextualIdentityService.getIdentityFromId(userContextId).public;
- },
-
observe: function (aCookie, aTopic, aData) {
if (aTopic != "cookie-changed")
return;
if (aCookie instanceof Components.interfaces.nsICookie) {
- if (this._isPrivateCookie(aCookie)) {
- return;
- }
-
var strippedHost = this._makeStrippedHost(aCookie.host);
if (aData == "changed")
this._handleCookieChanged(aCookie, strippedHost);
@@ -498,9 +477,6 @@ var gCookiesWindow = {
while (e.hasMoreElements()) {
var cookie = e.getNext();
if (cookie && cookie instanceof Components.interfaces.nsICookie) {
- if (this._isPrivateCookie(cookie)) {
- continue;
- }
var strippedHost = this._makeStrippedHost(cookie.host);
this._addCookie(strippedHost, cookie, hostCount);
@@ -524,17 +500,9 @@ var gCookiesWindow = {
return this._bundle.getString("expireAtEndOfSession");
},
- _getUserContextString: function(aUserContextId) {
- if (parseInt(aUserContextId) == 0) {
- return this._bundle.getString("defaultUserContextLabel");
- }
-
- return ContextualIdentityService.getUserContextLabel(aUserContextId);
- },
-
_updateCookieData: function (aItem) {
var seln = this._view.selection;
- var ids = ["name", "value", "host", "path", "isSecure", "expires", "userContext"];
+ var ids = ["name", "value", "host", "path", "isSecure", "expires"];
var properties;
if (aItem && !aItem.container && seln.count > 0) {
@@ -543,8 +511,7 @@ var gCookiesWindow = {
isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
: this._bundle.getString("hostColon"),
isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly")
- : this._bundle.getString("forAnyConnection"),
- userContext: this._getUserContextString(aItem.originAttributes.userContextId) };
+ : this._bundle.getString("forAnyConnection") };
for (let id of ids) {
document.getElementById(id).disabled = false;
}
@@ -553,7 +520,7 @@ var gCookiesWindow = {
var noneSelected = this._bundle.getString("noCookieSelected");
properties = { name: noneSelected, value: noneSelected, host: noneSelected,
path: noneSelected, expires: noneSelected,
- isSecure: noneSelected, userContext: noneSelected };
+ isSecure: noneSelected };
for (let id of ids) {
document.getElementById(id).disabled = true;
}
diff --git a/application/basilisk/components/preferences/cookies.xul b/application/basilisk/components/preferences/cookies.xul
index bd60d9346..d5fefdef7 100644
--- a/application/basilisk/components/preferences/cookies.xul
+++ b/application/basilisk/components/preferences/cookies.xul
@@ -85,10 +85,6 @@
<hbox pack="end"><label id="expiresLabel" control="expires" value="&props.expires.label;"/></hbox>
<textbox id="expires" readonly="true" class="plain"/>
</row>
- <row align="center" id="userContextRow">
- <hbox pack="end"><label id="userContextLabel" control="userContext" value="&props.container.label;"/></hbox>
- <textbox id="userContext" readonly="true" class="plain"/>
- </row>
</rows>
</grid>
</hbox>
diff --git a/application/basilisk/components/preferences/handlers.css b/application/basilisk/components/preferences/handlers.css
index 6af75a08b..d5f100831 100644
--- a/application/basilisk/components/preferences/handlers.css
+++ b/application/basilisk/components/preferences/handlers.css
@@ -10,10 +10,6 @@
-moz-binding: url("chrome://browser/content/preferences/handlers.xml#handler-selected");
}
-#containersView > richlistitem {
- -moz-binding: url("chrome://browser/content/preferences/handlers.xml#container");
-}
-
/**
* Make the icons appear.
* Note: we display the icon box for every item whether or not it has an icon
diff --git a/application/basilisk/components/preferences/handlers.xml b/application/basilisk/components/preferences/handlers.xml
index 0c629d759..ad07a493c 100644
--- a/application/basilisk/components/preferences/handlers.xml
+++ b/application/basilisk/components/preferences/handlers.xml
@@ -69,29 +69,6 @@
</binding>
- <binding id="container">
- <content>
- <xul:hbox flex="1" equalsize="always">
- <xul:hbox flex="1" align="center">
- <xul:hbox xbl:inherits="data-identity-icon=containerIcon,data-identity-color=containerColor" height="24" width="24" class="userContext-icon"/>
- <xul:label flex="1" crop="end" xbl:inherits="value=containerName"/>
- </xul:hbox>
- <xul:hbox flex="1" align="right">
- <xul:button anonid="preferencesButton"
- xbl:inherits="value=userContextId"
- onclick="gContainersPane.onPeferenceClick(event.originalTarget)">
- Preferences
- </xul:button>
- <xul:button anonid="removeButton"
- xbl:inherits="value=userContextId"
- onclick="gContainersPane.onRemoveClick(event.originalTarget)">
- Remove
- </xul:button>
- </xul:hbox>
- </xul:hbox>
- </content>
- </binding>
-
<binding id="offlineapp"
extends="chrome://global/content/bindings/listbox.xml#listitem">
<content>
diff --git a/application/basilisk/components/preferences/in-content/advanced.js b/application/basilisk/components/preferences/in-content/advanced.js
index 5f9458eee..850f0e09f 100644
--- a/application/basilisk/components/preferences/in-content/advanced.js
+++ b/application/basilisk/components/preferences/in-content/advanced.js
@@ -670,25 +670,6 @@ var gAdvancedPane = {
// or the binary platform or OS version is not known.
// A locked pref is sufficient to disable the radiogroup.
radiogroup.disabled = !canCheck || enabledPref.locked || autoPref.locked;
-
- if (AppConstants.MOZ_MAINTENANCE_SERVICE) {
- // Check to see if the maintenance service is installed.
- // If it is don't show the preference at all.
- var installed;
- try {
- var wrk = Components.classes["@mozilla.org/windows-registry-key;1"]
- .createInstance(Components.interfaces.nsIWindowsRegKey);
- wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE,
- "SOFTWARE\\Mozilla\\MaintenanceService",
- wrk.ACCESS_READ | wrk.WOW64_64);
- installed = wrk.readIntValue("Installed");
- wrk.close();
- } catch (e) {
- }
- if (installed != 1) {
- document.getElementById("useService").hidden = true;
- }
- }
}
},
diff --git a/application/basilisk/components/preferences/in-content/advanced.xul b/application/basilisk/components/preferences/in-content/advanced.xul
index 4973f8e09..50e276501 100644
--- a/application/basilisk/components/preferences/in-content/advanced.xul
+++ b/application/basilisk/components/preferences/in-content/advanced.xul
@@ -79,12 +79,6 @@
<preference id="app.update.disable_button.showUpdateHistory"
name="app.update.disable_button.showUpdateHistory"
type="bool"/>
-
-#ifdef MOZ_MAINTENANCE_SERVICE
- <preference id="app.update.service.enabled"
- name="app.update.service.enabled"
- type="bool"/>
-#endif
#endif
<preference id="browser.search.update"
@@ -331,13 +325,6 @@
accesskey="&updateHistory.accesskey;"
preference="app.update.disable_button.showUpdateHistory"/>
</hbox>
-
-#ifdef MOZ_MAINTENANCE_SERVICE
- <checkbox id="useService"
- label="&useService.label;"
- accesskey="&useService.accesskey;"
- preference="app.update.service.enabled"/>
-#endif
</groupbox>
#endif
<groupbox id="updateOthers" align="start">
diff --git a/application/basilisk/components/preferences/in-content/containers.js b/application/basilisk/components/preferences/in-content/containers.js
deleted file mode 100644
index 758e45fff..000000000
--- a/application/basilisk/components/preferences/in-content/containers.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
-
-const containersBundle = Services.strings.createBundle("chrome://browser/locale/preferences/containers.properties");
-
-const defaultContainerIcon = "fingerprint";
-const defaultContainerColor = "blue";
-
-let gContainersPane = {
-
- init() {
- this._list = document.getElementById("containersView");
-
- document.getElementById("backContainersLink").addEventListener("click", function () {
- gotoPref("privacy");
- });
-
- this._rebuildView();
- },
-
- _rebuildView() {
- const containers = ContextualIdentityService.getIdentities();
- while (this._list.firstChild) {
- this._list.firstChild.remove();
- }
- for (let container of containers) {
- let item = document.createElement("richlistitem");
- item.setAttribute("containerName", ContextualIdentityService.getUserContextLabel(container.userContextId));
- item.setAttribute("containerIcon", container.icon);
- item.setAttribute("containerColor", container.color);
- item.setAttribute("userContextId", container.userContextId);
-
- this._list.appendChild(item);
- }
- },
-
- onRemoveClick(button) {
- let userContextId = button.getAttribute("value");
- ContextualIdentityService.remove(userContextId);
- this._rebuildView();
- },
- onPeferenceClick(button) {
- this.openPreferenceDialog(button.getAttribute("value"));
- },
-
- onAddButtonClick(button) {
- this.openPreferenceDialog(null);
- },
-
- openPreferenceDialog(userContextId) {
- let identity = {
- name: "",
- icon: defaultContainerIcon,
- color: defaultContainerColor
- };
- let title;
- if (userContextId) {
- identity = ContextualIdentityService.getIdentityFromId(userContextId);
- // This is required to get the translation string from defaults
- identity.name = ContextualIdentityService.getUserContextLabel(identity.userContextId);
- title = containersBundle.formatStringFromName("containers.updateContainerTitle", [identity.name], 1);
- }
-
- const params = { userContextId, identity, windowTitle: title };
- gSubDialog.open("chrome://browser/content/preferences/containers.xul",
- null, params);
- }
-
-};
diff --git a/application/basilisk/components/preferences/in-content/containers.xul b/application/basilisk/components/preferences/in-content/containers.xul
deleted file mode 100644
index e83bac1c3..000000000
--- a/application/basilisk/components/preferences/in-content/containers.xul
+++ /dev/null
@@ -1,54 +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/.
-
-<!-- Containers panel -->
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/containers.js"/>
-
-<preferences id="containerPreferences" hidden="true" data-category="paneContainer">
- <!-- Containers -->
- <preference id="privacy.userContext.enabled"
- name="privacy.userContext.enabled"
- type="bool"/>
-
-</preferences>
-
-<hbox hidden="true"
- class="container-header-links"
- data-category="paneContainers">
- <label class="text-link" id="backContainersLink" value="&backLink.label;" />
-</hbox>
-
-<hbox id="header-containers"
- class="header"
- hidden="true"
- data-category="paneContainers">
- <label class="header-name" flex="1">&paneContainers.title;</label>
- <button class="help-button"
- aria-label="&helpButton.label;"/>
-</hbox>
-
-<!-- Containers -->
-<groupbox id="browserContainersGroup" data-category="paneContainers" hidden="true">
- <vbox id="browserContainersbox">
-
- <richlistbox id="containersView" orient="vertical" persist="lastSelectedType"
- flex="1">
- <listheader equalsize="always">
- <treecol id="typeColumn" label="&label.label;" value="type"
- persist="sortDirection"
- flex="1" sortDirection="ascending"/>
- <treecol id="actionColumn" value="action"
- persist="sortDirection"
- flex="1"/>
- </listheader>
- </richlistbox>
- </vbox>
- <vbox>
- <hbox flex="1">
- <button onclick="gContainersPane.onAddButtonClick();" accesskey="&addButton.accesskey;" label="&addButton.label;"/>
- </hbox>
- </vbox>
-</groupbox>
diff --git a/application/basilisk/components/preferences/in-content/jar.mn b/application/basilisk/components/preferences/in-content/jar.mn
index e61a88856..21f5ccf38 100644
--- a/application/basilisk/components/preferences/in-content/jar.mn
+++ b/application/basilisk/components/preferences/in-content/jar.mn
@@ -3,16 +3,17 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
- content/browser/preferences/in-content/preferences.js
+* content/browser/preferences/in-content/preferences.js
* content/browser/preferences/in-content/preferences.xul
content/browser/preferences/in-content/subdialogs.js
content/browser/preferences/in-content/main.js
* content/browser/preferences/in-content/privacy.js
- content/browser/preferences/in-content/containers.js
content/browser/preferences/in-content/advanced.js
content/browser/preferences/in-content/applications.js
* content/browser/preferences/in-content/content.js
+#ifdef MOZ_SERVICES_SYNC
content/browser/preferences/in-content/sync.js
+#endif
* content/browser/preferences/in-content/security.js
content/browser/preferences/in-content/search.js
diff --git a/application/basilisk/components/preferences/in-content/preferences.js b/application/basilisk/components/preferences/in-content/preferences.js
index e18ab4b04..69cb180d5 100644
--- a/application/basilisk/components/preferences/in-content/preferences.js
+++ b/application/basilisk/components/preferences/in-content/preferences.js
@@ -61,11 +61,12 @@ function init_all() {
register_module("paneGeneral", gMainPane);
register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane);
- register_module("paneContainers", gContainersPane);
register_module("paneAdvanced", gAdvancedPane);
register_module("paneApplications", gApplicationsPane);
register_module("paneContent", gContentPane);
+#ifdef MOZ_SERVICES_SYNC
register_module("paneSync", gSyncPane);
+#endif
register_module("paneSecurity", gSecurityPane);
let categories = document.getElementById("categories");
diff --git a/application/basilisk/components/preferences/in-content/preferences.xul b/application/basilisk/components/preferences/in-content/preferences.xul
index 7ec7ef119..61639aa19 100644
--- a/application/basilisk/components/preferences/in-content/preferences.xul
+++ b/application/basilisk/components/preferences/in-content/preferences.xul
@@ -13,7 +13,6 @@
href="chrome://browser/content/preferences/handlers.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/search.css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/containers.css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
@@ -23,12 +22,12 @@
<!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
<!ENTITY % tabsDTD SYSTEM "chrome://browser/locale/preferences/tabs.dtd">
<!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
+#ifdef MOZ_SERVICES_SYNC
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
<!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
+#endif
<!ENTITY % securityDTD SYSTEM
"chrome://browser/locale/preferences/security.dtd">
-<!ENTITY % containersDTD SYSTEM
- "chrome://browser/locale/preferences/containers.dtd">
<!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
<!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
@@ -43,10 +42,11 @@
%privacyDTD;
%tabsDTD;
%searchDTD;
+#ifdef MOZ_SERVICES_SYNC
%syncBrandDTD;
%syncDTD;
+#endif
%securityDTD;
-%containersDTD;
%sanitizeDTD;
%mainDTD;
%aboutHomeDTD;
@@ -134,12 +134,6 @@
<label class="category-name" flex="1">&panePrivacy.title;</label>
</richlistitem>
- <richlistitem id="category-containers"
- class="category"
- value="paneContainers"
- helpTopic="prefs-containers"
- hidden="true"/>
-
<richlistitem id="category-security"
class="category"
value="paneSecurity"
@@ -150,6 +144,7 @@
<label class="category-name" flex="1">&paneSecurity.title;</label>
</richlistitem>
+#ifdef MOZ_SERVICES_SYNC
<richlistitem id="category-sync"
class="category"
value="paneSync"
@@ -159,6 +154,7 @@
<image class="category-icon"/>
<label class="category-name" flex="1">&paneSync.title;</label>
</richlistitem>
+#endif
<richlistitem id="category-advanced"
class="category"
@@ -183,12 +179,13 @@
#include main.xul
#include search.xul
#include privacy.xul
-#include containers.xul
#include advanced.xul
#include applications.xul
#include content.xul
#include security.xul
+#ifdef MOZ_SERVICES_SYNC
#include sync.xul
+#endif
</prefpane>
</vbox>
diff --git a/application/basilisk/components/preferences/in-content/privacy.js b/application/basilisk/components/preferences/in-content/privacy.js
index eab606e36..a976fb4fa 100644
--- a/application/basilisk/components/preferences/in-content/privacy.js
+++ b/application/basilisk/components/preferences/in-content/privacy.js
@@ -5,8 +5,6 @@
Components.utils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
- "resource://gre/modules/ContextualIdentityService.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
@@ -62,59 +60,6 @@ var gPrivacyPane = {
},
/**
- * Show the Containers UI depending on the privacy.userContext.ui.enabled pref.
- */
- _initBrowserContainers: function () {
- if (!Services.prefs.getBoolPref("privacy.userContext.ui.enabled")) {
- return;
- }
-
- let link = document.getElementById("browserContainersLearnMore");
- link.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "containers";
-
- document.getElementById("browserContainersbox").hidden = false;
-
- document.getElementById("browserContainersCheckbox").checked =
- Services.prefs.getBoolPref("privacy.userContext.enabled");
- },
-
- _checkBrowserContainers: function(event) {
- let checkbox = document.getElementById("browserContainersCheckbox");
- if (checkbox.checked) {
- Services.prefs.setBoolPref("privacy.userContext.enabled", true);
- return;
- }
-
- let count = ContextualIdentityService.countContainerTabs();
- if (count == 0) {
- Services.prefs.setBoolPref("privacy.userContext.enabled", false);
- return;
- }
-
- let bundlePreferences = document.getElementById("bundlePreferences");
-
- let title = bundlePreferences.getString("disableContainersAlertTitle");
- let message = PluralForm.get(count, bundlePreferences.getString("disableContainersMsg"))
- .replace("#S", count)
- let okButton = PluralForm.get(count, bundlePreferences.getString("disableContainersOkButton"))
- .replace("#S", count)
- let cancelButton = bundlePreferences.getString("disableContainersButton2");
-
- let buttonFlags = (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0) +
- (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1);
-
- let rv = Services.prompt.confirmEx(window, title, message, buttonFlags,
- okButton, cancelButton, null, null, {});
- if (rv == 0) {
- ContextualIdentityService.closeAllContainerTabs();
- Services.prefs.setBoolPref("privacy.userContext.enabled", false);
- return;
- }
-
- checkbox.checked = true;
- },
-
- /**
* Sets up the UI for the number of days of history to keep, and updates the
* label of the "Clear Now..." button.
*/
@@ -136,7 +81,6 @@ var gPrivacyPane = {
this._initTrackingProtectionPBM();
#endif
this._initAutocomplete();
- this._initBrowserContainers();
setEventListener("privacy.sanitize.sanitizeOnShutdown", "change",
gPrivacyPane._updateSanitizeSettingsButton);
@@ -184,10 +128,6 @@ var gPrivacyPane = {
setEventListener("changeBlockListPBM", "command",
gPrivacyPane.showBlockLists);
#endif
- setEventListener("browserContainersCheckbox", "command",
- gPrivacyPane._checkBrowserContainers);
- setEventListener("browserContainersSettings", "command",
- gPrivacyPane.showContainerSettings);
},
#ifdef MOZ_SAFE_BROWSING
@@ -489,13 +429,6 @@ var gPrivacyPane = {
},
#endif
- /**
- * Displays container panel for customising and adding containers.
- */
- showContainerSettings() {
- gotoPref("containers");
- },
-
#ifdef MOZ_SAFE_BROWSING
/**
* Displays the available block lists for tracking protection.
@@ -702,25 +635,4 @@ var gPrivacyPane = {
settingsButton.disabled = !sanitizeOnShutdownPref.value;
},
-
- // CONTAINERS
-
- /*
- * preferences:
- *
- * privacy.userContext.enabled
- * - true if containers is enabled
- */
-
- /**
- * Enables/disables the Settings button used to configure containers
- */
- readBrowserContainersCheckbox: function ()
- {
- var pref = document.getElementById("privacy.userContext.enabled");
- var settings = document.getElementById("browserContainersSettings");
-
- settings.disabled = !pref.value;
- }
-
};
diff --git a/application/basilisk/components/preferences/in-content/privacy.xul b/application/basilisk/components/preferences/in-content/privacy.xul
index e6cdc5dd2..691cd6bf9 100644
--- a/application/basilisk/components/preferences/in-content/privacy.xul
+++ b/application/basilisk/components/preferences/in-content/privacy.xul
@@ -302,28 +302,3 @@
&suggestionSettings.label;
</label>
</groupbox>
-
-<!-- Containers -->
-<groupbox id="browserContainersGroup" data-category="panePrivacy" hidden="true">
- <vbox id="browserContainersbox" hidden="true">
- <caption><label>&browserContainersHeader.label;
- <label id="browserContainersLearnMore" class="text-link"
- value="&browserContainersLearnMore.label;"/>
- </label></caption>
- <hbox align="start">
- <vbox>
- <checkbox id="browserContainersCheckbox"
- label="&browserContainersEnabled.label;"
- accesskey="&browserContainersEnabled.accesskey;"
- preference="privacy.userContext.enabled"
- onsyncfrompreference="return gPrivacyPane.readBrowserContainersCheckbox();"/>
- </vbox>
- <spacer flex="1"/>
- <vbox>
- <button id="browserContainersSettings"
- label="&browserContainersSettings.label;"
- accesskey="&browserContainersSettings.accesskey;"/>
- </vbox>
- </hbox>
- </vbox>
-</groupbox>
diff --git a/application/basilisk/components/preferences/in-content/sync.js b/application/basilisk/components/preferences/in-content/sync.js
index 2600677a8..917b5f123 100644
--- a/application/basilisk/components/preferences/in-content/sync.js
+++ b/application/basilisk/components/preferences/in-content/sync.js
@@ -1,32 +1,16 @@
/* 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/. */
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {
- return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
-});
-
-XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
- "resource://gre/modules/FxAccounts.jsm");
-
const PAGE_NO_ACCOUNT = 0;
const PAGE_HAS_ACCOUNT = 1;
const PAGE_NEEDS_UPDATE = 2;
-const FXA_PAGE_LOGGED_OUT = 3;
-const FXA_PAGE_LOGGED_IN = 4;
-
-// Indexes into the "login status" deck.
-// We are in a successful verified state - everything should work!
-const FXA_LOGIN_VERIFIED = 0;
-// We have logged in to an unverified account.
-const FXA_LOGIN_UNVERIFIED = 1;
-// We are logged in locally, but the server rejected our credentials.
-const FXA_LOGIN_FAILED = 2;
var gSyncPane = {
+ _stringBundle: null,
prefArray: ["engine.bookmarks", "engine.passwords", "engine.prefs",
"engine.tabs", "engine.history"],
@@ -45,13 +29,11 @@ var gSyncPane = {
needsUpdate: function () {
this.page = PAGE_NEEDS_UPDATE;
let label = document.getElementById("loginError");
- label.textContent = Weave.Utils.getErrorString(Weave.Status.login);
+ label.value = Weave.Utils.getErrorString(Weave.Status.login);
label.className = "error";
},
init: function () {
- this._setupEventListeners();
-
// If the Service hasn't finished initializing, wait for it.
let xps = Components.classes["@mozilla.org/weave/service;1"]
.getService(Components.interfaces.nsISupports)
@@ -62,10 +44,6 @@ var gSyncPane = {
return;
}
- // it may take some time before we can determine what provider to use
- // and the state of that provider, so show the "please wait" page.
- this._showLoadPage(xps);
-
let onUnload = function () {
window.removeEventListener("unload", onUnload, false);
try {
@@ -85,247 +63,50 @@ var gSyncPane = {
xps.ensureLoaded();
},
- _showLoadPage: function (xps) {
- let username;
- try {
- username = Services.prefs.getCharPref("services.sync.username");
- } catch (e) {}
- if (!username) {
- this.page = FXA_PAGE_LOGGED_OUT;
- } else if (xps.fxAccountsEnabled) {
- // Use cached values while we wait for the up-to-date values
- let cachedComputerName;
- try {
- cachedComputerName = Services.prefs.getCharPref("services.sync.client.name");
- }
- catch (e) {
- cachedComputerName = "";
- }
- document.getElementById("fxaEmailAddress1").textContent = username;
- this._populateComputerName(cachedComputerName);
- this.page = FXA_PAGE_LOGGED_IN;
- } else { // Old Sync
- this.page = PAGE_HAS_ACCOUNT;
- }
- },
-
_init: function () {
let topics = ["weave:service:login:error",
"weave:service:login:finish",
- "weave:service:start-over:finish",
+ "weave:service:start-over",
"weave:service:setup-complete",
- "weave:service:logout:finish",
- FxAccountsCommon.ONVERIFIED_NOTIFICATION,
- FxAccountsCommon.ONLOGIN_NOTIFICATION,
- FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION,
- ];
+ "weave:service:logout:finish"];
+
// Add the observers now and remove them on unload
- // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
+ //XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
// of `this`. Fix in a followup. (bug 583347)
topics.forEach(function (topic) {
Weave.Svc.Obs.add(topic, this.updateWeavePrefs, this);
}, this);
-
window.addEventListener("unload", function() {
topics.forEach(function (topic) {
Weave.Svc.Obs.remove(topic, this.updateWeavePrefs, this);
}, gSyncPane);
}, false);
- XPCOMUtils.defineLazyGetter(this, '_stringBundle', () => {
- return Services.strings.createBundle("chrome://browser/locale/preferences/preferences.properties");
- });
-
- XPCOMUtils.defineLazyGetter(this, '_accountsStringBundle', () => {
- return Services.strings.createBundle("chrome://browser/locale/accounts.properties");
- });
-
- let url = Services.prefs.getCharPref("identity.mobilepromo.android") + "sync-preferences";
- document.getElementById("fxaMobilePromo-android").setAttribute("href", url);
- document.getElementById("fxaMobilePromo-android-hasFxaAccount").setAttribute("href", url);
- url = Services.prefs.getCharPref("identity.mobilepromo.ios") + "sync-preferences";
- document.getElementById("fxaMobilePromo-ios").setAttribute("href", url);
- document.getElementById("fxaMobilePromo-ios-hasFxaAccount").setAttribute("href", url);
-
- document.getElementById("tosPP-small-ToS").setAttribute("href", gSyncUtils.tosURL);
- document.getElementById("tosPP-normal-ToS").setAttribute("href", gSyncUtils.tosURL);
- document.getElementById("tosPP-small-PP").setAttribute("href", gSyncUtils.privacyPolicyURL);
- document.getElementById("tosPP-normal-PP").setAttribute("href", gSyncUtils.privacyPolicyURL);
-
- fxAccounts.promiseAccountsManageURI(this._getEntryPoint()).then(url => {
- document.getElementById("verifiedManage").setAttribute("href", url);
- });
-
+ this._stringBundle =
+ Services.strings.createBundle("chrome://browser/locale/preferences/preferences.properties");
this.updateWeavePrefs();
-
- this._initProfileImageUI();
- },
-
- _toggleComputerNameControls: function(editMode) {
- let textbox = document.getElementById("fxaSyncComputerName");
- textbox.disabled = !editMode;
- document.getElementById("fxaChangeDeviceName").hidden = editMode;
- document.getElementById("fxaCancelChangeDeviceName").hidden = !editMode;
- document.getElementById("fxaSaveChangeDeviceName").hidden = !editMode;
- },
-
- _focusComputerNameTextbox: function() {
- let textbox = document.getElementById("fxaSyncComputerName");
- let valLength = textbox.value.length;
- textbox.focus();
- textbox.setSelectionRange(valLength, valLength);
- },
-
- _blurComputerNameTextbox: function() {
- document.getElementById("fxaSyncComputerName").blur();
- },
-
- _focusAfterComputerNameTextbox: function() {
- // Focus the most appropriate element that's *not* the "computer name" box.
- Services.focus.moveFocus(window,
- document.getElementById("fxaSyncComputerName"),
- Services.focus.MOVEFOCUS_FORWARD, 0);
- },
-
- _updateComputerNameValue: function(save) {
- if (save) {
- let textbox = document.getElementById("fxaSyncComputerName");
- Weave.Service.clientsEngine.localName = textbox.value;
- }
- this._populateComputerName(Weave.Service.clientsEngine.localName);
- },
-
- _setupEventListeners: function() {
- function setEventListener(aId, aEventType, aCallback)
- {
- document.getElementById(aId)
- .addEventListener(aEventType, aCallback.bind(gSyncPane));
- }
-
- setEventListener("noAccountSetup", "click", function (aEvent) {
- aEvent.stopPropagation();
- gSyncPane.openSetup(null);
- });
- setEventListener("noAccountPair", "click", function (aEvent) {
- aEvent.stopPropagation();
- gSyncPane.openSetup('pair');
- });
- setEventListener("syncChangePassword", "command",
- () => gSyncUtils.changePassword());
- setEventListener("syncResetPassphrase", "command",
- () => gSyncUtils.resetPassphrase());
- setEventListener("syncReset", "command", gSyncPane.resetSync);
- setEventListener("syncAddDeviceLabel", "click", function () {
- gSyncPane.openAddDevice();
- return false;
- });
- setEventListener("syncEnginesList", "select", function () {
- if (this.selectedCount)
- this.clearSelection();
- });
- setEventListener("syncComputerName", "change", function (e) {
- gSyncUtils.changeName(e.target);
- });
- setEventListener("fxaChangeDeviceName", "command", function () {
- this._toggleComputerNameControls(true);
- this._focusComputerNameTextbox();
- });
- setEventListener("fxaCancelChangeDeviceName", "command", function () {
- // We explicitly blur the textbox because of bug 75324, then after
- // changing the state of the buttons, force focus to whatever the focus
- // manager thinks should be next (which on the mac, depends on an OSX
- // keyboard access preference)
- this._blurComputerNameTextbox();
- this._toggleComputerNameControls(false);
- this._updateComputerNameValue(false);
- this._focusAfterComputerNameTextbox();
- });
- setEventListener("fxaSaveChangeDeviceName", "command", function () {
- // Work around bug 75324 - see above.
- this._blurComputerNameTextbox();
- this._toggleComputerNameControls(false);
- this._updateComputerNameValue(true);
- this._focusAfterComputerNameTextbox();
- });
- setEventListener("unlinkDevice", "click", function () {
- gSyncPane.startOver(true);
- return false;
- });
- setEventListener("loginErrorUpdatePass", "click", function () {
- gSyncPane.updatePass();
- return false;
- });
- setEventListener("loginErrorResetPass", "click", function () {
- gSyncPane.resetPass();
- return false;
- });
- setEventListener("loginErrorStartOver", "click", function () {
- gSyncPane.startOver(true);
- return false;
- });
- setEventListener("noFxaSignUp", "command", function () {
- gSyncPane.signUp();
- return false;
- });
- setEventListener("noFxaSignIn", "command", function () {
- gSyncPane.signIn();
- return false;
- });
- setEventListener("fxaUnlinkButton", "command", function () {
- gSyncPane.unlinkFirefoxAccount(true);
- });
- setEventListener("verifyFxaAccount", "command",
- gSyncPane.verifyFirefoxAccount);
- setEventListener("unverifiedUnlinkFxaAccount", "command", function () {
- /* no warning as account can't have previously synced */
- gSyncPane.unlinkFirefoxAccount(false);
- });
- setEventListener("rejectReSignIn", "command",
- gSyncPane.reSignIn);
- setEventListener("rejectUnlinkFxaAccount", "command", function () {
- gSyncPane.unlinkFirefoxAccount(true);
- });
- setEventListener("fxaSyncComputerName", "keypress", function (e) {
- if (e.keyCode == KeyEvent.DOM_VK_RETURN) {
- document.getElementById("fxaSaveChangeDeviceName").click();
- } else if (e.keyCode == KeyEvent.DOM_VK_ESCAPE) {
- document.getElementById("fxaCancelChangeDeviceName").click();
- }
- });
- },
-
- _initProfileImageUI: function () {
- try {
- if (Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled")) {
- document.getElementById("fxaProfileImage").hidden = false;
- }
- } catch (e) { }
+ document.getElementById("weavePrefsDeck").setAttribute("hidden", "");
},
updateWeavePrefs: function () {
- let service = Components.classes["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
if (Weave.Status.service == Weave.CLIENT_NOT_CONFIGURED ||
Weave.Svc.Prefs.get("firstSync", "") == "notReady") {
this.page = PAGE_NO_ACCOUNT;
- // else: sync was previously configured for the legacy provider, so we
- // make the "old" panels available.
} else if (Weave.Status.login == Weave.LOGIN_FAILED_INVALID_PASSPHRASE ||
Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) {
this.needsUpdate();
} else {
this.page = PAGE_HAS_ACCOUNT;
- document.getElementById("accountName").textContent = Weave.Service.identity.account;
+ document.getElementById("accountName").value = Weave.Service.identity.account;
document.getElementById("syncComputerName").value = Weave.Service.clientsEngine.localName;
- document.getElementById("tosPP-normal").hidden = this._usingCustomServer;
+ document.getElementById("tosPP").hidden = this._usingCustomServer;
}
},
startOver: function (showDialog) {
if (showDialog) {
let flags = Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING +
- Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL +
+ Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL +
Services.prompt.BUTTON_POS_1_DEFAULT;
let buttonChoice =
Services.prompt.confirmEx(window,
@@ -336,8 +117,9 @@ var gSyncPane = {
null, null, null, {});
// If the user selects cancel, just bail
- if (buttonChoice == 1)
+ if (buttonChoice == 1) {
return;
+ }
}
Weave.Service.startOver();
@@ -345,33 +127,19 @@ var gSyncPane = {
},
updatePass: function () {
- if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED)
+ if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) {
gSyncUtils.changePassword();
- else
+ } else {
gSyncUtils.updatePassphrase();
+ }
},
resetPass: function () {
- if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED)
+ if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) {
gSyncUtils.resetPassword();
- else
+ } else {
gSyncUtils.resetPassphrase();
- },
-
- _getEntryPoint: function () {
- let params = new URLSearchParams(document.URL.split("#")[0].split("?")[1] || "");
- return params.get("entrypoint") || "preferences";
- },
-
- _openAboutAccounts: function(action) {
- let entryPoint = this._getEntryPoint();
- let params = new URLSearchParams();
- if (action) {
- params.set("action", action);
}
- params.set("entrypoint", entryPoint);
-
- this.replaceTabWithUrl("about:accounts?" + params);
},
/**
@@ -384,163 +152,16 @@ var gSyncPane = {
* "reset" -- reset sync
*/
openSetup: function (wizardType) {
- let service = Components.classes["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
-
- if (service.fxAccountsEnabled) {
- this._openAboutAccounts();
+ let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
+ if (win) {
+ win.focus();
} else {
- let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
- if (win)
- win.focus();
- else {
- window.openDialog("chrome://browser/content/sync/setup.xul",
- "weaveSetup", "centerscreen,chrome,resizable=no",
- wizardType);
- }
- }
- },
-
- openContentInBrowser: function(url, options) {
- let win = Services.wm.getMostRecentWindow("navigator:browser");
- if (!win) {
- // no window to use, so use _openLink to create a new one. We don't
- // always use that as it prefers to open a new window rather than use
- // an existing one.
- gSyncUtils._openLink(url);
- return;
- }
- win.switchToTabHavingURI(url, true, options);
- },
-
- // Replace the current tab with the specified URL.
- replaceTabWithUrl(url) {
- // Get the <browser> element hosting us.
- let browser = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell)
- .chromeEventHandler;
- // And tell it to load our URL.
- browser.loadURI(url);
- },
-
- signUp: function() {
- this._openAboutAccounts("signup");
- },
-
- signIn: function() {
- this._openAboutAccounts("signin");
- },
-
- reSignIn: function() {
- this._openAboutAccounts("reauth");
- },
-
-
- clickOrSpaceOrEnterPressed: function(event) {
- // Note: charCode is deprecated, but 'char' not yet implemented.
- // Replace charCode with char when implemented, see Bug 680830
- return ((event.type == "click" && event.button == 0) ||
- (event.type == "keypress" &&
- (event.charCode == KeyEvent.DOM_VK_SPACE || event.keyCode == KeyEvent.DOM_VK_RETURN)));
- },
-
- openChangeProfileImage: function(event) {
- if (this.clickOrSpaceOrEnterPressed(event)) {
- fxAccounts.promiseAccountsChangeProfileURI(this._getEntryPoint(), "avatar")
- .then(url => {
- this.openContentInBrowser(url, {
- replaceQueryString: true
- });
- });
- // Prevent page from scrolling on the space key.
- event.preventDefault();
+ window.openDialog("chrome://browser/content/sync/setup.xul",
+ "weaveSetup", "centerscreen,chrome,resizable=no",
+ wizardType);
}
},
- openManageFirefoxAccount: function(event) {
- if (this.clickOrSpaceOrEnterPressed(event)) {
- this.manageFirefoxAccount();
- // Prevent page from scrolling on the space key.
- event.preventDefault();
- }
- },
-
- manageFirefoxAccount: function() {
- fxAccounts.promiseAccountsManageURI(this._getEntryPoint())
- .then(url => {
- this.openContentInBrowser(url, {
- replaceQueryString: true
- });
- });
- },
-
- verifyFirefoxAccount: function() {
- let showVerifyNotification = (data) => {
- let isError = !data;
- let maybeNot = isError ? "Not" : "";
- let sb = this._accountsStringBundle;
- let title = sb.GetStringFromName("verification" + maybeNot + "SentTitle");
- let email = !isError && data ? data.email : "";
- let body = sb.formatStringFromName("verification" + maybeNot + "SentBody", [email], 1);
- new Notification(title, { body })
- }
-
- let onError = () => {
- showVerifyNotification();
- };
-
- let onSuccess = data => {
- if (data) {
- showVerifyNotification(data);
- } else {
- onError();
- }
- };
-
- fxAccounts.resendVerificationEmail()
- .then(fxAccounts.getSignedInUser, onError)
- .then(onSuccess, onError);
- },
-
- openOldSyncSupportPage: function() {
- let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "old-sync";
- this.openContentInBrowser(url);
- },
-
- unlinkFirefoxAccount: function(confirm) {
- if (confirm) {
- // We use a string bundle shared with aboutAccounts.
- let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
- let disconnectLabel = sb.GetStringFromName("disconnect.label");
- let title = sb.GetStringFromName("disconnect.verify.title");
- let body = sb.GetStringFromName("disconnect.verify.bodyHeading") +
- "\n\n" +
- sb.GetStringFromName("disconnect.verify.bodyText");
- let ps = Services.prompt;
- let buttonFlags = (ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING) +
- (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL) +
- ps.BUTTON_POS_1_DEFAULT;
-
- let factory = Cc["@mozilla.org/prompter;1"]
- .getService(Ci.nsIPromptFactory);
- let prompt = factory.getPrompt(window, Ci.nsIPrompt);
- let bag = prompt.QueryInterface(Ci.nsIWritablePropertyBag2);
- bag.setPropertyAsBool("allowTabModal", true);
-
- let pressed = prompt.confirmEx(title, body, buttonFlags,
- disconnectLabel, null, null, null, {});
-
- if (pressed != 0) { // 0 is the "continue" button
- return;
- }
- }
- fxAccounts.signOut().then(() => {
- this.updateWeavePrefs();
- });
- },
-
openQuotaDialog: function () {
let win = Services.wm.getMostRecentWindow("Sync:ViewQuota");
if (win) {
@@ -552,27 +173,21 @@ var gSyncPane = {
},
openAddDevice: function () {
- if (!Weave.Utils.ensureMPUnlocked())
+ if (!Weave.Utils.ensureMPUnlocked()) {
return;
+ }
let win = Services.wm.getMostRecentWindow("Sync:AddDevice");
- if (win)
+ if (win) {
win.focus();
- else
+ } else {
window.openDialog("chrome://browser/content/sync/addDevice.xul",
"syncAddDevice", "centerscreen,chrome,resizable=no");
+ }
},
resetSync: function () {
this.openSetup("reset");
},
-
- _populateComputerName(value) {
- let textbox = document.getElementById("fxaSyncComputerName");
- if (!textbox.hasAttribute("placeholder")) {
- textbox.setAttribute("placeholder",
- Weave.Utils.getDefaultDeviceName());
- }
- textbox.value = value;
- },
};
+
diff --git a/application/basilisk/components/preferences/in-content/sync.xul b/application/basilisk/components/preferences/in-content/sync.xul
index cf0e81ca1..7ca075483 100644
--- a/application/basilisk/components/preferences/in-content/sync.xul
+++ b/application/basilisk/components/preferences/in-content/sync.xul
@@ -1,35 +1,22 @@
-# 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/.
-
-<!-- Sync panel -->
-
-<preferences id="syncEnginePrefs" hidden="true" data-category="paneSync">
- <preference id="engine.addons"
- name="services.sync.engine.addons"
- type="bool"/>
- <preference id="engine.bookmarks"
- name="services.sync.engine.bookmarks"
- type="bool"/>
- <preference id="engine.history"
- name="services.sync.engine.history"
- type="bool"/>
- <preference id="engine.tabs"
- name="services.sync.engine.tabs"
- type="bool"/>
- <preference id="engine.prefs"
- name="services.sync.engine.prefs"
- type="bool"/>
- <preference id="engine.passwords"
- name="services.sync.engine.passwords"
- type="bool"/>
-</preferences>
+<!-- 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/. -->
<script type="application/javascript"
src="chrome://browser/content/preferences/in-content/sync.js"/>
<script type="application/javascript"
src="chrome://browser/content/sync/utils.js"/>
+<preferences>
+<!-- <preference id="engine.addons" name="services.sync.engine.addons" type="bool"/> -->
+ <preference id="engine.bookmarks" name="services.sync.engine.bookmarks" type="bool"/>
+ <preference id="engine.history" name="services.sync.engine.history" type="bool"/>
+ <preference id="engine.tabs" name="services.sync.engine.tabs" type="bool"/>
+ <preference id="engine.prefs" name="services.sync.engine.prefs" type="bool"/>
+ <preference id="engine.passwords" name="services.sync.engine.passwords" type="bool"/>
+</preferences>
+
+
<hbox id="header-sync"
class="header"
hidden="true"
@@ -39,22 +26,19 @@
</hbox>
<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
- <!-- These panels are for the "legacy" sync provider -->
<vbox id="noAccount" align="center">
<spacer flex="1"/>
<description id="syncDesc">
&weaveDesc.label;
</description>
<separator/>
- <label id="noAccountSetup" class="text-link">
- &setupButton.label;
- </label>
- <vbox id="pairDevice">
- <separator/>
- <label id="noAccountPair" class="text-link">
- &pairDevice.label;
- </label>
- </vbox>
+ <label class="text-link"
+ onclick="event.stopPropagation(); gSyncPane.openSetup(null);"
+ value="&setupButton.label;"/>
+ <separator/>
+ <label class="text-link"
+ onclick="event.stopPropagation(); gSyncPane.openSetup('pair');"
+ value="&pairDevice.label;"/>
<spacer flex="3"/>
</vbox>
@@ -63,7 +47,7 @@
<!-- label is set to account name -->
<caption id="accountCaption" align="center">
<image id="accountCaptionImage"/>
- <label id="accountName"/>
+ <label id="accountName" value=""/>
</caption>
<hbox>
@@ -71,28 +55,39 @@
label="&manageAccount.label;"
accesskey="&manageAccount.accesskey;">
<menupopup>
- <menuitem id="syncViewQuota" label="&viewQuota.label;"
+ <menuitem label="&viewQuota.label;"
oncommand="gSyncPane.openQuotaDialog();"/>
- <menuseparator/>
- <menuitem id="syncChangePassword" label="&changePassword2.label;"/>
- <menuitem id="syncResetPassphrase" label="&myRecoveryKey.label;"/>
<menuseparator/>
- <menuitem id="syncReset" label="&resetSync2.label;"/>
+ <menuitem label="&changePassword2.label;"
+ oncommand="gSyncUtils.changePassword();"/>
+ <menuitem label="&myRecoveryKey.label;"
+ oncommand="gSyncUtils.resetPassphrase();"/>
+ <menuseparator/>
+ <menuitem label="&resetSync2.label;"
+ oncommand="gSyncPane.resetSync();"/>
</menupopup>
</button>
</hbox>
<hbox>
<label id="syncAddDeviceLabel"
- class="text-link">
- &pairDevice.label;
- </label>
+ class="text-link"
+ onclick="gSyncPane.openAddDevice(); return false;"
+ value="&pairDevice.label;"/>
</hbox>
<vbox>
- <label>&syncMy.label;</label>
+ <label value="&syncMy.label;" />
<richlistbox id="syncEnginesList"
- orient="vertical">
+ orient="vertical"
+ onselect="if (this.selectedCount) this.clearSelection();">
+ <!--
+ <richlistitem>
+ <checkbox label="&engine.addons.label;"
+ accesskey="&engine.addons.accesskey;"
+ preference="engine.addons"/>
+ </richlistitem>
+ -->
<richlistitem>
<checkbox label="&engine.bookmarks.label;"
accesskey="&engine.bookmarks.accesskey;"
@@ -130,228 +125,42 @@
</columns>
<rows>
<row align="center">
- <label control="syncComputerName">
- &syncDeviceName.label;
- </label>
- <textbox id="syncComputerName"/>
+ <label value="&syncDeviceName.label;"
+ accesskey="&syncDeviceName.accesskey;"
+ control="syncComputerName"/>
+ <textbox id="syncComputerName"
+ onchange="gSyncUtils.changeName(this)"/>
</row>
</rows>
</grid>
<hbox>
- <label id="unlinkDevice" class="text-link">
- &unlinkDevice.label;
- </label>
+ <label class="text-link"
+ onclick="gSyncPane.startOver(true); return false;"
+ value="&unlinkDevice.label;"/>
</hbox>
</groupbox>
- <vbox id="tosPP-normal">
- <label id="tosPP-normal-ToS" class="text-link">
- &prefs.tosLink.label;
- </label>
- <label id="tosPP-normal-PP" class="text-link">
- &prefs.ppLink.label;
- </label>
- </vbox>
- </vbox>
-
- <vbox id="needsUpdate" align="center" pack="center">
- <hbox>
- <label id="loginError"/>
- <label id="loginErrorUpdatePass" class="text-link">
- &updatePass.label;
- </label>
- <label id="loginErrorResetPass" class="text-link">
- &resetPass.label;
- </label>
+ <hbox id="tosPP" pack="center">
+ <label class="text-link"
+ onclick="event.stopPropagation();gSyncUtils.openToS();"
+ value="&prefs.tosLink.label;"/>
+ <label class="text-link"
+ onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();"
+ value="&prefs.ppLink.label;"/>
</hbox>
- <label id="loginErrorStartOver" class="text-link">
- &unlinkDevice.label;
- </label>
</vbox>
- <!-- These panels are for the Firefox Accounts identity provider -->
- <vbox id="noFxaAccount">
- <hbox>
- <vbox id="fxaContentWrapper">
- <groupbox id="noFxaGroup">
- <vbox>
- <label id="noFxaCaption">&signedOut.caption;</label>
- <description id="noFxaDescription" flex="1">&signedOut.description;</description>
- <hbox class="fxaAccountBox">
- <vbox>
- <image class="fxaFirefoxLogo"/>
- </vbox>
- <vbox flex="1">
- <label id="signedOutAccountBoxTitle">&signedOut.accountBox.title;</label>
- <hbox class="fxaAccountBoxButtons">
- <button id="noFxaSignUp" label="&signedOut.accountBox.create;" accesskey="&signedOut.accountBox.create.accesskey;"></button>
- <button id="noFxaSignIn" label="&signedOut.accountBox.signin;" accesskey="&signedOut.accountBox.signin.accesskey;"></button>
- </hbox>
- </vbox>
- </hbox>
- </vbox>
- </groupbox>
- </vbox>
- <vbox>
- <image class="fxaSyncIllustration"/>
- </vbox>
- </hbox>
- <label class="fxaMobilePromo">
- &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
- --><label id="fxaMobilePromo-android"
- class="androidLink text-link"><!--
- -->&mobilePromo3.androidLink;</label><!--
- -->&mobilePromo3.iOSBefore;<!--
- --><label id="fxaMobilePromo-ios"
- class="iOSLink text-link"><!--
- -->&mobilePromo3.iOSLink;</label><!--
- -->&mobilePromo3.end;
- </label>
- </vbox>
-
- <vbox id="hasFxaAccount">
+ <vbox id="needsUpdate" align="center" pack="center">
<hbox>
- <vbox id="fxaContentWrapper">
- <groupbox id="fxaGroup">
- <caption><label>&syncBrand.fxAccount.label;</label></caption>
- <deck id="fxaLoginStatus">
-
- <!-- logged in and verified and all is good -->
- <hbox id="fxaLoginVerified" class="fxaAccountBox">
- <vbox align="center" pack="center">
- <image id="fxaProfileImage" class="actionable"
- role="button"
- onclick="gSyncPane.openChangeProfileImage(event);" hidden="true"
- onkeypress="gSyncPane.openChangeProfileImage(event);"
- tooltiptext="&profilePicture.tooltip;"/>
- </vbox>
- <vbox flex="1" pack="center">
- <label id="fxaDisplayName" hidden="true"/>
- <label id="fxaEmailAddress1"/>
- <hbox class="fxaAccountBoxButtons">
- <button id="fxaUnlinkButton" label="&disconnect.label;" accesskey="&disconnect.accesskey;"/>
- <html:a id="verifiedManage" target="_blank"
- accesskey="&verifiedManage.accesskey;"
- onkeypress="gSyncPane.openManageFirefoxAccount(event);"><!--
- -->&verifiedManage.label;</html:a>
- </hbox>
- </vbox>
- </hbox>
-
- <!-- logged in to an unverified account -->
- <hbox id="fxaLoginUnverified" class="fxaAccountBox">
- <vbox>
- <image id="fxaProfileImage"/>
- </vbox>
- <vbox flex="1">
- <hbox>
- <vbox><image id="fxaLoginRejectedWarning"/></vbox>
- <description flex="1">
- &signedInUnverified.beforename.label;
- <label id="fxaEmailAddress2"/>
- &signedInUnverified.aftername.label;
- </description>
- </hbox>
- <hbox class="fxaAccountBoxButtons">
- <button id="verifyFxaAccount" accesskey="&verify.accesskey;">&verify.label;</button>
- <button id="unverifiedUnlinkFxaAccount" accesskey="&forget.accesskey;">&forget.label;</button>
- </hbox>
- </vbox>
- </hbox>
-
- <!-- logged in locally but server rejected credentials -->
- <hbox id="fxaLoginRejected" class="fxaAccountBox">
- <vbox>
- <image id="fxaProfileImage"/>
- </vbox>
- <vbox flex="1">
- <hbox>
- <vbox><image id="fxaLoginRejectedWarning"/></vbox>
- <description flex="1">
- &signedInLoginFailure.beforename.label;
- <label id="fxaEmailAddress3"/>
- &signedInLoginFailure.aftername.label;
- </description>
- </hbox>
- <hbox class="fxaAccountBoxButtons">
- <button id="rejectReSignIn" accessky="&signIn.accesskey;">&signIn.label;</button>
- <button id="rejectUnlinkFxaAccount" accesskey="&forget.accesskey;">&forget.label;</button>
- </hbox>
- </vbox>
- </hbox>
- </deck>
- </groupbox>
- <groupbox id="syncOptions">
- <caption><label>&signedIn.engines.label;</label></caption>
- <hbox id="fxaSyncEngines">
- <vbox align="start" flex="1">
- <checkbox label="&engine.tabs.label;"
- accesskey="&engine.tabs.accesskey;"
- preference="engine.tabs"/>
- <checkbox label="&engine.bookmarks.label;"
- accesskey="&engine.bookmarks.accesskey;"
- preference="engine.bookmarks"/>
- <checkbox label="&engine.passwords.label;"
- accesskey="&engine.passwords.accesskey;"
- preference="engine.passwords"/>
- </vbox>
- <vbox align="start" flex="1">
- <checkbox label="&engine.history.label;"
- accesskey="&engine.history.accesskey;"
- preference="engine.history"/>
- <checkbox label="&engine.addons.label;"
- accesskey="&engine.addons.accesskey;"
- preference="engine.addons"/>
- <checkbox label="&engine.prefs.label;"
- accesskey="&engine.prefs.accesskey;"
- preference="engine.prefs"/>
- </vbox>
- <spacer/>
- </hbox>
- </groupbox>
- </vbox>
- <vbox>
- <image class="fxaSyncIllustration"/>
- </vbox>
+ <label id="loginError" value=""/>
+ <label class="text-link"
+ onclick="gSyncPane.updatePass(); return false;"
+ value="&updatePass.label;"/>
+ <label class="text-link"
+ onclick="gSyncPane.resetPass(); return false;"
+ value="&resetPass.label;"/>
</hbox>
- <groupbox>
- <caption>
- <label control="fxaSyncComputerName">
- &fxaSyncDeviceName.label;
- </label>
- </caption>
- <hbox id="fxaDeviceName">
- <textbox id="fxaSyncComputerName" disabled="true"/>
- <hbox>
- <button id="fxaChangeDeviceName"
- label="&changeSyncDeviceName.label;"
- accesskey="&changeSyncDeviceName.accesskey;"/>
- <button id="fxaCancelChangeDeviceName"
- label="&cancelChangeSyncDeviceName.label;"
- accesskey="&cancelChangeSyncDeviceName.accesskey;"
- hidden="true"/>
- <button id="fxaSaveChangeDeviceName"
- label="&saveChangeSyncDeviceName.label;"
- accesskey="&saveChangeSyncDeviceName.accesskey;"
- hidden="true"/>
- </hbox>
- </hbox>
- </groupbox>
- <label class="fxaMobilePromo">
- &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
- --><label class="androidLink text-link" id="fxaMobilePromo-android-hasFxaAccount"><!--
- -->&mobilePromo3.androidLink;</label><!--
- -->&mobilePromo3.iOSBefore;<!--
- --><label class="iOSLink text-link" id="fxaMobilePromo-ios-hasFxaAccount"><!--
- -->&mobilePromo3.iOSLink;</label><!--
- -->&mobilePromo3.end;
- </label>
- <vbox id="tosPP-small" align="start">
- <label id="tosPP-small-ToS" class="text-link">
- &prefs.tosLink.label;
- </label>
- <label id="tosPP-small-PP" class="text-link">
- &fxaPrivacyNotice.link.label;
- </label>
- </vbox>
+ <label class="text-link"
+ onclick="gSyncPane.startOver(true); return false;"
+ value="&unlinkDevice.label;"/>
</vbox>
</deck>
diff --git a/application/basilisk/components/preferences/jar.mn b/application/basilisk/components/preferences/jar.mn
index 5b24e89df..f74be0820 100644
--- a/application/basilisk/components/preferences/jar.mn
+++ b/application/basilisk/components/preferences/jar.mn
@@ -24,8 +24,6 @@ browser.jar:
* content/browser/preferences/languages.xul
content/browser/preferences/languages.js
content/browser/preferences/permissions.xul
- content/browser/preferences/containers.xul
- content/browser/preferences/containers.js
content/browser/preferences/permissions.js
content/browser/preferences/sanitize.xul
content/browser/preferences/sanitize.js
diff --git a/application/basilisk/components/sessionstore/ContentRestore.jsm b/application/basilisk/components/sessionstore/ContentRestore.jsm
index d4972bcaf..8b3867624 100644
--- a/application/basilisk/components/sessionstore/ContentRestore.jsm
+++ b/application/basilisk/components/sessionstore/ContentRestore.jsm
@@ -208,10 +208,6 @@ ContentRestoreInternal.prototype = {
? Utils.deserializePrincipal(loadArguments.triggeringPrincipal)
: null;
- if (loadArguments.userContextId) {
- webNavigation.setOriginAttributesBeforeLoading({ userContextId: loadArguments.userContextId });
- }
-
webNavigation.loadURIWithOptions(loadArguments.uri, loadArguments.flags,
referrer, referrerPolicy, postData,
null, null, triggeringPrincipal);
diff --git a/application/basilisk/components/sessionstore/SessionHistory.jsm b/application/basilisk/components/sessionstore/SessionHistory.jsm
index 3d28d87db..907a60839 100644
--- a/application/basilisk/components/sessionstore/SessionHistory.jsm
+++ b/application/basilisk/components/sessionstore/SessionHistory.jsm
@@ -64,11 +64,10 @@ var SessionHistoryInternal = {
* The docShell that owns the session history.
*/
collect: function (docShell) {
- let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
let webNavigation = docShell.QueryInterface(Ci.nsIWebNavigation);
let history = webNavigation.sessionHistory.QueryInterface(Ci.nsISHistoryInternal);
- let data = {entries: [], userContextId: loadContext.originAttributes.userContextId };
+ let data = {entries: []};
if (history && history.count > 0) {
// Loop over the transaction linked list directly so we can get the
diff --git a/application/basilisk/components/sessionstore/SessionStore.jsm b/application/basilisk/components/sessionstore/SessionStore.jsm
index b599bc162..086bb914a 100644
--- a/application/basilisk/components/sessionstore/SessionStore.jsm
+++ b/application/basilisk/components/sessionstore/SessionStore.jsm
@@ -2204,10 +2204,9 @@ var SessionStoreInternal = {
}
// Create a new tab.
- let userContextId = aTab.getAttribute("usercontextid");
let newTab = aTab == aWindow.gBrowser.selectedTab ?
- aWindow.gBrowser.addTab(null, {relatedToCurrent: true, ownerTab: aTab, userContextId}) :
- aWindow.gBrowser.addTab(null, {userContextId});
+ aWindow.gBrowser.addTab(null, {relatedToCurrent: true, ownerTab: aTab}) :
+ aWindow.gBrowser.addTab();
// Set tab title to "Connecting..." and start the throbber to pretend we're
// doing something while actually waiting for data from the frame script.
@@ -2296,7 +2295,7 @@ var SessionStoreInternal = {
// create a new tab
let tabbrowser = aWindow.gBrowser;
- let tab = tabbrowser.selectedTab = tabbrowser.addTab(null, state);
+ let tab = tabbrowser.selectedTab = tabbrowser.addTab();
// restore tab content
this.restoreTab(tab, state);
@@ -3100,31 +3099,13 @@ var SessionStoreInternal = {
let numVisibleTabs = 0;
for (var t = 0; t < newTabCount; t++) {
- // When trying to restore into existing tab, we also take the userContextId
- // into account if present.
- let userContextId = winData.tabs[t].userContextId;
- let reuseExisting = t < openTabCount &&
- (tabbrowser.tabs[t].getAttribute("usercontextid") == (userContextId || ""));
- // If the tab is pinned, then we'll be loading it right away, and
- // there's no need to cause a remoteness flip by loading it initially
- // non-remote.
- let forceNotRemote = !winData.tabs[t].pinned;
- let tab = reuseExisting ? tabbrowser.tabs[t] :
- tabbrowser.addTab("about:blank",
- {skipAnimation: true,
- forceNotRemote,
- userContextId,
- skipBackgroundNotify: true});
-
- // If we inserted a new tab because the userContextId didn't match with the
- // open tab, even though `t < openTabCount`, we need to remove that open tab
- // and put the newly added tab in its place.
- if (!reuseExisting && t < openTabCount) {
- tabbrowser.removeTab(tabbrowser.tabs[t]);
- tabbrowser.moveTabTo(tab, t);
- }
-
- tabs.push(tab);
+ tabs.push(t < openTabCount ?
+ tabbrowser.tabs[t] :
+ tabbrowser.addTab("about:blank", {
+ skipAnimation: true,
+ forceNotRemote: true,
+ skipBackgroundNotify: true
+ }));
if (winData.tabs[t].pinned)
tabbrowser.pinTab(tabs[t]);
@@ -3531,9 +3512,6 @@ var SessionStoreInternal = {
let uri = activePageData ? activePageData.url || null : null;
if (aLoadArguments) {
uri = aLoadArguments.uri;
- if (aLoadArguments.userContextId) {
- browser.setAttribute("usercontextid", aLoadArguments.userContextId);
- }
}
// We have to mark this tab as restoring first, otherwise
diff --git a/application/basilisk/components/sessionstore/TabState.jsm b/application/basilisk/components/sessionstore/TabState.jsm
index f22c52fe3..ac846031b 100644
--- a/application/basilisk/components/sessionstore/TabState.jsm
+++ b/application/basilisk/components/sessionstore/TabState.jsm
@@ -181,10 +181,6 @@ var TabStateInternal = {
if (key === "history") {
tabData.entries = value.entries;
- if (value.hasOwnProperty("userContextId")) {
- tabData.userContextId = value.userContextId;
- }
-
if (value.hasOwnProperty("index")) {
tabData.index = value.index;
}
diff --git a/application/basilisk/base/content/sync/aboutSyncTabs-bindings.xml b/application/basilisk/components/sync/aboutSyncTabs-bindings.xml
index e6108209a..e6108209a 100644
--- a/application/basilisk/base/content/sync/aboutSyncTabs-bindings.xml
+++ b/application/basilisk/components/sync/aboutSyncTabs-bindings.xml
diff --git a/application/basilisk/base/content/sync/aboutSyncTabs.css b/application/basilisk/components/sync/aboutSyncTabs.css
index 5a353175b..5a353175b 100644
--- a/application/basilisk/base/content/sync/aboutSyncTabs.css
+++ b/application/basilisk/components/sync/aboutSyncTabs.css
diff --git a/application/basilisk/base/content/sync/aboutSyncTabs.js b/application/basilisk/components/sync/aboutSyncTabs.js
index f4bb607ea..4808c052f 100644
--- a/application/basilisk/base/content/sync/aboutSyncTabs.js
+++ b/application/basilisk/components/sync/aboutSyncTabs.js
@@ -11,14 +11,6 @@ Cu.import("resource://gre/modules/PlacesUtils.jsm", this);
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-
-#ifdef MOZ_SERVICES_CLOUDSYNC
-XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
- "resource://gre/modules/CloudSync.jsm");
-#endif
-
var RemoteTabViewer = {
_tabsList: null,
@@ -26,8 +18,6 @@ var RemoteTabViewer = {
Services.obs.addObserver(this, "weave:service:login:finish", false);
Services.obs.addObserver(this, "weave:engine:sync:finish", false);
- Services.obs.addObserver(this, "cloudsync:tabs:update", false);
-
this._tabsList = document.getElementById("tabsList");
this.buildList(true);
@@ -36,14 +26,12 @@ var RemoteTabViewer = {
uninit: function () {
Services.obs.removeObserver(this, "weave:service:login:finish");
Services.obs.removeObserver(this, "weave:engine:sync:finish");
-
- Services.obs.removeObserver(this, "cloudsync:tabs:update");
},
- createItem: function (attrs) {
+ createItem: function(attrs) {
let item = document.createElement("richlistitem");
- // Copy the attributes from the argument into the item.
+ // Copy the attributes from the argument into the item
for (let attr in attrs) {
item.setAttribute(attr, attrs[attr]);
}
@@ -55,7 +43,7 @@ var RemoteTabViewer = {
return item;
},
- filterTabs: function (event) {
+ filterTabs: function(event) {
let val = event.target.value.toLowerCase();
let numTabs = this._tabsList.getRowCount();
let clientTabs = 0;
@@ -65,7 +53,7 @@ var RemoteTabViewer = {
let item = this._tabsList.getItemAtIndex(i);
let hide = false;
if (item.getAttribute("type") == "tab") {
- if (!item.getAttribute("url").toLowerCase().includes(val) &&
+ if (!item.getAttribute("url").toLowerCase().includes(val) &&
!item.getAttribute("title").toLowerCase().includes(val)) {
hide = true;
} else {
@@ -88,10 +76,10 @@ var RemoteTabViewer = {
}
},
- openSelected: function () {
+ openSelected: function() {
let items = this._tabsList.selectedItems;
let urls = [];
- for (let i = 0; i < items.length; i++) {
+ for (let i = 0;i < items.length;i++) {
if (items[i].getAttribute("type") == "tab") {
urls.push(items[i].getAttribute("url"));
let index = this._tabsList.getIndexOfItem(items[i]);
@@ -104,7 +92,7 @@ var RemoteTabViewer = {
}
},
- bookmarkSingleTab: function () {
+ bookmarkSingleTab: function() {
let item = this._tabsList.selectedItems[0];
let uri = Weave.Utils.makeURI(item.getAttribute("url"));
let title = item.getAttribute("title");
@@ -119,10 +107,10 @@ var RemoteTabViewer = {
}, window.top);
},
- bookmarkSelectedTabs: function () {
+ bookmarkSelectedTabs: function() {
let items = this._tabsList.selectedItems;
let URIs = [];
- for (let i = 0; i < items.length; i++) {
+ for (let i = 0;i < items.length;i++) {
if (items[i].getAttribute("type") == "tab") {
let uri = Weave.Utils.makeURI(items[i].getAttribute("url"));
if (!uri) {
@@ -157,7 +145,7 @@ var RemoteTabViewer = {
_buildListRequested: false,
- buildList: function (forceSync) {
+ buildList: function (force) {
if (this._waitingForBuildList) {
this._buildListRequested = true;
return;
@@ -168,37 +156,27 @@ var RemoteTabViewer = {
this._clearTabList();
- if (Weave.Service.isLoggedIn) {
- this._refetchTabs(forceSync);
+ if (Weave.Service.isLoggedIn && this._refetchTabs(force)) {
this._generateWeaveTabList();
} else {
- // XXXzpao We should say something about not being logged in & not having data
+ //XXXzpao We should say something about not being logged in & not having data
// or tell the appropriate condition. (bug 583344)
}
- let complete = () => {
+ function complete() {
this._waitingForBuildList = false;
if (this._buildListRequested) {
CommonUtils.nextTick(this.buildList, this);
}
}
-#ifdef MOZ_SERVICES_CLOUDSYNC
- if (CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs()) {
- this._generateCloudSyncTabList()
- .then(complete, complete);
- } else {
- complete();
- }
-#else
complete();
-#endif
},
_clearTabList: function () {
let list = this._tabsList;
- // Clear out existing richlistitems.
+ // Clear out existing richlistitems
let count = list.getRowCount();
if (count > 0) {
for (let i = count - 1; i >= 0; i--) {
@@ -214,7 +192,7 @@ var RemoteTabViewer = {
let seenURLs = new Set();
let localURLs = engine.getOpenURLs();
- for (let [, client] of Object.entries(engine.getAllClients())) {
+ for (let [guid, client] in Iterator(engine.getAllClients())) {
// Create the client node, but don't add it in-case we don't show any tabs
let appendClient = true;
@@ -248,37 +226,7 @@ var RemoteTabViewer = {
}
},
- _generateCloudSyncTabList: function () {
- let updateTabList = function (remoteTabs) {
- let list = this._tabsList;
-
- for (let client of remoteTabs) {
- let clientAttrs = {
- type: "client",
- clientName: client.name,
- };
-
- let clientEnt = this.createItem(clientAttrs);
- list.appendChild(clientEnt);
-
- for (let tab of client.tabs) {
- let tabAttrs = {
- type: "tab",
- title: tab.title,
- url: tab.url,
- icon: this.getIcon(tab.icon),
- };
- let tabEnt = this.createItem(tabAttrs);
- list.appendChild(tabEnt);
- }
- }
- }.bind(this);
-
- return CloudSync().tabs.getRemoteTabs()
- .then(updateTabList, Promise.reject.bind(Promise));
- },
-
- adjustContextMenu: function (event) {
+ adjustContextMenu: function(event) {
let mode = "all";
switch (this._tabsList.selectedItems.length) {
case 0:
@@ -303,16 +251,10 @@ var RemoteTabViewer = {
}
},
- _refetchTabs: function (force) {
+ _refetchTabs: function(force) {
if (!force) {
// Don't bother refetching tabs if we already did so recently
- let lastFetch = 0;
- try {
- lastFetch = Services.prefs.getIntPref("services.sync.lastTabFetch");
- }
- catch (e) {
- /* Just use the default value of 0 */
- }
+ lastFetch = Services.prefs.getIntPref("services.sync.lastTabFetch", 0);
let now = Math.floor(Date.now() / 1000);
if (now - lastFetch < 30) {
@@ -320,40 +262,40 @@ var RemoteTabViewer = {
}
}
- // Ask Sync to just do the tabs engine if it can.
- Weave.Service.sync(["tabs"]);
+ // if Clients hasn't synced yet this session, we need to sync it as well.
+ if (Weave.Service.clientsEngine.lastSync == 0) {
+ Weave.Service.clientsEngine.sync();
+ }
+
+ // Force a sync only for the tabs engine
+ let engine = Weave.Service.engineManager.get("tabs");
+ engine.lastModified = null;
+ engine.sync();
Services.prefs.setIntPref("services.sync.lastTabFetch",
Math.floor(Date.now() / 1000));
return true;
},
- observe: function (subject, topic, data) {
+ observe: function(subject, topic, data) {
switch (topic) {
case "weave:service:login:finish":
- // A login has finished, which means that a Sync is about to start and
- // we will eventually get to the "tabs" engine - but try and force the
- // tab engine to sync first by passing |true| for the forceSync param.
this.buildList(true);
break;
case "weave:engine:sync:finish":
- if (data == "tabs") {
- // The tabs engine just finished, so re-build the list without
- // forcing a new sync of the tabs engine.
+ if (subject == "tabs") {
this.buildList(false);
}
break;
- case "cloudsync:tabs:update":
- this.buildList(false);
- break;
}
},
- handleClick: function (event) {
+ handleClick: function(event) {
if (event.target.getAttribute("type") != "tab") {
return;
}
+
if (event.button == 1) {
let url = event.target.getAttribute("url");
openUILink(url, event);
@@ -362,3 +304,4 @@ var RemoteTabViewer = {
}
}
}
+
diff --git a/application/basilisk/base/content/sync/aboutSyncTabs.xul b/application/basilisk/components/sync/aboutSyncTabs.xul
index a4aa0032f..a4aa0032f 100644
--- a/application/basilisk/base/content/sync/aboutSyncTabs.xul
+++ b/application/basilisk/components/sync/aboutSyncTabs.xul
diff --git a/application/basilisk/base/content/sync/addDevice.js b/application/basilisk/components/sync/addDevice.js
index 0390d4397..0390d4397 100644
--- a/application/basilisk/base/content/sync/addDevice.js
+++ b/application/basilisk/components/sync/addDevice.js
diff --git a/application/basilisk/base/content/sync/addDevice.xul b/application/basilisk/components/sync/addDevice.xul
index 83c3b7b3c..f2371aad0 100644
--- a/application/basilisk/base/content/sync/addDevice.xul
+++ b/application/basilisk/components/sync/addDevice.xul
@@ -43,7 +43,7 @@
&pairDevice.dialog.description.label;
<label class="text-link"
value="&addDevice.showMeHow.label;"
- href="https://services.mozilla.com/sync/help/add-device"/>
+ href="http://www.palemoon.org/sync/help/easy-setup.shtml"/>
</description>
<separator class="groove-thin"/>
<description>
diff --git a/application/basilisk/base/content/sync/genericChange.js b/application/basilisk/components/sync/genericChange.js
index 51a74f1b1..df6639178 100644
--- a/application/basilisk/base/content/sync/genericChange.js
+++ b/application/basilisk/components/sync/genericChange.js
@@ -32,6 +32,7 @@ var Change = {
onLoad: function Change_onLoad() {
/* Load labels */
let introText = document.getElementById("introText");
+ let introText2 = document.getElementById("introText2");
let warningText = document.getElementById("warningText");
// load some other elements & info from the window
@@ -69,7 +70,6 @@ var Change = {
else {
document.getElementById("generatePassphraseButton").hidden = false;
document.getElementById("passphraseBackupButtons").hidden = false;
- this._passphraseBox.setAttribute("readonly", "true");
let pp = Weave.Service.identity.syncKey;
if (Weave.Utils.isPassphrase(pp))
pp = Weave.Utils.hyphenatePassphrase(pp);
@@ -120,7 +120,7 @@ var Change = {
_updateStatus: function Change__updateStatus(str, state) {
this._updateStatusWithString(this._str(str), state);
},
-
+
_updateStatusWithString: function Change__updateStatusWithString(string, state) {
this._statusRow.hidden = false;
this._status.value = string;
@@ -141,10 +141,11 @@ var Change = {
case "UpdatePassphrase":
case "ResetPassphrase":
return this.doChangePassphrase();
+ break;
case "ChangePassword":
return this.doChangePassword();
+ break;
}
- return undefined;
},
doGeneratePassphrase: function () {
@@ -212,10 +213,10 @@ var Change = {
[valid, errorString] = gSyncUtils.validatePassword(this._firstBox, this._secondBox);
}
else {
- if (!this._updatingPassphrase)
- return;
-
- valid = this._passphraseBox.value != "";
+ //Pale Moon: Enforce minimum length of 8 for allowed custom passphrase
+ //and don't restrict it to "out of sync" situations only. People who
+ //go to this page generally know what they are doing ;)
+ valid = this._passphraseBox.value.length >= 8;
}
if (errorString == "")
diff --git a/application/basilisk/base/content/sync/genericChange.xul b/application/basilisk/components/sync/genericChange.xul
index db74a1b31..3c0b2cd6c 100644
--- a/application/basilisk/base/content/sync/genericChange.xul
+++ b/application/basilisk/components/sync/genericChange.xul
@@ -67,7 +67,7 @@
<label id="generatePassphraseButton"
hidden="true"
value="&syncGenerateNewKey.label;"
- class="text-link"
+ class="text-link inline-link"
onclick="event.stopPropagation();
Change.doGeneratePassphrase();"/>
</hbox>
@@ -105,7 +105,7 @@
<description>
&existingRecoveryKey.description;
<label class="text-link"
- href="https://services.mozilla.com/sync/help/manual-setup">
+ href="http://www.palemoon.org/sync/help/recoverykey.shtml">
&addDevice.showMeHow.label;
</label>
</description>
diff --git a/application/basilisk/components/sync/jar.mn b/application/basilisk/components/sync/jar.mn
new file mode 100644
index 000000000..3782038cd
--- /dev/null
+++ b/application/basilisk/components/sync/jar.mn
@@ -0,0 +1,22 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+browser.jar:
+ content/browser/sync/aboutSyncTabs.xul
+ content/browser/sync/aboutSyncTabs.js
+ content/browser/sync/aboutSyncTabs.css
+ content/browser/sync/aboutSyncTabs-bindings.xml
+ content/browser/sync/setup.xul
+ content/browser/sync/addDevice.js
+ content/browser/sync/addDevice.xul
+ content/browser/sync/setup.js
+ content/browser/sync/genericChange.xul
+ content/browser/sync/genericChange.js
+ content/browser/sync/key.xhtml
+ content/browser/sync/notification.xml
+ content/browser/sync/quota.xul
+ content/browser/sync/quota.js
+ content/browser/sync/utils.js
+ content/browser/sync/progress.js
+ content/browser/sync/progress.xhtml \ No newline at end of file
diff --git a/application/basilisk/base/content/sync/key.xhtml b/application/basilisk/components/sync/key.xhtml
index 1363132e7..92abf0ee6 100644
--- a/application/basilisk/base/content/sync/key.xhtml
+++ b/application/basilisk/components/sync/key.xhtml
@@ -44,7 +44,7 @@
<p><em>&syncKey.keepItSafe1.description;</em>&syncKey.keepItSafe2.description;<em>&syncKey.keepItSafe3.description;</em>&syncKey.keepItSafe4a.description;</p>
</div>
-<p>&syncKey.findOutMore1.label;<a href="https://services.mozilla.com">https://services.mozilla.com</a>&syncKey.findOutMore2.label;</p>
+<p>&syncKey.findOutMore1.label;<a href="http://www.palemoon.org/sync/">http://www.palemoon.org/sync/</a>&syncKey.findOutMore2.label;</p>
<footer>
&syncKey.footer1.label;<a id="tosLink" href="termsURL">termsURL</a>&syncKey.footer2.label;<a id="ppLink" href="privacyURL">privacyURL</a>&syncKey.footer3.label;
diff --git a/application/basilisk/components/webextensions/schemas/moz.build b/application/basilisk/components/sync/moz.build
index aac3a838c..2d64d506c 100644
--- a/application/basilisk/components/webextensions/schemas/moz.build
+++ b/application/basilisk/components/sync/moz.build
@@ -1,7 +1,8 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn']
+
diff --git a/application/basilisk/components/sync/notification.xml b/application/basilisk/components/sync/notification.xml
new file mode 100644
index 000000000..8ac881e08
--- /dev/null
+++ b/application/basilisk/components/sync/notification.xml
@@ -0,0 +1,129 @@
+<?xml version="1.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/. -->
+
+<!DOCTYPE bindings [
+<!ENTITY % notificationDTD SYSTEM "chrome://global/locale/notification.dtd">
+%notificationDTD;
+]>
+
+<bindings id="notificationBindings"
+ xmlns="http://www.mozilla.org/xbl"
+ xmlns:xbl="http://www.mozilla.org/xbl"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <binding id="notificationbox" extends="chrome://global/content/bindings/notification.xml#notificationbox">
+ <content>
+ <xul:vbox xbl:inherits="hidden=notificationshidden">
+ <xul:spacer/>
+ <children includes="notification"/>
+ </xul:vbox>
+ <children/>
+ </content>
+
+ <implementation>
+ <constructor><![CDATA[
+ let temp = {};
+ Cu.import("resource://services-common/observers.js", temp);
+ temp.Observers.add("weave:notification:added", this.onNotificationAdded, this);
+ temp.Observers.add("weave:notification:removed", this.onNotificationRemoved, this);
+
+ for each (var notification in Weave.Notifications.notifications)
+ this._appendNotification(notification);
+ ]]></constructor>
+
+ <destructor><![CDATA[
+ let temp = {};
+ Cu.import("resource://services-common/observers.js", temp);
+ temp.Observers.remove("weave:notification:added", this.onNotificationAdded, this);
+ temp.Observers.remove("weave:notification:removed", this.onNotificationRemoved, this);
+ ]]></destructor>
+
+ <method name="onNotificationAdded">
+ <parameter name="subject"/>
+ <parameter name="data"/>
+ <body><![CDATA[
+ this._appendNotification(subject);
+ ]]></body>
+ </method>
+
+ <method name="onNotificationRemoved">
+ <parameter name="subject"/>
+ <parameter name="data"/>
+ <body><![CDATA[
+ // If the view of the notification hasn't been removed yet, remove it.
+ var notifications = this.allNotifications;
+ for each (var notification in notifications) {
+ if (notification.notification == subject) {
+ notification.close();
+ break;
+ }
+ }
+ ]]></body>
+ </method>
+
+ <method name="_appendNotification">
+ <parameter name="notification"/>
+ <body><![CDATA[
+ var node = this.appendNotification(notification.description,
+ notification.title,
+ notification.iconURL,
+ notification.priority,
+ notification.buttons);
+ node.notification = notification;
+ ]]></body>
+ </method>
+
+ </implementation>
+ </binding>
+
+ <binding id="notification" extends="chrome://global/content/bindings/notification.xml#notification">
+ <content>
+ <xul:hbox class="notification-inner outset" flex="1" xbl:inherits="type">
+ <xul:toolbarbutton ondblclick="event.stopPropagation();"
+ class="messageCloseButton close-icon tabbable"
+ xbl:inherits="hidden=hideclose"
+ tooltiptext="&closeNotification.tooltip;"
+ oncommand="document.getBindingParent(this).close()"/>
+ <xul:hbox anonid="details" align="center" flex="1">
+ <xul:image anonid="messageImage" class="messageImage" xbl:inherits="src=image,type"/>
+ <xul:description anonid="messageText" class="messageText" xbl:inherits="xbl:text=label"/>
+
+ <!-- The children are the buttons defined by the notification. -->
+ <xul:hbox oncommand="document.getBindingParent(this)._doButtonCommand(event);">
+ <children/>
+ </xul:hbox>
+ </xul:hbox>
+ </xul:hbox>
+ </content>
+ <implementation>
+ <!-- Note: this used to be a field, but for some reason it kept getting
+ - reset to its default value for TabNotification elements.
+ - As a property, that doesn't happen, even though the property stores
+ - its value in a JS property |_notification| that is not defined
+ - in XBL as a field or property. Maybe this is wrong, but it works.
+ -->
+ <property name="notification"
+ onget="return this._notification"
+ onset="this._notification = val; return val;"/>
+ <method name="close">
+ <body><![CDATA[
+ Weave.Notifications.remove(this.notification);
+
+ // We should be able to call the base class's close method here
+ // to remove the notification element from the notification box,
+ // but we can't because of bug 373652, so instead we copied its code
+ // and execute it below.
+ var control = this.control;
+ if (control)
+ control.removeNotification(this);
+ else
+ this.hidden = true;
+ ]]></body>
+ </method>
+ </implementation>
+ </binding>
+
+</bindings>
diff --git a/application/basilisk/components/sync/progress.js b/application/basilisk/components/sync/progress.js
new file mode 100644
index 000000000..101160fa8
--- /dev/null
+++ b/application/basilisk/components/sync/progress.js
@@ -0,0 +1,71 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://services-sync/main.js");
+
+var gProgressBar;
+var gCounter = 0;
+
+function onLoad(event) {
+ Services.obs.addObserver(onEngineSync, "weave:engine:sync:finish", false);
+ Services.obs.addObserver(onEngineSync, "weave:engine:sync:error", false);
+ Services.obs.addObserver(onServiceSync, "weave:service:sync:finish", false);
+ Services.obs.addObserver(onServiceSync, "weave:service:sync:error", false);
+
+ gProgressBar = document.getElementById('uploadProgressBar');
+
+ if (Services.prefs.getPrefType("services.sync.firstSync") != Ci.nsIPrefBranch.PREF_INVALID) {
+ gProgressBar.hidden = false;
+ }
+ else {
+ gProgressBar.hidden = true;
+ }
+}
+
+function onUnload(event) {
+ cleanUpObservers();
+}
+
+function cleanUpObservers() {
+ try {
+ Services.obs.removeObserver(onEngineSync, "weave:engine:sync:finish");
+ Services.obs.removeObserver(onEngineSync, "weave:engine:sync:error");
+ Services.obs.removeObserver(onServiceSync, "weave:service:sync:finish");
+ Services.obs.removeObserver(onServiceSync, "weave:service:sync:error");
+ }
+ catch (e) {
+ // may be double called by unload & exit. Ignore.
+ }
+}
+
+function onEngineSync(subject, topic, data) {
+ // The Clients engine syncs first. At this point we don't necessarily know
+ // yet how many engines will be enabled, so we'll ignore the Clients engine
+ // and evaluate how many engines are enabled when the first "real" engine
+ // syncs.
+ if (data == "clients") {
+ return;
+ }
+
+ if (!gCounter &&
+ Services.prefs.getPrefType("services.sync.firstSync") != Ci.nsIPrefBranch.PREF_INVALID) {
+ gProgressBar.max = Weave.Service.engineManager.getEnabled().length;
+ }
+
+ gCounter += 1;
+ gProgressBar.setAttribute("value", gCounter);
+}
+
+function onServiceSync(subject, topic, data) {
+ // To address the case where 0 engines are synced, we will fill the
+ // progress bar so the user knows that the sync has finished.
+ gProgressBar.setAttribute("value", gProgressBar.max);
+ cleanUpObservers();
+}
+
+function closeTab() {
+ window.close();
+}
diff --git a/application/basilisk/components/sync/progress.xhtml b/application/basilisk/components/sync/progress.xhtml
new file mode 100644
index 000000000..d403cb20d
--- /dev/null
+++ b/application/basilisk/components/sync/progress.xhtml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!DOCTYPE html [
+ <!ENTITY % htmlDTD
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "DTD/xhtml1-strict.dtd">
+ %htmlDTD;
+ <!ENTITY % syncProgressDTD
+ SYSTEM "chrome://browser/locale/syncProgress.dtd">
+ %syncProgressDTD;
+ <!ENTITY % syncSetupDTD
+ SYSTEM "chrome://browser/locale/syncSetup.dtd">
+ %syncSetupDTD;
+ <!ENTITY % globalDTD
+ SYSTEM "chrome://global/locale/global.dtd">
+ %globalDTD;
+]>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>&syncProgress.pageTitle;</title>
+
+ <link rel="stylesheet" type="text/css" media="all"
+ href="chrome://browser/skin/syncProgress.css"/>
+
+ <link rel="icon" type="image/png" id="favicon"
+ href="chrome://browser/skin/sync-16.png"/>
+
+ <script type="text/javascript;version=1.8"
+ src="chrome://browser/content/sync/progress.js"/>
+ </head>
+ <body onload="onLoad(event)" onunload="onUnload(event)" dir="&locale.dir;">
+ <title>&setup.successPage.title;</title>
+ <div id="floatingBox" class="main-content">
+ <div id="title">
+ <h1>&setup.successPage.title;</h1>
+ </div>
+ <div id="successLogo">
+ <img id="brandSyncLogo" src="chrome://browser/skin/sync-128.png" alt="&syncProgress.logoAltText;" />
+ </div>
+ <div id="loadingText">
+ <p id="blurb">&syncProgress.textBlurb; </p>
+ </div>
+ <div id="progressBar">
+ <progress id="uploadProgressBar" value="0"/>
+ </div>
+ <div id="bottomRow">
+ <button id="closeButton" onclick="closeTab()">&syncProgress.closeButton; </button>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/application/basilisk/base/content/sync/quota.js b/application/basilisk/components/sync/quota.js
index b416a44cc..b416a44cc 100644
--- a/application/basilisk/base/content/sync/quota.js
+++ b/application/basilisk/components/sync/quota.js
diff --git a/application/basilisk/base/content/sync/quota.xul b/application/basilisk/components/sync/quota.xul
index 99e6ed78b..99e6ed78b 100644
--- a/application/basilisk/base/content/sync/quota.xul
+++ b/application/basilisk/components/sync/quota.xul
diff --git a/application/basilisk/base/content/sync/setup.js b/application/basilisk/components/sync/setup.js
index f9dae1bd4..e8d67a5f6 100644
--- a/application/basilisk/base/content/sync/setup.js
+++ b/application/basilisk/components/sync/setup.js
@@ -1,4 +1,3 @@
-// -*- 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/. */
@@ -51,9 +50,7 @@ var gSyncSetup = {
server: false
},
- get _remoteSites() {
- return [Weave.Service.serverURL, RECAPTCHA_DOMAIN];
- },
+ get _remoteSites() [Weave.Service.serverURL, RECAPTCHA_DOMAIN],
get _usingMainServers() {
if (this._settingUpNew)
@@ -72,7 +69,7 @@ var gSyncSetup = {
let self = this;
let addRem = function(add) {
obs.forEach(function([topic, func]) {
- // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
+ //XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
// of `this`. Fix in a followup. (bug 583347)
if (add)
Weave.Svc.Obs.add(topic, self[func], self);
@@ -81,7 +78,7 @@ var gSyncSetup = {
});
};
addRem(true);
- window.addEventListener("unload", () => addRem(false), false);
+ window.addEventListener("unload", function() addRem(false), false);
window.setTimeout(function () {
// Force Service to be loaded so that engines are registered.
@@ -123,14 +120,14 @@ var gSyncSetup = {
startNewAccountSetup: function () {
if (!Weave.Utils.ensureMPUnlocked())
- return;
+ return false;
this._settingUpNew = true;
this.wizard.pageIndex = NEW_ACCOUNT_START_PAGE;
},
useExistingAccount: function () {
if (!Weave.Utils.ensureMPUnlocked())
- return;
+ return false;
this._settingUpNew = false;
if (this.wizardType == "pair") {
// We're already pairing, so there's no point in pairing again.
@@ -512,6 +509,7 @@ var gSyncSetup = {
onWizardBack: function () {
switch (this.wizard.pageIndex) {
case NEW_ACCOUNT_START_PAGE:
+ case EXISTING_ACCOUNT_LOGIN_PAGE:
this.wizard.pageIndex = INTRO_PAGE;
return false;
case EXISTING_ACCOUNT_CONNECT_PAGE:
@@ -552,12 +550,19 @@ var gSyncSetup = {
for (let i = 0;i < prefs.length;i++) {
Weave.Svc.Prefs.set(prefs[i], isChecked(prefs[i]));
}
+
+ // XXX: Addons syncing is currently not operational;
+ // Make doubly-sure to always disable addons syncing pref
+ Weave.Svc.Prefs.set("engine.addons", false);
+
this._handleNoScript(false);
if (Weave.Svc.Prefs.get("firstSync", "") == "notReady")
Weave.Svc.Prefs.reset("firstSync");
Weave.Service.persistLogin();
Weave.Svc.Obs.notify("weave:service:setup-complete");
+
+ gSyncUtils.openFirstSyncProgressPage();
}
Weave.Utils.nextTick(Weave.Service.sync, Weave.Service);
window.close();
@@ -797,6 +802,7 @@ var gSyncSetup = {
let el = document.getElementById("server");
let valid = false;
let feedback = document.getElementById("serverFeedbackRow");
+ let str = "";
if (el.value) {
valid = this._validateServer(el);
let str = valid ? "" : "serverInvalid.label";
@@ -932,7 +938,12 @@ var gSyncSetup = {
let addonsEngine = Weave.Service.engineManager.get("addons");
if (addonsEngine.enabled) {
let ids = addonsEngine._store.getAllIDs();
- let blessedcount = Object.keys(ids).filter(id => ids[id]).length;
+ let blessedcount = 0;
+ for each (let i in ids) {
+ if (i) {
+ blessedcount++;
+ }
+ }
// bug 600141 does not apply, as this does not have to support existing strings
document.getElementById("addonCount").value =
PluralForm.get(blessedcount,
@@ -956,7 +967,7 @@ var gSyncSetup = {
box.appendChild(node);
}
- for (let name of Weave.Service.clientsEngine.stats.names) {
+ for each (let name in Weave.Service.clientsEngine.stats.names) {
// Don't list the current client
if (name == Weave.Service.clientsEngine.localName)
continue;
@@ -998,7 +1009,7 @@ var gSyncSetup = {
if (string) {
try {
str = this._stringBundle.GetStringFromName(string);
- } catch (e) {}
+ } catch(e) {}
if (!str)
str = Weave.Utils.getErrorString(string);
@@ -1027,7 +1038,7 @@ var gSyncSetup = {
// If we didn't find a captcha, assume it's not needed and don't show it.
let responseStatus = request.QueryInterface(Ci.nsIHttpChannel).responseStatus;
setVisibility(this.captchaBrowser, responseStatus != 404);
- // XXX TODO we should really log any responseStatus other than 200
+ //XXX TODO we should really log any responseStatus other than 200
},
onProgressChange: function() {},
onStatusChange: function() {},
diff --git a/application/basilisk/base/content/sync/setup.xul b/application/basilisk/components/sync/setup.xul
index 11c085931..cf2cc77e4 100644
--- a/application/basilisk/base/content/sync/setup.xul
+++ b/application/basilisk/components/sync/setup.xul
@@ -43,7 +43,7 @@
&pairDevice.dialog.description.label;
<label class="text-link"
value="&addDevice.showMeHow.label;"
- href="https://services.mozilla.com/sync/help/add-device"/>
+ href="http://www.palemoon.org/sync/help/easy-setup.shtml"/>
</description>
<separator class="groove-thin"/>
<description>
@@ -183,12 +183,12 @@
onclick="document.getElementById('tos').focus();
document.getElementById('tos').click()">
&setup.tosAgree1.label;
- <label class="text-link"
+ <label class="text-link inline-link"
onclick="event.stopPropagation();gSyncUtils.openToS();">
&setup.tosLink.label;
</label>
&setup.tosAgree2.label;
- <label class="text-link"
+ <label class="text-link inline-link"
onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();">
&setup.ppLink.label;
</label>
@@ -221,7 +221,7 @@
&pairDevice.setup.description.label;
<label class="text-link"
value="&addDevice.showMeHow.label;"
- href="https://services.mozilla.com/sync/help/easy-setup"/>
+ href="http://www.palemoon.org/sync/help/easy-setup.shtml"/>
</description>
<label value="&addDevice.setup.enterCode.label;"
control="easySetupPIN1"/>
@@ -340,7 +340,7 @@
<description>
&existingRecoveryKey.description;
<label class="text-link"
- href="https://services.mozilla.com/sync/help/manual-setup">
+ href="http://www.palemoon.org/sync/help/recoverykey.shtml">
&addDevice.showMeHow.label;
</label>
<spacer id="passphraseHelpSpacer"/>
@@ -359,7 +359,7 @@
<grid>
<columns>
<column/>
- <column flex="1" style="margin-inline-end: 2px"/>
+ <column flex="1" style="-moz-margin-end: 2px"/>
</columns>
<rows>
<row align="center">
@@ -375,7 +375,8 @@
<checkbox label="&engine.addons.label;"
accesskey="&engine.addons.accesskey;"
id="engine.addons"
- checked="true"/>
+ checked="false"
+ hidden="true"/>
<checkbox label="&engine.bookmarks.label;"
accesskey="&engine.bookmarks.accesskey;"
id="engine.bookmarks"
diff --git a/application/basilisk/base/content/sync/utils.js b/application/basilisk/components/sync/utils.js
index 92981f7b4..d41ecf18a 100644
--- a/application/basilisk/base/content/sync/utils.js
+++ b/application/basilisk/components/sync/utils.js
@@ -14,13 +14,6 @@ var gSyncUtils = {
return this.bundle = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
},
- get fxAccountsEnabled() {
- let service = Components.classes["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
- return service.fxAccountsEnabled;
- },
-
// opens in a new window if we're in a modal prefwindow world, in a new tab otherwise
_openLink: function (url) {
let thisDocEl = document.documentElement,
@@ -77,22 +70,16 @@ var gSyncUtils = {
this._openLink(Weave.Service.pwResetURL);
},
- get tosURL() {
- let root = this.fxAccountsEnabled ? "fxa." : "";
- return Weave.Svc.Prefs.get(root + "termsURL");
- },
-
openToS: function () {
- this._openLink(this.tosURL);
+ this._openLink(Weave.Svc.Prefs.get("termsURL"));
},
- get privacyPolicyURL() {
- let root = this.fxAccountsEnabled ? "fxa." : "";
- return Weave.Svc.Prefs.get(root + "privacyURL");
+ openPrivacyPolicy: function () {
+ this._openLink(Weave.Svc.Prefs.get("privacyURL"));
},
- openPrivacyPolicy: function () {
- this._openLink(this.privacyPolicyURL);
+ openFirstSyncProgressPage: function () {
+ this._openLink("about:sync-progress");
},
/**
@@ -134,7 +121,7 @@ var gSyncUtils = {
/**
* Print passphrase backup document.
- *
+ *
* @param elid : ID of the form element containing the passphrase.
*/
passphrasePrint: function(elid) {
@@ -162,7 +149,7 @@ var gSyncUtils = {
/**
* Save passphrase backup document to disk as HTML file.
- *
+ *
* @param elid : ID of the form element containing the passphrase.
*/
passphraseSave: function(elid) {
@@ -200,7 +187,7 @@ var gSyncUtils = {
*
* @param el1 : the first textbox element in the form
* @param el2 : the second textbox element, if omitted it's an update form
- *
+ *
* returns [valid, errorString]
*/
validatePassword: function (el1, el2) {
diff --git a/application/basilisk/components/syncedtabs/EventEmitter.jsm b/application/basilisk/components/syncedtabs/EventEmitter.jsm
deleted file mode 100644
index ec3225f0f..000000000
--- a/application/basilisk/components/syncedtabs/EventEmitter.jsm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-this.EXPORTED_SYMBOLS = [
- "EventEmitter"
-];
-
-// Simple event emitter abstraction for storage objects to use.
-function EventEmitter () {
- this._events = new Map();
-}
-
-EventEmitter.prototype = {
- on(event, listener) {
- if (this._events.has(event)) {
- this._events.get(event).add(listener);
- } else {
- this._events.set(event, new Set([listener]));
- }
- },
- off(event, listener) {
- if (!this._events.has(event)) {
- return;
- }
- this._events.get(event).delete(listener);
- },
- emit(event, ...args) {
- if (!this._events.has(event)) {
- return;
- }
- for (let listener of this._events.get(event).values()) {
- try {
- listener.apply(this, args);
- } catch (e) {
- Cu.reportError(e);
- }
- }
- },
-};
-
diff --git a/application/basilisk/components/syncedtabs/SyncedTabsDeckComponent.js b/application/basilisk/components/syncedtabs/SyncedTabsDeckComponent.js
deleted file mode 100644
index c35277795..000000000
--- a/application/basilisk/components/syncedtabs/SyncedTabsDeckComponent.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-Cu.import("resource:///modules/syncedtabs/SyncedTabsDeckStore.js");
-Cu.import("resource:///modules/syncedtabs/SyncedTabsDeckView.js");
-Cu.import("resource:///modules/syncedtabs/SyncedTabsListStore.js");
-Cu.import("resource:///modules/syncedtabs/TabListComponent.js");
-Cu.import("resource:///modules/syncedtabs/TabListView.js");
-let { getChromeWindow } = Cu.import("resource:///modules/syncedtabs/util.js", {});
-
-XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {
- return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
-});
-
-let log = Cu.import("resource://gre/modules/Log.jsm", {})
- .Log.repository.getLogger("Sync.RemoteTabs");
-
-this.EXPORTED_SYMBOLS = [
- "SyncedTabsDeckComponent"
-];
-
-/* SyncedTabsDeckComponent
- * This component instantiates views and storage objects as well as defines
- * behaviors that will be passed down to the views. This helps keep the views
- * isolated and easier to test.
- */
-
-function SyncedTabsDeckComponent({
- window, SyncedTabs, fxAccounts, deckStore, listStore, listComponent, DeckView, getChromeWindowMock,
-}) {
- this._window = window;
- this._SyncedTabs = SyncedTabs;
- this._fxAccounts = fxAccounts;
- this._DeckView = DeckView || SyncedTabsDeckView;
- // used to stub during tests
- this._getChromeWindow = getChromeWindowMock || getChromeWindow;
-
- this._deckStore = deckStore || new SyncedTabsDeckStore();
- this._syncedTabsListStore = listStore || new SyncedTabsListStore(SyncedTabs);
- this.tabListComponent = listComponent || new TabListComponent({
- window: this._window,
- store: this._syncedTabsListStore,
- View: TabListView,
- SyncedTabs: SyncedTabs,
- clipboardHelper: Cc["@mozilla.org/widget/clipboardhelper;1"]
- .getService(Ci.nsIClipboardHelper),
- getChromeWindow: this._getChromeWindow,
- });
-}
-
-SyncedTabsDeckComponent.prototype = {
- PANELS: {
- TABS_CONTAINER: "tabs-container",
- TABS_FETCHING: "tabs-fetching",
- NOT_AUTHED_INFO: "notAuthedInfo",
- SINGLE_DEVICE_INFO: "singleDeviceInfo",
- TABS_DISABLED: "tabs-disabled",
- },
-
- get container() {
- return this._deckView ? this._deckView.container : null;
- },
-
- init() {
- Services.obs.addObserver(this, this._SyncedTabs.TOPIC_TABS_CHANGED, false);
- Services.obs.addObserver(this, FxAccountsCommon.ONLOGIN_NOTIFICATION, false);
-
- // Go ahead and trigger sync
- this._SyncedTabs.syncTabs()
- .catch(Cu.reportError);
-
- this._deckView = new this._DeckView(this._window, this.tabListComponent, {
- onAndroidClick: event => this.openAndroidLink(event),
- oniOSClick: event => this.openiOSLink(event),
- onSyncPrefClick: event => this.openSyncPrefs(event)
- });
-
- this._deckStore.on("change", state => this._deckView.render(state));
- // Trigger the initial rendering of the deck view
- // Object.values only in nightly
- this._deckStore.setPanels(Object.keys(this.PANELS).map(k => this.PANELS[k]));
- // Set the initial panel to display
- this.updatePanel();
- },
-
- uninit() {
- Services.obs.removeObserver(this, this._SyncedTabs.TOPIC_TABS_CHANGED);
- Services.obs.removeObserver(this, FxAccountsCommon.ONLOGIN_NOTIFICATION);
- this._deckView.destroy();
- },
-
- observe(subject, topic, data) {
- switch (topic) {
- case this._SyncedTabs.TOPIC_TABS_CHANGED:
- this._syncedTabsListStore.getData();
- this.updatePanel();
- break;
- case FxAccountsCommon.ONLOGIN_NOTIFICATION:
- this.updatePanel();
- break;
- default:
- break;
- }
- },
-
- // There's no good way to mock fxAccounts in browser tests where it's already
- // been instantiated, so we have this method for stubbing.
- _accountStatus() {
- return this._fxAccounts.accountStatus();
- },
-
- getPanelStatus() {
- return this._accountStatus().then(exists => {
- if (!exists) {
- return this.PANELS.NOT_AUTHED_INFO;
- }
- if (!this._SyncedTabs.isConfiguredToSyncTabs) {
- return this.PANELS.TABS_DISABLED;
- }
- if (!this._SyncedTabs.hasSyncedThisSession) {
- return this.PANELS.TABS_FETCHING;
- }
- return this._SyncedTabs.getTabClients().then(clients => {
- if (clients.length) {
- return this.PANELS.TABS_CONTAINER;
- }
- return this.PANELS.SINGLE_DEVICE_INFO;
- });
- })
- .catch(err => {
- Cu.reportError(err);
- return this.PANELS.NOT_AUTHED_INFO;
- });
- },
-
- updatePanel() {
- // return promise for tests
- return this.getPanelStatus()
- .then(panelId => this._deckStore.selectPanel(panelId))
- .catch(Cu.reportError);
- },
-
- openAndroidLink(event) {
- let href = Services.prefs.getCharPref("identity.mobilepromo.android") + "synced-tabs-sidebar";
- this._openUrl(href, event);
- },
-
- openiOSLink(event) {
- let href = Services.prefs.getCharPref("identity.mobilepromo.ios") + "synced-tabs-sidebar";
- this._openUrl(href, event);
- },
-
- _openUrl(url, event) {
- this._window.openUILink(url, event);
- },
-
- openSyncPrefs() {
- this._getChromeWindow(this._window).gSyncUI.openSetup(null, "tabs-sidebar");
- }
-};
-
diff --git a/application/basilisk/components/syncedtabs/SyncedTabsDeckStore.js b/application/basilisk/components/syncedtabs/SyncedTabsDeckStore.js
deleted file mode 100644
index ede6914c8..000000000
--- a/application/basilisk/components/syncedtabs/SyncedTabsDeckStore.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-let { EventEmitter } = Cu.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
-
-this.EXPORTED_SYMBOLS = [
- "SyncedTabsDeckStore"
-];
-
-/**
- * SyncedTabsDeckStore
- *
- * This store keeps track of the deck view state, including the panels and which
- * one is selected. The view listens for change events on the store, which are
- * triggered whenever the state changes. If it's a small change, the state
- * will have `isUpdatable` set to true so the view can skip rerendering the whole
- * DOM.
- */
-function SyncedTabsDeckStore() {
- EventEmitter.call(this);
- this._panels = [];
-}
-
-Object.assign(SyncedTabsDeckStore.prototype, EventEmitter.prototype, {
- _change(isUpdatable = false) {
- let panels = this._panels.map(panel => {
- return {id: panel, selected: panel === this._selectedPanel};
- });
- this.emit("change", {panels, isUpdatable: isUpdatable});
- },
-
- /**
- * Sets the selected panelId and triggers a change event.
- * @param {String} panelId - ID of the panel to select.
- */
- selectPanel(panelId) {
- if (this._panels.indexOf(panelId) === -1 || this._selectedPanel === panelId) {
- return;
- }
- this._selectedPanel = panelId;
- this._change(true);
- },
-
- /**
- * Update the set of panels in the deck and trigger a change event.
- * @param {Array} panels - an array of IDs for each panel in the deck.
- */
- setPanels(panels) {
- if (panels === this._panels) {
- return;
- }
- this._panels = panels || [];
- this._change();
- }
-});
diff --git a/application/basilisk/components/syncedtabs/SyncedTabsDeckView.js b/application/basilisk/components/syncedtabs/SyncedTabsDeckView.js
deleted file mode 100644
index e9efff323..000000000
--- a/application/basilisk/components/syncedtabs/SyncedTabsDeckView.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-let { getChromeWindow } = Cu.import("resource:///modules/syncedtabs/util.js", {});
-
-let log = Cu.import("resource://gre/modules/Log.jsm", {})
- .Log.repository.getLogger("Sync.RemoteTabs");
-
-this.EXPORTED_SYMBOLS = [
- "SyncedTabsDeckView"
-];
-
-/**
- * SyncedTabsDeckView
- *
- * Instances of SyncedTabsDeckView render DOM nodes from a given state.
- * No state is kept internaly and the DOM will completely
- * rerender unless the state flags `isUpdatable`, which helps
- * make small changes without the overhead of a full rerender.
- */
-const SyncedTabsDeckView = function (window, tabListComponent, props) {
- this.props = props;
-
- this._window = window;
- this._doc = window.document;
-
- this._tabListComponent = tabListComponent;
- this._deckTemplate = this._doc.getElementById("deck-template");
- this.container = this._doc.createElement("div");
-};
-
-SyncedTabsDeckView.prototype = {
- render(state) {
- if (state.isUpdatable) {
- this.update(state);
- } else {
- this.create(state);
- }
- },
-
- create(state) {
- let deck = this._doc.importNode(this._deckTemplate.content, true).firstElementChild;
- this._clearChilden();
-
- let tabListWrapper = this._doc.createElement("div");
- tabListWrapper.className = "tabs-container sync-state";
- this._tabListComponent.init();
- tabListWrapper.appendChild(this._tabListComponent.container);
- deck.appendChild(tabListWrapper);
- this.container.appendChild(deck);
-
- this._generateDevicePromo();
-
- this._attachListeners();
- this.update(state);
- },
-
- _getBrowserBundle() {
- return getChromeWindow(this._window).document.getElementById("bundle_browser");
- },
-
- _generateDevicePromo() {
- let bundle = this._getBrowserBundle();
- let formatArgs = ["android", "ios"].map(os => {
- let link = this._doc.createElement("a");
- link.textContent = bundle.getString(`appMenuRemoteTabs.mobilePromo.${os}`);
- link.className = `${os}-link text-link`;
- link.setAttribute("href", "#");
- return link.outerHTML;
- });
- // Put it all together...
- let contents = bundle.getFormattedString("appMenuRemoteTabs.mobilePromo.text2", formatArgs);
- this.container.querySelector(".device-promo").innerHTML = contents;
- },
-
- destroy() {
- this._tabListComponent.uninit();
- this.container.remove();
- },
-
- update(state) {
- // Note that we may also want to update elements that are outside of the
- // deck, so use the document to find the class names rather than our
- // container.
- for (let panel of state.panels) {
- if (panel.selected) {
- Array.prototype.map.call(this._doc.getElementsByClassName(panel.id),
- item => item.classList.add("selected"));
- } else {
- Array.prototype.map.call(this._doc.getElementsByClassName(panel.id),
- item => item.classList.remove("selected"));
- }
- }
- },
-
- _clearChilden() {
- while (this.container.firstChild) {
- this.container.removeChild(this.container.firstChild);
- }
- },
-
- _attachListeners() {
- this.container.querySelector(".android-link").addEventListener("click", this.props.onAndroidClick);
- this.container.querySelector(".ios-link").addEventListener("click", this.props.oniOSClick);
- let syncPrefLinks = this.container.querySelectorAll(".sync-prefs");
- for (let link of syncPrefLinks) {
- link.addEventListener("click", this.props.onSyncPrefClick);
- }
- },
-};
-
diff --git a/application/basilisk/components/syncedtabs/SyncedTabsListStore.js b/application/basilisk/components/syncedtabs/SyncedTabsListStore.js
deleted file mode 100644
index 8f03d9a89..000000000
--- a/application/basilisk/components/syncedtabs/SyncedTabsListStore.js
+++ /dev/null
@@ -1,235 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-let { EventEmitter } = Cu.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
-
-this.EXPORTED_SYMBOLS = [
- "SyncedTabsListStore"
-];
-
-/**
- * SyncedTabsListStore
- *
- * Instances of this store encapsulate all of the state associated with a synced tabs list view.
- * The state includes the clients, their tabs, the row that is currently selected,
- * and the filtered query.
- */
-function SyncedTabsListStore(SyncedTabs) {
- EventEmitter.call(this);
- this._SyncedTabs = SyncedTabs;
- this.data = [];
- this._closedClients = {};
- this._selectedRow = [-1, -1];
- this.filter = "";
- this.inputFocused = false;
-}
-
-Object.assign(SyncedTabsListStore.prototype, EventEmitter.prototype, {
- // This internal method triggers the "change" event that views
- // listen for. It denormalizes the state so that it's easier for
- // the view to deal with. updateType hints to the view what
- // actually needs to be rerendered or just updated, and can be
- // empty (to (re)render everything), "searchbox" (to rerender just the tab list),
- // or "all" (to skip rendering and just update all attributes of existing nodes).
- _change(updateType) {
- let selectedParent = this._selectedRow[0];
- let selectedChild = this._selectedRow[1];
- let rowSelected = false;
- // clone the data so that consumers can't mutate internal storage
- let data = Cu.cloneInto(this.data, {});
- let tabCount = 0;
-
- data.forEach((client, index) => {
- client.closed = !!this._closedClients[client.id];
-
- if (rowSelected || selectedParent < 0) {
- return;
- }
- if (this.filter) {
- if (selectedParent < tabCount + client.tabs.length) {
- client.tabs[selectedParent - tabCount].selected = true;
- client.tabs[selectedParent - tabCount].focused = !this.inputFocused;
- rowSelected = true;
- } else {
- tabCount += client.tabs.length;
- }
- return;
- }
- if (selectedParent === index && selectedChild === -1) {
- client.selected = true;
- client.focused = !this.inputFocused;
- rowSelected = true;
- } else if (selectedParent === index) {
- client.tabs[selectedChild].selected = true;
- client.tabs[selectedChild].focused = !this.inputFocused;
- rowSelected = true;
- }
- });
-
- // If this were React the view would be smart enough
- // to not re-render the whole list unless necessary. But it's
- // not, so updateType is a hint to the view of what actually
- // needs to be rerendered.
- this.emit("change", {
- clients: data,
- canUpdateAll: updateType === "all",
- canUpdateInput: updateType === "searchbox",
- filter: this.filter,
- inputFocused: this.inputFocused
- });
- },
-
- /**
- * Moves the row selection from a child to its parent,
- * which occurs when the parent of a selected row closes.
- */
- _selectParentRow() {
- this._selectedRow[1] = -1;
- },
-
- _toggleBranch(id, closed) {
- this._closedClients[id] = closed;
- if (this._closedClients[id]) {
- this._selectParentRow();
- }
- this._change("all");
- },
-
- _isOpen(client) {
- return !this._closedClients[client.id];
- },
-
- moveSelectionDown() {
- let branchRow = this._selectedRow[0];
- let childRow = this._selectedRow[1];
- let branch = this.data[branchRow];
-
- if (this.filter) {
- this.selectRow(branchRow + 1);
- return;
- }
-
- if (branchRow < 0) {
- this.selectRow(0, -1);
- } else if ((!branch.tabs.length || childRow >= branch.tabs.length - 1 || !this._isOpen(branch)) && branchRow < this.data.length) {
- this.selectRow(branchRow + 1, -1);
- } else if (childRow < branch.tabs.length) {
- this.selectRow(branchRow, childRow + 1);
- }
- },
-
- moveSelectionUp() {
- let branchRow = this._selectedRow[0];
- let childRow = this._selectedRow[1];
-
- if (this.filter) {
- this.selectRow(branchRow - 1);
- return;
- }
-
- if (branchRow < 0) {
- this.selectRow(0, -1);
- } else if (childRow < 0 && branchRow > 0) {
- let prevBranch = this.data[branchRow - 1];
- let newChildRow = this._isOpen(prevBranch) ? prevBranch.tabs.length - 1 : -1;
- this.selectRow(branchRow - 1, newChildRow);
- } else if (childRow >= 0) {
- this.selectRow(branchRow, childRow - 1);
- }
- },
-
- // Selects a row and makes sure the selection is within bounds
- selectRow(parent, child) {
- let maxParentRow = this.filter ? this._tabCount() : this.data.length;
- let parentRow = parent;
- if (parent <= -1) {
- parentRow = 0;
- } else if (parent >= maxParentRow) {
- return;
- }
-
- let childRow = child;
- if (parentRow === -1 || this.filter || typeof child === "undefined" || child < -1) {
- childRow = -1;
- } else if (child >= this.data[parentRow].tabs.length) {
- childRow = this.data[parentRow].tabs.length - 1;
- }
-
- if (this._selectedRow[0] === parentRow && this._selectedRow[1] === childRow) {
- return;
- }
-
- this._selectedRow = [parentRow, childRow];
- this.inputFocused = false;
- this._change("all");
- },
-
- _tabCount() {
- return this.data.reduce((prev, curr) => curr.tabs.length + prev, 0);
- },
-
- toggleBranch(id) {
- this._toggleBranch(id, !this._closedClients[id]);
- },
-
- closeBranch(id) {
- this._toggleBranch(id, true);
- },
-
- openBranch(id) {
- this._toggleBranch(id, false);
- },
-
- focusInput() {
- this.inputFocused = true;
- // A change type of "all" updates rather than rebuilds, which is what we
- // want here - only the selection/focus has changed.
- this._change("all");
- },
-
- blurInput() {
- this.inputFocused = false;
- // A change type of "all" updates rather than rebuilds, which is what we
- // want here - only the selection/focus has changed.
- this._change("all");
- },
-
- clearFilter() {
- this.filter = "";
- this._selectedRow = [-1, -1];
- return this.getData();
- },
-
- // Fetches data from the SyncedTabs module and triggers
- // and update
- getData(filter) {
- let updateType;
- let hasFilter = typeof filter !== "undefined";
- if (hasFilter) {
- this.filter = filter;
- this._selectedRow = [-1, -1];
-
- // When a filter is specified we tell the view that only the list
- // needs to be rerendered so that it doesn't disrupt the input
- // field's focus.
- updateType = "searchbox";
- }
-
- // return promise for tests
- return this._SyncedTabs.getTabClients(this.filter)
- .then(result => {
- if (!hasFilter) {
- // Only sort clients and tabs if we're rendering the whole list.
- this._SyncedTabs.sortTabClientsByLastUsed(result);
- }
- this.data = result;
- this._change(updateType);
- })
- .catch(Cu.reportError);
- }
-});
diff --git a/application/basilisk/components/syncedtabs/TabListComponent.js b/application/basilisk/components/syncedtabs/TabListComponent.js
deleted file mode 100644
index aa60e4769..000000000
--- a/application/basilisk/components/syncedtabs/TabListComponent.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-let log = Cu.import("resource://gre/modules/Log.jsm", {})
- .Log.repository.getLogger("Sync.RemoteTabs");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUIUtils",
- "resource:///modules/PlacesUIUtils.jsm");
-
-this.EXPORTED_SYMBOLS = [
- "TabListComponent"
-];
-
-/**
- * TabListComponent
- *
- * The purpose of this component is to compose the view, state, and actions.
- * It defines high level actions that act on the state and passes them to the
- * view for it to trigger during user interaction. It also subscribes the view
- * to state changes so it can rerender.
- */
-
-function TabListComponent({window, store, View, SyncedTabs, clipboardHelper,
- getChromeWindow}) {
- this._window = window;
- this._store = store;
- this._View = View;
- this._clipboardHelper = clipboardHelper;
- this._getChromeWindow = getChromeWindow;
- // used to trigger Sync from context menu
- this._SyncedTabs = SyncedTabs;
-}
-
-TabListComponent.prototype = {
- get container() {
- return this._view.container;
- },
-
- init() {
- log.debug("Initializing TabListComponent");
-
- this._view = new this._View(this._window, {
- onSelectRow: (...args) => this.onSelectRow(...args),
- onOpenTab: (...args) => this.onOpenTab(...args),
- onOpenTabs: (...args) => this.onOpenTabs(...args),
- onMoveSelectionDown: (...args) => this.onMoveSelectionDown(...args),
- onMoveSelectionUp: (...args) => this.onMoveSelectionUp(...args),
- onToggleBranch: (...args) => this.onToggleBranch(...args),
- onBookmarkTab: (...args) => this.onBookmarkTab(...args),
- onCopyTabLocation: (...args) => this.onCopyTabLocation(...args),
- onSyncRefresh: (...args) => this.onSyncRefresh(...args),
- onFilter: (...args) => this.onFilter(...args),
- onClearFilter: (...args) => this.onClearFilter(...args),
- onFilterFocus: (...args) => this.onFilterFocus(...args),
- onFilterBlur: (...args) => this.onFilterBlur(...args)
- });
-
- this._store.on("change", state => this._view.render(state));
- this._view.render({clients: []});
- // get what's already available...
- this._store.getData();
- this._store.focusInput();
- },
-
- uninit() {
- this._view.destroy();
- },
-
- onFilter(query) {
- this._store.getData(query);
- },
-
- onClearFilter() {
- this._store.clearFilter();
- },
-
- onFilterFocus() {
- this._store.focusInput();
- },
-
- onFilterBlur() {
- this._store.blurInput();
- },
-
- onSelectRow(position) {
- this._store.selectRow(position[0], position[1]);
- },
-
- onMoveSelectionDown() {
- this._store.moveSelectionDown();
- },
-
- onMoveSelectionUp() {
- this._store.moveSelectionUp();
- },
-
- onToggleBranch(id) {
- this._store.toggleBranch(id);
- },
-
- onBookmarkTab(uri, title) {
- this._window.top.PlacesCommandHook
- .bookmarkLink(this._window.top.PlacesUtils.bookmarksMenuFolderId, uri, title)
- .catch(Cu.reportError);
- },
-
- onOpenTab(url, where, params) {
- this._window.openUILinkIn(url, where, params);
- },
-
- onOpenTabs(urls, where) {
- if (!PlacesUIUtils.confirmOpenInTabs(urls.length, this._window)) {
- return;
- }
- if (where == "window") {
- this._window.openDialog(this._window.getBrowserURL(), "_blank",
- "chrome,dialog=no,all", urls.join("|"));
- } else {
- let loadInBackground = where == "tabshifted" ? true : false;
- this._getChromeWindow(this._window).gBrowser.loadTabs(urls, loadInBackground, false);
- }
- },
-
- onCopyTabLocation(url) {
- this._clipboardHelper.copyString(url);
- },
-
- onSyncRefresh() {
- this._SyncedTabs.syncTabs(true);
- }
-};
diff --git a/application/basilisk/components/syncedtabs/TabListView.js b/application/basilisk/components/syncedtabs/TabListView.js
deleted file mode 100644
index dab15101b..000000000
--- a/application/basilisk/components/syncedtabs/TabListView.js
+++ /dev/null
@@ -1,568 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-let { getChromeWindow } = Cu.import("resource:///modules/syncedtabs/util.js", {});
-
-let log = Cu.import("resource://gre/modules/Log.jsm", {})
- .Log.repository.getLogger("Sync.RemoteTabs");
-
-this.EXPORTED_SYMBOLS = [
- "TabListView"
-];
-
-function getContextMenu(window) {
- return getChromeWindow(window).document.getElementById("SyncedTabsSidebarContext");
-}
-
-function getTabsFilterContextMenu(window) {
- return getChromeWindow(window).document.getElementById("SyncedTabsSidebarTabsFilterContext");
-}
-
-/*
- * TabListView
- *
- * Given a state, this object will render the corresponding DOM.
- * It maintains no state of it's own. It listens for DOM events
- * and triggers actions that may cause the state to change and
- * ultimately the view to rerender.
- */
-function TabListView(window, props) {
- this.props = props;
-
- this._window = window;
- this._doc = this._window.document;
-
- this._tabsContainerTemplate = this._doc.getElementById("tabs-container-template");
- this._clientTemplate = this._doc.getElementById("client-template");
- this._emptyClientTemplate = this._doc.getElementById("empty-client-template");
- this._tabTemplate = this._doc.getElementById("tab-template");
- this.tabsFilter = this._doc.querySelector(".tabsFilter");
- this.clearFilter = this._doc.querySelector(".textbox-search-clear");
- this.searchBox = this._doc.querySelector(".search-box");
- this.searchIcon = this._doc.querySelector(".textbox-search-icon");
-
- this.container = this._doc.createElement("div");
-
- this._attachFixedListeners();
-
- this._setupContextMenu();
-}
-
-TabListView.prototype = {
- render(state) {
- // Don't rerender anything; just update attributes, e.g. selection
- if (state.canUpdateAll) {
- this._update(state);
- return;
- }
- // Rerender the tab list
- if (state.canUpdateInput) {
- this._updateSearchBox(state);
- this._createList(state);
- return;
- }
- // Create the world anew
- this._create(state);
- },
-
- // Create the initial DOM from templates
- _create(state) {
- let wrapper = this._doc.importNode(this._tabsContainerTemplate.content, true).firstElementChild;
- this._clearChilden();
- this.container.appendChild(wrapper);
-
- this.list = this.container.querySelector(".list");
-
- this._createList(state);
- this._updateSearchBox(state);
-
- this._attachListListeners();
- },
-
- _createList(state) {
- this._clearChilden(this.list);
- for (let client of state.clients) {
- if (state.filter) {
- this._renderFilteredClient(client);
- } else {
- this._renderClient(client);
- }
- }
- if (this.list.firstChild) {
- const firstTab = this.list.firstChild.querySelector(".item.tab:first-child .item-title");
- if (firstTab) {
- firstTab.setAttribute("tabindex", 2);
- }
- }
- },
-
- destroy() {
- this._teardownContextMenu();
- this.container.remove();
- },
-
- _update(state) {
- this._updateSearchBox(state);
- for (let client of state.clients) {
- let clientNode = this._doc.getElementById("item-" + client.id);
- if (clientNode) {
- this._updateClient(client, clientNode);
- }
-
- client.tabs.forEach((tab, index) => {
- let tabNode = this._doc.getElementById('tab-' + client.id + '-' + index);
- this._updateTab(tab, tabNode, index);
- });
- }
- },
-
- // Client rows are hidden when the list is filtered
- _renderFilteredClient(client, filter) {
- client.tabs.forEach((tab, index) => {
- let node = this._renderTab(client, tab, index);
- this.list.appendChild(node);
- });
- },
-
- _renderClient(client) {
- let itemNode = client.tabs.length ?
- this._createClient(client) :
- this._createEmptyClient(client);
-
- this._updateClient(client, itemNode);
-
- let tabsList = itemNode.querySelector(".item-tabs-list");
- client.tabs.forEach((tab, index) => {
- let node = this._renderTab(client, tab, index);
- tabsList.appendChild(node);
- });
-
- this.list.appendChild(itemNode);
- return itemNode;
- },
-
- _renderTab(client, tab, index) {
- let itemNode = this._createTab(tab);
- this._updateTab(tab, itemNode, index);
- return itemNode;
- },
-
- _createClient(item) {
- return this._doc.importNode(this._clientTemplate.content, true).firstElementChild;
- },
-
- _createEmptyClient(item) {
- return this._doc.importNode(this._emptyClientTemplate.content, true).firstElementChild;
- },
-
- _createTab(item) {
- return this._doc.importNode(this._tabTemplate.content, true).firstElementChild;
- },
-
- _clearChilden(node) {
- let parent = node || this.container;
- while (parent.firstChild) {
- parent.removeChild(parent.firstChild);
- }
- },
-
- // These listeners are attached only once, when we initialize the view
- _attachFixedListeners() {
- this.tabsFilter.addEventListener("input", this.onFilter.bind(this));
- this.tabsFilter.addEventListener("focus", this.onFilterFocus.bind(this));
- this.tabsFilter.addEventListener("blur", this.onFilterBlur.bind(this));
- this.clearFilter.addEventListener("click", this.onClearFilter.bind(this));
- this.searchIcon.addEventListener("click", this.onFilterFocus.bind(this));
- },
-
- // These listeners have to be re-created every time since we re-create the list
- _attachListListeners() {
- this.list.addEventListener("click", this.onClick.bind(this));
- this.list.addEventListener("mouseup", this.onMouseUp.bind(this));
- this.list.addEventListener("keydown", this.onKeyDown.bind(this));
- },
-
- _updateSearchBox(state) {
- if (state.filter) {
- this.searchBox.classList.add("filtered");
- } else {
- this.searchBox.classList.remove("filtered");
- }
- this.tabsFilter.value = state.filter;
- if (state.inputFocused) {
- this.searchBox.setAttribute("focused", true);
- this.tabsFilter.focus();
- } else {
- this.searchBox.removeAttribute("focused");
- }
- },
-
- /**
- * Update the element representing an item, ensuring it's in sync with the
- * underlying data.
- * @param {client} item - Item to use as a source.
- * @param {Element} itemNode - Element to update.
- */
- _updateClient(item, itemNode) {
- itemNode.setAttribute("id", "item-" + item.id);
- let lastSync = new Date(item.lastModified);
- let lastSyncTitle = getChromeWindow(this._window).gSyncUI.formatLastSyncDate(lastSync);
- itemNode.setAttribute("title", lastSyncTitle);
- if (item.closed) {
- itemNode.classList.add("closed");
- } else {
- itemNode.classList.remove("closed");
- }
- if (item.selected) {
- itemNode.classList.add("selected");
- } else {
- itemNode.classList.remove("selected");
- }
- if (item.isMobile) {
- itemNode.classList.add("device-image-mobile");
- } else {
- itemNode.classList.add("device-image-desktop");
- }
- if (item.focused) {
- itemNode.focus();
- }
- itemNode.dataset.id = item.id;
- itemNode.querySelector(".item-title").textContent = item.name;
- },
-
- /**
- * Update the element representing a tab, ensuring it's in sync with the
- * underlying data.
- * @param {tab} item - Item to use as a source.
- * @param {Element} itemNode - Element to update.
- */
- _updateTab(item, itemNode, index) {
- itemNode.setAttribute("title", `${item.title}\n${item.url}`);
- itemNode.setAttribute("id", "tab-" + item.client + '-' + index);
- if (item.selected) {
- itemNode.classList.add("selected");
- } else {
- itemNode.classList.remove("selected");
- }
- if (item.focused) {
- itemNode.focus();
- }
- itemNode.dataset.url = item.url;
-
- itemNode.querySelector(".item-title").textContent = item.title;
-
- if (item.icon) {
- let icon = itemNode.querySelector(".item-icon-container");
- icon.style.backgroundImage = "url(" + item.icon + ")";
- }
- },
-
- onMouseUp(event) {
- if (event.which == 2) { // Middle click
- this.onClick(event);
- }
- },
-
- onClick(event) {
- let itemNode = this._findParentItemNode(event.target);
- if (!itemNode) {
- return;
- }
-
- if (itemNode.classList.contains("tab")) {
- let url = itemNode.dataset.url;
- if (url) {
- this.onOpenSelected(url, event);
- }
- }
-
- // Middle click on a client
- if (itemNode.classList.contains("client")) {
- let where = getChromeWindow(this._window).whereToOpenLink(event);
- if (where != "current") {
- const tabs = itemNode.querySelector(".item-tabs-list").childNodes;
- const urls = [...tabs].map(tab => tab.dataset.url);
- this.props.onOpenTabs(urls, where);
- }
- }
-
- if (event.target.classList.contains("item-twisty-container")
- && event.which != 2) {
- this.props.onToggleBranch(itemNode.dataset.id);
- return;
- }
-
- let position = this._getSelectionPosition(itemNode);
- this.props.onSelectRow(position);
- },
-
- /**
- * Handle a keydown event on the list box.
- * @param {Event} event - Triggering event.
- */
- onKeyDown(event) {
- if (event.keyCode == this._window.KeyEvent.DOM_VK_DOWN) {
- event.preventDefault();
- this.props.onMoveSelectionDown();
- } else if (event.keyCode == this._window.KeyEvent.DOM_VK_UP) {
- event.preventDefault();
- this.props.onMoveSelectionUp();
- } else if (event.keyCode == this._window.KeyEvent.DOM_VK_RETURN) {
- let selectedNode = this.container.querySelector('.item.selected');
- if (selectedNode.dataset.url) {
- this.onOpenSelected(selectedNode.dataset.url, event);
- } else if (selectedNode) {
- this.props.onToggleBranch(selectedNode.dataset.id);
- }
- }
- },
-
- onBookmarkTab() {
- let item = this._getSelectedTabNode();
- if (item) {
- let title = item.querySelector(".item-title").textContent;
- this.props.onBookmarkTab(item.dataset.url, title);
- }
- },
-
- onCopyTabLocation() {
- let item = this._getSelectedTabNode();
- if (item) {
- this.props.onCopyTabLocation(item.dataset.url);
- }
- },
-
- onOpenSelected(url, event) {
- let where = getChromeWindow(this._window).whereToOpenLink(event);
- this.props.onOpenTab(url, where, {});
- },
-
- onOpenSelectedFromContextMenu(event) {
- let item = this._getSelectedTabNode();
- if (item) {
- let where = event.target.getAttribute("where");
- let params = {
- private: event.target.hasAttribute("private"),
- };
- this.props.onOpenTab(item.dataset.url, where, params);
- }
- },
-
- onFilter(event) {
- let query = event.target.value;
- if (query) {
- this.props.onFilter(query);
- } else {
- this.props.onClearFilter();
- }
- },
-
- onClearFilter() {
- this.props.onClearFilter();
- },
-
- onFilterFocus() {
- this.props.onFilterFocus();
- },
- onFilterBlur() {
- this.props.onFilterBlur();
- },
-
- _getSelectedTabNode() {
- let item = this.container.querySelector('.item.selected');
- if (this._isTab(item) && item.dataset.url) {
- return item;
- }
- return null;
- },
-
- // Set up the custom context menu
- _setupContextMenu() {
- Services.els.addSystemEventListener(this._window, "contextmenu", this, false);
- for (let getMenu of [getContextMenu, getTabsFilterContextMenu]) {
- let menu = getMenu(this._window);
- menu.addEventListener("popupshowing", this, true);
- menu.addEventListener("command", this, true);
- }
- },
-
- _teardownContextMenu() {
- // Tear down context menu
- Services.els.removeSystemEventListener(this._window, "contextmenu", this, false);
- for (let getMenu of [getContextMenu, getTabsFilterContextMenu]) {
- let menu = getMenu(this._window);
- menu.removeEventListener("popupshowing", this, true);
- menu.removeEventListener("command", this, true);
- }
- },
-
- handleEvent(event) {
- switch (event.type) {
- case "contextmenu":
- this.handleContextMenu(event);
- break;
-
- case "popupshowing": {
- if (event.target.getAttribute("id") == "SyncedTabsSidebarTabsFilterContext") {
- this.handleTabsFilterContextMenuShown(event);
- }
- break;
- }
-
- case "command": {
- let menu = event.target.closest("menupopup");
- switch (menu.getAttribute("id")) {
- case "SyncedTabsSidebarContext":
- this.handleContentContextMenuCommand(event);
- break;
-
- case "SyncedTabsSidebarTabsFilterContext":
- this.handleTabsFilterContextMenuCommand(event);
- break;
- }
- break;
- }
- }
- },
-
- handleTabsFilterContextMenuShown(event) {
- let document = event.target.ownerDocument;
- let focusedElement = document.commandDispatcher.focusedElement;
- if (focusedElement != this.tabsFilter) {
- this.tabsFilter.focus();
- }
- for (let item of event.target.children) {
- if (!item.hasAttribute("cmd")) {
- continue;
- }
- let command = item.getAttribute("cmd");
- let controller = document.commandDispatcher.getControllerForCommand(command);
- if (controller.isCommandEnabled(command)) {
- item.removeAttribute("disabled");
- } else {
- item.setAttribute("disabled", "true");
- }
- }
- },
-
- handleContentContextMenuCommand(event) {
- let id = event.target.getAttribute("id");
- switch (id) {
- case "syncedTabsOpenSelected":
- case "syncedTabsOpenSelectedInTab":
- case "syncedTabsOpenSelectedInWindow":
- case "syncedTabsOpenSelectedInPrivateWindow":
- this.onOpenSelectedFromContextMenu(event);
- break;
- case "syncedTabsBookmarkSelected":
- this.onBookmarkTab();
- break;
- case "syncedTabsCopySelected":
- this.onCopyTabLocation();
- break;
- case "syncedTabsRefresh":
- case "syncedTabsRefreshFilter":
- this.props.onSyncRefresh();
- break;
- }
- },
-
- handleTabsFilterContextMenuCommand(event) {
- let command = event.target.getAttribute("cmd");
- let dispatcher = getChromeWindow(this._window).document.commandDispatcher;
- let controller = dispatcher.focusedElement.controllers.getControllerForCommand(command);
- controller.doCommand(command);
- },
-
- handleContextMenu(event) {
- let menu;
-
- if (event.target == this.tabsFilter) {
- menu = getTabsFilterContextMenu(this._window);
- } else {
- let itemNode = this._findParentItemNode(event.target);
- if (itemNode) {
- let position = this._getSelectionPosition(itemNode);
- this.props.onSelectRow(position);
- }
- menu = getContextMenu(this._window);
- this.adjustContextMenu(menu);
- }
-
- menu.openPopupAtScreen(event.screenX, event.screenY, true, event);
- },
-
- adjustContextMenu(menu) {
- let item = this.container.querySelector('.item.selected');
- let showTabOptions = this._isTab(item);
-
- let el = menu.firstChild;
-
- while (el) {
- if (showTabOptions || el.getAttribute("id") === "syncedTabsRefresh") {
- el.hidden = false;
- } else {
- el.hidden = true;
- }
-
- el = el.nextSibling;
- }
- },
-
- /**
- * Find the parent item element, from a given child element.
- * @param {Element} node - Child element.
- * @return {Element} Element for the item, or null if not found.
- */
- _findParentItemNode(node) {
- while (node && node !== this.list && node !== this._doc.documentElement &&
- !node.classList.contains("item")) {
- node = node.parentNode;
- }
-
- if (node !== this.list && node !== this._doc.documentElement) {
- return node;
- }
-
- return null;
- },
-
- _findParentBranchNode(node) {
- while (node && !node.classList.contains("list") && node !== this._doc.documentElement &&
- !node.parentNode.classList.contains("list")) {
- node = node.parentNode;
- }
-
- if (node !== this.list && node !== this._doc.documentElement) {
- return node;
- }
-
- return null;
- },
-
- _getSelectionPosition(itemNode) {
- let parent = this._findParentBranchNode(itemNode);
- let parentPosition = this._indexOfNode(parent.parentNode, parent);
- let childPosition = -1;
- // if the node is not a client, find its position within the parent
- if (parent !== itemNode) {
- childPosition = this._indexOfNode(itemNode.parentNode, itemNode);
- }
- return [parentPosition, childPosition];
- },
-
- _indexOfNode(parent, child) {
- return Array.prototype.indexOf.call(parent.childNodes, child);
- },
-
- _isTab(item) {
- return item && item.classList.contains("tab");
- }
-};
diff --git a/application/basilisk/components/syncedtabs/jar.mn b/application/basilisk/components/syncedtabs/jar.mn
deleted file mode 100644
index ba2b105a1..000000000
--- a/application/basilisk/components/syncedtabs/jar.mn
+++ /dev/null
@@ -1,7 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-browser.jar:
- content/browser/syncedtabs/sidebar.xhtml
- content/browser/syncedtabs/sidebar.js
diff --git a/application/basilisk/components/syncedtabs/moz.build b/application/basilisk/components/syncedtabs/moz.build
deleted file mode 100644
index a6515d6a1..000000000
--- a/application/basilisk/components/syncedtabs/moz.build
+++ /dev/null
@@ -1,17 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-JAR_MANIFESTS += ['jar.mn']
-
-EXTRA_JS_MODULES.syncedtabs += [
- 'EventEmitter.jsm',
- 'SyncedTabsDeckComponent.js',
- 'SyncedTabsDeckStore.js',
- 'SyncedTabsDeckView.js',
- 'SyncedTabsListStore.js',
- 'TabListComponent.js',
- 'TabListView.js',
- 'util.js',
-]
-
diff --git a/application/basilisk/components/syncedtabs/sidebar.js b/application/basilisk/components/syncedtabs/sidebar.js
deleted file mode 100644
index 84df95e9d..000000000
--- a/application/basilisk/components/syncedtabs/sidebar.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://services-sync/SyncedTabs.jsm");
-Cu.import("resource:///modules/syncedtabs/SyncedTabsDeckComponent.js");
-
-XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
- "resource://gre/modules/FxAccounts.jsm");
-
-this.syncedTabsDeckComponent = new SyncedTabsDeckComponent({window, SyncedTabs, fxAccounts});
-
-let onLoaded = () => {
- syncedTabsDeckComponent.init();
- document.getElementById("template-container").appendChild(syncedTabsDeckComponent.container);
-};
-
-let onUnloaded = () => {
- removeEventListener("DOMContentLoaded", onLoaded);
- removeEventListener("unload", onUnloaded);
- syncedTabsDeckComponent.uninit();
-};
-
-addEventListener("DOMContentLoaded", onLoaded);
-addEventListener("unload", onUnloaded);
diff --git a/application/basilisk/components/syncedtabs/sidebar.xhtml b/application/basilisk/components/syncedtabs/sidebar.xhtml
deleted file mode 100644
index 3efcbea0e..000000000
--- a/application/basilisk/components/syncedtabs/sidebar.xhtml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" [
- <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
- %browserDTD;
- <!ENTITY % globalDTD
- SYSTEM "chrome://global/locale/global.dtd">
- %globalDTD;
- <!ENTITY % syncBrandDTD
- SYSTEM "chrome://browser/locale/syncBrand.dtd">
- %syncBrandDTD;
-]>
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <head>
- <script src="chrome://browser/content/syncedtabs/sidebar.js" type="application/javascript;version=1.8"></script>
- <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
-
- <link rel="stylesheet" type="text/css" media="all" href="chrome://browser/skin/syncedtabs/sidebar.css"/>
- <link rel="stylesheet" type="text/css" media="all" href="chrome://global/skin/"/>
- <link rel="stylesheet" type="text/css" media="all" href="chrome://global/skin/textbox.css"/>
- <link rel="stylesheet" type="text/css" media="all" href="chrome://browser/content/browser.css"/>
- <title>&syncedTabs.sidebar.label;</title>
- </head>
-
- <body dir="&locale.dir;" role="application">
- <template id="client-template">
- <div class="item client" role="option" tabindex="-1">
- <div class="item-title-container">
- <div class="item-twisty-container"></div>
- <div class="item-icon-container"></div>
- <p class="item-title"></p>
- </div>
- <div class="item-tabs-list"></div>
- </div>
- </template>
- <template id="empty-client-template">
- <div class="item empty client" role="option" tabindex="-1">
- <div class="item-title-container">
- <div class="item-twisty-container"></div>
- <div class="item-icon-container"></div>
- <p class="item-title"></p>
- </div>
- <div class="item-tabs-list">
- <div class="item empty" role="option" tabindex="-1">
- <div class="item-title-container">
- <div class="item-icon-container"></div>
- <p class="item-title">&syncedTabs.sidebar.notabs.label;</p>
- </div>
- </div>
- </div>
- </div>
- </template>
- <template id="tab-template">
- <div class="item tab" role="option" tabindex="-1">
- <div class="item-title-container">
- <div class="item-icon-container"></div>
- <p class="item-title"></p>
- </div>
- </div>
- </template>
-
- <template id="tabs-container-template">
- <div class="tabs-container">
- <div class="list" role="listbox"></div>
- </div>
- </template>
-
- <template id="deck-template">
- <div class="deck">
- <div class="tabs-fetching sync-state">
- <!-- Show intentionally blank panel, see bug 1239845 -->
- </div>
- <div class="notAuthedInfo sync-state">
- <p>&syncedTabs.sidebar.notsignedin.label;</p>
- <p><a href="#" class="sync-prefs text-link">&fxaSignIn.label;</a></p>
- </div>
- <div class="singleDeviceInfo sync-state">
- <p>&syncedTabs.sidebar.noclients.title;</p>
- <p>&syncedTabs.sidebar.noclients.subtitle;</p>
- <p class="device-promo" fxAccountsBrand="&syncBrand.fxAccount.label;"></p>
- </div>
- <div class="tabs-disabled sync-state">
- <p>&syncedTabs.sidebar.tabsnotsyncing.label;</p>
- <p><a href="#" class="sync-prefs text-link">&syncedTabs.sidebar.openprefs.label;</a></p>
- </div>
- </div>
- </template>
-
- <div class="content-container">
- <!-- the non-scrollable header -->
- <div class="content-header">
- <div class="sidebar-search-container tabs-container sync-state">
- <div class="search-box compact">
- <div class="textbox-input-box">
- <input type="text" class="tabsFilter textbox-input" tabindex="1"/>
- <div class="textbox-search-icons">
- <a class="textbox-search-clear"></a>
- <a class="textbox-search-icon"></a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- the scrollable content area where our templates are inserted -->
- <div id="template-container" class="content-scrollable" tabindex="-1">
- </div>
- </div>
- </body>
-</html>
diff --git a/application/basilisk/components/syncedtabs/util.js b/application/basilisk/components/syncedtabs/util.js
deleted file mode 100644
index e09a1a528..000000000
--- a/application/basilisk/components/syncedtabs/util.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-this.EXPORTED_SYMBOLS = [
- "getChromeWindow"
-];
-
-// Get the chrome (ie, browser) window hosting this content.
-function getChromeWindow(window) {
- return window
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow)
- .wrappedJSObject;
-}
diff --git a/application/basilisk/components/webextensions/.eslintrc.js b/application/basilisk/components/webextensions/.eslintrc.js
deleted file mode 100644
index 81a11c4ac..000000000
--- a/application/basilisk/components/webextensions/.eslintrc.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"use strict";
-
-module.exports = { // eslint-disable-line no-undef
- "extends": "../../../toolkit/components/extensions/.eslintrc.js",
-
- "globals": {
- "AllWindowEvents": true,
- "browserActionFor": true,
- "currentWindow": true,
- "EventEmitter": true,
- "getCookieStoreIdForTab": true,
- "IconDetails": true,
- "makeWidgetId": true,
- "pageActionFor": true,
- "PanelPopup": true,
- "TabContext": true,
- "ViewPopup": true,
- "WindowEventManager": true,
- "WindowListManager": true,
- "WindowManager": true,
- },
-};
diff --git a/application/basilisk/components/webextensions/ext-bookmarks.js b/application/basilisk/components/webextensions/ext-bookmarks.js
deleted file mode 100644
index 399f6212d..000000000
--- a/application/basilisk/components/webextensions/ext-bookmarks.js
+++ /dev/null
@@ -1,374 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-const {
- SingletonEventManager,
-} = ExtensionUtils;
-
-XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter",
- "resource://devtools/shared/event-emitter.js");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
- "resource://gre/modules/PlacesUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-
-let listenerCount = 0;
-
-function getTree(rootGuid, onlyChildren) {
- function convert(node, parent) {
- let treenode = {
- id: node.guid,
- title: node.title || "",
- index: node.index,
- dateAdded: node.dateAdded / 1000,
- };
-
- if (parent && node.guid != PlacesUtils.bookmarks.rootGuid) {
- treenode.parentId = parent.guid;
- }
-
- if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE) {
- // This isn't quite correct. Recently Bookmarked ends up here ...
- treenode.url = node.uri;
- } else {
- treenode.dateGroupModified = node.lastModified / 1000;
-
- if (node.children && !onlyChildren) {
- treenode.children = node.children.map(child => convert(child, node));
- }
- }
-
- return treenode;
- }
-
- return PlacesUtils.promiseBookmarksTree(rootGuid, {
- excludeItemsCallback: item => {
- if (item.type == PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR) {
- return true;
- }
- return item.annos &&
- item.annos.find(a => a.name == PlacesUtils.EXCLUDE_FROM_BACKUP_ANNO);
- },
- }).then(root => {
- if (onlyChildren) {
- let children = root.children || [];
- return children.map(child => convert(child, root));
- }
- // It seems like the array always just contains the root node.
- return [convert(root, null)];
- }).catch(e => Promise.reject({message: e.message}));
-}
-
-function convert(result) {
- let node = {
- id: result.guid,
- title: result.title || "",
- index: result.index,
- dateAdded: result.dateAdded.getTime(),
- };
-
- if (result.guid != PlacesUtils.bookmarks.rootGuid) {
- node.parentId = result.parentGuid;
- }
-
- if (result.type == PlacesUtils.bookmarks.TYPE_BOOKMARK) {
- node.url = result.url.href; // Output is always URL object.
- } else {
- node.dateGroupModified = result.lastModified.getTime();
- }
-
- return node;
-}
-
-let observer = {
- skipTags: true,
- skipDescendantsOnItemRemoval: true,
-
- onBeginUpdateBatch() {},
- onEndUpdateBatch() {},
-
- onItemAdded(id, parentId, index, itemType, uri, title, dateAdded, guid, parentGuid, source) {
- if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) {
- return;
- }
-
- let bookmark = {
- id: guid,
- parentId: parentGuid,
- index,
- title,
- dateAdded: dateAdded / 1000,
- };
-
- if (itemType == PlacesUtils.bookmarks.TYPE_BOOKMARK) {
- bookmark.url = uri.spec;
- } else {
- bookmark.dateGroupModified = bookmark.dateAdded;
- }
-
- this.emit("created", bookmark);
- },
-
- onItemVisited() {},
-
- onItemMoved(id, oldParentId, oldIndex, newParentId, newIndex, itemType, guid, oldParentGuid, newParentGuid, source) {
- if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) {
- return;
- }
-
- let info = {
- parentId: newParentGuid,
- index: newIndex,
- oldParentId: oldParentGuid,
- oldIndex,
- };
- this.emit("moved", {guid, info});
- },
-
- onItemRemoved(id, parentId, index, itemType, uri, guid, parentGuid, source) {
- if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) {
- return;
- }
-
- let node = {
- id: guid,
- parentId: parentGuid,
- index,
- };
-
- if (itemType == PlacesUtils.bookmarks.TYPE_BOOKMARK) {
- node.url = uri.spec;
- }
-
- this.emit("removed", {guid, info: {parentId: parentGuid, index, node}});
- },
-
- onItemChanged(id, prop, isAnno, val, lastMod, itemType, parentId, guid, parentGuid, oldVal, source) {
- if (itemType == PlacesUtils.bookmarks.TYPE_SEPARATOR) {
- return;
- }
-
- let info = {};
- if (prop == "title") {
- info.title = val;
- } else if (prop == "uri") {
- info.url = val;
- } else {
- // Not defined yet.
- return;
- }
-
- this.emit("changed", {guid, info});
- },
-};
-EventEmitter.decorate(observer);
-
-function decrementListeners() {
- listenerCount -= 1;
- if (!listenerCount) {
- PlacesUtils.bookmarks.removeObserver(observer);
- }
-}
-
-function incrementListeners() {
- listenerCount++;
- if (listenerCount == 1) {
- PlacesUtils.bookmarks.addObserver(observer, false);
- }
-}
-
-extensions.registerSchemaAPI("bookmarks", "addon_parent", context => {
- return {
- bookmarks: {
- get: function(idOrIdList) {
- let list = Array.isArray(idOrIdList) ? idOrIdList : [idOrIdList];
-
- return Task.spawn(function* () {
- let bookmarks = [];
- for (let id of list) {
- let bookmark = yield PlacesUtils.bookmarks.fetch({guid: id});
- if (!bookmark) {
- throw new Error("Bookmark not found");
- }
- bookmarks.push(convert(bookmark));
- }
- return bookmarks;
- }).catch(error => Promise.reject({message: error.message}));
- },
-
- getChildren: function(id) {
- // TODO: We should optimize this.
- return getTree(id, true);
- },
-
- getTree: function() {
- return getTree(PlacesUtils.bookmarks.rootGuid, false);
- },
-
- getSubTree: function(id) {
- return getTree(id, false);
- },
-
- search: function(query) {
- return PlacesUtils.bookmarks.search(query).then(result => result.map(convert));
- },
-
- getRecent: function(numberOfItems) {
- return PlacesUtils.bookmarks.getRecent(numberOfItems).then(result => result.map(convert));
- },
-
- create: function(bookmark) {
- let info = {
- title: bookmark.title || "",
- };
-
- // If url is NULL or missing, it will be a folder.
- if (bookmark.url !== null) {
- info.type = PlacesUtils.bookmarks.TYPE_BOOKMARK;
- info.url = bookmark.url || "";
- } else {
- info.type = PlacesUtils.bookmarks.TYPE_FOLDER;
- }
-
- if (bookmark.index !== null) {
- info.index = bookmark.index;
- }
-
- if (bookmark.parentId !== null) {
- info.parentGuid = bookmark.parentId;
- } else {
- info.parentGuid = PlacesUtils.bookmarks.unfiledGuid;
- }
-
- try {
- return PlacesUtils.bookmarks.insert(info).then(convert)
- .catch(error => Promise.reject({message: error.message}));
- } catch (e) {
- return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
- }
- },
-
- move: function(id, destination) {
- let info = {
- guid: id,
- };
-
- if (destination.parentId !== null) {
- info.parentGuid = destination.parentId;
- }
- info.index = (destination.index === null) ?
- PlacesUtils.bookmarks.DEFAULT_INDEX : destination.index;
-
- try {
- return PlacesUtils.bookmarks.update(info).then(convert)
- .catch(error => Promise.reject({message: error.message}));
- } catch (e) {
- return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
- }
- },
-
- update: function(id, changes) {
- let info = {
- guid: id,
- };
-
- if (changes.title !== null) {
- info.title = changes.title;
- }
- if (changes.url !== null) {
- info.url = changes.url;
- }
-
- try {
- return PlacesUtils.bookmarks.update(info).then(convert)
- .catch(error => Promise.reject({message: error.message}));
- } catch (e) {
- return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
- }
- },
-
- remove: function(id) {
- let info = {
- guid: id,
- };
-
- // The API doesn't give you the old bookmark at the moment
- try {
- return PlacesUtils.bookmarks.remove(info, {preventRemovalOfNonEmptyFolders: true}).then(result => {})
- .catch(error => Promise.reject({message: error.message}));
- } catch (e) {
- return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
- }
- },
-
- removeTree: function(id) {
- let info = {
- guid: id,
- };
-
- try {
- return PlacesUtils.bookmarks.remove(info).then(result => {})
- .catch(error => Promise.reject({message: error.message}));
- } catch (e) {
- return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
- }
- },
-
- onCreated: new SingletonEventManager(context, "bookmarks.onCreated", fire => {
- let listener = (event, bookmark) => {
- context.runSafe(fire, bookmark.id, bookmark);
- };
-
- observer.on("created", listener);
- incrementListeners();
- return () => {
- observer.off("created", listener);
- decrementListeners();
- };
- }).api(),
-
- onRemoved: new SingletonEventManager(context, "bookmarks.onRemoved", fire => {
- let listener = (event, data) => {
- context.runSafe(fire, data.guid, data.info);
- };
-
- observer.on("removed", listener);
- incrementListeners();
- return () => {
- observer.off("removed", listener);
- decrementListeners();
- };
- }).api(),
-
- onChanged: new SingletonEventManager(context, "bookmarks.onChanged", fire => {
- let listener = (event, data) => {
- context.runSafe(fire, data.guid, data.info);
- };
-
- observer.on("changed", listener);
- incrementListeners();
- return () => {
- observer.off("changed", listener);
- decrementListeners();
- };
- }).api(),
-
- onMoved: new SingletonEventManager(context, "bookmarks.onMoved", fire => {
- let listener = (event, data) => {
- context.runSafe(fire, data.guid, data.info);
- };
-
- observer.on("moved", listener);
- incrementListeners();
- return () => {
- observer.off("moved", listener);
- decrementListeners();
- };
- }).api(),
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-browserAction.js b/application/basilisk/components/webextensions/ext-browserAction.js
deleted file mode 100644
index 2c82ac701..000000000
--- a/application/basilisk/components/webextensions/ext-browserAction.js
+++ /dev/null
@@ -1,531 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
- "resource:///modules/CustomizableUI.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "clearTimeout",
- "resource://gre/modules/Timer.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "setTimeout",
- "resource://gre/modules/Timer.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "DOMUtils",
- "@mozilla.org/inspector/dom-utils;1",
- "inIDOMUtils");
-
-Cu.import("resource://devtools/shared/event-emitter.js");
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-
-var {
- EventManager,
- IconDetails,
-} = ExtensionUtils;
-
-const POPUP_PRELOAD_TIMEOUT_MS = 200;
-
-const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-function isAncestorOrSelf(target, node) {
- for (; node; node = node.parentNode) {
- if (node === target) {
- return true;
- }
- }
- return false;
-}
-
-// WeakMap[Extension -> BrowserAction]
-var browserActionMap = new WeakMap();
-
-// Responsible for the browser_action section of the manifest as well
-// as the associated popup.
-function BrowserAction(options, extension) {
- this.extension = extension;
-
- let widgetId = makeWidgetId(extension.id);
- this.id = `${widgetId}-browser-action`;
- this.viewId = `PanelUI-webext-${widgetId}-browser-action-view`;
- this.widget = null;
-
- this.pendingPopup = null;
- this.pendingPopupTimeout = null;
-
- this.tabManager = TabManager.for(extension);
-
- this.defaults = {
- enabled: true,
- title: options.default_title || extension.name,
- badgeText: "",
- badgeBackgroundColor: null,
- icon: IconDetails.normalize({path: options.default_icon}, extension),
- popup: options.default_popup || "",
- };
-
- this.browserStyle = options.browser_style || false;
- if (options.browser_style === null) {
- this.extension.logger.warn("Please specify whether you want browser_style " +
- "or not in your browser_action options.");
- }
-
- this.tabContext = new TabContext(tab => Object.create(this.defaults),
- extension);
-
- EventEmitter.decorate(this);
-}
-
-BrowserAction.prototype = {
- build() {
- let widget = CustomizableUI.createWidget({
- id: this.id,
- viewId: this.viewId,
- type: "view",
- removable: true,
- label: this.defaults.title || this.extension.name,
- tooltiptext: this.defaults.title || "",
- defaultArea: CustomizableUI.AREA_NAVBAR,
-
- onBeforeCreated: document => {
- let view = document.createElementNS(XUL_NS, "panelview");
- view.id = this.viewId;
- view.setAttribute("flex", "1");
-
- document.getElementById("PanelUI-multiView").appendChild(view);
- },
-
- onDestroyed: document => {
- let view = document.getElementById(this.viewId);
- if (view) {
- this.clearPopup();
- CustomizableUI.hidePanelForNode(view);
- view.remove();
- }
- },
-
- onCreated: node => {
- node.classList.add("badged-button");
- node.classList.add("webextension-browser-action");
- node.setAttribute("constrain-size", "true");
-
- node.onmousedown = event => this.handleEvent(event);
-
- this.updateButton(node, this.defaults);
- },
-
- onViewShowing: event => {
- let document = event.target.ownerDocument;
- let tabbrowser = document.defaultView.gBrowser;
-
- let tab = tabbrowser.selectedTab;
- let popupURL = this.getProperty(tab, "popup");
- this.tabManager.addActiveTabPermission(tab);
-
- // Popups are shown only if a popup URL is defined; otherwise
- // a "click" event is dispatched. This is done for compatibility with the
- // Google Chrome onClicked extension API.
- if (popupURL) {
- try {
- let popup = this.getPopup(document.defaultView, popupURL);
- event.detail.addBlocker(popup.attach(event.target));
- } catch (e) {
- Cu.reportError(e);
- event.preventDefault();
- }
- } else {
- // This isn't not a hack, but it seems to provide the correct behavior
- // with the fewest complications.
- event.preventDefault();
- this.emit("click");
- }
- },
- });
-
- this.tabContext.on("tab-select", // eslint-disable-line mozilla/balanced-listeners
- (evt, tab) => { this.updateWindow(tab.ownerGlobal); });
-
- this.widget = widget;
- },
-
- /**
- * Triggers this browser action for the given window, with the same effects as
- * if it were clicked by a user.
- *
- * This has no effect if the browser action is disabled for, or not
- * present in, the given window.
- */
- triggerAction: Task.async(function* (window) {
- let popup = ViewPopup.for(this.extension, window);
- if (popup) {
- popup.closePopup();
- return;
- }
-
- let widget = this.widget.forWindow(window);
- let tab = window.gBrowser.selectedTab;
-
- if (!widget || !this.getProperty(tab, "enabled")) {
- return;
- }
-
- // Popups are shown only if a popup URL is defined; otherwise
- // a "click" event is dispatched. This is done for compatibility with the
- // Google Chrome onClicked extension API.
- if (this.getProperty(tab, "popup")) {
- if (this.widget.areaType == CustomizableUI.TYPE_MENU_PANEL) {
- yield window.PanelUI.show();
- }
-
- let event = new window.CustomEvent("command", {bubbles: true, cancelable: true});
- widget.node.dispatchEvent(event);
- } else {
- this.emit("click");
- }
- }),
-
- handleEvent(event) {
- let button = event.target;
- let window = button.ownerDocument.defaultView;
-
- switch (event.type) {
- case "mousedown":
- if (event.button == 0) {
- // Begin pre-loading the browser for the popup, so it's more likely to
- // be ready by the time we get a complete click.
- let tab = window.gBrowser.selectedTab;
- let popupURL = this.getProperty(tab, "popup");
- let enabled = this.getProperty(tab, "enabled");
-
- if (popupURL && enabled) {
- // Add permission for the active tab so it will exist for the popup.
- // Store the tab to revoke the permission during clearPopup.
- if (!this.pendingPopup && !this.tabManager.hasActiveTabPermission(tab)) {
- this.tabManager.addActiveTabPermission(tab);
- this.tabToRevokeDuringClearPopup = tab;
- }
-
- this.pendingPopup = this.getPopup(window, popupURL);
- window.addEventListener("mouseup", this, true);
- } else {
- this.clearPopup();
- }
- }
- break;
-
- case "mouseup":
- if (event.button == 0) {
- this.clearPopupTimeout();
- // If we have a pending pre-loaded popup, cancel it after we've waited
- // long enough that we can be relatively certain it won't be opening.
- if (this.pendingPopup) {
- let {node} = this.widget.forWindow(window);
- if (isAncestorOrSelf(node, event.originalTarget)) {
- this.pendingPopupTimeout = setTimeout(() => this.clearPopup(),
- POPUP_PRELOAD_TIMEOUT_MS);
- } else {
- this.clearPopup();
- }
- }
- }
- break;
- }
- },
-
- /**
- * Returns a potentially pre-loaded popup for the given URL in the given
- * window. If a matching pre-load popup already exists, returns that.
- * Otherwise, initializes a new one.
- *
- * If a pre-load popup exists which does not match, it is destroyed before a
- * new one is created.
- *
- * @param {Window} window
- * The browser window in which to create the popup.
- * @param {string} popupURL
- * The URL to load into the popup.
- * @returns {ViewPopup}
- */
- getPopup(window, popupURL) {
- this.clearPopupTimeout();
- let {pendingPopup} = this;
- this.pendingPopup = null;
-
- if (pendingPopup) {
- if (pendingPopup.window === window && pendingPopup.popupURL === popupURL) {
- return pendingPopup;
- }
- pendingPopup.destroy();
- }
-
- let fixedWidth = this.widget.areaType == CustomizableUI.TYPE_MENU_PANEL;
- return new ViewPopup(this.extension, window, popupURL, this.browserStyle, fixedWidth);
- },
-
- /**
- * Clears any pending pre-loaded popup and related timeouts.
- */
- clearPopup() {
- this.clearPopupTimeout();
- if (this.pendingPopup) {
- if (this.tabToRevokeDuringClearPopup) {
- this.tabManager.revokeActiveTabPermission(this.tabToRevokeDuringClearPopup);
- this.tabToRevokeDuringClearPopup = null;
- }
- this.pendingPopup.destroy();
- this.pendingPopup = null;
- }
- },
-
- /**
- * Clears any pending timeouts to clear stale, pre-loaded popups.
- */
- clearPopupTimeout() {
- if (this.pendingPopup) {
- this.pendingPopup.window.removeEventListener("mouseup", this, true);
- }
-
- if (this.pendingPopupTimeout) {
- clearTimeout(this.pendingPopupTimeout);
- this.pendingPopupTimeout = null;
- }
- },
-
- // Update the toolbar button |node| with the tab context data
- // in |tabData|.
- updateButton(node, tabData) {
- let title = tabData.title || this.extension.name;
- node.setAttribute("tooltiptext", title);
- node.setAttribute("label", title);
-
- if (tabData.badgeText) {
- node.setAttribute("badge", tabData.badgeText);
- } else {
- node.removeAttribute("badge");
- }
-
- if (tabData.enabled) {
- node.removeAttribute("disabled");
- } else {
- node.setAttribute("disabled", "true");
- }
-
- let badgeNode = node.ownerDocument.getAnonymousElementByAttribute(node,
- "class", "toolbarbutton-badge");
- if (badgeNode) {
- let color = tabData.badgeBackgroundColor;
- if (color) {
- color = `rgba(${color[0]}, ${color[1]}, ${color[2]}, ${color[3] / 255})`;
- }
- badgeNode.style.backgroundColor = color || "";
- }
-
- const LEGACY_CLASS = "toolbarbutton-legacy-addon";
- node.classList.remove(LEGACY_CLASS);
-
- let baseSize = 16;
- let {icon, size} = IconDetails.getPreferredIcon(tabData.icon, this.extension, baseSize);
-
- // If the best available icon size is not divisible by 16, check if we have
- // an 18px icon to fall back to, and trim off the padding instead.
- if (size % 16 && !icon.endsWith(".svg")) {
- let result = IconDetails.getPreferredIcon(tabData.icon, this.extension, 18);
-
- if (result.size % 18 == 0) {
- baseSize = 18;
- icon = result.icon;
- node.classList.add(LEGACY_CLASS);
- }
- }
-
- // These URLs should already be properly escaped, but make doubly sure CSS
- // string escape characters are escaped here, since they could lead to a
- // sandbox break.
- let escape = str => str.replace(/[\\\s"]/g, encodeURIComponent);
-
- let getIcon = size => escape(IconDetails.getPreferredIcon(tabData.icon, this.extension, size).icon);
-
- node.setAttribute("style", `
- --webextension-menupanel-image: url("${getIcon(32)}");
- --webextension-menupanel-image-2x: url("${getIcon(64)}");
- --webextension-toolbar-image: url("${escape(icon)}");
- --webextension-toolbar-image-2x: url("${getIcon(baseSize * 2)}");
- `);
- },
-
- // Update the toolbar button for a given window.
- updateWindow(window) {
- let widget = this.widget.forWindow(window);
- if (widget) {
- let tab = window.gBrowser.selectedTab;
- this.updateButton(widget.node, this.tabContext.get(tab));
- }
- },
-
- // Update the toolbar button when the extension changes the icon,
- // title, badge, etc. If it only changes a parameter for a single
- // tab, |tab| will be that tab. Otherwise it will be null.
- updateOnChange(tab) {
- if (tab) {
- if (tab.selected) {
- this.updateWindow(tab.ownerGlobal);
- }
- } else {
- for (let window of WindowListManager.browserWindows()) {
- this.updateWindow(window);
- }
- }
- },
-
- // tab is allowed to be null.
- // prop should be one of "icon", "title", "badgeText", "popup", or "badgeBackgroundColor".
- setProperty(tab, prop, value) {
- if (tab == null) {
- this.defaults[prop] = value;
- } else if (value != null) {
- this.tabContext.get(tab)[prop] = value;
- } else {
- delete this.tabContext.get(tab)[prop];
- }
-
- this.updateOnChange(tab);
- },
-
- // tab is allowed to be null.
- // prop should be one of "title", "badgeText", "popup", or "badgeBackgroundColor".
- getProperty(tab, prop) {
- if (tab == null) {
- return this.defaults[prop];
- }
- return this.tabContext.get(tab)[prop];
- },
-
- shutdown() {
- this.tabContext.shutdown();
- CustomizableUI.destroyWidget(this.id);
- },
-};
-
-BrowserAction.for = (extension) => {
- return browserActionMap.get(extension);
-};
-
-global.browserActionFor = BrowserAction.for;
-
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("manifest_browser_action", (type, directive, extension, manifest) => {
- let browserAction = new BrowserAction(manifest.browser_action, extension);
- browserAction.build();
- browserActionMap.set(extension, browserAction);
-});
-
-extensions.on("shutdown", (type, extension) => {
- if (browserActionMap.has(extension)) {
- browserActionMap.get(extension).shutdown();
- browserActionMap.delete(extension);
- }
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-extensions.registerSchemaAPI("browserAction", "addon_parent", context => {
- let {extension} = context;
- return {
- browserAction: {
- onClicked: new EventManager(context, "browserAction.onClicked", fire => {
- let listener = () => {
- let tab = TabManager.activeTab;
- fire(TabManager.convert(extension, tab));
- };
- BrowserAction.for(extension).on("click", listener);
- return () => {
- BrowserAction.for(extension).off("click", listener);
- };
- }).api(),
-
- enable: function(tabId) {
- let tab = tabId !== null ? TabManager.getTab(tabId, context) : null;
- BrowserAction.for(extension).setProperty(tab, "enabled", true);
- },
-
- disable: function(tabId) {
- let tab = tabId !== null ? TabManager.getTab(tabId, context) : null;
- BrowserAction.for(extension).setProperty(tab, "enabled", false);
- },
-
- setTitle: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- let title = details.title;
- // Clear the tab-specific title when given a null string.
- if (tab && title == "") {
- title = null;
- }
- BrowserAction.for(extension).setProperty(tab, "title", title);
- },
-
- getTitle: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- let title = BrowserAction.for(extension).getProperty(tab, "title");
- return Promise.resolve(title);
- },
-
- setIcon: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- let icon = IconDetails.normalize(details, extension, context);
- BrowserAction.for(extension).setProperty(tab, "icon", icon);
- },
-
- setBadgeText: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- BrowserAction.for(extension).setProperty(tab, "badgeText", details.text);
- },
-
- getBadgeText: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- let text = BrowserAction.for(extension).getProperty(tab, "badgeText");
- return Promise.resolve(text);
- },
-
- setPopup: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- // Note: Chrome resolves arguments to setIcon relative to the calling
- // context, but resolves arguments to setPopup relative to the extension
- // root.
- // For internal consistency, we currently resolve both relative to the
- // calling context.
- let url = details.popup && context.uri.resolve(details.popup);
- if (url && !context.checkLoadURL(url)) {
- return Promise.reject({message: `Access denied for URL ${url}`});
- }
- BrowserAction.for(extension).setProperty(tab, "popup", url);
- },
-
- getPopup: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- let popup = BrowserAction.for(extension).getProperty(tab, "popup");
- return Promise.resolve(popup);
- },
-
- setBadgeBackgroundColor: function(details) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
- let color = details.color;
- if (!Array.isArray(color)) {
- let col = DOMUtils.colorToRGBA(color);
- color = col && [col.r, col.g, col.b, Math.round(col.a * 255)];
- }
- BrowserAction.for(extension).setProperty(tab, "badgeBackgroundColor", color);
- },
-
- getBadgeBackgroundColor: function(details, callback) {
- let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null;
-
- let color = BrowserAction.for(extension).getProperty(tab, "badgeBackgroundColor");
- return Promise.resolve(color || [0xd9, 0, 0, 255]);
- },
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-c-contextMenus.js b/application/basilisk/components/webextensions/ext-c-contextMenus.js
deleted file mode 100644
index 9fde90808..000000000
--- a/application/basilisk/components/webextensions/ext-c-contextMenus.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-// If id is not specified for an item we use an integer.
-// This ID need only be unique within a single addon. Since all addon code that
-// can use this API runs in the same process, this local variable suffices.
-var gNextMenuItemID = 0;
-
-// Map[Extension -> Map[string or id, ContextMenusClickPropHandler]]
-var gPropHandlers = new Map();
-
-// The contextMenus API supports an "onclick" attribute in the create/update
-// methods to register a callback. This class manages these onclick properties.
-class ContextMenusClickPropHandler {
- constructor(context) {
- this.context = context;
- // Map[string or integer -> callback]
- this.onclickMap = new Map();
- this.dispatchEvent = this.dispatchEvent.bind(this);
- }
-
- // A listener on contextMenus.onClicked that forwards the event to the only
- // listener, if any.
- dispatchEvent(info, tab) {
- let onclick = this.onclickMap.get(info.menuItemId);
- if (onclick) {
- // No need for runSafe or anything because we are already being run inside
- // an event handler -- the event is just being forwarded to the actual
- // handler.
- onclick(info, tab);
- }
- }
-
- // Sets the `onclick` handler for the given menu item.
- // The `onclick` function MUST be owned by `this.context`.
- setListener(id, onclick) {
- if (this.onclickMap.size === 0) {
- this.context.childManager.getParentEvent("contextMenus.onClicked").addListener(this.dispatchEvent);
- this.context.callOnClose(this);
- }
- this.onclickMap.set(id, onclick);
-
- let propHandlerMap = gPropHandlers.get(this.context.extension);
- if (!propHandlerMap) {
- propHandlerMap = new Map();
- } else {
- // If the current callback was created in a different context, remove it
- // from the other context.
- let propHandler = propHandlerMap.get(id);
- if (propHandler && propHandler !== this) {
- propHandler.unsetListener(id);
- }
- }
- propHandlerMap.set(id, this);
- gPropHandlers.set(this.context.extension, propHandlerMap);
- }
-
- // Deletes the `onclick` handler for the given menu item.
- // The `onclick` function MUST be owned by `this.context`.
- unsetListener(id) {
- if (!this.onclickMap.delete(id)) {
- return;
- }
- if (this.onclickMap.size === 0) {
- this.context.childManager.getParentEvent("contextMenus.onClicked").removeListener(this.dispatchEvent);
- this.context.forgetOnClose(this);
- }
- let propHandlerMap = gPropHandlers.get(this.context.extension);
- propHandlerMap.delete(id);
- if (propHandlerMap.size === 0) {
- gPropHandlers.delete(this.context.extension);
- }
- }
-
- // Deletes the `onclick` handler for the given menu item, if any, regardless
- // of the context where it was created.
- unsetListenerFromAnyContext(id) {
- let propHandlerMap = gPropHandlers.get(this.context.extension);
- let propHandler = propHandlerMap && propHandlerMap.get(id);
- if (propHandler) {
- propHandler.unsetListener(id);
- }
- }
-
- // Remove all `onclick` handlers of the extension.
- deleteAllListenersFromExtension() {
- let propHandlerMap = gPropHandlers.get(this.context.extension);
- if (propHandlerMap) {
- for (let [id, propHandler] of propHandlerMap) {
- propHandler.unsetListener(id);
- }
- }
- }
-
- // Removes all `onclick` handlers from this context.
- close() {
- for (let id of this.onclickMap.keys()) {
- this.unsetListener(id);
- }
- }
-}
-
-extensions.registerSchemaAPI("contextMenus", "addon_child", context => {
- let onClickedProp = new ContextMenusClickPropHandler(context);
-
- return {
- contextMenus: {
- create(createProperties, callback) {
- if (createProperties.id === null) {
- createProperties.id = ++gNextMenuItemID;
- }
- let {onclick} = createProperties;
- delete createProperties.onclick;
- context.childManager.callParentAsyncFunction("contextMenus.createInternal", [
- createProperties,
- ]).then(() => {
- if (onclick) {
- onClickedProp.setListener(createProperties.id, onclick);
- }
- if (callback) {
- callback();
- }
- });
- return createProperties.id;
- },
-
- update(id, updateProperties) {
- let {onclick} = updateProperties;
- delete updateProperties.onclick;
- return context.childManager.callParentAsyncFunction("contextMenus.update", [
- id,
- updateProperties,
- ]).then(() => {
- if (onclick) {
- onClickedProp.setListener(id, onclick);
- } else if (onclick === null) {
- onClickedProp.unsetListenerFromAnyContext(id);
- }
- // else onclick is not set so it should not be changed.
- });
- },
-
- remove(id) {
- onClickedProp.unsetListenerFromAnyContext(id);
- return context.childManager.callParentAsyncFunction("contextMenus.remove", [
- id,
- ]);
- },
-
- removeAll() {
- onClickedProp.deleteAllListenersFromExtension();
-
- return context.childManager.callParentAsyncFunction("contextMenus.removeAll", []);
- },
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-c-omnibox.js b/application/basilisk/components/webextensions/ext-c-omnibox.js
deleted file mode 100644
index 3b9b6e2f7..000000000
--- a/application/basilisk/components/webextensions/ext-c-omnibox.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-
-var {
- runSafeSyncWithoutClone,
- SingletonEventManager,
-} = ExtensionUtils;
-
-extensions.registerSchemaAPI("omnibox", "addon_child", context => {
- return {
- omnibox: {
- onInputChanged: new SingletonEventManager(context, "omnibox.onInputChanged", fire => {
- let listener = (text, id) => {
- runSafeSyncWithoutClone(fire, text, suggestions => {
- // TODO: Switch to using callParentFunctionNoReturn once bug 1314903 is fixed.
- context.childManager.callParentAsyncFunction("omnibox_internal.addSuggestions", [
- id,
- suggestions,
- ]);
- });
- };
- context.childManager.getParentEvent("omnibox_internal.onInputChanged").addListener(listener);
- return () => {
- context.childManager.getParentEvent("omnibox_internal.onInputChanged").removeListener(listener);
- };
- }).api(),
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-c-tabs.js b/application/basilisk/components/webextensions/ext-c-tabs.js
deleted file mode 100644
index d5ce9fbf9..000000000
--- a/application/basilisk/components/webextensions/ext-c-tabs.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-extensions.registerSchemaAPI("tabs", "addon_child", context => {
- return {
- tabs: {
- connect: function(tabId, connectInfo) {
- let name = "";
- if (connectInfo && connectInfo.name !== null) {
- name = connectInfo.name;
- }
- let recipient = {
- extensionId: context.extension.id,
- tabId,
- };
- if (connectInfo && connectInfo.frameId !== null) {
- recipient.frameId = connectInfo.frameId;
- }
- return context.messenger.connect(context.messageManager, name, recipient);
- },
-
- sendMessage: function(tabId, message, options, responseCallback) {
- let recipient = {
- extensionId: context.extension.id,
- tabId: tabId,
- };
- if (options && options.frameId !== null) {
- recipient.frameId = options.frameId;
- }
- return context.messenger.sendMessage(context.messageManager, message, recipient, responseCallback);
- },
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-commands.js b/application/basilisk/components/webextensions/ext-commands.js
deleted file mode 100644
index b6e7ab3d1..000000000
--- a/application/basilisk/components/webextensions/ext-commands.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-Cu.import("resource://devtools/shared/event-emitter.js");
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-
-var {
- EventManager,
- PlatformInfo,
-} = ExtensionUtils;
-
-const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-// WeakMap[Extension -> CommandList]
-var commandsMap = new WeakMap();
-
-function CommandList(manifest, extension) {
- this.extension = extension;
- this.id = makeWidgetId(extension.id);
- this.windowOpenListener = null;
-
- // Map[{String} commandName -> {Object} commandProperties]
- this.commands = this.loadCommandsFromManifest(manifest);
-
- // WeakMap[Window -> <xul:keyset>]
- this.keysetsMap = new WeakMap();
-
- this.register();
- EventEmitter.decorate(this);
-}
-
-CommandList.prototype = {
- /**
- * Registers the commands to all open windows and to any which
- * are later created.
- */
- register() {
- for (let window of WindowListManager.browserWindows()) {
- this.registerKeysToDocument(window);
- }
-
- this.windowOpenListener = (window) => {
- if (!this.keysetsMap.has(window)) {
- this.registerKeysToDocument(window);
- }
- };
-
- WindowListManager.addOpenListener(this.windowOpenListener);
- },
-
- /**
- * Unregisters the commands from all open windows and stops commands
- * from being registered to windows which are later created.
- */
- unregister() {
- for (let window of WindowListManager.browserWindows()) {
- if (this.keysetsMap.has(window)) {
- this.keysetsMap.get(window).remove();
- }
- }
-
- WindowListManager.removeOpenListener(this.windowOpenListener);
- },
-
- /**
- * Creates a Map from commands for each command in the manifest.commands object.
- *
- * @param {Object} manifest The manifest JSON object.
- * @returns {Map<string, object>}
- */
- loadCommandsFromManifest(manifest) {
- let commands = new Map();
- // For Windows, chrome.runtime expects 'win' while chrome.commands
- // expects 'windows'. We can special case this for now.
- let os = PlatformInfo.os == "win" ? "windows" : PlatformInfo.os;
- for (let [name, command] of Object.entries(manifest.commands)) {
- let suggested_key = command.suggested_key || {};
- let shortcut = suggested_key[os] || suggested_key.default;
- shortcut = shortcut ? shortcut.replace(/\s+/g, "") : null;
- commands.set(name, {
- description: command.description,
- shortcut,
- });
- }
- return commands;
- },
-
- /**
- * Registers the commands to a document.
- * @param {ChromeWindow} window The XUL window to insert the Keyset.
- */
- registerKeysToDocument(window) {
- let doc = window.document;
- let keyset = doc.createElementNS(XUL_NS, "keyset");
- keyset.id = `ext-keyset-id-${this.id}`;
- this.commands.forEach((command, name) => {
- if (command.shortcut) {
- let keyElement = this.buildKey(doc, name, command.shortcut);
- keyset.appendChild(keyElement);
- }
- });
- doc.documentElement.appendChild(keyset);
- this.keysetsMap.set(window, keyset);
- },
-
- /**
- * Builds a XUL Key element and attaches an onCommand listener which
- * emits a command event with the provided name when fired.
- *
- * @param {Document} doc The XUL document.
- * @param {string} name The name of the command.
- * @param {string} shortcut The shortcut provided in the manifest.
- * @see https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/key
- *
- * @returns {Document} The newly created Key element.
- */
- buildKey(doc, name, shortcut) {
- let keyElement = this.buildKeyFromShortcut(doc, shortcut);
-
- // We need to have the attribute "oncommand" for the "command" listener to fire,
- // and it is currently ignored when set to the empty string.
- keyElement.setAttribute("oncommand", "//");
-
- /* eslint-disable mozilla/balanced-listeners */
- // We remove all references to the key elements when the extension is shutdown,
- // therefore the listeners for these elements will be garbage collected.
- keyElement.addEventListener("command", (event) => {
- if (name == "_execute_page_action") {
- let win = event.target.ownerDocument.defaultView;
- pageActionFor(this.extension).triggerAction(win);
- } else if (name == "_execute_browser_action") {
- let win = event.target.ownerDocument.defaultView;
- browserActionFor(this.extension).triggerAction(win);
- } else {
- TabManager.for(this.extension)
- .addActiveTabPermission(TabManager.activeTab);
- this.emit("command", name);
- }
- });
- /* eslint-enable mozilla/balanced-listeners */
-
- return keyElement;
- },
-
- /**
- * Builds a XUL Key element from the provided shortcut.
- *
- * @param {Document} doc The XUL document.
- * @param {string} shortcut The shortcut provided in the manifest.
- *
- * @see https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/key
- * @returns {Document} The newly created Key element.
- */
- buildKeyFromShortcut(doc, shortcut) {
- let keyElement = doc.createElementNS(XUL_NS, "key");
-
- let parts = shortcut.split("+");
-
- // The key is always the last element.
- let chromeKey = parts.pop();
-
- // The modifiers are the remaining elements.
- keyElement.setAttribute("modifiers", this.getModifiersAttribute(parts));
-
- if (/^[A-Z]$/.test(chromeKey)) {
- // We use the key attribute for all single digits and characters.
- keyElement.setAttribute("key", chromeKey);
- } else {
- keyElement.setAttribute("keycode", this.getKeycodeAttribute(chromeKey));
- keyElement.setAttribute("event", "keydown");
- }
-
- return keyElement;
- },
-
- /**
- * Determines the corresponding XUL keycode from the given chrome key.
- *
- * For example:
- *
- * input | output
- * ---------------------------------------
- * "PageUP" | "VK_PAGE_UP"
- * "Delete" | "VK_DELETE"
- *
- * @param {string} chromeKey The chrome key (e.g. "PageUp", "Space", ...)
- * @returns {string} The constructed value for the Key's 'keycode' attribute.
- */
- getKeycodeAttribute(chromeKey) {
- if (/[0-9]/.test(chromeKey)) {
- return `VK_${chromeKey}`;
- }
- return `VK${chromeKey.replace(/([A-Z])/g, "_$&").toUpperCase()}`;
- },
-
- /**
- * Determines the corresponding XUL modifiers from the chrome modifiers.
- *
- * For example:
- *
- * input | output
- * ---------------------------------------
- * ["Ctrl", "Shift"] | "accel shift"
- * ["MacCtrl"] | "control"
- *
- * @param {Array} chromeModifiers The array of chrome modifiers.
- * @returns {string} The constructed value for the Key's 'modifiers' attribute.
- */
- getModifiersAttribute(chromeModifiers) {
- let modifiersMap = {
- "Alt": "alt",
- "Command": "accel",
- "Ctrl": "accel",
- "MacCtrl": "control",
- "Shift": "shift",
- };
- return Array.from(chromeModifiers, modifier => {
- return modifiersMap[modifier];
- }).join(" ");
- },
-};
-
-
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("manifest_commands", (type, directive, extension, manifest) => {
- commandsMap.set(extension, new CommandList(manifest, extension));
-});
-
-extensions.on("shutdown", (type, extension) => {
- let commandsList = commandsMap.get(extension);
- if (commandsList) {
- commandsList.unregister();
- commandsMap.delete(extension);
- }
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-extensions.registerSchemaAPI("commands", "addon_parent", context => {
- let {extension} = context;
- return {
- commands: {
- getAll() {
- let commands = commandsMap.get(extension).commands;
- return Promise.resolve(Array.from(commands, ([name, command]) => {
- return ({
- name,
- description: command.description,
- shortcut: command.shortcut,
- });
- }));
- },
- onCommand: new EventManager(context, "commands.onCommand", fire => {
- let listener = (eventName, commandName) => {
- fire(commandName);
- };
- commandsMap.get(extension).on("command", listener);
- return () => {
- commandsMap.get(extension).off("command", listener);
- };
- }).api(),
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-contextMenus.js b/application/basilisk/components/webextensions/ext-contextMenus.js
deleted file mode 100644
index b3bf8aa53..000000000
--- a/application/basilisk/components/webextensions/ext-contextMenus.js
+++ /dev/null
@@ -1,537 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-Cu.import("resource://gre/modules/MatchPattern.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var {
- EventManager,
- ExtensionError,
- IconDetails,
-} = ExtensionUtils;
-
-// Map[Extension -> Map[ID -> MenuItem]]
-// Note: we want to enumerate all the menu items so
-// this cannot be a weak map.
-var gContextMenuMap = new Map();
-
-// Map[Extension -> MenuItem]
-var gRootItems = new Map();
-
-// If id is not specified for an item we use an integer.
-var gNextMenuItemID = 0;
-
-// Used to assign unique names to radio groups.
-var gNextRadioGroupID = 0;
-
-// The max length of a menu item's label.
-var gMaxLabelLength = 64;
-
-// When a new contextMenu is opened, this function is called and
-// we populate the |xulMenu| with all the items from extensions
-// to be displayed. We always clear all the items again when
-// popuphidden fires.
-var gMenuBuilder = {
- build: function(contextData) {
- let xulMenu = contextData.menu;
- xulMenu.addEventListener("popuphidden", this);
- this.xulMenu = xulMenu;
- for (let [, root] of gRootItems) {
- let rootElement = this.buildElementWithChildren(root, contextData);
- if (!rootElement.firstChild || !rootElement.firstChild.childNodes.length) {
- // If the root has no visible children, there is no reason to show
- // the root menu item itself either.
- continue;
- }
- rootElement.setAttribute("ext-type", "top-level-menu");
- rootElement = this.removeTopLevelMenuIfNeeded(rootElement);
-
- // Display the extension icon on the root element.
- if (root.extension.manifest.icons) {
- let parentWindow = contextData.menu.ownerGlobal;
- let extension = root.extension;
-
- let {icon} = IconDetails.getPreferredIcon(extension.manifest.icons, extension,
- 16 * parentWindow.devicePixelRatio);
-
- // The extension icons in the manifest are not pre-resolved, since
- // they're sometimes used by the add-on manager when the extension is
- // not enabled, and its URLs are not resolvable.
- let resolvedURL = root.extension.baseURI.resolve(icon);
-
- if (rootElement.localName == "menu") {
- rootElement.setAttribute("class", "menu-iconic");
- } else if (rootElement.localName == "menuitem") {
- rootElement.setAttribute("class", "menuitem-iconic");
- }
- rootElement.setAttribute("image", resolvedURL);
- }
-
- xulMenu.appendChild(rootElement);
- this.itemsToCleanUp.add(rootElement);
- }
- },
-
- buildElementWithChildren(item, contextData) {
- let element = this.buildSingleElement(item, contextData);
- let groupName;
- for (let child of item.children) {
- if (child.type == "radio" && !child.groupName) {
- if (!groupName) {
- groupName = `webext-radio-group-${gNextRadioGroupID++}`;
- }
- child.groupName = groupName;
- } else {
- groupName = null;
- }
-
- if (child.enabledForContext(contextData)) {
- let childElement = this.buildElementWithChildren(child, contextData);
- // Here element must be a menu element and its first child
- // is a menupopup, we have to append its children to this
- // menupopup.
- element.firstChild.appendChild(childElement);
- }
- }
-
- return element;
- },
-
- removeTopLevelMenuIfNeeded(element) {
- // If there is only one visible top level element we don't need the
- // root menu element for the extension.
- let menuPopup = element.firstChild;
- if (menuPopup && menuPopup.childNodes.length == 1) {
- let onlyChild = menuPopup.firstChild;
- onlyChild.remove();
- return onlyChild;
- }
-
- return element;
- },
-
- buildSingleElement(item, contextData) {
- let doc = contextData.menu.ownerDocument;
- let element;
- if (item.children.length > 0) {
- element = this.createMenuElement(doc, item);
- } else if (item.type == "separator") {
- element = doc.createElement("menuseparator");
- } else {
- element = doc.createElement("menuitem");
- }
-
- return this.customizeElement(element, item, contextData);
- },
-
- createMenuElement(doc, item) {
- let element = doc.createElement("menu");
- // Menu elements need to have a menupopup child for its menu items.
- let menupopup = doc.createElement("menupopup");
- element.appendChild(menupopup);
- return element;
- },
-
- customizeElement(element, item, contextData) {
- let label = item.title;
- if (label) {
- if (contextData.isTextSelected && label.indexOf("%s") > -1) {
- let selection = contextData.selectionText;
- // The rendering engine will truncate the title if it's longer than 64 characters.
- // But if it makes sense let's try truncate selection text only, to handle cases like
- // 'look up "%s" in MyDictionary' more elegantly.
- let maxSelectionLength = gMaxLabelLength - label.length + 2;
- if (maxSelectionLength > 4) {
- selection = selection.substring(0, maxSelectionLength - 3) + "...";
- }
- label = label.replace(/%s/g, selection);
- }
-
- element.setAttribute("label", label);
- }
-
- if (item.type == "checkbox") {
- element.setAttribute("type", "checkbox");
- if (item.checked) {
- element.setAttribute("checked", "true");
- }
- } else if (item.type == "radio") {
- element.setAttribute("type", "radio");
- element.setAttribute("name", item.groupName);
- if (item.checked) {
- element.setAttribute("checked", "true");
- }
- }
-
- if (!item.enabled) {
- element.setAttribute("disabled", "true");
- }
-
- element.addEventListener("command", event => { // eslint-disable-line mozilla/balanced-listeners
- if (event.target !== event.currentTarget) {
- return;
- }
- const wasChecked = item.checked;
- if (item.type == "checkbox") {
- item.checked = !item.checked;
- } else if (item.type == "radio") {
- // Deselect all radio items in the current radio group.
- for (let child of item.parent.children) {
- if (child.type == "radio" && child.groupName == item.groupName) {
- child.checked = false;
- }
- }
- // Select the clicked radio item.
- item.checked = true;
- }
-
- item.tabManager.addActiveTabPermission();
-
- let tab = item.tabManager.convert(contextData.tab);
- let info = item.getClickInfo(contextData, wasChecked);
- item.extension.emit("webext-contextmenu-menuitem-click", info, tab);
- });
-
- return element;
- },
-
- handleEvent: function(event) {
- if (this.xulMenu != event.target || event.type != "popuphidden") {
- return;
- }
-
- delete this.xulMenu;
- let target = event.target;
- target.removeEventListener("popuphidden", this);
- for (let item of this.itemsToCleanUp) {
- item.remove();
- }
- this.itemsToCleanUp.clear();
- },
-
- itemsToCleanUp: new Set(),
-};
-
-function contextMenuObserver(subject, topic, data) {
- subject = subject.wrappedJSObject;
- gMenuBuilder.build(subject);
-}
-
-function getContexts(contextData) {
- let contexts = new Set(["all"]);
-
- if (contextData.inFrame) {
- contexts.add("frame");
- }
-
- if (contextData.isTextSelected) {
- contexts.add("selection");
- }
-
- if (contextData.onLink) {
- contexts.add("link");
- }
-
- if (contextData.onEditableArea) {
- contexts.add("editable");
- }
-
- if (contextData.onImage) {
- contexts.add("image");
- }
-
- if (contextData.onVideo) {
- contexts.add("video");
- }
-
- if (contextData.onAudio) {
- contexts.add("audio");
- }
-
- if (contexts.size == 1) {
- contexts.add("page");
- }
-
- return contexts;
-}
-
-function MenuItem(extension, createProperties, isRoot = false) {
- this.extension = extension;
- this.children = [];
- this.parent = null;
- this.tabManager = TabManager.for(extension);
-
- this.setDefaults();
- this.setProps(createProperties);
- if (!this.hasOwnProperty("_id")) {
- this.id = gNextMenuItemID++;
- }
- // If the item is not the root and has no parent
- // it must be a child of the root.
- if (!isRoot && !this.parent) {
- this.root.addChild(this);
- }
-}
-
-MenuItem.prototype = {
- setProps(createProperties) {
- for (let propName in createProperties) {
- if (createProperties[propName] === null) {
- // Omitted optional argument.
- continue;
- }
- this[propName] = createProperties[propName];
- }
-
- if (createProperties.documentUrlPatterns != null) {
- this.documentUrlMatchPattern = new MatchPattern(this.documentUrlPatterns);
- }
-
- if (createProperties.targetUrlPatterns != null) {
- this.targetUrlMatchPattern = new MatchPattern(this.targetUrlPatterns);
- }
- },
-
- setDefaults() {
- this.setProps({
- type: "normal",
- checked: false,
- contexts: ["all"],
- enabled: true,
- });
- },
-
- set id(id) {
- if (this.hasOwnProperty("_id")) {
- throw new Error("Id of a MenuItem cannot be changed");
- }
- let isIdUsed = gContextMenuMap.get(this.extension).has(id);
- if (isIdUsed) {
- throw new Error("Id already exists");
- }
- this._id = id;
- },
-
- get id() {
- return this._id;
- },
-
- ensureValidParentId(parentId) {
- if (parentId === undefined) {
- return;
- }
- let menuMap = gContextMenuMap.get(this.extension);
- if (!menuMap.has(parentId)) {
- throw new Error("Could not find any MenuItem with id: " + parentId);
- }
- for (let item = menuMap.get(parentId); item; item = item.parent) {
- if (item === this) {
- throw new ExtensionError("MenuItem cannot be an ancestor (or self) of its new parent.");
- }
- }
- },
-
- set parentId(parentId) {
- this.ensureValidParentId(parentId);
-
- if (this.parent) {
- this.parent.detachChild(this);
- }
-
- if (parentId === undefined) {
- this.root.addChild(this);
- } else {
- let menuMap = gContextMenuMap.get(this.extension);
- menuMap.get(parentId).addChild(this);
- }
- },
-
- get parentId() {
- return this.parent ? this.parent.id : undefined;
- },
-
- addChild(child) {
- if (child.parent) {
- throw new Error("Child MenuItem already has a parent.");
- }
- this.children.push(child);
- child.parent = this;
- },
-
- detachChild(child) {
- let idx = this.children.indexOf(child);
- if (idx < 0) {
- throw new Error("Child MenuItem not found, it cannot be removed.");
- }
- this.children.splice(idx, 1);
- child.parent = null;
- },
-
- get root() {
- let extension = this.extension;
- if (!gRootItems.has(extension)) {
- let root = new MenuItem(extension,
- {title: extension.name},
- /* isRoot = */ true);
- gRootItems.set(extension, root);
- }
-
- return gRootItems.get(extension);
- },
-
- remove() {
- if (this.parent) {
- this.parent.detachChild(this);
- }
- let children = this.children.slice(0);
- for (let child of children) {
- child.remove();
- }
-
- let menuMap = gContextMenuMap.get(this.extension);
- menuMap.delete(this.id);
- if (this.root == this) {
- gRootItems.delete(this.extension);
- }
- },
-
- getClickInfo(contextData, wasChecked) {
- let mediaType;
- if (contextData.onVideo) {
- mediaType = "video";
- }
- if (contextData.onAudio) {
- mediaType = "audio";
- }
- if (contextData.onImage) {
- mediaType = "image";
- }
-
- let info = {
- menuItemId: this.id,
- editable: contextData.onEditableArea,
- };
-
- function setIfDefined(argName, value) {
- if (value !== undefined) {
- info[argName] = value;
- }
- }
-
- setIfDefined("parentMenuItemId", this.parentId);
- setIfDefined("mediaType", mediaType);
- setIfDefined("linkUrl", contextData.linkUrl);
- setIfDefined("srcUrl", contextData.srcUrl);
- setIfDefined("pageUrl", contextData.pageUrl);
- setIfDefined("frameUrl", contextData.frameUrl);
- setIfDefined("selectionText", contextData.selectionText);
-
- if ((this.type === "checkbox") || (this.type === "radio")) {
- info.checked = this.checked;
- info.wasChecked = wasChecked;
- }
-
- return info;
- },
-
- enabledForContext(contextData) {
- let contexts = getContexts(contextData);
- if (!this.contexts.some(n => contexts.has(n))) {
- return false;
- }
-
- let docPattern = this.documentUrlMatchPattern;
- let pageURI = Services.io.newURI(contextData.pageUrl, null, null);
- if (docPattern && !docPattern.matches(pageURI)) {
- return false;
- }
-
- let targetPattern = this.targetUrlMatchPattern;
- if (targetPattern) {
- let targetUrls = [];
- if (contextData.onImage || contextData.onAudio || contextData.onVideo) {
- // TODO: double check if srcUrl is always set when we need it
- targetUrls.push(contextData.srcUrl);
- }
- if (contextData.onLink) {
- targetUrls.push(contextData.linkUrl);
- }
- if (!targetUrls.some(targetUrl => targetPattern.matches(NetUtil.newURI(targetUrl)))) {
- return false;
- }
- }
-
- return true;
- },
-};
-
-var gExtensionCount = 0;
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("startup", (type, extension) => {
- gContextMenuMap.set(extension, new Map());
- if (++gExtensionCount == 1) {
- Services.obs.addObserver(contextMenuObserver,
- "on-build-contextmenu",
- false);
- }
-});
-
-extensions.on("shutdown", (type, extension) => {
- gContextMenuMap.delete(extension);
- gRootItems.delete(extension);
- if (--gExtensionCount == 0) {
- Services.obs.removeObserver(contextMenuObserver,
- "on-build-contextmenu");
- }
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-extensions.registerSchemaAPI("contextMenus", "addon_parent", context => {
- let {extension} = context;
- return {
- contextMenus: {
- createInternal: function(createProperties) {
- // Note that the id is required by the schema. If the addon did not set
- // it, the implementation of contextMenus.create in the child should
- // have added it.
- let menuItem = new MenuItem(extension, createProperties);
- gContextMenuMap.get(extension).set(menuItem.id, menuItem);
- },
-
- update: function(id, updateProperties) {
- let menuItem = gContextMenuMap.get(extension).get(id);
- if (menuItem) {
- menuItem.setProps(updateProperties);
- }
- },
-
- remove: function(id) {
- let menuItem = gContextMenuMap.get(extension).get(id);
- if (menuItem) {
- menuItem.remove();
- }
- },
-
- removeAll: function() {
- let root = gRootItems.get(extension);
- if (root) {
- root.remove();
- }
- },
-
- onClicked: new EventManager(context, "contextMenus.onClicked", fire => {
- let listener = (event, info, tab) => {
- fire(info, tab);
- };
-
- extension.on("webext-contextmenu-menuitem-click", listener);
- return () => {
- extension.off("webext-contextmenu-menuitem-click", listener);
- };
- }).api(),
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-desktop-runtime.js b/application/basilisk/components/webextensions/ext-desktop-runtime.js
deleted file mode 100644
index 0fdb45562..000000000
--- a/application/basilisk/components/webextensions/ext-desktop-runtime.js
+++ /dev/null
@@ -1,26 +0,0 @@
-"use strict";
-
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("uninstall", (msg, extension) => {
- if (extension.uninstallURL) {
- let browser = WindowManager.topWindow.gBrowser;
- browser.addTab(extension.uninstallURL, {relatedToCurrent: true});
- }
-});
-
-global.openOptionsPage = (extension) => {
- let window = WindowManager.topWindow;
- if (!window) {
- return Promise.reject({message: "No browser window available"});
- }
-
- if (extension.manifest.options_ui.open_in_tab) {
- window.switchToTabHavingURI(extension.manifest.options_ui.page, true);
- return Promise.resolve();
- }
-
- let viewId = `addons://detail/${encodeURIComponent(extension.id)}/preferences`;
-
- return window.BrowserOpenAddonsMgr(viewId);
-};
-
diff --git a/application/basilisk/components/webextensions/ext-history.js b/application/basilisk/components/webextensions/ext-history.js
deleted file mode 100644
index a47df1621..000000000
--- a/application/basilisk/components/webextensions/ext-history.js
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter",
- "resource://devtools/shared/event-emitter.js");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
- "resource://gre/modules/PlacesUtils.jsm");
-
-const {
- normalizeTime,
- SingletonEventManager,
-} = ExtensionUtils;
-
-let nsINavHistoryService = Ci.nsINavHistoryService;
-const TRANSITION_TO_TRANSITION_TYPES_MAP = new Map([
- ["link", nsINavHistoryService.TRANSITION_LINK],
- ["typed", nsINavHistoryService.TRANSITION_TYPED],
- ["auto_bookmark", nsINavHistoryService.TRANSITION_BOOKMARK],
- ["auto_subframe", nsINavHistoryService.TRANSITION_EMBED],
- ["manual_subframe", nsINavHistoryService.TRANSITION_FRAMED_LINK],
-]);
-
-let TRANSITION_TYPE_TO_TRANSITIONS_MAP = new Map();
-for (let [transition, transitionType] of TRANSITION_TO_TRANSITION_TYPES_MAP) {
- TRANSITION_TYPE_TO_TRANSITIONS_MAP.set(transitionType, transition);
-}
-
-function getTransitionType(transition) {
- // cannot set a default value for the transition argument as the framework sets it to null
- transition = transition || "link";
- let transitionType = TRANSITION_TO_TRANSITION_TYPES_MAP.get(transition);
- if (!transitionType) {
- throw new Error(`|${transition}| is not a supported transition for history`);
- }
- return transitionType;
-}
-
-function getTransition(transitionType) {
- return TRANSITION_TYPE_TO_TRANSITIONS_MAP.get(transitionType) || "link";
-}
-
-/*
- * Converts a nsINavHistoryResultNode into a HistoryItem
- *
- * https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavHistoryResultNode
- */
-function convertNodeToHistoryItem(node) {
- return {
- id: node.pageGuid,
- url: node.uri,
- title: node.title,
- lastVisitTime: PlacesUtils.toDate(node.time).getTime(),
- visitCount: node.accessCount,
- };
-}
-
-/*
- * Converts a nsINavHistoryResultNode into a VisitItem
- *
- * https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavHistoryResultNode
- */
-function convertNodeToVisitItem(node) {
- return {
- id: node.pageGuid,
- visitId: node.visitId,
- visitTime: PlacesUtils.toDate(node.time).getTime(),
- referringVisitId: node.fromVisitId,
- transition: getTransition(node.visitType),
- };
-}
-
-/*
- * Converts a nsINavHistoryContainerResultNode into an array of objects
- *
- * https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavHistoryContainerResultNode
- */
-function convertNavHistoryContainerResultNode(container, converter) {
- let results = [];
- container.containerOpen = true;
- for (let i = 0; i < container.childCount; i++) {
- let node = container.getChild(i);
- results.push(converter(node));
- }
- container.containerOpen = false;
- return results;
-}
-
-var _observer;
-
-function getObserver() {
- if (!_observer) {
- _observer = {
- onDeleteURI: function(uri, guid, reason) {
- this.emit("visitRemoved", {allHistory: false, urls: [uri.spec]});
- },
- onVisit: function(uri, visitId, time, sessionId, referringId, transitionType, guid, hidden, visitCount, typed) {
- let data = {
- id: guid,
- url: uri.spec,
- title: "",
- lastVisitTime: time / 1000, // time from Places is microseconds,
- visitCount,
- typedCount: typed,
- };
- this.emit("visited", data);
- },
- onBeginUpdateBatch: function() {},
- onEndUpdateBatch: function() {},
- onTitleChanged: function() {},
- onClearHistory: function() {
- this.emit("visitRemoved", {allHistory: true, urls: []});
- },
- onPageChanged: function() {},
- onFrecencyChanged: function() {},
- onManyFrecenciesChanged: function() {},
- onDeleteVisits: function(uri, time, guid, reason) {
- this.emit("visitRemoved", {allHistory: false, urls: [uri.spec]});
- },
- };
- EventEmitter.decorate(_observer);
- PlacesUtils.history.addObserver(_observer, false);
- }
- return _observer;
-}
-
-extensions.registerSchemaAPI("history", "addon_parent", context => {
- return {
- history: {
- addUrl: function(details) {
- let transition, date;
- try {
- transition = getTransitionType(details.transition);
- } catch (error) {
- return Promise.reject({message: error.message});
- }
- if (details.visitTime) {
- date = normalizeTime(details.visitTime);
- }
- let pageInfo = {
- title: details.title,
- url: details.url,
- visits: [
- {
- transition,
- date,
- },
- ],
- };
- try {
- return PlacesUtils.history.insert(pageInfo).then(() => undefined);
- } catch (error) {
- return Promise.reject({message: error.message});
- }
- },
-
- deleteAll: function() {
- return PlacesUtils.history.clear();
- },
-
- deleteRange: function(filter) {
- let newFilter = {
- beginDate: normalizeTime(filter.startTime),
- endDate: normalizeTime(filter.endTime),
- };
- // History.removeVisitsByFilter returns a boolean, but our API should return nothing
- return PlacesUtils.history.removeVisitsByFilter(newFilter).then(() => undefined);
- },
-
- deleteUrl: function(details) {
- let url = details.url;
- // History.remove returns a boolean, but our API should return nothing
- return PlacesUtils.history.remove(url).then(() => undefined);
- },
-
- search: function(query) {
- let beginTime = (query.startTime == null) ?
- PlacesUtils.toPRTime(Date.now() - 24 * 60 * 60 * 1000) :
- PlacesUtils.toPRTime(normalizeTime(query.startTime));
- let endTime = (query.endTime == null) ?
- Number.MAX_VALUE :
- PlacesUtils.toPRTime(normalizeTime(query.endTime));
- if (beginTime > endTime) {
- return Promise.reject({message: "The startTime cannot be after the endTime"});
- }
-
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.maxResults = query.maxResults || 100;
-
- let historyQuery = PlacesUtils.history.getNewQuery();
- historyQuery.searchTerms = query.text;
- historyQuery.beginTime = beginTime;
- historyQuery.endTime = endTime;
- let queryResult = PlacesUtils.history.executeQuery(historyQuery, options).root;
- let results = convertNavHistoryContainerResultNode(queryResult, convertNodeToHistoryItem);
- return Promise.resolve(results);
- },
-
- getVisits: function(details) {
- let url = details.url;
- if (!url) {
- return Promise.reject({message: "A URL must be provided for getVisits"});
- }
-
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.resultType = options.RESULTS_AS_VISIT;
-
- let historyQuery = PlacesUtils.history.getNewQuery();
- historyQuery.uri = NetUtil.newURI(url);
- let queryResult = PlacesUtils.history.executeQuery(historyQuery, options).root;
- let results = convertNavHistoryContainerResultNode(queryResult, convertNodeToVisitItem);
- return Promise.resolve(results);
- },
-
- onVisited: new SingletonEventManager(context, "history.onVisited", fire => {
- let listener = (event, data) => {
- context.runSafe(fire, data);
- };
-
- getObserver().on("visited", listener);
- return () => {
- getObserver().off("visited", listener);
- };
- }).api(),
-
- onVisitRemoved: new SingletonEventManager(context, "history.onVisitRemoved", fire => {
- let listener = (event, data) => {
- context.runSafe(fire, data);
- };
-
- getObserver().on("visitRemoved", listener);
- return () => {
- getObserver().off("visitRemoved", listener);
- };
- }).api(),
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-omnibox.js b/application/basilisk/components/webextensions/ext-omnibox.js
deleted file mode 100644
index 9b2f60ca4..000000000
--- a/application/basilisk/components/webextensions/ext-omnibox.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSearchHandler",
- "resource://gre/modules/ExtensionSearchHandler.jsm");
-var {
- SingletonEventManager,
-} = ExtensionUtils;
-
-// WeakMap[extension -> keyword]
-let gKeywordMap = new WeakMap();
-
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("manifest_omnibox", (type, directive, extension, manifest) => {
- let keyword = manifest.omnibox.keyword;
- try {
- // This will throw if the keyword is already registered.
- ExtensionSearchHandler.registerKeyword(keyword, extension);
- gKeywordMap.set(extension, keyword);
- } catch (e) {
- extension.manifestError(e.message);
- }
-});
-
-extensions.on("shutdown", (type, extension) => {
- let keyword = gKeywordMap.get(extension);
- if (keyword) {
- ExtensionSearchHandler.unregisterKeyword(keyword);
- gKeywordMap.delete(extension);
- }
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-extensions.registerSchemaAPI("omnibox", "addon_parent", context => {
- let {extension} = context;
- return {
- omnibox: {
- setDefaultSuggestion(suggestion) {
- let keyword = gKeywordMap.get(extension);
- try {
- // This will throw if the keyword failed to register.
- ExtensionSearchHandler.setDefaultSuggestion(keyword, suggestion);
- } catch (e) {
- return Promise.reject(e.message);
- }
- },
-
- onInputStarted: new SingletonEventManager(context, "omnibox.onInputStarted", fire => {
- let listener = (eventName) => {
- fire();
- };
- extension.on(ExtensionSearchHandler.MSG_INPUT_STARTED, listener);
- return () => {
- extension.off(ExtensionSearchHandler.MSG_INPUT_STARTED, listener);
- };
- }).api(),
-
- onInputCancelled: new SingletonEventManager(context, "omnibox.onInputCancelled", fire => {
- let listener = (eventName) => {
- fire();
- };
- extension.on(ExtensionSearchHandler.MSG_INPUT_CANCELLED, listener);
- return () => {
- extension.off(ExtensionSearchHandler.MSG_INPUT_CANCELLED, listener);
- };
- }).api(),
-
- onInputEntered: new SingletonEventManager(context, "omnibox.onInputEntered", fire => {
- let listener = (eventName, text, disposition) => {
- fire(text, disposition);
- };
- extension.on(ExtensionSearchHandler.MSG_INPUT_ENTERED, listener);
- return () => {
- extension.off(ExtensionSearchHandler.MSG_INPUT_ENTERED, listener);
- };
- }).api(),
- },
-
- omnibox_internal: {
- addSuggestions(id, suggestions) {
- let keyword = gKeywordMap.get(extension);
- try {
- ExtensionSearchHandler.addSuggestions(keyword, id, suggestions);
- } catch (e) {
- // Silently fail because the extension developer can not know for sure if the user
- // has already invalidated the callback when asynchronously providing suggestions.
- }
- },
-
- onInputChanged: new SingletonEventManager(context, "omnibox_internal.onInputChanged", fire => {
- let listener = (eventName, text, id) => {
- fire(text, id);
- };
- extension.on(ExtensionSearchHandler.MSG_INPUT_CHANGED, listener);
- return () => {
- extension.off(ExtensionSearchHandler.MSG_INPUT_CHANGED, listener);
- };
- }).api(),
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-pageAction.js b/application/basilisk/components/webextensions/ext-pageAction.js
deleted file mode 100644
index 5bf3a9c70..000000000
--- a/application/basilisk/components/webextensions/ext-pageAction.js
+++ /dev/null
@@ -1,290 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-var {
- EventManager,
- IconDetails,
-} = ExtensionUtils;
-
-// WeakMap[Extension -> PageAction]
-var pageActionMap = new WeakMap();
-
-// Handles URL bar icons, including the |page_action| manifest entry
-// and associated API.
-function PageAction(options, extension) {
- this.extension = extension;
- this.id = makeWidgetId(extension.id) + "-page-action";
-
- this.tabManager = TabManager.for(extension);
-
- this.defaults = {
- show: false,
- title: options.default_title || extension.name,
- icon: IconDetails.normalize({path: options.default_icon}, extension),
- popup: options.default_popup || "",
- };
-
- this.browserStyle = options.browser_style || false;
- if (options.browser_style === null) {
- this.extension.logger.warn("Please specify whether you want browser_style " +
- "or not in your page_action options.");
- }
-
- this.tabContext = new TabContext(tab => Object.create(this.defaults),
- extension);
-
- this.tabContext.on("location-change", this.handleLocationChange.bind(this)); // eslint-disable-line mozilla/balanced-listeners
-
- // WeakMap[ChromeWindow -> <xul:image>]
- this.buttons = new WeakMap();
-
- EventEmitter.decorate(this);
-}
-
-PageAction.prototype = {
- // Returns the value of the property |prop| for the given tab, where
- // |prop| is one of "show", "title", "icon", "popup".
- getProperty(tab, prop) {
- return this.tabContext.get(tab)[prop];
- },
-
- // Sets the value of the property |prop| for the given tab to the
- // given value, symmetrically to |getProperty|.
- //
- // If |tab| is currently selected, updates the page action button to
- // reflect the new value.
- setProperty(tab, prop, value) {
- if (value != null) {
- this.tabContext.get(tab)[prop] = value;
- } else {
- delete this.tabContext.get(tab)[prop];
- }
-
- if (tab.selected) {
- this.updateButton(tab.ownerGlobal);
- }
- },
-
- // Updates the page action button in the given window to reflect the
- // properties of the currently selected tab:
- //
- // Updates "tooltiptext" and "aria-label" to match "title" property.
- // Updates "image" to match the "icon" property.
- // Shows or hides the icon, based on the "show" property.
- updateButton(window) {
- let tabData = this.tabContext.get(window.gBrowser.selectedTab);
-
- if (!(tabData.show || this.buttons.has(window))) {
- // Don't bother creating a button for a window until it actually
- // needs to be shown.
- return;
- }
-
- let button = this.getButton(window);
-
- if (tabData.show) {
- // Update the title and icon only if the button is visible.
-
- let title = tabData.title || this.extension.name;
- button.setAttribute("tooltiptext", title);
- button.setAttribute("aria-label", title);
-
- // These URLs should already be properly escaped, but make doubly sure CSS
- // string escape characters are escaped here, since they could lead to a
- // sandbox break.
- let escape = str => str.replace(/[\\\s"]/g, encodeURIComponent);
-
- let getIcon = size => escape(IconDetails.getPreferredIcon(tabData.icon, this.extension, size).icon);
-
- button.setAttribute("style", `
- --webextension-urlbar-image: url("${getIcon(16)}");
- --webextension-urlbar-image-2x: url("${getIcon(32)}");
- `);
-
- button.classList.add("webextension-page-action");
- }
-
- button.hidden = !tabData.show;
- },
-
- // Create an |image| node and add it to the |urlbar-icons|
- // container in the given window.
- addButton(window) {
- let document = window.document;
-
- let button = document.createElement("image");
- button.id = this.id;
- button.setAttribute("class", "urlbar-icon");
-
- button.addEventListener("click", event => { // eslint-disable-line mozilla/balanced-listeners
- if (event.button == 0) {
- this.handleClick(window);
- }
- });
-
- document.getElementById("urlbar-icons").appendChild(button);
-
- return button;
- },
-
- // Returns the page action button for the given window, creating it if
- // it doesn't already exist.
- getButton(window) {
- if (!this.buttons.has(window)) {
- let button = this.addButton(window);
- this.buttons.set(window, button);
- }
-
- return this.buttons.get(window);
- },
-
- /**
- * Triggers this page action for the given window, with the same effects as
- * if it were clicked by a user.
- *
- * This has no effect if the page action is hidden for the selected tab.
- *
- * @param {Window} window
- */
- triggerAction(window) {
- let pageAction = pageActionMap.get(this.extension);
- if (pageAction.getProperty(window.gBrowser.selectedTab, "show")) {
- pageAction.handleClick(window);
- }
- },
-
- // Handles a click event on the page action button for the given
- // window.
- // If the page action has a |popup| property, a panel is opened to
- // that URL. Otherwise, a "click" event is emitted, and dispatched to
- // the any click listeners in the add-on.
- handleClick(window) {
- let tab = window.gBrowser.selectedTab;
- let popupURL = this.tabContext.get(tab).popup;
-
- this.tabManager.addActiveTabPermission(tab);
-
- // If the widget has a popup URL defined, we open a popup, but do not
- // dispatch a click event to the extension.
- // If it has no popup URL defined, we dispatch a click event, but do not
- // open a popup.
- if (popupURL) {
- new PanelPopup(this.extension, this.getButton(window), popupURL,
- this.browserStyle);
- } else {
- this.emit("click", tab);
- }
- },
-
- handleLocationChange(eventType, tab, fromBrowse) {
- if (fromBrowse) {
- this.tabContext.clear(tab);
- }
- this.updateButton(tab.ownerGlobal);
- },
-
- shutdown() {
- this.tabContext.shutdown();
-
- for (let window of WindowListManager.browserWindows()) {
- if (this.buttons.has(window)) {
- this.buttons.get(window).remove();
- }
- }
- },
-};
-
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("manifest_page_action", (type, directive, extension, manifest) => {
- let pageAction = new PageAction(manifest.page_action, extension);
- pageActionMap.set(extension, pageAction);
-});
-
-extensions.on("shutdown", (type, extension) => {
- if (pageActionMap.has(extension)) {
- pageActionMap.get(extension).shutdown();
- pageActionMap.delete(extension);
- }
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-PageAction.for = extension => {
- return pageActionMap.get(extension);
-};
-
-global.pageActionFor = PageAction.for;
-
-extensions.registerSchemaAPI("pageAction", "addon_parent", context => {
- let {extension} = context;
- return {
- pageAction: {
- onClicked: new EventManager(context, "pageAction.onClicked", fire => {
- let listener = (evt, tab) => {
- fire(TabManager.convert(extension, tab));
- };
- let pageAction = PageAction.for(extension);
-
- pageAction.on("click", listener);
- return () => {
- pageAction.off("click", listener);
- };
- }).api(),
-
- show(tabId) {
- let tab = TabManager.getTab(tabId, context);
- PageAction.for(extension).setProperty(tab, "show", true);
- },
-
- hide(tabId) {
- let tab = TabManager.getTab(tabId, context);
- PageAction.for(extension).setProperty(tab, "show", false);
- },
-
- setTitle(details) {
- let tab = TabManager.getTab(details.tabId, context);
-
- // Clear the tab-specific title when given a null string.
- PageAction.for(extension).setProperty(tab, "title", details.title || null);
- },
-
- getTitle(details) {
- let tab = TabManager.getTab(details.tabId, context);
-
- let title = PageAction.for(extension).getProperty(tab, "title");
- return Promise.resolve(title);
- },
-
- setIcon(details) {
- let tab = TabManager.getTab(details.tabId, context);
-
- let icon = IconDetails.normalize(details, extension, context);
- PageAction.for(extension).setProperty(tab, "icon", icon);
- },
-
- setPopup(details) {
- let tab = TabManager.getTab(details.tabId, context);
-
- // Note: Chrome resolves arguments to setIcon relative to the calling
- // context, but resolves arguments to setPopup relative to the extension
- // root.
- // For internal consistency, we currently resolve both relative to the
- // calling context.
- let url = details.popup && context.uri.resolve(details.popup);
- if (url && !context.checkLoadURL(url)) {
- return Promise.reject({message: `Access denied for URL ${url}`});
- }
- PageAction.for(extension).setProperty(tab, "popup", url);
- },
-
- getPopup(details) {
- let tab = TabManager.getTab(details.tabId, context);
-
- let popup = PageAction.for(extension).getProperty(tab, "popup");
- return Promise.resolve(popup);
- },
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-sessions.js b/application/basilisk/components/webextensions/ext-sessions.js
deleted file mode 100644
index 4c13a1ac3..000000000
--- a/application/basilisk/components/webextensions/ext-sessions.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-var {
- promiseObserved,
-} = ExtensionUtils;
-
-XPCOMUtils.defineLazyModuleGetter(this, "SessionStore",
- "resource:///modules/sessionstore/SessionStore.jsm");
-
-function getRecentlyClosed(maxResults, extension) {
- let recentlyClosed = [];
-
- // Get closed windows
- let closedWindowData = SessionStore.getClosedWindowData(false);
- for (let window of closedWindowData) {
- recentlyClosed.push({
- lastModified: window.closedAt,
- window: WindowManager.convertFromSessionStoreClosedData(window, extension)});
- }
-
- // Get closed tabs
- for (let window of WindowListManager.browserWindows()) {
- let closedTabData = SessionStore.getClosedTabData(window, false);
- for (let tab of closedTabData) {
- recentlyClosed.push({
- lastModified: tab.closedAt,
- tab: TabManager.for(extension).convertFromSessionStoreClosedData(tab, window)});
- }
- }
-
- // Sort windows and tabs
- recentlyClosed.sort((a, b) => b.lastModified - a.lastModified);
- return recentlyClosed.slice(0, maxResults);
-}
-
-function createSession(restored, extension, sessionId) {
- if (!restored) {
- return Promise.reject({message: `Could not restore object using sessionId ${sessionId}.`});
- }
- let sessionObj = {lastModified: Date.now()};
- if (restored instanceof Ci.nsIDOMChromeWindow) {
- return promiseObserved("sessionstore-single-window-restored", subject => subject == restored).then(() => {
- sessionObj.window = WindowManager.convert(extension, restored, {populate: true});
- return Promise.resolve([sessionObj]);
- });
- }
- sessionObj.tab = TabManager.for(extension).convert(restored);
- return Promise.resolve([sessionObj]);
-}
-
-extensions.registerSchemaAPI("sessions", "addon_parent", context => {
- let {extension} = context;
- return {
- sessions: {
- getRecentlyClosed: function(filter) {
- let maxResults = filter.maxResults == undefined ? this.MAX_SESSION_RESULTS : filter.maxResults;
- return Promise.resolve(getRecentlyClosed(maxResults, extension));
- },
- restore: function(sessionId) {
- let session, closedId;
- if (sessionId) {
- closedId = sessionId;
- session = SessionStore.undoCloseById(closedId);
- } else if (SessionStore.lastClosedObjectType == "window") {
- // If the most recently closed object is a window, just undo closing the most recent window.
- session = SessionStore.undoCloseWindow(0);
- } else {
- // It is a tab, and we cannot call SessionStore.undoCloseTab without a window,
- // so we must find the tab in which case we can just use its closedId.
- let recentlyClosedTabs = [];
- for (let window of WindowListManager.browserWindows()) {
- let closedTabData = SessionStore.getClosedTabData(window, false);
- for (let tab of closedTabData) {
- recentlyClosedTabs.push(tab);
- }
- }
-
- // Sort the tabs.
- recentlyClosedTabs.sort((a, b) => b.closedAt - a.closedAt);
-
- // Use the closedId of the most recently closed tab to restore it.
- closedId = recentlyClosedTabs[0].closedId;
- session = SessionStore.undoCloseById(closedId);
- }
- return createSession(session, extension, closedId);
- },
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/ext-tabs.js b/application/basilisk/components/webextensions/ext-tabs.js
deleted file mode 100644
index bb575aaab..000000000
--- a/application/basilisk/components/webextensions/ext-tabs.js
+++ /dev/null
@@ -1,1093 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
- "@mozilla.org/browser/aboutnewtab-service;1",
- "nsIAboutNewTabService");
-
-XPCOMUtils.defineLazyModuleGetter(this, "MatchPattern",
- "resource://gre/modules/MatchPattern.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
- "resource://gre/modules/PrivateBrowsingUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
- "resource://gre/modules/PromiseUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-
-var {
- EventManager,
- ignoreEvent,
-} = ExtensionUtils;
-
-// This function is pretty tightly tied to Extension.jsm.
-// Its job is to fill in the |tab| property of the sender.
-function getSender(extension, target, sender) {
- if ("tabId" in sender) {
- // The message came from an ExtensionContext. In that case, it should
- // include a tabId property (which is filled in by the page-open
- // listener below).
- let tab = TabManager.getTab(sender.tabId, null, null);
- delete sender.tabId;
- if (tab) {
- sender.tab = TabManager.convert(extension, tab);
- return;
- }
- }
- if (target instanceof Ci.nsIDOMXULElement) {
- // If the message was sent from a content script to a <browser> element,
- // then we can just get the `tab` from `target`.
- let tabbrowser = target.ownerGlobal.gBrowser;
- if (tabbrowser) {
- let tab = tabbrowser.getTabForBrowser(target);
-
- // `tab` can be `undefined`, e.g. for extension popups. This condition is
- // reached if `getSender` is called for a popup without a valid `tabId`.
- if (tab) {
- sender.tab = TabManager.convert(extension, tab);
- }
- }
- }
-}
-
-// Used by Extension.jsm
-global.tabGetSender = getSender;
-
-/* eslint-disable mozilla/balanced-listeners */
-
-extensions.on("page-shutdown", (type, context) => {
- if (context.viewType == "tab") {
- if (context.extension.id !== context.xulBrowser.contentPrincipal.addonId) {
- // Only close extension tabs.
- // This check prevents about:addons from closing when it contains a
- // WebExtension as an embedded inline options page.
- return;
- }
- let {gBrowser} = context.xulBrowser.ownerGlobal;
- if (gBrowser) {
- let tab = gBrowser.getTabForBrowser(context.xulBrowser);
- if (tab) {
- gBrowser.removeTab(tab);
- }
- }
- }
-});
-
-extensions.on("fill-browser-data", (type, browser, data) => {
- data.tabId = browser ? TabManager.getBrowserId(browser) : -1;
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-global.currentWindow = function(context) {
- let {xulWindow} = context;
- if (xulWindow && context.viewType != "background") {
- return xulWindow;
- }
- return WindowManager.topWindow;
-};
-
-let tabListener = {
- init() {
- if (this.initialized) {
- return;
- }
-
- this.adoptedTabs = new WeakMap();
-
- this.handleWindowOpen = this.handleWindowOpen.bind(this);
- this.handleWindowClose = this.handleWindowClose.bind(this);
-
- AllWindowEvents.addListener("TabClose", this);
- AllWindowEvents.addListener("TabOpen", this);
- WindowListManager.addOpenListener(this.handleWindowOpen);
- WindowListManager.addCloseListener(this.handleWindowClose);
-
- EventEmitter.decorate(this);
-
- this.initialized = true;
- },
-
- handleEvent(event) {
- switch (event.type) {
- case "TabOpen":
- if (event.detail.adoptedTab) {
- this.adoptedTabs.set(event.detail.adoptedTab, event.target);
- }
-
- // We need to delay sending this event until the next tick, since the
- // tab does not have its final index when the TabOpen event is dispatched.
- Promise.resolve().then(() => {
- if (event.detail.adoptedTab) {
- this.emitAttached(event.originalTarget);
- } else {
- this.emitCreated(event.originalTarget);
- }
- });
- break;
-
- case "TabClose":
- let tab = event.originalTarget;
-
- if (event.detail.adoptedBy) {
- this.emitDetached(tab, event.detail.adoptedBy);
- } else {
- this.emitRemoved(tab, false);
- }
- break;
- }
- },
-
- handleWindowOpen(window) {
- if (window.arguments[0] instanceof window.XULElement) {
- // If the first window argument is a XUL element, it means the
- // window is about to adopt a tab from another window to replace its
- // initial tab.
- //
- // Note that this event handler depends on running before the
- // delayed startup code in browser.js, which is currently triggered
- // by the first MozAfterPaint event. That code handles finally
- // adopting the tab, and clears it from the arguments list in the
- // process, so if we run later than it, we're too late.
- let tab = window.arguments[0];
- this.adoptedTabs.set(tab, window.gBrowser.tabs[0]);
-
- // We need to be sure to fire this event after the onDetached event
- // for the original tab.
- let listener = (event, details) => {
- if (details.tab == tab) {
- this.off("tab-detached", listener);
-
- Promise.resolve().then(() => {
- this.emitAttached(details.adoptedBy);
- });
- }
- };
-
- this.on("tab-detached", listener);
- } else {
- for (let tab of window.gBrowser.tabs) {
- this.emitCreated(tab);
- }
- }
- },
-
- handleWindowClose(window) {
- for (let tab of window.gBrowser.tabs) {
- if (this.adoptedTabs.has(tab)) {
- this.emitDetached(tab, this.adoptedTabs.get(tab));
- } else {
- this.emitRemoved(tab, true);
- }
- }
- },
-
- emitAttached(tab) {
- let newWindowId = WindowManager.getId(tab.ownerGlobal);
- let tabId = TabManager.getId(tab);
-
- this.emit("tab-attached", {tab, tabId, newWindowId, newPosition: tab._tPos});
- },
-
- emitDetached(tab, adoptedBy) {
- let oldWindowId = WindowManager.getId(tab.ownerGlobal);
- let tabId = TabManager.getId(tab);
-
- this.emit("tab-detached", {tab, adoptedBy, tabId, oldWindowId, oldPosition: tab._tPos});
- },
-
- emitCreated(tab) {
- this.emit("tab-created", {tab});
- },
-
- emitRemoved(tab, isWindowClosing) {
- let windowId = WindowManager.getId(tab.ownerGlobal);
- let tabId = TabManager.getId(tab);
-
- // When addons run in-process, `window.close()` is synchronous. Most other
- // addon-invoked calls are asynchronous since they go through a proxy
- // context via the message manager. This includes event registrations such
- // as `tabs.onRemoved.addListener`.
- // So, even if `window.close()` were to be called (in-process) after calling
- // `tabs.onRemoved.addListener`, then the tab would be closed before the
- // event listener is registered. To make sure that the event listener is
- // notified, we dispatch `tabs.onRemoved` asynchronously.
- Services.tm.mainThread.dispatch(() => {
- this.emit("tab-removed", {tab, tabId, windowId, isWindowClosing});
- }, Ci.nsIThread.DISPATCH_NORMAL);
- },
-
- tabReadyInitialized: false,
- tabReadyPromises: new WeakMap(),
- initializingTabs: new WeakSet(),
-
- initTabReady() {
- if (!this.tabReadyInitialized) {
- AllWindowEvents.addListener("progress", this);
-
- this.tabReadyInitialized = true;
- }
- },
-
- onLocationChange(browser, webProgress, request, locationURI, flags) {
- if (webProgress.isTopLevel) {
- let gBrowser = browser.ownerGlobal.gBrowser;
- let tab = gBrowser.getTabForBrowser(browser);
-
- // Now we are certain that the first page in the tab was loaded.
- this.initializingTabs.delete(tab);
-
- // browser.innerWindowID is now set, resolve the promises if any.
- let deferred = this.tabReadyPromises.get(tab);
- if (deferred) {
- deferred.resolve(tab);
- this.tabReadyPromises.delete(tab);
- }
- }
- },
-
- /**
- * Returns a promise that resolves when the tab is ready.
- * Tabs created via the `tabs.create` method are "ready" once the location
- * changes to the requested URL. Other tabs are assumed to be ready once their
- * inner window ID is known.
- *
- * @param {XULElement} tab The <tab> element.
- * @returns {Promise} Resolves with the given tab once ready.
- */
- awaitTabReady(tab) {
- let deferred = this.tabReadyPromises.get(tab);
- if (!deferred) {
- deferred = PromiseUtils.defer();
- if (!this.initializingTabs.has(tab) && tab.linkedBrowser.innerWindowID) {
- deferred.resolve(tab);
- } else {
- this.initTabReady();
- this.tabReadyPromises.set(tab, deferred);
- }
- }
- return deferred.promise;
- },
-};
-
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("startup", () => {
- tabListener.init();
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-extensions.registerSchemaAPI("tabs", "addon_parent", context => {
- let {extension} = context;
- let self = {
- tabs: {
- onActivated: new WindowEventManager(context, "tabs.onActivated", "TabSelect", (fire, event) => {
- let tab = event.originalTarget;
- let tabId = TabManager.getId(tab);
- let windowId = WindowManager.getId(tab.ownerGlobal);
- fire({tabId, windowId});
- }).api(),
-
- onCreated: new EventManager(context, "tabs.onCreated", fire => {
- let listener = (eventName, event) => {
- fire(TabManager.convert(extension, event.tab));
- };
-
- tabListener.on("tab-created", listener);
- return () => {
- tabListener.off("tab-created", listener);
- };
- }).api(),
-
- /**
- * Since multiple tabs currently can't be highlighted, onHighlighted
- * essentially acts an alias for self.tabs.onActivated but returns
- * the tabId in an array to match the API.
- * @see https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/Tabs/onHighlighted
- */
- onHighlighted: new WindowEventManager(context, "tabs.onHighlighted", "TabSelect", (fire, event) => {
- let tab = event.originalTarget;
- let tabIds = [TabManager.getId(tab)];
- let windowId = WindowManager.getId(tab.ownerGlobal);
- fire({tabIds, windowId});
- }).api(),
-
- onAttached: new EventManager(context, "tabs.onAttached", fire => {
- let listener = (eventName, event) => {
- fire(event.tabId, {newWindowId: event.newWindowId, newPosition: event.newPosition});
- };
-
- tabListener.on("tab-attached", listener);
- return () => {
- tabListener.off("tab-attached", listener);
- };
- }).api(),
-
- onDetached: new EventManager(context, "tabs.onDetached", fire => {
- let listener = (eventName, event) => {
- fire(event.tabId, {oldWindowId: event.oldWindowId, oldPosition: event.oldPosition});
- };
-
- tabListener.on("tab-detached", listener);
- return () => {
- tabListener.off("tab-detached", listener);
- };
- }).api(),
-
- onRemoved: new EventManager(context, "tabs.onRemoved", fire => {
- let listener = (eventName, event) => {
- fire(event.tabId, {windowId: event.windowId, isWindowClosing: event.isWindowClosing});
- };
-
- tabListener.on("tab-removed", listener);
- return () => {
- tabListener.off("tab-removed", listener);
- };
- }).api(),
-
- onReplaced: ignoreEvent(context, "tabs.onReplaced"),
-
- onMoved: new EventManager(context, "tabs.onMoved", fire => {
- // There are certain circumstances where we need to ignore a move event.
- //
- // Namely, the first time the tab is moved after it's created, we need
- // to report the final position as the initial position in the tab's
- // onAttached or onCreated event. This is because most tabs are inserted
- // in a temporary location and then moved after the TabOpen event fires,
- // which generates a TabOpen event followed by a TabMove event, which
- // does not match the contract of our API.
- let ignoreNextMove = new WeakSet();
-
- let openListener = event => {
- ignoreNextMove.add(event.target);
- // Remove the tab from the set on the next tick, since it will already
- // have been moved by then.
- Promise.resolve().then(() => {
- ignoreNextMove.delete(event.target);
- });
- };
-
- let moveListener = event => {
- let tab = event.originalTarget;
-
- if (ignoreNextMove.has(tab)) {
- ignoreNextMove.delete(tab);
- return;
- }
-
- fire(TabManager.getId(tab), {
- windowId: WindowManager.getId(tab.ownerGlobal),
- fromIndex: event.detail,
- toIndex: tab._tPos,
- });
- };
-
- AllWindowEvents.addListener("TabMove", moveListener);
- AllWindowEvents.addListener("TabOpen", openListener);
- return () => {
- AllWindowEvents.removeListener("TabMove", moveListener);
- AllWindowEvents.removeListener("TabOpen", openListener);
- };
- }).api(),
-
- onUpdated: new EventManager(context, "tabs.onUpdated", fire => {
- function sanitize(extension, changeInfo) {
- let result = {};
- let nonempty = false;
- for (let prop in changeInfo) {
- if ((prop != "favIconUrl" && prop != "url") || extension.hasPermission("tabs")) {
- nonempty = true;
- result[prop] = changeInfo[prop];
- }
- }
- return [nonempty, result];
- }
-
- let fireForBrowser = (browser, changed) => {
- let [needed, changeInfo] = sanitize(extension, changed);
- if (needed) {
- let gBrowser = browser.ownerGlobal.gBrowser;
- let tabElem = gBrowser.getTabForBrowser(browser);
-
- let tab = TabManager.convert(extension, tabElem);
- fire(tab.id, changeInfo, tab);
- }
- };
-
- let listener = event => {
- let needed = [];
- if (event.type == "TabAttrModified") {
- let changed = event.detail.changed;
- if (changed.includes("image")) {
- needed.push("favIconUrl");
- }
- if (changed.includes("muted")) {
- needed.push("mutedInfo");
- }
- if (changed.includes("soundplaying")) {
- needed.push("audible");
- }
- } else if (event.type == "TabPinned") {
- needed.push("pinned");
- } else if (event.type == "TabUnpinned") {
- needed.push("pinned");
- }
-
- if (needed.length && !extension.hasPermission("tabs")) {
- needed = needed.filter(attr => attr != "url" && attr != "favIconUrl");
- }
-
- if (needed.length) {
- let tab = TabManager.convert(extension, event.originalTarget);
-
- let changeInfo = {};
- for (let prop of needed) {
- changeInfo[prop] = tab[prop];
- }
- fire(tab.id, changeInfo, tab);
- }
- };
- let progressListener = {
- onStateChange(browser, webProgress, request, stateFlags, statusCode) {
- if (!webProgress.isTopLevel) {
- return;
- }
-
- let status;
- if (stateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
- if (stateFlags & Ci.nsIWebProgressListener.STATE_START) {
- status = "loading";
- } else if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
- status = "complete";
- }
- } else if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
- statusCode == Cr.NS_BINDING_ABORTED) {
- status = "complete";
- }
-
- fireForBrowser(browser, {status});
- },
-
- onLocationChange(browser, webProgress, request, locationURI, flags) {
- if (!webProgress.isTopLevel) {
- return;
- }
-
- fireForBrowser(browser, {
- status: webProgress.isLoadingDocument ? "loading" : "complete",
- url: locationURI.spec,
- });
- },
- };
-
- AllWindowEvents.addListener("progress", progressListener);
- AllWindowEvents.addListener("TabAttrModified", listener);
- AllWindowEvents.addListener("TabPinned", listener);
- AllWindowEvents.addListener("TabUnpinned", listener);
-
- return () => {
- AllWindowEvents.removeListener("progress", progressListener);
- AllWindowEvents.removeListener("TabAttrModified", listener);
- AllWindowEvents.removeListener("TabPinned", listener);
- AllWindowEvents.removeListener("TabUnpinned", listener);
- };
- }).api(),
-
- create: function(createProperties) {
- return new Promise((resolve, reject) => {
- let window = createProperties.windowId !== null ?
- WindowManager.getWindow(createProperties.windowId, context) :
- WindowManager.topWindow;
- if (!window.gBrowser) {
- let obs = (finishedWindow, topic, data) => {
- if (finishedWindow != window) {
- return;
- }
- Services.obs.removeObserver(obs, "browser-delayed-startup-finished");
- resolve(window);
- };
- Services.obs.addObserver(obs, "browser-delayed-startup-finished", false);
- } else {
- resolve(window);
- }
- }).then(window => {
- let url;
-
- if (createProperties.url !== null) {
- url = context.uri.resolve(createProperties.url);
-
- if (!context.checkLoadURL(url, {dontReportErrors: true})) {
- return Promise.reject({message: `Illegal URL: ${url}`});
- }
- }
-
- if (createProperties.cookieStoreId && !extension.hasPermission("cookies")) {
- return Promise.reject({message: `No permission for cookieStoreId: ${createProperties.cookieStoreId}`});
- }
-
- let options = {};
- if (createProperties.cookieStoreId) {
- if (!global.isValidCookieStoreId(createProperties.cookieStoreId)) {
- return Promise.reject({message: `Illegal cookieStoreId: ${createProperties.cookieStoreId}`});
- }
-
- let privateWindow = PrivateBrowsingUtils.isBrowserPrivate(window.gBrowser);
- if (privateWindow && !global.isPrivateCookieStoreId(createProperties.cookieStoreId)) {
- return Promise.reject({message: `Illegal to set non-private cookieStorageId in a private window`});
- }
-
- if (!privateWindow && global.isPrivateCookieStoreId(createProperties.cookieStoreId)) {
- return Promise.reject({message: `Illegal to set private cookieStorageId in a non-private window`});
- }
-
- if (global.isContainerCookieStoreId(createProperties.cookieStoreId)) {
- let containerId = global.getContainerForCookieStoreId(createProperties.cookieStoreId);
- if (!containerId) {
- return Promise.reject({message: `No cookie store exists with ID ${createProperties.cookieStoreId}`});
- }
-
- options.userContextId = containerId;
- }
- }
-
- tabListener.initTabReady();
- let tab = window.gBrowser.addTab(url || window.BROWSER_NEW_TAB_URL, options);
-
- let active = true;
- if (createProperties.active !== null) {
- active = createProperties.active;
- }
- if (active) {
- window.gBrowser.selectedTab = tab;
- }
-
- if (createProperties.index !== null) {
- window.gBrowser.moveTabTo(tab, createProperties.index);
- }
-
- if (createProperties.pinned) {
- window.gBrowser.pinTab(tab);
- }
-
- if (createProperties.url && !createProperties.url.startsWith("about:")) {
- // We can't wait for a location change event for about:newtab,
- // since it may be pre-rendered, in which case its initial
- // location change event has already fired.
-
- // Mark the tab as initializing, so that operations like
- // `executeScript` wait until the requested URL is loaded in
- // the tab before dispatching messages to the inner window
- // that contains the URL we're attempting to load.
- tabListener.initializingTabs.add(tab);
- }
-
- return TabManager.convert(extension, tab);
- });
- },
-
- remove: function(tabs) {
- if (!Array.isArray(tabs)) {
- tabs = [tabs];
- }
-
- for (let tabId of tabs) {
- let tab = TabManager.getTab(tabId, context);
- tab.ownerGlobal.gBrowser.removeTab(tab);
- }
-
- return Promise.resolve();
- },
-
- update: function(tabId, updateProperties) {
- let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- let tabbrowser = tab.ownerGlobal.gBrowser;
-
- if (updateProperties.url !== null) {
- let url = context.uri.resolve(updateProperties.url);
-
- if (!context.checkLoadURL(url, {dontReportErrors: true})) {
- return Promise.reject({message: `Illegal URL: ${url}`});
- }
-
- tab.linkedBrowser.loadURI(url);
- }
-
- if (updateProperties.active !== null) {
- if (updateProperties.active) {
- tabbrowser.selectedTab = tab;
- } else {
- // Not sure what to do here? Which tab should we select?
- }
- }
- if (updateProperties.muted !== null) {
- if (tab.muted != updateProperties.muted) {
- tab.toggleMuteAudio(extension.uuid);
- }
- }
- if (updateProperties.pinned !== null) {
- if (updateProperties.pinned) {
- tabbrowser.pinTab(tab);
- } else {
- tabbrowser.unpinTab(tab);
- }
- }
- // FIXME: highlighted/selected, openerTabId
-
- return Promise.resolve(TabManager.convert(extension, tab));
- },
-
- reload: function(tabId, reloadProperties) {
- let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
- if (reloadProperties && reloadProperties.bypassCache) {
- flags |= Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE;
- }
- tab.linkedBrowser.reloadWithFlags(flags);
-
- return Promise.resolve();
- },
-
- get: function(tabId) {
- let tab = TabManager.getTab(tabId, context);
-
- return Promise.resolve(TabManager.convert(extension, tab));
- },
-
- getCurrent() {
- let tab;
- if (context.tabId) {
- tab = TabManager.convert(extension, TabManager.getTab(context.tabId, context));
- }
- return Promise.resolve(tab);
- },
-
- query: function(queryInfo) {
- let pattern = null;
- if (queryInfo.url !== null) {
- if (!extension.hasPermission("tabs")) {
- return Promise.reject({message: 'The "tabs" permission is required to use the query API with the "url" parameter'});
- }
-
- pattern = new MatchPattern(queryInfo.url);
- }
-
- function matches(tab) {
- let props = ["active", "pinned", "highlighted", "status", "title", "index"];
- for (let prop of props) {
- if (queryInfo[prop] !== null && queryInfo[prop] != tab[prop]) {
- return false;
- }
- }
-
- if (queryInfo.audible !== null) {
- if (queryInfo.audible != tab.audible) {
- return false;
- }
- }
-
- if (queryInfo.muted !== null) {
- if (queryInfo.muted != tab.mutedInfo.muted) {
- return false;
- }
- }
-
- if (queryInfo.cookieStoreId !== null &&
- tab.cookieStoreId != queryInfo.cookieStoreId) {
- return false;
- }
-
- if (pattern && !pattern.matches(Services.io.newURI(tab.url, null, null))) {
- return false;
- }
-
- return true;
- }
-
- let result = [];
- for (let window of WindowListManager.browserWindows()) {
- let lastFocused = window === WindowManager.topWindow;
- if (queryInfo.lastFocusedWindow !== null && queryInfo.lastFocusedWindow !== lastFocused) {
- continue;
- }
-
- let windowType = WindowManager.windowType(window);
- if (queryInfo.windowType !== null && queryInfo.windowType !== windowType) {
- continue;
- }
-
- if (queryInfo.windowId !== null) {
- if (queryInfo.windowId === WindowManager.WINDOW_ID_CURRENT) {
- if (currentWindow(context) !== window) {
- continue;
- }
- } else if (queryInfo.windowId !== WindowManager.getId(window)) {
- continue;
- }
- }
-
- if (queryInfo.currentWindow !== null) {
- let eq = window === currentWindow(context);
- if (queryInfo.currentWindow != eq) {
- continue;
- }
- }
-
- let tabs = TabManager.for(extension).getTabs(window);
- for (let tab of tabs) {
- if (matches(tab)) {
- result.push(tab);
- }
- }
- }
- return Promise.resolve(result);
- },
-
- captureVisibleTab: function(windowId, options) {
- if (!extension.hasPermission("<all_urls>")) {
- return Promise.reject({message: "The <all_urls> permission is required to use the captureVisibleTab API"});
- }
-
- let window = windowId == null ?
- WindowManager.topWindow :
- WindowManager.getWindow(windowId, context);
-
- let tab = window.gBrowser.selectedTab;
- return tabListener.awaitTabReady(tab).then(() => {
- let browser = tab.linkedBrowser;
- let recipient = {
- innerWindowID: browser.innerWindowID,
- };
-
- if (!options) {
- options = {};
- }
- if (options.format == null) {
- options.format = "png";
- }
- if (options.quality == null) {
- options.quality = 92;
- }
-
- let message = {
- options,
- width: browser.clientWidth,
- height: browser.clientHeight,
- };
-
- return context.sendMessage(browser.messageManager, "Extension:Capture",
- message, {recipient});
- });
- },
-
- detectLanguage: function(tabId) {
- let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- return tabListener.awaitTabReady(tab).then(() => {
- let browser = tab.linkedBrowser;
- let recipient = {innerWindowID: browser.innerWindowID};
-
- return context.sendMessage(browser.messageManager, "Extension:DetectLanguage",
- {}, {recipient});
- });
- },
-
- // Used to executeScript, insertCSS and removeCSS.
- _execute: function(tabId, details, kind, method) {
- let tab = tabId !== null ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- let options = {
- js: [],
- css: [],
- remove_css: method == "removeCSS",
- };
-
- // We require a `code` or a `file` property, but we can't accept both.
- if ((details.code === null) == (details.file === null)) {
- return Promise.reject({message: `${method} requires either a 'code' or a 'file' property, but not both`});
- }
-
- if (details.frameId !== null && details.allFrames) {
- return Promise.reject({message: `'frameId' and 'allFrames' are mutually exclusive`});
- }
-
- if (TabManager.for(extension).hasActiveTabPermission(tab)) {
- // If we have the "activeTab" permission for this tab, ignore
- // the host whitelist.
- options.matchesHost = ["<all_urls>"];
- } else {
- options.matchesHost = extension.whiteListedHosts.serialize();
- }
-
- if (details.code !== null) {
- options[kind + "Code"] = details.code;
- }
- if (details.file !== null) {
- let url = context.uri.resolve(details.file);
- if (!extension.isExtensionURL(url)) {
- return Promise.reject({message: "Files to be injected must be within the extension"});
- }
- options[kind].push(url);
- }
- if (details.allFrames) {
- options.all_frames = details.allFrames;
- }
- if (details.frameId !== null) {
- options.frame_id = details.frameId;
- }
- if (details.matchAboutBlank) {
- options.match_about_blank = details.matchAboutBlank;
- }
- if (details.runAt !== null) {
- options.run_at = details.runAt;
- } else {
- options.run_at = "document_idle";
- }
-
- return tabListener.awaitTabReady(tab).then(() => {
- let browser = tab.linkedBrowser;
- let recipient = {
- innerWindowID: browser.innerWindowID,
- };
-
- return context.sendMessage(browser.messageManager, "Extension:Execute", {options}, {recipient});
- });
- },
-
- executeScript: function(tabId, details) {
- return self.tabs._execute(tabId, details, "js", "executeScript");
- },
-
- insertCSS: function(tabId, details) {
- return self.tabs._execute(tabId, details, "css", "insertCSS").then(() => {});
- },
-
- removeCSS: function(tabId, details) {
- return self.tabs._execute(tabId, details, "css", "removeCSS").then(() => {});
- },
-
- move: function(tabIds, moveProperties) {
- let index = moveProperties.index;
- let tabsMoved = [];
- if (!Array.isArray(tabIds)) {
- tabIds = [tabIds];
- }
-
- let destinationWindow = null;
- if (moveProperties.windowId !== null) {
- destinationWindow = WindowManager.getWindow(moveProperties.windowId, context);
- // Fail on an invalid window.
- if (!destinationWindow) {
- return Promise.reject({message: `Invalid window ID: ${moveProperties.windowId}`});
- }
- }
-
- /*
- Indexes are maintained on a per window basis so that a call to
- move([tabA, tabB], {index: 0})
- -> tabA to 0, tabB to 1 if tabA and tabB are in the same window
- move([tabA, tabB], {index: 0})
- -> tabA to 0, tabB to 0 if tabA and tabB are in different windows
- */
- let indexMap = new Map();
-
- let tabs = tabIds.map(tabId => TabManager.getTab(tabId, context));
- for (let tab of tabs) {
- // If the window is not specified, use the window from the tab.
- let window = destinationWindow || tab.ownerGlobal;
- let gBrowser = window.gBrowser;
-
- let insertionPoint = indexMap.get(window) || index;
- // If the index is -1 it should go to the end of the tabs.
- if (insertionPoint == -1) {
- insertionPoint = gBrowser.tabs.length;
- }
-
- // We can only move pinned tabs to a point within, or just after,
- // the current set of pinned tabs. Unpinned tabs, likewise, can only
- // be moved to a position after the current set of pinned tabs.
- // Attempts to move a tab to an illegal position are ignored.
- let numPinned = gBrowser._numPinnedTabs;
- let ok = tab.pinned ? insertionPoint <= numPinned : insertionPoint >= numPinned;
- if (!ok) {
- continue;
- }
-
- indexMap.set(window, insertionPoint + 1);
-
- if (tab.ownerGlobal != window) {
- // If the window we are moving the tab in is different, then move the tab
- // to the new window.
- tab = gBrowser.adoptTab(tab, insertionPoint, false);
- } else {
- // If the window we are moving is the same, just move the tab.
- gBrowser.moveTabTo(tab, insertionPoint);
- }
- tabsMoved.push(tab);
- }
-
- return Promise.resolve(tabsMoved.map(tab => TabManager.convert(extension, tab)));
- },
-
- duplicate: function(tabId) {
- let tab = TabManager.getTab(tabId, context);
-
- let gBrowser = tab.ownerGlobal.gBrowser;
- let newTab = gBrowser.duplicateTab(tab);
-
- return new Promise(resolve => {
- // We need to use SSTabRestoring because any attributes set before
- // are ignored. SSTabRestored is too late and results in a jump in
- // the UI. See http://bit.ly/session-store-api for more information.
- newTab.addEventListener("SSTabRestoring", function listener() {
- // As the tab is restoring, move it to the correct position.
- newTab.removeEventListener("SSTabRestoring", listener);
- // Pinned tabs that are duplicated are inserted
- // after the existing pinned tab and pinned.
- if (tab.pinned) {
- gBrowser.pinTab(newTab);
- }
- gBrowser.moveTabTo(newTab, tab._tPos + 1);
- });
-
- newTab.addEventListener("SSTabRestored", function listener() {
- // Once it has been restored, select it and return the promise.
- newTab.removeEventListener("SSTabRestored", listener);
- gBrowser.selectedTab = newTab;
- return resolve(TabManager.convert(extension, newTab));
- });
- });
- },
-
- getZoom(tabId) {
- let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- let {ZoomManager} = tab.ownerGlobal;
- let zoom = ZoomManager.getZoomForBrowser(tab.linkedBrowser);
-
- return Promise.resolve(zoom);
- },
-
- setZoom(tabId, zoom) {
- let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- let {FullZoom, ZoomManager} = tab.ownerGlobal;
-
- if (zoom === 0) {
- // A value of zero means use the default zoom factor.
- return FullZoom.reset(tab.linkedBrowser);
- } else if (zoom >= ZoomManager.MIN && zoom <= ZoomManager.MAX) {
- FullZoom.setZoom(zoom, tab.linkedBrowser);
- } else {
- return Promise.reject({
- message: `Zoom value ${zoom} out of range (must be between ${ZoomManager.MIN} and ${ZoomManager.MAX})`,
- });
- }
-
- return Promise.resolve();
- },
-
- _getZoomSettings(tabId) {
- let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- let {FullZoom} = tab.ownerGlobal;
-
- return {
- mode: "automatic",
- scope: FullZoom.siteSpecific ? "per-origin" : "per-tab",
- defaultZoomFactor: 1,
- };
- },
-
- getZoomSettings(tabId) {
- return Promise.resolve(this._getZoomSettings(tabId));
- },
-
- setZoomSettings(tabId, settings) {
- let tab = tabId ? TabManager.getTab(tabId, context) : TabManager.activeTab;
-
- let currentSettings = this._getZoomSettings(tab.id);
-
- if (!Object.keys(settings).every(key => settings[key] === currentSettings[key])) {
- return Promise.reject(`Unsupported zoom settings: ${JSON.stringify(settings)}`);
- }
- return Promise.resolve();
- },
-
- onZoomChange: new EventManager(context, "tabs.onZoomChange", fire => {
- let getZoomLevel = browser => {
- let {ZoomManager} = browser.ownerGlobal;
-
- return ZoomManager.getZoomForBrowser(browser);
- };
-
- // Stores the last known zoom level for each tab's browser.
- // WeakMap[<browser> -> number]
- let zoomLevels = new WeakMap();
-
- // Store the zoom level for all existing tabs.
- for (let window of WindowListManager.browserWindows()) {
- for (let tab of window.gBrowser.tabs) {
- let browser = tab.linkedBrowser;
- zoomLevels.set(browser, getZoomLevel(browser));
- }
- }
-
- let tabCreated = (eventName, event) => {
- let browser = event.tab.linkedBrowser;
- zoomLevels.set(browser, getZoomLevel(browser));
- };
-
-
- let zoomListener = event => {
- let browser = event.originalTarget;
-
- // For non-remote browsers, this event is dispatched on the document
- // rather than on the <browser>.
- if (browser instanceof Ci.nsIDOMDocument) {
- browser = browser.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDocShell)
- .chromeEventHandler;
- }
-
- let {gBrowser} = browser.ownerGlobal;
- let tab = gBrowser.getTabForBrowser(browser);
- if (!tab) {
- // We only care about zoom events in the top-level browser of a tab.
- return;
- }
-
- let oldZoomFactor = zoomLevels.get(browser);
- let newZoomFactor = getZoomLevel(browser);
-
- if (oldZoomFactor != newZoomFactor) {
- zoomLevels.set(browser, newZoomFactor);
-
- let tabId = TabManager.getId(tab);
- fire({
- tabId,
- oldZoomFactor,
- newZoomFactor,
- zoomSettings: self.tabs._getZoomSettings(tabId),
- });
- }
- };
-
- tabListener.on("tab-attached", tabCreated);
- tabListener.on("tab-created", tabCreated);
-
- AllWindowEvents.addListener("FullZoomChange", zoomListener);
- AllWindowEvents.addListener("TextZoomChange", zoomListener);
- return () => {
- tabListener.off("tab-attached", tabCreated);
- tabListener.off("tab-created", tabCreated);
-
- AllWindowEvents.removeListener("FullZoomChange", zoomListener);
- AllWindowEvents.removeListener("TextZoomChange", zoomListener);
- };
- }).api(),
- },
- };
- return self;
-});
diff --git a/application/basilisk/components/webextensions/ext-utils.js b/application/basilisk/components/webextensions/ext-utils.js
deleted file mode 100644
index 75b2f4bd4..000000000
--- a/application/basilisk/components/webextensions/ext-utils.js
+++ /dev/null
@@ -1,1239 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
- "resource:///modules/CustomizableUI.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
- "resource://gre/modules/PrivateBrowsingUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "setTimeout",
- "resource://gre/modules/Timer.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "styleSheetService",
- "@mozilla.org/content/style-sheet-service;1",
- "nsIStyleSheetService");
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
-
-const POPUP_LOAD_TIMEOUT_MS = 200;
-
-const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-var {
- DefaultWeakMap,
- EventManager,
- promiseEvent,
-} = ExtensionUtils;
-
-// This file provides some useful code for the |tabs| and |windows|
-// modules. All of the code is installed on |global|, which is a scope
-// shared among the different ext-*.js scripts.
-
-global.makeWidgetId = id => {
- id = id.toLowerCase();
- // FIXME: This allows for collisions.
- return id.replace(/[^a-z0-9_-]/g, "_");
-};
-
-function promisePopupShown(popup) {
- return new Promise(resolve => {
- if (popup.state == "open") {
- resolve();
- } else {
- popup.addEventListener("popupshown", function onPopupShown(event) {
- popup.removeEventListener("popupshown", onPopupShown);
- resolve();
- });
- }
- });
-}
-
-XPCOMUtils.defineLazyGetter(this, "popupStylesheets", () => {
- let stylesheets = ["chrome://browser/content/extension.css"];
-
- if (AppConstants.platform === "macosx") {
- stylesheets.push("chrome://browser/content/extension-mac.css");
- }
- return stylesheets;
-});
-
-XPCOMUtils.defineLazyGetter(this, "standaloneStylesheets", () => {
- let stylesheets = [];
-
- if (AppConstants.platform === "macosx") {
- stylesheets.push("chrome://browser/content/extension-mac-panel.css");
- }
- if (AppConstants.platform === "win") {
- stylesheets.push("chrome://browser/content/extension-win-panel.css");
- }
- return stylesheets;
-});
-
-class BasePopup {
- constructor(extension, viewNode, popupURL, browserStyle, fixedWidth = false) {
- this.extension = extension;
- this.popupURL = popupURL;
- this.viewNode = viewNode;
- this.browserStyle = browserStyle;
- this.window = viewNode.ownerGlobal;
- this.destroyed = false;
- this.fixedWidth = fixedWidth;
-
- extension.callOnClose(this);
-
- this.contentReady = new Promise(resolve => {
- this._resolveContentReady = resolve;
- });
-
- this.viewNode.addEventListener(this.DESTROY_EVENT, this);
-
- let doc = viewNode.ownerDocument;
- let arrowContent = doc.getAnonymousElementByAttribute(this.panel, "class", "panel-arrowcontent");
- this.borderColor = doc.defaultView.getComputedStyle(arrowContent).borderTopColor;
-
- this.browser = null;
- this.browserLoaded = new Promise((resolve, reject) => {
- this.browserLoadedDeferred = {resolve, reject};
- });
- this.browserReady = this.createBrowser(viewNode, popupURL);
-
- BasePopup.instances.get(this.window).set(extension, this);
- }
-
- static for(extension, window) {
- return BasePopup.instances.get(window).get(extension);
- }
-
- close() {
- this.closePopup();
- }
-
- destroy() {
- this.extension.forgetOnClose(this);
-
- this.destroyed = true;
- this.browserLoadedDeferred.reject(new Error("Popup destroyed"));
- return this.browserReady.then(() => {
- this.destroyBrowser(this.browser);
- this.browser.remove();
-
- this.viewNode.removeEventListener(this.DESTROY_EVENT, this);
- this.viewNode.style.maxHeight = "";
-
- if (this.panel) {
- this.panel.style.removeProperty("--arrowpanel-background");
- this.panel.style.removeProperty("--panel-arrow-image-vertical");
- }
-
- BasePopup.instances.get(this.window).delete(this.extension);
-
- this.browser = null;
- this.viewNode = null;
- });
- }
-
- destroyBrowser(browser) {
- let mm = browser.messageManager;
- // If the browser has already been removed from the document, because the
- // popup was closed externally, there will be no message manager here.
- if (mm) {
- mm.removeMessageListener("DOMTitleChanged", this);
- mm.removeMessageListener("Extension:BrowserBackgroundChanged", this);
- mm.removeMessageListener("Extension:BrowserContentLoaded", this);
- mm.removeMessageListener("Extension:BrowserResized", this);
- mm.removeMessageListener("Extension:DOMWindowClose", this);
- }
- }
-
- // Returns the name of the event fired on `viewNode` when the popup is being
- // destroyed. This must be implemented by every subclass.
- get DESTROY_EVENT() {
- throw new Error("Not implemented");
- }
-
- get STYLESHEETS() {
- let sheets = [];
-
- if (this.browserStyle) {
- sheets.push(...popupStylesheets);
- }
- if (!this.fixedWidth) {
- sheets.push(...standaloneStylesheets);
- }
-
- return sheets;
- }
-
- get panel() {
- let panel = this.viewNode;
- while (panel && panel.localName != "panel") {
- panel = panel.parentNode;
- }
- return panel;
- }
-
- receiveMessage({name, data}) {
- switch (name) {
- case "DOMTitleChanged":
- this.viewNode.setAttribute("aria-label", this.browser.contentTitle);
- break;
-
- case "Extension:BrowserBackgroundChanged":
- this.setBackground(data.background);
- break;
-
- case "Extension:BrowserContentLoaded":
- this.browserLoadedDeferred.resolve();
- break;
-
- case "Extension:BrowserResized":
- this._resolveContentReady();
- if (this.ignoreResizes) {
- this.dimensions = data;
- } else {
- this.resizeBrowser(data);
- }
- break;
-
- case "Extension:DOMWindowClose":
- this.closePopup();
- break;
- }
- }
-
- handleEvent(event) {
- switch (event.type) {
- case this.DESTROY_EVENT:
- this.destroy();
- break;
- }
- }
-
- createBrowser(viewNode, popupURL = null) {
- let document = viewNode.ownerDocument;
- this.browser = document.createElementNS(XUL_NS, "browser");
- this.browser.setAttribute("type", "content");
- this.browser.setAttribute("disableglobalhistory", "true");
- this.browser.setAttribute("transparent", "true");
- this.browser.setAttribute("class", "webextension-popup-browser");
- this.browser.setAttribute("tooltip", "aHTMLTooltip");
-
- // We only need flex sizing for the sake of the slide-in sub-views of the
- // main menu panel, so that the browser occupies the full width of the view,
- // and also takes up any extra height that's available to it.
- this.browser.setAttribute("flex", "1");
-
- // Note: When using noautohide panels, the popup manager will add width and
- // height attributes to the panel, breaking our resize code, if the browser
- // starts out smaller than 30px by 10px. This isn't an issue now, but it
- // will be if and when we popup debugging.
-
- viewNode.appendChild(this.browser);
-
- extensions.emit("extension-browser-inserted", this.browser);
- let windowId = WindowManager.getId(this.browser.ownerGlobal);
- this.browser.messageManager.sendAsyncMessage("Extension:InitExtensionView", {
- viewType: "popup",
- windowId,
- });
- // TODO(robwu): Rework this to use the Extension:ExtensionViewLoaded message
- // to detect loads and so on. And definitely move this content logic inside
- // a file in the child process.
-
- let initBrowser = browser => {
- let mm = browser.messageManager;
- mm.addMessageListener("DOMTitleChanged", this);
- mm.addMessageListener("Extension:BrowserBackgroundChanged", this);
- mm.addMessageListener("Extension:BrowserContentLoaded", this);
- mm.addMessageListener("Extension:BrowserResized", this);
- mm.addMessageListener("Extension:DOMWindowClose", this, true);
- };
-
- if (!popupURL) {
- initBrowser(this.browser);
- return this.browser;
- }
-
- return promiseEvent(this.browser, "load").then(() => {
- initBrowser(this.browser);
-
- let mm = this.browser.messageManager;
-
- mm.loadFrameScript(
- "chrome://extensions/content/ext-browser-content.js", false);
-
- mm.sendAsyncMessage("Extension:InitBrowser", {
- allowScriptsToClose: true,
- fixedWidth: this.fixedWidth,
- maxWidth: 800,
- maxHeight: 600,
- stylesheets: this.STYLESHEETS,
- });
-
- this.browser.setAttribute("src", popupURL);
- });
- }
-
- resizeBrowser({width, height, detail}) {
- if (this.fixedWidth) {
- // Figure out how much extra space we have on the side of the panel
- // opposite the arrow.
- let side = this.panel.getAttribute("side") == "top" ? "bottom" : "top";
- let maxHeight = this.viewHeight + this.extraHeight[side];
-
- height = Math.min(height, maxHeight);
- this.browser.style.height = `${height}px`;
-
- // Set a maximum height on the <panelview> element to our preferred
- // maximum height, so that the PanelUI resizing code can make an accurate
- // calculation. If we don't do this, the flex sizing logic will prevent us
- // from ever reporting a preferred size smaller than the height currently
- // available to us in the panel.
- height = Math.max(height, this.viewHeight);
- this.viewNode.style.maxHeight = `${height}px`;
- } else {
- this.browser.style.width = `${width}px`;
- this.browser.style.height = `${height}px`;
- }
-
- let event = new this.window.CustomEvent("WebExtPopupResized", {detail});
- this.browser.dispatchEvent(event);
- }
-
- setBackground(background) {
- let panelBackground = "";
- let panelArrow = "";
-
- if (background) {
- let borderColor = this.borderColor || background;
-
- panelBackground = background;
- panelArrow = `url("data:image/svg+xml,${encodeURIComponent(`<?xml version="1.0" encoding="UTF-8"?>
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="10">
- <path d="M 0,10 L 10,0 20,10 z" fill="${borderColor}"/>
- <path d="M 1,10 L 10,1 19,10 z" fill="${background}"/>
- </svg>
- `)}")`;
- }
-
- this.panel.style.setProperty("--arrowpanel-background", panelBackground);
- this.panel.style.setProperty("--panel-arrow-image-vertical", panelArrow);
- this.background = background;
- }
-}
-
-/**
- * A map of active popups for a given browser window.
- *
- * WeakMap[window -> WeakMap[Extension -> BasePopup]]
- */
-BasePopup.instances = new DefaultWeakMap(() => new WeakMap());
-
-class PanelPopup extends BasePopup {
- constructor(extension, imageNode, popupURL, browserStyle) {
- let document = imageNode.ownerDocument;
-
- let panel = document.createElement("panel");
- panel.setAttribute("id", makeWidgetId(extension.id) + "-panel");
- panel.setAttribute("class", "browser-extension-panel");
- panel.setAttribute("tabspecific", "true");
- panel.setAttribute("type", "arrow");
- panel.setAttribute("role", "group");
-
- document.getElementById("mainPopupSet").appendChild(panel);
-
- super(extension, panel, popupURL, browserStyle);
-
- this.contentReady.then(() => {
- panel.openPopup(imageNode, "bottomcenter topright", 0, 0, false, false);
-
- let event = new this.window.CustomEvent("WebExtPopupLoaded", {
- bubbles: true,
- detail: {extension},
- });
- this.browser.dispatchEvent(event);
- });
- }
-
- get DESTROY_EVENT() {
- return "popuphidden";
- }
-
- destroy() {
- super.destroy();
- this.viewNode.remove();
- }
-
- closePopup() {
- promisePopupShown(this.viewNode).then(() => {
- // Make sure we're not already destroyed.
- if (this.viewNode) {
- this.viewNode.hidePopup();
- }
- });
- }
-}
-
-class ViewPopup extends BasePopup {
- constructor(extension, window, popupURL, browserStyle, fixedWidth) {
- let document = window.document;
-
- // Create a temporary panel to hold the browser while it pre-loads its
- // content. This panel will never be shown, but the browser's docShell will
- // be swapped with the browser in the real panel when it's ready.
- let panel = document.createElement("panel");
- panel.setAttribute("type", "arrow");
- document.getElementById("mainPopupSet").appendChild(panel);
-
- super(extension, panel, popupURL, browserStyle, fixedWidth);
-
- this.ignoreResizes = true;
-
- this.attached = false;
- this.tempPanel = panel;
-
- this.browser.classList.add("webextension-preload-browser");
- }
-
- /**
- * Attaches the pre-loaded browser to the given view node, and reserves a
- * promise which resolves when the browser is ready.
- *
- * @param {Element} viewNode
- * The node to attach the browser to.
- * @returns {Promise<boolean>}
- * Resolves when the browser is ready. Resolves to `false` if the
- * browser was destroyed before it was fully loaded, and the popup
- * should be closed, or `true` otherwise.
- */
- attach(viewNode) {
- return Task.spawn(function* () {
- this.viewNode = viewNode;
- this.viewNode.addEventListener(this.DESTROY_EVENT, this);
-
- // Wait until the browser element is fully initialized, and give it at least
- // a short grace period to finish loading its initial content, if necessary.
- //
- // In practice, the browser that was created by the mousdown handler should
- // nearly always be ready by this point.
- yield Promise.all([
- this.browserReady,
- Promise.race([
- // This promise may be rejected if the popup calls window.close()
- // before it has fully loaded.
- this.browserLoaded.catch(() => {}),
- new Promise(resolve => setTimeout(resolve, POPUP_LOAD_TIMEOUT_MS)),
- ]),
- ]);
-
- if (!this.destroyed && !this.panel) {
- this.destroy();
- }
-
- if (this.destroyed) {
- return false;
- }
-
- this.attached = true;
-
- // Store the initial height of the view, so that we never resize menu panel
- // sub-views smaller than the initial height of the menu.
- this.viewHeight = this.viewNode.boxObject.height;
-
- // Calculate the extra height available on the screen above and below the
- // menu panel. Use that to calculate the how much the sub-view may grow.
- let popupRect = this.panel.getBoundingClientRect();
-
- this.setBackground(this.background);
-
- let win = this.window;
- let popupBottom = win.mozInnerScreenY + popupRect.bottom;
- let popupTop = win.mozInnerScreenY + popupRect.top;
-
- let screenBottom = win.screen.availTop + win.screen.availHeight;
- this.extraHeight = {
- bottom: Math.max(0, screenBottom - popupBottom),
- top: Math.max(0, popupTop - win.screen.availTop),
- };
-
- // Create a new browser in the real popup.
- let browser = this.browser;
- this.createBrowser(this.viewNode);
-
- this.browser.swapDocShells(browser);
- this.destroyBrowser(browser);
-
- this.ignoreResizes = false;
- if (this.dimensions) {
- this.resizeBrowser(this.dimensions);
- }
-
- this.tempPanel.remove();
- this.tempPanel = null;
-
- let event = new this.window.CustomEvent("WebExtPopupLoaded", {
- bubbles: true,
- detail: {extension: this.extension},
- });
- this.browser.dispatchEvent(event);
-
- return true;
- }.bind(this));
- }
-
- destroy() {
- return super.destroy().then(() => {
- if (this.tempPanel) {
- this.tempPanel.remove();
- this.tempPanel = null;
- }
- });
- }
-
- get DESTROY_EVENT() {
- return "ViewHiding";
- }
-
- closePopup() {
- if (this.attached) {
- CustomizableUI.hidePanelForNode(this.viewNode);
- } else {
- this.destroy();
- }
- }
-}
-
-Object.assign(global, {PanelPopup, ViewPopup});
-
-// Manages tab-specific context data, and dispatching tab select events
-// across all windows.
-global.TabContext = function TabContext(getDefaults, extension) {
- this.extension = extension;
- this.getDefaults = getDefaults;
-
- this.tabData = new WeakMap();
- this.lastLocation = new WeakMap();
-
- AllWindowEvents.addListener("progress", this);
- AllWindowEvents.addListener("TabSelect", this);
-
- EventEmitter.decorate(this);
-};
-
-TabContext.prototype = {
- get(tab) {
- if (!this.tabData.has(tab)) {
- this.tabData.set(tab, this.getDefaults(tab));
- }
-
- return this.tabData.get(tab);
- },
-
- clear(tab) {
- this.tabData.delete(tab);
- },
-
- handleEvent(event) {
- if (event.type == "TabSelect") {
- let tab = event.target;
- this.emit("tab-select", tab);
- this.emit("location-change", tab);
- }
- },
-
- onStateChange(browser, webProgress, request, stateFlags, statusCode) {
- let flags = Ci.nsIWebProgressListener;
-
- if (!(~stateFlags & (flags.STATE_IS_WINDOW | flags.STATE_START) ||
- this.lastLocation.has(browser))) {
- this.lastLocation.set(browser, request.URI);
- }
- },
-
- onLocationChange(browser, webProgress, request, locationURI, flags) {
- let gBrowser = browser.ownerGlobal.gBrowser;
- let lastLocation = this.lastLocation.get(browser);
- if (browser === gBrowser.selectedBrowser &&
- !(lastLocation && lastLocation.equalsExceptRef(browser.currentURI))) {
- let tab = gBrowser.getTabForBrowser(browser);
- this.emit("location-change", tab, true);
- }
- this.lastLocation.set(browser, browser.currentURI);
- },
-
- shutdown() {
- AllWindowEvents.removeListener("progress", this);
- AllWindowEvents.removeListener("TabSelect", this);
- },
-};
-
-// Manages tab mappings and permissions for a specific extension.
-function ExtensionTabManager(extension) {
- this.extension = extension;
-
- // A mapping of tab objects to the inner window ID the extension currently has
- // the active tab permission for. The active permission for a given tab is
- // valid only for the inner window that was active when the permission was
- // granted. If the tab navigates, the inner window ID changes, and the
- // permission automatically becomes stale.
- //
- // WeakMap[tab => inner-window-id<int>]
- this.hasTabPermissionFor = new WeakMap();
-}
-
-ExtensionTabManager.prototype = {
- addActiveTabPermission(tab = TabManager.activeTab) {
- if (this.extension.hasPermission("activeTab")) {
- // Note that, unlike Chrome, we don't currently clear this permission with
- // the tab navigates. If the inner window is revived from BFCache before
- // we've granted this permission to a new inner window, the extension
- // maintains its permissions for it.
- this.hasTabPermissionFor.set(tab, tab.linkedBrowser.innerWindowID);
- }
- },
-
- revokeActiveTabPermission(tab = TabManager.activeTab) {
- this.hasTabPermissionFor.delete(tab);
- },
-
- // Returns true if the extension has the "activeTab" permission for this tab.
- // This is somewhat more permissive than the generic "tabs" permission, as
- // checked by |hasTabPermission|, in that it also allows programmatic script
- // injection without an explicit host permission.
- hasActiveTabPermission(tab) {
- // This check is redundant with addTabPermission, but cheap.
- if (this.extension.hasPermission("activeTab")) {
- return (this.hasTabPermissionFor.has(tab) &&
- this.hasTabPermissionFor.get(tab) === tab.linkedBrowser.innerWindowID);
- }
- return false;
- },
-
- hasTabPermission(tab) {
- return this.extension.hasPermission("tabs") || this.hasActiveTabPermission(tab);
- },
-
- convert(tab) {
- let window = tab.ownerGlobal;
- let browser = tab.linkedBrowser;
-
- let mutedInfo = {muted: tab.muted};
- if (tab.muteReason === null) {
- mutedInfo.reason = "user";
- } else if (tab.muteReason) {
- mutedInfo.reason = "extension";
- mutedInfo.extensionId = tab.muteReason;
- }
-
- let result = {
- id: TabManager.getId(tab),
- index: tab._tPos,
- windowId: WindowManager.getId(window),
- selected: tab.selected,
- highlighted: tab.selected,
- active: tab.selected,
- pinned: tab.pinned,
- status: TabManager.getStatus(tab),
- incognito: WindowManager.isBrowserPrivate(browser),
- width: browser.frameLoader.lazyWidth || browser.clientWidth,
- height: browser.frameLoader.lazyHeight || browser.clientHeight,
- audible: tab.soundPlaying,
- mutedInfo,
- };
- if (this.extension.hasPermission("cookies")) {
- result.cookieStoreId = getCookieStoreIdForTab(result, tab);
- }
-
- if (this.hasTabPermission(tab)) {
- result.url = browser.currentURI.spec;
- let title = browser.contentTitle || tab.label;
- if (title) {
- result.title = title;
- }
- let icon = window.gBrowser.getIcon(tab);
- if (icon) {
- result.favIconUrl = icon;
- }
- }
-
- return result;
- },
-
- // Converts tabs returned from SessionStore.getClosedTabData and
- // SessionStore.getClosedWindowData into API tab objects
- convertFromSessionStoreClosedData(tab, window) {
- let result = {
- sessionId: String(tab.closedId),
- index: tab.pos ? tab.pos : 0,
- windowId: WindowManager.getId(window),
- selected: false,
- highlighted: false,
- active: false,
- pinned: false,
- incognito: Boolean(tab.state && tab.state.isPrivate),
- };
-
- if (this.hasTabPermission(tab)) {
- let entries = tab.state ? tab.state.entries : tab.entries;
- result.url = entries[0].url;
- result.title = entries[0].title;
- if (tab.image) {
- result.favIconUrl = tab.image;
- }
- }
-
- return result;
- },
-
- getTabs(window) {
- return Array.from(window.gBrowser.tabs)
- .filter(tab => !tab.closing)
- .map(tab => this.convert(tab));
- },
-};
-
-// Sends the tab and windowId upon request. This is primarily used to support
-// the synchronous `browser.extension.getViews` API.
-let onGetTabAndWindowId = {
- receiveMessage({name, target, sync}) {
- let {gBrowser} = target.ownerGlobal;
- let tab = gBrowser && gBrowser.getTabForBrowser(target);
- if (tab) {
- let reply = {
- tabId: TabManager.getId(tab),
- windowId: WindowManager.getId(tab.ownerGlobal),
- };
- if (sync) {
- return reply;
- }
- target.messageManager.sendAsyncMessage("Extension:SetTabAndWindowId", reply);
- }
- },
-};
-/* eslint-disable mozilla/balanced-listeners */
-Services.mm.addMessageListener("Extension:GetTabAndWindowId", onGetTabAndWindowId);
-/* eslint-enable mozilla/balanced-listeners */
-
-
-// Manages global mappings between XUL tabs and extension tab IDs.
-global.TabManager = {
- _tabs: new WeakMap(),
- _nextId: 1,
- _initialized: false,
-
- // We begin listening for TabOpen and TabClose events once we've started
- // assigning IDs to tabs, so that we can remap the IDs of tabs which are moved
- // between windows.
- initListener() {
- if (this._initialized) {
- return;
- }
-
- AllWindowEvents.addListener("TabOpen", this);
- AllWindowEvents.addListener("TabClose", this);
- WindowListManager.addOpenListener(this.handleWindowOpen.bind(this));
-
- this._initialized = true;
- },
-
- handleEvent(event) {
- if (event.type == "TabOpen") {
- let {adoptedTab} = event.detail;
- if (adoptedTab) {
- // This tab is being created to adopt a tab from a different window.
- // Copy the ID from the old tab to the new.
- let tab = event.target;
- this._tabs.set(tab, this.getId(adoptedTab));
-
- tab.linkedBrowser.messageManager.sendAsyncMessage("Extension:SetTabAndWindowId", {
- windowId: WindowManager.getId(tab.ownerGlobal),
- });
- }
- } else if (event.type == "TabClose") {
- let {adoptedBy} = event.detail;
- if (adoptedBy) {
- // This tab is being closed because it was adopted by a new window.
- // Copy its ID to the new tab, in case it was created as the first tab
- // of a new window, and did not have an `adoptedTab` detail when it was
- // opened.
- this._tabs.set(adoptedBy, this.getId(event.target));
-
- adoptedBy.linkedBrowser.messageManager.sendAsyncMessage("Extension:SetTabAndWindowId", {
- windowId: WindowManager.getId(adoptedBy),
- });
- }
- }
- },
-
- handleWindowOpen(window) {
- if (window.arguments && window.arguments[0] instanceof window.XULElement) {
- // If the first window argument is a XUL element, it means the
- // window is about to adopt a tab from another window to replace its
- // initial tab.
- let adoptedTab = window.arguments[0];
-
- this._tabs.set(window.gBrowser.tabs[0], this.getId(adoptedTab));
- }
- },
-
- getId(tab) {
- if (this._tabs.has(tab)) {
- return this._tabs.get(tab);
- }
- this.initListener();
-
- let id = this._nextId++;
- this._tabs.set(tab, id);
- return id;
- },
-
- getBrowserId(browser) {
- let gBrowser = browser.ownerGlobal.gBrowser;
- // Some non-browser windows have gBrowser but not
- // getTabForBrowser!
- if (gBrowser && gBrowser.getTabForBrowser) {
- let tab = gBrowser.getTabForBrowser(browser);
- if (tab) {
- return this.getId(tab);
- }
- }
- return -1;
- },
-
- /**
- * Returns the XUL <tab> element associated with the given tab ID. If no tab
- * with the given ID exists, and no default value is provided, an error is
- * raised, belonging to the scope of the given context.
- *
- * @param {integer} tabId
- * The ID of the tab to retrieve.
- * @param {ExtensionContext} context
- * The context of the caller.
- * This value may be omitted if `default_` is not `undefined`.
- * @param {*} default_
- * The value to return if no tab exists with the given ID.
- * @returns {Element<tab>}
- * A XUL <tab> element.
- */
- getTab(tabId, context, default_ = undefined) {
- // FIXME: Speed this up without leaking memory somehow.
- for (let window of WindowListManager.browserWindows()) {
- if (!window.gBrowser) {
- continue;
- }
- for (let tab of window.gBrowser.tabs) {
- if (this.getId(tab) == tabId) {
- return tab;
- }
- }
- }
- if (default_ !== undefined) {
- return default_;
- }
- throw new context.cloneScope.Error(`Invalid tab ID: ${tabId}`);
- },
-
- get activeTab() {
- let window = WindowManager.topWindow;
- if (window && window.gBrowser) {
- return window.gBrowser.selectedTab;
- }
- return null;
- },
-
- getStatus(tab) {
- return tab.getAttribute("busy") == "true" ? "loading" : "complete";
- },
-
- convert(extension, tab) {
- return TabManager.for(extension).convert(tab);
- },
-};
-
-// WeakMap[Extension -> ExtensionTabManager]
-let tabManagers = new WeakMap();
-
-// Returns the extension-specific tab manager for the given extension, or
-// creates one if it doesn't already exist.
-TabManager.for = function(extension) {
- if (!tabManagers.has(extension)) {
- tabManagers.set(extension, new ExtensionTabManager(extension));
- }
- return tabManagers.get(extension);
-};
-
-/* eslint-disable mozilla/balanced-listeners */
-extensions.on("shutdown", (type, extension) => {
- tabManagers.delete(extension);
-});
-/* eslint-enable mozilla/balanced-listeners */
-
-function memoize(fn) {
- let weakMap = new DefaultWeakMap(fn);
- return weakMap.get.bind(weakMap);
-}
-
-// Manages mapping between XUL windows and extension window IDs.
-global.WindowManager = {
- _windows: new WeakMap(),
- _nextId: 0,
-
- // Note: These must match the values in windows.json.
- WINDOW_ID_NONE: -1,
- WINDOW_ID_CURRENT: -2,
-
- get topWindow() {
- return Services.wm.getMostRecentWindow("navigator:browser");
- },
-
- windowType(window) {
- // TODO: Make this work.
-
- let {chromeFlags} = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDocShell)
- .treeOwner.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIXULWindow);
-
- if (chromeFlags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_DIALOG) {
- return "popup";
- }
-
- return "normal";
- },
-
- updateGeometry(window, options) {
- if (options.left !== null || options.top !== null) {
- let left = options.left !== null ? options.left : window.screenX;
- let top = options.top !== null ? options.top : window.screenY;
- window.moveTo(left, top);
- }
-
- if (options.width !== null || options.height !== null) {
- let width = options.width !== null ? options.width : window.outerWidth;
- let height = options.height !== null ? options.height : window.outerHeight;
- window.resizeTo(width, height);
- }
- },
-
- isBrowserPrivate: memoize(browser => {
- return PrivateBrowsingUtils.isBrowserPrivate(browser);
- }),
-
- getId(window) {
- if (this._windows.has(window)) {
- return this._windows.get(window);
- }
- let id = this._nextId++;
- this._windows.set(window, id);
- return id;
- },
-
- getWindow(id, context) {
- if (id == this.WINDOW_ID_CURRENT) {
- return currentWindow(context);
- }
-
- for (let window of WindowListManager.browserWindows(true)) {
- if (this.getId(window) == id) {
- return window;
- }
- }
- return null;
- },
-
- getState(window) {
- const STATES = {
- [window.STATE_MAXIMIZED]: "maximized",
- [window.STATE_MINIMIZED]: "minimized",
- [window.STATE_NORMAL]: "normal",
- };
- let state = STATES[window.windowState];
- if (window.fullScreen) {
- state = "fullscreen";
- }
- return state;
- },
-
- setState(window, state) {
- if (state != "fullscreen" && window.fullScreen) {
- window.fullScreen = false;
- }
-
- switch (state) {
- case "maximized":
- window.maximize();
- break;
-
- case "minimized":
- case "docked":
- window.minimize();
- break;
-
- case "normal":
- // Restore sometimes returns the window to its previous state, rather
- // than to the "normal" state, so it may need to be called anywhere from
- // zero to two times.
- window.restore();
- if (window.windowState != window.STATE_NORMAL) {
- window.restore();
- }
- if (window.windowState != window.STATE_NORMAL) {
- // And on OS-X, where normal vs. maximized is basically a heuristic,
- // we need to cheat.
- window.sizeToContent();
- }
- break;
-
- case "fullscreen":
- window.fullScreen = true;
- break;
-
- default:
- throw new Error(`Unexpected window state: ${state}`);
- }
- },
-
- convert(extension, window, getInfo) {
- let xulWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDocShell)
- .treeOwner.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIXULWindow);
-
- let result = {
- id: this.getId(window),
- focused: window.document.hasFocus(),
- top: window.screenY,
- left: window.screenX,
- width: window.outerWidth,
- height: window.outerHeight,
- incognito: PrivateBrowsingUtils.isWindowPrivate(window),
- type: this.windowType(window),
- state: this.getState(window),
- alwaysOnTop: xulWindow.zLevel >= Ci.nsIXULWindow.raisedZ,
- };
-
- if (getInfo && getInfo.populate) {
- result.tabs = TabManager.for(extension).getTabs(window);
- }
-
- return result;
- },
-
- // Converts windows returned from SessionStore.getClosedWindowData
- // into API window objects
- convertFromSessionStoreClosedData(window, extension) {
- let result = {
- sessionId: String(window.closedId),
- focused: false,
- incognito: false,
- type: "normal", // this is always "normal" for a closed window
- state: this.getState(window),
- alwaysOnTop: false,
- };
-
- if (window.tabs.length) {
- result.tabs = [];
- window.tabs.forEach((tab, index) => {
- result.tabs.push(TabManager.for(extension).convertFromSessionStoreClosedData(tab, window, index));
- });
- }
-
- return result;
- },
-};
-
-// Manages listeners for window opening and closing. A window is
-// considered open when the "load" event fires on it. A window is
-// closed when a "domwindowclosed" notification fires for it.
-global.WindowListManager = {
- _openListeners: new Set(),
- _closeListeners: new Set(),
-
- // Returns an iterator for all browser windows. Unless |includeIncomplete| is
- // true, only fully-loaded windows are returned.
- * browserWindows(includeIncomplete = false) {
- // The window type parameter is only available once the window's document
- // element has been created. This means that, when looking for incomplete
- // browser windows, we need to ignore the type entirely for windows which
- // haven't finished loading, since we would otherwise skip browser windows
- // in their early loading stages.
- // This is particularly important given that the "domwindowcreated" event
- // fires for browser windows when they're in that in-between state, and just
- // before we register our own "domwindowcreated" listener.
-
- let e = Services.wm.getEnumerator("");
- while (e.hasMoreElements()) {
- let window = e.getNext();
-
- let ok = includeIncomplete;
- if (window.document.readyState == "complete") {
- ok = window.document.documentElement.getAttribute("windowtype") == "navigator:browser";
- }
-
- if (ok) {
- yield window;
- }
- }
- },
-
- addOpenListener(listener) {
- if (this._openListeners.size == 0 && this._closeListeners.size == 0) {
- Services.ww.registerNotification(this);
- }
- this._openListeners.add(listener);
-
- for (let window of this.browserWindows(true)) {
- if (window.document.readyState != "complete") {
- window.addEventListener("load", this);
- }
- }
- },
-
- removeOpenListener(listener) {
- this._openListeners.delete(listener);
- if (this._openListeners.size == 0 && this._closeListeners.size == 0) {
- Services.ww.unregisterNotification(this);
- }
- },
-
- addCloseListener(listener) {
- if (this._openListeners.size == 0 && this._closeListeners.size == 0) {
- Services.ww.registerNotification(this);
- }
- this._closeListeners.add(listener);
- },
-
- removeCloseListener(listener) {
- this._closeListeners.delete(listener);
- if (this._openListeners.size == 0 && this._closeListeners.size == 0) {
- Services.ww.unregisterNotification(this);
- }
- },
-
- handleEvent(event) {
- event.currentTarget.removeEventListener(event.type, this);
- let window = event.target.defaultView;
- if (window.document.documentElement.getAttribute("windowtype") != "navigator:browser") {
- return;
- }
-
- for (let listener of this._openListeners) {
- listener(window);
- }
- },
-
- observe(window, topic, data) {
- if (topic == "domwindowclosed") {
- if (window.document.documentElement.getAttribute("windowtype") != "navigator:browser") {
- return;
- }
-
- window.removeEventListener("load", this);
- for (let listener of this._closeListeners) {
- listener(window);
- }
- } else {
- window.addEventListener("load", this);
- }
- },
-};
-
-// Provides a facility to listen for DOM events across all XUL windows.
-global.AllWindowEvents = {
- _listeners: new Map(),
-
- // If |type| is a normal event type, invoke |listener| each time
- // that event fires in any open window. If |type| is "progress", add
- // a web progress listener that covers all open windows.
- addListener(type, listener) {
- if (type == "domwindowopened") {
- return WindowListManager.addOpenListener(listener);
- } else if (type == "domwindowclosed") {
- return WindowListManager.addCloseListener(listener);
- }
-
- if (this._listeners.size == 0) {
- WindowListManager.addOpenListener(this.openListener);
- }
-
- if (!this._listeners.has(type)) {
- this._listeners.set(type, new Set());
- }
- let list = this._listeners.get(type);
- list.add(listener);
-
- // Register listener on all existing windows.
- for (let window of WindowListManager.browserWindows()) {
- this.addWindowListener(window, type, listener);
- }
- },
-
- removeListener(eventType, listener) {
- if (eventType == "domwindowopened") {
- return WindowListManager.removeOpenListener(listener);
- } else if (eventType == "domwindowclosed") {
- return WindowListManager.removeCloseListener(listener);
- }
-
- let listeners = this._listeners.get(eventType);
- listeners.delete(listener);
- if (listeners.size == 0) {
- this._listeners.delete(eventType);
- if (this._listeners.size == 0) {
- WindowListManager.removeOpenListener(this.openListener);
- }
- }
-
- // Unregister listener from all existing windows.
- let useCapture = eventType === "focus" || eventType === "blur";
- for (let window of WindowListManager.browserWindows()) {
- if (eventType == "progress") {
- window.gBrowser.removeTabsProgressListener(listener);
- } else {
- window.removeEventListener(eventType, listener, useCapture);
- }
- }
- },
-
- /* eslint-disable mozilla/balanced-listeners */
- addWindowListener(window, eventType, listener) {
- let useCapture = eventType === "focus" || eventType === "blur";
-
- if (eventType == "progress") {
- window.gBrowser.addTabsProgressListener(listener);
- } else {
- window.addEventListener(eventType, listener, useCapture);
- }
- },
- /* eslint-enable mozilla/balanced-listeners */
-
- // Runs whenever the "load" event fires for a new window.
- openListener(window) {
- for (let [eventType, listeners] of AllWindowEvents._listeners) {
- for (let listener of listeners) {
- this.addWindowListener(window, eventType, listener);
- }
- }
- },
-};
-
-AllWindowEvents.openListener = AllWindowEvents.openListener.bind(AllWindowEvents);
-
-// Subclass of EventManager where we just need to call
-// add/removeEventListener on each XUL window.
-global.WindowEventManager = function(context, name, event, listener) {
- EventManager.call(this, context, name, fire => {
- let listener2 = (...args) => listener(fire, ...args);
- AllWindowEvents.addListener(event, listener2);
- return () => {
- AllWindowEvents.removeListener(event, listener2);
- };
- });
-};
-
-WindowEventManager.prototype = Object.create(EventManager.prototype);
diff --git a/application/basilisk/components/webextensions/ext-windows.js b/application/basilisk/components/webextensions/ext-windows.js
deleted file mode 100644
index 5956ae15b..000000000
--- a/application/basilisk/components/webextensions/ext-windows.js
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
- "@mozilla.org/browser/aboutnewtab-service;1",
- "nsIAboutNewTabService");
-XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
- "resource://gre/modules/AppConstants.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
- "resource://gre/modules/PrivateBrowsingUtils.jsm");
-
-Cu.import("resource://gre/modules/ExtensionUtils.jsm");
-var {
- EventManager,
- promiseObserved,
-} = ExtensionUtils;
-
-function onXULFrameLoaderCreated({target}) {
- target.messageManager.sendAsyncMessage("AllowScriptsToClose", {});
-}
-
-extensions.registerSchemaAPI("windows", "addon_parent", context => {
- let {extension} = context;
- return {
- windows: {
- onCreated:
- new WindowEventManager(context, "windows.onCreated", "domwindowopened", (fire, window) => {
- fire(WindowManager.convert(extension, window));
- }).api(),
-
- onRemoved:
- new WindowEventManager(context, "windows.onRemoved", "domwindowclosed", (fire, window) => {
- fire(WindowManager.getId(window));
- }).api(),
-
- onFocusChanged: new EventManager(context, "windows.onFocusChanged", fire => {
- // Keep track of the last windowId used to fire an onFocusChanged event
- let lastOnFocusChangedWindowId;
-
- let listener = event => {
- // Wait a tick to avoid firing a superfluous WINDOW_ID_NONE
- // event when switching focus between two Firefox windows.
- Promise.resolve().then(() => {
- let window = Services.focus.activeWindow;
- let windowId = window ? WindowManager.getId(window) : WindowManager.WINDOW_ID_NONE;
- if (windowId !== lastOnFocusChangedWindowId) {
- fire(windowId);
- lastOnFocusChangedWindowId = windowId;
- }
- });
- };
- AllWindowEvents.addListener("focus", listener);
- AllWindowEvents.addListener("blur", listener);
- return () => {
- AllWindowEvents.removeListener("focus", listener);
- AllWindowEvents.removeListener("blur", listener);
- };
- }).api(),
-
- get: function(windowId, getInfo) {
- let window = WindowManager.getWindow(windowId, context);
- return Promise.resolve(WindowManager.convert(extension, window, getInfo));
- },
-
- getCurrent: function(getInfo) {
- let window = currentWindow(context);
- return Promise.resolve(WindowManager.convert(extension, window, getInfo));
- },
-
- getLastFocused: function(getInfo) {
- let window = WindowManager.topWindow;
- return Promise.resolve(WindowManager.convert(extension, window, getInfo));
- },
-
- getAll: function(getInfo) {
- let windows = Array.from(WindowListManager.browserWindows(),
- window => WindowManager.convert(extension, window, getInfo));
- return Promise.resolve(windows);
- },
-
- create: function(createData) {
- let needResize = (createData.left !== null || createData.top !== null ||
- createData.width !== null || createData.height !== null);
-
- if (needResize) {
- if (createData.state !== null && createData.state != "normal") {
- return Promise.reject({message: `"state": "${createData.state}" may not be combined with "left", "top", "width", or "height"`});
- }
- createData.state = "normal";
- }
-
- function mkstr(s) {
- let result = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
- result.data = s;
- return result;
- }
-
- let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
-
- if (createData.tabId !== null) {
- if (createData.url !== null) {
- return Promise.reject({message: "`tabId` may not be used in conjunction with `url`"});
- }
-
- if (createData.allowScriptsToClose) {
- return Promise.reject({message: "`tabId` may not be used in conjunction with `allowScriptsToClose`"});
- }
-
- let tab = TabManager.getTab(createData.tabId, context);
-
- // Private browsing tabs can only be moved to private browsing
- // windows.
- let incognito = PrivateBrowsingUtils.isBrowserPrivate(tab.linkedBrowser);
- if (createData.incognito !== null && createData.incognito != incognito) {
- return Promise.reject({message: "`incognito` property must match the incognito state of tab"});
- }
- createData.incognito = incognito;
-
- args.appendElement(tab, /* weak = */ false);
- } else if (createData.url !== null) {
- if (Array.isArray(createData.url)) {
- let array = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
- for (let url of createData.url) {
- array.appendElement(mkstr(url), /* weak = */ false);
- }
- args.appendElement(array, /* weak = */ false);
- } else {
- args.appendElement(mkstr(createData.url), /* weak = */ false);
- }
- } else {
- args.appendElement(mkstr(aboutNewTabService.newTabURL), /* weak = */ false);
- }
-
- let features = ["chrome"];
-
- if (createData.type === null || createData.type == "normal") {
- features.push("dialog=no", "all");
- } else {
- // All other types create "popup"-type windows by default.
- features.push("dialog", "resizable", "minimizable", "centerscreen", "titlebar", "close");
- }
-
- if (createData.incognito !== null) {
- if (createData.incognito) {
- features.push("private");
- } else {
- features.push("non-private");
- }
- }
-
- let {allowScriptsToClose, url} = createData;
- if (allowScriptsToClose === null) {
- allowScriptsToClose = typeof url === "string" && url.startsWith("moz-extension://");
- }
-
- let window = Services.ww.openWindow(null, "chrome://browser/content/browser.xul", "_blank",
- features.join(","), args);
-
- WindowManager.updateGeometry(window, createData);
-
- // TODO: focused, type
-
- return new Promise(resolve => {
- window.addEventListener("load", function listener() {
- window.removeEventListener("load", listener);
- if (["maximized", "normal"].includes(createData.state)) {
- window.document.documentElement.setAttribute("sizemode", createData.state);
- }
- resolve(promiseObserved("browser-delayed-startup-finished", win => win == window));
- });
- }).then(() => {
- // Some states only work after delayed-startup-finished
- if (["minimized", "fullscreen", "docked"].includes(createData.state)) {
- WindowManager.setState(window, createData.state);
- }
- if (allowScriptsToClose) {
- for (let {linkedBrowser} of window.gBrowser.tabs) {
- onXULFrameLoaderCreated({target: linkedBrowser});
- linkedBrowser.addEventListener( // eslint-disable-line mozilla/balanced-listeners
- "XULFrameLoaderCreated", onXULFrameLoaderCreated);
- }
- }
- return WindowManager.convert(extension, window, {populate: true});
- });
- },
-
- update: function(windowId, updateInfo) {
- if (updateInfo.state !== null && updateInfo.state != "normal") {
- if (updateInfo.left !== null || updateInfo.top !== null ||
- updateInfo.width !== null || updateInfo.height !== null) {
- return Promise.reject({message: `"state": "${updateInfo.state}" may not be combined with "left", "top", "width", or "height"`});
- }
- }
-
- let window = WindowManager.getWindow(windowId, context);
- if (updateInfo.focused) {
- Services.focus.activeWindow = window;
- }
-
- if (updateInfo.state !== null) {
- WindowManager.setState(window, updateInfo.state);
- }
-
- if (updateInfo.drawAttention) {
- // Bug 1257497 - Firefox can't cancel attention actions.
- window.getAttention();
- }
-
- WindowManager.updateGeometry(window, updateInfo);
-
- // TODO: All the other properties, focused=false...
-
- return Promise.resolve(WindowManager.convert(extension, window));
- },
-
- remove: function(windowId) {
- let window = WindowManager.getWindow(windowId, context);
- window.close();
-
- return new Promise(resolve => {
- let listener = () => {
- AllWindowEvents.removeListener("domwindowclosed", listener);
- resolve();
- };
- AllWindowEvents.addListener("domwindowclosed", listener);
- });
- },
- },
- };
-});
diff --git a/application/basilisk/components/webextensions/extension-mac-panel.css b/application/basilisk/components/webextensions/extension-mac-panel.css
deleted file mode 100644
index 2e9ed6bdb..000000000
--- a/application/basilisk/components/webextensions/extension-mac-panel.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- border-radius: 3.5px;
-}
diff --git a/application/basilisk/components/webextensions/extension-mac.css b/application/basilisk/components/webextensions/extension-mac.css
deleted file mode 100644
index 49cd3b359..000000000
--- a/application/basilisk/components/webextensions/extension-mac.css
+++ /dev/null
@@ -1,11 +0,0 @@
-button,
-select,
-input[type="checkbox"] + label::before {
- border-radius: 4px;
-}
-
-.panel-section-footer {
- border-bottom-left-radius: 4px;
- border-bottom-right-radius: 4px;
- overflow: hidden;
-}
diff --git a/application/basilisk/components/webextensions/extension-win-panel.css b/application/basilisk/components/webextensions/extension-win-panel.css
deleted file mode 100644
index 9da6da14c..000000000
--- a/application/basilisk/components/webextensions/extension-win-panel.css
+++ /dev/null
@@ -1,5 +0,0 @@
-@media (-moz-os-version: windows-win7) {
- body {
- border-radius: 4px;
- }
-}
diff --git a/application/basilisk/components/webextensions/extension.css b/application/basilisk/components/webextensions/extension.css
deleted file mode 100644
index 6b59033e3..000000000
--- a/application/basilisk/components/webextensions/extension.css
+++ /dev/null
@@ -1,572 +0,0 @@
-/* stylelint-disable property-no-vendor-prefix */
-/* stylelint-disable property-no-vendor-prefix */
-/* Base */
-button,
-select,
-option,
-input {
- -moz-appearance: none;
-}
-
-/* Variables */
-html,
-body {
- background: transparent;
- box-sizing: border-box;
- color: #222426;
- cursor: default;
- display: flex;
- flex-direction: column;
- font: caption;
- margin: 0;
- padding: 0;
- -moz-user-select: none;
-}
-
-body * {
- box-sizing: border-box;
- text-align: start;
-}
-
-/* stylelint-disable property-no-vendor-prefix */
-/* Buttons */
-button,
-select {
- background-color: #fbfbfb;
- border: 1px solid #b1b1b1;
- box-shadow: 0 0 0 0 transparent;
- font: caption;
- height: 24px;
- outline: 0 !important;
- padding: 0 8px 0;
- transition-duration: 250ms;
- transition-property: box-shadow, border;
-}
-
-select {
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==);
- background-position: calc(100% - 4px) center;
- background-repeat: no-repeat;
- padding-inline-end: 24px;
- text-overflow: ellipsis;
-}
-
-label {
- font: caption;
-}
-
-button::-moz-focus-inner {
- border: 0;
- outline: 0;
-}
-
-/* Dropdowns */
-select {
- background-color: #fbfbfb;
- border: 1px solid #b1b1b1;
- box-shadow: 0 0 0 0 transparent;
- font: caption;
- height: 24px;
- outline: 0 !important;
- padding: 0 8px 0;
- transition-duration: 250ms;
- transition-property: box-shadow, border;
-}
-
-select {
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==);
- background-position: calc(100% - 4px) center;
- background-repeat: no-repeat;
- padding-inline-end: 24px;
- text-overflow: ellipsis;
-}
-
-select:-moz-focusring {
- color: transparent;
- text-shadow: 0 0 0 #000;
-}
-
-select:-moz-focusring * {
- color: #000;
- text-shadow: none;
-}
-
-button.hover,
-select.hover {
- background-color: #ebebeb;
- border: 1px solid #b1b1b1;
-}
-
-button.pressed,
-select.pressed {
- background-color: #d4d4d4;
- border: 1px solid #858585;
-}
-
-button.disabled,
-select.disabled {
- color: #999;
- opacity: .5;
-}
-
-button.focused,
-select.focused {
- border-color: #fff;
- box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
-}
-
-button.default {
- background-color: #0996f8;
- border-color: #0670cc;
- color: #fff;
-}
-
-button.default.hover {
- background-color: #0670cc;
- border-color: #005bab;
-}
-
-button.default.pressed {
- background-color: #005bab;
- border-color: #004480;
-}
-
-button.default.focused {
- border-color: #fff;
-}
-
-/* Radio Buttons */
-.radioItem {
- margin-bottom: 6px;
- text-align: left;
-}
-
-input[type="radio"] {
- display: none;
-}
-
-input[type="radio"] + label {
- -moz-user-select: none;
-}
-
-input[type="radio"] + label::before {
- background-color: #fff;
- background-position: center;
- border: 1px solid #b1b1b1;
- border-radius: 50%;
- content: "";
- display: inline-block;
- height: 16px;
- margin-right: 6px;
- vertical-align: text-top;
- width: 16px;
-}
-
-input[type="radio"]:hover + label::before,
-.radioItem.hover input[type="radio"]:not(active) + label::before {
- background-color: #fbfbfb;
- border-color: #b1b1b1;
-}
-
-input[type="radio"]:hover:active + label::before,
-.radioItem.pressed input[type="radio"]:not(active) + label::before {
- background-color: #ebebeb;
- border-color: #858585;
-}
-
-input[type="radio"]:checked + label::before {
- background-color: #0996f8;
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iOCIgcj0iNCIgZmlsbD0iI2ZmZiIgLz4KPC9zdmc+Cg==);
- border-color: #0670cc;
-}
-
-input[type="radio"]:checked:hover + label::before,
-.radioItem.hover input[type="radio"]:checked:not(active) + label::before {
- background-color: #0670cc;
- border-color: #005bab;
-}
-
-input[type="radio"]:checked:hover:active + label::before,
-.radioItem.pressed input[type="radio"]:checked:not(active) + label::before {
- background-color: #005bab;
- border-color: #004480;
-}
-
-.radioItem.disabled input[type="radio"] + label,
-.radioItem.disabled input[type="radio"]:hover + label,
-.radioItem.disabled input[type="radio"]:hover:active + label {
- color: #999;
- opacity: .5;
-}
-
-.radioItem.focused input[type="radio"] + label::before {
- border-color: #0996f8;
- box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
-}
-
-.radioItem.focused input[type="radio"]:checked + label::before {
- border-color: #fff;
-}
-
-/* Checkboxes */
-.checkboxItem {
- margin-bottom: 6px;
- text-align: left;
-}
-
-input[type="checkbox"] {
- display: none;
-}
-
-input[type="checkbox"] + label {
- -moz-user-select: none;
-}
-
-input[type="checkbox"] + label::before {
- background-color: #fff;
- background-position: center;
- border: 1px solid #b1b1b1;
- content: "";
- display: inline-block;
- height: 16px;
- margin-right: 6px;
- vertical-align: text-top;
- width: 16px;
-}
-
-input[type="checkbox"]:hover + label::before,
-.checkboxItem.hover input[type="checkbox"]:not(active) + label::before {
- background-color: #fbfbfb;
- border-color: #b1b1b1;
-}
-
-input[type="checkbox"]:hover:active + label::before,
-.checkboxItem.pressed input[type="checkbox"]:not(active) + label::before {
- background-color: #ebebeb;
- border-color: #858585;
-}
-
-input[type="checkbox"]:checked + label::before {
- background-color: #0996f8;
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNNy43LDEyLjkgQzcuNCwxMy4zIDYuOCwxMy40IDYuNCwxMyBMMy4yLDkuOCBDMi44LDkuNCAyLjgsOC42IDMuMiw4LjIgQzMuNiw3LjggNC40LDcuOCA0LjgsOC4yIEw2LjksMTAuMyBMMTEuMSw0LjQgQzExLjUsMy45IDEyLjIsMy44IDEyLjcsNC4xIEMxMy4yLDQuNSAxMy4zLDUuMiAxMyw1LjcgTDcuNywxMi45IEw3LjcsMTIuOSBaIiBmaWxsPSIjZmZmIiAvPgo8L3N2Zz4K);
- border-color: #0670cc;
-}
-
-input[type="checkbox"]:checked:hover + label::before,
-.checkboxItem.hover input[type="checkbox"]:checked:not(active) + label::before {
- background-color: #0670cc;
- border-color: #005bab;
-}
-
-input[type="checkbox"]:checked:hover:active + label::before,
-.checkboxItem.pressed input[type="checkbox"]:checked:not(active) + label::before {
- background-color: #005bab;
- border-color: #004480;
-}
-
-.checkboxItem.disabled input[type="checkbox"] + label,
-.checkboxItem.disabled input[type="checkbox"]:hover + label,
-.checkboxItem.disabled input[type="checkbox"]:hover:active + label {
- color: #999;
- opacity: .5;
-}
-
-.checkboxItem.focused input[type="checkbox"] + label::before {
- border-color: #0996f8;
- box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
-}
-
-.checkboxItem.focused input[type="checkbox"]:checked + label::before {
- border-color: #fff;
-}
-
-/* Expander Button */
-button.expander {
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==);
- background-position: center;
- background-repeat: no-repeat;
- height: 24px;
- padding: 0;
- width: 24px;
-}
-
-/* Interactive States */
-button:hover:not(.pressed):not(.disabled):not(.focused),
-select:hover:not(.pressed):not(.disabled):not(.focused) {
- background-color: #ebebeb;
- border: 1px solid #b1b1b1;
-}
-
-button:hover:active:not(.hover):not(.disabled):not(.focused),
-select:hover:active:not(.hover):not(.disabled):not(.focused) {
- background-color: #d4d4d4;
- border: 1px solid #858585;
-}
-
-button.default:hover:not(.pressed):not(.disabled):not(.focused) {
- background-color: #0670cc;
- border-color: #005bab;
-}
-
-button.default:hover:active:not(.hover):not(.disabled):not(.focused) {
- background-color: #005bab;
- border-color: #004480;
-}
-
-button:focus:not(.disabled) {
- border-color: #fff !important;
- box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
-}
-
-/* Fields */
-input[type="text"],
-textarea {
- background-color: #fff;
- border: 1px solid #b1b1b1;
- box-shadow: 0 0 0 0 rgba(97, 181, 255, 0);
- font: caption;
- padding: 0 6px 0;
- transition-duration: 250ms;
- transition-property: box-shadow;
-}
-
-input[type="text"] {
- height: 24px;
-}
-
-input[type="text"].hover,
-textarea.hover {
- border: 1px solid #858585;
-}
-
-input[type="text"].disabled,
-textarea.disabled {
- color: #999;
- opacity: .5;
-}
-
-input[type="text"].focused,
-textarea.focused {
- border-color: #0996f8;
- box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
-}
-
-/* Interactive States */
-input[type="text"]:not(disabled):hover,
-textarea:not(disabled):hover {
- border: 1px solid #858585;
-}
-
-input[type="text"]:focus,
-input[type="text"]:focus:hover,
-textarea:focus,
-textarea:focus:hover {
- border-color: #0996f8;
- box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
-}
-
-/* stylelint-disable property-no-vendor-prefix */
-.panel-section {
- display: flex;
- flex-direction: row;
-}
-
-.panel-section-separator {
- background-color: rgba(0, 0, 0, 0.15);
- min-height: 1px;
-}
-
-/* Panel Section - Header */
-.panel-section-header {
- border-bottom: 1px solid rgba(0, 0, 0, 0.15);
- padding: 16px;
-}
-
-.panel-section-header > .icon-section-header {
- background-position: center center;
- background-repeat: no-repeat;
- height: 32px;
- margin-right: 16px;
- position: relative;
- width: 32px;
-}
-
-.panel-section-header > .text-section-header {
- align-self: center;
- font-size: 1.385em;
- font-weight: lighter;
-}
-
-/* Panel Section - List */
-.panel-section-list {
- flex-direction: column;
- padding: 4px 0;
-}
-
-.panel-list-item {
- align-items: center;
- display: flex;
- flex-direction: row;
- height: 24px;
- padding: 0 16px;
-}
-
-.panel-list-item:not(.disabled):hover {
- background-color: rgba(0, 0, 0, 0.06);
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
- border-top: 1px solid rgba(0, 0, 0, 0.1);
-}
-
-.panel-list-item:not(.disabled):hover:active {
- background-color: rgba(0, 0, 0, 0.1);
-}
-
-.panel-list-item.disabled {
- color: #999;
-}
-
-.panel-list-item > .icon {
- flex-grow: 0;
- flex-shrink: 0;
-}
-
-.panel-list-item > .text {
- flex-grow: 10;
-}
-
-.panel-list-item > .text-shortcut {
- color: #808080;
- font-family: "Lucida Grande", caption;
- font-size: .847em;
- justify-content: flex-end;
-}
-
-.panel-section-list .panel-section-separator {
- margin: 4px 0;
-}
-
-/* Panel Section - Form Elements */
-.panel-section-formElements {
- display: flex;
- flex-direction: column;
- padding: 16px;
-}
-
-.panel-formElements-item {
- align-items: center;
- display: flex;
- flex-direction: row;
- margin-bottom: 12px;
-}
-
-.panel-formElements-item:last-child {
- margin-bottom: 0;
-}
-
-.panel-formElements-item label {
- flex-shrink: 0;
- margin-right: 6px;
- text-align: right;
-}
-
-.panel-formElements-item input[type="text"],
-.panel-formElements-item select {
- flex-grow: 1;
-}
-
-/* Panel Section - Footer */
-.panel-section-footer {
- background-color: rgba(0, 0, 0, 0.06);
- border-top: 1px solid rgba(0, 0, 0, 0.15);
- color: #1a1a1a;
- display: flex;
- flex-direction: row;
- height: 41px;
- margin-top: -1px;
- padding: 0;
-}
-
-.panel-section-footer-button {
- flex: 1 1 auto;
- height: 100%;
- margin: 0 -1px;
- padding: 12px;
- text-align: center;
-}
-
-.panel-section-footer-button > .text-shortcut {
- color: #808080;
- font-family: "Lucida Grande", caption;
- font-size: .847em;
-}
-
-.panel-section-footer-button:hover {
- background-color: rgba(0, 0, 0, 0.06);
-}
-
-.panel-section-footer-button:hover:active {
- background-color: rgba(0, 0, 0, 0.1);
-}
-
-.panel-section-footer-button.default {
- background-color: #0996f8;
- box-shadow: 0 1px 0 #0670cc inset;
- color: #fff;
-}
-
-.panel-section-footer-button.default:hover {
- background-color: #0670cc;
- box-shadow: 0 1px 0 #005bab inset;
-}
-
-.panel-section-footer-button.default:hover:active {
- background-color: #005bab;
- box-shadow: 0 1px 0 #004480 inset;
-}
-
-.panel-section-footer-separator {
- background-color: rgba(0, 0, 0, 0.1);
- width: 1px;
- z-index: 99;
-}
-
-/* Panel Section - Tabs */
-.panel-section-tabs {
- color: #1a1a1a;
- display: flex;
- flex-direction: row;
- height: 41px;
- margin-bottom: -1px;
- padding: 0;
-}
-
-.panel-section-tabs-button {
- flex: 1 1 auto;
- height: 100%;
- margin: 0 -1px;
- padding: 12px;
- text-align: center;
-}
-
-.panel-section-tabs-button:hover {
- background-color: rgba(0, 0, 0, 0.06);
-}
-
-.panel-section-tabs-button:hover:active {
- background-color: rgba(0, 0, 0, 0.1);
-}
-
-.panel-section-tabs-button.selected {
- box-shadow: 0 -1px 0 #0670cc inset, 0 -4px 0 #0996f8 inset;
- color: #0996f8;
-}
-
-.panel-section-tabs-button.selected:hover {
- color: #0670cc;
-}
-
-.panel-section-tabs-separator {
- background-color: rgba(0, 0, 0, 0.1);
- width: 1px;
- z-index: 99;
-}
diff --git a/application/basilisk/components/webextensions/extension.svg b/application/basilisk/components/webextensions/extension.svg
deleted file mode 100644
index a16455253..000000000
--- a/application/basilisk/components/webextensions/extension.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
- width="64" height="64" viewBox="0 0 64 64">
- <defs>
- <style>
- .style-puzzle-piece {
- fill: url('#gradient-linear-puzzle-piece');
- }
- </style>
- <linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%">
- <stop offset="0%" stop-color="#66cc52" stop-opacity="1"/>
- <stop offset="100%" stop-color="#60bf4c" stop-opacity="1"/>
- </linearGradient>
- </defs>
- <path class="style-puzzle-piece" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,6.3-4,6.3c-4,0-4.2-4.1-7.3-4.1c-4.8,0-4.4,5.8-4.4,5.8L2,58 c0,2.2,1.8,4,4,4H19c0,0,6.3,0.4,6.3-4.4c0-3.1-4-3.6-4-7.7c0-2,2.2-4.5,6.4-4.5c4.2,0,6.6,2.5,6.6,4.5c0,4-3.9,4.6-3.9,7.7 c0,4.9,6.3,4.4,6.3,4.4H42z"/>
-</svg>
diff --git a/application/basilisk/components/webextensions/extensions-browser.manifest b/application/basilisk/components/webextensions/extensions-browser.manifest
deleted file mode 100644
index ed5cca813..000000000
--- a/application/basilisk/components/webextensions/extensions-browser.manifest
+++ /dev/null
@@ -1,31 +0,0 @@
-# scripts
-category webextension-scripts bookmarks chrome://browser/content/ext-bookmarks.js
-category webextension-scripts browserAction chrome://browser/content/ext-browserAction.js
-category webextension-scripts commands chrome://browser/content/ext-commands.js
-category webextension-scripts contextMenus chrome://browser/content/ext-contextMenus.js
-category webextension-scripts desktop-runtime chrome://browser/content/ext-desktop-runtime.js
-category webextension-scripts history chrome://browser/content/ext-history.js
-category webextension-scripts omnibox chrome://browser/content/ext-omnibox.js
-category webextension-scripts pageAction chrome://browser/content/ext-pageAction.js
-category webextension-scripts sessions chrome://browser/content/ext-sessions.js
-category webextension-scripts tabs chrome://browser/content/ext-tabs.js
-category webextension-scripts utils chrome://browser/content/ext-utils.js
-category webextension-scripts windows chrome://browser/content/ext-windows.js
-
-# scripts that must run in the same process as addon code.
-category webextension-scripts-addon contextMenus chrome://browser/content/ext-c-contextMenus.js
-category webextension-scripts-addon omnibox chrome://browser/content/ext-c-omnibox.js
-category webextension-scripts-addon tabs chrome://browser/content/ext-c-tabs.js
-
-# schemas
-category webextension-schemas bookmarks chrome://browser/content/schemas/bookmarks.json
-category webextension-schemas browser_action chrome://browser/content/schemas/browser_action.json
-category webextension-schemas commands chrome://browser/content/schemas/commands.json
-category webextension-schemas context_menus chrome://browser/content/schemas/context_menus.json
-category webextension-schemas context_menus_internal chrome://browser/content/schemas/context_menus_internal.json
-category webextension-schemas history chrome://browser/content/schemas/history.json
-category webextension-schemas omnibox chrome://browser/content/schemas/omnibox.json
-category webextension-schemas page_action chrome://browser/content/schemas/page_action.json
-category webextension-schemas sessions chrome://browser/content/schemas/sessions.json
-category webextension-schemas tabs chrome://browser/content/schemas/tabs.json
-category webextension-schemas windows chrome://browser/content/schemas/windows.json
diff --git a/application/basilisk/components/webextensions/jar.mn b/application/basilisk/components/webextensions/jar.mn
deleted file mode 100644
index a7b506ec4..000000000
--- a/application/basilisk/components/webextensions/jar.mn
+++ /dev/null
@@ -1,29 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-browser.jar:
- content/browser/extension.css
-#ifdef XP_MACOSX
- content/browser/extension-mac.css
- content/browser/extension-mac-panel.css
-#endif
-#ifdef XP_WIN
- content/browser/extension-win-panel.css
-#endif
- content/browser/extension.svg
- content/browser/ext-bookmarks.js
- content/browser/ext-browserAction.js
- content/browser/ext-commands.js
- content/browser/ext-contextMenus.js
- content/browser/ext-desktop-runtime.js
- content/browser/ext-history.js
- content/browser/ext-omnibox.js
- content/browser/ext-pageAction.js
- content/browser/ext-sessions.js
- content/browser/ext-tabs.js
- content/browser/ext-utils.js
- content/browser/ext-windows.js
- content/browser/ext-c-contextMenus.js
- content/browser/ext-c-omnibox.js
- content/browser/ext-c-tabs.js
diff --git a/application/basilisk/components/webextensions/moz.build b/application/basilisk/components/webextensions/moz.build
deleted file mode 100644
index 116e90415..000000000
--- a/application/basilisk/components/webextensions/moz.build
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-JAR_MANIFESTS += ['jar.mn']
-
-EXTRA_COMPONENTS += [
- 'extensions-browser.manifest',
-]
-
-DIRS += ['schemas']
-
diff --git a/application/basilisk/components/webextensions/schemas/LICENSE b/application/basilisk/components/webextensions/schemas/LICENSE
deleted file mode 100644
index 9314092fd..000000000
--- a/application/basilisk/components/webextensions/schemas/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/application/basilisk/components/webextensions/schemas/bookmarks.json b/application/basilisk/components/webextensions/schemas/bookmarks.json
deleted file mode 100644
index fb74c633e..000000000
--- a/application/basilisk/components/webextensions/schemas/bookmarks.json
+++ /dev/null
@@ -1,568 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "Permission",
- "choices": [{
- "type": "string",
- "enum": [
- "bookmarks"
- ]
- }]
- }
- ]
- },
- {
- "namespace": "bookmarks",
- "description": "Use the <code>browser.bookmarks</code> API to create, organize, and otherwise manipulate bookmarks. Also see $(topic:override)[Override Pages], which you can use to create a custom Bookmark Manager page.",
- "permissions": ["bookmarks"],
- "types": [
- {
- "id": "BookmarkTreeNodeUnmodifiable",
- "type": "string",
- "enum": ["managed"],
- "description": "Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default)."
- },
- {
- "id": "BookmarkTreeNode",
- "type": "object",
- "description": "A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.",
- "properties": {
- "id": {
- "type": "string",
- "description": "The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted."
- },
- "parentId": {
- "type": "string",
- "optional": true,
- "description": "The <code>id</code> of the parent folder. Omitted for the root node."
- },
- "index": {
- "type": "integer",
- "optional": true,
- "description": "The 0-based position of this node within its parent folder."
- },
- "url": {
- "type": "string",
- "optional": true,
- "description": "The URL navigated to when a user clicks the bookmark. Omitted for folders."
- },
- "title": {
- "type": "string",
- "description": "The text displayed for the node."
- },
- "dateAdded": {
- "type": "number",
- "optional": true,
- "description": "When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>)."
- },
- "dateGroupModified": {
- "type": "number",
- "optional": true,
- "description": "When the contents of this folder last changed, in milliseconds since the epoch."
- },
- "unmodifiable": {
- "$ref": "BookmarkTreeNodeUnmodifiable",
- "optional": true,
- "description": "Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default)."
- },
- "children": {
- "type": "array",
- "optional": true,
- "items": { "$ref": "BookmarkTreeNode" },
- "description": "An ordered list of children of this node."
- }
- }
- },
- {
- "id": "CreateDetails",
- "description": "Object passed to the create() function.",
- "type": "object",
- "properties": {
- "parentId": {
- "type": "string",
- "optional": true,
- "description": "Defaults to the Other Bookmarks folder."
- },
- "index": {
- "type": "integer",
- "minimum": 0,
- "optional": true
- },
- "title": {
- "type": "string",
- "optional": true
- },
- "url": {
- "type": "string",
- "optional": true
- }
- }
- }
- ],
- "functions": [
- {
- "name": "get",
- "type": "function",
- "description": "Retrieves the specified BookmarkTreeNode(s).",
- "async": "callback",
- "parameters": [
- {
- "name": "idOrIdList",
- "description": "A single string-valued id, or an array of string-valued ids",
- "choices": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "type": "string"
- },
- "minItems": 1
- }
- ]
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": { "$ref": "BookmarkTreeNode" }
- }
- ]
- }
- ]
- },
- {
- "name": "getChildren",
- "type": "function",
- "description": "Retrieves the children of the specified BookmarkTreeNode id.",
- "async": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": { "$ref": "BookmarkTreeNode"}
- }
- ]
- }
- ]
- },
- {
- "name": "getRecent",
- "type": "function",
- "description": "Retrieves the recently added bookmarks.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "minimum": 1,
- "name": "numberOfItems",
- "description": "The maximum number of items to return."
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": { "$ref": "BookmarkTreeNode" }
- }
- ]
- }
- ]
- },
- {
- "name": "getTree",
- "type": "function",
- "description": "Retrieves the entire Bookmarks hierarchy.",
- "async": "callback",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": { "$ref": "BookmarkTreeNode" }
- }
- ]
- }
- ]
- },
- {
- "name": "getSubTree",
- "type": "function",
- "description": "Retrieves part of the Bookmarks hierarchy, starting at the specified node.",
- "async": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "id",
- "description": "The ID of the root of the subtree to retrieve."
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": { "$ref": "BookmarkTreeNode" }
- }
- ]
- }
- ]
- },
- {
- "name": "search",
- "type": "function",
- "description": "Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.",
- "async": "callback",
- "parameters": [
- {
- "name": "query",
- "description": "Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or an object. If an object, the properties <code>query</code>, <code>url</code>, and <code>title</code> may be specified and bookmarks matching all specified properties will be produced.",
- "choices": [
- {
- "type": "string",
- "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
- },
- {
- "type": "object",
- "description": "An object specifying properties and values to match when searching. Produces bookmarks matching all properties.",
- "properties": {
- "query": {
- "type": "string",
- "optional": true,
- "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
- },
- "url": {
- "type": "string",
- "format": "url",
- "optional": true,
- "description": "The URL of the bookmark; matches verbatim. Note that folders have no URL."
- },
- "title": {
- "type": "string",
- "optional": true,
- "description": "The title of the bookmark; matches verbatim."
- }
- }
- }
- ]
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": { "$ref": "BookmarkTreeNode" }
- }
- ]
- }
- ]
- },
- {
- "name": "create",
- "type": "function",
- "description": "Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.",
- "async": "callback",
- "parameters": [
- {
- "$ref": "CreateDetails",
- "name": "bookmark"
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "result",
- "$ref": "BookmarkTreeNode"
- }
- ]
- }
- ]
- },
- {
- "name": "move",
- "type": "function",
- "description": "Moves the specified BookmarkTreeNode to the provided location.",
- "async": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "object",
- "name": "destination",
- "properties": {
- "parentId": {
- "type": "string",
- "optional": true
- },
- "index": {
- "type": "integer",
- "minimum": 0,
- "optional": true
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "result",
- "$ref": "BookmarkTreeNode"
- }
- ]
- }
- ]
- },
- {
- "name": "update",
- "type": "function",
- "description": "Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.",
- "async": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "object",
- "name": "changes",
- "properties": {
- "title": {
- "type": "string",
- "optional": true
- },
- "url": {
- "type": "string",
- "optional": true
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "result",
- "$ref": "BookmarkTreeNode"
- }
- ]
- }
- ]
- },
- {
- "name": "remove",
- "type": "function",
- "description": "Removes a bookmark or an empty bookmark folder.",
- "async": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "removeTree",
- "type": "function",
- "description": "Recursively removes a bookmark folder.",
- "async": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "import",
- "unsupported": true,
- "type": "function",
- "description": "Imports bookmarks from an html bookmark file",
- "async": "callback",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "export",
- "unsupported": true,
- "type": "function",
- "description": "Exports bookmarks to an html bookmark file",
- "async": "callback",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onCreated",
- "type": "function",
- "description": "Fired when a bookmark or folder is created.",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "$ref": "BookmarkTreeNode",
- "name": "bookmark"
- }
- ]
- },
- {
- "name": "onRemoved",
- "type": "function",
- "description": "Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "object",
- "name": "removeInfo",
- "properties": {
- "parentId": { "type": "string" },
- "index": { "type": "integer" },
- "node": { "$ref": "BookmarkTreeNode" }
- }
- }
- ]
- },
- {
- "name": "onChanged",
- "type": "function",
- "description": "Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "object",
- "name": "changeInfo",
- "properties": {
- "title": { "type": "string" },
- "url": {
- "type": "string",
- "optional": true
- }
- }
- }
- ]
- },
- {
- "name": "onMoved",
- "type": "function",
- "description": "Fired when a bookmark or folder is moved to a different parent folder.",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "object",
- "name": "moveInfo",
- "properties": {
- "parentId": { "type": "string" },
- "index": { "type": "integer" },
- "oldParentId": { "type": "string" },
- "oldIndex": { "type": "integer" }
- }
- }
- ]
- },
- {
- "name": "onChildrenReordered",
- "unsupported": true,
- "type": "function",
- "description": "Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move().",
- "parameters": [
- {
- "type": "string",
- "name": "id"
- },
- {
- "type": "object",
- "name": "reorderInfo",
- "properties": {
- "childIds": {
- "type": "array",
- "items": { "type": "string" }
- }
- }
- }
- ]
- },
- {
- "name": "onImportBegan",
- "unsupported": true,
- "type": "function",
- "description": "Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately.",
- "parameters": []
- },
- {
- "name": "onImportEnded",
- "unsupported": true,
- "type": "function",
- "description": "Fired when a bookmark import session is ended.",
- "parameters": []
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/browser_action.json b/application/basilisk/components/webextensions/schemas/browser_action.json
deleted file mode 100644
index 1a7da956a..000000000
--- a/application/basilisk/components/webextensions/schemas/browser_action.json
+++ /dev/null
@@ -1,430 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "WebExtensionManifest",
- "properties": {
- "browser_action": {
- "type": "object",
- "additionalProperties": { "$ref": "UnrecognizedProperty" },
- "properties": {
- "default_title": {
- "type": "string",
- "optional": true,
- "preprocess": "localize"
- },
- "default_icon": {
- "$ref": "IconPath",
- "optional": true
- },
- "default_popup": {
- "type": "string",
- "format": "relativeUrl",
- "optional": true,
- "preprocess": "localize"
- },
- "browser_style": {
- "type": "boolean",
- "optional": true
- }
- },
- "optional": true
- }
- }
- }
- ]
- },
- {
- "namespace": "browserAction",
- "description": "Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.",
- "permissions": ["manifest:browser_action"],
- "types": [
- {
- "id": "ColorArray",
- "type": "array",
- "items": {
- "type": "integer",
- "minimum": 0,
- "maximum": 255
- },
- "minItems": 4,
- "maxItems": 4
- },
- {
- "id": "ImageDataType",
- "type": "object",
- "isInstanceOf": "ImageData",
- "additionalProperties": { "type": "any" },
- "postprocess": "convertImageDataToURL",
- "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)."
- }
- ],
- "functions": [
- {
- "name": "setTitle",
- "type": "function",
- "description": "Sets the title of the browser action. This shows up in the tooltip.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "title": {
- "type": "string",
- "description": "The string the browser action should display when moused over."
- },
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "getTitle",
- "type": "function",
- "description": "Gets the title of the browser action.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Specify the tab to get the title from. If no tab is specified, the non-tab-specific title is returned."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "type": "string"
- }
- ]
- }
- ]
- },
- {
- "name": "setIcon",
- "type": "function",
- "description": "Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "imageData": {
- "choices": [
- { "$ref": "ImageDataType" },
- {
- "type": "object",
- "additionalProperties": {"$ref": "ImageDataType"}
- }
- ],
- "optional": true,
- "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'"
- },
- "path": {
- "choices": [
- { "type": "string" },
- {
- "type": "object",
- "additionalProperties": {"type": "string"}
- }
- ],
- "optional": true,
- "description": "Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'"
- },
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "setPopup",
- "type": "function",
- "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {
- "type": "integer",
- "optional": true,
- "minimum": 0,
- "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
- },
- "popup": {
- "type": "string",
- "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "getPopup",
- "type": "function",
- "description": "Gets the html document set as the popup for this browser action.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Specify the tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "type": "string"
- }
- ]
- }
- ]
- },
- {
- "name": "setBadgeText",
- "type": "function",
- "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "text": {
- "type": "string",
- "description": "Any number of characters can be passed, but only about four can fit in the space."
- },
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "getBadgeText",
- "type": "function",
- "description": "Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Specify the tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "type": "string"
- }
- ]
- }
- ]
- },
- {
- "name": "setBadgeBackgroundColor",
- "type": "function",
- "description": "Sets the background color for the badge.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "color": {
- "description": "An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value, with opaque red being <code>#FF0000</code> or <code>#F00</code>.",
- "choices": [
- {"type": "string"},
- {"$ref": "ColorArray"}
- ]
- },
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "getBadgeBackgroundColor",
- "type": "function",
- "description": "Gets the background color of the browser action.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {
- "type": "integer",
- "optional": true,
- "description": "Specify the tab to get the badge background color from. If no tab is specified, the non-tab-specific badge background color is returned."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "$ref": "ColorArray"
- }
- ]
- }
- ]
- },
- {
- "name": "enable",
- "type": "function",
- "description": "Enables the browser action for a tab. By default, browser actions are enabled.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "optional": true,
- "name": "tabId",
- "minimum": 0,
- "description": "The id of the tab for which you want to modify the browser action."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "disable",
- "type": "function",
- "description": "Disables the browser action for a tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "optional": true,
- "name": "tabId",
- "minimum": 0,
- "description": "The id of the tab for which you want to modify the browser action."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "openPopup",
- "type": "function",
- "description": "Opens the extension popup window in the active window but does not grant tab permissions.",
- "unsupported": true,
- "async": "callback",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "popupView",
- "type": "object",
- "optional": true,
- "description": "JavaScript 'window' object for the popup window if it was succesfully opened.",
- "additionalProperties": { "type": "any" }
- }
- ]
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onClicked",
- "type": "function",
- "description": "Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.",
- "parameters": [
- {
- "name": "tab",
- "$ref": "tabs.Tab"
- }
- ]
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/commands.json b/application/basilisk/components/webextensions/schemas/commands.json
deleted file mode 100644
index a1632088e..000000000
--- a/application/basilisk/components/webextensions/schemas/commands.json
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "id": "KeyName",
- "choices": [
- {
- "type": "string",
- "pattern": "^\\s*(Alt|Ctrl|Command|MacCtrl)\\s*\\+\\s*(Shift\\s*\\+\\s*)?([A-Z0-9]|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)\\s*$"
- },
- {
- "type": "string",
- "pattern": "^(MediaNextTrack|MediaPlayPause|MediaPrevTrack|MediaStop)$"
- }
- ]
- },
- {
- "$extend": "WebExtensionManifest",
- "properties": {
- "commands": {
- "type": "object",
- "optional": true,
- "additionalProperties": {
- "type": "object",
- "additionalProperties": { "$ref": "UnrecognizedProperty" },
- "properties": {
- "suggested_key": {
- "type": "object",
- "optional": true,
- "properties": {
- "default": {
- "$ref": "KeyName",
- "optional": true
- },
- "mac": {
- "$ref": "KeyName",
- "optional": true
- },
- "linux": {
- "$ref": "KeyName",
- "optional": true
- },
- "windows": {
- "$ref": "KeyName",
- "optional": true
- },
- "chromeos": {
- "type": "string",
- "optional": true
- },
- "android": {
- "type": "string",
- "optional": true
- },
- "ios": {
- "type": "string",
- "optional": true
- },
- "additionalProperties": {
- "type": "string",
- "deprecated": "Unknown platform name",
- "optional": true
- }
- }
- },
- "description": {
- "type": "string",
- "optional": true
- }
- }
- }
- }
- }
- }
- ]
- },
- {
- "namespace": "commands",
- "description": "Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the xtension.",
- "permissions": ["manifest:commands"],
- "types": [
- {
- "id": "Command",
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "optional": true,
- "description": "The name of the Extension Command"
- },
- "description": {
- "type": "string",
- "optional": true,
- "description": "The Extension Command description"
- },
- "shortcut": {
- "type": "string",
- "optional": true,
- "description": "The shortcut active for this command, or blank if not active."
- }
- }
- }
- ],
- "events": [
- {
- "name": "onCommand",
- "description": "Fired when a registered command is activated using a keyboard shortcut.",
- "type": "function",
- "parameters": [
- {
- "name": "command",
- "type": "string"
- }
- ]
- }
- ],
- "functions": [
- {
- "name": "getAll",
- "type": "function",
- "async": "callback",
- "description": "Returns all the registered extension commands for this extension and their shortcut (if active).",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "commands",
- "type": "array",
- "items": {
- "$ref": "Command"
- }
- }
- ],
- "description": "Called to return the registered commands."
- }
- ]
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/context_menus.json b/application/basilisk/components/webextensions/schemas/context_menus.json
deleted file mode 100644
index b31af51f3..000000000
--- a/application/basilisk/components/webextensions/schemas/context_menus.json
+++ /dev/null
@@ -1,424 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "Permission",
- "choices": [{
- "type": "string",
- "enum": [
- "contextMenus"
- ]
- }]
- }
- ]
- },
- {
- "namespace": "contextMenus",
- "description": "Use the <code>browser.contextMenus</code> API to add items to the browser's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.",
- "permissions": ["contextMenus"],
- "properties": {
- "ACTION_MENU_TOP_LEVEL_LIMIT": {
- "value": 6,
- "description": "The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored."
- }
- },
- "types": [
- {
- "id": "ContextType",
- "type": "string",
- "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher", "browser_action", "page_action"],
- "description": "The different contexts a menu can appear in. Specifying 'all' is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is only supported by apps and is used to add menu items to the context menu that appears when clicking on the app icon in the launcher/taskbar/dock/etc. Different platforms might put limitations on what is actually supported in a launcher context menu."
- },
- {
- "id": "ItemType",
- "type": "string",
- "enum": ["normal", "checkbox", "radio", "separator"],
- "description": "The type of menu item."
- },
- {
- "id": "OnClickData",
- "type": "object",
- "description": "Information sent when a context menu item is clicked.",
- "properties": {
- "menuItemId": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "description": "The ID of the menu item that was clicked."
- },
- "parentMenuItemId": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "optional": true,
- "description": "The parent ID, if any, for the item clicked."
- },
- "mediaType": {
- "type": "string",
- "optional": true,
- "description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements."
- },
- "linkUrl": {
- "type": "string",
- "optional": true,
- "description": "If the element is a link, the URL it points to."
- },
- "srcUrl": {
- "type": "string",
- "optional": true,
- "description": "Will be present for elements with a 'src' URL."
- },
- "pageUrl": {
- "type": "string",
- "optional": true,
- "description": "The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu."
- },
- "frameUrl": {
- "type": "string",
- "optional": true,
- "description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame."
- },
- "selectionText": {
- "type": "string",
- "optional": true,
- "description": "The text for the context selection, if any."
- },
- "editable": {
- "type": "boolean",
- "description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
- },
- "wasChecked": {
- "type": "boolean",
- "optional": true,
- "description": "A flag indicating the state of a checkbox or radio item before it was clicked."
- },
- "checked": {
- "type": "boolean",
- "optional": true,
- "description": "A flag indicating the state of a checkbox or radio item after it is clicked."
- }
- }
- }
- ],
- "functions": [
- {
- "name": "create",
- "type": "function",
- "description": "Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in $(ref:runtime.lastError)).",
- "returns": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "description": "The ID of the newly created item."
- },
- "parameters": [
- {
- "type": "object",
- "name": "createProperties",
- "properties": {
- "type": {
- "$ref": "ItemType",
- "optional": true,
- "description": "The type of menu item. Defaults to 'normal' if not specified."
- },
- "id": {
- "type": "string",
- "optional": true,
- "description": "The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension."
- },
- "title": {
- "type": "string",
- "optional": true,
- "description": "The text to be displayed in the item; this is <em>required</em> unless <code>type</code> is 'separator'. When the context is 'selection', you can use <code>%s</code> within the string to show the selected text. For example, if this parameter's value is \"Translate '%s' to Pig Latin\" and the user selects the word \"cool\", the context menu item for the selection is \"Translate 'cool' to Pig Latin\"."
- },
- "checked": {
- "type": "boolean",
- "optional": true,
- "description": "The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items."
- },
- "contexts": {
- "type": "array",
- "items": {
- "$ref": "ContextType"
- },
- "minItems": 1,
- "optional": true,
- "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
- },
- "onclick": {
- "type": "function",
- "optional": true,
- "description": "A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for $(ref:contextMenus.onClicked).",
- "parameters": [
- {
- "name": "info",
- "$ref": "contextMenusInternal.OnClickData",
- "description": "Information about the item clicked and the context where the click happened."
- },
- {
- "name": "tab",
- "$ref": "tabs.Tab",
- "description": "The details of the tab where the click took place. Note: this parameter only present for extensions."
- }
- ]
- },
- "parentId": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "optional": true,
- "description": "The ID of a parent menu item; this makes the item a child of a previously added item."
- },
- "documentUrlPatterns": {
- "type": "array",
- "items": {"type": "string"},
- "optional": true,
- "description": "Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see $(topic:match_patterns)[Match Patterns]."
- },
- "targetUrlPatterns": {
- "type": "array",
- "items": {"type": "string"},
- "optional": true,
- "description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags."
- },
- "enabled": {
- "type": "boolean",
- "optional": true,
- "description": "Whether this context menu item is enabled or disabled. Defaults to true."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "description": "Called when the item has been created in the browser. If there were any problems creating the item, details will be available in $(ref:runtime.lastError).",
- "parameters": []
- }
- ]
- },
- {
- "name": "createInternal",
- "type": "function",
- "allowedContexts": ["addon_parent_only"],
- "async": "callback",
- "description": "Identical to contextMenus.create, except: the 'id' field is required and allows an integer, 'onclick' is not allowed, and the method is async (and the return value is not a menu item ID).",
- "parameters": [
- {
- "type": "object",
- "name": "createProperties",
- "properties": {
- "type": {
- "$ref": "ItemType",
- "optional": true
- },
- "id": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ]
- },
- "title": {
- "type": "string",
- "optional": true
- },
- "checked": {
- "type": "boolean",
- "optional": true
- },
- "contexts": {
- "type": "array",
- "items": {
- "$ref": "ContextType"
- },
- "minItems": 1,
- "optional": true
- },
- "parentId": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "optional": true
- },
- "documentUrlPatterns": {
- "type": "array",
- "items": {"type": "string"},
- "optional": true
- },
- "targetUrlPatterns": {
- "type": "array",
- "items": {"type": "string"},
- "optional": true
- },
- "enabled": {
- "type": "boolean",
- "optional": true
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "update",
- "type": "function",
- "description": "Updates a previously created context menu item.",
- "async": "callback",
- "parameters": [
- {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "name": "id",
- "description": "The ID of the item to update."
- },
- {
- "type": "object",
- "name": "updateProperties",
- "description": "The properties to update. Accepts the same values as the create function.",
- "properties": {
- "type": {
- "$ref": "ItemType",
- "optional": true
- },
- "title": {
- "type": "string",
- "optional": true
- },
- "checked": {
- "type": "boolean",
- "optional": true
- },
- "contexts": {
- "type": "array",
- "items": {
- "$ref": "ContextType"
- },
- "minItems": 1,
- "optional": true
- },
- "onclick": {
- "type": "function",
- "optional": "omit-key-if-missing",
- "parameters": [
- {
- "name": "info",
- "$ref": "contextMenusInternal.OnClickData"
- },
- {
- "name": "tab",
- "$ref": "tabs.Tab",
- "description": "The details of the tab where the click took place. Note: this parameter only present for extensions."
- }
- ]
- },
- "parentId": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "optional": true,
- "description": "Note: You cannot change an item to be a child of one of its own descendants."
- },
- "documentUrlPatterns": {
- "type": "array",
- "items": {"type": "string"},
- "optional": true
- },
- "targetUrlPatterns": {
- "type": "array",
- "items": {"type": "string"},
- "optional": true
- },
- "enabled": {
- "type": "boolean",
- "optional": true
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [],
- "description": "Called when the context menu has been updated."
- }
- ]
- },
- {
- "name": "remove",
- "type": "function",
- "description": "Removes a context menu item.",
- "async": "callback",
- "parameters": [
- {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "name": "menuItemId",
- "description": "The ID of the context menu item to remove."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [],
- "description": "Called when the context menu has been removed."
- }
- ]
- },
- {
- "name": "removeAll",
- "type": "function",
- "description": "Removes all context menu items added by this extension.",
- "async": "callback",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [],
- "description": "Called when removal is complete."
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onClicked",
- "type": "function",
- "description": "Fired when a context menu item is clicked.",
- "parameters": [
- {
- "name": "info",
- "$ref": "OnClickData",
- "description": "Information about the item clicked and the context where the click happened."
- },
- {
- "name": "tab",
- "$ref": "tabs.Tab",
- "description": "The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing.",
- "optional": true
- }
- ]
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/context_menus_internal.json b/application/basilisk/components/webextensions/schemas/context_menus_internal.json
deleted file mode 100644
index c3cb7aff0..000000000
--- a/application/basilisk/components/webextensions/schemas/context_menus_internal.json
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "contextMenusInternal",
- "description": "Use the <code>browser.contextMenus</code> API to add items to the browser's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.",
- "types": [
- {
- "id": "OnClickData",
- "type": "object",
- "description": "Information sent when a context menu item is clicked.",
- "properties": {
- "menuItemId": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "description": "The ID of the menu item that was clicked."
- },
- "parentMenuItemId": {
- "choices": [
- { "type": "integer" },
- { "type": "string" }
- ],
- "optional": true,
- "description": "The parent ID, if any, for the item clicked."
- },
- "mediaType": {
- "type": "string",
- "optional": true,
- "description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements."
- },
- "linkUrl": {
- "type": "string",
- "optional": true,
- "description": "If the element is a link, the URL it points to."
- },
- "srcUrl": {
- "type": "string",
- "optional": true,
- "description": "Will be present for elements with a 'src' URL."
- },
- "pageUrl": {
- "type": "string",
- "optional": true,
- "description": "The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu."
- },
- "frameUrl": {
- "type": "string",
- "optional": true,
- "description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame."
- },
- "selectionText": {
- "type": "string",
- "optional": true,
- "description": "The text for the context selection, if any."
- },
- "editable": {
- "type": "boolean",
- "description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
- },
- "wasChecked": {
- "type": "boolean",
- "optional": true,
- "description": "A flag indicating the state of a checkbox or radio item before it was clicked."
- },
- "checked": {
- "type": "boolean",
- "optional": true,
- "description": "A flag indicating the state of a checkbox or radio item after it is clicked."
- }
- }
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/history.json b/application/basilisk/components/webextensions/schemas/history.json
deleted file mode 100644
index e05569e38..000000000
--- a/application/basilisk/components/webextensions/schemas/history.json
+++ /dev/null
@@ -1,316 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "Permission",
- "choices": [{
- "type": "string",
- "enum": [
- "history"
- ]
- }]
- }
- ]
- },
- {
- "namespace": "history",
- "description": "Use the <code>browser.history</code> API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see $(topic:override)[Override Pages].",
- "permissions": ["history"],
- "types": [
- {
- "id": "TransitionType",
- "type": "string",
- "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated"],
- "description": "The $(topic:transition-types)[transition type] for this visit from its referrer."
- },
- {
- "id": "HistoryItem",
- "type": "object",
- "description": "An object encapsulating one result of a history query.",
- "properties": {
- "id": {
- "type": "string",
- "description": "The unique identifier for the item."
- },
- "url": {
- "type": "string",
- "optional": true,
- "description": "The URL navigated to by a user."
- },
- "title": {
- "type": "string",
- "optional": true,
- "description": "The title of the page when it was last loaded."
- },
- "lastVisitTime": {
- "type": "number",
- "optional": true,
- "description": "When this page was last loaded, represented in milliseconds since the epoch."
- },
- "visitCount": {
- "type": "integer",
- "optional": true,
- "description": "The number of times the user has navigated to this page."
- },
- "typedCount": {
- "type": "integer",
- "optional": true,
- "description": "The number of times the user has navigated to this page by typing in the address."
- }
- }
- },
- {
- "id": "VisitItem",
- "type": "object",
- "description": "An object encapsulating one visit to a URL.",
- "properties": {
- "id": {
- "type": "string",
- "description": "The unique identifier for the item."
- },
- "visitId": {
- "type": "string",
- "description": "The unique identifier for this visit."
- },
- "visitTime": {
- "type": "number",
- "optional": true,
- "description": "When this visit occurred, represented in milliseconds since the epoch."
- },
- "referringVisitId": {
- "type": "string",
- "description": "The visit ID of the referrer."
- },
- "transition": {
- "$ref": "TransitionType",
- "description": "The $(topic:transition-types)[transition type] for this visit from its referrer."
- }
- }
- }
- ],
- "functions": [
- {
- "name": "search",
- "type": "function",
- "description": "Searches the history for the last visit time of each page matching the query.",
- "async": "callback",
- "parameters": [
- {
- "name": "query",
- "type": "object",
- "properties": {
- "text": {
- "type": "string",
- "description": "A free-text query to the history service. Leave empty to retrieve all pages."
- },
- "startTime": {
- "$ref": "extensionTypes.Date",
- "optional": true,
- "description": "Limit results to those visited after this date. If not specified, this defaults to 24 hours in the past."
- },
- "endTime": {
- "$ref": "extensionTypes.Date",
- "optional": true,
- "description": "Limit results to those visited before this date."
- },
- "maxResults": {
- "type": "integer",
- "optional": true,
- "minimum": 1,
- "description": "The maximum number of results to retrieve. Defaults to 100."
- }
- }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": {
- "$ref": "HistoryItem"
- }
- }
- ]
- }
- ]
- },
- {
- "name": "getVisits",
- "type": "function",
- "description": "Retrieves information about visits to a URL.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "description": "The URL for which to retrieve visit information. It must be in the format as returned from a call to history.search."
- }
- }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": {
- "$ref": "VisitItem"
- }
- }
- ]
- }
- ]
- },
- {
- "name": "addUrl",
- "type": "function",
- "description": "Adds a URL to the history with a default visitTime of the current time and a default $(topic:transition-types)[transition type] of \"link\".",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "description": "The URL to add. Must be a valid URL that can be added to history."
- },
- "title": {
- "type": "string",
- "optional": true,
- "description": "The title of the page."
- },
- "transition": {
- "$ref": "TransitionType",
- "optional": true,
- "description": "The $(topic:transition-types)[transition type] for this visit from its referrer."
- },
- "visitTime": {
- "$ref": "extensionTypes.Date",
- "optional": true,
- "description": "The date when this visit occurred."
- }
- }
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "deleteUrl",
- "type": "function",
- "description": "Removes all occurrences of the given URL from the history.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "description": "The URL to remove."
- }
- }
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "deleteRange",
- "type": "function",
- "description": "Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.",
- "async": "callback",
- "parameters": [
- {
- "name": "range",
- "type": "object",
- "properties": {
- "startTime": {
- "$ref": "extensionTypes.Date",
- "description": "Items added to history after this date."
- },
- "endTime": {
- "$ref": "extensionTypes.Date",
- "description": "Items added to history before this date."
- }
- }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- },
- {
- "name": "deleteAll",
- "type": "function",
- "description": "Deletes all items from the history.",
- "async": "callback",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onVisited",
- "type": "function",
- "description": "Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded.",
- "parameters": [
- {
- "name": "result",
- "$ref": "HistoryItem"
- }
- ]
- },
- {
- "name": "onVisitRemoved",
- "type": "function",
- "description": "Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history.",
- "parameters": [
- {
- "name": "removed",
- "type": "object",
- "properties": {
- "allHistory": {
- "type": "boolean",
- "description": "True if all history was removed. If true, then urls will be empty."
- },
- "urls": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- ]
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/jar.mn b/application/basilisk/components/webextensions/schemas/jar.mn
deleted file mode 100644
index c9fc9a808..000000000
--- a/application/basilisk/components/webextensions/schemas/jar.mn
+++ /dev/null
@@ -1,16 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-browser.jar:
- content/browser/schemas/bookmarks.json
- content/browser/schemas/browser_action.json
- content/browser/schemas/commands.json
- content/browser/schemas/context_menus.json
- content/browser/schemas/context_menus_internal.json
- content/browser/schemas/history.json
- content/browser/schemas/omnibox.json
- content/browser/schemas/page_action.json
- content/browser/schemas/sessions.json
- content/browser/schemas/tabs.json
- content/browser/schemas/windows.json
diff --git a/application/basilisk/components/webextensions/schemas/omnibox.json b/application/basilisk/components/webextensions/schemas/omnibox.json
deleted file mode 100644
index 34428fab7..000000000
--- a/application/basilisk/components/webextensions/schemas/omnibox.json
+++ /dev/null
@@ -1,248 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "WebExtensionManifest",
- "properties": {
- "omnibox": {
- "type": "object",
- "additionalProperties": { "$ref": "UnrecognizedProperty" },
- "properties": {
- "keyword": {
- "type": "string",
- "pattern": "^[^?\\s:]([^\\s:]*[^/\\s:])?$"
- }
- },
- "optional": true
- }
- }
- }
- ]
- },
- {
- "namespace": "omnibox",
- "description": "The omnibox API allows you to register a keyword with Firefox's address bar.",
- "permissions": ["manifest:omnibox"],
- "types": [
- {
- "id": "DescriptionStyleType",
- "type": "string",
- "description": "The style type.",
- "enum": ["url", "match", "dim"]
- },
- {
- "id": "OnInputEnteredDisposition",
- "type": "string",
- "enum": ["currentTab", "newForegroundTab", "newBackgroundTab"],
- "description": "The window disposition for the omnibox query. This is the recommended context to display results. For example, if the omnibox command is to navigate to a certain URL, a disposition of 'newForegroundTab' means the navigation should take place in a new selected tab."
- },
- {
- "id": "SuggestResult",
- "type": "object",
- "description": "A suggest result.",
- "properties": {
- "content": {
- "type": "string",
- "minLength": 1,
- "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry."
- },
- "description": {
- "type": "string",
- "minLength": 1,
- "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>. You must escape the five predefined entities to display them as text: stackoverflow.com/a/1091953/89484 "
- },
- "descriptionStyles": {
- "optional": true,
- "unsupported": true,
- "type": "array",
- "description": "An array of style ranges for the description, as provided by the extension.",
- "items": {
- "type": "object",
- "description": "The style ranges for the description, as provided by the extension.",
- "properties": {
- "offset": { "type": "integer" },
- "type": { "description": "The style type", "$ref": "DescriptionStyleType"},
- "length": { "type": "integer", "optional": true }
- }
- }
- },
- "descriptionStylesRaw": {
- "optional": true,
- "unsupported": true,
- "type": "array",
- "description": "An array of style ranges for the description, as provided by ToValue().",
- "items": {
- "type": "object",
- "description": "The style ranges for the description, as provided by ToValue().",
- "properties": {
- "offset": { "type": "integer" },
- "type": { "type": "integer" }
- }
- }
- }
- }
- },
- {
- "id": "DefaultSuggestResult",
- "type": "object",
- "description": "A suggest result.",
- "properties": {
- "description": {
- "type": "string",
- "minLength": 1,
- "description": "The text that is displayed in the URL dropdown."
- },
- "descriptionStyles": {
- "optional": true,
- "unsupported": true,
- "type": "array",
- "description": "An array of style ranges for the description, as provided by the extension.",
- "items": {
- "type": "object",
- "description": "The style ranges for the description, as provided by the extension.",
- "properties": {
- "offset": { "type": "integer" },
- "type": { "description": "The style type", "$ref": "DescriptionStyleType"},
- "length": { "type": "integer", "optional": true }
- }
- }
- },
- "descriptionStylesRaw": {
- "optional": true,
- "unsupported": true,
- "type": "array",
- "description": "An array of style ranges for the description, as provided by ToValue().",
- "items": {
- "type": "object",
- "description": "The style ranges for the description, as provided by ToValue().",
- "properties": {
- "offset": { "type": "integer" },
- "type": { "type": "integer" }
- }
- }
- }
- }
- }
- ],
- "functions": [
- {
- "name": "setDefaultSuggestion",
- "type": "function",
- "description": "Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.",
- "parameters": [
- {
- "name": "suggestion",
- "$ref": "DefaultSuggestResult",
- "description": "A partial SuggestResult object, without the 'content' parameter."
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onInputStarted",
- "type": "function",
- "description": "User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events.",
- "parameters": []
- },
- {
- "name": "onInputChanged",
- "type": "function",
- "description": "User has changed what is typed into the omnibox.",
- "parameters": [
- {
- "type": "string",
- "name": "text"
- },
- {
- "name": "suggest",
- "type": "function",
- "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
- "parameters": [
- {
- "name": "suggestResults",
- "type": "array",
- "description": "Array of suggest results",
- "items": {
- "$ref": "SuggestResult"
- }
- }
- ]
- }
- ]
- },
- {
- "name": "onInputEntered",
- "type": "function",
- "description": "User has accepted what is typed into the omnibox.",
- "parameters": [
- {
- "type": "string",
- "name": "text"
- },
- {
- "name": "disposition",
- "$ref": "OnInputEnteredDisposition"
- }
- ]
- },
- {
- "name": "onInputCancelled",
- "type": "function",
- "description": "User has ended the keyword input session without accepting the input.",
- "parameters": []
- }
- ]
- },
- {
- "namespace": "omnibox_internal",
- "description": "The internal namespace used by the omnibox API.",
- "defaultContexts": ["addon_parent_only"],
- "functions": [
- {
- "name": "addSuggestions",
- "type": "function",
- "async": "callback",
- "description": "Internal function used by omnibox.onInputChanged for adding search suggestions",
- "parameters": [
- {
- "name": "id",
- "type": "integer",
- "description": "The ID of the callback received by onInputChangedInternal"
- },
- {
- "name": "suggestResults",
- "type": "array",
- "description": "Array of suggest results",
- "items": {
- "$ref": "omnibox.SuggestResult"
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onInputChanged",
- "type": "function",
- "description": "Identical to omnibox.onInputChanged except no 'suggest' callback is provided.",
- "parameters": [
- {
- "type": "string",
- "name": "text"
- }
- ]
- }
- ]
- }
-] \ No newline at end of file
diff --git a/application/basilisk/components/webextensions/schemas/page_action.json b/application/basilisk/components/webextensions/schemas/page_action.json
deleted file mode 100644
index 126378ca5..000000000
--- a/application/basilisk/components/webextensions/schemas/page_action.json
+++ /dev/null
@@ -1,235 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "WebExtensionManifest",
- "properties": {
- "page_action": {
- "type": "object",
- "additionalProperties": { "$ref": "UnrecognizedProperty" },
- "properties": {
- "default_title": {
- "type": "string",
- "optional": true,
- "preprocess": "localize"
- },
- "default_icon": {
- "$ref": "IconPath",
- "optional": true
- },
- "default_popup": {
- "type": "string",
- "format": "relativeUrl",
- "optional": true,
- "preprocess": "localize"
- },
- "browser_style": {
- "type": "boolean",
- "optional": true
- }
- },
- "optional": true
- }
- }
- }
- ]
- },
- {
- "namespace": "pageAction",
- "description": "Use the <code>browser.pageAction</code> API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.",
- "permissions": ["manifest:page_action"],
- "types": [
- {
- "id": "ImageDataType",
- "type": "object",
- "isInstanceOf": "ImageData",
- "additionalProperties": { "type": "any" },
- "postprocess": "convertImageDataToURL",
- "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)."
- }
- ],
- "functions": [
- {
- "name": "show",
- "type": "function",
- "async": "callback",
- "description": "Shows the page action. The page action is shown whenever the tab is selected.",
- "parameters": [
- {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "hide",
- "type": "function",
- "async": "callback",
- "description": "Hides the page action.",
- "parameters": [
- {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "setTitle",
- "type": "function",
- "description": "Sets the title of the page action. This is displayed in a tooltip over the page action.",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
- "title": {"type": "string", "description": "The tooltip string."}
- }
- }
- ]
- },
- {
- "name": "getTitle",
- "type": "function",
- "description": "Gets the title of the page action.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {
- "type": "integer",
- "description": "Specify the tab to get the title from."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "type": "string"
- }
- ]
- }
- ]
- },
- {
- "name": "setIcon",
- "type": "function",
- "description": "Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
- "imageData": {
- "choices": [
- { "$ref": "ImageDataType" },
- {
- "type": "object",
- "additionalProperties": {"$ref": "ImageDataType"}
- }
- ],
- "optional": true,
- "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'"
- },
- "path": {
- "choices": [
- { "type": "string" },
- {
- "type": "object",
- "additionalProperties": {"type": "string"}
- }
- ],
- "optional": true,
- "description": "Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'"
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "setPopup",
- "type": "function",
- "async": true,
- "description": "Sets the html document to be opened as a popup when the user clicks on the page action's icon.",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
- "popup": {
- "type": "string",
- "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
- }
- }
- }
- ]
- },
- {
- "name": "getPopup",
- "type": "function",
- "description": "Gets the html document set as the popup for this page action.",
- "async": "callback",
- "parameters": [
- {
- "name": "details",
- "type": "object",
- "properties": {
- "tabId": {
- "type": "integer",
- "description": "Specify the tab to get the popup from."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "type": "string"
- }
- ]
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onClicked",
- "type": "function",
- "description": "Fired when a page action icon is clicked. This event will not fire if the page action has a popup.",
- "parameters": [
- {
- "name": "tab",
- "$ref": "tabs.Tab"
- }
- ]
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/sessions.json b/application/basilisk/components/webextensions/schemas/sessions.json
deleted file mode 100644
index 690bb8ebc..000000000
--- a/application/basilisk/components/webextensions/schemas/sessions.json
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "Permission",
- "choices": [{
- "type": "string",
- "enum": [
- "sessions"
- ]
- }]
- }
- ]
- },
- {
- "namespace": "sessions",
- "description": "Use the <code>chrome.sessions</code> API to query and restore tabs and windows from a browsing session.",
- "permissions": ["sessions"],
- "types": [
- {
- "id": "Filter",
- "type": "object",
- "properties": {
- "maxResults": {
- "type": "integer",
- "minimum": 0,
- "maximum": 25,
- "optional": true,
- "description": "The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ($(ref:sessions.MAX_SESSION_RESULTS))."
- }
- }
- },
- {
- "id": "Session",
- "type": "object",
- "properties": {
- "lastModified": {"type": "integer", "description": "The time when the window or tab was closed or modified, represented in milliseconds since the epoch."},
- "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(ref:tabs.Tab), if this entry describes a tab. Either this or $(ref:sessions.Session.window) will be set."},
- "window": {"$ref": "windows.Window", "optional": true, "description": "The $(ref:windows.Window), if this entry describes a window. Either this or $(ref:sessions.Session.tab) will be set."}
- }
- },
- {
- "id": "Device",
- "type": "object",
- "properties": {
- "info": {"type": "string"},
- "deviceName": {"type": "string", "description": "The name of the foreign device."},
- "sessions": {"type": "array", "items": {"$ref": "Session"}, "description": "A list of open window sessions for the foreign device, sorted from most recently to least recently modified session."}
- }
- }
- ],
- "functions": [
- {
- "name": "getRecentlyClosed",
- "type": "function",
- "description": "Gets the list of recently closed tabs and/or windows.",
- "async": "callback",
- "parameters": [
- {
- "$ref": "Filter",
- "name": "filter",
- "optional": true,
- "default": {}
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "sessions", "type": "array", "items": { "$ref": "Session" }, "description": "The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index <code>0</code>). The entries may contain either tabs or windows."
- }
- ]
- }
- ]
- },
- {
- "name": "getDevices",
- "unsupported": true,
- "type": "function",
- "description": "Retrieves all devices with synced sessions.",
- "async": "callback",
- "parameters": [
- {
- "$ref": "Filter",
- "name": "filter",
- "optional": true
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $(ref:sessions.Device) objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. $(ref:tabs.Tab) objects are sorted by recency in the $(ref:windows.Window) of the $(ref:sessions.Session) objects."
- }
- ]
- }
- ]
- },
- {
- "name": "restore",
- "type": "function",
- "description": "Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored.",
- "async": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "sessionId",
- "optional": true,
- "description": "The $(ref:windows.Window.sessionId), or $(ref:tabs.Tab.sessionId) to restore. If this parameter is not specified, the most recently closed session is restored."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "$ref": "Session",
- "name": "restoredSession",
- "description": "A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or $(ref:tabs.Tab) object."
- }
- ]
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onChanged",
- "unsupported": true,
- "description": "Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes.",
- "type": "function"
- }
- ],
- "properties": {
- "MAX_SESSION_RESULTS": {
- "value": 25,
- "description": "The maximum number of $(ref:sessions.Session) that will be included in a requested list."
- }
- }
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/tabs.json b/application/basilisk/components/webextensions/schemas/tabs.json
deleted file mode 100644
index 23ce33a4b..000000000
--- a/application/basilisk/components/webextensions/schemas/tabs.json
+++ /dev/null
@@ -1,1295 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "manifest",
- "types": [
- {
- "$extend": "Permission",
- "choices": [{
- "type": "string",
- "enum": [
- "activeTab",
- "tabs"
- ]
- }]
- }
- ]
- },
- {
- "namespace": "tabs",
- "description": "Use the <code>browser.tabs</code> API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.",
- "types": [
- { "id": "MutedInfoReason",
- "type": "string",
- "description": "An event that caused a muted state change.",
- "enum": [
- {"name": "user", "description": "A user input action has set/overridden the muted state."},
- {"name": "capture", "description": "Tab capture started, forcing a muted state change."},
- {"name": "extension", "description": "An extension, identified by the extensionId field, set the muted state."}
- ]
- },
- {
- "id": "MutedInfo",
- "type": "object",
- "description": "Tab muted state and the reason for the last state change.",
- "properties": {
- "muted": {
- "type": "boolean",
- "description": "Whether the tab is prevented from playing sound (but hasn't necessarily recently produced sound). Equivalent to whether the muted audio indicator is showing."
- },
- "reason": {
- "$ref": "MutedInfoReason",
- "optional": true,
- "description": "The reason the tab was muted or unmuted. Not set if the tab's mute state has never been changed."
- },
- "extensionId": {
- "type": "string",
- "optional": true,
- "description": "The ID of the extension that changed the muted state. Not set if an extension was not the reason the muted state last changed."
- }
- }
- },
- {
- "id": "Tab",
- "type": "object",
- "properties": {
- "id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to $(ref:tabs.TAB_ID_NONE) for apps and devtools windows."},
- "index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."},
- "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."},
- "openerTabId": {"unsupported": true, "type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."},
- "selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted).", "unsupported": true},
- "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."},
- "active": {"type": "boolean", "description": "Whether the tab is active in its window. (Does not necessarily mean the window is focused.)"},
- "pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
- "audible": {"type": "boolean", "optional": true, "description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing."},
- "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "Current tab muted state and the reason for the last state change."},
- "url": {"type": "string", "optional": true, "permissions": ["tabs"], "description": "The URL the tab is displaying. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."},
- "title": {"type": "string", "optional": true, "permissions": ["tabs"], "description": "The title of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."},
- "favIconUrl": {"type": "string", "optional": true, "permissions": ["tabs"], "description": "The URL of the tab's favicon. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission. It may also be an empty string if the tab is loading."},
- "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."},
- "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."},
- "width": {"type": "integer", "optional": true, "description": "The width of the tab in pixels."},
- "height": {"type": "integer", "optional": true, "description": "The height of the tab in pixels."},
- "sessionId": {"unsupported": true, "type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API."},
- "cookieStoreId": {"type": "string", "description": "The CookieStoreId used for the tab."}
- }
- },
- {
- "id": "ZoomSettingsMode",
- "type": "string",
- "description": "Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.",
- "enum": [
- {
- "name": "automatic",
- "description": "Zoom changes are handled automatically by the browser."
- },
- {
- "name": "manual",
- "description": "Overrides the automatic handling of zoom changes. The <code>onZoomChange</code> event will still be dispatched, and it is the responsibility of the extension to listen for this event and manually scale the page. This mode does not support <code>per-origin</code> zooming, and will thus ignore the <code>scope</code> zoom setting and assume <code>per-tab</code>."
- },
- {
- "name": "disabled",
- "description": "Disables all zooming in the tab. The tab will revert to the default zoom level, and all attempted zoom changes will be ignored."
- }
- ]
- },
- {
- "id": "ZoomSettingsScope",
- "type": "string",
- "description": "Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.",
- "enum": [
- {
- "name": "per-origin",
- "description": "Zoom changes will persist in the zoomed page's origin, i.e. all other tabs navigated to that same origin will be zoomed as well. Moreover, <code>per-origin</code> zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. The <code>per-origin</code> scope is only available in the <code>automatic</code> mode."
- },
- {
- "name": "per-tab",
- "description": "Zoom changes only take effect in this tab, and zoom changes in other tabs will not affect the zooming of this tab. Also, <code>per-tab</code> zoom changes are reset on navigation; navigating a tab will always load pages with their <code>per-origin</code> zoom factors."
- }
- ]
- },
- {
- "id": "ZoomSettings",
- "type": "object",
- "description": "Defines how zoom changes in a tab are handled and at what scope.",
- "properties": {
- "mode": {
- "$ref": "ZoomSettingsMode",
- "description": "Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.",
- "optional": true
- },
- "scope": {
- "$ref": "ZoomSettingsScope",
- "description": "Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.",
- "optional": true
- },
- "defaultZoomFactor": {
- "type": "number",
- "optional": true,
- "description": "Used to return the default zoom level for the current tab in calls to tabs.getZoomSettings."
- }
- }
- },
- {
- "id": "TabStatus",
- "type": "string",
- "enum": ["loading", "complete"],
- "description": "Whether the tabs have completed loading."
- },
- {
- "id": "WindowType",
- "type": "string",
- "enum": ["normal", "popup", "panel", "app", "devtools"],
- "description": "The type of window."
- }
- ],
- "properties": {
- "TAB_ID_NONE": {
- "value": -1,
- "description": "An ID which represents the absence of a browser tab."
- }
- },
- "functions": [
- {
- "name": "get",
- "type": "function",
- "description": "Retrieves details about the specified tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {"name": "tab", "$ref": "Tab"}
- ]
- }
- ]
- },
- {
- "name": "getCurrent",
- "type": "function",
- "description": "Gets the tab that this script call is being made from. May be undefined if called from a non-tab context (for example: a background page or popup view).",
- "async": "callback",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "tab",
- "$ref": "Tab",
- "optional": true
- }
- ]
- }
- ]
- },
- {
- "name": "connect",
- "type": "function",
- "description": "Connects to the content script(s) in the specified tab. The $(ref:runtime.onConnect) event is fired in each content script running in the specified tab for the current extension. For more details, see $(topic:messaging)[Content Script Messaging].",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0
- },
- {
- "type": "object",
- "name": "connectInfo",
- "properties": {
- "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connection event." },
- "frameId": {
- "type": "integer",
- "optional": true,
- "minimum": 0,
- "description": "Open a port to a specific $(topic:frame_ids)[frame] identified by <code>frameId</code> instead of all frames in the tab."
- }
- },
- "optional": true
- }
- ],
- "returns": {
- "$ref": "runtime.Port",
- "description": "A port that can be used to communicate with the content scripts running in the specified tab. The port's $(ref:runtime.Port) event is fired if the tab closes or does not exist. "
- }
- },
- {
- "name": "sendRequest",
- "deprecated": "Please use $(ref:runtime.sendMessage).",
- "unsupported": true,
- "type": "function",
- "description": "Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $(ref:extension.onRequest) event is fired in each content script running in the specified tab for the current extension.",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0
- },
- {
- "type": "any",
- "name": "request"
- },
- {
- "type": "function",
- "name": "responseCallback",
- "optional": true,
- "parameters": [
- {
- "name": "response",
- "type": "any",
- "description": "The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
- }
- ]
- }
- ]
- },
- {
- "name": "sendMessage",
- "type": "function",
- "description": "Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $(ref:runtime.onMessage) event is fired in each content script running in the specified tab for the current extension.",
- "async": "responseCallback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0
- },
- {
- "type": "any",
- "name": "message"
- },
- {
- "type": "object",
- "name": "options",
- "properties": {
- "frameId": {
- "type": "integer",
- "optional": true,
- "minimum": 0,
- "description": "Send a message to a specific $(topic:frame_ids)[frame] identified by <code>frameId</code> instead of all frames in the tab."
- }
- },
- "optional": true
- },
- {
- "type": "function",
- "name": "responseCallback",
- "optional": true,
- "parameters": [
- {
- "name": "response",
- "type": "any",
- "description": "The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
- }
- ]
- }
- ]
- },
- {
- "name": "getSelected",
- "deprecated": "Please use $(ref:tabs.query) <code>{active: true}</code>.",
- "unsupported": true,
- "type": "function",
- "description": "Gets the tab that is selected in the specified window.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": -2,
- "optional": true,
- "description": "Defaults to the $(topic:current-window)[current window]."
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {"name": "tab", "$ref": "Tab"}
- ]
- }
- ]
- },
- {
- "name": "getAllInWindow",
- "deprecated": "Please use $(ref:tabs.query) <code>{windowId: windowId}</code>.",
- "unsupported": true,
- "type": "function",
- "description": "Gets details about all tabs in the specified window.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": -2,
- "optional": true,
- "description": "Defaults to the $(topic:current-window)[current window]."
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {"name": "tabs", "type": "array", "items": { "$ref": "Tab" } }
- ]
- }
- ]
- },
- {
- "name": "create",
- "type": "function",
- "description": "Creates a new tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "object",
- "name": "createProperties",
- "properties": {
- "windowId": {
- "type": "integer",
- "minimum": -2,
- "optional": true,
- "description": "The window to create the new tab in. Defaults to the $(topic:current-window)[current window]."
- },
- "index": {
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The position the tab should take in the window. The provided value will be clamped to between zero and the number of tabs in the window."
- },
- "url": {
- "type": "string",
- "optional": true,
- "description": "The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page."
- },
- "active": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see $(ref:windows.update)). Defaults to <var>true</var>."
- },
- "selected": {
- "deprecated": "Please use <em>active</em>.",
- "unsupported": true,
- "type": "boolean",
- "optional": true,
- "description": "Whether the tab should become the selected tab in the window. Defaults to <var>true</var>"
- },
- "pinned": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tab should be pinned. Defaults to <var>false</var>"
- },
- "openerTabId": {
- "unsupported": true,
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab."
- },
- "cookieStoreId": {
- "type": "string",
- "optional": true,
- "description": "The CookieStoreId for the tab that opened this tab."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "tab",
- "$ref": "Tab",
- "description": "Details about the created tab. Will contain the ID of the new tab."
- }
- ]
- }
- ]
- },
- {
- "name": "duplicate",
- "type": "function",
- "description": "Duplicates a tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "description": "The ID of the tab which is to be duplicated."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "tab",
- "optional": true,
- "description": "Details about the duplicated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested.",
- "$ref": "Tab"
- }
- ]
- }
- ]
- },
- {
- "name": "query",
- "type": "function",
- "description": "Gets all tabs that have the specified properties, or all tabs if no properties are specified.",
- "async": "callback",
- "parameters": [
- {
- "type": "object",
- "name": "queryInfo",
- "properties": {
- "active": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tabs are active in their windows."
- },
- "pinned": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tabs are pinned."
- },
- "audible": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tabs are audible."
- },
- "muted": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tabs are muted."
- },
- "highlighted": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tabs are highlighted."
- },
- "currentWindow": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tabs are in the $(topic:current-window)[current window]."
- },
- "lastFocusedWindow": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tabs are in the last focused window."
- },
- "status": {
- "$ref": "TabStatus",
- "optional": true,
- "description": "Whether the tabs have completed loading."
- },
- "title": {
- "type": "string",
- "optional": true,
- "description": "Match page titles against a pattern."
- },
- "url": {
- "choices": [
- {"type": "string"},
- {"type": "array", "items": {"type": "string"}}
- ],
- "optional": true,
- "description": "Match tabs against one or more $(topic:match_patterns)[URL patterns]. Note that fragment identifiers are not matched."
- },
- "windowId": {
- "type": "integer",
- "optional": true,
- "minimum": -2,
- "description": "The ID of the parent window, or $(ref:windows.WINDOW_ID_CURRENT) for the $(topic:current-window)[current window]."
- },
- "windowType": {
- "$ref": "WindowType",
- "optional": true,
- "description": "The type of window the tabs are in."
- },
- "index": {
- "type": "integer",
- "optional": true,
- "minimum": 0,
- "description": "The position of the tabs within their windows."
- },
- "cookieStoreId": {
- "type": "string",
- "optional": true,
- "description": "The CookieStoreId used for the tab."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "type": "array",
- "items": {
- "$ref": "Tab"
- }
- }
- ]
- }
- ]
- },
- {
- "name": "highlight",
- "type": "function",
- "description": "Highlights the given tabs.",
- "async": "callback",
- "parameters": [
- {
- "type": "object",
- "name": "highlightInfo",
- "properties": {
- "windowId": {
- "type": "integer",
- "optional": true,
- "description": "The window that contains the tabs.",
- "minimum": -2
- },
- "tabs": {
- "description": "One or more tab indices to highlight.",
- "choices": [
- {"type": "array", "items": {"type": "integer", "minimum": 0}},
- {"type": "integer"}
- ]
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "window",
- "$ref": "windows.Window",
- "description": "Contains details about the window whose tabs were highlighted."
- }
- ]
- }
- ]
- },
- {
- "name": "update",
- "type": "function",
- "description": "Modifies the properties of a tab. Properties that are not specified in <var>updateProperties</var> are not modified.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "Defaults to the selected tab of the $(topic:current-window)[current window]."
- },
- {
- "type": "object",
- "name": "updateProperties",
- "properties": {
- "url": {
- "type": "string",
- "optional": true,
- "description": "A URL to navigate the tab to."
- },
- "active": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tab should be active. Does not affect whether the window is focused (see $(ref:windows.update))."
- },
- "highlighted": {
- "unsupported": true,
- "type": "boolean",
- "optional": true,
- "description": "Adds or removes the tab from the current selection."
- },
- "selected": {
- "unsupported": true,
- "deprecated": "Please use <em>highlighted</em>.",
- "type": "boolean",
- "optional": true,
- "description": "Whether the tab should be selected."
- },
- "pinned": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tab should be pinned."
- },
- "muted": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the tab should be muted."
- },
- "openerTabId": {
- "unsupported": true,
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as this tab."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "tab",
- "$ref": "Tab",
- "optional": true,
- "description": "Details about the updated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested."
- }
- ]
- }
- ]
- },
- {
- "name": "move",
- "type": "function",
- "description": "Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === \"normal\") windows.",
- "async": "callback",
- "parameters": [
- {
- "name": "tabIds",
- "description": "The tab or list of tabs to move.",
- "choices": [
- {"type": "integer", "minimum": 0},
- {"type": "array", "items": {"type": "integer", "minimum": 0}}
- ]
- },
- {
- "type": "object",
- "name": "moveProperties",
- "properties": {
- "windowId": {
- "type": "integer",
- "minimum": -2,
- "optional": true,
- "description": "Defaults to the window the tab is currently in."
- },
- "index": {
- "type": "integer",
- "minimum": -1,
- "description": "The position to move the window to. -1 will place the tab at the end of the window."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "tabs",
- "description": "Details about the moved tabs.",
- "choices": [
- {"$ref": "Tab"},
- {"type": "array", "items": {"$ref": "Tab"}}
- ]
- }
- ]
- }
- ]
- },
- {
- "name": "reload",
- "type": "function",
- "description": "Reload a tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab to reload; defaults to the selected tab of the current window."
- },
- {
- "type": "object",
- "name": "reloadProperties",
- "optional": true,
- "properties": {
- "bypassCache": {
- "type": "boolean",
- "optional": true,
- "description": "Whether using any local cache. Default is false."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "remove",
- "type": "function",
- "description": "Closes one or more tabs.",
- "async": "callback",
- "parameters": [
- {
- "name": "tabIds",
- "description": "The tab or list of tabs to close.",
- "choices": [
- {"type": "integer", "minimum": 0},
- {"type": "array", "items": {"type": "integer", "minimum": 0}}
- ]
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "detectLanguage",
- "type": "function",
- "description": "Detects the primary language of the content in a tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "Defaults to the active tab of the $(topic:current-window)[current window]."
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "language",
- "description": "An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc'>kLanguageInfoTable</a>. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, <code>und</code> will be returned."
- }
- ]
- }
- ]
- },
- {
- "name": "captureVisibleTab",
- "type": "function",
- "description": "Captures the visible area of the currently active tab in the specified window. You must have $(topic:declare_permissions)[&lt;all_urls&gt;] permission to use this method.",
- "permissions": ["<all_urls>"],
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": -2,
- "optional": true,
- "description": "The target window. Defaults to the $(topic:current-window)[current window]."
- },
- {
- "$ref": "extensionTypes.ImageDetails",
- "name": "options",
- "optional": true
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "type": "string",
- "name": "dataUrl",
- "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."
- }
- ]
- }
- ]
- },
- {
- "name": "executeScript",
- "type": "function",
- "description": "Injects JavaScript code into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab in which to run the script; defaults to the active tab of the current window."
- },
- {
- "$ref": "extensionTypes.InjectDetails",
- "name": "details",
- "description": "Details of the script to run."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "description": "Called after all the JavaScript has been executed.",
- "parameters": [
- {
- "name": "result",
- "optional": true,
- "type": "array",
- "items": {"type": "any"},
- "description": "The result of the script in every injected frame."
- }
- ]
- }
- ]
- },
- {
- "name": "insertCSS",
- "type": "function",
- "description": "Injects CSS into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab in which to insert the CSS; defaults to the active tab of the current window."
- },
- {
- "$ref": "extensionTypes.InjectDetails",
- "name": "details",
- "description": "Details of the CSS text to insert."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "description": "Called when all the CSS has been inserted.",
- "parameters": []
- }
- ]
- },
- {
- "name": "removeCSS",
- "type": "function",
- "description": "Removes injected CSS from a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab from which to remove the injected CSS; defaults to the active tab of the current window."
- },
- {
- "$ref": "extensionTypes.InjectDetails",
- "name": "details",
- "description": "Details of the CSS text to remove."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "description": "Called when all the CSS has been removed.",
- "parameters": []
- }
- ]
- },
- {
- "name": "setZoom",
- "type": "function",
- "description": "Zooms a specified tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab to zoom; defaults to the active tab of the current window."
- },
- {
- "type": "number",
- "name": "zoomFactor",
- "description": "The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "description": "Called after the zoom factor has been changed.",
- "parameters": []
- }
- ]
- },
- {
- "name": "getZoom",
- "type": "function",
- "description": "Gets the current zoom factor of a specified tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "optional": true,
- "description": "The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window."
- },
- {
- "type": "function",
- "name": "callback",
- "description": "Called with the tab's current zoom factor after it has been fetched.",
- "parameters": [
- {
- "type": "number",
- "name": "zoomFactor",
- "description": "The tab's current zoom factor."
- }
- ]
- }
- ]
- },
- {
- "name": "setZoomSettings",
- "type": "function",
- "description": "Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "optional": true,
- "minimum": 0,
- "description": "The ID of the tab to change the zoom settings for; defaults to the active tab of the current window."
- },
- {
- "$ref": "ZoomSettings",
- "name": "zoomSettings",
- "description": "Defines how zoom changes are handled and at what scope."
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "description": "Called after the zoom settings have been changed.",
- "parameters": []
- }
- ]
- },
- {
- "name": "getZoomSettings",
- "type": "function",
- "description": "Gets the current zoom settings of a specified tab.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "optional": true,
- "minimum": 0,
- "description": "The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window."
- },
- {
- "type": "function",
- "name": "callback",
- "description": "Called with the tab's current zoom settings.",
- "parameters": [
- {
- "$ref": "ZoomSettings",
- "name": "zoomSettings",
- "description": "The tab's current zoom settings."
- }
- ]
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onCreated",
- "type": "function",
- "description": "Fired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.",
- "parameters": [
- {
- "$ref": "Tab",
- "name": "tab",
- "description": "Details of the tab that was created."
- }
- ]
- },
- {
- "name": "onUpdated",
- "type": "function",
- "description": "Fired when a tab is updated.",
- "parameters": [
- {"type": "integer", "name": "tabId", "minimum": 0},
- {
- "type": "object",
- "name": "changeInfo",
- "description": "Lists the changes to the state of the tab that was updated.",
- "properties": {
- "status": {
- "type": "string",
- "optional": true,
- "description": "The status of the tab. Can be either <em>loading</em> or <em>complete</em>."
- },
- "url": {
- "type": "string",
- "optional": true,
- "description": "The tab's URL if it has changed."
- },
- "pinned": {
- "type": "boolean",
- "optional": true,
- "description": "The tab's new pinned state."
- },
- "audible": {
- "type": "boolean",
- "optional": true,
- "description": "The tab's new audible state."
- },
- "mutedInfo": {
- "$ref": "MutedInfo",
- "optional": true,
- "description": "The tab's new muted state and the reason for the change."
- },
- "favIconUrl": {
- "type": "string",
- "optional": true,
- "description": "The tab's new favicon URL."
- }
- }
- },
- {
- "$ref": "Tab",
- "name": "tab",
- "description": "Gives the state of the tab that was updated."
- }
- ]
- },
- {
- "name": "onMoved",
- "type": "function",
- "description": "Fired when a tab is moved within a window. Only one move event is fired, representing the tab the user directly moved. Move events are not fired for the other tabs that must move in response. This event is not fired when a tab is moved between windows. For that, see $(ref:tabs.onDetached).",
- "parameters": [
- {"type": "integer", "name": "tabId", "minimum": 0},
- {
- "type": "object",
- "name": "moveInfo",
- "properties": {
- "windowId": {"type": "integer", "minimum": 0},
- "fromIndex": {"type": "integer", "minimum": 0},
- "toIndex": {"type": "integer", "minimum": 0}
- }
- }
- ]
- },
- {
- "name": "onSelectionChanged",
- "deprecated": "Please use $(ref:tabs.onActivated).",
- "unsupported": true,
- "type": "function",
- "description": "Fires when the selected tab in a window changes.",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "description": "The ID of the tab that has become active."
- },
- {
- "type": "object",
- "name": "selectInfo",
- "properties": {
- "windowId": {
- "type": "integer",
- "minimum": 0,
- "description": "The ID of the window the selected tab changed inside of."
- }
- }
- }
- ]
- },
- {
- "name": "onActiveChanged",
- "deprecated": "Please use $(ref:tabs.onActivated).",
- "unsupported": true,
- "type": "function",
- "description": "Fires when the selected tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to $(ref:tabs.onUpdated) events to be notified when a URL is set.",
- "parameters": [
- {
- "type": "integer",
- "name": "tabId",
- "minimum": 0,
- "description": "The ID of the tab that has become active."
- },
- {
- "type": "object",
- "name": "selectInfo",
- "properties": {
- "windowId": {
- "type": "integer",
- "minimum": 0,
- "description": "The ID of the window the selected tab changed inside of."
- }
- }
- }
- ]
- },
- {
- "name": "onActivated",
- "type": "function",
- "description": "Fires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.",
- "parameters": [
- {
- "type": "object",
- "name": "activeInfo",
- "properties": {
- "tabId": {
- "type": "integer",
- "minimum": 0,
- "description": "The ID of the tab that has become active."
- },
- "windowId": {
- "type": "integer",
- "minimum": 0,
- "description": "The ID of the window the active tab changed inside of."
- }
- }
- }
- ]
- },
- {
- "name": "onHighlightChanged",
- "deprecated": "Please use $(ref:tabs.onHighlighted).",
- "unsupported": true,
- "type": "function",
- "description": "Fired when the highlighted or selected tabs in a window changes.",
- "parameters": [
- {
- "type": "object",
- "name": "selectInfo",
- "properties": {
- "windowId": {
- "type": "integer",
- "minimum": 0,
- "description": "The window whose tabs changed."
- },
- "tabIds": {
- "type": "array",
- "items": {"type": "integer", "minimum": 0},
- "description": "All highlighted tabs in the window."
- }
- }
- }
- ]
- },
- {
- "name": "onHighlighted",
- "type": "function",
- "description": "Fired when the highlighted or selected tabs in a window changes.",
- "parameters": [
- {
- "type": "object",
- "name": "highlightInfo",
- "properties": {
- "windowId": {
- "type": "integer",
- "minimum": 0,
- "description": "The window whose tabs changed."
- },
- "tabIds": {
- "type": "array",
- "items": {"type": "integer", "minimum": 0},
- "description": "All highlighted tabs in the window."
- }
- }
- }
- ]
- },
- {
- "name": "onDetached",
- "type": "function",
- "description": "Fired when a tab is detached from a window, for example because it is being moved between windows.",
- "parameters": [
- {"type": "integer", "name": "tabId", "minimum": 0},
- {
- "type": "object",
- "name": "detachInfo",
- "properties": {
- "oldWindowId": {"type": "integer", "minimum": 0},
- "oldPosition": {"type": "integer", "minimum": 0}
- }
- }
- ]
- },
- {
- "name": "onAttached",
- "type": "function",
- "description": "Fired when a tab is attached to a window, for example because it was moved between windows.",
- "parameters": [
- {"type": "integer", "name": "tabId", "minimum": 0},
- {
- "type": "object",
- "name": "attachInfo",
- "properties": {
- "newWindowId": {"type": "integer", "minimum": 0},
- "newPosition": {"type": "integer", "minimum": 0}
- }
- }
- ]
- },
- {
- "name": "onRemoved",
- "type": "function",
- "description": "Fired when a tab is closed.",
- "parameters": [
- {"type": "integer", "name": "tabId", "minimum": 0},
- {
- "type": "object",
- "name": "removeInfo",
- "properties": {
- "windowId": {"type": "integer", "minimum": 0, "description": "The window whose tab is closed." },
- "isWindowClosing": {"type": "boolean", "description": "True when the tab is being closed because its window is being closed." }
- }
- }
- ]
- },
- {
- "name": "onReplaced",
- "type": "function",
- "description": "Fired when a tab is replaced with another tab due to prerendering or instant.",
- "parameters": [
- {"type": "integer", "name": "addedTabId", "minimum": 0},
- {"type": "integer", "name": "removedTabId", "minimum": 0}
- ]
- },
- {
- "name": "onZoomChange",
- "type": "function",
- "description": "Fired when a tab is zoomed.",
- "parameters": [{
- "type": "object",
- "name": "ZoomChangeInfo",
- "properties": {
- "tabId": {"type": "integer", "minimum": 0},
- "oldZoomFactor": {"type": "number"},
- "newZoomFactor": {"type": "number"},
- "zoomSettings": {"$ref": "ZoomSettings"}
- }
- }]
- }
- ]
- }
-]
diff --git a/application/basilisk/components/webextensions/schemas/windows.json b/application/basilisk/components/webextensions/schemas/windows.json
deleted file mode 100644
index 8453358b5..000000000
--- a/application/basilisk/components/webextensions/schemas/windows.json
+++ /dev/null
@@ -1,508 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "windows",
- "description": "Use the <code>browser.windows</code> API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.",
- "types": [
- {
- "id": "WindowType",
- "type": "string",
- "description": "The type of browser window this is. Under some circumstances a Window may not be assigned type property, for example when querying closed windows from the $(ref:sessions) API.",
- "enum": ["normal", "popup", "panel", "app", "devtools"]
- },
- {
- "id": "WindowState",
- "type": "string",
- "description": "The state of this browser window. Under some circumstances a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API.",
- "enum": ["normal", "minimized", "maximized", "fullscreen", "docked"]
- },
- {
- "id": "Window",
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "optional": true,
- "minimum": 0,
- "description": "The ID of the window. Window IDs are unique within a browser session. Under some circumstances a Window may not be assigned an ID, for example when querying windows using the $(ref:sessions) API, in which case a session ID may be present."
- },
- "focused": {
- "type": "boolean",
- "description": "Whether the window is currently the focused window."
- },
- "top": {
- "type": "integer",
- "optional": true,
- "description": "The offset of the window from the top edge of the screen in pixels. Under some circumstances a Window may not be assigned top property, for example when querying closed windows from the $(ref:sessions) API."
- },
- "left": {
- "type": "integer",
- "optional": true,
- "description": "The offset of the window from the left edge of the screen in pixels. Under some circumstances a Window may not be assigned left property, for example when querying closed windows from the $(ref:sessions) API."
- },
- "width": {
- "type": "integer",
- "optional": true,
- "description": "The width of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned width property, for example when querying closed windows from the $(ref:sessions) API."
- },
- "height": {
- "type": "integer",
- "optional": true,
- "description": "The height of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned height property, for example when querying closed windows from the $(ref:sessions) API."
- },
- "tabs": {
- "type": "array",
- "items": { "$ref": "tabs.Tab" },
- "optional": true,
- "description": "Array of $(ref:tabs.Tab) objects representing the current tabs in the window."
- },
- "incognito": {
- "type": "boolean",
- "description": "Whether the window is incognito."
- },
- "type": {
- "$ref": "WindowType",
- "optional": true,
- "description": "The type of browser window this is."
- },
- "state": {
- "$ref": "WindowState",
- "optional": true,
- "description": "The state of this browser window."
- },
- "alwaysOnTop": {
- "type": "boolean",
- "description": "Whether the window is set to be always on top."
- },
- "sessionId": {
- "type": "string",
- "optional": true,
- "description": "The session ID used to uniquely identify a Window obtained from the $(ref:sessions) API."
- }
- }
- },
- {
- "id": "CreateType",
- "type": "string",
- "description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.",
- "enum": ["normal", "popup", "panel", "detached_panel"]
- }
- ],
- "properties": {
- "WINDOW_ID_NONE": {
- "value": -1,
- "description": "The windowId value that represents the absence of a browser window."
- },
- "WINDOW_ID_CURRENT": {
- "value": -2,
- "description": "The windowId value that represents the $(topic:current-window)[current window]."
- }
- },
- "functions": [
- {
- "name": "get",
- "type": "function",
- "description": "Gets details about a window.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": -2
- },
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {
- "type": "boolean",
- "optional": true,
- "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
- "windowTypes": {
- "type": "array",
- "items": {
- "$ref": "WindowType"
- },
- "optional": true,
- "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "window",
- "$ref": "Window"
- }
- ]
- }
- ]
- },
- {
- "name": "getCurrent",
- "type": "function",
- "description": "Gets the $(topic:current-window)[current window].",
- "async": "callback",
- "parameters": [
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {
- "type": "boolean",
- "optional": true,
- "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
- "windowTypes": {
- "type": "array",
- "items": { "$ref": "WindowType" },
- "optional": true,
- "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "window",
- "$ref": "Window"
- }
- ]
- }
- ]
- },
- {
- "name": "getLastFocused",
- "type": "function",
- "description": "Gets the window that was most recently focused &mdash; typically the window 'on top'.",
- "async": "callback",
- "parameters": [
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {
- "type": "boolean",
- "optional": true,
- "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
- "windowTypes": {
- "type": "array",
- "items": { "$ref": "WindowType" },
- "optional": true,
- "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "window",
- "$ref": "Window"
- }
- ]
- }
- ]
- },
- {
- "name": "getAll",
- "type": "function",
- "description": "Gets all windows.",
- "async": "callback",
- "parameters": [
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {
- "type": "boolean",
- "optional": true,
- "description": "If true, each $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects for that window. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
- "windowTypes": {
- "type": "array",
- "items": { "$ref": "WindowType" },
- "optional": true,
- "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "windows",
- "type": "array",
- "items": { "$ref": "Window" }
- }
- ]
- }
- ]
- },
- {
- "name": "create",
- "type": "function",
- "description": "Creates (opens) a new browser with any optional sizing, position or default URL provided.",
- "async": "callback",
- "parameters": [
- {
- "type": "object",
- "name": "createData",
- "optional": true,
- "default": {},
- "properties": {
- "url": {
- "description": "A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.",
- "optional": true,
- "choices": [
- { "type": "string", "format": "relativeUrl" },
- {
- "type": "array",
- "items": { "type": "string", "format": "relativeUrl" }
- }
- ]
- },
- "tabId": {
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The id of the tab for which you want to adopt to the new window."
- },
- "left": {
- "type": "integer",
- "optional": true,
- "description": "The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels."
- },
- "top": {
- "type": "integer",
- "optional": true,
- "description": "The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels."
- },
- "width": {
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The width in pixels of the new window, including the frame. If not specified defaults to a natural width."
- },
- "height": {
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The height in pixels of the new window, including the frame. If not specified defaults to a natural height."
- },
- "focused": {
- "unsupported": true,
- "type": "boolean",
- "optional": true,
- "description": "If true, opens an active window. If false, opens an inactive window."
- },
- "incognito": {
- "type": "boolean",
- "optional": true,
- "description": "Whether the new window should be an incognito window."
- },
- "type": {
- "$ref": "CreateType",
- "optional": true,
- "description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set."
- },
- "state": {
- "$ref": "WindowState",
- "optional": true,
- "description": "The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'."
- },
- "allowScriptsToClose": {
- "type": "boolean",
- "optional": true,
- "description": "Allow scripts to close the window."
- }
- },
- "optional": true
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "window",
- "$ref": "Window",
- "description": "Contains details about the created window.",
- "optional": true
- }
- ]
- }
- ]
- },
- {
- "name": "update",
- "type": "function",
- "description": "Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": -2
- },
- {
- "type": "object",
- "name": "updateInfo",
- "properties": {
- "left": {
- "type": "integer",
- "optional": true,
- "description": "The offset from the left edge of the screen to move the window to in pixels. This value is ignored for panels."
- },
- "top": {
- "type": "integer",
- "optional": true,
- "description": "The offset from the top edge of the screen to move the window to in pixels. This value is ignored for panels."
- },
- "width": {
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The width to resize the window to in pixels. This value is ignored for panels."
- },
- "height": {
- "type": "integer",
- "minimum": 0,
- "optional": true,
- "description": "The height to resize the window to in pixels. This value is ignored for panels."
- },
- "focused": {
- "type": "boolean",
- "optional": true,
- "description": "If true, brings the window to the front. If false, brings the next window in the z-order to the front."
- },
- "drawAttention": {
- "type": "boolean",
- "optional": true,
- "description": "If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request."
- },
- "state": {
- "$ref": "WindowState",
- "optional": true,
- "description": "The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'."
- }
- }
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": [
- {
- "name": "window",
- "$ref": "Window"
- }
- ]
- }
- ]
- },
- {
- "name": "remove",
- "type": "function",
- "description": "Removes (closes) a window, and all the tabs inside it.",
- "async": "callback",
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": 0
- },
- {
- "type": "function",
- "name": "callback",
- "optional": true,
- "parameters": []
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onCreated",
- "type": "function",
- "description": "Fired when a window is created.",
- "filters": [
- {
- "name": "windowTypes",
- "type": "array",
- "items": { "$ref": "WindowType" },
- "description": "Conditions that the window's type being created must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- ],
- "parameters": [
- {
- "$ref": "Window",
- "name": "window",
- "description": "Details of the window that was created."
- }
- ]
- },
- {
- "name": "onRemoved",
- "type": "function",
- "description": "Fired when a window is removed (closed).",
- "filters": [
- {
- "name": "windowTypes",
- "type": "array",
- "items": { "$ref": "WindowType" },
- "description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- ],
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": 0,
- "description": "ID of the removed window."
- }
- ]
- },
- {
- "name": "onFocusChanged",
- "type": "function",
- "description": "Fired when the currently focused window changes. Will be $(ref:windows.WINDOW_ID_NONE) if all browser windows have lost focus. Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one browser window to another.",
- "filters": [
- {
- "name": "windowTypes",
- "type": "array",
- "items": { "$ref": "WindowType" },
- "description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- ],
- "parameters": [
- {
- "type": "integer",
- "name": "windowId",
- "minimum": -1,
- "description": "ID of the newly focused window."
- }
- ]
- }
- ]
- }
-]
diff --git a/application/basilisk/configure.in b/application/basilisk/configure.in
index 8527d218c..13f2ad54d 100644
--- a/application/basilisk/configure.in
+++ b/application/basilisk/configure.in
@@ -17,15 +17,9 @@ AC_SUBST(MC_BASILISK)
dnl Optional parts of the build.
dnl ========================================================
-dnl = Disable WebExtensions
+dnl = Disable Sync
dnl ========================================================
-MOZ_ARG_DISABLE_BOOL(webextensions,
-[ --disable-webextensions Disable WebExtensions],
- MOZ_WEBEXTENSIONS=,
- MOZ_WEBEXTENSIONS=1)
-
-if test -n "$MOZ_WEBEXTENSIONS"; then
- AC_DEFINE(MOZ_WEBEXTENSIONS)
-fi
-
-AC_SUBST(MOZ_WEBEXTENSIONS) \ No newline at end of file
+MOZ_ARG_DISABLE_BOOL(sync,
+[ --disable-sync Disable Sync],
+ MOZ_SERVICES_SYNC=,
+ MOZ_SERVICES_SYNC=1) \ No newline at end of file
diff --git a/application/basilisk/confvars.sh b/application/basilisk/confvars.sh
index cd18bdb94..2df7e826a 100644
--- a/application/basilisk/confvars.sh
+++ b/application/basilisk/confvars.sh
@@ -15,10 +15,6 @@ if test "$OS_ARCH" = "WINNT" -o \
MOZ_BUNDLED_FONTS=1
fi
-if test "$OS_ARCH" = "WINNT"; then
- MOZ_MAINTENANCE_SERVICE=
-fi
-
# For Basilisk we want to use 52.9.YYYY.MM.DD as MOZ_APP_VERSION in release
# builds so add-on developers have something to target while maintaining
# Firefox compatiblity.
@@ -55,7 +51,6 @@ MOZ_APP_STATIC_INI=1
MOZ_WEBGL_CONFORMANT=1
MOZ_JSDOWNLOADS=1
MOZ_WEBRTC=1
-MOZ_WEBEXTENSIONS=
MOZ_DEVTOOLS=1
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_SYNC=1
diff --git a/application/basilisk/extensions/pdfjs/content/PdfJs.jsm b/application/basilisk/extensions/pdfjs/content/PdfJs.jsm
index b3d85436e..7dc01c398 100644
--- a/application/basilisk/extensions/pdfjs/content/PdfJs.jsm
+++ b/application/basilisk/extensions/pdfjs/content/PdfJs.jsm
@@ -52,23 +52,6 @@ XPCOMUtils.defineLazyModuleGetter(this, 'PdfjsChromeUtils',
'resource://pdf.js/PdfjsChromeUtils.jsm');
XPCOMUtils.defineLazyModuleGetter(this, 'PdfjsContentUtils',
'resource://pdf.js/PdfjsContentUtils.jsm');
-
-function getBoolPref(aPref, aDefaultValue) {
- try {
- return Services.prefs.getBoolPref(aPref);
- } catch (ex) {
- return aDefaultValue;
- }
-}
-
-function getIntPref(aPref, aDefaultValue) {
- try {
- return Services.prefs.getIntPref(aPref);
- } catch (ex) {
- return aDefaultValue;
- }
-}
-
function isDefaultHandler() {
if (Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT) {
return PdfjsContentUtils.isDefaultHandlerApp();
@@ -172,7 +155,7 @@ var PdfJs = {
}
this._initialized = true;
- if (!getBoolPref(PREF_DISABLED, true)) {
+ if (!Services.prefs.getBoolPref(PREF_DISABLED, true)) {
this._migrate();
}
@@ -209,7 +192,7 @@ var PdfJs = {
_migrate: function migrate() {
const VERSION = 2;
- var currentVersion = getIntPref(PREF_MIGRATION_VERSION, 0);
+ var currentVersion = Services.prefs.getIntPref(PREF_MIGRATION_VERSION, 0);
if (currentVersion >= VERSION) {
return;
}
@@ -284,7 +267,7 @@ var PdfJs = {
* @return {boolean} Whether or not it's enabled.
*/
get enabled() {
- var disabled = getBoolPref(PREF_DISABLED, true);
+ var disabled = Services.prefs.getBoolPref(PREF_DISABLED, true);
if (disabled) {
return false;
}
diff --git a/application/basilisk/extensions/pdfjs/content/PdfStreamConverter.jsm b/application/basilisk/extensions/pdfjs/content/PdfStreamConverter.jsm
index 5e337bbc5..b5b21f214 100644
--- a/application/basilisk/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/application/basilisk/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -78,22 +78,6 @@ function getFindBar(domWindow) {
}
}
-function getBoolPref(pref, def) {
- try {
- return Services.prefs.getBoolPref(pref);
- } catch (ex) {
- return def;
- }
-}
-
-function getIntPref(pref, def) {
- try {
- return Services.prefs.getIntPref(pref);
- } catch (ex) {
- return def;
- }
-}
-
function getStringPref(pref, def) {
try {
return Services.prefs.getComplexValue(pref, Ci.nsISupportsString).data;
@@ -103,7 +87,7 @@ function getStringPref(pref, def) {
}
function log(aMsg) {
- if (!getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false)) {
+ if (!Services.prefs.getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false)) {
return;
}
var msg = 'PdfStreamConverter.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
@@ -359,17 +343,17 @@ ChromeActions.prototype = {
return !!findBar && ('updateControlState' in findBar);
},
supportsDocumentFonts: function() {
- var prefBrowser = getIntPref('browser.display.use_document_fonts', 1);
- var prefGfx = getBoolPref('gfx.downloadable_fonts.enabled', true);
+ var prefBrowser = Services.prefs.getIntPref('browser.display.use_document_fonts', 1);
+ var prefGfx = Services.prefs.getBoolPref('gfx.downloadable_fonts.enabled', true);
return (!!prefBrowser && prefGfx);
},
supportsDocumentColors: function() {
- return getIntPref('browser.display.document_color_use', 0) !== 2;
+ return Services.prefs.getIntPref('browser.display.document_color_use', 0) !== 2;
},
supportedMouseWheelZoomModifierKeys: function() {
return {
- ctrlKey: getIntPref('mousewheel.with_control.action', 3) === 3,
- metaKey: getIntPref('mousewheel.with_meta.action', 1) === 3,
+ ctrlKey: Services.prefs.getIntPref('mousewheel.with_control.action', 3) === 3,
+ metaKey: Services.prefs.getIntPref('mousewheel.with_meta.action', 1) === 3,
};
},
reportTelemetry: function (data) {
@@ -531,10 +515,10 @@ ChromeActions.prototype = {
prefName = (PREF_PREFIX + '.' + key);
switch (typeof prefValue) {
case 'boolean':
- currentPrefs[key] = getBoolPref(prefName, prefValue);
+ currentPrefs[key] = Services.prefs.getBoolPref(prefName, prefValue);
break;
case 'number':
- currentPrefs[key] = getIntPref(prefName, prefValue);
+ currentPrefs[key] = Services.prefs.getIntPref(prefName, prefValue);
break;
case 'string':
currentPrefs[key] = getStringPref(prefName, prefValue);
@@ -921,16 +905,16 @@ PdfStreamConverter.prototype = {
} catch (e) {}
var hash = aRequest.URI.ref;
- var isPDFBugEnabled = getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false);
+ var isPDFBugEnabled = Services.prefs.getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false);
rangeRequest = contentEncoding === 'identity' &&
acceptRanges === 'bytes' &&
aRequest.contentLength >= 0 &&
- !getBoolPref(PREF_PREFIX + '.disableRange', false) &&
+ !Services.prefs.getBoolPref(PREF_PREFIX + '.disableRange', false) &&
(!isPDFBugEnabled ||
hash.toLowerCase().indexOf('disablerange=true') < 0);
streamRequest = contentEncoding === 'identity' &&
aRequest.contentLength >= 0 &&
- !getBoolPref(PREF_PREFIX + '.disableStream', false) &&
+ !Services.prefs.getBoolPref(PREF_PREFIX + '.disableStream', false) &&
(!isPDFBugEnabled ||
hash.toLowerCase().indexOf('disablestream=true') < 0);
}
diff --git a/application/basilisk/installer/allowed-dupes.mn b/application/basilisk/installer/allowed-dupes.mn
index 7baa6ebed..a3780bf5a 100644
--- a/application/basilisk/installer/allowed-dupes.mn
+++ b/application/basilisk/installer/allowed-dupes.mn
@@ -211,13 +211,11 @@ chrome/toolkit/skin/classic/mozapps/update/buttons.png
chrome/toolkit/skin/classic/mozapps/update/downloadButtons.png
chrome/toolkit/skin/classic/mozapps/xpinstall/xpinstallItemGeneric.png
-components/FxAccountsPush.js
crashreporter.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib
crashreporter.app/Contents/Resources/English.lproj/MainMenuRTL.nib/classes.nib
# firefox/firefox-bin is bug 658850
@MOZ_APP_NAME@
@MOZ_APP_NAME@-bin
-modules/FxAccountsPush.js
modules/commonjs/index.js
modules/commonjs/sdk/ui/button/view/events.js
modules/commonjs/sdk/ui/state/events.js
diff --git a/application/basilisk/installer/package-manifest.in b/application/basilisk/installer/package-manifest.in
index cebcb6796..22655bc33 100644
--- a/application/basilisk/installer/package-manifest.in
+++ b/application/basilisk/installer/package-manifest.in
@@ -397,15 +397,9 @@
@RESPATH@/components/addonManager.js
@RESPATH@/components/amContentHandler.js
@RESPATH@/components/amInstallTrigger.js
-#ifdef MOZ_WEBEXTENSIONS
-@RESPATH@/components/amWebAPI.js
-#endif
@RESPATH@/components/amWebInstallListener.js
@RESPATH@/components/nsBlocklistService.js
@RESPATH@/components/blocklist.manifest
-#ifdef MOZ_WEBEXTENSIONS
-@RESPATH@/components/nsBlocklistServiceContent.js
-#endif
#ifdef MOZ_UPDATER
@RESPATH@/components/nsUpdateService.manifest
@RESPATH@/components/nsUpdateService.js
@@ -485,8 +479,6 @@
#endif
@RESPATH@/components/SyncComponents.manifest
@RESPATH@/components/Weave.js
-@RESPATH@/components/FxAccountsComponents.manifest
-@RESPATH@/components/FxAccountsPush.js
@RESPATH@/components/CaptivePortalDetectComponents.manifest
@RESPATH@/components/captivedetect.js
@RESPATH@/components/servicesComponents.manifest
@@ -554,12 +546,6 @@
@RESPATH@/components/TestInterfaceJSMaplike.js
#endif
-#ifdef MOZ_WEBEXTENSIONS
-; [Extensions]
-@RESPATH@/components/extensions-toolkit.manifest
-@RESPATH@/browser/components/extensions-browser.manifest
-#endif
-
; Modules
@RESPATH@/browser/modules/*
@RESPATH@/modules/*
@@ -721,13 +707,6 @@
@RESPATH@/components/pipnss.xpt
@RESPATH@/components/pippki.xpt
-; for Solaris SPARC
-#ifdef SOLARIS
-bin/libfreebl_32fpu_3.so
-bin/libfreebl_32int_3.so
-bin/libfreebl_32int64_3.so
-#endif
-
; [Updater]
;
#ifdef MOZ_UPDATER
@@ -738,13 +717,6 @@ bin/libfreebl_32int64_3.so
#endif
#endif
-; [MaintenanceService]
-;
-#ifdef MOZ_MAINTENANCE_SERVICE
-@BINPATH@/maintenanceservice.exe
-@BINPATH@/maintenanceservice_installer.exe
-#endif
-
@RESPATH@/components/dom_audiochannel.xpt
; Shutdown Terminator
diff --git a/application/basilisk/installer/windows/Makefile.in b/application/basilisk/installer/windows/Makefile.in
index bab6ded1a..5326ab897 100644
--- a/application/basilisk/installer/windows/Makefile.in
+++ b/application/basilisk/installer/windows/Makefile.in
@@ -14,12 +14,6 @@ INSTALLER_FILES = \
nsis/shared.nsh \
$(NULL)
-ifdef MOZ_MAINTENANCE_SERVICE
-INSTALLER_FILES += \
- nsis/maintenanceservice_installer.nsi \
- $(NULL)
-endif
-
BRANDING_FILES = \
branding.nsi \
appname.bmp \
diff --git a/application/basilisk/installer/windows/nsis/defines.nsi.in b/application/basilisk/installer/windows/nsis/defines.nsi.in
index dbb58ca33..8981bbde8 100644
--- a/application/basilisk/installer/windows/nsis/defines.nsi.in
+++ b/application/basilisk/installer/windows/nsis/defines.nsi.in
@@ -51,10 +51,6 @@
!define MinSupportedCPU "SSE2"
-#ifdef MOZ_MAINTENANCE_SERVICE
-!define MOZ_MAINTENANCE_SERVICE
-#endif
-
# File details shared by both the installer and uninstaller
VIProductVersion "1.0.0.0"
VIAddVersionKey "ProductName" "${BrandShortName}"
diff --git a/application/basilisk/installer/windows/nsis/installer.nsi b/application/basilisk/installer/windows/nsis/installer.nsi
index 994c09279..6b4b5ab9a 100644
--- a/application/basilisk/installer/windows/nsis/installer.nsi
+++ b/application/basilisk/installer/windows/nsis/installer.nsi
@@ -165,11 +165,6 @@ Page custom preOptions leaveOptions
!define MUI_DIRECTORYPAGE_VERIFYONLEAVE
!insertmacro MUI_PAGE_DIRECTORY
-; Custom Components Page
-!ifdef MOZ_MAINTENANCE_SERVICE
-Page custom preComponents leaveComponents
-!endif
-
; Custom Shortcuts Page
Page custom preShortcuts leaveShortcuts
@@ -427,41 +422,6 @@ Section "-Application" APP_IDX
${EndIf}
${EndIf}
-!ifdef MOZ_MAINTENANCE_SERVICE
- ; If the maintenance service page was displayed then a value was already
- ; explicitly selected for installing the maintenance service and
- ; and so InstallMaintenanceService will already be 0 or 1.
- ; If the maintenance service page was not displayed then
- ; InstallMaintenanceService will be equal to "".
- ${If} $InstallMaintenanceService == ""
- Call IsUserAdmin
- Pop $R0
- ${If} $R0 == "true"
- ; Only proceed if we have HKLM write access
- ${AndIf} $TmpVal == "HKLM"
- ; On Windows < XP SP3 we do not install the maintenance service.
- ${If} ${IsWinXP}
- ${AndIf} ${AtMostServicePack} 2
- StrCpy $InstallMaintenanceService "0"
- ${Else}
- ; The user is an admin, so we should default to installing the service.
- StrCpy $InstallMaintenanceService "1"
- ${EndIf}
- ${Else}
- ; The user is not admin, so we can't install the service.
- StrCpy $InstallMaintenanceService "0"
- ${EndIf}
- ${EndIf}
-
- ${If} $InstallMaintenanceService == "1"
- ; The user wants to install the maintenance service, so execute
- ; the pre-packaged maintenance service installer.
- ; This option can only be turned on if the user is an admin so there
- ; is no need to use ExecShell w/ verb runas to enforce elevated.
- nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\""
- ${EndIf}
-!endif
-
; These need special handling on uninstall since they may be overwritten by
; an install into a different location.
StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}"
@@ -578,13 +538,6 @@ Section "-Application" APP_IDX
${EndIf}
${EndUnless}
${EndIf}
-
-!ifdef MOZ_MAINTENANCE_SERVICE
- ${If} $TmpVal == "HKLM"
- ; Add the registry keys for allowed certificates.
- ${AddMaintCertKeys}
- ${EndIf}
-!endif
SectionEnd
; Cleanup operations to perform at the end of the installation.
@@ -948,59 +901,6 @@ Function leaveShortcuts
${EndIf}
FunctionEnd
-!ifdef MOZ_MAINTENANCE_SERVICE
-Function preComponents
- ; If the service already exists, don't show this page
- ServicesHelper::IsInstalled "MozillaMaintenance"
- Pop $R9
- ${If} $R9 == 1
- ; The service already exists so don't show this page.
- Abort
- ${EndIf}
-
- ; On Windows < XP SP3 we do not install the maintenance service.
- ${If} ${IsWinXP}
- ${AndIf} ${AtMostServicePack} 2
- Abort
- ${EndIf}
-
- ; Don't show the custom components page if the
- ; user is not an admin
- Call IsUserAdmin
- Pop $R9
- ${If} $R9 != "true"
- Abort
- ${EndIf}
-
- ; Only show the maintenance service page if we have write access to HKLM
- ClearErrors
- WriteRegStr HKLM "Software\Mozilla" \
- "${BrandShortName}InstallerTest" "Write Test"
- ${If} ${Errors}
- ClearErrors
- Abort
- ${Else}
- DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
- ${EndIf}
-
- StrCpy $PageName "Components"
- ${CheckCustomCommon}
- !insertmacro MUI_HEADER_TEXT "$(COMPONENTS_PAGE_TITLE)" "$(COMPONENTS_PAGE_SUBTITLE)"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini"
-FunctionEnd
-
-Function leaveComponents
- ${MUI_INSTALLOPTIONS_READ} $0 "components.ini" "Settings" "State"
- ${If} $0 != 0
- Abort
- ${EndIf}
- ${MUI_INSTALLOPTIONS_READ} $InstallMaintenanceService "components.ini" "Field 2" "State"
- ${If} $InstallType == ${INSTALLTYPE_CUSTOM}
- Call CheckExistingInstall
- ${EndIf}
-FunctionEnd
-!endif
-
Function preSummary
StrCpy $PageName "Summary"
; Setup the summary.ini file for the Custom Summary Page
@@ -1180,7 +1080,6 @@ Function .onInit
!insertmacro InitInstallOptionsFile "options.ini"
!insertmacro InitInstallOptionsFile "shortcuts.ini"
- !insertmacro InitInstallOptionsFile "components.ini"
!insertmacro InitInstallOptionsFile "summary.ini"
WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
@@ -1255,36 +1154,6 @@ Function .onInit
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Bottom "50"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" State "1"
- ; Don't offer to install the quick launch shortcut on Windows 7
- ${Unless} ${AtLeastWin7}
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Type "checkbox"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Text "$(ICONS_QUICKLAUNCH)"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Left "0"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Right "-1"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Top "60"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Bottom "70"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" State "1"
- ${EndUnless}
-
- ; Setup the components.ini file for the Components Page
- WriteINIStr "$PLUGINSDIR\components.ini" "Settings" NumFields "2"
-
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Type "label"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Text "$(OPTIONAL_COMPONENTS_DESC)"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Left "0"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Right "-1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Top "5"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Bottom "25"
-
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Type "checkbox"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Text "$(MAINTENANCE_SERVICE_CHECKBOX_DESC)"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Left "0"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Right "-1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Top "27"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Bottom "37"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" State "1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Flags "GROUP"
-
; There must always be a core directory.
${GetSize} "$EXEDIR\core\" "/S=0K" $R5 $R7 $R8
SectionSetSize ${APP_IDX} $R5
diff --git a/application/basilisk/installer/windows/nsis/maintenanceservice_installer.nsi b/application/basilisk/installer/windows/nsis/maintenanceservice_installer.nsi
deleted file mode 100644
index 1f73bac6a..000000000
--- a/application/basilisk/installer/windows/nsis/maintenanceservice_installer.nsi
+++ /dev/null
@@ -1,332 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs
-!verbose 3
-
-; 7-Zip provides better compression than the lzma from NSIS so we add the files
-; uncompressed and use 7-Zip to create a SFX archive of it
-SetDatablockOptimize on
-SetCompress off
-CRCCheck on
-
-RequestExecutionLevel admin
-
-; The commands inside this ifdef require NSIS 3.0a2 or greater so the ifdef can
-; be removed after we require NSIS 3.0a2 or greater.
-!ifdef NSIS_PACKEDVERSION
- Unicode true
- ManifestSupportedOS all
- ManifestDPIAware true
-!endif
-
-!addplugindir ./
-
-; Variables
-Var TempMaintServiceName
-Var BrandFullNameDA
-Var BrandFullName
-
-; Other included files may depend upon these includes!
-; The following includes are provided by NSIS.
-!include FileFunc.nsh
-!include LogicLib.nsh
-!include MUI.nsh
-!include WinMessages.nsh
-!include WinVer.nsh
-!include WordFunc.nsh
-
-!insertmacro GetOptions
-!insertmacro GetParameters
-!insertmacro GetSize
-
-; The test slaves use this fallback key to run tests.
-; And anyone that wants to run tests themselves should already have
-; this installed.
-!define FallbackKey \
- "SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4"
-
-!define CompanyName "Mozilla Corporation"
-!define BrandFullNameInternal ""
-
-; The following includes are custom.
-!include defines.nsi
-; We keep defines.nsi defined so that we get other things like
-; the version number, but we redefine BrandFullName
-!define MaintFullName "Mozilla Maintenance Service"
-!undef BrandFullName
-!define BrandFullName "${MaintFullName}"
-
-!include common.nsh
-!include locales.nsi
-
-VIAddVersionKey "FileDescription" "${MaintFullName} Installer"
-VIAddVersionKey "OriginalFilename" "maintenanceservice_installer.exe"
-
-Name "${MaintFullName}"
-OutFile "maintenanceservice_installer.exe"
-
-; Get installation folder from registry if available
-InstallDirRegKey HKLM "Software\Mozilla\MaintenanceService" ""
-
-SetOverwrite on
-
-; serviceinstall.cpp also uses this key, in case the path is changed, update
-; there too.
-!define MaintUninstallKey \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService"
-
-; Always install into the 32-bit location even if we have a 64-bit build.
-; This is because we use only 1 service for all Basilisk channels.
-; Allow either x86 and x64 builds to exist at this location, depending on
-; what is the latest build.
-InstallDir "$PROGRAMFILES32\${MaintFullName}\"
-ShowUnInstDetails nevershow
-
-################################################################################
-# Modern User Interface - MUI
-
-!define MUI_ICON setup.ico
-!define MUI_UNICON setup.ico
-!define MUI_WELCOMEPAGE_TITLE_3LINES
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp
-
-;Interface Settings
-!define MUI_ABORTWARNING
-
-; Uninstaller Pages
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-
-################################################################################
-# Language
-
-!insertmacro MOZ_MUI_LANGUAGE 'baseLocale'
-!verbose push
-!verbose 3
-!include "overrideLocale.nsh"
-!include "customLocale.nsh"
-!verbose pop
-
-; Set this after the locale files to override it if it is in the locale
-; using " " for BrandingText will hide the "Nullsoft Install System..." branding
-BrandingText " "
-
-Function .onInit
- ; Remove the current exe directory from the search order.
- ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
- System::Call 'kernel32::SetDllDirectoryW(w "")'
-
- SetSilent silent
-
- ${Unless} ${AtLeastWin7}
- Abort
- ${EndUnless}
-FunctionEnd
-
-Function un.onInit
- ; Remove the current exe directory from the search order.
- ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
- System::Call 'kernel32::SetDllDirectoryW(w "")'
-
-; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be
-; removed after we require NSIS 3.0a2 or greater.
-!ifndef NSIS_PACKEDVERSION
- ${If} ${AtLeastWinVista}
- System::Call 'user32::SetProcessDPIAware()'
- ${EndIf}
-!endif
-
- StrCpy $BrandFullNameDA "${MaintFullName}"
- StrCpy $BrandFullName "${MaintFullName}"
-FunctionEnd
-
-Section "MaintenanceService"
- AllowSkipFiles off
-
- CreateDirectory $INSTDIR
- SetOutPath $INSTDIR
-
- ; If the service already exists, then it will be stopped when upgrading it
- ; via the maintenanceservice_tmp.exe command executed below.
- ; The maintenanceservice_tmp.exe command will rename the file to
- ; maintenanceservice.exe if maintenanceservice_tmp.exe is newer.
- ; If the service does not exist yet, we install it and drop the file on
- ; disk as maintenanceservice.exe directly.
- StrCpy $TempMaintServiceName "maintenanceservice.exe"
- IfFileExists "$INSTDIR\maintenanceservice.exe" 0 skipAlreadyExists
- StrCpy $TempMaintServiceName "maintenanceservice_tmp.exe"
- skipAlreadyExists:
-
- ; We always write out a copy and then decide whether to install it or
- ; not via calling its 'install' cmdline which works by version comparison.
- CopyFiles "$EXEDIR\maintenanceservice.exe" "$INSTDIR\$TempMaintServiceName"
-
- ; The updater.ini file is only used when performing an install or upgrade,
- ; and only if that install or upgrade is successful. If an old updater.ini
- ; happened to be copied into the maintenance service installation directory
- ; but the service was not newer, the updater.ini file would be unused.
- ; It is used to fill the description of the service on success.
- CopyFiles "$EXEDIR\updater.ini" "$INSTDIR\updater.ini"
-
- ; Install the application maintenance service.
- ; If a service already exists, the command line parameter will stop the
- ; service and only install itself if it is newer than the already installed
- ; service. If successful it will remove the old maintenanceservice.exe
- ; and replace it with maintenanceservice_tmp.exe.
- ClearErrors
- ${GetParameters} $0
- ${GetOptions} "$0" "/Upgrade" $0
- ${If} ${Errors}
- ExecWait '"$INSTDIR\$TempMaintServiceName" install'
- ${Else}
- ; The upgrade cmdline is the same as install except
- ; It will fail if the service isn't already installed.
- ExecWait '"$INSTDIR\$TempMaintServiceName" upgrade'
- ${EndIf}
-
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- WriteRegStr HKLM "${MaintUninstallKey}" "DisplayName" "${MaintFullName}"
- WriteRegStr HKLM "${MaintUninstallKey}" "UninstallString" \
- '"$INSTDIR\uninstall.exe"'
- WriteRegStr HKLM "${MaintUninstallKey}" "DisplayIcon" \
- "$INSTDIR\Uninstall.exe,0"
- WriteRegStr HKLM "${MaintUninstallKey}" "DisplayVersion" "${AppVersion}"
- WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Mozilla"
- WriteRegStr HKLM "${MaintUninstallKey}" "Comments" "${BrandFullName}"
- WriteRegDWORD HKLM "${MaintUninstallKey}" "NoModify" 1
- ${GetSize} "$INSTDIR" "/S=0K" $R2 $R3 $R4
- WriteRegDWORD HKLM "${MaintUninstallKey}" "EstimatedSize" $R2
-
- ; Write out that a maintenance service was attempted.
- ; We do this because on upgrades we will check this value and we only
- ; want to install once on the first upgrade to maintenance service.
- ; Also write out that we are currently installed, preferences will check
- ; this value to determine if we should show the service update pref.
- ; Since the Maintenance service can be installed either x86 or x64,
- ; always use the 64-bit registry for checking if an attempt was made.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1
- DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
-
- ; Included here for debug purposes only.
- ; These keys are used to bypass the installation dir is a valid installation
- ; check from the service so that tests can be run.
- ; WriteRegStr HKLM "${FallbackKey}\0" "name" "Mozilla Corporation"
- ; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "DigiCert SHA2 Assured ID Code Signing CA"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
-SectionEnd
-
-; By renaming before deleting we improve things slightly in case
-; there is a file in use error. In this case a new install can happen.
-Function un.RenameDelete
- Pop $9
- ; If the .moz-delete file already exists previously, delete it
- ; If it doesn't exist, the call is ignored.
- ; We don't need to pass /REBOOTOK here since it was already marked that way
- ; if it exists.
- Delete "$9.moz-delete"
- Rename "$9" "$9.moz-delete"
- ${If} ${Errors}
- Delete /REBOOTOK "$9"
- ${Else}
- Delete /REBOOTOK "$9.moz-delete"
- ${EndIf}
- ClearErrors
-FunctionEnd
-
-Section "Uninstall"
- ; Delete the service so that no updates will be attempted
- ExecWait '"$INSTDIR\maintenanceservice.exe" uninstall'
-
- Push "$INSTDIR\updater.ini"
- Call un.RenameDelete
- Push "$INSTDIR\maintenanceservice.exe"
- Call un.RenameDelete
- Push "$INSTDIR\maintenanceservice_tmp.exe"
- Call un.RenameDelete
- Push "$INSTDIR\maintenanceservice.old"
- Call un.RenameDelete
- Push "$INSTDIR\Uninstall.exe"
- Call un.RenameDelete
- Push "$INSTDIR\update\updater.ini"
- Call un.RenameDelete
- Push "$INSTDIR\update\updater.exe"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-1.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-2.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-3.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-4.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-5.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-6.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-7.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-8.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-9.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-10.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-install.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-uninstall.log"
- Call un.RenameDelete
- SetShellVarContext all
- Push "$APPDATA\Mozilla\logs\maintenanceservice.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-1.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-2.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-3.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-4.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-5.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-6.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-7.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-8.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-9.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-10.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-install.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-uninstall.log"
- Call un.RenameDelete
- RMDir /REBOOTOK "$APPDATA\Mozilla\logs"
- RMDir /REBOOTOK "$APPDATA\Mozilla"
- RMDir /REBOOTOK "$INSTDIR\logs"
- RMDir /REBOOTOK "$INSTDIR\update"
- RMDir /REBOOTOK "$INSTDIR"
-
- DeleteRegKey HKLM "${MaintUninstallKey}"
-
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "Installed"
- DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
- DeleteRegKey HKLM "${FallbackKey}\"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
-SectionEnd
diff --git a/application/basilisk/installer/windows/nsis/shared.nsh b/application/basilisk/installer/windows/nsis/shared.nsh
index fb2239d24..f5bbef389 100644
--- a/application/basilisk/installer/windows/nsis/shared.nsh
+++ b/application/basilisk/installer/windows/nsis/shared.nsh
@@ -124,51 +124,6 @@
${FixDistributionsINI}
RmDir /r /REBOOTOK "$INSTDIR\${TO_BE_DELETED}"
-
-!ifdef MOZ_MAINTENANCE_SERVICE
- Call IsUserAdmin
- Pop $R0
- ${If} $R0 == "true"
- ; Only proceed if we have HKLM write access
- ${AndIf} $TmpVal == "HKLM"
- ; On Windows 2000 we do not install the maintenance service.
- ${AndIf} ${AtLeastWinXP}
- ; We check to see if the maintenance service install was already attempted.
- ; Since the Maintenance service can be installed either x86 or x64,
- ; always use the 64-bit registry for checking if an attempt was made.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- ReadRegDWORD $5 HKLM "Software\Mozilla\MaintenanceService" "Attempted"
- ClearErrors
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
-
- ; Add the registry keys for allowed certificates.
- ${AddMaintCertKeys}
-
- ; If the maintenance service is already installed, do nothing.
- ; The maintenance service will launch:
- ; maintenanceservice_installer.exe /Upgrade to upgrade the maintenance
- ; service if necessary. If the update was done from updater.exe without
- ; the service (i.e. service is failing), updater.exe will do the update of
- ; the service. The reasons we do not do it here is because we don't want
- ; to have to prompt for limited user accounts when the service isn't used
- ; and we currently call the PostUpdate twice, once for the user and once
- ; for the SYSTEM account. Also, this would stop the maintenance service
- ; and we need a return result back to the service when run that way.
- ${If} $5 == ""
- ; An install of maintenance service was never attempted.
- ; We know we are an Admin and that we have write access into HKLM
- ; based on the above checks, so attempt to just run the EXE.
- ; In the worst case, in case there is some edge case with the
- ; IsAdmin check and the permissions check, the maintenance service
- ; will just fail to be attempted to be installed.
- nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\""
- ${EndIf}
- ${EndIf}
-!endif
!macroend
!define PostUpdate "!insertmacro PostUpdate"
@@ -720,54 +675,6 @@
!macroend
!define UpdateProtocolHandlers "!insertmacro UpdateProtocolHandlers"
-!ifdef MOZ_MAINTENANCE_SERVICE
-; Adds maintenance service certificate keys for the install dir.
-; For the cert to work, it must also be signed by a trusted cert for the user.
-!macro AddMaintCertKeys
- Push $R0
- ; Allow main Mozilla cert information for updates
- ; This call will push the needed key on the stack
- ServicesHelper::PathToUniqueRegistryPath "$INSTDIR"
- Pop $R0
- ${If} $R0 != ""
- ; More than one certificate can be specified in a different subfolder
- ; for example: $R0\1, but each individual binary can be signed
- ; with at most one certificate. A fallback certificate can only be used
- ; if the binary is replaced with a different certificate.
- ; We always use the 64bit registry for certs.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
-
- ; PrefetchProcessName was originally used to experiment with deleting
- ; Windows prefetch as a speed optimization. It is no longer used though.
- DeleteRegValue HKLM "$R0" "prefetchProcessName"
-
- ; Setting the Attempted value will ensure that a new Maintenance Service
- ; install will never be attempted again after this from updates. The value
- ; is used only to see if updates should attempt new service installs.
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
-
- ; These values associate the allowed certificates for the current
- ; installation.
- WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}"
- WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}"
- ; These values associate the allowed certificates for the previous
- ; installation, so that we can update from it cleanly using the
- ; old updater.exe (which will still have this signature).
- WriteRegStr HKLM "$R0\1" "name" "${CERTIFICATE_NAME_PREVIOUS}"
- WriteRegStr HKLM "$R0\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
- ClearErrors
- ${EndIf}
- ; Restore the previously used value back
- Pop $R0
-!macroend
-!define AddMaintCertKeys "!insertmacro AddMaintCertKeys"
-!endif
-
; Removes various registry entries for reasons noted below (does not use SHCTX).
!macro RemoveDeprecatedKeys
StrCpy $0 "SOFTWARE\Classes"
diff --git a/application/basilisk/installer/windows/nsis/uninstaller.nsi b/application/basilisk/installer/windows/nsis/uninstaller.nsi
index 87f4d838a..c556b0a90 100644
--- a/application/basilisk/installer/windows/nsis/uninstaller.nsi
+++ b/application/basilisk/installer/windows/nsis/uninstaller.nsi
@@ -450,24 +450,6 @@ Section "Uninstall"
; uninstalls of Basilisk-release with reinstalls of Basilisk-release, for example.
WriteRegStr HKCU "Software\Mozilla\Basilisk" "Uninstalled-${UpdateChannel}" "True"
-!ifdef MOZ_MAINTENANCE_SERVICE
- ; Get the path the allowed cert is at and remove it
- ; Keep this block of code last since it modfies the reg view
- ServicesHelper::PathToUniqueRegistryPath "$INSTDIR"
- Pop $MaintCertKey
- ${If} $MaintCertKey != ""
- ; Always use the 64bit registry for certs on 64bit systems.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- DeleteRegKey HKLM "$MaintCertKey"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
- ${EndIf}
- Call un.UninstallServiceIfNotUsed
-!endif
-
${un.IsFirewallSvcRunning}
Pop $0
${If} "$0" == "true"
diff --git a/application/basilisk/locales/en-US/chrome/browser/aboutAccounts.dtd b/application/basilisk/locales/en-US/chrome/browser/aboutAccounts.dtd
deleted file mode 100644
index 358722156..000000000
--- a/application/basilisk/locales/en-US/chrome/browser/aboutAccounts.dtd
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY aboutAccounts.welcome "Welcome to &syncBrand.shortName.label;">
-<!ENTITY aboutAccounts.connected "Account connected">
-
-<!ENTITY aboutAccountsConfig.description "Sign in to sync your tabs, bookmarks, passwords &amp; more.">
-<!ENTITY aboutAccountsConfig.startButton.label "Get started">
-<!ENTITY aboutAccountsConfig.useOldSync.label "Using an older version of Sync?">
-<!ENTITY aboutAccountsConfig.syncPreferences.label "Sync preferences">
-<!ENTITY aboutAccounts.noConnection.title "No connection">
-<!ENTITY aboutAccounts.noConnection.description "You must be connected to the Internet to sign in.">
-<!ENTITY aboutAccounts.noConnection.retry "Try again">
-<!ENTITY aboutAccounts.badConfig.title "Bad configuration">
-<!ENTITY aboutAccounts.badConfig.description "Unable to determine your Firefox Account server configuration. Please try again later.">
diff --git a/application/basilisk/locales/en-US/chrome/browser/aboutHome.dtd b/application/basilisk/locales/en-US/chrome/browser/aboutHome.dtd
index 17b401c6c..40681c337 100644
--- a/application/basilisk/locales/en-US/chrome/browser/aboutHome.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/aboutHome.dtd
@@ -4,8 +4,10 @@
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
+#ifdef MOZ_SERVICES_SYNC
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
%syncBrandDTD;
+#endif
<!-- These strings are used in the about:home page -->
@@ -32,7 +34,9 @@
<!ENTITY abouthome.preferencesButtonUnix.label "Preferences">
<!ENTITY abouthome.addonsButton.label "Add-ons">
<!ENTITY abouthome.downloadsButton.label "Downloads">
+#ifdef MOZ_SERVICES_SYNC
<!ENTITY abouthome.syncButton.label "&syncBrand.shortName.label;">
+#endif
<!-- LOCALIZATION NOTE (abouthome.aboutMozilla.label): The (invisible) label for
the mozilla wordmark in the top-right corner that links to Mozilla's main
diff --git a/application/basilisk/locales/en-US/chrome/browser/aboutRobots.dtd b/application/basilisk/locales/en-US/chrome/browser/aboutRobots.dtd
deleted file mode 100644
index 23447add1..000000000
--- a/application/basilisk/locales/en-US/chrome/browser/aboutRobots.dtd
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- These strings are used in the about:robots page, which ties in with the
- robots theme used in the Firefox 3 Beta 2/3 first run pages.
- They're just meant to be fun and whimsical, with references to some geeky
- but well-known robots in movies and books. Be creative with translations! -->
-
-<!-- Nonsense line from the movie "The Day The Earth Stood Still". No translation needed. -->
-<!ENTITY robots.pagetitle "Gort! Klaatu barada nikto!">
-<!-- Movie: Logan's Run... Box (cybog): "Welcome Humans! I am ready for you." -->
-<!ENTITY robots.errorTitleText "Welcome Humans!">
-<!-- Movie: The Day The Earth Stood Still. Spoken by Klaatu. -->
-<!ENTITY robots.errorShortDescText "We have come to visit you in peace and with goodwill!">
-<!-- Various books by Isaac Asimov. http://en.wikipedia.org/wiki/Three_Laws_of_Robotics -->
-<!ENTITY robots.errorLongDesc1 "Robots may not injure a human being or, through inaction, allow a human being to come to harm.">
-<!-- Movie: Blade Runner. Batty: "I've seen things you people wouldn’t believe..." -->
-<!ENTITY robots.errorLongDesc2 "Robots have seen things you people wouldn’t believe.">
-<!-- Book: Hitchhiker’s Guide To The Galaxy. What the Sirius Cybernetics Corporation calls robots. -->
-<!ENTITY robots.errorLongDesc3 "Robots are Your Plastic Pal Who’s Fun To Be With.">
-<!-- TV: Futurama. Bender's first line is "Bite my shiny metal ass." -->
-<!ENTITY robots.errorLongDesc4 "Robots have shiny metal posteriors which should not be bitten.">
-<!-- TV: Battlestar Galactica (2004 series). From the opening text. -->
-<!ENTITY robots.errorTrailerDescText "And they have a plan.">
-<!-- TV: Battlestar Galactica (2004 series). Common expletive referring to Cylons. -->
-<!ENTITY robots.imgtitle "Frakkin' Toasters">
-<!-- Book: Hitchhiker's Guide To The Galaxy. Arthur presses a button and it warns him. -->
-<!ENTITY robots.dontpress "Please do not press this button again.">
diff --git a/application/basilisk/locales/en-US/chrome/browser/browser.dtd b/application/basilisk/locales/en-US/chrome/browser/browser.dtd
index d02a6eedb..fe856129f 100644
--- a/application/basilisk/locales/en-US/chrome/browser/browser.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/browser.dtd
@@ -40,12 +40,6 @@ can reach it easily. -->
<!ENTITY pinTab.accesskey "P">
<!ENTITY unpinTab.label "Unpin Tab">
<!ENTITY unpinTab.accesskey "b">
-<!ENTITY sendTabToDevice.label "Send Tab to Device">
-<!ENTITY sendTabToDevice.accesskey "D">
-<!ENTITY sendPageToDevice.label "Send Page to Device">
-<!ENTITY sendPageToDevice.accesskey "D">
-<!ENTITY sendLinkToDevice.label "Send Link to Device">
-<!ENTITY sendLinkToDevice.accesskey "D">
<!ENTITY moveToNewWindow.label "Move to New Window">
<!ENTITY moveToNewWindow.accesskey "W">
<!ENTITY bookmarkAllTabs.label "Bookmark All Tabs…">
@@ -115,11 +109,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY showAllTabsCmd.accesskey "A">
<!ENTITY toggleReaderMode.key "R">
-<!ENTITY fxaSignIn.label "Sign in to &syncBrand.shortName.label;">
-<!ENTITY fxaSignInError.label "Reconnect to &syncBrand.shortName.label;">
-<!ENTITY fxaUnverified.label "Verify Your Account">
-<!ENTITY syncSettings.label "Open &syncBrand.shortName.label; settings">
-
<!ENTITY fullScreenMinimize.tooltip "Minimize">
<!ENTITY fullScreenRestore.tooltip "Restore">
<!ENTITY fullScreenClose.tooltip "Close">
@@ -333,23 +322,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY appMenuHistory.viewSidebar.label "View History Sidebar">
<!ENTITY appMenuHelp.tooltip "Open Help Menu">
-<!ENTITY appMenuRemoteTabs.label "Synced Tabs">
-<!-- LOCALIZATION NOTE (appMenuRemoteTabs.notabs.label): This is shown beneath
- the name of a device when that device has no open tabs -->
-<!ENTITY appMenuRemoteTabs.notabs.label "No open tabs">
-<!-- LOCALIZATION NOTE (appMenuRemoteTabs.tabsnotsyncing.label): This is shown
- when Sync is configured but syncing tabs is disabled. -->
-<!ENTITY appMenuRemoteTabs.tabsnotsyncing.label "Turn on tab syncing to view a list of tabs from your other devices.">
-<!-- LOCALIZATION NOTE (appMenuRemoteTabs.noclients.label): This is shown
- when Sync is configured but this appears to be the only device attached to
- the account. We also show links to download Firefox for android/ios. -->
-<!ENTITY appMenuRemoteTabs.noclients.title "No synced tabs… yet!">
-<!ENTITY appMenuRemoteTabs.noclients.subtitle "Want to see your tabs from other devices here?">
-<!ENTITY appMenuRemoteTabs.openprefs.label "Sync Preferences">
-<!ENTITY appMenuRemoteTabs.notsignedin.label "Sign in to view a list of tabs from your other devices.">
-<!ENTITY appMenuRemoteTabs.signin.label "Sign in to Sync">
-<!ENTITY appMenuRemoteTabs.sidebar.label "View Synced Tabs">
-
<!ENTITY customizeMenu.addToToolbar.label "Add to Toolbar">
<!ENTITY customizeMenu.addToToolbar.accesskey "A">
<!ENTITY customizeMenu.addToPanel.label "Add to Menu">
@@ -723,43 +695,19 @@ you can use these alternative items. Otherwise, their values should be empty. -
The word "toolbar" is appended automatically and should not be contained below! -->
<!ENTITY tabsToolbar.label "Browser tabs">
-<!-- LOCALIZATION NOTE (syncTabsMenu3.label): This appears in the history menu -->
-<!ENTITY syncTabsMenu3.label "Synced Tabs">
-
-<!ENTITY syncedTabs.sidebar.label "Synced Tabs">
-<!ENTITY syncedTabs.sidebar.noclients.label "Sign in to Firefox from your other devices to view their tabs here.">
-<!ENTITY syncedTabs.sidebar.noclients.title "No synced tabs… yet!">
-<!ENTITY syncedTabs.sidebar.noclients.subtitle "Want to see your tabs from other devices here?">
-<!ENTITY syncedTabs.sidebar.notsignedin.label "Sign in to view a list of tabs from your other devices.">
-<!ENTITY syncedTabs.sidebar.notabs.label "No open tabs">
-<!ENTITY syncedTabs.sidebar.openprefs.label "Open &syncBrand.shortName.label; Preferences">
-<!-- LOCALIZATION NOTE (syncedTabs.sidebar.tabsnotsyncing.label): This is shown
- when Sync is configured but syncing tabs is disabled. -->
-<!ENTITY syncedTabs.sidebar.tabsnotsyncing.label "Turn on tab syncing to view a list of tabs from your other devices.">
-
-<!ENTITY syncedTabs.context.open.label "Open">
-<!ENTITY syncedTabs.context.open.accesskey "O">
-<!ENTITY syncedTabs.context.openInNewTab.label "Open in a New Tab">
-<!ENTITY syncedTabs.context.openInNewTab.accesskey "w">
-<!ENTITY syncedTabs.context.openInNewWindow.label "Open in a New Window">
-<!ENTITY syncedTabs.context.openInNewWindow.accesskey "N">
-<!ENTITY syncedTabs.context.openInNewPrivateWindow.label "Open in a New Private Window">
-<!ENTITY syncedTabs.context.openInNewPrivateWindow.accesskey "P">
-<!ENTITY syncedTabs.context.bookmarkSingleTab.label "Bookmark This Tab…">
-<!ENTITY syncedTabs.context.bookmarkSingleTab.accesskey "B">
-<!ENTITY syncedTabs.context.copy.label "Copy">
-<!ENTITY syncedTabs.context.copy.accesskey "C">
-
+#ifdef MOZ_SERVICES_SYNC
+<!-- LOCALIZATION NOTE (syncTabsMenu2.label): This appears in the history menu -->
+<!ENTITY syncTabsMenu2.label "Tabs From Other Devices">
<!ENTITY syncBrand.shortName.label "Sync">
-<!ENTITY syncSignIn.label "Sign In To &syncBrand.shortName.label;…">
-<!ENTITY syncSignIn.accesskey "Y">
+<!ENTITY syncSetup.label "Set Up &syncBrand.shortName.label;…">
+<!ENTITY syncSetup.accesskey "Y">
<!ENTITY syncSyncNowItem.label "Sync Now">
<!ENTITY syncSyncNowItem.accesskey "S">
-<!ENTITY syncReAuthItem.label "Reconnect to &syncBrand.shortName.label;…">
-<!ENTITY syncReAuthItem.accesskey "R">
<!ENTITY syncToolbarButton.label "Sync">
+<!ENTITY syncTabsToolbarButton.label "Synced Tabs">
+#endif
<!ENTITY customizeMode.menuAndToolbars.header2 "Additional Tools and Features">
<!ENTITY customizeMode.menuAndToolbars.empty "Want more tools?">
diff --git a/application/basilisk/locales/en-US/chrome/browser/browser.properties b/application/basilisk/locales/en-US/chrome/browser/browser.properties
index f1c39839b..abec30bf1 100644
--- a/application/basilisk/locales/en-US/chrome/browser/browser.properties
+++ b/application/basilisk/locales/en-US/chrome/browser/browser.properties
@@ -638,37 +638,6 @@ e10s.accessibilityNotice.acceptButton.accesskey = O
e10s.accessibilityNotice.enableAndRestart.label = Enable (Requires Restart)
e10s.accessibilityNotice.enableAndRestart.accesskey = E
-# LOCALIZATION NOTE (userContextPersonal.label,
-# userContextWork.label,
-# userContextShopping.label,
-# userContextBanking.label,
-# userContextNone.label):
-# These strings specify the four predefined contexts included in support of the
-# Contextual Identity / Containers project. Each context is meant to represent
-# the context that the user is in when interacting with the site. Different
-# contexts will store cookies and other information from those sites in
-# different, isolated locations. You can enable the feature by typing
-# about:config in the URL bar and changing privacy.userContext.enabled to true.
-# Once enabled, you can open a new tab in a specific context by clicking
-# File > New Container Tab > (1 of 4 contexts). Once opened, you will see these
-# strings on the right-hand side of the URL bar.
-userContextPersonal.label = Personal
-userContextWork.label = Work
-userContextBanking.label = Banking
-userContextShopping.label = Shopping
-userContextNone.label = No Container
-
-userContextPersonal.accesskey = P
-userContextWork.accesskey = W
-userContextBanking.accesskey = B
-userContextShopping.accesskey = S
-userContextNone.accesskey = N
-
-userContext.aboutPage.label = Manage containers
-userContext.aboutPage.accesskey = O
-
-userContextOpenLink.label = Open Link in New %S Tab
-
muteTab.label = Mute Tab
muteTab.accesskey = M
unmuteTab.label = Unmute Tab
diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/containers.dtd b/application/basilisk/locales/en-US/chrome/browser/preferences/containers.dtd
deleted file mode 100644
index 58eca1ace..000000000
--- a/application/basilisk/locales/en-US/chrome/browser/preferences/containers.dtd
+++ /dev/null
@@ -1,24 +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/. -->
-
-<!ENTITY label.label "Name">
-<!ENTITY addButton.label "Add New Container">
-<!ENTITY addButton.accesskey "A">
-<!-- &#171; is &laquo; however it's not defined in XML -->
-<!ENTITY backLink.label "&#171; Go Back to Privacy">
-
-<!ENTITY window.title "Add New Container">
-<!ENTITY window.width "45em">
-
-<!ENTITY name.label "Name:">
-<!ENTITY name.accesskey "N">
-<!ENTITY icon.label "Icon:">
-<!ENTITY icon.accesskey "I">
-<!ENTITY color.label "Color:">
-<!ENTITY color.accesskey "o">
-<!ENTITY windowClose.key "w">
-
-<!ENTITY button.ok.label "Done">
-<!ENTITY button.ok.accesskey "D">
-
diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/containers.properties b/application/basilisk/locales/en-US/chrome/browser/preferences/containers.properties
deleted file mode 100644
index 9866a0659..000000000
--- a/application/basilisk/locales/en-US/chrome/browser/preferences/containers.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-containers.removeButton = Remove
-containers.preferencesButton = Preferences
-containers.colorHeading = Color:
-containers.labelMinWidth = 4rem
-containers.nameLabel = Name:
-containers.namePlaceholder = Enter a container name
-containers.submitButton = Done
-containers.iconHeading = Icon:
-containers.updateContainerTitle = %S Container Preferences
-
-containers.blue.label = Blue
-containers.turquoise.label = Turquoise
-containers.green.label = Green
-containers.yellow.label = Yellow
-containers.orange.label = Orange
-containers.red.label = Red
-containers.pink.label = Pink
-containers.purple.label = Purple
-
-containers.fingerprint.label = Fingerprint
-containers.briefcase.label = Briefcase
-# LOCALIZATION NOTE (containers.dollar.label)
-# String represents a money sign but currently uses a dollar sign so don't change to local currency
-# See Bug 1291672
-containers.dollar.label = Dollar sign
-containers.cart.label = Shopping cart
-containers.circle.label = Dot
diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/cookies.dtd b/application/basilisk/locales/en-US/chrome/browser/preferences/cookies.dtd
index 5e7df9609..c83331328 100644
--- a/application/basilisk/locales/en-US/chrome/browser/preferences/cookies.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/preferences/cookies.dtd
@@ -14,7 +14,6 @@
<!ENTITY props.path.label "Path:">
<!ENTITY props.secure.label "Send For:">
<!ENTITY props.expires.label "Expires:">
-<!ENTITY props.container.label "Container:">
<!ENTITY window.title "Cookies">
<!ENTITY windowClose.key "w">
diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.dtd b/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.dtd
index 7702c8c51..353e627d7 100644
--- a/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.dtd
@@ -18,7 +18,6 @@
<!ENTITY paneContent.title "Content">
<!ENTITY paneApplications.title "Applications">
<!ENTITY panePrivacy.title "Privacy">
-<!ENTITY paneContainers.title "Container Tabs">
<!ENTITY paneSecurity.title "Security">
<!ENTITY paneAdvanced.title "Advanced">
diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.properties b/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.properties
index 84fac427d..c0b7e1be0 100644
--- a/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/application/basilisk/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -191,17 +191,3 @@ revertNoRestartButton=Revert
restartNow=Restart Now
restartLater=Restart Later
-
-disableContainersAlertTitle=Close All Container Tabs?
-
-# LOCALIZATION NOTE (disableContainersMsg): Semi-colon list of plural forms.
-# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
-# #S is the number of container tabs
-disableContainersMsg=If you disable Container Tabs now, #S container tab will be closed. Are you sure you want to disable Container Tabs?;If you disable Container Tabs now, #S container tabs will be closed. Are you sure you want to disable Container Tabs?
-
-# LOCALIZATION NOTE (disableContainersOkButton): Semi-colon list of plural forms.
-# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
-# #S is the number of container tabs
-disableContainersOkButton=Close #S Container Tab;Close #S Container Tabs
-
-disableContainersButton2=Keep enabled
diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/privacy.dtd b/application/basilisk/locales/en-US/chrome/browser/preferences/privacy.dtd
index f743c4040..8820e92ab 100644
--- a/application/basilisk/locales/en-US/chrome/browser/preferences/privacy.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/preferences/privacy.dtd
@@ -110,10 +110,3 @@
<!ENTITY clearOnCloseSettings.label "Settings…">
<!ENTITY clearOnCloseSettings.accesskey "t">
-
-<!ENTITY browserContainersHeader.label "Container Tabs">
-<!ENTITY browserContainersLearnMore.label "Learn more">
-<!ENTITY browserContainersEnabled.label "Enable Container Tabs">
-<!ENTITY browserContainersEnabled.accesskey "n">
-<!ENTITY browserContainersSettings.label "Settings…">
-<!ENTITY browserContainersSettings.accesskey "i">
diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd b/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd
index a5b290052..f6ef3b876 100644
--- a/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd
@@ -39,80 +39,9 @@
<!-- Device Settings -->
<!ENTITY syncDeviceName.label "Device Name:">
-<!ENTITY fxaSyncDeviceName.label "Device Name">
-<!ENTITY changeSyncDeviceName.label "Change Device Name…">
-<!ENTITY changeSyncDeviceName.accesskey "h">
-<!ENTITY cancelChangeSyncDeviceName.label "Cancel">
-<!ENTITY cancelChangeSyncDeviceName.accesskey "n">
-<!ENTITY saveChangeSyncDeviceName.label "Save">
-<!ENTITY saveChangeSyncDeviceName.accesskey "v">
+<!ENTITY syncDeviceName.accesskey "c">
<!ENTITY unlinkDevice.label "Unlink This Device">
<!-- Footer stuff -->
<!ENTITY prefs.tosLink.label "Terms of Service">
<!ENTITY prefs.ppLink.label "Privacy Policy">
-
-<!-- Firefox Accounts stuff -->
-<!ENTITY fxaPrivacyNotice.link.label "Privacy Notice">
-<!ENTITY determiningAcctStatus.label "Determining your account status…">
-
-<!-- LOCALIZATION NOTE (signedInUnverified.beforename.label,
-signedInUnverified.aftername.label): these two string are used respectively
-before and after the account email address. Localizers can use one of them, or
-both, to better adapt this sentence to their language.
--->
-<!ENTITY signedInUnverified.beforename.label "">
-<!ENTITY signedInUnverified.aftername.label "is not verified.">
-
-<!-- LOCALIZATION NOTE (signedInLoginFailure.beforename.label,
-signedInLoginFailure.aftername.label): these two string are used respectively
-before and after the account email address. Localizers can use one of them, or
-both, to better adapt this sentence to their language.
--->
-<!ENTITY signedInLoginFailure.beforename.label "Please sign in to reconnect">
-<!ENTITY signedInLoginFailure.aftername.label "">
-
-<!ENTITY notSignedIn.label "You are not signed in.">
-<!ENTITY signIn.label "Sign in">
-<!ENTITY signIn.accesskey "g">
-<!ENTITY profilePicture.tooltip "Change profile picture">
-<!ENTITY verifiedManage.label "Manage Account">
-<!ENTITY verifiedManage.accesskey "o">
-<!ENTITY disconnect.label "Disconnect…">
-<!ENTITY disconnect.accesskey "D">
-<!ENTITY verify.label "Verify Email">
-<!ENTITY verify.accesskey "V">
-<!ENTITY forget.label "Forget this Email">
-<!ENTITY forget.accesskey "F">
-
-<!ENTITY welcome.description "Access your tabs, bookmarks, passwords and more wherever you use &brandShortName;.">
-<!ENTITY welcome.signIn.label "Sign In">
-<!ENTITY welcome.createAccount.label "Create Account">
-
-<!ENTITY welcome.useOldSync.label "Using an older version of Sync?">
-
-<!ENTITY signedOut.caption "Take your Web with you">
-<!ENTITY signedOut.description "Synchronize your bookmarks, history, tabs, passwords, add-ons, and preferences across all your devices.">
-<!ENTITY signedOut.accountBox.title "Connect with a &syncBrand.fxAccount.label;">
-<!ENTITY signedOut.accountBox.create "Create Account">
-<!ENTITY signedOut.accountBox.create.accesskey "C">
-<!ENTITY signedOut.accountBox.signin "Sign In">
-<!ENTITY signedOut.accountBox.signin.accesskey "I">
-
-<!ENTITY signedIn.engines.label "Sync across all devices">
-
-<!-- LOCALIZATION NOTE (mobilePromo3.*): the following strings will be used to
- create a single sentence with active links.
- The resulting sentence in English is: "Download Firefox for
- Android or iOS to sync with your mobile device." -->
-
-<!ENTITY mobilePromo3.start "Download Firefox for ">
-<!-- LOCALIZATION NOTE (mobilePromo3.androidLink): This is a link title that links to https://www.mozilla.org/firefox/android/ -->
-<!ENTITY mobilePromo3.androidLink "Android">
-
-<!-- LOCALIZATION NOTE (mobilePromo3.iOSBefore): This is text displayed between mobilePromo3.androidLink and mobilePromo3.iosLink -->
-<!ENTITY mobilePromo3.iOSBefore " or ">
-<!-- LOCALIZATION NOTE (mobilePromo3.iOSLink): This is a link title that links to https://www.mozilla.org/firefox/ios/ -->
-<!ENTITY mobilePromo3.iOSLink "iOS">
-
-<!ENTITY mobilePromo3.end " to sync with your mobile device.">
diff --git a/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd b/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd
index 71a9f68af..bc4d1b3e0 100644
--- a/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd
@@ -4,4 +4,3 @@
<!ENTITY syncBrand.shortName.label "Sync">
<!ENTITY syncBrand.fullName.label "Pale Moon Sync">
-<!ENTITY syncBrand.fxAccount.label "Firefox Account">
diff --git a/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd b/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd
index 2ff001842..f37f2c92e 100644
--- a/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd
@@ -5,12 +5,12 @@
<!ENTITY syncKey.page.title "Your &syncBrand.fullName.label; Key">
<!ENTITY syncKey.page.description2 "This key is used to decode the data in your &syncBrand.fullName.label; account. You will need to enter the key each time you configure &syncBrand.fullName.label; on a new device.">
<!ENTITY syncKey.keepItSecret.heading "Keep it secret">
-<!ENTITY syncKey.keepItSecret.description "Your &syncBrand.fullName.label; account is encrypted to protect your privacy. Without this key, it would take years for anyone to decode your personal information. You are the only person who holds this key. This means you’re the only one who can access your &syncBrand.fullName.label; data.">
+<!ENTITY syncKey.keepItSecret.description "Your &syncBrand.fullName.label; account is encrypted to protect your privacy. Without this key, it would take years for anyone to decode your personal information. You are the only person who holds this key. This means you're the only one who can access your &syncBrand.fullName.label; data.">
<!ENTITY syncKey.keepItSafe.heading "Keep it safe">
<!ENTITY syncKey.keepItSafe1.description "Do not lose this key.">
-<!ENTITY syncKey.keepItSafe2.description " We don’t keep a copy of your key (that wouldn’t be keeping it secret!) so ">
-<!ENTITY syncKey.keepItSafe3.description "we can’t help you recover it">
-<!ENTITY syncKey.keepItSafe4a.description " if it’s lost. You’ll need to use this key any time you connect a new device to &syncBrand.fullName.label;.">
+<!ENTITY syncKey.keepItSafe2.description " We don't keep a copy of your key (that wouldn't be keeping it secret!) so ">
+<!ENTITY syncKey.keepItSafe3.description "we can't help you recover it">
+<!ENTITY syncKey.keepItSafe4a.description " if it's lost. You'll need to use this key any time you connect a new device to &syncBrand.fullName.label;.">
<!ENTITY syncKey.findOutMore1.label "Find out more about &syncBrand.fullName.label; and your privacy at ">
<!ENTITY syncKey.findOutMore2.label ".">
<!ENTITY syncKey.footer1.label "&syncBrand.fullName.label; Terms of Service are available at ">
diff --git a/application/basilisk/locales/en-US/chrome/browser/syncProgress.dtd b/application/basilisk/locales/en-US/chrome/browser/syncProgress.dtd
new file mode 100644
index 000000000..db45cb935
--- /dev/null
+++ b/application/basilisk/locales/en-US/chrome/browser/syncProgress.dtd
@@ -0,0 +1,15 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!ENTITY % brandDTD
+ SYSTEM "chrome://branding/locale/brand.dtd">
+ %brandDTD;
+
+<!-- These strings are used in the sync progress upload page -->
+<!ENTITY syncProgress.pageTitle "Your First Sync">
+<!ENTITY syncProgress.textBlurb "Your data is now being encrypted and uploaded in the background. You can close this tab and continue using &brandShortName;.">
+<!ENTITY syncProgress.closeButton "Close">
+<!ENTITY syncProgress.logoAltText "&brandShortName; logo">
+<!ENTITY syncProgress.diffText "&brandShortName; will now automatically sync in the background. You can close this tab and continue using &brandShortName;.">
+
diff --git a/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties b/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties
index 099090ec9..0e1b857ca 100644
--- a/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties
+++ b/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties
@@ -30,7 +30,7 @@ quota.remove.label = Remove
quota.treeCaption.label = Uncheck items to stop syncing them and free up space on the server.
# LOCALIZATION NOTE (quota.removal.label): %S is a list of engines that will be
# disabled and whose data will be removed once the user confirms.
-quota.removal.label = Firefox Sync will remove the following data: %S.
+quota.removal.label = Sync will remove the following data: %S.
# LOCALIZATION NOTE (quota.list.separator): This is the separator string used
# for the list of engines (incl. spaces where appropriate)
quota.list.separator = ,\u0020
diff --git a/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd b/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd
index 2657156b7..7ee938e5d 100644
--- a/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd
@@ -6,13 +6,13 @@
<!-- First page of the wizard -->
-<!ENTITY setup.pickSetupType.description2 "Welcome! If you’ve never used &syncBrand.fullName.label; before, you will need to create a new account.">
+<!ENTITY setup.pickSetupType.description2 "Welcome! If you've never used &syncBrand.fullName.label; before, you will need to create a new account.">
<!ENTITY button.createNewAccount.label "Create a New Account">
<!ENTITY button.haveAccount.label "I Have an Account">
<!ENTITY setup.choicePage.title.label "Have you used &syncBrand.fullName.label; before?">
-<!ENTITY setup.choicePage.new.label "I’ve never used &syncBrand.shortName.label; before">
-<!ENTITY setup.choicePage.existing2.label "I’m already using &syncBrand.shortName.label; on another device">
+<!ENTITY setup.choicePage.new.label "I've never used &syncBrand.shortName.label; before">
+<!ENTITY setup.choicePage.existing2.label "I'm already using &syncBrand.shortName.label; on another device">
<!-- New Account AND Existing Account -->
<!ENTITY server.label "Server">
@@ -33,6 +33,8 @@
<!ENTITY setup.choosePassword.accesskey "P">
<!ENTITY setup.confirmPassword.label "Confirm Password">
<!ENTITY setup.confirmPassword.accesskey "m">
+<!ENTITY setup.setupMetro.label "Sync with Windows 8 style &brandShortName;">
+<!ENTITY setup.setupMetro.accesskey "S">
<!-- LOCALIZATION NOTE: tosAgree1, tosLink, tosAgree2, ppLink, tosAgree3 are
joined with implicit white space, so spaces in the strings aren't necessary -->
@@ -60,7 +62,7 @@
<!-- Existing Account Page 1: Pair a Device (incl. Pair a Device dialog strings) -->
<!ENTITY pairDevice.title.label "Pair a Device">
<!ENTITY addDevice.showMeHow.label "Show me how.">
-<!ENTITY addDevice.dontHaveDevice.label "I don’t have the device with me">
+<!ENTITY addDevice.dontHaveDevice.label "I don't have the device with me">
<!ENTITY pairDevice.setup.description.label "To activate, select &#x0022;Pair a Device&#x0022; on your other device.">
<!ENTITY addDevice.setup.enterCode.label "Then, enter this code:">
<!ENTITY pairDevice.dialog.description.label "To activate your new device, select &#x0022;Set Up Sync&#x0022; on the device.">
@@ -72,7 +74,7 @@
<!-- Existing Account Page 2: Manual Login -->
<!ENTITY setup.signInPage.title.label "Sign In">
-<!ENTITY existingRecoveryKey.description "You can get a copy of your Recovery Key by going to &syncBrand.shortName.label; Preferences on your other device, and selecting &#x0022;My Recovery Key&#x0022; under &#x0022;Manage Account&#x0022;.">
+<!ENTITY existingRecoveryKey.description "You can get a copy of your Recovery Key by going to &syncBrand.shortName.label; Options on your other device, and selecting &#x0022;My Recovery Key&#x0022; under &#x0022;Manage Account&#x0022;.">
<!ENTITY verifying.label "Verifying…">
<!ENTITY resetPassword.label "Reset Password">
<!ENTITY resetSyncKey.label "I have lost my other device.">
@@ -96,14 +98,14 @@
<!ENTITY engine.addons.label "Add-ons">
<!ENTITY engine.addons.accesskey "A">
-<!ENTITY choice2a.merge.main.label "Merge this device’s data with my &syncBrand.shortName.label; data">
+<!ENTITY choice2a.merge.main.label "Merge this device's data with my &syncBrand.shortName.label; data">
<!ENTITY choice2.merge.recommended.label "Recommended:">
<!ENTITY choice2a.client.main.label "Replace all data on this device with my &syncBrand.shortName.label; data">
-<!ENTITY choice2a.server.main.label "Replace all other devices with this device’s data">
+<!ENTITY choice2a.server.main.label "Replace all other devices with this device's data">
<!-- Confirm Merge Options -->
<!ENTITY setup.optionsConfirmPage.title "Confirm">
-<!ENTITY confirm.merge2.label "&syncBrand.fullName.label; will now merge all this device’s browser data into your Sync account.">
+<!ENTITY confirm.merge2.label "&syncBrand.fullName.label; will now merge all this device's browser data into your Sync account.">
<!ENTITY confirm.client3.label "Warning: The following &brandShortName; data on this device will be deleted:">
<!ENTITY confirm.client2.moreinfo.label "&brandShortName; will then copy your &syncBrand.fullName.label; data to this device.">
<!ENTITY confirm.server2.label "Warning: The following devices will be overwritten with your local data:">
diff --git a/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties b/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties
index 9d388af86..8a5170adb 100644
--- a/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties
+++ b/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties
@@ -35,33 +35,17 @@ passwordsCount.label = #1 password;#1 passwords
# LOCALIZATION NOTE (addonsCount.label): Semicolon-separated list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 is the number of add-ons, see the link above for forms
-addonsCount.label = #1 add-on;#1 add-ons
+addonsCount.label = #1 addon;#1 addons
save.recoverykey.title = Save Recovery Key
-save.recoverykey.defaultfilename = Firefox Recovery Key.html
+save.recoverykey.defaultfilename = Pale Moon Recovery Key.html
-newAccount.action.label = Firefox Sync is now set up to automatically sync all of your browser data.
+newAccount.action.label = Sync is now set up to automatically sync all of your browser data.
newAccount.change.label = You can choose exactly what to sync by selecting Sync Options below.
-resetClient.change2.label = Firefox Sync will now merge all this device’s browser data into your Sync account.
-wipeClient.change2.label = Firefox Sync will now replace all of the browser data on this device with the data in your Sync account.
-wipeRemote.change2.label = Firefox Sync will now replace all of the browser data in your Sync account with the data on this device.
+resetClient.change2.label = Sync will now merge all this device's browser data into your Sync account.
+wipeClient.change2.label = Sync will now replace all of the browser data on this device with the data in your Sync account.
+wipeRemote.change2.label = Sync will now replace all of the browser data in your Sync account with the data on this device.
existingAccount.change.label = You can change this preference by selecting Sync Options below.
# Several other strings are used (via Weave.Status.login), but they come from
# /services/sync
-
-# Firefox Accounts based setup.
-continue.label = Continue
-
-# LOCALIZATION NOTE (disconnect.label, disconnect.verify.title, disconnect.verify.bodyHeading, disconnect.verify.bodyText):
-# These strings are used in the confirmation dialog shown when the user hits the disconnect button
-# LOCALIZATION NOTE (disconnect.label): This is the label for the disconnect button
-disconnect.label = Disconnect
-disconnect.verify.title = Disconnect
-disconnect.verify.bodyHeading = Disconnect from Sync?
-disconnect.verify.bodyText = Your browsing data will remain on this computer, but it will no longer sync with your account.
-
-relinkVerify.title = Merge Warning
-relinkVerify.heading = Are you sure you want to sign in to Sync?
-# LOCALIZATION NOTE (relinkVerify.description): Email address of a user previously signed into sync.
-relinkVerify.description = A different user was previously signed in to Sync on this computer. Signing in will merge this browser’s bookmarks, passwords and other settings with %S
diff --git a/application/basilisk/locales/en-US/installer/custom.properties b/application/basilisk/locales/en-US/installer/custom.properties
index 4abb1a550..0f86f5528 100644
--- a/application/basilisk/locales/en-US/installer/custom.properties
+++ b/application/basilisk/locales/en-US/installer/custom.properties
@@ -25,10 +25,6 @@ OPTIONS_PAGE_TITLE=Setup Type
OPTIONS_PAGE_SUBTITLE=Choose setup options
SHORTCUTS_PAGE_TITLE=Set Up Shortcuts
SHORTCUTS_PAGE_SUBTITLE=Create Program Icons
-COMPONENTS_PAGE_TITLE=Set Up Optional Components
-COMPONENTS_PAGE_SUBTITLE=Optional Recommended Components
-OPTIONAL_COMPONENTS_DESC=The Maintenance Service will allow you to update $BrandShortName silently in the background.
-MAINTENANCE_SERVICE_CHECKBOX_DESC=Install &Maintenance Service
SUMMARY_PAGE_TITLE=Summary
SUMMARY_PAGE_SUBTITLE=Ready to start installing $BrandShortName
SUMMARY_INSTALLED_TO=$BrandShortName will be installed to the following location:
diff --git a/application/basilisk/locales/jar.mn b/application/basilisk/locales/jar.mn
index 5c5a72a1f..345c0525a 100644
--- a/application/basilisk/locales/jar.mn
+++ b/application/basilisk/locales/jar.mn
@@ -7,12 +7,10 @@
@AB_CD@.jar:
% locale browser @AB_CD@ %locale/browser/
* locale/browser/bookmarks.html (generic/profile/bookmarks.html.in)
- locale/browser/aboutAccounts.dtd (%chrome/browser/aboutAccounts.dtd)
locale/browser/aboutDialog.dtd (%chrome/browser/aboutDialog.dtd)
locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd)
locale/browser/aboutPrivateBrowsing.properties (%chrome/browser/aboutPrivateBrowsing.properties)
- locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd)
- locale/browser/aboutHome.dtd (%chrome/browser/aboutHome.dtd)
+* locale/browser/aboutHome.dtd (%chrome/browser/aboutHome.dtd)
locale/browser/accounts.properties (%chrome/browser/accounts.properties)
#ifdef MOZ_SERVICES_HEALTHREPORT
locale/browser/aboutHealthReport.dtd (%chrome/browser/aboutHealthReport.dtd)
@@ -21,8 +19,7 @@
locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd)
locale/browser/aboutTabCrashed.dtd (%chrome/browser/aboutTabCrashed.dtd)
locale/browser/syncCustomize.dtd (%chrome/browser/syncCustomize.dtd)
- locale/browser/aboutSyncTabs.dtd (%chrome/browser/aboutSyncTabs.dtd)
- locale/browser/browser.dtd (%chrome/browser/browser.dtd)
+* locale/browser/browser.dtd (%chrome/browser/browser.dtd)
locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd)
locale/browser/browser.properties (%chrome/browser/browser.properties)
locale/browser/customizableui/customizableWidgets.properties (%chrome/browser/customizableui/customizableWidgets.properties)
@@ -79,13 +76,14 @@
locale/browser/preferences/permissions.dtd (%chrome/browser/preferences/permissions.dtd)
locale/browser/preferences/preferences.dtd (%chrome/browser/preferences/preferences.dtd)
locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties)
- locale/browser/preferences/containers.properties (%chrome/browser/preferences/containers.properties)
* locale/browser/preferences/privacy.dtd (%chrome/browser/preferences/privacy.dtd)
locale/browser/preferences/security.dtd (%chrome/browser/preferences/security.dtd)
- locale/browser/preferences/containers.dtd (%chrome/browser/preferences/containers.dtd)
+#ifdef MOZ_SERVICES_SYNC
locale/browser/preferences/sync.dtd (%chrome/browser/preferences/sync.dtd)
+#endif
locale/browser/preferences/tabs.dtd (%chrome/browser/preferences/tabs.dtd)
locale/browser/preferences/search.dtd (%chrome/browser/preferences/search.dtd)
+#ifdef MOZ_SERVICES_SYNC
locale/browser/syncBrand.dtd (%chrome/browser/syncBrand.dtd)
locale/browser/syncSetup.dtd (%chrome/browser/syncSetup.dtd)
locale/browser/syncSetup.properties (%chrome/browser/syncSetup.properties)
@@ -93,6 +91,9 @@
locale/browser/syncKey.dtd (%chrome/browser/syncKey.dtd)
locale/browser/syncQuota.dtd (%chrome/browser/syncQuota.dtd)
locale/browser/syncQuota.properties (%chrome/browser/syncQuota.properties)
+ locale/browser/syncProgress.dtd (%chrome/browser/syncProgress.dtd)
+ locale/browser/aboutSyncTabs.dtd (%chrome/browser/aboutSyncTabs.dtd)
+#endif
% resource search-plugins chrome://browser/locale/searchplugins/
#if BUILD_FASTER
locale/browser/searchplugins/ (searchplugins/*.xml)
diff --git a/application/basilisk/modules/AboutHome.jsm b/application/basilisk/modules/AboutHome.jsm
index 639194c20..671448480 100644
--- a/application/basilisk/modules/AboutHome.jsm
+++ b/application/basilisk/modules/AboutHome.jsm
@@ -17,8 +17,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
"resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AutoMigrate",
"resource:///modules/AutoMigrate.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
- "resource://gre/modules/FxAccounts.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
diff --git a/application/basilisk/modules/ContentClick.jsm b/application/basilisk/modules/ContentClick.jsm
index 40101d5d3..4cd665f8c 100644
--- a/application/basilisk/modules/ContentClick.jsm
+++ b/application/basilisk/modules/ContentClick.jsm
@@ -88,11 +88,6 @@ var ContentClick = {
triggeringPrincipal: json.triggeringPrincipal,
};
- // The new tab/window must use the same userContextId.
- if (json.originAttributes.userContextId) {
- params.userContextId = json.originAttributes.userContextId;
- }
-
window.openLinkIn(json.href, where, params);
}
};
diff --git a/application/basilisk/modules/DirectoryLinksProvider.jsm b/application/basilisk/modules/DirectoryLinksProvider.jsm
index 117564099..85d8b296b 100644
--- a/application/basilisk/modules/DirectoryLinksProvider.jsm
+++ b/application/basilisk/modules/DirectoryLinksProvider.jsm
@@ -189,11 +189,7 @@ var DirectoryLinksProvider = {
* @return the selected locale or "en-US" if none is selected
*/
get locale() {
- let matchOS;
- try {
- matchOS = Services.prefs.getBoolPref(PREF_MATCH_OS_LOCALE);
- }
- catch (e) {}
+ let matchOS = Services.prefs.getBoolPref(PREF_MATCH_OS_LOCALE, false);
if (matchOS) {
return Services.locale.getLocaleComponentForUserAgent();
diff --git a/application/basilisk/modules/ProcessHangMonitor.jsm b/application/basilisk/modules/ProcessHangMonitor.jsm
index e048f5b40..b1f6f2a97 100644
--- a/application/basilisk/modules/ProcessHangMonitor.jsm
+++ b/application/basilisk/modules/ProcessHangMonitor.jsm
@@ -316,7 +316,7 @@ var ProcessHangMonitor = {
nb.appendNotification(bundle.getString("processHang.label"),
"process-hang",
- "chrome://browser/content/aboutRobots-icon.png",
+ "chrome://browser/skin/slowStartup-16.png",
nb.PRIORITY_WARNING_HIGH, buttons);
},
diff --git a/application/basilisk/themes/linux/jar.mn b/application/basilisk/themes/linux/jar.mn
index 189027812..e9f666418 100644
--- a/application/basilisk/themes/linux/jar.mn
+++ b/application/basilisk/themes/linux/jar.mn
@@ -8,8 +8,9 @@ browser.jar:
#include ../shared/jar.inc.mn
skin/classic/browser/sanitizeDialog.css
skin/classic/browser/aboutSessionRestore-window-icon.png
+#ifdef MOZ_SERVICES_SYNC
skin/classic/browser/aboutSyncTabs.css
-* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
+#endif
skin/classic/browser/actionicon-tab.png
* skin/classic/browser/browser.css
* skin/classic/browser/devedition.css
@@ -107,6 +108,7 @@ browser.jar:
skin/classic/browser/tabbrowser/tab-stroke-start@2x.png (tabbrowser/tab-stroke-start@2x.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
+#ifdef MOZ_SERVICES_SYNC
skin/classic/browser/sync-16.png
skin/classic/browser/sync-32.png
skin/classic/browser/sync-bg.png
@@ -125,6 +127,8 @@ browser.jar:
skin/classic/browser/syncQuota.css
skin/classic/browser/syncProgress-horizontalbar.png
skin/classic/browser/syncProgress-horizontalbar@2x.png
+ skin/classic/browser/syncProgress.css
+#endif
[extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar:
% override chrome://browser/skin/feeds/audioFeedIcon.png chrome://browser/skin/feeds/feedIcon.png
diff --git a/application/basilisk/themes/linux/syncProgress.css b/application/basilisk/themes/linux/syncProgress.css
new file mode 100644
index 000000000..d7aa59976
--- /dev/null
+++ b/application/basilisk/themes/linux/syncProgress.css
@@ -0,0 +1,46 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+@import url(chrome://global/skin/inContentUI.css);
+
+:root {
+ height: 100%;
+ width: 100%;
+ padding: 0;
+}
+
+body {
+ margin: 0;
+ padding: 0 2em;
+}
+
+#floatingBox {
+ margin: 4em auto;
+ max-width: 40em;
+ min-width: 23em;
+ padding: 1em 1.5em;
+ position: relative;
+ text-align: center;
+}
+
+#successLogo {
+ margin: 1em 2em;
+}
+
+#loadingText {
+ margin: 2em 6em;
+}
+
+#progressBar {
+ margin: 2em 10em;
+}
+
+#uploadProgressBar{
+ width: 100%;
+}
+
+#bottomRow {
+ margin-top: 2em;
+ padding: 0;
+ text-align: end;
+}
diff --git a/application/basilisk/themes/linux/syncedtabs/sidebar.css b/application/basilisk/themes/linux/syncedtabs/sidebar.css
deleted file mode 100644
index 04e00a7d4..000000000
--- a/application/basilisk/themes/linux/syncedtabs/sidebar.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-%include ../../shared/syncedtabs/sidebar.inc.css
-
-/* These styles are intended to mimic XUL trees and the XUL search box. */
-
-html {
- border: 1px solid ThreeDShadow;
- background-color: -moz-Field;
- color: -moz-FieldText;
- box-sizing: border-box;
-}
-
-.item {
- padding-inline-end: 0;
-}
-
-.item-title {
- margin: 1px 0 0;
- margin-inline-end: 6px;
-}
-
-
-.search-box {
- -moz-appearance: textfield;
- cursor: text;
- margin: 2px 4px;
- border: 2px solid;
- -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
- -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
- -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
- -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
- padding: 2px 2px 3px;
- padding-inline-start: 4px;
- background-color: -moz-Field;
- color: -moz-FieldText;
-}
-
-.textbox-search-clear {
- background-image: url(moz-icon://stock/gtk-clear?size=menu);
- background-repeat: no-repeat;
- width: 16px;
- height: 16px;
-}
-
-.textbox-search-icon {
- background-image: url(moz-icon://stock/gtk-find?size=menu);
- background-repeat: no-repeat;
- width: 16px;
- height: 16px;
- display: block;
-}
-
-.textbox-search-icon[searchbutton]:not([disabled]) ,
-.textbox-search-clear:not([disabled]) {
- cursor: pointer;
-}
-
-.item.client .item-twisty-container {
- -moz-appearance: treetwistyopen;
- margin-top: 3px;
- margin-left: 2px;
-}
-
-.item.client.closed .item-twisty-container {
- -moz-appearance: treetwisty;
-}
diff --git a/application/basilisk/themes/osx/jar.mn b/application/basilisk/themes/osx/jar.mn
index 27802843d..92d2ceedf 100644
--- a/application/basilisk/themes/osx/jar.mn
+++ b/application/basilisk/themes/osx/jar.mn
@@ -7,8 +7,9 @@ browser.jar:
#include ../shared/jar.inc.mn
skin/classic/browser/sanitizeDialog.css
skin/classic/browser/aboutSessionRestore-window-icon.png
+#ifdef MOZ_SERVICES_SYNC
skin/classic/browser/aboutSyncTabs.css
-* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
+#endif
skin/classic/browser/actionicon-tab.png
skin/classic/browser/actionicon-tab@2x.png
* skin/classic/browser/browser.css
@@ -159,6 +160,7 @@ browser.jar:
skin/classic/browser/tabbrowser/tab-stroke-start@2x.png (tabbrowser/tab-stroke-start@2x.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
skin/classic/browser/tabbrowser/tabDragIndicator@2x.png (tabbrowser/tabDragIndicator@2x.png)
+#ifdef MOZ_SERVICES_SYNC
skin/classic/browser/sync-16.png
skin/classic/browser/sync-32.png
skin/classic/browser/sync-bg.png
@@ -179,6 +181,8 @@ browser.jar:
skin/classic/browser/syncProgress-toolbar@2x.png
skin/classic/browser/syncProgress-toolbar-inverted.png
skin/classic/browser/syncProgress-toolbar-inverted@2x.png
+ skin/classic/browser/syncProgress.css
+#endif
skin/classic/browser/Toolbar-background-noise.png (Toolbar-background-noise.png)
skin/classic/browser/lion/toolbarbutton-dropmarker.png (toolbarbutton-dropmarker-lion.png)
skin/classic/browser/toolbarbutton-dropmarker@2x.png (toolbarbutton-dropmarker-lion@2x.png)
@@ -195,8 +199,10 @@ browser.jar:
skin/classic/browser/yosemite/menuPanel-help@2x.png (menuPanel-help-yosemite@2x.png)
skin/classic/browser/yosemite/reload-stop-go.png (reload-stop-go-yosemite.png)
skin/classic/browser/yosemite/reload-stop-go@2x.png (reload-stop-go-yosemite@2x.png)
+#ifdef MOZ_SERVICES_SYNC
skin/classic/browser/yosemite/sync-horizontalbar.png (sync-horizontalbar-yosemite.png)
skin/classic/browser/yosemite/sync-horizontalbar@2x.png (sync-horizontalbar-yosemite@2x.png)
+#endif
skin/classic/browser/yosemite/tab-selected-end-inactive.svg (tabbrowser/tab-selected-end-yosemite-inactive.svg)
skin/classic/browser/yosemite/tab-selected-start-inactive.svg (tabbrowser/tab-selected-start-yosemite-inactive.svg)
skin/classic/browser/yosemite/tab-active-middle-inactive.png (tabbrowser/tab-active-middle-yosemite-inactive.png)
@@ -224,5 +230,7 @@ browser.jar:
% override chrome://browser/skin/menuPanel-help@2x.png chrome://browser/skin/yosemite/menuPanel-help@2x.png os=Darwin osversion>=10.10
% override chrome://browser/skin/reload-stop-go.png chrome://browser/skin/yosemite/reload-stop-go.png os=Darwin osversion>=10.10
% override chrome://browser/skin/reload-stop-go@2x.png chrome://browser/skin/yosemite/reload-stop-go@2x.png os=Darwin osversion>=10.10
+#ifdef MOZ_SERVICES_SYNC
% override chrome://browser/skin/sync-horizontalbar.png chrome://browser/skin/yosemite/sync-horizontalbar.png os=Darwin osversion>=10.10
% override chrome://browser/skin/sync-horizontalbar@2x.png chrome://browser/skin/yosemite/sync-horizontalbar@2x.png os=Darwin osversion>=10.10
+#endif
diff --git a/application/basilisk/themes/osx/syncProgress.css b/application/basilisk/themes/osx/syncProgress.css
new file mode 100644
index 000000000..d7aa59976
--- /dev/null
+++ b/application/basilisk/themes/osx/syncProgress.css
@@ -0,0 +1,46 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+@import url(chrome://global/skin/inContentUI.css);
+
+:root {
+ height: 100%;
+ width: 100%;
+ padding: 0;
+}
+
+body {
+ margin: 0;
+ padding: 0 2em;
+}
+
+#floatingBox {
+ margin: 4em auto;
+ max-width: 40em;
+ min-width: 23em;
+ padding: 1em 1.5em;
+ position: relative;
+ text-align: center;
+}
+
+#successLogo {
+ margin: 1em 2em;
+}
+
+#loadingText {
+ margin: 2em 6em;
+}
+
+#progressBar {
+ margin: 2em 10em;
+}
+
+#uploadProgressBar{
+ width: 100%;
+}
+
+#bottomRow {
+ margin-top: 2em;
+ padding: 0;
+ text-align: end;
+}
diff --git a/application/basilisk/themes/osx/syncedtabs/sidebar.css b/application/basilisk/themes/osx/syncedtabs/sidebar.css
deleted file mode 100644
index 4d1de766c..000000000
--- a/application/basilisk/themes/osx/syncedtabs/sidebar.css
+++ /dev/null
@@ -1,154 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-%include ../../shared/syncedtabs/sidebar.inc.css
-
-/* These styles are intended to mimic XUL trees and the XUL search box. */
-
-.content-container {
- -moz-appearance: -moz-mac-source-list;
-}
-
-.item {
- color: -moz-DialogText;
-}
-
-.item-title-container {
- box-sizing: border-box;
- align-items: center;
- height: 24px;
- font-size: 12px;
-}
-
-.item.selected > .item-title-container {
- color: HighlightText;
- font-weight: bold;
-}
-
-.item.selected > .item-title-container {
- -moz-appearance: -moz-mac-source-list-selection;
-}
-
-.item.selected:focus > .item-title-container {
- -moz-appearance: -moz-mac-active-source-list-selection;
-}
-
-.item.client .item-twisty-container {
- min-width: 16px;
- height: 16px;
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded");
-}
-
-@media not all and (-moz-mac-yosemite-theme) {
- .item.client.selected .item-twisty-container {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded-inverted");
- }
-
- .item.client.selected.closed .item-twisty-container {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted");
- }
-
- .item.client.selected .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded-inverted");
- }
-
- .item.client.selected.closed .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted-rtl");
- }
-}
-
-.item.client.closed .item-twisty-container {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed");
-}
-
-.item.client.selected:focus .item-twisty-container {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded-inverted");
-}
-
-.item.client.selected.closed:focus .item-twisty-container {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted");
-}
-
-.item.client .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded");
-}
-
-.item.client.closed .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-rtl");
-}
-
-.item.client.selected:focus .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded-inverted");
-}
-
-.item.client.selected.closed:focus .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted-rtl");
-}
-
-@media (-moz-mac-yosemite-theme) {
- .item.selected > .item-title-container {
- color: -moz-dialogtext;
- font-weight: 500;
- }
-
- .item.selected:focus > .item-title-container {
- color: #fff;
- }
-}
-
-.sidebar-search-container {
- border-bottom: 1px solid #bdbdbd;
-}
-
-.search-box {
- -moz-appearance: searchfield;
- padding: 1px;
- font-size: 12px;
- cursor: text;
- margin: 4px 8px 10px;
- border-width: 3px;
- border-style: solid;
- border-color: currentcolor;
- border-image: none;
- -moz-border-top-colors: transparent #888 #000;
- -moz-border-right-colors: transparent #FFF #000;
- -moz-border-bottom-colors: transparent #FFF #000;
- -moz-border-left-colors: transparent #888 #000;
- border-top-right-radius: 2px;
- border-bottom-left-radius: 2px;
- background-color: #FFF;
- color: #000;
- -moz-user-select: text;
- text-shadow: none;
-}
-
-.search-box.compact > .textbox-input-box > .textbox-search-icons > .textbox-search-clear {
- background-image: url(chrome://global/skin/icons/searchfield-cancel.svg);
- background-repeat: no-repeat;
- background-size: 11px 11px;
- width: 11px;
- height: 11px;
-}
-
-.search-box.compact > .textbox-input-box > .textbox-search-icons > .textbox-search-icon {
- display: none;
-}
-
-.search-box[focused="true"] {
- -moz-border-top-colors: -moz-mac-focusring -moz-mac-focusring #000000;
- -moz-border-right-colors: -moz-mac-focusring -moz-mac-focusring #000000;
- -moz-border-bottom-colors: -moz-mac-focusring -moz-mac-focusring #000000;
- -moz-border-left-colors: -moz-mac-focusring -moz-mac-focusring #000000;
-}
-
-.search-box.compact {
- padding: 0px;
- /* font size is in px because the XUL it was copied from uses px */
- font-size: 11px;
-}
-
-.textbox-search-clear,
-.textbox-search-icon {
- margin-top: 1px;
-}
diff --git a/application/basilisk/themes/shared/browser.inc b/application/basilisk/themes/shared/browser.inc
index 81caf94d6..6989f064a 100644
--- a/application/basilisk/themes/shared/browser.inc
+++ b/application/basilisk/themes/shared/browser.inc
@@ -2,7 +2,7 @@
% Note that zoom-reset-button is a bit different since it doesn't use an image and thus has the image with display: none.
%define nestedButtons #zoom-out-button, #zoom-reset-button, #zoom-in-button, #cut-button, #copy-button, #paste-button
-%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #fullscreen-button, #sync-button, #feed-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button, #email-link-button, #sidebar-button, @nestedButtons@, #e10s-button, #panic-button, #webide-button, #containers-panelmenu
+%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #fullscreen-button, #sync-button, #sync-tabs-button, #feed-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button, #email-link-button, #sidebar-button, @nestedButtons@, #e10s-button, #panic-button, #webide-button, #containers-panelmenu
%ifdef XP_MACOSX
% Prior to 10.7 there wasn't a native fullscreen button so we use #restore-button to exit fullscreen
diff --git a/application/basilisk/themes/shared/customizableui/panelUI.inc.css b/application/basilisk/themes/shared/customizableui/panelUI.inc.css
index ba36da995..5550ef295 100644
--- a/application/basilisk/themes/shared/customizableui/panelUI.inc.css
+++ b/application/basilisk/themes/shared/customizableui/panelUI.inc.css
@@ -61,8 +61,7 @@
height: 13px;
}
-#PanelUI-menu-button[badge-status="download-warning"] > .toolbarbutton-badge-stack > .toolbarbutton-badge,
-#PanelUI-menu-button[badge-status="fxa-needs-authentication"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
+#PanelUI-menu-button[badge-status="download-warning"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
box-shadow: none;
filter: drop-shadow(0 1px 0 hsla(206, 50%, 10%, .15));
}
@@ -86,13 +85,7 @@
background: #D90000;
}
-#PanelUI-menu-button[badge-status="fxa-needs-authentication"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
- height: 13px;
- background: transparent url(chrome://browser/skin/warning.svg) no-repeat center;
-}
-
-#PanelUI-menu-button[badge-status="download-warning"] > .toolbarbutton-badge-stack > .toolbarbutton-badge:-moz-window-inactive,
-#PanelUI-menu-button[badge-status="fxa-needs-authentication"] > .toolbarbutton-badge-stack > .toolbarbutton-badge:-moz-window-inactive {
+#PanelUI-menu-button[badge-status="download-warning"] > .toolbarbutton-badge-stack > .toolbarbutton-badge:-moz-window-inactive {
filter: none;
}
@@ -381,9 +374,6 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"] > iframe {
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-contents-scroller > #PanelUI-contents > .panel-wide-item,
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-contents-scroller > #PanelUI-contents > .toolbarbutton-1:not([panel-multiview-anchor="true"]),
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-update-status,
-#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-fxa > #PanelUI-fxa-status > #PanelUI-fxa-avatar,
-#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-fxa > #PanelUI-fxa-status > #PanelUI-fxa-label,
-#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-fxa > #PanelUI-fxa-icon,
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-inner > toolbarseparator,
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-inner > #PanelUI-customize,
#PanelUI-multiView[viewtype="subview"] #PanelUI-mainView > #PanelUI-footer > #PanelUI-footer-inner > #PanelUI-help:not([panel-multiview-anchor="true"]) {
@@ -481,26 +471,6 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
margin: 0;
}
-#main-window[customizing] #PanelUI-footer-fxa {
- display: none;
-}
-
-#PanelUI-footer-fxa:not([fxastatus="signedin"]) > toolbarseparator,
-#PanelUI-footer-fxa:not([fxastatus="signedin"]) > #PanelUI-fxa-icon,
-#PanelUI-footer-fxa:not([fxaprofileimage]) > #PanelUI-fxa-status > #PanelUI-fxa-avatar {
- display: none;
-}
-
-#PanelUI-footer-fxa[fxastatus="error"] > #PanelUI-fxa-status::after {
- content: url(chrome://browser/skin/warning.svg);
- filter: drop-shadow(0 1px 0 hsla(206,50%,10%,.15));
- width: 47px;
- padding-top: 1px;
- display: block;
- text-align: center;
- position: relative;
- top: 25%;
-}
#PanelUI-update-status[update-status]::after {
content: "";
@@ -523,40 +493,28 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
background-color: #D90000;
}
-#PanelUI-fxa-status {
- display: flex;
- flex: 1 1 0%;
- width: 1px;
-}
-
-#PanelUI-footer-inner,
-#PanelUI-footer-fxa:not([hidden]) {
+#PanelUI-footer-inner {
display: flex;
border-top: 1px solid var(--panel-separator-color);
}
-#PanelUI-multiView[viewtype="subview"] #PanelUI-footer-inner,
-#PanelUI-multiView[viewtype="subview"] #PanelUI-footer-fxa {
+#PanelUI-multiView[viewtype="subview"] #PanelUI-footer-inner {
position: relative;
}
-#PanelUI-footer-inner > toolbarseparator,
-#PanelUI-footer-fxa > toolbarseparator {
+#PanelUI-footer-inner > toolbarseparator {
border: 0;
border-left: 1px solid var(--panel-separator-color);
margin: 7px 0 7px;
-moz-appearance: none;
}
-#PanelUI-footer-inner:hover > toolbarseparator,
-#PanelUI-footer-fxa:hover > toolbarseparator {
+#PanelUI-footer-inner:hover > toolbarseparator {
margin: 0;
}
#PanelUI-update-status,
#PanelUI-help,
-#PanelUI-fxa-label,
-#PanelUI-fxa-icon,
#PanelUI-customize,
#PanelUI-quit {
margin: 0;
@@ -590,7 +548,6 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
}
#PanelUI-update-status > .toolbarbutton-text,
-#PanelUI-fxa-label > .toolbarbutton-text,
#PanelUI-customize > .toolbarbutton-text {
margin: 0;
padding: 0 6px;
@@ -598,37 +555,23 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
}
#PanelUI-help > .toolbarbutton-text,
-#PanelUI-quit > .toolbarbutton-text,
-#PanelUI-fxa-avatar > .toolbarbutton-text {
+#PanelUI-quit > .toolbarbutton-text {
display: none;
}
#PanelUI-update-status > .toolbarbutton-icon,
-#PanelUI-fxa-label > .toolbarbutton-icon,
-#PanelUI-fxa-icon > .toolbarbutton-icon,
#PanelUI-customize > .toolbarbutton-icon,
#PanelUI-help > .toolbarbutton-icon,
#PanelUI-quit > .toolbarbutton-icon {
margin-inline-end: 0;
}
-#PanelUI-fxa-icon {
- padding-inline-start: 15px;
- padding-inline-end: 15px;
-}
-
-#PanelUI-fxa-label,
#PanelUI-customize {
flex: 1;
padding-inline-start: 15px;
border-inline-start-style: none;
}
-#PanelUI-footer-fxa[fxaprofileimage="set"] > #PanelUI-fxa-status > #PanelUI-fxa-label,
-#PanelUI-footer-fxa[fxaprofileimage="enabled"]:not([fxastatus="error"]) > #PanelUI-fxa-status > #PanelUI-fxa-label {
- padding-inline-start: 0px;
-}
-
#PanelUI-update-status {
width: calc(@menuPanelWidth@ + 30px);
padding-inline-start: 15px;
@@ -639,130 +582,6 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
list-style-image: url(chrome://branding/content/icon16.png);
}
-#PanelUI-fxa-label,
-#PanelUI-fxa-icon {
- list-style-image: url(chrome://browser/skin/sync-horizontalbar.png);
-}
-
-#PanelUI-remotetabs {
- --panel-ui-sync-illustration-height: 157.5px;
-}
-
-.PanelUI-remotetabs-instruction-title,
-.PanelUI-remotetabs-instruction-label,
-#PanelUI-remotetabs-mobile-promo {
- /* If you change the margin here, the min-height of the synced tabs panel
- (e.g. #PanelUI-remotetabs[mainview] #PanelUI-remotetabs-setupsync, etc) may
- need adjusting (see bug 1248506) */
- margin: 15px;
- text-align: center;
- text-shadow: none;
- max-width: 15em;
- color: GrayText;
-}
-
-.PanelUI-remotetabs-instruction-title {
- font-size: 1.3em;
-}
-
-/* The boxes with "instructions" get extra top and bottom padding for space
- around the illustration and buttons */
-.PanelUI-remotetabs-instruction-box {
- /* If you change the padding here, the min-height of the synced tabs panel
- (e.g. #PanelUI-remotetabs[mainview] #PanelUI-remotetabs-setupsync, etc) may
- need adjusting (see bug 1248506) */
- padding-bottom: 30px;
- padding-top: 15px;
-}
-
-.PanelUI-remotetabs-prefs-button {
- -moz-appearance: none;
- background-color: #0096dd;
- /* !important for the color as an OSX specific rule when a lightweight theme
- is used for buttons in the toolbox overrides. See bug 1238531 for details */
- color: white !important;
- border-radius: 2px;
- /* If you change the margin or padding below, the min-height of the synced tabs
- panel (e.g. #PanelUI-remotetabs[mainview] #PanelUI-remotetabs-setupsync,
- etc) may need adjusting (see bug 1248506) */
- margin-top: 10px;
- margin-bottom: 10px;
- padding: 8px;
- text-shadow: none;
- min-width: 200px;
-}
-
-.PanelUI-remotetabs-prefs-button:hover,
-.PanelUI-remotetabs-prefs-button:hover:active {
- background-color: #018acb;
-}
-
-.remotetabs-promo-link {
- margin: 0;
-}
-
-.PanelUI-remotetabs-notabsforclient-label {
- color: GrayText;
- /* This margin is to line this label up with the labels in toolbarbuttons. */
- margin-left: 28px;
-}
-
-.fxaSyncIllustration {
- height: var(--panel-ui-sync-illustration-height);
- list-style-image: url(chrome://browser/skin/fxa/sync-illustration.svg);
-}
-
-.PanelUI-remotetabs-prefs-button > .toolbarbutton-text {
- /* !important to override ".cui-widget-panel toolbarbutton > .toolbarbutton-text" above. */
- text-align: center !important;
- text-shadow: none;
-}
-
-#PanelUI-remotetabs[mainview] { /* panel anchored to toolbar button might be too skinny */
- min-width: 19em;
-}
-
-/* Work around bug 1224412 - these boxes will cause scrollbars to appear when
- the panel is anchored to a toolbar button.
-*/
-#PanelUI-remotetabs[mainview] #PanelUI-remotetabs-setupsync,
-#PanelUI-remotetabs[mainview] #PanelUI-remotetabs-reauthsync,
-#PanelUI-remotetabs[mainview] #PanelUI-remotetabs-nodevicespane,
-#PanelUI-remotetabs[mainview] #PanelUI-remotetabs-tabsdisabledpane {
- min-height: calc(var(--panel-ui-sync-illustration-height) +
- 20px + /* margin of .PanelUI-remotetabs-prefs-button */
- 16px + /* padding of .PanelUI-remotetabs-prefs-button */
- 30px + /* margin of .PanelUI-remotetabs-instruction-label */
- 30px + 15px + /* padding of .PanelUI-remotetabs-instruction-box */
- 11em);
-}
-
-#PanelUI-remotetabs-tabslist > label[itemtype="client"] {
- color: GrayText;
-}
-
-/* Collapse the non-active vboxes in the remotetabs deck to use only the
- height the active box needs */
-#PanelUI-remotetabs-deck:not([selectedIndex="1"]) > #PanelUI-remotetabs-tabsdisabledpane,
-#PanelUI-remotetabs-deck:not([selectedIndex="2"]) > #PanelUI-remotetabs-fetching,
-#PanelUI-remotetabs-deck:not([selectedIndex="3"]) > #PanelUI-remotetabs-nodevicespane {
- visibility: collapse;
-}
-
-#PanelUI-remotetabs-main[devices-status="single"] > #PanelUI-remotetabs-buttons {
- display: none;
-}
-
-#PanelUI-fxa-icon[syncstatus="active"]:not([disabled]) {
- list-style-image: url(chrome://browser/skin/syncProgress-horizontalbar.png);
-}
-
-#PanelUI-footer-fxa[fxastatus="migrate-signup"] > #PanelUI-fxa-status > #PanelUI-fxa-label,
-#PanelUI-footer-fxa[fxastatus="migrate-verify"] > #PanelUI-fxa-status > #PanelUI-fxa-label {
- list-style-image: url(chrome://browser/skin/warning.svg);
- -moz-image-region: auto;
-}
-
#PanelUI-customize {
list-style-image: url(chrome://browser/skin/menuPanel-customize.png);
}
@@ -780,46 +599,12 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
list-style-image: url(chrome://browser/skin/menuPanel-exit.png);
}
-#PanelUI-fxa-label,
-#PanelUI-fxa-icon,
#PanelUI-customize,
#PanelUI-help,
#PanelUI-quit {
-moz-image-region: rect(0, 16px, 16px, 0);
}
-#PanelUI-footer-fxa[fxastatus="signedin"] > #PanelUI-fxa-status > #PanelUI-fxa-label > .toolbarbutton-icon,
-#PanelUI-footer-fxa[fxastatus="error"][fxaprofileimage="set"] > #PanelUI-fxa-status > #PanelUI-fxa-label > .toolbarbutton-icon {
- display: none;
-}
-
-#PanelUI-footer-fxa[fxastatus="error"]:not([fxaprofileimage="set"]) > #PanelUI-fxa-status > #PanelUI-fxa-avatar {
- display: none;
-}
-
-#PanelUI-fxa-status[disabled],
-#PanelUI-fxa-icon[disabled] {
- pointer-events: none;
-}
-
-#PanelUI-fxa-avatar {
- width: 32px;
- height: 32px;
- border-radius: 50%;
- background-repeat: no-repeat;
- background-position: 0 0;
- background-size: contain;
- align-self: center;
- margin: 0px 7px;
- padding: 0px;
- border: 0px none;
- margin-inline-end: 0;
-}
-
-#PanelUI-footer-fxa[fxaprofileimage="enabled"] > #PanelUI-fxa-status > #PanelUI-fxa-avatar {
- list-style-image: url(chrome://browser/skin/fxa/default-avatar.svg);
-}
-
#PanelUI-customize:hover,
#PanelUI-help:not([disabled]):hover,
#PanelUI-quit:not([disabled]):hover {
@@ -837,16 +622,10 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
}
#PanelUI-help[disabled],
-#PanelUI-quit[disabled],
-#PanelUI-fxa-icon[disabled],
-#PanelUI-fxa-avatar[disabled],
-#PanelUI-fxa-label[disabled] > .toolbarbutton-icon,
-#PanelUI-fxa-status::after {
+#PanelUI-quit[disabled] {
opacity: 0.4;
}
-#PanelUI-fxa-status:not([disabled]):hover,
-#PanelUI-fxa-icon:not([disabled]):hover,
#PanelUI-help:not([disabled]):hover,
#PanelUI-customize:hover,
#PanelUI-quit:not([disabled]):hover {
@@ -854,8 +633,6 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
background-color: var(--arrowpanel-dimmed);
}
-#PanelUI-fxa-status:not([disabled]):hover:active,
-#PanelUI-fxa-icon:not([disabled]):hover:active,
#PanelUI-help:not([disabled]):hover:active,
#PanelUI-customize:hover:active,
#PanelUI-quit:not([disabled]):hover:active {
@@ -864,27 +641,6 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
}
-#PanelUI-fxa-status:not([disabled]):hover,
-#PanelUI-fxa-status:not([disabled]):hover:active,
-#PanelUI-fxa-icon:not([disabled]):hover,
-#PanelUI-fxa-icon:not([disabled]):hover:active {
- outline: none;
-}
-
-#PanelUI-footer-fxa[fxastatus="error"] {
- background-color: hsl(42,94%,88%);
- border-top: 1px solid hsl(42,94%,70%);
-}
-
-#PanelUI-footer-fxa[fxastatus="error"] > #PanelUI-fxa-status:hover {
- background-color: hsl(42,94%,85%);
-}
-
-#PanelUI-footer-fxa[fxastatus="error"] > #PanelUI-fxa-status:hover:active {
- background-color: hsl(42,94%,82%);
- box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
-}
-
#PanelUI-update-status {
color: black;
}
@@ -1150,19 +906,16 @@ menuitem.panel-subview-footer@menuStateActive@,
color: GrayText;
}
-#PanelUI-remotetabs-tabslist > toolbarbutton,
#PanelUI-historyItems > toolbarbutton {
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
}
@media (min-resolution: 1.1dppx) {
- #PanelUI-remotetabs-tabslist > toolbarbutton,
#PanelUI-historyItems > toolbarbutton {
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon@2x.png");
}
}
-#PanelUI-remotetabs-tabslist > toolbarbutton > .toolbarbutton-icon,
#PanelUI-recentlyClosedWindows > toolbarbutton > .toolbarbutton-icon,
#PanelUI-recentlyClosedTabs > toolbarbutton > .toolbarbutton-icon,
#PanelUI-historyItems > toolbarbutton > .toolbarbutton-icon {
@@ -1616,15 +1369,6 @@ menuitem[checked="true"].subviewbutton > .menu-iconic-left {
list-style-image: url(chrome://branding/content/icon32.png);
}
- #PanelUI-fxa-label,
- #PanelUI-fxa-icon {
- list-style-image: url(chrome://browser/skin/sync-horizontalbar@2x.png);
- }
-
- #PanelUI-fxa-icon[syncstatus="active"]:not([disabled]) {
- list-style-image: url(chrome://browser/skin/syncProgress-horizontalbar@2x.png);
- }
-
#PanelUI-customize {
list-style-image: url(chrome://browser/skin/menuPanel-customize@2x.png);
}
@@ -1641,8 +1385,6 @@ menuitem[checked="true"].subviewbutton > .menu-iconic-left {
list-style-image: url(chrome://browser/skin/menuPanel-exit@2x.png);
}
- #PanelUI-fxa-label,
- #PanelUI-fxa-icon,
#PanelUI-customize,
#PanelUI-help,
#PanelUI-quit {
@@ -1650,8 +1392,6 @@ menuitem[checked="true"].subviewbutton > .menu-iconic-left {
}
#PanelUI-update-status > .toolbarbutton-icon,
- #PanelUI-fxa-label > .toolbarbutton-icon,
- #PanelUI-fxa-icon > .toolbarbutton-icon,
#PanelUI-customize > .toolbarbutton-icon,
#PanelUI-help > .toolbarbutton-icon,
#PanelUI-quit > .toolbarbutton-icon {
diff --git a/application/basilisk/themes/shared/incontentprefs/containers.css b/application/basilisk/themes/shared/incontentprefs/containers.css
deleted file mode 100644
index 5446dccce..000000000
--- a/application/basilisk/themes/shared/incontentprefs/containers.css
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-%include ../../../components/contextualidentity/content/usercontext.css
-
-.container-header-links {
- margin-block-end: 15px;
-}
-
-[data-identity-icon] {
- margin: 0;
- margin-inline-end: 16px;
-}
-
-#containersView {
- border: 0 none;
- background: transparent;
-}
-
-#containersView richlistitem {
- margin: 0px;
- margin-inline-end: 8px;
- padding: 0;
- padding-block-end: 8px;
- border-block-end: 1px solid var(--in-content-header-border-color);
-}
-
-#containersView richlistitem:last-of-type {
- border-block-end: 0 none;
- margin-block-end: 8px;
-}
diff --git a/application/basilisk/themes/shared/incontentprefs/preferences.inc.css b/application/basilisk/themes/shared/incontentprefs/preferences.inc.css
index 0e62660de..20ea98327 100644
--- a/application/basilisk/themes/shared/incontentprefs/preferences.inc.css
+++ b/application/basilisk/themes/shared/incontentprefs/preferences.inc.css
@@ -237,8 +237,7 @@ treecol {
/* Privacy pane */
#trackingProtectionPBMLearnMore,
-#trackingProtectionLearnMore,
-#browserContainersLearnMore {
+#trackingProtectionLearnMore {
margin-inline-start: 1.5em !important;
margin-top: 0;
font-weight: normal;
diff --git a/application/basilisk/themes/shared/jar.inc.mn b/application/basilisk/themes/shared/jar.inc.mn
index 361edd311..5750d2dc5 100644
--- a/application/basilisk/themes/shared/jar.inc.mn
+++ b/application/basilisk/themes/shared/jar.inc.mn
@@ -73,8 +73,6 @@
skin/classic/browser/preferences/in-content/favicon.ico (../shared/incontentprefs/favicon.ico)
skin/classic/browser/preferences/in-content/icons.svg (../shared/incontentprefs/icons.svg)
skin/classic/browser/preferences/in-content/search.css (../shared/incontentprefs/search.css)
-* skin/classic/browser/preferences/in-content/containers.css (../shared/incontentprefs/containers.css)
-* skin/classic/browser/preferences/containers.css (../shared/preferences/containers.css)
skin/classic/browser/fxa/default-avatar.svg (../shared/fxa/default-avatar.svg)
skin/classic/browser/fxa/logo.png (../shared/fxa/logo.png)
skin/classic/browser/fxa/logo@2x.png (../shared/fxa/logo@2x.png)
diff --git a/application/basilisk/themes/shared/menupanel.inc.css b/application/basilisk/themes/shared/menupanel.inc.css
index 266e1c83e..da2f07e1e 100644
--- a/application/basilisk/themes/shared/menupanel.inc.css
+++ b/application/basilisk/themes/shared/menupanel.inc.css
@@ -48,10 +48,29 @@ toolbarpaletteitem[place="palette"] > #save-page-button {
-moz-image-region: rect(0px, 352px, 32px, 320px);
}
+%ifdef MOZ_SERVICES_SYNC
#sync-button[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #sync-button {
+ -moz-image-region: rect(0px, 384px, 32px, 352px)
+}
+
+#sync-button[cui-areatype="menu-panel"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-menuPanel.png");
+ -moz-image-region: rect(0, 32px, 32px, 0);
+}
+
+@media (min-resolution: 1.1dppx) {
+ #sync-button[cui-areatype="menu-panel"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-menuPanel@2x.png");
+ -moz-image-region: rect(0, 64px, 64px, 0);
+ }
+}
+
+#sync-tabs-button[cui-areatype="menu-panel"],
+toolbarpaletteitem[place="palette"] > #sync-tabs-button {
-moz-image-region: rect(0px, 1024px, 32px, 992px);
}
+%endif
#containers-panelmenu[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #containers-panelmenu {
diff --git a/application/basilisk/themes/shared/preferences/containers.css b/application/basilisk/themes/shared/preferences/containers.css
deleted file mode 100644
index 3fb965331..000000000
--- a/application/basilisk/themes/shared/preferences/containers.css
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-%include ../../../components/contextualidentity/content/usercontext.css
-
-:root {
- --preference-selected-color: #0996f8;
- --preference-unselected-color: #333;
- --preference-active-color: #858585;
-}
-
-radiogroup {
- display: flex;
- margin-inline-start: 0.35rem;
-}
-
-radio {
- flex: auto;
- display: flex;
- align-items: center;
- justify-content: center;
- -moz-user-select: none;
- outline: 2px solid transparent;
- outline-offset: 4px;
- -moz-outline-radius: 100%;
- min-block-size: 24px;
- min-inline-size: 24px;
- border-radius: 50%;
- padding: 2px;
- margin: 10px;
-}
-
-.icon-buttons > radio > [data-identity-icon] {
- fill: #4d4d4d;
-}
-
-radio > [data-identity-icon] {
- inline-size: 22px;
- block-size: 22px;
-}
-
-radio[selected=true] {
- outline-color: var(--preference-unselected-color);
-}
-
-radio[focused=true] {
- outline-color: var(--preference-selected-color);
-}
-
-radio:hover:active {
- outline-color: var(--preference-active-color);
-}
diff --git a/application/basilisk/themes/shared/syncedtabs/sidebar.inc.css b/application/basilisk/themes/shared/syncedtabs/sidebar.inc.css
deleted file mode 100644
index 4e76a7fc5..000000000
--- a/application/basilisk/themes/shared/syncedtabs/sidebar.inc.css
+++ /dev/null
@@ -1,234 +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/.
-
-/* These styles are intended to mimic XUL trees and the XUL search box. */
-
-html {
- height: 100%;
-}
-
-body {
- height: 100%;
- margin: 0;
- font: message-box;
- color: #333333;
- -moz-user-select: none;
-}
-
-/* The content-container holds the non-scrollable header and the scrollable
- content area.
-*/
-.content-container {
- display: flex;
- flex-flow: column;
- height: 100%;
-}
-
-/* The content header is not scrollable */
-.content-header {
- flex: 0 1 auto;
-}
-
-/* The main content area is scrollable and fills the rest of the area */
-.content-scrollable {
- flex: 1 1 auto;
- overflow: auto;
-}
-
-.emptyListInfo {
- cursor: default;
- padding: 3em 1em;
- text-align: center;
-}
-
-.list,
-.item-tabs-list {
- display: flex;
- flex-flow: column;
- flex-grow: 1;
-}
-
-.item.client {
- opacity: 1;
- max-height: unset;
- display: unset;
-}
-
-.item.client.closed .item-tabs-list {
- display: none;
-}
-
-.item {
- display: inline-block;
- opacity: 1;
- flex: 1;
- min-width: 0;
- white-space: nowrap;
- overflow: hidden;
- outline: none;
- color: -moz-FieldText;
-}
-
-.item.selected > .item-title-container {
- background-color: -moz-cellhighlight;
- color: -moz-cellhighlighttext;
- font-weight: bold;
-}
-
-.item.selected:focus > .item-title-container {
- background-color: Highlight;
- color: HighlightText;
-}
-
-.client .item.tab > .item-title-container {
- padding-inline-start: 35px;
-}
-
-.item.tab > .item-title-container {
- padding-inline-start: 20px;
-}
-
-.item.client.device-image-desktop > .item-title-container > .item-icon-container {
- background-image: url("chrome://browser/skin/sync-desktopIcon.svg#icon");
-}
-
-.item.client.device-image-desktop.selected:focus > .item-title-container > .item-icon-container {
- background-image: url("chrome://browser/skin/sync-desktopIcon.svg#icon-inverted");
-}
-
-.item.client.device-image-mobile > .item-title-container > .item-icon-container {
- background-image: url("chrome://browser/skin/sync-mobileIcon.svg#icon");
-}
-
-.item.client.device-image-mobile.selected:focus > .item-title-container > .item-icon-container {
- background-image: url("chrome://browser/skin/sync-mobileIcon.svg#icon-inverted");
-}
-
-.item.tab > .item-title-container > .item-icon-container {
- background-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
-}
-
-@media (min-resolution: 1.1dppx) {
-.item.tab > .item-title-container > .item-icon-container {
- background-image: url("chrome://mozapps/skin/places/defaultFavicon@2x.png");
- }
-}
-
-.item-icon-container {
- min-width: 16px;
- max-width: 16px;
- min-height: 16px;
- max-height: 16px;
- margin-right: 5px;
- margin-left: 5px;
- background-size: 16px 16px;
- background-size: contain;
- background-repeat: no-repeat;
- background-position: center;
-}
-
-.item-title-container {
- display: flex;
- flex-flow: row;
- overflow: hidden;
- flex-grow: 1;
- padding: 1px 0px 1px 0px;
-}
-
-.item-title {
- flex-grow: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- margin: 0px;
- line-height: 1.3;
- cursor: default;
-}
-
-.item[hidden] {
- opacity: 0;
- max-height: 0;
- transition: opacity 150ms ease-in-out, max-height 150ms ease-in-out 150ms;
-}
-
-.item.empty .item-title-container {
- color: #aeaeae;
-}
-
-.client .item.empty > .item-title-container {
- padding-inline-start: 35px;
-}
-
-.text-input-box {
- display: flex;
- flex-flow: row nowrap;
-}
-
-.textbox-input-box {
- display: flex;
- flex-direction: row;
-}
-
-.tabsFilter {
- flex: 1;
- /* min-width of anything to override the implicit "-moz-min-content" value.
- 0px is safe as the sidebar itself has a constrained size meaning we will
- never actually hit this minimum
- */
- min-width: 0px;
-}
-
-.sync-state > p {
- padding-inline-end: 10px;
- padding-inline-start: 10px;
- color: #888;
-}
-
-.text-link {
- color: rgb(0, 149, 221);
- cursor: pointer;
-}
-
-.text-link:hover {
- text-decoration: underline;
-}
-
-.text-link,
-.text-link:focus {
- margin: 0px;
- padding: 0px;
- border: 0px;
-}
-
-.deck .sync-state {
- display: none;
- opacity: 0;
- transition: opacity 1.5s;
- border-top: 1px solid #bdbdbd;
-}
-
-.deck .sync-state.tabs-container {
- border-top: 0px;
-}
-
-.deck .sync-state.selected {
- display: unset;
- opacity: 100;
-}
-
-.sidebar-search-container.tabs-container:not(.selected) {
- display: none;
-}
-
-.textbox-search-clear:not([disabled]) {
- cursor: default;
-}
-
-.textbox-search-icons .textbox-search-clear,
-.filtered .textbox-search-icons .textbox-search-icon {
- display: none;
-}
-
-.filtered .textbox-search-icons .textbox-search-clear {
- display: block;
-}
diff --git a/application/basilisk/themes/shared/toolbarbuttons.inc.css b/application/basilisk/themes/shared/toolbarbuttons.inc.css
index c043b8192..8992bfcb1 100644
--- a/application/basilisk/themes/shared/toolbarbuttons.inc.css
+++ b/application/basilisk/themes/shared/toolbarbuttons.inc.css
@@ -52,9 +52,32 @@ toolbar[brighttext] #bookmarks-menu-button > .toolbarbutton-menubutton-dropmarke
-moz-image-region: rect(0, 252px, 18px, 234px);
}
+%ifdef MOZ_SERVICES_SYNC
#sync-button[cui-areatype="toolbar"] {
+ -moz-image-region: rect(0, 270px, 18px, 252px);
+}
+
+#sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar.png");
+ -moz-image-region: rect(0, 18px, 18px, 0);
+}
+
+@media (-moz-os-version: windows-win7) {
+ #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-win7.png");
+ -moz-image-region: rect(0, 18px, 18px, 0);
+ }
+}
+
+toolbar[brighttext] #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-inverted.png");
+ -moz-image-region: rect(0, 18px, 18px, 0);
+}
+
+#sync-tabs-button[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 792px, 18px, 774px);
}
+%endif
#containers-panelmenu[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 810px, 18px, 792px);
@@ -226,9 +249,32 @@ toolbar[brighttext] #bookmarks-menu-button > .toolbarbutton-menubutton-dropmarke
-moz-image-region: rect(0, 504px, 36px, 468px);
}
+%ifdef MOZ_SERVICES_SYNC
#sync-button[cui-areatype="toolbar"] {
+ -moz-image-region: rect(0, 540px, 36px, 504px);
+ }
+
+ #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar@2x.png");
+ -moz-image-region: rect(0, 36px, 36px, 0);
+ }
+
+ @media (-moz-os-version: windows-win7) {
+ #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-win7@2x.png");
+ -moz-image-region: rect(0, 36px, 36px, 0);
+ }
+ }
+
+ toolbar[brighttext] #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-inverted@2x.png");
+ -moz-image-region: rect(0, 36px, 36px, 0);
+ }
+
+ #sync-tabs-button[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 1584px, 36px, 1548px);
}
+%endif
#containers-panelmenu[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 1620px, 36px, 1584px);
diff --git a/application/basilisk/themes/windows/jar.mn b/application/basilisk/themes/windows/jar.mn
index e8db7eed2..28c6c6465 100644
--- a/application/basilisk/themes/windows/jar.mn
+++ b/application/basilisk/themes/windows/jar.mn
@@ -7,8 +7,9 @@ browser.jar:
#include ../shared/jar.inc.mn
skin/classic/browser/sanitizeDialog.css
skin/classic/browser/aboutSessionRestore-window-icon.png
+#ifdef MOZ_SERVICES_SYNC
skin/classic/browser/aboutSyncTabs.css
-* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
+#endif
skin/classic/browser/actionicon-tab.png
skin/classic/browser/actionicon-tab@2x.png
skin/classic/browser/actionicon-tab-win7.png
@@ -141,6 +142,7 @@ browser.jar:
skin/classic/browser/tabbrowser/tab-stroke-start.png (tabbrowser/tab-stroke-start.png)
skin/classic/browser/tabbrowser/tab-stroke-start@2x.png (tabbrowser/tab-stroke-start@2x.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
+#ifdef MOZ_SERVICES_SYNC
skin/classic/browser/sync-16.png
skin/classic/browser/sync-32.png
skin/classic/browser/sync-128.png
@@ -167,6 +169,8 @@ browser.jar:
skin/classic/browser/syncProgress-toolbar-inverted@2x.png
skin/classic/browser/syncProgress-toolbar-win7.png
skin/classic/browser/syncProgress-toolbar-win7@2x.png
+ skin/classic/browser/syncProgress.css
+#endif
[extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar:
% override chrome://browser/skin/page-livemarks.png chrome://browser/skin/feeds/feedIcon16.png
@@ -182,12 +186,14 @@ browser.jar:
% override chrome://browser/skin/privatebrowsing-mask-titlebar.png chrome://browser/skin/privatebrowsing-mask-titlebar-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/reload-stop-go.png chrome://browser/skin/reload-stop-go-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/reload-stop-go@2x.png chrome://browser/skin/reload-stop-go-win7@2x.png os=WINNT osversion<=6.1
+#ifdef MOZ_SERVICES_SYNC
% override chrome://browser/skin/sync-horizontalbar.png chrome://browser/skin/sync-horizontalbar-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/sync-horizontalbar@2x.png chrome://browser/skin/sync-horizontalbar-win7@2x.png os=WINNT osversion<=6.1
% override chrome://browser/skin/syncProgress-horizontalbar.png chrome://browser/skin/syncProgress-horizontalbar-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/syncProgress-horizontalbar@2x.png chrome://browser/skin/syncProgress-horizontalbar-win7@2x.png os=WINNT osversion<=6.1
% override chrome://browser/skin/syncProgress-toolbar.png chrome://browser/skin/syncProgress-toolbar-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/syncProgress-toolbar@2x.png chrome://browser/skin/syncProgress-toolbar-win7@2x.png os=WINNT osversion<=6.1
+#endif
% override chrome://browser/skin/toolbarbutton-dropdown-arrow.png chrome://browser/skin/toolbarbutton-dropdown-arrow-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/urlbar-history-dropmarker.png chrome://browser/skin/urlbar-history-dropmarker-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/urlbar-history-dropmarker@2x.png chrome://browser/skin/urlbar-history-dropmarker-win7@2x.png os=WINNT osversion<=6.1
diff --git a/application/basilisk/themes/windows/syncProgress.css b/application/basilisk/themes/windows/syncProgress.css
new file mode 100644
index 000000000..d7aa59976
--- /dev/null
+++ b/application/basilisk/themes/windows/syncProgress.css
@@ -0,0 +1,46 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+@import url(chrome://global/skin/inContentUI.css);
+
+:root {
+ height: 100%;
+ width: 100%;
+ padding: 0;
+}
+
+body {
+ margin: 0;
+ padding: 0 2em;
+}
+
+#floatingBox {
+ margin: 4em auto;
+ max-width: 40em;
+ min-width: 23em;
+ padding: 1em 1.5em;
+ position: relative;
+ text-align: center;
+}
+
+#successLogo {
+ margin: 1em 2em;
+}
+
+#loadingText {
+ margin: 2em 6em;
+}
+
+#progressBar {
+ margin: 2em 10em;
+}
+
+#uploadProgressBar{
+ width: 100%;
+}
+
+#bottomRow {
+ margin-top: 2em;
+ padding: 0;
+ text-align: end;
+}
diff --git a/application/basilisk/themes/windows/syncedtabs/sidebar.css b/application/basilisk/themes/windows/syncedtabs/sidebar.css
deleted file mode 100644
index 6473206bc..000000000
--- a/application/basilisk/themes/windows/syncedtabs/sidebar.css
+++ /dev/null
@@ -1,132 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-%include ../../shared/syncedtabs/sidebar.inc.css
-
-/* These styles are intended to mimic XUL trees and the XUL search box. */
-
-html {
- background-color: #EEF3FA;
-}
-
-.item {
- padding-inline-end: 0;
-}
-
-.item-title {
- margin: 1px 0 0;
-}
-
-.item-title {
- margin-inline-end: 6px;
-}
-
-.search-box {
- -moz-appearance: textfield;
- cursor: text;
- margin: 2px 4px;
- padding: 2px 2px 3px;
- padding-inline-start: 4px;
- color: -moz-FieldText;
-}
-
-.textbox-search-icon {
- width: 16px;
- height: 16px;
- background-image: url(chrome://global/skin/icons/Search-glass.png);
- background-repeat: no-repeat;
- display: block;
-}
-
-.textbox-search-icon:-moz-locale-dir(rtl) {
- transform: scaleX(-1);
-}
-
-.textbox-search-icon[searchbutton]:not([disabled]) {
- cursor: pointer;
-}
-
-.textbox-search-clear {
- width: 16px;
- height: 16px;
- background-image: url(chrome://global/skin/icons/Search-close.png);
- background-repeat: no-repeat;
-}
-
-.textbox-search-clear:not([disabled]) {
- cursor: default;
-}
-
-.textbox-search-icon:not([disabled]) {
- cursor: text;
-}
-
-.textbox-search-clear:not([disabled]):hover ,
-.textbox-search-icon:not([disabled]):hover {
- background-position: -16px 0;
-}
-
-.textbox-search-clear:not([disabled]):hover:active ,
-.textbox-search-icon:not([disabled]):hover:active {
- background-position: -32px 0;
-}
-
-.client .item.tab > .item-title-container {
- padding-inline-start: 26px;
-}
-.item.tab > .item-title-container {
- padding-inline-start: 14px;
-}
-
-.item-icon-container {
- min-width: 16px;
- max-width: 16px;
- min-height: 16px;
- max-height: 16px;
- margin-right: 5px;
- background-size: 16px 16px;
- background-repeat: no-repeat;
- background-position: center;
-}
-
-.item-twisty-container {
- background-size: contain;
- background-repeat: no-repeat;
- background-position: center;
- padding-top: 5px;
- min-width: 9px; /* The image's width is 9 pixels */
- height: 9px;
-}
-
-.item.client .item-twisty-container {
- background-image: url("chrome://global/skin/tree/twisty.svg#open");
-}
-
-.item.client.closed .item-twisty-container {
- background-image: url("chrome://global/skin/tree/twisty.svg#clsd");
-}
-
-.item.client .item-twisty-container:hover {
- background-image: url("chrome://global/skin/tree/twisty.svg#open-hover");
-}
-
-.item.client.closed .item-twisty-container:hover {
- background-image: url("chrome://global/skin/tree/twisty.svg#clsd-hover");
-}
-
-.item.client .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/twisty.svg#open-rtl");
-}
-
-.item.client.closed .item-twisty-container:dir(rtl) {
- background-image: url("chrome://global/skin/tree/twisty.svg#clsd-rtl");
-}
-
-.item.client .item-twisty-container:hover:dir(rtl) {
- background-image: url("chrome://global/skin/tree/twisty.svg#open-hover-rtl");
-}
-
-.item.client.closed .item-twisty-container:hover:dir(rtl) {
- background-image: url("chrome://global/skin/tree/twisty.svg#clsd-hover-rtl");
-}
diff --git a/application/palemoon/app/blocklist.xml b/application/palemoon/app/blocklist.xml
index d55784169..fa594aabe 100644
--- a/application/palemoon/app/blocklist.xml
+++ b/application/palemoon/app/blocklist.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<blocklist lastupdate="1534840140000"
+<blocklist lastupdate="1554898538000"
xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i545" id="superlrcs@svenyor.net">
@@ -2524,6 +2524,11 @@ xmlns="http://www.mozilla.org/2006/addons-blocklist">
</versionRange>
<prefs></prefs>
</emItem>
+ <emItem blockID="pm114" id="jid1-KKzOGWgsW3Ao4Q@jetpack">
+ <versionRange minVersion="2.9.9" maxVersion="2.9.9" severity="3">
+ </versionRange>
+ <prefs></prefs>
+ </emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p26">
diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js
index f514d9bb9..bd1b62cc3 100644
--- a/application/palemoon/app/profile/palemoon.js
+++ b/application/palemoon/app/profile/palemoon.js
@@ -1089,8 +1089,6 @@ pref("browser.pagethumbnails.capturing_disabled", false);
// enables showing basic placeholders for missing thumbnails
pref("browser.newtabpage.thumbnailPlaceholder", false);
-pref("privacy.usercontext.about_newtab_segregation.enabled", false);
-
// number of columns of newtab grid
pref("browser.newtabpage.columns", 4);
@@ -1163,6 +1161,14 @@ pref("toolkit.pageThumbs.minHeight", 180);
pref("ui.key.menuAccessKeyFocuses", true);
#endif
+// When a user cancels this number of authentication dialogs coming from
+// a single web page (eTLD+1) in a row, all following authentication dialogs
+// will be blocked (automatically canceled) for that page.
+// This counter is per-tab and per-domain to minimize false positives.
+// The counter resets when the page is reloaded from the UI
+// (content-reloads do NOT clear this to mitigate reloading tricks).
+pref("prompts.authentication_dialog_abuse_limit", 3);
+
// ****************** s4e prefs ******************
pref("status4evar.addonbar.borderStyle", false);
pref("status4evar.addonbar.closeButton", false);
diff --git a/application/palemoon/base/content/aboutDialog.css b/application/palemoon/base/content/aboutDialog.css
index d171a0bc1..d96eba5a2 100644
--- a/application/palemoon/base/content/aboutDialog.css
+++ b/application/palemoon/base/content/aboutDialog.css
@@ -2,56 +2,53 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#PMaboutDialog {
- width: 620px;
+#aboutPMDialogContainer {
+ width: 700px;
+ height: 410px;
}
-#PMrightBox {
- background-image: url("chrome://branding/content/about-wordmark.png");
- background-repeat: no-repeat;
- /* padding-top creates room for the wordmark */
- padding-top: 38px;
- margin-top:20px;
+#aboutVersionBox {
+ font-family: Arial, helvetica;
+ height: 38 px;
}
-#PMrightBox:-moz-locale-dir(rtl) {
- background-position: 100% 0;
-}
-
-#PMbottomBox {
- padding: 15px 10px 0;
-}
-
-#PMversion {
- margin-top: 10px;
- -moz-margin-start: 0;
+#aboutVersion {
+ text-align: center;
+ font-size: 18px;
+ font-weight: bold;
+ margin: 4px;
}
#distribution,
#distributionId {
+ text-align: center;
+ font-size: 14px;
font-weight: bold;
display: none;
margin-top: 0;
margin-bottom: 0;
}
-.text-blurb {
- margin-bottom: 10px;
- -moz-margin-start: 0;
- -moz-padding-start: 0;
+#aboutTextBox {
+ font-family: Arial, helvetica;
+ font-size: 14px;
+ margin: 5px 20px;
+ padding: 4px 10px 0px;
+ border-radius: 3px;
+ color: black;
+ background-color: rgba(240, 240, 240, .6);
+}
+
+#aboutLinkBox {
+ font-family: Arial, helvetica;
}
-#updateButton,
-#updateDeck > hbox > label {
- -moz-margin-start: 0;
- -moz-padding-start: 0;
+.text-credits {
+ margin: 5px 0px;
}
-.update-throbber {
- width: 16px;
- min-height: 16px;
- -moz-margin-end: 3px;
- list-style-image: url("chrome://global/skin/icons/loading_16.png");
+.text-center {
+ text-align: center;
}
.text-link,
@@ -63,5 +60,15 @@
.bottom-link,
.bottom-link:focus {
text-align: center;
+ text-decoration: none !important;
+ padding: 4px;
+ border-radius: 3px;
+ color: #244C8A;
+ background-color: rgba(240, 240, 240, .7);
margin: 0 40px;
+ transition: background-color 0.5s ease-out;
+}
+
+.bottom-link:hover {
+ background-color: rgba(240, 240, 255, .95);
}
diff --git a/application/palemoon/base/content/aboutDialog.js b/application/palemoon/base/content/aboutDialog.js
index f4c2a990c..e4e18f2cf 100644
--- a/application/palemoon/base/content/aboutDialog.js
+++ b/application/palemoon/base/content/aboutDialog.js
@@ -42,13 +42,9 @@ function init(aEvent)
if (/[ab]\d+$/.test(version)) {
let buildID = Services.appinfo.appBuildID;
let buildDate = buildID.slice(0,4) + "-" + buildID.slice(4,6) + "-" + buildID.slice(6,8);
- document.getElementById("PMversion").textContent += " (" + buildDate + ")";
+ document.getElementById("aboutVersion").textContent += " (" + buildDate + ")";
}
-#ifdef MOZ_UPDATER
- gAppUpdater = new appUpdater();
-#endif
-
#ifdef XP_MACOSX
// it may not be sized at this point, and we need its width to calculate its position
window.sizeToContent();
@@ -64,527 +60,3 @@ function init(aEvent)
relnotes.setAttribute("href", releaseNotesURL);
}
}
-
-#ifdef MOZ_UPDATER
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
-Components.utils.import("resource://gre/modules/AddonManager.jsm");
-
-var gAppUpdater;
-
-function onUnload(aEvent) {
- if (gAppUpdater.isChecking)
- gAppUpdater.checker.stopChecking(Components.interfaces.nsIUpdateChecker.CURRENT_CHECK);
- // Safe to call even when there isn't a download in progress.
- gAppUpdater.removeDownloadListener();
- gAppUpdater = null;
-}
-
-
-function appUpdater()
-{
- this.updateDeck = document.getElementById("updateDeck");
-
- // Hide the update deck when there is already an update window open to avoid
- // syncing issues between them.
- if (Services.wm.getMostRecentWindow("Update:Wizard")) {
- this.updateDeck.hidden = true;
- return;
- }
-
- XPCOMUtils.defineLazyServiceGetter(this, "aus",
- "@mozilla.org/updates/update-service;1",
- "nsIApplicationUpdateService");
- XPCOMUtils.defineLazyServiceGetter(this, "checker",
- "@mozilla.org/updates/update-checker;1",
- "nsIUpdateChecker");
- XPCOMUtils.defineLazyServiceGetter(this, "um",
- "@mozilla.org/updates/update-manager;1",
- "nsIUpdateManager");
-
- this.bundle = Services.strings.
- createBundle("chrome://browser/locale/browser.properties");
-
- this.updateBtn = document.getElementById("updateButton");
-
- // The button label value must be set so its height is correct.
- this.setupUpdateButton("update.checkInsideButton");
-
- let manualURL = Services.urlFormatter.formatURLPref("app.update.url.manual");
- let manualLink = document.getElementById("manualLink");
- manualLink.value = manualURL;
- manualLink.href = manualURL;
- document.getElementById("failedLink").href = manualURL;
-
- if (this.updateDisabledAndLocked) {
- this.selectPanel("adminDisabled");
- return;
- }
-
- if (this.isPending || this.isApplied) {
- this.setupUpdateButton("update.restart." +
- (this.isMajor ? "upgradeButton" : "updateButton"));
- return;
- }
-
- if (this.aus.isOtherInstanceHandlingUpdates) {
- this.selectPanel("otherInstanceHandlingUpdates");
- return;
- }
-
- if (this.isDownloading) {
- this.startDownload();
- return;
- }
-
- if (this.updateEnabled && this.updateAuto) {
- this.selectPanel("checkingForUpdates");
- this.isChecking = true;
- this.checker.checkForUpdates(this.updateCheckListener, true);
- return;
- }
-}
-
-appUpdater.prototype =
-{
- // true when there is an update check in progress.
- isChecking: false,
-
- // true when there is an update already staged / ready to be applied.
- get isPending() {
- if (this.update) {
- return this.update.state == "pending" ||
- this.update.state == "pending-service";
- }
- return this.um.activeUpdate &&
- (this.um.activeUpdate.state == "pending" ||
- this.um.activeUpdate.state == "pending-service");
- },
-
- // true when there is an update already installed in the background.
- get isApplied() {
- if (this.update)
- return this.update.state == "applied" ||
- this.update.state == "applied-service";
- return this.um.activeUpdate &&
- (this.um.activeUpdate.state == "applied" ||
- this.um.activeUpdate.state == "applied-service");
- },
-
- // true when there is an update download in progress.
- get isDownloading() {
- if (this.update)
- return this.update.state == "downloading";
- return this.um.activeUpdate &&
- this.um.activeUpdate.state == "downloading";
- },
-
- // true when the update type is major.
- get isMajor() {
- if (this.update)
- return this.update.type == "major";
- return this.um.activeUpdate.type == "major";
- },
-
- // true when updating is disabled by an administrator.
- get updateDisabledAndLocked() {
- return !this.updateEnabled &&
- Services.prefs.prefIsLocked("app.update.enabled");
- },
-
- // true when updating is enabled.
- get updateEnabled() {
- try {
- return Services.prefs.getBoolPref("app.update.enabled");
- }
- catch (e) { }
- return true; // Firefox default is true
- },
-
- // true when updating in background is enabled.
- get backgroundUpdateEnabled() {
- return this.updateEnabled &&
- gAppUpdater.aus.canStageUpdates;
- },
-
- // true when updating is automatic.
- get updateAuto() {
- try {
- return Services.prefs.getBoolPref("app.update.auto");
- }
- catch (e) { }
- return true; // Firefox default is true
- },
-
- /**
- * Sets the deck's selected panel.
- *
- * @param aChildID
- * The id of the deck's child to select.
- */
- selectPanel: function(aChildID) {
- this.updateDeck.selectedPanel = document.getElementById(aChildID);
- this.updateBtn.disabled = (aChildID != "updateButtonBox");
- },
-
- /**
- * Sets the update button's label and accesskey.
- *
- * @param aKeyPrefix
- * The prefix for the properties file entry to use for setting the
- * label and accesskey.
- */
- setupUpdateButton: function(aKeyPrefix) {
- this.updateBtn.label = this.bundle.GetStringFromName(aKeyPrefix + ".label");
- this.updateBtn.accessKey = this.bundle.GetStringFromName(aKeyPrefix + ".accesskey");
- if (!document.commandDispatcher.focusedElement ||
- document.commandDispatcher.focusedElement == this.updateBtn)
- this.updateBtn.focus();
- },
-
- /**
- * Handles oncommand for the update button.
- */
- buttonOnCommand: function() {
- if (this.isPending || this.isApplied) {
- // Notify all windows that an application quit has been requested.
- let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].
- createInstance(Components.interfaces.nsISupportsPRBool);
- Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
-
- // Something aborted the quit process.
- if (cancelQuit.data)
- return;
-
- let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
- getService(Components.interfaces.nsIAppStartup);
-
- // If already in safe mode restart in safe mode (bug 327119)
- if (Services.appinfo.inSafeMode) {
- appStartup.restartInSafeMode(Components.interfaces.nsIAppStartup.eAttemptQuit);
- return;
- }
-
- appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit |
- Components.interfaces.nsIAppStartup.eRestart);
- return;
- }
-
- const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul";
- // Firefox no longer displays a license for updates and the licenseURL check
- // is just in case a distibution does.
- if (this.update) {
- var ary = null;
- ary = Components.classes["@mozilla.org/supports-array;1"].
- createInstance(Components.interfaces.nsISupportsArray);
- ary.AppendElement(this.update);
- var openFeatures = "chrome,centerscreen,dialog=no,resizable=no,titlebar,toolbar=no";
- Services.ww.openWindow(null, URI_UPDATE_PROMPT_DIALOG, "", openFeatures, ary);
- window.close();
- return;
- }
-
- this.selectPanel("checkingForUpdates");
- this.isChecking = true;
- this.checker.checkForUpdates(this.updateCheckListener, true);
- },
-
- /**
- * Implements nsIUpdateCheckListener. The methods implemented by
- * nsIUpdateCheckListener are in a different scope from nsIIncrementalDownload
- * to make it clear which are used by each interface.
- */
- updateCheckListener: {
- /**
- * See nsIUpdateService.idl
- */
- onCheckComplete: function(aRequest, aUpdates, aUpdateCount) {
- gAppUpdater.isChecking = false;
- gAppUpdater.update = gAppUpdater.aus.
- selectUpdate(aUpdates, aUpdates.length);
- if (!gAppUpdater.update) {
- gAppUpdater.selectPanel("noUpdatesFound");
- return;
- }
-
- if (gAppUpdater.update.unsupported) {
- if (gAppUpdater.update.detailsURL) {
- let unsupportedLink = document.getElementById("unsupportedLink");
- unsupportedLink.href = gAppUpdater.update.detailsURL;
- }
- gAppUpdater.selectPanel("unsupportedSystem");
- return;
- }
-
- if (!gAppUpdater.aus.canApplyUpdates) {
- gAppUpdater.selectPanel("manualUpdate");
- return;
- }
-
- gAppUpdater.selectPanel("updateButtonBox");
- gAppUpdater.setupUpdateButton("update.openUpdateUI." +
- (this.isMajor ? "upgradeButton"
- : "applyButton"));
- },
-
- /**
- * See nsIUpdateService.idl
- */
- onError: function(aRequest, aUpdate) {
- // Errors in the update check are treated as no updates found. If the
- // update check fails repeatedly without a success the user will be
- // notified with the normal app update user interface so this is safe.
- gAppUpdater.isChecking = false;
- gAppUpdater.selectPanel("noUpdatesFound");
- },
-
- /**
- * See nsISupports.idl
- */
- QueryInterface: function(aIID) {
- if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) &&
- !aIID.equals(Components.interfaces.nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- }
- },
-
- /**
- * Checks the compatibility of add-ons for the application update.
- */
- checkAddonCompatibility: function() {
- var self = this;
- AddonManager.getAllAddons(function(aAddons) {
- self.addons = [];
- self.addonsCheckedCount = 0;
- aAddons.forEach(function(aAddon) {
- // Protect against code that overrides the add-ons manager and doesn't
- // implement the isCompatibleWith or the findUpdates method.
- if (!("isCompatibleWith" in aAddon) || !("findUpdates" in aAddon)) {
- let errMsg = "Add-on doesn't implement either the isCompatibleWith " +
- "or the findUpdates method!";
- if (aAddon.id)
- errMsg += " Add-on ID: " + aAddon.id;
- Components.utils.reportError(errMsg);
- return;
- }
-
- // If an add-on isn't appDisabled and isn't userDisabled then it is
- // either active now or the user expects it to be active after the
- // restart. If that is the case and the add-on is not installed by the
- // application and is not compatible with the new application version
- // then the user should be warned that the add-on will become
- // incompatible. If an addon's type equals plugin it is skipped since
- // checking plugins compatibility information isn't supported and
- // getting the scope property of a plugin breaks in some environments
- // (see bug 566787).
- try {
- if (aAddon.type != "plugin" && aAddon.isCompatible &&
- !aAddon.appDisabled && !aAddon.userDisabled &&
- aAddon.scope != AddonManager.SCOPE_APPLICATION &&
- !aAddon.isCompatibleWith(self.update.appVersion,
- self.update.platformVersion))
- self.addons.push(aAddon);
- }
- catch (e) {
- Components.utils.reportError(e);
- }
- });
- self.addonsTotalCount = self.addons.length;
- if (self.addonsTotalCount == 0) {
- self.startDownload();
- return;
- }
-
- self.checkAddonsForUpdates();
- });
- },
-
- /**
- * Checks if there are updates for add-ons that are incompatible with the
- * application update.
- */
- checkAddonsForUpdates: function() {
- this.addons.forEach(function(aAddon) {
- aAddon.findUpdates(this, AddonManager.UPDATE_WHEN_NEW_APP_DETECTED,
- this.update.appVersion,
- this.update.platformVersion);
- }, this);
- },
-
- /**
- * See XPIProvider.jsm
- */
- onCompatibilityUpdateAvailable: function(aAddon) {
- for (var i = 0; i < this.addons.length; ++i) {
- if (this.addons[i].id == aAddon.id) {
- this.addons.splice(i, 1);
- break;
- }
- }
- },
-
- /**
- * See XPIProvider.jsm
- */
- onUpdateAvailable: function(aAddon, aInstall) {
- if (!Services.blocklist.isAddonBlocklisted(aAddon.id, aInstall.version,
- this.update.appVersion,
- this.update.platformVersion)) {
- // Compatibility or new version updates mean the same thing here.
- this.onCompatibilityUpdateAvailable(aAddon);
- }
- },
-
- /**
- * See XPIProvider.jsm
- */
- onUpdateFinished: function(aAddon) {
- ++this.addonsCheckedCount;
-
- if (this.addonsCheckedCount < this.addonsTotalCount)
- return;
-
- if (this.addons.length == 0) {
- // Compatibility updates or new version updates were found for all add-ons
- this.startDownload();
- return;
- }
-
- this.selectPanel("updateButtonBox");
- this.setupUpdateButton("update.openUpdateUI." +
- (this.isMajor ? "upgradeButton" : "applyButton"));
- },
-
- /**
- * Starts the download of an update mar.
- */
- startDownload: function() {
- if (!this.update)
- this.update = this.um.activeUpdate;
- this.update.QueryInterface(Components.interfaces.nsIWritablePropertyBag);
- this.update.setProperty("foregroundDownload", "true");
-
- this.aus.pauseDownload();
- let state = this.aus.downloadUpdate(this.update, false);
- if (state == "failed") {
- this.selectPanel("downloadFailed");
- return;
- }
-
- this.setupDownloadingUI();
- },
-
- /**
- * Switches to the UI responsible for tracking the download.
- */
- setupDownloadingUI: function() {
- this.downloadStatus = document.getElementById("downloadStatus");
- this.downloadStatus.value =
- DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size);
- this.selectPanel("downloading");
- this.aus.addDownloadListener(this);
- },
-
- removeDownloadListener: function() {
- if (this.aus) {
- this.aus.removeDownloadListener(this);
- }
- },
-
- /**
- * See nsIRequestObserver.idl
- */
- onStartRequest: function(aRequest, aContext) {
- },
-
- /**
- * See nsIRequestObserver.idl
- */
- onStopRequest: function(aRequest, aContext, aStatusCode) {
- switch (aStatusCode) {
- case Components.results.NS_ERROR_UNEXPECTED:
- if (this.update.selectedPatch.state == "download-failed" &&
- (this.update.isCompleteUpdate || this.update.patchCount != 2)) {
- // Verification error of complete patch, informational text is held in
- // the update object.
- this.removeDownloadListener();
- this.selectPanel("downloadFailed");
- break;
- }
- // Verification failed for a partial patch, complete patch is now
- // downloading so return early and do NOT remove the download listener!
- break;
- case Components.results.NS_BINDING_ABORTED:
- // Do not remove UI listener since the user may resume downloading again.
- break;
- case Components.results.NS_OK:
- this.removeDownloadListener();
- if (this.backgroundUpdateEnabled) {
- this.selectPanel("applying");
- let update = this.um.activeUpdate;
- let self = this;
- Services.obs.addObserver(function (aSubject, aTopic, aData) {
- // Update the UI when the background updater is finished
- let status = aData;
- if (status == "applied" || status == "applied-service" ||
- status == "pending" || status == "pending-service") {
- // If the update is successfully applied, or if the updater has
- // fallen back to non-staged updates, show the Restart to Update
- // button.
- self.selectPanel("updateButtonBox");
- self.setupUpdateButton("update.restart." +
- (self.isMajor ? "upgradeButton" : "updateButton"));
- } else if (status == "failed") {
- // Background update has failed, let's show the UI responsible for
- // prompting the user to update manually.
- self.selectPanel("downloadFailed");
- } else if (status == "downloading") {
- // We've fallen back to downloading the full update because the
- // partial update failed to get staged in the background.
- // Therefore we need to keep our observer.
- self.setupDownloadingUI();
- return;
- }
- Services.obs.removeObserver(arguments.callee, "update-staged");
- }, "update-staged", false);
- } else {
- this.selectPanel("updateButtonBox");
- this.setupUpdateButton("update.restart." +
- (this.isMajor ? "upgradeButton" : "updateButton"));
- }
- break;
- default:
- this.removeDownloadListener();
- this.selectPanel("downloadFailed");
- break;
- }
-
- },
-
- /**
- * See nsIProgressEventSink.idl
- */
- onStatus: function(aRequest, aContext, aStatus, aStatusArg) {
- },
-
- /**
- * See nsIProgressEventSink.idl
- */
- onProgress: function(aRequest, aContext, aProgress, aProgressMax) {
- this.downloadStatus.value =
- DownloadUtils.getTransferTotal(aProgress, aProgressMax);
- },
-
- /**
- * See nsISupports.idl
- */
- QueryInterface: function(aIID) {
- if (!aIID.equals(Components.interfaces.nsIProgressEventSink) &&
- !aIID.equals(Components.interfaces.nsIRequestObserver) &&
- !aIID.equals(Components.interfaces.nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- }
-};
-#endif
diff --git a/application/palemoon/base/content/aboutDialog.xul b/application/palemoon/base/content/aboutDialog.xul
index 5c344f55d..6edfc2155 100644
--- a/application/palemoon/base/content/aboutDialog.xul
+++ b/application/palemoon/base/content/aboutDialog.xul
@@ -24,9 +24,6 @@
id="PMaboutDialog"
windowtype="Browser:About"
onload="init(event);"
-#ifdef MOZ_UPDATER
- onunload="onUnload(event);"
-#endif
#ifdef XP_MACOSX
inwindowmenu="false"
#else
@@ -38,86 +35,48 @@
<script type="application/javascript" src="chrome://browser/content/aboutDialog.js"/>
- <vbox id="aboutPMDialogContainer">
- <hbox id="PMclientBox">
- <vbox id="PMleftBox" flex="1"/>
- <vbox id="PMrightBox" flex="1">
+ <vbox id="aboutPMDialogContainer" flex="1">
+ <vbox id="aboutHeaderBox" />
+ <vbox id="aboutVersionBox" flex="3">
#ifdef HAVE_64BIT_BUILD
-#expand <label id="PMversion">Version: __MOZ_APP_VERSION__ (64-bit)</label>
+#expand <label id="aboutVersion">Version: __MOZ_APP_VERSION__ (64-bit)</label>
#else
-#expand <label id="PMversion">Version: __MOZ_APP_VERSION__ (32-bit)</label>
+#expand <label id="aboutVersion">Version: __MOZ_APP_VERSION__ (32-bit)</label>
#endif
<label id="distribution" class="text-blurb"/>
<label id="distributionId" class="text-blurb"/>
- <vbox id="detailsBox">
- <vbox id="updateBox">
-#ifdef MOZ_UPDATER
- <deck id="updateDeck" orient="vertical">
- <hbox id="updateButtonBox" align="center">
- <button id="updateButton" align="start"
- oncommand="gAppUpdater.buttonOnCommand();"/>
- <spacer flex="1"/>
- </hbox>
- <hbox id="checkingForUpdates" align="center">
- <image class="update-throbber"/><label>&update.checkingForUpdates;</label>
- </hbox>
- <hbox id="checkingAddonCompat" align="center">
- <image class="update-throbber"/><label>&update.checkingAddonCompat;</label>
- </hbox>
- <hbox id="downloading" align="center">
- <image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
- </hbox>
- <hbox id="applying" align="center">
- <image class="update-throbber"/><label>&update.applying;</label>
- </hbox>
- <hbox id="downloadFailed" align="center">
- <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
- </hbox>
- <hbox id="adminDisabled" align="center">
- <label>&update.adminDisabled;</label>
- </hbox>
- <hbox id="noUpdatesFound" align="center">
- <label>&update.noUpdatesFound;</label>
- </hbox>
- <hbox id="manualUpdate" align="center">
- <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
- </hbox>
- </deck>
-#endif
- </vbox>
-
- <description class="text-pmcreds">
+ </vbox>
+ <vbox id="aboutTextBox" flex="1">
+ <description class="text-credits text-center">
#if defined(MOZ_OFFICIAL_BRANDING) || defined(MC_OFFICIAL)
#ifdef MC_PRIVATE_BUILD
This is a private build of Pale Moon. If you did not manually build this copy from source yourself, then please download an official version from the <label class="text-link" href="http://www.palemoon.org/">Pale Moon website</label>.
#else
- Pale Moon is released by <label class="text-link" href="http://www.moonchildproductions.info">Moonchild Productions</label>.
+ <label class="text-link" href="http://www.palemoon.org">Pale Moon</label> is released by <label class="text-link" href="http://www.moonchildproductions.info">Moonchild Productions</label>.
</description>
- <description class="text-pmcreds">
+ <description class="text-credits text-center">
Special thanks to all our supporters and donors for making this browser possible!
</description>
- <description class="text-blurb">
+ <description class="text-credits">
If you wish to contribute, please consider helping out by providing support to other users on the <label class="text-link" href="https://forum.palemoon.org/">Pale Moon forum</label>
or getting involved in our development by tackling some of the issues found in our GitHub issue tracker.
#endif
#else
&brandFullName; is released by &vendorShortName;.
</description>
- <description class="text-blurb">
+ <description class="text-credits">
This is an unofficial build of Pale Moon. For official builds, please go to <label class="text-link" href="http://www.palemoon.org/">the Pale Moon website</label>.
#endif
</description>
- </vbox>
- </vbox>
- </hbox>
- <vbox id="PMbottomBox">
+ </vbox>
+ <vbox id="aboutLinkBox">
<hbox pack="center">
- <label class="text-link bottom-link" href="about:license">Licensing information</label>
<label class="text-link bottom-link" href="about:rights">End-user rights</label>
+ <label class="text-link bottom-link" href="about:license">Licensing information</label>
<label class="text-link bottom-link" id="releaseNotesURL">Release notes</label>
</hbox>
- <description id="PMtrademark">&trademarkInfo.part1;</description>
+ <description id="aboutPMtrademark">&trademarkInfo.part1;</description>
</vbox>
</vbox>
diff --git a/application/palemoon/base/content/aboutRobots-icon.png b/application/palemoon/base/content/aboutRobots-icon.png
deleted file mode 100644
index 1c4899aaf..000000000
--- a/application/palemoon/base/content/aboutRobots-icon.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/base/content/aboutRobots-widget-left.png b/application/palemoon/base/content/aboutRobots-widget-left.png
deleted file mode 100644
index 3a1e48d5f..000000000
--- a/application/palemoon/base/content/aboutRobots-widget-left.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/base/content/aboutRobots.xhtml b/application/palemoon/base/content/aboutRobots.xhtml
deleted file mode 100644
index 23fe3ba17..000000000
--- a/application/palemoon/base/content/aboutRobots.xhtml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE html [
- <!ENTITY % htmlDTD
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "DTD/xhtml1-strict.dtd">
- %htmlDTD;
- <!ENTITY % netErrorDTD
- SYSTEM "chrome://global/locale/netError.dtd">
- %netErrorDTD;
- <!ENTITY % globalDTD
- SYSTEM "chrome://global/locale/global.dtd">
- %globalDTD;
- <!ENTITY % aboutrobotsDTD
- SYSTEM "chrome://browser/locale/aboutRobots.dtd">
- %aboutrobotsDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>&robots.pagetitle;</title>
- <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
- <link rel="icon" type="image/png" id="favicon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACGFjVEwAAAASAAAAAJNtBPIAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAALuAD6AABhIDeugAAALhJREFUOI2Nk8sNxCAMRDlGohauXFOMpfTiAlxICqAELltHLqlgctg1InzMRhpFAc%2BLGWTnmoeZYamt78zXdZmaQtQMADlnU0OIAlbmJUBEcO4bRKQY2rUXIPmAGnDuG%2FBx3%2FfvOPVaDUg%2BoAPUf1PArIMCSD5glMEsUGaG%2BkyAFWIBaCsKuA%2BHGCNijLgP133XgOEtaPFMy2vUolEGJoCIzBmoRUR9%2B7rxj16DZaW%2FmgtmxnJ8V3oAnApQwNS5zpcAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAB4D6AIB52fclgAAACpmZEFUAAAAAjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9WF%2Bu8QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAHgPoAgEK8Q9%2FAAAAFmZkQVQAAAAEOI1jYBgFo2AUjAIIAAAEEAAB0xIn4wAAABpmY1RMAAAABQAAABAAAAAQAAAAAAAAAAAAHgPoAgHnO30FAAAAQGZkQVQAAAAGOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVfozYcAAAABpmY1RMAAAABwAAABAAAAAQAAAAAAAAAAAAHgPoAgEKra7sAAAAFmZkQVQAAAAIOI1jYBgFo2AUjAIIAAAEEAABM9s3hAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAHgPoAgHn3p%2BwAAAAKmZkQVQAAAAKOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F1BhPl6AAAAGmZjVEwAAAALAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQpITFkAAAAWZmRBVAAAAAw4jWNgGAWjYBSMAggAAAQQAAHaszpmAAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeeCPiMAAABAZmRBVAAAAA44jWNgGJ5gpxrDf2LEcIL%2FpzAVYxPDavP%2FUwz%2FpW79%2F%2F%2F%2FFMP%2FnWoQjC5GOxcgu4QYsVEwCmAAAOE0KxUmBL0KAAAAGmZjVEwAAAAPAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQoU7coAAAAWZmRBVAAAABA4jWNgGAWjYBSMAggAAAQQAAEpOBELAAAAGmZjVEwAAAARAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeYVWtoAAAAqZmRBVAAAABI4jWNgGAVYQXNz839ixHBq3qnG8B9ZAzYx2rlgFIwCcgAA8psX%2FWvpAecAAAAaZmNUTAAAABMAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC4OJMwAAABZmZEFUAAAAFDiNY2AYBaNgFIwCCAAABBAAAcBQHOkAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5kn7SQAAAEBmZEFUAAAAFjiNY2AYnmCnGsN%2FYsRwgv%2BnMBVjE8Nq8%2F9TDP%2Blbv3%2F%2F%2F8Uw%2F%2BdahCMLkY7FyC7hBixUTAKYAAA4TQrFc%2BcEoQAAAAaZmNUTAAAABcAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC98ooAAAABZmZEFUAAAAGDiNY2AYBaNgFIwCCAAABBAAASCZDI4AAAAaZmNUTAAAABkAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5qwZ%2FAAAACpmZEFUAAAAGjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9cjJWbAAAABpmY1RMAAAAGwAAABAAAAAQAAAAAAAAAAAAHgPoAgELOsoVAAAAFmZkQVQAAAAcOI1jYBgFo2AUjAIIAAAEEAAByfEBbAAAABpmY1RMAAAAHQAAABAAAAAQAAAAAAAAAAAAHgPoAgHm8LhvAAAAQGZkQVQAAAAeOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVlxR3%2FgAAABpmY1RMAAAAHwAAABAAAAAQAAAAAAAAAAAAHgPoAgELZmuGAAAAFmZkQVQAAAAgOI1jYBgFo2AUjAIIAAAEEAABHP5cFQAAABpmY1RMAAAAIQAAABAAAAAQAAAAAAAAAAAAHgPoAgHlgtAOAAAAKmZkQVQAAAAiOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F0%2FMvDdAAAAAElFTkSuQmCC"/>
-
- <script type="application/javascript"><![CDATA[
- var buttonClicked = false;
- function robotButton()
- {
- var button = document.getElementById('errorTryAgain');
- if (buttonClicked) {
- button.style.visibility = "hidden";
- } else {
- var newLabel = button.getAttribute("label2");
- button.textContent = newLabel;
- buttonClicked = true;
- }
- }
- ]]></script>
-
- <style type="text/css"><![CDATA[
- #errorPageContainer {
- background-image: none;
- }
-
- #errorPageContainer:before {
- content: url('chrome://browser/content/aboutRobots-icon.png');
- position: absolute;
- }
-
- body[dir=rtl] #icon,
- body[dir=rtl] #errorPageContainer:before {
- transform: scaleX(-1);
- }
- ]]></style>
- </head>
-
- <body dir="&locale.dir;">
-
- <!-- PAGE CONTAINER (for styling purposes only) -->
- <div id="errorPageContainer">
-
- <!-- Error Title -->
- <div id="errorTitle">
- <h1 id="errorTitleText">&robots.errorTitleText;</h1>
- </div>
-
- <!-- LONG CONTENT (the section most likely to require scrolling) -->
- <div id="errorLongContent">
-
- <!-- Short Description -->
- <div id="errorShortDesc">
- <p id="errorShortDescText">&robots.errorShortDescText;</p>
- </div>
-
- <!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
- <div id="errorLongDesc">
- <ul>
- <li>&robots.errorLongDesc1;</li>
- <li>&robots.errorLongDesc2;</li>
- <li>&robots.errorLongDesc3;</li>
- <li>&robots.errorLongDesc4;</li>
- </ul>
- </div>
-
- <!-- Short Description -->
- <div id="errorTrailerDesc">
- <p id="errorTrailerDescText">&robots.errorTrailerDescText;</p>
- </div>
-
- </div>
-
- <!-- Button -->
- <button id="errorTryAgain"
- label2="&robots.dontpress;"
- onclick="robotButton();">&retry.label;</button>
-
- <img src="chrome://browser/content/aboutRobots-widget-left.png"
- style="position: absolute; bottom: -12px; left: -10px;"/>
- <img src="chrome://browser/content/aboutRobots-widget-left.png"
- style="position: absolute; bottom: -12px; right: -10px; transform: scaleX(-1);"/>
- </div>
-
- </body>
-</html>
diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul
index e9019dc55..a006ed5c6 100644
--- a/application/palemoon/base/content/baseMenuOverlay.xul
+++ b/application/palemoon/base/content/baseMenuOverlay.xul
@@ -41,7 +41,7 @@
label="&helpMenu.label;"
accesskey="&helpMenu.accesskey;">
#endif
- <menupopup id="menu_HelpPopup">
+ <menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
<menuitem id="menu_openHelp"
oncommand="openHelpLink('firefox-help')"
onclick="checkForMiddleClick(this, event);"
@@ -66,6 +66,14 @@
accesskey="&helpSafeMode.accesskey;"
label="&helpSafeMode.label;"
oncommand="restart(true);"/>
+ <menuseparator id="updatesSeparator"/>
+ <menuitem id="checkForUpdates" class="menuitem-iconic"
+#ifdef MOZ_UPDATER
+ label="&updateCmd.label;"
+ oncommand="checkForUpdates();"/>
+#else
+ hidden="true"/>
+#endif
<menuseparator id="aboutSeparator"/>
<menuitem id="aboutName"
accesskey="&aboutProduct.accesskey;"
diff --git a/application/palemoon/base/content/browser-appmenu.inc b/application/palemoon/base/content/browser-appmenu.inc
index cfc855484..ffb117a60 100644
--- a/application/palemoon/base/content/browser-appmenu.inc
+++ b/application/palemoon/base/content/browser-appmenu.inc
@@ -341,7 +341,7 @@
<splitmenu id="appmenu_help"
label="&helpMenu.label;"
oncommand="openHelpLink('firefox-help')">
- <menupopup id="appmenu_helpMenupopup">
+ <menupopup id="appmenu_helpMenupopup" onpopupshowing="buildHelpMenu();">
<menuitem id="appmenu_openHelp"
label="&helpMenu.label;"
oncommand="openHelpLink('firefox-help')"
@@ -358,6 +358,13 @@
<menuitem id="appmenu_safeMode"
label="&appMenuSafeMode.label;"
oncommand="restart(true);"/>
+#ifdef MOZ_UPDATER
+ <menuseparator/>
+ <menuitem id="appmenu_checkForUpdates"
+ class="menuitem-iconic"
+ label="&updateCmd.label;"
+ oncommand="checkForUpdates();"/>
+#endif
<menuseparator/>
<menuitem id="appmenu_about"
label="&aboutProduct.label;"
diff --git a/application/palemoon/base/content/browser-context.inc b/application/palemoon/base/content/browser-context.inc
index f672ede61..38c472508 100644
--- a/application/palemoon/base/content/browser-context.inc
+++ b/application/palemoon/base/content/browser-context.inc
@@ -70,7 +70,7 @@
label="&mediaUnmute.label;"
accesskey="&mediaUnmute.accesskey;"
oncommand="gContextMenu.mediaCommand('unmute');"/>
- <menu id="context-media-playbackrate" label="&mediaPlaybackRate.label;" accesskey="&mediaPlaybackRate.accesskey;">
+ <menu id="context-media-playbackrate" label="&mediaPlaybackRate2.label;" accesskey="&mediaPlaybackRate2.accesskey;">
<menupopup>
<menuitem id="context-media-playbackrate-050x"
label="&mediaPlaybackRate050x.label;"
@@ -99,6 +99,11 @@
oncommand="gContextMenu.mediaCommand('playbackRate', 2.0);"/>
</menupopup>
</menu>
+ <menuitem id="context-media-loop"
+ label="&mediaLoop.label;"
+ accesskey="&mediaLoop.accesskey;"
+ type="checkbox"
+ oncommand="gContextMenu.mediaCommand('loop');"/>
<menuitem id="context-media-showcontrols"
label="&mediaShowControls.label;"
accesskey="&mediaShowControls.accesskey;"
diff --git a/application/palemoon/base/content/browser-menudragging.js b/application/palemoon/base/content/browser-menudragging.js
index cf26b2ba4..f3f00d72c 100644
--- a/application/palemoon/base/content/browser-menudragging.js
+++ b/application/palemoon/base/content/browser-menudragging.js
@@ -52,11 +52,9 @@ var browserMenuDragging = {
initPref: function(){
this.STAY_OPEN_ONDRAGEXIT =
- this.getPref('browser.menu.dragging.stayOpen',
- 'bool', false);
+ Services.prefs.getBoolPref('browser.menu.dragging.stayOpen', false);
this.DEBUG =
- this.getPref('browser.menu.dragging.debug',
- 'bool', false);
+ Services.prefs.getBoolPref('browser.menu.dragging.debug', false);
},
//delayed startup
@@ -291,26 +289,6 @@ var browserMenuDragging = {
.logStringMessage(aMsg);
},
- getPref: function(aPrefString, aPrefType, aDefault){
- var xpPref = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefService);
- try{
- switch (aPrefType){
- case 'complex':
- return xpPref.getComplexValue(aPrefString, Components.interfaces.nsILocalFile); break;
- case 'str':
- return xpPref.getCharPref(aPrefString).toString(); break;
- case 'int':
- return xpPref.getIntPref(aPrefString); break;
- case 'bool':
- default:
- return xpPref.getBoolPref(aPrefString); break;
- }
- }catch(e){
- }
- return aDefault;
- },
-
setPref: function(aPrefString, aPrefType, aValue){
var xpPref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
diff --git a/application/palemoon/base/content/browser-syncui.js b/application/palemoon/base/content/browser-syncui.js
index 67056e221..86f6f48f1 100644
--- a/application/palemoon/base/content/browser-syncui.js
+++ b/application/palemoon/base/content/browser-syncui.js
@@ -83,10 +83,7 @@ var gSyncUI = {
_wasDelayed: false,
_needsSetup: function SUI__needsSetup() {
- let firstSync = "";
- try {
- firstSync = Services.prefs.getCharPref("services.sync.firstSync");
- } catch (e) { }
+ let firstSync = Services.prefs.getCharPref("services.sync.firstSync", "");
return Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
firstSync == "notReady";
},
@@ -96,17 +93,25 @@ var gSyncUI = {
document.getElementById("sync-setup-state").hidden = !needsSetup;
document.getElementById("sync-syncnow-state").hidden = needsSetup;
- if (!gBrowser)
+ if (!gBrowser) {
return;
+ }
let button = document.getElementById("sync-button");
- if (!button)
+ if (!button) {
return;
+ }
button.removeAttribute("status");
+
this._updateLastSyncTime();
- if (needsSetup)
+
+ if (needsSetup) {
button.removeAttribute("tooltiptext");
+ button.setAttribute("label", this._stringBundle.GetStringFromName("setupsync.label"));
+ } else {
+ button.setAttribute("label", this._stringBundle.GetStringFromName("syncnow.label"));
+ }
},
@@ -120,6 +125,7 @@ var gSyncUI = {
return;
button.setAttribute("status", "active");
+ button.setAttribute("label", this._stringBundle.GetStringFromName("syncing2.label"));
},
onSyncDelay: function SUI_onSyncDelay() {
@@ -285,11 +291,7 @@ var gSyncUI = {
if (!syncButton)
return;
- let lastSync;
- try {
- lastSync = Services.prefs.getCharPref("services.sync.lastSync");
- }
- catch (e) { };
+ let lastSync = Services.prefs.getCharPref("services.sync.lastSync", "");
if (!lastSync || this._needsSetup()) {
syncButton.removeAttribute("tooltiptext");
return;
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index 3feeef9b6..7672fa3a8 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -1147,7 +1147,7 @@ var gBrowserInit = {
// Setup click-and-hold gestures access to the session history
// menus if global click-and-hold isn't turned on
- if (!getBoolPref("ui.click_hold_context_menus", false))
+ if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
// Initialize the full zoom setting.
@@ -1783,7 +1783,7 @@ function BrowserGoHome(aEvent) {
case "tabshifted":
case "tab":
urls = homePage.split("|");
- var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false);
+ var loadInBackground = Services.prefs.getBoolPref("browser.tabs.loadBookmarksInBackground", false);
gBrowser.loadTabs(urls, loadInBackground);
break;
case "window":
@@ -2661,6 +2661,11 @@ function getWebNavigation()
}
function BrowserReloadWithFlags(reloadFlags) {
+
+ // Reset DOS mitigation for auth prompts when user initiates a reload.
+ let browser = gBrowser.selectedBrowser;
+ delete browser.authPromptCounter;
+
/* First, we'll try to use the session history object to reload so
* that framesets are handled properly. If we're in a special
* window (such as view-source) that has no session history, fall
@@ -3397,7 +3402,7 @@ function BrowserCustomizeToolbar() {
TabsInTitlebar.allowedBy("customizing-toolbars", false);
var customizeURL = "chrome://global/content/customizeToolbar.xul";
- gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
+ gCustomizeSheet = Services.prefs.getBoolPref("toolbar.customization.usesheet", false);
if (gCustomizeSheet) {
let sheetFrame = document.createElement("iframe");
@@ -3481,7 +3486,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
cmd.removeAttribute("disabled");
// make sure to re-enable click-and-hold
- if (!getBoolPref("ui.click_hold_context_menus", false))
+ if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
gBrowser.selectedBrowser.focus();
@@ -5333,9 +5338,6 @@ function handleDroppedLink(event, urlOrLinks, name)
let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;
- let userContextId = gBrowser.selectedBrowser
- .getAttribute("usercontextid") || 0;
-
let inBackground = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
if (event.shiftKey)
inBackground = !inBackground;
@@ -5354,7 +5356,6 @@ function handleDroppedLink(event, urlOrLinks, name)
replace: true,
allowThirdPartyFixup: false,
postDatas,
- userContextId,
});
}
});
diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul
index ce2a7c5a8..ddc305a7b 100644
--- a/application/palemoon/base/content/browser.xul
+++ b/application/palemoon/base/content/browser.xul
@@ -965,7 +965,8 @@
tabcontainer="tabbrowser-tabs"
contentcontextmenu="contentAreaContextMenu"
autocompletepopup="PopupAutoComplete"
- datetimepicker="DateTimePickerPanel"/>
+ datetimepicker="DateTimePickerPanel"
+ authdosprotected="true"/>
<chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
<statuspanel id="statusbar-display" inactive="true"/>
</vbox>
diff --git a/application/palemoon/base/content/content.js b/application/palemoon/base/content/content.js
index 653dac3e3..211a24a8b 100644
--- a/application/palemoon/base/content/content.js
+++ b/application/palemoon/base/content/content.js
@@ -139,7 +139,6 @@ var handleContentContextMenu = function (event) {
let selectionInfo = BrowserUtils.getSelectionDetails(content);
let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
- let userContextId = loadContext.originAttributes.userContextId;
let browser = docShell.chromeEventHandler;
let mainWin = browser.ownerGlobal;
@@ -160,7 +159,6 @@ var handleContentContextMenu = function (event) {
selectionInfo: selectionInfo,
loginFillInfo,
parentAllowsMixedContent,
- userContextId,
};
}
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js
index 1d4f88816..916dd2637 100644
--- a/application/palemoon/base/content/nsContextMenu.js
+++ b/application/palemoon/base/content/nsContextMenu.js
@@ -381,6 +381,7 @@ nsContextMenu.prototype = {
this.showItem("context-media-mute", onMedia && !this.target.muted);
this.showItem("context-media-unmute", onMedia && this.target.muted);
this.showItem("context-media-playbackrate", onMedia);
+ this.showItem("context-media-loop", onMedia);
this.showItem("context-media-showcontrols", onMedia && !this.target.controls);
this.showItem("context-media-hidecontrols", onMedia && this.target.controls);
this.showItem("context-video-fullscreen", this.onVideo && this.target.ownerDocument.mozFullScreenElement == null);
@@ -394,6 +395,7 @@ nsContextMenu.prototype = {
this.setItemAttr("context-media-playbackrate-100x", "checked", this.target.playbackRate == 1.0);
this.setItemAttr("context-media-playbackrate-150x", "checked", this.target.playbackRate == 1.5);
this.setItemAttr("context-media-playbackrate-200x", "checked", this.target.playbackRate == 2.0);
+ this.setItemAttr("context-media-loop", "checked", this.target.loop);
var hasError = this.target.error != null ||
this.target.networkState == this.target.NETWORK_NO_SOURCE;
this.setItemAttr("context-media-play", "disabled", hasError);
@@ -1531,6 +1533,9 @@ nsContextMenu.prototype = {
case "pause":
media.pause();
break;
+ case "loop":
+ media.loop = !media.loop;
+ break;
case "mute":
media.muted = true;
break;
diff --git a/application/palemoon/base/content/palemoon.xhtml b/application/palemoon/base/content/palemoon.xhtml
index 96757052c..f145550a9 100644
--- a/application/palemoon/base/content/palemoon.xhtml
+++ b/application/palemoon/base/content/palemoon.xhtml
@@ -13,7 +13,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset='utf-8' />
- <title>&chronicles.title.55.2;</title>
+ <title>&chronicles.title.66.1;</title>
<style type="text/css">
html {
@@ -54,11 +54,11 @@ a {
<section>
<p id="moztext">
- &chronicles.quote.55.2;
+ &chronicles.quote.66.1;
</p>
<p id="from">
- &chronicles.from.55.2;
+ &chronicles.from.66.1;
</p>
</section>
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index 988cae55c..d9366f488 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -30,7 +30,7 @@
<xul:vbox flex="1" class="browserContainer">
<xul:stack flex="1" class="browserStack" anonid="browserStack">
<xul:browser anonid="initialBrowser" type="content-primary" message="true" disablehistory="true"
- xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,datetimepicker"/>
+ xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,datetimepicker,authdosprotected"/>
</xul:stack>
</xul:vbox>
</xul:hbox>
@@ -737,8 +737,7 @@
let autocomplete = this.mTabBrowser._placesAutocomplete;
if (this.mBrowser.registeredOpenURI) {
- autocomplete.unregisterOpenPage(this.mBrowser.registeredOpenURI,
- this.mBrowser.getAttribute("usercontextid") || 0);
+ autocomplete.unregisterOpenPage(this.mBrowser.registeredOpenURI);
delete this.mBrowser.registeredOpenURI;
}
// Tabs in private windows aren't registered as "Open" so
@@ -746,8 +745,7 @@
if (!isBlankPageURL(aLocation.spec) &&
(!PrivateBrowsingUtils.isWindowPrivate(window) ||
PrivateBrowsingUtils.permanentPrivateBrowsing)) {
- autocomplete.registerOpenPage(aLocation,
- this.mBrowser.getAttribute("usercontextid") || 0);
+ autocomplete.registerOpenPage(aLocation);
this.mBrowser.registeredOpenURI = aLocation;
}
}
@@ -1383,7 +1381,6 @@
let aTargetTab;
let aNewIndex = -1;
let aPostDatas = [];
- let aUserContextId;
if (arguments.length == 2 &&
typeof arguments[1] == "object") {
let params = arguments[1];
@@ -1394,7 +1391,6 @@
aNewIndex = typeof params.newIndex === "number" ?
params.newIndex : aNewIndex;
aPostDatas = params.postDatas || aPostDatas;
- aUserContextId = params.userContextId;
}
if (!aURIs.length)
@@ -1443,8 +1439,7 @@
ownerTab: owner,
skipAnimation: multiple,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- postData: aPostDatas[0],
- userContextId: aUserContextId
+ postData: aPostDatas[0]
});
if (aNewIndex !== -1) {
this.moveTabTo(firstTabAdded, aNewIndex);
@@ -1457,8 +1452,7 @@
let tab = this.addTab(aURIs[i], {
skipAnimation: true,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- postData: aPostDatas[i],
- userContextId: aUserContextId
+ postData: aPostDatas[i]
});
if (targetTabIndex !== -1)
this.moveTabTo(tab, ++tabNum);
@@ -1588,6 +1582,10 @@
if (this.hasAttribute("datetimepicker")) {
b.setAttribute("datetimepicker", this.getAttribute("datetimepicker"));
}
+
+ if (this.hasAttribute("authdosprotected")) {
+ b.setAttribute("authdosprotected", this.getAttribute("authdosprotected"));
+ }
// Create the browserStack container
var stack = document.createElementNS(NS_XUL, "stack");
@@ -2055,8 +2053,7 @@
this.mTabListeners[aTab._tPos].destroy();
if (browser.registeredOpenURI && !aTabWillBeMoved) {
- this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
@@ -2424,8 +2421,7 @@
<![CDATA[
// If the current URI is registered as open remove it from the list.
if (aOurBrowser.registeredOpenURI) {
- this._placesAutocomplete.unregisterOpenPage(aOurBrowser.registeredOpenURI,
- aOurBrowser.getAttribute("usercontextid") || 0);
+ this._placesAutocomplete.unregisterOpenPage(aOurBrowser.registeredOpenURI);
delete aOurBrowser.registeredOpenURI;
}
@@ -2458,7 +2454,10 @@
<parameter name="aTab"/>
<body>
<![CDATA[
- this.getBrowserForTab(aTab).reload();
+ let browser = this.getBrowserForTab(aTab);
+ // Reset DOS mitigation for basic auth prompt
+ delete browser.authPromptCounter;
+ browser.reload();
]]>
</body>
</method>
@@ -3332,8 +3331,7 @@
for (var i = 0; i < this.mTabListeners.length; ++i) {
let browser = this.getBrowserAtIndex(i);
if (browser.registeredOpenURI) {
- this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
browser.webProgress.removeProgressListener(this.mTabFilters[i]);
@@ -3630,11 +3628,7 @@
window.addEventListener("resize", this, false);
window.addEventListener("load", this, false);
- try {
- this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled");
- } catch (ex) {
- this._tabAnimationLoggingEnabled = false;
- }
+ this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled", false);
this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled");
]]>
</constructor>
@@ -4792,8 +4786,6 @@
inBackground = !inBackground;
let targetTab = this._getDragTargetTab(event);
- let userContextId = this.selectedItem
- .getAttribute("usercontextid") || 0;
let replace = !(!targetTab || dropEffect == "copy");
let newIndex = this._getDropIndex(event);
let urls = links.map(link => link.url);
@@ -4803,7 +4795,6 @@
allowThirdPartyFixup: true,
targetTab,
newIndex,
- userContextId,
});
}
diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml
index d188e6658..d2d9cc720 100644
--- a/application/palemoon/base/content/urlbarBindings.xml
+++ b/application/palemoon/base/content/urlbarBindings.xml
@@ -302,6 +302,10 @@
// but don't let that interfere with the loading of the url.
Cu.reportError(ex);
}
+
+ // Reset DOS mitigations for the basic auth prompt.
+ let browser = gBrowser.selectedBrowser;
+ delete browser.authPromptCounter;
function loadCurrent() {
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js
index 2c1a95f83..c2a8baeed 100644
--- a/application/palemoon/base/content/utilityOverlay.js
+++ b/application/palemoon/base/content/utilityOverlay.js
@@ -75,16 +75,6 @@ function openTopWin(url) {
openUILinkIn(url, "current");
}
-function getBoolPref(prefname, def)
-{
- try {
- return Services.prefs.getBoolPref(prefname);
- }
- catch(er) {
- return def;
- }
-}
-
/* openUILink handles clicks on UI elements that cause URLs to load.
*
* As the third argument, you may pass an object with the same properties as
@@ -151,7 +141,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
// ignoreButton allows "middle-click paste" to use function without always opening in a new window.
var middle = !ignoreButton && e.button == 1;
- var middleUsesTabs = getBoolPref("browser.tabs.opentabfor.middleclick", true);
+ var middleUsesTabs = Services.prefs.getBoolPref("browser.tabs.opentabfor.middleclick", true);
// Don't do anything special with right-mouse clicks. They're probably clicks on context menu items.
@@ -162,7 +152,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
#endif
return shift ? "tabshifted" : "tab";
- if (alt && getBoolPref("browser.altClickSave", false))
+ if (alt && Services.prefs.getBoolPref("browser.altClickSave", false))
return "save";
if (shift || (middle && !middleUsesTabs))
@@ -334,7 +324,7 @@ function openLinkIn(url, where, params) {
if (loadInBackground == null) {
loadInBackground = aFromChrome ?
false :
- getBoolPref("browser.tabs.loadInBackground");
+ Services.prefs.getBoolPref("browser.tabs.loadInBackground");
}
let uriObj;
@@ -515,7 +505,7 @@ function getShellService()
function isBidiEnabled() {
// first check the pref.
- if (getBoolPref("bidi.browser.ui", false))
+ if (Services.prefs.getBoolPref("bidi.browser.ui", false))
return true;
// if the pref isn't set, check for an RTL locale and force the pref to true
@@ -541,6 +531,117 @@ function isBidiEnabled() {
return rv;
}
+#ifdef MOZ_UPDATER
+/**
+ * Opens the update manager and checks for updates to the application.
+ */
+function checkForUpdates()
+{
+ var um =
+ Components.classes["@mozilla.org/updates/update-manager;1"].
+ getService(Components.interfaces.nsIUpdateManager);
+ var prompter =
+ Components.classes["@mozilla.org/updates/update-prompt;1"].
+ createInstance(Components.interfaces.nsIUpdatePrompt);
+
+ // If there's an update ready to be applied, show the "Update Downloaded"
+ // UI instead and let the user know they have to restart the application for
+ // the changes to be applied.
+ if (um.activeUpdate && um.activeUpdate.state == "pending")
+ prompter.showUpdateDownloaded(um.activeUpdate);
+ else
+ prompter.checkForUpdates();
+}
+#endif
+
+/**
+ * Set up the help menu software update items to show proper status,
+ * also disabling the items if update is disabled.
+ */
+function buildHelpMenu()
+{
+#ifdef MOZ_UPDATER
+ var updates =
+ Components.classes["@mozilla.org/updates/update-service;1"].
+ getService(Components.interfaces.nsIApplicationUpdateService);
+ var um =
+ Components.classes["@mozilla.org/updates/update-manager;1"].
+ getService(Components.interfaces.nsIUpdateManager);
+
+ // Disable the UI if the update enabled pref has been locked by the
+ // administrator or if we cannot update for some other reason.
+ var checkForUpdates = document.getElementById("checkForUpdates");
+ var appMenuCheckForUpdates = document.getElementById("appmenu_checkForUpdates");
+ var canCheckForUpdates = updates.canCheckForUpdates;
+ checkForUpdates.setAttribute("disabled", !canCheckForUpdates);
+ appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates);
+ if (!canCheckForUpdates)
+ return;
+
+ var strings = document.getElementById("bundle_browser");
+ var activeUpdate = um.activeUpdate;
+
+ // If there's an active update, substitute its name into the label
+ // we show for this item, otherwise display a generic label.
+ function getStringWithUpdateName(key) {
+ if (activeUpdate && activeUpdate.name)
+ return strings.getFormattedString(key, [activeUpdate.name]);
+ return strings.getString(key + "Fallback");
+ }
+
+ // By default, show "Check for Updates..." from updatesItem_default or
+ // updatesItem_defaultFallback
+ var key = "default";
+ if (activeUpdate) {
+ switch (activeUpdate.state) {
+ case "downloading":
+ // If we're downloading an update at present, show the text:
+ // "Downloading Thunderbird x.x..." from updatesItem_downloading or
+ // updatesItem_downloadingFallback, otherwise we're paused, and show
+ // "Resume Downloading Thunderbird x.x..." from updatesItem_resume or
+ // updatesItem_resumeFallback
+ key = updates.isDownloading ? "downloading" : "resume";
+ break;
+ case "pending":
+ // If we're waiting for the user to restart, show: "Apply Downloaded
+ // Updates Now..." from updatesItem_pending or
+ // updatesItem_pendingFallback
+ key = "pending";
+ break;
+ }
+ }
+
+ checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
+ appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
+ // updatesItem_default.accesskey, updatesItem_downloading.accesskey,
+ // updatesItem_resume.accesskey or updatesItem_pending.accesskey
+ checkForUpdates.accessKey = strings.getString("updatesItem_" + key +
+ ".accesskey");
+ appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key +
+ ".accesskey");
+ if (um.activeUpdate && updates.isDownloading) {
+ checkForUpdates.setAttribute("loading", "true");
+ appMenuCheckForUpdates.setAttribute("loading", "true");
+ } else {
+ checkForUpdates.removeAttribute("loading");
+ appMenuCheckForUpdates.removeAttribute("loading");
+ }
+#else
+#ifndef XP_MACOSX
+ // Some extensions may rely on these being present so only hide the about
+ // separator when there are no elements besides the check for updates menuitem
+ // in between the about separator and the updates separator.
+ var updatesSeparator = document.getElementById("updatesSeparator");
+ var aboutSeparator = document.getElementById("aboutSeparator");
+ var checkForUpdates = document.getElementById("checkForUpdates");
+ if (updatesSeparator.nextSibling === checkForUpdates &&
+ checkForUpdates.nextSibling === aboutSeparator)
+ updatesSeparator.hidden = true;
+#endif
+#endif
+}
+
+
function openAboutDialog() {
var enumerator = Services.wm.getEnumerator("Browser:About");
while (enumerator.hasMoreElements()) {
@@ -562,7 +663,7 @@ function openAboutDialog() {
function openPreferences(paneID, extraArgs)
{
- var instantApply = getBoolPref("browser.preferences.instantApply", false);
+ var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply", false);
var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
var win = Services.wm.getMostRecentWindow("Browser:Preferences");
@@ -743,7 +844,7 @@ function openHelpLink(aHelpTopic, aCalledFromModal) {
function openPrefsHelp() {
// non-instant apply prefwindows are usually modal, so we can't open in the topmost window,
// since its probably behind the window.
- var instantApply = getBoolPref("browser.preferences.instantApply");
+ var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
var helpTopic = document.getElementsByTagName("prefwindow")[0].currentPane.helpTopic;
openHelpLink(helpTopic, !instantApply);
diff --git a/application/palemoon/base/jar.mn b/application/palemoon/base/jar.mn
index 8931c0260..735b6d0cf 100644
--- a/application/palemoon/base/jar.mn
+++ b/application/palemoon/base/jar.mn
@@ -18,9 +18,6 @@ browser.jar:
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
* content/browser/aboutDialog.js (content/aboutDialog.js)
content/browser/aboutDialog.css (content/aboutDialog.css)
- content/browser/aboutRobots.xhtml (content/aboutRobots.xhtml)
- content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
- content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
content/browser/autorecovery.js (content/autorecovery.js)
content/browser/autorecovery.xul (content/autorecovery.xul)
* content/browser/browser.css (content/browser.css)
diff --git a/application/palemoon/branding/official/content/about-background.jpg b/application/palemoon/branding/official/content/about-background.jpg
new file mode 100644
index 000000000..21e97986a
--- /dev/null
+++ b/application/palemoon/branding/official/content/about-background.jpg
Binary files differ
diff --git a/application/palemoon/branding/official/content/about-background.png b/application/palemoon/branding/official/content/about-background.png
deleted file mode 100644
index 99dd74e58..000000000
--- a/application/palemoon/branding/official/content/about-background.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/branding/official/content/about-wordmark.png b/application/palemoon/branding/official/content/about-wordmark.png
index 5d51e1d4d..bf09f15a0 100644
--- a/application/palemoon/branding/official/content/about-wordmark.png
+++ b/application/palemoon/branding/official/content/about-wordmark.png
Binary files differ
diff --git a/application/palemoon/branding/official/content/about-wordmark.svg b/application/palemoon/branding/official/content/about-wordmark.svg
index e0dcc255f..166ea2c37 100644
--- a/application/palemoon/branding/official/content/about-wordmark.svg
+++ b/application/palemoon/branding/official/content/about-wordmark.svg
@@ -9,24 +9,57 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="245.75363"
- height="34.463379"
+ width="314.56464"
+ height="44.113129"
id="svg2"
version="1.1"
- inkscape:version="0.48.5 r10040"
- sodipodi:docname="drawing.svg">
+ inkscape:version="0.92.1 r15371"
+ sodipodi:docname="about-wordmark.svg">
<defs
- id="defs4" />
+ id="defs4">
+ <filter
+ style="color-interpolation-filters:sRGB"
+ inkscape:label="Drop Shadow"
+ id="filter4610">
+ <feFlood
+ flood-opacity="1"
+ flood-color="rgb(252,252,247)"
+ result="flood"
+ id="feFlood4600" />
+ <feComposite
+ in="flood"
+ in2="SourceGraphic"
+ operator="in"
+ result="composite1"
+ id="feComposite4602" />
+ <feGaussianBlur
+ in="composite1"
+ stdDeviation="1"
+ result="blur"
+ id="feGaussianBlur4604" />
+ <feOffset
+ dx="2.77556e-017"
+ dy="0"
+ result="offset"
+ id="feOffset4606" />
+ <feComposite
+ in="SourceGraphic"
+ in2="offset"
+ operator="over"
+ result="composite2"
+ id="feComposite4608" />
+ </filter>
+ </defs>
<sodipodi:namedview
id="base"
- pagecolor="#ffffff"
+ pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
- inkscape:pageopacity="0.0"
+ inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
- inkscape:cx="122.96783"
- inkscape:cy="-35.932748"
+ inkscape:cx="140.32026"
+ inkscape:cy="-32.25665"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -55,77 +88,91 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(-51.826283,-53.778809)">
+ transform="translate(-29.067649,-53.687969)">
<text
xml:space="preserve"
- style="font-size:48px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500"
- x="32.324883"
- y="30.087807"
- id="text2985"
- sodipodi:linespacing="125%"><tspan
+ style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672"
+ x="34.479874"
+ y="32.093662"
+ id="text2985"><tspan
sodipodi:role="line"
id="tspan2987"
- x="32.324883"
- y="30.087807" /></text>
+ x="34.479874"
+ y="32.093662"
+ style="font-size:51.20000076px;line-height:1.25;stroke-width:1.06666672"> </tspan></text>
<flowRoot
xml:space="preserve"
id="flowRoot2989"
- style="font-size:48px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500"><flowRegion
- id="flowRegion2991"><rect
+ style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0.01%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672"><flowRegion
+ id="flowRegion2991"
+ style="stroke-width:1.06666672"><rect
id="rect2993"
- width="654.57886"
- height="371.73615"
- x="44.446712"
- y="104.8391" /></flowRegion><flowPara
- id="flowPara2995" /></flowRoot> <g
- id="g3795">
+ width="698.21747"
+ height="396.51855"
+ x="47.409828"
+ y="111.82838"
+ style="stroke-width:1.13777781" /></flowRegion><flowPara
+ id="flowPara2995"
+ style="font-size:51.20000076px;line-height:1.25;stroke-width:1.06666672"> </flowPara></flowRoot> <g
+ id="g3795"
+ style="filter:url(#filter4610)">
<g
id="text2997"
- style="font-size:48px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500">
+ style="font-style:normal;font-weight:normal;font-size:48px;line-height:125%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none">
<path
id="path3779"
- d="m 54.9464,87.666504 0,-29.759766 -3.120117,0 0,-4.127929 14.928222,0 c 3.135722,3.3e-5 5.687722,0.96805 7.656006,2.904052 1.968235,1.936065 2.952365,4.503933 2.952393,7.703614 -2.8e-5,3.199727 -0.99197,5.791765 -2.97583,7.776123 -1.98391,1.984388 -4.528097,2.976575 -7.632569,2.976562 l -7.007812,0 0,12.527344 z m 4.800293,-16.655274 6.240234,0 c 1.983381,1.7e-5 3.55125,-0.592023 4.703613,-1.776123 1.152322,-1.184062 1.728494,-2.800027 1.728516,-4.8479 -2.2e-5,-2.016576 -0.568137,-3.600803 -1.704346,-4.752686 -1.13625,-1.151826 -2.696063,-1.727753 -4.679443,-1.727783 l -6.288574,0 z"
- inkscape:connector-curvature="0" />
+ d="M 58.609493,93.510938 V 61.767187 h -3.328124 v -4.403124 h 15.923436 c 3.34477,3.5e-5 6.066904,1.032587 8.166407,3.097655 2.09945,2.065136 3.149189,4.804196 3.149219,8.217189 -3e-5,3.413042 -1.058101,6.177882 -3.174219,8.294531 -2.11617,2.11668 -4.82997,3.175013 -8.141407,3.174999 h -7.474999 v 13.362501 z m 5.120313,-17.765626 h 6.656249 c 2.115607,1.8e-5 3.788,-0.631491 5.017188,-1.894531 1.229143,-1.263 1.843727,-2.986696 1.84375,-5.171094 -2.3e-5,-2.151014 -0.606013,-3.840856 -1.817969,-5.069531 -1.212,-1.228615 -2.875801,-1.842937 -4.991406,-1.842969 h -6.707812 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3781"
- d="m 80.184193,80.850586 c -2e-6,-1.248039 0.256101,-2.360098 0.76831,-3.336182 0.512204,-0.976063 1.224362,-1.744128 2.136475,-2.304199 0.912104,-0.560045 1.856194,-1.031969 2.832275,-1.415771 0.976066,-0.383775 2.080069,-0.663804 3.312012,-0.840088 1.231921,-0.176255 2.24779,-0.288315 3.047607,-0.336182 0.79979,-0.04784 1.647934,-0.07176 2.544434,-0.07178 l 1.056152,0 0,-0.240235 c -1.7e-5,-2.11131 -0.416032,-3.607158 -1.248047,-4.487548 -0.832046,-0.880351 -2.208021,-1.320536 -4.127929,-1.320557 -0.896496,2.1e-5 -1.784679,0.136007 -2.664551,0.407959 -0.879891,0.271993 -1.319832,0.76003 -1.319824,1.464111 l 0,1.393067 -4.368164,0 0,-2.400879 c -4e-6,-0.927713 0.312007,-1.719705 0.936035,-2.375977 0.624018,-0.656227 1.431878,-1.12815 2.423584,-1.415771 0.991691,-0.287574 1.887686,-0.487525 2.687988,-0.599854 0.800282,-0.11228 1.584217,-0.168432 2.351807,-0.168457 3.680648,2.5e-5 6.264874,0.840112 7.752685,2.520264 1.487772,1.680196 2.231668,4.008075 2.231688,6.983642 l 0,10.319825 c -2e-5,0.704105 0.35203,1.056156 1.05615,1.056152 l 1.96729,0 0,3.984375 -4.3667,0 c -2.01662,0 -3.02492,-0.928222 -3.024902,-2.784668 l 0.09668,-1.439941 -0.09668,0 c -0.06349,0.127933 -0.143329,0.303959 -0.239502,0.528076 -0.09621,0.224124 -0.360369,0.608157 -0.792481,1.152099 -0.432145,0.543948 -0.920182,1.023928 -1.464111,1.439942 -0.54396,0.416016 -1.279799,0.800049 -2.20752,1.152099 -0.927746,0.352051 -1.935558,0.528076 -3.023437,0.528076 -2.240242,0 -4.17652,-0.656005 -5.808838,-1.968017 -1.632327,-1.312009 -2.448488,-3.119869 -2.448486,-5.423584 z m 5.66455,-2.831543 c -0.639655,0.671884 -0.959479,1.535653 -0.959472,2.591309 -7e-6,1.05567 0.399895,1.967534 1.199707,2.735595 0.799796,0.76807 1.919912,1.152103 3.360351,1.1521 1.855456,3e-6 3.399156,-0.807857 4.631104,-2.423584 1.231917,-1.615716 1.847883,-3.383536 1.8479,-5.303467 l 0,-0.815918 -1.199707,0 c -1.183609,1.2e-5 -2.21559,0.03981 -3.095947,0.119385 -0.880383,0.0796 -1.904552,0.255626 -3.07251,0.528076 -1.167978,0.272472 -2.071785,0.744639 -2.711426,1.416504 z"
- inkscape:connector-curvature="0" />
+ d="m 85.529806,86.240625 c -2e-6,-1.331242 0.273174,-2.517438 0.819531,-3.558594 0.54635,-1.041134 1.305986,-1.860403 2.278906,-2.457812 0.972911,-0.597382 1.97994,-1.100767 3.021094,-1.510156 1.041137,-0.40936 2.21874,-0.708058 3.532812,-0.896094 1.314049,-0.188005 2.397643,-0.307536 3.250781,-0.358594 0.853109,-0.05103 1.7578,-0.07654 2.71406,-0.07656 h 1.12657 v -0.256251 c -2e-5,-2.252064 -0.44377,-3.847635 -1.33125,-4.786718 -0.88752,-0.939041 -2.355227,-1.408572 -4.403129,-1.408594 -0.956263,2.2e-5 -1.903658,0.145074 -2.842188,0.435156 -0.93855,0.290126 -1.407821,0.810699 -1.407812,1.561719 v 1.485938 h -4.659375 v -2.560938 c -4e-6,-0.98956 0.332807,-1.834352 0.998437,-2.534375 0.665619,-0.699976 1.527337,-1.20336 2.585156,-1.510156 1.057804,-0.306746 2.013532,-0.520027 2.867188,-0.639844 0.853634,-0.119766 1.689831,-0.179661 2.508594,-0.179688 3.926029,2.7e-5 6.682529,0.89612 8.269529,2.688282 1.58696,1.792209 2.38045,4.27528 2.38047,7.449218 v 11.007813 c -2e-5,0.751046 0.3755,1.126567 1.12656,1.126562 h 2.09844 v 4.25 h -4.65781 c -2.15106,0 -3.22658,-0.990103 -3.22656,-2.970312 l 0.10312,-1.535937 h -0.10312 c -0.0677,0.136462 -0.15289,0.324223 -0.25547,0.563281 -0.10263,0.239065 -0.3844,0.648701 -0.84532,1.228905 -0.46095,0.580212 -0.98152,1.09219 -1.561714,1.535939 -0.580224,0.44375 -1.365119,0.853385 -2.354688,1.228905 -0.989596,0.375521 -2.064596,0.563281 -3.225,0.563281 -2.389591,0 -4.454955,-0.699738 -6.196094,-2.099218 -1.741149,-1.399476 -2.61172,-3.32786 -2.611718,-5.785156 z m 6.042187,-3.020312 c -0.682299,0.716676 -1.023445,1.638029 -1.023437,2.764062 -8e-6,1.126048 0.426554,2.098703 1.279687,2.917968 0.853116,0.819275 2.047906,1.22891 3.584375,1.228907 1.979153,3e-6 3.625766,-0.861714 4.939842,-2.585156 1.31405,-1.723431 1.97108,-3.609105 1.9711,-5.657032 V 81.01875 h -1.27969 c -1.262519,1.3e-5 -2.363298,0.04246 -3.302346,0.127344 -0.939075,0.08491 -2.031522,0.272668 -3.277344,0.563281 -1.245843,0.290637 -2.209904,0.794282 -2.892187,1.510938 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3783"
- d="m 108.54943,84.594727 0,-25.776856 c -1e-5,-0.703095 -0.35206,-1.054658 -1.05616,-1.054687 l -1.96875,0 0,-3.984375 4.6084,0 c 1.08789,3.3e-5 1.87182,0.240023 2.35181,0.71997 0.47997,0.480013 0.71996,1.263948 0.71997,2.351807 l 0,25.775391 c -1e-5,0.704105 0.35204,1.056156 1.05615,1.056152 l 1.96875,0 0,3.984375 -4.6084,0 c -1.08789,0 -1.87183,-0.23999 -2.3518,-0.719971 -0.47999,-0.479979 -0.71998,-1.263914 -0.71997,-2.351806 z"
- inkscape:connector-curvature="0" />
+ d="M 115.78606,90.234375 V 62.739062 c -1e-5,-0.749968 -0.37553,-1.124968 -1.12657,-1.124999 h -2.1 v -4.25 h 4.91562 c 1.16042,3.5e-5 1.99661,0.256024 2.5086,0.767968 0.51197,0.512014 0.76796,1.348211 0.76797,2.508594 v 27.49375 c -10e-6,0.751046 0.37551,1.126567 1.12656,1.126563 h 2.1 v 4.25 h -4.91563 c -1.16041,0 -1.99662,-0.25599 -2.50858,-0.767969 -0.51199,-0.511978 -0.76798,-1.348175 -0.76797,-2.508594 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3785"
- d="m 119.13732,75.522949 c 0,-3.808578 1.15185,-6.88084 3.45556,-9.216797 2.30371,-2.335913 5.21581,-3.503881 8.73633,-3.503906 3.29588,2.5e-5 5.86375,1.072045 7.70362,3.216065 1.83982,2.144062 2.75974,4.86403 2.75976,8.159912 l -0.14355,1.92041 -17.71289,0 c 0.1289,2.496103 0.99315,4.472175 2.59277,5.928222 1.5996,1.456059 3.51952,2.184086 5.75976,2.184082 1.24804,4e-6 2.4641,-0.239986 3.6482,-0.71997 1.18406,-0.479976 2.04807,-0.944087 2.59204,-1.392334 l 0.86426,-0.720703 2.01562,3.312011 c -0.25588,0.256839 -0.63991,0.585208 -1.1521,0.985108 -0.51223,0.399904 -1.58425,0.927735 -3.21606,1.583496 -1.63186,0.655761 -3.29592,0.983642 -4.99219,0.983642 -3.80763,0 -6.91138,-1.208007 -9.31128,-3.624023 -2.3999,-2.41601 -3.59985,-5.447745 -3.59985,-9.095215 z m 4.99219,-2.833008 12.86279,0 c -0.0635,-1.951155 -0.63918,-3.470928 -1.72705,-4.559326 -1.08791,-1.088358 -2.41603,-1.632547 -3.98438,-1.632568 -1.82423,2.1e-5 -3.38429,0.536153 -4.68017,1.608398 -1.29591,1.072284 -2.11964,2.600115 -2.47119,4.583496 z"
- inkscape:connector-curvature="0" />
+ d="m 127.07981,80.557812 c 0,-4.062483 1.22864,-7.339562 3.68593,-9.83125 2.45729,-2.49164 5.56353,-3.737473 9.31875,-3.7375 3.51561,2.7e-5 6.25467,1.143515 8.2172,3.43047 1.96247,2.286999 2.94372,5.188298 2.94374,8.703906 l -0.15312,2.048437 h -18.89375 c 0.13749,2.66251 1.05936,4.77032 2.76562,6.323437 1.70624,1.55313 3.75416,2.329692 6.14375,2.329687 1.33124,5e-6 2.62837,-0.255985 3.89141,-0.767968 1.263,-0.511974 2.18461,-1.007026 2.76484,-1.485156 l 0.92188,-0.76875 2.14999,3.532812 c -0.27294,0.273962 -0.68257,0.624222 -1.2289,1.050782 -0.54638,0.426564 -1.68987,0.989584 -3.43047,1.689062 -1.74065,0.699479 -3.51565,1.049218 -5.325,1.049218 -4.06147,0 -7.37214,-1.28854 -9.93203,-3.865624 -2.5599,-2.577077 -3.83984,-5.810928 -3.83984,-9.701563 z m 5.325,-3.021875 h 13.72031 c -0.0677,-2.081232 -0.68179,-3.702323 -1.84219,-4.863281 -1.16043,-1.160915 -2.5771,-1.741383 -4.25,-1.741406 -1.94585,2.3e-5 -3.60991,0.571897 -4.99218,1.715625 -1.38231,1.143769 -2.26095,2.773456 -2.63594,4.889062 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3787"
- d="m 157.83702,87.666504 0,-4.12793 1.63184,0 c 0.64062,4e-6 0.99267,-0.352046 1.05615,-1.056152 l 2.3042,-28.703613 4.94385,0 7.96875,17.95166 1.68018,4.271484 0.0952,0 c 0.57615,-1.631823 1.13621,-3.055649 1.68018,-4.271484 l 7.96875,-17.95166 4.94384,0 2.3042,28.703613 c 0.0634,0.704106 0.415,1.056156 1.05469,1.056152 l 1.58496,0 0,4.12793 -4.27295,0 c -1.0557,0 -1.81546,-0.23999 -2.27929,-0.719971 -0.4639,-0.479979 -0.72806,-1.263914 -0.79248,-2.351806 l -1.39161,-17.904786 -0.0952,-4.990722 -0.0967,0 c -0.63968,2.111352 -1.23148,3.774924 -1.77539,4.990722 l -6.86426,14.879883 -4.03271,0 -6.86426,-14.879883 c -0.25587,-0.511697 -0.53566,-1.191628 -0.83936,-2.039795 -0.30372,-0.84812 -0.53565,-1.559789 -0.6958,-2.135009 l -0.28857,-0.864258 -0.0952,0 c 0.0312,2.015649 -9.8e-4,3.695335 -0.0967,5.039062 l -1.34326,17.904786 c -0.0645,1.087892 -0.32862,1.871827 -0.79248,2.351806 -0.46387,0.479981 -1.23975,0.719971 -2.32764,0.719971 z"
- inkscape:connector-curvature="0" />
+ d="m 168.35949,93.510938 v -4.403126 h 1.74063 c 0.68333,5e-6 1.05885,-0.375515 1.12656,-1.126562 l 2.45781,-30.617187 h 5.27344 l 8.5,19.148437 1.79219,4.55625 h 0.10155 c 0.61456,-1.740611 1.21196,-3.259359 1.79219,-4.55625 l 8.5,-19.148437 h 5.27343 l 2.45781,30.617187 c 0.0676,0.751047 0.44267,1.126567 1.12501,1.126562 h 1.69062 v 4.403126 h -4.55781 c -1.12608,0 -1.93649,-0.25599 -2.43125,-0.767969 -0.49482,-0.511978 -0.77659,-1.348175 -0.84531,-2.508594 L 200.87198,71.135937 200.77043,65.8125 h -0.10314 c -0.68233,2.252109 -1.31358,4.026586 -1.89375,5.323437 l -7.32188,15.871875 h -4.30156 l -7.32188,-15.871875 c -0.27292,-0.54581 -0.57137,-1.27107 -0.89531,-2.175781 -0.32397,-0.904662 -0.57136,-1.663775 -0.74219,-2.277343 l -0.30781,-0.921875 h -0.10154 c 0.0333,2.150025 -0.001,3.94169 -0.10315,5.374999 l -1.43281,19.098438 c -0.0688,1.160419 -0.35053,1.996616 -0.84531,2.508594 -0.4948,0.511979 -1.3224,0.767969 -2.48282,0.767969 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3789"
- d="m 203.55333,84.594727 c -2.52734,-2.432612 -3.79101,-5.472892 -3.79101,-9.12085 0,-3.647933 1.26391,-6.671856 3.79175,-9.071777 2.52782,-2.399879 5.61595,-3.599829 9.2644,-3.599854 3.67967,2.5e-5 6.78343,1.199975 9.31128,3.599854 2.5278,2.399921 3.79172,5.423844 3.79175,9.071777 -3e-5,3.647958 -1.272,6.687994 -3.81592,9.120117 -2.54397,2.43213 -5.63991,3.648193 -9.28784,3.648193 -3.64796,0 -6.73609,-1.215819 -9.26441,-3.64746 z m 3.38379,-15.312012 c -1.61524,1.631853 -2.42286,3.695815 -2.42285,6.191894 -1e-5,2.496104 0.80785,4.57618 2.42358,6.240235 1.61572,1.664067 3.57592,2.496097 5.88062,2.496093 2.33592,4e-6 4.31175,-0.82397 5.92749,-2.471923 1.6157,-1.647942 2.42356,-3.736075 2.42358,-6.264405 -2e-5,-2.496079 -0.80788,-4.560041 -2.42358,-6.191894 -1.61574,-1.631816 -3.59157,-2.447733 -5.92749,-2.447754 -2.3047,2.1e-5 -4.26515,0.815938 -5.88135,2.447754 z"
- inkscape:connector-curvature="0" />
+ d="m 217.12355,90.234375 c -2.69583,-2.594786 -4.04374,-5.837751 -4.04374,-9.728906 0,-3.891129 1.34817,-7.116647 4.04453,-9.676562 2.69634,-2.559871 5.99035,-3.839818 9.88203,-3.839845 3.92498,2.7e-5 7.23566,1.279974 9.93203,3.839845 2.69632,2.559915 4.0445,5.785433 4.04453,9.676562 -3e-5,3.891155 -1.3568,7.13386 -4.07031,9.728125 -2.71357,2.594272 -6.01591,3.891405 -9.90703,3.891405 -3.89116,0 -7.18516,-1.296873 -9.88204,-3.890624 z m 3.60938,-16.332812 c -1.72292,1.740643 -2.58439,3.942202 -2.58438,6.604687 -1e-5,2.662511 0.86171,4.881258 2.58516,6.65625 1.72343,1.775005 3.81431,2.662504 6.27266,2.662499 2.49165,5e-6 4.5992,-0.878901 6.32265,-2.636717 1.72342,-1.757805 2.58513,-3.985147 2.58516,-6.682032 -3e-5,-2.662485 -0.86174,-4.864044 -2.58516,-6.604687 -1.72345,-1.740604 -3.831,-2.610916 -6.32265,-2.610938 -2.45835,2.2e-5 -4.5495,0.870334 -6.27344,2.610938 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3791"
- d="m 233.17833,84.594727 c -2.52734,-2.432612 -3.79101,-5.472892 -3.79101,-9.12085 0,-3.647933 1.26391,-6.671856 3.79175,-9.071777 2.52782,-2.399879 5.61595,-3.599829 9.2644,-3.599854 3.67967,2.5e-5 6.78343,1.199975 9.31128,3.599854 2.5278,2.399921 3.79172,5.423844 3.79175,9.071777 -3e-5,3.647958 -1.272,6.687994 -3.81592,9.120117 -2.54397,2.43213 -5.63991,3.648193 -9.28784,3.648193 -3.64796,0 -6.73609,-1.215819 -9.26441,-3.64746 z m 3.38379,-15.312012 c -1.61524,1.631853 -2.42286,3.695815 -2.42285,6.191894 -1e-5,2.496104 0.80785,4.57618 2.42358,6.240235 1.61572,1.664067 3.57592,2.496097 5.88062,2.496093 2.33592,4e-6 4.31175,-0.82397 5.92749,-2.471923 1.6157,-1.647942 2.42356,-3.736075 2.42358,-6.264405 -2e-5,-2.496079 -0.80788,-4.560041 -2.42358,-6.191894 -1.61574,-1.631816 -3.59157,-2.447733 -5.92749,-2.447754 -2.3047,2.1e-5 -4.26515,0.815938 -5.88135,2.447754 z"
- inkscape:connector-curvature="0" />
+ d="m 248.72355,90.234375 c -2.69583,-2.594786 -4.04374,-5.837751 -4.04374,-9.728906 0,-3.891129 1.34817,-7.116647 4.04453,-9.676562 2.69634,-2.559871 5.99035,-3.839818 9.88203,-3.839845 3.92498,2.7e-5 7.23566,1.279974 9.93203,3.839845 2.69632,2.559915 4.0445,5.785433 4.04453,9.676562 -3e-5,3.891155 -1.3568,7.13386 -4.07031,9.728125 -2.71357,2.594272 -6.01591,3.891405 -9.90703,3.891405 -3.89116,0 -7.18516,-1.296873 -9.88204,-3.890624 z m 3.60938,-16.332812 c -1.72292,1.740643 -2.58439,3.942202 -2.58438,6.604687 -1e-5,2.662511 0.86171,4.881258 2.58516,6.65625 1.72343,1.775005 3.81431,2.662504 6.27266,2.662499 2.49165,5e-6 4.5992,-0.878901 6.32265,-2.636717 1.72342,-1.757805 2.58513,-3.985147 2.58516,-6.682032 -3e-5,-2.662485 -0.86174,-4.864044 -2.58516,-6.604687 -1.72345,-1.740604 -3.831,-2.610916 -6.32265,-2.610938 -2.45835,2.2e-5 -4.5495,0.870334 -6.27344,2.610938 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3793"
- d="m 261.36339,87.666504 0,-19.248047 c 0,-0.704082 -0.35205,-1.056132 -1.05615,-1.056152 l -1.96729,0 0,-3.984375 4.46338,0 c 2.04785,2.4e-5 3.07177,0.896019 3.07178,2.687988 l 0,0.912598 -0.0952,1.391601 0.0952,0 c 0.64062,-1.375956 1.72899,-2.647927 3.26514,-3.815918 1.53612,-1.167944 3.48777,-1.751928 5.85498,-1.751953 2.84861,2.5e-5 4.95286,0.768091 6.31274,2.304199 1.35984,1.536154 2.03977,3.872089 2.0398,7.007813 l 0,10.511719 c -3e-5,0.704105 0.35202,1.056156 1.05615,1.056152 l 1.96728,0 0,3.984375 -4.60693,0 c -1.08791,0 -1.87185,-0.23999 -2.35181,-0.719971 -0.48,-0.479979 -0.71999,-1.263914 -0.71997,-2.351806 l 0,-11.424317 c -2e-5,-1.952132 -0.31203,-3.456037 -0.93603,-4.511719 -0.62405,-1.055644 -1.83205,-1.583475 -3.62403,-1.583496 -1.85646,2.1e-5 -3.48072,0.552022 -4.8728,1.656006 -1.3921,1.104022 -2.32789,2.535905 -2.80737,4.295654 -0.2881,0.832046 -0.43214,1.919935 -0.43213,3.263672 l 0,11.375977 z"
- inkscape:connector-curvature="0" />
+ d="M 278.78762,93.510938 V 72.979687 c 0,-0.75102 -0.37552,-1.12654 -1.12656,-1.126562 h -2.09845 v -4.25 h 4.76094 c 2.18438,2.6e-5 3.27656,0.955754 3.27657,2.867188 v 0.973437 l -0.10155,1.484375 h 0.10155 c 0.68333,-1.467687 1.84425,-2.824456 3.48281,-4.070313 1.63853,-1.245807 3.72029,-1.868723 6.24532,-1.86875 3.03851,2.7e-5 5.28305,0.819297 6.73358,2.457813 1.4505,1.638564 2.17576,4.130228 2.17579,7.475 v 11.2125 c -3e-5,0.751046 0.37549,1.126567 1.12656,1.126563 h 2.09843 v 4.25 h -4.91406 c -1.16043,0 -1.99664,-0.25599 -2.50859,-0.767969 -0.512,-0.511978 -0.76799,-1.348175 -0.76797,-2.508594 V 78.048437 c -2e-5,-2.082274 -0.33283,-3.686439 -0.99843,-4.8125 -0.66566,-1.12602 -1.95419,-1.68904 -3.86563,-1.689062 -1.98023,2.2e-5 -3.71277,0.588823 -5.19766,1.766406 -1.4849,1.177624 -2.48308,2.704965 -2.99453,4.582031 -0.3073,0.887516 -0.46095,2.047931 -0.46093,3.48125 v 12.134376 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
</g>
<g
id="text3769"
- style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none;font-family:Museo 500;-inkscape-font-specification:Museo 500">
+ style="font-style:normal;font-weight:normal;font-size:10px;line-height:125%;font-family:'Museo 500';-inkscape-font-specification:'Museo 500';letter-spacing:0px;word-spacing:0px;fill:#262678;fill-opacity:1;stroke:none">
<path
id="path3774"
- d="m 285.52277,60.897457 0,-6.199951 -1.41999,0 c -0.14669,6e-6 -0.22003,0.07335 -0.22003,0.220032 l 0,0.449829 -0.88989,0 0,-0.929871 c 0,-0.226637 0.0433,-0.383294 0.12985,-0.469971 0.0866,-0.08666 0.24328,-0.129997 0.47012,-0.130004 l 4.85993,0 c 0.22664,7e-6 0.38329,0.04334 0.46997,0.130004 0.0867,0.08668 0.13,0.243334 0.13,0.469971 l 0,0.929871 -0.88989,0 0,-0.449829 c 0,-0.146682 -0.0734,-0.220026 -0.22003,-0.220032 l -1.41998,0 0,6.199951 z"
- inkscape:connector-curvature="0" />
+ d="m 304.55762,64.957287 v -6.613281 h -1.51465 c -0.15647,7e-6 -0.2347,0.07824 -0.2347,0.234701 v 0.479818 h -0.94922 v -0.991863 c 0,-0.241746 0.0462,-0.408847 0.13851,-0.501302 0.0924,-0.09244 0.2595,-0.138663 0.50146,-0.138671 h 5.18392 c 0.24175,8e-6 0.40885,0.04623 0.50131,0.138671 0.0925,0.09246 0.13866,0.259556 0.13866,0.501302 v 0.991863 h -0.94921 v -0.479818 c 0,-0.156461 -0.0783,-0.234694 -0.2347,-0.234701 h -1.51465 v 6.613281 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
<path
id="path3776"
- d="m 289.40979,60.897457 0,-0.859985 0.33997,0 c 0.13346,10e-7 0.2068,-0.07334 0.22003,-0.220032 l 0.48004,-5.979919 1.02997,0 1.66015,3.739929 0.35004,0.889892 0.0198,0 c 0.12003,-0.339963 0.23671,-0.636593 0.35003,-0.889892 l 1.66016,-3.739929 1.02997,0 0.48004,5.979919 c 0.0132,0.146689 0.0865,0.220033 0.21973,0.220032 l 0.3302,0 0,0.859985 -0.8902,0 c -0.21994,0 -0.37822,-0.05 -0.47486,-0.149994 -0.0966,-0.09999 -0.15167,-0.263315 -0.1651,-0.489959 l -0.28991,-3.730164 -0.0198,-1.039734 -0.0201,0 c -0.13327,0.439865 -0.25656,0.786443 -0.36987,1.039734 l -1.43006,3.099976 -0.84015,0 -1.43005,-3.099976 c -0.0533,-0.106604 -0.11159,-0.248256 -0.17487,-0.424957 -0.0633,-0.176692 -0.11159,-0.324957 -0.14495,-0.444794 l -0.0601,-0.180054 -0.0198,0 c 0.007,0.419927 -2.1e-4,0.769862 -0.0201,1.049805 l -0.27985,3.730164 c -0.0134,0.226644 -0.0685,0.389964 -0.1651,0.489959 -0.0966,0.1 -0.25828,0.149994 -0.48492,0.149994 z"
- inkscape:connector-curvature="0" />
+ d="M 308.70378,64.957287 V 64.03997 h 0.36263 c 0.14236,10e-7 0.22059,-0.07823 0.2347,-0.234701 l 0.51204,-6.37858 h 1.09864 l 1.77082,3.989258 0.37338,0.949218 h 0.0211 c 0.12803,-0.362627 0.25249,-0.679033 0.37336,-0.949218 l 1.77084,-3.989258 h 1.09864 l 0.51204,6.37858 c 0.0141,0.156469 0.0923,0.234702 0.23438,0.234701 h 0.35221 v 0.917317 h -0.94955 c -0.2346,0 -0.40343,-0.05333 -0.50651,-0.159993 -0.10304,-0.106656 -0.16178,-0.280869 -0.17611,-0.522623 l -0.30924,-3.978842 -0.0211,-1.109049 h -0.0214 c -0.14215,0.469189 -0.27366,0.838872 -0.39452,1.109049 l -1.5254,3.306641 h -0.89616 l -1.52539,-3.306641 c -0.0568,-0.113711 -0.11903,-0.264806 -0.18653,-0.453287 -0.0675,-0.188472 -0.11903,-0.346621 -0.15461,-0.474447 l -0.0641,-0.192058 h -0.0211 c 0.007,0.447922 -2.2e-4,0.821186 -0.0214,1.119792 l -0.2985,3.978842 c -0.0143,0.241754 -0.0731,0.415962 -0.17611,0.522623 -0.10304,0.106667 -0.2755,0.159993 -0.51725,0.159993 z"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.06666672" />
</g>
</g>
</g>
diff --git a/application/palemoon/branding/official/content/aboutDialog.css b/application/palemoon/branding/official/content/aboutDialog.css
index dbf04ae0a..5bcc229e7 100644
--- a/application/palemoon/branding/official/content/aboutDialog.css
+++ b/application/palemoon/branding/official/content/aboutDialog.css
@@ -3,41 +3,51 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#aboutPMDialogContainer {
- background-image: url("chrome://branding/content/about-background.png");
+ background-image: url("chrome://branding/content/about-background.jpg");
background-repeat: no-repeat;
- background-color: #F7F7F7;
- background-size: cover;
- color: #000020;
+ background-color: #9ABCD5;
+ color: #101020;
}
-#PMleftBox {
- /* background-image: url("chrome://branding/content/about-logo.png"); */
+#aboutHeaderBox {
+ background-image: url("chrome://branding/content/about-wordmark.png");
background-repeat: no-repeat;
- /* min-width and min-height create room for the logo */
- min-width: 210px;
- min-height: 210px;
- margin-top:20px;
- -moz-margin-start: 30px;
+ background-position: center center;
+ height: 44px;
}
-#PMrightBox {
- margin-left: 30px;
- margin-right: 30px;
+#aboutVersionBox {
+ text-shadow: 1px 1px 0px #9ABCD5;
}
-#PMbottomBox {
- padding: 15px 10px 0;
- background-color: rgba(240,240,255,.7);
-}
+#aboutTextBox {
+ animation: 3s fadeIn;
+ animation-fill-mode: forwards;
+ text-shadow: 1px 1px 0px #9ABCD5;
+ color: #101020;
+}
-#PMupdateDeck > hbox > label:not([class="text-link"]) {
- color: #909090;
+@keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
+
+#aboutLinkBox {
+ padding: 15px 10px 0;
}
-#PMtrademark {
- font-size: xx-small;
+#aboutPMtrademark {
+ font-size: 10px;
text-align: center;
- color: #999999;
+ color: #C0C0C0;
+ text-shadow: 1px 1px 0px #000000;
margin-top: 10px;
margin-bottom: 10px;
}
diff --git a/application/palemoon/branding/official/content/jar.mn b/application/palemoon/branding/official/content/jar.mn
index d8038bf9e..83ef1ed15 100644
--- a/application/palemoon/branding/official/content/jar.mn
+++ b/application/palemoon/branding/official/content/jar.mn
@@ -5,7 +5,7 @@
browser.jar:
% content branding %content/branding/ contentaccessible=yes
content/branding/about.png (about.png)
- content/branding/about-background.png (about-background.png)
+ content/branding/about-background.jpg (about-background.jpg)
content/branding/about-logo.png (about-logo.png)
content/branding/about-logo@2x.png (about-logo@2x.png)
content/branding/about-wordmark.png (about-wordmark.png)
diff --git a/application/palemoon/branding/unofficial/content/about-background.png b/application/palemoon/branding/unofficial/content/about-background.png
index 006818637..c034041f6 100644
--- a/application/palemoon/branding/unofficial/content/about-background.png
+++ b/application/palemoon/branding/unofficial/content/about-background.png
Binary files differ
diff --git a/application/palemoon/branding/unofficial/content/about-wordmark.png b/application/palemoon/branding/unofficial/content/about-wordmark.png
deleted file mode 100644
index 41889ba39..000000000
--- a/application/palemoon/branding/unofficial/content/about-wordmark.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/branding/unofficial/content/about-wordmark.svg b/application/palemoon/branding/unofficial/content/about-wordmark.svg
deleted file mode 100644
index fd0f1745e..000000000
--- a/application/palemoon/branding/unofficial/content/about-wordmark.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg version="1.1" id="aboutWordmark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="132px" height="48px" viewBox="0 0 132 48" xml:space="preserve">
-
- <path fill="#55575C"/>
-
-</svg>
diff --git a/application/palemoon/branding/unofficial/content/aboutDialog.css b/application/palemoon/branding/unofficial/content/aboutDialog.css
index 3f7c5ec23..5cc6b428a 100644
--- a/application/palemoon/branding/unofficial/content/aboutDialog.css
+++ b/application/palemoon/branding/unofficial/content/aboutDialog.css
@@ -9,16 +9,11 @@
color: #fff;
}
-.text-link {
- color: #eef !important;
+#aboutVersionBox {
+ /* No wordmark: leave empty space */
+ margin-top: 20px;
}
-#PMrightBox {
- /* this margin prevents text from overlapping the planet image */
- margin-left: 280px;
- margin-right: 20px;
-}
-
-#PMbottomBox {
- background-color: rgba(0,0,0,.7);
+#aboutLinkBox {
+ padding: 15px 10px 20px;
}
diff --git a/application/palemoon/branding/unofficial/content/jar.mn b/application/palemoon/branding/unofficial/content/jar.mn
index bdb1e8129..353695792 100644
--- a/application/palemoon/branding/unofficial/content/jar.mn
+++ b/application/palemoon/branding/unofficial/content/jar.mn
@@ -8,7 +8,6 @@ browser.jar:
content/branding/about-background.png (about-background.png)
content/branding/about-logo.png (about-logo.png)
content/branding/about-logo@2x.png (about-logo@2x.png)
- content/branding/about-wordmark.svg (about-wordmark.svg)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon16.png (../default16.png)
diff --git a/application/palemoon/branding/unstable/content/about-background.jpg b/application/palemoon/branding/unstable/content/about-background.jpg
new file mode 100644
index 000000000..a33b33183
--- /dev/null
+++ b/application/palemoon/branding/unstable/content/about-background.jpg
Binary files differ
diff --git a/application/palemoon/branding/unstable/content/about-background.png b/application/palemoon/branding/unstable/content/about-background.png
deleted file mode 100644
index 3d20e0658..000000000
--- a/application/palemoon/branding/unstable/content/about-background.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/branding/unstable/content/about-wordmark.png b/application/palemoon/branding/unstable/content/about-wordmark.png
index deb60b6b9..bf09f15a0 100644
--- a/application/palemoon/branding/unstable/content/about-wordmark.png
+++ b/application/palemoon/branding/unstable/content/about-wordmark.png
Binary files differ
diff --git a/application/palemoon/branding/unstable/content/about-wordmark.svg b/application/palemoon/branding/unstable/content/about-wordmark.svg
deleted file mode 100644
index fd0f1745e..000000000
--- a/application/palemoon/branding/unstable/content/about-wordmark.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg version="1.1" id="aboutWordmark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="132px" height="48px" viewBox="0 0 132 48" xml:space="preserve">
-
- <path fill="#55575C"/>
-
-</svg>
diff --git a/application/palemoon/branding/unstable/content/aboutDialog.css b/application/palemoon/branding/unstable/content/aboutDialog.css
index 9af49ba10..de71f259c 100644
--- a/application/palemoon/branding/unstable/content/aboutDialog.css
+++ b/application/palemoon/branding/unstable/content/aboutDialog.css
@@ -3,45 +3,51 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#aboutPMDialogContainer {
- background-image: url("chrome://branding/content/about-background.png");
+ background-image: url("chrome://branding/content/about-background.jpg");
background-repeat: no-repeat;
- background-color: #100000;
- background-size: cover;
- color: #E0E0FF;
+ background-color: #D5BC9A;
+ color: #202010;
}
-#PMleftBox {
- background-image: url("chrome://branding/content/about-logo.png");
+#aboutHeaderBox {
+ background-image: url("chrome://branding/content/about-wordmark.png");
background-repeat: no-repeat;
- /* min-width and min-height create room for the logo */
- min-width: 210px;
- min-height: 210px;
- margin-top:20px;
- -moz-margin-start: 30px;
+ background-position: center center;
+ height: 44px;
}
-#PMrightBox {
- margin-left: 30px;
- margin-right: 30px;
+#aboutVersionBox {
+ text-shadow: 1px 1px 0px #D5BC9A;
}
-#detailsBox > description > .text-link {
- color: #CDC36F;
+#aboutTextBox {
+ animation: 3s fadeIn;
+ animation-fill-mode: forwards;
+ text-shadow: 1px 1px 0px #D5BC9A;
+ color: #202010;
}
-#PMbottomBox {
- padding: 15px 10px 0;
- background-color: rgba(240,240,255,.7);
-}
+@keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
-#PMupdateDeck > hbox > label:not([class="text-link"]) {
- color: #909090;
+#aboutLinkBox {
+ padding: 15px 10px 0;
}
-#PMtrademark {
- font-size: xx-small;
+#aboutPMtrademark {
+ font-size: 10px;
text-align: center;
- color: #333333;
+ color: #C0C0C0;
+ text-shadow: 1px 1px 0px #000000;
margin-top: 10px;
margin-bottom: 10px;
}
diff --git a/application/palemoon/branding/unstable/content/jar.mn b/application/palemoon/branding/unstable/content/jar.mn
index 6903e9ac5..fcb789031 100644
--- a/application/palemoon/branding/unstable/content/jar.mn
+++ b/application/palemoon/branding/unstable/content/jar.mn
@@ -5,7 +5,7 @@
browser.jar:
% content branding %content/branding/ contentaccessible=yes
content/branding/about.png (about.png)
- content/branding/about-background.png (about-background.png)
+ content/branding/about-background.jpg (about-background.jpg)
content/branding/about-logo.png (about-logo.png)
content/branding/about-logo@2x.png (about-logo@2x.png)
content/branding/about-wordmark.png (about-wordmark.png)
diff --git a/application/palemoon/components/BrowserComponents.manifest b/application/palemoon/components/BrowserComponents.manifest
index b7f054eab..0ff14d066 100644
--- a/application/palemoon/components/BrowserComponents.manifest
+++ b/application/palemoon/components/BrowserComponents.manifest
@@ -10,7 +10,6 @@ contract @mozilla.org/network/protocol/about;1?what=palemoon {8cc51368-6aa0-43e8
contract @mozilla.org/network/protocol/about;1?what=permissions {8cc51368-6aa0-43e8-b762-bde9b9fd828c}
contract @mozilla.org/network/protocol/about;1?what=privatebrowsing {8cc51368-6aa0-43e8-b762-bde9b9fd828c}
contract @mozilla.org/network/protocol/about;1?what=rights {8cc51368-6aa0-43e8-b762-bde9b9fd828c}
-contract @mozilla.org/network/protocol/about;1?what=robots {8cc51368-6aa0-43e8-b762-bde9b9fd828c}
contract @mozilla.org/network/protocol/about;1?what=sessionrestore {8cc51368-6aa0-43e8-b762-bde9b9fd828c}
#ifdef MOZ_SERVICES_SYNC
contract @mozilla.org/network/protocol/about;1?what=sync-progress {8cc51368-6aa0-43e8-b762-bde9b9fd828c}
diff --git a/application/palemoon/components/distribution.js b/application/palemoon/components/distribution.js
index d3300604e..121e55b1b 100644
--- a/application/palemoon/components/distribution.js
+++ b/application/palemoon/components/distribution.js
@@ -38,13 +38,7 @@ DistributionCustomizer.prototype = {
},
get _locale() {
- let locale;
- try {
- locale = this._prefs.getCharPref("general.useragent.locale");
- }
- catch (e) {
- locale = "en-US";
- }
+ let locale = this._prefs.getCharPref("general.useragent.locale", "en-US");
this.__defineGetter__("_locale", function() locale);
return this._locale;
},
@@ -221,11 +215,7 @@ DistributionCustomizer.prototype = {
this._ini.getString("Global", "id") + ".bookmarksProcessed";
}
- let bmProcessed = false;
- try {
- bmProcessed = this._prefs.getBoolPref(bmProcessedPref);
- }
- catch (e) {}
+ let bmProcessed = this._prefs.getBoolPref(bmProcessedPref, false);
if (!bmProcessed) {
if (sections["BookmarksMenu"])
diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js
index d704835bb..facde5815 100644
--- a/application/palemoon/components/feeds/FeedWriter.js
+++ b/application/palemoon/components/feeds/FeedWriter.js
@@ -18,12 +18,7 @@ function LOG(str) {
var prefB = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
- var shouldLog = false;
- try {
- shouldLog = prefB.getBoolPref("feeds.log");
- }
- catch (ex) {
- }
+ var shouldLog = prefB.getBoolPref("feeds.log", false);
if (shouldLog)
dump("*** Feeds: " + str + "\n");
@@ -874,11 +869,7 @@ FeedWriter.prototype = {
Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
- var handler = "bookmarks";
- try {
- handler = prefs.getCharPref(getPrefReaderForType(feedType));
- }
- catch (ex) { }
+ var handler = prefs.getCharPref(getPrefReaderForType(feedType), "bookmarks");
switch (handler) {
case "web": {
@@ -1076,11 +1067,7 @@ FeedWriter.prototype = {
.addEventListener("command", this, false);
// first-run ui
- var showFirstRunUI = true;
- try {
- showFirstRunUI = prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI);
- }
- catch (ex) { }
+ var showFirstRunUI = prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI, true);
if (showFirstRunUI) {
var textfeedinfo1, textfeedinfo2;
switch (feedType) {
diff --git a/application/palemoon/components/feeds/WebContentConverter.js b/application/palemoon/components/feeds/WebContentConverter.js
index 41679b028..42e2edee0 100644
--- a/application/palemoon/components/feeds/WebContentConverter.js
+++ b/application/palemoon/components/feeds/WebContentConverter.js
@@ -436,13 +436,8 @@ WebContentConverterRegistrar.prototype = {
// check if it is in the black list
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
- var allowed;
- try {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
- }
- catch (e) {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
- }
+ var allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol,
+ pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default"));
if (!allowed) {
// XXX this should be a "security exception" according to spec
throw("Not allowed to register a protocol handler for " + aProtocol);
diff --git a/application/palemoon/components/nsAboutRedirector.js b/application/palemoon/components/nsAboutRedirector.js
index 9c7d7953f..4d99a78f5 100644
--- a/application/palemoon/components/nsAboutRedirector.js
+++ b/application/palemoon/components/nsAboutRedirector.js
@@ -61,10 +61,6 @@ AboutRedirector.prototype = {
url: "chrome://global/content/aboutRights.xhtml",
flags: (URI_SAFE_FOR_UNTRUSTED_CONTENT | MAKE_LINKABLE | ALLOW_SCRIPT)
},
- "robots": {
- url: "chrome://browser/content/aboutRobots.xhtml",
- flags: (URI_SAFE_FOR_UNTRUSTED_CONTENT | ALLOW_SCRIPT | HIDE_FROM_ABOUTABOUT)
- },
"sessionrestore": {
url: "chrome://browser/content/aboutSessionRestore.xhtml",
flags: ALLOW_SCRIPT
diff --git a/application/palemoon/components/nsBrowserContentHandler.js b/application/palemoon/components/nsBrowserContentHandler.js
index 6a75b40f2..e7f1414c2 100644
--- a/application/palemoon/components/nsBrowserContentHandler.js
+++ b/application/palemoon/components/nsBrowserContentHandler.js
@@ -100,20 +100,14 @@ const OVERRIDE_NEW_BUILD_ID = 3;
* OVERRIDE_NONE otherwise.
*/
function needHomepageOverride(prefb) {
- var savedmstone = null;
- try {
- savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone");
- } catch (e) {}
+ var savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone", "");
if (savedmstone == "ignore")
return OVERRIDE_NONE;
var mstone = Services.appinfo.platformVersion;
- var savedBuildID = null;
- try {
- savedBuildID = prefb.getCharPref("browser.startup.homepage_override.buildID");
- } catch (e) {}
+ var savedBuildID = prefb.getCharPref("browser.startup.homepage_override.buildID", "");
var buildID = Services.appinfo.platformBuildID;
@@ -550,10 +544,7 @@ nsBrowserContentHandler.prototype = {
// URL if we do end up showing an overridePage. This makes it possible
// to have the overridePage's content vary depending on the version we're
// upgrading from.
- let old_mstone = "unknown";
- try {
- old_mstone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone");
- } catch (ex) {}
+ let old_mstone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone", "unknown");
let override = needHomepageOverride(prefb);
if (override != OVERRIDE_NONE) {
switch (override) {
diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js
index ad48dab29..01a133833 100644
--- a/application/palemoon/components/nsBrowserGlue.js
+++ b/application/palemoon/components/nsBrowserGlue.js
@@ -990,14 +990,8 @@ BrowserGlue.prototype = {
// An import operation is about to run.
// Don't try to recreate smart bookmarks if autoExportHTML is true or
// smart bookmarks are disabled.
- var autoExportHTML = false;
- try {
- autoExportHTML = Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML");
- } catch(ex) {}
- var smartBookmarksVersion = 0;
- try {
- smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion");
- } catch(ex) {}
+ var autoExportHTML = Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML", false);
+ var smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion", 0);
if (!autoExportHTML && smartBookmarksVersion != -1)
Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
@@ -1556,10 +1550,7 @@ BrowserGlue.prototype = {
const MAX_RESULTS = 10;
// Get current smart bookmarks version. If not set, create them.
- let smartBookmarksCurrentVersion = 0;
- try {
- smartBookmarksCurrentVersion = Services.prefs.getIntPref(SMART_BOOKMARKS_PREF);
- } catch(ex) {}
+ let smartBookmarksCurrentVersion = Services.prefs.getIntPref(SMART_BOOKMARKS_PREF, 0);
// If version is current or smart bookmarks are disabled, just bail out.
if (smartBookmarksCurrentVersion == -1 ||
diff --git a/application/palemoon/components/preferences/newtaburl.js b/application/palemoon/components/preferences/newtaburl.js
index ac0eec1c5..3c82df846 100644
--- a/application/palemoon/components/preferences/newtaburl.js
+++ b/application/palemoon/components/preferences/newtaburl.js
@@ -22,7 +22,11 @@ var gNewtabUrl = {
return;
}
} else {
- newtabUrlChoice = Services.prefs.getIntPref("browser.newtab.choice");
+ if (this.newtabUrlChoiceIsSet) {
+ newtabUrlChoice = Services.prefs.getIntPref("browser.newtab.choice");
+ } else {
+ newtabUrlChoice = this.getNewtabChoice();
+ }
}
if (browserHomepageUrl || browserHomepageUrl == "") {
if (Services.prefs.getBoolPref("browser.preferences.instantApply")) {
@@ -64,5 +68,35 @@ var gNewtabUrl = {
}
Services.prefs.setCharPref("browser.newtab.url",newtabUrlPref);
} catch(e) { console.error(e); }
+ },
+
+ /**
+ * Determines the value of browser.newtab.choice based
+ * on the value of browser.newtab.url
+ *
+ * @returns the value of browser.newtab.choice
+ */
+ getNewtabChoice: function() {
+ let newtabUrlPref = Services.prefs.getCharPref("browser.newtab.url");
+ let browserHomepageUrl = Services.prefs.getComplexValue("browser.startup.homepage",
+ Components.interfaces.nsIPrefLocalizedString).data;
+ let newtabUrlSanitizedPref = browserHomepageUrl.split("|")[0];
+ let defaultStartupHomepage = Services.prefs.getDefaultBranch("browser.")
+ .getComplexValue("startup.homepage",
+ Components.interfaces.nsIPrefLocalizedString).data;
+ switch (newtabUrlPref) {
+ case "about:logopage":
+ return 1;
+ case defaultStartupHomepage:
+ return 2;
+ case newtabUrlSanitizedPref:
+ return 3;
+ case "about:newtab":
+ return 4;
+ default: // Custom URL entered.
+ // We need this to consider instantApply.
+ this.newtabPageCustom = newtabUrlPref;
+ return 0;
+ }
}
};
diff --git a/application/palemoon/components/preferences/tabs.js b/application/palemoon/components/preferences/tabs.js
index 17084a770..b09cb60df 100644
--- a/application/palemoon/components/preferences/tabs.js
+++ b/application/palemoon/components/preferences/tabs.js
@@ -78,34 +78,13 @@ var gTabsPane = {
/**
* Determines the value of the New Tab display drop-down based
* on the value of browser.newtab.url.
- *
- * @returns the appropriate value of browser.newtab.choice
*/
readNewtabUrl: function() {
- let newtabUrlPref = document.getElementById("browser.newtab.url");
- let newtabUrlSanitizedPref = document.getElementById("browser.newtab.myhome");
let newtabUrlChoice = document.getElementById("browser.newtab.choice");
- let defaultStartupHomepage = Services.prefs.getDefaultBranch("browser.")
- .getComplexValue("startup.homepage",
- Components.interfaces.nsIPrefLocalizedString).data;
- switch (newtabUrlPref.value) {
- case "about:logopage":
- newtabUrlChoice.value = 1;
- break;
- case defaultStartupHomepage:
- newtabUrlChoice.value = 2;
- break;
- case newtabUrlSanitizedPref.value:
- newtabUrlChoice.value = 3;
- break;
- case "about:newtab":
- newtabUrlChoice.value = 4;
- break;
- default: // Custom URL entered.
- document.getElementById("newtabPageCustom").hidden = false;
- newtabUrlChoice.value = 0;
- // We need this to consider instantApply.
- this.newtabPageCustom = newtabUrlPref.value;
+ newtabUrlChoice.value = gNewtabUrl.getNewtabChoice();
+ if (newtabUrlChoice.value == 0) {
+ document.getElementById("newtabPageCustom").hidden = false;
}
+ gNewtabUrl.newtabUrlChoiceIsSet = true;
}
};
diff --git a/application/palemoon/configure.in b/application/palemoon/configure.in
index 96f63781e..eb02af3c0 100644
--- a/application/palemoon/configure.in
+++ b/application/palemoon/configure.in
@@ -36,7 +36,3 @@ MOZ_ARG_DISABLE_BOOL(sync,
MOZ_SERVICES_SYNC=,
MOZ_SERVICES_SYNC=1)
-if test -z "$MOZ_SERVICES_SYNC"; then
- MOZ_SERVICES_CLOUDSYNC=
-fi
-
diff --git a/application/palemoon/confvars.sh b/application/palemoon/confvars.sh
index 26b02fc85..6216cba5b 100644
--- a/application/palemoon/confvars.sh
+++ b/application/palemoon/confvars.sh
@@ -99,7 +99,6 @@ if test "$OS_ARCH" = "WINNT" -o \
fi
# Short-circuit a few services to be removed
-MOZ_MAINTENANCE_SERVICE=
MOZ_SERVICES_HEALTHREPORT=
MOZ_ADDON_SIGNING=0
MOZ_REQUIRE_SIGNING=0
diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in
index 1247d3171..d8722bf08 100644
--- a/application/palemoon/installer/package-manifest.in
+++ b/application/palemoon/installer/package-manifest.in
@@ -318,13 +318,6 @@
@RESPATH@/chrome/pippki@JAREXT@
@RESPATH@/chrome/pippki.manifest
-; for Solaris SPARC
-#ifdef SOLARIS
-bin/libfreebl_32fpu_3.so
-bin/libfreebl_32int_3.so
-bin/libfreebl_32int64_3.so
-#endif
-
; [Updater]
;
#ifdef MOZ_UPDATER
diff --git a/application/palemoon/installer/windows/Makefile.in b/application/palemoon/installer/windows/Makefile.in
index 9b0f697c8..d2be8aec2 100644
--- a/application/palemoon/installer/windows/Makefile.in
+++ b/application/palemoon/installer/windows/Makefile.in
@@ -14,12 +14,6 @@ INSTALLER_FILES = \
nsis/shared.nsh \
$(NULL)
-ifdef MOZ_MAINTENANCE_SERVICE
-INSTALLER_FILES += \
- nsis/maintenanceservice_installer.nsi \
- $(NULL)
-endif
-
BRANDING_FILES = \
branding.nsi \
appname.bmp \
@@ -58,17 +52,6 @@ uninstaller::
--preprocess-locale $(topsrcdir) \
$(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
-# For building the maintenanceservice installer
-ifdef MOZ_MAINTENANCE_SERVICE
-maintenanceservice_installer::
- $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
- $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
- $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
- $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
- --preprocess-locale $(topsrcdir) \
- $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
-endif
-
$(CONFIG_DIR)/setup.exe::
$(RM) -r $(CONFIG_DIR)
$(MKDIR) $(CONFIG_DIR)
diff --git a/application/palemoon/installer/windows/nsis/defines.nsi.in b/application/palemoon/installer/windows/nsis/defines.nsi.in
index edef802a9..1764b10c4 100644
--- a/application/palemoon/installer/windows/nsis/defines.nsi.in
+++ b/application/palemoon/installer/windows/nsis/defines.nsi.in
@@ -51,10 +51,6 @@
!define MinSupportedCPU "SSE2"
-#ifdef MOZ_MAINTENANCE_SERVICE
-!define MOZ_MAINTENANCE_SERVICE
-#endif
-
# File details shared by both the installer and uninstaller
VIProductVersion "1.0.0.0"
VIAddVersionKey "ProductName" "${BrandShortName}"
diff --git a/application/palemoon/installer/windows/nsis/installer.nsi b/application/palemoon/installer/windows/nsis/installer.nsi
index 276b94f74..9216bb6e1 100644
--- a/application/palemoon/installer/windows/nsis/installer.nsi
+++ b/application/palemoon/installer/windows/nsis/installer.nsi
@@ -165,11 +165,6 @@ Page custom preOptions leaveOptions
!define MUI_DIRECTORYPAGE_VERIFYONLEAVE
!insertmacro MUI_PAGE_DIRECTORY
-; Custom Components Page
-!ifdef MOZ_MAINTENANCE_SERVICE
-Page custom preComponents leaveComponents
-!endif
-
; Custom Shortcuts Page
Page custom preShortcuts leaveShortcuts
@@ -427,41 +422,6 @@ Section "-Application" APP_IDX
${EndIf}
${EndIf}
-!ifdef MOZ_MAINTENANCE_SERVICE
- ; If the maintenance service page was displayed then a value was already
- ; explicitly selected for installing the maintenance service and
- ; and so InstallMaintenanceService will already be 0 or 1.
- ; If the maintenance service page was not displayed then
- ; InstallMaintenanceService will be equal to "".
- ${If} $InstallMaintenanceService == ""
- Call IsUserAdmin
- Pop $R0
- ${If} $R0 == "true"
- ; Only proceed if we have HKLM write access
- ${AndIf} $TmpVal == "HKLM"
- ; On Windows < XP SP3 we do not install the maintenance service.
- ${If} ${IsWinXP}
- ${AndIf} ${AtMostServicePack} 2
- StrCpy $InstallMaintenanceService "0"
- ${Else}
- ; The user is an admin, so we should default to installing the service.
- StrCpy $InstallMaintenanceService "1"
- ${EndIf}
- ${Else}
- ; The user is not admin, so we can't install the service.
- StrCpy $InstallMaintenanceService "0"
- ${EndIf}
- ${EndIf}
-
- ${If} $InstallMaintenanceService == "1"
- ; The user wants to install the maintenance service, so execute
- ; the pre-packaged maintenance service installer.
- ; This option can only be turned on if the user is an admin so there
- ; is no need to use ExecShell w/ verb runas to enforce elevated.
- nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\""
- ${EndIf}
-!endif
-
; These need special handling on uninstall since they may be overwritten by
; an install into a different location.
StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}"
@@ -578,13 +538,6 @@ Section "-Application" APP_IDX
${EndIf}
${EndUnless}
${EndIf}
-
-!ifdef MOZ_MAINTENANCE_SERVICE
- ${If} $TmpVal == "HKLM"
- ; Add the registry keys for allowed certificates.
- ${AddMaintCertKeys}
- ${EndIf}
-!endif
SectionEnd
; Cleanup operations to perform at the end of the installation.
@@ -948,59 +901,6 @@ Function leaveShortcuts
${EndIf}
FunctionEnd
-!ifdef MOZ_MAINTENANCE_SERVICE
-Function preComponents
- ; If the service already exists, don't show this page
- ServicesHelper::IsInstalled "MozillaMaintenance"
- Pop $R9
- ${If} $R9 == 1
- ; The service already exists so don't show this page.
- Abort
- ${EndIf}
-
- ; On Windows < XP SP3 we do not install the maintenance service.
- ${If} ${IsWinXP}
- ${AndIf} ${AtMostServicePack} 2
- Abort
- ${EndIf}
-
- ; Don't show the custom components page if the
- ; user is not an admin
- Call IsUserAdmin
- Pop $R9
- ${If} $R9 != "true"
- Abort
- ${EndIf}
-
- ; Only show the maintenance service page if we have write access to HKLM
- ClearErrors
- WriteRegStr HKLM "Software\Mozilla" \
- "${BrandShortName}InstallerTest" "Write Test"
- ${If} ${Errors}
- ClearErrors
- Abort
- ${Else}
- DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
- ${EndIf}
-
- StrCpy $PageName "Components"
- ${CheckCustomCommon}
- !insertmacro MUI_HEADER_TEXT "$(COMPONENTS_PAGE_TITLE)" "$(COMPONENTS_PAGE_SUBTITLE)"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini"
-FunctionEnd
-
-Function leaveComponents
- ${MUI_INSTALLOPTIONS_READ} $0 "components.ini" "Settings" "State"
- ${If} $0 != 0
- Abort
- ${EndIf}
- ${MUI_INSTALLOPTIONS_READ} $InstallMaintenanceService "components.ini" "Field 2" "State"
- ${If} $InstallType == ${INSTALLTYPE_CUSTOM}
- Call CheckExistingInstall
- ${EndIf}
-FunctionEnd
-!endif
-
Function preSummary
StrCpy $PageName "Summary"
; Setup the summary.ini file for the Custom Summary Page
@@ -1180,7 +1080,6 @@ Function .onInit
!insertmacro InitInstallOptionsFile "options.ini"
!insertmacro InitInstallOptionsFile "shortcuts.ini"
- !insertmacro InitInstallOptionsFile "components.ini"
!insertmacro InitInstallOptionsFile "summary.ini"
WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
@@ -1255,36 +1154,6 @@ Function .onInit
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Bottom "50"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" State "1"
- ; Don't offer to install the quick launch shortcut on Windows 7
- ${Unless} ${AtLeastWin7}
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Type "checkbox"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Text "$(ICONS_QUICKLAUNCH)"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Left "0"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Right "-1"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Top "60"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Bottom "70"
- WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" State "1"
- ${EndUnless}
-
- ; Setup the components.ini file for the Components Page
- WriteINIStr "$PLUGINSDIR\components.ini" "Settings" NumFields "2"
-
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Type "label"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Text "$(OPTIONAL_COMPONENTS_DESC)"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Left "0"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Right "-1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Top "5"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Bottom "25"
-
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Type "checkbox"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Text "$(MAINTENANCE_SERVICE_CHECKBOX_DESC)"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Left "0"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Right "-1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Top "27"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Bottom "37"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" State "1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Flags "GROUP"
-
; There must always be a core directory.
${GetSize} "$EXEDIR\core\" "/S=0K" $R5 $R7 $R8
SectionSetSize ${APP_IDX} $R5
diff --git a/application/palemoon/installer/windows/nsis/maintenanceservice_installer.nsi b/application/palemoon/installer/windows/nsis/maintenanceservice_installer.nsi
deleted file mode 100644
index 1f73bac6a..000000000
--- a/application/palemoon/installer/windows/nsis/maintenanceservice_installer.nsi
+++ /dev/null
@@ -1,332 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs
-!verbose 3
-
-; 7-Zip provides better compression than the lzma from NSIS so we add the files
-; uncompressed and use 7-Zip to create a SFX archive of it
-SetDatablockOptimize on
-SetCompress off
-CRCCheck on
-
-RequestExecutionLevel admin
-
-; The commands inside this ifdef require NSIS 3.0a2 or greater so the ifdef can
-; be removed after we require NSIS 3.0a2 or greater.
-!ifdef NSIS_PACKEDVERSION
- Unicode true
- ManifestSupportedOS all
- ManifestDPIAware true
-!endif
-
-!addplugindir ./
-
-; Variables
-Var TempMaintServiceName
-Var BrandFullNameDA
-Var BrandFullName
-
-; Other included files may depend upon these includes!
-; The following includes are provided by NSIS.
-!include FileFunc.nsh
-!include LogicLib.nsh
-!include MUI.nsh
-!include WinMessages.nsh
-!include WinVer.nsh
-!include WordFunc.nsh
-
-!insertmacro GetOptions
-!insertmacro GetParameters
-!insertmacro GetSize
-
-; The test slaves use this fallback key to run tests.
-; And anyone that wants to run tests themselves should already have
-; this installed.
-!define FallbackKey \
- "SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4"
-
-!define CompanyName "Mozilla Corporation"
-!define BrandFullNameInternal ""
-
-; The following includes are custom.
-!include defines.nsi
-; We keep defines.nsi defined so that we get other things like
-; the version number, but we redefine BrandFullName
-!define MaintFullName "Mozilla Maintenance Service"
-!undef BrandFullName
-!define BrandFullName "${MaintFullName}"
-
-!include common.nsh
-!include locales.nsi
-
-VIAddVersionKey "FileDescription" "${MaintFullName} Installer"
-VIAddVersionKey "OriginalFilename" "maintenanceservice_installer.exe"
-
-Name "${MaintFullName}"
-OutFile "maintenanceservice_installer.exe"
-
-; Get installation folder from registry if available
-InstallDirRegKey HKLM "Software\Mozilla\MaintenanceService" ""
-
-SetOverwrite on
-
-; serviceinstall.cpp also uses this key, in case the path is changed, update
-; there too.
-!define MaintUninstallKey \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService"
-
-; Always install into the 32-bit location even if we have a 64-bit build.
-; This is because we use only 1 service for all Basilisk channels.
-; Allow either x86 and x64 builds to exist at this location, depending on
-; what is the latest build.
-InstallDir "$PROGRAMFILES32\${MaintFullName}\"
-ShowUnInstDetails nevershow
-
-################################################################################
-# Modern User Interface - MUI
-
-!define MUI_ICON setup.ico
-!define MUI_UNICON setup.ico
-!define MUI_WELCOMEPAGE_TITLE_3LINES
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp
-
-;Interface Settings
-!define MUI_ABORTWARNING
-
-; Uninstaller Pages
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-
-################################################################################
-# Language
-
-!insertmacro MOZ_MUI_LANGUAGE 'baseLocale'
-!verbose push
-!verbose 3
-!include "overrideLocale.nsh"
-!include "customLocale.nsh"
-!verbose pop
-
-; Set this after the locale files to override it if it is in the locale
-; using " " for BrandingText will hide the "Nullsoft Install System..." branding
-BrandingText " "
-
-Function .onInit
- ; Remove the current exe directory from the search order.
- ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
- System::Call 'kernel32::SetDllDirectoryW(w "")'
-
- SetSilent silent
-
- ${Unless} ${AtLeastWin7}
- Abort
- ${EndUnless}
-FunctionEnd
-
-Function un.onInit
- ; Remove the current exe directory from the search order.
- ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
- System::Call 'kernel32::SetDllDirectoryW(w "")'
-
-; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be
-; removed after we require NSIS 3.0a2 or greater.
-!ifndef NSIS_PACKEDVERSION
- ${If} ${AtLeastWinVista}
- System::Call 'user32::SetProcessDPIAware()'
- ${EndIf}
-!endif
-
- StrCpy $BrandFullNameDA "${MaintFullName}"
- StrCpy $BrandFullName "${MaintFullName}"
-FunctionEnd
-
-Section "MaintenanceService"
- AllowSkipFiles off
-
- CreateDirectory $INSTDIR
- SetOutPath $INSTDIR
-
- ; If the service already exists, then it will be stopped when upgrading it
- ; via the maintenanceservice_tmp.exe command executed below.
- ; The maintenanceservice_tmp.exe command will rename the file to
- ; maintenanceservice.exe if maintenanceservice_tmp.exe is newer.
- ; If the service does not exist yet, we install it and drop the file on
- ; disk as maintenanceservice.exe directly.
- StrCpy $TempMaintServiceName "maintenanceservice.exe"
- IfFileExists "$INSTDIR\maintenanceservice.exe" 0 skipAlreadyExists
- StrCpy $TempMaintServiceName "maintenanceservice_tmp.exe"
- skipAlreadyExists:
-
- ; We always write out a copy and then decide whether to install it or
- ; not via calling its 'install' cmdline which works by version comparison.
- CopyFiles "$EXEDIR\maintenanceservice.exe" "$INSTDIR\$TempMaintServiceName"
-
- ; The updater.ini file is only used when performing an install or upgrade,
- ; and only if that install or upgrade is successful. If an old updater.ini
- ; happened to be copied into the maintenance service installation directory
- ; but the service was not newer, the updater.ini file would be unused.
- ; It is used to fill the description of the service on success.
- CopyFiles "$EXEDIR\updater.ini" "$INSTDIR\updater.ini"
-
- ; Install the application maintenance service.
- ; If a service already exists, the command line parameter will stop the
- ; service and only install itself if it is newer than the already installed
- ; service. If successful it will remove the old maintenanceservice.exe
- ; and replace it with maintenanceservice_tmp.exe.
- ClearErrors
- ${GetParameters} $0
- ${GetOptions} "$0" "/Upgrade" $0
- ${If} ${Errors}
- ExecWait '"$INSTDIR\$TempMaintServiceName" install'
- ${Else}
- ; The upgrade cmdline is the same as install except
- ; It will fail if the service isn't already installed.
- ExecWait '"$INSTDIR\$TempMaintServiceName" upgrade'
- ${EndIf}
-
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- WriteRegStr HKLM "${MaintUninstallKey}" "DisplayName" "${MaintFullName}"
- WriteRegStr HKLM "${MaintUninstallKey}" "UninstallString" \
- '"$INSTDIR\uninstall.exe"'
- WriteRegStr HKLM "${MaintUninstallKey}" "DisplayIcon" \
- "$INSTDIR\Uninstall.exe,0"
- WriteRegStr HKLM "${MaintUninstallKey}" "DisplayVersion" "${AppVersion}"
- WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Mozilla"
- WriteRegStr HKLM "${MaintUninstallKey}" "Comments" "${BrandFullName}"
- WriteRegDWORD HKLM "${MaintUninstallKey}" "NoModify" 1
- ${GetSize} "$INSTDIR" "/S=0K" $R2 $R3 $R4
- WriteRegDWORD HKLM "${MaintUninstallKey}" "EstimatedSize" $R2
-
- ; Write out that a maintenance service was attempted.
- ; We do this because on upgrades we will check this value and we only
- ; want to install once on the first upgrade to maintenance service.
- ; Also write out that we are currently installed, preferences will check
- ; this value to determine if we should show the service update pref.
- ; Since the Maintenance service can be installed either x86 or x64,
- ; always use the 64-bit registry for checking if an attempt was made.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1
- DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
-
- ; Included here for debug purposes only.
- ; These keys are used to bypass the installation dir is a valid installation
- ; check from the service so that tests can be run.
- ; WriteRegStr HKLM "${FallbackKey}\0" "name" "Mozilla Corporation"
- ; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "DigiCert SHA2 Assured ID Code Signing CA"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
-SectionEnd
-
-; By renaming before deleting we improve things slightly in case
-; there is a file in use error. In this case a new install can happen.
-Function un.RenameDelete
- Pop $9
- ; If the .moz-delete file already exists previously, delete it
- ; If it doesn't exist, the call is ignored.
- ; We don't need to pass /REBOOTOK here since it was already marked that way
- ; if it exists.
- Delete "$9.moz-delete"
- Rename "$9" "$9.moz-delete"
- ${If} ${Errors}
- Delete /REBOOTOK "$9"
- ${Else}
- Delete /REBOOTOK "$9.moz-delete"
- ${EndIf}
- ClearErrors
-FunctionEnd
-
-Section "Uninstall"
- ; Delete the service so that no updates will be attempted
- ExecWait '"$INSTDIR\maintenanceservice.exe" uninstall'
-
- Push "$INSTDIR\updater.ini"
- Call un.RenameDelete
- Push "$INSTDIR\maintenanceservice.exe"
- Call un.RenameDelete
- Push "$INSTDIR\maintenanceservice_tmp.exe"
- Call un.RenameDelete
- Push "$INSTDIR\maintenanceservice.old"
- Call un.RenameDelete
- Push "$INSTDIR\Uninstall.exe"
- Call un.RenameDelete
- Push "$INSTDIR\update\updater.ini"
- Call un.RenameDelete
- Push "$INSTDIR\update\updater.exe"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-1.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-2.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-3.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-4.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-5.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-6.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-7.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-8.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-9.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-10.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-install.log"
- Call un.RenameDelete
- Push "$INSTDIR\logs\maintenanceservice-uninstall.log"
- Call un.RenameDelete
- SetShellVarContext all
- Push "$APPDATA\Mozilla\logs\maintenanceservice.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-1.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-2.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-3.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-4.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-5.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-6.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-7.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-8.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-9.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-10.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-install.log"
- Call un.RenameDelete
- Push "$APPDATA\Mozilla\logs\maintenanceservice-uninstall.log"
- Call un.RenameDelete
- RMDir /REBOOTOK "$APPDATA\Mozilla\logs"
- RMDir /REBOOTOK "$APPDATA\Mozilla"
- RMDir /REBOOTOK "$INSTDIR\logs"
- RMDir /REBOOTOK "$INSTDIR\update"
- RMDir /REBOOTOK "$INSTDIR"
-
- DeleteRegKey HKLM "${MaintUninstallKey}"
-
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "Installed"
- DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
- DeleteRegKey HKLM "${FallbackKey}\"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
-SectionEnd
diff --git a/application/palemoon/installer/windows/nsis/shared.nsh b/application/palemoon/installer/windows/nsis/shared.nsh
index 294e3e6fc..815853ae7 100644
--- a/application/palemoon/installer/windows/nsis/shared.nsh
+++ b/application/palemoon/installer/windows/nsis/shared.nsh
@@ -124,51 +124,6 @@
${FixDistributionsINI}
RmDir /r /REBOOTOK "$INSTDIR\${TO_BE_DELETED}"
-
-!ifdef MOZ_MAINTENANCE_SERVICE
- Call IsUserAdmin
- Pop $R0
- ${If} $R0 == "true"
- ; Only proceed if we have HKLM write access
- ${AndIf} $TmpVal == "HKLM"
- ; On Windows 2000 we do not install the maintenance service.
- ${AndIf} ${AtLeastWinXP}
- ; We check to see if the maintenance service install was already attempted.
- ; Since the Maintenance service can be installed either x86 or x64,
- ; always use the 64-bit registry for checking if an attempt was made.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- ReadRegDWORD $5 HKLM "Software\Mozilla\MaintenanceService" "Attempted"
- ClearErrors
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
-
- ; Add the registry keys for allowed certificates.
- ${AddMaintCertKeys}
-
- ; If the maintenance service is already installed, do nothing.
- ; The maintenance service will launch:
- ; maintenanceservice_installer.exe /Upgrade to upgrade the maintenance
- ; service if necessary. If the update was done from updater.exe without
- ; the service (i.e. service is failing), updater.exe will do the update of
- ; the service. The reasons we do not do it here is because we don't want
- ; to have to prompt for limited user accounts when the service isn't used
- ; and we currently call the PostUpdate twice, once for the user and once
- ; for the SYSTEM account. Also, this would stop the maintenance service
- ; and we need a return result back to the service when run that way.
- ${If} $5 == ""
- ; An install of maintenance service was never attempted.
- ; We know we are an Admin and that we have write access into HKLM
- ; based on the above checks, so attempt to just run the EXE.
- ; In the worst case, in case there is some edge case with the
- ; IsAdmin check and the permissions check, the maintenance service
- ; will just fail to be attempted to be installed.
- nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\""
- ${EndIf}
- ${EndIf}
-!endif
!macroend
!define PostUpdate "!insertmacro PostUpdate"
@@ -718,54 +673,6 @@
!macroend
!define UpdateProtocolHandlers "!insertmacro UpdateProtocolHandlers"
-!ifdef MOZ_MAINTENANCE_SERVICE
-; Adds maintenance service certificate keys for the install dir.
-; For the cert to work, it must also be signed by a trusted cert for the user.
-!macro AddMaintCertKeys
- Push $R0
- ; Allow main Mozilla cert information for updates
- ; This call will push the needed key on the stack
- ServicesHelper::PathToUniqueRegistryPath "$INSTDIR"
- Pop $R0
- ${If} $R0 != ""
- ; More than one certificate can be specified in a different subfolder
- ; for example: $R0\1, but each individual binary can be signed
- ; with at most one certificate. A fallback certificate can only be used
- ; if the binary is replaced with a different certificate.
- ; We always use the 64bit registry for certs.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
-
- ; PrefetchProcessName was originally used to experiment with deleting
- ; Windows prefetch as a speed optimization. It is no longer used though.
- DeleteRegValue HKLM "$R0" "prefetchProcessName"
-
- ; Setting the Attempted value will ensure that a new Maintenance Service
- ; install will never be attempted again after this from updates. The value
- ; is used only to see if updates should attempt new service installs.
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
-
- ; These values associate the allowed certificates for the current
- ; installation.
- WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}"
- WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}"
- ; These values associate the allowed certificates for the previous
- ; installation, so that we can update from it cleanly using the
- ; old updater.exe (which will still have this signature).
- WriteRegStr HKLM "$R0\1" "name" "${CERTIFICATE_NAME_PREVIOUS}"
- WriteRegStr HKLM "$R0\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
- ClearErrors
- ${EndIf}
- ; Restore the previously used value back
- Pop $R0
-!macroend
-!define AddMaintCertKeys "!insertmacro AddMaintCertKeys"
-!endif
-
; Removes various registry entries for reasons noted below (does not use SHCTX).
!macro RemoveDeprecatedKeys
StrCpy $0 "SOFTWARE\Classes"
diff --git a/application/palemoon/installer/windows/nsis/uninstaller.nsi b/application/palemoon/installer/windows/nsis/uninstaller.nsi
index 333fd33d6..c85af3656 100644
--- a/application/palemoon/installer/windows/nsis/uninstaller.nsi
+++ b/application/palemoon/installer/windows/nsis/uninstaller.nsi
@@ -450,24 +450,6 @@ Section "Uninstall"
; uninstalls of PaleMoon-release with reinstalls of PaleMoon-release, for example.
WriteRegStr HKCU "Software\Mozilla\PaleMoon" "Uninstalled-${UpdateChannel}" "True"
-!ifdef MOZ_MAINTENANCE_SERVICE
- ; Get the path the allowed cert is at and remove it
- ; Keep this block of code last since it modfies the reg view
- ServicesHelper::PathToUniqueRegistryPath "$INSTDIR"
- Pop $MaintCertKey
- ${If} $MaintCertKey != ""
- ; Always use the 64bit registry for certs on 64bit systems.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- DeleteRegKey HKLM "$MaintCertKey"
- ${If} ${RunningX64}
- SetRegView lastused
- ${EndIf}
- ${EndIf}
- Call un.UninstallServiceIfNotUsed
-!endif
-
${un.IsFirewallSvcRunning}
Pop $0
${If} "$0" == "true"
diff --git a/application/palemoon/locales/en-US/chrome/browser/aboutRobots.dtd b/application/palemoon/locales/en-US/chrome/browser/aboutRobots.dtd
deleted file mode 100644
index 139603d8d..000000000
--- a/application/palemoon/locales/en-US/chrome/browser/aboutRobots.dtd
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- These strings are used in the about:robots page, which ties in with the
- robots theme used in the Firefox 3 Beta 2/3 first run pages.
- They're just meant to be fun and whimsical, with references to some geeky
- but well-known robots in movies and books. Be creative with translations! -->
-
-<!-- Nonsense line from the movie "The Day The Earth Stood Still". No translation needed. -->
-<!ENTITY robots.pagetitle "Gort! Klaatu barada nikto!">
-<!-- Movie: Logan's Run... Box (cybog): "Welcome Humans! I am ready for you." -->
-<!ENTITY robots.errorTitleText "Welcome Humans!">
-<!-- Movie: The Day The Earth Stood Still. Spoken by Klaatu. -->
-<!ENTITY robots.errorShortDescText "We have come to visit you in peace and with goodwill!">
-<!-- Various books by Isaac Asimov. http://en.wikipedia.org/wiki/Three_Laws_of_Robotics -->
-<!ENTITY robots.errorLongDesc1 "Robots may not injure a human being or, through inaction, allow a human being to come to harm.">
-<!-- Movie: Blade Runner. Batty: "I've seen things you people wouldn't believe..." -->
-<!ENTITY robots.errorLongDesc2 "Robots have seen things you people wouldn't believe.">
-<!-- Book: Hitchhiker's Guide To The Galaxy. What the Sirius Cybernetics Corporation calls robots. -->
-<!ENTITY robots.errorLongDesc3 "Robots are Your Plastic Pal Who's Fun To Be With.">
-<!-- TV: Futurama. Bender's first line is "Bite my shiny metal ass." -->
-<!ENTITY robots.errorLongDesc4 "Robots have shiny metal posteriors which should not be bitten.">
-<!-- TV: Battlestar Galactica (2004 series). From the opening text. -->
-<!ENTITY robots.errorTrailerDescText "And they have a plan.">
-<!-- TV: Battlestar Galactica (2004 series). Common expletive referring to Cylons. -->
-<!ENTITY robots.imgtitle "Frakkin' Toasters">
-<!-- Book: Hitchhiker's Guide To The Galaxy. Arthur presses a button and it warns him. -->
-<!ENTITY robots.dontpress "Please do not press this button again.">
diff --git a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd b/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd
index a926b0ed2..27de3797f 100644
--- a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd
+++ b/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd
@@ -14,6 +14,7 @@
for the help button in the menubar but Gnome does not. -->
<!ENTITY helpMenuWin.label "Help">
<!ENTITY helpMenuWin.accesskey "H">
+<!ENTITY updateCmd.label "Check for Updates…">
<!ENTITY aboutProduct.label "About &brandShortName;">
<!ENTITY aboutProduct.accesskey "A">
<!ENTITY productHelp.label "&brandShortName; Help">
diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.dtd b/application/palemoon/locales/en-US/chrome/browser/browser.dtd
index 439057a84..c810b074e 100644
--- a/application/palemoon/locales/en-US/chrome/browser/browser.dtd
+++ b/application/palemoon/locales/en-US/chrome/browser/browser.dtd
@@ -417,8 +417,8 @@ items are mutually exclusive. -->
<!ENTITY mediaMute.accesskey "M">
<!ENTITY mediaUnmute.label "Unmute">
<!ENTITY mediaUnmute.accesskey "m">
-<!ENTITY mediaPlaybackRate.label "Play Speed">
-<!ENTITY mediaPlaybackRate.accesskey "l">
+<!ENTITY mediaPlaybackRate2.label "Play Speed">
+<!ENTITY mediaPlaybackRate2.accesskey "d">
<!ENTITY mediaPlaybackRate050x.label "Slow Motion (0.5×)">
<!ENTITY mediaPlaybackRate050x.accesskey "S">
<!ENTITY mediaPlaybackRate100x.label "Normal Speed">
@@ -430,6 +430,8 @@ movie "Space Balls" and is meant to say that this speed is very
fast. -->
<!ENTITY mediaPlaybackRate200x.label "Ludicrous Speed (2×)">
<!ENTITY mediaPlaybackRate200x.accesskey "L">
+<!ENTITY mediaLoop.label "Loop">
+<!ENTITY mediaLoop.accesskey "L">
<!-- LOCALIZATION NOTE: The access keys for "Show Controls" and
"Hide Controls" are the same because the two context-menu
items are mutually exclusive. -->
diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.properties b/application/palemoon/locales/en-US/chrome/browser/browser.properties
index dbe6dbaa1..4c45e2513 100644
--- a/application/palemoon/locales/en-US/chrome/browser/browser.properties
+++ b/application/palemoon/locales/en-US/chrome/browser/browser.properties
@@ -201,6 +201,22 @@ update.openUpdateUI.upgradeButton.accesskey=U
update.restart.upgradeButton.label=Upgrade Now
update.restart.upgradeButton.accesskey=U
+# Check for Updates in the Help Menu
+# LOCALIZATION NOTE (updatesItem_*): these are alternative labels for Check for Update item in Help menu.
+# Which one is used depends on Update process state.
+updatesItem_default=Check for Updates…
+updatesItem_defaultFallback=Check for Updates…
+updatesItem_default.accesskey=C
+updatesItem_downloading=Downloading %S…
+updatesItem_downloadingFallback=Downloading Update…
+updatesItem_downloading.accesskey=D
+updatesItem_resume=Resume Downloading %S…
+updatesItem_resumeFallback=Resume Downloading Update…
+updatesItem_resume.accesskey=D
+updatesItem_pending=Apply Downloaded Update Now…
+updatesItem_pendingFallback=Apply Downloaded Update Now…
+updatesItem_pending.accesskey=D
+
# RSS Pretty Print
feedShowFeedNew=Subscribe to '%S'…
diff --git a/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd b/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd
index 038d8eb75..4b4fac9ff 100644
--- a/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd
+++ b/application/palemoon/locales/en-US/chrome/browser/palemoon.dtd
@@ -2,13 +2,14 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<!ENTITY chronicles.title.55.2
-'The Chronicles of the Pale Moon, 55:2'>
+<!ENTITY chronicles.title.66.1
+'The Chronicles of the Pale Moon, 66:1'>
-<!ENTITY chronicles.quote.55.2
-'And so, our focus was drawn through time and space to the <em>emerging dragon</em> who would not abandon hope.<br/>
-Its resilience, stubbornness and spirit unbroken, and searching for long hours to find those willing to <em>join</em> its cause.<br/>
-The old nest abandoned, the death throes of the Beast ignored, and more determined than ever to find glory in the future.'>
+<!ENTITY chronicles.quote.66.1
+'The <em>landscape changed</em> as time went on: flowing, twisting, corrupting. The dull sheen of <em>tainted metal</em> shining through everywhere.<br/>
+In the trees, roots, animals, and even the <em>mountainous valleys</em> that had always been an <em>oasis of difference</em>.<br/>
+Still, our dragon continued, untainted and resolute, soaring above.<br/>
+There would be a home yet, <em>a sanctuary</em>, a place for all those not given in to this <em>singular</em> invading force that was <em>misshaping</em> the world.'>
-<!ENTITY chronicles.from.55.2
-'from <strong>The Chronicles of the Pale Moon,</strong> 55:2'>
+<!ENTITY chronicles.from.66.1
+'from <strong>The Chronicles of the Pale Moon,</strong> 66:1'>
diff --git a/application/palemoon/locales/jar.mn b/application/palemoon/locales/jar.mn
index 0fc7f2c9b..5fcee246e 100644
--- a/application/palemoon/locales/jar.mn
+++ b/application/palemoon/locales/jar.mn
@@ -9,7 +9,6 @@
locale/browser/aboutCertError.dtd (%chrome/browser/aboutCertError.dtd)
locale/browser/aboutDialog.dtd (%chrome/browser/aboutDialog.dtd)
locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd)
- locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd)
* locale/browser/aboutHome.dtd (%chrome/browser/aboutHome.dtd)
locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd)
#ifdef MOZ_SERVICES_SYNC
diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css
index b545b06cb..01b3f5c9e 100644
--- a/application/palemoon/themes/linux/browser.css
+++ b/application/palemoon/themes/linux/browser.css
@@ -1607,6 +1607,17 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, rgba(0,0,0,.05) 1px, transparent 50%);
}
+/* When the tab bar is collapsed, show a 1px border in its place. */
+#TabsToolbar[tabsontop="false"][collapsed="true"] {
+ visibility: visible;
+ height: 1px;
+ border-bottom-width: 1px;
+ /* !important here to override border-style: none on the toolbar */
+ border-bottom-style: solid !important;
+ border-bottom-color: ThreeDShadow;
+ overflow: hidden;
+}
+
.tabbrowser-tab,
.tabs-newtab-button {
position: static;
diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css
index ddf050785..6d0d92015 100644
--- a/application/palemoon/themes/osx/browser.css
+++ b/application/palemoon/themes/osx/browser.css
@@ -1630,6 +1630,17 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url-
background-image: linear-gradient(to top, @toolbarShadowColor@ 1px, rgba(0,0,0,.05) 1px, transparent 50%);
}
+/* When the tab bar is collapsed, show a 1px border in its place. */
+#TabsToolbar[tabsontop="false"][collapsed="true"] {
+ visibility: visible;
+ height: 1px;
+ border-bottom-width: 1px;
+ /* !important here to override border-style: none on the toolbar */
+ border-bottom-style: solid !important;
+ border-bottom-color: ThreeDShadow;
+ overflow: hidden;
+}
+
@media (-moz-mac-lion-theme) {
#main-window[sizemode=normal] #TabsToolbar {
padding-left: 2px;
diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css
index 56a8318da..9f32b59cf 100644
--- a/application/palemoon/themes/windows/browser.css
+++ b/application/palemoon/themes/windows/browser.css
@@ -31,6 +31,8 @@
%endif
:root {
+ --toolbox-after-color: ThreeDShadow;
+
--toolbar-custom-color: hsl(210,75%,92%);
--toolbar-highlight-top: rgba(255,255,255,.5);
--toolbar-highlight-bottom: transparent;
@@ -91,7 +93,7 @@
display: -moz-box;
-moz-box-ordinal-group: 101; /* tabs toolbar is 100 */
height: 1px;
- background-color: ThreeDShadow;
+ background-color: var(--toolbox-after-color);
}
#navigator-toolbox[tabsontop=false]::after,
#main-window[disablechrome] #navigator-toolbox::after {
@@ -1841,6 +1843,17 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
background-image: linear-gradient(to top, @toolbarShadowColor@ 1px, rgba(0,0,0,.05) 1px, transparent 50%);
}
+/* When the tab bar is collapsed, show a 1px border in its place. */
+#TabsToolbar[tabsontop="false"][collapsed="true"] {
+ visibility: visible;
+ height: 1px;
+ border-bottom-width: 1px;
+ /* !important here to override border-style: none on the toolbar */
+ border-bottom-style: solid !important;
+ border-bottom-color: var(--toolbox-after-color);
+ overflow: hidden;
+}
+
.tabbrowser-tab,
.tabs-newtab-button {
-moz-appearance: none;
@@ -3044,8 +3057,8 @@ toolbar[brighttext] #addonbar-closebutton {
@media (-moz-os-version: windows-vista),
(-moz-os-version: windows-win7) {
- #navigator-toolbox:not(:-moz-lwtheme)::after {
- background-color: #aabccf;
+ :root:not(:-moz-lwtheme) {
+ --toolbox-after-color: #aabccf;
}
}
@@ -3054,9 +3067,9 @@ toolbar[brighttext] #addonbar-closebutton {
:root {
--toolbar-custom-color: hsl(210,0%,92%);
}
-
- #navigator-toolbox:not(:-moz-lwtheme)::after {
- background-color: #bcbcbc;
+
+ :root:not(:-moz-lwtheme) {
+ --toolbox-after-color: #bcbcbc;
}
}
diff --git a/application/xulrunner/confvars.sh b/application/xulrunner/confvars.sh
index a317df2a6..794b2b4b1 100644
--- a/application/xulrunner/confvars.sh
+++ b/application/xulrunner/confvars.sh
@@ -13,10 +13,6 @@ MOZ_CHROME_FILE_FORMAT=omni
MOZ_UPDATER=1
-if test "$OS_ARCH" = "WINNT"; then
- MOZ_MAINTENANCE_SERVICE=
-fi
-
MOZ_PLACES=1
MOZ_WEBRTC=1
MOZ_WEBGL_CONFORMANT=1