Merge mozilla-central to UX
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 06 Aug 2013 23:06:26 -0700
changeset 155691 eba98a54c087b7c0d71550fc5c797ef827685d73
parent 155690 4a09078bea49ed7810f54230d92f01e78cfda20a (current diff)
parent 141585 1fb5d14e8348b16014fafa5d746e0a8823df8187 (diff)
child 155692 7d157d293a27bea9bfa8a5488a625427dcac81e8
push id36280
push userryanvm@gmail.com
push dateMon, 18 Nov 2013 16:01:00 +0000
treeherdermozilla-inbound@bb8a3a5de8dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone26.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 mozilla-central to UX
accessible/tests/mochitest/text/test_label.xul
browser/base/content/tabbrowser.xml
browser/devtools/styleinspector/css-logic.js
browser/metro/base/content/prompt/alert.xul
browser/metro/base/content/prompt/confirm.xul
browser/metro/base/content/prompt/prompt.js
browser/metro/base/content/prompt/prompt.xul
browser/metro/base/content/prompt/promptPassword.xul
browser/metro/base/content/prompt/select.xul
layout/style/nsCSSProps.cpp
widget/cocoa/nsCocoaWindow.mm
--- a/accessible/src/xul/XULFormControlAccessible.cpp
+++ b/accessible/src/xul/XULFormControlAccessible.cpp
@@ -812,20 +812,27 @@ XULTextFieldAccessible::CacheChildren()
 {
   NS_ENSURE_TRUE_VOID(mDoc);
   // Create child accessibles for native anonymous content of underlying HTML
   // input element.
   nsCOMPtr<nsIContent> inputContent(GetInputField());
   if (!inputContent)
     return;
 
+  // XXX: entry shouldn't contain anything but text leafs. Currently it may
+  // contain a trailing fake HTML br element added for layout needs. We don't
+  // need to expose it since it'd be confusing for AT.
   TreeWalker walker(this, inputContent);
-
   Accessible* child = nullptr;
-  while ((child = walker.NextChild()) && AppendChild(child));
+  while ((child = walker.NextChild())) {
+    if (child->IsTextLeaf())
+      AppendChild(child);
+    else
+      Document()->UnbindFromDocument(child);
+  }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTextFieldAccessible: HyperTextAccessible protected
 
 already_AddRefed<nsFrameSelection>
 XULTextFieldAccessible::FrameSelection()
 {
--- a/accessible/tests/mochitest/text/Makefile.in
+++ b/accessible/tests/mochitest/text/Makefile.in
@@ -11,19 +11,19 @@ relativesrcdir	= @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MOCHITEST_A11Y_FILES = \
 		doc.html \
 		test_atcaretoffset.html \
 		test_charboundary.html \
 		test_doc.html \
+		test_general.xul \
 		test_gettext.html \
 		test_hypertext.html \
 		test_lineboundary.html \
-		test_label.xul \
 		test_passwords.html \
 		test_selection.html \
 		test_wordboundary.html \
 		test_words.html \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
rename from accessible/tests/mochitest/text/test_label.xul
rename to accessible/tests/mochitest/text/test_general.xul
--- a/accessible/tests/mochitest/text/test_label.xul
+++ b/accessible/tests/mochitest/text/test_general.xul
@@ -21,44 +21,60 @@
   <script type="application/javascript">
   <![CDATA[
     ////////////////////////////////////////////////////////////////////////////
     // Testing
 
     var gQueue = null;
     function doTests()
     {
+      //////////////////////////////////////////////////////////////////////////
+      // XUL label
+
       var ids = ["label1", "label2"];
 
       testCharacterCount(ids, 5);
 
       testText(ids, 0, -1, "Hello");
       testText(ids, 0, 1, "H");
 
       testCharAfterOffset(ids, 0, "e", 1, 2);
       testCharBeforeOffset(ids, 1, "H", 0, 1);
       testCharAtOffset(ids, 1, "e", 1, 2);
 
+      //////////////////////////////////////////////////////////////////////////
+      // XUL textbox
+
+      testTextAtOffset([ "tbox1" ], BOUNDARY_LINE_START,
+                       [ [ 0, 4, "test", 0, 4 ] ]);
+
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTests);
   ]]>
   </script>
 
   <vbox flex="1" style="overflow: auto;">
   <body xmlns="http://www.w3.org/1999/xhtml">
     <a target="_blank"
         href="https://bugzilla.mozilla.org/show_bug.cgi?id=396166"
         title="xul:label@value accessible should implement nsIAccessibleText">
       Bug 396166
     </a>
+    <a target="_blank"
+        href="https://bugzilla.mozilla.org/show_bug.cgi?id=899433"
+        title="Accessibility returns empty line for last line in certain cases">
+      Bug 899433
+    </a>
     <p id="display"></p>
     <div id="content" style="display: none">
     </div>
     <pre id="test">
     </pre>
   </body>
   <label id="label1" value="Hello"/>
   <label id="label2">Hello</label>
+
+  <textbox id="tbox1" value="test" multiline="true"/>
   </vbox>
 </window>
--- a/accessible/tests/mochitest/tree/test_txtctrl.xul
+++ b/accessible/tests/mochitest/tree/test_txtctrl.xul
@@ -67,20 +67,16 @@
       // multiline textbox
       ////////////////////
       accTree = {
         role: ROLE_ENTRY,
         children: [
           {
             role: ROLE_TEXT_LEAF,
             children: []
-          },
-          {
-            role: ROLE_WHITESPACE,
-            children: []
           }
         ]
       };
 
       testAccessibleTree("txc6", accTree);
 
       ////////////////////
       // autocomplete textbox
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -250,17 +250,16 @@ pref("layers.offmainthreadcomposition.en
 pref("layers.acceleration.disabled", false);
 pref("layers.offmainthreadcomposition.async-animations", true);
 pref("layers.async-video.enabled", true);
 pref("layers.async-pan-zoom.enabled", true);
 #endif
 
 // Web Notifications
 pref("notification.feature.enabled", true);
-pref("dom.webnotifications.enabled", false);
 
 // IndexedDB
 pref("indexedDB.feature.enabled", true);
 pref("dom.indexedDB.warningQuota", 5);
 
 // prevent video elements from preloading too much data
 pref("media.preload.default", 1); // default to preload none
 pref("media.preload.auto", 2);    // preload metadata if preload=auto
@@ -655,23 +654,23 @@ pref("dom.disable_window_open_dialog_fea
 pref("accessibility.accessfu.activate", 2);
 pref("accessibility.accessfu.quicknav_modes", "Link,Heading,FormElement,Landmark,ListItem");
 // Setting for an utterance order (0 - description first, 1 - description last).
 pref("accessibility.accessfu.utterance", 1);
 // Whether to skip images with empty alt text
 pref("accessibility.accessfu.skip_empty_images", true);
 
 // Enable hit-target fluffing
-pref("ui.touch.radius.enabled", false);
+pref("ui.touch.radius.enabled", true);
 pref("ui.touch.radius.leftmm", 3);
 pref("ui.touch.radius.topmm", 5);
 pref("ui.touch.radius.rightmm", 3);
 pref("ui.touch.radius.bottommm", 2);
 
-pref("ui.mouse.radius.enabled", false);
+pref("ui.mouse.radius.enabled", true);
 pref("ui.mouse.radius.leftmm", 3);
 pref("ui.mouse.radius.topmm", 5);
 pref("ui.mouse.radius.rightmm", 3);
 pref("ui.mouse.radius.bottommm", 2);
 
 // Disable native prompt
 pref("browser.prompt.allowNative", false);
 
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,4 +1,4 @@
 {
-    "revision": "bfebfb81d21bd6a4fb30f11044e6531e8bfaea3a", 
+    "revision": "ca81894022ba9094e24f6f1d233ef0ebb1b59bba", 
     "repo_path": "/integration/gaia-central"
 }
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -6,16 +6,18 @@
 let Cc = Components.classes;
 let Ci = Components.interfaces;
 let Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this,
   "LoginManagerContent", "resource://gre/modules/LoginManagerContent.jsm");
+XPCOMUtils.defineLazyModuleGetter(this,
+  "InsecurePasswordUtils", "resource://gre/modules/InsecurePasswordUtils.jsm");
 
 // Bug 671101 - directly using webNavigation in this context
 // causes docshells to leak
 this.__defineGetter__("webNavigation", function () {
   return docShell.QueryInterface(Ci.nsIWebNavigation);
 });
 
 addMessageListener("WebNavigation:LoadURI", function (message) {
@@ -33,15 +35,18 @@ addMessageListener("Browser:HideSessionR
     container.hidden = true;
   }
 });
 
 if (!Services.prefs.getBoolPref("browser.tabs.remote")) {
   addEventListener("DOMContentLoaded", function(event) {
     LoginManagerContent.onContentLoaded(event);
   });
+  addEventListener("DOMFormHasPassword", function(event) {
+    InsecurePasswordUtils.checkForInsecurePasswords(event.target);
+  });
   addEventListener("DOMAutoComplete", function(event) {
     LoginManagerContent.onUsernameInput(event);
   });
   addEventListener("blur", function(event) {
     LoginManagerContent.onUsernameInput(event);
   });
 }
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -169,16 +169,20 @@
           // Force a style flush to ensure that our binding is attached.
           findBar.clientTop;
 
           findBar.browser = browser;
           findBar._findField.value = this._lastFindValue;
 
           aTab._findBar = findBar;
 
+          let event = document.createEvent("Events");
+          event.initEvent("TabFindInitialized", true, false);
+          aTab.dispatchEvent(event);
+
           return findBar;
         ]]></body>
       </method>
 
       <method name="updateWindowResizers">
         <body><![CDATA[
           if (!window.gShowPageResizers)
             return;
--- a/browser/base/content/test/browser_bug537013.js
+++ b/browser/base/content/test/browser_bug537013.js
@@ -39,36 +39,44 @@ function test() {
   gBrowser.selectedTab = tabs[0];
 
   setFindString(texts[0]);
   // Turn on highlight for testing bug 891638
   gFindBar.getElement("highlight").checked = true;
 
   // Make sure the second tab is correct, then set it up
   gBrowser.selectedTab = tabs[1];
+  gBrowser.selectedTab.addEventListener("TabFindInitialized", continueTests1);
+  // Initialize the findbar
+  gFindBar;
+}
+function continueTests1() {
+  gBrowser.selectedTab.removeEventListener("TabFindInitialized",
+                                           continueTests1);
+  ok(true, "'TabFindInitialized' event properly dispatched!");
   ok(gFindBar.hidden, "Second tab doesn't show find bar!");
   gFindBar.open();
   is(gFindBar._findField.value, texts[0],
      "Second tab kept old find value for new initialization!");
   setFindString(texts[1]);
 
   // Confirm the first tab is still correct, ensure re-hiding works as expected
   gBrowser.selectedTab = tabs[0];
   ok(!gFindBar.hidden, "First tab shows find bar!");
   is(gFindBar._findField.value, texts[0], "First tab persists find value!");
   ok(gFindBar.getElement("highlight").checked,
      "Highlight button state persists!");
 
   // While we're here, let's test bug 253793
   gBrowser.reload();
-  gBrowser.addEventListener("DOMContentLoaded", continueTests, true);
+  gBrowser.addEventListener("DOMContentLoaded", continueTests2, true);
 }
 
-function continueTests() {
-  gBrowser.removeEventListener("DOMContentLoaded", continueTests, true);
+function continueTests2() {
+  gBrowser.removeEventListener("DOMContentLoaded", continueTests2, true);
   ok(!gFindBar.getElement("highlight").checked, "Highlight button reset!");
   gFindBar.close();
   ok(gFindBar.hidden, "First tab doesn't show find bar!");
   gBrowser.selectedTab = tabs[1];
   ok(!gFindBar.hidden, "Second tab shows find bar!");
   // Test for bug 892384
   is(gFindBar._findField.getAttribute("focused"), "true",
      "Open findbar refocused on tab change!");
--- a/browser/devtools/styleeditor/StyleEditorDebuggee.jsm
+++ b/browser/devtools/styleeditor/StyleEditorDebuggee.jsm
@@ -118,17 +118,17 @@ StyleEditorDebuggee.prototype = {
   },
 
   /**
    * request baseURIObject information from the document
    */
   _getBaseURI: function() {
     let message = { type: "getBaseURI" };
     this._sendRequest(message, (response) => {
-      this.baseURI = response.baseURI;
+      this.baseURI = Services.io.newURI(response.baseURI, null, null);
     });
   },
 
   /**
    * Handler for document load, forward event with
    * all the stylesheets available on load.
    *
    * @param  {string} type
--- a/browser/devtools/webconsole/test/Makefile.in
+++ b/browser/devtools/webconsole/test/Makefile.in
@@ -140,16 +140,18 @@ MOCHITEST_BROWSER_FILES = \
 	browser_console_keyboard_accessibility.js \
 	browser_console_filters.js \
 	browser_console_dead_objects.js \
 	browser_console_iframe_messages.js \
 	browser_console_variables_view_while_debugging_and_inspecting.js \
 	browser_webconsole_bug_686937_autocomplete_JSTerm_helpers.js \
 	browser_webconsole_cached_autocomplete.js \
 	browser_console_navigation_marker.js \
+	browser_webconsole_bug_762593_insecure_passwords_web_console_warning.js \
+	browser_webconsole_bug_762593_insecure_passwords_about_blank_web_console_warning.js \
 	head.js \
 	$(NULL)
 
 ifeq ($(OS_ARCH), Darwin)
 MOCHITEST_BROWSER_FILES += \
 	browser_webconsole_bug_804845_ctrl_key_nav.js \
         $(NULL)
 endif
@@ -239,15 +241,19 @@ MOCHITEST_BROWSER_FILES += \
 	test-bug-821877-csperrors.html^headers^ \
 	test-bug-846918-hsts-invalid-headers.html \
 	test-bug-846918-hsts-invalid-headers.html^headers^ \
 	test-eval-in-stackframe.html \
 	test-bug-859170-longstring-hang.html \
 	test-bug-837351-security-errors.html \
 	test-bug-869003-top-window.html \
 	test-bug-869003-iframe.html \
+	test-iframe-762593-insecure-form-action.html \
+	test-iframe-762593-insecure-frame.html \
+	test-bug-762593-insecure-passwords-web-console-warning.html \
+	test-bug-762593-insecure-passwords-about-blank-web-console-warning.html \
 	test-consoleiframes.html \
 	test-iframe1.html \
 	test-iframe2.html \
 	test-iframe3.html \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_about_blank_web_console_warning.js
@@ -0,0 +1,29 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+/*
+ * Tests that errors about insecure passwords are logged
+ * to the web console
+ */
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-762593-insecure-passwords-about-blank-web-console-warning.html";
+const INSECURE_PASSWORD_MSG = "Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.";
+
+function test() {
+  addTab(TEST_URI);
+  browser.addEventListener("load", function onLoad(aEvent) {
+    browser.removeEventListener(aEvent.type, onLoad, true);
+    openConsole(null, function testInsecurePasswordErrorLogged (hud) {
+      waitForMessages({
+        webconsole: hud,
+        messages: [
+          {
+            name: "Insecure password error displayed successfully",
+            text: INSECURE_PASSWORD_MSG,
+            category: CATEGORY_SECURITY,
+            severity: SEVERITY_WARNING
+          },
+        ],
+      }).then(finishTest);
+    });
+  }, true);
+}
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_web_console_warning.js
@@ -0,0 +1,68 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+/*
+ * Tests that errors about insecure passwords are logged
+ * to the web console
+ */
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-762593-insecure-passwords-web-console-warning.html";
+const INSECURE_PASSWORD_MSG = "Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.";
+const INSECURE_FORM_ACTION_MSG = "Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.";
+const INSECURE_IFRAME_MSG = "Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen.";
+const INSECURE_PASSWORDS_URI = "https://developer.mozilla.org/en-US/docs/Security/InsecurePasswords";
+
+function test() {
+  addTab(TEST_URI);
+  browser.addEventListener("load", function onLoad(aEvent) {
+    browser.removeEventListener(aEvent.type, onLoad, true);
+    openConsole(null, function testInsecurePasswordErrorLogged (hud) {
+      waitForMessages({
+        webconsole: hud,
+        messages: [
+          {
+            name: "Insecure password error displayed successfully",
+            text: INSECURE_PASSWORD_MSG,
+            category: CATEGORY_SECURITY,
+            severity: SEVERITY_WARNING
+          },
+          {
+            name: "Insecure iframe error displayed successfully",
+            text: INSECURE_IFRAME_MSG,
+            category: CATEGORY_SECURITY,
+            severity: SEVERITY_WARNING
+          },
+          {
+            name: "Insecure form action error displayed successfully",
+            text: INSECURE_FORM_ACTION_MSG,
+            category: CATEGORY_SECURITY,
+            severity: SEVERITY_WARNING
+          },
+        ],
+      }).then( () => testClickOpenNewTab(hud));
+    });
+  }, true);
+}
+
+function testClickOpenNewTab(hud) {
+  let warningNode = hud.outputNode.querySelector(
+    ".webconsole-msg-body .webconsole-learn-more-link");
+
+  /*
+   * Invoke the click event and check if a new tab would open to the correct
+   * page
+   */
+  let linkOpened = false;
+  let oldOpenUILinkIn = window.openUILinkIn;
+  window.openUILinkIn = function(aLink) {
+    if (aLink == INSECURE_PASSWORDS_URI) {
+      linkOpened = true;
+    }
+  }
+
+  EventUtils.synthesizeMouse(warningNode, 2, 2, {},
+                             warningNode.ownerDocument.defaultView);
+  ok(linkOpened, "Clicking the Insecure Passwords Warning node opens the desired page");
+  window.openUILinkIn = oldOpenUILinkIn;
+
+  finishTest();
+}
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webconsole/test/test-bug-762593-insecure-passwords-about-blank-web-console-warning.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf8">
+    <title>Bug 762593 - Add warning/error Message to Web Console when the
+      page includes Insecure Password fields</title>
+    <!-- Any copyright is dedicated to the Public Domain.
+    http://creativecommons.org/publicdomain/zero/1.0/ -->
+
+    <!-- This test tests the scenario where a javascript adds password fields to
+     an about:blank iframe inside an insecure web page. It ensures that
+     insecure password fields like those are detected and a warning is sent to
+     the web console. -->
+  </head>
+  <body>
+    <p>This insecure page is served with an about:blank iframe. A script then adds a
+    password field to it.</p>
+    <iframe id = "myiframe" width = "300" height="300" >
+    </iframe>
+    <script>
+      var doc = window.document;
+      var myIframe = doc.getElementById("myiframe");
+      myIframe.contentDocument.open();
+      myIframe.contentDocument.write("<form><input type = 'password' name='pwd' value='test'> </form>");
+      myIframe.contentDocument.close();
+    </script>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webconsole/test/test-bug-762593-insecure-passwords-web-console-warning.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf8">
+    <title>Bug 762593 - Add warning/error Message to Web Console when the
+      page includes Insecure Password fields</title>
+    <!-- Any copyright is dedicated to the Public Domain.
+    http://creativecommons.org/publicdomain/zero/1.0/ -->
+  </head>
+  <body>
+    <p>This page is served with an iframe with insecure password field.</p>
+    <iframe src
+      ="http://example.com/browser/browser/devtools/webconsole/test/test-iframe-762593-insecure-frame.html">
+    </iframe>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webconsole/test/test-iframe-762593-insecure-form-action.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+  <head>
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+    <!-- Any copyright is dedicated to the Public Domain.
+    http://creativecommons.org/publicdomain/zero/1.0/ -->
+  </head>
+  <body>
+    <h1>iframe 2</h1>
+    <p>This frame contains a password field inside a form with insecure action.</p>
+    <form action="http://test">
+      <input type="password" name="pwd">
+    </form>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webconsole/test/test-iframe-762593-insecure-frame.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+  <head>
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+    <!-- Any copyright is dedicated to the Public Domain.
+    http://creativecommons.org/publicdomain/zero/1.0/ -->
+  </head>
+  <body>
+    <h1>iframe 1</h1>
+    <p>This frame is served with an insecure password field.</p>
+    <iframe src=
+      "http://example.com/browser/browser/devtools/webconsole/test/test-iframe-762593-insecure-form-action.html">
+    </iframe>
+  </body>
+</html>
--- a/browser/devtools/webconsole/webconsole.js
+++ b/browser/devtools/webconsole/webconsole.js
@@ -34,16 +34,18 @@ const STRINGS_URI = "chrome://browser/lo
 let l10n = new WebConsoleUtils.l10n(STRINGS_URI);
 
 
 // The XUL namespace.
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 const MIXED_CONTENT_LEARN_MORE = "https://developer.mozilla.org/en/Security/MixedContent";
 
+const INSECURE_PASSWORDS_LEARN_MORE = "https://developer.mozilla.org/en-US/docs/Security/InsecurePasswords";
+
 const HELP_URL = "https://developer.mozilla.org/docs/Tools/Web_Console/Helpers";
 
 const VARIABLES_VIEW_URL = "chrome://browser/content/devtools/widgets/VariablesView.xul";
 
 const CONSOLE_DIR_VIEW_HEIGHT = 0.6;
 
 const IGNORED_SOURCE_URLS = ["debugger eval code", "self-hosted"];
 
@@ -1236,16 +1238,22 @@ WebConsoleFrame.prototype = {
       errorMessage = errorMessage.initial;
     }
 
     let node = this.createMessageNode(aCategory, severity,
                                       errorMessage,
                                       aScriptError.sourceName,
                                       aScriptError.lineNumber, null, null,
                                       aScriptError.timeStamp);
+
+    // Select the body of the message node that is displayed in the console
+    let msgBody = node.querySelector(".webconsole-msg-body");
+    // Add the more info link node to messages that belong to certain categories
+    this.addMoreInfoLink(msgBody, aScriptError);
+
     if (aScriptError.private) {
       node.setAttribute("private", true);
     }
 
     if (objectActors.size > 0) {
       node._objectActors = objectActors;
     }
 
@@ -1407,16 +1415,69 @@ WebConsoleFrame.prototype = {
     mixedContentWarningNode.addEventListener("click", function(aEvent) {
       this.owner.openLink(MIXED_CONTENT_LEARN_MORE);
       aEvent.preventDefault();
       aEvent.stopPropagation();
     }.bind(this));
   },
 
   /**
+   * Adds a more info link node to messages based on the nsIScriptError object
+   * that we need to report to the console
+   *
+   * @param aNode
+   *        The node to which we will be adding the more info link node
+   * @param aScriptError
+   *        The script error object that we are reporting to the console
+   */
+  addMoreInfoLink: function WCF_addMoreInfoLink(aNode, aScriptError)
+  {
+    // We have a single category for now, but more are to be
+    // expected soon
+    if (aScriptError.category == "Insecure Password Field") {
+      this.addInsecurePasswordsWarningNode(aNode);
+    }
+  },
+
+  /*
+   * Appends a clickable insecure passwords warning node to the node passed
+   * as a parameter to the function. When a user clicks on the appended
+   * warning node, the browser navigates to a page where the user can learn
+   * more about security issues associated with insecure passwords.
+   */
+  addInsecurePasswordsWarningNode:
+  function WCF_addInsecurePasswordsWarningNode(aNode)
+  {
+    let moreInfoLabel =
+      "[" + l10n.getStr("webConsoleMoreInfoLabel") + "]";
+
+    // The node that holds the clickable warning node.
+    let linkNode = this.document.createElementNS(XUL_NS, "hbox");
+    linkNode.flex = 1;
+    linkNode.classList.add("webconsole-msg-body-piece");
+    linkNode.classList.add("webconsole-msg-link");
+    aNode.appendChild(linkNode);
+
+    // Create the actual insecure passwords warning node and make it clickable
+    let warningNode = this.document.createElement("label");
+    warningNode.setAttribute("value", moreInfoLabel);
+    warningNode.setAttribute("title", moreInfoLabel);
+    warningNode.classList.add("hud-clickable");
+    warningNode.classList.add("webconsole-learn-more-link");
+
+    warningNode.addEventListener("click", function(aEvent) {
+      this.owner.openLink(INSECURE_PASSWORDS_LEARN_MORE);
+      aEvent.preventDefault();
+      aEvent.stopPropagation();
+    }.bind(this));
+
+    linkNode.appendChild(warningNode);
+  },
+
+  /**
    * Log file activity.
    *
    * @param string aFileURI
    *        The file URI that was loaded.
    * @return nsIDOMElement|undefined
    *         The message element to display in the Web Console output.
    */
   logFileActivity: function WCF_logFileActivity(aFileURI)
@@ -4467,16 +4528,17 @@ var Utils = {
     switch (aScriptError.category) {
       case "CSS Parser":
       case "CSS Loader":
         return CATEGORY_CSS;
 
       case "Mixed Content Blocker":
       case "CSP":
       case "Invalid HSTS Headers":
+      case "Insecure Password Field":
         return CATEGORY_SECURITY;
 
       default:
         return CATEGORY_JS;
     }
   },
 
   /**
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -1,96 +1,1554 @@
 # 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/.
-
-# The removed-files.in file specifies files and directories to be removed during
-# an application update that are not automatically removed by the application
-# update process. The application update process handles the vast majority of
-# file and directory removals automatically so this file should not be used in
-# the vast majority of cases.
-
-# When to use removed-files.in file to remove files and directories:
-# * Files and directories located in the installation's "distribution/" and
-#   "extensions/" directories that were added before Firefox 26. Files and
-#   directories located in these directories were not included in the
-#   application update file removals for a complete update prior to Firefox 26.
-# * Empty directories that were accidentally added to the installation
-#   directory.
-# * Third party files and directories that were added to the installation
-#   directory. Under normal circumstances this should only be done after release
-#   drivers have approved the removal of these third party files.
-
-# If you are not sure whether a file or directory should be removed using the
-# removed-files.in file please contact one of the developers that work on
-# application update.
-
-# Note: the "distribution/" and "browser/extensions/" directories should never
-# be removed recursively since these directories are used by Partner builds and
-# custom installations.
-
-# To specify a file to be removed add the path to the file.
-# * If the file doesn't exist the update will succeed.
-# * If the file exists and can't be removed (e.g. the file is locked) the
-#   update will fail.
-#
-# Example: path/to/file
-
-# To specify a directory to be removed only if it is empty add the path to the
-# directory with a trailing forward slash.
-# * If the directory doesn't exist the update will succeed.
-# * If the directory can't be removed (e.g. the directory is locked, contains
-#   files, etc.) the update will succeed.
-#
-# Example: path/to/dir/
-
-# To specify a directory that should be recursively removed add the path to the
-# directory with a trailing forward slash and "*".
-# * If the directory doesn't exist the update will succeed.
-# * If all of the files the directory contains can be removed but the directory
-#   or a subdirectory can't be removed (e.g. the directory is locked) the update
-#   will succeed.
-# * If a file within the directory can't be removed the update will fail.
-#
-# Example: path/to/dir/*
-
-# File Removals
-# This is located under the "distribution/" directory and it was added before
-# Firefox 26
+# Removed-files.in is processed at build time to create a list of files that
+# should be removed during an application update.
+# These files are in alphabetical order, except that files removed only on
+# certain platforms are after all of the regular files and obsolete Talkback and
+# Inspector files are at the very end.
+.autoreg
+@DLL_PREFIX@jsj@DLL_SUFFIX@
+@DLL_PREFIX@sqlite3@DLL_SUFFIX@
+@DLL_PREFIX@xpcom_compat@DLL_SUFFIX@
+@DLL_PREFIX@xpistub@DLL_SUFFIX@
+@DLL_PREFIX@zlib@DLL_SUFFIX@
+@DLL_PREFIX@jemalloc@DLL_SUFFIX@
+@DLL_PREFIX@mozutils@DLL_SUFFIX@
+#ifdef MOZ_STATIC_JS
+@DLL_PREFIX@mozjs@DLL_SUFFIX@
+#endif
+#ifdef MOZ_FOLD_LIBS
+@DLL_PREFIX@nspr4@DLL_SUFFIX@
+@DLL_PREFIX@plds4@DLL_SUFFIX@
+@DLL_PREFIX@plc4@DLL_SUFFIX@
+@DLL_PREFIX@ssl3@DLL_SUFFIX@
+@DLL_PREFIX@smime3@DLL_SUFFIX@
+@DLL_PREFIX@nssutil3@DLL_SUFFIX@
+@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
+#endif
+@DLL_PREFIX@xpcom@DLL_SUFFIX@
+LICENSE
+browserconfig.properties
+chrome/US.jar
+chrome/app-chrome.manifest
+chrome/browser.manifest
+chrome/chrome.rdf
+chrome/chromelist.txt
+chrome/classic.jar
+chrome/classic.manifest
+chrome/comm.jar
+chrome/comm.manifest
+chrome/en-win.jar
+chrome/help.jar
+chrome/installed-chrome.txt
+chrome/m3ffxtbr.jar
+chrome/m3ffxtbr.manifest
+chrome/overlayinfo/
+chrome/pippki.manifest
+chrome/reporter.jar
+chrome/reporter.manifest
+chrome/toolkit.manifest
+component.reg
+components/browser.manifest
+components/components.list
+components/@DLL_PREFIX@browserdirprovider@DLL_SUFFIX@
+components/@DLL_PREFIX@brwsrdir@DLL_SUFFIX@
+components/@DLL_PREFIX@myspell@DLL_SUFFIX@
+components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@
+components/@DLL_PREFIX@spellchk@DLL_SUFFIX@
+#ifdef XP_MACOSX
+components/libalerts.dylib
+components/libalerts_s.dylib
+#endif
+components/aboutCertError.js
+components/aboutPrivateBrowsing.js
+components/aboutRights.js
+components/aboutRobots.js
+components/aboutSessionRestore.js
+components/autocomplete.xpt
+components/airbag.xpt
+components/bookmarks.xpt
+components/compreg.dat
+components/history.xpt
+components/microsummaries.xpt
+components/myspell/en-US.aff
+components/myspell/en-US.dic
+components/nsAddonRepository.js
+components/nsBackgroundUpdateService.js
+components/nsBookmarkTransactionManager.js
+components/nsCloseAllWindows.js
+components/nsDictionary.js
+components/nsExtensionManager.js
+components/nsInterfaceInfoToIDL.js
+components/nsScriptableIO.js
+components/nsUrlClassifierTable.js
+components/nsXmlRpcClient.js
+components/pluginGlue.js
+components/sidebar.xpt
+#ifdef MOZ_B2G_RIL
+components/dom_telephony.xpt
+components/dom_wifi.xpt
+components/dom_system_b2g.xpt
+#endif
+components/dom_sms.xpt
+components/dom_webspeech.xpt
+components/uconvd.dll
+components/WeaveCrypto.js
+components/WeaveCrypto.manifest
+components/xmlextras.xpt
+components/xpcom.xpt
+components/xpti.dat
+components/xptitemp.dat
+components/nsMicrosummaryService.js
+components/nsProxyAutoConfig.manifest
+components/nsProxyAutoConfig.js
+D3DCompiler_42.dll
+d3dx9_42.dll
+d3dx9_43.dll
+defaults/pref/all.js
+defaults/pref/bug259708.js
+defaults/pref/bug307259.js
+defaults/pref/reporter.js
+defaults/pref/security-prefs.js
+defaults/pref/services-aitc.js
+defaults/pref/winpref.js
+defaults/pref/xpinstall.js
+defaults/preferences/services-aitc.js
+defaults/preferences/services-notifications.js
+defaults/preferences/services-sync.js
+defaults/preferences/healthreport-prefs.js
+defaults/profile/US/
+defaults/profile/extensions/
+defaults/profile/extensions/Extensions.rdf
+defaults/profile/extensions/installed-extensions.txt
+defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/
+defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
+defaults/profile/search.rdf
+#ifndef SHIP_FEEDBACK
+# In the average case, this directory is only used by Test Pilot, and will get
+# removed by the updater. In some cases (eg, partner builds), distribution/
+# will have other files and/or directories in it. In these cases, the updater
+# will print a non-fatal error and continue on, because we're not appending
+# '*' to force a recursive removal.
+distribution/
+distribution/extensions/
 distribution/extensions/testpilot@labs.mozilla.com.xpi
-
-# Directory removals
-chrome/
+#endif
+extensions/talkback@mozilla.org/
+extensions/talkback@mozilla.org/chrome.manifest
+extensions/talkback@mozilla.org/components/@DLL_PREFIX@qfaservices@DLL_SUFFIX@
+extensions/talkback@mozilla.org/components/qfaservices.xpt
+extensions/talkback@mozilla.org/install.rdf
+extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/
+extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/install.rdf
+extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png
+extensions/testpilot@labs.mozilla.com/chrome.manifest
+extensions/testpilot@labs.mozilla.com/components/TestPilot.js
+extensions/testpilot@labs.mozilla.com/content/all-studies-window.js
+extensions/testpilot@labs.mozilla.com/content/all-studies-window.xul
+extensions/testpilot@labs.mozilla.com/content/browser.css
+extensions/testpilot@labs.mozilla.com/content/browser.js
+extensions/testpilot@labs.mozilla.com/content/debug.html
+extensions/testpilot@labs.mozilla.com/content/experiment-page.js
+extensions/testpilot@labs.mozilla.com/content/feedback-browser.xul
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.colorhelpers.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.colorhelpers.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.crosshair.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.crosshair.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.image.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.image.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.navigate.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.navigate.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.selection.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.selection.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.stack.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.stack.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.threshold.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.threshold.min.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.js
+extensions/testpilot@labs.mozilla.com/content/flot/jquery.min.js
+extensions/testpilot@labs.mozilla.com/content/raw-data-dialog.js
+extensions/testpilot@labs.mozilla.com/content/raw-data-dialog.xul
+extensions/testpilot@labs.mozilla.com/content/screen.css
+extensions/testpilot@labs.mozilla.com/content/status-quit.html
+extensions/testpilot@labs.mozilla.com/content/status.html
+extensions/testpilot@labs.mozilla.com/content/survey-generator.js
+extensions/testpilot@labs.mozilla.com/content/take-survey.html
+extensions/testpilot@labs.mozilla.com/content/tp-browser.xul
+extensions/testpilot@labs.mozilla.com/content/welcome-page.js
+extensions/testpilot@labs.mozilla.com/content/welcome.html
+extensions/testpilot@labs.mozilla.com/content/window-utils.js
+extensions/testpilot@labs.mozilla.com/defaults/preferences/preferences.js
+extensions/testpilot@labs.mozilla.com/install.rdf
+extensions/testpilot@labs.mozilla.com/instrument/chrome.manifest
+extensions/testpilot@labs.mozilla.com/instrument/install.rdf
+extensions/testpilot@labs.mozilla.com/instrument/instrument.jsm
+extensions/testpilot@labs.mozilla.com/instrument/instrument.xul
+extensions/testpilot@labs.mozilla.com/modules/dbutils.js
+extensions/testpilot@labs.mozilla.com/modules/experiment_data_store.js
+extensions/testpilot@labs.mozilla.com/modules/extension-update.js
+extensions/testpilot@labs.mozilla.com/modules/feedback.js
+extensions/testpilot@labs.mozilla.com/modules/jar-code-store.js
+extensions/testpilot@labs.mozilla.com/modules/lib/cuddlefish.js
+extensions/testpilot@labs.mozilla.com/modules/lib/memory.js
+extensions/testpilot@labs.mozilla.com/modules/lib/observer-service.js
+extensions/testpilot@labs.mozilla.com/modules/lib/plain-text-console.js
+extensions/testpilot@labs.mozilla.com/modules/lib/preferences-service.js
+extensions/testpilot@labs.mozilla.com/modules/lib/securable-module.js
+extensions/testpilot@labs.mozilla.com/modules/lib/timer.js
+extensions/testpilot@labs.mozilla.com/modules/lib/traceback.js
+extensions/testpilot@labs.mozilla.com/modules/lib/unit-test.js
+extensions/testpilot@labs.mozilla.com/modules/lib/unload.js
+extensions/testpilot@labs.mozilla.com/modules/lib/url.js
+extensions/testpilot@labs.mozilla.com/modules/log4moz.js
+extensions/testpilot@labs.mozilla.com/modules/metadata.js
+extensions/testpilot@labs.mozilla.com/modules/Observers.js
+extensions/testpilot@labs.mozilla.com/modules/remote-experiment-loader.js
+extensions/testpilot@labs.mozilla.com/modules/setup.js
+extensions/testpilot@labs.mozilla.com/modules/string_sanitizer.js
+extensions/testpilot@labs.mozilla.com/modules/tasks.js
+extensions/testpilot@labs.mozilla.com/skin/all/badge-default.png
+extensions/testpilot@labs.mozilla.com/skin/all/bg.jpg
+extensions/testpilot@labs.mozilla.com/skin/all/css/screen-standalone.css
+extensions/testpilot@labs.mozilla.com/skin/all/dino_32x32.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/bg-status.jpg
+extensions/testpilot@labs.mozilla.com/skin/all/images/callout.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/callout_continue.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/data1.jpg
+extensions/testpilot@labs.mozilla.com/skin/all/images/data2.jpg
+extensions/testpilot@labs.mozilla.com/skin/all/images/home_comments.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/home_computer.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/home_continue.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/home_quit.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/home_results.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/home_twitter.png
+extensions/testpilot@labs.mozilla.com/skin/all/images/home_upcoming.png
+extensions/testpilot@labs.mozilla.com/skin/all/logo.png
+extensions/testpilot@labs.mozilla.com/skin/all/mozilla-logo.png
+extensions/testpilot@labs.mozilla.com/skin/all/status-completed.png
+extensions/testpilot@labs.mozilla.com/skin/all/status-ejected.png
+extensions/testpilot@labs.mozilla.com/skin/all/status-missed.png
+extensions/testpilot@labs.mozilla.com/skin/all/testpilot_16x16.png
+extensions/testpilot@labs.mozilla.com/skin/all/testPilot_200x200.png
+extensions/testpilot@labs.mozilla.com/skin/all/testpilot_32x32.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-completedstudies-32x32.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-currentstudies-32x32.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-generic-32x32.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-learned-32x32.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-results-48x48.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-settings-32x32.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-study-48x48.png
+extensions/testpilot@labs.mozilla.com/skin/all/tp-submit-48x48.png
+extensions/testpilot@labs.mozilla.com/skin/linux/close_button.png
+extensions/testpilot@labs.mozilla.com/skin/linux/feedback-frown-16x16.png
+extensions/testpilot@labs.mozilla.com/skin/linux/feedback-smile-16x16.png
+extensions/testpilot@labs.mozilla.com/skin/linux/feedback.css
+extensions/testpilot@labs.mozilla.com/skin/mac/close_button.png
+extensions/testpilot@labs.mozilla.com/skin/mac/feedback-frown-16x16.png
+extensions/testpilot@labs.mozilla.com/skin/mac/feedback-smile-16x16.png
+extensions/testpilot@labs.mozilla.com/skin/mac/feedback.css
+extensions/testpilot@labs.mozilla.com/skin/mac/notification-tail-down.png
+extensions/testpilot@labs.mozilla.com/skin/mac/notification-tail-up.png
+extensions/testpilot@labs.mozilla.com/skin/win/close_button.png
+extensions/testpilot@labs.mozilla.com/skin/win/feedback-frown-16x16.png
+extensions/testpilot@labs.mozilla.com/skin/win/feedback-smile-16x16.png
+extensions/testpilot@labs.mozilla.com/skin/win/feedback.css
+extensions/testpilot@labs.mozilla.com/skin/win/notification-tail-down.png
+extensions/testpilot@labs.mozilla.com/skin/win/notification-tail-up.png
+extensions/testpilot@labs.mozilla.com/tests/test_data_store.js
+extensions/uriloader@pdf.js.xpi
+greprefs/all.js
+greprefs/security-prefs.js
+greprefs/xpinstall.js
+install.rdf
+modules/JSON.jsm
+modules/SpatialNavigation.js
+modules/utils.js
+mozilla-runtime@BIN_SUFFIX@
+old-homepage-default.properties
+README.txt
+res/arrow.gif
+res/arrowd.gif
+res/broken-image.gif
+res/broken-image.png
+res/charsetData.properties
+res/charsetalias.properties
+res/cmessage.txt
+res/fonts/fontEncoding.properties
+res/fonts/fontNameMap.properties
+res/fonts/mathfontCMEX10.properties
+res/fonts/mathfontCMSY10.properties
+res/fonts/mathfontMTExtra.properties
+res/fonts/mathfontMath1.properties
+res/fonts/mathfontMath2.properties
+res/fonts/mathfontMath4.properties
+res/fonts/mathfontPUA.properties
+res/fonts/pangoFontEncoding.properties
+res/forms.css
+res/full-screen-override.css
+res/hiddenWindow.html
+res/html.css
+res/html/gopher-audio.gif
+res/html/gopher-binary.gif
+res/html/gopher-find.gif
+res/html/gopher-image.gif
+res/html/gopher-menu.gif
+res/html/gopher-movie.gif
+res/html/gopher-sound.gif
+res/html/gopher-telnet.gif
+res/html/gopher-text.gif
+res/html/gopher-unknown.gif
+res/loading-image.gif
+res/loading-image.png
+res/maccharset.properties
+res/mathml.css
+res/os2charset.properties
+res/quirk.css
+res/ua.css
+res/unixcharset.properties
+res/viewsource.css
+res/wincharset.properties
+#ifdef XP_MACOSX
+run-mozilla.sh
+#endif
+searchplugins/DRAE.gif
+searchplugins/DRAE.png
+searchplugins/DRAE.src
+searchplugins/MediaDICO-fr.gif
+searchplugins/MediaDICO-fr.png
+searchplugins/MediaDICO-fr.src
+searchplugins/allegro-pl.gif
+searchplugins/allegro-pl.png
+searchplugins/allegro-pl.src
+searchplugins/amazon-de.gif
+searchplugins/amazon-de.png
+searchplugins/amazon-de.src
+searchplugins/amazon-en-GB.gif
+searchplugins/amazon-en-GB.png
+searchplugins/amazon-en-GB.src
+searchplugins/amazon-france.gif
+searchplugins/amazon-france.png
+searchplugins/amazon-france.src
+searchplugins/amazon-jp.gif
+searchplugins/amazon-jp.png
+searchplugins/amazon-jp.src
+searchplugins/amazondotcom-zh-TW.gif
+searchplugins/amazondotcom-zh-TW.png
+searchplugins/amazondotcom-zh-TW.src
+searchplugins/amazondotcom.gif
+searchplugins/amazondotcom.png
+searchplugins/amazondotcom.png
+searchplugins/amazondotcom.src
+searchplugins/amazondotcom.src
+searchplugins/answers.gif
+searchplugins/answers.png
+searchplugins/answers.png
+searchplugins/answers.src
+searchplugins/answers.src
+searchplugins/atlas-sk.gif
+searchplugins/atlas-sk.png
+searchplugins/atlas-sk.src
+searchplugins/baidu.gif
+searchplugins/baidu.png
+searchplugins/baidu.src
+searchplugins/bluu.xml
+searchplugins/bok-NO.gif
+searchplugins/bok-NO.png
+searchplugins/bok-NO.src
+searchplugins/bolcom-nl.gif
+searchplugins/bolcom-nl.png
+searchplugins/bolcom-nl.src
+searchplugins/bookplus-fi.gif
+searchplugins/bookplus-fi.png
+searchplugins/bookplus-fi.src
+searchplugins/caplex-NO.gif
+searchplugins/caplex-NO.png
+searchplugins/caplex-NO.src
+searchplugins/centrum-cz.gif
+searchplugins/centrum-cz.png
+searchplugins/centrum-cz.src
+searchplugins/centrum-cz.xml
+searchplugins/creativecommons-fi.gif
+searchplugins/creativecommons-fi.png
+searchplugins/creativecommons-fi.src
+searchplugins/creativecommons-it.gif
+searchplugins/creativecommons-it.png
+searchplugins/creativecommons-it.src
+searchplugins/creativecommons-zh-TW.gif
+searchplugins/creativecommons-zh-TW.png
+searchplugins/creativecommons-zh-TW.src
+searchplugins/creativecommons.gif
+searchplugins/creativecommons.png
+searchplugins/creativecommons.png
+searchplugins/creativecommons.src
+searchplugins/creativecommons.src
+searchplugins/daum-ko.gif
+searchplugins/daum-ko.png
+searchplugins/daum-ko.src
+searchplugins/demauro-it.gif
+searchplugins/demauro-it.png
+searchplugins/demauro-it.src
+searchplugins/dictionary-en-GB.gif
+searchplugins/dictionary-en-GB.png
+searchplugins/dictionary-en-GB.src
+searchplugins/dictionary.png
+searchplugins/dictionary.src
+searchplugins/dunaj-sk.gif
+searchplugins/dunaj-sk.png
+searchplugins/dunaj-sk.src
+searchplugins/eBay-de.gif
+searchplugins/eBay-de.png
+searchplugins/eBay-de.src
+searchplugins/eBay-en-GB.gif
+searchplugins/eBay-en-GB.png
+searchplugins/eBay-en-GB.src
+searchplugins/eBay-france.gif
+searchplugins/eBay-france.png
+searchplugins/eBay-france.src
+searchplugins/eBay-fy-NL.xml
+searchplugins/eBay-gu.gif
+searchplugins/eBay-gu.png
+searchplugins/eBay-gu.src
+searchplugins/eBay-nl.gif
+searchplugins/eBay-nl.png
+searchplugins/eBay-nl.src
+searchplugins/eBay-nl.xml
+searchplugins/eBay-zh-CN.gif
+searchplugins/eBay-zh-CN.png
+searchplugins/eBay-zh-CN.src
+searchplugins/eBay-zh-CN.xml
+searchplugins/eBay-zh-TW.gif
+searchplugins/eBay-zh-TW.png
+searchplugins/eBay-zh-TW.src
+searchplugins/eBay-zh-TW.xml
+searchplugins/eBay.gif
+searchplugins/eBay.gif
+searchplugins/eBay.png
+searchplugins/eBay.src
+searchplugins/eBay.src
+searchplugins/ebay-it.gif
+searchplugins/ebay-it.png
+searchplugins/ebay-it.src
+searchplugins/filesearchru.gif
+searchplugins/filesearchru.png
+searchplugins/filesearchru.src
+searchplugins/filesearchru.xml
+searchplugins/goo.gif
+searchplugins/goo.png
+searchplugins/goo.src
+searchplugins/goo.xml
+searchplugins/google-NO.gif
+searchplugins/google-NO.png
+searchplugins/google-NO.src
+searchplugins/google-ar.gif
+searchplugins/google-ar.png
+searchplugins/google-ar.src
+searchplugins/google-ar.xml
+searchplugins/google-bg.gif
+searchplugins/google-bg.png
+searchplugins/google-bg.src
+searchplugins/google-ca.gif
+searchplugins/google-ca.png
+searchplugins/google-ca.src
+searchplugins/google-de.gif
+searchplugins/google-de.png
+searchplugins/google-de.src
+searchplugins/google-dk.gif
+searchplugins/google-dk.png
+searchplugins/google-dk.src
+searchplugins/google-en-GB.gif
+searchplugins/google-en-GB.png
+searchplugins/google-en-GB.src
+searchplugins/google-es-ES.gif
+searchplugins/google-es-ES.png
+searchplugins/google-es-ES.src
+searchplugins/google-eu.gif
+searchplugins/google-eu.png
+searchplugins/google-eu.src
+searchplugins/google-fi.gif
+searchplugins/google-fi.png
+searchplugins/google-fi.src
+searchplugins/google-ga-IE.gif
+searchplugins/google-ga-IE.png
+searchplugins/google-ga-IE.src
+searchplugins/google-gu.gif
+searchplugins/google-gu.png
+searchplugins/google-gu.src
+searchplugins/google-it.gif
+searchplugins/google-it.png
+searchplugins/google-it.src
+searchplugins/google-jp.gif
+searchplugins/google-jp.png
+searchplugins/google-jp.src
+searchplugins/google-ko.gif
+searchplugins/google-ko.png
+searchplugins/google-ko.src
+searchplugins/google-lt.gif
+searchplugins/google-lt.png
+searchplugins/google-lt.src
+searchplugins/google-nl.gif
+searchplugins/google-nl.png
+searchplugins/google-nl.src
+searchplugins/google-pl.gif
+searchplugins/google-pl.png
+searchplugins/google-pl.src
+searchplugins/google-pt-BR.gif
+searchplugins/google-pt-BR.png
+searchplugins/google-pt-BR.src
+searchplugins/google-ro.gif
+searchplugins/google-ro.png
+searchplugins/google-ro.src
+searchplugins/google-ru.gif
+searchplugins/google-ru.png
+searchplugins/google-ru.src
+searchplugins/google-sl.gif
+searchplugins/google-sl.png
+searchplugins/google-sl.src
+searchplugins/google-zh-TW.gif
+searchplugins/google-zh-TW.png
+searchplugins/google-zh-TW.src
+searchplugins/google.gif
+searchplugins/google.gif
+searchplugins/google.png
+searchplugins/google.src
+searchplugins/google.src
+searchplugins/grandiccionari.gif
+searchplugins/grandiccionari.png
+searchplugins/grandiccionari.src
+searchplugins/grandiccionari.xml
+searchplugins/huuto-fi.gif
+searchplugins/huuto-fi.png
+searchplugins/huuto-fi.src
+searchplugins/jyxo-cz.gif
+searchplugins/jyxo-cz.png
+searchplugins/jyxo-cz.src
+searchplugins/lingvo.yandex.ru.gif
+searchplugins/lingvo.yandex.ru.png
+searchplugins/lingvo.yandex.ru.src
+searchplugins/lingvo.yandex.ru.xml
+searchplugins/llibres.gif
+searchplugins/llibres.png
+searchplugins/llibres.src
+searchplugins/mall-cz.gif
+searchplugins/mall-cz.png
+searchplugins/mall-cz.src
+searchplugins/mercadolivre-com-br.gif
+searchplugins/mercadolivre-com-br.png
+searchplugins/mercadolivre-com-br.src
+searchplugins/merlin-pl.gif
+searchplugins/merlin-pl.png
+searchplugins/merlin-pl.src
+searchplugins/najdi-si.gif
+searchplugins/najdi-si.png
+searchplugins/najdi-si.src
+searchplugins/nana.xml
+searchplugins/naver-ko.gif
+searchplugins/naver-ko.png
+searchplugins/naver-ko.src
+searchplugins/netex.xml
+searchplugins/nosaltres.gif
+searchplugins/nosaltres.png
+searchplugins/nosaltres.src
+searchplugins/nosaltres.xml
+searchplugins/pbi-pl.gif
+searchplugins/pbi-pl.png
+searchplugins/pbi-pl.src
+searchplugins/pbi-pl.xml
+searchplugins/priceru.gif
+searchplugins/priceru.png
+searchplugins/priceru.src
+searchplugins/pwn-pl.gif
+searchplugins/pwn-pl.png
+searchplugins/pwn-pl.src
+searchplugins/qxl-NO.gif
+searchplugins/qxl-NO.png
+searchplugins/qxl-NO.src
+searchplugins/rakuten.gif
+searchplugins/rakuten.png
+searchplugins/rakuten.src
+searchplugins/rambler.xml
+searchplugins/seznam-cz.gif
+searchplugins/seznam-cz.png
+searchplugins/seznam-cz.src
+searchplugins/sigov-gov-si.gif
+searchplugins/sigov-gov-si.png
+searchplugins/sigov-gov-si.src
+searchplugins/slunecnice-cz.gif
+searchplugins/slunecnice-cz.png
+searchplugins/slunecnice-cz.src
+searchplugins/submarino-com-br.gif
+searchplugins/submarino-com-br.png
+searchplugins/submarino-com-br.src
+searchplugins/taobao.gif
+searchplugins/taobao.png
+searchplugins/taobao.src
+searchplugins/taobao.xml
+searchplugins/telefonkatalogen-NO.gif
+searchplugins/telefonkatalogen-NO.png
+searchplugins/telefonkatalogen-NO.src
+searchplugins/termiadur.xml
+searchplugins/universal-pt.gif
+searchplugins/universal-pt.png
+searchplugins/universal-pt.src
+searchplugins/vandale-nl.gif
+searchplugins/vandale-nl.png
+searchplugins/vandale-nl.src
+searchplugins/walla_sites.gif
+searchplugins/walla_sites.png
+searchplugins/walla_sites.src
+searchplugins/wikipedia-bg.gif
+searchplugins/wikipedia-bg.png
+searchplugins/wikipedia-bg.src
+searchplugins/wikipedia-ca.gif
+searchplugins/wikipedia-ca.png
+searchplugins/wikipedia-ca.src
+searchplugins/wikipedia-de.gif
+searchplugins/wikipedia-de.png
+searchplugins/wikipedia-de.src
+searchplugins/wikipedia-en-CN.xml
+searchplugins/wikipedia-es-ES.gif
+searchplugins/wikipedia-es-ES.png
+searchplugins/wikipedia-es-ES.src
+searchplugins/wikipedia-eu.gif
+searchplugins/wikipedia-eu.png
+searchplugins/wikipedia-eu.src
+searchplugins/wikipedia-fi.gif
+searchplugins/wikipedia-fi.png
+searchplugins/wikipedia-fi.src
+searchplugins/wikipedia-fr.gif
+searchplugins/wikipedia-fr.png
+searchplugins/wikipedia-fr.src
+searchplugins/wikipedia-fy.gif
+searchplugins/wikipedia-fy.png
+searchplugins/wikipedia-fy.src
+searchplugins/wikipedia-he.gif
+searchplugins/wikipedia-he.png
+searchplugins/wikipedia-he.src
+searchplugins/wikipedia-it.gif
+searchplugins/wikipedia-it.png
+searchplugins/wikipedia-it.src
+searchplugins/wikipedia-lt.gif
+searchplugins/wikipedia-lt.png
+searchplugins/wikipedia-lt.src
+searchplugins/wikipedia-nl.gif
+searchplugins/wikipedia-nl.png
+searchplugins/wikipedia-nl.src
+searchplugins/wikipedia-pl.gif
+searchplugins/wikipedia-pl.png
+searchplugins/wikipedia-pl.src
+searchplugins/wikipedia-ru.gif
+searchplugins/wikipedia-ru.png
+searchplugins/wikipedia-ru.src
+searchplugins/wikipedia-sk.gif
+searchplugins/wikipedia-sk.png
+searchplugins/wikipedia-sk.src
+searchplugins/wikipedia-zh.xml
+searchplugins/wp-pl.gif
+searchplugins/wp-pl.png
+searchplugins/wp-pl.src
+searchplugins/yahoo-NO.gif
+searchplugins/yahoo-NO.png
+searchplugins/yahoo-NO.src
+searchplugins/yahoo-ar.gif
+searchplugins/yahoo-ar.png
+searchplugins/yahoo-ar.src
+searchplugins/yahoo-ca.gif
+searchplugins/yahoo-ca.png
+searchplugins/yahoo-ca.src
+searchplugins/yahoo-cn.gif
+searchplugins/yahoo-cn.png
+searchplugins/yahoo-cn.src
+searchplugins/yahoo-de.gif
+searchplugins/yahoo-de.png
+searchplugins/yahoo-de.src
+searchplugins/yahoo-dk.gif
+searchplugins/yahoo-dk.png
+searchplugins/yahoo-dk.src
+searchplugins/yahoo-en-GB.gif
+searchplugins/yahoo-en-GB.png
+searchplugins/yahoo-en-GB.src
+searchplugins/yahoo-es-ES.gif
+searchplugins/yahoo-es-ES.png
+searchplugins/yahoo-es-ES.src
+searchplugins/yahoo-fi.gif
+searchplugins/yahoo-fi.png
+searchplugins/yahoo-fi.src
+searchplugins/yahoo-france.gif
+searchplugins/yahoo-france.png
+searchplugins/yahoo-france.src
+searchplugins/yahoo-gu.gif
+searchplugins/yahoo-gu.png
+searchplugins/yahoo-gu.src
+searchplugins/yahoo-it.gif
+searchplugins/yahoo-it.png
+searchplugins/yahoo-it.src
+searchplugins/yahoo-jp-auctions.gif
+searchplugins/yahoo-jp-auctions.png
+searchplugins/yahoo-jp-auctions.src
+searchplugins/yahoo-jp-shopping.gif
+searchplugins/yahoo-jp-shopping.png
+searchplugins/yahoo-jp-shopping.src
+searchplugins/yahoo-jp-shopping.xml
+searchplugins/yahoo-jp.gif
+searchplugins/yahoo-jp.png
+searchplugins/yahoo-jp.src
+searchplugins/yahoo-kr.gif
+searchplugins/yahoo-kr.png
+searchplugins/yahoo-kr.src
+searchplugins/yahoo-nl.gif
+searchplugins/yahoo-nl.png
+searchplugins/yahoo-nl.src
+searchplugins/yahoo-pt-BR.gif
+searchplugins/yahoo-pt-BR.png
+searchplugins/yahoo-pt-BR.src
+searchplugins/yahoo-ru.xml
+searchplugins/yahoo-tw.gif
+searchplugins/yahoo-tw.png
+searchplugins/yahoo-tw.src
+searchplugins/yahoo-zh-CN.xml
+searchplugins/yahoo.gif
+searchplugins/yahoo.gif
+searchplugins/yahoo.png
+searchplugins/yahoo.src
+searchplugins/yahoo.src
+searchplugins/yandex.gif
+searchplugins/yandex.png
+searchplugins/yandex.src
+searchplugins/zoznam-sk.gif
+searchplugins/zoznam-sk.png
+searchplugins/zoznam-sk.src
+uninstall/UninstallDeerPark.exe
+uninstall/UninstallFirefox.exe
+uninstall/uninst.exe
+uninstall/uninstall.exe
+#ifndef MOZ_UPDATER
+  #ifdef XP_MACOSX
+    updater.app/
+  #else
+    updater@BIN_SUFFIX@
+  #endif
+  updater.ini
+#endif
+xpicleanup@BIN_SUFFIX@
+#ifdef MOZ_OMNIJAR
+  update.locale
+  omni.jar
+  chrome/af.jar
+  chrome/af.manifest
+  chrome/ar.jar
+  chrome/ar.manifest
+  chrome/as.jar
+  chrome/as.manifest
+  chrome/ast.jar
+  chrome/ast.manifest
+  chrome/be.jar
+  chrome/be.manifest
+  chrome/bg.jar
+  chrome/bg.manifest
+  chrome/bn-BD.jar
+  chrome/bn-BD.manifest
+  chrome/bn-IN.jar
+  chrome/bn-IN.manifest
+  chrome/ca.jar
+  chrome/ca.manifest
+  chrome/cs.jar
+  chrome/cs.manifest
+  chrome/cy.jar
+  chrome/cy.manifest
+  chrome/da.jar
+  chrome/da.manifest
+  chrome/de.jar
+  chrome/de.manifest
+  chrome/el.jar
+  chrome/el.manifest
+  chrome/en-GB.jar
+  chrome/en-GB.manifest
+  chrome/en-US.jar
+  chrome/en-US.manifest
+  chrome/eo.jar
+  chrome/eo.manifest
+  chrome/es-AR.jar
+  chrome/es-AR.manifest
+  chrome/es-CL.jar
+  chrome/es-CL.manifest
+  chrome/es-ES.jar
+  chrome/es-ES.manifest
+  chrome/es-MX.jar
+  chrome/es-MX.manifest
+  chrome/et.jar
+  chrome/et.manifest
+  chrome/eu.jar
+  chrome/eu.manifest
+  chrome/fa.jar
+  chrome/fa.manifest
+  chrome/fi.jar
+  chrome/fi.manifest
+  chrome/fr.jar
+  chrome/fr.manifest
+  chrome/fy-NL.jar
+  chrome/fy-NL.manifest
+  chrome/ga-IE.jar
+  chrome/ga-IE.manifest
+  chrome/gd.jar
+  chrome/gd.manifest
+  chrome/gl.jar
+  chrome/gl.manifest
+  chrome/gu-IN.jar
+  chrome/gu-IN.manifest
+  chrome/he.jar
+  chrome/he.manifest
+  chrome/hi-IN.jar
+  chrome/hi-IN.manifest
+  chrome/hr.jar
+  chrome/hr.manifest
+  chrome/hu.jar
+  chrome/hu.manifest
+  chrome/id.jar
+  chrome/id.manifest
+  chrome/is.jar
+  chrome/is.manifest
+  chrome/it.jar
+  chrome/it.manifest
+  chrome/ja-JP-mac.jar
+  chrome/ja-JP-mac.manifest
+  chrome/ja.jar
+  chrome/ja.manifest
+  chrome/ka.jar
+  chrome/ka.manifest
+  chrome/kk.jar
+  chrome/kk.manifest
+  chrome/kn.jar
+  chrome/kn.manifest
+  chrome/ko.jar
+  chrome/ko.manifest
+  chrome/ku.jar
+  chrome/ku.manifest
+  chrome/lt.jar
+  chrome/lt.manifest
+  chrome/lv.jar
+  chrome/lv.manifest
+  chrome/mk.jar
+  chrome/mk.manifest
+  chrome/ml.jar
+  chrome/ml.manifest
+  chrome/mn.jar
+  chrome/mn.manifest
+  chrome/mr.jar
+  chrome/mr.manifest
+  chrome/nb-NO.jar
+  chrome/nb-NO.manifest
+  chrome/nl.jar
+  chrome/nl.manifest
+  chrome/nn-NO.jar
+  chrome/nn-NO.manifest
+  chrome/oc.jar
+  chrome/oc.manifest
+  chrome/or.jar
+  chrome/or.manifest
+  chrome/pa-IN.jar
+  chrome/pa-IN.manifest
+  chrome/pl.jar
+  chrome/pl.manifest
+  chrome/pt-BR.jar
+  chrome/pt-BR.manifest
+  chrome/pt-PT.jar
+  chrome/pt-PT.manifest
+  chrome/rm.jar
+  chrome/rm.manifest
+  chrome/ro.jar
+  chrome/ro.manifest
+  chrome/ru.jar
+  chrome/ru.manifest
+  chrome/si.jar
+  chrome/si.manifest
+  chrome/sk.jar
+  chrome/sk.manifest
+  chrome/sl.jar
+  chrome/sl.manifest
+  chrome/sq.jar
+  chrome/sq.manifest
+  chrome/sr.jar
+  chrome/sr.manifest
+  chrome/sv-SE.jar
+  chrome/sv-SE.manifest
+  chrome/ta-LK.jar
+  chrome/ta-LK.manifest
+  chrome/ta.jar
+  chrome/ta.manifest
+  chrome/te.jar
+  chrome/te.manifest
+  chrome/th.jar
+  chrome/th.manifest
+  chrome/tr.jar
+  chrome/tr.manifest
+  chrome/uk.jar
+  chrome/uk.manifest
+  chrome/vi.jar
+  chrome/vi.manifest
+  chrome/zh-CN.jar
+  chrome/zh-CN.manifest
+  chrome/zh-TW.jar
+  chrome/zh-TW.manifest
+  chrome/browser.jar
+  chrome/localized.manifest
+  chrome/nonlocalized.manifest
+  chrome/pippki.jar
+  chrome/toolkit.jar
+  components/addonManager.js
+  components/Aitc.js
+  components/AitcComponents.manifest
+  components/amContentHandler.js
+  components/amWebInstallListener.js
+  components/binary.manifest
+  components/browser.xpt
+  components/BrowserElementParent.js
+  components/BrowserElementParent.manifest
+  components/BrowserElementPromptService.jsm
+  components/BrowserElementParent.jsm
+  components/contentAreaDropListener.js
+  components/contentSecurityPolicy.js
+  components/crypto-SDR.js
+  components/FeedConverter.js
+  components/FeedProcessor.js
+  components/FeedWriter.js
+  components/fuelApplication.js
+  components/GPSDGeolocationProvider.js
+  components/interfaces.manifest
+  components/jsconsole-clhandler.js
+  components/MetricsCollectionService.js
+  components/NetworkGeolocationProvider.js
+  components/NotificationsComponents.manifest
+  components/nsBadCertHandler.js
+  components/nsBlocklistService.js
+  components/nsBrowserContentHandler.js
+  components/nsBrowserGlue.js
+  components/nsContentDispatchChooser.js
+  components/nsContentPrefService.js
+  components/nsDefaultCLH.js
+  components/nsDownloadManagerUI.js
+  #ifdef XP_UNIX
+    #ifndef XP_MACOSX
+      components/nsFilePicker.js
+    #endif
+  #endif
+  components/nsFormAutoComplete.js
+  components/nsFormHistory.js
+  components/nsHandlerService.js
+  components/nsHelperAppDlg.js
+  components/nsINIProcessor.js
+  components/nsLivemarkService.js
+  components/nsLoginInfo.js
+  components/nsLoginManager.js
+  components/nsLoginManagerPrompter.js
+  components/nsPlacesAutoComplete.js
+  components/nsPlacesDBFlush.js
+  components/nsPlacesExpiration.js
+  components/nsPrivateBrowsingService.js
+  components/nsPrompter.js
+  components/nsProxyAutoConfig.manifest
+  components/nsProxyAutoConfig.js
+  components/nsSafebrowsingApplication.js
+  components/nsSearchService.js
+  components/nsSearchSuggestions.js
+  components/nsSessionStartup.js
+  components/nsSessionStore.js
+  components/nsSetDefaultBrowser.js
+  components/nsSidebar.js
+  components/nsTaggingService.js
+  components/nsTryToClose.js
+  components/nsUpdateService.js
+  components/nsUpdateServiceStub.js
+  components/nsUpdateTimerManager.js
+  components/nsUrlClassifierLib.js
+  components/nsUrlClassifierListManager.js
+  components/nsURLFormatter.js
+  components/nsWebHandlerApp.js
+  components/PlacesProtocolHandler.js
+  components/storage-Legacy.js
+  components/storage-mozStorage.js
+#ifdef MOZ_B2G_RIL
+  components/nsTelephonyWorker.manifest
+  components/nsTelephonyWorker.js
+  components/Telephony.manifest
+  components/Telephony.js
+  components/WifiWorker.js
+  components/WifiWorker.manifest
+  components/DOMWifiManager.js
+  components/DOMWifiManager.manifest
+#endif
+  components/txEXSLTRegExFunctions.js
+  components/Weave.js
+  components/Webapps.js
+  components/Webapps.manifest
+  components/WebContentConverter.js
+  defaults/autoconfig/platform.js
+  defaults/autoconfig/prefcalls.js
+  defaults/pref/firefox-branding.js
+  defaults/pref/firefox.js
+  defaults/pref/firefox-l10n.js
+  defaults/pref/services-sync.js
+  defaults/profile/bookmarks.html
+  defaults/profile/chrome/userChrome-example.css
+  defaults/profile/chrome/userContent-example.css
+  defaults/profile/localstore.rdf
+  defaults/profile/mimeTypes.rdf
+  defaults/profile/prefs.js
+  greprefs.js
+  hyphenation/
+  hyphenation/hyph_af.dic
+  hyphenation/hyph_bg.dic
+  hyphenation/hyph_ca.dic
+  hyphenation/hyph_cy.dic
+  hyphenation/hyph_da.dic
+  hyphenation/hyph_de-1901.dic
+  hyphenation/hyph_de-1996.dic
+  hyphenation/hyph_de-CH.dic
+  hyphenation/hyph_en_US.dic
+  hyphenation/hyph_eo.dic
+  hyphenation/hyph_es.dic
+  hyphenation/hyph_et.dic
+  hyphenation/hyph_fi.dic
+  hyphenation/hyph_fr.dic
+  hyphenation/hyph_gl.dic
+  hyphenation/hyph_hr.dic
+  hyphenation/hyph_hsb.dic
+  hyphenation/hyph_hu.dic
+  hyphenation/hyph_ia.dic
+  hyphenation/hyph_is.dic
+  hyphenation/hyph_it.dic
+  hyphenation/hyph_kmr.dic
+  hyphenation/hyph_la.dic
+  hyphenation/hyph_lt.dic
+  hyphenation/hyph_mn.dic
+  hyphenation/hyph_nb.dic
+  hyphenation/hyph_nl.dic
+  hyphenation/hyph_nn.dic
+  hyphenation/hyph_pt.dic
+  hyphenation/hyph_ru.dic
+  hyphenation/hyph_sh.dic
+  hyphenation/hyph_sl.dic
+  hyphenation/hyph_sv.dic
+  hyphenation/hyph_tr.dic
+  hyphenation/hyph_uk.dic
+  modules/AddonLogging.jsm
+  modules/AddonManager.jsm
+  modules/AddonRepository.jsm
+  modules/AddonUpdateChecker.jsm
+  modules/CertUtils.jsm
+  modules/CrashSubmit.jsm
+  modules/CSPUtils.jsm
+  modules/ctypes.jsm
+  modules/debug.js
+  modules/distribution.js
+  modules/DownloadLastDir.jsm
+  modules/DownloadPaths.jsm
+  #ifdef XP_WIN
+    modules/DownloadTaskbarProgress.jsm
+  #endif
+  modules/DownloadUtils.jsm
+  modules/FileUtils.jsm
+  modules/Geometry.jsm
+  modules/HUDService.jsm
+  modules/InlineSpellChecker.jsm
+  modules/ISO8601DateUtils.jsm
+  modules/LightweightThemeConsumer.jsm
+  modules/LightweightThemeManager.jsm
+  modules/Microformats.js
+  modules/NetUtil.jsm
+  modules/NetworkPrioritizer.jsm
+  modules/openLocationLastURL.jsm
+  modules/PerfMeasurement.jsm
+  modules/PlacesDBUtils.jsm
+  modules/PlacesUIUtils.jsm
+  modules/PlacesUtils.jsm
+  modules/PluginProvider.jsm
+  modules/PluralForm.jsm
+  modules/PopupNotifications.jsm
+  modules/reflect.jsm
+  modules/Services.jsm
+  modules/services-common/async.js
+  modules/services-common/log4moz.js
+  modules/services-common/observers.js
+  modules/services-common/preferences.js
+  modules/services-common/rest.js
+  modules/services-common/stringbundle.js
+  modules/services-common/utils.js
+  modules/services-notifications/service.js
+  modules/services-sync/auth.js
+  modules/services-sync/base_records/collection.js
+  modules/services-sync/base_records/crypto.js
+  modules/services-sync/base_records/keys.js
+  modules/services-sync/base_records/wbo.js
+  modules/services-sync/constants.js
+  modules/services-sync/engines/bookmarks.js
+  modules/services-sync/engines/clients.js
+  modules/services-sync/engines/forms.js
+  modules/services-sync/engines/history.js
+  modules/services-sync/engines.js
+  modules/services-sync/engines/passwords.js
+  modules/services-sync/engines/prefs.js
+  modules/services-sync/engines/tabs.js
+  modules/services-sync/ext/Observers.js
+  modules/services-sync/ext/Preferences.js
+  modules/services-sync/ext/StringBundle.js
+  modules/services-sync/ext/Sync.js
+  modules/services-sync/identity.js
+  modules/services-sync/log4moz.js
+  modules/services-sync/notifications.js
+  modules/services-sync/resource.js
+  modules/services-sync/service.js
+  modules/services-sync/status.js
+  modules/services-sync/stores.js
+  modules/services-sync/trackers.js
+  modules/services-sync/type_records/bookmark.js
+  modules/services-sync/type_records/clients.js
+  modules/services-sync/type_records/forms.js
+  modules/services-sync/type_records/history.js
+  modules/services-sync/type_records/passwords.js
+  modules/services-sync/type_records/prefs.js
+  modules/services-sync/type_records/tabs.js
+  modules/services-sync/util.js
+  modules/stylePanel.jsm
+  modules/tabview/AllTabs.jsm
+  modules/tabview/groups.jsm
+  modules/tabview/utils.jsm
+  modules/Webapps.jsm
+  modules/WindowDraggingUtils.jsm
+  #ifdef XP_WIN
+    modules/WindowsJumpLists.jsm
+    modules/WindowsPreviewPerTab.jsm
+  #endif
+  modules/XPCOMUtils.jsm
+  modules/XPIProvider.jsm
+  res/contenteditable.css
+  res/designmode.css
+  res/dtd/mathml.dtd
+  res/dtd/xhtml11.dtd
+  res/EditorOverride.css
+  res/entityTables/html40Latin1.properties
+  res/entityTables/html40Special.properties
+  res/entityTables/html40Symbols.properties
+  res/entityTables/htmlEntityVersions.properties
+  res/entityTables/mathml20.properties
+  res/entityTables/transliterate.properties
+  res/fonts/mathfont.properties
+  res/fonts/mathfontStandardSymbolsL.properties
+  res/fonts/mathfontSTIXNonUnicode.properties
+  res/fonts/mathfontSTIXSize1.properties
+  res/fonts/mathfontSTIXSizeOneSym.properties
+  #ifdef XP_WIN
+    res/fonts/mathfontSymbol.properties
+  #endif
+  res/fonts/mathfontUnicode.properties
+  res/grabber.gif
+  res/html/folder.png
+  res/langGroups.properties
+  res/language.properties
+  res/svg.css
+  res/table-add-column-after-active.gif
+  res/table-add-column-after.gif
+  res/table-add-column-after-hover.gif
+  res/table-add-column-before-active.gif
+  res/table-add-column-before.gif
+  res/table-add-column-before-hover.gif
+  res/table-add-row-after-active.gif
+  res/table-add-row-after.gif
+  res/table-add-row-after-hover.gif
+  res/table-add-row-before-active.gif
+  res/table-add-row-before.gif
+  res/table-add-row-before-hover.gif
+  res/table-remove-column-active.gif
+  res/table-remove-column.gif
+  res/table-remove-column-hover.gif
+  res/table-remove-row-active.gif
+  res/table-remove-row.gif
+  res/table-remove-row-hover.gif
+#else
+  components/binary.manifest
+  omni.jar
+  omni.ja
+#endif
+#ifdef XP_MACOSX
+  ../Plug-Ins/PrintPDE.plugin/Contents/Info.plist
+  ../Plug-Ins/PrintPDE.plugin/Contents/MacOS/PrintPDE
+  ../Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/Localizable.strings
+  ../Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/PrintPDE.nib/classes.nib
+  ../Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/PrintPDE.nib/info.nib
+  ../Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/PrintPDE.nib/objects.xib
+  ../Resources/firefox-bin.rsrc
+  components/accessibility.xpt
+  components/alerts.xpt
+  components/appshell.xpt
+  components/appstartup.xpt
+  components/autoconfig.xpt
+  components/browser-feeds.xpt
+  components/browsercompsbase.xpt
+  components/browsersearch.xpt
+  components/caps.xpt
+  components/chardet.xpt
+  components/chrome.xpt
+  components/commandhandler.xpt
+  components/commandlines.xpt
+  components/composer.xpt
+  components/content.xpt
+  components/content_base.xpt
+  components/content_html.xpt
+  components/content_htmldoc.xpt
+  components/content_xmldoc.xpt
+  components/content_xslt.xpt
+  components/content_xtf.xpt
+  components/contentprefs.xpt
+  components/cookie.xpt
+  components/crashreporter.xpt
+  components/directory.xpt
+  components/docshell.xpt
+  components/dom.xpt
+  components/dom_apps.xpt
+  components/dom_base.xpt
+#ifdef MOZ_B2G_RIL
+  components/dom_telephony.xpt
+  components/dom_wifi.xpt
+  components/dom_system_b2g.xpt
+#endif
+  components/dom_canvas.xpt
+  components/dom_core.xpt
+  components/dom_css.xpt
+  components/dom_events.xpt
+  components/dom_geolocation.xpt
+  components/dom_devicestorage.xpt
+  components/dom_html.xpt
+  components/dom_json.xpt
+  components/dom_loadsave.xpt
+  components/dom_offline.xpt
+  components/dom_push.xpt
+  components/dom_range.xpt
+  components/dom_sidebar.xpt
+  components/dom_smil.xpt
+  components/dom_storage.xpt
+  components/dom_stylesheets.xpt
+  components/dom_svg.xpt
+  components/dom_threads.xpt
+  components/dom_traversal.xpt
+  components/dom_views.xpt
+  components/dom_xbl.xpt
+  components/dom_xpath.xpt
+  components/dom_xul.xpt
+  components/downloads.xpt
+  components/editor.xpt
+  components/embed_base.xpt
+  components/extensions.xpt
+  components/exthandler.xpt
+  components/exthelper.xpt
+  components/fastfind.xpt
+  components/feeds.xpt
+  components/find.xpt
+  components/firefox.xpt
+  components/fuel.xpt
+  components/gfx.xpt
+  components/gksvgrenderer.xpt
+  components/html5.xpt
+  components/htmlparser.xpt
+  components/imgicon.xpt
+  components/imglib2.xpt
+  components/inspector.xpt
+  components/intl.xpt
+  components/jar.xpt
+  components/jsconsole.xpt
+  components/jsdservice.xpt
+  components/layout_base.xpt
+  components/layout_printing.xpt
+  components/layout_xul.xpt
+  components/layout_xul_tree.xpt
+  components/locale.xpt
+  components/loginmgr.xpt
+  components/lwbrk.xpt
+  components/migration.xpt
+  components/mimetype.xpt
+  components/mozbrwsr.xpt
+  components/mozfind.xpt
+  components/necko.xpt
+  components/necko_about.xpt
+  components/necko_cache.xpt
+  components/necko_cookie.xpt
+  components/necko_data.xpt
+  components/necko_dns.xpt
+  components/necko_file.xpt
+  components/necko_ftp.xpt
+  components/necko_http.xpt
+  components/necko_res.xpt
+  components/necko_socket.xpt
+  components/necko_strconv.xpt
+  components/necko_viewsource.xpt
+  components/necko_wifi.xpt
+  components/nsKillAll.js
+  components/nsProgressDialog.js
+  components/nsResetPref.js
+  components/oji.xpt
+  components/parentalcontrols.xpt
+  components/passwordmgr.xpt
+  components/pipboot.xpt
+  components/pipnss.xpt
+  components/pippki.xpt
+  components/places.xpt
+  components/plugin.xpt
+  components/pref.xpt
+  components/prefetch.xpt
+  components/profile.xpt
+  components/progressDlg.xpt
+  components/proxyObjInst.xpt
+  components/rdf.xpt
+  components/safebrowsing.xpt
+  components/satchel.xpt
+  components/saxparser.xpt
+  components/search.xpt
+  components/sessionstore.xpt
+  components/shellservice.xpt
+  components/shistory.xpt
+  components/spellchecker.xpt
+  components/storage.xpt
+  components/toolkitprofile.xpt
+  components/toolkitsearch.xpt
+  components/txmgr.xpt
+  components/txtsvc.xpt
+  components/uconv.xpt
+  components/unicharutil.xpt
+  components/update.xpt
+  components/uriloader.xpt
+  components/url-classifier.xpt
+  components/urlformatter.xpt
+  components/webBrowser_core.xpt
+  components/webbrowserpersist.xpt
+  components/webshell_idls.xpt
+  components/websrvcs.xpt
+  components/widget.xpt
+  components/widget_cocoa.xpt
+  components/widget_mac.xpt
+  components/windowds.xpt
+  components/windowwatcher.xpt
+  components/xml-rpc.xpt
+  components/xpcom_base.xpt
+  components/xpcom_components.xpt
+  components/xpcom_ds.xpt
+  components/xpcom_io.xpt
+  components/xpcom_obsolete.xpt
+  components/xpcom_system.xpt
+  components/xpcom_threads.xpt
+  components/xpcom_xpti.xpt
+  components/xpconnect.xpt
+  components/xpinstall.xpt
+  components/xulapp.xpt
+  components/xuldoc.xpt
+  components/xultmpl.xpt
+  components/zipwriter.xpt
+  extensions/inspector@mozilla.org/chrome/chromelist.txt
+  init.d/README
+  libwidget.rsrc
+  plugin-container
+  plugins/Default Plugin.plugin/Contents/Info.plist
+  plugins/Default Plugin.plugin/Contents/MacOS/Default Plugin
+  plugins/Default Plugin.plugin/Contents/PkgInfo
+  plugins/Default Plugin.plugin/Contents/Resources/Default Plugin.rsrc
+  plugins/Default Plugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings
+  plugins/DefaultPlugin.plugin/Contents/Info.plist
+  plugins/DefaultPlugin.plugin/Contents/MacOS/DefaultPlugin
+  plugins/DefaultPlugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings
+  plugins/DefaultPlugin.plugin/Contents/Resources/plugin.png
+  plugins/JavaEmbeddingPlugin.bundle/Contents/Info.plist
+  plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin
+  plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin.policy
+  plugins/JavaEmbeddingPlugin.bundle/Contents/PkgInfo
+  plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/English.lproj/InfoPlist.strings
+  plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/Java/JavaEmbeddingPlugin.jar
+  plugins/MRJPlugin.plugin/Contents/Info.plist
+  plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin
+  plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.jar
+  plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.policy
+  plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.properties
+  plugins/MRJPlugin.plugin/Contents/PkgInfo
+  plugins/MRJPlugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings
+  plugins/MRJPlugin.plugin/Contents/Resources/MRJPlugin.rsrc
+  redo-prebinding.sh
+  res/bloatcycle.html
+  res/cursors/arrowN.tiff
+  res/cursors/arrowS.tiff
+  res/cursors/colResize.tiff
+  res/cursors/help.tiff
+  res/cursors/rowResize.tiff
+  res/cursors/sizeNE.tiff
+  res/cursors/sizeNESW.tiff
+  res/cursors/sizeNS.tiff
+  res/cursors/sizeNW.tiff
+  res/cursors/sizeNWSE.tiff
+  res/cursors/sizeSE.tiff
+  res/cursors/sizeSW.tiff
+  res/cursors/spin1.tiff
+  res/cursors/spin2.tiff
+  res/cursors/spin3.tiff
+  res/cursors/spin4.tiff
+  res/cursors/vtIBeam.tiff
+  res/cursors/zoomIn.tiff
+  res/cursors/zoomOut.tiff
+  res/cursors/CVS/Entries
+  res/cursors/CVS/Repository
+  res/cursors/CVS/Root
+  res/cursors/CVS/Tag
+  res/viewer.properties
+  updater.app/Contents/MacOS/updater.ini
+#endif
 #ifdef XP_UNIX
   #ifndef XP_MACOSX
-    chrome/icons/
-    chrome/icons/default/
+    chrome/icons/default/default.xpm
+    components/libimgicon.so
+    dictionaries/PL.aff
+    dictionaries/PL.dic
+    icons/document.png
+    icons/mozicon16.xpm
+    icons/mozicon50.xpm
+    plugins/libnullplugin.so
+    readme.txt
   #endif
 #endif
-chrome/overlayinfo/
-components/
-defaults/autoconfig/
-defaults/profile/
-defaults/profile/chrome/
-defaults/profile/US/*
-defaults/profile/extensions/
-defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/*
-distribution/
-distribution/extensions/
-extensions/
-extensions/inspector@mozilla.org/*
-extensions/reporter@mozilla.org/*
-extensions/talkback@mozilla.org/*
-extensions/testpilot@labs.mozilla.com/*
-extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/*
-extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/*
-greprefs/
+#ifndef XP_WIN
+  res/fonts/mathfontSymbol.properties
+#endif
+#ifdef XP_WIN
+  components/brwsrcmp.dll
+  components/jsd3250.dll
+  components/nsPostUpdateWin.js
+  js3250.dll
+  mozcpp19.dll
+  mozcrt19.dll
+  #if MOZ_MSVC_REDIST != 1400
+    Microsoft.VC80.CRT.manifest
+    msvcm80.dll
+    msvcp80.dll
+    msvcr80.dll
+  #endif
+  #if MOZ_MSVC_REDIST != 1500
+    Microsoft.VC90.CRT.manifest
+    msvcm90.dll
+    msvcp90.dll
+    msvcr90.dll
+  #endif
+  #if MOZ_MSVC_REDIST != 1600
+    msvcp100.dll
+    msvcr100.dll
+  #endif
+  #if MOZ_MSVC_REDIST != 1700
+    msvcp110.dll
+    msvcr110.dll
+    #ifdef MOZ_METRO
+      vccorlib110.dll
+    #endif
+  #endif
+  #if MOZ_MSVC_REDIST != 1800
+    msvcp120.dll
+    msvcr120.dll
+    #ifdef MOZ_METRO
+      vccorlib120.dll
+    #endif
+  #endif
+  plugins/npnul32.dll
+#endif
+@DLL_PREFIX@xpcom_core@DLL_SUFFIX@
+components/@DLL_PREFIX@jar50@DLL_SUFFIX@
+#ifdef XP_WIN
+  components/xpinstal.dll
+#else
+  components/@DLL_PREFIX@jsd@DLL_SUFFIX@
+  components/@DLL_PREFIX@xpinstall@DLL_SUFFIX@
+#endif
+#ifndef MOZ_UPDATER
+  components/nsUpdateService.js
+  components/nsUpdateServiceStub.js
+#endif
+#Talkback
+#ifdef XP_WIN
+  extensions/talkback@mozilla.org/components/BrandRes.dll
+  extensions/talkback@mozilla.org/components/fullsoft.dll
+  extensions/talkback@mozilla.org/components/master.ini
+  extensions/talkback@mozilla.org/components/talkback-l10n.ini
+  extensions/talkback@mozilla.org/components/talkback.cnt
+  extensions/talkback@mozilla.org/components/talkback.exe
+  extensions/talkback@mozilla.org/components/talkback.hlp
+  extensions/talkback@mozilla.org/InstallDisabled
+#else
+  #ifdef XP_MACOSX
+    extensions/talkback@mozilla.org/components/talkback/master.ini
+    extensions/talkback@mozilla.org/components/talkback/talkback@DLL_SUFFIX@
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Info.plist
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/MacOS/Talkback
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/pbdevelopment.plist
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/PkgInfo
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/delete.tiff
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/disable.tiff
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/enable.tiff
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/classes.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/info.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/objects.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/InfoPlist.strings
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/classes.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/info.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/objects.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/Localizable.strings
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/objects.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/classes.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/info.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/objects.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/classes.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/info.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/objects.nib
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/KeyInfoKeys.plist
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/KeyInfoSections.plist
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/send.tiff
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/sort_ascending.tiff
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/sort_descending.tiff
+    extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/Talkback.icns
+  #else
+    extensions/talkback@mozilla.org/components/talkback/talkback
+    extensions/talkback@mozilla.org/components/talkback/XTalkback.ad
+    extensions/talkback@mozilla.org/components/talkback/master.ini
+    extensions/talkback@mozilla.org/components/talkback/talkback.so
+  #endif
+#endif
+#Remove Talkback files from old location (in case user updates from 1.0.x)
+components/BrandRes.dll
+components/fullsoft.dll
+components/master.ini
+components/qfaservices.dll
+components/qfaservices.xpt
+components/talkback-l10n.ini
+components/talkback.cnt
+components/talkback.exe
+components/talkback.hlp
+components/libqfaservices.so
+components/talkback/master.ini
+components/talkback/talkback
+components/talkback/talkback.so
+components/talkback/XTalkback.ad
+extensions/reporter@mozilla.org/install.rdf
+extensions/reporter@mozilla.org/chrome.manifest
+extensions/reporter@mozilla.org/chrome/reporter.jar
+extensions/reporter@mozilla.org/defaults/preferences/reporter.js
+#Remove Inspector (present from upgrades from Fx2/Fx3b3)
+extensions/inspector@mozilla.org/install.rdf
+extensions/inspector@mozilla.org/components/inspector-cmdline.js
+extensions/inspector@mozilla.org/chrome.manifest
+extensions/inspector@mozilla.org/chrome/inspector.jar
+extensions/inspector@mozilla.org/defaults/preferences/inspector.js
+extensions/inspector@mozilla.org/platform/WINNT/chrome/icons/default/winInspectorMain.ico
+extensions/inspector@mozilla.org/components/inspector.xpt
+extensions/inspector@mozilla.org/components/@DLL_PREFIX@inspector@DLL_SUFFIX@
+extensions/inspector@mozilla.org/chrome/icons/default/winInspectorMain.ico
+components/nsPlacesTransactionsService.js
+components/browserplaces.xpt
+components/nsPlacesDBFlush.js
+#ifndef MOZ_MAINTENANCE_SERVICE
+maintenanceservice.exe
+maintenanceservice_installer.exe
+#endif
 jssubloader/
-modules/
-#ifdef XP_MACOSX
-  plugins/Default Plugin.plugin/*
-  plugins/JavaEmbeddingPlugin.bundle/*
-  plugins/MRJPlugin.plugin/*
-  ../Plug-Ins/PrintPDE.plugin/*
-#endif
-res/*
-searchplugins/*
-webapprt/components/
--- a/browser/locales/en-US/chrome/browser/devtools/webconsole.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/webconsole.properties
@@ -70,16 +70,20 @@ ConsoleAPIDisabled=The Web Console loggi
 # the URL the correct direction. Parameters: %S is the web page URL.
 webConsoleWindowTitleAndURL=Web Console - %S
 
 # LOCALIZATION NOTE (webConsoleMixedContentWarning): the message displayed
 # after a URL in the Web Console that has been flagged for Mixed Content (i.e.
 # http content in an https page).
 webConsoleMixedContentWarning=Mixed Content
 
+# LOCALIZATION NOTE (webConsoleMoreInfoLabel): the more info tag displayed
+# after security related web console messages.
+webConsoleMoreInfoLabel=Learn More
+
 # LOCALIZATION NOTE (scratchpad.linkText): the text used in the right hand
 # side of the Web Console command line when JavaScript is being entered, to
 # indicate how to jump into scratchpad mode.
 scratchpad.linkText=Shift+RETURN - Open in Scratchpad
 
 # LOCALIZATION NOTE (gcliterm.instanceLabel): the console displays objects
 # using their type (from the constructor function) in this descriptive string.
 # Parameters: %S is the object type.
--- a/browser/metro/base/content/browser.xul
+++ b/browser/metro/base/content/browser.xul
@@ -286,25 +286,23 @@
             <toolbarbutton id="reload-button" class="urlbar-button"
                            oncommand="CommandUpdater.doCommand(
                                         event.shiftKey ? 'cmd_forceReload'
                                                        : 'cmd_reload');"/>
             <toolbarbutton id="stop-button" class="urlbar-button"
                            command="cmd_stop"/>
           </hbox>
 
-          <circularprogressindicator id="download-progress"
-                                     oncommand="Appbar.onDownloadButton()"/>
           <stack id="toolbar-contextual">
             <observes element="bcast_windowState" attribute="*"/>
             <observes element="bcast_urlbarState" attribute="*"/>
 
             <hbox id="toolbar-context-page" pack="end">
-              <toolbarbutton id="download-button" class="appbar-secondary"
-                             oncommand="Appbar.onDownloadButton()"/>
+              <circularprogressindicator id="download-progress"
+                                     oncommand="Appbar.onDownloadButton()"/>
               <toolbarbutton id="star-button" class="appbar-primary"
                              type="checkbox"
                              oncommand="Appbar.onStarButton()"/>
               <toolbarbutton id="pin-button" class="appbar-primary"
                              type="checkbox"
                              oncommand="Appbar.onPinButton()"/>
               <toolbarbutton id="menu-button" class="appbar-primary"
                              oncommand="Appbar.onMenuButton(event)"/>
@@ -716,21 +714,21 @@
           </deck>
         </hbox>
       </settings>
       <setting pref="signon.rememberSignons" title="&optionsHeader.privacy.passwords.label;" type="bool"/>
       <settings id="prefs-reporting" label="&optionsHeader.reporting.title;">
         <setting pref="app.crashreporter.autosubmit" type="bool" title="&optionsHeader.reporting.crashes.label;" oncommand="BrowserUI.crashReportingPrefChanged(this.value);"/>
       </settings>
       <settings id="prefs-telemetry" label="&optionsHeader.telemetry.title;">
-        <setting pref="toolkit.telemetry.enabled" type="bool" title="&optionsHeader.telemetry.label;" oncommand="FlyoutPanelsUI.PrefsFlyoutPanel.onTelemetryPreferenceChanged(this.value);"/>
+        <setting pref="toolkit.telemetry.enabled" type="bool" title="&optionsHeader.telemetry.label;"/>
       </settings>
       <settings id="prefs-dnt" label="&doNotTrack.title;">
         <description>&doNotTrack.desc;</description>
-        <setting id="prefs-dnt-value" pref="privacy.donottrackheader.value" onpreferencechanged="FlyoutPanelsUI.PrefsFlyoutPanel.onDNTPreferenceChanged();" type="radio" >
+        <setting id="prefs-dnt-value" pref="privacy.donottrackheader.value" type="radio" >
           <radiogroup id="prefs-dnt-options">
             <radio id="prefs-dnt-notrack" label="&doNotTrack.options.trackingNotOkay;" value="1"/>
             <radio id="prefs-dnt-nopref" label="&doNotTrack.options.noPreference;" value="-1"/>
             <radio id="prefs-dnt-oktrack" label="&doNotTrack.options.trackingOkay;" value="0"/>
           </radiogroup>
         </setting>
       </settings>
     </flyoutpanel>
--- a/browser/metro/base/content/flyoutpanels/FlyoutPanelsUI.js
+++ b/browser/metro/base/content/flyoutpanels/FlyoutPanelsUI.js
@@ -47,17 +47,17 @@ let FlyoutPanelsUI = {
       if (this._currentFlyout == this[aToShow]) {
         return;
       } else {
         this.hide();
       }
     }
 
     this._currentFlyout = this[aToShow];
-    if (this._currentFlyout.show) {
+    if (this._currentFlyout._show) {
       this._currentFlyout._show();
     } else {
       this._currentFlyout._topmostElement.show();
     }
     DialogUI.pushPopup(this, this._currentFlyout._topmostElement);
   },
 
   onBackButton: function() {
--- a/browser/metro/base/content/flyoutpanels/PrefsFlyoutPanel.js
+++ b/browser/metro/base/content/flyoutpanels/PrefsFlyoutPanel.js
@@ -17,40 +17,70 @@ let PrefsFlyoutPanel = {
 
     Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
     this._isInitialized = true;
     let self = this;
 
     this._elements = {};
     [
       ['PrefsFlyoutPanel',  'prefs-flyoutpanel'],
-      ['dntNoPref',    'prefs-dnt-nopref'],
-      ['telemetryPref','prefs-telemetry'],
     ].forEach(function(aElement) {
       let [name, id] = aElement;
       XPCOMUtils.defineLazyGetter(self._elements, name, function() {
         return document.getElementById(id);
       });
     });
 
+    this._prefObserver(null, null, "privacy.donottrackheader.value");
     this._topmostElement = this._elements.PrefsFlyoutPanel;
   },
 
   _show: function() {
     if (!this._hasShown) {
       SanitizeUI.init();
       this._hasShown = true;
+
+      Services.prefs.addObserver("privacy.donottrackheader.value",
+                                 this._prefObserver,
+                                 false);
+      Services.prefs.addObserver("privacy.donottrackheader.enabled",
+                                 this._prefObserver,
+                                 false);
     }
 
-    this._elements.PrefsFlyoutPanel.show();
+    this._topmostElement.show();
   },
 
-  onDNTPreferenceChanged: function onDNTPreferenceChanged() {
-    let selected = this._elements.dntNoPref.selected;
+  _prefObserver: function(subject, topic, data) {
+    let value = -1;
+    try {
+      value = Services.prefs.getIntPref("privacy.donottrackheader.value");
+    } catch(e) {
+    }
+
+    let isEnabled = Services.prefs.getBoolPref("privacy.donottrackheader.enabled");
 
-    // When "tell sites nothing about my preferences" is selected, disable do not track.
-    Services.prefs.setBoolPref("privacy.donottrackheader.enabled", !selected);
+    switch (data) {
+      case "privacy.donottrackheader.value":
+        // If the user has selected to explicitly tell sites that tracking
+        // is OK, or if the user has selected to explicitly tell sites that
+        // tracking is NOT OK, we must enable sending the dnt header
+        if (((1 == value) || (0 == value)) && !isEnabled) {
+          Services.prefs.setBoolPref('privacy.donottrackheader.enabled', true);
+        }
+
+        // If the user has made no selection about whether tracking
+        // is OK or not, we must diable the dnt header
+        if (((1 != value) && (0 != value)) && isEnabled) {
+          Services.prefs.setBoolPref('privacy.donottrackheader.enabled', false);
+        }
+        break;
+
+      case "privacy.donottrackheader.enabled":
+        // If someone or something modifies this pref, we should update the
+        // other pref as well so our UI doesn't give false information
+        if (((1 == value) || (0 == value)) && !isEnabled) {
+          Services.prefs.setIntPref('privacy.donottrackheader.value', -1);
+        }
+        break;
+    }
   },
-
-  onTelemetryPreferenceChanged: function onTelemetryPreferenceChanged(aBool) {
-    Services.prefs.setBoolPref("toolkit.telemetry.enabled", aBool);
-  }
 };
--- a/browser/themes/linux/devtools/debugger.css
+++ b/browser/themes/linux/devtools/debugger.css
@@ -52,25 +52,27 @@
 
 .side-menu-widget-item-checkbox:not([checked]) ~ .side-menu-widget-item-contents > .dbg-breakpoint {
   display: none;
 }
 
 /* Black box message */
 
 #black-boxed-message {
-  padding: 100px 50px;
-  background-color: rgb(61, 69, 76);
+  /* Prevent the container deck from aquiring the height from this message. */
+  min-height: 1px;
+  background-color: rgb(61,69,76);
+  padding: 25vh 0;
   color: white;
 }
 
 #black-boxed-message-label,
 #black-boxed-message-button {
   text-align: center;
-  font-size: 150%;
+  font-size: 120%;
 }
 
 #black-boxed-message-button {
   margin-top: 1em;
   padding: .25em;
 }
 
 /* ListWidget items */
--- a/browser/themes/osx/devtools/debugger.css
+++ b/browser/themes/osx/devtools/debugger.css
@@ -54,25 +54,27 @@
 
 .side-menu-widget-item-checkbox:not([checked]) ~ .side-menu-widget-item-contents > .dbg-breakpoint {
   display: none;
 }
 
 /* Black box message */
 
 #black-boxed-message {
-  padding: 100px 50px;
-  background-color: rgb(61, 69, 76);
+  /* Prevent the container deck from aquiring the height from this message. */
+  min-height: 1px;
+  background-color: rgb(61,69,76);
+  padding: 25vh 0;
   color: white;
 }
 
 #black-boxed-message-label,
 #black-boxed-message-button {
   text-align: center;
-  font-size: 150%;
+  font-size: 120%;
 }
 
 #black-boxed-message-button {
   margin-top: 1em;
   padding: .25em;
 }
 
 /* ListWidget items */
