Merge autoland to central, a=merge
authorWes Kocher <wkocher@mozilla.com>
Wed, 16 Aug 2017 15:30:39 -0700
changeset 424594 1d38626ba9686d119e489db538ce84f8f9854217
parent 424542 833f84d0d5c729054a3aa8b3f34735f56fe6436b (current diff)
parent 424593 bb2e59766bada3c9528e48c70b60ee0681c3db1e (diff)
child 424637 63ca686c3f1e870649b6d9c559973d100573aec2
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge autoland to central, a=merge MozReview-Commit-ID: Fv1T41t9Gof
browser/base/content/aboutProviderDirectory.xhtml
browser/base/content/aboutSocialError.xhtml
browser/base/content/browser-social.js
browser/base/content/social-content.js
browser/base/content/test/contextMenu/browser_contextmenu_mozextension.js
browser/base/content/test/social/.eslintrc.js
browser/base/content/test/social/blocklist.xml
browser/base/content/test/social/browser.ini
browser/base/content/test/social/browser_aboutHome_activation.js
browser/base/content/test/social/browser_addons.js
browser/base/content/test/social/browser_blocklist.js
browser/base/content/test/social/browser_share.js
browser/base/content/test/social/browser_social_activation.js
browser/base/content/test/social/head.js
browser/base/content/test/social/microformats.html
browser/base/content/test/social/moz.png
browser/base/content/test/social/opengraph/og_invalid_url.html
browser/base/content/test/social/opengraph/opengraph.html
browser/base/content/test/social/opengraph/shortlink_linkrel.html
browser/base/content/test/social/opengraph/shorturl_link.html
browser/base/content/test/social/opengraph/shorturl_linkrel.html
browser/base/content/test/social/share.html
browser/base/content/test/social/share_activate.html
browser/base/content/test/social/social_activate.html
browser/base/content/test/social/social_activate_basic.html
browser/base/content/test/social/social_activate_iframe.html
browser/base/content/test/social/social_postActivation.html
browser/modules/Social.jsm
browser/modules/SocialService.jsm
browser/modules/test/unit/social/blocklist.xml
browser/modules/test/unit/social/head.js
browser/modules/test/unit/social/test_SocialService.js
browser/modules/test/unit/social/test_SocialServiceMigration21.js
browser/modules/test/unit/social/test_SocialServiceMigration22.js
browser/modules/test/unit/social/test_SocialServiceMigration29.js
browser/modules/test/unit/social/test_social.js
browser/modules/test/unit/social/test_socialDisabledStartup.js
browser/modules/test/unit/social/xpcshell.ini
browser/themes/shared/aboutProviderDirectory.css
browser/themes/shared/icons/share.svg
browser/themes/shared/menuPanel-small.svg
browser/themes/shared/social/social.inc.css
dom/interfaces/base/nsIContentPrefService.idl
mobile/android/app/src/photon/res/drawable-hdpi/private_illustration_android.png
mobile/android/app/src/photon/res/drawable-mdpi/private_illustration_android.png
mobile/android/app/src/photon/res/drawable-xhdpi/private_illustration_android.png
mobile/android/app/src/photon/res/drawable-xxhdpi/private_illustration_android.png
mobile/android/app/src/photon/res/drawable-xxxhdpi/private_illustration_android.png
mobile/android/app/src/photon/res/values/styles.xml
servo/components/canvas/gl_context.rs
servo/components/canvas/webgl_mode/inprocess.rs
servo/components/canvas/webgl_mode/mod.rs
servo/components/canvas/webgl_thread.rs
servo/components/canvas_traits/canvas.rs
servo/components/canvas_traits/webgl.rs
servo/components/canvas_traits/webgl_channel/ipc.rs
servo/components/canvas_traits/webgl_channel/mod.rs
servo/components/canvas_traits/webgl_channel/mpsc.rs
toolkit/components/contentprefs/ContentPrefInstance.jsm
toolkit/components/contentprefs/ContentPrefService2.jsm
toolkit/components/contentprefs/nsContentPrefService.js
toolkit/components/contentprefs/nsContentPrefService.manifest
toolkit/components/contentprefs/tests/unit/.eslintrc.js
toolkit/components/contentprefs/tests/unit/head_contentPrefs.js
toolkit/components/contentprefs/tests/unit/test_bug248970.js
toolkit/components/contentprefs/tests/unit/test_bug503971.js
toolkit/components/contentprefs/tests/unit/test_bug679784.js
toolkit/components/contentprefs/tests/unit/test_contentPrefs.js
toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js
toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js
toolkit/components/contentprefs/tests/unit/test_stringGroups.js
toolkit/components/contentprefs/tests/unit/test_unusedGroupsAndSettings.js
toolkit/components/contentprefs/tests/unit/xpcshell.ini
toolkit/components/contentprefs/tests/unit_cps2/test_service.js
--- a/accessible/tests/browser/browser.ini
+++ b/accessible/tests/browser/browser.ini
@@ -8,17 +8,17 @@ support-files =
 [browser_shutdown_acc_reference.js]
 [browser_shutdown_doc_acc_reference.js]
 [browser_shutdown_multi_acc_reference_obj.js]
 [browser_shutdown_multi_acc_reference_doc.js]
 [browser_shutdown_multi_reference.js]
 [browser_shutdown_parent_own_reference.js]
 skip-if = !e10s || (os == 'win' && os_version == '5.1') # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_proxy_acc_reference.js]
-skip-if = !e10s || (os == 'win') # e10s specific test for a11y start/shutdown between parent and content.
+skip-if = !e10s || (os == 'win') || stylo # e10s specific test for a11y start/shutdown between parent and content. bug 1390409 for stylo
 [browser_shutdown_proxy_doc_acc_reference.js]
 skip-if = !e10s || (os == 'win') # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_multi_proxy_acc_reference_doc.js]
 skip-if = !e10s || (os == 'win') # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_multi_proxy_acc_reference_obj.js]
 skip-if = !e10s || (os == 'win') # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_remote_no_reference.js]
 skip-if = !e10s || (os == 'win' && os_version == '5.1') # e10s specific test for a11y start/shutdown between parent and content.
--- a/accessible/tests/browser/e10s/browser.ini
+++ b/accessible/tests/browser/e10s/browser.ini
@@ -21,17 +21,19 @@ support-files =
 skip-if = e10s && os == 'win' && debug # Bug 1338034, leaks
 [browser_caching_relations.js]
 [browser_caching_states.js]
 [browser_caching_value.js]
 
 # Events tests
 [browser_events_caretmove.js]
 [browser_events_hide.js]
+skip-if = stylo # bug 1390409
 [browser_events_show.js]
+skip-if = stylo # bug 1390409
 [browser_events_statechange.js]
 [browser_events_textchange.js]
 
 # Tree update tests
 [browser_treeupdate_ariadialog.js]
 [browser_treeupdate_ariaowns.js]
 [browser_treeupdate_canvas.js]
 [browser_treeupdate_cssoverflow.js]
@@ -43,10 +45,11 @@ skip-if = e10s && os == 'win' # Bug 1288
 [browser_treeupdate_list.js]
 [browser_treeupdate_list_editabledoc.js]
 [browser_treeupdate_listener.js]
 [browser_treeupdate_optgroup.js]
 [browser_treeupdate_removal.js]
 [browser_treeupdate_table.js]
 [browser_treeupdate_textleaf.js]
 [browser_treeupdate_visibility.js]
+skip-if = stylo # bug 1390409
 [browser_treeupdate_whitespace.js]
 skip-if = true # Failing due to incorrect index of test container children on document load.
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1308,21 +1308,16 @@ pref("pdfjs.previousHandler.alwaysAskBef
 // The maximum amount of decoded image data we'll willingly keep around (we
 // might keep around more than this, but we'll try to get down to this value).
 // (This is intentionally on the high side; see bug 746055.)
 pref("image.mem.max_decoded_image_kb", 256000);
 
 // Is the sidebar positioned ahead of the content browser
 pref("sidebar.position_start", true);
 
-// Activation from inside of share panel is possible if activationPanelEnabled
-// is true. Pref'd off for release while usage testing is done through beta.
-pref("social.share.activationPanelEnabled", true);
-pref("social.shareDirectory", "https://activations.cdn.mozilla.net/sharePanel.html");
-
 // Block insecure active content on https pages
 pref("security.mixed_content.block_active_content", true);
 
 // Show degraded UI for http pages with password fields.
 pref("security.insecure_password.ui.enabled", true);
 
 // Show in-content login form warning UI for insecure login fields
 pref("security.insecure_field_warning.contextual.enabled", true);
deleted file mode 100644
--- a/browser/base/content/aboutProviderDirectory.xhtml
+++ /dev/null
@@ -1,60 +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 % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
-  %browserDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>&social.directory.label;</title>
-    <link rel="stylesheet" type="text/css" media="all"
-          href="chrome://browser/skin/aboutProviderDirectory.css"/>
-  </head>
-
-  <body>
-    <div id="activation-link" hidden="true">
-      <div id="message-box">
-        <p>&social.directory.text;</p>
-      </div>
-      <div id="button-box">
-        <button onclick="openDirectory()">&social.directory.button;</button>
-      </div>
-    </div>
-    <div id="activation" hidden="true">
-      <p>&social.directory.introText;</p>
-      <div><iframe id="activation-frame"/></div>
-      <p><a class="link" onclick="openDirectory()">&social.directory.viewmore.text;</a></p>
-    </div>
-  </body>
-
-  <script type="text/javascript"><![CDATA[
-    const Cu = Components.utils;
-
-    Cu.import("resource://gre/modules/Services.jsm");
-
-    function openDirectory() {
-      let url = Services.prefs.getCharPref("social.directories").split(",")[0];
-      window.open(url);
-      window.close();
-    }
-    
-    if (Services.prefs.getBoolPref("social.share.activationPanelEnabled")) {
-      let url = Services.prefs.getCharPref("social.shareDirectory");
-      document.getElementById("activation-frame").setAttribute("src", url);
-      document.getElementById("activation").removeAttribute("hidden");
-    } else {
-      document.getElementById("activation-link").removeAttribute("hidden");
-    }
-  ]]></script>
-</html>
deleted file mode 100644
--- a/browser/base/content/aboutSocialError.xhtml
+++ /dev/null
@@ -1,111 +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;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>&loadError.label;</title>
-    <link rel="stylesheet" href="chrome://browser/skin/aboutNetError.css" type="text/css" media="all" />
-    <link rel="stylesheet" type="text/css" media="all" href="chrome://browser/skin/aboutSocialError.css"/>
-    <link rel="icon" type="image/png" id="favicon" href="chrome://global/skin/icons/warning-16.png"/>
-  </head>
-
-  <body>
-    <div id="errorPageContainer">
-
-      <!-- Error Title -->
-      <div id="errorTitle">
-        <p id="errorShortDescText" >foo</p>
-      </div>
-
-    <div id="button-box">
-      <button id="btnTryAgain" onclick="tryAgainButton()"/>
-    </div>
-    </div>
-  </body>
-
-  <script type="text/javascript"><![CDATA[
-    const Cu = Components.utils;
-
-    Cu.import("resource://gre/modules/Services.jsm");
-    Cu.import("resource:///modules/Social.jsm");
-
-    let config = {
-      tryAgainCallback: reloadProvider
-    }
-
-    function parseQueryString() {
-      let searchParams = new URLSearchParams(document.documentURI.split("?")[1]);
-      let mode = searchParams.get("mode");
-      config.origin = searchParams.get("origin");
-      let encodedURL = searchParams.get("url");
-      let url = decodeURIComponent(encodedURL);
-      // directory does not have origin set, in that case use the url origin for
-      // the error message.
-      if (!config.origin) {
-        let URI = Services.io.newURI(url);
-        config.origin =
-          Services.scriptSecurityManager.createCodebasePrincipal(URI, {}).origin;
-      }
-
-      switch (mode) {
-        case "compactInfo":
-          document.getElementById("btnTryAgain").style.display = "none";
-          break;
-        case "tryAgainOnly":
-          // intentional fall-through
-        case "tryAgain":
-          config.tryAgainCallback = loadQueryURL;
-          config.queryURL = url;
-          break;
-        default:
-          break;
-      }
-    }
-
-    function setUpStrings() {
-      let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
-      let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-
-      let productName = brandBundle.GetStringFromName("brandShortName");
-      let provider = Social._getProviderFromOrigin(config.origin);
-      let providerName = provider ? provider.name : config.origin;
-
-      // Sets up the error message
-      let msg = browserBundle.formatStringFromName("social.error.message", [productName, providerName], 2);
-      document.getElementById("errorShortDescText").textContent = msg;
-
-      // Sets up the buttons' labels and accesskeys
-      let btnTryAgain = document.getElementById("btnTryAgain");
-      btnTryAgain.textContent = browserBundle.GetStringFromName("social.error.tryAgain.label");
-      btnTryAgain.accessKey = browserBundle.GetStringFromName("social.error.tryAgain.accesskey");
-    }
-
-    function tryAgainButton() {
-      config.tryAgainCallback();
-    }
-
-    function loadQueryURL() {
-      window.location.href = config.queryURL;
-    }
-
-    function reloadProvider() {
-      let provider = Social._getProviderFromOrigin(config.origin);
-      provider.reload();
-    }
-
-    parseQueryString();
-    setUpStrings();
-  ]]></script>
-</html>
--- a/browser/base/content/browser-context.inc
+++ b/browser/base/content/browser-context.inc
@@ -80,20 +80,16 @@
                 label="&openLinkInPrivateWindowCmd.label;"
                 accesskey="&openLinkInPrivateWindowCmd.accesskey;"
                 oncommand="gContextMenu.openLinkInPrivateWindow();"/>
       <menuseparator id="context-sep-open"/>
       <menuitem id="context-bookmarklink"
                 label="&bookmarkThisLinkCmd.label;"
                 accesskey="&bookmarkThisLinkCmd.accesskey;"
                 oncommand="gContextMenu.bookmarkLink();"/>
-      <menuitem id="context-sharelink"
-                label="&shareLink.label;"
-                accesskey="&shareLink.accesskey;"
-                oncommand="gContextMenu.shareLink();"/>
       <menuitem id="context-savelink"
                 label="&saveLinkCmd.label;"
                 accesskey="&saveLinkCmd.accesskey;"
                 oncommand="gContextMenu.saveLink();"/>
       <menuitem id="context-copyemail"
                 label="&copyEmailCmd.label;"
                 accesskey="&copyEmailCmd.accesskey;"
                 oncommand="gContextMenu.copyEmail();"/>
@@ -207,20 +203,16 @@
                 label="&copyAudioURLCmd.label;"
                 accesskey="&copyAudioURLCmd.accesskey;"
                 oncommand="gContextMenu.copyMediaLocation();"/>
       <menuseparator id="context-sep-copyimage"/>
       <menuitem id="context-saveimage"
                 label="&saveImageCmd.label;"
                 accesskey="&saveImageCmd.accesskey;"
                 oncommand="gContextMenu.saveMedia();"/>
-      <menuitem id="context-shareimage"
-                label="&shareImage.label;"
-                accesskey="&shareImage.accesskey;"
-                oncommand="gContextMenu.shareImage();"/>
       <menuitem id="context-sendimage"
                 label="&emailImageCmd.label;"
                 accesskey="&emailImageCmd.accesskey;"
                 oncommand="gContextMenu.sendMedia();"/>
       <menuitem id="context-setDesktopBackground"
                 label="&setDesktopBackgroundCmd.label;"
                 accesskey="&setDesktopBackgroundCmd.accesskey;"
                 oncommand="gContextMenu.setDesktopBackground();"/>
@@ -232,20 +224,16 @@
                 label="&viewImageDescCmd.label;"
                 accesskey="&viewImageDescCmd.accesskey;"
                 oncommand="gContextMenu.viewImageDesc(event);"
                 onclick="checkForMiddleClick(this, event);"/>
       <menuitem id="context-savevideo"
                 label="&saveVideoCmd.label;"
                 accesskey="&saveVideoCmd.accesskey;"
                 oncommand="gContextMenu.saveMedia();"/>
-      <menuitem id="context-sharevideo"
-                label="&shareVideo.label;"
-                accesskey="&shareVideo.accesskey;"
-                oncommand="gContextMenu.shareVideo();"/>
       <menuitem id="context-saveaudio"
                 label="&saveAudioCmd.label;"
                 accesskey="&saveAudioCmd.accesskey;"
                 oncommand="gContextMenu.saveMedia();"/>
       <menuitem id="context-video-saveimage"
                 accesskey="&videoSaveImage.accesskey;"
                 label="&videoSaveImage.label;"
                 oncommand="gContextMenu.saveVideoFrameAsImage();"/>
@@ -266,20 +254,16 @@
                 label="&playPluginCmd.label;"
                 accesskey="&playPluginCmd.accesskey;"
                 oncommand="gContextMenu.playPlugin();"/>
       <menuitem id="context-ctp-hide"
                 label="&hidePluginCmd.label;"
                 accesskey="&hidePluginCmd.accesskey;"
                 oncommand="gContextMenu.hidePlugin();"/>
       <menuseparator id="context-sep-ctp"/>
-      <menuitem id="context-sharepage"
-                label="&sharePageCmd.label;"
-                accesskey="&sharePageCmd.accesskey;"
-                oncommand="SocialShare.sharePage();"/>
       <menuitem id="context-savepage"
                 label="&savePageCmd.label;"
                 accesskey="&savePageCmd.accesskey2;"
                 oncommand="gContextMenu.savePageAs();"/>
       <menuseparator id="context-sep-sendpagetodevice" hidden="true"/>
       <menu id="context-sendpagetodevice"
                 label="&sendPageToDevice.label;"
                 accesskey="&sendPageToDevice.accesskey;"
@@ -329,20 +313,16 @@
       <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="gSync.populateSendTabToDevicesMenu(event.target, gContextMenu.linkURL, gContextMenu.linkTextStr);"/>
       </menu>
-      <menuitem id="context-shareselect"
-                label="&shareSelect.label;"
-                accesskey="&shareSelect.accesskey;"
-                oncommand="gContextMenu.shareSelect();"/>
       <menuseparator id="frame-sep"/>
       <menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
         <menupopup>
           <menuitem id="context-showonlythisframe"
                     label="&showOnlyThisFrameCmd.label;"
                     accesskey="&showOnlyThisFrameCmd.accesskey;"
                     oncommand="gContextMenu.showOnlyThisFrame();"/>
           <menuitem id="context-openframeintab"
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -103,29 +103,26 @@
     <command id="Tools:PrivateBrowsing"
       oncommand="OpenBrowserWindow({private: true});"/>
 #ifdef E10S_TESTING_ONLY
     <command id="Tools:NonRemoteWindow"
       oncommand="OpenBrowserWindow({remote: false});"/>
 #endif
     <command id="History:UndoCloseTab" oncommand="undoCloseTab();"/>
     <command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/>
-    <command id="Social:SharePage" oncommand="SocialShare.sharePage();"/>
-    <command id="Social:Addons" oncommand="BrowserOpenAddonsMgr('addons://list/service');"/>
   </commandset>
 
   <commandset id="placesCommands">
     <command id="Browser:ShowAllBookmarks"
              oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"/>
     <command id="Browser:ShowAllHistory"
              oncommand="PlacesCommandHook.showPlacesOrganizer('History');"/>
   </commandset>
 
   <broadcasterset id="mainBroadcasterSet">
-    <broadcaster id="Social:PageShareable" disabled="true"/>
     <broadcaster id="viewBookmarksSidebar" autoCheck="false" label="&bookmarksButton.label;"
                  type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/bookmarks/bookmarksPanel.xul"
                  oncommand="SidebarUI.toggle('viewBookmarksSidebar');"/>
 
     <!-- for both places and non-places, the sidebar lives at
          chrome://browser/content/history/history-panel.xul so there are no
          problems when switching between versions -->
     <broadcaster id="viewHistorySidebar" autoCheck="false" sidebartitle="&historyButton.label;"
deleted file mode 100644
--- a/browser/base/content/browser-social.js
+++ /dev/null
@@ -1,513 +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/. */
-
-/* eslint-env mozilla/browser-window */
-/* global OpenGraphBuilder:false, DynamicResizeWatcher:false, Utils:false*/
-
-// the "exported" symbols
-var SocialUI,
-    SocialShare,
-    SocialActivationListener;
-
-(function() {
-"use strict";
-
-XPCOMUtils.defineLazyGetter(this, "OpenGraphBuilder", function() {
-  let tmp = {};
-  Cu.import("resource:///modules/Social.jsm", tmp);
-  return tmp.OpenGraphBuilder;
-});
-
-XPCOMUtils.defineLazyGetter(this, "DynamicResizeWatcher", function() {
-  let tmp = {};
-  Cu.import("resource:///modules/Social.jsm", tmp);
-  return tmp.DynamicResizeWatcher;
-});
-
-let messageManager = window.messageManager;
-let openUILinkIn = window.openUILinkIn;
-
-SocialUI = {
-  _initialized: false,
-
-  // Called on delayed startup to initialize the UI
-  init: function SocialUI_init() {
-    if (this._initialized) {
-      return;
-    }
-    let mm = window.getGroupMessageManager("social");
-    mm.loadFrameScript("chrome://browser/content/content.js", true);
-    mm.loadFrameScript("chrome://browser/content/social-content.js", true);
-
-    Services.obs.addObserver(this, "social:providers-changed");
-
-    CustomizableUI.addListener(this);
-    SocialActivationListener.init();
-
-    Social.init().then((update) => {
-      if (update)
-        this._providersChanged();
-    });
-
-    this._initialized = true;
-  },
-
-  // Called on window unload
-  uninit: function SocialUI_uninit() {
-    if (!this._initialized) {
-      return;
-    }
-    Services.obs.removeObserver(this, "social:providers-changed");
-
-    CustomizableUI.removeListener(this);
-    SocialActivationListener.uninit();
-
-    this._initialized = false;
-  },
-
-  observe: function SocialUI_observe(subject, topic, data) {
-    switch (topic) {
-      case "social:providers-changed":
-        this._providersChanged();
-        break;
-    }
-  },
-
-  _providersChanged() {
-    SocialShare.populateProviderMenu();
-  },
-
-  showLearnMore() {
-    let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "social-api";
-    openUILinkIn(url, "tab");
-  },
-
-  closeSocialPanelForLinkTraversal(target, linkNode) {
-    // No need to close the panel if this traversal was not retargeted
-    if (target == "" || target == "_self")
-      return;
-
-    // Check to see whether this link traversal was in a social panel
-    let win = linkNode.ownerGlobal;
-    let container = win.QueryInterface(Ci.nsIInterfaceRequestor)
-                                  .getInterface(Ci.nsIWebNavigation)
-                                  .QueryInterface(Ci.nsIDocShell)
-                                  .chromeEventHandler;
-    let containerParent = container.parentNode;
-    if (containerParent.classList.contains("social-panel") &&
-        containerParent instanceof Ci.nsIDOMXULPopupElement) {
-      // allow the link traversal to finish before closing the panel
-      setTimeout(() => {
-        containerParent.hidePopup();
-      }, 0);
-    }
-  },
-
-  get _chromeless() {
-    // Is this a popup window that doesn't want chrome shown?
-    let docElem = document.documentElement;
-    // extrachrome is not restored during session restore, so we need
-    // to check for the toolbar as well.
-    let chromeless = docElem.getAttribute("chromehidden").includes("extrachrome") ||
-                     docElem.getAttribute("chromehidden").includes("toolbar");
-    // This property is "fixed" for a window, so avoid doing the check above
-    // multiple times...
-    delete this._chromeless;
-    this._chromeless = chromeless;
-    return chromeless;
-  },
-
-  get enabled() {
-    // Returns whether social is enabled *for this window*.
-    if (this._chromeless)
-      return false;
-    return Social.providers.length > 0;
-  },
-
-  canSharePage(aURI) {
-    return (aURI && (aURI.schemeIs("http") || aURI.schemeIs("https")));
-  },
-
-  onCustomizeEnd(aWindow) {
-    if (aWindow != window)
-      return;
-    // customization mode gets buttons out of sync with command updating, fix
-    // the disabled state
-    let canShare = this.canSharePage(gBrowser.currentURI);
-    let shareButton = SocialShare.shareButton;
-    if (shareButton) {
-      if (canShare) {
-        shareButton.removeAttribute("disabled")
-      } else {
-        shareButton.setAttribute("disabled", "true")
-      }
-    }
-  },
-
-  // called on tab/urlbar/location changes and after customization. Update
-  // anything that is tab specific.
-  updateState() {
-    goSetCommandEnabled("Social:PageShareable", this.canSharePage(gBrowser.currentURI));
-  }
-}
-
-// message manager handlers
-SocialActivationListener = {
-  init() {
-    messageManager.addMessageListener("Social:Activation", this);
-  },
-  uninit() {
-    messageManager.removeMessageListener("Social:Activation", this);
-  },
-  receiveMessage(aMessage) {
-    let data = aMessage.json;
-    let browser = aMessage.target;
-    data.window = window;
-    // if the source if the message is the share panel, we do a one-click
-    // installation. The source of activations is controlled by the
-    // social.directories preference
-    let options;
-    if (browser == SocialShare.iframe && Services.prefs.getBoolPref("social.share.activationPanelEnabled")) {
-      options = { bypassContentCheck: true, bypassInstallPanel: true };
-    }
-
-    Social.installProvider(data, function(manifest) {
-      Social.activateFromOrigin(manifest.origin, function(provider) {
-        if (provider.shareURL) {
-          // Ensure that the share button is somewhere usable.
-          // SocialShare.shareButton may return null if it is in the menu-panel
-          // and has never been visible, so we check the widget directly. If
-          // there is no area for the widget we move it into the toolbar.
-          let widget = CustomizableUI.getWidget("social-share-button");
-          // If the panel is already open, we can be sure that the provider can
-          // already be accessed, possibly anchored to another toolbar button.
-          // In that case we don't move the widget.
-          if (!widget.areaType && SocialShare.panel.state != "open") {
-            CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-            // Ensure correct state.
-            SocialUI.onCustomizeEnd(window);
-          }
-
-          // make this new provider the selected provider. If the panel hasn't
-          // been opened, we need to make the frame first.
-          SocialShare._createFrame();
-          SocialShare.iframe.setAttribute("src", "data:text/plain;charset=utf8,");
-          SocialShare.iframe.setAttribute("origin", provider.origin);
-          // get the right button selected
-          SocialShare.populateProviderMenu();
-          if (SocialShare.panel.state == "open") {
-            SocialShare.sharePage(provider.origin);
-          }
-        }
-        if (provider.postActivationURL) {
-          // if activated from an open share panel, we load the landing page in
-          // a background tab
-          let triggeringPrincipal = Utils.deserializePrincipal(aMessage.data.triggeringPrincipal);
-          gBrowser.loadOneTab(provider.postActivationURL, {
-            inBackground: SocialShare.panel.state == "open",
-            triggeringPrincipal,
-          });
-        }
-      });
-    }, options);
-  }
-}
-
-SocialShare = {
-  get _dynamicResizer() {
-    delete this._dynamicResizer;
-    this._dynamicResizer = new DynamicResizeWatcher();
-    return this._dynamicResizer;
-  },
-
-  // Share panel may be attached to the overflow or menu button depending on
-  // customization, we need to manage open state of the anchor.
-  get anchor() {
-    let widget = CustomizableUI.getWidget("social-share-button");
-    return widget.forWindow(window).anchor;
-  },
-  // Holds the anchor node in use whilst the panel is open, because it may vary.
-  _currentAnchor: null,
-
-  get panel() {
-    return document.getElementById("social-share-panel");
-  },
-
-  get iframe() {
-    // panel.firstChild is our toolbar hbox, panel.lastChild is the iframe
-    // container hbox used for an interstitial "loading" graphic
-    return this.panel.lastChild.firstChild;
-  },
-
-  uninit() {
-    if (this.iframe) {
-      let mm = this.messageManager;
-      mm.removeMessageListener("PageVisibility:Show", this);
-      mm.removeMessageListener("PageVisibility:Hide", this);
-      mm.removeMessageListener("Social:DOMWindowClose", this);
-      this.iframe.removeEventListener("load", this);
-      this.iframe.remove();
-    }
-  },
-
-  _createFrame() {
-    let panel = this.panel;
-    if (this.iframe)
-      return;
-    this.panel.hidden = false;
-    // create and initialize the panel for this window
-    let iframe = document.createElement("browser");
-    iframe.setAttribute("type", "content");
-    iframe.setAttribute("class", "social-share-frame");
-    iframe.setAttribute("context", "contentAreaContextMenu");
-    iframe.setAttribute("tooltip", "aHTMLTooltip");
-    iframe.setAttribute("disableglobalhistory", "true");
-    iframe.setAttribute("flex", "1");
-    iframe.setAttribute("message", "true");
-    iframe.setAttribute("messagemanagergroup", "social");
-    panel.lastChild.appendChild(iframe);
-    let mm = this.messageManager;
-    mm.addMessageListener("PageVisibility:Show", this);
-    mm.addMessageListener("PageVisibility:Hide", this);
-    mm.sendAsyncMessage("Social:SetErrorURL",
-                        { template: "about:socialerror?mode=compactInfo&origin=%{origin}&url=%{url}" });
-    iframe.addEventListener("load", this, true);
-    mm.addMessageListener("Social:DOMWindowClose", this);
-
-    this.populateProviderMenu();
-  },
-
-  get messageManager() {
-    // The xbl bindings for the iframe may not exist yet, so we can't
-    // access iframe.messageManager directly - but can get at it with this dance.
-    return this.iframe.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader.messageManager;
-  },
-
-  receiveMessage(aMessage) {
-    let iframe = this.iframe;
-    switch (aMessage.name) {
-      case "PageVisibility:Show":
-        SocialShare._dynamicResizer.start(iframe.parentNode, iframe);
-        break;
-      case "PageVisibility:Hide":
-        SocialShare._dynamicResizer.stop();
-        break;
-      case "Social:DOMWindowClose":
-        this.panel.hidePopup();
-        break;
-    }
-  },
-
-  handleEvent(event) {
-    switch (event.type) {
-      case "load": {
-        this.iframe.parentNode.removeAttribute("loading");
-        if (this.currentShare)
-          SocialShare.messageManager.sendAsyncMessage("Social:OpenGraphData", this.currentShare);
-      }
-    }
-  },
-
-  getSelectedProvider() {
-    let provider;
-    let lastProviderOrigin = this.iframe && this.iframe.getAttribute("origin");
-    if (lastProviderOrigin) {
-      provider = Social._getProviderFromOrigin(lastProviderOrigin);
-    }
-    return provider;
-  },
-
-  createTooltip(event) {
-    let tt = event.target;
-    let provider = Social._getProviderFromOrigin(tt.triggerNode.getAttribute("origin"));
-    tt.firstChild.setAttribute("value", provider.name);
-    tt.lastChild.setAttribute("value", provider.origin);
-  },
-
-  populateProviderMenu() {
-    if (!this.iframe)
-      return;
-    let providers = Social.providers.filter(p => p.shareURL);
-    let hbox = document.getElementById("social-share-provider-buttons");
-    // remove everything before the add-share-provider button (which should also
-    // be lastChild if any share providers were added)
-    let addButton = document.getElementById("add-share-provider");
-    while (hbox.lastChild != addButton) {
-      hbox.removeChild(hbox.lastChild);
-    }
-    let selectedProvider = this.getSelectedProvider();
-    for (let provider of providers) {
-      let button = document.createElement("toolbarbutton");
-      button.setAttribute("class", "toolbarbutton-1 share-provider-button");
-      button.setAttribute("type", "radio");
-      button.setAttribute("group", "share-providers");
-      button.setAttribute("image", provider.iconURL);
-      button.setAttribute("tooltip", "share-button-tooltip");
-      button.setAttribute("origin", provider.origin);
-      button.setAttribute("label", provider.name);
-      button.setAttribute("oncommand", "SocialShare.sharePage(this.getAttribute('origin'));");
-      if (provider == selectedProvider) {
-        this.defaultButton = button;
-      }
-      hbox.appendChild(button);
-    }
-    if (!this.defaultButton) {
-      this.defaultButton = addButton;
-    }
-    this.defaultButton.setAttribute("checked", "true");
-  },
-
-  get shareButton() {
-    // web-panels (bookmark/sidebar) don't include customizableui, so
-    // nsContextMenu fails when accessing shareButton, breaking
-    // browser_bug409481.js.
-    if (document.documentElement.getAttribute("windowtype") !== "navigator:browser")
-      return null;
-    let widget = CustomizableUI.getWidget("social-share-button");
-    if (!widget || !widget.areaType)
-      return null;
-    return widget.forWindow(window).node;
-  },
-
-  _onclick() {
-    Services.telemetry.getHistogramById("SOCIAL_PANEL_CLICKS").add(0);
-  },
-
-  onShowing() {
-    (this._currentAnchor || this.anchor).setAttribute("open", "true");
-    this.iframe.addEventListener("click", this._onclick, true);
-  },
-
-  onHidden() {
-    (this._currentAnchor || this.anchor).removeAttribute("open");
-    this._currentAnchor = null;
-    this.iframe.docShellIsActive = false;
-    this.iframe.removeEventListener("click", this._onclick, true);
-    this.iframe.setAttribute("src", "data:text/plain;charset=utf8,");
-    // make sure that the frame is unloaded after it is hidden
-    this.messageManager.sendAsyncMessage("Social:ClearFrame");
-    this.currentShare = null;
-    // share panel use is over, purge any history
-    this.iframe.purgeSessionHistory();
-  },
-
-  sharePage(providerOrigin, graphData, target, anchor) {
-    // if providerOrigin is undefined, we use the last-used provider, or the
-    // current/default provider.  The provider selection in the share panel
-    // will call sharePage with an origin for us to switch to.
-    this._createFrame();
-    let iframe = this.iframe;
-
-    // graphData is an optional param that either defines the full set of data
-    // to be shared, or partial data about the current page. It is set by a call
-    // in mozSocial API, or via nsContentMenu calls. If it is present, it MUST
-    // define at least url. If it is undefined, we're sharing the current url in
-    // the browser tab.
-    let sharedPageData = graphData || this.currentShare;
-    let sharedURI = sharedPageData ? Services.io.newURI(sharedPageData.url) :
-                                gBrowser.currentURI;
-    if (!SocialUI.canSharePage(sharedURI))
-      return;
-
-    let browserMM = gBrowser.selectedBrowser.messageManager;
-
-    // the point of this action type is that we can use existing share
-    // endpoints (e.g. oexchange) that do not support additional
-    // socialapi functionality.  One tweak is that we shoot an event
-    // containing the open graph data.
-    let _dataFn;
-    if (!sharedPageData || sharedURI == gBrowser.currentURI) {
-      browserMM.addMessageListener("PageMetadata:PageDataResult", _dataFn = (msg) => {
-        browserMM.removeMessageListener("PageMetadata:PageDataResult", _dataFn);
-        let pageData = msg.json;
-        if (graphData) {
-          // overwrite data retreived from page with data given to us as a param
-          for (let p in graphData) {
-            pageData[p] = graphData[p];
-          }
-        }
-        this.sharePage(providerOrigin, pageData, target, anchor);
-      });
-      browserMM.sendAsyncMessage("PageMetadata:GetPageData", null, { target });
-      return;
-    }
-    // if this is a share of a selected item, get any microformats
-    if (!sharedPageData.microformats && target) {
-      browserMM.addMessageListener("PageMetadata:MicroformatsResult", _dataFn = (msg) => {
-        browserMM.removeMessageListener("PageMetadata:MicroformatsResult", _dataFn);
-        sharedPageData.microformats = msg.data;
-        this.sharePage(providerOrigin, sharedPageData, target, anchor);
-      });
-      browserMM.sendAsyncMessage("PageMetadata:GetMicroformats", null, { target });
-      return;
-    }
-    this.currentShare = sharedPageData;
-
-    let provider;
-    if (providerOrigin)
-      provider = Social._getProviderFromOrigin(providerOrigin);
-    else
-      provider = this.getSelectedProvider();
-    if (!provider || !provider.shareURL) {
-      this.showDirectory(anchor);
-      return;
-    }
-    // check the menu button
-    let hbox = document.getElementById("social-share-provider-buttons");
-    let btn = hbox.querySelector("[origin='" + provider.origin + "']");
-    if (btn)
-      btn.checked = true;
-
-    let shareEndpoint = OpenGraphBuilder.generateEndpointURL(provider.shareURL, sharedPageData);
-
-    this._dynamicResizer.stop();
-    let size = provider.getPageSize("share");
-    if (size) {
-      // let the css on the share panel define width, but height
-      // calculations dont work on all sites, so we allow that to be
-      // defined.
-      delete size.width;
-    }
-
-    // if we've already loaded this provider/page share endpoint, we don't want
-    // to add another load event listener.
-    let endpointMatch = shareEndpoint == iframe.getAttribute("src");
-    if (endpointMatch) {
-      this._dynamicResizer.start(iframe.parentNode, iframe, size);
-      iframe.docShellIsActive = true;
-      SocialShare.messageManager.sendAsyncMessage("Social:OpenGraphData", this.currentShare);
-    } else {
-      iframe.parentNode.setAttribute("loading", "true");
-    }
-    // if the user switched between share providers we do not want that history
-    // available.
-    iframe.purgeSessionHistory();
-
-    // always ensure that origin belongs to the endpoint
-    iframe.setAttribute("origin", provider.origin);
-    iframe.setAttribute("src", shareEndpoint);
-    this._openPanel(anchor);
-  },
-
-  showDirectory(anchor) {
-    this._createFrame();
-    let iframe = this.iframe;
-    if (iframe.getAttribute("src") == "about:providerdirectory")
-      return;
-    iframe.removeAttribute("origin");
-    iframe.parentNode.setAttribute("loading", "true");
-
-    iframe.setAttribute("src", "about:providerdirectory");
-    this._openPanel(anchor);
-  },
-
-  _openPanel(anchor) {
-    this._currentAnchor = anchor || this.anchor;
-    anchor = document.getAnonymousElementByAttribute(this._currentAnchor, "class", "toolbarbutton-icon");
-    this.panel.openPopup(anchor, "bottomcenter topright", 0, 0, false, false);
-    Services.telemetry.getHistogramById("SOCIAL_TOOLBAR_BUTTONS").add(0);
-  }
-};
-
-}).call(this);
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -155,17 +155,19 @@ var TabsInTitlebar = {
           menubar.getAttribute("autohide") != "true")) {
         $("titlebar-buttonbox").style.removeProperty("height");
       }
 
       // Try to avoid reflows in this code by calculating dimensions first and
       // then later set the properties affecting layout together in a batch.
 
       // Get the height of the tabs toolbar:
-      let tabsHeight = rect($("TabsToolbar")).height;
+      let tabsToolbar = $("TabsToolbar");
+      let tabsStyles = window.getComputedStyle(tabsToolbar);
+      let fullTabsHeight = rect($("TabsToolbar")).height + verticalMargins(tabsStyles);
       // Buttons first:
       let captionButtonsBoxWidth = rect($("titlebar-buttonbox-container")).width;
 
       let secondaryButtonsWidth, menuHeight, fullMenuHeight, menuStyles;
       if (AppConstants.platform == "macosx") {
         secondaryButtonsWidth = rect($("titlebar-secondary-buttonbox")).width;
         // No need to look up the menubar stuff on OS X:
         menuHeight = 0;
@@ -181,17 +183,18 @@ var TabsInTitlebar = {
       let titlebarContentHeight = rect(titlebarContent).height;
 
       // Begin setting CSS properties which will cause a reflow
 
       // On Windows 10, adjust the window controls to span the entire
       // tab strip height if we're not showing a menu bar.
       if (AppConstants.isPlatformAndVersionAtLeast("win", "10.0")) {
         if (!menuHeight) {
-          titlebarContentHeight = tabsHeight;
+          // Add a pixel to slightly overlap the navbar border.
+          titlebarContentHeight = fullTabsHeight + 1;
           $("titlebar-buttonbox").style.height = titlebarContentHeight + "px";
         }
       }
 
       // If the menubar is around (menuHeight is non-zero), try to adjust
       // its full height (i.e. including margins) to match the titlebar,
       // by changing the menubar's bottom padding
       if (menuHeight) {
@@ -215,17 +218,17 @@ var TabsInTitlebar = {
           menubar.style.paddingBottom = desiredPadding + "px";
           // We've changed the menu height now:
           fullMenuHeight += desiredPadding - existingPadding;
         }
       }
 
       // Next, we calculate how much we need to stretch the titlebar down to
       // go all the way to the bottom of the tab strip, if necessary.
-      let tabAndMenuHeight = tabsHeight + fullMenuHeight;
+      let tabAndMenuHeight = fullTabsHeight + fullMenuHeight;
 
       if (tabAndMenuHeight > titlebarContentHeight) {
         // We need to increase the titlebar content's outer height (ie including margins)
         // to match the tab and menu height:
         let extraMargin = tabAndMenuHeight - titlebarContentHeight;
         if (AppConstants.platform != "macosx") {
           titlebarContent.style.marginBottom = extraMargin + "px";
         }
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -1041,21 +1041,16 @@ html|*#gcli-output-frame,
 .browserStack[responsivemode] {
   transition-property: min-width, max-width, min-height, max-height;
 }
 
 .browserStack[responsivemode][notransition] {
   transition: none;
 }
 
-panelview > .social-panel-frame {
-  width: auto;
-  height: auto;
-}
-
 /* Translation */
 notification[value="translation"] {
   -moz-binding: url("chrome://browser/content/translation-infobar.xml#translationbar");
 }
 
 /** See bug 872317 for why the following rule is necessary. */
 
 #downloads-button {
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -50,17 +50,16 @@ XPCOMUtils.defineLazyModuleGetters(this,
   ReaderMode: "resource://gre/modules/ReaderMode.jsm",
   ReaderParent: "resource:///modules/ReaderParent.jsm",
   RecentWindow: "resource:///modules/RecentWindow.jsm",
   SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
   SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
   ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
   SimpleServiceDiscovery: "resource://gre/modules/SimpleServiceDiscovery.jsm",
   SitePermissions: "resource:///modules/SitePermissions.jsm",
-  Social: "resource:///modules/Social.jsm",
   TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
   TelemetryStopwatch: "resource://gre/modules/TelemetryStopwatch.jsm",
   Translation: "resource:///modules/translation/Translation.jsm",
   UITour: "resource:///modules/UITour.jsm",
   UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
   Utils: "resource://gre/modules/sessionstore/Utils.jsm",
   Weave: "resource://services-sync/main.js",
   WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm",
@@ -95,20 +94,16 @@ XPCOMUtils.defineLazyScriptGetter(this, 
 XPCOMUtils.defineLazyScriptGetter(this, "CustomizationHandler",
                                   "chrome://browser/content/browser-customization.js");
 XPCOMUtils.defineLazyScriptGetter(this, ["PointerLock", "FullScreen"],
                                   "chrome://browser/content/browser-fullScreenAndPointerLock.js");
 XPCOMUtils.defineLazyScriptGetter(this, ["gGestureSupport", "gHistorySwipeAnimation"],
                                   "chrome://browser/content/browser-gestureSupport.js");
 XPCOMUtils.defineLazyScriptGetter(this, "gSafeBrowsing",
                                   "chrome://browser/content/browser-safebrowsing.js");
-XPCOMUtils.defineLazyScriptGetter(this, ["SocialUI",
-                                         "SocialShare",
-                                         "SocialActivationListener"],
-                                  "chrome://browser/content/browser-social.js");
 XPCOMUtils.defineLazyScriptGetter(this, "gSync",
                                   "chrome://browser/content/browser-sync.js");
 XPCOMUtils.defineLazyScriptGetter(this, "gBrowserThumbnails",
                                   "chrome://browser/content/browser-thumbnails.js");
 XPCOMUtils.defineLazyScriptGetter(this, ["setContextMenuContentData",
                                          "openContextMenu", "nsContextMenu"],
                                   "chrome://browser/content/nsContextMenu.js");
 XPCOMUtils.defineLazyScriptGetter(this, ["DownloadsPanel",
@@ -1648,17 +1643,16 @@ var gBrowserInit = {
       if (window.closed) {
         return;
       }
 
       // Enable the Restore Last Session command if needed
       RestoreLastSessionObserver.init();
 
       SidebarUI.startDelayedLoad();
-      SocialUI.init();
 
       PanicButtonNotifier.init();
     });
 
     gBrowser.tabContainer.addEventListener("TabSelect", function() {
       for (let panel of document.querySelectorAll("panel[tabspecific='true']")) {
         if (panel.state == "open") {
           panel.hidePopup();
@@ -1825,17 +1819,16 @@ var gBrowserInit = {
     if (this._boundDelayedStartup) {
       this._cancelDelayedStartup();
     } else {
       if (Win7Features)
         Win7Features.onCloseWindow();
 
       gPrefService.removeObserver(ctrlTab.prefName, ctrlTab);
       ctrlTab.uninit();
-      SocialUI.uninit();
       gBrowserThumbnails.uninit();
       FullZoom.destroy();
 
       Services.obs.removeObserver(gIdentityHandler, "perm-changed");
       Services.obs.removeObserver(gRemoteControl, "remote-active");
       Services.obs.removeObserver(gSessionHistoryObserver, "browser:purge-session-history");
       Services.obs.removeObserver(gStoragePressureObserver, "QuotaManager::StoragePressure");
       Services.obs.removeObserver(gXPInstallObserver, "addon-install-disabled");
@@ -4497,19 +4490,17 @@ var XULBrowserWindow = {
       field.label = text;
       field.setAttribute("crop", type == "overLink" ? "center" : "end");
       this.statusText = text;
     }
   },
 
   // Called before links are navigated to to allow us to retarget them if needed.
   onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
-    let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
-    SocialUI.closeSocialPanelForLinkTraversal(target, linkNode);
-    return target;
+    return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
   },
 
   // Check whether this URI should load in the current process
   shouldLoadURI(aDocShell, aURI, aReferrer, aHasPostData, aTriggeringPrincipal) {
     if (!gMultiProcessBrowser)
       return true;
 
     let browser = aDocShell.QueryInterface(Ci.nsIDocShellTreeItem)
@@ -4681,18 +4672,16 @@ var XULBrowserWindow = {
       }
 
       URLBarSetURI(aLocationURI);
 
       BookmarkingUI.onLocationChange();
 
       gIdentityHandler.onLocationChange();
 
-      SocialUI.updateState();
-
       gTabletModePageCounter.inc();
 
       // Utility functions for disabling find
       var shouldDisableFind = function(aDocument) {
         let docElt = aDocument.documentElement;
         return docElt && docElt.getAttribute("disablefastfind") == "true";
       }
 
@@ -4985,33 +4974,34 @@ var CombinedStopReload = {
     this.animate = Services.prefs.getBoolPref("toolkit.cosmeticAnimations.enabled") &&
                    Services.prefs.getBoolPref("browser.stopReloadAnimation.enabled");
     Services.prefs.addObserver("toolkit.cosmeticAnimations.enabled", this);
     this.stopReloadContainer.addEventListener("animationend", this);
   },
 
   onTabSwitch() {
     // Reset the time in the event of a tabswitch since the stored time
-    // would have been associated with the previous tab.
-    this.timeWhenSwitchedToStop = 0;
+    // would have been associated with the previous tab, so the animation will
+    // still run if the page has been loading until long after the tab switch.
+    this.timeWhenSwitchedToStop = window.performance.now();
   },
 
   switchToStop(aRequest, aWebProgress) {
     if (!this._initialized || !this._shouldSwitch(aRequest, aWebProgress)) {
       return;
     }
 
     // Store the time that we switched to the stop button only if a request
     // is active. Requests are null if the switch is related to a tabswitch.
     // This is used to determine if we should show the stop->reload animation.
-    if (aRequest) {
+    if (aRequest instanceof Ci.nsIRequest) {
       this.timeWhenSwitchedToStop = window.performance.now();
     }
 
-    let shouldAnimate = aRequest &&
+    let shouldAnimate = aRequest instanceof Ci.nsIRequest &&
                         aWebProgress.isTopLevel &&
                         aWebProgress.isLoadingDocument &&
                         !gBrowser.tabAnimationsInProgress &&
                         this.stopReloadContainer.closest("#nav-bar-customization-target") &&
                         this.animate;
 
     this._cancelTransition();
     if (shouldAnimate) {
@@ -5024,17 +5014,17 @@ var CombinedStopReload = {
   },
 
   switchToReload(aRequest, aWebProgress) {
     if (!this._initialized || !this._shouldSwitch(aRequest, aWebProgress) ||
         !this.reload.hasAttribute("displaystop")) {
       return;
     }
 
-    let shouldAnimate = aRequest &&
+    let shouldAnimate = aRequest instanceof Ci.nsIRequest &&
                         aWebProgress.isTopLevel &&
                         !aWebProgress.isLoadingDocument &&
                         !gBrowser.tabAnimationsInProgress &&
                         this._loadTimeExceedsMinimumForAnimation() &&
                         this.stopReloadContainer.closest("#nav-bar-customization-target") &&
                         this.animate;
 
     if (shouldAnimate) {
@@ -5065,20 +5055,20 @@ var CombinedStopReload = {
       self.reload.disabled = XULBrowserWindow.reloadCommand
                                              .getAttribute("disabled") == "true";
     }, 650, this);
   },
 
   _loadTimeExceedsMinimumForAnimation() {
     // If the time between switching to the stop button then switching to
     // the reload button exceeds 150ms, then we will show the animation.
-    // If we don't know when we switched to stop (a tabswitch occured while
-    // the page was loading), then we will not prevent the animation from
-    // occuring.
-    return !this.timeWhenSwitchedToStop ||
+    // If we don't know when we switched to stop (switchToStop is called
+    // after init but before switchToReload), then we will prevent the
+    // animation from occuring.
+    return this.timeWhenSwitchedToStop &&
            window.performance.now() - this.timeWhenSwitchedToStop > 150;
   },
 
   _shouldSwitch(aRequest, aWebProgress) {
     if (aRequest &&
         aRequest.originalURI &&
         (aRequest.originalURI.schemeIs("chrome") ||
          (aRequest.originalURI.schemeIs("about") &&
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -259,36 +259,16 @@
            noautofocus="true"
            noautohide="true"
            flip="none"
            consumeoutsideclicks="false"
            mousethrough="always">
       <box id="UITourHighlight"></box>
     </panel>
 
-    <panel id="social-share-panel"
-           class="social-panel"
-           type="arrow"
-           orient="vertical"
-           onpopupshowing="SocialShare.onShowing()"
-           onpopuphidden="SocialShare.onHidden()"
-           hidden="true">
-      <hbox class="social-share-toolbar">
-        <toolbarbutton id="manage-share-providers" class="share-provider-button"
-                       tooltiptext="&social.addons.label;"
-                       oncommand="BrowserOpenAddonsMgr('addons://list/service');
-                                  this.parentNode.parentNode.hidePopup();"/>
-        <arrowscrollbox id="social-share-provider-buttons" orient="horizontal" flex="1" pack="end">
-          <toolbarbutton id="add-share-provider" class="share-provider-button" type="radio"
-                         group="share-providers" tooltiptext="&findShareServices.label;"
-                         oncommand="SocialShare.showDirectory()"/>
-        </arrowscrollbox>
-      </hbox>
-      <hbox id="share-container" flex="1"/>
-    </panel>
     <panel id="sidebarMenu-popup"
            class="cui-widget-panel"
            role="group"
            type="arrow"
            hidden="true"
            flip="slide"
            orient="vertical"
            position="bottomcenter topleft">
@@ -493,21 +473,16 @@
       <label class="tooltip-label" value="&forwardButton.tooltip;"/>
 #ifdef XP_MACOSX
       <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
 #else
       <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
 #endif
     </tooltip>
 
-    <tooltip id="share-button-tooltip" onpopupshowing="SocialShare.createTooltip(event);">
-      <label class="tooltip-label"/>
-      <label class="tooltip-label"/>
-    </tooltip>
-
 #include popup-notifications.inc
 
 #include ../../components/customizableui/content/panelUI.inc.xul
 #include ../../components/controlcenter/content/panel.inc.xul
 
     <hbox id="downloads-animation-container" mousethrough="always">
       <vbox id="downloads-notification-anchor" hidden="true">
         <vbox id="downloads-indicator-notification"/>
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -821,48 +821,16 @@ var PageMetadataMessenger = {
         sendAsyncMessage("PageMetadata:MicroformatsResult", result);
         break;
       }
     }
   }
 }
 PageMetadataMessenger.init();
 
-addEventListener("ActivateSocialFeature", function(aEvent) {
-  let document = content.document;
-  let dwu = content.QueryInterface(Ci.nsIInterfaceRequestor)
-                   .getInterface(Ci.nsIDOMWindowUtils);
-  if (!dwu.isHandlingUserInput) {
-    Cu.reportError("attempt to activate provider without user input from " + document.nodePrincipal.origin);
-    return;
-  }
-
-  let node = aEvent.target;
-  let ownerDocument = node.ownerDocument;
-  let data = node.getAttribute("data-service");
-  if (data) {
-    try {
-      data = JSON.parse(data);
-    } catch (e) {
-      Cu.reportError("Social Service manifest parse error: " + e);
-      return;
-    }
-  } else {
-    Cu.reportError("Social Service manifest not available");
-    return;
-  }
-
-  sendAsyncMessage("Social:Activation", {
-    url: ownerDocument.location.href,
-    origin: ownerDocument.nodePrincipal.origin,
-    manifest: data,
-    triggeringPrincipal: Utils.serializePrincipal(ownerDocument.nodePrincipal),
-  });
-}, true, true);
-
 addMessageListener("ContextMenu:SaveVideoFrameAsImage", (message) => {
   let video = message.objects.target;
   let canvas = content.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
   canvas.width = video.videoWidth;
   canvas.height = video.videoHeight;
 
   let ctxDraw = canvas.getContext("2d");
   ctxDraw.drawImage(video, 0, 0);
--- a/browser/base/content/moz.build
+++ b/browser/base/content/moz.build
@@ -59,19 +59,16 @@ with Files("test/popups/**"):
     BUG_COMPONENT = ("Toolkit", "Notifications and Alerts")
 
 with Files("test/referrer/**"):
     BUG_COMPONENT = ("Core", "Document Navigation")
 
 with Files("test/siteIdentity/**"):
     BUG_COMPONENT = ("Firefox", "Site Identity and Permission Panels")
 
-with Files("test/social/**"):
-    BUG_COMPONENT = ("Firefox", "SocialAPI")
-
 with Files("test/static/**"):
     BUG_COMPONENT = ("Firefox", "General")
 
 with Files("test/tabPrompts/**"):
     BUG_COMPONENT = ("Firefox", "Tabbed Browser")
 
 with Files("test/tabcrashed/**"):
     BUG_COMPONENT = ("Firefox", "Tabbed Browser")
@@ -83,25 +80,19 @@ with Files("test/urlbar/**"):
     BUG_COMPONENT = ("Firefox", "Location Bar")
 
 with Files("test/webextensions/**"):
     BUG_COMPONENT = ("Toolkit", "WebExtensions: Untriaged")
 
 with Files("test/webrtc/**"):
     BUG_COMPONENT = ("Core", "WebRTC")
 
-with Files("aboutProviderDirectory.xhtml"):
-    BUG_COMPONENT = ("Firefox", "SocialAPI")
-
 with Files("aboutNetError.xhtml"):
     BUG_COMPONENT = ("Firefox", "Security")
 
-with Files("aboutSocialError.xhtml"):
-    BUG_COMPONENT = ("Firefox", "SocialAPI")
-
 with Files("blockedSite.xhtml"):
     BUG_COMPONENT = ("Toolkit", "Safe Browsing")
 
 with Files("browser-addons.js"):
     BUG_COMPONENT = ("Toolkit", "Add-ons Manager")
 
 with Files("*menu*"):
     BUG_COMPONENT = ("Firefox", "Menus")
@@ -128,19 +119,16 @@ with Files("browser-places.js"):
     BUG_COMPONENT = ("Firefox", "Bookmarks & History")
 
 with Files("browser-plugins.js"):
     BUG_COMPONENT = ("Core", "Plug-ins")
 
 with Files("browser-safebrowsing.js"):
     BUG_COMPONENT = ("Toolkit", "Safe Browsing")
 
-with Files("*social*"):
-    BUG_COMPONENT = ("Firefox", "SocialAPI")
-
 with Files("browser-sync.js"):
     BUG_COMPONENT = ("Firefox", "Sync")
 
 with Files("browser-tabPreviews.xml"):
     BUG_COMPONENT = ("Firefox", "Tabbed Browser")
 
 with Files("contentSearch*"):
     BUG_COMPONENT = ("Firefox", "Search")
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -369,23 +369,22 @@ nsContextMenu.prototype = {
     this.showItem("context-viewimagedesc", this.onImage && this.imageDescURL !== "");
   },
 
   initMiscItems: function CM_initMiscItems() {
     // Use "Bookmark This Link" if on a link.
     let bookmarkPage = document.getElementById("context-bookmarkpage");
     this.showItem(bookmarkPage,
                   !(this.isContentSelected || this.onTextInput || this.onLink ||
-                    this.onImage || this.onVideo || this.onAudio || this.onSocial ||
+                    this.onImage || this.onVideo || this.onAudio ||
                     this.onCanvas || this.inWebExtBrowser));
     bookmarkPage.setAttribute("tooltiptext", bookmarkPage.getAttribute("buttontooltiptext"));
 
     this.showItem("context-bookmarklink", (this.onLink && !this.onMailtoLink &&
-                                           !this.onSocial && !this.onMozExtLink) ||
-                                          this.onPlainTextLink);
+                                           !this.onMozExtLink) || this.onPlainTextLink);
     this.showItem("context-keywordfield",
                   this.onTextInput && this.onKeywordField);
     this.showItem("frame", this.inFrame);
 
     let showSearchSelect = (this.isTextSelected || this.onLink) && !this.onImage;
     this.showItem("context-searchselect", showSearchSelect);
     if (showSearchSelect) {
       this.formatSearchContextItem();
@@ -413,30 +412,16 @@ nsContextMenu.prototype = {
     }
 
     // BiDi UI
     this.showItem("context-sep-bidi", !this.onNumeric && top.gBidiUI);
     this.showItem("context-bidi-text-direction-toggle",
                   this.onTextInput && !this.onNumeric && top.gBidiUI);
     this.showItem("context-bidi-page-direction-toggle",
                   !this.onTextInput && top.gBidiUI);
-
-    // SocialShare
-    let shareButton = SocialShare.shareButton;
-    let shareEnabled = shareButton && !shareButton.disabled && !this.onSocial;
-    let pageShare = shareEnabled && !(this.isContentSelected ||
-                            this.onTextInput || this.onLink || this.onImage ||
-                            this.onVideo || this.onAudio || this.onCanvas ||
-                            this.inWebExtBrowser);
-    this.showItem("context-sharepage", pageShare);
-    this.showItem("context-shareselect", shareEnabled && this.isContentSelected);
-    this.showItem("context-sharelink", shareEnabled && (this.onLink || this.onPlainTextLink) && !this.onMailtoLink && !this.onMozExtLink);
-    this.showItem("context-shareimage", shareEnabled && this.onImage);
-    this.showItem("context-sharevideo", shareEnabled && this.onVideo);
-    this.setItemAttr("context-sharevideo", "disabled", !this.mediaURL || this.mediaURL.startsWith("blob:") || this.mediaURL.startsWith("moz-extension:"));
   },
 
   initSpellingItems() {
     var canSpell = InlineSpellCheckerUI.canSpellCheck &&
                    !InlineSpellCheckerUI.initialSpellCheckPending &&
                    this.canSpellCheck;
     let showDictionaries = canSpell && InlineSpellCheckerUI.enabled;
     var onMisspelling = InlineSpellCheckerUI.overMisspelling;
@@ -741,17 +726,16 @@ nsContextMenu.prototype = {
       this.browser = ownerDoc.defaultView
                              .QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIWebNavigation)
                              .QueryInterface(Ci.nsIDocShell)
                              .chromeEventHandler;
       this.principal = ownerDoc.nodePrincipal;
       this.frameOuterWindowID = WebNavigationFrames.getFrameId(ownerDoc.defaultView);
     }
-    this.onSocial = !!this.browser.getAttribute("origin");
     this.webExtBrowserType = this.browser.getAttribute("webextension-view-type");
     this.inWebExtBrowser = !!this.webExtBrowserType;
     this.inTabBrowser = this.browser.ownerGlobal.gBrowser ?
       !!this.browser.ownerGlobal.gBrowser.getTabForBrowser(this.browser) : false;
 
     // Check if we are in a synthetic document (stand alone image, video, etc.).
     this.inSyntheticDoc = ownerDoc.mozSyntheticDocument;
 
@@ -1829,32 +1813,16 @@ nsContextMenu.prototype = {
                                                 message.data.description)
                                   .catch(Components.utils.reportError);
     };
     mm.addMessageListener("ContextMenu:BookmarkFrame:Result", onMessage);
 
     mm.sendAsyncMessage("ContextMenu:BookmarkFrame", null, { target: this.target });
   },
 
-  shareLink: function CM_shareLink() {
-    SocialShare.sharePage(null, { url: this.linkURI.spec }, this.target);
-  },
-
-  shareImage: function CM_shareImage() {
-    SocialShare.sharePage(null, { url: this.imageURL, previews: [ this.mediaURL ] }, this.target);
-  },
-
-  shareVideo: function CM_shareVideo() {
-    SocialShare.sharePage(null, { url: this.mediaURL, source: this.mediaURL }, this.target);
-  },
-
-  shareSelect: function CM_shareSelect() {
-    SocialShare.sharePage(null, { url: this.browser.currentURI.spec, text: this.textSelected }, this.target);
-  },
-
   savePageAs: function CM_savePageAs() {
     saveBrowser(this.browser);
   },
 
   printFrame: function CM_printFrame() {
     PrintUtils.printWindow(this.frameOuterWindowID, this.browser);
   },
 
@@ -1959,17 +1927,17 @@ nsContextMenu.prototype = {
     };
     aXulMenu.ownerDocument.addEventListener("command", activationHandler, true);
     aXulMenu.addEventListener("popuphiding", this._onPopupHiding, true);
   },
 
   _getTelemetryPageContextInfo() {
     let rv = [];
     for (let k of ["isContentSelected", "onLink", "onImage", "onCanvas", "onVideo", "onAudio",
-                   "onTextInput", "onSocial", "inWebExtBrowser", "inTabBrowser"]) {
+                   "onTextInput", "inWebExtBrowser", "inTabBrowser"]) {
       if (this[k]) {
         rv.push(k.replace(/^(?:is|on)(.)/, (match, firstLetter) => firstLetter.toLowerCase()));
       }
     }
     if (!rv.length) {
       rv.push("other");
     }
 
deleted file mode 100644
--- a/browser/base/content/social-content.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* This content script is intended for use by iframes in the share panel. */
-
-/* eslint-env mozilla/frame-script */
-
-var {interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-// social frames are always treated as app tabs
-docShell.isAppTab = true;
-
-addEventListener("DOMContentLoaded", function(event) {
-  if (event.target != content.document)
-    return;
-  // Some share panels (e.g. twitter and facebook) check content.opener, and if
-  // it doesn't exist they act like they are in a browser tab.  We want them to
-  // act like they are in a dialog (which is the typical case).
-  if (content && !content.opener) {
-    content.opener = content;
-  }
-  hookWindowClose();
-  disableDialogs();
-});
-
-addMessageListener("Social:OpenGraphData", (message) => {
-  let ev = new content.CustomEvent("OpenGraphData", { detail: JSON.stringify(message.data) });
-  content.dispatchEvent(ev);
-});
-
-addMessageListener("Social:ClearFrame", () => {
-  docShell.createAboutBlankContentViewer(null);
-});
-
-addEventListener("DOMWindowClose", (evt) => {
-  // preventDefault stops the default window.close() function being called,
-  // which doesn't actually close anything but causes things to get into
-  // a bad state (an internal 'closed' flag is set and debug builds start
-  // asserting as the window is used.).
-  // None of the windows we inject this API into are suitable for this
-  // default close behaviour, so even if we took no action above, we avoid
-  // the default close from doing anything.
-  evt.preventDefault();
-
-  // Tells the SocialShare class to close the panel
-  sendAsyncMessage("Social:DOMWindowClose");
-});
-
-function hookWindowClose() {
-  // Allow scripts to close the "window".  Because we are in a panel and not
-  // in a full dialog, the DOMWindowClose listener above will only receive the
-  // event if we do this.
-  let dwu = content.QueryInterface(Ci.nsIInterfaceRequestor)
-     .getInterface(Ci.nsIDOMWindowUtils);
-  dwu.allowScriptsToClose();
-}
-
-function disableDialogs() {
-  let windowUtils = content.QueryInterface(Ci.nsIInterfaceRequestor).
-                    getInterface(Ci.nsIDOMWindowUtils);
-  windowUtils.disableDialogs();
-}
-
-// Error handling class used to listen for network errors in the social frames
-// and replace them with a social-specific error page
-const SocialErrorListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMEventListener,
-                                         Ci.nsIWebProgressListener,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsISupports]),
-
-  defaultTemplate: "about:socialerror?mode=tryAgainOnly&url=%{url}&origin=%{origin}",
-  urlTemplate: null,
-
-  init() {
-    addMessageListener("Social:SetErrorURL", this);
-    let webProgress = docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                              .getInterface(Components.interfaces.nsIWebProgress);
-    webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_REQUEST |
-                                          Ci.nsIWebProgress.NOTIFY_LOCATION);
-  },
-
-  receiveMessage(message) {
-    switch (message.name) {
-      case "Social:SetErrorURL":
-        // Either a url or null to reset to default template.
-        this.urlTemplate = message.data.template;
-        break;
-    }
-  },
-
-  setErrorPage() {
-    // if this is about:providerdirectory, use the directory iframe
-    let frame = docShell.chromeEventHandler;
-    let origin = frame.getAttribute("origin");
-    let src = frame.getAttribute("src");
-    if (src == "about:providerdirectory") {
-      frame = content.document.getElementById("activation-frame");
-      src = frame.getAttribute("src");
-    }
-
-    let url = this.urlTemplate || this.defaultTemplate;
-    url = url.replace("%{url}", encodeURIComponent(src));
-    url = url.replace("%{origin}", encodeURIComponent(origin));
-    if (frame != docShell.chromeEventHandler) {
-      // Unable to access frame.docShell here. This is our own frame and doesn't
-      // provide reload, so we'll just set the src.
-      frame.setAttribute("src", url);
-    } else {
-      let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
-      webNav.loadURI(url, null, null, null, null);
-    }
-    sendAsyncMessage("Social:ErrorPageNotify", {
-        origin,
-        url: src
-    });
-  },
-
-  onStateChange(aWebProgress, aRequest, aState, aStatus) {
-    let failure = false;
-    if ((aState & Ci.nsIWebProgressListener.STATE_IS_REQUEST))
-      return;
-    if ((aState & Ci.nsIWebProgressListener.STATE_STOP)) {
-      if (aRequest instanceof Ci.nsIHttpChannel) {
-        try {
-          // Change the frame to an error page on 4xx (client errors)
-          // and 5xx (server errors).  responseStatus throws if it is not set.
-          failure = aRequest.responseStatus >= 400 &&
-                    aRequest.responseStatus < 600;
-        } 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) {
-      // if tp is enabled and we get a failure, ignore failures (ie. STATE_STOP)
-      // on child resources since they *may* have been blocked. We don't have an
-      // easy way to know if a particular url is blocked by TP, only that
-      // something was.
-      if (docShell.hasTrackingContentBlocked) {
-        let frame = docShell.chromeEventHandler;
-        let src = frame.getAttribute("src");
-        if (aRequest && aRequest.name != src) {
-          Cu.reportError("SocialErrorListener ignoring blocked content error for " + aRequest.name);
-          return;
-        }
-      }
-
-      aRequest.cancel(Components.results.NS_BINDING_ABORTED);
-      this.setErrorPage();
-    }
-  },
-
-  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
-    if (aRequest && aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
-      aRequest.cancel(Components.results.NS_BINDING_ABORTED);
-      this.setErrorPage();
-    }
-  },
-};
-
-SocialErrorListener.init();
--- a/browser/base/content/test/contextMenu/browser.ini
+++ b/browser/base/content/test/contextMenu/browser.ini
@@ -1,8 +1,7 @@
 [DEFAULT]
 support-files =
   !/browser/base/content/test/general/contextmenu_common.js
   subtst_contextmenu_webext.html
 
-[browser_contextmenu_mozextension.js]
 [browser_contextmenu_touch.js]
 skip-if = !(os == 'win' && os_version == '10.0')
deleted file mode 100644
--- a/browser/base/content/test/contextMenu/browser_contextmenu_mozextension.js
+++ /dev/null
@@ -1,86 +0,0 @@
-"use strict";
-
-var { SocialService } = Cu.import("resource:///modules/SocialService.jsm", {});
-
-let contextMenu;
-let hasPocket = Services.prefs.getBoolPref("extensions.pocket.enabled");
-let hasContainers = Services.prefs.getBoolPref("privacy.userContext.enabled");
-
-// A social share provider
-let manifest = {
-  name: "provider 1",
-  origin: "https://example.com",
-  iconURL: "https://example.com/browser/browser/base/content/test/general/moz.png",
-  shareURL: "https://example.com/browser/browser/base/content/test/social/share.html"
-};
-
-add_task(async function test_setup() {
-  const example_base = "http://example.com/browser/browser/base/content/test/contextMenu/";
-  const url = example_base + "subtst_contextmenu_webext.html";
-  await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
-
-  const chrome_base = "chrome://mochitests/content/browser/browser/base/content/test/general/";
-  const contextmenu_common = chrome_base + "contextmenu_common.js";
-  /* import-globals-from ../general/contextmenu_common.js */
-  Services.scriptloader.loadSubScript(contextmenu_common, this);
-
-  // Enable social sharing functions in the browser, so the context menu item is shown.
-  CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-
-  await new Promise((resolve) => SocialService.addProvider(manifest, resolve));
-  ok(SocialShare.shareButton && !SocialShare.shareButton.disabled, "Sharing is enabled");
-});
-
-add_task(async function test_link() {
-  // gets hidden for this case.
-  await test_contextmenu("#link",
-    ["context-openlinkintab", true,
-       ...(hasContainers ? ["context-openlinkinusercontext-menu", true] : []),
-       // We need a blank entry here because the containers submenu is
-       // dynamically generated with no ids.
-       ...(hasContainers ? ["", null] : []),
-       "context-openlink",      true,
-       "context-openlinkprivate", true,
-       "---",                   null,
-       "context-savelink",      true,
-       "context-copylink",      true,
-       "context-searchselect",  true,
-       "---", null,
-       "context-sendlinktodevice", true, [], null,
-       ]
-    );
-});
-
-add_task(async function test_video() {
-  await test_contextmenu("#video",
-  ["context-media-play",         null,
-   "context-media-mute",         null,
-   "context-media-playbackrate", null,
-       ["context-media-playbackrate-050x", null,
-        "context-media-playbackrate-100x", null,
-        "context-media-playbackrate-125x", null,
-        "context-media-playbackrate-150x", null,
-        "context-media-playbackrate-200x", null], null,
-   "context-media-loop",         null,
-   "context-media-showcontrols", null,
-   "context-video-fullscreen",   null,
-   "---",                        null,
-   "context-viewvideo",          null,
-   "context-copyvideourl",       null,
-   "---",                        null,
-   "context-savevideo",          null,
-   "context-sharevideo",         false,
-   "context-video-saveimage",    null,
-   "context-sendvideo",          null,
-   "context-castvideo",          null,
-     [], null
-  ]);
-});
-
-add_task(async function test_cleanup() {
-  lastElementSelector = null;
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-  await new Promise((resolve) => {
-    return SocialService.disableProvider(manifest.origin, resolve);
-  });
-});
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -582,16 +582,17 @@ support-files =
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_blockHPKP.js]
 tags = psm
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_windowactivation.js]
 support-files =
   file_window_activation.html
   file_window_activation2.html
+skip-if = stylo # bug 1390694
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_contextmenu_childprocess.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug963945.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_domFullscreen_fullscreenMode.js]
 tags = fullscreen
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
--- a/browser/base/content/test/general/browser_bug724239.js
+++ b/browser/base/content/test/general/browser_bug724239.js
@@ -1,11 +1,36 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-add_task(async function test() {
+add_task(async function test_blank() {
   await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
                                     async function(browser) {
     BrowserTestUtils.loadURI(browser, "http://example.com");
     await BrowserTestUtils.browserLoaded(browser);
-    ok(!gBrowser.canGoBack, "about:newtab wasn't added to the session history");
+    ok(!gBrowser.canGoBack, "about:blank wasn't added to session history");
   });
 });
+
+add_task(async function test_newtab() {
+  await SpecialPowers.pushPrefEnv({set: [["browser.newtabpage.activity-stream.enabled", true]]});
+  await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
+                                    async function(browser) {
+    // Can't load it directly because that'll use a preloaded tab if present.
+    BrowserTestUtils.loadURI(browser, "about:newtab");
+    await BrowserTestUtils.browserLoaded(browser);
+
+    BrowserTestUtils.loadURI(browser, "http://example.com");
+    await BrowserTestUtils.browserLoaded(browser);
+    is(gBrowser.canGoBack, true, "about:newtab was added to the session history when AS was enabled.");
+  });
+  await SpecialPowers.pushPrefEnv({set: [["browser.newtabpage.activity-stream.enabled", false]]});
+  await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
+                                    async function(browser) {
+    // Can't load it directly because that'll use a preloaded tab if present.
+    BrowserTestUtils.loadURI(browser, "about:newtab");
+    await BrowserTestUtils.browserLoaded(browser);
+
+    BrowserTestUtils.loadURI(browser, "http://example.com");
+    await BrowserTestUtils.browserLoaded(browser);
+    is(gBrowser.canGoBack, false, "about:newtab was not added to the session history when AS was disabled.");
+  });
+});
--- a/browser/base/content/test/performance/browser_windowopen_reflows.js
+++ b/browser/base/content/test/performance/browser_windowopen_reflows.js
@@ -77,16 +77,26 @@ if (Services.appinfo.OS == "WINNT") {
     }
   );
 }
 
 if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
   EXPECTED_REFLOWS.push(
     {
       stack: [
+        "verticalMargins@chrome://browser/content/browser-tabsintitlebar.js",
+        "_update@chrome://browser/content/browser-tabsintitlebar.js",
+        "init@chrome://browser/content/browser-tabsintitlebar.js",
+        "handleEvent@chrome://browser/content/tabbrowser.xml",
+      ],
+      times: 2, // This number should only ever go down - never up.
+    },
+
+    {
+      stack: [
         "rect@chrome://browser/content/browser-tabsintitlebar.js",
         "_update@chrome://browser/content/browser-tabsintitlebar.js",
         "init@chrome://browser/content/browser-tabsintitlebar.js",
         "handleEvent@chrome://browser/content/tabbrowser.xml",
       ],
       times: 4, // This number should only ever go down - never up.
     },
   );
deleted file mode 100644
--- a/browser/base/content/test/social/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
-  "extends": [
-    "plugin:mozilla/browser-test"
-  ]
-};
deleted file mode 100644
--- a/browser/base/content/test/social/blocklist.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
-  <emItems>
-    <emItem  blockID="s1" id="test1.example.com@services.mozilla.org"></emItem>
-  </emItems>
-</blocklist>
deleted file mode 100644
--- a/browser/base/content/test/social/browser.ini
+++ /dev/null
@@ -1,24 +0,0 @@
-[DEFAULT]
-support-files =
-  blocklist.xml
-  head.js
-  opengraph/og_invalid_url.html
-  opengraph/opengraph.html
-  opengraph/shortlink_linkrel.html
-  opengraph/shorturl_link.html
-  opengraph/shorturl_linkrel.html
-  microformats.html
-  share.html
-  share_activate.html
-  social_activate.html
-  social_activate_basic.html
-  social_activate_iframe.html
-  social_postActivation.html
-  !/browser/base/content/test/plugins/blockNoPlugins.xml
-
-[browser_aboutHome_activation.js]
-[browser_addons.js]
-[browser_blocklist.js]
-tags = blocklist
-[browser_share.js]
-[browser_social_activation.js]
deleted file mode 100644
--- a/browser/base/content/test/social/browser_aboutHome_activation.js
+++ /dev/null
@@ -1,224 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-var SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-
-XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
-  "resource:///modules/AboutHome.jsm");
-
-var snippet =
-"     <script>" +
-"       var manifest = {" +
-'         "name": "Demo Social Service",' +
-'         "origin": "https://example.com",' +
-'         "iconURL": "chrome://branding/content/icon16.png",' +
-'         "icon32URL": "chrome://branding/content/icon32.png",' +
-'         "icon64URL": "chrome://branding/content/icon64.png",' +
-'         "shareURL": "https://example.com/browser/browser/base/content/test/social/social_share.html",' +
-'         "postActivationURL": "https://example.com/browser/browser/base/content/test/social/social_postActivation.html",' +
-"       };" +
-"       function activateProvider(node) {" +
-'         node.setAttribute("data-service", JSON.stringify(manifest));' +
-'         var event = new CustomEvent("ActivateSocialFeature");' +
-"         node.dispatchEvent(event);" +
-"       }" +
-"     </script>" +
-'     <div id="activationSnippet" onclick="activateProvider(this)">' +
-'     <img src="chrome://branding/content/icon32.png"></img>' +
-"     </div>";
-
-// enable one-click activation
-var snippet2 =
-"     <script>" +
-"       var manifest = {" +
-'         "name": "Demo Social Service",' +
-'         "origin": "https://example.com",' +
-'         "iconURL": "chrome://branding/content/icon16.png",' +
-'         "icon32URL": "chrome://branding/content/icon32.png",' +
-'         "icon64URL": "chrome://branding/content/icon64.png",' +
-'         "shareURL": "https://example.com/browser/browser/base/content/test/social/social_share.html",' +
-'         "postActivationURL": "https://example.com/browser/browser/base/content/test/social/social_postActivation.html",' +
-'         "oneclick": true' +
-"       };" +
-"       function activateProvider(node) {" +
-'         node.setAttribute("data-service", JSON.stringify(manifest));' +
-'         var event = new CustomEvent("ActivateSocialFeature");' +
-"         node.dispatchEvent(event);" +
-"       }" +
-"     </script>" +
-'     <div id="activationSnippet" onclick="activateProvider(this)">' +
-'     <img src="chrome://branding/content/icon32.png"></img>' +
-"     </div>";
-
-var gTests = [
-
-{
-  desc: "Test activation with enable panel",
-  snippet,
-  panel: true
-},
-
-{
-  desc: "Test activation bypassing enable panel",
-  snippet: snippet2,
-  panel: false
-}
-];
-
-function test() {
-  waitForExplicitFinish();
-  requestLongerTimeout(2);
-  ignoreAllUncaughtExceptions();
-  PopupNotifications.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function() {
-    PopupNotifications.panel.removeAttribute("animate");
-  });
-
-  (async function() {
-    for (let testCase of gTests) {
-      info(testCase.desc);
-
-      // Create a tab to run the test.
-      let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
-
-      // Add an event handler to modify the snippets map once it's ready.
-      let snippetsPromise = promiseSetupSnippetsMap(tab, testCase.snippet);
-
-      // Start loading about:home and wait for it to complete, snippets should be loaded
-      await promiseTabLoadEvent(tab, "about:home", "AboutHomeLoadSnippetsCompleted");
-
-      await snippetsPromise;
-
-      // ensure our activation snippet is indeed available
-      await ContentTask.spawn(tab.linkedBrowser, {}, async function(arg) {
-        ok(!!content.document.getElementById("snippets"), "Found snippets element");
-        ok(!!content.document.getElementById("activationSnippet"), "The snippet is present.");
-      });
-
-      await new Promise(resolve => {
-        activateProvider(tab, testCase.panel).then(() => {
-          checkSocialUI();
-          SocialService.uninstallProvider("https://example.com", function() {
-            info("provider uninstalled");
-            resolve();
-          });
-        });
-      });
-
-      // activation opened a post-activation info tab, close it.
-      await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-      await BrowserTestUtils.removeTab(tab);
-    }
-  })().then(finish, ex => {
-    ok(false, "Unexpected Exception: " + ex);
-    finish();
-  });
-}
-
-/**
- * Starts a load in an existing tab and waits for it to finish (via some event).
- *
- * @param aTab
- *        The tab to load into.
- * @param aUrl
- *        The url to load.
- * @param aEvent
- *        The load event type to wait for.  Defaults to "load".
- * @return {Promise} resolved when the event is handled.
- */
-function promiseTabLoadEvent(aTab, aURL, aEventType = "load") {
-  return new Promise(resolve => {
-    info("Wait tab event: " + aEventType);
-    aTab.linkedBrowser.addEventListener(aEventType, function load(event) {
-      if (event.originalTarget != aTab.linkedBrowser.contentDocument ||
-          event.target.location.href == "about:blank") {
-        info("skipping spurious load event");
-        return;
-      }
-      aTab.linkedBrowser.removeEventListener(aEventType, load, true);
-      info("Tab event received: " + aEventType);
-      resolve();
-    }, true, true);
-    aTab.linkedBrowser.loadURI(aURL);
-  });
-}
-
-/**
- * Cleans up snippets and ensures that by default we don't try to check for
- * remote snippets since that may cause network bustage or slowness.
- *
- * @param aTab
- *        The tab containing about:home.
- * @param aSetupFn
- *        The setup function to be run.
- * @return {Promise} resolved when the snippets are ready.  Gets the snippets map.
- */
-function promiseSetupSnippetsMap(aTab, aSnippet) {
-  info("Waiting for snippets map");
-
-  return ContentTask.spawn(aTab.linkedBrowser,
-                    {snippetsVersion: AboutHomeUtils.snippetsVersion,
-                     snippet: aSnippet},
-                    async function(arg) {
-    return new Promise(resolve => {
-      addEventListener("AboutHomeLoadSnippets", function load(event) {
-        removeEventListener("AboutHomeLoadSnippets", load, true);
-
-        let cw = content.window.wrappedJSObject;
-
-        // The snippets should already be ready by this point. Here we're
-        // just obtaining a reference to the snippets map.
-        cw.ensureSnippetsMapThen(function(aSnippetsMap) {
-          aSnippetsMap = Cu.waiveXrays(aSnippetsMap);
-          console.log("Got snippets map: " +
-               "{ last-update: " + aSnippetsMap.get("snippets-last-update") +
-               ", cached-version: " + aSnippetsMap.get("snippets-cached-version") +
-               " }");
-          // Don't try to update.
-          aSnippetsMap.set("snippets-last-update", Date.now());
-          aSnippetsMap.set("snippets-cached-version", arg.snippetsVersion);
-          // Clear snippets.
-          aSnippetsMap.delete("snippets");
-          aSnippetsMap.set("snippets", arg.snippet);
-          resolve();
-        });
-      }, true, true);
-    });
-  });
-}
-
-
-function sendActivationEvent(tab) {
-  // hack Social.lastEventReceived so we don't hit the "too many events" check.
-  Social.lastEventReceived = 0;
-  let doc = tab.linkedBrowser.contentDocument;
-  // if our test has a frame, use it
-  if (doc.defaultView.frames[0])
-    doc = doc.defaultView.frames[0].document;
-  let button = doc.getElementById("activationSnippet");
-  BrowserTestUtils.synthesizeMouseAtCenter(button, {}, tab.linkedBrowser);
-}
-
-function activateProvider(tab, expectPanel, aCallback) {
-  return new Promise(resolve => {
-    if (expectPanel) {
-      BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown").then(() => {
-        let panel = document.getElementById("servicesInstall-notification");
-        panel.button.click();
-      });
-    }
-    waitForProviderLoad().then(() => {
-      checkSocialUI();
-      resolve();
-    });
-    sendActivationEvent(tab);
-  });
-}
-
-function waitForProviderLoad(cb) {
-  return Promise.all([
-    promiseObserverNotified("social:provider-enabled"),
-    BrowserTestUtils.waitForNewTab(gBrowser, "https://example.com/browser/browser/base/content/test/social/social_postActivation.html"),
-  ]);
-}
deleted file mode 100644
--- a/browser/base/content/test/social/browser_addons.js
+++ /dev/null
@@ -1,217 +0,0 @@
-var AddonManager = Cu.import("resource://gre/modules/AddonManager.jsm", {}).AddonManager;
-var SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-
-var manifest = {
-  name: "provider 1",
-  origin: "https://example.com",
-  shareURL: "https://example.com/browser/browser/base/content/test/social/social_share.html",
-  iconURL: "https://example.com/browser/browser/base/content/test/general/moz.png"
-};
-var manifest2 = { // used for testing install
-  name: "provider 2",
-  origin: "https://test1.example.com",
-  shareURL: "https://test1.example.com/browser/browser/base/content/test/social/social_share.html",
-  iconURL: "https://test1.example.com/browser/browser/base/content/test/general/moz.png",
-  version: "1.0"
-};
-var manifestUpgrade = { // used for testing install
-  name: "provider 3",
-  origin: "https://test2.example.com",
-  shareURL: "https://test2.example.com/browser/browser/base/content/test/social/social_share.html",
-  iconURL: "https://test2.example.com/browser/browser/base/content/test/general/moz.png",
-  version: "1.0"
-};
-
-function test() {
-  waitForExplicitFinish();
-  PopupNotifications.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function() {
-    PopupNotifications.panel.removeAttribute("animate");
-  });
-
-  let prefname = getManifestPrefname(manifest);
-  // ensure that manifest2 is NOT showing as builtin
-  is(SocialService.getOriginActivationType(manifest.origin), "foreign", "manifest is foreign");
-  is(SocialService.getOriginActivationType(manifest2.origin), "foreign", "manifest2 is foreign");
-
-  Services.prefs.setBoolPref("social.remote-install.enabled", true);
-  runSocialTests(tests, undefined, undefined, function() {
-    Services.prefs.clearUserPref("social.remote-install.enabled");
-    ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs");
-    // just in case the tests failed, clear these here as well
-    Services.prefs.clearUserPref("social.directories");
-    finish();
-  });
-}
-
-function installListener(next, aManifest) {
-  let expectEvent = "onInstalling";
-  let prefname = getManifestPrefname(aManifest);
-  // wait for the actual removal to call next
-  SocialService.registerProviderListener(function providerListener(topic, origin, providers) {
-    if (topic == "provider-disabled") {
-      SocialService.unregisterProviderListener(providerListener);
-      is(origin, aManifest.origin, "provider disabled");
-      executeSoon(next);
-    }
-  });
-
-  return {
-    onInstalling(addon) {
-      is(expectEvent, "onInstalling", "install started");
-      is(addon.manifest.origin, aManifest.origin, "provider about to be installed");
-      ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs");
-      expectEvent = "onInstalled";
-    },
-    onInstalled(addon) {
-      is(addon.manifest.origin, aManifest.origin, "provider installed");
-      ok(addon.installDate.getTime() > 0, "addon has installDate");
-      ok(addon.updateDate.getTime() > 0, "addon has updateDate");
-      ok(Services.prefs.prefHasUserValue(prefname), "manifest is in user-prefs");
-      expectEvent = "onUninstalling";
-    },
-    onUninstalling(addon) {
-      is(expectEvent, "onUninstalling", "uninstall started");
-      is(addon.manifest.origin, aManifest.origin, "provider about to be uninstalled");
-      ok(Services.prefs.prefHasUserValue(prefname), "manifest is in user-prefs");
-      expectEvent = "onUninstalled";
-    },
-    onUninstalled(addon) {
-      is(expectEvent, "onUninstalled", "provider has been uninstalled");
-      is(addon.manifest.origin, aManifest.origin, "provider uninstalled");
-      ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs");
-      AddonManager.removeAddonListener(this);
-    }
-  };
-}
-
-var tests = {
-  testHTTPInstallFailure(next) {
-    let installFrom = "http://example.com";
-    is(SocialService.getOriginActivationType(installFrom), "foreign", "testing foriegn install");
-    let data = {
-      origin: installFrom,
-      url: installFrom + "/activate",
-      manifest,
-      window
-    }
-    Social.installProvider(data, function(addonManifest) {
-      ok(!addonManifest, "unable to install provider over http");
-      next();
-    });
-  },
-  testAddonEnableToggle(next) {
-    let expectEvent;
-    let prefname = getManifestPrefname(manifest);
-    let listener = {
-      onEnabled(addon) {
-        is(expectEvent, "onEnabled", "provider onEnabled");
-        ok(!addon.userDisabled, "provider enabled");
-        executeSoon(function() {
-          expectEvent = "onDisabling";
-          addon.userDisabled = true;
-        });
-      },
-      onEnabling(addon) {
-        is(expectEvent, "onEnabling", "provider onEnabling");
-        expectEvent = "onEnabled";
-      },
-      onDisabled(addon) {
-        is(expectEvent, "onDisabled", "provider onDisabled");
-        ok(addon.userDisabled, "provider disabled");
-        AddonManager.removeAddonListener(listener);
-        // clear the provider user-level pref
-        Services.prefs.clearUserPref(prefname);
-        executeSoon(next);
-      },
-      onDisabling(addon) {
-        is(expectEvent, "onDisabling", "provider onDisabling");
-        expectEvent = "onDisabled";
-      }
-    };
-    AddonManager.addAddonListener(listener);
-
-    // we're only testing enable disable, so we quickly set the user-level pref
-    // for this provider and test enable/disable toggling
-    setManifestPref(prefname, manifest);
-    ok(Services.prefs.prefHasUserValue(prefname), "manifest is in user-prefs");
-    AddonManager.getAddonsByTypes(["service"], function(addons) {
-      for (let addon of addons) {
-        if (addon.userDisabled) {
-          expectEvent = "onEnabling";
-          addon.userDisabled = false;
-          // only test with one addon
-          return;
-        }
-      }
-      ok(false, "no addons toggled");
-      next();
-    });
-  },
-  testProviderEnableToggle(next) {
-    // enable and disabel a provider from the SocialService interface, check
-    // that the addon manager is updated
-
-    let expectEvent;
-    let prefname = getManifestPrefname(manifest);
-
-    let listener = {
-      onEnabled(addon) {
-        is(expectEvent, "onEnabled", "provider onEnabled");
-        is(addon.manifest.origin, manifest.origin, "provider enabled");
-        ok(!addon.userDisabled, "provider !userDisabled");
-      },
-      onEnabling(addon) {
-        is(expectEvent, "onEnabling", "provider onEnabling");
-        is(addon.manifest.origin, manifest.origin, "provider about to be enabled");
-        expectEvent = "onEnabled";
-      },
-      onDisabled(addon) {
-        is(expectEvent, "onDisabled", "provider onDisabled");
-        is(addon.manifest.origin, manifest.origin, "provider disabled");
-        ok(addon.userDisabled, "provider userDisabled");
-      },
-      onDisabling(addon) {
-        is(expectEvent, "onDisabling", "provider onDisabling");
-        is(addon.manifest.origin, manifest.origin, "provider about to be disabled");
-        expectEvent = "onDisabled";
-      }
-    };
-    AddonManager.addAddonListener(listener);
-
-    expectEvent = "onEnabling";
-    setManifestPref(prefname, manifest);
-    SocialService.enableProvider(manifest.origin, function(provider) {
-      expectEvent = "onDisabling";
-      SocialService.disableProvider(provider.origin, function() {
-        AddonManager.removeAddonListener(listener);
-        Services.prefs.clearUserPref(prefname);
-        next();
-      });
-    });
-  },
-  testDirectoryInstall(next) {
-    AddonManager.addAddonListener(installListener(next, manifest2));
-
-    BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown").then(() => {
-      let panel = document.getElementById("servicesInstall-notification");
-      info("servicesInstall-notification panel opened");
-      panel.button.click();
-    });
-
-    Services.prefs.setCharPref("social.directories", manifest2.origin);
-    is(SocialService.getOriginActivationType(manifest2.origin), "directory", "testing directory install");
-    let data = {
-      origin: manifest2.origin,
-      url: manifest2.origin + "/directory",
-      manifest: manifest2,
-      window
-    }
-    Social.installProvider(data, function(addonManifest) {
-      Services.prefs.clearUserPref("social.directories");
-      SocialService.enableProvider(addonManifest.origin, function(provider) {
-        Social.uninstallProvider(addonManifest.origin);
-      });
-    });
-  }
-}
deleted file mode 100644
--- a/browser/base/content/test/social/browser_blocklist.js
+++ /dev/null
@@ -1,208 +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/. */
-
-// a place for miscellaneous social tests
-
-var SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-
-const URI_EXTENSION_BLOCKLIST_DIALOG = "chrome://mozapps/content/extensions/blocklist.xul";
-var blocklistURL = "http://example.com/browser/browser/base/content/test/social/blocklist.xml";
-
-var manifest = { // normal provider
-  name: "provider ok",
-  origin: "https://example.com",
-  shareURL: "https://example.com/browser/browser/base/content/test/social/social_share.html",
-  iconURL: "https://example.com/browser/browser/base/content/test/general/moz.png"
-};
-var manifest_bad = { // normal provider
-  name: "provider blocked",
-  origin: "https://test1.example.com",
-  shareURL: "https://test1.example.com/browser/browser/base/content/test/social/social_share.html",
-  iconURL: "https://test1.example.com/browser/browser/base/content/test/general/moz.png"
-};
-
-// blocklist testing
-function updateBlocklist() {
-  var blocklistNotifier = Cc["@mozilla.org/extensions/blocklist;1"]
-                          .getService(Ci.nsITimerCallback);
-  let promise = promiseObserverNotified("blocklist-updated");
-  blocklistNotifier.notify(null);
-  return promise;
-}
-
-var _originalTestBlocklistURL = null;
-function setAndUpdateBlocklist(aURL) {
-  if (!_originalTestBlocklistURL)
-    _originalTestBlocklistURL = Services.prefs.getCharPref("extensions.blocklist.url");
-  Services.prefs.setCharPref("extensions.blocklist.url", aURL);
-  return updateBlocklist();
-}
-
-function resetBlocklist() {
-  // XXX - this has "forked" from the head.js helpers in our parent directory :(
-  // But let's reuse their blockNoPlugins.xml.  Later, we should arrange to
-  // use their head.js helpers directly
-  let noBlockedURL = "http://example.com/browser/browser/base/content/test/plugins/blockNoPlugins.xml";
-  return new Promise(resolve => {
-    setAndUpdateBlocklist(noBlockedURL).then(() => {
-      Services.prefs.setCharPref("extensions.blocklist.url", _originalTestBlocklistURL);
-      resolve();
-    });
-  });
-}
-
-function test() {
-  waitForExplicitFinish();
-  // turn on logging for nsBlocklistService.js
-  Services.prefs.setBoolPref("extensions.logging.enabled", true);
-  registerCleanupFunction(function() {
-    Services.prefs.clearUserPref("extensions.logging.enabled");
-  });
-
-  runSocialTests(tests, undefined, undefined, function() {
-    resetBlocklist().then(finish); // restore to original pref
-  });
-}
-
-var tests = {
-  testSimpleBlocklist(next) {
-    // this really just tests adding and clearing our blocklist for later tests
-    setAndUpdateBlocklist(blocklistURL).then(() => {
-      ok(Services.blocklist.isAddonBlocklisted(SocialService.createWrapper(manifest_bad)), "blocking 'blocked'");
-      ok(!Services.blocklist.isAddonBlocklisted(SocialService.createWrapper(manifest)), "not blocking 'good'");
-      resetBlocklist().then(() => {
-        ok(!Services.blocklist.isAddonBlocklisted(SocialService.createWrapper(manifest_bad)), "blocklist cleared");
-        next();
-      });
-    });
-  },
-  testAddingNonBlockedProvider(next) {
-    function finishTest(isgood) {
-      ok(isgood, "adding non-blocked provider ok");
-      Services.prefs.clearUserPref("social.manifest.good");
-      resetBlocklist().then(next);
-    }
-    setManifestPref("social.manifest.good", manifest);
-    setAndUpdateBlocklist(blocklistURL).then(() => {
-      try {
-        SocialService.addProvider(manifest, function(provider) {
-          try {
-            SocialService.disableProvider(provider.origin, function() {
-              ok(true, "added and removed provider");
-              finishTest(true);
-            });
-          } catch (e) {
-            ok(false, "SocialService.disableProvider threw exception: " + e);
-            finishTest(false);
-          }
-        });
-      } catch (e) {
-        ok(false, "SocialService.addProvider threw exception: " + e);
-        finishTest(false);
-      }
-    });
-  },
-  testAddingBlockedProvider(next) {
-    function finishTest(good) {
-      ok(good, "Unable to add blocklisted provider");
-      Services.prefs.clearUserPref("social.manifest.blocked");
-      resetBlocklist().then(next);
-    }
-    setManifestPref("social.manifest.blocked", manifest_bad);
-    setAndUpdateBlocklist(blocklistURL).then(() => {
-      try {
-        SocialService.addProvider(manifest_bad, function(provider) {
-          SocialService.disableProvider(provider.origin, function() {
-            ok(false, "SocialService.addProvider should throw blocklist exception");
-            finishTest(false);
-          });
-        });
-      } catch (e) {
-        ok(true, "SocialService.addProvider should throw blocklist exception: " + e);
-        finishTest(true);
-      }
-    });
-  },
-  testInstallingBlockedProvider(next) {
-    function finishTest(good) {
-      ok(good, "Unable to install blocklisted provider");
-      resetBlocklist().then(next);
-    }
-    let activationURL = manifest_bad.origin + "/browser/browser/base/content/test/social/social_activate.html"
-    setAndUpdateBlocklist(blocklistURL).then(() => {
-      try {
-        // expecting an exception when attempting to install a hard blocked
-        // provider
-        let data = {
-          origin: manifest_bad.origin,
-          url: activationURL,
-          manifest: manifest_bad,
-          window
-        }
-        Social.installProvider(data, function(addonManifest) {
-          finishTest(false);
-        });
-      } catch (e) {
-        finishTest(true);
-      }
-    });
-  },
-  testBlockingExistingProvider(next) {
-    let listener = {
-      _window: null,
-      onOpenWindow(aXULWindow) {
-        Services.wm.removeListener(this);
-        this._window = aXULWindow;
-        let domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                                  .getInterface(Ci.nsIDOMWindow);
-
-        domwindow.addEventListener("load", function() {
-          domwindow.addEventListener("unload", function() {
-            info("blocklist window was closed");
-            Services.wm.removeListener(listener);
-            next();
-          }, {once: true});
-
-          is(domwindow.document.location.href, URI_EXTENSION_BLOCKLIST_DIALOG, "dialog opened and focused");
-          // wait until after load to cancel so the dialog has initalized. we
-          // don't want to accept here since that restarts the browser.
-          executeSoon(() => {
-            let cancelButton = domwindow.document.documentElement.getButton("cancel");
-            info("***** hit the cancel button\n");
-            cancelButton.doCommand();
-          });
-        }, {once: true});
-      },
-      onCloseWindow(aXULWindow) { },
-      onWindowTitleChange(aXULWindow, aNewTitle) { }
-    };
-
-    Services.wm.addListener(listener);
-
-    setManifestPref("social.manifest.blocked", manifest_bad);
-    try {
-      SocialService.addProvider(manifest_bad, function(provider) {
-        // the act of blocking should cause a 'provider-disabled' notification
-        // from SocialService.
-        SocialService.registerProviderListener(function providerListener(topic, origin, providers) {
-          if (topic != "provider-disabled")
-            return;
-          SocialService.unregisterProviderListener(providerListener);
-          is(origin, provider.origin, "provider disabled");
-          SocialService.getProvider(provider.origin, function(p) {
-            ok(p == null, "blocklisted provider disabled");
-            Services.prefs.clearUserPref("social.manifest.blocked");
-            resetBlocklist();
-          });
-        });
-        // no callback - the act of updating should cause the listener above
-        // to fire.
-        setAndUpdateBlocklist(blocklistURL);
-      });
-    } catch (e) {
-      ok(false, "unable to add provider " + e);
-      next();
-    }
-  }
-}
deleted file mode 100644
--- a/browser/base/content/test/social/browser_share.js
+++ /dev/null
@@ -1,396 +0,0 @@
-/* eslint-env mozilla/frame-script */
-
-var SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-
-var baseURL = "https://example.com/browser/browser/base/content/test/social/";
-
-var manifest = { // normal provider
-  name: "provider 1",
-  origin: "https://example.com",
-  iconURL: "https://example.com/browser/browser/base/content/test/general/moz.png",
-  shareURL: "https://example.com/browser/browser/base/content/test/social/share.html"
-};
-var activationPage = "https://example.com/browser/browser/base/content/test/social/share_activate.html";
-
-function sendActivationEvent(subframe) {
-  // hack Social.lastEventReceived so we don't hit the "too many events" check.
-  Social.lastEventReceived = 0;
-  let doc = subframe.contentDocument;
-  // if our test has a frame, use it
-  let button = doc.getElementById("activation");
-  ok(!!button, "got the activation button");
-  EventUtils.synthesizeMouseAtCenter(button, {}, doc.defaultView);
-}
-
-function test() {
-  waitForExplicitFinish();
-  Services.prefs.setCharPref("social.shareDirectory", activationPage);
-
-  let frameScript = "data:,(" + function frame_script() {
-    addEventListener("OpenGraphData", function(aEvent) {
-      sendAsyncMessage("sharedata", aEvent.detail);
-    }, true, true);
-    /* bug 1042991, ensure history is available by calling history.back on close */
-    addMessageListener("closeself", function(e) {
-      content.history.back();
-      content.close();
-    }, true);
-    /* if text is entered into field, onbeforeunload will cause a modal dialog
-       unless dialogs have been disabled for the iframe. */
-    content.onbeforeunload = function(e) {
-      return "FAIL.";
-    };
-  }.toString() + ")();";
-  let mm = window.getGroupMessageManager("social");
-  mm.loadFrameScript(frameScript, true);
-
-  // Animation on the panel can cause intermittent failures such as bug 1115131.
-  SocialShare.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function() {
-    SocialShare.panel.removeAttribute("animate");
-    mm.removeDelayedFrameScript(frameScript);
-    Services.prefs.clearUserPref("social.directories");
-    Services.prefs.clearUserPref("social.shareDirectory");
-    Services.prefs.clearUserPref("social.share.activationPanelEnabled");
-  });
-  runSocialTests(tests, undefined, function(next) {
-    let shareButton = SocialShare.shareButton;
-    if (shareButton) {
-      CustomizableUI.removeWidgetFromArea("social-share-button", CustomizableUI.AREA_NAVBAR)
-      shareButton.remove();
-    }
-    next();
-  });
-}
-
-var corpus = [
-  {
-    url: baseURL + "opengraph/opengraph.html",
-    options: {
-      // og:title
-      title: ">This is my title<",
-      // og:description
-      description: "A test corpus file for open graph tags we care about",
-      // medium: this.getPageMedium(),
-      // source: this.getSourceURL(),
-      // og:url
-      url: "https://www.mozilla.org/",
-      // shortUrl: this.getShortURL(),
-      // og:image
-      previews: ["https://www.mozilla.org/favicon.png"],
-      // og:site_name
-      siteName: ">My simple test page<"
-    }
-  },
-  {
-    // tests that og:url doesn't override the page url if it is bad
-    url: baseURL + "opengraph/og_invalid_url.html",
-    options: {
-      description: "A test corpus file for open graph tags passing a bad url",
-      url: baseURL + "opengraph/og_invalid_url.html",
-      previews: [],
-      siteName: "Evil chrome delivering website"
-    }
-  },
-  {
-    url: baseURL + "opengraph/shorturl_link.html",
-    options: {
-      previews: ["http://example.com/1234/56789.jpg"],
-      url: "http://www.example.com/photos/56789/",
-      shortUrl: "http://imshort/p/abcde"
-    }
-  },
-  {
-    url: baseURL + "opengraph/shorturl_linkrel.html",
-    options: {
-      previews: ["http://example.com/1234/56789.jpg"],
-      url: "http://www.example.com/photos/56789/",
-      shortUrl: "http://imshort/p/abcde"
-    }
-  },
-  {
-    url: baseURL + "opengraph/shortlink_linkrel.html",
-    options: {
-      previews: ["http://example.com/1234/56789.jpg"],
-      url: "http://www.example.com/photos/56789/",
-      shortUrl: "http://imshort/p/abcde"
-    }
-  }
-];
-
-function hasoptions(testOptions, options) {
-  for (let option in testOptions) {
-    let data = testOptions[option];
-    info("data: " + JSON.stringify(data));
-    let message_data = options[option];
-    info("message_data: " + JSON.stringify(message_data));
-    if (Array.isArray(data)) {
-      // the message may have more array elements than we are testing for, this
-      // is ok since some of those are hard to test. So we just test that
-      // anything in our test data IS in the message.
-      ok(Array.every(data, function(item) { return message_data.indexOf(item) >= 0 }), "option " + option);
-    } else {
-      is(message_data, data, "option " + option);
-    }
-  }
-}
-
-var tests = {
-  testShareDisabledOnActivation(next) {
-    // starting on about:blank page, share should be visible but disabled when
-    // adding provider
-    is(gBrowser.currentURI.spec, "about:blank");
-
-    // initialize the button into the navbar
-    CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-    // ensure correct state
-    SocialUI.onCustomizeEnd(window);
-
-    SocialService.addProvider(manifest, function(provider) {
-      is(SocialUI.enabled, true, "SocialUI is enabled");
-      checkSocialUI();
-      // share should not be enabled since we only have about:blank page
-      let shareButton = SocialShare.shareButton;
-      // verify the attribute for proper css
-      is(shareButton.getAttribute("disabled"), "true", "share button attribute is disabled");
-      // button should be visible
-      is(shareButton.hidden, false, "share button is visible");
-      SocialService.disableProvider(manifest.origin, next);
-    });
-  },
-  testShareEnabledOnActivation(next) {
-    // starting from *some* page, share should be visible and enabled when
-    // activating provider
-    // initialize the button into the navbar
-    CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-    // ensure correct state
-    SocialUI.onCustomizeEnd(window);
-
-    let testData = corpus[0];
-    BrowserTestUtils.openNewForegroundTab(gBrowser, testData.url).then(tab => {
-      SocialService.addProvider(manifest, function(provider) {
-        is(SocialUI.enabled, true, "SocialUI is enabled");
-        checkSocialUI();
-        // share should not be enabled since we only have about:blank page
-        let shareButton = SocialShare.shareButton;
-        // verify the attribute for proper css
-        ok(!shareButton.hasAttribute("disabled"), "share button is enabled");
-        // button should be visible
-        is(shareButton.hidden, false, "share button is visible");
-        BrowserTestUtils.removeTab(tab).then(next);
-      });
-    });
-  },
-  testSharePage(next) {
-    let testTab;
-    let testIndex = 0;
-    let testData = corpus[testIndex++];
-
-    // initialize the button into the navbar
-    CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-    // ensure correct state
-    SocialUI.onCustomizeEnd(window);
-
-    let mm = window.getGroupMessageManager("social");
-    mm.addMessageListener("sharedata", function handler(msg) {
-      BrowserTestUtils.removeTab(testTab).then(() => {
-        hasoptions(testData.options, JSON.parse(msg.data));
-        testData = corpus[testIndex++];
-        BrowserTestUtils.waitForCondition(() => { return SocialShare.currentShare == null; }, "share panel closed").then(() => {
-          if (testData) {
-            runOneTest();
-          } else {
-            mm.removeMessageListener("sharedata", handler);
-            SocialService.disableProvider(manifest.origin, next);
-          }
-        });
-        SocialShare.iframe.messageManager.sendAsyncMessage("closeself", {});
-      });
-    });
-
-    function runOneTest() {
-      BrowserTestUtils.openNewForegroundTab(gBrowser, testData.url).then(tab => {
-        testTab = tab;
-
-        let shareButton = SocialShare.shareButton;
-        // verify the attribute for proper css
-        ok(!shareButton.hasAttribute("disabled"), "share button is enabled");
-        // button should be visible
-        is(shareButton.hidden, false, "share button is visible");
-
-        SocialShare.sharePage(manifest.origin);
-      });
-    }
-    executeSoon(runOneTest);
-  },
-  testShareMicroformats(next) {
-    // initialize the button into the navbar
-    CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-    // ensure correct state
-    SocialUI.onCustomizeEnd(window);
-
-    SocialService.addProvider(manifest, function(provider) {
-      let target, testTab;
-
-      let expecting = JSON.stringify({
-        "url": "https://example.com/browser/browser/base/content/test/social/microformats.html",
-        "title": "Raspberry Pi Page",
-        "previews": ["https://example.com/someimage.jpg"],
-        "microformats": {
-          "items": [{
-              "type": ["h-product"],
-              "properties": {
-                "name": ["Raspberry Pi"],
-                "photo": ["https://example.com/someimage.jpg"],
-                "description": [{
-                    "value": "The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It's a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.",
-                    "html": "The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It's a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming."
-                  }
-                ],
-                "url": ["https://example.com/"],
-                "price": ["29.95"],
-                "review": [{
-                    "value": "4.5 out of 5",
-                    "type": ["h-review"],
-                    "properties": {
-                      "rating": ["4.5"]
-                    }
-                  }
-                ],
-                "category": ["Computer", "Education"]
-              }
-            }
-          ],
-          "rels": {
-            "tag": ["https://example.com/wiki/computer", "https://example.com/wiki/education"]
-          },
-          "rel-urls": {
-            "https://example.com/wiki/computer": {
-              "text": "Computer",
-              "rels": ["tag"]
-            },
-            "https://example.com/wiki/education": {
-              "text": "Education",
-              "rels": ["tag"]
-            }
-          }
-        }
-      });
-
-      let mm = window.getGroupMessageManager("social");
-      mm.addMessageListener("sharedata", function handler(msg) {
-        is(msg.data, expecting, "microformats data ok");
-        BrowserTestUtils.waitForCondition(() => { return SocialShare.currentShare == null; },
-                                          "share panel closed").then(() => {
-          mm.removeMessageListener("sharedata", handler);
-          BrowserTestUtils.removeTab(testTab).then(() => {
-            SocialService.disableProvider(manifest.origin, next);
-          });
-        });
-        SocialShare.iframe.messageManager.sendAsyncMessage("closeself", {});
-      });
-
-      let url = "https://example.com/browser/browser/base/content/test/social/microformats.html"
-      BrowserTestUtils.openNewForegroundTab(gBrowser, url).then(tab => {
-        testTab = tab;
-
-        let shareButton = SocialShare.shareButton;
-        // verify the attribute for proper css
-        ok(!shareButton.hasAttribute("disabled"), "share button is enabled");
-        // button should be visible
-        is(shareButton.hidden, false, "share button is visible");
-
-        let doc = tab.linkedBrowser.contentDocument;
-        target = doc.getElementById("simple-hcard");
-        SocialShare.sharePage(manifest.origin, null, target);
-      });
-    });
-  },
-  testSharePanelActivation(next) {
-    let testTab;
-    // cleared in the cleanup function
-    Services.prefs.setCharPref("social.directories", "https://example.com");
-    Services.prefs.setBoolPref("social.share.activationPanelEnabled", true);
-    // make the iframe so we can wait on the load
-    SocialShare._createFrame();
-    let iframe = SocialShare.iframe;
-
-    // initialize the button into the navbar
-    CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-    // ensure correct state
-    SocialUI.onCustomizeEnd(window);
-
-    ensureFrameLoaded(iframe).then(() => {
-      let subframe = iframe.contentDocument.getElementById("activation-frame");
-      ensureFrameLoaded(subframe, activationPage).then(() => {
-        is(subframe.contentDocument.location.href, activationPage, "activation page loaded");
-        promiseObserverNotified("social:provider-enabled").then(() => {
-          let mm = window.getGroupMessageManager("social");
-          mm.addMessageListener("sharedata", function handler(msg) {
-            ok(true, "share completed");
-
-            BrowserTestUtils.waitForCondition(() => { return SocialShare.currentShare == null; },
-                                              "share panel closed").then(() => {
-              BrowserTestUtils.removeTab(testTab).then(() => {
-                mm.removeMessageListener("sharedata", handler);
-                SocialService.uninstallProvider(manifest.origin, next);
-              });
-            });
-            SocialShare.iframe.messageManager.sendAsyncMessage("closeself", {});
-          });
-        });
-        sendActivationEvent(subframe);
-      });
-    });
-    BrowserTestUtils.openNewForegroundTab(gBrowser, activationPage).then(tab => {
-      let shareButton = SocialShare.shareButton;
-      // verify the attribute for proper css
-      ok(!shareButton.hasAttribute("disabled"), "share button is enabled");
-      // button should be visible
-      is(shareButton.hidden, false, "share button is visible");
-
-      testTab = tab;
-      SocialShare.sharePage();
-    });
-  },
-  testSharePanelDialog(next) {
-    let testTab;
-    // initialize the button into the navbar
-    CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-    // ensure correct state
-    SocialUI.onCustomizeEnd(window);
-    SocialShare._createFrame();
-
-    SocialService.addProvider(manifest, () => {
-      BrowserTestUtils.openNewForegroundTab(gBrowser, activationPage).then(tab => {
-        ensureFrameLoaded(SocialShare.iframe).then(() => {
-          // send keys to the input field.  An unexpected failure will happen
-          // if the onbeforeunload handler is fired.
-          EventUtils.sendKey("f");
-          EventUtils.sendKey("a");
-          EventUtils.sendKey("i");
-          EventUtils.sendKey("l");
-
-          SocialShare.panel.addEventListener("popuphidden", function(evt) {
-            let topwin = Services.wm.getMostRecentWindow(null);
-            is(topwin, window, "no dialog is open");
-
-            BrowserTestUtils.removeTab(testTab).then(() => {
-              SocialService.disableProvider(manifest.origin, next);
-            });
-          }, {once: true});
-          SocialShare.iframe.messageManager.sendAsyncMessage("closeself", {});
-        });
-
-        let shareButton = SocialShare.shareButton;
-        // verify the attribute for proper css
-        ok(!shareButton.hasAttribute("disabled"), "share button is enabled");
-        // button should be visible
-        is(shareButton.hidden, false, "share button is visible");
-
-        testTab = tab;
-        SocialShare.sharePage();
-      });
-    });
-  }
-}
deleted file mode 100644
--- a/browser/base/content/test/social/browser_social_activation.js
+++ /dev/null
@@ -1,274 +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 SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-
-var tabsToRemove = [];
-
-function removeProvider(provider) {
-  return new Promise(resolve => {
-    // a full install sets the manifest into a pref, addProvider alone doesn't,
-    // make sure we uninstall if the manifest was added.
-    if (provider.manifest) {
-      SocialService.uninstallProvider(provider.origin, resolve);
-    } else {
-      SocialService.disableProvider(provider.origin, resolve);
-    }
-  });
-}
-
-function postTestCleanup(callback) {
-  (async function() {
-    // any tabs opened by the test.
-    for (let tab of tabsToRemove) {
-      await BrowserTestUtils.removeTab(tab);
-    }
-    tabsToRemove = [];
-    // all the providers may have been added.
-    while (Social.providers.length > 0) {
-      await removeProvider(Social.providers[0]);
-    }
-  })().then(callback);
-}
-
-function newTab(url) {
-  return new Promise(resolve => {
-    BrowserTestUtils.openNewForegroundTab(gBrowser, url).then(tab => {
-      tabsToRemove.push(tab);
-      resolve(tab);
-    });
-  });
-}
-
-function sendActivationEvent(tab, callback, nullManifest) {
-  // hack Social.lastEventReceived so we don't hit the "too many events" check.
-  Social.lastEventReceived = 0;
-  BrowserTestUtils.synthesizeMouseAtCenter("#activation", {}, tab.linkedBrowser);
-  executeSoon(callback);
-}
-
-function activateProvider(domain, callback, nullManifest) {
-  let activationURL = domain + "/browser/browser/base/content/test/social/social_activate_basic.html"
-  newTab(activationURL).then(tab => {
-    sendActivationEvent(tab, callback, nullManifest);
-  });
-}
-
-function activateIFrameProvider(domain, callback) {
-  let activationURL = domain + "/browser/browser/base/content/test/social/social_activate_iframe.html"
-  newTab(activationURL).then(tab => {
-    sendActivationEvent(tab, callback, false);
-  });
-}
-
-function waitForProviderLoad(origin) {
-  return Promise.all([
-    ensureFrameLoaded(gBrowser, origin + "/browser/browser/base/content/test/social/social_postActivation.html"),
-  ]);
-}
-
-function getAddonItemInList(aId, aList) {
-  var item = aList.firstChild;
-  while (item) {
-    if ("mAddon" in item && item.mAddon.id == aId) {
-      aList.ensureElementIsVisible(item);
-      return item;
-    }
-    item = item.nextSibling;
-  }
-  return null;
-}
-
-function clickAddonRemoveButton(tab, aCallback) {
-  AddonManager.getAddonsByTypes(["service"], function(aAddons) {
-    let addon = aAddons[0];
-
-    let doc = tab.linkedBrowser.contentDocument;
-    let list = doc.getElementById("addon-list");
-
-    let item = getAddonItemInList(addon.id, list);
-    let button = item._removeBtn;
-    isnot(button, null, "Should have a remove button");
-    ok(!button.disabled, "Button should not be disabled");
-
-    // uninstall happens after about:addons tab is closed, so we wait on
-    // disabled
-    promiseObserverNotified("social:provider-disabled").then(() => {
-      is(item.getAttribute("pending"), "uninstall", "Add-on should be uninstalling");
-      executeSoon(function() { aCallback(addon); });
-    });
-
-    BrowserTestUtils.synthesizeMouseAtCenter(button, {}, tab.linkedBrowser);
-  });
-}
-
-function activateOneProvider(manifest, finishActivation, aCallback) {
-  (async function() {
-    info("activating provider " + manifest.name);
-
-    // Wait for the helper callback and the popup shown event in any order.
-    let popupShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
-                                                   "popupshown");
-    await new Promise(resolve => activateProvider(manifest.origin, resolve));
-    await popupShown;
-
-    info("servicesInstall-notification panel opened");
-
-    // Start waiting for the activation event before the click on the button.
-    let providerLoaded = finishActivation ?
-                         waitForProviderLoad(manifest.origin) : null;
-    let popupHidden = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
-                                                    "popuphidden");
-
-    // We need to wait for PopupNotifications.jsm to place the element.
-    let notification;
-    await BrowserTestUtils.waitForCondition(
-          () => (notification = PopupNotifications.panel.childNodes[0]));
-    is(notification.id, "servicesInstall-notification");
-
-    if (finishActivation) {
-      notification.button.click();
-    } else {
-      notification.closebutton.click();
-    }
-
-    await providerLoaded;
-    await popupHidden;
-
-    info("servicesInstall-notification panel hidden");
-
-    if (finishActivation) {
-      checkSocialUI();
-    }
-  })().then(() => executeSoon(aCallback)).catch(ex => ok(false, ex));
-}
-
-var gTestDomains = ["https://example.com", "https://test1.example.com", "https://test2.example.com"];
-var gProviders = [
-  {
-    name: "provider 1",
-    origin: "https://example.com",
-    shareURL: "https://example.com/browser/browser/base/content/test/social/social_share.html?provider1",
-    iconURL: "chrome://branding/content/icon48.png"
-  },
-  {
-    name: "provider 2",
-    origin: "https://test1.example.com",
-    shareURL: "https://test1.example.com/browser/browser/base/content/test/social/social_share.html?provider2",
-    iconURL: "chrome://branding/content/icon64.png"
-  },
-  {
-    name: "provider 3",
-    origin: "https://test2.example.com",
-    shareURL: "https://test2.example.com/browser/browser/base/content/test/social/social_share.html?provider2",
-    iconURL: "chrome://branding/content/about-logo.png"
-  }
-];
-
-
-function test() {
-  PopupNotifications.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function() {
-    PopupNotifications.panel.removeAttribute("animate");
-  });
-  waitForExplicitFinish();
-  SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 1]]}, () => {
-    runSocialTests(tests, undefined, postTestCleanup);
-  });
-}
-
-var tests = {
-  testActivationWrongOrigin(next) {
-    // At this stage none of our providers exist, so we expect failure.
-    Services.prefs.setBoolPref("social.remote-install.enabled", false);
-    activateProvider(gTestDomains[0], function() {
-      is(SocialUI.enabled, false, "SocialUI is not enabled");
-      let panel = document.getElementById("servicesInstall-notification");
-      ok(panel.hidden, "activation panel still hidden");
-      checkSocialUI();
-      Services.prefs.clearUserPref("social.remote-install.enabled");
-      next();
-    });
-  },
-
-  testIFrameActivation(next) {
-    activateIFrameProvider(gTestDomains[0], function() {
-      is(SocialUI.enabled, false, "SocialUI is not enabled");
-      let panel = document.getElementById("servicesInstall-notification");
-      ok(panel.hidden, "activation panel still hidden");
-      checkSocialUI();
-      next();
-    });
-  },
-
-  testActivationFirstProvider(next) {
-    // first up we add a manifest entry for a single provider.
-    activateOneProvider(gProviders[0], false, function() {
-      // we deactivated leaving no providers left, so Social is disabled.
-      checkSocialUI();
-      next();
-    });
-  },
-
-  testActivationMultipleProvider(next) {
-    // The trick with this test is to make sure that Social.providers[1] is
-    // the current provider when doing the undo - this makes sure that the
-    // Social code doesn't fallback to Social.providers[0], which it will
-    // do in some cases (but those cases do not include what this test does)
-    // first enable the 2 providers
-    SocialService.addProvider(gProviders[0], function() {
-      SocialService.addProvider(gProviders[1], function() {
-        checkSocialUI();
-        // activate the last provider.
-        activateOneProvider(gProviders[2], false, function() {
-          // we deactivated - the first provider should be enabled.
-          checkSocialUI();
-          next();
-        });
-      });
-    });
-  },
-
-  testAddonManagerDoubleInstall(next) {
-    // Create a new tab and load about:addons
-    let addonsTab = BrowserTestUtils.addTab(gBrowser);
-    gBrowser.selectedTab = addonsTab;
-    BrowserOpenAddonsMgr("addons://list/service");
-    gBrowser.selectedBrowser.addEventListener("load", function() {
-      is(addonsTab.linkedBrowser.currentURI.spec, "about:addons", "about:addons should load into blank tab.");
-
-      activateOneProvider(gProviders[0], true, function() {
-        info("first activation completed");
-        is(gBrowser.contentDocument.location.href, gProviders[0].origin + "/browser/browser/base/content/test/social/social_postActivation.html", "postActivationURL loaded");
-        BrowserTestUtils.removeTab(gBrowser.selectedTab).then(() => {
-          is(gBrowser.contentDocument.location.href, gProviders[0].origin + "/browser/browser/base/content/test/social/social_activate_basic.html", "activation page selected");
-          BrowserTestUtils.removeTab(gBrowser.selectedTab).then(() => {
-            tabsToRemove.pop();
-            // uninstall the provider
-            clickAddonRemoveButton(addonsTab, function(addon) {
-              checkSocialUI();
-              activateOneProvider(gProviders[0], true, function() {
-                info("second activation completed");
-                is(gBrowser.contentDocument.location.href, gProviders[0].origin + "/browser/browser/base/content/test/social/social_postActivation.html", "postActivationURL loaded");
-                BrowserTestUtils.removeTab(gBrowser.selectedTab).then(() => {
-
-                  // after closing the addons tab, verify provider is still installed
-                  AddonManager.getAddonsByTypes(["service"], function(aAddons) {
-                    is(aAddons.length, 1, "there can be only one");
-
-                    let doc = addonsTab.linkedBrowser.contentDocument;
-                    let list = doc.getElementById("addon-list");
-                    is(list.childNodes.length, 1, "only one addon is displayed");
-
-                    BrowserTestUtils.removeTab(addonsTab).then(next);
-                  });
-                });
-              });
-            });
-          });
-        });
-      });
-    }, {capture: true, once: true});
-  }
-}
deleted file mode 100644
--- a/browser/base/content/test/social/head.js
+++ /dev/null
@@ -1,263 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
-  "resource://gre/modules/PlacesUtils.jsm");
-
-
-function promiseObserverNotified(aTopic) {
-  return new Promise(resolve => {
-    Services.obs.addObserver(function onNotification(subject, topic, data) {
-      dump("notification promised " + topic);
-      Services.obs.removeObserver(onNotification, topic);
-      TestUtils.executeSoon(() => resolve({subject, data}));
-    }, aTopic);
-  });
-}
-
-// Check that a specified (string) URL hasn't been "remembered" (ie, is not
-// in history, will not appear in about:newtab or auto-complete, etc.)
-function promiseSocialUrlNotRemembered(url) {
-  return new Promise(resolve => {
-    let uri = Services.io.newURI(url);
-    PlacesUtils.asyncHistory.isURIVisited(uri, function(aURI, aIsVisited) {
-      ok(!aIsVisited, "social URL " + url + " should not be in global history");
-      resolve();
-    });
-  });
-}
-
-var gURLsNotRemembered = [];
-
-
-function checkProviderPrefsEmpty(isError) {
-  let MANIFEST_PREFS = Services.prefs.getBranch("social.manifest.");
-  let prefs = MANIFEST_PREFS.getChildList("", []);
-  let c = 0;
-  for (let pref of prefs) {
-    if (MANIFEST_PREFS.prefHasUserValue(pref)) {
-      info("provider [" + pref + "] manifest left installed from previous test");
-      c++;
-    }
-  }
-  is(c, 0, "all provider prefs uninstalled from previous test");
-  is(Social.providers.length, 0, "all providers uninstalled from previous test " + Social.providers.length);
-}
-
-function defaultFinishChecks() {
-  checkProviderPrefsEmpty(true);
-  finish();
-}
-
-function runSocialTestWithProvider(manifest, callback, finishcallback) {
-
-  let SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-
-  let manifests = Array.isArray(manifest) ? manifest : [manifest];
-
-  // Check that none of the provider's content ends up in history.
-  async function finishCleanUp() {
-    for (let i = 0; i < manifests.length; i++) {
-      let m = manifests[i];
-      for (let what of ["iconURL", "shareURL"]) {
-        if (m[what]) {
-          await promiseSocialUrlNotRemembered(m[what]);
-        }
-      }
-    }
-    for (let i = 0; i < gURLsNotRemembered.length; i++) {
-      await promiseSocialUrlNotRemembered(gURLsNotRemembered[i]);
-    }
-    gURLsNotRemembered = [];
-  }
-
-  info("runSocialTestWithProvider: " + manifests.toSource());
-
-  let finishCount = 0;
-  function finishIfDone(callFinish) {
-    finishCount++;
-    if (finishCount == manifests.length)
-      finishCleanUp().then(finishcallback || defaultFinishChecks);
-  }
-  function removeAddedProviders(cleanup) {
-    manifests.forEach(function(m) {
-      // If we're "cleaning up", don't call finish when done.
-      let finishCb = cleanup ? function() {} : finishIfDone;
-      // Similarly, if we're cleaning up, catch exceptions from removeProvider
-      let removeProvider = SocialService.disableProvider.bind(SocialService);
-      if (cleanup) {
-        removeProvider = function(origin, cb) {
-          try {
-            SocialService.disableProvider(origin, cb);
-          } catch (ex) {
-            // Ignore "provider doesn't exist" errors.
-            if (ex.message.indexOf("SocialService.disableProvider: no provider with origin") == 0)
-              return;
-            info("Failed to clean up provider " + origin + ": " + ex);
-          }
-        }
-      }
-      removeProvider(m.origin, finishCb);
-    });
-  }
-  function finishSocialTest(cleanup) {
-    removeAddedProviders(cleanup);
-  }
-
-  let providersAdded = 0;
-
-  manifests.forEach(function(m) {
-    SocialService.addProvider(m, function(provider) {
-
-      providersAdded++;
-      info("runSocialTestWithProvider: provider added");
-
-      // If we've added all the providers we need, call the callback to start
-      // the tests (and give it a callback it can call to finish them)
-      if (providersAdded == manifests.length) {
-        registerCleanupFunction(function() {
-          finishSocialTest(true);
-        });
-        BrowserTestUtils.waitForCondition(() => provider.enabled,
-                                          "providers added and enabled").then(() => {
-          info("provider has been enabled");
-          callback(finishSocialTest);
-        });
-      }
-    });
-  });
-}
-
-function runSocialTests(tests, cbPreTest, cbPostTest, cbFinish) {
-  let testIter = (function*() {
-    for (let name in tests) {
-      if (tests.hasOwnProperty(name)) {
-        yield [name, tests[name]];
-      }
-    }
-  })();
-  let providersAtStart = Social.providers.length;
-  info("runSocialTests: start test run with " + providersAtStart + " providers");
-  window.focus();
-
-
-  if (cbPreTest === undefined) {
-    cbPreTest = function(cb) { cb() };
-  }
-  if (cbPostTest === undefined) {
-    cbPostTest = function(cb) { cb() };
-  }
-
-  function runNextTest() {
-    let result = testIter.next();
-    if (result.done) {
-      // out of items:
-      (cbFinish || defaultFinishChecks)();
-      is(providersAtStart, Social.providers.length,
-         "runSocialTests: finish test run with " + Social.providers.length + " providers");
-      return;
-    }
-    let [name, func] = result.value;
-    // We run on a timeout to help keep the debug messages sane.
-    executeSoon(function() {
-      function cleanupAndRunNextTest() {
-        info("sub-test " + name + " complete");
-        cbPostTest(runNextTest);
-      }
-      cbPreTest(function() {
-        info("pre-test: starting with " + Social.providers.length + " providers");
-        info("sub-test " + name + " starting");
-        try {
-          func.call(tests, cleanupAndRunNextTest);
-        } catch (ex) {
-          ok(false, "sub-test " + name + " failed: " + ex.toString() + "\n" + ex.stack);
-          cleanupAndRunNextTest();
-        }
-      })
-    });
-  }
-  runNextTest();
-}
-
-// A fairly large hammer which checks all aspects of the SocialUI for
-// internal consistency.
-function checkSocialUI(win) {
-  let SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-  // if we have enabled providers, we should also have instances of those
-  // providers
-  if (SocialService.hasEnabledProviders) {
-    ok(Social.providers.length > 0, "providers are enabled");
-  } else {
-    is(Social.providers.length, 0, "providers are not enabled");
-  }
-}
-
-function setManifestPref(name, manifest) {
-  Services.prefs.setStringPref(name, JSON.stringify(manifest));
-}
-
-function getManifestPrefname(aManifest) {
-  // is same as the generated name in SocialServiceInternal.getManifestPrefname
-  let originUri = Services.io.newURI(aManifest.origin);
-  return "social.manifest." + originUri.hostPort.replace(".", "-");
-}
-
-function ensureFrameLoaded(frame, uri) {
-  return new Promise(resolve => {
-    if (frame.contentDocument && frame.contentDocument.readyState == "complete" &&
-        (!uri || frame.contentDocument.location.href == uri)) {
-      resolve();
-    } else {
-      frame.addEventListener("load", function handler() {
-        if (uri && frame.contentDocument.location.href != uri)
-          return;
-        frame.removeEventListener("load", handler, true);
-        resolve()
-      }, true);
-    }
-  });
-}
-
-// Support for going on and offline.
-// (via browser/base/content/test/browser_bookmark_titles.js)
-var origProxyType = Services.prefs.getIntPref("network.proxy.type");
-
-function toggleOfflineStatus(goOfflineState) {
-  // Bug 968887 fix.  when going on/offline, wait for notification before continuing
-  return new Promise(resolve => {
-    if (!goOfflineState) {
-      Services.prefs.setIntPref("network.proxy.type", origProxyType);
-    }
-    if (goOfflineState != Services.io.offline) {
-      info("initial offline state " + Services.io.offline);
-      let expect = !Services.io.offline;
-      Services.obs.addObserver(function offlineChange(subject, topic, data) {
-        Services.obs.removeObserver(offlineChange, "network:offline-status-changed");
-        info("offline state changed to " + Services.io.offline);
-        is(expect, Services.io.offline, "network:offline-status-changed successful toggle");
-        resolve();
-      }, "network:offline-status-changed");
-      BrowserOffline.toggleOfflineStatus();
-    } else {
-      resolve();
-    }
-    if (goOfflineState) {
-      Services.prefs.setIntPref("network.proxy.type", 0);
-      // LOAD_FLAGS_BYPASS_CACHE isn't good enough. So clear the cache.
-      Services.cache2.clear();
-    }
-  });
-}
-
-function goOffline() {
-  // Simulate a network outage with offline mode. (Localhost is still
-  // accessible in offline mode, so disable the test proxy as well.)
-  return toggleOfflineStatus(true);
-}
-
-function goOnline(callback) {
-  return toggleOfflineStatus(false);
-}
deleted file mode 100644
--- a/browser/base/content/test/social/microformats.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <body>
-    <head><title>Raspberry Pi Page</title></head>
-    <div class="hproduct">
-      <h2 class="fn">Raspberry Pi</h2>
-      <img class="photo" src="https://example.com/someimage.jpg" />
-      <p class="description">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It's a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>
-      <a class="url" href="https://example.com/">More info about the Raspberry Pi</a>
-      <p class="price">29.95</p>
-      <p class="review hreview"><span id="test-review" class="rating">4.5</span> out of 5</p>
-      <p>Categories:
-        <a rel="tag" href="https://example.com/wiki/computer" class="category">Computer</a>,
-        <a rel="tag" href="https://example.com/wiki/education" class="category">Education</a>
-      </p>
-    </div>
-  </body>
-</html>
deleted file mode 100644
index 769c636340e11f9d2a0b7eb6a84d574dd9563f0c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/browser/base/content/test/social/opengraph/og_invalid_url.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html xmlns:og="http://ogp.me/ns#">
-<head>
-  <meta property="og:url" content="chrome://browser/content/aboutDialog.xul"/>
-  <meta property="og:site_name" content="Evil chrome delivering website"/>
-  <meta property="og:description"
-        content="A test corpus file for open graph tags passing a bad url"/>
-</head>
-<body>
-    Open Graph Test Page
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/opengraph/opengraph.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html xmlns:og="http://ogp.me/ns#">
-<head>
-  <meta property="og:title" content="&gt;This is my title&lt;"/>
-  <meta property="og:url" content="https://www.mozilla.org"/>
-  <meta property="og:image" content="https://www.mozilla.org/favicon.png"/>
-  <meta property="og:site_name" content="&#62;My simple test page&#60;"/>
-  <meta property="og:description"
-        content="A test corpus file for open graph tags we care about"/>
-</head>
-<body>
-    Open Graph Test Page
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/opengraph/shortlink_linkrel.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-    <link rel="image_src" href="http://example.com/1234/56789.jpg" id="image-src" />
-    <link id="canonicalurl" rel="canonical" href="http://www.example.com/photos/56789/" />
-    <link rel="shortlink" href="http://imshort/p/abcde" />
-</head>
-<body>
-    link[rel='shortlink']
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/opengraph/shorturl_link.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-    <link rel="image_src" href="http://example.com/1234/56789.jpg" id="image-src" />
-    <link id="canonicalurl" rel="canonical" href="http://www.example.com/photos/56789/" />
-    <link id="shorturl" rev="canonical" type="text/html" href="http://imshort/p/abcde" />
-</head>
-<body>
-    link id="shorturl"
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/opengraph/shorturl_linkrel.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<html>
-<head>
-	<title>Test Image</title>
-
-        <meta name="description" content="Iron  man in a tutu" />
-	<meta name="title" content="Test Image" />
-
-	<meta name="medium" content="image" />
-	<link rel="image_src" href="http://example.com/1234/56789.jpg" id="image-src" />
-	<link id="canonicalurl" rel="canonical" href="http://www.example.com/photos/56789/" />
-	<link id="shorturl" href="http://imshort/p/abcde" />
-
-        <meta property="og:title" content="TestImage" />
-        <meta property="og:type" content="photos:photo" />
-        <meta property="og:url" content="http://www.example.com/photos/56789/" />
-        <meta property="og:site_name" content="My Photo Site" />
-        <meta property="og:description" content="Iron man in a tutu" />
-        <meta property="og:image" content="http://example.com/1234/56789.jpg" />
-        <meta property="og:image:width" content="480" />
-        <meta property="og:image:height" content="640" />
-</head>
-<body>
-    link[rel='shorturl']
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/share.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-  <head>
-    <meta charset="utf-8">
-  </head>
-  <body onload="document.getElementById('testclose').focus()">
-    <p>This is a test social share window.</p>
-    <input id="testclose"/>
-  </body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/share_activate.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<html>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<head>
-  <title>Activation test</title>
-</head>
-<script>
-
-var data = {
-  // currently required
-  "name": "Demo Social Service",
-  // browser_share.js serves this page from "https://example.com"
-  "origin": "https://example.com",
-  "iconURL": "chrome://branding/content/icon16.png",
-  "icon32URL": "chrome://branding/content/favicon32.png",
-  "icon64URL": "chrome://branding/content/icon64.png",
-  "shareURL": "/browser/browser/base/content/test/social/share.html"
-}
-
-function activate(node) {
-  node.setAttribute("data-service", JSON.stringify(data));
-  var event = new CustomEvent("ActivateSocialFeature");
-  node.dispatchEvent(event);
-}
-
-</script>
-<body>
-
-nothing to see here
-
-<button id="activation" onclick="activate(this, true)">Activate the share provider</button>
-
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/social_activate.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<html>
-<head>
-    <meta charset="utf-8">
-    <title>Activation test</title>
-</head>
-<script>
-// icons from http://findicons.com/icon/158311/firefox?id=356182 by ipapun
-var data = {
-  // currently required
-  "name": "Demo Social Service",
-  "iconURL": "chrome://branding/content/icon16.png",
-  "icon32URL": "chrome://branding/content/favicon32.png",
-  "icon64URL": "chrome://branding/content/icon64.png",
-
-  // at least one of these must be defined
-  "shareURL": "/browser/browser/base/content/test/social/social_share.html",
-  "postActivationURL": "/browser/browser/base/content/test/social/social_postActivation.html",
-
-  // should be available for display purposes
-  "description": "A short paragraph about this provider",
-  "author": "Shane Caraveo, Mozilla",
-
-  // optional
-  "version": "1.0"
-}
-
-function activate(node) {
-  node.setAttribute("data-service", JSON.stringify(data));
-  var event = new CustomEvent("ActivateSocialFeature");
-  node.dispatchEvent(event);
-}
-
-</script>
-<body>
-
-nothing to see here
-
-<button id="activation" onclick="activate(this)">Activate The Demo Provider</button>
-
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/social_activate_basic.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<html>
-<head>
-    <meta charset="utf-8">
-    <title>Activation test</title>
-</head>
-<script>
-// icons from http://findicons.com/icon/158311/firefox?id=356182 by ipapun
-var data = {
-  // currently required
-  "name": "Demo Social Service",
-  "iconURL": "chrome://branding/content/icon16.png",
-  "icon32URL": "chrome://branding/content/favicon32.png",
-  "icon64URL": "chrome://branding/content/icon64.png",
-
-  // at least one of these must be defined
-  "shareURL": "/browser/browser/base/content/test/social/social_share.html",
-  "postActivationURL": "/browser/browser/base/content/test/social/social_postActivation.html",
-
-  // should be available for display purposes
-  "description": "A short paragraph about this provider",
-  "author": "Shane Caraveo, Mozilla",
-
-  // optional
-  "version": "1.0"
-}
-
-function activate(node) {
-  node.setAttribute("data-service", JSON.stringify(data));
-  var event = new CustomEvent("ActivateSocialFeature");
-  node.dispatchEvent(event);
-}
-
-</script>
-<body>
-
-nothing to see here
-
-<button id="activation" onclick="activate(this)">Activate The Demo Provider</button>
-
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/social_activate_iframe.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-	<title>Activation iframe test</title>
-</head>
-
-<body>
-
-<iframe src="social_activate_basic.html"/>
-
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/social/social_postActivation.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>
-<head>
-    <meta charset="utf-8">
-    <title>Post-Activation test</title>
-</head>
-
-<body>
-
-Post Activation landing page
-
-</body>
-</html>
--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -159,18 +159,16 @@ var whitelist = [
   {file: "chrome://mozapps/skin/plugins/pluginBlocked.png"},
   // Bug 1348558
   {file: "chrome://mozapps/skin/update/downloadButtons.png",
    platforms: ["linux"]},
   // Bug 1348559
   {file: "chrome://pippki/content/resetpassword.xul"},
   // Bug 1351078
   {file: "resource://gre/modules/Battery.jsm"},
-  // Bug 1351070
-  {file: "resource://gre/modules/ContentPrefInstance.jsm"},
   // Bug 1351079
   {file: "resource://gre/modules/ISO8601DateUtils.jsm"},
   // Bug 1337345
   {file: "resource://gre/modules/Manifest.jsm"},
   // Bug 1351097
   {file: "resource://gre/modules/accessibility/AccessFu.jsm"},
   // Bug 1351637
   {file: "resource://gre/modules/sdk/bootstrap.js"},
--- a/browser/base/content/theme-vars.inc.css
+++ b/browser/base/content/theme-vars.inc.css
@@ -101,20 +101,16 @@
 :root[lwthemeicons~="--open_file-icon"] #open-file-button:-moz-lwtheme {
   list-style-image: var(--open_file-icon) !important;
 }
 
 :root[lwthemeicons~="--sidebars-icon"] #sidebar-button:-moz-lwtheme {
   list-style-image: var(--sidebars-icon) !important;
 }
 
-:root[lwthemeicons~="--share_page-icon"] #social-share-button:-moz-lwtheme {
-  list-style-image: var(--share_page-icon) !important;
-}
-
 :root[lwthemeicons~="--subscribe-icon"] #feed-button:-moz-lwtheme {
   list-style-image: var(--subscribe-icon) !important;
 }
 
 :root[lwthemeicons~="--text_encoding-icon"] #characterencoding-button:-moz-lwtheme {
   list-style-image: var(--text_encoding-icon) !important;
 }
 
@@ -152,16 +148,15 @@
 :root[lwthemeicons~="--full_screen-icon"] #fullscreen-button:-moz-lwtheme,
 :root[lwthemeicons~="--find-icon"] #find-button:-moz-lwtheme,
 :root[lwthemeicons~="--options-icon"] #preferences-button:-moz-lwtheme,
 :root[lwthemeicons~="--addons-icon"] #add-ons-button:-moz-lwtheme,
 :root[lwthemeicons~="--developer-icon"] #developer-button:-moz-lwtheme,
 :root[lwthemeicons~="--synced_tabs-icon"] #sync-button:-moz-lwtheme,
 :root[lwthemeicons~="--open_file-icon"] #open-file-button:-moz-lwtheme,
 :root[lwthemeicons~="--sidebars-icon"] #sidebar-button:-moz-lwtheme,
-:root[lwthemeicons~="--share_page-icon"] #social-share-button:-moz-lwtheme,
 :root[lwthemeicons~="--subscribe-icon"] #feed-button:-moz-lwtheme,
 :root[lwthemeicons~="--text_encoding-icon"] #characterencoding-button:-moz-lwtheme,
 :root[lwthemeicons~="--email_link-icon"] #email-link-button:-moz-lwtheme,
 :root[lwthemeicons~="--forget-icon"] #panic-button:-moz-lwtheme,
 :root[lwthemeicons~="--pocket-icon"] #pocket-button:-moz-lwtheme {
   -moz-image-region: rect(0, 16px, 16px, 0) !important;
 }
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -50,18 +50,16 @@ browser.jar:
         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/aboutRobots-icon.png          (content/aboutRobots-icon.png)
         content/browser/aboutRobots-widget-left.png   (content/aboutRobots-widget-left.png)
-        content/browser/aboutSocialError.xhtml        (content/aboutSocialError.xhtml)
-        content/browser/aboutProviderDirectory.xhtml  (content/aboutProviderDirectory.xhtml)
         content/browser/aboutTabCrashed.css           (content/aboutTabCrashed.css)
         content/browser/aboutTabCrashed.js            (content/aboutTabCrashed.js)
         content/browser/aboutTabCrashed.xhtml         (content/aboutTabCrashed.xhtml)
 *       content/browser/browser.css                   (content/browser.css)
         content/browser/browser.js                    (content/browser.js)
 *       content/browser/browser.xul                   (content/browser.xul)
         content/browser/browser-addons.js             (content/browser-addons.js)
         content/browser/browser-captivePortal.js      (content/browser-captivePortal.js)
@@ -77,29 +75,27 @@ browser.jar:
         content/browser/browser-fullZoom.js           (content/browser-fullZoom.js)
         content/browser/browser-gestureSupport.js     (content/browser-gestureSupport.js)
         content/browser/browser-media.js              (content/browser-media.js)
         content/browser/browser-pageActions.js        (content/browser-pageActions.js)
         content/browser/browser-places.js             (content/browser-places.js)
         content/browser/browser-plugins.js            (content/browser-plugins.js)
         content/browser/browser-safebrowsing.js       (content/browser-safebrowsing.js)
         content/browser/browser-sidebar.js            (content/browser-sidebar.js)
-        content/browser/browser-social.js             (content/browser-social.js)
         content/browser/browser-sync.js               (content/browser-sync.js)
 *       content/browser/browser-tabPreviews.xml       (content/browser-tabPreviews.xml)
 #ifdef CAN_DRAW_IN_TITLEBAR
         content/browser/browser-tabsintitlebar.js       (content/browser-tabsintitlebar.js)
 #else
         content/browser/browser-tabsintitlebar.js       (content/browser-tabsintitlebar-stub.js)
 #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/content.js                    (content/content.js)
-        content/browser/social-content.js             (content/social-content.js)
         content/browser/default-theme-icon.svg        (content/default-theme-icon.svg)
         content/browser/defaultthemes/1.header.jpg    (content/defaultthemes/1.header.jpg)
         content/browser/defaultthemes/1.icon.jpg      (content/defaultthemes/1.icon.jpg)
         content/browser/defaultthemes/1.preview.jpg   (content/defaultthemes/1.preview.jpg)
         content/browser/defaultthemes/2.header.jpg    (content/defaultthemes/2.header.jpg)
         content/browser/defaultthemes/2.icon.jpg      (content/defaultthemes/2.icon.jpg)
         content/browser/defaultthemes/2.preview.jpg   (content/defaultthemes/2.preview.jpg)
         content/browser/defaultthemes/3.header.png    (content/defaultthemes/3.header.png)
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -26,17 +26,16 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/performance/browser.ini',
     'content/test/permissions/browser.ini',
     'content/test/plugins/browser.ini',
     'content/test/popupNotifications/browser.ini',
     'content/test/popups/browser.ini',
     'content/test/referrer/browser.ini',
     'content/test/sidebar/browser.ini',
     'content/test/siteIdentity/browser.ini',
-    'content/test/social/browser.ini',
     'content/test/static/browser.ini',
     'content/test/sync/browser.ini',
     'content/test/tabcrashed/browser.ini',
     'content/test/tabPrompts/browser.ini',
     'content/test/tabs/browser.ini',
     'content/test/touch/browser.ini',
     'content/test/urlbar/browser.ini',
     'content/test/webextensions/browser.ini',
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -44,22 +44,16 @@ static const RedirEntry kRedirMap[] = {
     nsIAboutModule::URI_CAN_LOAD_IN_CHILD |
     nsIAboutModule::ALLOW_SCRIPT |
     nsIAboutModule::HIDE_FROM_ABOUTABOUT },
   { "certerror", "chrome://browser/content/aboutNetError.xhtml",
     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
     nsIAboutModule::URI_CAN_LOAD_IN_CHILD |
     nsIAboutModule::ALLOW_SCRIPT |
     nsIAboutModule::HIDE_FROM_ABOUTABOUT },
-  { "socialerror", "chrome://browser/content/aboutSocialError.xhtml",
-    nsIAboutModule::ALLOW_SCRIPT |
-    nsIAboutModule::HIDE_FROM_ABOUTABOUT },
-  { "providerdirectory", "chrome://browser/content/aboutProviderDirectory.xhtml",
-    nsIAboutModule::ALLOW_SCRIPT |
-    nsIAboutModule::HIDE_FROM_ABOUTABOUT },
   { "tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml",
     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
     nsIAboutModule::ALLOW_SCRIPT |
     nsIAboutModule::HIDE_FROM_ABOUTABOUT },
   { "feeds", "chrome://browser/content/feeds/subscribe.xhtml",
     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
     nsIAboutModule::ALLOW_SCRIPT |
     nsIAboutModule::HIDE_FROM_ABOUTABOUT },
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -88,18 +88,16 @@ static const mozilla::Module::ContractID
     { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
 #elif defined(MOZ_WIDGET_GTK)
     { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
 #endif
     { NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID },
     { NS_SESSIONSTOREUTILS_CONTRACTID, &kNS_SESSIONSTOREUTILS_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
-    { NS_ABOUT_MODULE_CONTRACTID_PREFIX "socialerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
-    { NS_ABOUT_MODULE_CONTRACTID_PREFIX "providerdirectory", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "tabcrashed", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { 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 },
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -560,57 +560,16 @@ const CustomizableWidgets = [
       let obPosition = doc.createElementNS(kNSXUL, "observes");
       obPosition.setAttribute("element", "sidebar-box");
       obPosition.setAttribute("attribute", "positionend");
 
       aNode.appendChild(obChecked);
       aNode.appendChild(obPosition);
     }
   }, {
-    id: "social-share-button",
-    // custom build our button so we can attach to the share command
-    type: "custom",
-    onBuild(aDocument) {
-      let node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
-      node.setAttribute("id", this.id);
-      node.classList.add("toolbarbutton-1");
-      node.classList.add("chromeclass-toolbar-additional");
-      node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
-      node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
-      node.setAttribute("removable", "true");
-      node.setAttribute("observes", "Social:PageShareable");
-      node.setAttribute("command", "Social:SharePage");
-
-      let listener = {
-        onWidgetAdded: (aWidgetId) => {
-          if (aWidgetId != this.id)
-            return;
-
-          Services.obs.notifyObservers(null, "social:" + this.id + "-added");
-        },
-
-        onWidgetRemoved: aWidgetId => {
-          if (aWidgetId != this.id)
-            return;
-
-          Services.obs.notifyObservers(null, "social:" + this.id + "-removed");
-        },
-
-        onWidgetInstanceRemoved: (aWidgetId, aDoc) => {
-          if (aWidgetId != this.id || aDoc != aDocument)
-            return;
-
-          CustomizableUI.removeListener(listener);
-        }
-      };
-      CustomizableUI.addListener(listener);
-
-      return node;
-    }
-  }, {
     id: "add-ons-button",
     shortcutId: "key_openAddons",
     tooltiptext: "add-ons-button.tooltiptext3",
     defaultArea: CustomizableUI.AREA_PANEL,
     onCommand(aEvent) {
       let win = aEvent.target.ownerGlobal;
       win.BrowserOpenAddonsMgr();
     }
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -257,18 +257,16 @@
       </vbox>
       <toolbarbutton id="panelMenu_showAllBookmarks"
                      label="&showAllBookmarks2.label;"
                      class="subviewbutton panel-subview-footer"
                      command="Browser:ShowAllBookmarks"
                      onclick="PanelUI.hide();"/>
     </panelview>
 
-    <panelview id="PanelUI-socialapi" flex="1"/>
-
     <panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);">
       <label value="&feedsMenu2.label;" class="panel-subview-header"/>
     </panelview>
 
     <panelview id="PanelUI-containers" flex="1">
       <label value="&containersMenu.label;" class="panel-subview-header"/>
       <vbox id="PanelUI-containersItems"/>
     </panelview>
--- a/browser/components/extensions/ext-browserAction.js
+++ b/browser/components/extensions/ext-browserAction.js
@@ -665,14 +665,19 @@ this.browserAction = class extends Exten
         },
 
         getBadgeBackgroundColor: function(details, callback) {
           let tab = getTab(details.tabId);
 
           let color = browserAction.getProperty(tab, "badgeBackgroundColor");
           return Promise.resolve(color || [0xd9, 0, 0, 255]);
         },
+
+        openPopup: function() {
+          let window = windowTracker.topWindow;
+          browserAction.triggerAction(window);
+        },
       },
     };
   }
 };
 
 global.browserActionFor = this.browserAction.for;
--- a/browser/components/extensions/ext-pageAction.js
+++ b/browser/components/extensions/ext-pageAction.js
@@ -333,14 +333,19 @@ this.pageAction = class extends Extensio
         },
 
         getPopup(details) {
           let tab = tabTracker.getTab(details.tabId);
 
           let popup = pageAction.getProperty(tab, "popup");
           return Promise.resolve(popup);
         },
+
+        openPopup: function() {
+          let window = windowTracker.topWindow;
+          pageAction.triggerAction(window);
+        },
       },
     };
   }
 };
 
 global.pageActionFor = this.pageAction.for;
--- a/browser/components/extensions/ext-sidebarAction.js
+++ b/browser/components/extensions/ext-sidebarAction.js
@@ -341,16 +341,40 @@ this.sidebarAction = class extends Exten
    */
   triggerAction(window) {
     let {SidebarUI} = window;
     if (SidebarUI) {
       SidebarUI.toggle(this.id);
     }
   }
 
+  /**
+   * Opens this sidebar action for the given window.
+   *
+   * @param {ChromeWindow} window
+   */
+  open(window) {
+    let {SidebarUI} = window;
+    if (SidebarUI) {
+      SidebarUI.show(this.id);
+    }
+  }
+
+  /**
+   * Closes this sidebar action for the given window if this sidebar action is open.
+   *
+   * @param {ChromeWindow} window
+   */
+  close(window) {
+    let {SidebarUI} = window;
+    if (SidebarUI.isOpen && this.id == SidebarUI.currentID) {
+      SidebarUI.hide();
+    }
+  }
+
   getAPI(context) {
     let {extension} = context;
     const sidebarAction = this;
 
     function getTab(tabId) {
       if (tabId !== null) {
         return tabTracker.getTab(tabId);
       }
@@ -401,14 +425,24 @@ this.sidebarAction = class extends Exten
         },
 
         getPanel(details) {
           let nativeTab = getTab(details.tabId);
 
           let panel = sidebarAction.getProperty(nativeTab, "panel");
           return Promise.resolve(panel);
         },
+
+        open() {
+          let window = windowTracker.topWindow;
+          sidebarAction.open(window);
+        },
+
+        close() {
+          let window = windowTracker.topWindow;
+          sidebarAction.close(window);
+        },
       },
     };
   }
 };
 
 global.sidebarActionFor = this.sidebarAction.for;
--- a/browser/components/extensions/schemas/browser_action.json
+++ b/browser/components/extensions/schemas/browser_action.json
@@ -401,34 +401,20 @@
             "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" }
-              }
-            ]
-          }
-        ]
+        "requireUserInput": true,
+        "description": "Opens the extension popup window in the active window.",
+        "async": true,
+        "parameters": []
       }
     ],
     "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": [
--- a/browser/components/extensions/schemas/page_action.json
+++ b/browser/components/extensions/schemas/page_action.json
@@ -210,16 +210,24 @@
             "parameters": [
               {
                 "name": "result",
                 "type": "string"
               }
             ]
           }
         ]
+      },
+      {
+        "name": "openPopup",
+        "type": "function",
+        "requireUserInput": true,
+        "description": "Opens the extension page action in the active window.",
+        "async": true,
+        "parameters": []
       }
     ],
     "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": [
--- a/browser/components/extensions/schemas/sidebar_action.json
+++ b/browser/components/extensions/schemas/sidebar_action.json
@@ -176,12 +176,28 @@
               "tabId": {
                 "type": "integer",
                 "optional": true,
                 "description": "Specify the tab to get the sidebar from. If no tab is specified, the non-tab-specific sidebar is returned."
               }
             }
           }
         ]
+      },
+      {
+        "name": "open",
+        "type": "function",
+        "requireUserInput": true,
+        "description": "Opens the extension sidebar in the active window.",
+        "async": true,
+        "parameters": []
+      },
+      {
+        "name": "close",
+        "type": "function",
+        "requireUserInput": true,
+        "description": "Closes the extension sidebar in the active window if the sidebar belongs to the extension.",
+        "async": true,
+        "parameters": []
       }
     ]
   }
 ]
--- a/browser/components/extensions/test/browser/browser-common.ini
+++ b/browser/components/extensions/test/browser/browser-common.ini
@@ -78,16 +78,17 @@ skip-if = true # bug 1382487
 [browser_ext_getViews.js]
 [browser_ext_identity_indication.js]
 [browser_ext_incognito_views.js]
 [browser_ext_incognito_popup.js]
 [browser_ext_lastError.js]
 [browser_ext_menus.js]
 [browser_ext_omnibox.js]
 skip-if = debug || asan # Bug 1354681
+[browser_ext_openPanel.js]
 [browser_ext_optionsPage_browser_style.js]
 [browser_ext_optionsPage_privileges.js]
 [browser_ext_pageAction_context.js]
 [browser_ext_pageAction_contextMenu.js]
 [browser_ext_pageAction_popup.js]
 [browser_ext_pageAction_popup_resize.js]
 [browser_ext_pageAction_simple.js]
 [browser_ext_pageAction_telemetry.js]
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_contextMenu.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_contextMenu.js
@@ -36,17 +36,16 @@ let extData = {
 let contextMenuItems = {
   "context-navigation": "hidden",
   "context-sep-navigation": "hidden",
   "context-viewsource": "",
   "context-viewinfo": "disabled",
   "inspect-separator": "hidden",
   "context-inspect": "hidden",
   "context-bookmarkpage": "hidden",
-  "context-sharepage": "hidden",
 };
 
 add_task(async function browseraction_popup_contextmenu() {
   let extension = ExtensionTestUtils.loadExtension(extData);
   await extension.startup();
 
   await clickBrowserAction(extension, window);
 
new file mode 100644
--- /dev/null
+++ b/browser/components/extensions/test/browser/browser_ext_openPanel.js
@@ -0,0 +1,139 @@
+/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* vim: set sts=2 sw=2 et tw=80: */
+"use strict";
+
+add_task(async function test_openPopup_requires_user_interaction() {
+  const {GlobalManager} = Cu.import("resource://gre/modules/Extension.jsm", {});
+
+  async function backgroundScript() {
+    browser.tabs.onUpdated.addListener(async (tabId, changeInfo, tabInfo) => {
+      if (changeInfo.status != "complete") {
+        return;
+      }
+      await browser.pageAction.show(tabId);
+
+      await browser.test.assertRejects(
+        browser.pageAction.openPopup(),
+        "pageAction.openPopup may only be called from a user input handler",
+        "The error is informative.");
+      await browser.test.assertRejects(
+        browser.browserAction.openPopup(),
+        "browserAction.openPopup may only be called from a user input handler",
+        "The error is informative.");
+      await browser.test.assertRejects(
+        browser.sidebarAction.open(),
+        "sidebarAction.open may only be called from a user input handler",
+        "The error is informative.");
+      await browser.test.assertRejects(
+        browser.sidebarAction.close(),
+        "sidebarAction.close may only be called from a user input handler",
+        "The error is informative.");
+
+      browser.runtime.onMessage.addListener(async msg => {
+        browser.test.assertEq(msg, "from-panel", "correct message received");
+        browser.test.sendMessage("panel-opened");
+      });
+
+      browser.test.sendMessage("ready");
+    });
+    browser.tabs.create({url: "tab.html"});
+  }
+
+  let extensionData = {
+    background: backgroundScript,
+    manifest: {
+      "browser_action": {
+        "default_popup": "panel.html",
+      },
+      "page_action": {
+        "default_popup": "panel.html",
+      },
+      "sidebar_action": {
+        "default_panel": "panel.html",
+      },
+    },
+
+    files: {
+      "tab.html": `
+      <!DOCTYPE html>
+      <html><head><meta charset="utf-8"></head><body>
+      <button id="openBrowserAction">openBrowserAction</button>
+      <button id="openPageAction">openPageAction</button>
+      <button id="openSidebarAction">openSidebarAction</button>
+      <button id="closeSidebarAction">closeSidebarAction</button>
+      <script src="tab.js"></script>
+      </body></html>
+      `,
+      "panel.html": `
+      <!DOCTYPE html>
+      <html><head><meta charset="utf-8"></head><body>
+      <script src="panel.js"></script>
+      </body></html>
+      `,
+      "tab.js": function() {
+        document.getElementById("openBrowserAction").addEventListener("click", () => {
+          browser.browserAction.openPopup();
+        }, {once: true});
+        document.getElementById("openPageAction").addEventListener("click", () => {
+          browser.pageAction.openPopup();
+        }, {once: true});
+        document.getElementById("openSidebarAction").addEventListener("click", () => {
+          browser.sidebarAction.open();
+        }, {once: true});
+        document.getElementById("closeSidebarAction").addEventListener("click", () => {
+          browser.sidebarAction.close();
+        }, {once: true});
+      },
+      "panel.js": function() {
+        browser.runtime.sendMessage("from-panel");
+      },
+    },
+  };
+
+  let extension = ExtensionTestUtils.loadExtension(extensionData);
+
+  async function click(id) {
+    let open = extension.awaitMessage("panel-opened");
+    await BrowserTestUtils.synthesizeMouseAtCenter(id, {}, gBrowser.selectedBrowser);
+    return open;
+  }
+
+  function testActiveTab(extension, expected) {
+    let ext = GlobalManager.extensionMap.get(extension.id);
+    is(ext.tabManager.hasActiveTabPermission(gBrowser.selectedTab), expected,
+       "activeTab permission is correct");
+  }
+
+  await extension.startup();
+  await extension.awaitMessage("ready");
+
+  await click("#openBrowserAction");
+  testActiveTab(extension, false);
+  closeBrowserAction(extension);
+  await new Promise(resolve => setTimeout(resolve, 0));
+
+  await click("#openPageAction");
+  closePageAction(extension);
+  await new Promise(resolve => setTimeout(resolve, 0));
+
+  await click("#openSidebarAction");
+
+  await BrowserTestUtils.synthesizeMouseAtCenter("#closeSidebarAction", {}, gBrowser.selectedBrowser);
+  await BrowserTestUtils.waitForCondition(() => !SidebarUI.isOpen);
+
+  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+  await extension.unload();
+
+  extensionData.manifest.permissions = ["activeTab"];
+  extension = ExtensionTestUtils.loadExtension(extensionData);
+  await extension.startup();
+  await extension.awaitMessage("ready");
+
+  await click("#openBrowserAction");
+  testActiveTab(extension, true);
+  closeBrowserAction(extension);
+  await new Promise(resolve => setTimeout(resolve, 0));
+
+  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
+  await extension.unload();
+});
--- a/browser/components/extensions/test/browser/browser_ext_pageAction_contextMenu.js
+++ b/browser/components/extensions/test/browser/browser_ext_pageAction_contextMenu.js
@@ -43,17 +43,16 @@ let extData = {
 let contextMenuItems = {
   "context-navigation": "hidden",
   "context-sep-navigation": "hidden",
   "context-viewsource": "",
   "context-viewinfo": "disabled",
   "inspect-separator": "hidden",
   "context-inspect": "hidden",
   "context-bookmarkpage": "hidden",
-  "context-sharepage": "hidden",
 };
 
 add_task(async function pageaction_popup_contextmenu() {
   let extension = ExtensionTestUtils.loadExtension(extData);
   await extension.startup();
   await extension.awaitMessage("action-shown");
 
   await clickPageAction(extension, window);
--- a/browser/components/extensions/test/browser/browser_ext_sidebarAction_contextMenu.js
+++ b/browser/components/extensions/test/browser/browser_ext_sidebarAction_contextMenu.js
@@ -43,17 +43,16 @@ let extData = {
 let contextMenuItems = {
   "context-navigation": "hidden",
   "context-sep-navigation": "hidden",
   "context-viewsource": "",
   "context-viewinfo": "",
   "inspect-separator": "hidden",
   "context-inspect": "hidden",
   "context-bookmarkpage": "hidden",
-  "context-sharepage": "hidden",
 };
 
 add_task(async function sidebar_contextmenu() {
   let extension = ExtensionTestUtils.loadExtension(extData);
   await extension.startup();
   // Test sidebar is opened on install
   await extension.awaitMessage("sidebar");
 
--- a/browser/components/extensions/test/browser/browser_ext_themes_icons.js
+++ b/browser/components/extensions/test/browser/browser_ext_themes_icons.js
@@ -128,17 +128,16 @@ async function runTestWithIcons(icons) {
     ["full_screen", "#fullscreen-button", "fullscreen-button"],
     ["find", "#find-button", "find-button"],
     ["options", "#preferences-button", "preferences-button"],
     ["addons", "#add-ons-button", "add-ons-button"],
     ["developer", "#developer-button", "developer-button"],
     ["synced_tabs", "#sync-button", "sync-button"],
     ["open_file", "#open-file-button", "open-file-button"],
     ["sidebars", "#sidebar-button", "sidebar-button"],
-    ["share_page", "#social-share-button", "social-share-button"],
     ["subscribe", "#feed-button", "feed-button"],
     ["text_encoding", "#characterencoding-button", "characterencoding-button"],
     ["email_link", "#email-link-button", "email-link-button"],
     ["forget", "#panic-button", "panic-button"],
     ["pocket", "#pocket-button", "pocket-button"],
   ];
   // We add these at the beginning because adding them at the end can end up
   // putting them in the overflow panel, where they aren't displayed the same way.
@@ -202,17 +201,16 @@ add_task(async function test_all_icons()
     ["full_screen", "fox.svg"],
     ["find", "fox.svg"],
     ["options", "fox.svg"],
     ["addons", "fox.svg"],
     ["developer", "fox.svg"],
     ["synced_tabs", "fox.svg"],
     ["open_file", "fox.svg"],
     ["sidebars", "fox.svg"],
-    ["share_page", "fox.svg"],
     ["subscribe", "fox.svg"],
     ["text_encoding", "fox.svg"],
     ["email_link", "fox.svg"],
     ["forget", "fox.svg"],
     ["pocket", "fox.svg"],
   ];
   await runTestWithIcons(icons);
 });
@@ -244,17 +242,16 @@ add_task(async function test_some_icons(
     ["full_screen", ""],
     ["find", ""],
     ["options", ""],
     ["addons", ""],
     ["developer", ""],
     ["synced_tabs", ""],
     ["open_file", ""],
     ["sidebars", ""],
-    ["share_page", ""],
     ["subscribe", ""],
     ["text_encoding", ""],
     ["email_link", ""],
     ["forget", ""],
     ["pocket", "fox.svg"],
   ];
   await runTestWithIcons(icons);
 });
--- a/browser/components/places/content/history-panel.xul
+++ b/browser/components/places/content/history-panel.xul
@@ -39,17 +39,17 @@
   </keyset>
 
   <!-- required to overlay the context menu -->
   <menupopup id="placesContext"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip"/>
 
-  <hbox id="sidebar-search-container" align="center">
+  <hbox id="sidebar-search-container">
     <textbox id="search-box" flex="1" type="search"
              placeholder="&search.placeholder;"
              aria-controls="historyTree"
              oncommand="searchHistory(this.value);"/>
     <button id="viewButton" style="min-width:0px !important;" type="menu"
             label="&view.label;" accesskey="&view.accesskey;" selectedsort="day"
             persist="selectedsort">
       <menupopup>
--- a/browser/components/preferences/in-content-new/main.js
+++ b/browser/components/preferences/in-content-new/main.js
@@ -136,53 +136,53 @@ var gMainPane = {
                  getService(Ci.nsIExternalHelperAppService),
 
   _handlerSvc: Cc["@mozilla.org/uriloader/handler-service;1"].
                getService(Ci.nsIHandlerService),
 
   _ioSvc: Cc["@mozilla.org/network/io-service;1"].
           getService(Ci.nsIIOService),
 
+  _backoffIndex: 0,
+
   /**
    * Initialization of this.
    */
   init() {
     function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gMainPane));
     }
 
     if (AppConstants.HAVE_SHELL_SERVICE) {
       this.updateSetDefaultBrowser();
-      if (AppConstants.platform == "win") {
-        // In Windows 8 we launch the control panel since it's the only
-        // way to get all file type association prefs. So we don't know
-        // when the user will select the default.  We refresh here periodically
-        // in case the default changes. On other Windows OS's defaults can also
-        // be set while the prefs are open.
-        let win = Services.wm.getMostRecentWindow("navigator:browser");
-
-        let pollForDefaultBrowser = () => {
-          let uri = win.gBrowser.currentURI.spec;
-
-          if ((uri == "about:preferences" || uri == "about:preferences#general") &&
-              document.visibilityState == "visible") {
-            this.updateSetDefaultBrowser();
-          }
-
-          // approximately a "requestIdleInterval"
-          window.setTimeout(() => {
-            window.requestIdleCallback(pollForDefaultBrowser);
-          }, 1000);
-        };
-
+      let win = Services.wm.getMostRecentWindow("navigator:browser");
+
+      // Exponential backoff mechanism will delay the polling times if user doesn't
+      // trigger SetDefaultBrowser for a long time.
+      let backoffTimes = [1000, 1000, 1000, 1000, 2000, 2000, 2000, 5000, 5000, 10000];
+
+      let pollForDefaultBrowser = () => {
+        let uri = win.gBrowser.currentURI.spec;
+
+        if ((uri == "about:preferences" || uri == "about:preferences#general") &&
+            document.visibilityState == "visible") {
+          this.updateSetDefaultBrowser();
+        }
+
+        // approximately a "requestIdleInterval"
         window.setTimeout(() => {
           window.requestIdleCallback(pollForDefaultBrowser);
-        }, 1000);
-      }
+        }, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ?
+                        this._backoffIndex++ : backoffTimes.length - 1]);
+      };
+
+      window.setTimeout(() => {
+        window.requestIdleCallback(pollForDefaultBrowser);
+      }, backoffTimes[this._backoffIndex]);
     }
 
     this.initBrowserContainers();
     this.buildContentProcessCountMenuList();
 
     let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
     let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
     performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
@@ -856,16 +856,19 @@ var gMainPane = {
   /**
    * Set browser as the operating system default browser.
    */
   setDefaultBrowser() {
     if (AppConstants.HAVE_SHELL_SERVICE) {
       let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
       alwaysCheckPref.value = true;
 
+      // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
+      this._backoffIndex = 0;
+
       let shellSvc = getShellService();
       if (!shellSvc)
         return;
       try {
         shellSvc.setDefaultBrowser(true, false);
       } catch (ex) {
         Cu.reportError(ex);
         return;
--- a/browser/docs/UITelemetry.rst
+++ b/browser/docs/UITelemetry.rst
@@ -123,17 +123,16 @@ divide the following different context m
 
 - ``selection`` if there is content on the page that's selected on which the user clicks;
 - ``link`` if the user opened the context menu for a link
 - ``image-link`` if the user opened the context menu on an image or canvas that's a link;
 - ``image`` if the user opened the context menu on an image (that isn't a link);
 - ``canvas`` if the user opened the context menu on a canvas (that isn't a link);
 - ``media`` if the user opened the context menu on an HTML video or audio element;
 - ``input`` if the user opened the context menu on a text input element;
-- ``social`` if the user opened the context menu inside a social frame;
 - ``other`` for all other openings of the content menu;
 
 Each of these objects (if they exist) then gets a "withcustom" and/or a "withoutcustom" property
 for context menus opened with custom page-created items and without them, and each of those
 properties holds an object with IDs corresponding to a count of how often an item with that ID was
 activated in the context menu. Only builtin context menu items are tracked, and besides those items
 there are four special items which get counts:
 
--- a/browser/extensions/formautofill/test/browser/browser_autocomplete_marked_detached_tab.js
+++ b/browser/extensions/formautofill/test/browser/browser_autocomplete_marked_detached_tab.js
@@ -22,16 +22,17 @@ add_task(async function setup_storage() 
 
 add_task(async function test_detach_tab_marked() {
   await BrowserTestUtils.withNewTab({gBrowser, url: URL}, async function(browser) {
     const {autoCompletePopup} = browser;
 
     // Check the page after the initial load
     await openPopupOn(browser, "#street-address");
     checkPopup(autoCompletePopup);
+    await closePopup(browser);
 
     // Detach the tab to a new window
     let newWin = gBrowser.replaceTabWithWindow(gBrowser.getTabForBrowser(browser));
     await TestUtils.topicObserved("browser-delayed-startup-finished", subject => {
       return subject == newWin;
     });
 
     info("tab was detached");
--- a/browser/extensions/pocket/skin/shared/pocket.css
+++ b/browser/extensions/pocket/skin/shared/pocket.css
@@ -59,18 +59,19 @@ panelmultiview[mainViewId=PanelUI-pocket
      `inline-size less than zero: 'aContainingBlockISize >= 0'` (bug 1379332). */
   min-width: 20px;
   max-width: 20px;
   min-height: 16px;
   max-height: 16px;
 }
 
 #pocket-button-box > #pocket-animatable-box {
-  /* Match the 6px margin-inline-start of .urlbar-icon plus 1px for internal padding in the animation sprite. */
-  margin-inline-start: 7px;
+  /* .urlbar-icon has width 28px. Each frame is 20px wide. Set margin-inline-start
+     to be half the difference, 4px. */
+  margin-inline-start: 4px;
 }
 
 #pocket-button-box > #pocket-animatable-box > #pocket-animatable-image,
 #pocket-button > .toolbarbutton-animatable-box > .toolbarbutton-animatable-image {
   height: var(--toolbarbutton-height); /* Height must be equal to height of toolbarbutton padding-box */
 }
 
 #pocket-button-box[animate="true"],
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -459,18 +459,18 @@
 @RESPATH@/components/PageIconProtocolHandler.js
 @RESPATH@/components/PlacesCategoriesStarter.js
 @RESPATH@/components/ColorAnalyzer.js
 @RESPATH@/components/PageThumbsProtocol.js
 @RESPATH@/components/mozProtocolHandler.js
 @RESPATH@/components/mozProtocolHandler.manifest
 @RESPATH@/components/nsDefaultCLH.manifest
 @RESPATH@/components/nsDefaultCLH.js
-@RESPATH@/components/nsContentPrefService.manifest
-@RESPATH@/components/nsContentPrefService.js
+@RESPATH@/components/ContentPrefService2.manifest
+@RESPATH@/components/ContentPrefService2.js
 @RESPATH@/components/nsContentDispatchChooser.manifest
 @RESPATH@/components/nsContentDispatchChooser.js
 @RESPATH@/components/nsHandlerService-json.manifest
 @RESPATH@/components/nsHandlerService-json.js
 @RESPATH@/components/nsHandlerService.manifest
 @RESPATH@/components/nsHandlerService.js
 @RESPATH@/components/nsWebHandlerApp.manifest
 @RESPATH@/components/nsWebHandlerApp.js
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -156,32 +156,17 @@ These should match what Safari and other
 <!ENTITY closeWindow.label "Close Window">
 <!ENTITY closeWindow.accesskey "d">
 
 <!ENTITY bookmarksMenu.label "Bookmarks">
 <!ENTITY bookmarksMenu.accesskey "B">
 <!ENTITY bookmarkThisPageCmd.label "Bookmark This Page">
 <!ENTITY editThisBookmarkCmd.label "Edit This Bookmark">
 <!ENTITY bookmarkThisPageCmd.commandkey "d">
-<!-- LOCALIZATION NOTE (findShareServices.label):
-  -  Use the unicode ellipsis char, \u2026,
-  -  or use "..." if \u2026 doesn't suit traditions in your locale. -->
-<!ENTITY findShareServices.label "Find more Share services…">
-<!ENTITY sharePageCmd.label "Share This Page">
-<!ENTITY sharePageCmd.commandkey "S">
-<!ENTITY sharePageCmd.accesskey "s">
-<!-- LOCALIZATION NOTE (shareLink.accesskey): must be different than the following share access keys -->
-<!ENTITY shareLink.label "Share This Link">
-<!ENTITY shareLink.accesskey "h">
-<!ENTITY shareImage.label "Share This Image">
-<!ENTITY shareImage.accesskey "r">
-<!ENTITY shareSelect.label "Share Selection">
-<!ENTITY shareSelect.accesskey "r">
-<!ENTITY shareVideo.label "Share This Video">
-<!ENTITY shareVideo.accesskey "r">
+
 <!ENTITY feedsMenu2.label "Subscribe to This Page">
 <!ENTITY subscribeToPageMenupopup.label "Subscribe to This Page">
 <!ENTITY subscribeToPageMenuitem.label "Subscribe to This Page…">
 <!ENTITY addCurPagesCmd.label "Bookmark All Tabs…">
 <!ENTITY showAllBookmarks2.label "Show All Bookmarks">
 <!ENTITY recentBookmarks.label "Recently Bookmarked">
 <!ENTITY otherBookmarksCmd.label "Other Bookmarks">
 <!ENTITY mobileBookmarksCmd.label "Mobile Bookmarks">
@@ -836,24 +821,16 @@ you can use these alternative items. Oth
 <!ENTITY syncSignIn.label             "Sign In To &syncBrand.shortName.label;…">
 <!ENTITY syncSignIn.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 social.addons.label "Manage Services…">
-
-<!ENTITY social.directory.label "Activations Directory">
-<!ENTITY social.directory.text "You can activate Share services from the directory.">
-<!ENTITY social.directory.button "Take me there!">
-<!ENTITY social.directory.introText "Click on a service to add it to &brandShortName;.">
-<!ENTITY social.directory.viewmore.text "View More">
-
 <!ENTITY customizeMode.menuAndToolbars.header2 "Additional Tools and Features">
 <!ENTITY customizeMode.menuAndToolbars.empty "Want more tools?">
 <!ENTITY customizeMode.menuAndToolbars.emptyLink "Choose from thousands of add-ons">
 <!ENTITY customizeMode.restoreDefaults "Restore Defaults">
 <!ENTITY customizeMode.done "Done">
 <!ENTITY customizeMode.titlebar "Title Bar">
 <!ENTITY customizeMode.toolbars2 "Toolbars">
 <!ENTITY customizeMode.lwthemes "Themes">
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -591,43 +591,20 @@ processHang.button_stop.accessKey = S
 processHang.button_wait.label = Wait
 processHang.button_wait.accessKey = W
 processHang.button_debug.label = Debug Script
 processHang.button_debug.accessKey = D
 
 # LOCALIZATION NOTE (fullscreenButton.tooltip): %S is the keyboard shortcut for full screen
 fullscreenButton.tooltip=Display the window in full screen (%S)
 
-service.toolbarbutton.label=Services
-service.toolbarbutton.tooltiptext=Services
-
-# LOCALIZATION NOTE (social.install.description): %1$S is the hostname of the social provider, %2$S is brandShortName (e.g. Firefox)
-service.install.description=Would you like to enable services from %1$S to display in your %2$S toolbar and sidebar?
-service.install.ok.label=Enable Services
-service.install.ok.accesskey=E
-
 # These are visible when opening the popup inside the bookmarks sidebar
 sidebar.moveToLeft=Move Sidebar to Left
 sidebar.moveToRight=Move Sidebar to Right
 
-# LOCALIZATION NOTE (social.markpageMenu.label): %S is the name of the social provider
-social.markpageMenu.label=Save Page to %S
-# LOCALIZATION NOTE (social.marklinkMenu.label): %S is the name of the social provider
-social.marklinkMenu.label=Save Link to %S
-
-# LOCALIZATION NOTE (social.error.message): %1$S is brandShortName (e.g. Firefox), %2$S is the name of the social provider
-social.error.message=%1$S is unable to connect with %2$S right now.
-social.error.tryAgain.label=Try Again
-social.error.tryAgain.accesskey=T
-social.error.closeSidebar.label=Close This Sidebar
-social.error.closeSidebar.accesskey=C
-
-# LOCALIZATION NOTE: %1$S is the label for the toolbar button, %2$S is the associated badge numbering that the social provider may provide.
-social.aria.toolbarButtonBadgeText=%1$S (%2$S)
-
 # LOCALIZATION NOTE (getUserMedia.shareCamera2.message,
 #                    getUserMedia.shareMicrophone2.message,
 #                    getUserMedia.shareScreen3.message,
 #                    getUserMedia.shareCameraAndMicrophone2.message,
 #                    getUserMedia.shareCameraAndAudioCapture2.message,
 #                    getUserMedia.shareScreenAndMicrophone3.message,
 #                    getUserMedia.shareScreenAndAudioCapture3.message,
 #                    getUserMedia.shareAudioCapture2.message):
--- a/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
+++ b/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
@@ -90,19 +90,16 @@ email-link-button.tooltiptext3 = Email a
 
 # LOCALIZATION NOTE(quit-button.tooltiptext.linux2): %1$S is the brand name (e.g. Firefox),
 # %2$S is the keyboard shortcut
 quit-button.tooltiptext.linux2 = Quit %1$S (%2$S)
 # LOCALIZATION NOTE(quit-button.tooltiptext.mac): %1$S is the brand name (e.g. Firefox),
 # %2$S is the keyboard shortcut
 quit-button.tooltiptext.mac = Quit %1$S (%2$S)
 
-social-share-button.label = Share This Page
-social-share-button.tooltiptext = Share this page
-
 panic-button.label = Forget
 panic-button.tooltiptext = Forget about some browsing history
 
 # LOCALIZATION NOTE(devtools-webide-button.label, devtools-webide-button.tooltiptext):
 # widget is only visible after WebIDE has been started once (Tools > Web Developers > WebIDE)
 # %S is the keyboard shortcut
 devtools-webide-button2.label = WebIDE
 devtools-webide-button2.tooltiptext = Open WebIDE (%S)
--- a/browser/modules/BrowserUITelemetry.jsm
+++ b/browser/modules/BrowserUITelemetry.jsm
@@ -685,30 +685,30 @@ this.BrowserUITelemetry = {
     "custom-page-item", // The ID we use for page-provided items
     "unknown", // The bucket for stuff with no id.
     // Everything we know of so far (which will exclude add-on items):
     "navigation", "back", "forward", "reload", "stop", "bookmarkpage",
     "spell-no-suggestions", "spell-add-to-dictionary",
     "spell-undo-add-to-dictionary", "openlinkincurrent", "openlinkintab",
     "openlink",
     // "openlinkprivate" intentionally omitted for privacy reasons. See bug 1176391.
-    "bookmarklink", "sharelink", "savelink",
+    "bookmarklink", "savelink",
     "marklinkMenu", "copyemail", "copylink", "media-play", "media-pause",
     "media-mute", "media-unmute", "media-playbackrate",
     "media-playbackrate-050x", "media-playbackrate-100x",
     "media-playbackrate-125x", "media-playbackrate-150x", "media-playbackrate-200x",
     "media-showcontrols", "media-hidecontrols",
     "video-fullscreen", "leave-dom-fullscreen",
     "reloadimage", "viewimage", "viewvideo", "copyimage-contents", "copyimage",
-    "copyvideourl", "copyaudiourl", "saveimage", "shareimage", "sendimage",
+    "copyvideourl", "copyaudiourl", "saveimage", "sendimage",
     "setDesktopBackground", "viewimageinfo", "viewimagedesc", "savevideo",
-    "sharevideo", "saveaudio", "video-saveimage", "sendvideo", "sendaudio",
-    "ctp-play", "ctp-hide", "sharepage", "savepage", "pocket", "markpageMenu",
+    "saveaudio", "video-saveimage", "sendvideo", "sendaudio",
+    "ctp-play", "ctp-hide", "savepage", "pocket", "markpageMenu",
     "viewbgimage", "undo", "cut", "copy", "paste", "delete", "selectall",
-    "keywordfield", "searchselect", "shareselect", "frame", "showonlythisframe",
+    "keywordfield", "searchselect", "frame", "showonlythisframe",
     "openframeintab", "openframe", "reloadframe", "bookmarkframe", "saveframe",
     "printframe", "viewframesource", "viewframeinfo",
     "viewpartialsource-selection", "viewpartialsource-mathml",
     "viewsource", "viewinfo", "spell-check-enabled",
     "spell-add-dictionaries-main", "spell-dictionaries",
     "spell-dictionaries-menu", "spell-add-dictionaries",
     "bidi-text-direction-toggle", "bidi-page-direction-toggle", "inspect",
     "media-eme-learn-more"
deleted file mode 100644
--- a/browser/modules/Social.jsm
+++ /dev/null
@@ -1,272 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["Social", "OpenGraphBuilder",
-                         "DynamicResizeWatcher", "sizeSocialPanelToContent"];
-
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cu = Components.utils;
-
-// The minimum sizes for the auto-resize panel code, minimum size necessary to
-// properly show the error page in the panel.
-const PANEL_MIN_HEIGHT = 190;
-const PANEL_MIN_WIDTH = 330;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
-  "resource:///modules/CustomizableUI.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "SocialService",
-  "resource:///modules/SocialService.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PageMetadata",
-  "resource://gre/modules/PageMetadata.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
-  "resource://gre/modules/PlacesUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
-  "resource://gre/modules/PromiseUtils.jsm");
-
-
-this.Social = {
-  initialized: false,
-  lastEventReceived: 0,
-  providers: [],
-  _disabledForSafeMode: false,
-
-  init: function Social_init() {
-    this._disabledForSafeMode = Services.appinfo.inSafeMode && this.enabled;
-    let deferred = PromiseUtils.defer();
-
-    if (this.initialized) {
-      deferred.resolve(true);
-      return deferred.promise;
-    }
-    this.initialized = true;
-    // if SocialService.hasEnabledProviders, retreive the providers so the
-    // front-end can generate UI
-    if (SocialService.hasEnabledProviders) {
-      // Retrieve the current set of providers, and set the current provider.
-      SocialService.getOrderedProviderList(function(providers) {
-        Social._updateProviderCache(providers);
-        Social._updateEnabledState(SocialService.enabled);
-        deferred.resolve(false);
-      });
-    } else {
-      deferred.resolve(false);
-    }
-
-    // Register an observer for changes to the provider list
-    SocialService.registerProviderListener(function providerListener(topic, origin, providers) {
-      // An engine change caused by adding/removing a provider should notify.
-      // any providers we receive are enabled in the AddonsManager
-      if (topic == "provider-installed" || topic == "provider-uninstalled") {
-        // installed/uninstalled do not send the providers param
-        Services.obs.notifyObservers(null, "social:" + topic, origin);
-        return;
-      }
-      if (topic == "provider-enabled") {
-        Social._updateProviderCache(providers);
-        Social._updateEnabledState(true);
-        Services.obs.notifyObservers(null, "social:" + topic, origin);
-        return;
-      }
-      if (topic == "provider-disabled") {
-        // a provider was removed from the list of providers, update states
-        Social._updateProviderCache(providers);
-        Social._updateEnabledState(providers.length > 0);
-        Services.obs.notifyObservers(null, "social:" + topic, origin);
-        return;
-      }
-      if (topic == "provider-update") {
-        // a provider has self-updated its manifest, we need to update our cache
-        // and reload the provider.
-        Social._updateProviderCache(providers);
-        let provider = Social._getProviderFromOrigin(origin);
-        provider.reload();
-      }
-    });
-    return deferred.promise;
-  },
-
-  _updateEnabledState(enable) {
-    for (let p of Social.providers) {
-      p.enabled = enable;
-    }
-  },
-
-  // Called to update our cache of providers and set the current provider
-  _updateProviderCache(providers) {
-    this.providers = providers;
-    Services.obs.notifyObservers(null, "social:providers-changed");
-  },
-
-  get enabled() {
-    return !this._disabledForSafeMode && this.providers.length > 0;
-  },
-
-  _getProviderFromOrigin(origin) {
-    for (let p of this.providers) {
-      if (p.origin == origin) {
-        return p;
-      }
-    }
-    return null;
-  },
-
-  getManifestByOrigin(origin) {
-    return SocialService.getManifestByOrigin(origin);
-  },
-
-  installProvider(data, installCallback, options = {}) {
-    SocialService.installProvider(data, installCallback, options);
-  },
-
-  uninstallProvider(origin, aCallback) {
-    SocialService.uninstallProvider(origin, aCallback);
-  },
-
-  // Activation functionality
-  activateFromOrigin(origin, callback) {
-    // It's OK if the provider has already been activated - we still get called
-    // back with it.
-    SocialService.enableProvider(origin, callback);
-  }
-};
-
-function sizeSocialPanelToContent(panel, iframe, requestedSize) {
-  let doc = iframe.contentDocument;
-  if (!doc || !doc.body) {
-    return;
-  }
-  // We need an element to use for sizing our panel.  See if the body defines
-  // an id for that element, otherwise use the body itself.
-  let body = doc.body;
-  let docEl = doc.documentElement;
-  let bodyId = body.getAttribute("contentid");
-  if (bodyId) {
-    body = doc.getElementById(bodyId) || doc.body;
-  }
-  // offsetHeight/Width don't include margins, so account for that.
-  let cs = doc.defaultView.getComputedStyle(body);
-  let width = Math.max(PANEL_MIN_WIDTH, docEl.offsetWidth);
-  let height = Math.max(PANEL_MIN_HEIGHT, docEl.offsetHeight);
-  // if the panel is preloaded prior to being shown, cs will be null.  in that
-  // case use the minimum size for the panel until it is shown.
-  if (cs) {
-    let computedHeight = parseInt(cs.marginTop) + body.offsetHeight + parseInt(cs.marginBottom);
-    height = Math.max(computedHeight, height);
-    let computedWidth = parseInt(cs.marginLeft) + body.offsetWidth + parseInt(cs.marginRight);
-    width = Math.max(computedWidth, width);
-  }
-
-  // if our scrollHeight is still larger than the iframe, the css calculations
-  // above did not work for this site, increase the height. This can happen if
-  // the site increases its height for additional UI.
-  if (docEl.scrollHeight > iframe.boxObject.height)
-    height = docEl.scrollHeight;
-
-  // if a size was defined in the manifest use it as a minimum
-  if (requestedSize) {
-    if (requestedSize.height)
-      height = Math.max(height, requestedSize.height);
-    if (requestedSize.width)
-      width = Math.max(width, requestedSize.width);
-  }
-
-  // add the extra space used by the panel (toolbar, borders, etc) if the iframe
-  // has been loaded
-  if (iframe.boxObject.width && iframe.boxObject.height) {
-    // add extra space the panel needs if any
-    width += panel.boxObject.width - iframe.boxObject.width;
-    height += panel.boxObject.height - iframe.boxObject.height;
-  }
-
-  // using panel.sizeTo will ignore css transitions, set size via style
-  if (Math.abs(panel.boxObject.width - width) >= 2)
-    panel.style.width = width + "px";
-  if (Math.abs(panel.boxObject.height - height) >= 2)
-    panel.style.height = height + "px";
-}
-
-function DynamicResizeWatcher() {
-  this._mutationObserver = null;
-}
-
-DynamicResizeWatcher.prototype = {
-  start: function DynamicResizeWatcher_start(panel, iframe, requestedSize) {
-    this.stop(); // just in case...
-    let doc = iframe.contentDocument;
-    this._mutationObserver = new iframe.contentWindow.MutationObserver((mutations) => {
-      sizeSocialPanelToContent(panel, iframe, requestedSize);
-    });
-    // Observe anything that causes the size to change.
-    let config = {attributes: true, characterData: true, childList: true, subtree: true};
-    this._mutationObserver.observe(doc, config);
-    // and since this may be setup after the load event has fired we do an
-    // initial resize now.
-    sizeSocialPanelToContent(panel, iframe, requestedSize);
-  },
-  stop: function DynamicResizeWatcher_stop() {
-    if (this._mutationObserver) {
-      try {
-        this._mutationObserver.disconnect();
-      } catch (ex) {
-        // may get "TypeError: can't access dead object" which seems strange,
-        // but doesn't seem to indicate a real problem, so ignore it...
-      }
-      this._mutationObserver = null;
-    }
-  }
-}
-
-
-this.OpenGraphBuilder = {
-  generateEndpointURL(URLTemplate, pageData) {
-    // support for existing oexchange style endpoints by supporting their
-    // querystring arguments. parse the query string template and do
-    // replacements where necessary the query names may be different than ours,
-    // so we could see u=%{url} or url=%{url}
-    let [endpointURL, queryString] = URLTemplate.split("?");
-    let query = {};
-    if (queryString) {
-      queryString.split("&").forEach(function(val) {
-        let [name, value] = val.split("=");
-        let p = /%\{(.+)\}/.exec(value);
-        if (!p) {
-          // preserve non-template query vars
-          query[name] = value;
-        } else if (pageData[p[1]]) {
-          if (p[1] == "previews")
-            query[name] = pageData[p[1]][0];
-          else
-            query[name] = pageData[p[1]];
-        } else if (p[1] == "body") {
-          // build a body for emailers
-          let body = "";
-          if (pageData.title)
-            body += pageData.title + "\n\n";
-          if (pageData.description)
-            body += pageData.description + "\n\n";
-          if (pageData.text)
-            body += pageData.text + "\n\n";
-          body += pageData.url;
-          query.body = body;
-        }
-      });
-      // if the url template doesn't have title and no text was provided, add the title as the text.
-      if (!query.text && !query.title && pageData.title) {
-        query.text = pageData.title;
-      }
-    }
-    var str = [];
-    for (let p in query)
-       str.push(p + "=" + encodeURIComponent(query[p]));
-    if (str.length)
-      endpointURL = endpointURL + "?" + str.join("&");
-    return endpointURL;
-  },
-};
deleted file mode 100644
--- a/browser/modules/SocialService.jsm
+++ /dev/null
@@ -1,1077 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-this.EXPORTED_SYMBOLS = ["SocialService"];
-
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/AddonManager.jsm");
-Cu.import("resource://gre/modules/PlacesUtils.jsm");
-
-const URI_EXTENSION_STRINGS  = "chrome://mozapps/locale/extensions/extensions.properties";
-const ADDON_TYPE_SERVICE     = "service";
-const ID_SUFFIX              = "@services.mozilla.org";
-const STRING_TYPE_NAME       = "type.%ID%.name";
-
-XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask", "resource://gre/modules/DeferredTask.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "etld",
-                                   "@mozilla.org/network/effective-tld-service;1",
-                                   "nsIEffectiveTLDService");
-
-/**
- * The SocialService is the public API to social providers - it tracks which
- * providers are installed and enabled, and is the entry-point for access to
- * the provider itself.
- */
-
-// Internal helper methods and state
-var SocialServiceInternal = {
-  get enabled() {
-    return this.providerArray.length > 0;
-  },
-
-  get providerArray() {
-    return Object.keys(this.providers).map(origin => this.providers[origin]);
-  },
-  *manifestsGenerator() {
-    // Retrieve the manifests of installed providers from prefs
-    let MANIFEST_PREFS = Services.prefs.getBranch("social.manifest.");
-    let prefs = MANIFEST_PREFS.getChildList("", []);
-    for (let pref of prefs) {
-      // we only consider manifests in user level prefs to be *installed*
-      if (!MANIFEST_PREFS.prefHasUserValue(pref))
-        continue;
-      try {
-        var manifest = JSON.parse(MANIFEST_PREFS.getStringPref(pref));
-        if (manifest && typeof(manifest) == "object" && manifest.origin)
-          yield manifest;
-      } catch (err) {
-        Cu.reportError("SocialService: failed to load manifest: " + pref +
-                       ", exception: " + err);
-      }
-    }
-  },
-  get manifests() {
-    return this.manifestsGenerator();
-  },
-  getManifestPrefname(origin) {
-    // Retrieve the prefname for a given origin/manifest.
-    // If no existing pref, return a generated prefname.
-    let MANIFEST_PREFS = Services.prefs.getBranch("social.manifest.");
-    let prefs = MANIFEST_PREFS.getChildList("", []);
-    for (let pref of prefs) {
-      try {
-        var manifest = JSON.parse(MANIFEST_PREFS.getStringPref(pref));
-        if (manifest.origin == origin) {
-          return pref;
-        }
-      } catch (err) {
-        Cu.reportError("SocialService: failed to load manifest: " + pref +
-                       ", exception: " + err);
-      }
-    }
-    let originUri = Services.io.newURI(origin);
-    return originUri.hostPort.replace(".", "-");
-  },
-  orderedProviders(aCallback) {
-    if (SocialServiceInternal.providerArray.length < 2) {
-      schedule(function() {
-        aCallback(SocialServiceInternal.providerArray);
-      });
-      return;
-    }
-    // query moz_hosts for frecency.  since some providers may not have a
-    // frecency entry, we need to later sort on our own. We use the providers
-    // object below as an easy way to later record the frecency on the provider
-    // object from the query results.
-    let hosts = [];
-    let providers = {};
-
-    for (let p of SocialServiceInternal.providerArray) {
-      p.frecency = 0;
-      providers[p.domain] = p;
-      hosts.push(p.domain);
-    }
-
-    // cannot bind an array to stmt.params so we have to build the string
-    let stmt = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
-                                 .DBConnection.createAsyncStatement(
-      "SELECT host, frecency FROM moz_hosts WHERE host IN (" +
-      hosts.map(host => '"' + host + '"').join(",") + ") "
-    );
-
-    try {
-      stmt.executeAsync({
-        handleResult(aResultSet) {
-          let row;
-          while ((row = aResultSet.getNextRow())) {
-            let rh = row.getResultByName("host");
-            let frecency = row.getResultByName("frecency");
-            providers[rh].frecency = parseInt(frecency) || 0;
-          }
-        },
-        handleError(aError) {
-          Cu.reportError(aError.message + " (Result = " + aError.result + ")");
-        },
-        handleCompletion(aReason) {
-          // the query may not have returned all our providers, so we have
-          // stamped the frecency on the provider and sort here. This makes sure
-          // all enabled providers get sorted even with frecency zero.
-          let providerList = SocialServiceInternal.providerArray;
-          // reverse sort
-          aCallback(providerList.sort((a, b) => b.frecency - a.frecency));
-        }
-      });
-    } finally {
-      stmt.finalize();
-    }
-  }
-};
-
-XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function() {
-  initService();
-  let providers = {};
-  for (let manifest of this.manifests) {
-    try {
-      if (ActiveProviders.has(manifest.origin)) {
-        // enable the api when a provider is enabled
-        let provider = new SocialProvider(manifest);
-        providers[provider.origin] = provider;
-      }
-    } catch (err) {
-      Cu.reportError("SocialService: failed to load provider: " + manifest.origin +
-                     ", exception: " + err);
-    }
-  }
-  return providers;
-});
-
-function getOriginActivationType(origin) {
-  // if this is an about uri, treat it as a directory
-  let URI = Services.io.newURI(origin);
-  let principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
-  if (Services.scriptSecurityManager.isSystemPrincipal(principal) || origin == "moz-safe-about:home") {
-    return "internal";
-  }
-
-  let directories = Services.prefs.getCharPref("social.directories").split(",");
-  if (directories.indexOf(origin) >= 0)
-    return "directory";
-
-  return "foreign";
-}
-
-var ActiveProviders = {
-  get _providers() {
-    delete this._providers;
-    this._providers = {};
-    try {
-      let pref = Services.prefs.getStringPref("social.activeProviders");
-      this._providers = JSON.parse(pref);
-    } catch (ex) {}
-    return this._providers;
-  },
-
-  has(origin) {
-    return (origin in this._providers);
-  },
-
-  add(origin) {
-    this._providers[origin] = 1;
-    this._deferredTask.arm();
-  },
-
-  delete(origin) {
-    delete this._providers[origin];
-    this._deferredTask.arm();
-  },
-
-  flush() {
-    this._deferredTask.disarm();
-    this._persist();
-  },
-
-  get _deferredTask() {
-    delete this._deferredTask;
-    return this._deferredTask = new DeferredTask(this._persist.bind(this), 0);
-  },
-
-  _persist() {
-    Services.prefs.setStringPref("social.activeProviders",
-                                 JSON.stringify(this._providers));
-  }
-};
-
-function migrateSettings() {
-  let enabled;
-  if (Services.prefs.prefHasUserValue("social.enabled")) {
-    enabled = Services.prefs.getBoolPref("social.enabled");
-  }
-  if (Services.prefs.getCharPref("social.activeProviders", "")) {
-    // migration from fx21 to fx22 or later
-    // ensure any *builtin* provider in activeproviders is in user level prefs
-    for (let origin in ActiveProviders._providers) {
-      let prefname;
-      let manifest;
-      let defaultManifest;
-      try {
-        prefname = getPrefnameFromOrigin(origin);
-        manifest = JSON.parse(Services.prefs.getStringPref(prefname));
-      } catch (e) {
-        // Our preference is missing or bad, remove from ActiveProviders and
-        // continue. This is primarily an error-case and should only be
-        // reached by either messing with preferences or hitting the one or
-        // two days of nightly that ran into it, so we'll flush right away.
-        ActiveProviders.delete(origin);
-        ActiveProviders.flush();
-        continue;
-      }
-      let needsUpdate = !manifest.updateDate;
-      // fx23 may have built-ins with shareURL
-      try {
-        defaultManifest = Services.prefs.getDefaultBranch(null).getStringPref(prefname);
-        defaultManifest = JSON.parse(defaultManifest);
-      } catch (e) {
-        // not a built-in, continue
-      }
-      if (defaultManifest) {
-        if (defaultManifest.shareURL && !manifest.shareURL) {
-          manifest.shareURL = defaultManifest.shareURL;
-          needsUpdate = true;
-        }
-        if (defaultManifest.version && (!manifest.version || defaultManifest.version > manifest.version)) {
-          manifest = defaultManifest;
-          needsUpdate = true;
-        }
-      }
-      if (needsUpdate) {
-        // the provider was installed with an older build, so we will update the
-        // timestamp and ensure the manifest is in user prefs
-        delete manifest.builtin;
-        // we're potentially updating for share, so always mark the updateDate
-        manifest.updateDate = Date.now();
-        if (!manifest.installDate)
-          manifest.installDate = 0; // we don't know when it was installed
-
-        Services.prefs.setStringPref(prefname, JSON.stringify(manifest));
-      }
-      // as of fx 29, we no longer rely on social.enabled. migration from prior
-      // versions should disable all service addons if social.enabled=false
-      if (enabled === false) {
-        ActiveProviders.delete(origin);
-      }
-    }
-    ActiveProviders.flush();
-    Services.prefs.clearUserPref("social.enabled");
-    return;
-  }
-
-  // primary migration from pre-fx21
-  let active = Services.prefs.getBoolPref("social.active", false);
-  if (!active)
-    return;
-
-  // primary difference from SocialServiceInternal.manifests is that we
-  // only read the default branch here.
-  let manifestPrefs = Services.prefs.getDefaultBranch("social.manifest.");
-  let prefs = manifestPrefs.getChildList("", []);
-  for (let pref of prefs) {
-    try {
-      let manifest;
-      try {
-        manifest = JSON.parse(manifestPrefs.getStringPref(pref));
-      } catch (e) {
-        // bad or missing preference, we wont update this one.
-        continue;
-      }
-      if (manifest && typeof(manifest) == "object" && manifest.origin) {
-        // our default manifests have been updated with the builtin flags as of
-        // fx22, delete it so we can set the user-pref
-        delete manifest.builtin;
-        if (!manifest.updateDate) {
-          manifest.updateDate = Date.now();
-          manifest.installDate = 0; // we don't know when it was installed
-        }
-
-        // pref here is just the branch name, set the full pref name
-        Services.prefs.setStringPref("social.manifest." + pref,
-                                     JSON.stringify(manifest));
-        ActiveProviders.add(manifest.origin);
-        ActiveProviders.flush();
-        // social.active was used at a time that there was only one
-        // builtin, we'll assume that is still the case
-        return;
-      }
-    } catch (err) {
-      Cu.reportError("SocialService: failed to load manifest: " + pref + ", exception: " + err);
-    }
-  }
-}
-
-function initService() {
-  Services.obs.addObserver(function xpcomShutdown() {
-    ActiveProviders.flush();
-    SocialService._providerListeners = null;
-    Services.obs.removeObserver(xpcomShutdown, "xpcom-shutdown");
-  }, "xpcom-shutdown");
-
-  try {
-    migrateSettings();
-  } catch (e) {
-    // no matter what, if migration fails we do not want to render social
-    // unusable. Worst case scenario is that, when upgrading Firefox, previously
-    // enabled providers are not migrated.
-    Cu.reportError("Error migrating social settings: " + e);
-  }
-}
-
-function schedule(callback) {
-  Services.tm.dispatchToMainThread(callback);
-}
-
-// Public API
-this.SocialService = {
-  get hasEnabledProviders() {
-    // used as an optimization during startup, can be used to check if further
-    // initialization should be done (e.g. creating the instances of
-    // SocialProvider and turning on UI). ActiveProviders may have changed and
-    // not yet flushed so we check the active providers array
-    for (let p in ActiveProviders._providers) {
-      return true;
-    }
-    return false;
-  },
-  get enabled() {
-    return SocialServiceInternal.enabled;
-  },
-  set enabled(val) {
-    throw new Error("not allowed to set SocialService.enabled");
-  },
-
-  // Enables a provider, the manifest must already exist in prefs. The provider
-  // may or may not have previously been added. onDone is always called
-  // - with null if no such provider exists, or the activated provider on
-  // success.
-  enableProvider: function enableProvider(origin, onDone) {
-    if (SocialServiceInternal.providers[origin]) {
-      schedule(function() {
-        onDone(SocialServiceInternal.providers[origin]);
-      });
-      return;
-    }
-    let manifest = SocialService.getManifestByOrigin(origin);
-    if (manifest) {
-      let addon = new AddonWrapper(manifest);
-      AddonManagerPrivate.callAddonListeners("onEnabling", addon, false);
-      addon.pendingOperations |= AddonManager.PENDING_ENABLE;
-      this.addProvider(manifest, onDone);
-      addon.pendingOperations -= AddonManager.PENDING_ENABLE;
-      AddonManagerPrivate.callAddonListeners("onEnabled", addon);
-      return;
-    }
-    schedule(function() {
-      onDone(null);
-    });
-  },
-
-  // Adds a provider given a manifest, and returns the added provider.
-  addProvider: function addProvider(manifest, onDone) {
-    if (SocialServiceInternal.providers[manifest.origin])
-      throw new Error("SocialService.addProvider: provider with this origin already exists");
-
-    // enable the api when a provider is enabled
-    let provider = new SocialProvider(manifest);
-    SocialServiceInternal.providers[provider.origin] = provider;
-    ActiveProviders.add(provider.origin);
-
-    this.getOrderedProviderList(providers => {
-      this._notifyProviderListeners("provider-enabled", provider.origin, providers);
-      if (onDone)
-        onDone(provider);
-    });
-  },
-
-  // Removes a provider with the given origin, and notifies when the removal is
-  // complete.
-  disableProvider: function disableProvider(origin, onDone) {
-    if (!(origin in SocialServiceInternal.providers))
-      throw new Error("SocialService.disableProvider: no provider with origin " + origin + " exists!");
-
-    let provider = SocialServiceInternal.providers[origin];
-    let manifest = SocialService.getManifestByOrigin(origin);
-    let addon = manifest && new AddonWrapper(manifest);
-    if (addon) {
-      AddonManagerPrivate.callAddonListeners("onDisabling", addon, false);
-      addon.pendingOperations |= AddonManager.PENDING_DISABLE;
-    }
-    provider.enabled = false;
-
-    ActiveProviders.delete(provider.origin);
-
-    delete SocialServiceInternal.providers[origin];
-
-    if (addon) {
-      // we have to do this now so the addon manager ui will update an uninstall
-      // correctly.
-      addon.pendingOperations -= AddonManager.PENDING_DISABLE;
-      AddonManagerPrivate.callAddonListeners("onDisabled", addon);
-    }
-
-    this.getOrderedProviderList(providers => {
-      this._notifyProviderListeners("provider-disabled", origin, providers);
-      if (onDone)
-        onDone();
-    });
-  },
-
-  // Returns a single provider object with the specified origin.  The provider
-  // must be "installed" (ie, in ActiveProviders)
-  getProvider: function getProvider(origin, onDone) {
-    schedule((function() {
-      onDone(SocialServiceInternal.providers[origin] || null);
-    }));
-  },
-
-  // Returns an unordered array of installed providers
-  getProviderList(onDone) {
-    schedule(function() {
-      onDone(SocialServiceInternal.providerArray);
-    });
-  },
-
-  getManifestByOrigin(origin) {
-    for (let manifest of SocialServiceInternal.manifests) {
-      if (origin == manifest.origin) {
-        return manifest;
-      }
-    }
-    return null;
-  },
-
-  // Returns an array of installed providers, sorted by frecency
-  getOrderedProviderList(onDone) {
-    SocialServiceInternal.orderedProviders(onDone);
-  },
-
-  getOriginActivationType(origin) {
-    return getOriginActivationType(origin);
-  },
-
-  _providerListeners: new Map(),
-  registerProviderListener: function registerProviderListener(listener) {
-    this._providerListeners.set(listener, 1);
-  },
-  unregisterProviderListener: function unregisterProviderListener(listener) {
-    this._providerListeners.delete(listener);
-  },
-
-  _notifyProviderListeners(topic, origin, providers) {
-    for (let [listener, ] of this._providerListeners) {
-      try {
-        listener(topic, origin, providers);
-      } catch (ex) {
-        Components.utils.reportError("SocialService: provider listener threw an exception: " + ex);
-      }
-    }
-  },
-
-  _manifestFromData(type, data, installOrigin) {
-    let featureURLs = ["shareURL"];
-    let resolveURLs = featureURLs.concat(["postActivationURL"]);
-
-    if (type == "directory" || type == "internal") {
-      // directory provided manifests must have origin in manifest, use that
-      if (!data.origin) {
-        Cu.reportError("SocialService.manifestFromData directory service provided manifest without origin.");
-        return null;
-      }
-      installOrigin = data.origin;
-    }
-    // force/fixup origin
-    let URI = Services.io.newURI(installOrigin);
-    let principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
-    data.origin = principal.origin;
-
-    // iconURL and name are required
-    let providerHasFeatures = featureURLs.some(url => data[url]);
-    if (!providerHasFeatures) {
-      Cu.reportError("SocialService.manifestFromData manifest missing required urls.");
-      return null;
-    }
-    if (!data.name || !data.iconURL) {
-      Cu.reportError("SocialService.manifestFromData manifest missing name or iconURL.");
-      return null;
-    }
-    for (let url of resolveURLs) {
-      if (data[url]) {
-        try {
-          let resolved = Services.io.newURI(principal.URI.resolve(data[url]));
-          if (!(resolved.schemeIs("http") || resolved.schemeIs("https"))) {
-            Cu.reportError("SocialService.manifestFromData unsupported scheme '" + resolved.scheme + "' for " + principal.origin);
-            return null;
-          }
-          data[url] = resolved.spec;
-        } catch (e) {
-          Cu.reportError("SocialService.manifestFromData unable to resolve '" + url + "' for " + principal.origin);
-          return null;
-        }
-      }
-    }
-    return data;
-  },
-
-  _showInstallNotification(data, aAddonInstaller) {
-    let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
-    let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-
-    // internal/directory activations need to use the manifest origin, any other
-    // use the domain activation is occurring on
-    let url = data.url;
-    if (data.installType == "internal" || data.installType == "directory") {
-      url = data.manifest.origin;
-    }
-    let requestingURI =  Services.io.newURI(url);
-    let productName = brandBundle.GetStringFromName("brandShortName");
-
-    let message = browserBundle.formatStringFromName("service.install.description",
-                                                     [requestingURI.host, productName], 2);
-
-    let action = {
-      label: browserBundle.GetStringFromName("service.install.ok.label"),
-      accessKey: browserBundle.GetStringFromName("service.install.ok.accesskey"),
-      callback() {
-        aAddonInstaller.install();
-      },
-    };
-
-    let options = {
-                    learnMoreURL: Services.urlFormatter.formatURLPref("app.support.baseURL") + "social-api",
-                    persistent: true,
-                  };
-    let anchor = "servicesInstall-notification-icon";
-    let notificationid = "servicesInstall";
-    data.window.PopupNotifications.show(data.window.gBrowser.selectedBrowser,
-                                        notificationid, message, anchor,
-                                        action, [], options);
-  },
-
-  installProvider(data, installCallback, options = {}) {
-    data.installType = getOriginActivationType(data.origin);
-    // if we get data, we MUST have a valid manifest generated from the data
-    let manifest = this._manifestFromData(data.installType, data.manifest, data.origin);
-    if (!manifest)
-      throw new Error("SocialService.installProvider: service configuration is invalid from " + data.url);
-
-    let addon = new AddonWrapper(manifest);
-    if (addon && addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED)
-      throw new Error("installProvider: provider with origin [" +
-                      data.origin + "] is blocklisted");
-    // manifestFromData call above will enforce correct origin. To support
-    // activation from about: uris, we need to be sure to use the updated
-    // origin on the manifest.
-    data.manifest = manifest;
-    let id = getAddonIDFromOrigin(manifest.origin);
-    AddonManager.getAddonByID(id, aAddon => {
-      if (aAddon && aAddon.userDisabled) {
-        aAddon.cancelUninstall();
-        aAddon.userDisabled = false;
-      }
-      schedule(() => {
-        try {
-          this._installProvider(data, options, aManifest => {
-              this._notifyProviderListeners("provider-installed", aManifest.origin);
-              installCallback(aManifest);
-          });
-        } catch (e) {
-          Cu.reportError("Activation failed: " + e);
-          installCallback(null);
-        }
-      });
-    });
-  },
-
-  _installProvider(data, options, installCallback) {
-    if (!data.manifest)
-      throw new Error("Cannot install provider without manifest data");
-
-    if (data.installType == "foreign" && !Services.prefs.getBoolPref("social.remote-install.enabled"))
-      throw new Error("Remote install of services is disabled");
-
-    // if installing from any website, the install must happen over https.
-    // "internal" are installs from about:home or similar
-    if (data.installType != "internal" && !Services.io.newURI(data.origin).schemeIs("https")) {
-      throw new Error("attempt to activate provider over unsecured channel: " + data.origin);
-    }
-
-    let installer = new AddonInstaller(data.url, data.manifest, installCallback);
-    let bypassPanel = options.bypassInstallPanel ||
-                      (data.installType == "internal" && data.manifest.oneclick);
-    if (bypassPanel)
-      installer.install();
-    else
-      this._showInstallNotification(data, installer);
-  },
-
-  createWrapper(manifest) {
-    return new AddonWrapper(manifest);
-  },
-
-  /**
-   * updateProvider is used from the worker to self-update.  Since we do not
-   * have knowledge of the currently selected provider here, we will notify
-   * the front end to deal with any reload.
-   */
-  updateProvider(aUpdateOrigin, aManifest) {
-    let installType = this.getOriginActivationType(aUpdateOrigin);
-    // if we get data, we MUST have a valid manifest generated from the data
-    let manifest = this._manifestFromData(installType, aManifest, aUpdateOrigin);
-    if (!manifest)
-      throw new Error("SocialService.installProvider: service configuration is invalid from " + aUpdateOrigin);
-
-    // overwrite the preference
-    Services.prefs.setStringPref(getPrefnameFromOrigin(manifest.origin),
-                                 JSON.stringify(manifest));
-
-    // overwrite the existing provider then notify the front end so it can
-    // handle any reload that might be necessary.
-    if (ActiveProviders.has(manifest.origin)) {
-      let provider = SocialServiceInternal.providers[manifest.origin];
-      provider.enabled = false;
-      provider = new SocialProvider(manifest);
-      SocialServiceInternal.providers[provider.origin] = provider;
-      // update the cache and ui, reload provider if necessary
-      this.getOrderedProviderList(providers => {
-        this._notifyProviderListeners("provider-update", provider.origin, providers);
-      });
-    }
-
-  },
-
-  uninstallProvider(origin, aCallback) {
-    let manifest = SocialService.getManifestByOrigin(origin);
-    let addon = new AddonWrapper(manifest);
-    addon.uninstall(aCallback);
-  }
-};
-
-/**
- * The SocialProvider object represents a social provider.
- *
- * @constructor
- * @param {jsobj} object representing the manifest file describing this provider
- * @param {bool} boolean indicating whether this provider is "built in"
- */
-function SocialProvider(input) {
-  if (!input.name)
-    throw new Error("SocialProvider must be passed a name");
-  if (!input.origin)
-    throw new Error("SocialProvider must be passed an origin");
-
-  let addon = new AddonWrapper(input);
-  if (addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED)
-    throw new Error("SocialProvider: provider with origin [" +
-                    input.origin + "] is blocklisted");
-
-  this.name = input.name;
-  this.iconURL = input.iconURL;
-  this.icon32URL = input.icon32URL;
-  this.icon64URL = input.icon64URL;
-  this.shareURL = input.shareURL;
-  this.postActivationURL = input.postActivationURL;
-  this.origin = input.origin;
-  let originUri = Services.io.newURI(input.origin);
-  this.principal = Services.scriptSecurityManager.createCodebasePrincipal(originUri, {});
-  this.ambientNotificationIcons = {};
-  this.errorState = null;
-  this.frecency = 0;
-
-  try {
-    this.domain = etld.getBaseDomainFromHost(originUri.host);
-  } catch (e) {
-    this.domain = originUri.host;
-  }
-}
-
-SocialProvider.prototype = {
-  reload() {
-    // calling terminate/activate does not set the enabled state whereas setting
-    // enabled will call terminate/activate
-    this.enabled = false;
-    this.enabled = true;
-    Services.obs.notifyObservers(null, "social:provider-reload", this.origin);
-  },
-
-  // Provider enabled/disabled state.
-  _enabled: false,
-  get enabled() {
-    return this._enabled;
-  },
-  set enabled(val) {
-    let enable = !!val;
-    if (enable == this._enabled)
-      return;
-
-    this._enabled = enable;
-
-    if (enable) {
-      this._activate();
-    } else {
-      this._terminate();
-    }
-  },
-
-  get manifest() {
-    return SocialService.getManifestByOrigin(this.origin);
-  },
-
-  getPageSize(name) {
-    let manifest = this.manifest;
-    if (manifest && manifest.pageSize)
-      return manifest.pageSize[name];
-    return undefined;
-  },
-
-  // Internal helper methods
-  _activate: function _activate() {
-  },
-
-  _terminate: function _terminate() {
-    this.errorState = null;
-  },
-
-  /**
-   * Checks if a given URI is of the same origin as the provider.
-   *
-   * Returns true or false.
-   *
-   * @param {URI or string} uri
-   */
-  isSameOrigin: function isSameOrigin(uri, allowIfInheritsPrincipal) {
-    if (!uri)
-      return false;
-    if (typeof uri == "string") {
-      try {
-        uri = Services.io.newURI(uri);
-      } catch (ex) {
-        // an invalid URL can't be loaded!
-        return false;
-      }
-    }
-    try {
-      this.principal.checkMayLoad(
-        uri, // the thing to check.
-        false, // reportError - we do our own reporting when necessary.
-        allowIfInheritsPrincipal
-      );
-      return true;
-    } catch (ex) {
-      return false;
-    }
-  },
-
-  /**
-   * Resolve partial URLs for a provider.
-   *
-   * Returns nsIURI object or null on failure
-   *
-   * @param {string} url
-   */
-  resolveUri: function resolveUri(url) {
-    try {
-      let fullURL = this.principal.URI.resolve(url);
-      return Services.io.newURI(fullURL);
-    } catch (ex) {
-      Cu.reportError("mozSocial: failed to resolve window URL: " + url + "; " + ex);
-      return null;
-    }
-  }
-};
-
-function getAddonIDFromOrigin(origin) {
-  let originUri = Services.io.newURI(origin);
-  return originUri.host + ID_SUFFIX;
-}
-
-function getPrefnameFromOrigin(origin) {
-  return "social.manifest." + SocialServiceInternal.getManifestPrefname(origin);
-}
-
-function AddonInstaller(sourceURI, aManifest, installCallback) {
-  aManifest.updateDate = Date.now();
-  // get the existing manifest for installDate
-  let manifest = SocialService.getManifestByOrigin(aManifest.origin);
-  let isNewInstall = !manifest;
-  if (manifest && manifest.installDate)
-    aManifest.installDate = manifest.installDate;
-  else
-    aManifest.installDate = aManifest.updateDate;
-
-  this.sourceURI = sourceURI;
-  this.install = function() {
-    let addon = this.addon;
-    if (isNewInstall) {
-      AddonManagerPrivate.callInstallListeners("onExternalInstall", null, addon, null, false);
-      AddonManagerPrivate.callAddonListeners("onInstalling", addon, false);
-    }
-
-    Services.prefs.setStringPref(getPrefnameFromOrigin(aManifest.origin),
-                                 JSON.stringify(aManifest));
-
-    if (isNewInstall) {
-      AddonManagerPrivate.callAddonListeners("onInstalled", addon);
-    }
-    installCallback(aManifest);
-  };
-  this.cancel = function() {
-    Services.prefs.clearUserPref(getPrefnameFromOrigin(aManifest.origin));
-  };
-  this.addon = new AddonWrapper(aManifest);
-}
-
-var SocialAddonProvider = {
-  startup() {},
-
-  shutdown() {},
-
-  updateAddonAppDisabledStates() {
-    // we wont bother with "enabling" services that are released from blocklist
-    for (let manifest of SocialServiceInternal.manifests) {
-      try {
-        if (ActiveProviders.has(manifest.origin)) {
-          let addon = new AddonWrapper(manifest);
-          if (addon.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
-            SocialService.disableProvider(manifest.origin);
-          }
-        }
-      } catch (e) {
-        Cu.reportError(e);
-      }
-    }
-  },
-
-  getAddonByID(aId, aCallback) {
-    for (let manifest of SocialServiceInternal.manifests) {
-      if (aId == getAddonIDFromOrigin(manifest.origin)) {
-        aCallback(new AddonWrapper(manifest));
-        return;
-      }
-    }
-    aCallback(null);
-  },
-
-  getAddonsByTypes(aTypes, aCallback) {
-    if (aTypes && aTypes.indexOf(ADDON_TYPE_SERVICE) == -1) {
-      aCallback([]);
-      return;
-    }
-    aCallback([...SocialServiceInternal.manifests].map(a => new AddonWrapper(a)));
-  },
-
-  removeAddon(aAddon, aCallback) {
-    AddonManagerPrivate.callAddonListeners("onUninstalling", aAddon, false);
-    aAddon.pendingOperations |= AddonManager.PENDING_UNINSTALL;
-    Services.prefs.clearUserPref(getPrefnameFromOrigin(aAddon.manifest.origin));
-    aAddon.pendingOperations -= AddonManager.PENDING_UNINSTALL;
-    AddonManagerPrivate.callAddonListeners("onUninstalled", aAddon);
-    SocialService._notifyProviderListeners("provider-uninstalled", aAddon.manifest.origin);
-    if (aCallback)
-      schedule(aCallback);
-  }
-};
-
-
-function AddonWrapper(aManifest) {
-  this.manifest = aManifest;
-  this.id = getAddonIDFromOrigin(this.manifest.origin);
-  this._pending = AddonManager.PENDING_NONE;
-}
-AddonWrapper.prototype = {
-  get type() {
-    return ADDON_TYPE_SERVICE;
-  },
-
-  get appDisabled() {
-    return this.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED;
-  },
-
-  set softDisabled(val) {
-    this.userDisabled = val;
-  },
-
-  get softDisabled() {
-    return this.userDisabled;
-  },
-
-  get isCompatible() {
-    return true;
-  },
-
-  get isPlatformCompatible() {
-    return true;
-  },
-
-  get scope() {
-    return AddonManager.SCOPE_PROFILE;
-  },
-
-  get foreignInstall() {
-    return false;
-  },
-
-  isCompatibleWith(appVersion, platformVersion) {
-    return true;
-  },
-
-  get providesUpdatesSecurely() {
-    return true;
-  },
-
-  get blocklistState() {
-    return Services.blocklist.getAddonBlocklistState(this);
-  },
-
-  get blocklistURL() {
-    return Services.blocklist.getAddonBlocklistURL(this);
-  },
-
-  get screenshots() {
-    return [];
-  },
-
-  get pendingOperations() {
-    return this._pending || AddonManager.PENDING_NONE;
-  },
-  set pendingOperations(val) {
-    this._pending = val;
-  },
-
-  get operationsRequiringRestart() {
-    return AddonManager.OP_NEEDS_RESTART_NONE;
-  },
-
-  get size() {
-    return null;
-  },
-
-  get permissions() {
-    let permissions = 0;
-    // any "user defined" manifest can be removed
-    if (Services.prefs.prefHasUserValue(getPrefnameFromOrigin(this.manifest.origin)))
-      permissions = AddonManager.PERM_CAN_UNINSTALL;
-    if (!this.appDisabled) {
-      if (this.userDisabled) {
-        permissions |= AddonManager.PERM_CAN_ENABLE;
-      } else {
-        permissions |= AddonManager.PERM_CAN_DISABLE;
-      }
-    }
-    return permissions;
-  },
-
-  findUpdates(listener, reason, appVersion, platformVersion) {
-    if ("onNoCompatibilityUpdateAvailable" in listener)
-      listener.onNoCompatibilityUpdateAvailable(this);
-    if ("onNoUpdateAvailable" in listener)
-      listener.onNoUpdateAvailable(this);
-    if ("onUpdateFinished" in listener)
-      listener.onUpdateFinished(this);
-  },
-
-  get isActive() {
-    return ActiveProviders.has(this.manifest.origin);
-  },
-
-  get name() {
-    return this.manifest.name;
-  },
-  get version() {
-    return this.manifest.version ? this.manifest.version.toString() : "";
-  },
-
-  get iconURL() {
-    return this.manifest.icon32URL ? this.manifest.icon32URL : this.manifest.iconURL;
-  },
-  get icon64URL() {
-    return this.manifest.icon64URL;
-  },
-  get icons() {
-    let icons = {
-      16: this.manifest.iconURL
-    };
-    if (this.manifest.icon32URL)
-      icons[32] = this.manifest.icon32URL;
-    if (this.manifest.icon64URL)
-      icons[64] = this.manifest.icon64URL;
-    return icons;
-  },
-
-  get description() {
-    return this.manifest.description;
-  },
-  get homepageURL() {
-    return this.manifest.homepageURL;
-  },
-  get defaultLocale() {
-    return this.manifest.defaultLocale;
-  },
-  get selectedLocale() {
-    return this.manifest.selectedLocale;
-  },
-
-  get installDate() {
-    return this.manifest.installDate ? new Date(this.manifest.installDate) : null;
-  },
-  get updateDate() {
-    return this.manifest.updateDate ? new Date(this.manifest.updateDate) : null;
-  },
-
-  get creator() {
-    return new AddonManagerPrivate.AddonAuthor(this.manifest.author);
-  },
-
-  get userDisabled() {
-    return this.appDisabled || !ActiveProviders.has(this.manifest.origin);
-  },
-
-  set userDisabled(val) {
-    if (val == this.userDisabled)
-      return val;
-    if (val) {
-      SocialService.disableProvider(this.manifest.origin);
-    } else if (!this.appDisabled) {
-      SocialService.enableProvider(this.manifest.origin);
-    }
-    return val;
-  },
-
-  uninstall(aCallback) {
-    let prefName = getPrefnameFromOrigin(this.manifest.origin);
-    if (Services.prefs.prefHasUserValue(prefName)) {
-      if (ActiveProviders.has(this.manifest.origin)) {
-        SocialService.disableProvider(this.manifest.origin, () => {
-          SocialAddonProvider.removeAddon(this, aCallback);
-        });
-      } else {
-        SocialAddonProvider.removeAddon(this, aCallback);
-      }
-    } else {
-      schedule(aCallback);
-    }
-  },
-
-  cancelUninstall() {
-    this._pending -= AddonManager.PENDING_UNINSTALL;
-    AddonManagerPrivate.callAddonListeners("onOperationCancelled", this);
-  }
-};
-
-
-AddonManagerPrivate.registerProvider(SocialAddonProvider, [
-  new AddonManagerPrivate.AddonType(ADDON_TYPE_SERVICE, URI_EXTENSION_STRINGS,
-                                    STRING_TYPE_NAME,
-                                    AddonManager.VIEW_TYPE_LIST, 10000)
-]);
--- a/browser/modules/moz.build
+++ b/browser/modules/moz.build
@@ -89,19 +89,16 @@ with Files("ReaderParent.jsm"):
     BUG_COMPONENT = ("Toolkit", "Reader Mode")
 
 with Files("Sanitizer.jsm"):
     BUG_COMPONENT = ("Firefox", "Preferences")
 
 with Files("SitePermissions.jsm"):
     BUG_COMPONENT = ("Firefox", "Site Identity and Permission Panels")
 
-with Files("Social*"):
-    BUG_COMPONENT = ("Firefox", "SocialAPI")
-
 with Files("TransientPrefs.jsm"):
     BUG_COMPONENT = ("Firefox", "Preferences")
 
 with Files("Windows8WindowFrameColor.jsm"):
     BUG_COMPONENT = ("Firefox", "Theme")
 
 with Files("WindowsJumpLists.jsm"):
     BUG_COMPONENT = ("Firefox", "Shell Integration")
@@ -118,20 +115,17 @@ with Files("UpdateTopLevelContentWindowI
 with Files("webrtcUI.jsm"):
     BUG_COMPONENT = ("Firefox", "Device Permissions")
 
 with Files("ZoomUI.jsm"):
     BUG_COMPONENT = ("Firefox", "Toolbars and Customization")
 
 
 BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
-XPCSHELL_TESTS_MANIFESTS += [
-    'test/unit/social/xpcshell.ini',
-    'test/unit/xpcshell.ini',
-]
+XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 
 EXTRA_JS_MODULES += [
     'AboutHome.jsm',
     'AboutNewTab.jsm',
     'AttributionCode.jsm',
     'BrowserUITelemetry.jsm',
     'BrowserUsageTelemetry.jsm',
     'CastingApps.jsm',
@@ -153,18 +147,16 @@ EXTRA_JS_MODULES += [
     'PermissionUI.jsm',
     'PluginContent.jsm',
     'ProcessHangMonitor.jsm',
     'ReaderParent.jsm',
     'RecentWindow.jsm',
     'RemotePrompt.jsm',
     'Sanitizer.jsm',
     'SitePermissions.jsm',
-    'Social.jsm',
-    'SocialService.jsm',
     'TransientPrefs.jsm',
     'UpdateTopLevelContentWindowIDHelper.jsm',
     'webrtcUI.jsm',
     'ZoomUI.jsm',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     EXTRA_JS_MODULES += [
deleted file mode 100644
--- a/browser/modules/test/unit/social/blocklist.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
-  <emItems>
-    <emItem  blockID="s1" id="bad.com@services.mozilla.org"></emItem>
-  </emItems>
-</blocklist>
deleted file mode 100644
--- a/browser/modules/test/unit/social/head.js
+++ /dev/null
@@ -1,202 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var Social, SocialService;
-
-var manifests = [
-  {
-    name: "provider 1",
-    origin: "https://example1.com",
-    sidebarURL: "https://example1.com/sidebar/",
-  },
-  {
-    name: "provider 2",
-    origin: "https://example2.com",
-    sidebarURL: "https://example1.com/sidebar/",
-  }
-];
-
-const MANIFEST_PREFS = Services.prefs.getBranch("social.manifest.");
-
-// SocialProvider class relies on blocklisting being enabled.  To enable
-// blocklisting, we have to setup an app and initialize the blocklist (see
-// initApp below).
-const gProfD = do_get_profile();
-
-function createAppInfo(ID, name, version, platformVersion = "1.0") {
-  let tmp = {};
-  Cu.import("resource://testing-common/AppInfo.jsm", tmp);
-  tmp.updateAppInfo({
-    ID, name, version, platformVersion,
-    crashReporter: true,
-  });
-}
-
-function initApp() {
-  createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
-  // prepare a blocklist file for the blocklist service
-  var blocklistFile = gProfD.clone();
-  blocklistFile.append("blocklist.xml");
-  if (blocklistFile.exists())
-    blocklistFile.remove(false);
-  var source = do_get_file("blocklist.xml");
-  source.copyTo(gProfD, "blocklist.xml");
-  blocklistFile.lastModifiedTime = Date.now();
-
-
-  let internalManager = Cc["@mozilla.org/addons/integration;1"].
-                     getService(Ci.nsIObserver).
-                     QueryInterface(Ci.nsITimerCallback);
-
-  internalManager.observe(null, "addons-startup", null);
-}
-
-function setManifestPref(manifest) {
-  Services.prefs.setStringPref("social.manifest." + manifest.origin,
-                               JSON.stringify(manifest));
-}
-
-function do_wait_observer(obsTopic, cb) {
-  function observer(subject, topic, data) {
-    Services.obs.removeObserver(observer, topic);
-    cb();
-  }
-  Services.obs.addObserver(observer, obsTopic);
-}
-
-function do_add_providers(cb) {
-  // run only after social is already initialized
-  SocialService.addProvider(manifests[0], function() {
-    do_wait_observer("social:providers-changed", function() {
-      do_check_eq(Social.providers.length, 2, "2 providers installed");
-      do_execute_soon(cb);
-    });
-    SocialService.addProvider(manifests[1]);
-  });
-}
-
-function do_initialize_social(enabledOnStartup, cb) {
-  initApp();
-
-  if (enabledOnStartup) {
-    // set prefs before initializing social
-    manifests.forEach(function(manifest) {
-      setManifestPref(manifest);
-    });
-    // Set both providers active and flag the first one as "current"
-    let active = {};
-    for (let m of manifests)
-      active[m.origin] = 1;
-    Services.prefs.setStringPref("social.activeProviders",
-                                 JSON.stringify(active));
-
-    do_register_cleanup(function() {
-      manifests.forEach(function(manifest) {
-        Services.prefs.clearUserPref("social.manifest." + manifest.origin);
-      });
-      Services.prefs.clearUserPref("social.activeProviders");
-    });
-
-    // expecting 2 providers installed
-    do_wait_observer("social:providers-changed", function() {
-      do_check_eq(Social.providers.length, 2, "2 providers installed");
-      do_execute_soon(cb);
-    });
-  }
-
-  // import and initialize everything
-  SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-  do_check_eq(enabledOnStartup, SocialService.hasEnabledProviders, "Service has enabled providers");
-  Social = Cu.import("resource:///modules/Social.jsm", {}).Social;
-  do_check_false(Social.initialized, "Social is not initialized");
-  Social.init();
-  do_check_true(Social.initialized, "Social is initialized");
-  if (!enabledOnStartup)
-    do_execute_soon(cb);
-}
-
-function AsyncRunner() {
-  do_test_pending();
-  do_register_cleanup(() => this.destroy());
-
-  this._callbacks = {
-    done: do_test_finished,
-    error(err) {
-      // xpcshell test functions like do_check_eq throw NS_ERROR_ABORT on
-      // failure.  Ignore those so they aren't rethrown here.
-      if (err !== Cr.NS_ERROR_ABORT) {
-        if (err.stack) {
-          err = err + " - See following stack:\n" + err.stack +
-                      "\nUseless do_throw stack";
-        }
-        do_throw(err);
-      }
-    },
-    consoleError(scriptErr) {
-      // Try to ensure the error is related to the test.
-      let filename = scriptErr.sourceName || scriptErr.toString() || "";
-      if (filename.indexOf("/toolkit/components/social/") >= 0)
-        do_throw(scriptErr);
-    },
-  };
-  this._iteratorQueue = [];
-
-  // This catches errors reported to the console, e.g., via Cu.reportError, but
-  // not on the runner's stack.
-  Cc["@mozilla.org/consoleservice;1"].
-    getService(Ci.nsIConsoleService).
-    registerListener(this);
-}
-
-AsyncRunner.prototype = {
-
-  appendIterator: function appendIterator(iter) {
-    this._iteratorQueue.push(iter);
-  },
-
-  next: function next(arg) {
-    if (!this._iteratorQueue.length) {
-      this.destroy();
-      this._callbacks.done();
-      return;
-    }
-
-    try {
-      var { done, value: val } = this._iteratorQueue[0].next(arg);
-      if (done) {
-        this._iteratorQueue.shift();
-        this.next();
-        return;
-      }
-    } catch (err) {
-      this._callbacks.error(err);
-    }
-
-    // val is an iterator => prepend it to the queue and start on it
-    // val is otherwise truthy => call next
-    if (val) {
-      if (typeof(val) != "boolean")
-        this._iteratorQueue.unshift(val);
-      this.next();
-    }
-  },
-
-  destroy: function destroy() {
-    Cc["@mozilla.org/consoleservice;1"].
-      getService(Ci.nsIConsoleService).
-      unregisterListener(this);
-    this.destroy = function alreadyDestroyed() {};
-  },
-
-  observe: function observe(msg) {
-    if (msg instanceof Ci.nsIScriptError &&
-        !(msg.flags & Ci.nsIScriptError.warningFlag)) {
-      this._callbacks.consoleError(msg);
-    }
-  },
-};
deleted file mode 100644
--- a/browser/modules/test/unit/social/test_SocialService.js
+++ /dev/null
@@ -1,166 +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/. */
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
-  "resource://testing-common/PlacesTestUtils.jsm");
-
-function run_test() {
-  initApp();
-
-  // NOTE: none of the manifests here can have a workerURL set, or we attempt
-  // to create a FrameWorker and that fails under xpcshell...
-  let manifests = [
-    { // normal provider
-      name: "provider 1",
-      origin: "https://example1.com",
-      shareURL: "https://example1.com/share/",
-    },
-    { // provider without workerURL
-      name: "provider 2",
-      origin: "https://example2.com",
-      shareURL: "https://example2.com/share/",
-    }
-  ];
-
-  Cu.import("resource:///modules/SocialService.jsm");
-
-  let runner = new AsyncRunner();
-  let next = runner.next.bind(runner);
-  runner.appendIterator(testAddProviders(manifests, next));
-  runner.appendIterator(testGetProvider(manifests, next));
-  runner.appendIterator(testGetProviderList(manifests, next));
-  runner.appendIterator(testAddRemoveProvider(manifests, next));
-  runner.appendIterator(testIsSameOrigin(manifests, next));
-  runner.appendIterator(testResolveUri(manifests, next));
-  runner.appendIterator(testOrderedProviders(manifests, next));
-  runner.appendIterator(testRemoveProviders(manifests, next));
-  runner.next();
-}
-
-function* testAddProviders(manifests, next) {
-  do_check_false(SocialService.enabled);
-  let provider = yield SocialService.addProvider(manifests[0], next);
-  do_check_true(SocialService.enabled);
-  do_check_false(provider.enabled);
-  provider = yield SocialService.addProvider(manifests[1], next);
-  do_check_false(provider.enabled);
-}
-
-function* testRemoveProviders(manifests, next) {
-  do_check_true(SocialService.enabled);
-  yield SocialService.disableProvider(manifests[0].origin, next);
-  yield SocialService.disableProvider(manifests[1].origin, next);
-  do_check_false(SocialService.enabled);
-}
-
-function* testGetProvider(manifests, next) {
-  for (let i = 0; i < manifests.length; i++) {
-    let manifest = manifests[i];
-    let provider = yield SocialService.getProvider(manifest.origin, next);
-    do_check_neq(provider, null);
-    do_check_eq(provider.name, manifest.name);
-    do_check_eq(provider.workerURL, manifest.workerURL);
-    do_check_eq(provider.origin, manifest.origin);
-  }
-  do_check_eq((yield SocialService.getProvider("bogus", next)), null);
-}
-
-function* testGetProviderList(manifests, next) {
-  let providers = yield SocialService.getProviderList(next);
-  do_check_true(providers.length >= manifests.length);
-  for (let i = 0; i < manifests.length; i++) {
-    let providerIdx = providers.map(p => p.origin).indexOf(manifests[i].origin);
-    let provider = providers[providerIdx];
-    do_check_true(!!provider);
-    do_check_false(provider.enabled);
-    do_check_eq(provider.workerURL, manifests[i].workerURL);
-    do_check_eq(provider.name, manifests[i].name);
-  }
-}
-
-function* testAddRemoveProvider(manifests, next) {
-  var threw;
-  try {
-    // Adding a provider whose origin already exists should fail
-    SocialService.addProvider(manifests[0]);
-  } catch (ex) {
-    threw = ex;
-  }
-  do_check_neq(threw.toString().indexOf("SocialService.addProvider: provider with this origin already exists"), -1);
-
-  let originalProviders = yield SocialService.getProviderList(next);
-
-  // Check that provider installation succeeds
-  let newProvider = yield SocialService.addProvider({
-    name: "foo",
-    origin: "http://example3.com"
-  }, next);
-  let retrievedNewProvider = yield SocialService.getProvider(newProvider.origin, next);
-  do_check_eq(newProvider, retrievedNewProvider);
-
-  let providersAfter = yield SocialService.getProviderList(next);
-  do_check_eq(providersAfter.length, originalProviders.length + 1);
-  do_check_neq(providersAfter.indexOf(newProvider), -1);
-
-  // Now remove the provider
-  yield SocialService.disableProvider(newProvider.origin, next);
-  providersAfter = yield SocialService.getProviderList(next);
-  do_check_eq(providersAfter.length, originalProviders.length);
-  do_check_eq(providersAfter.indexOf(newProvider), -1);
-  newProvider = yield SocialService.getProvider(newProvider.origin, next);
-  do_check_true(!newProvider);
-}
-
-function* testIsSameOrigin(manifests, next) {
-  let providers = yield SocialService.getProviderList(next);
-  let provider = providers[0];
-  // provider.origin is a string.
-  do_check_true(provider.isSameOrigin(provider.origin));
-  do_check_true(provider.isSameOrigin(Services.io.newURI(provider.origin)));
-  do_check_true(provider.isSameOrigin(provider.origin + "/some-sub-page"));
-  do_check_true(provider.isSameOrigin(Services.io.newURI(provider.origin + "/some-sub-page")));
-  do_check_false(provider.isSameOrigin("http://something.com"));
-  do_check_false(provider.isSameOrigin(Services.io.newURI("http://something.com")));
-  do_check_false(provider.isSameOrigin("data:text/html,<p>hi"));
-  do_check_true(provider.isSameOrigin("data:text/html,<p>hi", true));
-  do_check_false(provider.isSameOrigin(Services.io.newURI("data:text/html,<p>hi")));
-  do_check_true(provider.isSameOrigin(Services.io.newURI("data:text/html,<p>hi"), true));
-  // we explicitly handle null and return false
-  do_check_false(provider.isSameOrigin(null));
-}
-
-function* testResolveUri(manifests, next) {
-  let providers = yield SocialService.getProviderList(next);
-  let provider = providers[0];
-  do_check_eq(provider.resolveUri(provider.origin).spec, provider.origin + "/");
-  do_check_eq(provider.resolveUri("foo.html").spec, provider.origin + "/foo.html");
-  do_check_eq(provider.resolveUri("/foo.html").spec, provider.origin + "/foo.html");
-  do_check_eq(provider.resolveUri("http://somewhereelse.com/foo.html").spec, "http://somewhereelse.com/foo.html");
-  do_check_eq(provider.resolveUri("data:text/html,<p>hi").spec, "data:text/html,<p>hi");
-}
-
-function* testOrderedProviders(manifests, next) {
-  let providers = yield SocialService.getProviderList(next);
-
-  // add visits for only one of the providers
-  let visits = [];
-  let startDate = Date.now() * 1000;
-  for (let i = 0; i < 10; i++) {
-    visits.push({
-      uri: Services.io.newURI(providers[1].shareURL + i),
-      visitDate: startDate + i
-    });
-  }
-
-  PlacesTestUtils.addVisits(visits).then(next);
-  yield;
-  let orderedProviders = yield SocialService.getOrderedProviderList(next);
-  do_check_eq(orderedProviders[0], providers[1]);
-  do_check_eq(orderedProviders[1], providers[0]);
-  do_check_true(orderedProviders[0].frecency > orderedProviders[1].frecency);
-  PlacesTestUtils.clearHistory().then(next);
-  yield;
-}
deleted file mode 100644
--- a/browser/modules/test/unit/social/test_SocialServiceMigration21.js
+++ /dev/null
@@ -1,52 +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/. */
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-const DEFAULT_PREFS = Services.prefs.getDefaultBranch("social.manifest.");
-
-function run_test() {
-  // Test must run at startup for migration to occur, so we can only test
-  // one migration per test file
-  initApp();
-
-  // NOTE: none of the manifests here can have a workerURL set, or we attempt
-  // to create a FrameWorker and that fails under xpcshell...
-  let manifest = { // normal provider
-    name: "provider 1",
-    origin: "https://example1.com",
-    builtin: true // as of fx22 this should be true for default prefs
-  };
-
-  DEFAULT_PREFS.setCharPref(manifest.origin, JSON.stringify(manifest));
-  Services.prefs.setBoolPref("social.active", true);
-
-  Cu.import("resource:///modules/SocialService.jsm");
-
-  let runner = new AsyncRunner();
-  let next = runner.next.bind(runner);
-  runner.appendIterator(testMigration(manifest, next));
-  runner.next();
-}
-
-function* testMigration(manifest, next) {
-  // look at social.activeProviders, we should have migrated into that, and
-  // we should be set as a user level pref after migration
-  do_check_false(MANIFEST_PREFS.prefHasUserValue(manifest.origin));
-  // we need to access the providers for everything to initialize
-  yield SocialService.getProviderList(next);
-  do_check_true(SocialService.enabled);
-  do_check_true(Services.prefs.prefHasUserValue("social.activeProviders"));
-
-  let activeProviders =
-    JSON.parse(Services.prefs.getStringPref("social.activeProviders"));
-  do_check_true(activeProviders[manifest.origin]);
-  do_check_true(MANIFEST_PREFS.prefHasUserValue(manifest.origin));
-  do_check_true(JSON.parse(DEFAULT_PREFS.getCharPref(manifest.origin)).builtin);
-
-  let userPref = JSON.parse(MANIFEST_PREFS.getCharPref(manifest.origin));
-  do_check_true(parseInt(userPref.updateDate) > 0);
-  // migrated providers wont have an installDate
-  do_check_true(userPref.installDate === 0);
-}
deleted file mode 100644
--- a/browser/modules/test/unit/social/test_SocialServiceMigration22.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-const DEFAULT_PREFS = Services.prefs.getDefaultBranch("social.manifest.");
-
-function run_test() {
-  // Test must run at startup for migration to occur, so we can only test
-  // one migration per test file
-  initApp();
-
-  // NOTE: none of the manifests here can have a workerURL set, or we attempt
-  // to create a FrameWorker and that fails under xpcshell...
-  let manifest = { // normal provider
-    name: "provider 1",
-    origin: "https://example1.com",
-    builtin: true // as of fx22 this should be true for default prefs
-  };
-
-  DEFAULT_PREFS.setCharPref(manifest.origin, JSON.stringify(manifest));
-
-  // Set both providers active and flag the first one as "current"
-  let active = {};
-  active[manifest.origin] = 1;
-  // bad.origin tests that a missing manifest does not break migration, bug 859715
-  active["bad.origin"] = 1;
-  Services.prefs.setStringPref("social.activeProviders",
-                               JSON.stringify(active));
-
-  Cu.import("resource:///modules/SocialService.jsm");
-
-  let runner = new AsyncRunner();
-  let next = runner.next.bind(runner);
-  runner.appendIterator(testMigration(manifest, next));
-  runner.next();
-}
-
-function* testMigration(manifest, next) {
-  // look at social.activeProviders, we should have migrated into that, and
-  // we should be set as a user level pref after migration
-  do_check_false(MANIFEST_PREFS.prefHasUserValue(manifest.origin));
-  // we need to access the providers for everything to initialize
-  yield SocialService.getProviderList(next);
-  do_check_true(SocialService.enabled);
-  do_check_true(Services.prefs.prefHasUserValue("social.activeProviders"));
-
-  let activeProviders =
-    JSON.parse(Services.prefs.getStringPref("social.activeProviders"));
-  do_check_true(activeProviders[manifest.origin]);
-  do_check_true(MANIFEST_PREFS.prefHasUserValue(manifest.origin));
-  do_check_true(JSON.parse(DEFAULT_PREFS.getCharPref(manifest.origin)).builtin);
-
-  let userPref = JSON.parse(MANIFEST_PREFS.getCharPref(manifest.origin));
-  do_check_true(parseInt(userPref.updateDate) > 0);
-  // migrated providers wont have an installDate
-  do_check_true(userPref.installDate === 0);
-
-  // bug 859715, this should have been removed during migration
-  do_check_false(!!activeProviders["bad.origin"]);
-}
deleted file mode 100644
--- a/browser/modules/test/unit/social/test_SocialServiceMigration29.js
+++ /dev/null
@@ -1,57 +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/. */
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-
-function run_test() {
-  // Test must run at startup for migration to occur, so we can only test
-  // one migration per test file
-  initApp();
-
-  // NOTE: none of the manifests here can have a workerURL set, or we attempt
-  // to create a FrameWorker and that fails under xpcshell...
-  let manifest = { // normal provider
-    name: "provider 1",
-    origin: "https://example1.com",
-  };
-
-  MANIFEST_PREFS.setCharPref(manifest.origin, JSON.stringify(manifest));
-
-  // Set both providers active and flag the first one as "current"
-  let active = {};
-  active[manifest.origin] = 1;
-  Services.prefs.setStringPref("social.activeProviders",
-                               JSON.stringify(active));
-
-  // social.enabled pref is the key focus of this test. We set the user pref,
-  // and then migration should a) remove the provider from activeProviders and
-  // b) unset social.enabled
-  Services.prefs.setBoolPref("social.enabled", false);
-
-  Cu.import("resource:///modules/SocialService.jsm");
-
-  let runner = new AsyncRunner();
-  let next = runner.next.bind(runner);
-  runner.appendIterator(testMigration(manifest, next));
-  runner.next();
-}
-
-function* testMigration(manifest, next) {
-  // look at social.activeProviders, we should have migrated into that, and
-  // we should be set as a user level pref after migration
-  do_check_true(Services.prefs.prefHasUserValue("social.enabled"));
-  do_check_true(MANIFEST_PREFS.prefHasUserValue(manifest.origin));
-  // we need to access the providers for everything to initialize
-  yield SocialService.getProviderList(next);
-  do_check_false(SocialService.enabled);
-  do_check_false(Services.prefs.prefHasUserValue("social.enabled"));
-  do_check_true(Services.prefs.prefHasUserValue("social.activeProviders"));
-
-  let activeProviders;
-  let pref = Services.prefs.getStringPref("social.activeProviders");
-  activeProviders = JSON.parse(pref);
-  do_check_true(activeProviders[manifest.origin] == undefined);
-  do_check_true(MANIFEST_PREFS.prefHasUserValue(manifest.origin));
-}
deleted file mode 100644
--- a/browser/modules/test/unit/social/test_social.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
-  // we are testing worker startup specifically
-  do_test_pending();
-  add_test(testStartupEnabled);
-  add_test(testDisableAfterStartup);
-  do_initialize_social(true, run_next_test);
-}
-
-function testStartupEnabled() {
-  // wait on startup before continuing
-  do_check_eq(Social.providers.length, 2, "two social providers enabled");
-  do_check_true(Social.providers[0].enabled, "provider 0 is enabled");
-  do_check_true(Social.providers[1].enabled, "provider 1 is enabled");
-  run_next_test();
-}
-
-function testDisableAfterStartup() {
-  let SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;
-  SocialService.disableProvider(Social.providers[0].origin, function() {
-    do_wait_observer("social:providers-changed", function() {
-      do_check_eq(Social.enabled, false, "Social is disabled");
-      do_check_eq(Social.providers.length, 0, "no social providers available");
-      do_test_finished();
-      run_next_test();
-    });
-    SocialService.disableProvider(Social.providers[0].origin)
-  });
-}
deleted file mode 100644
--- a/browser/modules/test/unit/social/test_socialDisabledStartup.js
+++ /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/. */
-
-function run_test() {
-  // we are testing worker startup specifically
-  do_test_pending();
-  add_test(testStartupDisabled);
-  add_test(testEnableAfterStartup);
-  do_initialize_social(false, run_next_test);
-}
-
-function testStartupDisabled() {
-  // wait on startup before continuing
-  do_check_false(Social.enabled, "Social is disabled");
-  do_check_eq(Social.providers.length, 0, "zero social providers available");
-  run_next_test();
-}
-
-function testEnableAfterStartup() {
-  do_add_providers(function() {
-    do_check_true(Social.enabled, "Social is enabled");
-    do_check_eq(Social.providers.length, 2, "two social providers available");
-    do_check_true(Social.providers[0].enabled, "provider 0 is enabled");
-    do_check_true(Social.providers[1].enabled, "provider 1 is enabled");
-    do_test_finished();
-    run_next_test();
-  });
-}
deleted file mode 100644
--- a/browser/modules/test/unit/social/xpcshell.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[DEFAULT]
-head = head.js
-firefox-appdir = browser
-skip-if = toolkit == 'android'
-support-files = blocklist.xml
-
-[test_social.js]
-[test_socialDisabledStartup.js]
-[test_SocialService.js]
-[test_SocialServiceMigration21.js]
-[test_SocialServiceMigration22.js]
-[test_SocialServiceMigration29.js]
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -619,66 +619,16 @@ html|span.ac-emphasize-text-url {
   -moz-image-region: rect(0, 32px, 16px, 16px);
 }
 
 #reader-mode-button:hover:active,
 #reader-mode-button[readeractive] {
   -moz-image-region: rect(0, 48px, 16px, 32px);
 }
 
-/* social share panel */
-%include ../shared/social/social.inc.css
-
-.social-share-frame {
-  border-top: 1px solid #f8f8f8;
-  width: 756px;
-  height: 150px;
-}
-
-#share-container {
-  min-width: 756px;
-  background-color: white;
-  background-repeat: no-repeat;
-  background-position: center center;
-}
-#share-container[loading] {
-  background-image: url(chrome://browser/skin/tabbrowser/pendingpaint.png);
-}
-#share-container > browser {
-  transition: opacity 150ms ease-in-out;
-  opacity: 1;
-}
-#share-container[loading] > browser {
-  opacity: 0;
-}
-
-.social-share-toolbar {
-  border-bottom: 1px solid #dedede;
-  padding: 2px;
-}
-
-#social-share-provider-buttons {
-  padding: 0;
-  margin: 0;
-}
-
-.share-provider-button {
-  padding: 5px;
-  margin: 2px;
-}
-
-.share-provider-button > .toolbarbutton-text {
-  display: none;
-}
-.share-provider-button > .toolbarbutton-icon {
-  width: 16px;
-  min-height: 16px;
-  max-height: 16px;
-}
-
 /* Bookmarking panel */
 #editBookmarkPanelStarIcon {
   list-style-image: url("chrome://browser/skin/places/starred48.png");
   width: 48px;
   height: 48px;
 }
 
 #editBookmarkPanelStarIcon[unstarred] {
--- a/browser/themes/linux/customizableui/panelUI.css
+++ b/browser/themes/linux/customizableui/panelUI.css
@@ -44,24 +44,16 @@
 .subviewbutton > .toolbarbutton-text {
   padding-inline-start: 16px;
 }
 
 .subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item) > .toolbarbutton-text {
   padding-inline-start: 0;
 }
 
-/* subviewbutton entries for social sidebars have images that come from external
-/* sources, and are not guaranteed to be the size we want, so force the size on
-/* those icons. */
-toolbarbutton.social-provider-menuitem > .toolbarbutton-icon {
-  width: 16px;
-  height: 16px;
-}
-
 .subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
   visibility: hidden;
 }
 
 menuitem.subviewbutton {
   -moz-appearance: none !important;
 }
 
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -59,18 +59,16 @@ browser.jar:
   skin/classic/browser/places/downloads.png           (places/downloads.png)
   skin/classic/browser/preferences/alwaysAsk.png      (preferences/alwaysAsk.png)
   skin/classic/browser/preferences/preferences.css    (preferences/preferences.css)
 * skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
 * skin/classic/browser/preferences/in-content-new/preferences.css     (preferences/in-content-new/preferences.css)
 * skin/classic/browser/preferences/in-content/dialog.css      (preferences/in-content/dialog.css)
 * skin/classic/browser/preferences/in-content-new/dialog.css          (preferences/in-content-new/dialog.css)
   skin/classic/browser/preferences/applications.css   (preferences/applications.css)
-  skin/classic/browser/social/services-16.png         (social/services-16.png)
-  skin/classic/browser/social/services-64.png         (social/services-64.png)
   skin/classic/browser/tabbrowser/tabDragIndicator.png      (tabbrowser/tabDragIndicator.png)
 
   skin/classic/browser/sync-desktopIcon.svg  (../shared/sync-desktopIcon.svg)
   skin/classic/browser/sync-mobileIcon.svg  (../shared/sync-mobileIcon.svg)
 #ifdef E10S_TESTING_ONLY
   skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png)
 #endif
 
--- a/browser/themes/linux/places/places.css
+++ b/browser/themes/linux/places/places.css
@@ -1,15 +1,53 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Sidebars */
+
+#sidebar-search-container {
+  padding: 4px;
+}
+
+#search-box {
+  margin: 0;
+}
+
+#viewButton {
+  -moz-appearance: none;
+  border-radius: 4px;
+  margin: 1px 0;
+  margin-inline-start: 4px;
+  padding: 2px 4px;
+  color: inherit;
+}
+
+#viewButton:-moz-focusring:not(:hover):not([open]) {
+  outline: 1px dotted -moz-DialogText;
+}
+
+#viewButton:hover {
+  background: hsla(240, 5%, 5%, 0.1);
+}
+
+#viewButton[open] {
+  background: hsla(240, 5%, 5%, 0.15);
+}
+
 .sidebar-placesTree {
   margin: 0;
+  color: inherit;
+  -moz-appearance: none;
+  border: 0;
+  background: transparent;
+}
+
+.sidebar-placesTreechildren::-moz-tree-row {
+  min-height: 24px;
 }
 
 .sidebar-placesTreechildren::-moz-tree-cell(leaf) ,
 .sidebar-placesTreechildren::-moz-tree-image(leaf) {
   cursor: pointer;
 }
 
 .sidebar-placesTreechildren::-moz-tree-cell-text(leaf, hover) {
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -669,65 +669,16 @@ html|span.ac-emphasize-text-url {
 #reader-mode-button:hover:active {
   -moz-image-region: rect(0, 32px, 16px, 16px);
 }
 
 #reader-mode-button[readeractive] {
   -moz-image-region: rect(0, 48px, 16px, 32px);
 }
 
-/* social share panel */
-.social-share-frame {
-  border-top: 1px solid #f8f8f8;
-  min-width: 756px;
-  height: 150px;
-  /* we resize our panels dynamically, make it look nice */
-}
-
-#share-container {
-  min-width: 756px;
-  background-repeat: no-repeat;
-  background-position: center center;
-}
-#share-container[loading] {
-  background-image: url(chrome://browser/skin/tabbrowser/pendingpaint.png);
-}
-#share-container > browser {
-  transition: opacity 150ms ease-in-out;
-  opacity: 1;
-}
-#share-container[loading] > browser {
-  opacity: 0;
-}
-
-.social-share-toolbar {
-  border-bottom: 1px solid #dedede;
-  padding: 2px;
-}
-
-#social-share-provider-buttons {
-  padding: 0;
-  margin: 0;
-}
-
-.share-provider-button {
-  padding: 5px;
-  margin: 2px;
-}
-
-.share-provider-button > .toolbarbutton-text {
-  display: none;
-}
-
-.share-provider-button > .toolbarbutton-icon {
-  width: 16px;
-  min-height: 16px;
-  max-height: 16px;
-}
-
 /* BOOKMARKING PANEL */
 #editBookmarkPanelStarIcon {
   list-style-image: url("chrome://browser/skin/places/starred48.png");
   width: 48px;
   height: 48px;
 }
 
 #editBookmarkPanelStarIcon[unstarred] {
@@ -1415,43 +1366,16 @@ html|*.addon-webext-perm-list {
 #developer-toolbar-toolbox-button[error-count]:before {
   color: #FDF3DE;
   min-width: 16px;
   text-shadow: none;
   background-image: linear-gradient(#B4211B, #8A1915);
   border-radius: 1px;
 }
 
-/* Share */
-%include ../shared/social/social.inc.css
-
-#social-share-panel {
-  min-height: 100px;
-  min-width: 300px;
-  transition: height .3s ease-in-out, width .3s ease-in-out;
-}
-
-#share-container,
-.social-share-frame {
-  border-top-left-radius: 0;
-  border-bottom-left-radius: inherit;
-  border-top-right-radius: 0;
-  border-bottom-right-radius: inherit;
-}
-
-#social-share-panel > .social-share-toolbar {
-  border-top-left-radius: inherit;
-  border-top-right-radius: inherit;
-}
-
-#social-share-provider-buttons {
-  border-top-left-radius: inherit;
-  border-top-right-radius: inherit;
-}
-
 /* Customization mode */
 
 %include ../shared/customizableui/customizeMode.inc.css
 
 /* End customization mode */
 
 .private-browsing-indicator {
   background-image: url("chrome://browser/skin/privatebrowsing-mask.png");
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -90,20 +90,16 @@ browser.jar:
   skin/classic/browser/preferences/application.png          (preferences/application.png)
   skin/classic/browser/preferences/saveFile.png             (preferences/saveFile.png)
 * skin/classic/browser/preferences/preferences.css          (preferences/preferences.css)
 * skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
 * skin/classic/browser/preferences/in-content-new/preferences.css     (preferences/in-content-new/preferences.css)
 * skin/classic/browser/preferences/in-content/dialog.css      (preferences/in-content/dialog.css)
 * skin/classic/browser/preferences/in-content-new/dialog.css          (preferences/in-content-new/dialog.css)
   skin/classic/browser/preferences/applications.css         (preferences/applications.css)
-  skin/classic/browser/social/services-16.png               (social/services-16.png)
-  skin/classic/browser/social/services-16@2x.png            (social/services-16@2x.png)
-  skin/classic/browser/social/services-64.png               (social/services-64.png)
-  skin/classic/browser/social/services-64@2x.png            (social/services-64@2x.png)
   skin/classic/browser/tabbrowser/tabDragIndicator.png                   (tabbrowser/tabDragIndicator.png)
   skin/classic/browser/tabbrowser/tabDragIndicator@2x.png                (tabbrowser/tabDragIndicator@2x.png)
   skin/classic/browser/sync-desktopIcon.svg  (../shared/sync-desktopIcon.svg)
   skin/classic/browser/sync-mobileIcon.svg  (../shared/sync-mobileIcon.svg)
   skin/classic/browser/yosemite/menuPanel-customize.png                (menuPanel-customize-yosemite.png)
   skin/classic/browser/yosemite/menuPanel-customize@2x.png             (menuPanel-customize-yosemite@2x.png)
   skin/classic/browser/yosemite/menuPanel-exit.png                     (menuPanel-exit-yosemite.png)
   skin/classic/browser/yosemite/menuPanel-exit@2x.png                  (menuPanel-exit-yosemite@2x.png)
--- a/browser/themes/osx/places/places.css
+++ b/browser/themes/osx/places/places.css
@@ -119,17 +119,17 @@
 }
 
 #viewButton {
   -moz-appearance: none;
   padding-bottom: 1px;
   padding-inline-start: 5px;
   padding-inline-end: 0px;
   margin: 0;
-  margin-inline-end: 4px;
+  margin-inline-start: 4px;
   min-width: 0px;
   min-height: 0px;
   border: 1px solid #a2a9b1;
   border-radius: 10px;
   background-image: linear-gradient(hsla(0,0%,100%,.75),hsla(0,0%,100%,.1));
   box-shadow: inset 0 0 1px hsla(0,0%,100%,.85),
                     0 1px hsla(0,0%,100%,.35);
 }
@@ -154,17 +154,21 @@
 #viewButton:focus {
   box-shadow: 0 1px 0 hsla(0, 0%, 0%, .15),
               0 0 0 1px hsla(210, 100%, 60%, .45) inset,
               0 0 0 2px hsla(210, 100%, 60%, .45);
   border-color: hsla(210, 100%, 60%, 1);
 }
 
 #sidebar-search-container {
-  margin: 0 4px;
+  padding: 4px;
+}
+
+#search-box {
+  margin: 0;
 }
 
 /* Trees */
 
 %include ../../shared/places/tree-icons.inc.css
 
 treechildren:-moz-tree-image(selected,focus) {
   fill: HighlightText;
deleted file mode 100644
--- a/browser/themes/shared/aboutProviderDirectory.css
+++ /dev/null
@@ -1,30 +0,0 @@
-%include aboutSocialError.css
-
-body {
-  width: 310px;
-  margin: 1em auto;
-}
-
-#message-box {
-  margin-top: 2em;
-  background: url(chrome://browser/skin/info.svg) no-repeat left 8px;
-  padding-inline-start: 30px;
-}
-
-#activation-frame {
-  border: none;
-  margin: 0;
-  width: 310px;
-  height: 200px;
-}
-#activation > p {
-  width: 100%;
-  text-align: center;
-  margin: 0;
-  line-height: 2em;
-}
-.link {
-  text-decoration: none;
-  color: -moz-nativehyperlinktext;
-  cursor: pointer;
-}
--- a/browser/themes/shared/customizableui/panelUI.inc.css
+++ b/browser/themes/shared/customizableui/panelUI.inc.css
@@ -88,24 +88,24 @@
   from { margin-top: -.5em; } to { margin-top: calc(64px - .5em); }
 }
 
 @keyframes whimsyRotate {
   to { transform: perspective(5000px) rotateY(360deg); }
 }
 
 #PanelUI-button {
-  margin-inline-start: 2px;
+  margin-inline-start: 3px;
   border-inline-start: 1px solid;
-  border-image: linear-gradient(transparent, rgba(0,0,0,.1) 20%, rgba(0,0,0,.1) 80%, transparent);
+  border-image: linear-gradient(transparent 4px, rgba(0,0,0,.1) 4px, rgba(0,0,0,.1) calc(100% - 4px), transparent calc(100% - 4px));
   border-image-slice: 1;
 }
 
 #nav-bar[brighttext] > #PanelUI-button {
-  border-image-source: linear-gradient(transparent, rgba(100%,100%,100%,.2) 20%, rgba(100%,100%,100%,.2) 80%, transparent);
+  border-image-source: linear-gradient(transparent 4px, rgba(100%,100%,100%,.2) 4px, rgba(100%,100%,100%,.2) calc(100% - 4px), transparent calc(100% - 4px));
 }
 
 #PanelUI-menu-button[badge-status] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
   display: -moz-box;
   height: 10px;
   width: 10px;
   background-size: contain;
   border: none;
@@ -1138,30 +1138,28 @@ toolbaritem[cui-areatype="menu-panel"][s
 #customization-palette .toolbarbutton-multiline-text,
 #customization-palette .toolbarbutton-text {
   display: none;
 }
 
 panelview .toolbarbutton-1,
 .subviewbutton,
 .widget-overflow-list .toolbarbutton-1,
-.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button,
-.share-provider-button {
+.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button {
   -moz-appearance: none;
   padding: 0 6px;
   background-color: transparent;
   border-radius: 2px;
   border-style: solid;
   border-color: transparent;
 }
 
 panelview .toolbarbutton-1,
 .subviewbutton,
-.widget-overflow-list .toolbarbutton-1,
-.share-provider-button {
+.widget-overflow-list .toolbarbutton-1 {
   border-width: 1px;
 }
 
 .subviewbutton.panel-subview-footer {
   border-radius: 0;
   border: none;
 }
 
@@ -1365,32 +1363,30 @@ photonpanelmultiview panelview:not([main
 panelview .toolbarbutton-1 {
   margin-top: 6px;
 }
 
 panelview .toolbarbutton-1@buttonStateHover@,
 toolbarbutton.subviewbutton@buttonStateHover@,
 menu.subviewbutton@menuStateHover@,
 menuitem.subviewbutton@menuStateHover@,
-.share-provider-button@buttonStateHover@:not([checked="true"]),
 .widget-overflow-list .toolbarbutton-1@buttonStateHover@,
 .toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton@buttonStateHover@ {
   background-color: var(--arrowpanel-dimmed);
   border-color: var(--panel-separator-color);
 }
 
 .toolbaritem-combined-buttons@inAnyPanel@@buttonStateHover@ {
   border-color: var(--panel-separator-color);
 }
 
 panelview .toolbarbutton-1:-moz-any(@buttonStateActive@,[checked=true]),
 toolbarbutton.subviewbutton@buttonStateActive@,
 menu.subviewbutton@menuStateActive@,
 menuitem.subviewbutton@menuStateActive@,
-.share-provider-button:-moz-any(@buttonStateActive@,[checked=true]),
 .widget-overflow-list .toolbarbutton-1@buttonStateActive@,
 .toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton@buttonStateActive@ {
   background-color: var(--arrowpanel-dimmed-further);
   border-color: var(--panel-separator-color);
   box-shadow: 0 1px 0 hsla(210,4%,10%,.03) inset;
 }
 
 .subviewbutton.panel-subview-footer {
deleted file mode 100644
--- a/browser/themes/shared/icons/share.svg
+++ /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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
-  <path fill="context-fill" d="M9 10l5-8-7 8 2 6-4-5H1L15 0v13zm2.6 2.3L9 16v-5z"/>
-</svg>
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -5,19 +5,17 @@
 # This is not a complete / proper jar manifest. It is included by the
 # actual theme-specific manifests, so that shared resources need only
 # be specified once. As a result, the source file paths are relative
 # to the location of the actual manifest.
 
   skin/classic/browser/aboutNetError.css                       (../shared/aboutNetError.css)
   skin/classic/browser/blockedSite.css                         (../shared/blockedSite.css)
   skin/classic/browser/error-pages.css                         (../shared/error-pages.css)
-* skin/classic/browser/aboutProviderDirectory.css              (../shared/aboutProviderDirectory.css)
 * skin/classic/browser/aboutSessionRestore.css                 (../shared/aboutSessionRestore.css)
-  skin/classic/browser/aboutSocialError.css                    (../shared/aboutSocialError.css)
   skin/classic/browser/aboutTabCrashed.css                     (../shared/aboutTabCrashed.css)
   skin/classic/browser/aboutWelcomeBack.css                    (../shared/aboutWelcomeBack.css)
   skin/classic/browser/addons/addon-install-blocked.svg        (../shared/addons/addon-install-blocked.svg)
   skin/classic/browser/addons/addon-install-confirm.svg        (../shared/addons/addon-install-confirm.svg)
   skin/classic/browser/addons/addon-install-downloading.svg    (../shared/addons/addon-install-downloading.svg)
   skin/classic/browser/addons/addon-install-error.svg          (../shared/addons/addon-install-error.svg)
   skin/classic/browser/addons/addon-install-installed.svg      (../shared/addons/addon-install-installed.svg)
   skin/classic/browser/addons/addon-install-restart.svg        (../shared/addons/addon-install-restart.svg)
@@ -53,17 +51,16 @@
   skin/classic/browser/fullscreen/insecure.svg                 (../shared/fullscreen/insecure.svg)
   skin/classic/browser/fullscreen/secure.svg                   (../shared/fullscreen/secure.svg)
   skin/classic/browser/connection-secure.svg                   (../shared/identity-block/connection-secure.svg)
   skin/classic/browser/connection-mixed-passive-loaded.svg     (../shared/identity-block/connection-mixed-passive-loaded.svg)
   skin/classic/browser/connection-mixed-active-loaded.svg      (../shared/identity-block/connection-mixed-active-loaded.svg)
   skin/classic/browser/identity-icon.svg                       (../shared/identity-block/identity-icon.svg)
   skin/classic/browser/identity-icon-notice.svg                (../shared/identity-block/identity-icon-notice.svg)
   skin/classic/browser/info.svg                                (../shared/info.svg)
-* skin/classic/browser/menuPanel-small.svg                     (../shared/menuPanel-small.svg)
 
 * skin/classic/browser/notification-icons/camera-blocked.svg                (../shared/notification-icons/camera-blocked.svg)
 * skin/classic/browser/notification-icons/camera.svg                        (../shared/notification-icons/camera.svg)
   skin/classic/browser/notification-icons/default-info.svg                  (../shared/notification-icons/default-info.svg)
 * skin/classic/browser/notification-icons/desktop-notification-blocked.svg  (../shared/notification-icons/desktop-notification-blocked.svg)
 * skin/classic/browser/notification-icons/desktop-notification.svg          (../shared/notification-icons/desktop-notification.svg)
   skin/classic/browser/notification-icons/focus-tab-by-prompt.svg           (../shared/notification-icons/focus-tab-by-prompt.svg)
 #ifdef XP_MACOSX
@@ -180,17 +177,16 @@
   skin/classic/browser/page-action.svg                (../shared/icons/page-action.svg)
   skin/classic/browser/print.svg                      (../shared/icons/print.svg)
   skin/classic/browser/privateBrowsing.svg            (../shared/icons/privateBrowsing.svg)
   skin/classic/browser/quit.svg                       (../shared/icons/quit.svg)
   skin/classic/browser/reload.svg                     (../shared/icons/reload.svg)
   skin/classic/browser/reload-to-stop.svg             (../shared/icons/reload-to-stop.svg)
   skin/classic/browser/save.svg                       (../shared/icons/save.svg)
   skin/classic/browser/settings.svg                   (../shared/icons/settings.svg)
-  skin/classic/browser/share.svg                      (../shared/icons/share.svg)
   skin/classic/browser/sidebars.svg                   (../shared/icons/sidebars.svg)
   skin/classic/browser/sidebars-right.svg             (../shared/icons/sidebars-right.svg)
   skin/classic/browser/stop.svg                       (../shared/icons/stop.svg)
   skin/classic/browser/stop-to-reload.svg             (../shared/icons/stop-to-reload.svg)
   skin/classic/browser/sync.svg                       (../shared/icons/sync.svg)
   skin/classic/browser/synced-tabs.svg                (../shared/icons/synced-tabs.svg)
   skin/classic/browser/toolbar.svg                    (../shared/icons/toolbar.svg)
   skin/classic/browser/webIDE.svg                     (../shared/icons/webIDE.svg)
deleted file mode 100644
--- a/browser/themes/shared/menuPanel-small.svg
+++ /dev/null
@@ -1,16 +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/. -->
-<svg xmlns="http://www.w3.org/2000/svg"
-     width="96" height="16" viewBox="0 0 96 16"
-     class="fieldtext">
-#include icon-colors.inc.svg
-
-  <path id="placeholder" d="M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM12,4H4v8h8V4ZM5,9.939V6.061L6.939,8ZM9.939,11H6.061L8,9.061ZM11,11h0Zm0-4.939V9.939L9.061,8ZM11,5h0ZM6.061,5H9.939L8,6.939Z"/>
-  <path id="cut" d="M29.63,15a2.426,2.426,0,0,1-2.282-1.277c-0.761-1.109-1.694-2.488-1.694-2.488S25,10.329,24.549,9.623a1.05,1.05,0,0,0-1.106-.538S20.6,4.437,20.124,3.706C19.465,2.689,20.7,1,20.7,1l4.4,7.044a19.333,19.333,0,0,0,1.867,2.286c0.519,0.4,1.382-.373,2.8.908C31.7,12.984,31.048,15,29.63,15ZM29.423,12.11c-0.933-1.042-1.728-.908-1.936-0.639a2.093,2.093,0,0,0,.38,1.748,1.612,1.612,0,0,0,1.383.74C29.838,13.959,30.356,13.153,29.423,12.11ZM25.582,7.372L24.4,5.6,27.276,1s1.233,1.69.575,2.708C27.568,4.142,26.445,5.967,25.582,7.372Zm-4.576,2.956A12.482,12.482,0,0,0,22.43,8.645l0.826,1.239c-0.428.65-.937,1.352-0.937,1.352s-0.933,1.378-1.694,2.488A2.426,2.426,0,0,1,18.344,15c-1.417,0-2.074-2.017-.138-3.765C19.624,9.956,20.487,10.732,21.006,10.329ZM18.551,12.11c-0.933,1.042-.415,1.849.173,1.849a1.612,1.612,0,0,0,1.383-.74,2.093,2.093,0,0,0,.38-1.748C20.28,11.2,19.485,11.068,18.551,12.11Z"/>
-  <path id="copy" d="M46,15H40a1,1,0,0,1-1-1V6a1,1,0,0,1,1-1h4.953C45,5,47,6.984,47,7.047V14A1,1,0,0,1,46,15ZM44,6V8h2ZM38,4.886V11H34a1,1,0,0,1-1-1V2a1,1,0,0,1,1-1h4.953C39,1,41,2.985,41,3.047v1.34H38.5A0.5,0.5,0,0,0,38,4.886ZM38,2V4h2Z"/>
-  <path id="paste" d="M59.5,15h-7A1.5,1.5,0,0,1,51,13.5v-9A1.5,1.5,0,0,1,52.5,3H54a2,2,0,1,1,4,0h1.5A1.5,1.5,0,0,1,61,4.5v9A1.5,1.5,0,0,1,59.5,15ZM58.682,4L57.61,3.5a1.613,1.613,0,0,0-3.219,0L53.318,4,52.781,5h6.437ZM58.82,5.688H54.074L51.059,7.428l2.849,4.935,6.574-3.8Z"/>
-  <rect id="zoomOut" x="67" y="7" width="10" height="2"/>
-  <path id="zoomIn" d="M93,9H89v4H87V9H83V7h4V3h2V7h4V9Z"/>
-</svg>
--- a/browser/themes/shared/menupanel.inc.css
+++ b/browser/themes/shared/menupanel.inc.css
@@ -1,15 +1,10 @@
 /* Menu panel and palette styles */
 
-#add-share-provider {
-  list-style-image: url(chrome://browser/skin/menuPanel-small.svg);
-  -moz-image-region: rect(0px, 96px, 16px, 80px);
-}
-
 #appMenuRecentlyClosedWindows,
 #appMenu-new-window-button {
   list-style-image: url(chrome://browser/skin/new-window.svg);
 }
 
 #appMenu-private-window-button {
   list-style-image: url(chrome://browser/skin/privateBrowsing.svg);
 }
--- a/browser/themes/shared/notification-icons.inc.css
+++ b/browser/themes/shared/notification-icons.inc.css
@@ -295,38 +295,16 @@ html|*#webRTC-previewVideo {
   from {
     opacity: 0;
   }
   to {
     opacity: 1;
   }
 }
 
-/* SOCIAL API */
-
-.popup-notification-icon[popupid="servicesInstall"] {
-  list-style-image: url(chrome://browser/skin/social/services-64.png);
-}
-
-.service-icon {
-  list-style-image: url(chrome://browser/skin/social/services-16.png);
-}
-
-%ifdef XP_MACOSX
-@media (min-resolution: 1.1dppx) {
-  .popup-notification-icon[popupid="servicesInstall"] {
-    list-style-image: url(chrome://browser/skin/social/services-64@2x.png);
-  }
-
-  .service-icon {
-    list-style-image: url(chrome://browser/skin/social/services-16@2x.png);
-  }
-}
-%endif
-
 /* TRANSLATION */
 
 .translation-icon {
   list-style-image: url(chrome://browser/skin/translation-16.png);
   -moz-image-region: rect(0px, 16px, 16px, 0px);
 }
 
 .translation-icon.in-use {
deleted file mode 100644
--- a/browser/themes/shared/social/social.inc.css
+++ /dev/null
@@ -1,20 +0,0 @@
-%if 0
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-%endif
-
-#manage-share-providers {
-  list-style-image: url("chrome://browser/skin/settings.svg");
-  -moz-context-properties: fill;
-  fill: currentColor;
-  color: inherit;
-}
-
-.social-panel > .panel-arrowcontainer > .panel-arrowcontent {
-  padding: 0;
-}
-/* fixup corners for share panel */
-.social-panel > .social-panel-frame {
-  border-radius: inherit;
-}
--- a/browser/themes/shared/tabs.inc.css
+++ b/browser/themes/shared/tabs.inc.css
@@ -1,13 +1,15 @@
 %if 0
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 %endif
+%filter substitution
+%define horizontalTabPadding 9px
 
 :root {
   --tab-toolbar-navbar-overlap: 1px;
   --tab-line-color: highlight;
   --tab-min-height: 33px;
 }
 
 :root[uidensity=compact] {
@@ -47,17 +49,17 @@
 /* The selected tab should appear above the border between the tabs toolbar and
    the navigation toolbar. */
 .tabbrowser-tab[visuallyselected=true] {
   position: relative;
   z-index: 2;
 }
 
 .tab-content {
-  padding: 0 9px;
+  padding: 0 @horizontalTabPadding@;
 }
 
 .tab-content[pinned] {
   padding: 0 12px;
 }
 
 .tab-throbber,
 .tab-icon-image,
@@ -193,21 +195,25 @@
 }
 
 .tab-label {
   margin-inline-end: 0;
   margin-inline-start: 0;
 }
 
 .tab-close-button {
-  margin-inline-start: 1px;
   margin-inline-end: -2px;
   padding: 0;
 }
 
+:root[uidensity=touch] .tab-close-button {
+  margin-inline-end: -@horizontalTabPadding@;
+  padding: 10px calc(@horizontalTabPadding@ - 2px);
+}
+
 .tab-icon-sound {
   margin-inline-start: 1px;
   width: 16px;
   height: 16px;
   padding: 0;
 }
 
 .tab-icon-sound[soundplaying],
@@ -412,21 +418,16 @@
   border-image-slice: 1;
   /* The 1px border and negative margin may amount to a different number of
      device pixels (bug 477157), so we also set a width to match the margin. */
   width: 1px;
   box-sizing: border-box;
   opacity: 0.2;
 }
 
-#TabsToolbar[brighttext] > #tabbrowser-tabs > .tabbrowser-tab::before,
-#TabsToolbar[brighttext] > #tabbrowser-tabs > .tabbrowser-tab::after {
-  opacity: 0.4;
-}
-
 /* Also show separators beside the selected tab when dragging it. */
 #tabbrowser-tabs[movingtab] > .tabbrowser-tab[beforeselected]:not([last-visible-tab])::after,
 .tabbrowser-tab:not([selected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before,
 #tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([selected]):not([beforehovered]):not(:hover)::after {
   content: "";
   display: -moz-box;
 }
 
--- a/browser/themes/shared/toolbarbutton-icons.inc.css
+++ b/browser/themes/shared/toolbarbutton-icons.inc.css
@@ -224,20 +224,16 @@ toolbar:not([brighttext]) #bookmarks-men
 #containers-panelmenu {
   list-style-image: url("chrome://browser/skin/containers.svg");
 }
 
 #feed-button {
   list-style-image: url("chrome://browser/skin/feed.svg");
 }
 
-#social-share-button {
-  list-style-image: url("chrome://browser/skin/share.svg");
-}
-
 #characterencoding-button {
   list-style-image: url("chrome://browser/skin/characterEncoding.svg");
 }
 
 #new-window-button {
   list-style-image: url("chrome://browser/skin/new-window.svg");
 }
 
--- a/browser/themes/shared/toolbarbuttons.inc.css
+++ b/browser/themes/shared/toolbarbuttons.inc.css
@@ -61,26 +61,17 @@ toolbar[brighttext] {
 .tabbrowser-arrowscrollbox > .scrollbutton-up,
 .tabbrowser-arrowscrollbox > .scrollbutton-down {
   margin: 0 0 var(--tab-toolbar-navbar-overlap);
 }
 
 .tabbrowser-arrowscrollbox > .scrollbutton-up,
 .tabbrowser-arrowscrollbox > .scrollbutton-down {
   -moz-appearance: none;
-  padding: 0;
-  min-width: 26px;
-  border: 1px solid transparent;
-  border-bottom-style: none;
-  border-radius: var(--toolbarbutton-border-radius) var(--toolbarbutton-border-radius) 0 0;
-}
-
-.tabbrowser-arrowscrollbox > .scrollbutton-up,
-.tabbrowser-arrowscrollbox > .scrollbutton-down {
-  border-radius: 0;
+  padding: 0 var(--toolbarbutton-inner-padding);
 }
 
 #navigator-toolbox:not(:hover) > #TabsToolbar > #tabbrowser-tabs > .tabbrowser-arrowscrollbox > .scrollbutton-down:not([highlight]) {
   transition: 1s background-color ease-out;
 }
 
 .tabbrowser-arrowscrollbox > .scrollbutton-down[highlight] {
   background-color: Highlight;
@@ -258,21 +249,29 @@ toolbar .toolbarbutton-1[checked]:not(:a
 #BMB_bookmarksPopup[side="right"] {
   margin-top: -20px;
   margin-bottom: -20px;
 }
 
 /* ::::: bookmark buttons ::::: */
 
 toolbarbutton.bookmark-item:not(.subviewbutton) {
-  margin: 0;
-  padding: 2px 3px;
+  margin: 0 2px;
+  padding: 0 4px;
   -moz-appearance: none;
 }
 
+:root[uidensity=compact] toolbarbutton.bookmark-item:not(.subviewbutton) {
+  margin: 0 1px;
+}
+
+:root[uidensity=touch] toolbarbutton.bookmark-item:not(.subviewbutton) {
+  padding: 4px;
+}
+
 .bookmark-item > .toolbarbutton-icon,
 #personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder > .toolbarbutton-icon {
   width: 16px;
   height: 16px;
 }
 
 /* Force the display of the label for bookmarks */
 .bookmark-item > .toolbarbutton-text,
--- a/browser/themes/shared/urlbar-searchbar.inc.css
+++ b/browser/themes/shared/urlbar-searchbar.inc.css
@@ -180,20 +180,19 @@
   fill: transparent;
   position: relative;
 }
 
 #star-button-box[animationsenabled] > #star-button[starred][animate] + #star-button-animatable-box {
   position: absolute;
   overflow: hidden;
   top: calc(50% - 16.5px); /* 16.5px is half the height of the sprite */
-  /* .urlbar-icon has width 22px. Each frame is 33px wide. Set margin-inline-start
-     to be half the difference, -5.5px, plus the 6px margin-inline-start of
-     .urlbar-icon, 6px. */
-  margin-inline-start: 0.5px;
+  /* .urlbar-icon has width 28px. Each frame is 33px wide. Set margin-inline-start
+     to be half the difference, -2.5px. */
+  margin-inline-start: -2.5px;
   /* Set the height to equal the height of each frame of the SVG. Must use
      min- and max- width and height due to bug 1379332. */
   min-width: 33px;
   max-width: 33px;
   min-height: 33px;
   max-height: 33px;
 }
 
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -861,91 +861,16 @@ treechildren.searchbar-treebody::-moz-tr
   -moz-image-region: rect(0, 32px, 16px, 16px);
 }
 
 #reader-mode-button:hover:active,
 #reader-mode-button[readeractive] {
   -moz-image-region: rect(0, 48px, 16px, 32px);
 }
 
-/* social share panel */
-%include ../shared/social/social.inc.css
-
-.social-panel-frame {
-  border-radius: inherit;
-}
-
-.social-share-frame {
-  min-width: 756px;
-  height: 150px;
-}
-#share-container {
-  min-width: 756px;
-  background-color: white;
-  background-repeat: no-repeat;
-  background-position: center center;
-}
-#share-container[loading] {
-  background-image: url(chrome://browser/skin/tabbrowser/pendingpaint.png);
-}
-#share-container > browser {
-  transition: opacity 150ms ease-in-out;
-  opacity: 1;
-}
-#share-container[loading] > browser {
-  opacity: 0;
-}
-
-.social-share-toolbar {
-  border-bottom: 1px solid #e2e5e8;
-  padding: 2px;
-}
-
-#social-share-provider-buttons {
-  padding: 0;
-  margin: 0;
-}
-
-.share-provider-button {
-  padding: 5px;
-  margin: 2px;
-}
-
-.share-provider-button > .toolbarbutton-text {
-  display: none;
-}
-.share-provider-button > .toolbarbutton-icon {
-  width: 16px;
-  min-height: 16px;
-  max-height: 16px;
-}
-
-#social-share-panel {
-  min-height: 100px;
-  min-width: 766px;
-}
-
-#share-container,
-.social-share-frame {
-  border-top-left-radius: 0;
-  border-bottom-left-radius: inherit;
-  border-top-right-radius: 0;
-  border-bottom-right-radius: inherit;
-}
-
-#social-share-panel > .social-share-toolbar {
-  border-top-left-radius: inherit;
-  border-top-right-radius: inherit;
-}
-
-#social-share-provider-buttons {
-  border-top-left-radius: inherit;
-  border-top-right-radius: inherit;
-}
-
 /* bookmarking panel */
 
 #editBookmarkPanelStarIcon {
   list-style-image: url("chrome://browser/skin/places/starred48.png");
   width: 48px;
   height: 48px;
 }
 
--- a/browser/themes/windows/customizableui/panelUI.css
+++ b/browser/themes/windows/customizableui/panelUI.css
@@ -92,24 +92,16 @@ menuitem[type="checkbox"].subviewbutton 
 .subviewbutton > .toolbarbutton-text {
   padding-inline-start: 16px;
 }
 
 .subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item) > .toolbarbutton-text {
   padding-inline-start: 0;
 }
 
-/* subviewbutton entries for social sidebars have images that come from external
-/* sources, and are not guaranteed to be the size we want, so force the size on
-/* those icons. */
-toolbarbutton.social-provider-menuitem > .toolbarbutton-icon {
-  width: 16px;
-  height: 16px;
-}
-
 .subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
   visibility: hidden;
 }
 
 menu.subviewbutton > .menu-right {
   -moz-appearance: none;
   list-style-image: url(chrome://browser/skin/customizableui/menu-arrow.svg);
   -moz-context-properties: fill;
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -77,18 +77,16 @@ browser.jar:
   skin/classic/browser/preferences/application.png             (preferences/application.png)
   skin/classic/browser/preferences/saveFile.png                (preferences/saveFile.png)
   skin/classic/browser/preferences/preferences.css             (preferences/preferences.css)
 * skin/classic/browser/preferences/in-content/preferences.css  (preferences/in-content/preferences.css)
 * skin/classic/browser/preferences/in-content-new/preferences.css      (preferences/in-content-new/preferences.css)
 * skin/classic/browser/preferences/in-content/dialog.css       (preferences/in-content/dialog.css)
 * skin/classic/browser/preferences/in-content-new/dialog.css           (preferences/in-content-new/dialog.css)
   skin/classic/browser/preferences/applications.css            (preferences/applications.css)
-  skin/classic/browser/social/services-16.png                  (social/services-16.png)
-  skin/classic/browser/social/services-64.png                  (social/services-64.png)
   skin/classic/browser/tabbrowser/tabDragIndicator.png         (tabbrowser/tabDragIndicator.png)
   skin/classic/browser/window-controls/close.svg                 (window-controls/close.svg)
   skin/classic/browser/window-controls/close-highcontrast.svg    (window-controls/close-highcontrast.svg)
   skin/classic/browser/window-controls/close-themes.svg          (window-controls/close-themes.svg)
   skin/classic/browser/window-controls/maximize.svg              (window-controls/maximize.svg)
   skin/classic/browser/window-controls/maximize-highcontrast.svg (window-controls/maximize-highcontrast.svg)
   skin/classic/browser/window-controls/maximize-themes.svg       (window-controls/maximize-themes.svg)
   skin/classic/browser/window-controls/minimize.svg              (window-controls/minimize.svg)
--- a/browser/themes/windows/places/places.css
+++ b/browser/themes/windows/places/places.css
@@ -46,17 +46,25 @@
 /* Trees */
 
 %include ../../shared/places/tree-icons.inc.css
 
 /* Browser Sidebars */
 
 /* Default button vert. margins are 1px/2px, and this can cause misalignment */
 #viewButton {
-  margin-top: 2px;
-  margin-bottom: 2px;
+  margin: 0;
+  margin-inline-start: 4px;
 }
 
 #viewButton > .button-box > .button-menu-dropmarker {
   height: auto;
   width: auto;
   margin-inline-end: -3px;
 }
+
+#sidebar-search-container {
+  padding: 4px;
+}
+
+#search-box {
+  margin: 0;
+}
--- a/build/unix/stdc++compat/stdc++compat.cpp
+++ b/build/unix/stdc++compat/stdc++compat.cpp
@@ -155,8 +155,17 @@ namespace std {
   }
 
   /* For some reason this is a symbol exported by new versions of libstdc++,
    * even though the destructor is default there too */
   __attribute__((weak)) thread::_State::~_State() = default;
 #endif
 }
 #endif
+
+#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
+namespace std
+{
+  /* Instantiate this template to avoid GLIBCXX_3.4.21 symbol versions
+   * depending on optimization level */
+  template basic_ios<char, char_traits<char> >::operator bool() const;
+}
+#endif
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -12362,17 +12362,17 @@ nsDocShell::SetCurrentScrollRestorationI
   if (mOSHE) {
     mOSHE->SetScrollRestorationIsManual(aIsManual);
   }
 
   return NS_OK;
 }
 
 bool
-nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI)
+nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel)
 {
   // I believe none of the about: urls should go in the history. But then
   // that could just be me... If the intent is only deny about:blank then we
   // should just do a spec compare, rather than two gets of the scheme and
   // then the path.  -Gagan
   nsresult rv;
   nsAutoCString buf;
 
@@ -12382,19 +12382,29 @@ nsDocShell::ShouldAddToSessionHistory(ns
   }
 
   if (buf.EqualsLiteral("about")) {
     rv = aURI->GetPathQueryRef(buf);
     if (NS_FAILED(rv)) {
       return false;
     }
 
-    if (buf.EqualsLiteral("blank") || buf.EqualsLiteral("newtab")) {
+    if (buf.EqualsLiteral("blank")) {
       return false;
     }
+    // We only want to add about:newtab if it's not privileged:
+    if (buf.EqualsLiteral("newtab")) {
+      NS_ENSURE_TRUE(aChannel, false);
+      nsCOMPtr<nsIPrincipal> resultPrincipal;
+      rv = nsContentUtils::GetSecurityManager()->
+             GetChannelResultPrincipal(aChannel,
+                                       getter_AddRefs(resultPrincipal));
+      NS_ENSURE_SUCCESS(rv, false);
+      return !nsContentUtils::IsSystemPrincipal(resultPrincipal);
+    }
   }
 
   return true;
 }
 
 nsresult
 nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
                                 nsIPrincipal* aTriggeringPrincipal,
@@ -12417,19 +12427,16 @@ nsDocShell::AddToSessionHistory(nsIURI* 
     MOZ_LOG(gDocShellLog, LogLevel::Debug,
             ("nsDocShell[%p]::AddToSessionHistory(\"%s\", [%s])\n",
              this, aURI->GetSpecOrDefault().get(), chanName.get()));
   }
 #endif
 
   nsresult rv = NS_OK;
   nsCOMPtr<nsISHEntry> entry;
-  bool shouldPersist;
-
-  shouldPersist = ShouldAddToSessionHistory(aURI);
 
   // Get a handle to the root docshell
   nsCOMPtr<nsIDocShellTreeItem> root;
   GetSameTypeRootTreeItem(getter_AddRefs(root));
   /*
    * If this is a LOAD_FLAGS_REPLACE_HISTORY in a subframe, we use
    * the existing SH entry in the page and replace the url and
    * other vitalities.
@@ -12621,16 +12628,18 @@ nsDocShell::AddToSessionHistory(nsIURI* 
     }
 
     if (addToSHistory) {
       // Add to session history
       nsCOMPtr<nsISHistoryInternal> shPrivate =
         do_QueryInterface(mSessionHistory);
       NS_ENSURE_TRUE(shPrivate, NS_ERROR_FAILURE);
       mSessionHistory->GetIndex(&mPreviousTransIndex);
+
+      bool shouldPersist = ShouldAddToSessionHistory(aURI, aChannel);
       rv = shPrivate->AddEntry(entry, shouldPersist);
       mSessionHistory->GetIndex(&mLoadedTransIndex);
 #ifdef DEBUG_PAGE_CACHE
       printf("Previous index: %d, Loaded index: %d\n\n",
              mPreviousTransIndex, mLoadedTransIndex);
 #endif
     }
   } else {
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -442,17 +442,17 @@ protected:
                 bool aFireOnLocationChange,
                 bool aAddToGlobalHistory,
                 bool aCloneSHChildren);
 
   void SetReferrerURI(nsIURI* aURI);
   void SetReferrerPolicy(uint32_t aReferrerPolicy);
 
   // Session History
-  bool ShouldAddToSessionHistory(nsIURI* aURI);
+  bool ShouldAddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel);
   // Either aChannel or aOwner must be null. If aChannel is
   // present, the owner should be gotten from it.
   // If aCloneChildren is true, then our current session history's
   // children will be cloned onto the new entry. This should be
   // used when we aren't actually changing the document while adding
   // the new session history entry.
   nsresult AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
                                nsIPrincipal* aTriggeringPrincipal,
--- a/dom/base/DOMError.cpp
+++ b/dom/base/DOMError.cpp
@@ -2,16 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.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 "mozilla/dom/DOMError.h"
 #include "mozilla/dom/DOMErrorBinding.h"
 #include "mozilla/dom/DOMException.h"
+#include "mozilla/UseCounter.h"
 #include "nsPIDOMWindow.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMError, mWindow)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMError)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMError)
@@ -62,16 +63,23 @@ DOMError::WrapObject(JSContext* aCx, JS:
 
 /* static */ already_AddRefed<DOMError>
 DOMError::Constructor(const GlobalObject& aGlobal,
                       const nsAString& aName, const nsAString& aMessage,
                       ErrorResult& aRv)
 {
   nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal.GetAsSupports());
 
+  if (window) {
+    nsCOMPtr<nsIDocument> doc = window->GetExtantDoc();
+    if (doc) {
+      doc->SetDocumentAndPageUseCounter(eUseCounter_custom_DOMErrorConstructor);
+    }
+  }
+
   // Window is null for chrome code.
 
   RefPtr<DOMError> ret = new DOMError(window, aName, aMessage);
   return ret.forget();
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/base/UseCounters.conf
+++ b/dom/base/UseCounters.conf
@@ -44,16 +44,19 @@
 // annotating the WebIDL files does nothing for identifying CSS
 // property usage, which we would also like to track.
 
 method SVGSVGElement.getElementById
 attribute SVGSVGElement.currentScale
 property Fill
 property FillOpacity
 attribute XMLDocument.async
+attribute DOMError.name
+attribute DOMError.message
+custom DOMErrorConstructor constructed a DOMError
 
 // Push API
 method PushManager.subscribe
 method PushSubscription.unsubscribe
 
 // window.sidebar.addSearchEngine
 attribute Window.sidebar
 method External.addSearchEngine
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -81,17 +81,17 @@
 
 // input type=file
 #include "mozilla/dom/FileSystemEntry.h"
 #include "mozilla/dom/FileSystem.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/FileList.h"
 #include "nsIFile.h"
 #include "nsDirectoryServiceDefs.h"
-#include "nsIContentPrefService.h"
+#include "nsIContentPrefService2.h"
 #include "nsIMIMEService.h"
 #include "nsIObserverService.h"
 #include "nsIPopupWindowManager.h"
 #include "nsGlobalWindow.h"
 
 // input type=image
 #include "nsImageLoadingContent.h"
 #include "imgRequestProxy.h"
--- a/dom/interfaces/base/moz.build
+++ b/dom/interfaces/base/moz.build
@@ -7,17 +7,16 @@
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM")
 
 XPIDL_SOURCES += [
     'domstubs.idl',
     'nsIBrowser.idl',
     'nsIBrowserDOMWindow.idl',
     'nsIContentPermissionPrompt.idl',
-    'nsIContentPrefService.idl',
     'nsIContentPrefService2.idl',
     'nsIContentProcess.idl',
     'nsIContentURIGrouper.idl',
     'nsIDOMChromeWindow.idl',
     'nsIDOMClientRect.idl',
     'nsIDOMClientRectList.idl',
     'nsIDOMConstructor.idl',
     'nsIDOMCrypto.idl',
deleted file mode 100644
--- a/dom/interfaces/base/nsIContentPrefService.idl
+++ /dev/null
@@ -1,263 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIVariant;
-interface nsIPropertyBag2;
-interface nsIContentURIGrouper;
-interface nsILoadContext;
-interface mozIStorageConnection;
-
-[scriptable, uuid(43635c53-b445-4c4e-8cc5-562697299b55)]
-interface nsIContentPrefObserver : nsISupports
-{
-  /**
-   * Called when a content pref is set to a different value.
-   *
-   * @param    aGroup      the group to which the pref belongs, or null
-   *                       if it's a global pref (applies to all sites)
-   * @param    aName       the name of the pref that was set
-   * @param    aValue      the new value of the pref
-   * @param    aIsPrivate  an optional flag determining whether the
-   *                       original context is private or not
-   */
-  void onContentPrefSet(in AString aGroup,
-                        in AString aName,
-                        in nsIVariant aValue,
-                        [optional] in boolean aIsPrivate);
-
-  /**
-   * Called when a content pref is removed.
-   *
-   * @param    aGroup      the group to which the pref belongs, or null
-   *                       if it's a global pref (applies to all sites)
-   * @param    aName       the name of the pref that was removed
-   * @param    aIsPrivate  an optional flag determining whether the
-   *                       original context is private or not
-   */
-  void onContentPrefRemoved(in AString aGroup,
-                            in AString aName,
-                            [optional] in boolean aIsPrivate);
-};
-
-[scriptable, function, uuid(c1b3d6df-5373-4606-8494-8bcf14a7fc62)]
-interface nsIContentPrefCallback : nsISupports
-{
-  void onResult(in nsIVariant aResult);
-};
-
-/**
- * @deprecated Please use nsIContentPrefService2 instead.
- */
-[scriptable, uuid(e3f772f3-023f-4b32-b074-36cf0fd5d414)]
-interface nsIContentPrefService : nsISupports
-{
-  /**
-   * Get a pref.
-   *
-   * Besides the regular string, integer, boolean, etc. values, this method
-   * may return null (nsIDataType::VTYPE_EMPTY), which means the pref is set
-   * to NULL in the database, as well as undefined (nsIDataType::VTYPE_VOID),
-   * which means there is no record for this pref in the database.
-   *
-   * This method can be called from content processes in electrolysis builds.
-   * We have a whitelist of values that can be read in such a way.
-   *
-   * @param    aGroup      the group for which to get the pref, as an nsIURI
-   *                       from which the hostname will be used, a string
-   *                       (typically in the format of a hostname), or null
-   *                       to get the global pref (applies to all sites)
-   * @param    aName       the name of the pref to get
-   * @param    aPrivacyContext
-   *                       a context from which to determine the privacy status
-   *                       of the pref (ie. whether to search in memory or in
-   *                       permanent storage for it), obtained from a relevant
-   *                       window or channel.
-   * @param    aCallback   an optional nsIContentPrefCallback to receive the
-   *                       result. If desired, JavaScript callers can instead
-   *                       provide a function to call upon completion
-   *
-   * @returns  the value of the pref
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string
-   */
-  nsIVariant getPref(in nsIVariant aGroup, in AString aName,
-                     in nsILoadContext aPrivacyContext,
-                     [optional] in nsIContentPrefCallback aCallback);
-
-  /**
-   * Set a pref.
-   *
-   * This method can be called from content processes in electrolysis builds.
-   * We have a whitelist of values that can be set in such a way.
-   *
-   * @param    aGroup      the group for which to set the pref, as an nsIURI
-   *                       from which the hostname will be used, a string
-   *                       (typically in the format of a hostname), or null
-   *                       to set the global pref (applies to all sites)
-   * @param    aName       the name of the pref to set
-   * @param    aValue      the new value of the pref
-   * @param    aPrivacyContext
-   *                       a context from which to determine the privacy status
-   *                       of the pref (ie. whether to store it in memory or in
-   *                       permanent storage), obtained from a relevant
-   *                       window or channel.
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string
-   */
-  void setPref(in nsIVariant aGroup, in AString aName, in nsIVariant aValue, in nsILoadContext aPrivacyContext);
-
-  /**
-   * Check whether or not a pref exists.
-   *
-   * @param    aGroup      the group for which to check for the pref, as an nsIURI
-   *                       from which the hostname will be used, a string
-   *                       (typically in the format of a hostname), or null
-   *                       to check for the global pref (applies to all sites)
-   * @param    aName       the name of the pref to check for
-   * @param    aPrivacyContext
-   *                       a context from which to determine the privacy status
-   *                       of the pref (ie. whether to search in memory or in
-   *                       permanent storage for it), obtained from a relevant
-   *                       window or channel.
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string
-   */
-  boolean hasPref(in nsIVariant aGroup, in AString aName, in nsILoadContext aContext);
-
-  /**
-   * Check whether or not the value of a pref (or its non-existance) is cached.
-   *
-   * @param    aGroup      the group for which to check for the pref, as an nsIURI
-   *                       from which the hostname will be used, a string
-   *                       (typically in the format of a hostname), or null
-   *                       to check for the global pref (applies to all sites)
-   * @param    aName       the name of the pref to check for
-   * @param    aPrivacyContext
-   *                       a context from which to determine the privacy status
-   *                       of the pref (ie. whether to search in memory or in
-   *                       permanent storage for it), obtained from a relevant
-   *                       window or channel.
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string
-   */
-  boolean hasCachedPref(in nsIVariant aGroup, in AString aName, in nsILoadContext aContext);
-
-  /**
-   * Remove a pref.
-   *
-   * @param    aGroup      the group for which to remove the pref, as an nsIURI
-   *                       from which the hostname will be used, a string
-   *                       (typically in the format of a hostname), or null
-   *                       to remove the global pref (applies to all sites)
-   * @param    aName       the name of the pref to remove
-   * @param    aPrivacyContext
-   *                       a context from which to determine the privacy status
-   *                       of the pref (ie. whether to search in memory or in
-   *                       permanent storage for it), obtained from a relevant
-   *                       window or channel.
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string
-   */
-  void removePref(in nsIVariant aGroup, in AString aName, in nsILoadContext aContext);
-
-  /**
-   * Remove all grouped prefs.  Useful for removing references to the sites
-   * the user has visited when the user clears their private data.
-   *
-   * @param    aPrivacyContext
-   *                       a context from which to determine the privacy status
-   *                       of the pref (ie. whether to remove prefs in memory or
-   *                       in permanent storage), obtained from a relevant
-   *                       window or channel.
-   */
-  void removeGroupedPrefs(in nsILoadContext aContext);
-
-  /**
-   * Remove all prefs with the given name.
-   *
-   * @param    aName        the setting name for which to remove prefs
-   * @param    aPrivacyContext
-   *                        a context from which to determine the privacy status
-   *                        of the prefs (ie. whether to remove prefs in memory or
-   *                        in permanent storage), obtained from a relevant
-   *                        window or channel.
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string
-   */
-  void removePrefsByName(in AString aName, in nsILoadContext aContext);
-
-  /**
-   * Get the prefs that apply to the given site.
-   *
-   * @param    aGroup      the group for which to retrieve prefs, as an nsIURI
-   *                       from which the hostname will be used, a string
-   *                       (typically in the format of a hostname), or null
-   *                       to get the global prefs (apply to all sites)
-   * @param    aPrivacyContext
-   *                       a context from which to determine the privacy status
-   *                       of the pref (ie. whether to search for prefs in memory
-   *                       or in permanent storage), obtained from a relevant
-   *                       window or channel.
-   *
-   * @returns  a property bag of prefs
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null
-   */
-  nsIPropertyBag2 getPrefs(in nsIVariant aGroup, in nsILoadContext aContext);
-
-  /**
-   * Get the prefs with the given name.
-   *
-   * @param    aName        the setting name for which to retrieve prefs
-   * @param    aPrivacyContext
-   *                        a context from which to determine the privacy status
-   *                        of the pref (ie. whether to search for prefs in memory
-   *                        or in permanent storage), obtained from a relevant
-   *                        window or channel.
-   *
-   * @returns  a property bag of prefs
-   * @throws   NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string
-   */
-  nsIPropertyBag2 getPrefsByName(in AString aName, in nsILoadContext aContext);
-
-  /**
-   * Add an observer.
-   *
-   * @param    aName       the setting to observe, or null to add
-   *                       a generic observer that observes all settings
-   * @param    aObserver   the observer to add
-   */
-  void addObserver(in AString aName, in nsIContentPrefObserver aObserver);
-
-  /**
-   * Remove an observer.
-   *
-   * @param    aName       the setting being observed, or null to remove
-   *                       a generic observer that observes all settings
-   * @param    aObserver   the observer to remove
-   */
-  void removeObserver(in AString aName, in nsIContentPrefObserver aObserver);
-
-  /**
-   * The component that the service uses to determine the groups to which
-   * URIs belong.  By default this is the "hostname grouper", which groups
-   * URIs by full hostname (a.k.a. site).
-   */
-  readonly attribute nsIContentURIGrouper grouper;
-
-  /**
-   * The database connection to the content preferences database.
-   * Useful for accessing and manipulating preferences in ways that are caller-
-   * specific or for which there is not yet a generic method, although generic
-   * functionality useful to multiple callers should generally be added to this
-   * unfrozen interface.  Also useful for testing the database creation
-   * and migration code.
-   */
-  readonly attribute mozIStorageConnection DBConnection;
-};
-
-%{C++
-// The contractID for the generic implementation built in to xpcom.
-#define NS_CONTENT_PREF_SERVICE_CONTRACTID "@mozilla.org/content-pref/service;1"
-%}
--- a/dom/interfaces/base/nsIContentPrefService2.idl
+++ b/dom/interfaces/base/nsIContentPrefService2.idl
@@ -1,20 +1,51 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIVariant;
-interface nsIContentPrefObserver;
 interface nsIContentPrefCallback2;
 interface nsILoadContext;
 interface nsIContentPref;
 
+[scriptable, uuid(43635c53-b445-4c4e-8cc5-562697299b55)]
+interface nsIContentPrefObserver : nsISupports
+{
+  /**
+   * Called when a content pref is set to a different value.
+   *
+   * @param    aGroup      the group to which the pref belongs, or null
+   *                       if it's a global pref (applies to all sites)
+   * @param    aName       the name of the pref that was set
+   * @param    aValue      the new value of the pref
+   * @param    aIsPrivate  an optional flag determining whether the
+   *                       original context is private or not
+   */
+  void onContentPrefSet(in AString aGroup,
+                        in AString aName,
+                        in nsIVariant aValue,
+                        [optional] in boolean aIsPrivate);
+
+  /**
+   * Called when a content pref is removed.
+   *
+   * @param    aGroup      the group to which the pref belongs, or null
+   *                       if it's a global pref (applies to all sites)
+   * @param    aName       the name of the pref that was removed
+   * @param    aIsPrivate  an optional flag determining whether the
+   *                       original context is private or not
+   */
+  void onContentPrefRemoved(in AString aGroup,
+                            in AString aName,
+                            [optional] in boolean aIsPrivate);
+};
+
 /**
  * Content Preferences
  *
  * Content preferences allow the application to associate arbitrary data, or
  * "preferences", with specific domains, or web "content".  Specifically, a
  * content preference is a structure with three values: a domain with which the
  * preference is associated, a name that identifies the preference within its
  * domain, and a value.  (See nsIContentPref below.)
@@ -398,8 +429,13 @@ interface nsIContentPrefCallback2 : nsIS
 
 [scriptable, function, uuid(9f24948d-24b5-4b1b-b554-7dbd58c1d792)]
 interface nsIContentPref : nsISupports
 {
   readonly attribute AString domain;
   readonly attribute AString name;
   readonly attribute nsIVariant value;
 };
+
+%{C++
+// The contractID for the generic implementation built in to xpcom.
+#define NS_CONTENT_PREF_SERVICE_CONTRACTID "@mozilla.org/content-pref/service;1"
+%}
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -664,17 +664,17 @@ NotificationPermissionRequest::GetTypes(
 {
   nsTArray<nsString> emptyOptions;
   return nsContentPermissionUtils::CreatePermissionArray(NS_LITERAL_CSTRING("desktop-notification"),
                                                          NS_LITERAL_CSTRING("unused"),
                                                          emptyOptions,
                                                          aTypes);
 }
 
-NS_IMPL_ISUPPORTS(NotificationTelemetryService, nsISupports)
+NS_IMPL_ISUPPORTS(NotificationTelemetryService, nsIObserver)
 
 NotificationTelemetryService::NotificationTelemetryService()
   : mDNDRecorded(false)
 {}
 
 NotificationTelemetryService::~NotificationTelemetryService()
 {}
 
@@ -794,16 +794,24 @@ NotificationTelemetryService::RecordDNDS
   if (NS_FAILED(rv)) {
     return;
   }
 
   Telemetry::Accumulate(
     Telemetry::ALERTS_SERVICE_DND_SUPPORTED_FLAG, true);
 }
 
+NS_IMETHODIMP
+NotificationTelemetryService::Observe(nsISupports* aSubject,
+                                      const char* aTopic,
+                                      const char16_t* aData)
+{
+  return NS_OK;
+}
+
 // Observer that the alert service calls to do common tasks and/or dispatch to the
 // specific observer for the context e.g. main thread, worker, or service worker.
 class NotificationObserver final : public nsIObserver
 {
 public:
   nsCOMPtr<nsIObserver> mObserver;
   nsCOMPtr<nsIPrincipal> mPrincipal;
   bool mInPrivateBrowsing;
--- a/dom/notification/Notification.h
+++ b/dom/notification/Notification.h
@@ -47,20 +47,21 @@ public:
   explicit NotificationWorkerHolder(Notification* aNotification);
 
   bool
   Notify(workers::Status aStatus) override;
 };
 
 // Records telemetry probes at application startup, when a notification is
 // shown, and when the notification permission is revoked for a site.
-class NotificationTelemetryService final : public nsISupports
+class NotificationTelemetryService final : public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
+  NS_DECL_NSIOBSERVER
 
   NotificationTelemetryService();
 
   static already_AddRefed<NotificationTelemetryService> GetInstance();
 
   nsresult Init();
   void RecordDNDSupported();
   void RecordPermissions();
--- a/dom/smil/nsSMILCSSValueType.cpp
+++ b/dom/smil/nsSMILCSSValueType.cpp
@@ -521,79 +521,34 @@ InterpolateForGecko(const ValueWrapper* 
                                        *endCSSValue,
                                        aUnitDistance, resultValue)) {
     aResult.mU.mPtr = new ValueWrapper(aEndWrapper.mPropID, resultValue);
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
 
-static bool
-IsPropertyDiscretelyAnimatable(nsCSSPropertyID aProperty)
-{
-  // For shorthands, Servo_Property_IsDiscreteAnimatable will always return
-  // false. That makes sense for shorthands like 'font' which have smoothly
-  // interpolable longhand components. However, for shorthands where all the
-  // components are discretely animatable, like 'font-variant', we should
-  // treat the shorthand as discretely animatable so that we apply SMIL's
-  // special discrete handling to it and all its longhand components.
-  if (nsCSSProps::IsShorthand(aProperty)) {
-    // We could iterate over all the longhand components and call
-    // Servo_Property_IsDiscreteAnimatable on each of them, but that's a lot of
-    // FFI calls do be doing each time we interpolate. Instead, since there are
-    // only about six shorthands in the set of properties that can be animated
-    // by SMIL, we just hard code the discrete ones below then add a debug-mode
-    // check that this list matches what the result would be if we performed
-    // all the FFI calls.
-    bool result;
-    switch (aProperty) {
-      case eCSSProperty_font_variant:
-      case eCSSProperty_marker:
-      case eCSSProperty_overflow:
-        result = true;
-        break;
-      default:
-        result = false;
-        break;
-    }
-
-#ifdef DEBUG
-    bool resultAccordingToServo = true;
-    CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aProperty,
-                                         CSSEnabledState::eForAllContent) {
-      // If the shorthand has one or more non-discrete components, it should not
-      // be treated as discrete.
-      if (!Servo_Property_IsDiscreteAnimatable(*p)) {
-        resultAccordingToServo = false;
-      }
-    }
-    MOZ_ASSERT(result == resultAccordingToServo,
-               "Gecko and Servo should agree on which shorthands should be"
-               " treated as discretely animatable");
-#endif
-
-    return result;
-  }
-
-  return Servo_Property_IsDiscreteAnimatable(aProperty);
-}
-
 static nsresult
 InterpolateForServo(const ValueWrapper* aStartWrapper,
                     const ValueWrapper& aEndWrapper,
                     double aUnitDistance,
                     nsSMILValue& aResult)
 {
   // For discretely-animated properties Servo_AnimationValues_Interpolate will
   // perform the discrete animation (i.e. 50% flip) and return a success result.
   // However, SMIL has its own special discrete animation behavior that it uses
   // when keyTimes are specified, but we won't run that unless that this method
   // returns a failure to indicate that the property cannot be smoothly
   // interpolated, i.e. that we need to use a discrete calcMode.
-  if (IsPropertyDiscretelyAnimatable(aEndWrapper.mPropID)) {
+  //
+  // For shorthands, Servo_Property_IsDiscreteAnimatable will always return
+  // false. That's fine since most shorthands (like 'font' and
+  // 'text-decoration') include non-discrete components. If authors want to
+  // treat all components as discrete then they should use calcMode="discrete".
+  if (Servo_Property_IsDiscreteAnimatable(aEndWrapper.mPropID)) {
     return NS_ERROR_FAILURE;
   }
 
   ServoAnimationValues results;
   size_t len = aEndWrapper.mServoValues.Length();
   results.SetCapacity(len);
   MOZ_ASSERT(!aStartWrapper || aStartWrapper->mServoValues.Length() == len,
              "Start and end values length should be the same if "
--- a/dom/webidl/DOMError.webidl
+++ b/dom/webidl/DOMError.webidl
@@ -8,14 +8,14 @@
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 [Constructor(DOMString name, optional DOMString message = ""),
  Exposed=(Window,Worker,System)]
 interface DOMError {
-  [Constant]
+  [Constant, UseCounter]
   readonly attribute DOMString name;
 
-  [Constant]
+  [Constant, UseCounter]
   readonly attribute DOMString message;
 };
--- a/editor/composer/nsEditorSpellCheck.cpp
+++ b/editor/composer/nsEditorSpellCheck.cpp
@@ -14,17 +14,16 @@
 #include "mozilla/mozalloc.h"           // for operator delete, etc
 #include "nsAString.h"                  // for nsAString::IsEmpty, etc
 #include "nsComponentManagerUtils.h"    // for do_CreateInstance
 #include "nsDebug.h"                    // for NS_ENSURE_TRUE, etc
 #include "nsDependentSubstring.h"       // for Substring
 #include "nsEditorSpellCheck.h"
 #include "nsError.h"                    // for NS_ERROR_NOT_INITIALIZED, etc
 #include "nsIContent.h"                 // for nsIContent
-#include "nsIContentPrefService.h"      // for nsIContentPrefService, etc
 #include "nsIContentPrefService2.h"     // for nsIContentPrefService2, etc
 #include "nsIDOMDocument.h"             // for nsIDOMDocument
 #include "nsIDOMElement.h"              // for nsIDOMElement
 #include "nsIDocument.h"                // for nsIDocument
 #include "nsIEditor.h"                  // for nsIEditor
 #include "nsIHTMLEditor.h"              // for nsIHTMLEditor
 #include "nsILoadContext.h"
 #include "nsISelection.h"               // for nsISelection
--- a/gfx/layers/apz/public/IAPZCTreeManager.h
+++ b/gfx/layers/apz/public/IAPZCTreeManager.h
@@ -152,23 +152,16 @@ public:
    * Updates any zoom constraints contained in the <meta name="viewport"> tag.
    * If the |aConstraints| is Nothing() then previously-provided constraints for
    * the given |aGuid| are cleared.
    */
   virtual void UpdateZoomConstraints(
       const ScrollableLayerGuid& aGuid,
       const Maybe<ZoomConstraints>& aConstraints) = 0;
 
-  /**
-   * Cancels any currently running animation. Note that all this does is set the
-   * state of the AsyncPanZoomController back to NOTHING, but it is the
-   * animation's responsibility to check this before advancing.
-   */
-  virtual void CancelAnimation(const ScrollableLayerGuid &aGuid) = 0;
-
   virtual void SetDPI(float aDpiValue) = 0;
 
   /**
    * Sets allowed touch behavior values for current touch-session for specific
    * input block (determined by aInputBlock).
    * Should be invoked by the widget. Each value of the aValues arrays
    * corresponds to the different touch point that is currently active.
    * Must be called after receiving the TOUCH_START event that starts the
--- a/gfx/layers/apz/src/APZCTreeManager.h
+++ b/gfx/layers/apz/src/APZCTreeManager.h
@@ -279,21 +279,19 @@ public:
    * If the |aConstraints| is Nothing() then previously-provided constraints for
    * the given |aGuid| are cleared.
    */
   void UpdateZoomConstraints(
       const ScrollableLayerGuid& aGuid,
       const Maybe<ZoomConstraints>& aConstraints) override;
 
   /**
-   * Cancels any currently running animation. Note that all this does is set the
-   * state of the AsyncPanZoomController back to NOTHING, but it is the
-   * animation's responsibility to check this before advancing.
+   * Cancels any currently running animation.
    */
-  void CancelAnimation(const ScrollableLayerGuid &aGuid) override;
+  void CancelAnimation(const ScrollableLayerGuid &aGuid);
 
   /**
    * Adjusts the root APZC to compensate for a shift in the surface. See the
    * documentation on AsyncPanZoomController::AdjustScrollForSurfaceShift for
    * some more details. This is only currently needed due to surface shifts
    * caused by the dynamic toolbar on Android.
    */
   void AdjustScrollForSurfaceShift(const ScreenPoint& aShift);
--- a/gfx/layers/ipc/APZCTreeManagerChild.cpp
+++ b/gfx/layers/ipc/APZCTreeManagerChild.cpp
@@ -175,22 +175,16 @@ void
 APZCTreeManagerChild::UpdateZoomConstraints(
     const ScrollableLayerGuid& aGuid,
     const Maybe<ZoomConstraints>& aConstraints)
 {
   SendUpdateZoomConstraints(aGuid, aConstraints);
 }
 
 void
-APZCTreeManagerChild::CancelAnimation(const ScrollableLayerGuid &aGuid)
-{
-  SendCancelAnimation(aGuid);
-}
-
-void
 APZCTreeManagerChild::SetDPI(float aDpiValue)
 {
   SendSetDPI(aDpiValue);
 }
 
 void
 APZCTreeManagerChild::SetAllowedTouchBehavior(
     uint64_t aInputBlockId,
--- a/gfx/layers/ipc/APZCTreeManagerChild.h
+++ b/gfx/layers/ipc/APZCTreeManagerChild.h
@@ -50,19 +50,16 @@ public:
           const nsTArray<ScrollableLayerGuid>& aTargets) override;
 
   void
   UpdateZoomConstraints(
           const ScrollableLayerGuid& aGuid,
           const Maybe<ZoomConstraints>& aConstraints) override;
 
   void
-  CancelAnimation(const ScrollableLayerGuid &aGuid) override;
-
-  void
   SetDPI(float aDpiValue) override;
 
   void
   SetAllowedTouchBehavior(
           uint64_t aInputBlockId,
           const nsTArray<TouchBehaviorFlags>& aValues) override;
 
   void
--- a/gfx/layers/ipc/APZCTreeManagerParent.cpp
+++ b/gfx/layers/ipc/APZCTreeManagerParent.cpp
@@ -237,29 +237,16 @@ APZCTreeManagerParent::RecvUpdateZoomCon
     return IPC_FAIL_NO_REASON(this);
   }
 
   mTreeManager->UpdateZoomConstraints(aGuid, aConstraints);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
-APZCTreeManagerParent::RecvCancelAnimation(const ScrollableLayerGuid& aGuid)
-{
-  if (aGuid.mLayersId != mLayersId) {
-    // Guard against bad data from hijacked child processes
-    NS_ERROR("Unexpected layers id in RecvCancelAnimation; dropping message...");
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  mTreeManager->CancelAnimation(aGuid);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
 APZCTreeManagerParent::RecvSetDPI(const float& aDpiValue)
 {
   mTreeManager->SetDPI(aDpiValue);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 APZCTreeManagerParent::RecvSetAllowedTouchBehavior(
--- a/gfx/layers/ipc/APZCTreeManagerParent.h
+++ b/gfx/layers/ipc/APZCTreeManagerParent.h
@@ -106,19 +106,16 @@ public:
           nsTArray<ScrollableLayerGuid>&& aTargets) override;
 
   mozilla::ipc::IPCResult
   RecvUpdateZoomConstraints(
           const ScrollableLayerGuid& aGuid,
           const MaybeZoomConstraints& aConstraints) override;
 
   mozilla::ipc::IPCResult
-  RecvCancelAnimation(const ScrollableLayerGuid& aGuid) override;
-
-  mozilla::ipc::IPCResult
   RecvSetDPI(const float& aDpiValue) override;
 
   mozilla::ipc::IPCResult
   RecvSetAllowedTouchBehavior(
           const uint64_t& aInputBlockId,
           nsTArray<TouchBehaviorFlags>&& aValues) override;
 
   mozilla::ipc::IPCResult
--- a/gfx/layers/ipc/PAPZCTreeManager.ipdl
+++ b/gfx/layers/ipc/PAPZCTreeManager.ipdl
@@ -66,18 +66,16 @@ parent:
   async ZoomToRect(ScrollableLayerGuid aGuid, CSSRect aRect, uint32_t Flags);
 
   async ContentReceivedInputBlock(uint64_t aInputBlockId, bool PreventDefault);
 
   async SetTargetAPZC(uint64_t aInputBlockId, ScrollableLayerGuid[] Targets);
 
   async UpdateZoomConstraints(ScrollableLayerGuid aGuid, MaybeZoomConstraints aConstraints);
 
-  async CancelAnimation(ScrollableLayerGuid aGuid);
-
   async SetKeyboardMap(KeyboardMap aKeyboardMap);
 
   async SetDPI(float aDpiValue);
 
   async SetAllowedTouchBehavior(uint64_t aInputBlockId, TouchBehaviorFlags[] aValues);
 
   async StartScrollbarDrag(ScrollableLayerGuid aGuid, AsyncDragMetrics aDragMetrics);
 
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -54,18 +54,16 @@ SERVO_BINDING_FUNC(Servo_StyleSheet_Clon
                    const mozilla::ServoStyleSheet* reference_sheet);
 SERVO_BINDING_FUNC(Servo_StyleSheet_SizeOfIncludingThis, size_t,
                    mozilla::MallocSizeOf malloc_size_of,
                    RawServoStyleSheetContentsBorrowed sheet)
 SERVO_BINDING_FUNC(Servo_StyleSheet_GetOrigin,
                    mozilla::OriginFlags,
                    RawServoStyleSheetContentsBorrowed sheet)
 SERVO_BINDING_FUNC(Servo_StyleSet_Init, RawServoStyleSet*, RawGeckoPresContextOwned pres_context)
-SERVO_BINDING_FUNC(Servo_StyleSet_Clear, void,
-                   RawServoStyleSetBorrowed set)
 SERVO_BINDING_FUNC(Servo_StyleSet_RebuildCachedData, void,
                    RawServoStyleSetBorrowed set)
 // We'd like to return `OriginFlags` here, but bindgen bitfield enums don't
 // work as return values with the Linux 32-bit ABI at the moment because
 // they wrap the value in a struct.
 SERVO_BINDING_FUNC(Servo_StyleSet_MediumFeaturesChanged, uint8_t,
                    RawServoStyleSetBorrowed set, bool* viewport_units_used)
 SERVO_BINDING_FUNC(Servo_StyleSet_Drop, void, RawServoStyleSetOwned set)
deleted file mode 100755
index cca9b03ade1b7a27e1e0f7f76af15d225fa3e9e1..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 2ce3c39fe8e7dc1f7865ca5f422035cae7d55e4e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 38bc4d4ed221e3b8bb356b8323c8b98ae94b0c7f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index bd19044561106f3eb457036d84b8554e892fda0a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 468b5bc1a96eb15431f2c1939723d023e9c00fbb..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/app/src/photon/res/drawable/action_bar_button.xml
+++ b/mobile/android/app/src/photon/res/drawable/action_bar_button.xml
@@ -1,65 +1,19 @@
 <?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/. -->
 
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:gecko="http://schemas.android.com/apk/res-auto">
-
-    <item android:state_enabled="true"
-          android:state_pressed="true"
-          gecko:state_private="true">
-        <inset android:insetBottom="@dimen/browser_toolbar_image_button_v_spacing"
-               android:insetLeft="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetRight="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetTop="@dimen/browser_toolbar_image_button_v_spacing">
-            <shape>
-                <solid android:color="@color/action_bar_item_bg_color_private_pressed"/>
-                <corners android:radius="@dimen/browser_toolbar_menu_radius"/>
-            </shape>
-        </inset>
-    </item>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
 
-    <item android:state_focused="true"
-          android:state_pressed="false"
-          gecko:state_private="true">
-        <inset android:insetBottom="@dimen/browser_toolbar_image_button_v_spacing"
-               android:insetLeft="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetRight="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetTop="@dimen/browser_toolbar_image_button_v_spacing">
-            <shape>
-                <solid android:color="@color/action_bar_item_bg_color_private_pressed"/>
-                <corners android:radius="@dimen/browser_toolbar_menu_radius"/>
-            </shape>
-        </inset>
-    </item>
+    <item android:drawable="@color/highlight"
+          android:state_enabled="true"
+          android:state_pressed="true"/>
 
-    <item android:state_enabled="true"
-          android:state_pressed="true">
-        <inset android:insetBottom="@dimen/browser_toolbar_image_button_v_spacing"
-               android:insetLeft="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetRight="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetTop="@dimen/browser_toolbar_image_button_v_spacing">
-            <shape>
-                <solid android:color="@color/action_bar_item_bg_color_pressed"/>
-                <corners android:radius="@dimen/browser_toolbar_menu_radius"/>
-            </shape>
-        </inset>
-    </item>
-
-    <item android:state_focused="true"
-          android:state_pressed="false">
-        <inset android:insetBottom="@dimen/browser_toolbar_image_button_v_spacing"
-               android:insetLeft="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetRight="@dimen/browser_toolbar_image_button_h_spacing"
-               android:insetTop="@dimen/browser_toolbar_image_button_v_spacing">
-            <shape>
-                <solid android:color="@color/action_bar_item_bg_color_pressed"/>
-                <corners android:radius="@dimen/browser_toolbar_menu_radius"/>
-            </shape>
-        </inset>
-    </item>
+    <item android:drawable="@color/highlight_focused"
+          android:state_focused="true"
+          android:state_pressed="false"/>
 
     <item android:drawable="@android:color/transparent"/>
+
 </selector>
copy from mobile/android/app/src/photon/res/drawable/action_bar_button.xml
copy to mobile/android/app/src/photon/res/drawable/menu_item_button.xml
--- a/mobile/android/app/src/photon/res/layout/private_tabs_panel.xml
+++ b/mobile/android/app/src/photon/res/layout/private_tabs_panel.xml
@@ -17,22 +17,16 @@
         android:scrollbars="none">
 
         <LinearLayout
             android:id="@+id/private_tabs_empty"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:orientation="vertical">
 
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_horizontal"
-                android:src="@drawable/private_illustration_android"/>
-
             <TextView
                 style="@style/TextAppearance.PrivateTab.Title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_horizontal"
                 android:lineSpacingMultiplier="1.2"
                 android:gravity="center_horizontal"
                 android:text="@string/private_tab_panel_title"
@@ -40,28 +34,28 @@
 
             <TextView
                 style="@style/TextAppearance.PrivateTab.Description"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_horizontal"
                 android:layout_marginBottom="16dp"
                 android:gravity="center_horizontal"
-                android:lineSpacingMultiplier="1.4"
+                android:lineSpacingMultiplier="1.3"
                 android:text="@string/private_tab_panel_description"
                 android:textColor="@color/photon_text_secondary"/>
 
             <TextView
                 style="@style/TextAppearance.PrivateTab.Description"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_horizontal"
                 android:layout_marginBottom="36dp"
                 android:gravity="center_horizontal"
-                android:lineSpacingMultiplier="1.4"
+                android:lineSpacingMultiplier="1.3"
                 android:text="@string/private_tab_panel_description2"
                 android:textColor="@color/photon_text_secondary"/>
 
             <TextView
                 style="@style/TextAppearance.PrivateTab.Description"
                 android:id="@+id/learn_more_link"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
--- a/mobile/android/app/src/photon/res/values-large/styles.xml
+++ b/mobile/android/app/src/photon/res/values-large/styles.xml
@@ -35,17 +35,17 @@
 
         <!-- Same as pre-19 Toast style, but with no left and right margins.
              They're removed since large tablets are never going to be only 400dp wide. -->
     </style>
 
     <style name="Widget.MenuItemActionBar">
         <item name="android:layout_width">wrap_content</item>
         <item name="android:layout_height">wrap_content</item>
-        <item name="android:background">@drawable/action_bar_button</item>
+        <item name="android:background">@drawable/menu_item_button</item>
         <item name="drawableTintList">@color/action_bar_menu_item_colors</item>
         <item name="android:scaleType">center</item>
 
         <!-- layout_width/height doesn't work here, likely because it's only
              added programmatically, so we use padding for the width instead.
              layout_height is set to MATCH_PARENT programmatically in
              org.mozilla.gecko.toolbar.BrowserToolbarTabletBase.addActionItem(View) -->
 
@@ -84,17 +84,16 @@
 
     <style name="TextAppearance.UrlBar.Title" parent="TextAppearance.Medium">
         <item name="android:textSize">16sp</item>
     </style>
 
     <style name="TextAppearance.PrivateTab.Title" parent="TextAppearance.Large">
         <item name="android:textSize">26sp</item>
         <item name="android:maxWidth">300dp</item>
-        <item name="android:layout_marginTop">21dp</item>
         <item name="android:layout_marginBottom">16dp</item>
     </style>
 
     <style name="TextAppearance.PrivateTab.Description" parent="TextAppearance.Medium">
         <item name="android:maxWidth">398dp</item>
     </style>
 
     <style name="UrlBar.Base" />
--- a/mobile/android/app/src/photon/res/values/styles.xml
+++ b/mobile/android/app/src/photon/res/values/styles.xml
@@ -432,17 +432,16 @@
         <item name="android:textSize">16sp</item>
     </style>
 
     <style name="TextAppearance.SearchSuggestion" parent="TextAppearance.Small"/>
 
     <style name="TextAppearance.PrivateTab.Title" parent="TextAppearance.Large">
         <item name="android:textSize">20sp</item>
         <item name="android:maxWidth">200dp</item>
-        <item name="android:layout_marginTop">16dp</item>
         <item name="android:layout_marginBottom">16dp</item>
     </style>
 
     <style name="TextAppearance.PrivateTab.Description" parent="TextAppearance.Small">
         <item name="android:maxWidth">265dp</item>
     </style>
 
     <!-- BrowserToolbar -->
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -328,18 +328,18 @@
 @BINPATH@/components/pluginGlue.manifest
 @BINPATH@/components/ProcessSingleton.manifest
 @BINPATH@/components/MainProcessSingleton.js
 @BINPATH@/components/ContentProcessSingleton.js
 @BINPATH@/components/nsURLFormatter.manifest
 @BINPATH@/components/nsURLFormatter.js
 @BINPATH@/components/txEXSLTRegExFunctions.manifest
 @BINPATH@/components/txEXSLTRegExFunctions.js
-@BINPATH@/components/nsContentPrefService.manifest
-@BINPATH@/components/nsContentPrefService.js
+@BINPATH@/components/ContentPrefService2.manifest
+@BINPATH@/components/ContentPrefService2.js
 @BINPATH@/components/nsHandlerService-json.manifest
 @BINPATH@/components/nsHandlerService-json.js
 @BINPATH@/components/nsHandlerService.manifest
 @BINPATH@/components/nsHandlerService.js
 @BINPATH@/components/nsWebHandlerApp.manife