Merge m-c to b-i
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 25 Oct 2013 19:55:48 -0700
changeset 167215 2db069bf99081e67d2678001a7486e36fed60b35
parent 167214 d606b64c311084f561c4c629a3bed13f4ec4bfb1 (current diff)
parent 167059 ef3f5669b53e4b3e85ca33622108ede08d5a608a (diff)
child 167216 d5219c34bfb14328b26ec11cdfd77003835ab35b
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone27.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 m-c to b-i CLOSED TREE
mobile/android/base/android-services-files.mk
other-licenses/android/Makefile.in
toolkit/components/downloads/test/unit/bug_401582_downloads.sqlite
toolkit/components/downloads/test/unit/bug_409179_downloads.sqlite
toolkit/components/downloads/test/unit/empty_downloads.rdf
toolkit/components/downloads/test/unit/test_bug_401582.js
toolkit/components/downloads/test/unit/test_bug_409179.js
toolkit/components/downloads/test/unit/test_old_download_files_removed.js
toolkit/forgetaboutsite/test/unit/downloads.empty.sqlite
toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain_activeDownloads.js
--- a/CLOBBER
+++ b/CLOBBER
@@ -13,9 +13,9 @@
 #          |               |
 #          O <-- Clobber   O  <-- Clobber
 #
 # Note: The description below will be part of the error message shown to users.
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
-Bug 922160 needs a clobber due to WebIDL binding dependency issues (bug 928195).
+Bug 914270 needs a clobber since moving variables to moz.build always requires a clobber (bug 852814)
--- a/accessible/public/nsIAccessibleRelation.idl
+++ b/accessible/public/nsIAccessibleRelation.idl
@@ -6,17 +6,17 @@
 #include "nsISupports.idl"
 #include "nsIArray.idl"
 
 interface nsIAccessible;
 
 /**
  * This interface gives access to an accessible's set of relations.
  */
-[scriptable, uuid(9f85fc0d-2969-48e6-b822-68140f7e5770)]
+[scriptable, uuid(55b308c4-2ae4-46bc-b4cd-4d4370e0a660)]
 interface nsIAccessibleRelation : nsISupports
 {
   /**
    * This object is labelled by a target object.
    */
   const unsigned long RELATION_LABELLED_BY = 0x00;
 
   /**
@@ -105,16 +105,31 @@ interface nsIAccessibleRelation : nsISup
 
   /**
    * Part of a form/dialog with a related default button. It is used for
    * MSAA/XPCOM, it isn't for IA2 or ATK.
    */
   const unsigned long RELATION_DEFAULT_BUTTON = 0x10;
 
   /**
+   * The target object is the containing document object.
+   */
+  const unsigned long RELATION_CONTAINING_DOCUMENT = 0x11;
+
+  /**
+   * The target object is the topmost containing document object in the tab pane.
+   */
+  const unsigned long RELATION_CONTAINING_TAB_PANE = 0x12;
+
+  /**
+   * The target object is the containing application object.
+   */
+  const unsigned long RELATION_CONTAINING_APPLICATION = 0x14;
+
+  /**
    * Returns the type of the relation.
    */
   readonly attribute unsigned long relationType;
 
   /**
    * Returns the number of targets for this relation.
    */
   readonly attribute unsigned long targetsCount;
--- a/accessible/src/base/RelationType.h
+++ b/accessible/src/base/RelationType.h
@@ -104,16 +104,36 @@ MOZ_BEGIN_ENUM_CLASS(RelationType)
   PARENT_WINDOW_OF = 0x0f,
 
   /**
    * Part of a form/dialog with a related default button. It is used for
    * MSAA/XPCOM, it isn't for IA2 or ATK.
    */
   DEFAULT_BUTTON = 0x10,
 
-  LAST = DEFAULT_BUTTON
+  /**
+   * The target object is the containing document object.
+   */
+  CONTAINING_DOCUMENT = 0x11,
+
+  /**
+   * The target object is the topmost containing document object in the tab pane.
+   */
+  CONTAINING_TAB_PANE = 0x12,
+
+  /**
+   * The target object is the containing window object.
+   */
+  CONTAINING_WINDOW = 0x13,
+
+  /**
+   * The target object is the containing application object.
+   */
+  CONTAINING_APPLICATION = 0x14,
+
+  LAST = CONTAINING_APPLICATION
 
 MOZ_END_ENUM_CLASS(RelationType)
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/src/base/RelationTypeMap.h
+++ b/accessible/src/base/RelationTypeMap.h
@@ -105,8 +105,26 @@ RELATIONTYPE(PARENT_WINDOW_OF,
              NAVRELATION_PARENT_WINDOW_OF,
              IA2_RELATION_PARENT_WINDOW_OF)
 
 RELATIONTYPE(DEFAULT_BUTTON,
              "default button",
              ATK_RELATION_NULL,
              NAVRELATION_DEFAULT_BUTTON,
              IA2_RELATION_NULL)
+
+RELATIONTYPE(CONTAINING_DOCUMENT,
+             "containing document",
+             ATK_RELATION_NULL,
+             NAVRELATION_CONTAINING_DOCUMENT,
+             IA2_RELATION_CONTAINING_DOCUMENT)
+
+RELATIONTYPE(CONTAINING_TAB_PANE,
+             "containing tab pane",
+             ATK_RELATION_NULL,
+             NAVRELATION_CONTAINING_TAB_PANE,
+             IA2_RELATION_CONTAINING_TAB_PANE)
+
+RELATIONTYPE(CONTAINING_APPLICATION,
+             "containing application",
+             ATK_RELATION_NULL,
+             NAVRELATION_CONTAINING_APPLICATION,
+             IA2_RELATION_CONTAINING_APPLICATION)
--- a/accessible/src/generic/Accessible.cpp
+++ b/accessible/src/generic/Accessible.cpp
@@ -8,16 +8,18 @@
 #include "nsIXBLAccessible.h"
 
 #include "AccCollector.h"
 #include "AccGroupInfo.h"
 #include "AccIterator.h"
 #include "nsAccUtils.h"
 #include "nsAccessibleRelation.h"
 #include "nsAccessibilityService.h"
+#include "ApplicationAccessible.h"
+#include "nsCoreUtils.h"
 #include "nsIAccessibleRelation.h"
 #include "nsIAccessibleRole.h"
 #include "nsEventShell.h"
 #include "nsTextEquivUtils.h"
 #include "Relation.h"
 #include "Role.h"
 #include "RootAccessible.h"
 #include "States.h"
@@ -2175,16 +2177,43 @@ Accessible::RelationByType(RelationType 
           }
           nsCOMPtr<nsIContent> relatedContent(do_QueryInterface(buttonEl));
           return Relation(mDoc, relatedContent);
         }
       }
       return Relation();
     }
 
+    case RelationType::CONTAINING_DOCUMENT:
+      return Relation(mDoc);
+
+    case RelationType::CONTAINING_TAB_PANE: {
+      nsCOMPtr<nsIDocShell> docShell =
+        nsCoreUtils::GetDocShellFor(GetNode());
+      if (docShell) {
+        // Walk up the parent chain without crossing the boundary at which item
+        // types change, preventing us from walking up out of tab content.
+        nsCOMPtr<nsIDocShellTreeItem> root;
+        docShell->GetSameTypeRootTreeItem(getter_AddRefs(root));
+        if (root) {
+          // If the item type is typeContent, we assume we are in browser tab
+          // content. Note, this includes content such as about:addons,
+          // for consistency.
+          int32_t itemType = 0;
+          root->GetItemType(&itemType);
+          if (itemType == nsIDocShellTreeItem::typeContent)
+            return Relation(nsAccUtils::GetDocAccessibleFor(root));
+        }
+      }
+      return  Relation();
+    }
+
+    case RelationType::CONTAINING_APPLICATION:
+      return Relation(ApplicationAcc());
+
     default:
       return Relation();
   }
 }
 
 NS_IMETHODIMP
 Accessible::GetRelations(nsIArray **aRelations)
 {
@@ -2209,17 +2238,20 @@ Accessible::GetRelations(nsIArray **aRel
     nsIAccessibleRelation::RELATION_FLOWS_TO,
     nsIAccessibleRelation::RELATION_FLOWS_FROM,
     nsIAccessibleRelation::RELATION_MEMBER_OF,
     nsIAccessibleRelation::RELATION_SUBWINDOW_OF,
     nsIAccessibleRelation::RELATION_EMBEDS,
     nsIAccessibleRelation::RELATION_EMBEDDED_BY,
     nsIAccessibleRelation::RELATION_POPUP_FOR,
     nsIAccessibleRelation::RELATION_PARENT_WINDOW_OF,
-    nsIAccessibleRelation::RELATION_DEFAULT_BUTTON
+    nsIAccessibleRelation::RELATION_DEFAULT_BUTTON,
+    nsIAccessibleRelation::RELATION_CONTAINING_DOCUMENT,
+    nsIAccessibleRelation::RELATION_CONTAINING_TAB_PANE,
+    nsIAccessibleRelation::RELATION_CONTAINING_APPLICATION
   };
 
   for (uint32_t idx = 0; idx < ArrayLength(relationTypes); idx++) {
     nsCOMPtr<nsIAccessibleRelation> relation;
     nsresult rv = GetRelationByType(relationTypes[idx], getter_AddRefs(relation));
 
     if (NS_SUCCEEDED(rv) && relation) {
       uint32_t targets = 0;
--- a/accessible/src/windows/msaa/AccessibleWrap.h
+++ b/accessible/src/windows/msaa/AccessibleWrap.h
@@ -197,16 +197,19 @@ protected:
     NAVRELATION_SUBWINDOW_OF = 0x1008,
     NAVRELATION_EMBEDS = 0x1009,
     NAVRELATION_EMBEDDED_BY = 0x100a,
     NAVRELATION_POPUP_FOR = 0x100b,
     NAVRELATION_PARENT_WINDOW_OF = 0x100c,
     NAVRELATION_DEFAULT_BUTTON = 0x100d,
     NAVRELATION_DESCRIBED_BY = 0x100e,
     NAVRELATION_DESCRIPTION_FOR = 0x100f,
-    NAVRELATION_NODE_PARENT_OF = 0x1010
+    NAVRELATION_NODE_PARENT_OF = 0x1010,
+    NAVRELATION_CONTAINING_DOCUMENT = 0x1011,
+    NAVRELATION_CONTAINING_TAB_PANE = 0x1012,
+    NAVRELATION_CONTAINING_APPLICATION = 0x1014
   };
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/src/windows/msaa/ServiceProvider.cpp
+++ b/accessible/src/windows/msaa/ServiceProvider.cpp
@@ -6,16 +6,17 @@
 
 #include "ServiceProvider.h"
 
 #include "ApplicationAccessibleWrap.h"
 #include "Compatibility.h"
 #include "DocAccessible.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
+#include "Relation.h"
 #include "uiaRawElmProvider.h"
 
 #include "mozilla/Preferences.h"
 #include "nsIDocShell.h"
 
 #include "ISimpleDOMNode_i.c"
 
 namespace mozilla {
@@ -55,43 +56,22 @@ ServiceProvider::QueryService(REFGUID aG
   // A use case for this is for screen readers that need to switch context or
   // 'virtual buffer' when focus moves from one browser tab area to another.
   static const GUID SID_IAccessibleContentDocument =
     { 0xa5d8e1f3,0x3571,0x4d8f,{0x95,0x21,0x07,0xed,0x28,0xfb,0x07,0x2e} };
   if (aGuidService == SID_IAccessibleContentDocument) {
     if (aIID != IID_IAccessible)
       return E_NOINTERFACE;
 
-    nsCOMPtr<nsIDocShell> docShell =
-      nsCoreUtils::GetDocShellFor(mAccessible->GetNode());
-    if (!docShell)
-      return E_UNEXPECTED;
-
-    // Walk up the parent chain without crossing the boundary at which item
-    // types change, preventing us from walking up out of tab content.
-    nsCOMPtr<nsIDocShellTreeItem> root;
-    docShell->GetSameTypeRootTreeItem(getter_AddRefs(root));
-    if (!root)
-      return E_UNEXPECTED;
-
-
-    // If the item type is typeContent, we assume we are in browser tab content.
-    // Note this includes content such as about:addons, for consistency.
-    int32_t itemType;
-    root->GetItemType(&itemType);
-    if (itemType != nsIDocShellTreeItem::typeContent)
+    Relation rel = mAccessible->RelationByType(RelationType::CONTAINING_TAB_PANE);
+    AccessibleWrap* tabDoc = static_cast<AccessibleWrap*>(rel.Next());
+    if (!tabDoc)
       return E_NOINTERFACE;
 
-    // Make sure this is a document.
-    DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
-    if (!docAcc)
-      return E_UNEXPECTED;
-
-    *aInstancePtr = static_cast<IAccessible*>(docAcc);
-
+    *aInstancePtr = static_cast<IAccessible*>(tabDoc);
     (reinterpret_cast<IUnknown*>(*aInstancePtr))->AddRef();
     return S_OK;
   }
 
   // Can get to IAccessibleApplication from any node via QS
   if (aGuidService == IID_IAccessibleApplication ||
       (Compatibility::IsJAWS() && aIID == IID_IAccessibleApplication)) {
     ApplicationAccessibleWrap* applicationAcc =
--- a/accessible/tests/mochitest/relations.js
+++ b/accessible/tests/mochitest/relations.js
@@ -13,16 +13,19 @@ const RELATION_FLOWS_TO = nsIAccessibleR
 const RELATION_LABEL_FOR = nsIAccessibleRelation.RELATION_LABEL_FOR;
 const RELATION_LABELLED_BY = nsIAccessibleRelation.RELATION_LABELLED_BY;
 const RELATION_MEMBER_OF = nsIAccessibleRelation.RELATION_MEMBER_OF;
 const RELATION_NODE_CHILD_OF = nsIAccessibleRelation.RELATION_NODE_CHILD_OF;
 const RELATION_NODE_PARENT_OF = nsIAccessibleRelation.RELATION_NODE_PARENT_OF;
 const RELATION_PARENT_WINDOW_OF = nsIAccessibleRelation.RELATION_PARENT_WINDOW_OF;
 const RELATION_POPUP_FOR = nsIAccessibleRelation.RELATION_POPUP_FOR;
 const RELATION_SUBWINDOW_OF = nsIAccessibleRelation.RELATION_SUBWINDOW_OF;
+const RELATION_CONTAINING_DOCUMENT = nsIAccessibleRelation.RELATION_CONTAINING_DOCUMENT;
+const RELATION_CONTAINING_TAB_PANE = nsIAccessibleRelation.RELATION_CONTAINING_TAB_PANE;
+const RELATION_CONTAINING_APPLICATION = nsIAccessibleRelation.RELATION_CONTAINING_APPLICATION;
 
 ////////////////////////////////////////////////////////////////////////////////
 // General
 
 /**
  * Test the accessible relation.
  *
  * @param aIdentifier          [in] identifier to get an accessible, may be ID
--- a/accessible/tests/mochitest/relations/test_general.html
+++ b/accessible/tests/mochitest/relations/test_general.html
@@ -162,16 +162,21 @@
       testRelation("caption", RELATION_LABEL_FOR, "table");
       testRelation("table", RELATION_LABELLED_BY, "caption");
 
       // 'labelled by'/'label for' relation for html:fieldset and
       // html:legend
       testRelation("legend", RELATION_LABEL_FOR, "fieldset");
       testRelation("fieldset", RELATION_LABELLED_BY, "legend");
 
+      // containing relations
+      testRelation("control1_1", RELATION_CONTAINING_DOCUMENT, document);
+      testRelation("control1_1", RELATION_CONTAINING_TAB_PANE, getTabDocAccessible("control1_1"));
+      testRelation("control1_1", RELATION_CONTAINING_APPLICATION, getApplicationAccessible());
+
       // finish test
       SimpleTest.finish();
     }
 
     disableLogging(); // from test_embeds.xul
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -73,16 +73,22 @@ support-files =
   test_bug435035.html
   test_bug462673.html
   test_bug628179.html
   test_bug839103.html
   test_wyciwyg_copying.html
   title_test.svg
   video.ogg
   zoom_test.html
+  test_no_mcb_on_http_site_img.html
+  test_no_mcb_on_http_site_img.css
+  test_no_mcb_on_http_site_font.html
+  test_no_mcb_on_http_site_font.css
+  test_no_mcb_on_http_site_font2.html
+  test_no_mcb_on_http_site_font2.css
 
 [browser_CTP_data_urls.js]
 [browser_CTP_drag_drop.js]
 [browser_CTP_iframe.js]
 [browser_CTP_nonplugins.js]
 [browser_CTP_resize.js]
 [browser_URLBarSetURI.js]
 [browser_aboutHealthReport.js]
@@ -283,8 +289,9 @@ support-files =
 [browser_visibleTabs_bookmarkAllPages.js]
 [browser_visibleTabs_bookmarkAllTabs.js]
 [browser_visibleTabs_contextMenu.js]
 [browser_visibleTabs_tabPreview.js]
 [browser_wyciwyg_urlbarCopying.js]
 [browser_zbug569342.js]
 [browser_registerProtocolHandler_notification.js]
 [browser_registerProtocolHandler_notification.html]
+[browser_no_mcb_on_http_site.js]
--- a/browser/base/content/test/general/browser_bug822367.js
+++ b/browser/base/content/test/general/browser_bug822367.js
@@ -174,23 +174,8 @@ function MixedTest6B() {
 function MixedTest6C() {
   gTestBrowser.removeEventListener("load", MixedTest6C, true);
   waitForCondition(function() content.document.getElementById('f1').contentDocument.getElementById('p1').innerHTML == "hello", MixedTest6D, "Waited too long for mixed script to run in Test 6");
 }
 function MixedTest6D() {
   ok(content.document.getElementById('f1').contentDocument.getElementById('p1').innerHTML == "hello","Mixed script didn't load in Test 6");
   MixedTestsCompleted();
 }
-
-function waitForCondition(condition, nextTest, errorMsg) {
-  var tries = 0;
-  var interval = setInterval(function() {
-    if (tries >= 30) {
-      ok(false, errorMsg);
-      moveOn();
-    }
-    if (condition()) {
-      moveOn();
-    }
-    tries++;
-  }, 100);
-  var moveOn = function() { clearInterval(interval); nextTest(); };
-}
--- a/browser/base/content/test/general/browser_bug902156.js
+++ b/browser/base/content/test/general/browser_bug902156.js
@@ -36,36 +36,16 @@ registerCleanupFunction(function() {
   Services.prefs.setBoolPref(PREF_ACTIVE, origBlockActive);
 });
 
 function cleanUpAfterTests() {
   gBrowser.removeCurrentTab();
   window.focus();
   finish();
 }
-/*
- * Whenever we disable the Mixed Content Blocker of the page
- * we have to make sure that our condition is properly loaded.
- */
-function waitForCondition(condition, nextTest, errorMsg) {
-  var tries = 0;
-  var interval = setInterval(function() {
-    if (tries >= 30) {
-      ok(false, errorMsg);
-      moveOn();
-    }
-    if (condition()) {
-      moveOn();
-    }
-    tries++;
-  }, 100);
-  var moveOn = function() {
-    clearInterval(interval); nextTest();
-  };
-}
 
 //------------------------ Test 1 ------------------------------
 
 function test1A() {
   // Removing EventListener because we have to register a new
   // one once the page is loaded with mixed content blocker disabled
   gTestBrowser.removeEventListener("load", test1A, true);
   gTestBrowser.addEventListener("load", test1B, true);
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/browser_no_mcb_on_http_site.js
@@ -0,0 +1,138 @@
+/*
+ * Description of the Tests for
+ *  - Bug 909920 - Mixed content warning should not show on a HTTP site
+ *
+ * Description of the tests:
+ *   Test 1:
+ *     1) Load an http page
+ *     2) The page includes a css file using https
+ *     3) The css file loads an |IMAGE| << over http
+ *
+ *   Test 2:
+ *     1) Load an http page
+ *     2) The page includes a css file using https
+ *     3) The css file loads a |FONT| over http
+ *
+ *   Test 3:
+ *     1) Load an http page
+ *     2) The page includes a css file using https
+ *     3) The css file imports (@import) another css file using http
+ *     3) The imported css file loads a |FONT| over http
+*
+ * Since the top-domain is >> NOT << served using https, the MCB
+ * should >> NOT << trigger a warning.
+ */
+
+const PREF_ACTIVE = "security.mixed_content.block_active_content";
+const PREF_DISPLAY = "security.mixed_content.block_display_content";
+
+const gHttpTestRoot = "http://example.com/browser/browser/base/content/test/general/";
+
+var origBlockActive, origBlockDisplay;
+var gTestBrowser = null;
+
+registerCleanupFunction(function() {
+  // Set preferences back to their original values
+  Services.prefs.setBoolPref(PREF_ACTIVE, origBlockActive);
+  Services.prefs.setBoolPref(PREF_DISPLAY, origBlockDisplay);
+});
+
+function cleanUpAfterTests() {
+  gBrowser.removeCurrentTab();
+  window.focus();
+  finish();
+}
+
+function waitForCondition(condition, nextTest, errorMsg, okMsg) {
+  var tries = 0;
+  var interval = setInterval(function() {
+    if (tries >= 30) {
+      ok(false, errorMsg);
+      moveOn();
+    }
+    if (condition()) {
+      ok(true, okMsg)
+      moveOn();
+    }
+    tries++;
+  }, 100);
+  var moveOn = function() {
+    clearInterval(interval); nextTest();
+  };
+}
+
+//------------- TEST 1 -----------------------------------------
+
+function test1A() {
+  gTestBrowser.removeEventListener("load", test1A, true);
+
+  var expected = "Verifying MCB does not trigger warning/error for an http page ";
+  expected += "with https css that includes http image";
+  waitForCondition(
+    function() content.document.getElementById('testDiv').innerHTML == expected,
+    test1B, "Error: Waited too long for status in Test 1!",
+    "OK: Expected result in innerHTML!");
+}
+
+function test1B() {
+  // set up test 2
+  gTestBrowser.addEventListener("load", test2A, true);
+  var url = gHttpTestRoot + "test_no_mcb_on_http_site_font.html";
+  gTestBrowser.contentWindow.location = url;
+}
+
+//------------- TEST 2 -----------------------------------------
+
+function test2A() {
+  gTestBrowser.removeEventListener("load", test2A, true);
+
+  var expected = "Verifying MCB does not trigger warning/error for an http page ";
+  expected += "with https css that includes http font";
+  waitForCondition(
+    function() content.document.getElementById('testDiv').innerHTML == expected,
+    test2B, "Error: Waited too long for status in Test 2!",
+    "OK: Expected result in innerHTML!");
+}
+
+function test2B() {
+  // set up test 3
+  gTestBrowser.addEventListener("load", test3, true);
+  var url = gHttpTestRoot + "test_no_mcb_on_http_site_font2.html";
+  gTestBrowser.contentWindow.location = url;
+}
+
+//------------- TEST 3 -----------------------------------------
+
+function test3() {
+  gTestBrowser.removeEventListener("load", test3, true);
+
+  var expected = "Verifying MCB does not trigger warning/error for an http page "
+  expected += "with https css that imports another http css which includes http font";
+  waitForCondition(
+    function() content.document.getElementById('testDiv').innerHTML == expected,
+    cleanUpAfterTests, "Error: Waited too long for status in Test 3!",
+    "OK: Expected result in innerHTML!");
+}
+
+//------------------------------------------------------
+
+function test() {
+  // Performing async calls, e.g. 'onload', we have to wait till all of them finished
+  waitForExplicitFinish();
+
+  // Store original preferences so we can restore settings after testing
+  origBlockActive = Services.prefs.getBoolPref(PREF_ACTIVE);
+  origBlockDisplay = Services.prefs.getBoolPref(PREF_DISPLAY);
+
+  Services.prefs.setBoolPref(PREF_ACTIVE, true);
+  Services.prefs.setBoolPref(PREF_DISPLAY, true);
+
+  var newTab = gBrowser.addTab();
+  gBrowser.selectedTab = newTab;
+  gTestBrowser = gBrowser.selectedBrowser;
+  newTab.linkedBrowser.stop();
+
+  gTestBrowser.addEventListener("load", test1A, true);
+  var url = gHttpTestRoot + "test_no_mcb_on_http_site_img.html";
+  gTestBrowser.contentWindow.location = url;
+}
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -84,17 +84,24 @@ function closeToolbarCustomizationUI(aCa
 
 function waitForCondition(condition, nextTest, errorMsg) {
   var tries = 0;
   var interval = setInterval(function() {
     if (tries >= 30) {
       ok(false, errorMsg);
       moveOn();
     }
-    if (condition()) {
+    var conditionPassed;
+    try {
+      conditionPassed = condition();
+    } catch (e) {
+      ok(false, e + "\n" + e.stack);
+      conditionPassed = false;
+    }
+    if (conditionPassed) {
       moveOn();
     }
     tries++;
   }, 100);
   var moveOn = function() { clearInterval(interval); nextTest(); };
 }
 
 function getTestPlugin(aName) {
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font.css
@@ -0,0 +1,10 @@
+@font-face {
+  font-family: testFont;
+  src: url(http://example.com/browser/browser/devtools/fontinspector/test/browser_font.woff);
+}
+body {
+  font-family: Arial;
+}
+div {
+  font-family: testFont;
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+  Test 2 for Bug 909920 - See file browser_no_mcb_on_http_site.js for description.
+  https://bugzilla.mozilla.org/show_bug.cgi?id=909920
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test 2 for Bug 909920</title>
+  <link rel="stylesheet" type="text/css" href="https://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_font.css" />
+<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+
+<script type="text/javascript">
+  function checkLoadStates() {
+   var ui = SpecialPowers.wrap(window)
+            .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
+             .getInterface(SpecialPowers.Ci.nsIWebNavigation)
+             .QueryInterface(SpecialPowers.Ci.nsIDocShell)
+             .securityUI;
+
+   var loadedMixedActive = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT);
+   is(loadedMixedActive, false, "OK: Should not load mixed active content!");
+
+   var blockedMixedActive = ui &&
+       (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT);
+   is(blockedMixedActive, false, "OK: Should not block mixed active content!");
+
+   var loadedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT);
+   is(loadedMixedDisplay, false, "OK: Should not load mixed display content!");
+
+   var blockedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT);
+   is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
+
+   var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http font";
+   document.getElementById("testDiv").innerHTML = newValue;
+  }
+</script>
+</head>
+<body onload="checkLoadStates()">
+  <div class="testDiv" id="testDiv">
+    Testing MCB does not trigger warning/error for an http page with https css that includes http font
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font2.css
@@ -0,0 +1,1 @@
+@import url(http://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_font.css);
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font2.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+  Test 3 for Bug 909920 - See file browser_no_mcb_on_http_site.js for description.
+  https://bugzilla.mozilla.org/show_bug.cgi?id=909920
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test 3 for Bug 909920</title>
+  <link rel="stylesheet" type="text/css" href="https://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_font2.css" />
+<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+
+<script type="text/javascript">
+  function checkLoadStates() {
+   var ui = SpecialPowers.wrap(window)
+        .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
+             .getInterface(SpecialPowers.Ci.nsIWebNavigation)
+             .QueryInterface(SpecialPowers.Ci.nsIDocShell)
+             .securityUI;
+
+   var loadedMixedActive = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT);
+   is(loadedMixedActive, false, "OK: Should not load mixed active content!");
+
+   var blockedMixedActive = ui &&
+       (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT);
+   is(blockedMixedActive, false, "OK: Should not block mixed active content!");
+
+   var loadedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT);
+   is(loadedMixedDisplay, false, "OK: Should not load mixed display content!");
+
+   var blockedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT);
+   is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
+
+   var newValue = "Verifying MCB does not trigger warning/error for an http page ";
+    newValue += "with https css that imports another http css which includes http font";
+   document.getElementById("testDiv").innerHTML = newValue;
+  }
+</script>
+</head>
+<body onload="checkLoadStates()">
+  <div class="testDiv" id="testDiv">
+    Testing MCB does not trigger warning/error for an http page with https css that imports another http css which includes http font
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_img.css
@@ -0,0 +1,3 @@
+#testDiv {
+  background: url(http://example.com/tests/image/test/mochitest/blue.png)
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_img.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+  Test 1 for Bug 909920 - See file browser_no_mcb_on_http_site.js for description.
+  https://bugzilla.mozilla.org/show_bug.cgi?id=909920
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test 1 for Bug 909920</title>
+  <link rel="stylesheet" type="text/css" href="https://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_img.css" />
+<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+
+<script type="text/javascript">
+  function checkLoadStates() {
+   var ui = SpecialPowers.wrap(window)
+            .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
+             .getInterface(SpecialPowers.Ci.nsIWebNavigation)
+             .QueryInterface(SpecialPowers.Ci.nsIDocShell)
+             .securityUI;
+
+   var loadedMixedActive = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT);
+   is(loadedMixedActive, false, "OK: Should not load mixed active content!");
+
+   var blockedMixedActive = ui &&
+       (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT);
+   is(blockedMixedActive, false, "OK: Should not block mixed active content!");
+
+   var loadedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT);
+   is(loadedMixedDisplay, false, "OK: Should not load mixed display content!");
+
+   var blockedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT);
+   is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
+
+   var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http image";
+   document.getElementById("testDiv").innerHTML = newValue;
+  }
+</script>
+</head>
+<body onload="checkLoadStates()">
+  <div class="testDiv" id="testDiv">
+    Testing MCB does not trigger warning/error for an http page with https css that includes http image
+  </div>
+</body>
+</html>
--- a/browser/base/content/test/social/head.js
+++ b/browser/base/content/test/social/head.js
@@ -13,17 +13,24 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 function waitForCondition(condition, nextTest, errorMsg) {
   var tries = 0;
   var interval = setInterval(function() {
     if (tries >= 30) {
       ok(false, errorMsg);
       moveOn();
     }
-    if (condition()) {
+    var conditionPassed;
+    try {
+      conditionPassed = condition();
+    } catch (e) {
+      ok(false, e + "\n" + e.stack);
+      conditionPassed = false;
+    }
+    if (conditionPassed) {
       moveOn();
     }
     tries++;
   }, 100);
   var moveOn = function() { clearInterval(interval); nextTest(); };
 }
 
 // Check that a specified (string) URL hasn't been "remembered" (ie, is not
--- a/browser/components/about/Makefile.in
+++ b/browser/components/about/Makefile.in
@@ -1,8 +1,7 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 LOCAL_INCLUDES = -I$(srcdir)/../build
--- a/browser/components/about/moz.build
+++ b/browser/components/about/moz.build
@@ -11,8 +11,9 @@ EXPORTS.mozilla.browser += [
 ]
 
 SOURCES += [
     'AboutRedirector.cpp',
 ]
 
 LIBRARY_NAME = 'browserabout_s'
 
+FORCE_STATIC_LIB = True
--- a/browser/components/dirprovider/Makefile.in
+++ b/browser/components/dirprovider/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 LOCAL_INCLUDES = -I$(srcdir)/../build
 
 EXTRA_DSO_LDOPTS = \
 	$(XPCOM_GLUE_LDOPTS) \
 	$(NSPR_LIBS) \
 	$(NULL)
--- a/browser/components/dirprovider/moz.build
+++ b/browser/components/dirprovider/moz.build
@@ -14,8 +14,10 @@ SOURCES += [
     'DirectoryProvider.cpp',
 ]
 
 LIBRARY_NAME = 'browserdir_s'
 
 XPCSHELL_TESTS_MANIFESTS += [
     'tests/unit/xpcshell.ini',
 ]
+
+FORCE_STATIC_LIB = True
--- a/browser/components/feeds/src/Makefile.in
+++ b/browser/components/feeds/src/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 DEFINES += \
 	-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
 	-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
 	$(NULL)
 
 
--- a/browser/components/feeds/src/moz.build
+++ b/browser/components/feeds/src/moz.build
@@ -17,8 +17,9 @@ EXTRA_COMPONENTS += [
 ]
 
 EXTRA_PP_COMPONENTS += [
     'FeedWriter.js',
 ]
 
 LIBRARY_NAME = 'browser_feeds_s'
 
+FORCE_STATIC_LIB = True
--- a/browser/components/migration/src/Makefile.in
+++ b/browser/components/migration/src/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 
 ifeq ($(OS_ARCH),WINNT)
 
 DEFINES += -DHAS_IE_MIGRATOR -DHAS_SAFARI_MIGRATOR
 endif
 
--- a/browser/components/migration/src/moz.build
+++ b/browser/components/migration/src/moz.build
@@ -37,8 +37,9 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
     ]
 
 LIBRARY_NAME = 'migration_s'
 
 EXTRA_PP_JS_MODULES += [
     'MigrationUtils.jsm',
 ]
 
+FORCE_STATIC_LIB = True
--- a/browser/components/shell/src/Makefile.in
+++ b/browser/components/shell/src/Makefile.in
@@ -1,14 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
   -DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"
 
--- a/browser/components/shell/src/moz.build
+++ b/browser/components/shell/src/moz.build
@@ -21,8 +21,10 @@ elif CONFIG['MOZ_WIDGET_GTK']:
 
 if SOURCES:
     LIBRARY_NAME = 'shellservice_s'
 
 EXTRA_COMPONENTS += [
     'nsSetDefaultBrowser.js',
     'nsSetDefaultBrowser.manifest',
 ]
+
+FORCE_STATIC_LIB = True
--- a/browser/devtools/app-manager/content/connection-footer.xhtml
+++ b/browser/devtools/app-manager/content/connection-footer.xhtml
@@ -97,16 +97,17 @@
           <div class="connected-indicator"></div>
           <div class="banner-box">
             <div class="banner-content">
               <div class="no-simulator">
                 <span>&connection.noSimulatorInstalled;</span>
                 <button class="action-primary" onclick="UI.installSimulator()" title="&connection.installOneSimulatorTooltip;">&connection.installOneSimulator;</button>
               </div>
               <div class="found-simulator">
+                <span>&connection.startRegisteredSimulator;</span>
                 <span template-loop='{"arrayPath":"simulators.versions","childSelector":"#simulator-item-template"}'></span>
                 <button class="action-primary" onclick="UI.installSimulator()" title="&connection.installAnotherSimulatorTooltip;">&connection.installAnotherSimulator;</button>
               </div>
               <button class="action-cancel" onclick="UI.cancelShowSimulatorList()" title="&connection.cancelShowSimulatorTooltip;">&connection.cancel;</button>
             </div>
           </div>
         </div>
 
@@ -119,17 +120,17 @@
         </div>
 
       </div>
     </div>
   </body>
 
   <template id="simulator-item-template">
   <span>
-    <button class="simulator-item" onclick="UI.startSimulator(this.dataset.version)" template='{"type":"attribute","path":"version","name":"data-version"}' title="&connection.startSimulatorTooltip;">
+    <button class="simulator-item action-primary" onclick="UI.startSimulator(this.dataset.version)" template='{"type":"attribute","path":"version","name":"data-version"}' title="&connection.startSimulatorTooltip;">
       <span template='{"type":"textContent", "path":"version"}'></span>
     </button>
   </span>
   </template>
 
   <template id="adb-devices-template">
   <span>
     <button class="adb-device action-primary" onclick="UI.connectToAdbDevice(this.dataset.name)" template='{"type":"attribute","path":"name","name":"data-name"}'>
--- a/browser/devtools/markupview/markup-view.js
+++ b/browser/devtools/markupview/markup-view.js
@@ -16,16 +16,17 @@ const COLLAPSE_DATA_URL_LENGTH = 60;
 const CONTAINER_FLASHING_DURATION = 500;
 
 const {UndoStack} = require("devtools/shared/undo");
 const {editableField, InplaceEditor} = require("devtools/shared/inplace-editor");
 const {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
 const {HTMLEditor} = require("devtools/markupview/html-editor");
 const {OutputParser} = require("devtools/output-parser");
 const promise = require("sdk/core/promise");
+const {Tooltip} = require("devtools/shared/widgets/Tooltip");
 
 Cu.import("resource://gre/modules/devtools/LayoutHelpers.jsm");
 Cu.import("resource://gre/modules/devtools/Templater.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 loader.lazyGetter(this, "DOMParser", function() {
  return Cc["@mozilla.org/xmlextras/domparser;1"].createInstance(Ci.nsIDOMParser);
 });
@@ -369,17 +370,17 @@ MarkupView.prototype = {
       return this._containers.get(aNode);
     }
 
     if (aNode === this.walker.rootNode) {
       var container = new RootContainer(this, aNode);
       this._elt.appendChild(container.elt);
       this._rootNode = aNode;
     } else {
-      var container = new MarkupContainer(this, aNode);
+      var container = new MarkupContainer(this, aNode, this._inspector);
       if (aFlashNode) {
         container.flashMutation();
       }
     }
 
     this._containers.set(aNode, container);
     container.childrenDirty = true;
 
@@ -1041,22 +1042,25 @@ MarkupView.prototype = {
  * tree.  Manages creation of the editor for the node and
  * a <ul> for placing child elements, and expansion/collapsing
  * of the element.
  *
  * @param MarkupView aMarkupView
  *        The markup view that owns this container.
  * @param DOMNode aNode
  *        The node to display.
+ * @param Inspector aInspector
+ *        The inspector tool container the markup-view
  */
-function MarkupContainer(aMarkupView, aNode) {
+function MarkupContainer(aMarkupView, aNode, aInspector) {
   this.markup = aMarkupView;
   this.doc = this.markup.doc;
   this.undo = this.markup.undo;
   this.node = aNode;
+  this._inspector = aInspector;
 
   if (aNode.nodeType == Ci.nsIDOMNode.TEXT_NODE) {
     this.editor = new TextEditor(this, aNode, "text");
   } else if (aNode.nodeType == Ci.nsIDOMNode.COMMENT_NODE) {
     this.editor = new TextEditor(this, aNode, "comment");
   } else if (aNode.nodeType == Ci.nsIDOMNode.ELEMENT_NODE) {
     this.editor = new ElementEditor(this, aNode);
   } else if (aNode.nodeType == Ci.nsIDOMNode.DOCUMENT_TYPE_NODE) {
@@ -1089,23 +1093,59 @@ function MarkupContainer(aMarkupView, aN
   this._onMouseOut = this._onMouseOut.bind(this);
   this.elt.addEventListener("mouseout", this._onMouseOut, false);
 
   // Appending the editor element and attaching event listeners
   this.tagLine.appendChild(this.editor.elt);
 
   this._onMouseDown = this._onMouseDown.bind(this);
   this.elt.addEventListener("mousedown", this._onMouseDown, false);
+
+  this.tooltip = null;
+  this._attachTooltipIfNeeded();
 }
 
 MarkupContainer.prototype = {
   toString: function() {
     return "[MarkupContainer for " + this.node + "]";
   },
 
+  _attachTooltipIfNeeded: function() {
+    if (this.node.tagName) {
+      let tagName = this.node.tagName.toLowerCase();
+      let isImage = tagName === "img" &&
+        this.editor.getAttributeElement("src");
+      let isCanvas = tagName && tagName === "canvas";
+
+      // Get the image data for later so that when the user actually hovers over
+      // the element, the tooltip does contain the image
+      if (isImage || isCanvas) {
+        this.tooltip = new Tooltip(this._inspector.panelDoc);
+
+        this.node.getImageData().then(data => {
+          if (data) {
+            data.string().then(str => {
+              this.tooltip.setImageContent(str);
+            });
+          }
+        });
+      }
+
+      // If it's an image, show the tooltip on the src attribute
+      if (isImage) {
+        this.tooltip.startTogglingOnHover(this.editor.getAttributeElement("src"));
+      }
+
+      // If it's a canvas, show it on the tag
+      if (isCanvas) {
+        this.tooltip.startTogglingOnHover(this.editor.tag);
+      }
+    }
+  },
+
   /**
    * True if the current node has children.  The MarkupView
    * will set this attribute for the MarkupContainer.
    */
   _hasChildren: false,
 
   get hasChildren() {
     return this._hasChildren;
@@ -1330,30 +1370,36 @@ MarkupContainer.prototype = {
     this.elt.removeEventListener("dblclick", this._onToggle, false);
     this.elt.removeEventListener("mouseover", this._onMouseOver, false);
     this.elt.removeEventListener("mouseout", this._onMouseOut, false);
     this.elt.removeEventListener("mousedown", this._onMouseDown, false);
     this.expander.removeEventListener("click", this._onToggle, false);
 
     // Destroy my editor
     this.editor.destroy();
+
+    // Destroy the tooltip if any
+    if (this.tooltip) {
+      this.tooltip.destroy();
+      this.tooltip = null;
+    }
   }
 };
 
 
 /**
  * Dummy container node used for the root document element.
  */
 function RootContainer(aMarkupView, aNode) {
   this.doc = aMarkupView.doc;
   this.elt = this.doc.createElement("ul");
   this.elt.container = this;
   this.children = this.elt;
   this.node = aNode;
-  this.toString = function() { return "[root container]"}
+  this.toString = () => "[root container]";
 }
 
 RootContainer.prototype = {
   hasChildren: true,
   expanded: true,
   update: function() {},
   destroy: function() {}
 };
@@ -1573,16 +1619,26 @@ ElementEditor.prototype = {
       }
     }
   },
 
   _startModifyingAttributes: function() {
     return this.node.startModifyingAttributes();
   },
 
+  /**
+   * Get the element used for one of the attributes of this element
+   * @param string attrName The name of the attribute to get the element for
+   * @return DOMElement
+   */
+  getAttributeElement: function(attrName) {
+    return this.attrList.querySelector(
+      ".attreditor[data-attr=" + attrName + "] .attr-value");
+  },
+
   _createAttribute: function(aAttr, aBefore = null) {
     // Create the template editor, which will save some variables here.
     let data = {
       attrName: aAttr.name,
     };
     this.template("attribute", data);
     var {attr, inner, name, val} = data;
 
--- a/browser/devtools/markupview/test/browser.ini
+++ b/browser/devtools/markupview/test/browser.ini
@@ -10,8 +10,10 @@ skip-if = true
 [browser_inspector_markup_mutation.html]
 [browser_inspector_markup_mutation.js]
 [browser_inspector_markup_mutation_flashing.html]
 [browser_inspector_markup_mutation_flashing.js]
 [browser_inspector_markup_navigation.html]
 [browser_inspector_markup_navigation.js]
 [browser_inspector_markup_subset.html]
 [browser_inspector_markup_subset.js]
+[browser_inspector_markup_765105_tooltip.js]
+[browser_inspector_markup_765105_tooltip.png]
new file mode 100644
--- /dev/null
+++ b/browser/devtools/markupview/test/browser_inspector_markup_765105_tooltip.js
@@ -0,0 +1,137 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+let {PanelFactory} = devtools.require("devtools/shared/widgets/Tooltip");
+
+let contentDoc;
+let inspector;
+let markup;
+
+const PAGE_CONTENT = [
+  '<img class="local" src="chrome://branding/content/about-logo.png" />',
+  '<img class="data" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADI5JREFUeNrsWwuQFNUVPf1m5z87szv7HWSWj8CigBFMEFZKiQsB1PgJwUAZg1HBpIQsKmokEhNjWUnFVPnDWBT+KolJYbRMoqUVq0yCClpqiX8sCchPWFwVlt2db7+X93pez7zu6Vn2NxsVWh8987p7pu+9555z7+tZjTGGY3kjOMa34w447oBjfKsY7i/UNM3Y8eFSAkD50Plgw03K5P9gvGv7U5ieeR3PszeREiPNX3/0DL4hjslzhm8THh+OITfXk3dhiv4GDtGPVzCaeJmPLYzuu5qJuWfuw2QTlcN1X9pwQU7LhdZ/ZAseD45cOh9hHvDkc/yAF/DNhdb5Mrr3PvBMaAYW8fMSIi2G497IMEK/YutGtAYr6+ej+nxu/NN8Ks3N7AR6HgcLz0Eg1Ljg1UcxZzi5qewIkMYLRweTr2Kzp+nmyXAd5pS3XQDd+N/4h4zgu9FI7brlXf90nMEnuwQxlvv+hosE3TuexmWeysmT4W+WxkMaLzf9Y8ATgjcUn7T9H1gqrpFq8eV1gMn6t16NhngjfoX6q4DUP032Rd4LJgpSLwJ1yzFqBG69eRkah0MVyo0Acfe+yy9AG4nMiYCkeM53KKFXncBLAXqEm+wCqZwaueq7WCmuLTcKSJmj737ol2hurA9eq9VdyiO8yWa3NNyog+SB5CZodSsQq/dfu34tJpYbBaTMzvVddDZu16q5smXf4G8zEvqm4cyaAmJPuTJk3oJWdS4WzcVtfMZbThSQckb/pYfRGgo3zNOqZnEHbJPGK4abaDCQIIsT8V/qTaBqHkLh6LzXH8XZQhbLhYKyyCC/WeHYcNdmvOgfe8skzbWL270/T3wf7tSx/lGCbTu8xlzzmCSWLc5iwmgikcCHi3Mga0Ry913vBFvQwg90l6M4ImWKfsWOp7DSWxmfpPlCFuPFfsNfKrCnPYpQKIRgqBK7D0SxYaNHwkEiJMtl0ReDp3Lc5D3PGoTo/sKngCl7a5chFqvBatKwjBd7WwqIlzB/78NcoUcp5VSgGxm+7b8eqQRGnHMO634epO4S1EZww09/iFg5UmGoESDuznP1xVhTUX1WWHPzjpd25wyH0hRxI3LGM75nxmuNEEUVpAN0XgxmPoKralakbQnWlIMQyVBD/w+3orkq4lvualjKyWwzt4MaxqspQHVhPOWG64bxYuhZXSFGWhipbSDVragOu5Y9eAsmDDUKyBA703vemVhHoueD6e9wAzJK1WfmN0Umk5GGM4kEMZcuIECqgjm0nldAqmbjwtm4VxZH5AvlADP6mx9Eqy9Q0+KqW8Ch+47FaMMYmnNGfY1iPMshoC6qFxme4wQ+0p+ARE6H3+9veWEDWgUhDhUKyFARn4jM5BNxT0XsMg7bfymGK1ov3wtjDfhL4w0HVGUVBEjDaaE+QNdrcNWch1PG4W6xrjBUXECGivg++Cva3JUT4iQUz3V2RsSVaKLwOuDT89A3HdBQoxhNC+fnVm74ual2EG893P6G+PuP4SfiO4cCBWQooL9qCWKNXPbcI37Aa/lnlZxXRt4RFONGwSDCPAHqOuqjWct1QiEMw5mChM5X4K47FyNqcd3aK9AwFH0CGYLoe1ctxk2eWi57rg5JfGp9rzC6ggCdFlAgHBDw5Yxlcg6G8SyHCjMlsgmDD9zhSeHlF+JnAgWDTQUy2NxfdwOao1UVV3pi3+bE97YSbWpLAbn6zefHNQkp1PMpIBwwvslKgIYTKM2nEpNzrGcH3FXTEal0L38kJ4uDQgEZbO4vnI173LXf5NHZaiUxtaCxyZuo/rK6LpUg54yg3zTWRAArvDcRIPZ6BqzrQ1REpmL+DNw32OKIDCb3X1qPVn8wNNMT4w2bvs+q4bAZrqBh2skaL3yyhhIIZ4i6oHkUK0RckcB8GigEyRIH4A6Mgc8fatl0/+BkkQxC9gIT4ljna1rIZW9rEdNbjJcNjsnoYj7LHWCUwpITzEgzRQKZ3XAFHbTzA3hrz8TEUUZxFBhoKpABQt/97p+w0hMZG68I8R6FtlsJT3FELndZntjM+VMnylKYq8GJI3UZaRMpquGSGFVOEfv0YZBMNzz+uvjbfzS6xQERIhlI9FcvQWNdFVb7x1zCb+QNK8vb9NsiifmI5hBgVoOCBC1sb0ab5RomqENxLO3eA1/0NDRU47q2RQNbRCUDIb7lF2CNL3ZGxEV4n08TVvZWYG4pZyV0zUdS45tyCBByOHWiyvZmxFXDCyRo1ge5+Sy0TA+8lWMiP/6O0S32exGV9Jf4fr8azdUR3zL/CZz4MtvzdX5uOYs6NDOmpkuj5Huh+7qUQSYl0ThHzw0YQzcGo6bhzEqoYq5rN3yRiYiG3Vfe2Ybm/qKA9NNZ3nNm4F7/yDkg9AN+U1mHiBcXP8zuDN76jj8hg1QyiWQigalj02BJPhK8I0zxijAjhp5zhlpLUDvS+BCy2HMAvvB4XDgL9/SXC0g/ou/5+6/xLX8w0uJrOIkXfPvyhY0F6gr7M8H0KWFYikcqAXakB+xwD9CdREBLoau7Gz3cAdSIdLFxFtJTCqRChSjnutvhDcREtzjz2Tswtz+yeNRFUeXZXtWux7C1fuoVcbd3J//ipDX3uZZDLGrwweS+UBLL5TDliVBnF8P7H+XI8aRRGsIBJg/Zlslt1+W+D1JWoSyi+kD9jfhs78t7mhZhSl+fLfY1Bdyv3I8V/qpY3B1McgN7ZFT5/vNO0I5DPLLdPBIJA8qc4h2I0QplYfDpJwHT+aj0246r5S8rToG8OjCle8wk4OLvvYGa+Ovr84uo2qBSwJS9G5egoZFLTfiEqWDtbwGfHgKOdPHcS+ai7XDzMPW/FJRLGGcxnBbK4YJC2K+h+T6Bdu5CqHqCWERd3bawb7JI+iJ735+LNaHaprBLLHBm08U3XxShEsdt+f3eTh3v7aC95Dct4RCWL5OZWh/oXBZThxAIxyOXLzBk8aiEWJID8rK3CpPOmeHaGpvCS+7EHv5FujVHUSJPLXvIFeHcNc+9xrB2gws9KZdxuLFax/WLM5gzzSm/lTXF/OdAcapyvjxPqxqHjr2v4ckX2bS2dRBrc5lSdpKjEJ9/9tdwX2WMd53ZQ2IVo3RES+UwVSpCPvYepNx4gmTGDUKIMQ4eduPnD7mx9xOn/KZKOlFbStjONxHTtR+BYAPmnoZ1Zp8wkBRwP/EL3u0F/C2hGl7vpz7vW37T3vP7if8wroKuoh8ribknX9BK5rcF+mo1qKaKyRPJTgTDjbzY8szcuLb3bpH00u35T47j7prRpwDJTxzyG0dHgxPp5bPG8VdkpfPbUg3SgoOo2mwVukb98D5EqpswZTTulCggTk4gpYhv0++wIhCJxr0+Hq1sondis0SE2oxQe3qWXwWyO4DSQg9gJ8Iiw1VFcGqXxet0N9xE4ygIxv/9W6wo9WyROEX/R+eiobYSq2vHTOR631Eiv2lRfh9dvxkumkXh92Qsx8XrAJ+7YGbWuhxOi/U+31NQmzyqNYG8N/3wfo6CRtRHcN01FzkvojohwLu0VVvDa56IS/xcj2b7nN+O+m0jqpE1wMPXZxAN9iCVThtDvH7gmiRGRpU8Lspv1Uhq4wIVdQoyuGSLNYPKUCS8+CzNURbzMmjK3i8u0U793lmuV0ef9nWQ5MGC/DiUqEUSaCtXna9RJEspZS1lrXINK/pcq+SpT50t98QKMq1FRmDfx3vxty102k0PM4ssEnvuz5+G26Ij4yDpz6z9fV8bkyIkqBFkhej0Ib+ZQ34XJK9AfozaiimqIoX3Jp3tiISrcfYpuN2+iFph/02P36PNC9fVcCnp6H9jYouKyfaWufz5Tp9tVxcUniw7IohZv4dZz81/ns67z3AYPrc2n0+Ix2q8k0PWjgBy88XaibnfK9A+5LdDY2Ivhy36fbT8Zv3Lb1U1qLqUxorXEEXIs0mjjrtxoTZWtdvigNs2sgPiujTv6DIZLld6b/V5742JZV3fUsUVFy5gdsNtKWFzUCEVbNepD1MkSMVbsb6SZm7jI3/zODtQKgUMsOw8wDZ63t5xcV1TnaEAxoc6wrqY+Fj+N4DsqOnhOIdicrQSm1MPYCPlIqHn5bbHg8/bj2D3QfZnCX3mpAICDZV8jH5kpbZqTD0W+DxaA74CWzLN2nd14OlL72J38Lf7+TjC7dadZFDoZJQPrtaIKL/G0L6ktptPZVJ8fMqHYPZOKYPMyQGadIJfDvdXwAFiZOTvDBPydf5vk4rWA+RfdhBlaF/yDDBRoMu9pfnSjv/p7DG+HXfAcQcc49v/BBgAcFAO4DmB2GQAAAAASUVORK5CYII=" />',
+  '<img class="remote" src="http://mochi.test:8888/browser/browser/devtools/markupview/test/browser_inspector_markup_765105_tooltip.png" />',
+  '<canvas class="canvas" width="600" height="600"></canvas>'
+].join("\n");
+
+const TEST_NODES = [
+  "img.local",
+  "img.data",
+  "img.remote",
+  ".canvas"
+];
+
+function test() {
+  waitForExplicitFinish();
+
+  gBrowser.selectedTab = gBrowser.addTab();
+  gBrowser.selectedBrowser.addEventListener("load", function(evt) {
+    gBrowser.selectedBrowser.removeEventListener(evt.type, arguments.callee, true);
+    contentDoc = content.document;
+    waitForFocus(createDocument, content);
+  }, true);
+
+  content.location = "data:text/html,markup view tooltip test";
+}
+
+function createDocument() {
+  contentDoc.body.innerHTML = PAGE_CONTENT;
+
+  var target = TargetFactory.forTab(gBrowser.selectedTab);
+  gDevTools.showToolbox(target, "inspector").then(function(toolbox) {
+    inspector = toolbox.getCurrentPanel();
+    markup = inspector.markup;
+    startTests();
+  });
+}
+
+function startTests() {
+  // Draw something in the canvas :)
+  let doc = content.document;
+  let context = doc.querySelector(".canvas").getContext("2d");
+
+  context.beginPath();
+  context.moveTo(300, 0);
+  context.lineTo(600, 600);
+  context.lineTo(0, 600);
+  context.closePath();
+  context.fillStyle = "#ffc821";
+  context.fill();
+
+  // Actually start testing
+  inspector.selection.setNode(contentDoc.querySelector("img"));
+  inspector.once("inspector-updated", () => {
+    testImageTooltip(0);
+  });
+}
+
+function endTests() {
+  contentDoc = inspector = markup = null;
+  gBrowser.removeCurrentTab();
+  finish();
+}
+
+function testImageTooltip(index) {
+  if (index === TEST_NODES.length) {
+    return endTests();
+  }
+
+  let node = contentDoc.querySelector(TEST_NODES[index]);
+  ok(node, "We have the [" + TEST_NODES[index] + "] image node to test for tooltip");
+  let isImg = node.tagName.toLowerCase() === "img";
+
+  let container = getContainerForRawNode(markup, node);
+
+  let target = container.editor.tag;
+  if (isImg) {
+    target = container.editor.getAttributeElement("src");
+  }
+
+  assertTooltipShownOn(container.tooltip, target, () => {
+    let images = container.tooltip.panel.getElementsByTagName("image");
+    is(images.length, 1, "Tooltip for [" + TEST_NODES[index] + "] contains an image");
+    if (isImg) {
+      compareImageData(node, images[0].src);
+    }
+
+    container.tooltip.hide();
+
+    testImageTooltip(index + 1);
+  });
+}
+
+function compareImageData(img, imgData) {
+  let canvas = content.document.createElement("canvas");
+  canvas.width = img.naturalWidth;
+  canvas.height = img.naturalHeight;
+  let ctx = canvas.getContext("2d");
+  let data = "";
+  try {
+    ctx.drawImage(img, 0, 0);
+    data = canvas.toDataURL("image/png");
+  } catch (e) {}
+
+  is(data, imgData, "Tooltip image has the right content");
+}
+
+function assertTooltipShownOn(tooltip, element, cb) {
+  // If there is indeed a show-on-hover on element, the xul panel will be shown
+  tooltip.panel.addEventListener("popupshown", function shown() {
+    tooltip.panel.removeEventListener("popupshown", shown, true);
+
+    // Poll until the image gets loaded in the tooltip. This is required because
+    // markup containers only load images in their associated tooltips when
+    // the image data comes back from the server. However, this test is executed
+    // synchronously as soon as "inspector-updated" is fired, which is before
+    // the data for images is known.
+    let hasImage = () => tooltip.panel.getElementsByTagName("image").length;
+    let poll = setInterval(() => {
+      if (hasImage()) {
+        clearInterval(poll);
+        cb();
+      }
+    }, 200);
+  }, true);
+  tooltip._showOnHover(element);
+}
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..699ef7940b03179b35c17be4782447f0f2cda58b
GIT binary patch
literal 1095
zc%17D@N?(olHy`uVBq!ia0vp^Vn8g;!3-oV%>36dFfd*T@Ck8cU}pFa2FMIJ8!nD4
za{0<-h{&r~uYe38F(Fn?Rv=f+iyg>S@nBW;U{m#ESMy|7c4t*_XH#`&SM^|5bYW6-
zWma|tihz{KJ25CYGbuVVDY>#LyRs=cvr5}DC^@r9+A>JlF(^2&NZByR*|W&oGb=i<
zN?J3>+A<59Fv!|4%h|FB7&8c&G6)$n$XT;UTQCV2Fo>Bjuxo-yaZ`2)6NXQpK8YAI
zh#N6*XtG_ncmasS^%;Sd@@Oy!848tFl#1#yC|WDZn#o?jasB44n*tgPys8ZR>I_Oc
zN_=Vzf;xgghMuF|>o>1i<QN3h7+7Q(fDFGFKQ?(*PDNH8B?cZ9PF*`)eFuGzv5E}*
z8hpHJJTe9{EV9gOa;&PBs*XO6PJT``4K++WOf4NPlcr93_WT*UFgv>}!;>dZgw=$B
z8aZT{7<d`DWEuFBc@r}dlQNUoBw3jSnXg{Gs$;3+AL*xOtv7kv<SEmqboO;J@PVR$
zg_q^!%a=gL$4?)D<iCIaAdv!Lq)bu<lGl!?3Id~fR!NXwFarZC8y7bZpOCPKxTKVp
zt(~i@r)O|TVp3XKIuK+4K_&=ffk1XnPF`MKJ`fZX78Mm07nhWjR#a40R#sJ2*VNY5
zH8eCfHa54kwY9Z(baZrfc6N1jclY%4^g%#>|AdK?z+f^EOqnue>a^)IX3Us1YxcZ_
zix)3hvSj&+HERzXJappB)o1U%sJaWy1g63cPZ!6Kid(i9L&KdC1zH~}zRBAzXD2Gm
zZM|{#2I~Xw@-~R>J{t8W(z5wi%-JgaXGv`$XKY&{I;;)PtvYc$owd5IC**JH{JEFc
z8Hd}wwz~VVFm?awk6k^f=G*238rHp3PoKJUzk{&#<I~TQOj-YmO*M8u^Ngdzv)=5X
zOmUiWhfU5@DTZebX<`k_E<JO6$m}_xSi<<QW~Ra%w`|rR9#i#`Z<ZXJz!Yff(*D!o
z?(DmHDP_N-Whc~oWOq9JK6r8e-!g^TxnW5S$GVr-Kks!oW0L!#!RGbV*Xy;j<tA+K
zn%&y4?ccAz&3ogoXE)x_eYIv1!`}~g)pyHZV-5;cXYF0WwCKr?r?+1|-QmKpQrU6I
zJ-vRmN3-(w%k-_kz0ATv>wef|r4mK&IO87=3T${zX>WSw+$nNu+PoajMHw%jrLFXE
zIQ1?w^wjrn?_{<6rf*rAo4Yhhb6>@p^S8gsu5Y{Bx5+0qYL?#SHObo#ettjwRKn$Z
yA?3xz->=NmjPRT@(@NpgjvX02Tmizr85MRG#+={OHvyP(7(8A5T-G@yGywn*f5k@t
--- a/browser/devtools/shared/Makefile.in
+++ b/browser/devtools/shared/Makefile.in
@@ -4,8 +4,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	$(NSINSTALL) $(srcdir)/*.jsm $(FINAL_TARGET)/modules/devtools
 	$(NSINSTALL) $(srcdir)/widgets/*.jsm $(FINAL_TARGET)/modules/devtools
 	$(NSINSTALL) $(srcdir)/*.js $(FINAL_TARGET)/modules/devtools/shared
+	$(NSINSTALL) $(srcdir)/widgets/*.js $(FINAL_TARGET)/modules/devtools/shared/widgets
new file mode 100644
--- /dev/null
+++ b/browser/devtools/shared/widgets/Tooltip.js
@@ -0,0 +1,420 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const {Cc, Cu, Ci} = require("chrome");
+const promise = require("sdk/core/promise");
+const IOService = Cc["@mozilla.org/network/io-service;1"]
+  .getService(Ci.nsIIOService);
+
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
+
+const GRADIENT_RE = /\b(repeating-)?(linear|radial)-gradient\(((rgb|hsl)a?\(.+?\)|[^\)])+\)/gi;
+const BORDERCOLOR_RE = /^border-[-a-z]*color$/ig;
+const BORDER_RE = /^border(-(top|bottom|left|right))?$/ig;
+const BACKGROUND_IMAGE_RE = /url\([\'\"]?(.*?)[\'\"]?\)/;
+
+/**
+ * Tooltip widget.
+ *
+ * This widget is intended at any tool that may need to show rich content in the
+ * form of floating panels.
+ * A common use case is image previewing in the CSS rule view, but more complex
+ * use cases may include color pickers, object inspection, etc...
+ *
+ * Tooltips are based on XUL (namely XUL arrow-type <panel>s), and therefore
+ * need a XUL Document to live in.
+ * This is pretty much the only requirement they have on their environment.
+ *
+ * The way to use a tooltip is simply by instantiating a tooltip yourself and
+ * attaching some content in it, or using one of the ready-made content types.
+ *
+ * A convenient `startTogglingOnHover` method may avoid having to register event
+ * handlers yourself if the tooltip has to be shown when hovering over a
+ * specific element or group of elements (which is usually the most common case)
+ */
+
+/**
+ * The low level structure of a tooltip is a XUL element (a <panel>, although
+ * <tooltip> is supported too, it won't have the nice arrow shape).
+ */
+let PanelFactory = {
+  get: function(doc, xulTag="panel") {
+    // Create the tooltip
+    let panel = doc.createElement(xulTag);
+    panel.setAttribute("hidden", true);
+
+    if (xulTag === "panel") {
+      // Prevent the click used to close the panel from being consumed
+      panel.setAttribute("consumeoutsideclicks", false);
+      panel.setAttribute("type", "arrow");
+      panel.setAttribute("level", "top");
+    }
+
+    panel.setAttribute("class", "devtools-tooltip devtools-tooltip-" + xulTag);
+    doc.querySelector("window").appendChild(panel);
+
+    return panel;
+  }
+};
+
+/**
+ * Tooltip class.
+ *
+ * Basic usage:
+ *   let t = new Tooltip(xulDoc);
+ *   t.content = someXulContent;
+ *   t.show();
+ *   t.hide();
+ *   t.destroy();
+ *
+ * Better usage:
+ *   let t = new Tooltip(xulDoc);
+ *   t.startTogglingOnHover(container, target => {
+ *     if (<condition based on target>) {
+ *       t.setImageContent("http://image.png");
+ *       return true;
+ *     }
+ *   });
+ *   t.destroy();
+ *
+ * @param XULDocument doc
+ *        The XUL document hosting this tooltip
+ */
+function Tooltip(doc) {
+  this.doc = doc;
+  this.panel = PanelFactory.get(doc);
+
+  // Used for namedTimeouts in the mouseover handling
+  this.uid = "tooltip-" + Date.now();
+}
+
+module.exports.Tooltip = Tooltip;
+
+Tooltip.prototype = {
+  /**
+   * Show the tooltip. It might be wise to append some content first if you
+   * don't want the tooltip to be empty. You may access the content of the
+   * tooltip by setting a XUL node to t.tooltip.content.
+   * @param {node} anchor
+   *        Which node should the tooltip be shown on
+   * @param {string} position
+   *        https://developer.mozilla.org/en-US/docs/XUL/PopupGuide/Positioning
+   *        Defaults to before_start
+   */
+  show: function(anchor, position="before_start") {
+    this.panel.hidden = false;
+    this.panel.openPopup(anchor, position);
+  },
+
+  /**
+   * Hide the tooltip
+   */
+  hide: function() {
+    this.panel.hidden = true;
+    this.panel.hidePopup();
+  },
+
+  /**
+   * Empty the tooltip's content
+   */
+  empty: function() {
+    while (this.panel.hasChildNodes()) {
+      this.panel.removeChild(this.panel.firstChild);
+    }
+  },
+
+  /**
+   * Get rid of references and event listeners
+   */
+  destroy: function () {
+    this.hide();
+    this.content = null;
+
+    this.doc = null;
+
+    this.panel.parentNode.removeChild(this.panel);
+    this.panel = null;
+
+    if (this._basedNode) {
+      this.stopTogglingOnHover();
+    }
+  },
+
+  /**
+   * Show/hide the tooltip when the mouse hovers over particular nodes.
+   *
+   * 2 Ways to make this work:
+   * - Provide a single node to attach the tooltip to, as the baseNode, and
+   *   omit the second targetNodeCb argument
+   * - Provide a baseNode that is the container of possibly numerous children
+   *   elements that may receive a tooltip. In this case, provide the second
+   *   targetNodeCb argument to decide wether or not a child should receive
+   *   a tooltip.
+   *
+   * This works by tracking mouse movements on a base container node (baseNode)
+   * and showing the tooltip when the mouse stops moving. The targetNodeCb
+   * callback is used to know whether or not the particular element being
+   * hovered over should indeed receive the tooltip. If you don't provide it
+   * it's equivalent to a function that always returns true.
+   *
+   * Note that if you call this function a second time, it will itself call
+   * stopTogglingOnHover before adding mouse tracking listeners again.
+   *
+   * @param {node} baseNode
+   *        The container for all target nodes
+   * @param {Function} targetNodeCb
+   *        A function that accepts a node argument and returns true or false
+   *        to signify if the tooltip should be shown on that node or not.
+   *        Additionally, the function receives a second argument which is the
+   *        tooltip instance itself, to be used to add/modify the content of the
+   *        tooltip if needed. If omitted, the tooltip will be shown everytime.
+   * @param {Number} showDelay
+   *        An optional delay that will be observed before showing the tooltip.
+   *        Defaults to 750ms
+   */
+  startTogglingOnHover: function(baseNode, targetNodeCb, showDelay = 750) {
+    if (this._basedNode) {
+      this.stopTogglingOnHover();
+    }
+
+    this._basedNode = baseNode;
+    this._showDelay = showDelay;
+    this._targetNodeCb = targetNodeCb || (() => true);
+
+    this._onBaseNodeMouseMove = this._onBaseNodeMouseMove.bind(this);
+    this._onBaseNodeMouseLeave = this._onBaseNodeMouseLeave.bind(this);
+
+    baseNode.addEventListener("mousemove", this._onBaseNodeMouseMove, false);
+    baseNode.addEventListener("mouseleave", this._onBaseNodeMouseLeave, false);
+  },
+
+  /**
+   * If the startTogglingOnHover function has been used previously, and you want
+   * to get rid of this behavior, then call this function to remove the mouse
+   * movement tracking
+   */
+  stopTogglingOnHover: function() {
+    clearNamedTimeout(this.uid);
+
+    this._basedNode.removeEventListener("mousemove",
+      this._onBaseNodeMouseMove, false);
+    this._basedNode.removeEventListener("mouseleave",
+      this._onBaseNodeMouseLeave, false);
+
+    this._basedNode = null;
+    this._targetNodeCb = null;
+    this._lastHovered = null;
+  },
+
+  _onBaseNodeMouseMove: function(event) {
+    if (event.target !== this._lastHovered) {
+      this.hide();
+      this._lastHovered = null;
+      setNamedTimeout(this.uid, this._showDelay, () => {
+        this._showOnHover(event.target);
+      });
+    }
+  },
+
+  _showOnHover: function(target) {
+    if (this._targetNodeCb && this._targetNodeCb(target, this)) {
+      this.show(target);
+      this._lastHovered = target;
+    }
+  },
+
+  _onBaseNodeMouseLeave: function() {
+    clearNamedTimeout(this.uid);
+    this._lastHovered = null;
+  },
+
+  /**
+   * Set the content of this tooltip. Will first empty the tooltip and then
+   * append the new content element.
+   * Consider using one of the set<type>Content() functions instead.
+   * @param {node} content
+   *        A node that can be appended in the tooltip XUL element
+   */
+  set content(content) {
+    this.empty();
+    if (content) {
+      this.panel.appendChild(content);
+    }
+  },
+
+  get content() {
+    return this.panel.firstChild;
+  },
+
+  /**
+   * Fill the tooltip with an image, displayed over a tiled background useful
+   * for transparent images.
+   * Also adds the image dimension as a label at the bottom.
+   */
+  setImageContent: function(imageUrl, maxDim=400) {
+    // Main container
+    let vbox = this.doc.createElement("vbox");
+    vbox.setAttribute("align", "center")
+
+    // Transparency tiles (image will go in there)
+    let tiles = createTransparencyTiles(this.doc, vbox);
+
+    // Temporary label during image load
+    let label = this.doc.createElement("label");
+    label.classList.add("devtools-tooltip-caption");
+    label.textContent = l10n.strings.GetStringFromName("previewTooltip.image.brokenImage");
+    vbox.appendChild(label);
+
+    // Display the image
+    let image = this.doc.createElement("image");
+    image.setAttribute("src", imageUrl);
+    if (maxDim) {
+      image.style.maxWidth = maxDim + "px";
+      image.style.maxHeight = maxDim + "px";
+    }
+    tiles.appendChild(image);
+
+    this.content = vbox;
+
+    // Load the image to get dimensions and display it when done
+    let imgObj = new this.doc.defaultView.Image();
+    imgObj.src = imageUrl;
+    imgObj.onload = () => {
+      imgObj.onload = null;
+
+      // Display dimensions
+      label.textContent = imgObj.naturalWidth + " x " + imgObj.naturalHeight;
+      if (imgObj.naturalWidth > maxDim ||
+        imgObj.naturalHeight > maxDim) {
+        label.textContent += " *";
+      }
+    }
+  },
+
+  /**
+   * Exactly the same as the `image` function but takes a css background image
+   * value instead : url(....)
+   */
+  setCssBackgroundImageContent: function(cssBackground, sheetHref, maxDim=400) {
+    let uri = getBackgroundImageUri(cssBackground, sheetHref);
+    if (uri) {
+      this.setImageContent(uri, maxDim);
+    }
+  },
+
+  setCssGradientContent: function(cssGradient) {
+    let tiles = createTransparencyTiles(this.doc);
+
+    let gradientBox = this.doc.createElement("box");
+    gradientBox.width = "100";
+    gradientBox.height = "100";
+    gradientBox.style.background = this.cssGradient;
+    gradientBox.style.borderRadius = "2px";
+    gradientBox.style.boxShadow = "inset 0 0 4px #333";
+
+    tiles.appendChild(gradientBox)
+
+    this.content = tiles;
+  },
+
+  _setSimpleCssPropertiesContent: function(properties, width, height) {
+    let tiles = createTransparencyTiles(this.doc);
+
+    let box = this.doc.createElement("box");
+    box.width = width + "";
+    box.height = height + "";
+    properties.forEach(({name, value}) => {
+      box.style[name] = value;
+    });
+    tiles.appendChild(box);
+
+    this.content = tiles;
+  },
+
+  setCssColorContent: function(cssColor) {
+    this._setSimpleCssPropertiesContent([
+      {name: "background", value: cssColor},
+      {name: "borderRadius", value: "2px"},
+      {name: "boxShadow", value: "inset 0 0 4px #333"},
+    ], 50, 50);
+  },
+
+  setCssBoxShadowContent: function(cssBoxShadow) {
+    this._setSimpleCssPropertiesContent([
+      {name: "background", value: "white"},
+      {name: "boxShadow", value: cssBoxShadow}
+    ], 80, 80);
+  },
+
+  setCssBorderContent: function(cssBorder) {
+    this._setSimpleCssPropertiesContent([
+      {name: "background", value: "white"},
+      {name: "border", value: cssBorder}
+    ], 80, 80);
+  }
+};
+
+/**
+ * Internal utility function that creates a tiled background useful for
+ * displaying semi-transparent images
+ */
+function createTransparencyTiles(doc, parentEl) {
+  let tiles = doc.createElement("box");
+  tiles.classList.add("devtools-tooltip-tiles");
+  if (parentEl) {
+    parentEl.appendChild(tiles);
+  }
+  return tiles;
+}
+
+/**
+ * Internal util, checks whether a css declaration is a gradient
+ */
+function isGradientRule(property, value) {
+  return (property === "background" || property === "background-image") &&
+    value.match(GRADIENT_RE);
+}
+
+/**
+ * Internal util, checks whether a css declaration is a color
+ */
+function isColorOnly(property, value) {
+  return property === "background-color" ||
+         property === "color" ||
+         property.match(BORDERCOLOR_RE);
+}
+
+/**
+ * Internal util, returns the background image uri if any
+ */
+function getBackgroundImageUri(value, sheetHref) {
+  let uriMatch = BACKGROUND_IMAGE_RE.exec(value);
+  let uri = null;
+
+  if (uriMatch && uriMatch[1]) {
+    uri = uriMatch[1];
+    if (sheetHref) {
+      let sheetUri = IOService.newURI(sheetHref, null, null);
+      uri = sheetUri.resolve(uri);
+    }
+  }
+
+  return uri;
+}
+
+/**
+ * L10N utility class
+ */
+function L10N() {}
+L10N.prototype = {};
+
+let l10n = new L10N();
+
+loader.lazyGetter(L10N.prototype, "strings", () => {
+  return Services.strings.createBundle(
+    "chrome://browser/locale/devtools/inspector.properties");
+});
--- a/browser/devtools/styleinspector/computed-view.js
+++ b/browser/devtools/styleinspector/computed-view.js
@@ -6,18 +6,18 @@
 
 const {Cc, Ci, Cu} = require("chrome");
 
 let ToolDefinitions = require("main").Tools;
 let {CssLogic} = require("devtools/styleinspector/css-logic");
 let {ELEMENT_STYLE} = require("devtools/server/actors/styles");
 let promise = require("sdk/core/promise");
 let {EventEmitter} = require("devtools/shared/event-emitter");
-
 const {OutputParser} = require("devtools/output-parser");
+const {Tooltip} = require("devtools/shared/widgets/Tooltip");
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/PluralForm.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/devtools/Templater.jsm");
 
 let {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
 
@@ -164,16 +164,21 @@ function CssHtmlTree(aStyleInspector, aP
   this._handlePrefChange = this._handlePrefChange.bind(this);
   gDevTools.on("pref-changed", this._handlePrefChange);
 
   CssHtmlTree.processTemplate(this.templateRoot, this.root, this);
 
   // The element that we're inspecting, and the document that it comes from.
   this.viewedElement = null;
 
+  // Properties preview tooltip
+  this.tooltip = new Tooltip(this.styleInspector.inspector.panelDoc);
+  this.tooltip.startTogglingOnHover(this.propertyContainer,
+    this._buildTooltipContent.bind(this));
+
   this._buildContextMenu();
   this.createStyleViews();
 }
 
 /**
  * Memoized lookup of a l10n string from a string bundle.
  * @param {string} aName The key to lookup.
  * @returns A localized version of the given key.
@@ -486,16 +491,39 @@ CssHtmlTree.prototype = {
    */
   focusWindow: function(aEvent)
   {
     let win = this.styleDocument.defaultView;
     win.focus();
   },
 
   /**
+   * Verify that target is indeed a css value we want a tooltip on, and if yes
+   * prepare some content for the tooltip
+   */
+  _buildTooltipContent: function(target)
+  {
+    // If the hovered element is not a property view and is not a background
+    // image, then don't show a tooltip
+    let isPropertyValue = target.classList.contains("property-value");
+    if (!isPropertyValue) {
+      return false;
+    }
+    let propName = target.parentNode.querySelector(".property-name");
+    let isBackgroundImage = propName.textContent === "background-image";
+    if (!isBackgroundImage) {
+      return false;
+    }
+
+    // Fill some content
+    this.tooltip.setCssBackgroundImageContent(target.textContent);
+    return true;
+  },
+
+  /**
    * Create a context menu.
    */
   _buildContextMenu: function()
   {
     let doc = this.styleDocument.defaultView.parent.document;
 
     this._contextmenu = this.styleDocument.createElementNS(XUL_NS, "menupopup");
     this._contextmenu.addEventListener("popupshowing", this._contextMenuUpdate);
@@ -643,16 +671,19 @@ CssHtmlTree.prototype = {
       this.menuitemSelectAll = null;
 
       // Destroy the context menu.
       this._contextmenu.removeEventListener("popupshowing", this._contextMenuUpdate);
       this._contextmenu.parentNode.removeChild(this._contextmenu);
       this._contextmenu = null;
     }
 
+    this.tooltip.stopTogglingOnHover(this.propertyContainer);
+    this.tooltip.destroy();
+
     // Remove bound listeners
     this.styleDocument.removeEventListener("contextmenu", this._onContextMenu);
     this.styleDocument.removeEventListener("copy", this._onCopy);
     this.styleDocument.removeEventListener("mousedown", this.focusWindow);
 
     // Nodes used in templating
     delete this.root;
     delete this.propertyContainer;
@@ -826,19 +857,18 @@ PropertyView.prototype = {
   /**
    * Build the markup for on computed style
    * @return Element
    */
   buildMain: function PropertyView_buildMain()
   {
     let doc = this.tree.styleDocument;
 
+    // Build the container element
     this.onMatchedToggle = this.onMatchedToggle.bind(this);
-
-    // Build the container element
     this.element = doc.createElementNS(HTML_NS, "div");
     this.element.setAttribute("class", this.propertyHeaderClassName);
     this.element.addEventListener("dblclick", this.onMatchedToggle, false);
 
     // Make it keyboard navigable
     this.element.setAttribute("tabindex", "0");
     this.onKeyDown = (aEvent) => {
       let keyEvent = Ci.nsIDOMKeyEvent;
@@ -853,16 +883,18 @@ PropertyView.prototype = {
     this.element.addEventListener("keydown", this.onKeyDown, false);
 
     // Build the twisty expand/collapse
     this.matchedExpander = doc.createElementNS(HTML_NS, "div");
     this.matchedExpander.className = "expander theme-twisty";
     this.matchedExpander.addEventListener("click", this.onMatchedToggle, false);
     this.element.appendChild(this.matchedExpander);
 
+    this.focusElement = () => this.element.focus();
+
     // Build the style name element
     this.nameNode = doc.createElementNS(HTML_NS, "div");
     this.nameNode.setAttribute("class", "property-name theme-fg-color5");
     // Reset its tabindex attribute otherwise, if an ellipsis is applied
     // it will be reachable via TABing
     this.nameNode.setAttribute("tabindex", "");
     this.nameNode.textContent = this.nameNode.title = this.name;
     // Make it hand over the focus to the container
@@ -1029,17 +1061,17 @@ PropertyView.prototype = {
     this.nameNode = null;
 
     this.valueNode.removeEventListener("click", this.onFocus, false);
     this.valueNode = null;
   }
 };
 
 /**
- * A container to view us easy access to display data from a CssRule
+ * A container to give us easy access to display data from a CssRule
  * @param CssHtmlTree aTree, the owning CssHtmlTree
  * @param aSelectorInfo
  */
 function SelectorView(aTree, aSelectorInfo)
 {
   this.tree = aTree;
   this.selectorInfo = aSelectorInfo;
   this._cacheStatusNames();
--- a/browser/devtools/styleinspector/rule-view.js
+++ b/browser/devtools/styleinspector/rule-view.js
@@ -8,16 +8,17 @@
 
 const {Cc, Ci, Cu} = require("chrome");
 const promise = require("sdk/core/promise");
 
 let {CssLogic} = require("devtools/styleinspector/css-logic");
 let {InplaceEditor, editableField, editableItem} = require("devtools/shared/inplace-editor");
 let {ELEMENT_STYLE, PSEUDO_ELEMENTS} = require("devtools/server/actors/styles");
 let {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
+let {Tooltip} = require("devtools/shared/widgets/Tooltip");
 
 const {OutputParser} = require("devtools/output-parser");
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const HTML_NS = "http://www.w3.org/1999/xhtml";
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@@ -1024,28 +1025,30 @@ TextProperty.prototype = {
  *   Can mark a property disabled or enabled.
  */
 
 /**
  * CssRuleView is a view of the style rules and declarations that
  * apply to a given element.  After construction, the 'element'
  * property will be available with the user interface.
  *
+ * @param {Inspector} aInspector
  * @param {Document} aDoc
  *        The document that will contain the rule view.
  * @param {object} aStore
  *        The CSS rule view can use this object to store metadata
  *        that might outlast the rule view, particularly the current
  *        set of disabled properties.
  * @param {PageStyleFront} aPageStyle
  *        The PageStyleFront for communicating with the remote server.
  * @constructor
  */
-function CssRuleView(aDoc, aStore, aPageStyle)
+function CssRuleView(aInspector, aDoc, aStore, aPageStyle)
 {
+  this.inspector = aInspector;
   this.doc = aDoc;
   this.store = aStore || {};
   this.pageStyle = aPageStyle;
   this.element = this.doc.createElementNS(HTML_NS, "div");
   this.element.className = "ruleview devtools-monospace";
   this.element.flex = 1;
 
   this._outputParser = new OutputParser();
@@ -1062,16 +1065,19 @@ function CssRuleView(aDoc, aStore, aPage
 
   let options = {
     fixedWidth: true,
     autoSelect: true,
     theme: "auto"
   };
   this.popup = new AutocompletePopup(aDoc.defaultView.parent.document, options);
 
+  this.tooltip = new Tooltip(this.inspector.panelDoc);
+  this.tooltip.startTogglingOnHover(this.element, this._buildTooltipContent.bind(this));
+
   this._buildContextMenu();
   this._showEmpty();
 }
 
 exports.CssRuleView = CssRuleView;
 
 CssRuleView.prototype = {
   // The element that we're inspecting.
@@ -1103,16 +1109,47 @@ CssRuleView.prototype = {
       popupset = doc.createElementNS(XUL_NS, "popupset");
       doc.documentElement.appendChild(popupset);
     }
 
     popupset.appendChild(this._contextmenu);
   },
 
   /**
+   * Verify that target is indeed a css value we want a tooltip on, and if yes
+   * prepare some content for the tooltip
+   */
+  _buildTooltipContent: function(target) {
+    let isValueWithImage = target.classList.contains("ruleview-propertyvalue") &&
+      target.querySelector(".theme-link");
+
+    let isImageHref = target.classList.contains("theme-link") &&
+      target.parentNode.classList.contains("ruleview-propertyvalue");
+    if (isImageHref) {
+      target = target.parentNode;
+    }
+
+    let isEditing = this.isEditing;
+
+    // If the inplace-editor is visible or if this is not a background image
+    // don't show the tooltip
+    if (this.isEditing || (!isImageHref && !isValueWithImage)) {
+      return false;
+    }
+
+    // Retrieve the TextProperty for the hovered element
+    let property = target.textProperty;
+    let href = property.rule.domRule.href;
+
+    // Fill some content
+    this.tooltip.setCssBackgroundImageContent(property.value, href);
+    return true;
+  },
+
+  /**
    * Update the context menu. This means enabling or disabling menuitems as
    * appropriate.
    */
   _contextMenuUpdate: function() {
     let win = this.doc.defaultView;
 
     // Copy selection.
     let selection = win.getSelection();
@@ -1235,16 +1272,19 @@ CssRuleView.prototype = {
       this._contextmenu.removeEventListener("popupshowing", this._contextMenuUpdate);
       this._contextmenu.parentNode.removeChild(this._contextmenu);
       this._contextmenu = null;
     }
 
     // We manage the popupNode ourselves so we also need to destroy it.
     this.doc.popupNode = null;
 
+    this.tooltip.stopTogglingOnHover(this.element);
+    this.tooltip.destroy();
+
     if (this.element.parentNode) {
       this.element.parentNode.removeChild(this.element);
     }
 
     if (this.elementStyle) {
       this.elementStyle.destroy();
     }
 
@@ -1302,17 +1342,16 @@ CssRuleView.prototype = {
   _populate: function() {
     let elementStyle = this._elementStyle;
     return this._elementStyle.populate().then(() => {
       if (this._elementStyle != elementStyle) {
         return promise.reject("element changed");
       }
       this._createEditors();
 
-
       // Notify anyone that cares that we refreshed.
       var evt = this.doc.createEvent("Events");
       evt.initEvent("CssRuleViewRefreshed", true, false);
       this.element.dispatchEvent(evt);
       return undefined;
     }).then(null, promiseWarn);
   },
 
@@ -1848,16 +1887,20 @@ TextPropertyEditor.prototype = {
     // Property value, editable when focused.  Changes to the
     // property value are applied as they are typed, and reverted
     // if the user presses escape.
     this.valueSpan = createChild(propertyContainer, "span", {
       class: "ruleview-propertyvalue theme-fg-color1",
       tabindex: "0",
     });
 
+    // Storing the TextProperty on the valuespan for easy access
+    // (for instance by the tooltip)
+    this.valueSpan.textProperty = this.prop;
+
     // Save the initial value as the last committed value,
     // for restoring after pressing escape.
     this.committed = { name: this.prop.name,
                        value: this.prop.value,
                        priority: this.prop.priority };
 
     appendText(propertyContainer, ";");
 
@@ -1966,17 +2009,16 @@ TextPropertyEditor.prototype = {
       let a = createChild(this.valueSpan, "a",  {
         target: "_blank",
         class: "theme-link",
         textContent: resourceURI,
         href: this.resolveURI(resourceURI)
       });
 
       a.addEventListener("click", (aEvent) => {
-
         // Clicks within the link shouldn't trigger editing.
         aEvent.stopPropagation();
         aEvent.preventDefault();
 
         this.browserWindow.openUILinkIn(aEvent.target.href, "tab");
 
       }, false);
 
@@ -2128,16 +2170,17 @@ TextPropertyEditor.prototype = {
   /**
    * Remove property from style and the editors from DOM.
    * Begin editing next available property.
    */
   remove: function TextPropertyEditor_remove()
   {
     this.element.parentNode.removeChild(this.element);
     this.ruleEditor.rule.editClosestTextProperty(this.prop);
+    this.valueSpan.textProperty = null;
     this.prop.remove();
   },
 
   /**
    * Called when a value editor closes.  If the user pressed escape,
    * revert to the value this property had before editing.
    *
    * @param {string} aValue
--- a/browser/devtools/styleinspector/style-inspector.js
+++ b/browser/devtools/styleinspector/style-inspector.js
@@ -20,17 +20,17 @@ loader.lazyGetter(this, "_strings", () =
 // registers inspector tools.
 
 function RuleViewTool(aInspector, aWindow, aIFrame)
 {
   this.inspector = aInspector;
   this.doc = aWindow.document;
   this.outerIFrame = aIFrame;
 
-  this.view = new RuleView.CssRuleView(this.doc);
+  this.view = new RuleView.CssRuleView(aInspector, this.doc);
   this.doc.documentElement.appendChild(this.view.element);
 
   this._changeHandler = () => {
     this.inspector.markDirty();
   };
 
   this.view.element.addEventListener("CssRuleViewChanged", this._changeHandler);
 
--- a/browser/devtools/styleinspector/test/Makefile.in
+++ b/browser/devtools/styleinspector/test/Makefile.in
@@ -33,16 +33,17 @@ MOCHITEST_BROWSER_FILES = \
   browser_bug893965_css_property_completion_new_property.js \
   browser_bug893965_css_property_completion_existing_property.js \
   browser_bug894376_css_value_completion_new_property_value_pair.js \
   browser_bug894376_css_value_completion_existing_property_value_pair.js \
   browser_ruleview_bug_902966_revert_value_on_ESC.js \
   browser_ruleview_pseudoelement.js \
   browser_computedview_bug835808_keyboard_nav.js \
   browser_bug913014_matched_expand.js \
+  browser_bug765105_background_image_tooltip.js \
   head.js \
   $(NULL)
 
 MOCHITEST_BROWSER_FILES += \
   browser_bug683672.html \
   browser_bug705707_is_content_stylesheet.html \
   browser_bug705707_is_content_stylesheet_imported.css \
   browser_bug705707_is_content_stylesheet_imported2.css \
new file mode 100644
--- /dev/null
+++ b/browser/devtools/styleinspector/test/browser_bug765105_background_image_tooltip.js
@@ -0,0 +1,162 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+let contentDoc;
+let inspector;
+let ruleView;
+let computedView;
+
+const PAGE_CONTENT = [
+  '<style type="text/css">',
+  '  body {',
+  '    padding: 1em;',
+  '    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADI5JREFUeNrsWwuQFNUVPf1m5z87szv7HWSWj8CigBFMEFZKiQsB1PgJwUAZg1HBpIQsKmokEhNjWUnFVPnDWBT+KolJYbRMoqUVq0yCClpqiX8sCchPWFwVlt2db7+X93pez7zu6Vn2NxsVWh8987p7pu+9555z7+tZjTGGY3kjOMa34w447oBjfKsY7i/UNM3Y8eFSAkD50Plgw03K5P9gvGv7U5ieeR3PszeREiPNX3/0DL4hjslzhm8THh+OITfXk3dhiv4GDtGPVzCaeJmPLYzuu5qJuWfuw2QTlcN1X9pwQU7LhdZ/ZAseD45cOh9hHvDkc/yAF/DNhdb5Mrr3PvBMaAYW8fMSIi2G497IMEK/YutGtAYr6+ej+nxu/NN8Ks3N7AR6HgcLz0Eg1Ljg1UcxZzi5qewIkMYLRweTr2Kzp+nmyXAd5pS3XQDd+N/4h4zgu9FI7brlXf90nMEnuwQxlvv+hosE3TuexmWeysmT4W+WxkMaLzf9Y8ATgjcUn7T9H1gqrpFq8eV1gMn6t16NhngjfoX6q4DUP032Rd4LJgpSLwJ1yzFqBG69eRkah0MVyo0Acfe+yy9AG4nMiYCkeM53KKFXncBLAXqEm+wCqZwaueq7WCmuLTcKSJmj737ol2hurA9eq9VdyiO8yWa3NNyog+SB5CZodSsQq/dfu34tJpYbBaTMzvVddDZu16q5smXf4G8zEvqm4cyaAmJPuTJk3oJWdS4WzcVtfMZbThSQckb/pYfRGgo3zNOqZnEHbJPGK4abaDCQIIsT8V/qTaBqHkLh6LzXH8XZQhbLhYKyyCC/WeHYcNdmvOgfe8skzbWL270/T3wf7tSx/lGCbTu8xlzzmCSWLc5iwmgikcCHi3Mga0Ry913vBFvQwg90l6M4ImWKfsWOp7DSWxmfpPlCFuPFfsNfKrCnPYpQKIRgqBK7D0SxYaNHwkEiJMtl0ReDp3Lc5D3PGoTo/sKngCl7a5chFqvBatKwjBd7WwqIlzB/78NcoUcp5VSgGxm+7b8eqQRGnHMO634epO4S1EZww09/iFg5UmGoESDuznP1xVhTUX1WWHPzjpd25wyH0hRxI3LGM75nxmuNEEUVpAN0XgxmPoKralakbQnWlIMQyVBD/w+3orkq4lvualjKyWwzt4MaxqspQHVhPOWG64bxYuhZXSFGWhipbSDVragOu5Y9eAsmDDUKyBA703vemVhHoueD6e9wAzJK1WfmN0Umk5GGM4kEMZcuIECqgjm0nldAqmbjwtm4VxZH5AvlADP6mx9Eqy9Q0+KqW8Ch+47FaMMYmnNGfY1iPMshoC6qFxme4wQ+0p+ARE6H3+9veWEDWgUhDhUKyFARn4jM5BNxT0XsMg7bfymGK1ov3wtjDfhL4w0HVGUVBEjDaaE+QNdrcNWch1PG4W6xrjBUXECGivg++Cva3JUT4iQUz3V2RsSVaKLwOuDT89A3HdBQoxhNC+fnVm74ual2EG893P6G+PuP4SfiO4cCBWQooL9qCWKNXPbcI37Aa/lnlZxXRt4RFONGwSDCPAHqOuqjWct1QiEMw5mChM5X4K47FyNqcd3aK9AwFH0CGYLoe1ctxk2eWi57rg5JfGp9rzC6ggCdFlAgHBDw5Yxlcg6G8SyHCjMlsgmDD9zhSeHlF+JnAgWDTQUy2NxfdwOao1UVV3pi3+bE97YSbWpLAbn6zefHNQkp1PMpIBwwvslKgIYTKM2nEpNzrGcH3FXTEal0L38kJ4uDQgEZbO4vnI173LXf5NHZaiUxtaCxyZuo/rK6LpUg54yg3zTWRAArvDcRIPZ6BqzrQ1REpmL+DNw32OKIDCb3X1qPVn8wNNMT4w2bvs+q4bAZrqBh2skaL3yyhhIIZ4i6oHkUK0RckcB8GigEyRIH4A6Mgc8fatl0/+BkkQxC9gIT4ljna1rIZW9rEdNbjJcNjsnoYj7LHWCUwpITzEgzRQKZ3XAFHbTzA3hrz8TEUUZxFBhoKpABQt/97p+w0hMZG68I8R6FtlsJT3FELndZntjM+VMnylKYq8GJI3UZaRMpquGSGFVOEfv0YZBMNzz+uvjbfzS6xQERIhlI9FcvQWNdFVb7x1zCb+QNK8vb9NsiifmI5hBgVoOCBC1sb0ab5RomqENxLO3eA1/0NDRU47q2RQNbRCUDIb7lF2CNL3ZGxEV4n08TVvZWYG4pZyV0zUdS45tyCBByOHWiyvZmxFXDCyRo1ge5+Sy0TA+8lWMiP/6O0S32exGV9Jf4fr8azdUR3zL/CZz4MtvzdX5uOYs6NDOmpkuj5Huh+7qUQSYl0ThHzw0YQzcGo6bhzEqoYq5rN3yRiYiG3Vfe2Ybm/qKA9NNZ3nNm4F7/yDkg9AN+U1mHiBcXP8zuDN76jj8hg1QyiWQigalj02BJPhK8I0zxijAjhp5zhlpLUDvS+BCy2HMAvvB4XDgL9/SXC0g/ou/5+6/xLX8w0uJrOIkXfPvyhY0F6gr7M8H0KWFYikcqAXakB+xwD9CdREBLoau7Gz3cAdSIdLFxFtJTCqRChSjnutvhDcREtzjz2Tswtz+yeNRFUeXZXtWux7C1fuoVcbd3J//ipDX3uZZDLGrwweS+UBLL5TDliVBnF8P7H+XI8aRRGsIBJg/Zlslt1+W+D1JWoSyi+kD9jfhs78t7mhZhSl+fLfY1Bdyv3I8V/qpY3B1McgN7ZFT5/vNO0I5DPLLdPBIJA8qc4h2I0QplYfDpJwHT+aj0246r5S8rToG8OjCle8wk4OLvvYGa+Ovr84uo2qBSwJS9G5egoZFLTfiEqWDtbwGfHgKOdPHcS+ai7XDzMPW/FJRLGGcxnBbK4YJC2K+h+T6Bdu5CqHqCWERd3bawb7JI+iJ735+LNaHaprBLLHBm08U3XxShEsdt+f3eTh3v7aC95Dct4RCWL5OZWh/oXBZThxAIxyOXLzBk8aiEWJID8rK3CpPOmeHaGpvCS+7EHv5FujVHUSJPLXvIFeHcNc+9xrB2gws9KZdxuLFax/WLM5gzzSm/lTXF/OdAcapyvjxPqxqHjr2v4ckX2bS2dRBrc5lSdpKjEJ9/9tdwX2WMd53ZQ2IVo3RES+UwVSpCPvYepNx4gmTGDUKIMQ4eduPnD7mx9xOn/KZKOlFbStjONxHTtR+BYAPmnoZ1Zp8wkBRwP/EL3u0F/C2hGl7vpz7vW37T3vP7if8wroKuoh8ribknX9BK5rcF+mo1qKaKyRPJTgTDjbzY8szcuLb3bpH00u35T47j7prRpwDJTxzyG0dHgxPp5bPG8VdkpfPbUg3SgoOo2mwVukb98D5EqpswZTTulCggTk4gpYhv0++wIhCJxr0+Hq1sondis0SE2oxQe3qWXwWyO4DSQg9gJ8Iiw1VFcGqXxet0N9xE4ygIxv/9W6wo9WyROEX/R+eiobYSq2vHTOR631Eiv2lRfh9dvxkumkXh92Qsx8XrAJ+7YGbWuhxOi/U+31NQmzyqNYG8N/3wfo6CRtRHcN01FzkvojohwLu0VVvDa56IS/xcj2b7nN+O+m0jqpE1wMPXZxAN9iCVThtDvH7gmiRGRpU8Lspv1Uhq4wIVdQoyuGSLNYPKUCS8+CzNURbzMmjK3i8u0U793lmuV0ef9nWQ5MGC/DiUqEUSaCtXna9RJEspZS1lrXINK/pcq+SpT50t98QKMq1FRmDfx3vxty102k0PM4ssEnvuz5+G26Ij4yDpz6z9fV8bkyIkqBFkhej0Ib+ZQ34XJK9AfozaiimqIoX3Jp3tiISrcfYpuN2+iFph/02P36PNC9fVcCnp6H9jYouKyfaWufz5Tp9tVxcUniw7IohZv4dZz81/ns67z3AYPrc2n0+Ix2q8k0PWjgBy88XaibnfK9A+5LdDY2Ivhy36fbT8Zv3Lb1U1qLqUxorXEEXIs0mjjrtxoTZWtdvigNs2sgPiujTv6DIZLld6b/V5742JZV3fUsUVFy5gdsNtKWFzUCEVbNepD1MkSMVbsb6SZm7jI3/zODtQKgUMsOw8wDZ63t5xcV1TnaEAxoc6wrqY+Fj+N4DsqOnhOIdicrQSm1MPYCPlIqHn5bbHg8/bj2D3QfZnCX3mpAICDZV8jH5kpbZqTD0W+DxaA74CWzLN2nd14OlL72J38Lf7+TjC7dadZFDoZJQPrtaIKL/G0L6ktptPZVJ8fMqHYPZOKYPMyQGadIJfDvdXwAFiZOTvDBPydf5vk4rWA+RfdhBlaF/yDDBRoMu9pfnSjv/p7DG+HXfAcQcc49v/BBgAcFAO4DmB2GQAAAAASUVORK5CYII=);',
+  '    background-repeat: repeat-y;',
+  '    background-position: right top;',
+  '  }',
+  '  .test-element {',
+  '    font-family: verdana;',
+  '    color: #333;',
+  '    background: url(chrome://global/skin/icons/warning-64.png) no-repeat left center;',
+  '    padding-left: 70px;',
+  '  }',
+  '</style>',
+  '<div class="test-element">test element</div>',
+  '<div class="test-element-2">test element 2</div>'
+].join("\n");
+
+function test() {
+  waitForExplicitFinish();
+
+  gBrowser.selectedTab = gBrowser.addTab();
+  gBrowser.selectedBrowser.addEventListener("load", function(evt) {
+    gBrowser.selectedBrowser.removeEventListener(evt.type, arguments.callee, true);
+    contentDoc = content.document;
+    waitForFocus(createDocument, content);
+  }, true);
+
+  content.location = "data:text/html,rule view tooltip test";
+}
+
+function createDocument() {
+  contentDoc.body.innerHTML = PAGE_CONTENT;
+
+  openRuleView((aInspector, aRuleView) => {
+    inspector = aInspector;
+    ruleView = aRuleView;
+    startTests();
+  });
+}
+
+function startTests() {
+  // let testElement = contentDoc.querySelector(".test-element");
+
+  inspector.selection.setNode(contentDoc.body);
+  inspector.once("inspector-updated", testBodyRuleView);
+}
+
+function endTests() {
+  contentDoc = inspector = ruleView = computedView = null;
+  gBrowser.removeCurrentTab();
+  finish();
+}
+
+function assertTooltipShownOn(tooltip, element, cb) {
+  // If there is indeed a show-on-hover on element, the xul panel will be shown
+  tooltip.panel.addEventListener("popupshown", function shown() {
+    tooltip.panel.removeEventListener("popupshown", shown, true);
+    cb();
+  }, true);
+  tooltip._showOnHover(element);
+}
+
+function testBodyRuleView() {
+  info("Testing tooltips in the rule view");
+
+  let panel = ruleView.tooltip.panel;
+
+  // Check that the rule view has a tooltip and that a XUL panel has been created
+  ok(ruleView.tooltip, "Tooltip instance exists");
+  ok(panel, "XUL panel exists");
+
+  // Get the background-image property inside the rule view
+  let {nameSpan, valueSpan} = getRuleViewProperty("background-image");
+  // And verify that the tooltip gets shown on this property
+  assertTooltipShownOn(ruleView.tooltip, valueSpan, () => {
+    let images = panel.getElementsByTagName("image");
+    is(images.length, 1, "Tooltip contains an image");
+    ok(images[0].src.indexOf("iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHe") !== -1, "The image URL seems fine");
+
+    ruleView.tooltip.hide();
+
+    inspector.selection.setNode(contentDoc.querySelector(".test-element"));
+    inspector.once("inspector-updated", testDivRuleView);
+  });
+}
+
+function testDivRuleView() {
+  let panel = ruleView.tooltip.panel;
+
+  // Get the background property inside the rule view
+  let {nameSpan, valueSpan} = getRuleViewProperty("background");
+  let uriSpan = valueSpan.querySelector(".theme-link");
+
+  // And verify that the tooltip gets shown on this property
+  assertTooltipShownOn(ruleView.tooltip, uriSpan, () => {
+    let images = panel.getElementsByTagName("image");
+    is(images.length, 1, "Tooltip contains an image");
+    ok(images[0].src === "chrome://global/skin/icons/warning-64.png");
+
+    ruleView.tooltip.hide();
+
+    testComputedView();
+  });
+}
+
+function testComputedView() {
+  info("Testing tooltips in the computed view");
+
+  inspector.sidebar.select("computedview");
+  computedView = inspector.sidebar.getWindowForTab("computedview").computedview.view;
+  let doc = computedView.styleDocument;
+
+  let panel = computedView.tooltip.panel;
+  let {nameSpan, valueSpan} = getComputedViewProperty("background-image");
+
+  assertTooltipShownOn(computedView.tooltip, valueSpan, () => {
+    let images = panel.getElementsByTagName("image");
+    is(images.length, 1, "Tooltip contains an image");
+    ok(images[0].src === "chrome://global/skin/icons/warning-64.png");
+
+    computedView.tooltip.hide();
+
+    endTests();
+  });
+}
+
+function getRuleViewProperty(name) {
+  let prop = null;
+  [].forEach.call(ruleView.doc.querySelectorAll(".ruleview-property"), property => {
+    let nameSpan = property.querySelector(".ruleview-propertyname");
+    let valueSpan = property.querySelector(".ruleview-propertyvalue");
+
+    if (nameSpan.textContent === name) {
+      prop = {nameSpan: nameSpan, valueSpan: valueSpan};
+    }
+  });
+  return prop;
+}
+
+function getComputedViewProperty(name) {
+  let prop = null;
+  [].forEach.call(computedView.styleDocument.querySelectorAll(".property-view"), property => {
+    let nameSpan = property.querySelector(".property-name");
+    let valueSpan = property.querySelector(".property-value");
+
+    if (nameSpan.textContent === name) {
+      prop = {nameSpan: nameSpan, valueSpan: valueSpan};
+    }
+  });
+  return prop;
+}
--- a/browser/locales/en-US/chrome/browser/devtools/app-manager.dtd
+++ b/browser/locales/en-US/chrome/browser/devtools/app-manager.dtd
@@ -52,16 +52,17 @@
 <!ENTITY connection.cancelConnectTooltip "Cancel the connection in progress.">
 <!ENTITY connection.cancelShowSimulatorTooltip "Exit the Simulator connection mode and return to the initial prompt.">
 <!ENTITY connection.or "or">
 <!ENTITY connection.noSimulatorInstalled "No simulator installed.">
 <!ENTITY connection.installOneSimulator "Install Simulator">
 <!ENTITY connection.installOneSimulatorTooltip "Install a version of the Simulator by downloading the relevant add-on.">
 <!ENTITY connection.installAnotherSimulator "Add">
 <!ENTITY connection.installAnotherSimulatorTooltip "Install an additional version of the Simulator by downloading the relevant add-on.">
+<!ENTITY connection.startRegisteredSimulator "Start:">
 
 <!ENTITY projects.localApps "Local Apps">
 <!ENTITY projects.addApp "Add">
 <!ENTITY projects.addPackaged "Add Packaged App">
 <!ENTITY projects.addPackagedTooltip "Add a new packaged app (a directory) from your computer.">
 <!ENTITY projects.addHosted "Add Hosted App">
 <!ENTITY projects.addHostedTooltip "Add a new hosted app (link to a manifest.webapp file) from a remote website.">
 <!ENTITY projects.title "Local Apps">
--- a/browser/locales/en-US/chrome/browser/devtools/inspector.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/inspector.properties
@@ -26,21 +26,23 @@ breadcrumbs.siblings=Siblings
 # the user switch to the inspector when the debugger is paused.
 debuggerPausedWarning.message=Debugger is paused. Some features like mouse selection will not work.
 
 # LOCALIZATION NOTE (nodeMenu.tooltiptext)
 # This menu appears in the Infobar (on top of the highlighted node) once
 # the node is selected.
 nodeMenu.tooltiptext=Node operations
 
-
 # LOCALIZATION NOTE (inspector.*)
 # Used for the menuitem in the tool menu
 inspector.label=Inspector
 inspector.commandkey=C
 inspector.accesskey=I
 
 # LOCALIZATION NOTE (markupView.more.*)
 # When there are too many nodes to load at once, we will offer to
 # show all the nodes.
 markupView.more.showing=Some nodes were hidden.
 markupView.more.showAll=Show All %S Nodes
 inspector.tooltip=DOM and Style Inspector
+
+#LOCALIZATION NOTE: Used in the image preview tooltip when the image could not be loaded
+previewTooltip.image.brokenImage=Could not load the image
--- a/browser/themes/linux/devtools/debugger.css
+++ b/browser/themes/linux/devtools/debugger.css
@@ -12,16 +12,23 @@
 #sources-pane {
   min-width: 50px;
 }
 
 #sources-and-editor-splitter {
   -moz-border-start-color: transparent;
 }
 
+/* Sources toolbar */
+
+#sources-toolbar {
+  border: none; /* Remove the devtools-toolbar's black bottom border. */
+  -moz-border-end: 1px solid #222426; /* Match the sources list's dark margin. */
+}
+
 #pretty-print {
   min-width: 0;
   font-weight: bold;
 }
 
 #black-box {
   list-style-image: url(debugger-blackbox.png);
   -moz-image-region: rect(0px,16px,16px,0px);
@@ -430,8 +437,13 @@
 
 #body[layout=vertical] .side-menu-widget-container {
   box-shadow: none !important;
 }
 
 #body[layout=vertical] .side-menu-widget-item-arrow {
   background-image: none !important;
 }
+
+#body[layout=vertical] .side-menu-widget-group,
+#body[layout=vertical] .side-menu-widget-item {
+  -moz-margin-end: 0;
+}
--- a/browser/themes/linux/devtools/widgets.css
+++ b/browser/themes/linux/devtools/widgets.css
@@ -274,24 +274,38 @@
   color: #fff;
 }
 
 .side-menu-widget-container[theme="light"] {
   background: #fff;
   color: #000;
 }
 
+/* SideMenuWidget container */
+
 .side-menu-widget-container[with-arrows=true]:-moz-locale-dir(ltr) {
   box-shadow: inset -1px 0 0 #222426;
 }
 
 .side-menu-widget-container[with-arrows=true]:-moz-locale-dir(rtl) {
   box-shadow: inset 1px 0 0 #222426;
 }
 
+.side-menu-widget-container[with-arrows=true] .side-menu-widget-group {
+  /* To allow visibility of the dark margin shadow. */
+  -moz-margin-end: 1px;
+}
+
+.side-menu-widget-container[with-arrows=true] .side-menu-widget-item {
+  /* To compensate for the arrow image's dark margin. */
+  -moz-margin-end: -1px;
+}
+
+/* SideMenuWidget groups */
+
 .side-menu-widget-group-title {
   padding: 4px;
 }
 
 .side-menu-widget-group-title[theme="dark"] {
   background-image: linear-gradient(#1f3e4f, #1b3243);
   text-shadow: 0 -1px 0 hsla(210,8%,5%,.45);
   box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
@@ -303,16 +317,18 @@
   background-image: linear-gradient(#fff, #eee);
 }
 
 .side-menu-widget-group-checkbox {
   margin: 0;
   padding: 0;
 }
 
+/* SideMenuWidget items */
+
 .side-menu-widget-item[theme="dark"] {
   border-top: 1px solid hsla(210,8%,5%,.25);
   border-bottom: 1px solid hsla(210,16%,76%,.1);
   margin-top: -1px;
   margin-bottom: -1px;
 }
 
 .side-menu-widget-item[theme="light"] {
@@ -338,25 +354,27 @@
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow {
   background-size: auto, 1px 100%;
   background-repeat: no-repeat;
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow:-moz-locale-dir(ltr) {
-  background-image: url(itemArrow-ltr.png), linear-gradient(to right, black, black);
+  background-image: url(itemArrow-ltr.png), linear-gradient(to right, #222426, #222426);
   background-position: center right, top right;
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow:-moz-locale-dir(rtl) {
-  background-image: url(itemArrow-rtl.png), linear-gradient(to right, black, black);
+  background-image: url(itemArrow-rtl.png), linear-gradient(to right, #222426, #222426);
   background-position: center left, top left;
 }
 
+/* SideMenuWidget items contents */
+
 .side-menu-widget-item-label {
   padding: 4px 0px;
 }
 
 .side-menu-widget-item-arrow {
   -moz-margin-start: -8px;
   width: 8px;
 }
@@ -380,16 +398,18 @@
   border-top-left-radius: 4px;
 }
 
 .side-menu-widget-item-other > label {
   color: #f5f7fa;
   text-shadow: 0 1px 1px #111;
 }
 
+/* SideMenuWidget misc */
+
 .side-menu-widget-empty-notice-container {
   padding: 12px;
 }
 
 .side-menu-widget-empty-notice-container[theme="dark"] {
   background: url(background-noise-toolbar.png), hsl(208,11%,27%);
   font-weight: 600;
   color: #fff;
--- a/browser/themes/osx/devtools/debugger.css
+++ b/browser/themes/osx/devtools/debugger.css
@@ -14,16 +14,23 @@
 #sources-pane {
   min-width: 50px;
 }
 
 #sources-and-editor-splitter {
   -moz-border-start-color: transparent;
 }
 
+/* Sources toolbar */
+
+#sources-toolbar {
+  border: none; /* Remove the devtools-toolbar's black bottom border. */
+  -moz-border-end: 1px solid #222426; /* Match the sources list's dark margin. */
+}
+
 #pretty-print {
   min-width: 0;
   font-weight: bold;
 }
 
 #black-box {
   list-style-image: url(debugger-blackbox.png);
   -moz-image-region: rect(0px,16px,16px,0px);
@@ -432,8 +439,13 @@
 
 #body[layout=vertical] .side-menu-widget-container {
   box-shadow: none !important;
 }
 
 #body[layout=vertical] .side-menu-widget-item-arrow {
   background-image: none !important;
 }
+
+#body[layout=vertical] .side-menu-widget-group,
+#body[layout=vertical] .side-menu-widget-item {
+  -moz-margin-end: 0;
+}
--- a/browser/themes/osx/devtools/widgets.css
+++ b/browser/themes/osx/devtools/widgets.css
@@ -274,24 +274,38 @@
   color: #fff;
 }
 
 .side-menu-widget-container[theme="light"] {
   background: #fff;
   color: #000;
 }
 
+/* SideMenuWidget container */
+
 .side-menu-widget-container[with-arrows=true]:-moz-locale-dir(ltr) {
   box-shadow: inset -1px 0 0 #222426;
 }
 
 .side-menu-widget-container[with-arrows=true]:-moz-locale-dir(rtl) {
   box-shadow: inset 1px 0 0 #222426;
 }
 
+.side-menu-widget-container[with-arrows=true] .side-menu-widget-group {
+  /* To allow visibility of the dark margin shadow. */
+  -moz-margin-end: 1px;
+}
+
+.side-menu-widget-container[with-arrows=true] .side-menu-widget-item {
+  /* To compensate for the arrow image's dark margin. */
+  -moz-margin-end: -1px;
+}
+
+/* SideMenuWidget groups */
+
 .side-menu-widget-group-title {
   padding: 4px;
 }
 
 .side-menu-widget-group-title[theme="dark"] {
   background-image: linear-gradient(#1f3e4f, #1b3243);
   text-shadow: 0 -1px 0 hsla(210,8%,5%,.45);
   box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
@@ -303,16 +317,18 @@
   background-image: linear-gradient(#fff, #eee);
 }
 
 .side-menu-widget-group-checkbox {
   margin: 0;
   padding: 0;
 }
 
+/* SideMenuWidget items */
+
 .side-menu-widget-item[theme="dark"] {
   border-top: 1px solid hsla(210,8%,5%,.25);
   border-bottom: 1px solid hsla(210,16%,76%,.1);
   margin-top: -1px;
   margin-bottom: -1px;
 }
 
 .side-menu-widget-item[theme="light"] {
@@ -338,25 +354,27 @@
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow {
   background-size: auto, 1px 100%;
   background-repeat: no-repeat;
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow:-moz-locale-dir(ltr) {
-  background-image: url(itemArrow-ltr.png), linear-gradient(to right, black, black);
+  background-image: url(itemArrow-ltr.png), linear-gradient(to right, #222426, #222426);
   background-position: center right, top right;
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow:-moz-locale-dir(rtl) {
-  background-image: url(itemArrow-rtl.png), linear-gradient(to right, black, black);
+  background-image: url(itemArrow-rtl.png), linear-gradient(to right, #222426, #222426);
   background-position: center left, top left;
 }
 
+/* SideMenuWidget items contents */
+
 .side-menu-widget-item-label {
   padding: 4px 0px;
 }
 
 .side-menu-widget-item-arrow {
   -moz-margin-start: -8px;
   width: 8px;
 }
@@ -380,16 +398,18 @@
   border-top-left-radius: 4px;
 }
 
 .side-menu-widget-item-other > label {
   color: #f5f7fa;
   text-shadow: 0 1px 1px #111;
 }
 
+/* SideMenuWidget misc */
+
 .side-menu-widget-empty-notice-container {
   padding: 12px;
 }
 
 .side-menu-widget-empty-notice-container[theme="dark"] {
   background: url(background-noise-toolbar.png), hsl(208,11%,27%);
   font-weight: 600;
   color: #fff;
--- a/browser/themes/shared/devtools/common.inc.css
+++ b/browser/themes/shared/devtools/common.inc.css
@@ -106,8 +106,30 @@
     cursor: n-resize;
   }
 
   .devtools-responsive-container > .devtools-sidebar-tabs {
     min-height: 35vh;
     max-height: 75vh;
   }
 }
+
+/* Tooltip widget (see browser/devtools/shared/widgets/Tooltip.js) */
+
+.devtools-tooltip.devtools-tooltip-tooltip {
+  /* If the tooltip uses a <tooltip> XUL element */
+  -moz-appearance: none;
+  padding: 4px;
+  background: #eee;
+  border-radius: 3px;
+}
+.devtools-tooltip.devtools-tooltip-panel .panel-arrowcontent {
+  /* If the tooltip uses a <panel> XUL element instead */
+  padding: 4px;
+}
+
+.devtools-tooltip-tiles {
+  background-color: #eee;
+  background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
+    linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
+  background-size: 20px 20px;
+  background-position: 0 0, 10px 10px;
+}
--- a/browser/themes/windows/devtools/debugger.css
+++ b/browser/themes/windows/devtools/debugger.css
@@ -12,16 +12,23 @@
 #sources-pane {
   min-width: 50px;
 }
 
 #sources-and-editor-splitter {
   -moz-border-start-color: transparent;
 }
 
+/* Sources toolbar */
+
+#sources-toolbar {
+  border: none; /* Remove the devtools-toolbar's black bottom border. */
+  -moz-border-end: 1px solid #222426; /* Match the sources list's dark margin. */
+}
+
 #pretty-print {
   min-width: 0;
   font-weight: bold;
 }
 
 #black-box {
   list-style-image: url(debugger-blackbox.png);
   -moz-image-region: rect(0px,16px,16px,0px);
@@ -435,8 +442,13 @@
 
 #body[layout=vertical] .side-menu-widget-container {
   box-shadow: none !important;
 }
 
 #body[layout=vertical] .side-menu-widget-item-arrow {
   background-image: none !important;
 }
+
+#body[layout=vertical] .side-menu-widget-group,
+#body[layout=vertical] .side-menu-widget-item {
+  -moz-margin-end: 0;
+}
--- a/browser/themes/windows/devtools/widgets.css
+++ b/browser/themes/windows/devtools/widgets.css
@@ -278,24 +278,38 @@
   color: #fff;
 }
 
 .side-menu-widget-container[theme="light"] {
   background: #fff;
   color: #000;
 }
 
+/* SideMenuWidget container */
+
 .side-menu-widget-container[with-arrows=true]:-moz-locale-dir(ltr) {
   box-shadow: inset -1px 0 0 #222426;
 }
 
 .side-menu-widget-container[with-arrows=true]:-moz-locale-dir(rtl) {
   box-shadow: inset 1px 0 0 #222426;
 }
 
+.side-menu-widget-container[with-arrows=true] .side-menu-widget-group {
+  /* To allow visibility of the dark margin shadow. */
+  -moz-margin-end: 1px;
+}
+
+.side-menu-widget-container[with-arrows=true] .side-menu-widget-item {
+  /* To compensate for the arrow image's dark margin. */
+  -moz-margin-end: -1px;
+}
+
+/* SideMenuWidget groups */
+
 .side-menu-widget-group-title {
   padding: 4px;
 }
 
 .side-menu-widget-group-title[theme="dark"] {
   background-image: linear-gradient(#1f3e4f, #1b3243);
   text-shadow: 0 -1px 0 hsla(210,8%,5%,.45);
   box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
@@ -307,16 +321,18 @@
   background-image: linear-gradient(#fff, #eee);
 }
 
 .side-menu-widget-group-checkbox {
   margin: 0;
   padding: 0;
 }
 
+/* SideMenuWidget items */
+
 .side-menu-widget-item[theme="dark"] {
   border-top: 1px solid hsla(210,8%,5%,.25);
   border-bottom: 1px solid hsla(210,16%,76%,.1);
   margin-top: -1px;
   margin-bottom: -1px;
 }
 
 .side-menu-widget-item[theme="light"] {
@@ -342,25 +358,27 @@
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow {
   background-size: auto, 1px 100%;
   background-repeat: no-repeat;
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow:-moz-locale-dir(ltr) {
-  background-image: url(itemArrow-ltr.png), linear-gradient(to right, black, black);
+  background-image: url(itemArrow-ltr.png), linear-gradient(to right, #222426, #222426);
   background-position: center right, top right;
 }
 
 .side-menu-widget-item.selected > .side-menu-widget-item-arrow:-moz-locale-dir(rtl) {
-  background-image: url(itemArrow-rtl.png), linear-gradient(to right, black, black);
+  background-image: url(itemArrow-rtl.png), linear-gradient(to right, #222426, #222426);
   background-position: center left, top left;
 }
 
+/* SideMenuWidget items contents */
+
 .side-menu-widget-item-label {
   padding: 4px 0px;
 }
 
 .side-menu-widget-item-arrow {
   -moz-margin-start: -8px;
   width: 8px;
 }
@@ -383,16 +401,18 @@
 .side-menu-widget-item-other:first-of-type {
   border-top-left-radius: 4px;
 }
 
 .side-menu-widget-item-other > label {
   color: #f5f7fa;
 }
 
+/* SideMenuWidget misc */
+
 .side-menu-widget-empty-notice-container {
   padding: 12px;
 }
 
 .side-menu-widget-empty-notice-container[theme="dark"] {
   background: url(background-noise-toolbar.png), hsl(208,11%,27%);
   font-weight: 600;
   color: #fff;
--- a/build/annotationProcessors/Makefile.in
+++ b/build/annotationProcessors/Makefile.in
@@ -1,25 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-JAVA_JAR_TARGETS += annotationProcessors
-annotationProcessors_DEST := annotationProcessors.jar
-annotationProcessors_JAVAFILES := \
-  AnnotationProcessor.java \
-  CodeGenerator.java \
-  MethodWithAnnotationInfo.java \
-  classloader/IterableJarLoadingURLClassLoader.java \
-  classloader/JarClassIterator.java \
-  utils/AlphabeticMethodComparator.java \
-  utils/GeneratableEntryPointIterator.java \
-  utils/Utils.java \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 JAVA_CLASSPATH := $(ANDROID_SDK)/android.jar
 
 # Include Android specific java flags, instead of what's in rules.mk.
 include $(topsrcdir)/config/android-common.mk
 
 libs:: annotationProcessors.jar
--- a/build/annotationProcessors/moz.build
+++ b/build/annotationProcessors/moz.build
@@ -1,5 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+jar = add_java_jar('annotationProcessors')
+jar.sources += [
+    'AnnotationProcessor.java',
+    'CodeGenerator.java',
+    'MethodWithAnnotationInfo.java',
+    'classloader/IterableJarLoadingURLClassLoader.java',
+    'classloader/JarClassIterator.java',
+    'utils/AlphabeticMethodComparator.java',
+    'utils/GeneratableEntryPointIterator.java',
+    'utils/Utils.java',
+]
--- a/build/stlport/Makefile.in
+++ b/build/stlport/Makefile.in
@@ -1,14 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULES = stlport
-FORCE_STATIC_LIB = 1
 STL_FLAGS =
 
 # Force to build a static library, instead of a fake library, without
 # installing it in dist/lib.
 LIBRARY = $(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
 
 VPATH += $(srcdir)/src
 
--- a/build/stlport/moz.build
+++ b/build/stlport/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LIBRARY_NAME = 'stlport_static'
 
+FORCE_STATIC_LIB = True
--- a/build/unix/stdc++compat/Makefile.in
+++ b/build/unix/stdc++compat/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 STL_FLAGS =
 NO_EXPAND_LIBS = 1
 NO_PROFILE_GUIDED_OPTIMIZE = 1
 
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
 HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_HOST_VERSION)
--- a/build/unix/stdc++compat/moz.build
+++ b/build/unix/stdc++compat/moz.build
@@ -11,8 +11,9 @@ if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION'
     SOURCES += ['stdc++compat.cpp']
 
 if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
     HOST_LIBRARY_NAME = 'host_stdc++compat'
     HOST_SOURCES += [
         'stdc++compat.cpp',
     ]
 
+FORCE_STATIC_LIB = True
--- a/config/config.mk
+++ b/config/config.mk
@@ -36,22 +36,24 @@ endif
 _MOZBUILD_EXTERNAL_VARIABLES := \
   ANDROID_GENERATED_RESFILES \
   ANDROID_RESFILES \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
+  FORCE_STATIC_LIB \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   IS_COMPONENT \
+  JAVA_JAR_TARGETS \
   JS_MODULES_PATH \
   LIBRARY_NAME \
   LIBXUL_LIBRARY \
   MODULE \
   MSVC_ENABLE_PGO \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
   SDK_HEADERS \
--- a/content/base/src/CSPUtils.jsm
+++ b/content/base/src/CSPUtils.jsm
@@ -981,17 +981,16 @@ CSPSourceList.fromString = function(aStr
 
     // if a source allows unsafe-eval, set our flag to indicate this.
     if (src._allowUnsafeEval)
       slObj._allowUnsafeEval = true;
 
     // if a source is a *, then we can permit all sources
     if (src.permitAll) {
       slObj._permitAllSources = true;
-      return slObj;
     } else {
       slObj._sources.push(src);
     }
   }
 
   return slObj;
 };
 
--- a/content/base/src/nsMixedContentBlocker.cpp
+++ b/content/base/src/nsMixedContentBlocker.cpp
@@ -338,64 +338,95 @@ nsMixedContentBlocker::ShouldLoad(uint32
       NS_FAILED(NS_URIChainHasFlags(aContentLocation, nsIProtocolHandler::URI_SAFE_TO_LOAD_IN_SECURE_CONTEXT, &schemeSecure))) {
     return NS_ERROR_FAILURE;
   }
 
   if (schemeLocal || schemeNoReturnData || schemeInherits || schemeSecure) {
      return NS_OK;
   }
 
-  // We need aRequestingLocation to pull out the scheme. If it isn't passed
-  // in, get it from the aRequestingPricipal
-  if (!aRequestingLocation) {
-    if (!aRequestPrincipal) {
-      // If we don't have aRequestPrincipal, try getting it from the
-      // DOM node using aRequestingContext
-      nsCOMPtr<nsINode> node = do_QueryInterface(aRequestingContext);
-      if (node) {
-        aRequestPrincipal = node->NodePrincipal();
-      } else {
-        // Try using the window's script object principal if it's not a node.
-        nsCOMPtr<nsIScriptObjectPrincipal> scriptObjPrin = do_QueryInterface(aRequestingContext);
-        if (scriptObjPrin) {
-          aRequestPrincipal = scriptObjPrin->GetPrincipal();
-        }
-      }
+  // Since there are cases where aRequestingLocation and aRequestPrincipal are
+  // definitely not the owning document, we try to ignore them by extracting the
+  // requestingLocation in the following order:
+  // 1) from the aRequestingContext, either extracting
+  //    a) the node's principal, or the
+  //    b) script object's principal.
+  // 2) if aRequestingContext yields a principal but no location, we check
+  //    if its the system principal. If it is, allow the load.
+  // 3) Special case handling for:
+  //    a) speculative loads, where shouldLoad is called twice (bug 839235)
+  //       and the first speculative load does not include a context.
+  //       In this case we use aRequestingLocation to set requestingLocation.
+  //    b) TYPE_CSP_REPORT which does not provide a context. In this case we
+  //       use aRequestingLocation to set requestingLocation.
+  //    c) content scripts from addon code that do not provide aRequestingContext
+  //       or aRequestingLocation, but do provide aRequestPrincipal.
+  //       If aRequestPrincipal is an expanded principal, we allow the load.
+  // 4) If we still end up not having a requestingLocation, we reject the load.
+
+  nsCOMPtr<nsIPrincipal> principal;
+  // 1a) Try to get the principal if aRequestingContext is a node.
+  nsCOMPtr<nsINode> node = do_QueryInterface(aRequestingContext);
+  if (node) {
+    principal = node->NodePrincipal();
+  }
+
+  // 1b) Try using the window's script object principal if it's not a node.
+  if (!principal) {
+    nsCOMPtr<nsIScriptObjectPrincipal> scriptObjPrin = do_QueryInterface(aRequestingContext);
+    if (scriptObjPrin) {
+      principal = scriptObjPrin->GetPrincipal();
     }
-    if (aRequestPrincipal) {
-      nsCOMPtr<nsIURI> principalUri;
-      nsresult rvalue = aRequestPrincipal->GetURI(getter_AddRefs(principalUri));
-      if (NS_SUCCEEDED(rvalue)) {
-        aRequestingLocation = principalUri;
-      }
+  }
+
+  nsCOMPtr<nsIURI> requestingLocation;
+  if (principal) {
+    principal->GetURI(getter_AddRefs(requestingLocation));
+  }
+
+  // 2) if aRequestingContext yields a principal but no location, we check if its a system principal.
+  if (principal && !requestingLocation) {
+    if (nsContentUtils::IsSystemPrincipal(principal)) {
+      *aDecision = ACCEPT;
+      return NS_OK;
     }
+  }
 
-    if (!aRequestingLocation) {
-      // If content scripts from an addon are causing this load, they have an
-      // ExpandedPrincipal instead of a Principal. This is pseudo-privileged code, so allow
-      // the load. Or if this is system principal, allow the load.
-      nsCOMPtr<nsIExpandedPrincipal> expanded = do_QueryInterface(aRequestPrincipal);
-      if (expanded || (aRequestPrincipal && nsContentUtils::IsSystemPrincipal(aRequestPrincipal))) {
-        *aDecision = ACCEPT;
-        return NS_OK;
-      } else {
-        // We still don't have a requesting location and there is no Expanded Principal.
-        // We can't tell if this is a mixed content load.  Deny to be safe.
-        *aDecision = REJECT_REQUEST;
-        return NS_OK;
-      }
+  // 3a,b) Special case handling for speculative loads and TYPE_CSP_REPORT. In
+  // such cases, aRequestingContext doesn't exist, so we use aRequestingLocation.
+  // Unfortunately we can not distinguish between speculative and normal loads here,
+  // otherwise we could special case this assignment.
+  if (!requestingLocation) {
+    requestingLocation = aRequestingLocation;
+  }
+
+  // 3c) Special case handling for content scripts from addons code, which only
+  // provide a aRequestPrincipal; aRequestingContext and aRequestingLocation are
+  // both null; if the aRequestPrincipal is an expandedPrincipal, we allow the load.
+  if (!principal && !requestingLocation && aRequestPrincipal) {
+    nsCOMPtr<nsIExpandedPrincipal> expanded = do_QueryInterface(aRequestPrincipal);
+    if (expanded) {
+      *aDecision = ACCEPT;
+      return NS_OK;
     }
   }
 
+  // 4) Giving up. We still don't have a requesting location, therefore we can't tell
+  //    if this is a mixed content load. Deny to be safe.
+  if (!requestingLocation) {
+    *aDecision = REJECT_REQUEST;
+    return NS_OK;
+  }
+
   // Check the parent scheme. If it is not an HTTPS page then mixed content
   // restrictions do not apply.
   bool parentIsHttps;
-  nsresult rv = aRequestingLocation->SchemeIs("https", &parentIsHttps);
+  nsresult rv = requestingLocation->SchemeIs("https", &parentIsHttps);
   if (NS_FAILED(rv)) {
-    NS_ERROR("aRequestingLocation->SchemeIs failed");
+    NS_ERROR("requestingLocation->SchemeIs failed");
     *aDecision = REJECT_REQUEST;
     return NS_OK;
   }
   if (!parentIsHttps) {
     *aDecision = ACCEPT;
     return NS_OK;
   }
 
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_none.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html>
+  <head>
+    <!-- file_CSP.sjs mocks a resource load -->
+    <link rel='stylesheet' type='text/css'
+          href='file_CSP.sjs?testid=noneExternalStylesBlocked&type=text/css' />
+  </head>
+  <body>
+    <p id="inline-style">This should be green</p>
+    <p id="inline-script">This should be black</p>
+    <style>
+      p#inline-style { color:rgb(0, 128, 0); }
+    </style>
+    <script>
+      // Use inline script to set a style attribute
+      document.getElementById("inline-script").style.color = "rgb(0, 128, 0)";
+    </script>
+    <img src="file_CSP.sjs?testid=noneExternalImgLoaded&type=img/png" />
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_none.html^headers^
@@ -0,0 +1,1 @@
+Content-Security-Policy: default-src * ; style-src 'none' 'unsafe-inline';
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_star.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+  <head>
+    <link rel='stylesheet' type='text/css'
+          href='file_CSP.sjs?testid=starExternalStylesLoaded&type=text/css' />
+  </head>
+  <body>
+    <p id="inline-style">This should be green</p>
+    <p id="inline-script">This should be black</p>
+    <style>
+      p#inline-style { color:rgb(0, 128, 0); }
+    </style>
+    <script>
+      // Use inline script to set a style attribute
+      document.getElementById("inline-script").style.color = "rgb(0, 128, 0)";
+    </script>
+    <img src="file_CSP.sjs?testid=starExternalImgLoaded&type=img/png" />
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_star.html^headers^
@@ -0,0 +1,1 @@
+Content-Security-Policy: default-src *; style-src * 'unsafe-inline';
--- a/content/base/test/csp/mochitest.ini
+++ b/content/base/test/csp/mochitest.ini
@@ -73,24 +73,29 @@ support-files =
   file_csp_bug773891.html
   file_csp_bug773891.sjs
   file_csp_redirects_main.html
   file_csp_redirects_page.sjs
   file_csp_redirects_resource.sjs
   file_CSP_bug910139.sjs
   file_CSP_bug910139.xml
   file_CSP_bug910139.xsl
+  file_CSP_bug909029_star.html
+  file_CSP_bug909029_star.html^headers^
+  file_CSP_bug909029_none.html
+  file_CSP_bug909029_none.html^headers^
 
 [test_CSP.html]
 [test_CSP_bug663567.html]
 [test_CSP_bug802872.html]
 [test_CSP_bug885433.html]
 [test_CSP_bug888172.html]
 [test_CSP_bug916446.html]
 [test_CSP_evalscript.html]
 [test_CSP_evalscript_getCRMFRequest.html]
 [test_CSP_frameancestors.html]
 [test_CSP_inlinescript.html]
 [test_CSP_inlinestyle.html]
 [test_bothCSPheaders.html]
 [test_bug836922_npolicies.html]
 [test_csp_redirects.html]
 [test_CSP_bug910139.html]
+[test_CSP_bug909029.html]
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/test_CSP_bug909029.html
@@ -0,0 +1,140 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Bug 909029 - CSP source-lists ignore some source expressions like 'unsafe-inline' when * or 'none' are used (e.g., style-src, script-src)</title>
+    <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  </head>
+  <body>
+    <div id=content style="visibility:hidden">
+      <iframe id=testframe1></iframe>
+      <iframe id=testframe2></iframe>
+    </div>
+    <script class="testbody" type="text/javascript">
+SimpleTest.waitForExplicitFinish();
+
+window.tests = {
+  starExternalStylesLoaded: -1,
+  starExternalImgLoaded: -1,
+  noneExternalStylesBlocked: -1,
+  noneExternalImgLoaded: -1,
+  starInlineStyleAllowed: -1,
+  starInlineScriptBlocked: -1,
+  noneInlineStyleAllowed: -1,
+  noneInlineScriptBlocked: -1
+}
+
+function examiner() {
+  SpecialPowers.addObserver(this, "csp-on-violate-policy", false);
+  SpecialPowers.addObserver(this, "http-on-modify-request", false);
+}
+examiner.prototype  = {
+  observe: function(subject, topic, data) {
+    // subject should be an nsURI, and should be either allowed or blocked.
+    if (!SpecialPowers.can_QI(subject))
+      return;
+
+    var testpat = new RegExp("testid=([a-zA-Z]+)");
+
+    if (topic === "http-on-modify-request") {
+      //these things were allowed by CSP
+      var asciiSpec = SpecialPowers.getPrivilegedProps(SpecialPowers.do_QueryInterface(subject, "nsIHttpChannel"), "URI.asciiSpec");
+      if (!testpat.test(asciiSpec))
+        return;
+      var testid = testpat.exec(asciiSpec)[1];
+      window.testResult(testid,
+                        /Loaded/.test(testid),
+                        "resource loaded");
+    }
+
+    if(topic === "csp-on-violate-policy") {
+      // these were blocked... record that they were blocked
+      // try because the subject could be an nsIURI or an nsISupportsCString
+      try {
+        var asciiSpec = SpecialPowers.getPrivilegedProps(SpecialPowers.do_QueryInterface(subject, "nsIURI"), "asciiSpec");
+        if (!testpat.test(asciiSpec)) return;
+        var testid = testpat.exec(asciiSpec)[1];
+        window.testResult(testid,
+                          /Blocked/.test(testid),
+                          "resource blocked by CSP");
+      } catch(e) {
+        // if that fails, the subject is probably a string. Strings are only
+        // reported for inline and eval violations. Since we are testing those
+        // via the observed effects of script on CSSOM, we can simply ignore
+        // these subjects.
+      }
+    }
+  },
+
+  // must eventually call this to remove the listener,
+  // or mochitests might get borked.
+  remove: function() {
+    SpecialPowers.removeObserver(this, "csp-on-violate-policy");
+    SpecialPowers.removeObserver(this, "http-on-modify-request");
+  }
+}
+
+window.examiner = new examiner();
+
+window.testResult = function(testname, result, msg) {
+  //dump("in testResult: testname = " + testname + "\n");
+
+  //test already complete.... forget it... remember the first result.
+  if (window.tests[testname] != -1)
+    return;
+
+  window.tests[testname] = result;
+  is(result, true, testname + ' test: ' + msg);
+
+  // if any test is incomplete, keep waiting
+  for (var v in window.tests)
+    if(tests[v] == -1)
+      return;
+
+  // ... otherwise, finish
+  window.examiner.remove();
+  SimpleTest.finish();
+}
+
+// Helpers for inline script/style checks
+var black = 'rgb(0, 0, 0)';
+var green = 'rgb(0, 128, 0)';
+function getElementColorById(doc, id) {
+  return window.getComputedStyle(doc.contentDocument.getElementById(id)).color;
+}
+
+function checkInlineWithStar() {
+  var testframe = document.getElementById('testframe1');
+  window.testResult("starInlineStyleAllowed",
+                    getElementColorById(testframe, 'inline-style') === green,
+                    "Inline styles should be allowed (style-src 'unsafe-inline' with star)");
+  window.testResult("starInlineScriptBlocked",
+                    getElementColorById(testframe, 'inline-script') === black,
+                    "Inline scripts should be blocked (style-src 'unsafe-inline' with star)");
+}
+
+function checkInlineWithNone() {
+  // If a directive has 'none' in addition to other sources, 'none' is ignored
+  // and the other sources are used. 'none' is only a valid source if it is
+  // used by itself.
+  var testframe = document.getElementById('testframe2');
+  window.testResult("noneInlineStyleAllowed",
+                    getElementColorById(testframe, 'inline-style') === green,
+                    "Inline styles should be allowed (style-src 'unsafe-inline' with none)");
+  window.testResult("noneInlineScriptBlocked",
+                    getElementColorById(testframe, 'inline-script') === black,
+                    "Inline scripts should be blocked (style-src 'unsafe-inline' with none)");
+}
+
+SpecialPowers.pushPrefEnv(
+  {'set':[["security.csp.speccompliant", true]]},
+  function () {
+    document.getElementById('testframe1').src = 'file_CSP_bug909029_star.html';
+    document.getElementById('testframe1').addEventListener('load', checkInlineWithStar, false);
+    document.getElementById('testframe2').src = 'file_CSP_bug909029_none.html';
+    document.getElementById('testframe2').addEventListener('load', checkInlineWithNone, false);
+  }
+);
+    </script>
+  </body>
+</html>
--- a/content/media/omx/mediaresourcemanager/Makefile.in
+++ b/content/media/omx/mediaresourcemanager/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= \
 	        -I$(srcdir)/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/binder/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/utils/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/media/ \
--- a/content/media/omx/mediaresourcemanager/moz.build
+++ b/content/media/omx/mediaresourcemanager/moz.build
@@ -13,8 +13,9 @@ SOURCES += [
     'MediaResourceManagerClient.cpp',
     'MediaResourceManagerService.cpp',
 ]
 
 LIBRARY_NAME = 'mediaresourcemanager'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+FORCE_STATIC_LIB = True
--- a/db/sqlite3/src/Makefile.in
+++ b/db/sqlite3/src/Makefile.in
@@ -1,17 +1,15 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SHORT_LIBNAME    = mozsqlt3
-ifdef MOZ_FOLD_LIBS
-FORCE_STATIC_LIB = 1
-else
+ifndef MOZ_FOLD_LIBS
 FORCE_SHARED_LIB = 1
 endif
 VISIBILITY_FLAGS =
 LIB_IS_C_ONLY    = 1
 
 ifeq ($(OS_ARCH),WINNT)
 DEFFILE = $(CURDIR)/sqlite-processed.def
 RCFILE  = sqlite.rc
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -11,8 +11,10 @@ EXPORTS += [
 ]
 
 LIBRARY_NAME = 'mozsqlite3'
 
 SOURCES += [
     'sqlite3.c',
 ]
 
+if CONFIG['MOZ_FOLD_LIBS']:
+    FORCE_STATIC_LIB = True
--- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
@@ -712,16 +712,17 @@ static cairo_status_t
     bi.bmiHeader.biClrImportant = 0;
 
     m = pattern->base.matrix;
     status = cairo_matrix_invert (&m);
     /* _cairo_pattern_set_matrix guarantees invertibility */
     assert (status == CAIRO_STATUS_SUCCESS);
 
     cairo_matrix_multiply (&m, &m, &surface->gdi_ctm);
+    cairo_matrix_multiply(&m, &m, &surface->ctm);
     SaveDC (surface->dc);
     _cairo_matrix_to_win32_xform (&m, &xform);
 
     if (! SetWorldTransform (surface->dc, &xform)) {
 	status = _cairo_win32_print_gdi_error ("_cairo_win32_printing_surface_paint_image_pattern");
 	goto CLEANUP_OPAQUE_IMAGE;
     }
 
--- a/gfx/graphite2/src/Makefile.in
+++ b/gfx/graphite2/src/Makefile.in
@@ -12,17 +12,16 @@ else
 endif
 
 # get the lists of source files and exported headers
 include $(srcdir)/files.mk
 
 # on Windows, we're going to link graphite with gkmedias instead of libxul
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
-FORCE_STATIC_LIB = 1
 endif
 
 ifeq (WINNT,$(OS_TARGET))
 DEFINES += -DGRAPHITE2_EXPORTING
 else
 # tell graphite2 not to export symbols, we'll be linking it directly with thebes
 DEFINES += -DGRAPHITE2_STATIC
 endif
--- a/gfx/graphite2/src/moz.build
+++ b/gfx/graphite2/src/moz.build
@@ -1,21 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'graphite2'
 
-if CONFIG['OS_TARGET'] != 'WINNT':
-    LIBXUL_LIBRARY = True
+if CONFIG['OS_TARGET'] == 'WINNT':
+    FORCE_STATIC_LIB = True
 else:
-    # FORCE_STATIC_LIB = True
-    pass
+    LIBXUL_LIBRARY = True
 
 # This should contain all of the _PUBLIC_HEADERS from files.mk
 EXPORTS.graphite2 += [
     '../include/graphite2/Font.h',
     '../include/graphite2/Log.h',
     '../include/graphite2/Segment.h',
     '../include/graphite2/Types.h',
 ]
--- a/gfx/harfbuzz/src/Makefile.in
+++ b/gfx/harfbuzz/src/Makefile.in
@@ -19,21 +19,16 @@
 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 # FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 # ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 # PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
 # Mozilla author(s): Jonathan Kew
 #
 
-
-ifeq ($(OS_ARCH),WINNT)
-FORCE_STATIC_LIB = 1
-endif
-
 LOCAL_INCLUDES  += -I$(srcdir) 
 
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DPACKAGE_VERSION="\"moz\""
 DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
 DEFINES += -DHAVE_OT=1 -DHB_NO_MT -DHB_NO_UNICODE_FUNCS
--- a/gfx/harfbuzz/src/moz.build
+++ b/gfx/harfbuzz/src/moz.build
@@ -1,21 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'harfbuzz'
 
-if CONFIG['OS_ARCH'] != 'WINNT':
-    LIBXUL_LIBRARY = True
+if CONFIG['OS_ARCH'] == 'WINNT':
+    FORCE_STATIC_LIB = True
 else:
-    # FORCE_STATIC_LIB = True
-    pass
+    LIBXUL_LIBRARY = True
 
 EXPORTS.harfbuzz += [
     'hb-blob.h',
     'hb-buffer.h',
     'hb-common.h',
     'hb-deprecated.h',
     'hb-face.h',
     'hb-font.h',
--- a/gfx/ots/src/Makefile.in
+++ b/gfx/ots/src/Makefile.in
@@ -22,17 +22,16 @@
 # PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
 # Mozilla author(s): Jonathan Kew
 #
 
 
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
-FORCE_STATIC_LIB = 1
 endif
 
 CSRCS =   \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DPACKAGE_VERSION="\"moz\""
--- a/gfx/ots/src/moz.build
+++ b/gfx/ots/src/moz.build
@@ -1,21 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'ots'
 
-if CONFIG['OS_TARGET'] != 'WINNT':
-    LIBXUL_LIBRARY = True
+if CONFIG['OS_TARGET'] == 'WINNT':
+    FORCE_STATIC_LIB = True
 else:
-    # FORCE_STATIC_LIB = True
-    pass
+    LIBXUL_LIBRARY = True
 
 EXPORTS += [
     '../include/opentype-sanitiser.h',
     '../include/ots-memory-stream.h',
 ]
 
 SOURCES += [
     'cff.cc',
--- a/gfx/thebes/gfxWindowsSurface.cpp
+++ b/gfx/thebes/gfxWindowsSurface.cpp
@@ -120,17 +120,17 @@ already_AddRefed<gfxASurface>
 gfxWindowsSurface::CreateSimilarSurface(gfxContentType aContent,
                                         const gfxIntSize& aSize)
 {
     if (!mSurface || !mSurfaceValid) {
         return nullptr;
     }
 
     cairo_surface_t *surface;
-    if (GetContentType() == GFX_CONTENT_COLOR_ALPHA) {
+    if (!mForPrinting && GetContentType() == GFX_CONTENT_COLOR_ALPHA) {
         // When creating a similar surface to a transparent surface, ensure
         // the new surface uses a DIB. cairo_surface_create_similar won't
         // use  a DIB for a GFX_CONTENT_COLOR surface if this surface doesn't
         // have a DIB (e.g. if we're a transparent window surface). But
         // we need a DIB to perform well if the new surface is composited into
         // a surface that's the result of create_similar(GFX_CONTENT_COLOR_ALPHA)
         // (e.g. a backbuffer for the window) --- that new surface *would*
         // have a DIB.
--- a/intl/unicharutil/util/Makefile.in
+++ b/intl/unicharutil/util/Makefile.in
@@ -5,17 +5,16 @@
 
 # This makefile builds the unicharutil_external_s library which should be used
 # by frozen (dependent) linkage components. Internal-linkage code should use
 # unicharutil_s which is built in the internal/ subdirectory.
 
 DIST_INSTALL = 1
 SDK_LIBRARY = $(LIBRARY)
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef _MSC_VER
 # Don't include directives about which CRT to use
--- a/intl/unicharutil/util/internal/Makefile.in
+++ b/intl/unicharutil/util/internal/Makefile.in
@@ -8,11 +8,9 @@
 # unicharutil_external_s.
 
 DIST_INSTALL = 1
 MOZILLA_INTERNAL_API = 1
 
 LOCAL_INCLUDES	+= -I$(srcdir)/.. \
   -I$(srcdir)/../../src
 
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
--- a/intl/unicharutil/util/internal/moz.build
+++ b/intl/unicharutil/util/internal/moz.build
@@ -9,8 +9,9 @@ MODULE = 'unicharutil'
 include('../objs.mozbuild')
 
 SOURCES += intl_unicharutil_util_cppsrcs
 
 LIBRARY_NAME = 'unicharutil_s'
 
 EXPORT_LIBRARY = True
 
+FORCE_STATIC_LIB = True
--- a/intl/unicharutil/util/moz.build
+++ b/intl/unicharutil/util/moz.build
@@ -16,8 +16,10 @@ EXPORTS += [
     'nsUnicodeScriptCodes.h',
 ]
 
 include('objs.mozbuild')
 
 SOURCES += intl_unicharutil_util_cppsrcs
 
 LIBRARY_NAME = 'unicharutil_external_s'
+
+FORCE_STATIC_LIB = True
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -26,17 +26,16 @@ LIBS		= $(NSPR_LIBS)
 # and then the static data cells used for locking no longer work.
 #
 # In fact, we now build both a static and a shared library, as the
 # JS shell would like to link to the static library.
 
 ifdef JS_SHARED_LIBRARY
 FORCE_SHARED_LIB = 1
 endif
-FORCE_STATIC_LIB = 1
 DIST_INSTALL = 1
 
 ###############################################
 # BEGIN include sources for low-level code shared with mfbt
 #
 MFBT_ROOT = $(srcdir)/../../mfbt
 VPATH += $(MFBT_ROOT)
 include $(MFBT_ROOT)/exported_headers.mk
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -36,22 +36,24 @@ endif
 _MOZBUILD_EXTERNAL_VARIABLES := \
   ANDROID_GENERATED_RESFILES \
   ANDROID_RESFILES \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
+  FORCE_STATIC_LIB \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   IS_COMPONENT \
+  JAVA_JAR_TARGETS \
   JS_MODULES_PATH \
   LIBRARY_NAME \
   LIBXUL_LIBRARY \
   MODULE \
   MSVC_ENABLE_PGO \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
   SDK_HEADERS \
--- a/js/src/editline/Makefile.in
+++ b/js/src/editline/Makefile.in
@@ -1,10 +1,8 @@
 # -*- Mode: makefile -*-
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 DEFINES += -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX \
 	-DHAVE_STDLIB -DUNIQUE_HISTORY
--- a/js/src/editline/moz.build
+++ b/js/src/editline/moz.build
@@ -6,8 +6,9 @@
 
 LIBRARY_NAME = 'editline'
 
 SOURCES += [
     'editline.c',
     'sysunix.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -2353,18 +2353,23 @@ CodeGenerator::visitCallDirectEval(LCall
 
     return callVM(DirectEvalInfo, lir);
 }
 
 // Registers safe for use before generatePrologue().
 static const uint32_t EntryTempMask = Registers::TempMask & ~(1 << OsrFrameReg.code());
 
 bool
-CodeGenerator::generateArgumentsChecks()
-{
+CodeGenerator::generateArgumentsChecks(bool bailout)
+{
+    // This function can be used the normal way to check the argument types,
+    // before entering the function and bailout when arguments don't match.
+    // For debug purpose, this is can also be used to force/check that the
+    // arguments are correct. Upon fail it will hit a breakpoint.
+
     MIRGraph &mir = gen->graph();
     MResumePoint *rp = mir.entryResumePoint();
 
     // Reserve the amount of stack the actual frame will use. We have to undo
     // this before falling through to the method proper though, because the
     // monomorphic call case will bypass this entire path.
     masm.reserveStack(frameSize());
 
@@ -2384,18 +2389,28 @@ CodeGenerator::generateArgumentsChecks()
         // Calculate the offset on the stack of the argument.
         // (i - info.startArgSlot())    - Compute index of arg within arg vector.
         // ... * sizeof(Value)          - Scale by value size.
         // ArgToStackOffset(...)        - Compute displacement within arg vector.
         int32_t offset = ArgToStackOffset((i - info.startArgSlot()) * sizeof(Value));
         masm.guardTypeSet(Address(StackPointer, offset), types, temp, &miss);
     }
 
-    if (miss.used() && !bailoutFrom(&miss, graph.entrySnapshot()))
-        return false;
+    if (miss.used()) {
+        if (bailout) {
+            if (!bailoutFrom(&miss, graph.entrySnapshot()))
+                return false;
+        } else {
+            Label success;
+            masm.jump(&success);
+            masm.bind(&miss);
+            masm.breakpoint();
+            masm.bind(&success);
+        }
+    }
 
     masm.freeStack(frameSize());
 
     return true;
 }
 
 // Out-of-line path to report over-recursed error and fail.
 class CheckOverRecursedFailure : public OutOfLineCodeBase<CodeGenerator>
@@ -5674,16 +5689,22 @@ CodeGenerator::generate()
     setSkipArgCheckEntryOffset(masm.size());
 
 #if JS_TRACE_LOGGING
     masm.tracelogStart(gen->info().script());
     masm.tracelogLog(TraceLogging::INFO_ENGINE_IONMONKEY);
     masm.bind(&skip);
 #endif
 
+#ifdef DEBUG
+    // Assert that the argument types are correct.
+    if (!generateArgumentsChecks(/* bailout = */ false))
+        return false;
+#endif
+
     if (!generatePrologue())
         return false;
     if (!generateBody())
         return false;
     if (!generateEpilogue())
         return false;
     if (!generateInvalidateEpilogue())
         return false;
--- a/js/src/jit/CodeGenerator.h
+++ b/js/src/jit/CodeGenerator.h
@@ -38,17 +38,17 @@ class OutOfLineStoreElementHole;
 class OutOfLineTypeOfV;
 class OutOfLineLoadTypedArray;
 class OutOfLineNewGCThingPar;
 class OutOfLineUpdateCache;
 class OutOfLineCallPostWriteBarrier;
 
 class CodeGenerator : public CodeGeneratorSpecific
 {
-    bool generateArgumentsChecks();
+    bool generateArgumentsChecks(bool bailout = true);
     bool generateBody();
 
   public:
     CodeGenerator(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm = nullptr);
     ~CodeGenerator();
 
   public:
     bool generate();
--- a/js/src/jit/IonMacroAssembler.cpp
+++ b/js/src/jit/IonMacroAssembler.cpp
@@ -155,16 +155,24 @@ MacroAssembler::guardObjectType(Register
         if (lastBranch.isInitialized())
             lastBranch.emit(*this);
 
         JSObject *object = types->getSingleObject(i);
         lastBranch = BranchGCPtr(Equal, obj, ImmGCPtr(object), &matched);
     }
 
     if (hasTypeObjects) {
+        // We are possibly going to overwrite the obj register. So already
+        // emit the branch, since branch depends on previous value of obj
+        // register and there is definitely a branch following. So no need
+        // to invert the condition.
+        if (lastBranch.isInitialized())
+            lastBranch.emit(*this);
+        lastBranch = BranchGCPtr();
+
         // Note: Some platforms give the same register for obj and scratch.
         // Make sure when writing to scratch, the obj register isn't used anymore!
         loadPtr(Address(obj, JSObject::offsetOfType()), scratch);
 
         for (unsigned i = 0; i < count; i++) {
             if (!types->getTypeObject(i))
                 continue;
 
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -2852,18 +2852,16 @@ class MToFloat32
             return false;
         return congruentIfOperandsEqual(ins);
     }
     AliasSet getAliasSet() const {
         return AliasSet::None();
     }
 
     void computeRange();
-    bool truncate();
-    bool isOperandTruncated(size_t index) const;
 
     bool canConsumeFloat32() const { return true; }
     bool canProduceFloat32() const { return true; }
 };
 
 // Converts a uint32 to a double (coming from asm.js).
 class MAsmJSUnsignedToDouble
   : public MUnaryInstruction
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -2091,30 +2091,16 @@ MToDouble::truncate()
     setResultType(MIRType_Int32);
     if (range())
         range()->wrapAroundToInt32();
 
     return true;
 }
 
 bool
-MToFloat32::truncate()
-{
-    JS_ASSERT(type() == MIRType_Float32);
-
-    // We use the return type to flag that this MToFloat32 sould be replaced by a
-    // MTruncateToInt32 when modifying the graph.
-    setResultType(MIRType_Int32);
-    if (range())
-        range()->wrapAroundToInt32();
-
-    return true;
-}
-
-bool
 MLoadTypedArrayElementStatic::truncate()
 {
     setInfallible();
     return false;
 }
 
 bool
 MDefinition::isOperandTruncated(size_t index) const
@@ -2156,24 +2142,16 @@ bool
 MToDouble::isOperandTruncated(size_t index) const
 {
     // The return type is used to flag that we are replacing this Double by a
     // Truncate of its operand if needed.
     return type() == MIRType_Int32;
 }
 
 bool
-MToFloat32::isOperandTruncated(size_t index) const
-{
-    // The return type is used to flag that we are replacing this Float32 by a
-    // Truncate of its operand if needed.
-    return type() == MIRType_Int32;
-}
-
-bool
 MStoreTypedArrayElement::isOperandTruncated(size_t index) const
 {
     return index == 2 && !isFloatArray();
 }
 
 bool
 MStoreTypedArrayElementHole::isOperandTruncated(size_t index) const
 {
--- a/js/src/jsworkers.cpp
+++ b/js/src/jsworkers.cpp
@@ -653,19 +653,19 @@ WorkerThread::handleAsmJSWorkload(Worker
         asmData->compileTime = (after - before) / PRMJ_USEC_PER_MSEC;
 
         success = true;
     } while(0);
     state.lock();
 
     // On failure, signal parent for harvesting in CancelOutstandingJobs().
     if (!success) {
-        asmData = nullptr;
         state.noteAsmJSFailure(asmData->func);
         state.notifyAll(WorkerThreadState::CONSUMER);
+        asmData = nullptr;
         return;
     }
 
     // On success, move work to the finished list.
     state.asmJSFinishedList.append(asmData);
     asmData = nullptr;
 
     // Notify the main thread in case it's blocked waiting for a LifoAlloc.
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -349,8 +349,10 @@ else:
     ]
 
 MSVC_ENABLE_PGO = True
 
 HOST_SOURCES += [
     'jskwgen.cpp',
     'jsoplengen.cpp',
 ]
+
+FORCE_STATIC_LIB = True
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -533,17 +533,17 @@ ArrayBufferObject::releaseAsmJSArrayBuff
 }
 #else  /* defined(JS_ION) && defined(JS_CPU_X64) */
 bool
 ArrayBufferObject::prepareForAsmJS(JSContext *cx, Handle<ArrayBufferObject*> buffer)
 {
     if (buffer->isAsmJSArrayBuffer())
         return true;
 
-    if (!buffer->copyData(cx))
+    if (!buffer->ensureNonInline(cx))
         return false;
     JS_ASSERT(buffer->hasDynamicElements());
 
     buffer->getElementsHeader()->setIsAsmJSArrayBuffer();
     return true;
 }
 
 void
--- a/js/xpconnect/tests/mochitest/file_asmjs.js
+++ b/js/xpconnect/tests/mochitest/file_asmjs.js
@@ -1,26 +1,71 @@
-function f(stdlib, foreign, buffer) {
+function f1() { "use asm"; function g() {} return g }
+if (this.jsFuns) {
+    ok(jsFuns.isAsmJSModule(f1), "f1 is an asm.js module");
+    ok(jsFuns.isAsmJSFunction(f1()), "f1.g is an asm.js function");
+}
+
+function f2(stdlib, foreign, buffer) {
     "use asm";
     var i32 = new stdlib.Int32Array(buffer);
     function main(n) {
         n = n|0;
         var i = 0, sum = 0;
         for (; (i|0) < (n|0); i=(i+1)|0)
             sum = (sum + (i32[(i<<2)>>2]|0))|0;
         return sum|0;
     }
     return main;
 }
-
-var i32 = new Int32Array(4096/4);
-for (var i = 0; i < 100; i++)
+if (this.jsFuns)
+    ok(jsFuns.isAsmJSModule(f2), "f2 is an asm.js module");
+var i32 = new Int32Array(1024);
+for (var i = 0; i < i32.length; i++)
     i32[i] = i;
+var f2Main = f2(this, null, i32.buffer);
+if (this.jsFuns)
+    ok(jsFuns.isAsmJSFunction(f2Main), "f2.main is an asm.js function");
+if (f2Main(4) !== 6)
+    throw "f2Main(4)";
+if (f2Main(100) !== 4950)
+    throw "f2.main(100)";
+var sum = (((i32.length - 1) * i32.length) / 2);
+if (f2Main(i32.length) !== sum)
+    throw "f2.main(" + i32.length + ")";
+if (f2Main(i32.length + 100) !== sum)
+    throw "f2.main(" + i32.length + ")";
 
-var fMain = f(this, null, i32.buffer);
-if (fMain(4) !== 6)
-    throw "f.main(4)";
-if (fMain(100) !== 4950)
-    throw "f.main(100)";
-if (fMain(5000) !== 4950)
-    throw "f.main(5000)";
+function f3(stdlib, foreign, buffer) {
+    "use asm";
+    var done = foreign.done;
+    var i32 = new stdlib.Int32Array(buffer);
+    function main() {
+        var i = 0, sum = 0;
+        while (1) {
+            for (i = 0; (i|0) < 1000; i=(i+1)|0)
+                sum = (sum + i)|0;
+            if (done(sum|0)|0)
+                break;
+        }
+        return sum|0;
+    }
+    return main;
+}
+var begin;
+var lastSum;
+function done(sum) {
+    if (sum !== ((lastSum + 499500)|0))
+        throw "bad sum: " + sum + ", " + lastSum + ", " + ((lastSum + 499500)|0);
+    lastSum = sum;
+    return (Date.now() - begin) > 3000;
+}
+var f3Main = f3(this, {done:done}, i32.buffer);
+if (this.jsFuns)
+    ok(jsFuns.isAsmJSFunction(f3Main), "f3.main is an asm.js function");
 
-postMessage("ok");
+begin = Date.now();
+lastSum = 0;
+if (f3Main() !== lastSum)
+    throw "f3.main()";
+
+if (!this.jsFuns)
+    postMessage("ok");
--- a/js/xpconnect/tests/mochitest/test_asmjs.html
+++ b/js/xpconnect/tests/mochitest/test_asmjs.html
@@ -5,75 +5,32 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <meta charset="utf-8">
   <title>asm.js browser tests</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=854209">asm.js browser tests</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
+  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=854209">asm.js browser tests</a>
+  <p id="display"></p>
+  <div id="content" style="display: none"></div>
+  <pre id="test"></pre>
 
-var jsFuns = SpecialPowers.Cu.getJSTestingFunctions();
-
-ok(jsFuns.isAsmJSCompilationAvailable());
-
-function f1() { "use asm"; function g() {} return g }
-ok(jsFuns.isAsmJSModule(f1), "f1 is an asm.js module");
-ok(jsFuns.isAsmJSFunction(f1()), "f1.g is an asm.js function");
+  <script>
+  var jsFuns = SpecialPowers.Cu.getJSTestingFunctions();
+  ok(jsFuns.isAsmJSCompilationAvailable());
+  </script>
 
-function f2(stdlib, foreign, buffer) {
-    "use asm";
-    var i32 = new stdlib.Int32Array(buffer);
-    function main(n) {
-        n = n|0;
-        var i = 0, sum = 0;
-        for (; (i|0) < (n|0); i=(i+1)|0)
-            sum = (sum + (i32[(i<<2)>>2]|0))|0;
-        return sum|0;
-    }
-    return main;
-}
-ok(jsFuns.isAsmJSModule(f2), "f2 is an asm.js module");
-var i32 = new Int32Array(4096/4);
-for (var i = 0; i < 100; i++)
-    i32[i] = i;
-var f2Main = f2(this, null, i32.buffer);
-ok(jsFuns.isAsmJSFunction(f2Main), "f2.main is an asm.js function");
-ok(f2Main(4) == 6, "f2.main(4)");
-ok(f2Main(100) == 4950, "f2.main(100)");
-ok(f2Main(5000) == 4950, "f2.main(5000)");
+  <script src="http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_asmjs.js"></script>
 
-function f3(stdlib, foreign, buffer) {
-    "use asm";
-    var i32 = new stdlib.Int32Array(buffer);
-    function main(n,o) {
-        n = n|0;
-        o = o|0;
-        var i = 0, j = 0, sum = 0;
-        for (i = 0; (i|0) < (n|0); i=(i+1)|0)
-            for (j = 0; (j|0) < (o|0); j=(j+1)|0)
-                sum = (sum + (i32[(j<<2)>>2]|0))|0;
-        return sum|0;
-    }
-    return main;
-}
-var f3Main = f3(this, null, i32.buffer);
-ok(jsFuns.isAsmJSFunction(f3Main), "f3.main is an asm.js function");
-ok(f3Main(200000, 1000) == ((4950*200000)|0), "f3.main(200000, 1000)");
+  <script>
+  var w = new Worker('http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_asmjs.js');
+  w.onmessage = function(e) {
+      ok(e.data === "ok", "Worker asm.js tests");
+      SimpleTest.finish();
+  }
 
-var w = new Worker('http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_asmjs.js');
-w.onmessage = function(e) {
-    ok(e.data === "ok", "Worker asm.js tests");
-    SimpleTest.finish();
-}
+  SimpleTest.waitForExplicitFinish();
+  </script>
 
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
 </body>
 </html>
--- a/media/libcubeb/src/Makefile.in
+++ b/media/libcubeb/src/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq ($(OS_TARGET),WINNT)
 VISIBILITY_FLAGS =
 endif
 
 ifeq ($(OS_TARGET),WINNT)
 DEFINES         += -DUSE_WINMM -DUSE_WASAPI
 endif
 
--- a/media/libcubeb/src/moz.build
+++ b/media/libcubeb/src/moz.build
@@ -46,8 +46,9 @@ if CONFIG['OS_TARGET'] == 'Android':
         SOURCES += [
             'cubeb_audiotrack.c',
         ]
 
 LIBRARY_NAME = 'cubeb'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libjpeg/Makefile.in
+++ b/media/libjpeg/Makefile.in
@@ -11,17 +11,14 @@ AS=$(LIBJPEG_TURBO_AS)
 ASM_SUFFIX=asm
 ASFLAGS=$(LIBJPEG_TURBO_ASFLAGS) -I$(topsrcdir)/media/libjpeg/simd/
 
 ifeq ($(AS),yasm)
   # yasm doesn't like -c
   AS_DASH_C_FLAG=
 endif
 
-# need static lib for some of the libimg componentry to link properly
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 jpeg_nbits_table.h: $(srcdir)/genTables.py
 	$(PYTHON) $(srcdir)/genTables.py
 
 jchuff.$(OBJ_SUFFIX): jpeg_nbits_table.h
--- a/media/libjpeg/moz.build
+++ b/media/libjpeg/moz.build
@@ -145,8 +145,10 @@ else: # No SIMD support?
     SOURCES += [
         'jsimd_none.c',
     ]
 
 LIBRARY_NAME = 'mozjpeg'
 
 MSVC_ENABLE_PGO = True
 
+# need static lib for some of the libimg componentry to link properly
+FORCE_STATIC_LIB = True
--- a/media/libnestegg/src/Makefile.in
+++ b/media/libnestegg/src/Makefile.in
@@ -1,8 +1,7 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
--- a/media/libnestegg/src/moz.build
+++ b/media/libnestegg/src/moz.build
@@ -10,8 +10,9 @@ SOURCES += [
     'halloc.c',
     'nestegg.c',
 ]
 
 LIBRARY_NAME = 'nestegg'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libogg/src/Makefile.in
+++ b/media/libogg/src/Makefile.in
@@ -1,8 +1,7 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
--- a/media/libogg/src/moz.build
+++ b/media/libogg/src/moz.build
@@ -10,8 +10,9 @@ SOURCES += [
     'ogg_bitwise.c',
     'ogg_framing.c',
 ]
 
 LIBRARY_NAME = 'ogg'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libopus/Makefile.in
+++ b/media/libopus/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
-
 DEFINES += \
   -DOPUS_BUILD \
   -DOPUS_VERSION='"v1.1-beta-23-gf2446c2-mozilla"' \
   -DUSE_ALLOCA \
   $(NULL)
 
 ifneq ($(filter $(OS_ARCH),Linux Darwin DragonFly FreeBSD NetBSD OpenBSD),)
   DEFINES += -DHAVE_LRINTF
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -12,8 +12,9 @@ EXPORTS.opus += [
     'include/opus_multistream.h',
     'include/opus_types.h',
 ]
 
 LIBRARY_NAME = 'opus'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libpng/Makefile.in
+++ b/media/libpng/Makefile.in
@@ -1,9 +1,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/.
 
-FORCE_STATIC_LIB= 1
 ifeq ($(OS_ARCH),WINNT)
 VISIBILITY_FLAGS=
 endif
--- a/media/libpng/moz.build
+++ b/media/libpng/moz.build
@@ -44,8 +44,9 @@ if CONFIG['MOZ_PNG_ARM_NEON']:
     SOURCES += [
         'arm/filter_neon.S'
     ]
 
 LIBRARY_NAME = 'mozpng'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libspeex_resampler/src/Makefile.in
+++ b/media/libspeex_resampler/src/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 # We don't compile the full speex codec, only the resampler.
 DEFINES += -DOUTSIDE_SPEEX
 # Speex wants a random prefix when building in another program, to avoid name
 # clashes
 DEFINES += -DRANDOM_PREFIX=speex
 # We don't use -fvisibility=hidden
 DEFINES += -DSPX_RESAMPLE_EXPORT=
 
--- a/media/libspeex_resampler/src/moz.build
+++ b/media/libspeex_resampler/src/moz.build
@@ -19,8 +19,9 @@ SOURCES += [
 LIBRARY_NAME = 'speex_resampler'
 
 SOURCES += [
     'resample.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libtheora/lib/Makefile.in
+++ b/media/libtheora/lib/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 # The encoder is currently not included.
 DEFINES += -DTHEORA_DISABLE_ENCODE
 
 ifeq ($(findstring 86,$(OS_TEST)), 86)
--- a/media/libtheora/lib/moz.build
+++ b/media/libtheora/lib/moz.build
@@ -21,8 +21,9 @@ SOURCES += [
     'info.c',
     'internal.c',
     'quant.c',
     'state.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libtremor/lib/Makefile.in
+++ b/media/libtremor/lib/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 LOCAL_INCLUDES += -I$(topsrcdir)/media/libtremor/include/tremor
 
 ifeq ($(OS_ARCH),AIX)
 DEFINES += -Dalloca=__alloca
 endif
 
 ifeq (arm_1_, $(TARGET_CPU)_$(GNU_CC)_$(MOZ_THUMB2))
 DEFINES += -D_ARM_ASSEM_
--- a/media/libtremor/lib/moz.build
+++ b/media/libtremor/lib/moz.build
@@ -18,8 +18,9 @@ SOURCES += [
     'tremor_mdct.c',
     'tremor_registry.c',
     'tremor_res012.c',
     'tremor_sharedbook.c',
     'tremor_synthesis.c',
     'tremor_window.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/media/libvorbis/lib/Makefile.in
+++ b/media/libvorbis/lib/Makefile.in
@@ -1,12 +1,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 ifeq ($(OS_ARCH),AIX)
 DEFINES += -Dalloca=__alloca
 endif
--- a/media/libvorbis/lib/moz.build
+++ b/media/libvorbis/lib/moz.build
@@ -28,8 +28,9 @@ SOURCES += [
     'vorbis_sharedbook.c',
     'vorbis_smallft.c',
     'vorbis_synthesis.c',
     'vorbis_window.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libvpx/Makefile.in
+++ b/media/libvpx/Makefile.in
@@ -1,16 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
 DEFINES += -DHAVE_CONFIG_H=vpx_config.h
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 LOCAL_INCLUDES += \
   -I. \
   -I$(topsrcdir)/media/libvpx \
   -I$(topsrcdir)/media/libvpx/vp8/ \
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -87,8 +87,9 @@ SOURCES += [
     'vpx_scale/generic/scalesystemdependent.c',
     'vpx_scale/generic/vpxscale.c',
     'vpx_scale/generic/yv12config.c',
     'vpx_scale/generic/yv12extend.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/mtransport/standalone/Makefile.in
+++ b/media/mtransport/standalone/Makefile.in
@@ -1,14 +1,13 @@
 # -*- Mode: makefile; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 DEFINES += -DHAVE_STRDUP -DNR_SOCKET_IS_VOID_PTR
 
 ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
 ifeq ($(OS_TARGET), Darwin)
--- a/media/mtransport/standalone/moz.build
+++ b/media/mtransport/standalone/moz.build
@@ -44,8 +44,10 @@ elif CONFIG['OS_TARGET'] == 'Linux':
 elif CONFIG['OS_TARGET'] == 'Android':
     LOCAL_INCLUDES += [
         '/media/mtransport/third_party/nrappkit/src/port/android/include',
     ]
 elif CONFIG['OS_TARGET'] == 'WINNT':
     LOCAL_INCLUDES += [
         '/media/mtransport/third_party/nrappkit/src/port/win32/include',
     ]
+
+FORCE_STATIC_LIB = True
--- a/memory/build/Makefile.in
+++ b/memory/build/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 STLFLAGS =
 ifdef MOZ_GLUE_PROGRAM_LDFLAGS
 SDK_LIBRARY = $(REAL_LIBRARY)
 DIST_INSTALL = 1
 endif
 
 DEFINES += -DMOZ_MEMORY_IMPL
 
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -28,8 +28,9 @@ if CONFIG['MOZ_JEMALLOC3']:
 
 if CONFIG['MOZ_REPLACE_MALLOC']:
     SOURCES += [
         'replace_malloc.c',
     ]
 
 LIBRARY_NAME = 'memory'
 
+FORCE_STATIC_LIB = True
--- a/memory/jemalloc/Makefile.in
+++ b/memory/jemalloc/Makefile.in
@@ -1,16 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 VPATH		= $(srcdir) $(srcdir)/src/src
 
-FORCE_STATIC_LIB = 1
-
 ifdef MOZ_GLUE_PROGRAM_LDFLAGS
 SDK_LIBRARY = $(REAL_LIBRARY)
 DIST_INSTALL = 1
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += \
--- a/memory/jemalloc/moz.build
+++ b/memory/jemalloc/moz.build
@@ -35,8 +35,9 @@ SOURCES += [
 # but only if replace-malloc is not enabled.
 if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']:
     SOURCES += [
         'src/src/zone.c',
     ]
 
 LIBRARY_NAME = 'jemalloc'
 
+FORCE_STATIC_LIB = True
--- a/memory/mozalloc/Makefile.in
+++ b/memory/mozalloc/Makefile.in
@@ -6,19 +6,17 @@
 VISIBILITY_FLAGS=
 STL_FLAGS	=
 ifdef _MSC_VER
 STL_FLAGS	= -D_HAS_EXCEPTIONS=0
 endif
 
 DIST_INSTALL 	= 1
 
-ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
-FORCE_STATIC_LIB= 1
-else
+ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
 FORCE_SHARED_LIB= 1
 endif
 
 ifeq (,$(filter-out OS2,$(OS_ARCH)))
 # The strndup declaration in string.h is in an ifdef __USE_GNU section
 DEFINES		+= -D_GNU_SOURCE
 endif
 
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -38,8 +38,10 @@ if CONFIG['WRAP_STL_INCLUDES']:
 SOURCES += [
     'mozalloc.cpp',
     'mozalloc_abort.cpp',
     'mozalloc_oom.cpp',
 ]
 
 LIBRARY_NAME = 'mozalloc'
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    FORCE_STATIC_LIB = True
--- a/memory/mozjemalloc/Makefile.in
+++ b/memory/mozjemalloc/Makefile.in
@@ -1,16 +1,14 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 ifndef MOZ_JEMALLOC3
-FORCE_STATIC_LIB= 1
-
 ifeq ($(OS_ARCH),SunOS)
 ifndef GNU_CC
 MODULE_OPTIMIZE_FLAGS = -xO5
 endif
 endif
 
 ifeq (Linux,$(OS_TARGET))
 #XXX: PGO on Linux causes problems here
--- a/memory/mozjemalloc/moz.build
+++ b/memory/mozjemalloc/moz.build
@@ -10,9 +10,9 @@ EXPORTS += [
     'jemalloc_types.h',
 ]
 
 if not CONFIG['MOZ_JEMALLOC3']:
     SOURCES += [
         'jemalloc.c',
     ]
     LIBRARY_NAME = 'jemalloc'
-
+    FORCE_STATIC_LIB = True
--- a/mfbt/Makefile.in
+++ b/mfbt/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 STL_FLAGS =
 
 # exported_headers.mk defines the headers exported by mfbt.  It is included by
 # mfbt itself and by the JS engine, which, when built standalone, must do the
 # work to install mfbt's exported headers itself.
 include $(srcdir)/exported_headers.mk
 
 # sources.mk defines the source files built for mfbt. It is included by mfbt
--- a/mfbt/moz.build
+++ b/mfbt/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['tests']
 
 MODULE = 'mozglue'
 
 LIBRARY_NAME = 'mfbt'
 
+FORCE_STATIC_LIB = True
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -1,330 +1,18 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_FILES = package-name.txt
 
-include $(topsrcdir)/mobile/android/base/android-services-files.mk
-
-MOZGLUE_JAVA_FILES := \
-  mozglue/ByteBufferInputStream.java \
-  mozglue/DirectBufferAllocator.java \
-  mozglue/GeneratableAndroidBridgeTarget.java \
-  mozglue/NativeReference.java \
-  mozglue/NativeZip.java \
-  mozglue/OptionalGeneratedParameter.java \
-  $(NULL)
-
-MOZGLUE_PP_JAVA_FILES := \
-  mozglue/GeckoLoader.java \
-  $(NULL)
-
-UTIL_JAVA_FILES := \
-  util/ActivityResultHandler.java \
-  util/ActivityResultHandlerMap.java \
-  util/Clipboard.java \
-  util/EventDispatcher.java \
-  util/FloatUtils.java \
-  util/GamepadUtils.java \
-  util/GeckoBackgroundThread.java \
-  util/GeckoEventListener.java \
-  util/GeckoEventResponder.java \
-  util/GeckoJarReader.java \
-  util/HardwareUtils.java \
-  util/INIParser.java \
-  util/INISection.java \
-  util/JSONUtils.java \
-  util/StringUtils.java \
-  util/ThreadUtils.java \
-  util/UiAsyncTask.java \
-  $(NULL)
-
-FENNEC_JAVA_FILES = \
-  ANRReporter.java \
-  ActivityHandlerHelper.java \
-  AlertNotification.java \
-  AlignRightLinkPreference.java \
-  AllCapsTextView.java \
-  AndroidImport.java \
-  AndroidImportPreference.java \
-  AnimatedHeightLayout.java \
-  AppNotificationClient.java \
-  AutocompleteHandler.java \
-  animation/AnimatorProxy.java \
-  animation/HeightChangeAnimation.java \
-  animation/PropertyAnimator.java \
-  animation/Rotate3DAnimation.java \
-  animation/ViewHelper.java \
-  BackButton.java \
-  BaseGeckoInterface.java \
-  BrowserApp.java \
-  BrowserToolbar.java \
-  BrowserToolbarBackground.java \
-  CameraImageResultHandler.java \
-  CameraVideoResultHandler.java \
-  CanvasDelegate.java \
-  CheckableLinearLayout.java \
-  ClickableWhenDisabledEditText.java \
-  ContactService.java \
-  ContextGetter.java \
-  CustomEditText.java \
-  db/BrowserDB.java \
-  db/LocalBrowserDB.java \
-  db/DBUtils.java \
-  DataReportingNotification.java \
-  Distribution.java \
-  DoorHanger.java \
-  DoorHangerPopup.java \
-  EditBookmarkDialog.java \
-  favicons/cache/FaviconCache.java \
-  favicons/cache/FaviconCacheElement.java \
-  favicons/cache/FaviconsForURL.java \
-  favicons/Favicons.java \
-  favicons/LoadFaviconTask.java \
-  favicons/OnFaviconLoadedListener.java \
-  FilePickerResultHandler.java \
-  FilePickerResultHandlerSync.java \
-  FindInPageBar.java \
-  FlowLayout.java \
-  FontSizePreference.java \
-  FormAssistPopup.java \
-  ForwardButton.java \
-  GeckoAccessibility.java \
-  GeckoApplication.java \
-  GeckoApp.java \
-  GeckoAppShell.java \
-  GeckoActivity.java \
-  GeckoBatteryManager.java \
-  GeckoConnectivityReceiver.java \
-  GeckoEditable.java \
-  GeckoEvent.java \
-  GeckoHalDefines.java \
-  GeckoInputConnection.java \
-  GeckoMessageReceiver.java \
-  GeckoPreferences.java \
-  GeckoPreferenceFragment.java \
-  GeckoProfile.java \
-  GeckoSmsManager.java \
-  GeckoThread.java \
-  GeckoJavaSampler.java \
-  GlobalHistory.java \
-  GeckoView.java \
-  health/BrowserHealthRecorder.java \
-  health/BrowserHealthReporter.java \
-  InputMethods.java \
-  JavaAddonManager.java \
-  LightweightTheme.java \
-  LightweightThemeDrawable.java \
-  LinkPreference.java \
-  MemoryMonitor.java \
-  MotionEventInterceptor.java \
-  MultiChoicePreference.java \
-  NotificationClient.java \
-  NotificationHandler.java \
-  NotificationHelper.java \
-  NotificationService.java \
-  NSSBridge.java \
-  OrderedBroadcastHelper.java \
-  PageActionLayout.java \
-  PrefsHelper.java \
-  PrivateDataPreference.java \
-  PrivateTab.java \
-  prompts/Prompt.java \
-  prompts/PromptInput.java \
-  prompts/PromptService.java \
-  prompts/IconGridInput.java \
-  Restarter.java \
-  sqlite/ByteBufferInputStream.java \
-  sqlite/MatrixBlobCursor.java \
-  sqlite/SQLiteBridge.java \
-  sqlite/SQLiteBridgeException.java \
-  ReaderModeUtils.java \
-  RemoteTabs.java \
-  RobocopAPI.java \
-  ServiceNotificationClient.java \
-  ScrollAnimator.java \
-  SessionParser.java \
-  ShapedButton.java \
-  SharedPreferencesHelper.java \
-  SiteIdentityPopup.java \
-  SmsManager.java \
-  SurfaceBits.java \
-  SyncPreference.java \
-  Tab.java \
-  TabCounter.java \
-  Tabs.java \
-  TabsPanel.java \
-  TabsTray.java \
-  TabsAccessor.java \
-  Telemetry.java \
-  TextSelection.java \
-  TextSelectionHandle.java \
-  ThumbnailHelper.java \
-  TouchEventInterceptor.java \
-  VideoPlayer.java \
-  WebAppAllocator.java \
-  WebAppImpl.java \
-  ZoomConstraints.java \
-  db/BrowserContract.java \
-  db/BrowserProvider.java \
-  db/FormHistoryProvider.java \
-  db/PerProfileContentProvider.java \
-  db/PasswordsProvider.java \
-  db/TabsProvider.java \
-  gfx/Axis.java \
-  gfx/BitmapUtils.java \
-  gfx/BufferedCairoImage.java \
-  gfx/CairoGLInfo.java \
-  gfx/CairoImage.java \
-  gfx/CairoUtils.java \
-  gfx/DisplayPortCalculator.java \
-  gfx/DisplayPortMetrics.java \
-  gfx/DrawTimingQueue.java \
-  gfx/FloatSize.java \
-  gfx/GeckoLayerClient.java \
-  gfx/GfxInfoThread.java \
-  gfx/GLController.java \
-  gfx/ImmutableViewportMetrics.java \
-  gfx/InputConnectionHandler.java \
-  gfx/IntSize.java \
-  gfx/JavaPanZoomController.java \
-  gfx/Layer.java \
-  gfx/LayerMarginsAnimator.java \
-  gfx/LayerRenderer.java \
-  gfx/LayerView.java \
-  gfx/NativePanZoomController.java \
-  gfx/NinePatchTileLayer.java \
-  gfx/Overscroll.java \
-  gfx/PanningPerfAPI.java \
-  gfx/PanZoomController.java \
-  gfx/PanZoomTarget.java \
-  gfx/PluginLayer.java \
-  gfx/PointUtils.java \
-  gfx/ProgressiveUpdateData.java \
-  gfx/RectUtils.java \
-  gfx/RenderTask.java \
-  gfx/ScrollbarLayer.java \
-  gfx/SimpleScaleGestureDetector.java \
-  gfx/SingleTileLayer.java \
-  gfx/SubdocumentScrollHelper.java \
-  gfx/TextLayer.java \
-  gfx/TextureGenerator.java \
-  gfx/TextureReaper.java \
-  gfx/TileLayer.java \
-  gfx/TouchEventHandler.java \
-  gfx/ViewTransform.java \
-  gfx/VirtualLayer.java \
-  home/BookmarksListAdapter.java \
-  home/BookmarksListView.java \
-  home/BookmarksPage.java \
-  home/BookmarkFolderView.java \
-  home/BrowserSearch.java \
-  home/HistoryPage.java \
-  home/HomeFragment.java \
-  home/HomeListView.java \
-  home/HomePager.java \
-  home/HomePagerTabStrip.java \
-  home/HomeBanner.java \
-  home/FadedTextView.java \
-  home/LastTabsPage.java \
-  home/MostRecentPage.java \
-  home/MultiTypeCursorAdapter.java \
-  home/PinSiteDialog.java \
-  home/ReadingListPage.java \
-  home/SearchEngine.java \
-  home/SearchEngineRow.java \
-  home/SearchLoader.java \
-  home/SimpleCursorLoader.java \
-  home/SuggestClient.java \
-  home/TabMenuStrip.java \
-  home/TopSitesGridItemView.java \
-  home/TopSitesGridView.java \
-  home/TopSitesPage.java \
-  home/TopSitesThumbnailView.java \
-  home/TwoLinePageRow.java \
-  menu/GeckoMenu.java \
-  menu/GeckoMenuInflater.java \
-  menu/GeckoMenuItem.java \
-  menu/GeckoSubMenu.java \
-  menu/MenuItemActionBar.java \
-  menu/MenuItemActionView.java \
-  menu/MenuItemDefault.java \
-  menu/MenuPanel.java \
-  menu/MenuPopup.java \
-  preferences/SearchPreferenceCategory.java \
-  preferences/SearchEnginePreference.java \
-  updater/UpdateServiceHelper.java \
-  updater/UpdateService.java \
-  widget/ActivityChooserModel.java \
-  widget/ButtonToast.java \
-  widget/ArrowPopup.java \
-  widget/DateTimePicker.java \
-  widget/Divider.java \
-  widget/FaviconView.java \
-  widget/GeckoPopupMenu.java \
-  widget/GeckoActionProvider.java \
-  widget/IconTabWidget.java \
-  widget/TabRow.java \
-  widget/ThumbnailView.java \
-  widget/TwoWayView.java \
-  GeckoNetworkManager.java \
-  GeckoScreenOrientationListener.java \
-  GeckoUpdateReceiver.java \
-  ReferrerReceiver.java \
-  $(NULL)
-
-BRAILLE_JAVA_FILES := \
-  com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java \
-  com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java \
-  com/googlecode/eyesfree/braille/selfbraille/WriteData.java \
-  $(NULL)
-
-WEBSOCKETS_JAVA_FILES := \
-  com/codebutler/android_websockets/HybiParser.java \
-  com/codebutler/android_websockets/WebSocketClient.java \
-  $(NULL)
-
-ifdef MOZ_WEBRTC
-WEBRTC_VIDEO_CAPTURE_JAVA_FILES = \
-  CaptureCapabilityAndroid.java \
-  VideoCaptureAndroid.java \
-  VideoCaptureDeviceInfoAndroid.java \
-  $(NULL)
-
-WEBRTC_AUDIO_CAPTURE_JAVA_FILES = \
-  WebRTCAudioDevice.java \
-  $(NULL)
-
-WEBRTC_JAVA_FILES = \
-  $(addprefix $(DEPTH)/media/webrtc/trunk/webrtc/modules/video_capture/android/java/org/webrtc/videoengine/, $(WEBRTC_VIDEO_CAPTURE_JAVA_FILES)) \
-  $(addprefix $(DEPTH)/media/webrtc/trunk/webrtc/modules/audio_device/android/org/webrtc/voiceengine/, $(WEBRTC_AUDIO_CAPTURE_JAVA_FILES)) \
-  $(NULL)
-endif
-
 ifdef MOZ_ANDROID_ANR_REPORTER
 DEFINES += -DMOZ_ANDROID_ANR_REPORTER=1
 endif
 
-FENNEC_PP_JAVA_FILES := \
-  App.java \
-  AppConstants.java \
-  widget/GeckoEditText.java \
-  widget/GeckoImageButton.java \
-  widget/GeckoImageView.java \
-  widget/GeckoLinearLayout.java \
-  widget/GeckoRelativeLayout.java \
-  widget/GeckoTextSwitcher.java \
-  widget/GeckoTextView.java \
-  SysInfo.java \
-  WebApp.java \
-  WebApps.java \
-  $(NULL)
-
 ifneq (,$(findstring -march=armv7,$(OS_CFLAGS)))
 MIN_CPU_VERSION=7
 else
 MIN_CPU_VERSION=5
 endif
 
 MOZ_APP_BUILDID=$(shell cat $(DEPTH)/config/buildid)
 
@@ -383,22 +71,22 @@ DEFINES += \
 ifdef MOZ_PKG_SPECIAL
 DEFINES += -DMOZ_PKG_SPECIAL=$(MOZ_PKG_SPECIAL)
 endif
 
 ifdef MOZ_LINKER_EXTRACT
 DEFINES += -DMOZ_LINKER_EXTRACT=1
 endif
 
+PP_JAVAFILES = $(filter-out R.java,$(gecko-mozglue_PP_JAVAFILES) $(gecko-browser_PP_JAVAFILES))
+
 GARBAGE += \
   AndroidManifest.xml  \
   classes.dex  \
-  $(MOZGLUE_PP_JAVA_FILES) \
-  $(FENNEC_PP_JAVA_FILES) \
-  $(SYNC_PP_JAVA_FILES) \
+  $(PP_JAVAFILES) \
   gecko.ap_  \
   res/values/strings.xml \
   R.java \
   package-name.txt \
   fennec_ids.txt \
   Manifest.java \
   javah.out \
   jni-stubs.inc \
@@ -416,104 +104,28 @@ ICON_PATH_XHDPI = $(topsrcdir)/$(MOZ_BRA
 ICON_PATH_XXHDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/fennec_144x144.png
 else
 ICON_PATH = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon48.png
 ICON_PATH_HDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon64.png
 endif
 
 JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar
 
-ifdef MOZ_CRASHREPORTER
-FENNEC_JAVA_FILES += CrashReporter.java
-endif
-
 ALL_JARS = \
-  jars/gecko-browser.jar \
-  jars/gecko-mozglue.jar \
-  jars/gecko-util.jar \
-  jars/sync-thirdparty.jar \
-  jars/websockets.jar \
+  gecko-browser.jar \
+  gecko-mozglue.jar \
+  gecko-util.jar \
+  sync-thirdparty.jar \
+  websockets.jar \
   $(NULL)
 
 ifdef MOZ_WEBRTC
-ALL_JARS += jars/webrtc.jar
+ALL_JARS += webrtc.jar
 endif
 
-thirdparty_source_dir = $(topsrcdir)/mobile/android/thirdparty
-
-JAVA_JAR_TARGETS += websockets
-websockets_DEST := jars/websockets.jar
-websockets_JAVAFILES := \
-  $(addprefix $(thirdparty_source_dir)/,$(WEBSOCKETS_JAVA_FILES)) \
-  $(NULL)
-websockets_JAVAC_FLAGS := -Xlint:all,-serial
-
-JAVA_JAR_TARGETS += gecko-browser
-gecko-browser_DEST := jars/gecko-browser.jar
-gecko-browser_JAVAFILES := \
-  $(FENNEC_JAVA_FILES) \
-  $(addprefix $(thirdparty_source_dir)/,$(BRAILLE_JAVA_FILES)) \
-  $(SYNC_JAVA_FILES) \
-  $(NULL)
-gecko-browser_PP_JAVAFILES := \
-  $(FENNEC_PP_JAVA_FILES) \
-  $(SYNC_PP_JAVA_FILES) \
-  R.java \
-  $(NULL)
-gecko-browser_EXTRA_JARS := \
-  jars/gecko-mozglue.jar \
-  jars/gecko-util.jar \
-  jars/sync-thirdparty.jar \
-  jars/websockets.jar \
-  $(NULL)
-gecko-browser_JAVAC_FLAGS := -Xlint:all,-deprecation,-fallthrough
-
-JAVA_JAR_TARGETS += gecko-mozglue
-gecko-mozglue_DEST := jars/gecko-mozglue.jar
-gecko-mozglue_JAVAFILES := \
-  $(MOZGLUE_JAVA_FILES) \
-  $(NULL)
-gecko-mozglue_PP_JAVAFILES := \
-  $(MOZGLUE_PP_JAVA_FILES) \
-  $(NULL)
-gecko-mozglue_JAVAC_FLAGS := -Xlint:all
-
-JAVA_JAR_TARGETS += gecko-util
-gecko-util_DEST := jars/gecko-util.jar
-gecko-util_JAVAFILES := \
-  $(UTIL_JAVA_FILES) \
-  $(NULL)
-gecko-util_EXTRA_JARS := \
-  jars/gecko-mozglue.jar \
-  $(NULL)
-gecko-util_JAVAC_FLAGS := -Xlint:all,-deprecation
-
-JAVA_JAR_TARGETS += sync-thirdparty
-sync-thirdparty_DEST := jars/sync-thirdparty.jar
-sync-thirdparty_JAVAFILES := \
-  $(addprefix $(thirdparty_source_dir)/,$(SYNC_THIRDPARTY_JAVA_FILES)) \
-  $(NULL)
-sync-thirdparty_JAVAC_FLAGS := -Xlint:none
-
-ifdef MOZ_WEBRTC
-JAVA_JAR_TARGETS += webrtc
-webrtc_DEST := jars/webrtc.jar
-webrtc_JAVAFILES := \
-  $(WEBRTC_JAVA_FILES) \
-  $(NULL)
-webrtc_EXTRA_JARS := \
-  jars/gecko-browser.jar \
-  jars/gecko-util.jar \
-  jars/gecko-mozglue.jar \
-  $(NULL)
-webrtc_JAVAC_FLAGS := -Xlint:all,-deprecation,-cast
-endif
-
-include $(topsrcdir)/config/makefiles/java-build.mk
-
 # We process ANDROID_RESFILES specially for now; the following flag
 # disables the default processing.
 IGNORE_ANDROID_RESFILES=1
 
 include $(topsrcdir)/config/rules.mk
 
 # Override the Java settings with some specific android settings
 include $(topsrcdir)/config/android-common.mk
@@ -538,44 +150,40 @@ ifdef MOZ_WEBSMS_BACKEND
 # Note: if you are building with MOZ_WEBSMS_BACKEND turned on, then
 # you will get a build error because the generated jni-stubs.inc will
 # be different than the one checked in (i.e. it will have the sms-related
 # JNI stubs as well). Just copy the generated file to mozglue/android/
 # like the error message says and rebuild. All should be well after that.
 CLASSES_WITH_JNI += org.mozilla.gecko.GeckoSmsManager
 endif
 
-jni-stubs.inc: jars/gecko-browser.jar jars/gecko-mozglue.jar jars/gecko-util.jar jars/sync-thirdparty.jar
+jni-stubs.inc: gecko-browser.jar gecko-mozglue.jar gecko-util.jar sync-thirdparty.jar
 	$(JAVAH) -o javah.out -bootclasspath $(JAVA_BOOTCLASSPATH) -classpath $(subst $(NULL) $(NULL),:,$^) $(CLASSES_WITH_JNI)
 	$(PYTHON) $(topsrcdir)/mobile/android/base/jni-generator.py javah.out $@
 
 ANNOTATION_PROCESSOR_JAR_FILES := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar
 
 GeneratedJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES)
 GeneratedJNIWrappers.cpp: $(ALL_JARS)
 	$(JAVA) -classpath $(JAVA_BOOTCLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.AnnotationProcessor $(ALL_JARS)
 
 # AndroidManifest.xml includes these files, so they need to be marked as dependencies.
 SERVICES_MANIFEST_FRAGMENTS = $(wildcard $(topsrcdir)/mobile/android/services/manifests/*.in)
 
 android-tgts = \
   AndroidManifest.xml \
-  $(MOZGLUE_PP_JAVA_FILES) \
-  $(FENNEC_PP_JAVA_FILES) \
-  $(SYNC_PP_JAVA_FILES) \
   package-name.txt \
+  $(PP_JAVAFILES) \
   $(NULL)
 
 android-preqs = \
   Makefile.in \
   widget/GeckoView.java.frag \
-  $(call mkdir_deps,$(sort $(dir $(MOZGLUE_PP_JAVA_FILES)))) \
-  $(call mkdir_deps,$(sort $(dir $(FENNEC_PP_JAVA_FILES)))) \
-  $(call mkdir_deps,$(sort $(dir $(SYNC_PP_JAVA_FILES)))) \
   $(SERVICES_MANIFEST_FRAGMENTS) \
+  $(call mkdir_deps,$(sort $(dir $(PP_JAVAFILES)))) \
   $(NULL)
 
 $(android-tgts): % : %.in $(android-preqs)
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
              $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $< > $@
 
 res/drawable-mdpi/icon.png: $(ICON_PATH)
 	$(NSINSTALL) -D res/drawable-mdpi
deleted file mode 100644
--- a/mobile/android/base/android-services-files.mk
+++ /dev/null
@@ -1,771 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# These files are managed in the android-sync repo. Do not modify directly, or your changes will be lost.
-SYNC_PP_JAVA_FILES := \
-  background/common/GlobalConstants.java \
-  sync/SyncConstants.java \
-  background/announcements/AnnouncementsConstants.java \
-  background/healthreport/HealthReportConstants.java \
-  $(NULL)
-
-SYNC_JAVA_FILES := \
-  background/announcements/Announcement.java \
-  background/announcements/AnnouncementPresenter.java \
-  background/announcements/AnnouncementsBroadcastReceiver.java \
-  background/announcements/AnnouncementsBroadcastService.java \
-  background/announcements/AnnouncementsFetchDelegate.java \
-  background/announcements/AnnouncementsFetcher.java \
-  background/announcements/AnnouncementsFetchResourceDelegate.java \
-  background/announcements/AnnouncementsService.java \
-  background/BackgroundService.java \
-  background/bagheera/BagheeraClient.java \
-  background/bagheera/BagheeraRequestDelegate.java \
-  background/bagheera/BoundedByteArrayEntity.java \
-  background/bagheera/DeflateHelper.java \
-  background/common/DateUtils.java \
-  background/common/log/Logger.java \
-  background/common/log/writers/AndroidLevelCachingLogWriter.java \
-  background/common/log/writers/AndroidLogWriter.java \
-  background/common/log/writers/LevelFilteringLogWriter.java \
-  background/common/log/writers/LogWriter.java \
-  background/common/log/writers/PrintLogWriter.java \
-  background/common/log/writers/SimpleTagLogWriter.java \
-  background/common/log/writers/StringLogWriter.java \
-  background/common/log/writers/TagLogWriter.java \
-  background/common/log/writers/ThreadLocalTagLogWriter.java \
-  background/datareporting/TelemetryRecorder.java \
-  background/db/CursorDumper.java \
-  background/db/Tab.java \
-  background/healthreport/Environment.java \
-  background/healthreport/EnvironmentBuilder.java \
-  background/healthreport/EnvironmentV1.java \
-  background/healthreport/HealthReportBroadcastReceiver.java \
-  background/healthreport/HealthReportBroadcastService.java \
-  background/healthreport/HealthReportDatabases.java \
-  background/healthreport/HealthReportDatabaseStorage.java \
-  background/healthreport/HealthReportGenerator.java \
-  background/healthreport/HealthReportProvider.java \
-  background/healthreport/HealthReportStorage.java \
-  background/healthreport/HealthReportUtils.java \
-  background/healthreport/ProfileInformationCache.java \
-  background/healthreport/prune/HealthReportPruneService.java \
-  background/healthreport/prune/PrunePolicy.java \
-  background/healthreport/prune/PrunePolicyDatabaseStorage.java \
-  background/healthreport/prune/PrunePolicyStorage.java \
-  background/healthreport/upload/AndroidSubmissionClient.java \
-  background/healthreport/upload/HealthReportUploadService.java \
-  background/healthreport/upload/ObsoleteDocumentTracker.java \
-  background/healthreport/upload/SubmissionClient.java \
-  background/healthreport/upload/SubmissionPolicy.java \
-  sync/AlreadySyncingException.java \
-  sync/CollectionKeys.java \
-  sync/CommandProcessor.java \
-  sync/CommandRunner.java \
-  sync/config/AccountPickler.java \
-  sync/config/activities/SelectEnginesActivity.java \
-  sync/config/ClientRecordTerminator.java \
-  sync/config/ConfigurationMigrator.java \
-  sync/CredentialException.java \
-  sync/CredentialsSource.java \
-  sync/crypto/CryptoException.java \
-  sync/crypto/CryptoInfo.java \
-  sync/crypto/HKDF.java \
-  sync/crypto/HMACVerificationException.java \
-  sync/crypto/KeyBundle.java \
-  sync/crypto/MissingCryptoInputException.java \
-  sync/crypto/NoKeyBundleException.java \
-  sync/crypto/PersistedCrypto5Keys.java \
-  sync/CryptoRecord.java \
-  sync/DelayedWorkTracker.java \
-  sync/delegates/ClientsDataDelegate.java \
-  sync/delegates/FreshStartDelegate.java \
-  sync/delegates/GlobalSessionCallback.java \
-  sync/delegates/JSONRecordFetchDelegate.java \
-  sync/delegates/KeyUploadDelegate.java \
-  sync/delegates/MetaGlobalDelegate.java \
-  sync/delegates/WipeServerDelegate.java \
-  sync/EngineSettings.java \
-  sync/ExtendedJSONObject.java \
-  sync/GlobalSession.java \
-  sync/HTTPFailureException.java \
-  sync/InfoCollections.java \
-  sync/InfoCounts.java \
-  sync/jpake/BigIntegerHelper.java \
-  sync/jpake/Gx3OrGx4IsZeroOrOneException.java \
-  sync/jpake/IncorrectZkpException.java \
-  sync/jpake/JPakeClient.java \
-  sync/jpake/JPakeCrypto.java \
-  sync/jpake/JPakeJson.java \
-  sync/jpake/JPakeNoActivePairingException.java \
-  sync/jpake/JPakeNumGenerator.java \
-  sync/jpake/JPakeNumGeneratorRandom.java \
-  sync/jpake/JPakeParty.java \
-  sync/jpake/stage/CompleteStage.java \
-  sync/jpake/stage/ComputeFinalStage.java \
-  sync/jpake/stage/ComputeKeyVerificationStage.java \
-  sync/jpake/stage/ComputeStepOneStage.java \
-  sync/jpake/stage/ComputeStepTwoStage.java \
-  sync/jpake/stage/DecryptDataStage.java \
-  sync/jpake/stage/DeleteChannel.java \
-  sync/jpake/stage/GetChannelStage.java \
-  sync/jpake/stage/GetRequestStage.java \
-  sync/jpake/stage/JPakeStage.java \
-  sync/jpake/stage/PutRequestStage.java \
-  sync/jpake/stage/VerifyPairingStage.java \
-  sync/jpake/Zkp.java \
-  sync/JSONRecordFetcher.java \
-  sync/KeyBundleProvider.java \
-  sync/MetaGlobal.java \
-  sync/MetaGlobalException.java \
-  sync/MetaGlobalMissingEnginesException.java \
-  sync/MetaGlobalNotSetException.java \
-  sync/middleware/Crypto5MiddlewareRepository.java \
-  sync/middleware/Crypto5MiddlewareRepositorySession.java \
-  sync/middleware/MiddlewareRepository.java \
-  sync/middleware/MiddlewareRepositorySession.java \
-  sync/net/AuthHeaderProvider.java \
-  sync/net/BaseResource.java \
-  sync/net/BaseResourceDelegate.java \
-  sync/net/BasicAuthHeaderProvider.java \
-  sync/net/BrowserIDAuthHeaderProvider.java \
-  sync/net/ConnectionMonitorThread.java \
-  sync/net/HandleProgressException.java \
-  sync/net/HawkAuthHeaderProvider.java \
-  sync/net/HMACAuthHeaderProvider.java \
-  sync/net/HttpResponseObserver.java \
-  sync/net/Resource.java \
-  sync/net/ResourceDelegate.java \
-  sync/net/SyncResponse.java \
-  sync/net/SyncStorageCollectionRequest.java \
-  sync/net/SyncStorageCollectionRequestDelegate.java \
-  sync/net/SyncStorageRecordRequest.java \
-  sync/net/SyncStorageRequest.java \
-  sync/net/SyncStorageRequestDelegate.java \
-  sync/net/SyncStorageRequestIncrementalDelegate.java \
-  sync/net/SyncStorageResponse.java \
-  sync/net/TLSSocketFactory.java \
-  sync/net/WBOCollectionRequestDelegate.java \
-  sync/net/WBORequestDelegate.java \
-  sync/NoCollectionKeysSetException.java \
-  sync/NodeAuthenticationException.java \
-  sync/NonArrayJSONException.java \
-  sync/NonObjectJSONException.java \
-  sync/NullClusterURLException.java \
-  sync/PersistedMetaGlobal.java \
-  sync/PrefsSource.java \
-  sync/receivers/SyncAccountDeletedReceiver.java \
-  sync/receivers/SyncAccountDeletedService.java \
-  sync/receivers/UpgradeReceiver.java \
-  sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java \
-  sync/repositories/android/AndroidBrowserBookmarksRepository.java \
-  sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java \
-  sync/repositories/android/AndroidBrowserHistoryDataAccessor.java \
-  sync/repositories/android/AndroidBrowserHistoryDataExtender.java \
-  sync/repositories/android/AndroidBrowserHistoryRepository.java \
-  sync/repositories/android/AndroidBrowserHistoryRepositorySession.java \
-  sync/repositories/android/AndroidBrowserRepository.java \
-  sync/repositories/android/AndroidBrowserRepositoryDataAccessor.java \
-  sync/repositories/android/AndroidBrowserRepositorySession.java \
-  sync/repositories/android/BookmarksDeletionManager.java \
-  sync/repositories/android/BookmarksInsertionManager.java \
-  sync/repositories/android/BrowserContractHelpers.java \
-  sync/repositories/android/CachedSQLiteOpenHelper.java \
-  sync/repositories/android/ClientsDatabase.java \
-  sync/repositories/android/ClientsDatabaseAccessor.java \
-  sync/repositories/android/FennecTabsRepository.java \
-  sync/repositories/android/FormHistoryRepositorySession.java \
-  sync/repositories/android/PasswordsRepositorySession.java \
-  sync/repositories/android/RepoUtils.java \
-  sync/repositories/BookmarkNeedsReparentingException.java \
-  sync/repositories/BookmarksRepository.java \
-  sync/repositories/ConstrainedServer11Repository.java \
-  sync/repositories/delegates/DeferrableRepositorySessionCreationDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionFinishDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionStoreDelegate.java \
-  sync/repositories/delegates/RepositorySessionBeginDelegate.java \
-  sync/repositories/delegates/RepositorySessionCleanDelegate.java \
-  sync/repositories/delegates/RepositorySessionCreationDelegate.java \
-  sync/repositories/delegates/RepositorySessionFetchRecordsDelegate.java \
-  sync/repositories/delegates/RepositorySessionFinishDelegate.java \
-  sync/repositories/delegates/RepositorySessionGuidsSinceDelegate.java \
-  sync/repositories/delegates/RepositorySessionStoreDelegate.java \
-  sync/repositories/delegates/RepositorySessionWipeDelegate.java \
-  sync/repositories/domain/BookmarkRecord.java \
-  sync/repositories/domain/BookmarkRecordFactory.java \
-  sync/repositories/domain/ClientRecord.java \
-  sync/repositories/domain/ClientRecordFactory.java \
-  sync/repositories/domain/FormHistoryRecord.java \
-  sync/repositories/domain/HistoryRecord.java \
-  sync/repositories/domain/HistoryRecordFactory.java \
-  sync/repositories/domain/PasswordRecord.java \
-  sync/repositories/domain/Record.java \
-  sync/repositories/domain/RecordParseException.java \
-  sync/repositories/domain/TabsRecord.java \
-  sync/repositories/domain/VersionConstants.java \
-  sync/repositories/FetchFailedException.java \
-  sync/repositories/HashSetStoreTracker.java \
-  sync/repositories/HistoryRepository.java \
-  sync/repositories/IdentityRecordFactory.java \
-  sync/repositories/InactiveSessionException.java \
-  sync/repositories/InvalidBookmarkTypeException.java \
-  sync/repositories/InvalidRequestException.java \
-  sync/repositories/InvalidSessionTransitionException.java \
-  sync/repositories/MultipleRecordsForGuidException.java \
-  sync/repositories/NoContentProviderException.java \
-  sync/repositories/NoGuidForIdException.java \
-  sync/repositories/NoStoreDelegateException.java \
-  sync/repositories/NullCursorException.java \
-  sync/repositories/ParentNotFoundException.java \
-  sync/repositories/ProfileDatabaseException.java \
-  sync/repositories/RecordFactory.java \
-  sync/repositories/RecordFilter.java \
-  sync/repositories/Repository.java \
-  sync/repositories/RepositorySession.java \
-  sync/repositories/RepositorySessionBundle.java \
-  sync/repositories/Server11Repository.java \
-  sync/repositories/Server11RepositorySession.java \
-  sync/repositories/StoreFailedException.java \
-  sync/repositories/StoreTracker.java \
-  sync/repositories/StoreTrackingRepositorySession.java \
-  sync/Server11PreviousPostFailedException.java \
-  sync/Server11RecordPostFailedException.java \
-  sync/setup/activities/AccountActivity.java \
-  sync/setup/activities/ActivityUtils.java \
-  sync/setup/activities/ClientRecordArrayAdapter.java \
-  sync/setup/activities/RedirectToSetupActivity.java \
-  sync/setup/activities/SendTabActivity.java \
-  sync/setup/activities/SendTabData.java \
-  sync/setup/activities/SetupFailureActivity.java \
-  sync/setup/activities/SetupSuccessActivity.java \
-  sync/setup/activities/SetupSyncActivity.java \
-  sync/setup/activities/SyncActivity.java \
-  sync/setup/activities/WebURLFinder.java \
-  sync/setup/activities/WebViewActivity.java \
-  sync/setup/auth/AccountAuthenticator.java \
-  sync/setup/auth/AuthenticateAccountStage.java \
-  sync/setup/auth/AuthenticationResult.java \
-  sync/setup/auth/AuthenticatorStage.java \
-  sync/setup/auth/EnsureUserExistenceStage.java \
-  sync/setup/auth/FetchUserNodeStage.java \
-  sync/setup/Constants.java \
-  sync/setup/InvalidSyncKeyException.java \
-  sync/setup/SyncAccounts.java \
-  sync/setup/SyncAuthenticatorService.java \
-  sync/stage/AbstractNonRepositorySyncStage.java \
-  sync/stage/AbstractSessionManagingSyncStage.java \
-  sync/stage/AndroidBrowserBookmarksServerSyncStage.java \
-  sync/stage/AndroidBrowserHistoryServerSyncStage.java \
-  sync/stage/CheckPreconditionsStage.java \
-  sync/stage/CompletedStage.java \
-  sync/stage/EnsureClusterURLStage.java \
-  sync/stage/EnsureCrypto5KeysStage.java \
-  sync/stage/FennecTabsServerSyncStage.java \
-  sync/stage/FetchInfoCollectionsStage.java \
-  sync/stage/FetchMetaGlobalStage.java \
-  sync/stage/FormHistoryServerSyncStage.java \
-  sync/stage/GlobalSyncStage.java \
-  sync/stage/NoSuchStageException.java \
-  sync/stage/NoSyncIDException.java \
-  sync/stage/PasswordsServerSyncStage.java \
-  sync/stage/SafeConstrainedServer11Repository.java \
-  sync/stage/ServerSyncStage.java \
-  sync/stage/SyncClientsEngineStage.java \
-  sync/stage/UploadMetaGlobalStage.java \
-  sync/syncadapter/SyncAdapter.java \
-  sync/syncadapter/SyncService.java \
-  sync/SyncConfiguration.java \
-  sync/SyncConfigurationException.java \
-  sync/SyncException.java \
-  sync/synchronizer/ConcurrentRecordConsumer.java \
-  sync/synchronizer/RecordConsumer.java \
-  sync/synchronizer/RecordsChannel.java \
-  sync/synchronizer/RecordsChannelDelegate.java \
-  sync/synchronizer/RecordsConsumerDelegate.java \
-  sync/synchronizer/SerialRecordConsumer.java \
-  sync/synchronizer/ServerLocalSynchronizer.java \
-  sync/synchronizer/ServerLocalSynchronizerSession.java \
-  sync/synchronizer/SessionNotBegunException.java \
-  sync/synchronizer/Synchronizer.java \
-  sync/synchronizer/SynchronizerDelegate.java \
-  sync/synchronizer/SynchronizerSession.java \
-  sync/synchronizer/SynchronizerSessionDelegate.java \
-  sync/synchronizer/UnbundleError.java \
-  sync/synchronizer/UnexpectedSessionException.java \
-  sync/SynchronizerConfiguration.java \
-  sync/ThreadPool.java \
-  sync/UnexpectedJSONException.java \
-  sync/UnknownSynchronizerConfigurationVersionException.java \
-  sync/Utils.java \
-  $(NULL)
-
-SYNC_THIRDPARTY_JAVA_FILES := \
-  ch/boye/httpclientandroidlib/androidextra/HttpClientAndroidLog.java \
-  ch/boye/httpclientandroidlib/annotation/GuardedBy.java \
-  ch/boye/httpclientandroidlib/annotation/Immutable.java \
-  ch/boye/httpclientandroidlib/annotation/NotThreadSafe.java \
-  ch/boye/httpclientandroidlib/annotation/ThreadSafe.java \
-  ch/boye/httpclientandroidlib/auth/AUTH.java \
-  ch/boye/httpclientandroidlib/auth/AuthenticationException.java \
-  ch/boye/httpclientandroidlib/auth/AuthScheme.java \
-  ch/boye/httpclientandroidlib/auth/AuthSchemeFactory.java \
-  ch/boye/httpclientandroidlib/auth/AuthSchemeRegistry.java \
-  ch/boye/httpclientandroidlib/auth/AuthScope.java \
-  ch/boye/httpclientandroidlib/auth/AuthState.java \
-  ch/boye/httpclientandroidlib/auth/BasicUserPrincipal.java \
-  ch/boye/httpclientandroidlib/auth/ContextAwareAuthScheme.java \
-  ch/boye/httpclientandroidlib/auth/Credentials.java \
-  ch/boye/httpclientandroidlib/auth/InvalidCredentialsException.java \
-  ch/boye/httpclientandroidlib/auth/MalformedChallengeException.java \
-  ch/boye/httpclientandroidlib/auth/NTCredentials.java \
-  ch/boye/httpclientandroidlib/auth/NTUserPrincipal.java \
-  ch/boye/httpclientandroidlib/auth/params/AuthParamBean.java \
-  ch/boye/httpclientandroidlib/auth/params/AuthParams.java \
-  ch/boye/httpclientandroidlib/auth/params/AuthPNames.java \
-  ch/boye/httpclientandroidlib/auth/UsernamePasswordCredentials.java \
-  ch/boye/httpclientandroidlib/client/AuthCache.java \
-  ch/boye/httpclientandroidlib/client/AuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/client/CircularRedirectException.java \
-  ch/boye/httpclientandroidlib/client/ClientProtocolException.java \
-  ch/boye/httpclientandroidlib/client/CookieStore.java \
-  ch/boye/httpclientandroidlib/client/CredentialsProvider.java \
-  ch/boye/httpclientandroidlib/client/entity/DecompressingEntity.java \
-  ch/boye/httpclientandroidlib/client/entity/DeflateDecompressingEntity.java \
-  ch/boye/httpclientandroidlib/client/entity/GzipDecompressingEntity.java \
-  ch/boye/httpclientandroidlib/client/entity/UrlEncodedFormEntity.java \
-  ch/boye/httpclientandroidlib/client/HttpClient.java \
-  ch/boye/httpclientandroidlib/client/HttpRequestRetryHandler.java \
-  ch/boye/httpclientandroidlib/client/HttpResponseException.java \
-  ch/boye/httpclientandroidlib/client/methods/AbortableHttpRequest.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpDelete.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpEntityEnclosingRequestBase.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpGet.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpHead.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpOptions.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpPost.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpPut.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpRequestBase.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpTrace.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpUriRequest.java \
-  ch/boye/httpclientandroidlib/client/NonRepeatableRequestException.java \
-  ch/boye/httpclientandroidlib/client/params/AllClientPNames.java \
-  ch/boye/httpclientandroidlib/client/params/AuthPolicy.java \
-  ch/boye/httpclientandroidlib/client/params/ClientParamBean.java \
-  ch/boye/httpclientandroidlib/client/params/ClientPNames.java \
-  ch/boye/httpclientandroidlib/client/params/CookiePolicy.java \
-  ch/boye/httpclientandroidlib/client/params/HttpClientParams.java \
-  ch/boye/httpclientandroidlib/client/protocol/ClientContext.java \
-  ch/boye/httpclientandroidlib/client/protocol/ClientContextConfigurer.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestAcceptEncoding.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestAddCookies.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestAuthCache.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestClientConnControl.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestDefaultHeaders.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestProxyAuthentication.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestTargetAuthentication.java \
-  ch/boye/httpclientandroidlib/client/protocol/ResponseAuthCache.java \
-  ch/boye/httpclientandroidlib/client/protocol/ResponseContentEncoding.java \
-  ch/boye/httpclientandroidlib/client/protocol/ResponseProcessCookies.java \
-  ch/boye/httpclientandroidlib/client/RedirectException.java \
-  ch/boye/httpclientandroidlib/client/RedirectHandler.java \
-  ch/boye/httpclientandroidlib/client/RedirectStrategy.java \
-  ch/boye/httpclientandroidlib/client/RequestDirector.java \
-  ch/boye/httpclientandroidlib/client/ResponseHandler.java \
-  ch/boye/httpclientandroidlib/client/UserTokenHandler.java \
-  ch/boye/httpclientandroidlib/client/utils/CloneUtils.java \
-  ch/boye/httpclientandroidlib/client/utils/Idn.java \
-  ch/boye/httpclientandroidlib/client/utils/JdkIdn.java \
-  ch/boye/httpclientandroidlib/client/utils/Punycode.java \
-  ch/boye/httpclientandroidlib/client/utils/Rfc3492Idn.java \
-  ch/boye/httpclientandroidlib/client/utils/URIUtils.java \
-  ch/boye/httpclientandroidlib/client/utils/URLEncodedUtils.java \
-  ch/boye/httpclientandroidlib/conn/BasicEofSensorWatcher.java \
-  ch/boye/httpclientandroidlib/conn/BasicManagedEntity.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionManager.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionManagerFactory.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionOperator.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionRequest.java \
-  ch/boye/httpclientandroidlib/conn/ConnectionKeepAliveStrategy.java \
-  ch/boye/httpclientandroidlib/conn/ConnectionPoolTimeoutException.java \
-  ch/boye/httpclientandroidlib/conn/ConnectionReleaseTrigger.java \
-  ch/boye/httpclientandroidlib/conn/ConnectTimeoutException.java \
-  ch/boye/httpclientandroidlib/conn/EofSensorInputStream.java \
-  ch/boye/httpclientandroidlib/conn/EofSensorWatcher.java \
-  ch/boye/httpclientandroidlib/conn/HttpHostConnectException.java \
-  ch/boye/httpclientandroidlib/conn/HttpRoutedConnection.java \
-  ch/boye/httpclientandroidlib/conn/ManagedClientConnection.java \
-  ch/boye/httpclientandroidlib/conn/MultihomePlainSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/OperatedClientConnection.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnConnectionParamBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnConnectionPNames.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnManagerParamBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnManagerParams.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnManagerPNames.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnPerRoute.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnPerRouteBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnRouteParamBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnRouteParams.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnRoutePNames.java \
-  ch/boye/httpclientandroidlib/conn/routing/BasicRouteDirector.java \
-  ch/boye/httpclientandroidlib/conn/routing/HttpRoute.java \
-  ch/boye/httpclientandroidlib/conn/routing/HttpRouteDirector.java \
-  ch/boye/httpclientandroidlib/conn/routing/HttpRoutePlanner.java \
-  ch/boye/httpclientandroidlib/conn/routing/RouteInfo.java \
-  ch/boye/httpclientandroidlib/conn/routing/RouteTracker.java \
-  ch/boye/httpclientandroidlib/conn/scheme/HostNameResolver.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/scheme/PlainSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/Scheme.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SchemeRegistry.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/ssl/AbstractVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/AllowAllHostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/BrowserCompatHostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/SSLSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/ssl/StrictHostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/TrustManagerDecorator.java \
-  ch/boye/httpclientandroidlib/conn/ssl/TrustSelfSignedStrategy.java \
-  ch/boye/httpclientandroidlib/conn/ssl/TrustStrategy.java \
-  ch/boye/httpclientandroidlib/conn/ssl/X509HostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/util/InetAddressUtils.java \
-  ch/boye/httpclientandroidlib/ConnectionClosedException.java \
-  ch/boye/httpclientandroidlib/ConnectionReuseStrategy.java \
-  ch/boye/httpclientandroidlib/cookie/ClientCookie.java \
-  ch/boye/httpclientandroidlib/cookie/Cookie.java \
-  ch/boye/httpclientandroidlib/cookie/CookieAttributeHandler.java \
-  ch/boye/httpclientandroidlib/cookie/CookieIdentityComparator.java \
-  ch/boye/httpclientandroidlib/cookie/CookieOrigin.java \
-  ch/boye/httpclientandroidlib/cookie/CookiePathComparator.java \
-  ch/boye/httpclientandroidlib/cookie/CookieRestrictionViolationException.java \
-  ch/boye/httpclientandroidlib/cookie/CookieSpec.java \
-  ch/boye/httpclientandroidlib/cookie/CookieSpecFactory.java \
-  ch/boye/httpclientandroidlib/cookie/CookieSpecRegistry.java \
-  ch/boye/httpclientandroidlib/cookie/MalformedCookieException.java \
-  ch/boye/httpclientandroidlib/cookie/params/CookieSpecParamBean.java \
-  ch/boye/httpclientandroidlib/cookie/params/CookieSpecPNames.java \
-  ch/boye/httpclientandroidlib/cookie/SetCookie.java \
-  ch/boye/httpclientandroidlib/cookie/SetCookie2.java \
-  ch/boye/httpclientandroidlib/cookie/SM.java \
-  ch/boye/httpclientandroidlib/entity/AbstractHttpEntity.java \
-  ch/boye/httpclientandroidlib/entity/BasicHttpEntity.java \
-  ch/boye/httpclientandroidlib/entity/BufferedHttpEntity.java \
-  ch/boye/httpclientandroidlib/entity/ByteArrayEntity.java \
-  ch/boye/httpclientandroidlib/entity/ContentLengthStrategy.java \
-  ch/boye/httpclientandroidlib/entity/ContentProducer.java \
-  ch/boye/httpclientandroidlib/entity/EntityTemplate.java \
-  ch/boye/httpclientandroidlib/entity/FileEntity.java \
-  ch/boye/httpclientandroidlib/entity/HttpEntityWrapper.java \
-  ch/boye/httpclientandroidlib/entity/InputStreamEntity.java \
-  ch/boye/httpclientandroidlib/entity/SerializableEntity.java \
-  ch/boye/httpclientandroidlib/entity/StringEntity.java \
-  ch/boye/httpclientandroidlib/FormattedHeader.java \
-  ch/boye/httpclientandroidlib/Header.java \
-  ch/boye/httpclientandroidlib/HeaderElement.java \
-  ch/boye/httpclientandroidlib/HeaderElementIterator.java \
-  ch/boye/httpclientandroidlib/HeaderIterator.java \
-  ch/boye/httpclientandroidlib/HttpClientConnection.java \
-  ch/boye/httpclientandroidlib/HttpConnection.java \
-  ch/boye/httpclientandroidlib/HttpConnectionMetrics.java \
-  ch/boye/httpclientandroidlib/HttpEntity.java \
-  ch/boye/httpclientandroidlib/HttpEntityEnclosingRequest.java \
-  ch/boye/httpclientandroidlib/HttpException.java \
-  ch/boye/httpclientandroidlib/HttpHeaders.java \
-  ch/boye/httpclientandroidlib/HttpHost.java \
-  ch/boye/httpclientandroidlib/HttpInetConnection.java \
-  ch/boye/httpclientandroidlib/HttpMessage.java \
-  ch/boye/httpclientandroidlib/HttpRequest.java \
-  ch/boye/httpclientandroidlib/HttpRequestFactory.java \
-  ch/boye/httpclientandroidlib/HttpRequestInterceptor.java \
-  ch/boye/httpclientandroidlib/HttpResponse.java \
-  ch/boye/httpclientandroidlib/HttpResponseFactory.java \
-  ch/boye/httpclientandroidlib/HttpResponseInterceptor.java \
-  ch/boye/httpclientandroidlib/HttpServerConnection.java \
-  ch/boye/httpclientandroidlib/HttpStatus.java \
-  ch/boye/httpclientandroidlib/HttpVersion.java \
-  ch/boye/httpclientandroidlib/impl/AbstractHttpClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/AbstractHttpServerConnection.java \
-  ch/boye/httpclientandroidlib/impl/auth/AuthSchemeBase.java \
-  ch/boye/httpclientandroidlib/impl/auth/BasicScheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/BasicSchemeFactory.java \
-  ch/boye/httpclientandroidlib/impl/auth/DigestScheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/DigestSchemeFactory.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMEngine.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMEngineException.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMEngineImpl.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMScheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMSchemeFactory.java \
-  ch/boye/httpclientandroidlib/impl/auth/RFC2617Scheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/SpnegoTokenGenerator.java \
-  ch/boye/httpclientandroidlib/impl/auth/UnsupportedDigestAlgorithmException.java \
-  ch/boye/httpclientandroidlib/impl/client/AbstractAuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/AbstractHttpClient.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicAuthCache.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicCookieStore.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicCredentialsProvider.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicResponseHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/ClientParamsStack.java \
-  ch/boye/httpclientandroidlib/impl/client/ContentEncodingHttpClient.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultConnectionKeepAliveStrategy.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultHttpClient.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultHttpRequestRetryHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultProxyAuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRedirectHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategy.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategyAdaptor.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRequestDirector.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultTargetAuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultUserTokenHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/EntityEnclosingRequestWrapper.java \
-  ch/boye/httpclientandroidlib/impl/client/RedirectLocations.java \
-  ch/boye/httpclientandroidlib/impl/client/RequestWrapper.java \
-  ch/boye/httpclientandroidlib/impl/client/RoutedRequest.java \
-  ch/boye/httpclientandroidlib/impl/client/TunnelRefusedException.java \
-  ch/boye/httpclientandroidlib/impl/conn/AbstractClientConnAdapter.java \
-  ch/boye/httpclientandroidlib/impl/conn/AbstractPooledConnAdapter.java \
-  ch/boye/httpclientandroidlib/impl/conn/AbstractPoolEntry.java \
-  ch/boye/httpclientandroidlib/impl/conn/ConnectionShutdownException.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnectionOperator.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultHttpRoutePlanner.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultResponseParser.java \
-  ch/boye/httpclientandroidlib/impl/conn/HttpInetSocketAddress.java \
-  ch/boye/httpclientandroidlib/impl/conn/IdleConnectionHandler.java \
-  ch/boye/httpclientandroidlib/impl/conn/LoggingSessionInputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/conn/LoggingSessionOutputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/conn/ProxySelectorRoutePlanner.java \
-  ch/boye/httpclientandroidlib/impl/conn/SchemeRegistryFactory.java \
-  ch/boye/httpclientandroidlib/impl/conn/SingleClientConnManager.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/AbstractConnPool.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPooledConnAdapter.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntry.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntryRef.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/ConnPoolByRoute.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/PoolEntryRequest.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueHandler.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueWorker.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/RouteSpecificPool.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThread.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThreadAborter.java \
-  ch/boye/httpclientandroidlib/impl/conn/Wire.java \
-  ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie2.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicCommentHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicDomainHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicExpiresHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicMaxAgeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicPathHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicSecureHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/CookieSpecBase.java \
-  ch/boye/httpclientandroidlib/impl/cookie/DateParseException.java \
-  ch/boye/httpclientandroidlib/impl/cookie/DateUtils.java \
-  ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDomainHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftHeaderParser.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixFilter.java \
-  ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixListParser.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109DomainHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109Spec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109SpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109VersionHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965CommentUrlAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965DiscardAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965DomainAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965PortAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965Spec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965SpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965VersionAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/DefaultConnectionReuseStrategy.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpRequestFactory.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpResponseFactory.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpServerConnection.java \
-  ch/boye/httpclientandroidlib/impl/EnglishReasonPhraseCatalog.java \
-  ch/boye/httpclientandroidlib/impl/entity/EntityDeserializer.java \
-  ch/boye/httpclientandroidlib/impl/entity/EntitySerializer.java \
-  ch/boye/httpclientandroidlib/impl/entity/LaxContentLengthStrategy.java \
-  ch/boye/httpclientandroidlib/impl/entity/StrictContentLengthStrategy.java \
-  ch/boye/httpclientandroidlib/impl/HttpConnectionMetricsImpl.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractMessageParser.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractMessageWriter.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractSessionInputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractSessionOutputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/io/ChunkedInputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/ChunkedOutputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/ContentLengthInputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/ContentLengthOutputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpRequestParser.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpRequestWriter.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpResponseParser.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpResponseWriter.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpTransportMetricsImpl.java \
-  ch/boye/httpclientandroidlib/impl/io/IdentityInputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/IdentityOutputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/SocketInputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/io/SocketOutputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/NoConnectionReuseStrategy.java \
-  ch/boye/httpclientandroidlib/impl/SocketHttpClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/SocketHttpServerConnection.java \
-  ch/boye/httpclientandroidlib/io/BufferInfo.java \
-  ch/boye/httpclientandroidlib/io/EofSensor.java \
-  ch/boye/httpclientandroidlib/io/HttpMessageParser.java \
-  ch/boye/httpclientandroidlib/io/HttpMessageWriter.java \
-  ch/boye/httpclientandroidlib/io/HttpTransportMetrics.java \
-  ch/boye/httpclientandroidlib/io/SessionInputBuffer.java \
-  ch/boye/httpclientandroidlib/io/SessionOutputBuffer.java \
-  ch/boye/httpclientandroidlib/MalformedChunkCodingException.java \
-  ch/boye/httpclientandroidlib/message/AbstractHttpMessage.java \
-  ch/boye/httpclientandroidlib/message/BasicHeader.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderElement.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderElementIterator.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderIterator.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderValueFormatter.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderValueParser.java \
-  ch/boye/httpclientandroidlib/message/BasicHttpEntityEnclosingRequest.java \
-  ch/boye/httpclientandroidlib/message/BasicHttpRequest.java \
-  ch/boye/httpclientandroidlib/message/BasicHttpResponse.java \
-  ch/boye/httpclientandroidlib/message/BasicLineFormatter.java \
-  ch/boye/httpclientandroidlib/message/BasicLineParser.java \
-  ch/boye/httpclientandroidlib/message/BasicListHeaderIterator.java \
-  ch/boye/httpclientandroidlib/message/BasicNameValuePair.java \
-  ch/boye/httpclientandroidlib/message/BasicRequestLine.java \
-  ch/boye/httpclientandroidlib/message/BasicStatusLine.java \
-  ch/boye/httpclientandroidlib/message/BasicTokenIterator.java \
-  ch/boye/httpclientandroidlib/message/BufferedHeader.java \
-  ch/boye/httpclientandroidlib/message/HeaderGroup.java \
-  ch/boye/httpclientandroidlib/message/HeaderValueFormatter.java \
-  ch/boye/httpclientandroidlib/message/HeaderValueParser.java \
-  ch/boye/httpclientandroidlib/message/LineFormatter.java \
-  ch/boye/httpclientandroidlib/message/LineParser.java \
-  ch/boye/httpclientandroidlib/message/ParserCursor.java \
-  ch/boye/httpclientandroidlib/MethodNotSupportedException.java \
-  ch/boye/httpclientandroidlib/NameValuePair.java \
-  ch/boye/httpclientandroidlib/NoHttpResponseException.java \
-  ch/boye/httpclientandroidlib/params/AbstractHttpParams.java \
-  ch/boye/httpclientandroidlib/params/BasicHttpParams.java \
-  ch/boye/httpclientandroidlib/params/CoreConnectionPNames.java \
-  ch/boye/httpclientandroidlib/params/CoreProtocolPNames.java \
-  ch/boye/httpclientandroidlib/params/DefaultedHttpParams.java \
-  ch/boye/httpclientandroidlib/params/HttpAbstractParamBean.java \
-  ch/boye/httpclientandroidlib/params/HttpConnectionParamBean.java \
-  ch/boye/httpclientandroidlib/params/HttpConnectionParams.java \
-  ch/boye/httpclientandroidlib/params/HttpParams.java \
-  ch/boye/httpclientandroidlib/params/HttpProtocolParamBean.java \
-  ch/boye/httpclientandroidlib/params/HttpProtocolParams.java \
-  ch/boye/httpclientandroidlib/params/SyncBasicHttpParams.java \
-  ch/boye/httpclientandroidlib/ParseException.java \
-  ch/boye/httpclientandroidlib/protocol/BasicHttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/BasicHttpProcessor.java \
-  ch/boye/httpclientandroidlib/protocol/DefaultedHttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/ExecutionContext.java \
-  ch/boye/httpclientandroidlib/protocol/HTTP.java \
-  ch/boye/httpclientandroidlib/protocol/HttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/HttpDateGenerator.java \
-  ch/boye/httpclientandroidlib/protocol/HttpExpectationVerifier.java \
-  ch/boye/httpclientandroidlib/protocol/HttpProcessor.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestExecutor.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestHandler.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerRegistry.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerResolver.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestInterceptorList.java \
-  ch/boye/httpclientandroidlib/protocol/HttpResponseInterceptorList.java \
-  ch/boye/httpclientandroidlib/protocol/HttpService.java \
-  ch/boye/httpclientandroidlib/protocol/ImmutableHttpProcessor.java \
-  ch/boye/httpclientandroidlib/protocol/RequestConnControl.java \
-  ch/boye/httpclientandroidlib/protocol/RequestContent.java \
-  ch/boye/httpclientandroidlib/protocol/RequestDate.java \
-  ch/boye/httpclientandroidlib/protocol/RequestExpectContinue.java \
-  ch/boye/httpclientandroidlib/protocol/RequestTargetHost.java \
-  ch/boye/httpclientandroidlib/protocol/RequestUserAgent.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseConnControl.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseContent.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseDate.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseServer.java \
-  ch/boye/httpclientandroidlib/protocol/SyncBasicHttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/UriPatternMatcher.java \
-  ch/boye/httpclientandroidlib/ProtocolException.java \
-  ch/boye/httpclientandroidlib/ProtocolVersion.java \
-  ch/boye/httpclientandroidlib/ReasonPhraseCatalog.java \
-  ch/boye/httpclientandroidlib/RequestLine.java \
-  ch/boye/httpclientandroidlib/StatusLine.java \
-  ch/boye/httpclientandroidlib/TokenIterator.java \
-  ch/boye/httpclientandroidlib/TruncatedChunkException.java \
-  ch/boye/httpclientandroidlib/UnsupportedHttpVersionException.java \
-  ch/boye/httpclientandroidlib/util/ByteArrayBuffer.java \
-  ch/boye/httpclientandroidlib/util/CharArrayBuffer.java \
-  ch/boye/httpclientandroidlib/util/EncodingUtils.java \
-  ch/boye/httpclientandroidlib/util/EntityUtils.java \
-  ch/boye/httpclientandroidlib/util/ExceptionUtils.java \
-  ch/boye/httpclientandroidlib/util/LangUtils.java \
-  ch/boye/httpclientandroidlib/util/VersionInfo.java \
-  org/json/simple/ItemList.java \
-  org/json/simple/JSONArray.java \
-  org/json/simple/JSONAware.java \
-  org/json/simple/JSONObject.java \
-  org/json/simple/JSONStreamAware.java \
-  org/json/simple/JSONValue.java \
-  org/json/simple/parser/ContainerFactory.java \
-  org/json/simple/parser/ContentHandler.java \
-  org/json/simple/parser/JSONParser.java \
-  org/json/simple/parser/ParseException.java \
-  org/json/simple/parser/Yylex.java \
-  org/json/simple/parser/Yytoken.java \
-  org/mozilla/apache/commons/codec/binary/Base32.java \
-  org/mozilla/apache/commons/codec/binary/Base32InputStream.java \
-  org/mozilla/apache/commons/codec/binary/Base32OutputStream.java \
-  org/mozilla/apache/commons/codec/binary/Base64.java \
-  org/mozilla/apache/commons/codec/binary/Base64InputStream.java \
-  org/mozilla/apache/commons/codec/binary/Base64OutputStream.java \
-  org/mozilla/apache/commons/codec/binary/BaseNCodec.java \
-  org/mozilla/apache/commons/codec/binary/BaseNCodecInputStream.java \
-  org/mozilla/apache/commons/codec/binary/BaseNCodecOutputStream.java \
-  org/mozilla/apache/commons/codec/binary/BinaryCodec.java \
-  org/mozilla/apache/commons/codec/binary/Hex.java \
-  org/mozilla/apache/commons/codec/binary/StringUtils.java \
-  org/mozilla/apache/commons/codec/BinaryDecoder.java \
-  org/mozilla/apache/commons/codec/BinaryEncoder.java \
-  org/mozilla/apache/commons/codec/CharEncoding.java \
-  org/mozilla/apache/commons/codec/Decoder.java \
-  org/mozilla/apache/commons/codec/DecoderException.java \
-  org/mozilla/apache/commons/codec/digest/DigestUtils.java \
-  org/mozilla/apache/commons/codec/Encoder.java \
-  org/mozilla/apache/commons/codec/EncoderException.java \
-  org/mozilla/apache/commons/codec/language/AbstractCaverphone.java \
-  org/mozilla/apache/commons/codec/language/Caverphone.java \
-  org/mozilla/apache/commons/codec/language/Caverphone1.java \
-  org/mozilla/apache/commons/codec/language/Caverphone2.java \
-  org/mozilla/apache/commons/codec/language/ColognePhonetic.java \
-  org/mozilla/apache/commons/codec/language/DoubleMetaphone.java \
-  org/mozilla/apache/commons/codec/language/Metaphone.java \
-  org/mozilla/apache/commons/codec/language/RefinedSoundex.java \
-  org/mozilla/apache/commons/codec/language/Soundex.java \
-  org/mozilla/apache/commons/codec/language/SoundexUtils.java \
-  org/mozilla/apache/commons/codec/net/BCodec.java \
-  org/mozilla/apache/commons/codec/net/QCodec.java \
-  org/mozilla/apache/commons/codec/net/QuotedPrintableCodec.java \
-  org/mozilla/apache/commons/codec/net/RFC1522Codec.java \
-  org/mozilla/apache/commons/codec/net/URLCodec.java \
-  org/mozilla/apache/commons/codec/net/Utils.java \
-  org/mozilla/apache/commons/codec/StringDecoder.java \
-  org/mozilla/apache/commons/codec/StringEncoder.java \
-  org/mozilla/apache/commons/codec/StringEncoderComparator.java \
-  $(NULL)
-
--- a/mobile/android/base/android-services.mozbuild
+++ b/mobile/android/base/android-services.mozbuild
@@ -21,8 +21,774 @@ ANDROID_RESFILES += [
     'resources/layout/sync_setup_webview.xml',
     'resources/values-large-v11/sync_styles.xml',
     'resources/values-v11/sync_styles.xml',
     'resources/values/sync_styles.xml',
     'resources/xml/sync_authenticator.xml',
     'resources/xml/sync_options.xml',
     'resources/xml/sync_syncadapter.xml',
 ]
+
+sync_thirdparty_java_files = [
+    'ch/boye/httpclientandroidlib/androidextra/HttpClientAndroidLog.java',
+    'ch/boye/httpclientandroidlib/annotation/GuardedBy.java',
+    'ch/boye/httpclientandroidlib/annotation/Immutable.java',
+    'ch/boye/httpclientandroidlib/annotation/NotThreadSafe.java',
+    'ch/boye/httpclientandroidlib/annotation/ThreadSafe.java',
+    'ch/boye/httpclientandroidlib/auth/AUTH.java',
+    'ch/boye/httpclientandroidlib/auth/AuthenticationException.java',
+    'ch/boye/httpclientandroidlib/auth/AuthScheme.java',
+    'ch/boye/httpclientandroidlib/auth/AuthSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/auth/AuthSchemeRegistry.java',
+    'ch/boye/httpclientandroidlib/auth/AuthScope.java',
+    'ch/boye/httpclientandroidlib/auth/AuthState.java',
+    'ch/boye/httpclientandroidlib/auth/BasicUserPrincipal.java',
+    'ch/boye/httpclientandroidlib/auth/ContextAwareAuthScheme.java',
+    'ch/boye/httpclientandroidlib/auth/Credentials.java',
+    'ch/boye/httpclientandroidlib/auth/InvalidCredentialsException.java',
+    'ch/boye/httpclientandroidlib/auth/MalformedChallengeException.java',
+    'ch/boye/httpclientandroidlib/auth/NTCredentials.java',
+    'ch/boye/httpclientandroidlib/auth/NTUserPrincipal.java',
+    'ch/boye/httpclientandroidlib/auth/params/AuthParamBean.java',
+    'ch/boye/httpclientandroidlib/auth/params/AuthParams.java',
+    'ch/boye/httpclientandroidlib/auth/params/AuthPNames.java',
+    'ch/boye/httpclientandroidlib/auth/UsernamePasswordCredentials.java',
+    'ch/boye/httpclientandroidlib/client/AuthCache.java',
+    'ch/boye/httpclientandroidlib/client/AuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/client/CircularRedirectException.java',
+    'ch/boye/httpclientandroidlib/client/ClientProtocolException.java',
+    'ch/boye/httpclientandroidlib/client/CookieStore.java',
+    'ch/boye/httpclientandroidlib/client/CredentialsProvider.java',
+    'ch/boye/httpclientandroidlib/client/entity/DecompressingEntity.java',
+    'ch/boye/httpclientandroidlib/client/entity/DeflateDecompressingEntity.java',
+    'ch/boye/httpclientandroidlib/client/entity/GzipDecompressingEntity.java',
+    'ch/boye/httpclientandroidlib/client/entity/UrlEncodedFormEntity.java',
+    'ch/boye/httpclientandroidlib/client/HttpClient.java',
+    'ch/boye/httpclientandroidlib/client/HttpRequestRetryHandler.java',
+    'ch/boye/httpclientandroidlib/client/HttpResponseException.java',
+    'ch/boye/httpclientandroidlib/client/methods/AbortableHttpRequest.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpDelete.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpEntityEnclosingRequestBase.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpGet.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpHead.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpOptions.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpPost.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpPut.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpRequestBase.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpTrace.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpUriRequest.java',
+    'ch/boye/httpclientandroidlib/client/NonRepeatableRequestException.java',
+    'ch/boye/httpclientandroidlib/client/params/AllClientPNames.java',
+    'ch/boye/httpclientandroidlib/client/params/AuthPolicy.java',
+    'ch/boye/httpclientandroidlib/client/params/ClientParamBean.java',
+    'ch/boye/httpclientandroidlib/client/params/ClientPNames.java',
+    'ch/boye/httpclientandroidlib/client/params/CookiePolicy.java',
+    'ch/boye/httpclientandroidlib/client/params/HttpClientParams.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ClientContext.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ClientContextConfigurer.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestAcceptEncoding.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestAddCookies.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestAuthCache.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestClientConnControl.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestDefaultHeaders.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestProxyAuthentication.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestTargetAuthentication.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ResponseAuthCache.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ResponseContentEncoding.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ResponseProcessCookies.java',
+    'ch/boye/httpclientandroidlib/client/RedirectException.java',
+    'ch/boye/httpclientandroidlib/client/RedirectHandler.java',
+    'ch/boye/httpclientandroidlib/client/RedirectStrategy.java',
+    'ch/boye/httpclientandroidlib/client/RequestDirector.java',
+    'ch/boye/httpclientandroidlib/client/ResponseHandler.java',
+    'ch/boye/httpclientandroidlib/client/UserTokenHandler.java',
+    'ch/boye/httpclientandroidlib/client/utils/CloneUtils.java',
+    'ch/boye/httpclientandroidlib/client/utils/Idn.java',
+    'ch/boye/httpclientandroidlib/client/utils/JdkIdn.java',
+    'ch/boye/httpclientandroidlib/client/utils/Punycode.java',
+    'ch/boye/httpclientandroidlib/client/utils/Rfc3492Idn.java',
+    'ch/boye/httpclientandroidlib/client/utils/URIUtils.java',
+    'ch/boye/httpclientandroidlib/client/utils/URLEncodedUtils.java',
+    'ch/boye/httpclientandroidlib/conn/BasicEofSensorWatcher.java',
+    'ch/boye/httpclientandroidlib/conn/BasicManagedEntity.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionManager.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionManagerFactory.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionOperator.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionRequest.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectionKeepAliveStrategy.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectionPoolTimeoutException.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectionReleaseTrigger.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectTimeoutException.java',
+    'ch/boye/httpclientandroidlib/conn/EofSensorInputStream.java',
+    'ch/boye/httpclientandroidlib/conn/EofSensorWatcher.java',
+    'ch/boye/httpclientandroidlib/conn/HttpHostConnectException.java',
+    'ch/boye/httpclientandroidlib/conn/HttpRoutedConnection.java',
+    'ch/boye/httpclientandroidlib/conn/ManagedClientConnection.java',
+    'ch/boye/httpclientandroidlib/conn/MultihomePlainSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/OperatedClientConnection.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnConnectionParamBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnConnectionPNames.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnManagerParamBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnManagerParams.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnManagerPNames.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnPerRoute.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnPerRouteBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnRouteParamBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnRouteParams.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnRoutePNames.java',
+    'ch/boye/httpclientandroidlib/conn/routing/BasicRouteDirector.java',
+    'ch/boye/httpclientandroidlib/conn/routing/HttpRoute.java',
+    'ch/boye/httpclientandroidlib/conn/routing/HttpRouteDirector.java',
+    'ch/boye/httpclientandroidlib/conn/routing/HttpRoutePlanner.java',
+    'ch/boye/httpclientandroidlib/conn/routing/RouteInfo.java',
+    'ch/boye/httpclientandroidlib/conn/routing/RouteTracker.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/HostNameResolver.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/PlainSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/Scheme.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SchemeRegistry.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/AbstractVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/AllowAllHostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/BrowserCompatHostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/SSLSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/StrictHostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/TrustManagerDecorator.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/TrustSelfSignedStrategy.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/TrustStrategy.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/X509HostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/util/InetAddressUtils.java',
+    'ch/boye/httpclientandroidlib/ConnectionClosedException.java',
+    'ch/boye/httpclientandroidlib/ConnectionReuseStrategy.java',
+    'ch/boye/httpclientandroidlib/cookie/ClientCookie.java',
+    'ch/boye/httpclientandroidlib/cookie/Cookie.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieIdentityComparator.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieOrigin.java',
+    'ch/boye/httpclientandroidlib/cookie/CookiePathComparator.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieRestrictionViolationException.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieSpec.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieSpecFactory.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieSpecRegistry.java',
+    'ch/boye/httpclientandroidlib/cookie/MalformedCookieException.java',
+    'ch/boye/httpclientandroidlib/cookie/params/CookieSpecParamBean.java',
+    'ch/boye/httpclientandroidlib/cookie/params/CookieSpecPNames.java',
+    'ch/boye/httpclientandroidlib/cookie/SetCookie.java',
+    'ch/boye/httpclientandroidlib/cookie/SetCookie2.java',
+    'ch/boye/httpclientandroidlib/cookie/SM.java',
+    'ch/boye/httpclientandroidlib/entity/AbstractHttpEntity.java',
+    'ch/boye/httpclientandroidlib/entity/BasicHttpEntity.java',
+    'ch/boye/httpclientandroidlib/entity/BufferedHttpEntity.java',
+    'ch/boye/httpclientandroidlib/entity/ByteArrayEntity.java',
+    'ch/boye/httpclientandroidlib/entity/ContentLengthStrategy.java',
+    'ch/boye/httpclientandroidlib/entity/ContentProducer.java',
+    'ch/boye/httpclientandroidlib/entity/EntityTemplate.java',
+    'ch/boye/httpclientandroidlib/entity/FileEntity.java',
+    'ch/boye/httpclientandroidlib/entity/HttpEntityWrapper.java',
+    'ch/boye/httpclientandroidlib/entity/InputStreamEntity.java',
+    'ch/boye/httpclientandroidlib/entity/SerializableEntity.java',
+    'ch/boye/httpclientandroidlib/entity/StringEntity.java',
+    'ch/boye/httpclientandroidlib/FormattedHeader.java',
+    'ch/boye/httpclientandroidlib/Header.java',
+    'ch/boye/httpclientandroidlib/HeaderElement.java',
+    'ch/boye/httpclientandroidlib/HeaderElementIterator.java',
+    'ch/boye/httpclientandroidlib/HeaderIterator.java',
+    'ch/boye/httpclientandroidlib/HttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/HttpConnection.java',
+    'ch/boye/httpclientandroidlib/HttpConnectionMetrics.java',
+    'ch/boye/httpclientandroidlib/HttpEntity.java',
+    'ch/boye/httpclientandroidlib/HttpEntityEnclosingRequest.java',
+    'ch/boye/httpclientandroidlib/HttpException.java',
+    'ch/boye/httpclientandroidlib/HttpHeaders.java',
+    'ch/boye/httpclientandroidlib/HttpHost.java',
+    'ch/boye/httpclientandroidlib/HttpInetConnection.java',
+    'ch/boye/httpclientandroidlib/HttpMessage.java',
+    'ch/boye/httpclientandroidlib/HttpRequest.java',
+    'ch/boye/httpclientandroidlib/HttpRequestFactory.java',
+    'ch/boye/httpclientandroidlib/HttpRequestInterceptor.java',
+    'ch/boye/httpclientandroidlib/HttpResponse.java',
+    'ch/boye/httpclientandroidlib/HttpResponseFactory.java',
+    'ch/boye/httpclientandroidlib/HttpResponseInterceptor.java',
+    'ch/boye/httpclientandroidlib/HttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/HttpStatus.java',
+    'ch/boye/httpclientandroidlib/HttpVersion.java',
+    'ch/boye/httpclientandroidlib/impl/AbstractHttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/AbstractHttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/impl/auth/AuthSchemeBase.java',
+    'ch/boye/httpclientandroidlib/impl/auth/BasicScheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/BasicSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/impl/auth/DigestScheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/DigestSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMEngine.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMEngineException.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMEngineImpl.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMScheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/impl/auth/RFC2617Scheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/SpnegoTokenGenerator.java',
+    'ch/boye/httpclientandroidlib/impl/auth/UnsupportedDigestAlgorithmException.java',
+    'ch/boye/httpclientandroidlib/impl/client/AbstractAuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/AbstractHttpClient.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicAuthCache.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicCookieStore.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicCredentialsProvider.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicResponseHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/ClientParamsStack.java',
+    'ch/boye/httpclientandroidlib/impl/client/ContentEncodingHttpClient.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultConnectionKeepAliveStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultHttpClient.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultHttpRequestRetryHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultProxyAuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRedirectHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategyAdaptor.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRequestDirector.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultTargetAuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultUserTokenHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/EntityEnclosingRequestWrapper.java',
+    'ch/boye/httpclientandroidlib/impl/client/RedirectLocations.java',
+    'ch/boye/httpclientandroidlib/impl/client/RequestWrapper.java',
+    'ch/boye/httpclientandroidlib/impl/client/RoutedRequest.java',
+    'ch/boye/httpclientandroidlib/impl/client/TunnelRefusedException.java',
+    'ch/boye/httpclientandroidlib/impl/conn/AbstractClientConnAdapter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/AbstractPooledConnAdapter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/AbstractPoolEntry.java',
+    'ch/boye/httpclientandroidlib/impl/conn/ConnectionShutdownException.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnectionOperator.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultHttpRoutePlanner.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultResponseParser.java',
+    'ch/boye/httpclientandroidlib/impl/conn/HttpInetSocketAddress.java',
+    'ch/boye/httpclientandroidlib/impl/conn/IdleConnectionHandler.java',
+    'ch/boye/httpclientandroidlib/impl/conn/LoggingSessionInputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/conn/LoggingSessionOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/conn/ProxySelectorRoutePlanner.java',
+    'ch/boye/httpclientandroidlib/impl/conn/SchemeRegistryFactory.java',
+    'ch/boye/httpclientandroidlib/impl/conn/SingleClientConnManager.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/AbstractConnPool.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPooledConnAdapter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntry.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntryRef.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/ConnPoolByRoute.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/PoolEntryRequest.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueHandler.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueWorker.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/RouteSpecificPool.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThread.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThreadAborter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/Wire.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie2.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicCommentHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicDomainHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicExpiresHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicMaxAgeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicPathHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicSecureHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/CookieSpecBase.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/DateParseException.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/DateUtils.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDomainHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftHeaderParser.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixFilter.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixListParser.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109DomainHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109Spec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109SpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109VersionHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965CommentUrlAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965DiscardAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965DomainAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965PortAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965Spec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965SpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965VersionAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultConnectionReuseStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpRequestFactory.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpResponseFactory.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/impl/EnglishReasonPhraseCatalog.java',
+    'ch/boye/httpclientandroidlib/impl/entity/EntityDeserializer.java',
+    'ch/boye/httpclientandroidlib/impl/entity/EntitySerializer.java',
+    'ch/boye/httpclientandroidlib/impl/entity/LaxContentLengthStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/entity/StrictContentLengthStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/HttpConnectionMetricsImpl.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractMessageParser.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractMessageWriter.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractSessionInputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractSessionOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/io/ChunkedInputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/ChunkedOutputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/ContentLengthInputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/ContentLengthOutputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpRequestParser.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpRequestWriter.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpResponseParser.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpResponseWriter.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpTransportMetricsImpl.java',
+    'ch/boye/httpclientandroidlib/impl/io/IdentityInputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/IdentityOutputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/SocketInputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/io/SocketOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/NoConnectionReuseStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/SocketHttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/SocketHttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/io/BufferInfo.java',
+    'ch/boye/httpclientandroidlib/io/EofSensor.java',
+    'ch/boye/httpclientandroidlib/io/HttpMessageParser.java',
+    'ch/boye/httpclientandroidlib/io/HttpMessageWriter.java',
+    'ch/boye/httpclientandroidlib/io/HttpTransportMetrics.java',
+    'ch/boye/httpclientandroidlib/io/SessionInputBuffer.java',
+    'ch/boye/httpclientandroidlib/io/SessionOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/MalformedChunkCodingException.java',
+    'ch/boye/httpclientandroidlib/message/AbstractHttpMessage.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeader.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderElement.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderElementIterator.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderIterator.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderValueFormatter.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderValueParser.java',
+    'ch/boye/httpclientandroidlib/message/BasicHttpEntityEnclosingRequest.java',
+    'ch/boye/httpclientandroidlib/message/BasicHttpRequest.java',
+    'ch/boye/httpclientandroidlib/message/BasicHttpResponse.java',
+    'ch/boye/httpclientandroidlib/message/BasicLineFormatter.java',
+    'ch/boye/httpclientandroidlib/message/BasicLineParser.java',
+    'ch/boye/httpclientandroidlib/message/BasicListHeaderIterator.java',
+    'ch/boye/httpclientandroidlib/message/BasicNameValuePair.java',
+    'ch/boye/httpclientandroidlib/message/BasicRequestLine.java',
+    'ch/boye/httpclientandroidlib/message/BasicStatusLine.java',
+    'ch/boye/httpclientandroidlib/message/BasicTokenIterator.java',
+    'ch/boye/httpclientandroidlib/message/BufferedHeader.java',
+    'ch/boye/httpclientandroidlib/message/HeaderGroup.java',
+    'ch/boye/httpclientandroidlib/message/HeaderValueFormatter.java',
+    'ch/boye/httpclientandroidlib/message/HeaderValueParser.java',
+    'ch/boye/httpclientandroidlib/message/LineFormatter.java',
+    'ch/boye/httpclientandroidlib/message/LineParser.java',
+    'ch/boye/httpclientandroidlib/message/ParserCursor.java',
+    'ch/boye/httpclientandroidlib/MethodNotSupportedException.java',
+    'ch/boye/httpclientandroidlib/NameValuePair.java',
+    'ch/boye/httpclientandroidlib/NoHttpResponseException.java',
+    'ch/boye/httpclientandroidlib/params/AbstractHttpParams.java',
+    'ch/boye/httpclientandroidlib/params/BasicHttpParams.java',
+    'ch/boye/httpclientandroidlib/params/CoreConnectionPNames.java',
+    'ch/boye/httpclientandroidlib/params/CoreProtocolPNames.java',
+    'ch/boye/httpclientandroidlib/params/DefaultedHttpParams.java',
+    'ch/boye/httpclientandroidlib/params/HttpAbstractParamBean.java',
+    'ch/boye/httpclientandroidlib/params/HttpConnectionParamBean.java',
+    'ch/boye/httpclientandroidlib/params/HttpConnectionParams.java',
+    'ch/boye/httpclientandroidlib/params/HttpParams.java',
+    'ch/boye/httpclientandroidlib/params/HttpProtocolParamBean.java',
+    'ch/boye/httpclientandroidlib/params/HttpProtocolParams.java',
+    'ch/boye/httpclientandroidlib/params/SyncBasicHttpParams.java',
+    'ch/boye/httpclientandroidlib/ParseException.java',
+    'ch/boye/httpclientandroidlib/protocol/BasicHttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/BasicHttpProcessor.java',
+    'ch/boye/httpclientandroidlib/protocol/DefaultedHttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/ExecutionContext.java',
+    'ch/boye/httpclientandroidlib/protocol/HTTP.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpDateGenerator.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpExpectationVerifier.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpProcessor.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestExecutor.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestHandler.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerRegistry.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerResolver.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestInterceptorList.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpResponseInterceptorList.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpService.java',
+    'ch/boye/httpclientandroidlib/protocol/ImmutableHttpProcessor.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestConnControl.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestContent.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestDate.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestExpectContinue.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestTargetHost.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestUserAgent.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseConnControl.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseContent.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseDate.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseServer.java',
+    'ch/boye/httpclientandroidlib/protocol/SyncBasicHttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/UriPatternMatcher.java',
+    'ch/boye/httpclientandroidlib/ProtocolException.java',
+    'ch/boye/httpclientandroidlib/ProtocolVersion.java',
+    'ch/boye/httpclientandroidlib/ReasonPhraseCatalog.java',
+    'ch/boye/httpclientandroidlib/RequestLine.java',
+    'ch/boye/httpclientandroidlib/StatusLine.java',
+    'ch/boye/httpclientandroidlib/TokenIterator.java',
+    'ch/boye/httpclientandroidlib/TruncatedChunkException.java',
+    'ch/boye/httpclientandroidlib/UnsupportedHttpVersionException.java',
+    'ch/boye/httpclientandroidlib/util/ByteArrayBuffer.java',
+    'ch/boye/httpclientandroidlib/util/CharArrayBuffer.java',
+    'ch/boye/httpclientandroidlib/util/EncodingUtils.java',
+    'ch/boye/httpclientandroidlib/util/EntityUtils.java',
+    'ch/boye/httpclientandroidlib/util/ExceptionUtils.java',
+    'ch/boye/httpclientandroidlib/util/LangUtils.java',
+    'ch/boye/httpclientandroidlib/util/VersionInfo.java',
+    'org/json/simple/ItemList.java',
+    'org/json/simple/JSONArray.java',
+    'org/json/simple/JSONAware.java',
+    'org/json/simple/JSONObject.java',
+    'org/json/simple/JSONStreamAware.java',
+    'org/json/simple/JSONValue.java',
+    'org/json/simple/parser/ContainerFactory.java',
+    'org/json/simple/parser/ContentHandler.java',
+    'org/json/simple/parser/JSONParser.java',
+    'org/json/simple/parser/ParseException.java',
+    'org/json/simple/parser/Yylex.java',
+    'org/json/simple/parser/Yytoken.java',
+    'org/mozilla/apache/commons/codec/binary/Base32.java',
+    'org/mozilla/apache/commons/codec/binary/Base32InputStream.java',
+    'org/mozilla/apache/commons/codec/binary/Base32OutputStream.java',
+    'org/mozilla/apache/commons/codec/binary/Base64.java',
+    'org/mozilla/apache/commons/codec/binary/Base64InputStream.java',
+    'org/mozilla/apache/commons/codec/binary/Base64OutputStream.java',
+    'org/mozilla/apache/commons/codec/binary/BaseNCodec.java',
+    'org/mozilla/apache/commons/codec/binary/BaseNCodecInputStream.java',
+    'org/mozilla/apache/commons/codec/binary/BaseNCodecOutputStream.java',
+    'org/mozilla/apache/commons/codec/binary/BinaryCodec.java',
+    'org/mozilla/apache/commons/codec/binary/Hex.java',
+    'org/mozilla/apache/commons/codec/binary/StringUtils.java',
+    'org/mozilla/apache/commons/codec/BinaryDecoder.java',
+    'org/mozilla/apache/commons/codec/BinaryEncoder.java',
+    'org/mozilla/apache/commons/codec/CharEncoding.java',
+    'org/mozilla/apache/commons/codec/Decoder.java',
+    'org/mozilla/apache/commons/codec/DecoderException.java',
+    'org/mozilla/apache/commons/codec/digest/DigestUtils.java',
+    'org/mozilla/apache/commons/codec/Encoder.java',
+    'org/mozilla/apache/commons/codec/EncoderException.java',
+    'org/mozilla/apache/commons/codec/language/AbstractCaverphone.java',
+    'org/mozilla/apache/commons/codec/language/Caverphone.java',
+    'org/mozilla/apache/commons/codec/language/Caverphone1.java',
+    'org/mozilla/apache/commons/codec/language/Caverphone2.java',
+    'org/mozilla/apache/commons/codec/language/ColognePhonetic.java',
+    'org/mozilla/apache/commons/codec/language/DoubleMetaphone.java',
+    'org/mozilla/apache/commons/codec/language/Metaphone.java',
+    'org/mozilla/apache/commons/codec/language/RefinedSoundex.java',
+    'org/mozilla/apache/commons/codec/language/Soundex.java',
+    'org/mozilla/apache/commons/codec/language/SoundexUtils.java',
+    'org/mozilla/apache/commons/codec/net/BCodec.java',
+    'org/mozilla/apache/commons/codec/net/QCodec.java',
+    'org/mozilla/apache/commons/codec/net/QuotedPrintableCodec.java',
+    'org/mozilla/apache/commons/codec/net/RFC1522Codec.java',
+    'org/mozilla/apache/commons/codec/net/URLCodec.java',
+    'org/mozilla/apache/commons/codec/net/Utils.java',
+    'org/mozilla/apache/commons/codec/StringDecoder.java',
+    'org/mozilla/apache/commons/codec/StringEncoder.java',
+    'org/mozilla/apache/commons/codec/StringEncoderComparator.java',
+]
+
+sync_java_files = [
+    'background/announcements/Announcement.java',
+    'background/announcements/AnnouncementPresenter.java',
+    'background/announcements/AnnouncementsBroadcastReceiver.java',
+    'background/announcements/AnnouncementsBroadcastService.java',
+    'background/announcements/AnnouncementsFetchDelegate.java',
+    'background/announcements/AnnouncementsFetcher.java',
+    'background/announcements/AnnouncementsFetchResourceDelegate.java',
+    'background/announcements/AnnouncementsService.java',
+    'background/BackgroundService.java',
+    'background/bagheera/BagheeraClient.java',
+    'background/bagheera/BagheeraRequestDelegate.java',
+    'background/bagheera/BoundedByteArrayEntity.java',
+    'background/bagheera/DeflateHelper.java',
+    'background/common/DateUtils.java',
+    'background/common/log/Logger.java',
+    'background/common/log/writers/AndroidLevelCachingLogWriter.java',
+    'background/common/log/writers/AndroidLogWriter.java',
+    'background/common/log/writers/LevelFilteringLogWriter.java',
+    'background/common/log/writers/LogWriter.java',
+    'background/common/log/writers/PrintLogWriter.java',
+    'background/common/log/writers/SimpleTagLogWriter.java',
+    'background/common/log/writers/StringLogWriter.java',
+    'background/common/log/writers/TagLogWriter.java',
+    'background/common/log/writers/ThreadLocalTagLogWriter.java',
+    'background/datareporting/TelemetryRecorder.java',
+    'background/db/CursorDumper.java',
+    'background/db/Tab.java',
+    'background/healthreport/Environment.java',
+    'background/healthreport/EnvironmentBuilder.java',
+    'background/healthreport/EnvironmentV1.java',
+    'background/healthreport/HealthReportBroadcastReceiver.java',
+    'background/healthreport/HealthReportBroadcastService.java',
+    'background/healthreport/HealthReportDatabases.java',
+    'background/healthreport/HealthReportDatabaseStorage.java',
+    'background/healthreport/HealthReportGenerator.java',
+    'background/healthreport/HealthReportProvider.java',
+    'background/healthreport/HealthReportStorage.java',
+    'background/healthreport/HealthReportUtils.java',
+    'background/healthreport/ProfileInformationCache.java',
+    'background/healthreport/prune/HealthReportPruneService.java',
+    'background/healthreport/prune/PrunePolicy.java',
+    'background/healthreport/prune/PrunePolicyDatabaseStorage.java',
+    'background/healthreport/prune/PrunePolicyStorage.java',
+    'background/healthreport/upload/AndroidSubmissionClient.java',
+    'background/healthreport/upload/HealthReportUploadService.java',
+    'background/healthreport/upload/ObsoleteDocumentTracker.java',
+    'background/healthreport/upload/SubmissionClient.java',
+    'background/healthreport/upload/SubmissionPolicy.java',
+    'sync/AlreadySyncingException.java',
+    'sync/CollectionKeys.java',
+    'sync/CommandProcessor.java',
+    'sync/CommandRunner.java',
+    'sync/config/AccountPickler.java',
+    'sync/config/activities/SelectEnginesActivity.java',
+    'sync/config/ClientRecordTerminator.java',
+    'sync/config/ConfigurationMigrator.java',
+    'sync/CredentialException.java',
+    'sync/CredentialsSource.java',
+    'sync/crypto/CryptoException.java',
+    'sync/crypto/CryptoInfo.java',
+    'sync/crypto/HKDF.java',
+    'sync/crypto/HMACVerificationException.java',
+    'sync/crypto/KeyBundle.java',
+    'sync/crypto/MissingCryptoInputException.java',
+    'sync/crypto/NoKeyBundleException.java',
+    'sync/crypto/PersistedCrypto5Keys.java',
+    'sync/CryptoRecord.java',
+    'sync/DelayedWorkTracker.java',
+    'sync/delegates/ClientsDataDelegate.java',
+    'sync/delegates/FreshStartDelegate.java',
+    'sync/delegates/GlobalSessionCallback.java',
+    'sync/delegates/JSONRecordFetchDelegate.java',
+    'sync/delegates/KeyUploadDelegate.java',
+    'sync/delegates/MetaGlobalDelegate.java',
+    'sync/delegates/WipeServerDelegate.java',
+    'sync/EngineSettings.java',
+    'sync/ExtendedJSONObject.java',
+    'sync/GlobalSession.java',
+    'sync/HTTPFailureException.java',
+    'sync/InfoCollections.java',
+    'sync/InfoCounts.java',
+    'sync/jpake/BigIntegerHelper.java',
+    'sync/jpake/Gx3OrGx4IsZeroOrOneException.java',
+    'sync/jpake/IncorrectZkpException.java',
+    'sync/jpake/JPakeClient.java',
+    'sync/jpake/JPakeCrypto.java',
+    'sync/jpake/JPakeJson.java',
+    'sync/jpake/JPakeNoActivePairingException.java',
+    'sync/jpake/JPakeNumGenerator.java',
+    'sync/jpake/JPakeNumGeneratorRandom.java',
+    'sync/jpake/JPakeParty.java',
+    'sync/jpake/stage/CompleteStage.java',
+    'sync/jpake/stage/ComputeFinalStage.java',
+    'sync/jpake/stage/ComputeKeyVerificationStage.java',
+    'sync/jpake/stage/ComputeStepOneStage.java',
+    'sync/jpake/stage/ComputeStepTwoStage.java',
+    'sync/jpake/stage/DecryptDataStage.java',
+    'sync/jpake/stage/DeleteChannel.java',
+    'sync/jpake/stage/GetChannelStage.java',
+    'sync/jpake/stage/GetRequestStage.java',
+    'sync/jpake/stage/JPakeStage.java',
+    'sync/jpake/stage/PutRequestStage.java',
+    'sync/jpake/stage/VerifyPairingStage.java',
+    'sync/jpake/Zkp.java',
+    'sync/JSONRecordFetcher.java',
+    'sync/KeyBundleProvider.java',
+    'sync/MetaGlobal.java',
+    'sync/MetaGlobalException.java',
+    'sync/MetaGlobalMissingEnginesException.java',
+    'sync/MetaGlobalNotSetException.java',
+    'sync/middleware/Crypto5MiddlewareRepository.java',
+    'sync/middleware/Crypto5MiddlewareRepositorySession.java',
+    'sync/middleware/MiddlewareRepository.java',
+    'sync/middleware/MiddlewareRepositorySession.java',
+    'sync/net/AuthHeaderProvider.java',
+    'sync/net/BaseResource.java',
+    'sync/net/BaseResourceDelegate.java',
+    'sync/net/BasicAuthHeaderProvider.java',
+    'sync/net/BrowserIDAuthHeaderProvider.java',
+    'sync/net/ConnectionMonitorThread.java',
+    'sync/net/HandleProgressException.java',
+    'sync/net/HawkAuthHeaderProvider.java',
+    'sync/net/HMACAuthHeaderProvider.java',
+    'sync/net/HttpResponseObserver.java',
+    'sync/net/Resource.java',
+    'sync/net/ResourceDelegate.java',
+    'sync/net/SyncResponse.java',
+    'sync/net/SyncStorageCollectionRequest.java',
+    'sync/net/SyncStorageCollectionRequestDelegate.java',
+    'sync/net/SyncStorageRecordRequest.java',
+    'sync/net/SyncStorageRequest.java',
+    'sync/net/SyncStorageRequestDelegate.java',
+    'sync/net/SyncStorageRequestIncrementalDelegate.java',
+    'sync/net/SyncStorageResponse.java',
+    'sync/net/TLSSocketFactory.java',
+    'sync/net/WBOCollectionRequestDelegate.java',
+    'sync/net/WBORequestDelegate.java',
+    'sync/NoCollectionKeysSetException.java',
+    'sync/NodeAuthenticationException.java',
+    'sync/NonArrayJSONException.java',
+    'sync/NonObjectJSONException.java',
+    'sync/NullClusterURLException.java',
+    'sync/PersistedMetaGlobal.java',
+    'sync/PrefsSource.java',
+    'sync/receivers/SyncAccountDeletedReceiver.java',
+    'sync/receivers/SyncAccountDeletedService.java',
+    'sync/receivers/UpgradeReceiver.java',
+    'sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java',
+    'sync/repositories/android/AndroidBrowserBookmarksRepository.java',
+    'sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java',
+    'sync/repositories/android/AndroidBrowserHistoryDataAccessor.java',
+    'sync/repositories/android/AndroidBrowserHistoryDataExtender.java',
+    'sync/repositories/android/AndroidBrowserHistoryRepository.java',
+    'sync/repositories/android/AndroidBrowserHistoryRepositorySession.java',
+    'sync/repositories/android/AndroidBrowserRepository.java',
+    'sync/repositories/android/AndroidBrowserRepositoryDataAccessor.java',
+    'sync/repositories/android/AndroidBrowserRepositorySession.java',
+    'sync/repositories/android/BookmarksDeletionManager.java',
+    'sync/repositories/android/BookmarksInsertionManager.java',
+    'sync/repositories/android/BrowserContractHelpers.java',
+    'sync/repositories/android/CachedSQLiteOpenHelper.java',
+    'sync/repositories/android/ClientsDatabase.java',
+    'sync/repositories/android/ClientsDatabaseAccessor.java',
+    'sync/repositories/android/FennecTabsRepository.java',
+    'sync/repositories/android/FormHistoryRepositorySession.java',
+    'sync/repositories/android/PasswordsRepositorySession.java',
+    'sync/repositories/android/RepoUtils.java',
+    'sync/repositories/BookmarkNeedsReparentingException.java',
+    'sync/repositories/BookmarksRepository.java',
+    'sync/repositories/ConstrainedServer11Repository.java',
+    'sync/repositories/delegates/DeferrableRepositorySessionCreationDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionFinishDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionStoreDelegate.java',
+    'sync/repositories/delegates/RepositorySessionBeginDelegate.java',
+    'sync/repositories/delegates/RepositorySessionCleanDelegate.java',
+    'sync/repositories/delegates/RepositorySessionCreationDelegate.java',
+    'sync/repositories/delegates/RepositorySessionFetchRecordsDelegate.java',
+    'sync/repositories/delegates/RepositorySessionFinishDelegate.java',
+    'sync/repositories/delegates/RepositorySessionGuidsSinceDelegate.java',
+    'sync/repositories/delegates/RepositorySessionStoreDelegate.java',
+    'sync/repositories/delegates/RepositorySessionWipeDelegate.java',
+    'sync/repositories/domain/BookmarkRecord.java',
+    'sync/repositories/domain/BookmarkRecordFactory.java',
+    'sync/repositories/domain/ClientRecord.java',
+    'sync/repositories/domain/ClientRecordFactory.java',
+    'sync/repositories/domain/FormHistoryRecord.java',
+    'sync/repositories/domain/HistoryRecord.java',
+    'sync/repositories/domain/HistoryRecordFactory.java',
+    'sync/repositories/domain/PasswordRecord.java',
+    'sync/repositories/domain/Record.java',
+    'sync/repositories/domain/RecordParseException.java',
+    'sync/repositories/domain/TabsRecord.java',
+    'sync/repositories/domain/VersionConstants.java',
+    'sync/repositories/FetchFailedException.java',
+    'sync/repositories/HashSetStoreTracker.java',
+    'sync/repositories/HistoryRepository.java',
+    'sync/repositories/IdentityRecordFactory.java',
+    'sync/repositories/InactiveSessionException.java',
+    'sync/repositories/InvalidBookmarkTypeException.java',
+    'sync/repositories/InvalidRequestException.java',
+    'sync/repositories/InvalidSessionTransitionException.java',
+    'sync/repositories/MultipleRecordsForGuidException.java',
+    'sync/repositories/NoContentProviderException.java',
+    'sync/repositories/NoGuidForIdException.java',
+    'sync/repositories/NoStoreDelegateException.java',
+    'sync/repositories/NullCursorException.java',
+    'sync/repositories/ParentNotFoundException.java',
+    'sync/repositories/ProfileDatabaseException.java',
+    'sync/repositories/RecordFactory.java',
+    'sync/repositories/RecordFilter.java',
+    'sync/repositories/Repository.java',
+    'sync/repositories/RepositorySession.java',
+    'sync/repositories/RepositorySessionBundle.java',
+    'sync/repositories/Server11Repository.java',
+    'sync/repositories/Server11RepositorySession.java',
+    'sync/repositories/StoreFailedException.java',
+    'sync/repositories/StoreTracker.java',
+    'sync/repositories/StoreTrackingRepositorySession.java',
+    'sync/Server11PreviousPostFailedException.java',
+    'sync/Server11RecordPostFailedException.java',
+    'sync/setup/activities/AccountActivity.java',
+    'sync/setup/activities/ActivityUtils.java',
+    'sync/setup/activities/ClientRecordArrayAdapter.java',
+    'sync/setup/activities/RedirectToSetupActivity.java',
+    'sync/setup/activities/SendTabActivity.java',
+    'sync/setup/activities/SendTabData.java',
+    'sync/setup/activities/SetupFailureActivity.java',
+    'sync/setup/activities/SetupSuccessActivity.java',
+    'sync/setup/activities/SetupSyncActivity.java',
+    'sync/setup/activities/SyncActivity.java',
+    'sync/setup/activities/WebURLFinder.java',
+    'sync/setup/activities/WebViewActivity.java',
+    'sync/setup/auth/AccountAuthenticator.java',
+    'sync/setup/auth/AuthenticateAccountStage.java',
+    'sync/setup/auth/AuthenticationResult.java',
+    'sync/setup/auth/AuthenticatorStage.java',
+    'sync/setup/auth/EnsureUserExistenceStage.java',
+    'sync/setup/auth/FetchUserNodeStage.java',
+    'sync/setup/Constants.java',
+    'sync/setup/InvalidSyncKeyException.java',
+    'sync/setup/SyncAccounts.java',
+    'sync/setup/SyncAuthenticatorService.java',
+    'sync/stage/AbstractNonRepositorySyncStage.java',
+    'sync/stage/AbstractSessionManagingSyncStage.java',
+    'sync/stage/AndroidBrowserBookmarksServerSyncStage.java',
+    'sync/stage/AndroidBrowserHistoryServerSyncStage.java',
+    'sync/stage/CheckPreconditionsStage.java',
+    'sync/stage/CompletedStage.java',
+    'sync/stage/EnsureClusterURLStage.java',
+    'sync/stage/EnsureCrypto5KeysStage.java',
+    'sync/stage/FennecTabsServerSyncStage.java',
+    'sync/stage/FetchInfoCollectionsStage.java',
+    'sync/stage/FetchMetaGlobalStage.java',
+    'sync/stage/FormHistoryServerSyncStage.java',
+    'sync/stage/GlobalSyncStage.java',
+    'sync/stage/NoSuchStageException.java',
+    'sync/stage/NoSyncIDException.java',
+    'sync/stage/PasswordsServerSyncStage.java',
+    'sync/stage/SafeConstrainedServer11Repository.java',
+    'sync/stage/ServerSyncStage.java',
+    'sync/stage/SyncClientsEngineStage.java',
+    'sync/stage/UploadMetaGlobalStage.java',
+    'sync/syncadapter/SyncAdapter.java',
+    'sync/syncadapter/SyncService.java',
+    'sync/SyncConfiguration.java',
+    'sync/SyncConfigurationException.java',
+    'sync/SyncException.java',
+    'sync/synchronizer/ConcurrentRecordConsumer.java',
+    'sync/synchronizer/RecordConsumer.java',
+    'sync/synchronizer/RecordsChannel.java',
+    'sync/synchronizer/RecordsChannelDelegate.java',
+    'sync/synchronizer/RecordsConsumerDelegate.java',
+    'sync/synchronizer/SerialRecordConsumer.java',
+    'sync/synchronizer/ServerLocalSynchronizer.java',
+    'sync/synchronizer/ServerLocalSynchronizerSession.java',
+    'sync/synchronizer/SessionNotBegunException.java',
+    'sync/synchronizer/Synchronizer.java',
+    'sync/synchronizer/SynchronizerDelegate.java',
+    'sync/synchronizer/SynchronizerSession.java',
+    'sync/synchronizer/SynchronizerSessionDelegate.java',
+    'sync/synchronizer/UnbundleError.java',
+    'sync/synchronizer/UnexpectedSessionException.java',
+    'sync/SynchronizerConfiguration.java',
+    'sync/ThreadPool.java',
+    'sync/UnexpectedJSONException.java',
+    'sync/UnknownSynchronizerConfigurationVersionException.java',
+    'sync/Utils.java',
+]
+
+sync_generated_java_files = [
+    'background/common/GlobalConstants.java',
+    'sync/SyncConstants.java',
+    'background/announcements/AnnouncementsConstants.java',
+    'background/healthreport/HealthReportConstants.java',
+]
--- a/mobile/android/base/favicons/cache/FaviconCache.java
+++ b/mobile/android/base/favicons/cache/FaviconCache.java
@@ -626,15 +626,16 @@ public class FaviconCache {
 
     /**
      * Purge all elements from the FaviconCache. Handy if you want to reclaim some memory.
      */
     public void evictAll() {
         startWrite();
 
         try {
+            mCurrentSize.set(0);
             mBackingMap.clear();
             mOrdering.clear();
         } finally {
             finishWrite();
         }
     }
 }
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -3,16 +3,351 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['locales']
 
 include('android-services.mozbuild')
 
+thirdparty_source_dir = TOPSRCDIR + '/mobile/android/thirdparty/'
+
+mgjar = add_java_jar('gecko-mozglue')
+mgjar.sources += [
+    'mozglue/ByteBufferInputStream.java',
+    'mozglue/DirectBufferAllocator.java',
+    'mozglue/GeneratableAndroidBridgeTarget.java',
+    'mozglue/NativeReference.java',
+    'mozglue/NativeZip.java',
+    'mozglue/OptionalGeneratedParameter.java',
+]
+mgjar.generated_sources += [
+    'mozglue/GeckoLoader.java',
+]
+mgjar.javac_flags = '-Xlint:all'
+
+wsjar = add_java_jar('websockets')
+wsjar.sources += [ thirdparty_source_dir + f for f in [
+    'com/codebutler/android_websockets/HybiParser.java',
+    'com/codebutler/android_websockets/WebSocketClient.java',
+] ]
+wsjar.javac_flags = '-Xlint:all,-serial'
+
+gujar = add_java_jar('gecko-util')
+gujar.sources += [
+    'util/ActivityResultHandler.java',
+    'util/ActivityResultHandlerMap.java',
+    'util/Clipboard.java',
+    'util/EventDispatcher.java',
+    'util/FloatUtils.java',
+    'util/GamepadUtils.java',
+    'util/GeckoBackgroundThread.java',
+    'util/GeckoEventListener.java',
+    'util/GeckoEventResponder.java',
+    'util/GeckoJarReader.java',
+    'util/HardwareUtils.java',
+    'util/INIParser.java',
+    'util/INISection.java',
+    'util/JSONUtils.java',
+    'util/StringUtils.java',
+    'util/ThreadUtils.java',
+    'util/UiAsyncTask.java',
+]
+gujar.extra_jars=[
+    'gecko-mozglue.jar'
+]
+gujar.javac_flags = '-Xlint:all,-deprecation'
+
+stjar = add_java_jar('sync-thirdparty')
+stjar.sources += [ thirdparty_source_dir + f for f in sync_thirdparty_java_files ]
+stjar.javac_flags = '-Xlint:none'
+
+if CONFIG['MOZ_WEBRTC']:
+    video_root = TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_capture/android/java/org/webrtc/videoengine/'
+    audio_root = TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/audio_device/android/org/webrtc/voiceengine/'
+    wrjar = add_java_jar('webrtc')
+    wrjar.sources += [
+        video_root + 'CaptureCapabilityAndroid.java',
+        video_root + 'VideoCaptureAndroid.java',
+        video_root + 'VideoCaptureDeviceInfoAndroid.java',
+        audio_root + 'WebRTCAudioDevice.java',
+    ]
+    wrjar.extra_jars = [
+        'gecko-browser.jar',
+        'gecko-util.jar',
+        'gecko-mozglue.jar',
+    ]
+    wrjar.javac_flags = '-Xlint:all,-deprecation,-cast'
+
+gbjar = add_java_jar('gecko-browser')
+gbjar.sources += [
+    'ANRReporter.java',
+    'ActivityHandlerHelper.java',
+    'AlertNotification.java',
+    'AlignRightLinkPreference.java',
+    'AllCapsTextView.java',
+    'AndroidImport.java',
+    'AndroidImportPreference.java',
+    'AnimatedHeightLayout.java',
+    'AppNotificationClient.java',
+    'AutocompleteHandler.java',
+    'animation/AnimatorProxy.java',
+    'animation/HeightChangeAnimation.java',
+    'animation/PropertyAnimator.java',
+    'animation/Rotate3DAnimation.java',
+    'animation/ViewHelper.java',
+    'BackButton.java',
+    'BaseGeckoInterface.java',
+    'BrowserApp.java',
+    'BrowserToolbar.java',
+    'BrowserToolbarBackground.java',
+    'CameraImageResultHandler.java',
+    'CameraVideoResultHandler.java',
+    'CanvasDelegate.java',
+    'CheckableLinearLayout.java',
+    'ClickableWhenDisabledEditText.java',
+    'ContactService.java',
+    'ContextGetter.java',
+    'CustomEditText.java',
+    'db/BrowserDB.java',
+    'db/LocalBrowserDB.java',
+    'db/DBUtils.java',
+    'DataReportingNotification.java',
+    'Distribution.java',
+    'DoorHanger.java',
+    'DoorHangerPopup.java',
+    'EditBookmarkDialog.java',
+    'favicons/cache/FaviconCache.java',
+    'favicons/cache/FaviconCacheElement.java',
+    'favicons/cache/FaviconsForURL.java',
+    'favicons/Favicons.java',
+    'favicons/LoadFaviconTask.java',
+    'favicons/OnFaviconLoadedListener.java',
+    'FilePickerResultHandler.java',
+    'FilePickerResultHandlerSync.java',
+    'FindInPageBar.java',
+    'FlowLayout.java',
+    'FontSizePreference.java',
+    'FormAssistPopup.java',
+    'ForwardButton.java',
+    'GeckoAccessibility.java',
+    'GeckoApplication.java',
+    'GeckoApp.java',
+    'GeckoAppShell.java',
+    'GeckoActivity.java',
+    'GeckoBatteryManager.java',
+    'GeckoConnectivityReceiver.java',
+    'GeckoEditable.java',
+    'GeckoEvent.java',
+    'GeckoHalDefines.java',
+    'GeckoInputConnection.java',
+    'GeckoMessageReceiver.java',
+    'GeckoPreferences.java',
+    'GeckoPreferenceFragment.java',
+    'GeckoProfile.java',
+    'GeckoSmsManager.java',
+    'GeckoThread.java',
+    'GeckoJavaSampler.java',
+    'GlobalHistory.java',
+    'GeckoView.java',
+    'health/BrowserHealthRecorder.java',
+    'health/BrowserHealthReporter.java',
+    'InputMethods.java',
+    'JavaAddonManager.java',
+    'LightweightTheme.java',
+    'LightweightThemeDrawable.java',
+    'LinkPreference.java',
+    'MemoryMonitor.java',
+    'MotionEventInterceptor.java',
+    'MultiChoicePreference.java',
+    'NotificationClient.java',
+    'NotificationHandler.java',
+    'NotificationHelper.java',
+    'NotificationService.java',
+    'NSSBridge.java',
+    'OrderedBroadcastHelper.java',
+    'PageActionLayout.java',
+    'PrefsHelper.java',
+    'PrivateDataPreference.java',
+    'PrivateTab.java',
+    'prompts/Prompt.java',
+    'prompts/PromptInput.java',
+    'prompts/PromptService.java',
+    'prompts/IconGridInput.java',
+    'Restarter.java',
+    'sqlite/ByteBufferInputStream.java',
+    'sqlite/MatrixBlobCursor.java',
+    'sqlite/SQLiteBridge.java',
+    'sqlite/SQLiteBridgeException.java',
+    'ReaderModeUtils.java',
+    'RemoteTabs.java',
+    'RobocopAPI.java',
+    'ServiceNotificationClient.java',
+    'ScrollAnimator.java',
+    'SessionParser.java',
+    'ShapedButton.java',
+    'SharedPreferencesHelper.java',
+    'SiteIdentityPopup.java',
+    'SmsManager.java',
+    'SurfaceBits.java',
+    'SyncPreference.java',
+    'Tab.java',
+    'TabCounter.java',
+    'Tabs.java',
+    'TabsPanel.java',
+    'TabsTray.java',
+    'TabsAccessor.java',
+    'Telemetry.java',
+    'TextSelection.java',
+    'TextSelectionHandle.java',
+    'ThumbnailHelper.java',
+    'TouchEventInterceptor.java',
+    'VideoPlayer.java',
+    'WebAppAllocator.java',
+    'WebAppImpl.java',
+    'ZoomConstraints.java',
+    'db/BrowserContract.java',
+    'db/BrowserProvider.java',
+    'db/FormHistoryProvider.java',
+    'db/PerProfileContentProvider.java',
+    'db/PasswordsProvider.java',
+    'db/TabsProvider.java',
+    'gfx/Axis.java',
+    'gfx/BitmapUtils.java',
+    'gfx/BufferedCairoImage.java',
+    'gfx/CairoGLInfo.java',
+    'gfx/CairoImage.java',
+    'gfx/CairoUtils.java',
+    'gfx/DisplayPortCalculator.java',
+    'gfx/DisplayPortMetrics.java',
+    'gfx/DrawTimingQueue.java',
+    'gfx/FloatSize.java',
+    'gfx/GeckoLayerClient.java',
+    'gfx/GfxInfoThread.java',
+    'gfx/GLController.java',
+    'gfx/ImmutableViewportMetrics.java',
+    'gfx/InputConnectionHandler.java',
+    'gfx/IntSize.java',
+    'gfx/JavaPanZoomController.java',
+    'gfx/Layer.java',
+    'gfx/LayerMarginsAnimator.java',
+    'gfx/LayerRenderer.java',
+    'gfx/LayerView.java',
+    'gfx/NativePanZoomController.java',
+    'gfx/NinePatchTileLayer.java',
+    'gfx/Overscroll.java',
+    'gfx/PanningPerfAPI.java',
+    'gfx/PanZoomController.java',
+    'gfx/PanZoomTarget.java',
+    'gfx/PluginLayer.java',
+    'gfx/PointUtils.java',
+    'gfx/ProgressiveUpdateData.java',
+    'gfx/RectUtils.java',
+    'gfx/RenderTask.java',
+    'gfx/ScrollbarLayer.java',
+    'gfx/SimpleScaleGestureDetector.java',
+    'gfx/SingleTileLayer.java',
+    'gfx/SubdocumentScrollHelper.java',
+    'gfx/TextLayer.java',
+    'gfx/TextureGenerator.java',
+    'gfx/TextureReaper.java',
+    'gfx/TileLayer.java',
+    'gfx/TouchEventHandler.java',
+    'gfx/ViewTransform.java',
+    'gfx/VirtualLayer.java',
+    'home/BookmarksListAdapter.java',
+    'home/BookmarksListView.java',
+    'home/BookmarksPage.java',
+    'home/BookmarkFolderView.java',
+    'home/BrowserSearch.java',
+    'home/HistoryPage.java',
+    'home/HomeFragment.java',
+    'home/HomeListView.java',
+    'home/HomePager.java',
+    'home/HomePagerTabStrip.java',
+    'home/HomeBanner.java',
+    'home/FadedTextView.java',
+    'home/LastTabsPage.java',
+    'home/MostRecentPage.java',
+    'home/MultiTypeCursorAdapter.java',
+    'home/PinSiteDialog.java',
+    'home/ReadingListPage.java',
+    'home/SearchEngine.java',
+    'home/SearchEngineRow.java',
+    'home/SearchLoader.java',
+    'home/SimpleCursorLoader.java',
+    'home/SuggestClient.java',
+    'home/TabMenuStrip.java',
+    'home/TopSitesGridItemView.java',
+    'home/TopSitesGridView.java',
+    'home/TopSitesPage.java',
+    'home/TopSitesThumbnailView.java',
+    'home/TwoLinePageRow.java',
+    'menu/GeckoMenu.java',
+    'menu/GeckoMenuInflater.java',
+    'menu/GeckoMenuItem.java',
+    'menu/GeckoSubMenu.java',
+    'menu/MenuItemActionBar.java',
+    'menu/MenuItemActionView.java',
+    'menu/MenuItemDefault.java',
+    'menu/MenuPanel.java',
+    'menu/MenuPopup.java',
+    'preferences/SearchPreferenceCategory.java',
+    'preferences/SearchEnginePreference.java',
+    'updater/UpdateServiceHelper.java',
+    'updater/UpdateService.java',
+    'widget/ActivityChooserModel.java',
+    'widget/ButtonToast.java',
+    'widget/ArrowPopup.java',
+    'widget/DateTimePicker.java',
+    'widget/Divider.java',
+    'widget/FaviconView.java',
+    'widget/GeckoPopupMenu.java',
+    'widget/GeckoActionProvider.java',
+    'widget/IconTabWidget.java',
+    'widget/TabRow.java',
+    'widget/ThumbnailView.java',
+    'widget/TwoWayView.java',
+    'GeckoNetworkManager.java',
+    'GeckoScreenOrientationListener.java',
+    'GeckoUpdateReceiver.java',
+    'ReferrerReceiver.java',
+]
+gbjar.sources += [ thirdparty_source_dir + f for f in [
+    'com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java',
+    'com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java',
+    'com/googlecode/eyesfree/braille/selfbraille/WriteData.java',
+] ]
+gbjar.generated_sources += [
+    'App.java',
+    'AppConstants.java',
+    'R.java',
+    'SysInfo.java',
+    'WebApp.java',
+    'WebApps.java',
+    'widget/GeckoEditText.java',
+    'widget/GeckoImageButton.java',
+    'widget/GeckoImageView.java',
+    'widget/GeckoLinearLayout.java',
+    'widget/GeckoRelativeLayout.java',
+    'widget/GeckoTextSwitcher.java',
+    'widget/GeckoTextView.java',
+]
+if CONFIG['MOZ_CRASHREPORTER']:
+    gbjar.sources += [ 'CrashReporter.java ']
+gbjar.sources += sync_java_files
+gbjar.generated_sources += sync_generated_java_files
+gbjar.extra_jars=[
+    'gecko-mozglue.jar',
+    'gecko-util.jar',
+    'sync-thirdparty.jar',
+    'websockets.jar',
+]
+gbjar.javac_flags = '-Xlint:all,-deprecation,-fallthrough'
+
 ANDROID_GENERATED_RESFILES += [
     'res/drawable-hdpi/icon.png',
     'res/drawable-mdpi/icon.png',
     'res/drawable-xhdpi/icon.png',
     'res/drawable-xxhdpi/icon.png',
     'res/values/strings.xml',
 ]
 
--- a/mobile/android/geckoview_library/Makefile.in
+++ b/mobile/android/geckoview_library/Makefile.in
@@ -20,17 +20,17 @@ package:
 	# Zip the assets
 	cd $(DIST)/fennec; \
 	$(ZIP) -r ../geckoview_library/geckoview_assets.zip assets
 
 	# Make empty directories to fit an Android project structure
 	$(MKDIR) -p bin gen libs/$(ABI_DIR) src
 
 	# Copy the JARs
-	cp ../base/jars/*.jar libs/
+	cp ../base/*.jar libs/
 
 	# Copy the SOs
 	cp $(DIST)/bin/libmozglue.so $(DIST)/bin/lib/libplugin-container.so libs/$(ABI_DIR)/
 
 	# Copy the resources
 	cp -R ../base/res .
 
 	# Zip the directory
--- a/mobile/android/tests/background/junit3/Makefile.in
+++ b/mobile/android/tests/background/junit3/Makefile.in
@@ -20,17 +20,17 @@ GARBAGE += AndroidManifest.xml
 include $(srcdir)/android-services-files.mk
 
 # BACKGROUND_TESTS_{JAVA,RES}_FILES are defined in android-services-files.mk.
 JAVAFILES := $(BACKGROUND_TESTS_JAVA_FILES)
 
 # The test APK needs to know the contents of the target APK while not
 # being linked against them.  This is a best effort to avoid getting
 # out of sync with base's build config.
-JARS_DIR := $(DEPTH)/mobile/android/base/jars
+JARS_DIR := $(DEPTH)/mobile/android/base
 JAVA_BOOTCLASSPATH := $(JAVA_BOOTCLASSPATH):$(subst $(NULL) ,:,$(wildcard $(JARS_DIR)/*.jar))
 # We also want to re-compile classes.dex when the associated base
 # content changes.
 classes.dex: $(wildcard $(JARS_DIR)/*.jar)
 
 tools:: $(ANDROID_APK_NAME).apk
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libbz2/src/Makefile.in
+++ b/modules/libbz2/src/Makefile.in
@@ -1,15 +1,14 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This is defined by the bzip2-1.0.3 Makefile.  It appears to be used to
 # configure GLIBC to support large files.  This isn't something we care about
 # at this stage, since we're only interested in the streaming API, but we
 # define it here anyways for consistency.
--- a/modules/libbz2/src/moz.build
+++ b/modules/libbz2/src/moz.build
@@ -31,8 +31,9 @@ SOURCES += [
     'bzlib.c',
     'compress.c',
     'crctable.c',
     'decompress.c',
     'huffman.c',
     'randtable.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/modules/libmar/sign/Makefile.in
+++ b/modules/libmar/sign/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This makefile just builds support for reading archives.
 LOCAL_INCLUDES += -I$(srcdir)/../src \
   -I$(srcdir)/../verify \
   -I$(topsrcdir)/dist/include \
--- a/modules/libmar/sign/moz.build
+++ b/modules/libmar/sign/moz.build
@@ -8,8 +8,9 @@ MODULE = 'signmar'
 
 LIBRARY_NAME = 'signmar'
 
 SOURCES += [
     'mar_sign.c',
     'nss_secutil.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/modules/libmar/src/Makefile.in
+++ b/modules/libmar/src/Makefile.in
@@ -1,15 +1,14 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This makefile just builds support for reading archives.
 
 include $(topsrcdir)/config/rules.mk
 
--- a/modules/libmar/src/moz.build
+++ b/modules/libmar/src/moz.build
@@ -21,8 +21,9 @@ HOST_LIBRARY_NAME = 'hostmar'
 LIBRARY_NAME = 'mar'
 
 SOURCES += [
     'mar_create.c',
     'mar_extract.c',
     'mar_read.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/modules/libmar/verify/Makefile.in
+++ b/modules/libmar/verify/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This makefile just builds support for reading archives.
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 ifneq ($(OS_ARCH),WINNT)
--- a/modules/libmar/verify/moz.build
+++ b/modules/libmar/verify/moz.build
@@ -8,8 +8,9 @@ MODULE = 'verifymar'
 
 LIBRARY_NAME = 'verifymar'
 
 SOURCES += [
     'cryptox.c',
     'mar_verify.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/mozglue/android/Makefile.in
+++ b/mozglue/android/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 STL_FLAGS=
 DEFINES += \
   -DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"' \
   $(NULL)
 
 ifdef MOZ_FOLD_LIBS
 DEFINES += -DMOZ_FOLD_LIBS
 endif
--- a/mozglue/android/moz.build
+++ b/mozglue/android/moz.build
@@ -16,8 +16,9 @@ SOURCES += [
     'NSSBridge.cpp',
     'SQLiteBridge.cpp',
 ]
 
 LIBRARY_NAME = 'android'
 
 FAIL_ON_WARNINGS = True
 
+FORCE_STATIC_LIB = True
--- a/mozglue/build/Makefile.in
+++ b/mozglue/build/Makefile.in
@@ -4,18 +4,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_INSTALL = 1
 
 # Build mozglue as a shared lib on Windows, OSX and Android.
 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
 ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
 FORCE_SHARED_LIB = 1
-else
-FORCE_STATIC_LIB = 1
 endif
 
 # Keep jemalloc separated when mozglue is statically linked
 ifeq (1_1,$(MOZ_MEMORY)_$(or $(MOZ_NATIVE_JEMALLOC),$(FORCE_SHARED_LIB)))
 SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,memory,$(DEPTH)/memory/build)
 else
 # Temporary, until bug 662814 lands
 VISIBILITY_FLAGS =
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -7,20 +7,19 @@
 MODULE = 'mozglue'
 
 # Build mozglue as a shared lib on Windows, OSX and Android.
 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
 if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
     # TODO: These should be the all-caps variables when FORCE_SHARED_LIB and
     # FORCE_STATIC_LIB are ported over
     force_shared_lib = 1
-    force_static_lib = 0
 else:
     force_shared_lib = 0
-    force_static_lib = 1
+    FORCE_STATIC_LIB = True
 
 if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_NATIVE_JEMALLOC'] or force_shared_lib):
     pass
     # TODO: SHARED_LIBRARY_LIBS go here
 else:
     SOURCES += [
         'dummy.cpp',
     ]
--- a/mozglue/linker/Makefile.in
+++ b/mozglue/linker/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 STL_FLAGS =
 
 HOST_PROGRAM = szip
 
 HOST_LIBS = -lz
 
 DEFINES += -DIMPL_MFBT
 
--- a/mozglue/linker/moz.build
+++ b/mozglue/linker/moz.build
@@ -15,8 +15,10 @@ SOURCES += [
 ]
 
 LIBRARY_NAME = 'linker'
 
 HOST_SOURCES += [
     'SeekableZStream.cpp',
     'szip.cpp',
 ]
+
+FORCE_STATIC_LIB = True
--- a/netwerk/base/src/nsIncrementalDownload.cpp
+++ b/netwerk/base/src/nsIncrementalDownload.cpp
@@ -758,18 +758,21 @@ nsIncrementalDownload::OnDataAvailable(n
     if (NS_FAILED(rv))
       return rv;
     if (n != len)
       return NS_ERROR_UNEXPECTED;
 
     count -= n;
     mChunkLen += n;
 
-    if (mChunkLen == mChunkSize)
-      FlushChunk();
+    if (mChunkLen == mChunkSize) {
+      rv = FlushChunk();
+      if (NS_FAILED(rv))
+        return rv;
+    }
   }
 
   if (PR_Now() > mLastProgressUpdate + UPDATE_PROGRESS_INTERVAL)
     UpdateProgress();
 
   return NS_OK;
 }
 
--- a/netwerk/dns/effective_tld_names.dat
+++ b/netwerk/dns/effective_tld_names.dat
@@ -6846,16 +6846,20 @@ cloudcontrolapp.com
 
 // co.ca : http://registry.co.ca/
 co.ca
 
 // CoDNS B.V.
 co.nl
 co.no
 
+// Cupcake : https://cupcake.io/
+// Requested by Jonathan Rudenberg <jonathan@cupcake.io> 2013-10-08
+cupcake.is
+
 // DreamHost : http://www.dreamhost.com/
 // Requested by Andrew Farmer <andrew.farmer@dreamhost.com> 2012-10-02
 dreamhosters.com
 
 // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
 dyndns-at-home.com
 dyndns-at-work.com
 dyndns-blog.com
deleted file mode 100644
--- a/other-licenses/android/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-FORCE_STATIC_LIB = 1
--- a/other-licenses/android/moz.build
+++ b/other-licenses/android/moz.build
@@ -22,8 +22,9 @@ SOURCES += [
     'res_data.c',
     'res_debug.c',
     'res_init.c',
     'res_mkquery.c',
     'res_send.c',
     'res_state.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/parser/expat/lib/Makefile.in
+++ b/parser/expat/lib/Makefile.in
@@ -1,12 +1,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-# We want only the static lib, not the shared lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 xmltok.$(OBJ_SUFFIX): moz_extensions.c
 
 DEFINES += -DHAVE_EXPAT_CONFIG_H
--- a/parser/expat/lib/moz.build
+++ b/parser/expat/lib/moz.build
@@ -16,8 +16,10 @@ LIBRARY_NAME = 'mozexpat_s'
 SOURCES += [
     'xmlparse.c',
     'xmlrole.c',
     'xmltok.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+# We want only the static lib, not the shared lib
+FORCE_STATIC_LIB = True
--- a/profile/dirserviceprovider/src/Makefile.in
+++ b/profile/dirserviceprovider/src/Makefile.in
@@ -1,9 +1,6 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
 MOZILLA_INTERNAL_API = 1
-
-# we don't want the shared lib
-FORCE_STATIC_LIB = 1
--- a/profile/dirserviceprovider/src/moz.build
+++ b/profile/dirserviceprovider/src/moz.build
@@ -6,8 +6,11 @@
 
 MODULE = 'profdirserviceprovider'
 
 include('objs.mozbuild')
 
 SOURCES += modules_profiledirservice_src_csrcs
 
 LIBRARY_NAME = 'profdirserviceprovider_s'
+
+# we don't want the shared lib
+FORCE_STATIC_LIB = True
--- a/profile/dirserviceprovider/standalone/Makefile.in
+++ b/profile/dirserviceprovider/standalone/Makefile.in
@@ -1,13 +1,10 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES = -I$(srcdir)/../src
 
 DEFINES += -DXPCOM_GLUE
 STL_FLAGS =
--- a/profile/dirserviceprovider/standalone/moz.build
+++ b/profile/dirserviceprovider/standalone/moz.build
@@ -6,8 +6,10 @@
 
 MODULE = 'profdirserviceprovider'
 
 include('../src/objs.mozbuild')
 
 SOURCES += modules_profiledirservice_src_csrcs
 
 LIBRARY_NAME = 'profdirserviceprovidersa_s'
+
+FORCE_STATIC_LIB = True
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -26,21 +26,23 @@ from ..frontend.data import (
     Defines,
     DirectoryTraversal,
     Exports,
     GeneratedEventWebIDLFile,
     GeneratedInclude,
     GeneratedWebIDLFile,
     InstallationTarget,
     IPDLFile,
+    JavaJarData,
     LocalInclude,
     PreprocessedTestWebIDLFile,
     PreprocessedWebIDLFile,
     Program,
     SandboxDerived,
+    SandboxWrapped,
     TestWebIDLFile,
     VariablePassthru,
     XPIDLFile,
     TestManifest,
     WebIDLFile,
 )
 from ..util import (
     ensureParentDir,
@@ -412,16 +414,25 @@ class RecursiveMakeBackend(CommonBackend
             self._process_local_include(obj.path, backend_file)
 
         elif isinstance(obj, GeneratedInclude):
             self._process_generated_include(obj.path, backend_file)
 
         elif isinstance(obj, InstallationTarget):
             self._process_installation_target(obj, backend_file)
 
+        elif isinstance(obj, SandboxWrapped):
+            # Process a rich build system object from the front-end
+            # as-is.  Please follow precedent and handle CamelCaseData
+            # in a function named _process_camel_case_data.  At some
+            # point in the future, this unwrapping process may be
+            # automated.
+            if isinstance(obj.wrapped, JavaJarData):
+                self._process_java_jar_data(obj.wrapped, backend_file)
+
         self._backend_files[obj.srcdir] = backend_file
 
     def _fill_root_mk(self):
         """
         Create two files, root.mk and root-deps.mk, the first containing
         convenience variables, and the other dependency definitions for a
         hopefully proper directory traversal.
         """
@@ -999,16 +1010,33 @@ class RecursiveMakeBackend(CommonBackend
 
     def _process_generated_include(self, generated_include, backend_file):
         if generated_include.startswith('/'):
             path = self.environment.topobjdir.replace('\\', '/')
         else:
             path = ''
         backend_file.write('LOCAL_INCLUDES += -I%s%s\n' % (path, generated_include))
 
+    def _process_java_jar_data(self, jar, backend_file):
+        target = jar.name
+        backend_file.write('JAVA_JAR_TARGETS += %s\n' % target)
+        backend_file.write('%s_DEST := %s.jar\n' % (target, jar.name))
+        if jar.sources:
+            backend_file.write('%s_JAVAFILES := %s\n' %
+                (target, ' '.join(jar.sources)))
+        if jar.generated_sources:
+            backend_file.write('%s_PP_JAVAFILES := %s\n' %
+                (target, ' '.join(jar.generated_sources)))
+        if jar.extra_jars:
+            backend_file.write('%s_EXTRA_JARS := %s\n' %
+                (target, ' '.join(jar.extra_jars)))
+        if jar.javac_flags:
+            backend_file.write('%s_JAVAC_FLAGS := %s\n' %
+                (target, jar.javac_flags))
+
     def _write_manifests(self, dest, manifests):
         man_dir = os.path.join(self.environment.topobjdir, '_build_manifests',
             dest)
 
         # We have a purger for the manifests themselves to ensure legacy
         # manifests are deleted.
         purger = FilePurger()
 
--- a/python/mozbuild/mozbuild/frontend/data.py
+++ b/python/mozbuild/mozbuild/frontend/data.py
@@ -366,16 +366,64 @@ class GeneratedInclude(SandboxDerived):
         'path',
     )
 
     def __init__(self, sandbox, path):
         SandboxDerived.__init__(self, sandbox)
 
         self.path = path
 
+
+class SandboxWrapped(SandboxDerived):
+    """Generic sandbox container object for a wrapped rich object.
+
+    Use this wrapper class to shuttle a rich build system object
+    completely defined in moz.build files through the tree metadata
+    emitter to the build backend for processing as-is.
+    """
+
+    __slots__ = (
+        'wrapped',
+    )
+
+    def __init__(self, sandbox, wrapped):
+        SandboxDerived.__init__(self, sandbox)
+
+        self.wrapped = wrapped
+
+
+class JavaJarData(object):
+    """Represents a Java JAR file.
+
+    A Java JAR has the following members:
+        * sources - list of input java sources
+        * generated_sources - list of generated input java sources
+        * extra_jars - list of JAR file dependencies to include on the
+          javac compiler classpath
+        * javac_flags - string containing extra flags passed to the
+          javac compiler
+    """
+
+    __slots__ = (
+        'name',
+        'sources',
+        'generated_sources',
+        'extra_jars',
+        'javac_flags',
+    )
+
+    def __init__(self, name, sources=[], generated_sources=[],
+            extra_jars=[], javac_flags=None):
+        self.name = name
+        self.sources = list(sources)
+        self.generated_sources = list(generated_sources)
+        self.extra_jars = list(extra_jars)
+        self.javac_flags = javac_flags
+
+
 class InstallationTarget(SandboxDerived):
     """Describes the rules that affect where files get installed to."""
 
     __slots__ = (
         'xpiname',
         'subdir',
         'target',
         'enabled'
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -27,16 +27,17 @@ from .data import (
     GeneratedWebIDLFile,
     InstallationTarget,
     IPDLFile,
     LocalInclude,
     PreprocessedTestWebIDLFile,
     PreprocessedWebIDLFile,
     Program,
     ReaderSummary,
+    SandboxWrapped,
     TestWebIDLFile,
     TestManifest,
     VariablePassthru,
     WebIDLFile,
     XPIDLFile,
 )
 
 from .reader import (
@@ -253,16 +254,19 @@ class TreeMetadataEmitter(LoggingMixin):
             XPCSHELL_TESTS=('xpcshell', 'xpcshell', False),
         )
 
         for prefix, info in test_manifests.items():
             for path in sandbox.get('%s_MANIFESTS' % prefix, []):
                 for obj in self._process_test_manifest(sandbox, info, path):
                     yield obj
 
+        for name, jar in sandbox.get('JAVA_JAR_TARGETS', {}).items():
+            yield SandboxWrapped(sandbox, jar)
+
     def _process_test_manifest(self, sandbox, info, manifest_path):
         flavor, install_prefix, filter_inactive = info
 
         manifest_path = os.path.normpath(manifest_path)
         path = mozpath.normpath(mozpath.join(sandbox['SRCDIR'], manifest_path))
         manifest_dir = mozpath.dirname(path)
         manifest_reldir = mozpath.dirname(mozpath.relpath(path,
             sandbox['TOPSRCDIR']))
--- a/python/mozbuild/mozbuild/frontend/reader.py
+++ b/python/mozbuild/mozbuild/frontend/reader.py
@@ -35,16 +35,20 @@ from io import StringIO
 
 from mozbuild.util import (
     ReadOnlyDefaultDict,
     ReadOnlyDict,
 )
 
 from mozbuild.backend.configenvironment import ConfigEnvironment
 
+from .data import (
+    JavaJarData,
+)
+
 from .sandbox import (
     SandboxError,
     SandboxExecutionError,
     SandboxLoadError,
     Sandbox,
 )
 
 from .sandbox_symbols import (
@@ -217,16 +221,32 @@ class MozbuildSandbox(Sandbox):
         # protection, so it is omitted.
         normalized_path = os.path.normpath(path)
         if not is_read_allowed(normalized_path, self.config):
             raise SandboxLoadError(list(self._execution_stack),
                 sys.exc_info()[2], illegal_path=path)
 
         Sandbox.exec_file(self, path)
 
+    def _add_java_jar(self, name):
+        """Add a Java JAR build target."""
+        if not name:
+            raise Exception('Java JAR cannot be registered without a name')
+
+        if '/' in name or '\\' in name or '.jar' in name:
+            raise Exception('Java JAR names must not include slashes or'
+                ' .jar: %s' % name)
+
+        if self['JAVA_JAR_TARGETS'].has_key(name):
+            raise Exception('Java JAR has already been registered: %s' % name)
+
+        jar = JavaJarData(name)
+        self['JAVA_JAR_TARGETS'][name] = jar
+        return jar
+
     def _add_tier_directory(self, tier, reldir, static=False, external=False):
         """Register a tier directory with the build."""
         if isinstance(reldir, text_type):
             reldir = [reldir]
 
         if not tier in self['TIERS']:
             self['TIERS'][tier] = {
                 'regular': [],
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -204,16 +204,23 @@ VARIABLES = {
         converted to not use Makefile's for the build frontend, this will
         likely go away.
         """, None),
 
     'HOST_LIBRARY_NAME': (unicode, unicode, "",
         """Name of target library generated when cross compiling.
         """, 'binaries'),
 
+    'JAVA_JAR_TARGETS': (dict, dict, {},
+        """Defines Java JAR targets to be built.
+
+        This variable should not be populated directly. Instead, it should
+        populated by calling add_java_jar().
+        """, 'binaries'),
+
     'JS_MODULES_PATH': (unicode, unicode, "",
         """Sub-directory of ``$(FINAL_TARGET)`` to install
         ``EXTRA_JS_MODULES``.
 
         ``EXTRA_JS_MODULES`` files are copied to
         ``$(FINAL_TARGET)/$(JS_MODULES_PATH)``. This variable does not
         need to be defined if the desired destination directory is
         ``$(FINAL_TARGET)/modules``.
@@ -530,16 +537,29 @@ FUNCTIONS = {
 
            include('sibling.build')
 
         Include ``foo.build`` from a path within the top source directory::
 
            include('/elsewhere/foo.build')
         """),
 
+    'add_java_jar': ('_add_java_jar', (str,),
+        """Declare a Java JAR target to be built.
+
+        This is the supported way to populate the JAVA_JAR_TARGETS
+        variable.
+
+        The parameters are:
+        * dest - target name, without the trailing .jar. (required)
+
+        This returns a rich Java JAR type, described at
+        :py:class:`mozbuild.frontend.data.JavaJarData`.
+        """),
+
     'add_tier_dir': ('_add_tier_directory', (str, [str, list], bool, bool),
         """Register a directory for tier traversal.
 
         This is the preferred way to populate the TIERS variable.
 
         Tiers are how the build system is organized. The build process is
         divided into major phases called tiers. The most important tiers are
         "platform" and "apps." The platform tier builds the Gecko platform
--- a/rdf/util/src/Makefile.in
+++ b/rdf/util/src/Makefile.in
@@ -3,11 +3,8 @@
 # License, v. 2.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 makefile builds the rdfutil_external_s library which should be 
 # used by frozen (dependent) linkage components. The internal-linkage code should use
 # rdfutil_s which is built in the internal/ subdirectory. 
 
 DIST_INSTALL = 1
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
--- a/rdf/util/src/internal/Makefile.in
+++ b/rdf/util/src/internal/Makefile.in
@@ -4,12 +4,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This makefile builds the version of unicharutils_s static library which uses
 # internal linkage. Components that use frozen (external) linkage should use
 # rdfutil_external_s.
 
 MOZILLA_INTERNAL_API = 1
 
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
--- a/rdf/util/src/internal/moz.build
+++ b/rdf/util/src/internal/moz.build
@@ -7,8 +7,10 @@
 MODULE = 'rdfutil'
 
 include('../objs.mozbuild')
 
 SOURCES += rdf_util_src_cppsrcs
 
 LIBRARY_NAME = 'rdfutil_s'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/rdf/util/src/moz.build
+++ b/rdf/util/src/moz.build
@@ -9,8 +9,10 @@ DIRS += ['internal']
 MODULE = 'rdfutil'
 
 include('objs.mozbuild')
 
 SOURCES += rdf_util_src_cppsrcs
 
 LIBRARY_NAME = 'rdfutil_external_s'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/testing/mochitest/b2g.json
+++ b/testing/mochitest/b2g.json
@@ -204,16 +204,17 @@
     "content/base/test/test_bug827160.html": "needs plugin support",
 
     "content/base/test/csp/test_CSP_evalscript.html":"observer not working",
     "content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html":"observer not working",
     "content/base/test/csp/test_CSP_frameancestors.html":"observer not working",
     "content/base/test/csp/test_CSP.html":"observer not working",
     "content/base/test/csp/test_bug836922_npolicies.html":"observer not working",
     "content/base/test/csp/test_CSP_bug916446.html":"observer not working",
+    "content/base/test/csp/test_CSP_bug909029.html":"observer not working",
 
     "content/base/test/test_CrossSiteXHR_origin.html":"https not working, bug 907770",
     "content/base/test/test_plugin_freezing.html":"",
     "content/base/test/test_bug466409.html":"",
     "content/base/test/test_bug482935.html":"",
     "content/base/test/test_bug498433.html":"",
     "content/base/test/test_bug650386_redirect_301.html":"",
     "content/base/test/test_bug650386_redirect_302.html":"",
deleted file mode 100644
index a81e9d65a873f270189d2813225feac925b5f450..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 324e4aaba1de1e8e5fa75dbbf8702e4c7de1e035..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/components/downloads/test/unit/head_download_manager.js
+++ b/toolkit/components/downloads/test/unit/head_download_manager.js
@@ -51,35 +51,16 @@ var provider = {
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 dirSvc.QueryInterface(Ci.nsIDirectoryService).registerProvider(provider);
 
-/**
- * Imports a download test file to use.  Works with rdf and sqlite files.
- *
- * @param aFName
- *        The name of the file to import.  This file should be located in the
- *        same directory as this file.
- */
-function importDownloadsFile(aFName)
-{
-  var file = do_get_file(aFName);
-  var newFile = dirSvc.get("ProfD", Ci.nsIFile);
-  if (/\.rdf$/i.test(aFName))
-    file.copyTo(newFile, "downloads.rdf");
-  else if (/\.sqlite$/i.test(aFName))
-    file.copyTo(newFile, "downloads.sqlite");
-  else
-    do_throw("Unexpected filename!");
-}
-
 var gDownloadCount = 0;
 /**
  * Adds a download to the DM, and starts it.
  * @param server: a HttpServer used to serve the sourceURI
  * @param aParams (optional): an optional object which contains the function
  *                            parameters:
  *                              resultFileName: leaf node for the target file
  *                              targetFile: nsIFile for the target (overrides resultFileName)
deleted file mode 100644
--- a/toolkit/components/downloads/test/unit/test_bug_401582.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// This tests that downloads in the scanning state are set to a completed state
-// upon service initialization.
-
-importDownloadsFile("bug_401582_downloads.sqlite");
-
-const nsIDownloadManager = Ci.nsIDownloadManager;
-const dm = Cc["@mozilla.org/download-manager;1"].getService(nsIDownloadManager);
-
-function test_noScanningDownloads()
-{
-  var stmt = dm.DBConnection.createStatement(
-    "SELECT * " +
-    "FROM moz_downloads " +
-    "WHERE state = ?1");
-  stmt.bindByIndex(0, nsIDownloadManager.DOWNLOAD_SCANNING);
-
-  do_check_false(stmt.executeStep());
-  stmt.reset();
-  stmt.finalize();
-}
-
-var tests = [test_noScanningDownloads];
-
-function run_test()
-{
-  if (oldDownloadManagerDisabled()) {
-    return;
-  }
-
-  for (var i = 0; i < tests.length; i++)
-    tests[i]();
-}
deleted file mode 100644
--- a/toolkit/components/downloads/test/unit/test_bug_409179.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// This file ensures that the download manager service can be instantiated with
-// a certain downloads.sqlite file that had incorrect data.
-
-importDownloadsFile("bug_409179_downloads.sqlite");
-
-function run_test()
-{
-  if (oldDownloadManagerDisabled()) {
-    return;
-  }
-
-  var caughtException = false;
-  try {
-    var dm = Cc["@mozilla.org/download-manager;1"].
-             getService(Ci.nsIDownloadManager);
-  } catch (e) {
-    caughtException = true;
-  }
-  do_check_false(caughtException);
-}
deleted file mode 100644
--- a/toolkit/components/downloads/test/unit/test_old_download_files_removed.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// Make sure we remove old, now-unused downloads.rdf (pre-Firefox 3 storage)
-// when starting the download manager.
-
-function run_test()
-{
-  if (oldDownloadManagerDisabled()) {
-    return;
-  }
-
-  // Create the downloads.rdf file
-  importDownloadsFile("empty_downloads.rdf");
-
-  // Make sure it got created
-  let rdfFile = dirSvc.get("DLoads", Ci.nsIFile);
-  do_check_true(rdfFile.exists());
-
-  // Initialize the download manager, which will delete downloads.rdf
-  Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
-  do_check_false(rdfFile.exists());
-}
--- a/toolkit/components/downloads/test/unit/xpcshell.ini
+++ b/toolkit/components/downloads/test/unit/xpcshell.ini
@@ -1,38 +1,32 @@
 [DEFAULT]
 head = head_download_manager.js
 tail = tail_download_manager.js
 firefox-appdir = browser
 support-files =
-  bug_401582_downloads.sqlite
-  bug_409179_downloads.sqlite
   downloads_manifest.js
-  empty_downloads.rdf
   test_downloads.manifest
   data/digest.chunk
 
 [test_app_rep.js]
 [test_bug_382825.js]
 [test_bug_384744.js]
 [test_bug_395092.js]
 [test_bug_401430.js]
-[test_bug_401582.js]
 [test_bug_406857.js]
-[test_bug_409179.js]
 [test_bug_420230.js]
 [test_cancel_download_files_removed.js]
 # Bug 676989: test hangs consistently on Android
 skip-if = os == "android"
 [test_download_manager.js]
 [test_download_samename.js]
 # Bug 676989: test hangs consistently on Android
 skip-if = os == "android"
 [test_guid.js]
 [test_history_expiration.js]
 [test_offline_support.js]
-[test_old_download_files_removed.js]
 [test_private_resume.js]
 [test_privatebrowsing.js]
 [test_privatebrowsing_cancel.js]
 [test_removeDownloadsByTimeframe.js]
 [test_resume.js]
 [test_sleep_wake.js]
--- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
@@ -357,17 +357,17 @@ this.DownloadIntegration = {
       let directoryPath = null;
 #ifdef XP_MACOSX
       directoryPath = yield this.getPreferredDownloadsDirectory();
 #elifdef ANDROID
       directoryPath = yield this.getSystemDownloadsDirectory();
 #else
       // For Metro mode on Windows 8,  we want searchability for documents
       // that the user chose to open with an external application.
-      if (this._isImmersiveProcess()) {
+      if (Services.metro && Services.metro.immersive) {
         directoryPath = yield this.getSystemDownloadsDirectory();
       } else {
         directoryPath = this._getDirectory("TmpD");
       }
 #endif
       throw new Task.Result(directoryPath);
     }.bind(this));
   },
@@ -449,24 +449,16 @@ this.DownloadIntegration = {
       gDownloadPlatform.downloadDone(NetUtil.newURI(aDownload.source.url),
                                      new FileUtils.File(aDownload.target.path),
                                      aDownload.contentType,
                                      aDownload.source.isPrivate);
       this.downloadDoneCalled = true;
     }.bind(this));
   },
 
-  /**
-   * Determines whether it's a Windows Metro app.
-   */
-  _isImmersiveProcess: function() {
-    // TODO: to be implemented
-    return false;
-  },
-
   /*
    * Launches a file represented by the target of a download. This can
    * open the file with the default application for the target MIME type
    * or file extension, or with a custom application if
    * aDownload.launcherPath is set.
    *
    * @param    aDownload
    *           A Download object that contains the necessary information
--- a/toolkit/components/protobuf/Makefile.in
+++ b/toolkit/components/protobuf/Makefile.in
@@ -5,17 +5,15 @@
 
 VPATH = \
   @srcdir@ \
   @srcdir@/google/protobuf \
   @srcdir@/google/protobuf/io \
   @srcdir@/google/protobuf/stubs \
   $(NULL)
 
-FORCE_STATIC_LIB = 1
-
 LOCAL_INCLUDES = \
   -I$(srcdir) \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += $(TK_CFLAGS) -DGOOGLE_PROTOBUF_NO_RTTI
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -42,8 +42,9 @@ SOURCES += [
     'google/protobuf/repeated_field.cc',
     'google/protobuf/stubs/common.cc',
     'google/protobuf/stubs/once.cc',
     'google/protobuf/wire_format_lite.cc',
 ]
 
 LIBRARY_NAME = 'protobuf_s'
 
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
+++ b/toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 STL_FLAGS =
 
 LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
 
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mk
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/sender/objs.mk
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/objs.mk
--- a/toolkit/crashreporter/breakpad-windows-libxul/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-libxul/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     '../google-breakpad/src/common/windows/http_upload.cc',
 ]
 
 LIBRARY_NAME = 'google_breakpad_libxul_s'
 
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
+++ b/toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 MOZ_GLUE_LDFLAGS =
 
 STL_FLAGS =
 
 LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
 
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
--- a/toolkit/crashreporter/breakpad-windows-standalone/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-standalone/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LIBRARY_NAME = 'google_breakpad_standalone_s'
 
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/Makefile.in
@@ -1,16 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_TARGET),Android)
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
 endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/moz.build
@@ -8,8 +8,10 @@ MODULE = 'crash_generation'
 
 SOURCES += [
     'crash_generation_client.cc',
     'crash_generation_server.cc',
 ]
 
 LIBRARY_NAME = 'crash_generation_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in
@@ -17,16 +17,13 @@ MOZ_FRAMEPTR_FLAGS := -fomit-frame-point
 endif #}
 
 VPATH += $(srcdir)/../log
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 ifeq ($(OS_TARGET),Android)
 # NDK5 workarounds
 DEFINES += -D_STLP_CONST_CONSTRUCTOR_BUG -D_STLP_NO_MEMBER_TEMPLATES
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
 endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
@@ -10,8 +10,11 @@ SOURCES += [
     '../log/log.cc',
     'exception_handler.cc',
     'minidump_descriptor.cc',
 ]
 
 LIBRARY_NAME = 'exception_handler_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/Makefile.in
@@ -1,18 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 ifeq ($(OS_TARGET),Android)
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
 endif
 
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 DEFINES += -DELFSIZE=32
 endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/moz.build
@@ -10,8 +10,11 @@ SOURCES += [
     'linux_dumper.cc',
     'linux_ptrace_dumper.cc',
     'minidump_writer.cc',
 ]
 
 LIBRARY_NAME = 'minidump_writer_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/moz.build
@@ -9,8 +9,11 @@ MODULE = 'crash_generation'
 SOURCES += [
     'crash_generation_client.cc',
     'crash_generation_server.cc',
 ]
 
 LIBRARY_NAME = 'crash_generation_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/moz.build
@@ -11,8 +11,11 @@ SOURCES += [
     'dynamic_images.cc',
     'exception_handler.cc',
     'minidump_generator.cc',
 ]
 
 LIBRARY_NAME = 'exception_handler_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/moz.build
@@ -8,8 +8,11 @@ MODULE = 'minidump_file_writer'
 
 SOURCES += [
     'minidump_file_writer.cc',
 ]
 
 LIBRARY_NAME = 'minidump_file_writer_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/moz.build
@@ -11,8 +11,10 @@ SOURCES += [
     'minidump_generator.cc',
     'solaris_lwp.cc',
 ]
 
 LIBRARY_NAME = 'exception_handler_s'
 
 XPI_NAME = 'crashreporter'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/Makefile.in
@@ -24,24 +24,16 @@ ifeq (Linux,$(OS_ARCH))
 HOST_CXXFLAGS += -DHAVE_A_OUT_H
 OS_CXXFLAGS += -DHAVE_A_OUT_H
 endif
 ifeq (Darwin,$(OS_ARCH))
 HOST_CXXFLAGS += -DHAVE_MACH_O_NLIST_H
 OS_CXXFLAGS += -DHAVE_MACH_O_NLIST_H
 endif
 
-ifneq (WINNT,$(OS_TARGET))
-ifdef MOZ_CRASHREPORTER
-endif
-endif
-
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifneq (WINNT,$(OS_TARGET))
 # Headers from this directory are included as "common/header.h". Having
 # -I$(srcdir) on the command line makes us use common/memory.h when
 # <memory.h> is included from system headers, which is not intended.
 INCLUDES = $(LOCAL_INCLUDES) -I$(DIST)/include
 endif
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in
@@ -6,11 +6,8 @@ ifdef MOZ_CRASHREPORTER
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../..
 
 endif
 
 # This code is only compiled for build-time tools,
 # so enabling RTTI should be fine.
 HOST_CXXFLAGS += -funsigned-char -frtti
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
@@ -9,8 +9,11 @@ MODULE = 'breakpad_dwarf'
 if CONFIG['MOZ_CRASHREPORTER']:
     HOST_LIBRARY_NAME = 'host_breakpad_dwarf_s'
     HOST_SOURCES += [
         'bytereader.cc',
         'dwarf2diehandler.cc',
         'dwarf2reader.cc',
         'functioninfo.cc',
     ]
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in
@@ -12,15 +12,12 @@ TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/
 endif
 
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 DEFINES += -DELFSIZE=32
 endif
 
 DEFINES += -DNO_STABS_SUPPORT
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 # See https://bugzilla.mozilla.org/show_bug.cgi?id=741348#c11
 file_id.$(OBJ_SUFFIX): STL_FLAGS=
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
@@ -29,8 +29,10 @@ if CONFIG['MOZ_CRASHREPORTER']:
         'file_id.cc',
         'guid_creator.cc',
         'linux_libc_support.cc',
         'memory_mapped_file.cc',
     ]
 
 LIBRARY_NAME = 'breakpad_linux_common_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in
@@ -10,14 +10,11 @@ LOCAL_INCLUDES 	= -I$(srcdir)/../..
 CMSRCS = \
   HTTPMultipartUpload.m \
   $(NULL)
 
 HOST_CMMSRCS = \
   dump_syms.mm \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 COMPILE_CMFLAGS += -std=c99
--- a/toolkit/crashreporter/google-breakpad/src/common/mac/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/mac/moz.build
@@ -21,8 +21,10 @@ HOST_SOURCES += SOURCES
 
 HOST_LIBRARY_NAME = 'host_breakpad_mac_common_s'
 SOURCES += [
     'MachIPC.mm',
 ]
 
 LIBRARY_NAME = 'breakpad_mac_common_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/moz.build
@@ -79,8 +79,10 @@ if CONFIG['OS_TARGET'] == 'Android':
     SOURCES += [
         'android/breakpad_getcontext.S',
     ]
 
 LIBRARY_NAME = 'breakpad_common_s'
 
 MSVC_ENABLE_PGO = True
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/solaris/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/solaris/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/common/solaris/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/solaris/moz.build
@@ -19,8 +19,10 @@ LIBRARY_NAME = 'breakpad_solaris_common_
 # not compiling http_upload.cc currently
 # since it depends on libcurl
 HOST_SOURCES += [
     'dump_symbols.cc',
     'file_id.cc',
     'guid_creator.cc',
 ]
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/processor/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/processor/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../.. -I$(srcdir)/..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/processor/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/processor/moz.build
@@ -20,8 +20,10 @@ SOURCES += [
     'stackwalker_ppc.cc',
     'stackwalker_sparc.cc',
     'stackwalker_x86.cc',
     'tokenize.cc',
 ]
 
 LIBRARY_NAME = 'breakpad_sps_common_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/devtools/server/actors/inspector.js
+++ b/toolkit/devtools/server/actors/inspector.js
@@ -244,16 +244,57 @@ var NodeActor = protocol.ActorClass({
   setNodeValue: method(function(value) {
     this.rawNode.nodeValue = value;
   }, {
     request: { value: Arg(0) },
     response: {}
   }),
 
   /**
+   * Get the node's image data if any (for canvas and img nodes).
+   * Returns a LongStringActor with the image or canvas' image data as png
+   * a data:image/png;base64,.... string
+   * A null return value means the node isn't an image
+   * An empty string return value means the node is an image but image data
+   * could not be retrieved (missing/broken image).
+   */
+  getImageData: method(function() {
+    let isImg = this.rawNode.tagName.toLowerCase() === "img";
+    let isCanvas = this.rawNode.tagName.toLowerCase() === "canvas";
+
+    if (!isImg && !isCanvas) {
+      return null;
+    }
+
+    let imageData;
+    if (isImg) {
+      let canvas = this.rawNode.ownerDocument.createElement("canvas");
+      canvas.width = this.rawNode.naturalWidth;
+      canvas.height = this.rawNode.naturalHeight;
+      let ctx = canvas.getContext("2d");
+      try {
+        // This will fail if the image is missing
+        ctx.drawImage(this.rawNode, 0, 0);
+        imageData = canvas.toDataURL("image/png");
+      } catch (e) {
+        imageData = "";
+      }
+    } else if (isCanvas) {
+      imageData = this.rawNode.toDataURL("image/png");
+    }
+
+    return LongStringActor(this.conn, imageData);
+  }, {
+    request: {},
+    response: {
+      data: RetVal("nullable:longstring")
+    }
+  }),
+
+  /**
    * Modify a node's attributes.  Passed an array of modifications
    * similar in format to "attributes" mutations.
    * {
    *   attributeName: <string>
    *   attributeNamespace: <optional string>
    *   newValue: <optional string> - If null or undefined, the attribute
    *     will be removed.
    * }
@@ -278,18 +319,17 @@ var NodeActor = protocol.ActorClass({
         }
       }
     }
   }, {
     request: {
       modifications: Arg(0, "array:json")
     },
     response: {}
-  }),
-
+  })
 });
 
 /**
  * Client side of the node actor.
  *
  * Node fronts are strored in a tree that mirrors the DOM tree on the
  * server, but with a few key differences:
  *  - Not all children will be necessary loaded for each node.
deleted file mode 100644
index c6f03e6a08ae14cad5bd47cecd6514b102b71ee1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain_activeDownloads.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: sw=2 ts=2 sts=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/. */
-
-/**
- * Test added with bug 460086 to test the behavior of the new API that was added
- * to remove all traces of visiting a site.
- */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/ForgetAboutSite.jsm");
-
-////////////////////////////////////////////////////////////////////////////////
-//// Utility Functions
-
-/**
- * Creates an nsIURI object for the given file.
- *
- * @param aFile
- *        The nsIFile of the URI to create.
- * @returns an nsIURI representing aFile.
- */
-function uri(aFile)
-{
-  return Cc["@mozilla.org/network/io-service;1"].
-         getService(Ci.nsIIOService).
-         newFileURI(aFile);
-}
-
-/**
- * Checks to ensure a URI string is in download history or not.
- *
- * @param aURIString
- *        The string of the URI to check.
- * @param aIsActive
- *        True if the URI should be actively downloaded, false otherwise.
- */
-function check_active_download(aURIString, aIsActive)
-{
-  let dm = Cc["@mozilla.org/download-manager;1"].
-           getService(Ci.nsIDownloadManager);
-  let enumerator = dm.activeDownloads;
-  let found = false;
-  while (enumerator.hasMoreElements()) {
-    let dl = enumerator.getNext().QueryInterface(Ci.nsIDownload);
-    if (dl.source.spec == aURIString)
-      found = true;
-  }
-  let checker = aIsActive ? do_check_true : do_check_false;
-  checker(found);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//// Test Functions
-
-let destFile = dirSvc.get("TmpD", Ci.nsIFile);
-destFile.append("dm-test-file");
-destFile = uri(destFile);
-let data = [
-  { source: "http://mozilla.org/direct_match",
-    target: destFile.spec,
-    removed: true
-  },
-  { source: "http://www.mozilla.org/subdomain",
-    target: destFile.spec,
-    removed: true
-  },
-  { source: "http://ilovemozilla.org/contains_domain",
-    target: destFile.spec,
-    removed: false
-  },
-];
-
-function makeGUID() {
-  let guid = "";
-  for (var i = 0; i < 12; i++)
-    guid += Math.floor(Math.random() * 10);
-  return guid;
-}
-
-function run_test()
-{
-  if (oldDownloadManagerDisabled()) {
-    return;
-  }
-
-  // We add this data to the database first, but we cannot instantiate the
-  // download manager service, otherwise these downloads will not be placed in
-  // the active downloads array.
-
-  // Copy the empty downloads database to our profile directory
-  let downloads = do_get_file("downloads.empty.sqlite");
-  downloads.copyTo(dirSvc.get("ProfD", Ci.nsIFile), "downloads.sqlite");
-
-  // Open the database
-  let ss = Cc["@mozilla.org/storage/service;1"].
-           getService(Ci.mozIStorageService);
-  let file = dirSvc.get("ProfD", Ci.nsIFile);
-  file.append("downloads.sqlite");
-  let db = ss.openDatabase(file);
-
-  // Insert the data
-  let stmt = db.createStatement(
-    "INSERT INTO moz_downloads (source, target, state, autoResume, entityID, guid) " +
-    "VALUES (:source, :target, :state, :autoResume, :entityID, :guid)"
-  );
-  for (let i = 0; i < data.length; i++) {
-    stmt.params.source = data[i].source;
-    stmt.params.target = data[i].target;
-    stmt.params.state = Ci.nsIDownloadManager.DOWNLOAD_PAUSED;
-    stmt.params.autoResume = 0; // DONT_RESUME is 0
-    stmt.params.entityID = "foo" // just has to be non-null for our test
-    stmt.params.guid = makeGUID();
-    stmt.execute();
-    stmt.reset();
-  }
-  stmt.finalize();
-  stmt = null;
-  db.close();
-  db = null;
-
-  // Check to make sure it's all there
-  for (let i = 0; i < data.length; i++)
-    check_active_download(data[i].source, true);
-
-  // Dispatch the remove call
-  ForgetAboutSite.removeDataFromDomain("mozilla.org");
-
-  // And check our data
-  for (let i = 0; i < data.length; i++)
-    check_active_download(data[i].source, !data[i].removed);
-
-  // Shutdown the download manager.
-  Services.obs.notifyObservers(null, "quit-application", null);
-}
--- a/toolkit/forgetaboutsite/test/unit/xpcshell.ini
+++ b/toolkit/forgetaboutsite/test/unit/xpcshell.ini
@@ -1,7 +1,5 @@
 [DEFAULT]
 head = head_forgetaboutsite.js
 tail =
-support-files = downloads.empty.sqlite
 
 [test_removeDataFromDomain.js]
-[test_removeDataFromDomain_activeDownloads.js]
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -1236,17 +1236,24 @@ MockInstall.prototype = {
 
 function waitForCondition(condition, nextTest, errorMsg) {
   let tries = 0;
   let interval = setInterval(function() {
     if (tries >= 30) {
       ok(false, errorMsg);
       moveOn();
     }
-    if (condition()) {
+    var conditionPassed;
+    try {
+      conditionPassed = condition();
+    } catch (e) {
+      ok(false, e + "\n" + e.stack);
+      conditionPassed = false;
+    }
+    if (conditionPassed) {
       moveOn();
     }
     tries++;
   }, 100);
   let moveOn = function() { clearInterval(interval); nextTest(); };
 }
 
 function getTestPluginTag() {
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -68,29 +68,34 @@ ifndef LIBXUL_SDK
 JSSHELL_BINS  = \
   $(DIST)/bin/js$(BIN_SUFFIX) \
   $(DIST)/bin/$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
   $(NULL)
 ifndef MOZ_NATIVE_NSPR
 ifeq ($(_MSC_VER),1400)
 JSSHELL_BINS += $(DIST)/bin/Microsoft.VC80.CRT.manifest
 JSSHELL_BINS += $(DIST)/bin/msvcr80.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp80.dll
 endif
 ifeq ($(_MSC_VER),1500)
 JSSHELL_BINS += $(DIST)/bin/Microsoft.VC90.CRT.manifest
 JSSHELL_BINS += $(DIST)/bin/msvcr90.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp90.dll
 endif
 ifeq ($(_MSC_VER),1600)
 JSSHELL_BINS += $(DIST)/bin/msvcr100.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp100.dll
 endif
 ifeq ($(_MSC_VER),1700)
 JSSHELL_BINS += $(DIST)/bin/msvcr110.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp110.dll
 endif
 ifeq ($(_MSC_VER),1800)
 JSSHELL_BINS += $(DIST)/bin/msvcr120.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp120.dll
 endif
 ifdef MOZ_FOLD_LIBS
 JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX)
 else
 JSSHELL_BINS += \
   $(DIST)/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) \
   $(DIST)/bin/$(DLL_PREFIX)plds4$(DLL_SUFFIX) \
   $(DIST)/bin/$(DLL_PREFIX)plc4$(DLL_SUFFIX) \
--- a/tools/mercurial/hgsetup/config.py
+++ b/tools/mercurial/hgsetup/config.py
@@ -4,17 +4,17 @@
 
 from __future__ import unicode_literals
 
 from configobj import ConfigObj
 import re
 import os
 
 
-BUGZILLA_FINGERPRINT = '45:77:35:fd:6f:2c:1c:c2:90:4b:f7:b4:4d:60:c6:97:c5:5c:47:27'
+BUGZILLA_FINGERPRINT = '47:13:a2:14:0c:46:45:53:12:0d:e5:36:16:a5:60:26:3e:da:3a:60'
 HG_FINGERPRINT = '10:78:e8:57:2d:95:de:7c:de:90:bd:22:e1:38:17:67:c5:a7:9c:14'
 
 
 class MercurialConfig(object):
     """Interface for manipulating a Mercurial config file."""
 
     def __init__(self, infiles=None):
         """Create a new instance, optionally from an existing hgrc file."""
--- a/widget/gonk/libdisplay/Makefile.in
+++ b/widget/gonk/libdisplay/Makefile.in
@@ -11,17 +11,16 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 VPATH           = \
   $(srcdir) \
   $(NULL)
 
-FORCE_STATIC_LIB= 1
 STL_FLAGS=
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DXPCOM_GLUE
 
 LOCAL_INCLUDES += \
 	-I$(ANDROID_SOURCE)/hardware/libhardware/include \
--- a/widget/gonk/libdisplay/moz.build
+++ b/widget/gonk/libdisplay/moz.build
@@ -37,8 +37,9 @@ elif CONFIG['ANDROID_VERSION'] == '15':
     ]
 else:
     error('Unsupported platform version: %s' % (CONFIG['ANDROID_VERSION']))
 
 LIBRARY_NAME = 'display'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+FORCE_STATIC_LIB = True
--- a/widget/qt/faststartupqt/Makefile.in
+++ b/widget/qt/faststartupqt/Makefile.in
@@ -1,14 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_INSTALL = 1
-FORCE_STATIC_LIB = 1
 STL_FLAGS=
 
 EXTRA_DSO_LDOPTS = \
 	$(XPCOM_GLUE_LDOPTS) \
 	$(XPCOM_FROZEN_LDOPTS) \
 	$(MOZ_QT_LIBS) \
 	$(NULL)
 
--- a/widget/qt/faststartupqt/moz.build
+++ b/widget/qt/faststartupqt/moz.build
@@ -12,8 +12,9 @@ SOURCES += [
     'mozqglwidgetwrapper.cpp',
     'mozqwidgetfast.cpp',
     'nsFastStartupQt.cpp',
     'nsQAppInstance.cpp',
 ]
 
 LIBRARY_NAME = 'faststartupqt'
 
+FORCE_STATIC_LIB = True
--- a/widget/xremoteclient/Makefile.in
+++ b/widget/xremoteclient/Makefile.in
@@ -2,18 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # NOTE: This directory is part of tier 50, and is linked directly into
 # the application binaries. The fact that it's under mozilla/widget is a fluke
 # of tree history.
 
-FORCE_STATIC_LIB = 1
-
 DEFINES += -DXPCOM_GLUE
 
 LIBCPPSRCS = XRemoteClient.cpp
 
 OBJS = $(LIBCPPSRCS:.cpp=.$(OBJ_SUFFIX))
 
 EXTRA_DSO_LDOPTS = \
 		$(XLIBS) $(XLDFLAGS)  \
--- a/widget/xremoteclient/moz.build
+++ b/widget/xremoteclient/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'xremoteclient'
 
 PROGRAM = 'mozilla-xremote-client'
 
 LIBRARY_NAME = 'xremote_client_s'
 
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/Makefile.in
+++ b/xpcom/glue/Makefile.in
@@ -5,18 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 		-I$(srcdir)/../build \
 		$(NULL)
 
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef _MSC_VER
 # Don't include directives about which CRT to use
 OS_COMPILE_CXXFLAGS += -Zl
 OS_COMPILE_CFLAGS += -Zl
 DEFINES += -D_USE_ANSI_CPP
 endif
--- a/xpcom/glue/moz.build
+++ b/xpcom/glue/moz.build
@@ -97,8 +97,10 @@ SOURCES += [
     'nsStringAPI.cpp',
 ]
 
 LIBRARY_NAME = 'xpcomglue_s'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_s', CONFIG['LIB_SUFFIX']),
 ]
+
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/nomozalloc/Makefile.in
+++ b/xpcom/glue/nomozalloc/Makefile.in
@@ -5,19 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 		-I$(srcdir)/../../build \
 		$(NULL)
 
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 # Pretend we're statically linking the CRT, even though we might not be: this
 # avoids "msvcrp" and assembly dependencies from creeping into the directives
 # for this library on Windows.
 USE_STATIC_LIBS = 1
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS       =
 
--- a/xpcom/glue/nomozalloc/moz.build
+++ b/xpcom/glue/nomozalloc/moz.build
@@ -16,8 +16,11 @@ SOURCES += [
     '../nsStringAPI.cpp',
 ]
 
 LIBRARY_NAME = 'xpcomglue_s_nomozalloc'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_s_nomozalloc', CONFIG['LIB_SUFFIX']),
 ]
+
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/standalone/Makefile.in
+++ b/xpcom/glue/standalone/Makefile.in
@@ -5,18 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 	-I$(srcdir)/../../build \
 	$(NULL)
 
-FORCE_STATIC_LIB = 1
-
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS	=
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef _MSC_VER
 # Don't include directives in obj files about which CRT to use
 OS_COMPILE_CXXFLAGS += -Zl
--- a/xpcom/glue/standalone/moz.build
+++ b/xpcom/glue/standalone/moz.build
@@ -24,8 +24,10 @@ LIBRARY_NAME = 'xpcomglue'
 
 EXPORTS += [
     'nsXPCOMGlue.h',
 ]
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue', CONFIG['LIB_SUFFIX']),
 ]
+
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/standalone/staticruntime/Makefile.in
+++ b/xpcom/glue/standalone/staticruntime/Makefile.in
@@ -4,19 +4,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 	-I$(srcdir)/../../../build \
 	$(NULL)
 
-# create a static lib
-FORCE_STATIC_LIB = 1
-
 # Statically link to the CRT on Windows
 USE_STATIC_LIBS = 1
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS	=
 
 include $(topsrcdir)/config/rules.mk
 
--- a/xpcom/glue/standalone/staticruntime/moz.build
+++ b/xpcom/glue/standalone/staticruntime/moz.build
@@ -15,8 +15,11 @@ SOURCES += [
     '../nsXPCOMGlue.cpp',
 ]
 
 LIBRARY_NAME = 'xpcomglue_staticruntime'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_staticruntime', CONFIG['LIB_SUFFIX']),
 ]
+
+# create a static lib
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/staticruntime/Makefile.in
+++ b/xpcom/glue/staticruntime/Makefile.in
@@ -5,18 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 	-I$(srcdir)/../../build \
 	$(NULL)
 
-FORCE_STATIC_LIB = 1
-
 # Statically link to the CRT on Windows
 USE_STATIC_LIBS = 1
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS	=
 
 include $(topsrcdir)/config/rules.mk
 
--- a/xpcom/glue/staticruntime/moz.build
+++ b/xpcom/glue/staticruntime/moz.build
@@ -17,8 +17,9 @@ SOURCES += [
 ]
 
 LIBRARY_NAME = 'xpcomglue_staticruntime_s'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_staticruntime_s', CONFIG['LIB_SUFFIX']),
 ]
 
+FORCE_STATIC_LIB = True
--- a/xpcom/reflect/xptcall/src/md/os2/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/os2/Makefile.in
@@ -7,17 +7,13 @@ EXPORT_LIBRARY	= ../..
 MOZILLA_INTERNAL_API = 1
 
 LOCAL_INCLUDES = \
 		-I$(srcdir)/../unix \
 		-I$(srcdir)/../../../../xptinfo/src \
 		$(NULL)
 DEFINES		+= -DMOZ_NEED_LEADING_UNDERSCORE
 
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DIMPL_LIBXUL
 
 LOCAL_INCLUDES	+= -I$(srcdir)/../..
--- a/xpcom/reflect/xptcall/src/md/os2/moz.build
+++ b/xpcom/reflect/xptcall/src/md/os2/moz.build
@@ -8,8 +8,10 @@ MODULE = 'xpcom'
 
 SOURCES += [
     '../unix/xptcinvoke_gcc_x86_unix.cpp',
     'xptcstubs_gcc_x86_os2.cpp',
 ]
 
 LIBRARY_NAME = 'xptcmd'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
@@ -257,20 +257,16 @@ endif
 ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390)
 CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
 endif
 
 ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390x)
 CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
 endif
 
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DIMPL_LIBXUL
 
 LOCAL_INCLUDES += \
 	-I$(srcdir)/../.. \
 	-I$(srcdir)/../../../../xptinfo/src \
 	$(NULL)
--- a/xpcom/reflect/xptcall/src/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/src/md/unix/moz.build
@@ -249,8 +249,10 @@ if CONFIG['OS_ARCH'] == 'Linux':
     elif CONFIG['OS_TEST'] == 's390x':
         SOURCES += [
             'xptcinvoke_linux_s390x.cpp',
             'xptcstubs_linux_s390x.cpp',
         ]
 
 LIBRARY_NAME = 'xptcmd'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/reflect/xptcall/src/md/win32/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/win32/Makefile.in
@@ -11,16 +11,13 @@ LOCAL_INCLUDES += -I$(srcdir)/../../../.
 
 ifneq ($(TARGET_CPU),x86_64)
 ifndef GNU_CXX
 # FIXME: bug 413019
 OS_COMPILE_CXXFLAGS += -GL-
 endif #!GNU_CXX
 endif #!x86_64
 
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DIMPL_LIBXUL
 
 LOCAL_INCLUDES	+= -I$(srcdir)/../..
--- a/xpcom/reflect/xptcall/src/md/win32/moz.build
+++ b/xpcom/reflect/xptcall/src/md/win32/moz.build
@@ -33,8 +33,10 @@ else:
     else:
         SOURCES += [
             'xptcinvoke.cpp',
             'xptcstubs.cpp',
         ]
 
 LIBRARY_NAME = 'xptcmd'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/string/src/Makefile.in
+++ b/xpcom/string/src/Makefile.in
@@ -1,20 +1,16 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MOZILLA_INTERNAL_API = 1
 
-# we don't want the shared lib, but we want to force the creation of a
-# static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifneq (,$(INTEL_ARCHITECTURE))
 # gcc requires -msse2 on nsUTF8UtilsSSE2.cpp since it uses SSE2 intrinsics.
 # (See bug 585538 comment 12.)
 ifdef GNU_CC
 nsUTF8UtilsSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
 endif
--- a/xpcom/string/src/moz.build
+++ b/xpcom/string/src/moz.build
@@ -24,8 +24,11 @@ if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES += [
         'nsUTF8UtilsSSE2.cpp',
     ]
 
 LIBRARY_NAME = 'string_s'
 
 MSVC_ENABLE_PGO = True
 
+# we don't want the shared lib, but we want to force the creation of a
+# static lib.
+FORCE_STATIC_LIB = True