--- a/browser/themes/shared/devtools/webconsole.inc.css
+++ b/browser/themes/shared/devtools/webconsole.inc.css
@@ -74,16 +74,21 @@
   color: #FF0000;
 }
 
 .webconsole-mixed-content-link {
   color: #0000EE;
   margin: 0;
 }
 
+.webconsole-learn-more-link {
+  color: #0000EE;
+  margin: 0 0 0 4px;
+}
+
 .hud-msg-node[selected="true"] > .webconsole-timestamp,
 .hud-msg-node[selected="true"] > .webconsole-location {
   color: inherit;
 }
 
 .jsterm-input-container {
   background: white;
 }
--- a/browser/themes/windows/devtools/debugger.css
+++ b/browser/themes/windows/devtools/debugger.css
@@ -52,25 +52,27 @@
 
 .side-menu-widget-item-checkbox:not([checked]) ~ .side-menu-widget-item-contents > .dbg-breakpoint {
   display: none;
 }
 
 /* Black box message */
 
 #black-boxed-message {
-  padding: 100px 50px;
-  background-color: rgb(61, 69, 76);
+  /* Prevent the container deck from aquiring the height from this message. */
+  min-height: 1px;
+  background-color: rgb(61,69,76);
+  padding: 25vh 0;
   color: white;
 }
 
 #black-boxed-message-label,
 #black-boxed-message-button {
   text-align: center;
-  font-size: 150%;
+  font-size: 120%;
 }
 
 #black-boxed-message-button {
   margin-top: 1em;
   padding: .25em;
 }
 
 /* ListWidget items */
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -145,25 +145,27 @@ cross_compiling=yes
 AC_DEFUN([MOZ_CXX11],
 [
 dnl Check whether gcc's c++0x mode works
 dnl Updates to the test below should be duplicated further below for the
 dnl cross-compiling case.
 AC_LANG_CPLUSPLUS
 if test "$GNU_CXX"; then
     CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+    _ADDED_CXXFLAGS="-std=gnu++0x"
 
     AC_CACHE_CHECK(for gcc c++0x headers bug without rtti,
         ac_cv_cxx0x_headers_bug,
         [AC_TRY_COMPILE([#include <memory>], [],
                         ac_cv_cxx0x_headers_bug="no",
                         ac_cv_cxx0x_headers_bug="yes")])
 
     if test "$CLANG_CXX" -a "$ac_cv_cxx0x_headers_bug" = "yes"; then
         CXXFLAGS="$CXXFLAGS -I$_topsrcdir/build/unix/headers"
+        _ADDED_CXXFLAGS="$_ADDED_CXXFLAGS -I$_topsrcdir/build/unix/headers"
         AC_CACHE_CHECK(whether workaround for gcc c++0x headers conflict with clang works,
             ac_cv_cxx0x_clang_workaround,
             [AC_TRY_COMPILE([#include <memory>], [],
                             ac_cv_cxx0x_clang_workaround="yes",
                             ac_cv_cxx0x_clang_workaround="no")])
 
         if test "ac_cv_cxx0x_clang_workaround" = "no"; then
             AC_MSG_ERROR([Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
@@ -213,12 +215,12 @@ EOF
         elif test "$ac_cv_host_cxx0x_headers_bug" = "yes"; then
             AC_MSG_ERROR([Your host toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
         fi
         CXXFLAGS="$_SAVE_CXXFLAGS"
         CPPFLAGS="$_SAVE_CPPFLAGS"
         CXX="$_SAVE_CXX"
     fi
 elif test "$GNU_CXX"; then
-    HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++0x"
+    HOST_CXXFLAGS="$HOST_CXXFLAGS $_ADDED_CXXFLAGS"
 fi
 AC_LANG_C
 ])
--- a/config/createprecomplete.py
+++ b/config/createprecomplete.py
@@ -6,33 +6,38 @@
 # longer present in a complete update. The current working directory is used for
 # the location to enumerate and to create the precomplete file.
 
 import sys
 import os
 
 def get_build_entries(root_path):
     """ Iterates through the root_path, creating a list for each file and
-        directory. Excludes any file paths ending with channel-prefs.js.
+        directory. Excludes any path starting with extensions or distribution
+        and paths ending with channel-prefs.js.
     """
     rel_file_path_set = set()
     rel_dir_path_set = set()
     for root, dirs, files in os.walk(root_path):
         for file_name in files:
             parent_dir_rel_path = root[len(root_path)+1:]
             rel_path_file = os.path.join(parent_dir_rel_path, file_name)
             rel_path_file = rel_path_file.replace("\\", "/")
-            if not (rel_path_file.endswith("channel-prefs.js")):
+            if not (rel_path_file.startswith("distribution/") or
+                    rel_path_file.startswith("extensions/") or
+                    rel_path_file.endswith("channel-prefs.js")):
                 rel_file_path_set.add(rel_path_file)
 
         for dir_name in dirs:
             parent_dir_rel_path = root[len(root_path)+1:]
             rel_path_dir = os.path.join(parent_dir_rel_path, dir_name)
             rel_path_dir = rel_path_dir.replace("\\", "/")+"/"
-            rel_dir_path_set.add(rel_path_dir)
+            if not (rel_path_dir.startswith("distribution/") or
+                    rel_path_dir.startswith("extensions/")):
+                rel_dir_path_set.add(rel_path_dir)
 
     rel_file_path_list = list(rel_file_path_set)
     rel_file_path_list.sort(reverse=True)
     rel_dir_path_list = list(rel_dir_path_set)
     rel_dir_path_list.sort(reverse=True)
 
     return rel_file_path_list, rel_dir_path_list
 
--- a/configure.in
+++ b/configure.in
@@ -5262,31 +5262,34 @@ if test -n "$MOZ_WEBRTC"; then
         dnl default to disabled for all others
         MOZ_WEBRTC=
         ;;
     esac
 fi
 
 # target_arch is from {ia32|x64|arm|ppc}
 case "$CPU_ARCH" in
-x86_64 | ia64)
+x86_64)
     WEBRTC_TARGET_ARCH=x64
     ;;
 
 arm*)
     WEBRTC_TARGET_ARCH=arm
     ;;
 
 x86)
     WEBRTC_TARGET_ARCH=ia32
     ;;
 
 ppc*)
     WEBRTC_TARGET_ARCH=ppc
     ;;
+ia64)
+    WEBRTC_TARGET_ARCH=ia64
+    ;;
 *)
 # unsupported arch for webrtc
     WEBRTC_TARGET_ARCH=unknown
     MOZ_WEBRTC=
     ;;
 
 esac
 
--- a/content/base/public/nsIXMLHttpRequest.idl
+++ b/content/base/public/nsIXMLHttpRequest.idl
@@ -74,17 +74,17 @@ interface nsIXMLHttpRequestUpload : nsIX
  *   The 'onload', 'onerror', and 'onreadystatechange' attributes moved to
  *   nsIJSXMLHttpRequest, but if you're coding in C++ you should avoid using
  *   those.
  *
  * Conclusion: Do not use event listeners on XMLHttpRequest from C++, unless
  * you're aware of all the security implications.  And then think twice about
  * it.
  */
-[scriptable, uuid(977f1406-416a-40ac-ab89-ccd7ca0622ea)]
+[scriptable, uuid(2e91e088-e9fa-4ba4-9887-2a0b7cf27a3e)]
 interface nsIXMLHttpRequest : nsISupports
 {
   /**
    * The request uses a channel in order to perform the
    * request.  This attribute represents the channel used
    * for the request.  NULL if the channel has not yet been
    * created.
    *
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -4374,17 +4374,18 @@ nsContentUtils::IsExpandedPrincipal(nsIP
   nsCOMPtr<nsIExpandedPrincipal> ep = do_QueryInterface(aPrincipal);
   return !!ep;
 }
 
 nsIPrincipal*
 nsContentUtils::GetSystemPrincipal()
 {
   nsCOMPtr<nsIPrincipal> sysPrin;
-  nsresult rv = sSecurityManager->GetSystemPrincipal(getter_AddRefs(sysPrin));
+  DebugOnly<nsresult> rv =
+    sSecurityManager->GetSystemPrincipal(getter_AddRefs(sysPrin));
   MOZ_ASSERT(NS_SUCCEEDED(rv) && sysPrin);
   return sysPrin;
 }
 
 bool
 nsContentUtils::CombineResourcePrincipals(nsCOMPtr<nsIPrincipal>* aResourcePrincipal,
                                           nsIPrincipal* aExtraPrincipal)
 {
--- a/content/base/src/nsNodeInfoManager.cpp
+++ b/content/base/src/nsNodeInfoManager.cpp
@@ -4,16 +4,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * A class for handing out nodeinfos and ensuring sharing of them as needed.
  */
 
 #include "nsNodeInfoManager.h"
+
+#include "mozilla/DebugOnly.h"
 #include "nsNodeInfo.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsIAtom.h"
 #include "nsIDocument.h"
 #include "nsIPrincipal.h"
 #include "nsIURI.h"
 #include "nsContentUtils.h"
@@ -247,18 +249,18 @@ nsNodeInfoManager::GetNodeInfo(nsIAtom *
     nsCOMPtr<nsINodeInfo> nodeInfo = static_cast<nsINodeInfo*>(node);
 
     return nodeInfo.forget();
   }
 
   nsRefPtr<nsNodeInfo> newNodeInfo =
     new nsNodeInfo(aName, aPrefix, aNamespaceID, aNodeType, aExtraName, this);
 
-  PLHashEntry *he;
-  he = PL_HashTableAdd(mNodeInfoHash, &newNodeInfo->mInner, newNodeInfo);
+  DebugOnly<PLHashEntry*> he =
+    PL_HashTableAdd(mNodeInfoHash, &newNodeInfo->mInner, newNodeInfo);
   MOZ_ASSERT(he, "PL_HashTableAdd() failed");
 
   // Have to do the swap thing, because already_AddRefed<nsNodeInfo>
   // doesn't cast to already_AddRefed<nsINodeInfo>
   ++mNonDocumentNodeInfos;
   if (mNonDocumentNodeInfos == 1) {
     NS_IF_ADDREF(mDocument);
   }
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -3342,17 +3342,17 @@ nsObjectLoadingContent::TeardownProtoCha
   JS::Rooted<JSObject*> obj(cx, thisContent->GetWrapper());
   NS_ENSURE_TRUE(obj, /* void */);
 
   JS::Rooted<JSObject*> proto(cx);
   JSAutoCompartment ac(cx, obj);
 
   // Loop over the DOM element's JS object prototype chain and remove
   // all JS objects of the class sNPObjectJSWrapperClass
-  bool removed = false;
+  DebugOnly<bool> removed = false;
   while (obj) {
     if (!::JS_GetPrototype(cx, obj, &proto)) {
       return;
     }
     if (!proto) {
       break;
     }
     // Unwrap while checking the jsclass - if the prototype is a wrapper for
--- a/dom/apps/src/PermissionsTable.jsm
+++ b/dom/apps/src/PermissionsTable.jsm
@@ -270,16 +270,21 @@ this.PermissionsTable =  { geolocation: 
                              privileged: DENY_ACTION,
                              certified: ALLOW_ACTION
                            },
                            "keyboard": {
                              app: DENY_ACTION,
                              privileged: DENY_ACTION,
                              certified: ALLOW_ACTION
                            },
+                           "wappush": {
+                             app: DENY_ACTION,
+                             privileged: DENY_ACTION,
+                             certified: ALLOW_ACTION
+                           },
                          };
 
 /**
  * Append access modes to the permission name as suffixes.
  *   e.g. permission name 'contacts' with ['read', 'write'] =
  *   ['contacts-read', contacts-write']
  * @param string aPermName
  * @param array aAccess
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -1915,27 +1915,80 @@ this.DOMApplicationRegistry = {
     }
     aData.mm.sendAsyncMessage("Webapps:Install:Return:KO", aData);
   },
 
   // This function is called after we called the onsuccess callback on the
   // content side. This let the webpage the opportunity to set event handlers
   // on the app before we start firing progress events.
   queuedDownload: {},
+  queuedPackageDownload: {},
 
   onInstallSuccessAck: function onInstallSuccessAck(aManifestURL) {
-    let download = this.queuedDownload[aManifestURL];
-    if (!download) {
+    let cacheDownload = this.queuedDownload[aManifestURL];
+    if (cacheDownload) {
+      this.startOfflineCacheDownload(cacheDownload.manifest,
+                                     cacheDownload.app,
+                                     cacheDownload.profileDir,
+                                     cacheDownload.offlineCacheObserver);
+      delete this.queuedDownload[aManifestURL];
+
       return;
     }
-    this.startOfflineCacheDownload(download.manifest,
-                                   download.app,
-                                   download.profileDir,
-                                   download.offlineCacheObserver);
-    delete this.queuedDownload[aManifestURL];
+
+    let packageDownload = this.queuedPackageDownload[aManifestURL];
+    if (packageDownload) {
+      let manifest = packageDownload.manifest;
+      let appObject = packageDownload.app;
+      let installSuccessCallback = packageDownload.callback;
+
+      delete this.queuedPackageDownload[aManifestURL];
+
+      this.downloadPackage(manifest, appObject, false, (function(aId, aManifest) {
+        // Move the zip out of TmpD.
+        let app = DOMApplicationRegistry.webapps[aId];
+        let zipFile = FileUtils.getFile("TmpD", ["webapps", aId, "application.zip"], true);
+        let dir = this._getAppDir(aId);
+        zipFile.moveTo(dir, "application.zip");
+        let tmpDir = FileUtils.getDir("TmpD", ["webapps", aId], true, true);
+        try {
+          tmpDir.remove(true);
+        } catch(e) { }
+
+        // Save the manifest
+        let manFile = dir.clone();
+        manFile.append("manifest.webapp");
+        this._writeFile(manFile, JSON.stringify(aManifest), function() { });
+        // Set state and fire events.
+        app.installState = "installed";
+        app.downloading = false;
+        app.downloadAvailable = false;
+        this._saveApps((function() {
+          this.updateAppHandlers(null, aManifest, appObject);
+          this.broadcastMessage("Webapps:AddApp", { id: aId, app: appObject });
+
+          if (supportUseCurrentProfile()) {
+            // Update the permissions for this app.
+            PermissionsInstaller.installPermissions({ manifest: aManifest,
+                                                      origin: appObject.origin,
+                                                      manifestURL: appObject.manifestURL },
+                                                    true);
+          }
+          debug("About to fire Webapps:PackageEvent 'installed'");
+          this.broadcastMessage("Webapps:PackageEvent",
+                                { type: "installed",
+                                  manifestURL: appObject.manifestURL,
+                                  app: app,
+                                  manifest: aManifest });
+          if (installSuccessCallback) {
+            installSuccessCallback(aManifest);
+          }
+        }).bind(this));
+      }).bind(this));
+    }
   },
 
   confirmInstall: function(aData, aFromSync, aProfileDir,
                            aOfflineCacheObserver,
                            aInstallSuccessCallback) {
     let isReinstall = false;
     let app = aData.app;
     app.removable = true;
@@ -2034,21 +2087,23 @@ this.DOMApplicationRegistry = {
       }
     }
 
     ["installState", "downloadAvailable",
      "downloading", "downloadSize", "readyToApplyDownload"].forEach(function(aProp) {
       aData.app[aProp] = appObject[aProp];
      });
 
-    this.queuedDownload[app.manifestURL] = {
-      manifest: manifest,
-      app: appObject,
-      profileDir: aProfileDir,
-      offlineCacheObserver: aOfflineCacheObserver
+    if (manifest.appcache_path) {
+      this.queuedDownload[app.manifestURL] = {
+        manifest: manifest,
+        app: appObject,
+        profileDir: aProfileDir,
+        offlineCacheObserver: aOfflineCacheObserver
+      }
     }
 
     // We notify about the successful installation via mgmt.oninstall and the
     // corresponging DOMRequest.onsuccess event as soon as the app is properly
     // saved in the registry.
     if (!aFromSync) {
       this._saveApps((function() {
         this.broadcastMessage("Webapps:AddApp", { id: id, app: appObject });
@@ -2063,57 +2118,22 @@ this.DOMApplicationRegistry = {
         aInstallSuccessCallback(app.manifest);
       }
     }
 
     if (manifest.package_path) {
       // origin for install apps is meaningless here, since it's app:// and this
       // can't be used to resolve package paths.
       manifest = new ManifestHelper(jsonManifest, app.manifestURL);
-      this.downloadPackage(manifest, appObject, false, (function(aId, aManifest) {
-        // Success! Move the zip out of TmpD.
-        let app = DOMApplicationRegistry.webapps[aId];
-        let zipFile = FileUtils.getFile("TmpD", ["webapps", aId, "application.zip"], true);
-        let dir = this._getAppDir(id);
-        zipFile.moveTo(dir, "application.zip");
-        let tmpDir = FileUtils.getDir("TmpD", ["webapps", aId], true, true);
-        try {
-          tmpDir.remove(true);
-        } catch(e) { }
-
-        // Save the manifest
-        let manFile = dir.clone();
-        manFile.append("manifest.webapp");
-        this._writeFile(manFile, JSON.stringify(aManifest), function() { });
-        // Set state and fire events.
-        app.installState = "installed";
-        app.downloading = false;
-        app.downloadAvailable = false;
-        this._saveApps((function() {
-          this.updateAppHandlers(null, aManifest, appObject);
-          this.broadcastMessage("Webapps:AddApp", { id: aId, app: appObject });
-
-          if (supportUseCurrentProfile()) {
-            // Update the permissions for this app.
-            PermissionsInstaller.installPermissions({ manifest: aManifest,
-                                                      origin: appObject.origin,
-                                                      manifestURL: appObject.manifestURL },
-                                                    true);
-          }
-          debug("About to fire Webapps:PackageEvent 'installed'");
-          this.broadcastMessage("Webapps:PackageEvent",
-                                { type: "installed",
-                                  manifestURL: appObject.manifestURL,
-                                  app: app,
-                                  manifest: aManifest });
-          if (aInstallSuccessCallback) {
-            aInstallSuccessCallback(aManifest);
-          }
-        }).bind(this));
-      }).bind(this));
+
+      this.queuedPackageDownload[app.manifestURL] = {
+        manifest: manifest,
+        app: appObject,
+        callback: aInstallSuccessCallback
+      }
     }
   },
 
   _nextLocalId: function() {
     let id = Services.prefs.getIntPref("dom.mozApps.maxLocalId") + 1;
     Services.prefs.setIntPref("dom.mozApps.maxLocalId", id);
     Services.prefs.savePrefFile(null);
     return id;
--- a/dom/apps/tests/Makefile.in
+++ b/dom/apps/tests/Makefile.in
@@ -13,24 +13,19 @@ include $(DEPTH)/config/autoconf.mk
 
 MOCHITEST_FILES = \
   file_app.sjs \
   file_app.template.html \
   file_cached_app.template.webapp \
   file_cached_app.template.appcache \
   file_hosted_app.template.webapp \
   test_app_update.html \
-  $(NULL)
-
-ifdef MOZ_B2G
-MOCHITEST_FILES += \
   file_packaged_app.sjs \
   file_packaged_app.template.webapp \
   file_packaged_app.template.html \
   test_packaged_app_install.html \
   $(NULL)
-endif
 
 MOCHITEST_CHROME_FILES = \
   test_apps_service.xul \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1488,16 +1488,25 @@ Navigator::DoNewResolve(JSContext* aCx, 
       // Check whether our constructor is enabled after we unwrap Xrays, since
       // we don't want to define an interface on the Xray if it's disabled in
       // the target global, even if it's enabled in the Xray's global.
       if (name_struct->mConstructorEnabled &&
           !(*name_struct->mConstructorEnabled)(aCx, naviObj)) {
         return true;
       }
 
+      if (name.EqualsLiteral("mozSettings")) {
+        bool hasPermission = CheckPermission("settings-read") ||
+                             CheckPermission("settings-write");
+        if (!hasPermission) {
+          aValue.setNull();
+          return true;
+        }
+      }
+
       domObject = construct(aCx, naviObj);
       if (!domObject) {
         return Throw<true>(aCx, NS_ERROR_FAILURE);
       }
     }
 
     if (!JS_WrapObject(aCx, domObject.address())) {
       return false;
--- a/dom/locales/en-US/chrome/security/security.properties
+++ b/dom/locales/en-US/chrome/security/security.properties
@@ -6,8 +6,11 @@ BlockMixedActiveContent = Blocked loadin
 # CSP
 ReportOnlyCSPIgnored=Report-only CSP policy will be ignored because there are other non-report-only CSP policies applied.
 # LOCALIZATION NOTE: Do not translate "X-Content-Security-Policy", "X-Content-Security-Policy-Report-Only",  "Content-Security-Policy" or "Content-Security-Policy-Report-Only"
 OldCSPHeaderDeprecated=The X-Content-Security-Policy and X-Content-Security-Report-Only headers will be deprecated in the future. Please use the Content-Security-Policy and Content-Security-Report-Only headers with CSP spec compliant syntax instead.
 # LOCALIZATION NOTE: Do not translate "X-Content-Security-Policy/Report-Only" or "Content-Security-Policy/Report-Only"
 BothCSPHeadersPresent=This site specified both an X-Content-Security-Policy/Report-Only header and a Content-Security-Policy/Report-Only header. The X-Content-Security-Policy/Report-Only header(s) will be ignored.
 # LOCALIZATION NOTE: Do not translate "Strict-Transport-Security" or "HSTS"
 InvalidSTSHeaders=The site specified an invalid Strict-Transport-Security header.
+InsecurePasswordsPresentOnPage=Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.
+InsecureFormActionPasswordsPresent=Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.
+InsecurePasswordsPresentOnIframe=Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen.
--- a/dom/messages/SystemMessagePermissionsChecker.jsm
+++ b/dom/messages/SystemMessagePermissionsChecker.jsm
@@ -92,17 +92,17 @@ this.SystemMessagePermissionsTable = {
   },
   "telephony-call-ended": {
     "telephony": []
   },
   "ussd-received": {
     "mobileconnection": []
   },
   "wappush-received": {
-    "sms": []
+    "wappush": []
   },
 };
 
 this.SystemMessagePermissionsChecker = {
   /**
    * Return all the needed permission names for the given system message.
    * @param string aSysMsgName
    *        The system messsage name.
--- a/dom/push/src/PushService.jsm
+++ b/dom/push/src/PushService.jsm
@@ -1299,24 +1299,27 @@ this.PushService = {
    * connection close status code.
    *
    * If we do not explicitly call ws.close() then statusCode is always
    * NS_BASE_STREAM_CLOSED, even on a successful close.
    */
   _wsOnStop: function(context, statusCode) {
     debug("wsOnStop()");
 
-    this._shutdownWS();
-
     if (statusCode != Cr.NS_OK &&
         !(statusCode == Cr.NS_BASE_STREAM_CLOSED && this._willBeWokenUpByUDP)) {
       debug("Socket error " + statusCode);
       this._reconnectAfterBackoff();
     }
 
+    // Bug 896919. We always shutdown the WebSocket, even if we need to
+    // reconnect. This works because _reconnectAfterBackoff() is "async"
+    // (there is a minimum delay of the pref retryBaseInterval, which by default
+    // is 5000ms), so that function will open the WebSocket again.
+    this._shutdownWS();
   },
 
   _wsOnMessageAvailable: function(context, message) {
     debug("wsOnMessageAvailable() " + message);
 
     this._waitingForPong = false;
 
     // Reset the ping timer.  Note: This path is executed at every step of the
--- a/dom/settings/tests/Makefile.in
+++ b/dom/settings/tests/Makefile.in
@@ -11,16 +11,17 @@ relativesrcdir   = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MOCHITEST_FILES = \
   test_settings_basics.html \
   test_settings_events.html \
   test_settings_onsettingchange.html \
   test_settings_blobs.html \
+  test_settings_navigator_object.html \
   $(NULL)
 
 MOCHITEST_CHROME_FILES = \
   test_settings_service.xul \
   test_settings_service.js \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/dom/settings/tests/test_settings_navigator_object.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=898512
+-->
+<head>
+  <title>Test for Bug 898512 Settings API</title>
+  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
+  <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=898512">Mozilla Bug 898512</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+<iframe></iframe>
+</div>
+<pre id="test">
+<script class="testbody" type="text/javascript;version=1.7">
+
+SimpleTest.waitForExplicitFinish();
+
+function testPref() {
+  SpecialPowers.pushPrefEnv({
+    set: [["dom.mozSettings.enabled", false]]
+  }, function() {
+    ise(navigator.mozSettings, undefined, "navigator.mozSettings is undefined");
+    SimpleTest.finish();
+  });
+}
+
+SpecialPowers.pushPermissions([
+  {type: "settings-read", allow: 0, context: document},
+  {type: "settings-write", allow: 0, context: document}
+], function() {
+  ise(frames[0].navigator.mozSettings, null, "navigator.mozSettings is null when the page doesn't have permissions");
+  testPref();
+});
+</script>
+</pre>
+</body>
+</html>
--- a/dom/system/gonk/RILContentHelper.js
+++ b/dom/system/gonk/RILContentHelper.js
@@ -1525,82 +1525,85 @@ RILContentHelper.prototype = {
       case "RIL:StkCommand":
         this._deliverEvent("_iccListeners", "notifyStkCommand",
                            [JSON.stringify(msg.json.data)]);
         break;
       case "RIL:StkSessionEnd":
         this._deliverEvent("_iccListeners", "notifyStkSessionEnd", null);
         break;
       case "RIL:IccOpenChannel":
-        this.handleIccOpenChannel(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg,
+                                 msg.json.channel);
         break;
       case "RIL:IccCloseChannel":
-        this.handleIccCloseChannel(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg, null);
         break;
       case "RIL:IccExchangeAPDU":
         this.handleIccExchangeAPDU(msg.json);
         break;
       case "RIL:ReadIccContacts":
         this.handleReadIccContacts(msg.json);
         break;
       case "RIL:UpdateIccContact":
-        this.handleUpdateIccContact(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg, null);
         break;
       case "RIL:DataError": {
         let data = msg.json.data;
         this.updateConnectionInfo(data, this.rilContext.dataConnectionInfo);
         this._deliverEvent("_mobileConnectionListeners", "notifyDataError",
                            [data.errorMsg]);
         break;
       }
       case "RIL:GetCallForwardingOption":
         this.handleGetCallForwardingOption(msg.json);
         break;
       case "RIL:SetCallForwardingOption":
-        this.handleSetCallForwardingOption(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg, null);
         break;
       case "RIL:GetCallBarringOption":
         this.handleGetCallBarringOption(msg.json);
         break;
       case "RIL:SetCallBarringOption":
-        this.handleSetCallBarringOption(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg, null);
         break;
       case "RIL:GetCallWaitingOption":
-        this.handleGetCallWaitingOption(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg,
+                                 msg.json.enabled);
         break;
       case "RIL:SetCallWaitingOption":
-        this.handleSetCallWaitingOption(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg, null);
         break;
       case "RIL:CfStateChanged": {
         let data = msg.json.data;
         this._deliverEvent("_mobileConnectionListeners",
                            "notifyCFStateChange",
                            [data.success, data.action,
                             data.reason, data.number,
                             data.timeSeconds, data.serviceClass]);
         break;
       }
       case "RIL:GetCallingLineIdRestriction":
         this.handleGetCallingLineIdRestriction(msg.json);
         break;
       case "RIL:SetCallingLineIdRestriction":
-        this.handleSetCallingLineIdRestriction(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg, null);
         break;
       case "RIL:CellBroadcastReceived": {
         let message = new CellBroadcastMessage(msg.json.data);
         this._deliverEvent("_cellBroadcastListeners",
                            "notifyMessageReceived",
                            [message]);
         break;
       }
       case "RIL:SetRoamingPreference":
-        this.handleSetRoamingPreference(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg, null);
         break;
       case "RIL:GetRoamingPreference":
-        this.handleGetRoamingPreference(msg.json);
+        this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg,
+                                 msg.json.mode);
         break;
     }
   },
 
   handleEnumerateCalls: function handleEnumerateCalls(calls) {
     debug("handleEnumerateCalls: " + JSON.stringify(calls));
     let callback = this._enumerateTelephonyCallbacks.shift();
     if (!calls.length) {
@@ -1624,70 +1627,54 @@ RILContentHelper.prototype = {
       if (!keepGoing) {
         break;
       }
     }
 
     callback.enumerateCallStateComplete();
   },
 
+  handleSimpleRequest: function handleSimpleRequest(requestId, errorMsg, result) {
+    if (errorMsg) {
+      this.fireRequestError(requestId, errorMsg);
+    } else {
+      this.fireRequestSuccess(requestId, result);
+    }
+  },
+
   handleGetAvailableNetworks: function handleGetAvailableNetworks(message) {
     debug("handleGetAvailableNetworks: " + JSON.stringify(message));
-
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      debug("no DOMRequest found with request ID: " + requestId);
-      return;
-    }
-
     if (message.errorMsg) {
       debug("Received error from getAvailableNetworks: " + message.errorMsg);
-      Services.DOMRequest.fireError(request, message.errorMsg);
+      this.fireRequestError(message.requestId, message.errorMsg);
       return;
     }
 
     let networks = message.networks;
     for (let i = 0; i < networks.length; i++) {
       let network = networks[i];
       let info = new MobileNetworkInfo();
       this.updateInfo(network, info);
       networks[i] = info;
     }
 
-    Services.DOMRequest.fireSuccess(request, networks);
+    this.fireRequestSuccess(message.requestId, networks);
   },
 
   handleSelectNetwork: function handleSelectNetwork(message, mode) {
     this._selectingNetwork = null;
     this.rilContext.networkSelectionMode = mode;
 
     if (message.errorMsg) {
       this.fireRequestError(message.requestId, message.errorMsg);
     } else {
       this.fireRequestSuccess(message.requestId, null);
     }
   },
 
-  handleIccOpenChannel: function handleIccOpenChannel(message) {
-    if (message.errorMsg) {
-      this.fireRequestError(message.requestId, message.errorMsg);
-    } else {
-      this.fireRequestSuccess(message.requestId, message.channel);
-    }
-  },
-
-  handleIccCloseChannel: function handleIccCloseChannel(message) {
-    if (message.errorMsg) {
-      this.fireRequestError(message.requestId, message.errorMsg);
-    } else {
-      this.fireRequestSuccess(message.requestId, null);
-    }
-  },
-
   handleIccExchangeAPDU: function handleIccExchangeAPDU(message) {
     if (message.errorMsg) {
       this.fireRequestError(message.requestId, message.errorMsg);
     } else {
       var result = [message.sw1, message.sw2, message.simResponse];
       this.fireRequestSuccess(message.requestId, result);
     }
   },
@@ -1718,24 +1705,16 @@ RILContentHelper.prototype = {
       contact.init(prop);
       return contact;
     });
 
     this.fireRequestSuccess(message.requestId,
                             ObjectWrapper.wrap(result, window));
   },
 
-  handleUpdateIccContact: function handleUpdateIccContact(message) {
-    if (message.errorMsg) {
-      this.fireRequestError(message.requestId, message.errorMsg);
-    } else {
-      this.fireRequestSuccess(message.requestId, null);
-    }
-  },
-
   handleVoicemailNotification: function handleVoicemailNotification(message) {
     let changed = false;
     if (!this.voicemailStatus) {
       this.voicemailStatus = new VoicemailStatus();
     }
 
     if (this.voicemailStatus.hasMessages != message.active) {
       changed = true;
@@ -1772,120 +1751,43 @@ RILContentHelper.prototype = {
       let rule = rules[i];
       let info = new MobileCFInfo();
       this.updateInfo(rule, info);
       rules[i] = info;
     }
   },
 
   handleGetCallForwardingOption: function handleGetCallForwardingOption(message) {
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      return;
-    }
-
-    if (!message.success) {
-      Services.DOMRequest.fireError(request, message.errorMsg);
+    if (message.errorMsg) {
+      this.fireRequestError(message.requestId, message.errorMsg);
       return;
     }
 
     this._cfRulesToMobileCfInfo(message.rules);
-    Services.DOMRequest.fireSuccess(request, message.rules);
-  },
-
-  handleSetCallForwardingOption: function handleSetCallForwardingOption(message) {
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      return;
-    }
-
-    if (!message.success) {
-      Services.DOMRequest.fireError(request, message.errorMsg);
-      return;
-    }
-    Services.DOMRequest.fireSuccess(request, null);
+    this.fireRequestSuccess(message.requestId, message.rules);
   },
 
   handleGetCallBarringOption: function handleGetCallBarringOption(message) {
     if (!message.success) {
       this.fireRequestError(message.requestId, message.errorMsg);
     } else {
       let option = new CallBarringOption(message);
       this.fireRequestSuccess(message.requestId, option);
     }
   },
 
-  handleSetCallBarringOption: function handleSetCallBarringOption(message) {
-    if (!message.success) {
-      this.fireRequestError(message.requestId, message.errorMsg);
-    } else {
-      this.fireRequestSuccess(message.requestId, null);
-    }
-  },
-
-  handleGetCallWaitingOption: function handleGetCallWaitingOption(message) {
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      return;
-    }
-
-    if (!message.success) {
-      Services.DOMRequest.fireError(request, message.errorMsg);
-      return;
-    }
-    Services.DOMRequest.fireSuccess(request, message.enabled);
-  },
-
-  handleSetCallWaitingOption: function handleSetCallWaitingOption(message) {
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      return;
-    }
-
-    if (!message.success) {
-      Services.DOMRequest.fireError(request, message.errorMsg);
-      return;
-    }
-    Services.DOMRequest.fireSuccess(request, null);
-  },
-
   handleGetCallingLineIdRestriction:
     function handleGetCallingLineIdRestriction(message) {
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      return;
-    }
-
-    if (!message.success) {
-      Services.DOMRequest.fireError(request, message.errorMsg);
+    if (message.errorMsg) {
+      this.fireRequestError(message.requestId, message.errorMsg);
       return;
     }
 
     let status = new DOMCLIRStatus(message);
-    Services.DOMRequest.fireSuccess(request, status);
-  },
-
-  handleSetCallingLineIdRestriction:
-    function handleSetCallingLineIdRestriction(message) {
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      return;
-    }
-
-    if (!message.success) {
-      Services.DOMRequest.fireError(request, message.errorMsg);
-      return;
-    }
-    Services.DOMRequest.fireSuccess(request, null);
+    this.fireRequestSuccess(message.requestId, status);
   },
 
   handleSendCancelMMI: function handleSendCancelMMI(message) {
     debug("handleSendCancelMMI " + JSON.stringify(message));
     let request = this.takeRequest(message.requestId);
     if (!request) {
       return;
     }
@@ -1927,32 +1829,16 @@ RILContentHelper.prototype = {
       Services.DOMRequest.fireDetailedError(request, mmiError);
     }
   },
 
   _getRandomId: function _getRandomId() {
     return gUUIDGenerator.generateUUID().toString();
   },
 
-  handleSetRoamingPreference: function handleSetRoamingPreference(message) {
-    if (message.errorMsg) {
-      this.fireRequestError(message.requestId, message.errorMsg);
-    } else {
-      this.fireRequestSuccess(message.requestId, null);
-    }
-  },
-
-  handleGetRoamingPreference: function handleGetRoamingPreference(message) {
-    if (message.errorMsg) {
-      this.fireRequestError(message.requestId, message.errorMsg);
-    } else {
-      this.fireRequestSuccess(message.requestId, message.mode);
-    }
-  },
-
   _deliverEvent: function _deliverEvent(listenerType, name, args) {
     let thisListeners = this[listenerType];
     if (!thisListeners) {
       return;
     }
 
     let listeners = thisListeners.slice();
     for (let listener of listeners) {
--- a/js/src/build/autoconf/toolchain.m4
+++ b/js/src/build/autoconf/toolchain.m4
@@ -145,25 +145,27 @@ cross_compiling=yes
 AC_DEFUN([MOZ_CXX11],
 [
 dnl Check whether gcc's c++0x mode works
 dnl Updates to the test below should be duplicated further below for the
 dnl cross-compiling case.
 AC_LANG_CPLUSPLUS
 if test "$GNU_CXX"; then
     CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+    _ADDED_CXXFLAGS="-std=gnu++0x"
 
     AC_CACHE_CHECK(for gcc c++0x headers bug without rtti,
         ac_cv_cxx0x_headers_bug,
         [AC_TRY_COMPILE([#include <memory>], [],
                         ac_cv_cxx0x_headers_bug="no",
                         ac_cv_cxx0x_headers_bug="yes")])
 
     if test "$CLANG_CXX" -a "$ac_cv_cxx0x_headers_bug" = "yes"; then
         CXXFLAGS="$CXXFLAGS -I$_topsrcdir/build/unix/headers"
+        _ADDED_CXXFLAGS="$_ADDED_CXXFLAGS -I$_topsrcdir/build/unix/headers"
         AC_CACHE_CHECK(whether workaround for gcc c++0x headers conflict with clang works,
             ac_cv_cxx0x_clang_workaround,
             [AC_TRY_COMPILE([#include <memory>], [],
                             ac_cv_cxx0x_clang_workaround="yes",
                             ac_cv_cxx0x_clang_workaround="no")])
 
         if test "ac_cv_cxx0x_clang_workaround" = "no"; then
             AC_MSG_ERROR([Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
@@ -213,12 +215,12 @@ EOF
         elif test "$ac_cv_host_cxx0x_headers_bug" = "yes"; then
             AC_MSG_ERROR([Your host toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
         fi
         CXXFLAGS="$_SAVE_CXXFLAGS"
         CPPFLAGS="$_SAVE_CPPFLAGS"
         CXX="$_SAVE_CXX"
     fi
 elif test "$GNU_CXX"; then
-    HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++0x"
+    HOST_CXXFLAGS="$HOST_CXXFLAGS $_ADDED_CXXFLAGS"
 fi
 AC_LANG_C
 ])
--- a/js/src/ion/AsmJSSignalHandlers.cpp
+++ b/js/src/ion/AsmJSSignalHandlers.cpp
@@ -97,17 +97,17 @@ using namespace mozilla;
 # define R8_sig(p) ((p)->uc_mcontext.__gregs[_REG_R8])
 # define R9_sig(p) ((p)->uc_mcontext.__gregs[_REG_R9])
 # define R10_sig(p) ((p)->uc_mcontext.__gregs[_REG_R10])
 # define R11_sig(p) ((p)->uc_mcontext.__gregs[_REG_R11])
 # define R12_sig(p) ((p)->uc_mcontext.__gregs[_REG_R12])
 # define R13_sig(p) ((p)->uc_mcontext.__gregs[_REG_R13])
 # define R14_sig(p) ((p)->uc_mcontext.__gregs[_REG_R14])
 # define R15_sig(p) ((p)->uc_mcontext.__gregs[_REG_R15])
-#elif defined(__DragonFly__) || defined(__FreeBSD__)
+#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 # if defined(__DragonFly__)
 #  define XMM_sig(p,i) (((union savefpu *)(p)->uc_mcontext.mc_fpregs)->sv_xmm.sv_xmm[i])
 # else
 #  define XMM_sig(p,i) (((struct savefpu *)(p)->uc_mcontext.mc_fpstate)->sv_xmm[i])
 # endif
 # define EIP_sig(p) ((p)->uc_mcontext.mc_eip)
 # define RIP_sig(p) ((p)->uc_mcontext.mc_rip)
 # define RAX_sig(p) ((p)->uc_mcontext.mc_rax)
@@ -258,24 +258,24 @@ LookupHeapAccess(const AsmJSModule &modu
 
 # if defined(XP_WIN)
 #  include "jswin.h"
 # else
 #  include <signal.h>
 #  include <sys/mman.h>
 # endif
 
-# if defined(__FreeBSD__)
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #  include <sys/ucontext.h> // for ucontext_t, mcontext_t
 # endif
 
 # if defined(JS_CPU_X64)
 #  if defined(__DragonFly__)
 #   include <machine/npx.h> // for union savefpu
-#  elif defined(__FreeBSD__) || defined(__OpenBSD__)
+#  elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
 #   include <machine/fpu.h> // for struct savefpu/fxsave64
 #  endif
 # endif
 
 // Not all versions of the Android NDK define ucontext_t or mcontext_t.
 // Detect this and provide custom but compatible definitions. Note that these
 // follow the GLibc naming convention to access register values from
 // mcontext_t.
--- a/js/src/ion/CodeGenerator.cpp
+++ b/js/src/ion/CodeGenerator.cpp
@@ -734,19 +734,32 @@ CodeGenerator::emitLambdaInit(const Regi
         } s;
         uint32_t word;
     } u;
     u.s.nargs = fun->nargs;
     u.s.flags = fun->flags & ~JSFunction::EXTENDED;
 
     JS_STATIC_ASSERT(offsetof(JSFunction, flags) == offsetof(JSFunction, nargs) + 2);
     masm.store32(Imm32(u.word), Address(output, offsetof(JSFunction, nargs)));
-    masm.storePtr(ImmGCPtr(fun->nonLazyScript()),
-                  Address(output, JSFunction::offsetOfNativeOrScript()));
+
+    // Initialize the JSFunction union with the script / native / lazyScript
+    // corresponding to the flag.
+    ImmGCPtr scriptOrLazyScript(NULL);
+    if (fun->isInterpretedLazy())
+        scriptOrLazyScript = ImmGCPtr(fun->lazyScriptOrNull());
+    else
+        scriptOrLazyScript = ImmGCPtr(fun->nonLazyScript());
+
+    masm.storePtr(scriptOrLazyScript, Address(output, JSFunction::offsetOfNativeOrScript()));
+
+    // Lambda scripted functions are given the scope chain as the environment in
+    // which the caller was at the time of the creation of the lambda.
     masm.storePtr(scopeChain, Address(output, JSFunction::offsetOfEnvironment()));
+
+    // Copy the name of the function used for diagnostics.
     masm.storePtr(ImmGCPtr(fun->displayAtom()), Address(output, JSFunction::offsetOfAtom()));
 }
 
 bool
 CodeGenerator::visitLambdaPar(LLambdaPar *lir)
 {
     Register resultReg = ToRegister(lir->output());
     Register sliceReg = ToRegister(lir->forkJoinSlice());
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -8243,19 +8243,16 @@ IonBuilder::jsop_object(JSObject *obj)
     current->push(ins);
 
     return true;
 }
 
 bool
 IonBuilder::jsop_lambda(JSFunction *fun)
 {
-    if (fun->isInterpreted() && !fun->getOrCreateScript(cx))
-        return false;
-
     JS_ASSERT(script()->analysis()->usesScopeChain());
     if (fun->isArrow())
         return abort("bound arrow function");
     if (fun->isNative() && IsAsmJSModuleNative(fun->native()))
         return abort("asm.js module function");
 
     MLambda *ins = MLambda::New(current->scopeChain(), fun);
     current->add(ins);
--- a/js/src/ion/IonMacroAssembler.cpp
+++ b/js/src/ion/IonMacroAssembler.cpp
@@ -699,18 +699,16 @@ MacroAssembler::compareStrings(JSOp op, 
 
     bind(&done);
 }
 
 void
 MacroAssembler::checkInterruptFlagsPar(const Register &tempReg,
                                             Label *fail)
 {
-    JSCompartment *compartment = GetIonContext()->compartment;
-
     void *interrupt = (void*)&GetIonContext()->runtime->interrupt;
     movePtr(ImmWord(interrupt), tempReg);
     load32(Address(tempReg, 0), tempReg);
     branchTest32(Assembler::NonZero, tempReg, tempReg, fail);
 }
 
 void
 MacroAssembler::maybeRemoveOsrFrame(Register scratch)
--- a/js/src/jsfun.h
+++ b/js/src/jsfun.h
@@ -317,16 +317,17 @@ class JSFunction : public JSObject
     }
 
     void setJitInfo(const JSJitInfo *data) {
         JS_ASSERT(isNative());
         u.n.jitinfo = data;
     }
 
     static unsigned offsetOfNativeOrScript() {
+        JS_STATIC_ASSERT(offsetof(U, n.native) == offsetof(U, i.s.lazy_));
         JS_STATIC_ASSERT(offsetof(U, n.native) == offsetof(U, i.s.script_));
         JS_STATIC_ASSERT(offsetof(U, n.native) == offsetof(U, nativeOrScript));
         return offsetof(JSFunction, u.nativeOrScript);
     }
 
 #if JS_BITS_PER_WORD == 32
     static const js::gc::AllocKind FinalizeKind = js::gc::FINALIZE_OBJECT2_BACKGROUND;
     static const js::gc::AllocKind ExtendedFinalizeKind = js::gc::FINALIZE_OBJECT4_BACKGROUND;
--- a/layout/base/PositionedEventTargeting.cpp
+++ b/layout/base/PositionedEventTargeting.cpp
@@ -162,16 +162,19 @@ IsElementClickable(nsIFrame* aFrame, nsI
           tag == nsGkAtoms::resizer) {
         return true;
       }
     }
     if (content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::role,
                              nsGkAtoms::button, eIgnoreCase)) {
       return true;
     }
+    if (content->IsEditable()) {
+      return true;
+    }
     nsCOMPtr<nsIURI> linkURI;
     if (content->IsLink(getter_AddRefs(linkURI))) {
       return true;
     }
   }
   return false;
 }
 
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -423,16 +423,17 @@ protected:
   unsigned      mStopped : 1;
   unsigned      mLoaded : 1;
   unsigned      mDeferredWindowClose : 1;
   // document management data
   //   these items are specific to markup documents (html and xml)
   //   may consider splitting these out into a subclass
   unsigned      mIsSticky : 1;
   unsigned      mInPermitUnload : 1;
+  unsigned      mInPermitUnloadPrompt: 1;
 
 #ifdef NS_PRINTING
   unsigned      mClosingWhilePrinting : 1;
 
 #if NS_PRINT_PREVIEW
   unsigned                         mPrintPreviewZoomed : 1;
 
   // These data members support delayed printing when the document is loading
@@ -1085,17 +1086,20 @@ nsDocumentViewer::LoadComplete(nsresult 
   return rv;
 }
 
 NS_IMETHODIMP
 nsDocumentViewer::PermitUnload(bool aCallerClosesWindow, bool *aPermitUnload)
 {
   *aPermitUnload = true;
 
-  if (!mDocument || mInPermitUnload || mCallerIsClosingWindow) {
+  if (!mDocument
+   || mInPermitUnload
+   || mCallerIsClosingWindow
+   || mInPermitUnloadPrompt) {
     return NS_OK;
   }
 
   // First, get the script global object from the document...
   nsPIDOMWindow *window = mDocument->GetWindow();
 
   if (!window) {
     // This is odd, but not fatal
@@ -1178,19 +1182,21 @@ nsDocumentViewer::PermitUnload(bool aCal
       // bool values through XPConnect.
       bool dummy = false;
       int32_t buttonPressed = 0;
       uint32_t buttonFlags = (nsIPrompt::BUTTON_POS_0_DEFAULT |
                              (nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_0) |
                              (nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_1));
 
       nsAutoSyncOperation sync(mDocument);
+      mInPermitUnloadPrompt = true;
       rv = prompt->ConfirmEx(title, message, buttonFlags,
                              leaveLabel, stayLabel, nullptr, nullptr,
                              &dummy, &buttonPressed);
+      mInPermitUnloadPrompt = false;
       NS_ENSURE_SUCCESS(rv, rv);
 
       // Button 0 == leave, button 1 == stay
       *aPermitUnload = (buttonPressed == 0);
     }
   }
 
   if (docShellNode) {
--- a/layout/base/tests/test_event_target_radius.html
+++ b/layout/base/tests/test_event_target_radius.html
@@ -38,16 +38,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   <div class="target" id="t6" onmousedown="x=1" hidden>
     <div id="t6_inner" style="position:absolute; left:-20px; top:20px; width:60px; height:60px; background:yellow;"></div>
   </div>
 
   <div class="target" id="t7" onmousedown="x=1" hidden></div>
   <div class="target" id="t7_over" hidden></div>
 
+  <div id="t8" contenteditable="true" class="target" hidden></div>
+
 </div>
 <pre id="test">
 <script type="application/javascript">
 var prefBase = "ui.mouse.radius.";
 SpecialPowers.setBoolPref(prefBase + "enabled", true);
 SpecialPowers.setBoolPref(prefBase + "inputSource.touchOnly", false);
 SpecialPowers.setIntPref(prefBase + "leftmm", 12);
 SpecialPowers.setIntPref(prefBase + "topmm", 8);
@@ -186,16 +188,25 @@ function runTest() {
 
   setShowing("t7", true);
   setShowing("t7_over", true);
   testMouseClick("t7", 100 + 11*mm, 10, "body", "covered div is not clickable");
   testMouseClick("t7", 10, 10, "t7_over", "covered div is not clickable even within its bounds");
   setShowing("t7", false);
   setShowing("t7_over", false);
 
+  // Check that contenteditable elements are considered clickable for fluffing.
+  setShowing("t8", true);
+  var rect = document.getElementById("t8").getBoundingClientRect();
+  testMouseClick("t8", rect.left + 1, rect.top + 1, "t8", "content editable enabled for mouse input");
+  testMouseClick("t8", rect.left + 1, rect.top + 1, "t8", "content editable enabled for touch input", {
+    inputSource: SpecialPowers.Ci.nsIDOMMouseEvent.MOZ_SOURCE_TOUCH
+  });
+  setShowing("t8", false);
+
   // Not yet tested:
   // -- visited link weight
   // -- "Closest" using Euclidean distance
   endTest();
 }
 </script>
 </pre>
 </body>
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -1643,16 +1643,30 @@ const int32_t nsCSSProps::kDominantBasel
 };
 
 const int32_t nsCSSProps::kFillRuleKTable[] = {
   eCSSKeyword_nonzero, NS_STYLE_FILL_RULE_NONZERO,
   eCSSKeyword_evenodd, NS_STYLE_FILL_RULE_EVENODD,
   eCSSKeyword_UNKNOWN, -1
 };
 
+const int32_t nsCSSProps::kFilterFunctionKTable[] = {
+  eCSSKeyword_blur, NS_STYLE_FILTER_BLUR,
+  eCSSKeyword_brightness, NS_STYLE_FILTER_BRIGHTNESS,
+  eCSSKeyword_contrast, NS_STYLE_FILTER_CONTRAST,
+  eCSSKeyword_grayscale, NS_STYLE_FILTER_GRAYSCALE,
+  eCSSKeyword_invert, NS_STYLE_FILTER_INVERT,
+  eCSSKeyword_opacity, NS_STYLE_FILTER_OPACITY,
+  eCSSKeyword_saturate, NS_STYLE_FILTER_SATURATE,
+  eCSSKeyword_sepia, NS_STYLE_FILTER_SEPIA,
+  eCSSKeyword_hue_rotate, NS_STYLE_FILTER_HUE_ROTATE,
+  eCSSKeyword_drop_shadow, NS_STYLE_FILTER_DROP_SHADOW,
+  eCSSKeyword_UNKNOWN, -1
+};
+
 const int32_t nsCSSProps::kImageRenderingKTable[] = {
   eCSSKeyword_auto, NS_STYLE_IMAGE_RENDERING_AUTO,
   eCSSKeyword_optimizespeed, NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED,
   eCSSKeyword_optimizequality, NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY,
   eCSSKeyword__moz_crisp_edges, NS_STYLE_IMAGE_RENDERING_CRISPEDGES,
   eCSSKeyword_UNKNOWN, -1
 };
 
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -444,16 +444,17 @@ public:
   static const int32_t kBorderStyleKTable[];
   static const int32_t kBorderWidthKTable[];
   static const int32_t kBoxAlignKTable[];
   static const int32_t kBoxDirectionKTable[];
   static const int32_t kBoxOrientKTable[];
   static const int32_t kBoxPackKTable[];
   static const int32_t kDominantBaselineKTable[];
   static const int32_t kFillRuleKTable[];
+  static const int32_t kFilterFunctionKTable[];
   static const int32_t kImageRenderingKTable[];
   static const int32_t kShapeRenderingKTable[];
   static const int32_t kStrokeLinecapKTable[];
   static const int32_t kStrokeLinejoinKTable[];
   static const int32_t kStrokeObjectValueKTable[];
   static const int32_t kVectorEffectKTable[];
   static const int32_t kTextAnchorKTable[];
   static const int32_t kTextRenderingKTable[];
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -4492,72 +4492,37 @@ nsComputedDOMStyle::SetCssTextToCoord(ns
 {
   nsROCSSPrimitiveValue* value = new nsROCSSPrimitiveValue;
   bool clampNegativeCalc = true;
   SetValueToCoord(value, aCoord, clampNegativeCalc);
   value->GetCssText(aCssText);
   delete value;
 }
 
-static void
-GetFilterFunctionName(nsAString& aString, nsStyleFilter::Type aType)
-{
-  switch (aType) {
-    case nsStyleFilter::Type::eBlur:
-      aString.AssignLiteral("blur(");
-      break;
-    case nsStyleFilter::Type::eBrightness:
-      aString.AssignLiteral("brightness(");
-      break;
-    case nsStyleFilter::Type::eContrast:
-      aString.AssignLiteral("contrast(");
-      break;
-    case nsStyleFilter::Type::eDropShadow:
-      aString.AssignLiteral("drop-shadow(");
-      break;
-    case nsStyleFilter::Type::eGrayscale:
-      aString.AssignLiteral("grayscale(");
-      break;
-    case nsStyleFilter::Type::eHueRotate:
-      aString.AssignLiteral("hue-rotate(");
-      break;
-    case nsStyleFilter::Type::eInvert:
-      aString.AssignLiteral("invert(");
-      break;
-    case nsStyleFilter::Type::eOpacity:
-      aString.AssignLiteral("opacity(");
-      break;
-    case nsStyleFilter::Type::eSaturate:
-      aString.AssignLiteral("saturate(");
-      break;
-    case nsStyleFilter::Type::eSepia:
-      aString.AssignLiteral("sepia(");
-      break;
-    default:
-      NS_NOTREACHED("unrecognized filter type");
-  }
-}
-
 CSSValue*
 nsComputedDOMStyle::CreatePrimitiveValueForStyleFilter(
   const nsStyleFilter& aStyleFilter)
 {
   nsROCSSPrimitiveValue* value = new nsROCSSPrimitiveValue;
   // Handle url().
-  if (nsStyleFilter::Type::eURL == aStyleFilter.GetType()) {
+  if (aStyleFilter.GetType() == NS_STYLE_FILTER_URL) {
     value->SetURI(aStyleFilter.GetURL());
     return value;
   }
 
   // Filter function name and opening parenthesis.
   nsAutoString filterFunctionString;
-  GetFilterFunctionName(filterFunctionString, aStyleFilter.GetType());
+  AppendASCIItoUTF16(
+    nsCSSProps::ValueToKeyword(aStyleFilter.GetType(),
+                               nsCSSProps::kFilterFunctionKTable),
+                               filterFunctionString);
+  filterFunctionString.AppendLiteral("(");
 
   nsAutoString argumentString;
-  if (nsStyleFilter::Type::eDropShadow == aStyleFilter.GetType()) {
+  if (aStyleFilter.GetType() == NS_STYLE_FILTER_DROP_SHADOW) {
     // Handle drop-shadow()
     nsRefPtr<CSSValue> shadowValue =
       GetCSSShadowArray(aStyleFilter.GetDropShadow(),
                         StyleColor()->mColor,
                         false);
     ErrorResult dummy;
     shadowValue->GetCssText(argumentString, dummy);
   } else {
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -7714,46 +7714,16 @@ nsRuleNode::ComputeSVGData(void* aStartS
   SetDiscrete(*aRuleData->ValueForTextRendering(),
               svg->mTextRendering, canStoreInRuleTree,
               SETDSC_ENUMERATED, parentSVG->mTextRendering,
               NS_STYLE_TEXT_RENDERING_AUTO, 0, 0, 0, 0);
 
   COMPUTE_END_INHERITED(SVG, svg)
 }
 
-static nsStyleFilter::Type
-StyleFilterTypeForFunctionName(nsCSSKeyword aFunctionName)
-{
-  switch (aFunctionName) {
-    case eCSSKeyword_blur:
-      return nsStyleFilter::Type::eBlur;
-    case eCSSKeyword_brightness:
-      return nsStyleFilter::Type::eBrightness;
-    case eCSSKeyword_contrast:
-      return nsStyleFilter::Type::eContrast;
-    case eCSSKeyword_drop_shadow:
-      return nsStyleFilter::Type::eDropShadow;
-    case eCSSKeyword_grayscale:
-      return nsStyleFilter::Type::eGrayscale;
-    case eCSSKeyword_hue_rotate:
-      return nsStyleFilter::Type::eHueRotate;
-    case eCSSKeyword_invert:
-      return nsStyleFilter::Type::eInvert;
-    case eCSSKeyword_opacity:
-      return nsStyleFilter::Type::eOpacity;
-    case eCSSKeyword_saturate:
-      return nsStyleFilter::Type::eSaturate;
-    case eCSSKeyword_sepia:
-      return nsStyleFilter::Type::eSepia;
-    default:
-      NS_NOTREACHED("Unknown filter type.");
-      return nsStyleFilter::Type::eNull;
-  }
-}
-
 void
 nsRuleNode::SetStyleFilterToCSSValue(nsStyleFilter* aStyleFilter,
                                      const nsCSSValue& aValue,
                                      nsStyleContext* aStyleContext,
                                      nsPresContext* aPresContext,
                                      bool& aCanStoreInRuleTree)
 {
   nsCSSUnit unit = aValue.GetUnit();
@@ -7763,46 +7733,51 @@ nsRuleNode::SetStyleFilterToCSSValue(nsS
   }
 
   NS_ABORT_IF_FALSE(unit == eCSSUnit_Function, "expected a filter function");
 
   nsCSSValue::Array* filterFunction = aValue.GetArrayValue();
   nsCSSKeyword functionName =
     (nsCSSKeyword)filterFunction->Item(0).GetIntValue();
 
-  nsStyleFilter::Type type = StyleFilterTypeForFunctionName(functionName);
-  if (type == nsStyleFilter::Type::eDropShadow) {
+  int32_t type;
+  DebugOnly<bool> foundKeyword =
+    nsCSSProps::FindKeyword(functionName,
+                            nsCSSProps::kFilterFunctionKTable,
+                            type);
+  NS_ABORT_IF_FALSE(foundKeyword, "unknown filter type");
+  if (type == NS_STYLE_FILTER_DROP_SHADOW) {
     nsRefPtr<nsCSSShadowArray> shadowArray = GetShadowData(
       filterFunction->Item(1).GetListValue(),
       aStyleContext,
       false,
       aCanStoreInRuleTree);
     aStyleFilter->SetDropShadow(shadowArray);
     return;
   }
 
   int32_t mask = SETCOORD_PERCENT | SETCOORD_FACTOR;
-  if (type == nsStyleFilter::Type::eBlur) {
+  if (type == NS_STYLE_FILTER_BLUR) {
     mask = SETCOORD_LENGTH | SETCOORD_STORE_CALC;
-  } else if (type == nsStyleFilter::Type::eHueRotate) {
+  } else if (type == NS_STYLE_FILTER_HUE_ROTATE) {
     mask = SETCOORD_ANGLE;
   }
 
   NS_ABORT_IF_FALSE(filterFunction->Count() == 2,
                     "all filter functions should have "
                     "exactly one argument");
 
   nsCSSValue& arg = filterFunction->Item(1);
   nsStyleCoord filterParameter;
-  DebugOnly<bool> success = SetCoord(arg, filterParameter,
-                                     nsStyleCoord(), mask,
-                                     aStyleContext, aPresContext,
-                                     aCanStoreInRuleTree);
+  DebugOnly<bool> didSetCoord = SetCoord(arg, filterParameter,
+                                         nsStyleCoord(), mask,
+                                         aStyleContext, aPresContext,
+                                         aCanStoreInRuleTree);
   aStyleFilter->SetFilterParameter(filterParameter, type);
-  NS_ABORT_IF_FALSE(success, "unexpected unit");
+  NS_ABORT_IF_FALSE(didSetCoord, "unexpected unit");
 }
 
 const void*
 nsRuleNode::ComputeSVGResetData(void* aStartStruct,
                                 const nsRuleData* aRuleData,
                                 nsStyleContext* aContext,
                                 nsRuleNode* aHighestNode,
                                 const RuleDetail aRuleDetail,
@@ -7890,17 +7865,17 @@ nsRuleNode::ComputeSVGResetData(void* aS
     case eCSSUnit_List:
     case eCSSUnit_ListDep: {
       svgReset->mFilters.Clear();
       const nsCSSValueList* cur = filterValue->GetListValue();
       while(cur) {
         nsStyleFilter styleFilter;
         SetStyleFilterToCSSValue(&styleFilter, cur->mValue, aContext,
                                  mPresContext, canStoreInRuleTree);
-        NS_ABORT_IF_FALSE(styleFilter.GetType() != nsStyleFilter::Type::eNull,
+        NS_ABORT_IF_FALSE(styleFilter.GetType() != NS_STYLE_FILTER_NONE,
                           "filter should be set");
         svgReset->mFilters.AppendElement(styleFilter);
         cur = cur->mNext;
       }
       break;
     }
     default:
       NS_NOTREACHED("unexpected unit");
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -436,16 +436,30 @@ static inline mozilla::css::Side operato
 #define NS_STYLE_JUSTIFY_CONTENT_SPACE_BETWEEN  3
 #define NS_STYLE_JUSTIFY_CONTENT_SPACE_AROUND   4
 
 // See nsStyleDisplay
 #define NS_STYLE_FLOAT_NONE                     0
 #define NS_STYLE_FLOAT_LEFT                     1
 #define NS_STYLE_FLOAT_RIGHT                    2
 
+// See nsStyleFilter
+#define NS_STYLE_FILTER_NONE                    0
+#define NS_STYLE_FILTER_URL                     1
+#define NS_STYLE_FILTER_BLUR                    2
+#define NS_STYLE_FILTER_BRIGHTNESS              3
+#define NS_STYLE_FILTER_CONTRAST                4
+#define NS_STYLE_FILTER_GRAYSCALE               5
+#define NS_STYLE_FILTER_INVERT                  6
+#define NS_STYLE_FILTER_OPACITY                 7
+#define NS_STYLE_FILTER_SATURATE                8
+#define NS_STYLE_FILTER_SEPIA                   9
+#define NS_STYLE_FILTER_HUE_ROTATE              10
+#define NS_STYLE_FILTER_DROP_SHADOW             11
+
 // See nsStyleFont
 // We should eventually stop using the NS_STYLE_* variants here.
 #define NS_STYLE_FONT_STYLE_NORMAL              NS_FONT_STYLE_NORMAL
 #define NS_STYLE_FONT_STYLE_ITALIC              NS_FONT_STYLE_ITALIC
 #define NS_STYLE_FONT_STYLE_OBLIQUE             NS_FONT_STYLE_OBLIQUE
 
 // See nsStyleFont
 // We should eventually stop using the NS_STYLE_* variants here.
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -1000,116 +1000,116 @@ nsChangeHint nsStyleSVG::CalcDifference(
 
   return hint;
 }
 
 // --------------------
 // nsStyleFilter
 //
 nsStyleFilter::nsStyleFilter()
-  : mType(eNull)
+  : mType(NS_STYLE_FILTER_NONE)
   , mDropShadow(nullptr)
 {
   MOZ_COUNT_CTOR(nsStyleFilter);
 }
 
 nsStyleFilter::nsStyleFilter(const nsStyleFilter& aSource)
-  : mType(eNull)
+  : mType(NS_STYLE_FILTER_NONE)
   , mDropShadow(nullptr)
 {
   MOZ_COUNT_CTOR(nsStyleFilter);
-  if (aSource.mType == eURL) {
+  if (aSource.mType == NS_STYLE_FILTER_URL) {
     SetURL(aSource.mURL);
-  } else if (aSource.mType == eDropShadow) {
+  } else if (aSource.mType == NS_STYLE_FILTER_DROP_SHADOW) {
     SetDropShadow(aSource.mDropShadow);
-  } else if (aSource.mType != eNull) {
+  } else if (aSource.mType != NS_STYLE_FILTER_NONE) {
     SetFilterParameter(aSource.mFilterParameter, aSource.mType);
   }
 }
 
 nsStyleFilter::~nsStyleFilter()
 {
   ReleaseRef();
   MOZ_COUNT_DTOR(nsStyleFilter);
 }
 
 nsStyleFilter&
 nsStyleFilter::operator=(const nsStyleFilter& aOther)
 {
   if (this == &aOther)
     return *this;
 
-  if (aOther.mType == eURL) {
+  if (aOther.mType == NS_STYLE_FILTER_URL) {
     SetURL(aOther.mURL);
-  } else if (aOther.mType == eDropShadow) {
+  } else if (aOther.mType == NS_STYLE_FILTER_DROP_SHADOW) {
     SetDropShadow(aOther.mDropShadow);
-  } else if (aOther.mType != eNull) {
+  } else if (aOther.mType != NS_STYLE_FILTER_NONE) {
     SetFilterParameter(aOther.mFilterParameter, aOther.mType);
   }
   return *this;
 }
 
 
 bool
 nsStyleFilter::operator==(const nsStyleFilter& aOther) const
 {
   if (mType != aOther.mType) {
       return false;
   }
 
-  if (mType == eURL) {
+  if (mType == NS_STYLE_FILTER_URL) {
     return EqualURIs(mURL, aOther.mURL);
-  } else if (mType == eDropShadow) {
+  } else if (mType == NS_STYLE_FILTER_DROP_SHADOW) {
     return *mDropShadow == *aOther.mDropShadow;
-  } else if (mType != eNull) {
+  } else if (mType != NS_STYLE_FILTER_NONE) {
     return mFilterParameter == aOther.mFilterParameter;
   }
 
   return true;
 }
 
 void
 nsStyleFilter::ReleaseRef()
 {
-  if (mType == eDropShadow) {
+  if (mType == NS_STYLE_FILTER_DROP_SHADOW) {
     NS_ASSERTION(mDropShadow, "expected pointer");
     mDropShadow->Release();
-  } else if (mType == eURL) {
+  } else if (mType == NS_STYLE_FILTER_URL) {
     NS_ASSERTION(mURL, "expected pointer");
     mURL->Release();
   }
 }
 
 void
 nsStyleFilter::SetFilterParameter(const nsStyleCoord& aFilterParameter,
-                                  Type aType)
+                                  int32_t aType)
 {
   ReleaseRef();
   mFilterParameter = aFilterParameter;
   mType = aType;
 }
 
 void
 nsStyleFilter::SetURL(nsIURI* aURL)
 {
   NS_ASSERTION(aURL, "expected pointer");
   ReleaseRef();
   mURL = aURL;
   mURL->AddRef();
-  mType = eURL;
+  mType = NS_STYLE_FILTER_URL;
 }
 
 void
 nsStyleFilter::SetDropShadow(nsCSSShadowArray* aDropShadow)
 {
   NS_ASSERTION(aDropShadow, "expected pointer");
   ReleaseRef();
   mDropShadow = aDropShadow;
   mDropShadow->AddRef();
-  mType = eDropShadow;
+  mType = NS_STYLE_FILTER_DROP_SHADOW;
 }
 
 // --------------------
 // nsStyleSVGReset
 //
 nsStyleSVGReset::nsStyleSVGReset() 
 {
     MOZ_COUNT_CTOR(nsStyleSVGReset);
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -2284,60 +2284,45 @@ struct nsStyleFilter {
   nsStyleFilter();
   nsStyleFilter(const nsStyleFilter& aSource);
   ~nsStyleFilter();
 
   nsStyleFilter& operator=(const nsStyleFilter& aOther);
 
   bool operator==(const nsStyleFilter& aOther) const;
 
-  enum Type {
-    eNull,
-    eURL,
-    eBlur,
-    eBrightness,
-    eContrast,
-    eDropShadow,
-    eGrayscale,
-    eHueRotate,
-    eInvert,
-    eOpacity,
-    eSaturate,
-    eSepia,
-  };
-
-  Type GetType() const {
+  int32_t GetType() const {
     return mType;
   }
 
   const nsStyleCoord& GetFilterParameter() const {
-    NS_ASSERTION(mType != eDropShadow &&
-                 mType != eURL &&
-                 mType != eNull, "wrong filter type");
+    NS_ASSERTION(mType != NS_STYLE_FILTER_DROP_SHADOW &&
+                 mType != NS_STYLE_FILTER_URL &&
+                 mType != NS_STYLE_FILTER_NONE, "wrong filter type");
     return mFilterParameter;
   }
   void SetFilterParameter(const nsStyleCoord& aFilterParameter,
-                          Type aType);
+                          int32_t aType);
 
   nsIURI* GetURL() const {
-    NS_ASSERTION(mType == eURL, "wrong filter type");
+    NS_ASSERTION(mType == NS_STYLE_FILTER_URL, "wrong filter type");
     return mURL;
   }
   void SetURL(nsIURI* aURL);
 
   nsCSSShadowArray* GetDropShadow() const {
-    NS_ASSERTION(mType == eDropShadow, "wrong filter type");
+    NS_ASSERTION(mType == NS_STYLE_FILTER_DROP_SHADOW, "wrong filter type");
     return mDropShadow;
   }
   void SetDropShadow(nsCSSShadowArray* aDropShadow);
 
 private:
   void ReleaseRef();
 
-  Type mType;
+  int32_t mType; // see NS_STYLE_FILTER_* constants in nsStyleConsts.h
   nsStyleCoord mFilterParameter; // coord, percent, factor, angle
   union {
     nsIURI* mURL;
     nsCSSShadowArray* mDropShadow;
   };
 };
 
 template<>
@@ -2362,17 +2347,17 @@ struct nsStyleSVGReset {
     return NS_CombineHint(nsChangeHint_UpdateEffects, NS_STYLE_HINT_REFLOW);
   }
 
   // The backend only supports one SVG reference right now.
   // Eventually, it will support multiple chained SVG reference filters and CSS
   // filter functions.
   nsIURI* SingleFilter() const {
     return (mFilters.Length() == 1 &&
-            mFilters[0].GetType() == nsStyleFilter::Type::eURL) ?
+            mFilters[0].GetType() == NS_STYLE_FILTER_URL) ?
             mFilters[0].GetURL() : nullptr;
   }
 
   nsCOMPtr<nsIURI> mClipPath;         // [reset]
   nsTArray<nsStyleFilter> mFilters;   // [reset]
   nsCOMPtr<nsIURI> mMask;             // [reset]
   nscolor          mStopColor;        // [reset]
   nscolor          mFloodColor;       // [reset]
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -4408,17 +4408,17 @@ if (SpecialPowers.getBoolPref("svg.paint
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "normal" ],
     other_values: [ "fill", "fill stroke", "fill stroke markers", "stroke markers fill" ],
     invalid_values: [ "fill stroke markers fill", "fill normal" ]
   };
 }
 
 if (SpecialPowers.getBoolPref("layout.css.filters.enabled")) {
-  	gCSSProperties["filter"] = {
+	gCSSProperties["filter"] = {
 		domProp: "filter",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [
 			// SVG reference filters
 			"url(#my-filter)",
 			"url(#my-filter-1) url(#my-filter-2)",
@@ -4455,17 +4455,17 @@ if (SpecialPowers.getBoolPref("layout.cs
 			"contrast(1)",
 			"contrast(1.0)",
 			"contrast(2)",
 			"contrast(350%)",
 			"contrast(4.567)",
 
 			"drop-shadow(2px 2px)",
 			"drop-shadow(2px 2px 1px)",
-			"drop-shadow(2px 2px green))",
+			"drop-shadow(2px 2px green)",
 			"drop-shadow(2px 2px 1px green)",
 			"drop-shadow(green 2px 2px)",
 			"drop-shadow(green 2px 2px 1px)",
 			"drop-shadow(currentColor 3px 3px)",
 			"drop-shadow(2px 2px calc(-5px))", /* clamped */
 			"drop-shadow(calc(3em - 2px) 2px green)",
 			"drop-shadow(green calc(3em - 2px) 2px)",
 			"drop-shadow(2px calc(2px + 0.2em))",
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -433,16 +433,20 @@ pref("browser.ui.touch.left", 32);
 pref("browser.ui.touch.right", 32);
 pref("browser.ui.touch.top", 48);
 pref("browser.ui.touch.bottom", 16);
 pref("browser.ui.touch.weight.visited", 120); // percentage
 
 // The percentage of the screen that needs to be scrolled before margins are exposed.
 pref("browser.ui.show-margins-threshold", 20);
 
+// Maximum distance from the point where the user pressed where we still
+// look for text to select
+pref("browser.ui.selection.distance", 250);
+
 // plugins
 pref("plugin.disable", false);
 pref("dom.ipc.plugins.enabled", false);
 
 // This pref isn't actually used anymore, but we're leaving this here to avoid changing
 // the default so that we can migrate a user-set pref. See bug 885357.
 pref("plugins.click_to_play", true);
 // The default value for nsIPluginTag.enabledState (STATE_CLICKTOPLAY = 1)
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -686,17 +686,17 @@ abstract public class GeckoApp
                 GeckoAppShell.uninstallWebApp(origin);
             } else if (event.equals("Share:Text")) {
                 String text = message.getString("text");
                 GeckoAppShell.openUriExternal(text, "text/plain", "", "", Intent.ACTION_SEND, "");
             } else if (event.equals("Share:Image")) {
                 String src = message.getString("url");
                 String type = message.getString("mime");
                 GeckoAppShell.shareImage(src, type);
-            } else if (event.equals("Wallpaper:Set")) {
+            } else if (event.equals("Image:SetAs")) {
                 String src = message.getString("url");
                 setImageAs(src);
             } else if (event.equals("Sanitize:ClearHistory")) {
                 handleClearHistory();
             } else if (event.equals("Update:Check")) {
                 startService(new Intent(UpdateServiceHelper.ACTION_CHECK_FOR_UPDATE, null, this, UpdateService.class));
             } else if (event.equals("Update:Download")) {
                 startService(new Intent(UpdateServiceHelper.ACTION_DOWNLOAD_UPDATE, null, this, UpdateService.class));
@@ -1494,17 +1494,17 @@ abstract public class GeckoApp
         registerEventListener("Shortcut:Remove");
         registerEventListener("WebApps:Open");
         registerEventListener("WebApps:PreInstall");
         registerEventListener("WebApps:PostInstall");
         registerEventListener("WebApps:Install");
         registerEventListener("WebApps:Uninstall");
         registerEventListener("Share:Text");
         registerEventListener("Share:Image");
-        registerEventListener("Wallpaper:Set");
+        registerEventListener("Image:SetAs");
         registerEventListener("Sanitize:ClearHistory");
         registerEventListener("Update:Check");
         registerEventListener("Update:Download");
         registerEventListener("Update:Install");
         registerEventListener("PrivateBrowsing:Data");
         registerEventListener("Contact:Add");
 
         if (SmsManager.getInstance() != null) {
@@ -2048,17 +2048,17 @@ abstract public class GeckoApp
         unregisterEventListener("Shortcut:Remove");
         unregisterEventListener("WebApps:Open");
         unregisterEventListener("WebApps:PreInstall");
         unregisterEventListener("WebApps:PostInstall");
         unregisterEventListener("WebApps:Install");
         unregisterEventListener("WebApps:Uninstall");
         unregisterEventListener("Share:Text");
         unregisterEventListener("Share:Image");
-        unregisterEventListener("Wallpaper:Set");
+        unregisterEventListener("Image:SetAs");
         unregisterEventListener("Sanitize:ClearHistory");
         unregisterEventListener("Update:Check");
         unregisterEventListener("Update:Download");
         unregisterEventListener("Update:Install");
         unregisterEventListener("PrivateBrowsing:Data");
         unregisterEventListener("Contact:Add");
 
         deleteTempFiles();
--- a/mobile/android/chrome/content/SelectionHandler.js
+++ b/mobile/android/chrome/content/SelectionHandler.js
@@ -150,28 +150,40 @@ var SelectionHandler = {
   canSelect: function sh_canSelect(aElement) {
     return !(aElement instanceof Ci.nsIDOMHTMLButtonElement ||
              aElement instanceof Ci.nsIDOMHTMLEmbedElement ||
              aElement instanceof Ci.nsIDOMHTMLImageElement ||
              aElement instanceof Ci.nsIDOMHTMLMediaElement) &&
              aElement.style.MozUserSelect != 'none';
   },
 
+  _getScrollPos: function sh_getScrollPos() {
+    // Get the current display position
+    let scrollX = {}, scrollY = {};
+    this._contentWindow.top.QueryInterface(Ci.nsIInterfaceRequestor).
+                            getInterface(Ci.nsIDOMWindowUtils).getScrollXY(false, scrollX, scrollY);
+    return {
+      X: scrollX.value,
+      Y: scrollY.value
+    };
+  },
+
   /*
    * Called from browser.js when the user long taps on text or chooses
    * the "Select Word" context menu item. Initializes SelectionHandler,
    * starts a selection, and positions the text selection handles.
    *
    * @param aX, aY tap location in client coordinates.
    */
   startSelection: function sh_startSelection(aElement, aX, aY) {
     // Clear out any existing active selection
     this._closeSelection();
 
     this._initTargetInfo(aElement);
+    this._activeType = this.TYPE_SELECTION;
 
     // Clear any existing selection from the document
     this._contentWindow.getSelection().removeAllRanges();
 
     if (!this._domWinUtils.selectAtPoint(aX, aY, Ci.nsIDOMWindowUtils.SELECT_WORDNOSPACE)) {
       this._onFail("failed to set selection at point");
       return;
     }
@@ -182,18 +194,45 @@ var SelectionHandler = {
       this._onFail("no selection was present");
       return;
     }
 
     // Initialize the cache
     this._cache = { start: {}, end: {}};
     this._updateCacheForSelection();
 
-    this._activeType = this.TYPE_SELECTION;
-    this._positionHandles();
+    let scroll = this._getScrollPos();
+    // Figure out the distance between the selection and the click
+    let positions = this._getHandlePositions(scroll);
+    let clickX = scroll.X + aX;
+    let clickY = scroll.Y + aY;
+    let distance = 0;
+
+    // Check if the click was in the bounding box of the selection handles
+    if (positions[0].left < clickX && clickX < positions[1].left
+        && positions[0].top < clickY && clickY < positions[1].top) {
+      distance = 0;
+    } else {
+      // If it was outside, check the distance to the center of the selection
+      let selectposX = (positions[0].left + positions[1].left) / 2;
+      let selectposY = (positions[0].top + positions[1].top) / 2;
+
+      let dx = Math.abs(selectposX - clickX);
+      let dy = Math.abs(selectposY - clickY);
+      distance = dx + dy;
+    }
+
+    let maxSelectionDistance = Services.prefs.getIntPref("browser.ui.selection.distance");
+    // Do not select text far away from where the user clicked
+    if (distance > maxSelectionDistance) {
+      this._closeSelection();
+      return;
+    }
+
+    this._positionHandles(positions);
 
     sendMessageToJava({
       type: "TextSelection:ShowHandles",
       handles: [this.HANDLE_TYPE_START, this.HANDLE_TYPE_END]
     });
   },
 
   /*
@@ -486,68 +525,71 @@ var SelectionHandler = {
     }
 
     this._cache.start = start;
     this._cache.end = end;
 
     return selectionReversed;
   },
 
-  _positionHandles: function sh_positionHandles() {
-    let scrollX = {}, scrollY = {};
-    this._contentWindow.top.QueryInterface(Ci.nsIInterfaceRequestor).
-                            getInterface(Ci.nsIDOMWindowUtils).getScrollXY(false, scrollX, scrollY);
-
+  _getHandlePositions: function sh_getHandlePositions(scroll) {
     // the checkHidden function tests to see if the given point is hidden inside an
     // iframe/subdocument. this is so that if we select some text inside an iframe and
     // scroll the iframe so the selection is out of view, we hide the handles rather
     // than having them float on top of the main page content.
     let checkHidden = function(x, y) {
       return false;
     };
     if (this._contentWindow.frameElement) {
       let bounds = this._contentWindow.frameElement.getBoundingClientRect();
       checkHidden = function(x, y) {
         return x < 0 || y < 0 || x > bounds.width || y > bounds.height;
-      }
+      };
     }
 
     let positions = null;
     if (this._activeType == this.TYPE_CURSOR) {
       // The left and top properties returned are relative to the client area
       // of the window, so we don't need to account for a sub-frame offset.
       let cursor = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_CARET_RECT, this._targetElement.selectionEnd, 0, 0, 0);
       // the return value from sendQueryContentEvent is in LayoutDevice pixels and we want CSS pixels, so
       // divide by the pixel ratio
       let x = cursor.left / window.devicePixelRatio;
       let y = (cursor.top + cursor.height) / window.devicePixelRatio;
-      positions = [{ handle: this.HANDLE_TYPE_MIDDLE,
-                     left: x + scrollX.value,
-                     top: y + scrollY.value,
-                     hidden: checkHidden(x, y) }];
+      return [{ handle: this.HANDLE_TYPE_MIDDLE,
+                left: x + scroll.X,
+                top: y + scroll.Y,
+                hidden: checkHidden(x, y) }];
     } else {
       let sx = this._cache.start.x;
       let sy = this._cache.start.y;
       let ex = this._cache.end.x;
       let ey = this._cache.end.y;
 
       // Translate coordinates to account for selections in sub-frames. We can't cache
       // this because the top-level page may have scrolled since selection started.
       let offset = this._getViewOffset();
 
-      positions = [{ handle: this.HANDLE_TYPE_START,
-                     left: sx + offset.x + scrollX.value,
-                     top: sy + offset.y + scrollY.value,
-                     hidden: checkHidden(sx, sy) },
-                   { handle: this.HANDLE_TYPE_END,
-                     left: ex + offset.x + scrollX.value,
-                     top: ey + offset.y + scrollY.value,
-                     hidden: checkHidden(ex, ey) }];
+      return  [{ handle: this.HANDLE_TYPE_START,
+                 left: sx + offset.x + scroll.X,
+                 top: sy + offset.y + scroll.Y,
+                 hidden: checkHidden(sx, sy) },
+               { handle: this.HANDLE_TYPE_END,
+                 left: ex + offset.x + scroll.X,
+                 top: ey + offset.y + scroll.Y,
+                 hidden: checkHidden(ex, ey) }];
     }
+  },
 
+  // positions is an array of objects with data about handle positions,
+  // which we get from _getHandlePositions.
+  _positionHandles: function sh_positionHandles(positions) {
+    if (!positions) {
+      positions = this._getHandlePositions(this._getScrollPos());
+    }
     sendMessageToJava({
       type: "TextSelection:PositionHandles",
       positions: positions,
       rtl: this._isRTL
     });
   },
 
   subdocumentScrolled: function sh_subdocumentScrolled(aElement) {
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -595,17 +595,17 @@ var BrowserApp = {
                                       aTarget.ownerDocument);
       });
 
     NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.setImageAs"),
       NativeWindow.contextmenus.imageSaveableContext,
       function(aTarget) {
         let src = aTarget.src;
         sendMessageToJava({
-          type: "Wallpaper:Set",
+          type: "Image:SetAs",
           url: src
         });
       });
 
     NativeWindow.contextmenus.add(
       function(aTarget) {
         if (aTarget instanceof HTMLVideoElement) {
           // If a video element is zero width or height, its essentially
new file mode 100644
--- /dev/null
+++ b/testing/marionette/client/marionette/tests/unit/test_implicit_waits.py
@@ -0,0 +1,28 @@
+# 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/.
+
+from marionette_test import MarionetteTestCase
+from errors import NoSuchElementException
+
+class TestImplicitWaits(MarionetteTestCase):
+    def testShouldImplicitlyWaitForASingleElement(self):
+        test_html = self.marionette.absolute_url("test_dynamic.html")
+        self.marionette.navigate(test_html)
+        add = self.marionette.find_element("id", "adder")
+        self.marionette.set_search_timeout("3000")
+        add.click()
+        # All is well if this doesnt throw
+        self.marionette.find_element("id", "box0")
+
+    def testShouldStillFailToFindAnElementWhenImplicitWaitsAreEnabled(self):
+        test_html = self.marionette.absolute_url("test_dynamic.html")
+        self.marionette.navigate(test_html)
+        self.marionette.set_search_timeout("3000")
+        try:
+            self.marionette.find_element("id", "box0")
+            self.fail("Should have thrown a a NoSuchElementException")
+        except NoSuchElementException:
+            pass
+        except Exception:
+            self.fail("Should have thrown a NoSuchElementException")
--- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini
+++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini
@@ -78,8 +78,10 @@ b2g = false
 [test_appcache.py]
 [test_screenshot.py]
 [test_cookies.py]
 b2g = false
 [test_window_title.py]
 b2g = false
 [test_window_type.py]
 b2g = false
+
+[test_implicit_waits.py]
new file mode 100644
--- /dev/null
+++ b/testing/marionette/client/marionette/www/test_dynamic.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+    "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+  <head>
+    <title></title>
+    <script type="text/javascript">
+      var next = 0;
+
+      function addMore() {
+        var box = document.createElement('DIV');
+        box.id = 'box' + next++;
+        box.className = 'redbox';
+        box.style.width = '150px';
+        box.style.height = '150px';
+        box.style.backgroundColor = 'red';
+        box.style.border = '1px solid black';
+        box.style.margin = '5px';
+        window.setTimeout(function() {
+          document.body.appendChild(box);
+          }, 1000);
+        }
+
+        function reveal() {
+          var elem = document.getElementById('revealed');
+          window.setTimeout(function() {
+            elem.style.display = '';
+          }, 1000);
+        }
+      </script>
+    </head>
+    <body>
+      <input id="adder" type="button" value="Add a box!" onclick="addMore()"/>
+
+      <input id="reveal" type="button" value="Reveal a new input" onclick="reveal();" />
+
+      <input id="revealed" style="display:none;" />
+    </body>
+  </html>
new file mode 100644
--- /dev/null
+++ b/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm
@@ -0,0 +1,146 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+this.EXPORTED_SYMBOLS = [ "InsecurePasswordUtils" ];
+
+const Ci = Components.interfaces;
+const Cu = Components.utils;
+const Cc = Components.classes;
+
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+
+XPCOMUtils.defineLazyModuleGetter(this, "devtools",
+                                  "resource://gre/modules/devtools/Loader.jsm");
+
+Object.defineProperty(this, "WebConsoleUtils", {
+  get: function() {
+    return devtools.require("devtools/toolkit/webconsole/utils").Utils;
+  },
+  configurable: true,
+  enumerable: true
+});
+
+const STRINGS_URI = "chrome://global/locale/security/security.properties";
+let l10n = new WebConsoleUtils.l10n(STRINGS_URI);
+
+this.InsecurePasswordUtils = {
+
+  _sendWebConsoleMessage : function (messageTag, domDoc) {
+    /*
+     * All web console messages are warnings for now so I decided to set the
+     * flag here and save a bit of the flag creation in the callers.
+     * It's easy to expose this later if needed
+     */
+
+    let  windowId = WebConsoleUtils.getInnerWindowId(domDoc.defaultView);
+    let category = "Insecure Password Field";
+    let flag = Ci.nsIScriptError.warningFlag;
+    let message = l10n.getStr(messageTag);
+    let consoleMsg = Cc["@mozilla.org/scripterror;1"]
+      .createInstance(Ci.nsIScriptError);
+
+    consoleMsg.initWithWindowID(
+      message, "", 0, 0, 0, flag, category, windowId);
+
+    Services.console.logMessage(consoleMsg);
+  },
+
+  /*
+   * Checks whether the passed uri is secure
+   * Check Protocol Flags to determine if scheme is secure:
+   * URI_DOES_NOT_RETURN_DATA - e.g.
+   *   "mailto"
+   * URI_IS_LOCAL_RESOURCE - e.g.
+   *   "data",
+   *   "resource",
+   *   "moz-icon"
+   * URI_INHERITS_SECURITY_CONTEXT - e.g.
+   *   "javascript"
+   * URI_SAFE_TO_LOAD_IN_SECURE_CONTEXT - e.g.
+   *   "https",
+   *   "moz-safe-about"
+   *
+   *   The use of this logic comes directly from nsMixedContentBlocker.cpp
+   *   At the time it was decided to include these protocols since a secure
+   *   uri for mixed content blocker means that the resource can't be
+   *   easily tampered with because 1) it is sent over an encrypted channel or
+   *   2) it is a local resource that never hits the network
+   *   or 3) it is a request sent without any response that could alter
+   *   the behavior of the page. It was decided to include the same logic
+   *   here both to be consistent with MCB and to make sure we cover all
+   *   "safe" protocols. Eventually, the code here and the code in MCB
+   *   will be moved to a common location that will be referenced from
+   *   both places. Look at
+   *   https://bugzilla.mozilla.org/show_bug.cgi?id=899099 for more info.
+   */
+  _checkIfURIisSecure : function(uri) {
+    let isSafe = false;
+    let netutil = Cc["@mozilla.org/network/util;1"].getService(Ci.nsINetUtil);
+    let ph = Ci.nsIProtocolHandler;
+
+    if (netutil.URIChainHasFlags(uri, ph.URI_IS_LOCAL_RESOURCE) ||
+        netutil.URIChainHasFlags(uri, ph.URI_DOES_NOT_RETURN_DATA) ||
+        netutil.URIChainHasFlags(uri, ph.URI_INHERITS_SECURITY_CONTEXT) ||
+        netutil.URIChainHasFlags(uri, ph.URI_SAFE_TO_LOAD_IN_SECURE_CONTEXT)) {
+
+      isSafe = true;
+    }
+
+    return isSafe;
+  },
+
+  /*
+   * Checks whether the passed nested document is insecure
+   * or is inside an insecure parent document.
+   *
+   * We check the chain of frame ancestors all the way until the top document
+   * because MITM attackers could replace https:// iframes if they are nested inside
+   * http:// documents with their own content, thus creating a security risk
+   * and potentially stealing user data. Under such scenario, a user might not
+   * get a Mixed Content Blocker message, if the main document is served over HTTP
+   * and framing an HTTPS page as it would under the reverse scenario (http
+   * inside https).
+   */
+  _checkForInsecureNestedDocuments : function(domDoc) {
+    let uri = domDoc.documentURIObject;
+    if (domDoc.defaultView == domDoc.defaultView.parent) {
+      // We are at the top, nothing to check here
+      return false;
+    }
+    if (!this._checkIfURIisSecure(uri)) {
+      // We are insecure
+      return true;
+    }
+    // I am secure, but check my parent
+    return this._checkForInsecureNestedDocuments(domDoc.defaultView.parent.document);
+  },
+
+
+  /*
+   * Checks if there are insecure password fields present on the form's document
+   * i.e. passwords inside forms with http action, inside iframes with http src,
+   * or on insecure web pages. If insecure password fields are present,
+   * a log message is sent to the web console to warn developers.
+   */
+  checkForInsecurePasswords : function (aForm) {
+    var domDoc = aForm.ownerDocument;
+    let pageURI = domDoc.defaultView.top.document.documentURIObject;
+    let isSafePage = this._checkIfURIisSecure(pageURI);
+
+    if (!isSafePage) {
+      this._sendWebConsoleMessage("InsecurePasswordsPresentOnPage", domDoc);
+    }
+
+    // Check if we are on an iframe with insecure src, or inside another
+    // insecure iframe or document.
+    if (this._checkForInsecureNestedDocuments(domDoc)) {
+      this._sendWebConsoleMessage("InsecurePasswordsPresentOnIframe", domDoc);
+    }
+
+    if (aForm.action.match(/^http:\/\//)) {
+      this._sendWebConsoleMessage("InsecureFormActionPasswordsPresent", domDoc);
+    }
+  },
+};
--- a/toolkit/components/passwordmgr/moz.build
+++ b/toolkit/components/passwordmgr/moz.build
@@ -27,10 +27,11 @@ EXTRA_COMPONENTS += [
     'storage-Legacy.js',
 ]
 
 EXTRA_PP_COMPONENTS += [
     'storage-mozStorage.js',
 ]
 
 EXTRA_JS_MODULES += [
+    'InsecurePasswordUtils.jsm',
     'LoginManagerContent.jsm',
 ]
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -211,16 +211,23 @@ var PrintUtils = {
     if (printPreviewTB) {
       printPreviewTB.updateToolbar();
       var browser = this._callback.getPrintPreviewBrowser();
       browser.collapsed = false;
       browser.contentWindow.focus();
       return;
     }
 
+    // Set the original window as an active window so any mozPrintCallbacks can
+    // run without delayed setTimeouts.
+    var docShell = originalWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+                                 .getInterface(Ci.nsIWebNavigation)
+                                 .QueryInterface(Ci.nsIDocShell);
+    docShell.isActive = true;
+
     // show the toolbar after we go into print preview mode so
     // that we can initialize the toolbar with total num pages
     var XUL_NS =
       "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
     printPreviewTB = document.createElementNS(XUL_NS, "toolbar");
     printPreviewTB.setAttribute("printpreview", true);
     printPreviewTB.id = "print-preview-toolbar";
     printPreviewTB.className = "toolbar-primary";
--- a/toolkit/devtools/Loader.jsm
+++ b/toolkit/devtools/Loader.jsm
@@ -46,16 +46,17 @@ var BuiltinProvider = {
         "toolkit/loader": loader
       },
       paths: {
         "": "resource://gre/modules/commonjs/",
         "main": "resource:///modules/devtools/main.js",
         "devtools": "resource:///modules/devtools",
         "devtools/server": "resource://gre/modules/devtools/server",
         "devtools/toolkit/webconsole": "resource://gre/modules/devtools/toolkit/webconsole",
+        "devtools/styleinspector/css-logic": "resource://gre/modules/devtools/styleinspector/css-logic",
 
         // Allow access to xpcshell test items from the loader.
         "xpcshell-test": "resource://test"
       },
       globals: loaderGlobals
     });
 
     return promise.resolve(undefined);
@@ -80,26 +81,29 @@ var SrcdirProvider = {
     let srcdir = Services.prefs.getComplexValue("devtools.loader.srcdir",
                                                 Ci.nsISupportsString);
     srcdir = OS.Path.normalize(srcdir.data.trim());
     let devtoolsDir = OS.Path.join(srcdir, "browser", "devtools");
     let devtoolsURI = this.fileURI(devtoolsDir);
     let toolkitURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools"));
     let serverURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools", "server"));
     let webconsoleURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools", "webconsole"));
+    let cssLogicURI = this.fileURI(OS.Path.join(toolkitURI, "styleinspector", "css-logic"));
+
     let mainURI = this.fileURI(OS.Path.join(srcdir, "browser", "devtools", "main.js"));
     this.loader = new loader.Loader({
       modules: {
         "toolkit/loader": loader
       },
       paths: {
         "": "resource://gre/modules/commonjs/",
         "devtools/server": serverURI,
         "devtools/toolkit/webconsole": webconsoleURI,
         "devtools": devtoolsURI,
+        "devtools/styleinspector/css-logic": cssLogicURI,
         "main": mainURI
       },
       globals: loaderGlobals
     });
 
     return this._writeManifest(devtoolsDir).then(null, Cu.reportError);
   },
 
--- a/toolkit/devtools/moz.build
+++ b/toolkit/devtools/moz.build
@@ -5,10 +5,11 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 PARALLEL_DIRS += [
     'server',
     'client',
     'gcli',
     'sourcemap',
     'webconsole',
-    'apps'
+    'apps',
+    'styleinspector'
 ]
--- a/toolkit/devtools/server/actors/inspector.js
+++ b/toolkit/devtools/server/actors/inspector.js
@@ -133,31 +133,35 @@ var NodeActor = protocol.ActorClass({
   /**
    * Instead of storing a connection object, the NodeActor gets its connection
    * from its associated walker.
    */
   get conn() this.walker.conn,
 
   // Returns the JSON representation of this object over the wire.
   form: function(detail) {
+    if (detail === "actorid") {
+      return this.actorID;
+    }
+
     let parentNode = this.walker.parentNode(this);
 
     // Estimate the number of children.
     let numChildren = this.rawNode.childNodes.length;
     if (numChildren === 0 &&
         (this.rawNode.contentDocument || this.rawNode.getSVGDocument)) {
       // This might be an iframe with virtual children.
       numChildren = 1;
     }
 
     let form = {
       actor: this.actorID,
       parent: parentNode ? parentNode.actorID : undefined,
       nodeType: this.rawNode.nodeType,
-      namespaceURI: this.namespaceURI,
+      namespaceURI: this.rawNode.namespaceURI,
       nodeName: this.rawNode.nodeName,
       numChildren: numChildren,
 
       // doctype attributes
       name: this.rawNode.name,
       publicId: this.rawNode.publicId,
       systemId: this.rawNode.systemId,
 
@@ -303,16 +307,20 @@ let NodeFront = protocol.FrontClass(Node
       this._observer = null;
     }
 
     protocol.Front.prototype.destroy.call(this);
   },
 
   // Update the object given a form representation off the wire.
   form: function(form, detail, ctx) {
+    if (detail === "actorid") {
+      this.actorID = form;
+      return;
+    }
     // Shallow copy of the form.  We could just store a reference, but
     // eventually we'll want to update some of the data.
     this._form = object.merge(form);
     this._form.attrs = this._form.attrs ? this._form.attrs.slice() : [];
 
     if (form.parent) {
       // Get the owner actor for this actor (the walker), and find the
       // parent node of this actor from it, creating a standin node if
--- a/toolkit/devtools/server/actors/styleeditor.js
+++ b/toolkit/devtools/server/actors/styleeditor.js
@@ -99,17 +99,17 @@ StyleEditorActor.prototype = {
   },
 
   /**
    * Get the BaseURI for the document.
    *
    * @return {object} JSON message to with BaseURI
    */
   onGetBaseURI: function() {
-    return { baseURI: this.document.baseURIObject };
+    return { baseURI: this.document.baseURIObject.spec };
   },
 
   /**
    * Called when target navigates to a new document.
    * Adds load listeners to document.
    */
   onNewDocument: function() {
     // delete previous document's actors
new file mode 100644
--- /dev/null
+++ b/toolkit/devtools/styleinspector/Makefile.in
@@ -0,0 +1,15 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/rules.mk
+
+libs::
+	$(INSTALL) $(IFLAGS1) $(srcdir)/*.js $(FINAL_TARGET)/modules/devtools/styleinspector
rename from browser/devtools/styleinspector/css-logic.js
rename to toolkit/devtools/styleinspector/css-logic.js
new file mode 100644
--- /dev/null
+++ b/toolkit/devtools/styleinspector/moz.build
@@ -0,0 +1,5 @@
+# -*- 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/.
--- a/toolkit/mozapps/extensions/content/setting.xml
+++ b/toolkit/mozapps/extensions/content/setting.xml
@@ -458,21 +458,25 @@
               break;
             case Ci.nsIPrefBranch.PREF_BOOL:
               val = Services.prefs.getBoolPref(this.pref).toString();
               break;
             default:
               return;
           }
 
-          for (let i = 0; i < this.control.itemCount; i++) {
-            if (this.control.getItemAtIndex(i).value == val) {
-              this.control.selectedIndex = i;
-              break;
+          if ("itemCount" in this.control) {
+            for (let i = 0; i < this.control.itemCount; i++) {
+              if (this.control.getItemAtIndex(i).value == val) {
+                this.control.selectedIndex = i;
+                break;
+              }
             }
+          } else {
+            this.control.setAttribute("value", val);
           }
         ]]>
         </body>
       </method>
 
       <method name="valueToPreference">
         <body>
         <![CDATA[
--- a/toolkit/mozapps/extensions/test/browser/browser_inlinesettings.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_inlinesettings.js
@@ -134,17 +134,17 @@ function end_test() {
   Services.prefs.clearUserPref("extensions.inlinesettings3.radioBool");
   Services.prefs.clearUserPref("extensions.inlinesettings3.radioInt");
   Services.prefs.clearUserPref("extensions.inlinesettings3.radioString");
   Services.prefs.clearUserPref("extensions.inlinesettings3.menulist");
 
   MockFilePicker.cleanup();
 
   close_manager(gManagerWindow, function() {
-    observer.checkHidden("inlinesettings2@tests.mozilla.org");
+    observer.checkHidden("inlinesettings3@tests.mozilla.org");
     Services.obs.removeObserver(observer,
                                 AddonManager.OPTIONS_NOTIFICATION_HIDDEN);
 
     AddonManager.getAddonByID("inlinesettings1@tests.mozilla.org", function(aAddon) {
       aAddon.uninstall();
       finish();
     });
   });
@@ -570,8 +570,106 @@ add_test(function() {
     button = gManagerWindow.document.getElementById("detail-enable-btn");
     button.focus(); // make sure it's in view
     EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, gManagerWindow);
     observer.checkNotDisplayed();
 
     gCategoryUtilities.openType("extension", run_next_test);
   });
 });
+
+// Tests bindings with existing prefs.
+add_test(function() {
+  observer.checkHidden("inlinesettings2@tests.mozilla.org");
+
+  // Ensure these prefs are set. They should be set above, but somebody might
+  // change the tests above.
+  var profD = Services.dirsvc.get("ProfD", Ci.nsIFile);
+  Services.prefs.setBoolPref("extensions.inlinesettings1.bool", false);
+  Services.prefs.setIntPref("extensions.inlinesettings1.boolint", 1);
+  Services.prefs.setIntPref("extensions.inlinesettings1.integer", 12);
+  Services.prefs.setCharPref("extensions.inlinesettings1.string", "bar/");
+  Services.prefs.setCharPref("extensions.inlinesettings1.color", "#FF9900");
+  Services.prefs.setCharPref("extensions.inlinesettings1.file", profD.path);
+  Services.prefs.setCharPref("extensions.inlinesettings1.directory", profD.path);
+
+  var addon = get_addon_element(gManagerWindow, "inlinesettings1@tests.mozilla.org");
+  addon.parentNode.ensureElementIsVisible(addon);
+
+  var button = gManagerWindow.document.getAnonymousElementByAttribute(addon, "anonid", "preferences-btn");
+  EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, gManagerWindow);
+
+  wait_for_view_load(gManagerWindow, function() {
+    observer.checkDisplayed("inlinesettings1@tests.mozilla.org");
+
+    var grid = gManagerWindow.document.getElementById("detail-grid");
+    var settings = grid.querySelectorAll("rows > setting");
+
+    var input = gManagerWindow.document.getAnonymousElementByAttribute(settings[0], "anonid", "input");
+    is(input.checked, false, "Checkbox should have initial value");
+
+    var input = gManagerWindow.document.getAnonymousElementByAttribute(settings[1], "anonid", "input");
+    is(input.checked, true, "Checkbox should have initial value");
+
+    var input = gManagerWindow.document.getAnonymousElementByAttribute(settings[2], "anonid", "input");
+    is(input.value, "12", "Number box should have initial value");
+
+    var input = gManagerWindow.document.getAnonymousElementByAttribute(settings[3], "anonid", "input");
+    is(input.value, "bar/", "Text box should have initial value");
+
+    input = gManagerWindow.document.getAnonymousElementByAttribute(settings[5], "anonid", "input");
+    is(input.color, "#FF9900", "Color picker should have initial value");
+
+    input = gManagerWindow.document.getAnonymousElementByAttribute(settings[6], "anonid", "input");
+    is(input.value, profD.path, "Label should have initial value");
+    is(input.tooltipText, profD.path, "Label tooltip should have initial value");
+
+    input = gManagerWindow.document.getAnonymousElementByAttribute(settings[7], "anonid", "input");
+    is(input.value, profD.path, "Label value should have initial value");
+    is(input.tooltipText, profD.path, "Label tooltip should have initial value");
+
+    gCategoryUtilities.openType("extension", run_next_test);
+  });
+});
+
+// Tests bindings with existing prefs.
+add_test(function() {
+  observer.checkHidden("inlinesettings1@tests.mozilla.org");
+
+  // Ensure these prefs are set. They should be set above, but somebody might
+  // change the tests above.
+  Services.prefs.setBoolPref("extensions.inlinesettings3.radioBool", false);
+  Services.prefs.setIntPref("extensions.inlinesettings3.radioInt", 6);
+  Services.prefs.setCharPref("extensions.inlinesettings3.radioString", "kilo");
+  Services.prefs.setIntPref("extensions.inlinesettings3.menulist", 9);
+
+  var addon = get_addon_element(gManagerWindow, "inlinesettings3@tests.mozilla.org");
+  addon.parentNode.ensureElementIsVisible(addon);
+
+  var button = gManagerWindow.document.getAnonymousElementByAttribute(addon, "anonid", "preferences-btn");
+  EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, gManagerWindow);
+
+  wait_for_view_load(gManagerWindow, function() {
+    observer.checkDisplayed("inlinesettings3@tests.mozilla.org");
+
+    var grid = gManagerWindow.document.getElementById("detail-grid");
+    var settings = grid.querySelectorAll("rows > setting");
+
+    var radios = settings[0].getElementsByTagName("radio");
+    isnot(radios[0].selected, true, "Correct radio button should be selected");
+    is(radios[1].selected, true, "Correct radio button should be selected");
+
+    var radios = settings[1].getElementsByTagName("radio");
+    isnot(radios[0].selected, true, "Correct radio button should be selected");
+    isnot(radios[1].selected, true, "Correct radio button should be selected");
+    is(radios[2].selected, true, "Correct radio button should be selected");
+
+    var radios = settings[2].getElementsByTagName("radio");
+    isnot(radios[0].selected, true, "Correct radio button should be selected");
+    isnot(radios[1].selected, true, "Correct radio button should be selected");
+    is(radios[2].selected, true, "Correct radio button should be selected");
+
+    var input = settings[3].firstElementChild;
+    is(input.value, "9", "Menulist should have initial value");
+
+    gCategoryUtilities.openType("extension", run_next_test);
+  });
+});
--- a/toolkit/webapps/WebappsInstaller.jsm
+++ b/toolkit/webapps/WebappsInstaller.jsm
@@ -224,18 +224,18 @@ WinNativeApp.prototype = {
 
   /**
    * Install the app in the system
    *
    */
   install: function() {
     try {
       this._copyPrebuiltFiles();
+      this._createShortcutFiles();
       this._createConfigFiles();
-      this._createShortcutFiles();
       this._writeSystemKeys();
     } catch (ex) {
       this._removeInstallation(false);
       throw(ex);
     }
 
     getIconForApp(this, function() {});
   },
@@ -274,16 +274,39 @@ WinNativeApp.prototype = {
     this.iconFile = this.installDir.clone();
     this.iconFile.append("chrome");
     this.iconFile.append("icons");
     this.iconFile.append("default");
     this.iconFile.append("default.ico");
 
     this.uninstallSubkeyStr = this.uniqueName;
 
+    // ${UninstallDir}/shortcuts_log.ini
+    this.shortcutLogsINI = this.uninstallDir.clone();
+    this.shortcutLogsINI.append("shortcuts_log.ini");
+
+    if (this.shortcutLogsINI.exists()) {
+      // If it's a reinstallation (or an update) get the shortcut names
+      // from the shortcut_log.ini file
+      let factory = Cc["@mozilla.org/xpcom/ini-processor-factory;1"]
+                      .getService(Ci.nsIINIParserFactory);
+      let parser = factory.createINIParser(this.shortcutLogsINI);
+
+      this.shortcutName = parser.getString("STARTMENU", "Shortcut0");
+    } else {
+      let desktop = Services.dirsvc.get("Desk", Ci.nsIFile);
+      let startMenu = Services.dirsvc.get("Progs", Ci.nsIFile);
+
+      // Check in both directories to see if a shortcut with the same name
+      // already exists.
+      this.shortcutName = getAvailableFileName([ startMenu, desktop ],
+                                               this.appNameAsFilename,
+                                               ".lnk");
+    }
+
     // Remove previously installed app (for update purposes)
     this._removeInstallation(true);
 
     this._createDirectoryStructure();
   },
 
   /**
    * Remove the current installation
@@ -301,21 +324,21 @@ WinNativeApp.prototype = {
         uninstallKey.removeChild(this.uninstallSubkeyStr);
       }
     } catch (e) {
     } finally {
       if(uninstallKey)
         uninstallKey.close();
     }
 
-    let desktopShortcut = Services.dirsvc.get("Desk", Ci.nsILocalFile);
-    desktopShortcut.append(this.appNameAsFilename + ".lnk");
+    let desktopShortcut = Services.dirsvc.get("Desk", Ci.nsIFile);
+    desktopShortcut.append(this.shortcutName);
 
-    let startMenuShortcut = Services.dirsvc.get("Progs", Ci.nsILocalFile);
-    startMenuShortcut.append(this.appNameAsFilename + ".lnk");
+    let startMenuShortcut = Services.dirsvc.get("Progs", Ci.nsIFile);
+    startMenuShortcut.append(this.shortcutName);
 
     let filesToRemove = [desktopShortcut, startMenuShortcut];
 
     if (keepProfile) {
       filesToRemove.push(this.iconFile);
       filesToRemove.push(this.webapprt);
       filesToRemove.push(this.configJson);
       filesToRemove.push(this.webappINI);
@@ -377,23 +400,19 @@ WinNativeApp.prototype = {
     // ${InstallDir}/webapp.ini
     let writer = factory.createINIParser(this.webappINI).QueryInterface(Ci.nsIINIParserWriter);
     writer.setString("Webapp", "Name", this.appName);
     writer.setString("Webapp", "Profile", this.installDir.leafName);
     writer.setString("Webapp", "Executable", this.appNameAsFilename);
     writer.setString("WebappRT", "InstallDir", this.runtimeFolder.path);
     writer.writeFile(null, Ci.nsIINIParserWriter.WRITE_UTF16);
 
-    // ${UninstallDir}/shortcuts_log.ini
-    let shortcutLogsINI = this.uninstallDir.clone().QueryInterface(Ci.nsILocalFile);
-    shortcutLogsINI.append("shortcuts_log.ini");
-
-    writer = factory.createINIParser(shortcutLogsINI).QueryInterface(Ci.nsIINIParserWriter);
-    writer.setString("STARTMENU", "Shortcut0", this.appNameAsFilename + ".lnk");
-    writer.setString("DESKTOP", "Shortcut0", this.appNameAsFilename + ".lnk");
+    writer = factory.createINIParser(this.shortcutLogsINI).QueryInterface(Ci.nsIINIParserWriter);
+    writer.setString("STARTMENU", "Shortcut0", this.shortcutName);
+    writer.setString("DESKTOP", "Shortcut0", this.shortcutName);
     writer.setString("TASKBAR", "Migrated", "true");
     writer.writeFile(null, Ci.nsIINIParserWriter.WRITE_UTF16);
 
     // ${UninstallDir}/uninstall.log
     let uninstallContent = 
       "File: \\webapp.ini\r\n" +
       "File: \\webapp.json\r\n" +
       "File: \\webapprt.old\r\n" +
@@ -443,32 +462,32 @@ WinNativeApp.prototype = {
   },
 
   /**
    * Creates a shortcut file inside the app installation folder and makes
    * two copies of it: one into the desktop and one into the start menu.
    */
   _createShortcutFiles: function() {
     let shortcut = this.installDir.clone().QueryInterface(Ci.nsILocalFileWin);
-    shortcut.append(this.appNameAsFilename + ".lnk");
+    shortcut.append(this.shortcutName);
 
     let target = this.installDir.clone();
     target.append(this.webapprt.leafName);
 
     /* function nsILocalFileWin.setShortcut(targetFile, workingDir, args,
                                             description, iconFile, iconIndex) */
 
     shortcut.setShortcut(target, this.installDir.clone(), null,
                          this.shortDescription, this.iconFile, 0);
 
     let desktop = Services.dirsvc.get("Desk", Ci.nsILocalFile);
     let startMenu = Services.dirsvc.get("Progs", Ci.nsILocalFile);
 
-    shortcut.copyTo(desktop, this.appNameAsFilename + ".lnk");
-    shortcut.copyTo(startMenu, this.appNameAsFilename + ".lnk");
+    shortcut.copyTo(desktop, this.shortcutName);
+    shortcut.copyTo(startMenu, this.shortcutName);
 
     shortcut.followLinks = false;
     shortcut.remove(false);
   },
 
   /**
    * This variable specifies if the icon retrieval process should
    * use a temporary file in the system or a binary stream. This
@@ -655,23 +674,23 @@ MacNativeApp.prototype = {
 
     let infoPListFile = this.contentsDir.clone();
     infoPListFile.append("Info.plist");
     writeToFile(infoPListFile, infoPListContent);
   },
 
   _moveToApplicationsFolder: function() {
     let appDir = Services.dirsvc.get("LocApp", Ci.nsILocalFile);
-    let destination = getAvailableFile(appDir,
-                                       this.appNameAsFilename,
-                                       ".app");
-    if (!destination) {
+    let destinationName = getAvailableFileName([appDir],
+                                               this.appNameAsFilename,
+                                              ".app");
+    if (!destinationName) {
       return false;
     }
-    this.installDir.moveTo(destination.parent, destination.leafName);
+    this.installDir.moveTo(appDir, destinationName);
   },
 
   /**
    * This variable specifies if the icon retrieval process should
    * use a temporary file in the system or a binary stream. This
    * is accessed by a common function in WebappsIconHelpers.js and
    * is different for each platform.
    */
@@ -962,48 +981,71 @@ function stripStringForFilename(aPossibl
   let stripped = aPossiblyBadFilenameString.replace(stripFrontRE, "");
   stripped = stripped.replace(stripBackRE, "");
   return stripped;
 }
 
 /**
  * Finds a unique name available in a folder (i.e., non-existent file)
  *
- * @param aFolder nsIFile that represents the directory where we want to write
+ * @param aFolderSet a set of nsIFile objects that represents the set of
+ * directories where we want to write
  * @param aName   string with the filename (minus the extension) desired
  * @param aExtension string with the file extension, including the dot
 
- * @return nsILocalFile or null if folder is unwritable or unique name
+ * @return file name or null if folder is unwritable or unique name
  *         was not available
  */
-function getAvailableFile(aFolder, aName, aExtension) {
-  let folder = aFolder.QueryInterface(Ci.nsILocalFile);
-  folder.followLinks = false;
-  if (!folder.isDirectory() || !folder.isWritable()) {
-    return null;
+function getAvailableFileName(aFolderSet, aName, aExtension) {
+  let fileSet = [];
+  let name = aName + aExtension;
+  let isUnique = true;
+
+  // Check if the plain name is a unique name in all the directories.
+  for (let folder of aFolderSet) {
+    folder.followLinks = false;
+    if (!folder.isDirectory() || !folder.isWritable()) {
+      return null;
+    }
+
+    let file = folder.clone();
+    file.append(name);
+    // Avoid exists() call if we already know this file name is not unique in
+    // one of the directories.
+    if (isUnique && file.exists()) {
+      isUnique = false;
+    }
+
+    fileSet.push(file);
   }
 
-  let file = folder.clone();
-  file.append(aName + aExtension);
-
-  if (!file.exists()) {
-    return file;
+  if (isUnique) {
+    return name;
   }
 
-  for (let i = 2; i < 10; i++) {
-    file.leafName = aName + " (" + i + ")" + aExtension;
-    if (!file.exists()) {
-      return file;
+
+  function checkUnique(aName) {
+    for (let file of fileSet) {
+      file.leafName = aName;
+
+      if (file.exists()) {
+        return false;
+      }
     }
+
+    return true;
   }
 
-  for (let i = 10; i < 100; i++) {
-    file.leafName = aName + "-" + i + aExtension;
-    if (!file.exists()) {
-      return file;
+  // If we're here, the plain name wasn't enough. Let's try modifying the name
+  // by adding "(" + num + ")".
+  for (let i = 2; i < 100; i++) {
+    name = aName + " (" + i + ")" + aExtension;
+
+    if (checkUnique(name)) {
+      return name;
     }
   }
 
   return null;
 }
 
 /**
  * Attempts to remove files or directories.
--- a/tools/profiler/UnwinderThread2.cpp
+++ b/tools/profiler/UnwinderThread2.cpp
@@ -1567,28 +1567,40 @@ public:
   string version() const { MOZ_CRASH(); return ""; }
 
   // Creates a new copy of this CodeModule object, which the caller takes
   // ownership of.  The new CodeModule may be of a different concrete class
   // than the CodeModule being copied, but will behave identically to the
   // copied CodeModule as far as the CodeModule interface is concerned.
   const CodeModule* Copy() const { MOZ_CRASH(); return NULL; }
 
+  friend void read_procmaps(std::vector<MyCodeModule*>& mods_);
+
  private:
   // record info for a file backed executable mapping
   u_int64_t x_start_;
   u_int64_t x_len_;    // may not be zero
   string    filename_; // of the mapped file
 };
 
 
+// Simple predicates on MyCodeModule, used by read_procmaps
+static bool mcm_has_zero_length(MyCodeModule* cm) {
+  return cm->size() == 0;
+}
+
+static bool mcm_is_lessthan_by_start(MyCodeModule* cm1, MyCodeModule* cm2) {
+  return cm1->base_address() < cm2->base_address();
+}
+
+
 /* Find out, in a platform-dependent way, where the code modules got
    mapped in the process' virtual address space, and add them to
    |mods_|. */
-static void read_procmaps(std::vector<MyCodeModule*>& mods_)
+void read_procmaps(std::vector<MyCodeModule*>& mods_)
 {
   MOZ_ASSERT(mods_.size() == 0);
 #if defined(SPS_OS_linux) || defined(SPS_OS_android) || defined(SPS_OS_darwin)
   SharedLibraryInfo info = SharedLibraryInfo::GetInfoForSelf();
   for (size_t i = 0; i < info.GetSize(); i++) {
     const SharedLibrary& lib = info.GetEntry(i);
     // On Linux, this pulls out two mappings with no names: the VDSO
     // (understandable but harmless), and the main executable (bad).
@@ -1596,54 +1608,130 @@ static void read_procmaps(std::vector<My
       = new MyCodeModule( lib.GetStart(), lib.GetEnd()-lib.GetStart(),
                           lib.GetName() );
     mods_.push_back(cm);
   }
 #else
 # error "Unknown platform"
 #endif
   if (0) LOGF("got %d mappings\n", (int)mods_.size());
+
+  // Now tidy up |_mods| to ensure that it is possible to do
+  // binary search for addresses in it, without risk of infinite loops:
+  // * segments must be ordered by x_start_ values
+  // * segments must not have zero size (x_len_)
+  // * segments must be non-overlapping
+  std::sort(mods_.begin(), mods_.end(), mcm_is_lessthan_by_start);
+  if (mods_.size() >= 2) {
+    // trim range ends, to guarantee no overlaps
+    for (std::vector<MyCodeModule*>::size_type i = 1; i < mods_.size(); i++) {
+      uint64_t prev_start = mods_[i-1]->x_start_;
+      uint64_t prev_len   = mods_[i-1]->x_len_;
+      uint64_t here_start = mods_[i]->x_start_;
+      MOZ_ASSERT(prev_start <= here_start);
+      if (prev_start + prev_len > here_start) {
+        // overlap; trim the end of the previous one
+        mods_[i-1]->x_len_ = here_start - prev_start;
+      }
+    }
+  }
+
+  // remove any zero-sized ranges
+  std::remove_if(mods_.begin(), mods_.end(), mcm_has_zero_length);
+  // Final sanity check: ascending, non-overlapping
+  if (mods_.size() >= 2) {
+    for (std::vector<MyCodeModule*>::size_type i = 1; i < mods_.size(); i++) {
+      uint64_t prev_start = mods_[i-1]->x_start_;
+      uint64_t prev_len   = mods_[i-1]->x_len_;
+      uint64_t here_start = mods_[i]->x_start_;
+      uint64_t here_len   = mods_[i]->x_len_;
+      MOZ_ASSERT(prev_len > 0 && here_len > 0);
+      MOZ_ASSERT(prev_start + prev_len <= here_start);
+      (void)prev_start;
+      (void)prev_len;
+      (void)here_start;
+      (void)here_len;
+    }
+  }
 }
 
 
 class MyCodeModules : public google_breakpad::CodeModules
 {
  public:
   MyCodeModules() {
+    max_addr_ = 0;
+    min_addr_ = ~0;
     read_procmaps(mods_);
+    if (mods_.size() > 0) {
+      MyCodeModule *first = mods_[0], *last = mods_[mods_.size()-1];
+      min_addr_ = first->base_address();
+      max_addr_ = last->base_address() + last->size() - 1;
+    }
   }
 
   ~MyCodeModules() {
     std::vector<MyCodeModule*>::const_iterator it;
     for (it = mods_.begin(); it < mods_.end(); it++) {
       MyCodeModule* cm = *it;
       delete cm;
     }
   }
 
  private:
-  std::vector<MyCodeModule*> mods_;
+  // A vector of loaded modules, in ascending order of base_address(),
+  // non-zero size()d, and non-overlapping, suitable for binary
+  // search.  These guarantees are ensured by read_procmaps() as
+  // called from the constructor, hence they will need to be
+  // re-ensured if there is ever a use case in which modules are added
+  // to |mods_| after the initial construction.  Likewise, |min_addr_|
+  // and |max_addr_| would need to be updates.  At the moment that
+  // never happens, so the code is safe as it stands.
+  mutable std::vector<MyCodeModule*> mods_;
+
+  // Additional optimisation: cache the minimum and maximum code address
+  // for any of the entries in |mods_|, so that GetModuleForAddress can
+  // reject obviously out-of-range values without having to do any binary
+  // search.
+  uint64_t min_addr_, max_addr_;
 
   unsigned int module_count() const { MOZ_CRASH(); return 1; }
 
   const google_breakpad::CodeModule*
                 GetModuleForAddress(u_int64_t address) const
   {
     if (0) printf("GMFA %llx\n", (unsigned long long int)address);
-    std::vector<MyCodeModule*>::const_iterator it;
-    for (it = mods_.begin(); it < mods_.end(); it++) {
-       MyCodeModule* cm = *it;
-       if (0) printf("considering %p  %llx +%llx\n",
-                     (void*)cm, (unsigned long long int)cm->base_address(),
-                                (unsigned long long int)cm->size());
-       if (cm->base_address() <= address
-           && address < cm->base_address() + cm->size())
-          return cm;
+    std::vector<MyCodeModule*>::size_type nMods = mods_.size();
+
+    // Reject obviously-nonsensical requests.  Note that the
+    // comparisons against {min_,max_}addr_ are only valid in the case
+    // where nMods > 0, hence the ordering of tests.
+    if (nMods == 0 || address < min_addr_ || address > max_addr_) {
+      return NULL;
     }
-    return NULL;
+
+    // Binary search in |mods_|.  lo and hi need to be signed, else
+    // the loop termination tests don't work properly.
+    long int lo = 0;
+    long int hi = nMods-1;
+    while (true) {
+      // current unsearched space is from lo to hi, inclusive.
+      if (lo > hi) {
+        // not found
+        return NULL;
+      }
+      long int mid = (lo + hi) / 2;
+      MyCodeModule* mid_mod = mods_[mid];
+      uint64_t mid_minAddr = mid_mod->base_address();
+      uint64_t mid_maxAddr = mid_minAddr + mid_mod->size() - 1;
+      if (address < mid_minAddr) { hi = mid-1; continue; }
+      if (address > mid_maxAddr) { lo = mid+1; continue; }
+      MOZ_ASSERT(mid_minAddr <= address && address <= mid_maxAddr);
+      return mid_mod;
+    }
   }
 
   const google_breakpad::CodeModule* GetMainModule() const {
     MOZ_CRASH(); return NULL; return NULL;
   }
 
   const google_breakpad::CodeModule* GetModuleAtSequence(
                 unsigned int sequence) const {
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -507,26 +507,29 @@ NS_IMETHODIMP nsCocoaWindow::CreatePopup
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP nsCocoaWindow::Destroy()
 {
-  // The reference from a possible sibling widget will never get cleared because
-  // we don't implement GetParent so RemoveChild never removes us from the
-  // sibling widget list. So if we don't hide ourselves here we may stay on
-  // screen. This is gross. (Bug 891424)
+  // If we don't hide here we run into problems with panels, this is not ideal.
+  // (Bug 891424)
   Show(false);
 
   if (mPopupContentView)
     mPopupContentView->Destroy();
 
   nsBaseWidget::Destroy();
+  // nsBaseWidget::Destroy() calls GetParent()->RemoveChild(this). But we
+  // don't implement GetParent(), so we need to do the equivalent here.
+  if (mParent) {
+    mParent->RemoveChild(this);
+  }
   nsBaseWidget::OnDestroy();
 
   if (mFullScreen) {
     // On Lion we don't have to mess with the OS chrome when in Full Screen
     // mode.  But we do have to destroy the native window here (and not wait
     // for that to happen in our destructor).  We don't switch away from the
     // native window's space until the window is destroyed, and otherwise this
     // might not happen for several seconds (because at least one object
--- a/widget/gtk2/nsWindow.cpp
+++ b/widget/gtk2/nsWindow.cpp
@@ -130,16 +130,17 @@ using mozilla::layers::LayerManagerOGL;
 // Don't put more than this many rects in the dirty region, just fluff
 // out to the bounding-box if there are more
 #define MAX_RECTS_IN_REGION 100
 
 const gint kEvents = GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK |
                      GDK_VISIBILITY_NOTIFY_MASK |
                      GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
                      GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+                     GDK_SCROLL_MASK |
 #ifdef MOZ_PLATFORM_MAEMO
                      GDK_POINTER_MOTION_HINT_MASK |
 #endif
                      GDK_POINTER_MOTION_MASK;
 
 /* utility functions */
 static bool       is_mouse_in_window(GdkWindow* aWindow,
                                      gdouble aMouseX, gdouble aMouseY);
--- a/widget/windows/GfxInfo.cpp
+++ b/widget/windows/GfxInfo.cpp
@@ -486,26 +486,33 @@ GfxInfo::Init()
                                  : L"igd10umd32.dll",
                     *dllFileName2 = is64bitApp
                                  ? L"igd10iumd64.dll"
                                  : L"igd10iumd32.dll";
     nsString dllVersion, dllVersion2;
     gfxWindowsPlatform::GetDLLVersion((PRUnichar*)dllFileName, dllVersion);
     gfxWindowsPlatform::GetDLLVersion((PRUnichar*)dllFileName2, dllVersion2);
 
-    uint64_t dllNumericVersion = 0, dllNumericVersion2 = 0, driverNumericVersion = 0;
+    uint64_t dllNumericVersion = 0, dllNumericVersion2 = 0,
+             driverNumericVersion = 0, knownSafeMismatchVersion = 0;
     ParseDriverVersion(dllVersion, &dllNumericVersion);
     ParseDriverVersion(dllVersion2, &dllNumericVersion2);
     ParseDriverVersion(mDriverVersion, &driverNumericVersion);
+    ParseDriverVersion(NS_LITERAL_STRING("9.17.10.0"), &knownSafeMismatchVersion);
 
-    // if GetDLLVersion fails, it gives "0.0.0.0"
-    // so if GetDLLVersion failed, we get dllNumericVersion = 0
-    // so this test implicitly handles the case where GetDLLVersion failed
-    if (dllNumericVersion != driverNumericVersion && dllNumericVersion2 != driverNumericVersion)
+    // If there's a driver version mismatch, consider this harmful only when
+    // the driver version is less than knownSafeMismatchVersion.  See the
+    // above comment about crashes with old mismatches. If the GetDllVersion
+    // call fails, then they return 0, so that will be considered a mismatch.
+    if (dllNumericVersion != driverNumericVersion &&
+        dllNumericVersion2 != driverNumericVersion &&
+        (driverNumericVersion < knownSafeMismatchVersion ||
+         std::max(dllNumericVersion, dllNumericVersion2) < knownSafeMismatchVersion)) {
       mHasDriverVersionMismatch = true;
+    }
   }
 
   const char *spoofedDriverVersionString = PR_GetEnv("MOZ_GFX_SPOOF_DRIVER_VERSION");
   if (spoofedDriverVersionString) {
     mDriverVersion.AssignASCII(spoofedDriverVersionString);
   }
 
   const char *spoofedVendor = PR_GetEnv("MOZ_GFX_SPOOF_VENDOR_ID");
--- a/widget/windows/winrt/FrameworkViewGfx.cpp
+++ b/widget/windows/winrt/FrameworkViewGfx.cpp
@@ -48,21 +48,24 @@ FrameworkView::Render(const nsIntRegion&
   if (!mWidget->mLayerManager) {
     (void)mWidget->GetLayerManager();
     if (!mWidget->mLayerManager) {
       NS_WARNING("mWidget->GetLayerManager() failed!");
       return false;
     }
   }
 
-  if (IsRenderMode(gfxWindowsPlatform::RENDER_GDI) ||
-      IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH32) ||
-      IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH24)) {
-    NS_WARNING("Unsupported render mode, can't draw. Needs to be D2D.");
-    return false;
+  // If OMTC is not in use, then we only support D2D rendering
+  if (!mWidget->ShouldUseOffMainThreadCompositing()) {
+    if (IsRenderMode(gfxWindowsPlatform::RENDER_GDI) ||
+        IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH32) ||
+        IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH24)) {
+      NS_WARNING("Unsupported render mode, can't draw. Needs to be D2D.");
+      return false;
+    }
   }
 
   if (mWidget->GetTransparencyMode() != eTransparencyOpaque) {
     NS_WARNING("transparency modes other than eTransparencyOpaque unsupported, can't draw.");
     return false;
   }
 
   AutoRestore<bool> painting(mPainting);
--- a/widget/xpwidgets/GfxDriverInfo.h
+++ b/widget/xpwidgets/GfxDriverInfo.h
@@ -208,17 +208,17 @@ inline void PadDriverDecimal(char *aStri
       }
       break;
     }
   }
   aString[4] = 0;
 }
 
 inline bool
-ParseDriverVersion(nsAString& aVersion, uint64_t *aNumericVersion)
+ParseDriverVersion(const nsAString& aVersion, uint64_t *aNumericVersion)
 {
 #if defined(XP_WIN)
   int a, b, c, d;
   char aStr[8], bStr[8], cStr[8], dStr[8];
   /* honestly, why do I even bother */
   if (!SplitDriverVersion(NS_LossyConvertUTF16toASCII(aVersion).get(), aStr, bStr, cStr, dStr))
     return false;