Merge mozilla-central to mozilla-inbound
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 10 May 2017 15:30:44 +0200
changeset 405677 4126603b0e553ab028ec51cfbf8c7f32fe693ece
parent 405676 dd31968cb8d72803d9a9f3f2fd7ef78c7319f563 (current diff)
parent 405605 ebbcdaa5b5802ecd39624dd2acbdda8547b8384d (diff)
child 405678 28c30e21ceb7c4144189e499cc89d1a48e916c3c
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone55.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 mozilla-inbound
browser/base/content/abouthome/mozilla.png
browser/base/content/abouthome/mozilla@2x.png
browser/themes/linux/Privacy-16.png
browser/themes/linux/click-to-play-warning-stripes.png
browser/themes/osx/Privacy-16.png
browser/themes/osx/click-to-play-warning-stripes.png
browser/themes/shared/content-contextmenu.svg
browser/themes/windows/Privacy-16.png
browser/themes/windows/click-to-play-warning-stripes.png
editor/nsIEditorIMESupport.idl
gfx/angle/src/libANGLE/moz.build
mobile/android/.eslintrc
mobile/android/base/java/org/mozilla/gecko/tabs/TabsLayoutRecyclerAdapter.java
mobile/android/chrome/content/.eslintrc
security/manager/.eslintrc.js
testing/web-platform/meta/console/console-timeline-timelineEnd-historical.any.js.ini
testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/disable_controls_reposition.html.ini
toolkit/themes/osx/global/linkTree.css
toolkit/themes/windows/global/linkTree.css
--- a/.eslintignore
+++ b/.eslintignore
@@ -326,8 +326,9 @@ toolkit/components/urlformatter/nsURLFor
 toolkit/modules/AppConstants.jsm
 toolkit/mozapps/downloads/nsHelperAppDlg.js
 toolkit/mozapps/extensions/internal/AddonConstants.jsm
 toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
 toolkit/webapps/**
 
 # Third party
 toolkit/modules/third_party/**
+third_party/**
--- a/accessible/.eslintrc.js
+++ b/accessible/.eslintrc.js
@@ -1,24 +1,31 @@
 "use strict";
 
 module.exports = {
   "extends": [
-    "../.eslintrc.js"
+    "plugin:mozilla/recommended"
   ],
-  "globals": {
-    "Cc": true,
-    "Ci": true,
-    "Components": true,
-    "console": true,
-    "Cu": true,
-    "dump": true,
-    "Services": true,
-    "XPCOMUtils": true
-  },
   "rules": {
     // Warn about cyclomatic complexity in functions.
     "complexity": ["error", 42],
 
-    // Maximum depth callbacks can be nested.
-    "max-nested-callbacks": ["error", 10],
+    // XXX These are rules that are enabled in the recommended configuration, but
+    // disabled here due to failures when initially implemented. They should be
+    // removed (and hence enabled) at some stage.
+    "brace-style": "off",
+    "consistent-return": "off",
+    "func-call-spacing": "off",
+    "quotes": "off",
+    "object-shorthand": "off",
+    "space-before-function-paren": "off",
+    "space-infix-ops": "off",
+    "key-spacing": "off",
+    "keyword-spacing": "off",
+    "no-else-return": "off",
+    "no-multi-spaces": "off",
+    "no-trailing-spaces": "off",
+    "no-unexpected-multiline": "off",
+    "no-unsafe-finally": "off",
+    "no-useless-call": "off",
+    "spaced-comment": "off",
   }
 };
--- a/accessible/base/Logging.cpp
+++ b/accessible/base/Logging.cpp
@@ -391,17 +391,17 @@ static const char* sDocCreateTitle = "DO
 static const char* sDocDestroyTitle = "DOCDESTROY";
 static const char* sDocEventTitle = "DOCEVENT";
 static const char* sFocusTitle = "FOCUS";
 
 void
 logging::DocLoad(const char* aMsg, nsIWebProgress* aWebProgress,
                  nsIRequest* aRequest, uint32_t aStateFlags)
 {
-  MsgBegin(sDocLoadTitle, aMsg);
+  MsgBegin(sDocLoadTitle, "%s", aMsg);
 
   nsCOMPtr<mozIDOMWindowProxy> DOMWindow;
   aWebProgress->GetDOMWindow(getter_AddRefs(DOMWindow));
   nsPIDOMWindowOuter* window = nsPIDOMWindowOuter::From(DOMWindow);
   if (!window) {
     MsgEnd();
     return;
   }
@@ -428,17 +428,17 @@ logging::DocLoad(const char* aMsg, nsIWe
   printf(", document is %sloading\n", (isDocLoading ? "" : "not "));
 
   MsgEnd();
 }
 
 void
 logging::DocLoad(const char* aMsg, nsIDocument* aDocumentNode)
 {
-  MsgBegin(sDocLoadTitle, aMsg);
+  MsgBegin(sDocLoadTitle, "%s", aMsg);
 
   DocAccessible* document = GetExistingDocAccessible(aDocumentNode);
   LogDocInfo(aDocumentNode, document);
 
   MsgEnd();
 }
 
 void
@@ -492,64 +492,64 @@ logging::DocLoadEventHandled(AccEvent* a
 
 void
 logging::DocCreate(const char* aMsg, nsIDocument* aDocumentNode,
                    DocAccessible* aDocument)
 {
   DocAccessible* document = aDocument ?
     aDocument : GetExistingDocAccessible(aDocumentNode);
 
-  MsgBegin(sDocCreateTitle, aMsg);
+  MsgBegin(sDocCreateTitle, "%s", aMsg);
   LogDocInfo(aDocumentNode, document);
   MsgEnd();
 }
 
 void
 logging::DocDestroy(const char* aMsg, nsIDocument* aDocumentNode,
                     DocAccessible* aDocument)
 {
   DocAccessible* document = aDocument ?
     aDocument : GetExistingDocAccessible(aDocumentNode);
 
-  MsgBegin(sDocDestroyTitle, aMsg);
+  MsgBegin(sDocDestroyTitle, "%s", aMsg);
   LogDocInfo(aDocumentNode, document);
   MsgEnd();
 }
 
 void
 logging::OuterDocDestroy(OuterDocAccessible* aOuterDoc)
 {
   MsgBegin(sDocDestroyTitle, "outerdoc shutdown");
   logging::Address("outerdoc", aOuterDoc);
   MsgEnd();
 }
 
 void
 logging::FocusNotificationTarget(const char* aMsg, const char* aTargetDescr,
                                  Accessible* aTarget)
 {
-  MsgBegin(sFocusTitle, aMsg);
+  MsgBegin(sFocusTitle, "%s", aMsg);
   AccessibleNNode(aTargetDescr, aTarget);
   MsgEnd();
 }
 
 void
 logging::FocusNotificationTarget(const char* aMsg, const char* aTargetDescr,
                                  nsINode* aTargetNode)
 {
-  MsgBegin(sFocusTitle, aMsg);
+  MsgBegin(sFocusTitle, "%s", aMsg);
   Node(aTargetDescr, aTargetNode);
   MsgEnd();
 }
 
 void
 logging::FocusNotificationTarget(const char* aMsg, const char* aTargetDescr,
                                  nsISupports* aTargetThing)
 {
-  MsgBegin(sFocusTitle, aMsg);
+  MsgBegin(sFocusTitle, "%s", aMsg);
 
   if (aTargetThing) {
     nsCOMPtr<nsINode> targetNode(do_QueryInterface(aTargetThing));
     if (targetNode)
       AccessibleNNode(aTargetDescr, targetNode);
     else
       printf("    %s: %p, window\n", aTargetDescr,
              static_cast<void*>(aTargetThing));
@@ -623,17 +623,17 @@ logging::TreeInfo(const char* aMsg, uint
       Accessible* acc = va_arg(vl, Accessible*);
       MsgBegin("TREE", "%s; doc: %p", aMsg, acc ? acc->Document() : nullptr);
       AccessibleInfo(descr, acc);
       while ((descr = va_arg(vl, const char*))) {
         AccessibleInfo(descr, va_arg(vl, Accessible*));
       }
     }
     else {
-      MsgBegin("TREE", aMsg);
+      MsgBegin("TREE", "%s", aMsg);
     }
     va_end(vl);
     MsgEnd();
 
     if (aExtraFlags & eStack) {
       Stack();
     }
   }
@@ -672,17 +672,17 @@ logging::TreeInfo(const char* aMsg, uint
   }
 }
 
 void
 logging::Tree(const char* aTitle, const char* aMsgText,
               Accessible* aRoot, GetTreePrefix aPrefixFunc,
               void* aGetTreePrefixData)
 {
-  logging::MsgBegin(aTitle, aMsgText);
+  logging::MsgBegin(aTitle, "%s", aMsgText);
 
   nsAutoString level;
   Accessible* root = aRoot;
   do {
     const char* prefix = aPrefixFunc ? aPrefixFunc(aGetTreePrefixData, root) : "";
     printf("%s", NS_ConvertUTF16toUTF8(level).get());
     logging::AccessibleInfo(prefix, root);
     if (root->FirstChild() && !root->FirstChild()->IsDoc()) {
@@ -712,17 +712,17 @@ logging::Tree(const char* aTitle, const 
 
   logging::MsgEnd();
 }
 
 void
 logging::DOMTree(const char* aTitle, const char* aMsgText,
                  DocAccessible* aDocument)
 {
-  logging::MsgBegin(aTitle, aMsgText);
+  logging::MsgBegin(aTitle, "%s", aMsgText);
   nsAutoString level;
   nsINode* root = aDocument->DocumentNode();
   do {
     printf("%s", NS_ConvertUTF16toUTF8(level).get());
     logging::Node("", root);
     if (root->GetFirstChild()) {
       level.Append(NS_LITERAL_STRING("  "));
       root = root->GetFirstChild();
--- a/accessible/base/Logging.h
+++ b/accessible/base/Logging.h
@@ -4,16 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_a11y_logs_h__
 #define mozilla_a11y_logs_h__
 
 #include "nscore.h"
 #include "nsStringFwd.h"
+#include "mozilla/Attributes.h"
 
 class nsIDocument;
 class nsINode;
 class nsIRequest;
 class nsISelection;
 class nsISupports;
 class nsIWebProgress;
 
@@ -147,30 +148,30 @@ void Tree(const char* aTitle, const char
           GetTreePrefix aPrefixFunc = nullptr, void* aGetTreePrefixData = nullptr);
 void DOMTree(const char* aTitle, const char* aMsgText, DocAccessible* aDoc);
 
 /**
  * Log the message ('title: text' format) on new line. Print the start and end
  * boundaries of the message body designated by '{' and '}' (2 spaces indent for
  * body).
  */
-void MsgBegin(const char* aTitle, const char* aMsgText, ...);
+void MsgBegin(const char* aTitle, const char* aMsgText, ...) MOZ_FORMAT_PRINTF(2, 3);
 void MsgEnd();
 
 /**
  * Print start and end boundaries of the message body designated by '{' and '}'
  * (2 spaces indent for body).
  */
 void SubMsgBegin();
 void SubMsgEnd();
 
 /**
  * Log the entry into message body (4 spaces indent).
  */
-void MsgEntry(const char* aEntryText, ...);
+void MsgEntry(const char* aEntryText, ...) MOZ_FORMAT_PRINTF(1, 2);
 
 /**
  * Log the text, two spaces offset is used.
  */
 void Text(const char* aText);
 
 /**
  * Log the accessible object address as message entry (4 spaces indent).
--- a/accessible/jsat/AccessFu.jsm
+++ b/accessible/jsat/AccessFu.jsm
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global AccessFu, Components, Utils, PrefCache, Logger, Services,
-          PointerAdapter, dump, Presentation, Rect */
 /* exported AccessFu */
 
 'use strict';
 
 const {utils: Cu, interfaces: Ci} = Components;
 
 this.EXPORTED_SYMBOLS = ['AccessFu']; // jshint ignore:line
 
--- a/accessible/jsat/EventManager.jsm
+++ b/accessible/jsat/EventManager.jsm
@@ -93,17 +93,16 @@ this.EventManager.prototype = {
     Logger.debug(() => {
       return ['DOMEvent', aEvent.type];
     });
 
     try {
       switch (aEvent.type) {
       case 'wheel':
       {
-        let attempts = 0;
         let delta = aEvent.deltaX || aEvent.deltaY;
         this.contentControl.autoMove(
          null,
          { moveMethod: delta > 0 ? 'moveNext' : 'movePrevious',
            onScreenOnly: true, noOpIfOnScreen: true, delay: 500 });
         break;
       }
       case 'scroll':
@@ -266,17 +265,16 @@ this.EventManager.prototype = {
           this._handleText(aEvent, liveRegion, isPolite);
         }
         break;
       }
       case Events.FOCUS:
       {
         // Put vc where the focus is at
         let acc = aEvent.accessible;
-        let doc = aEvent.accessibleDocument;
         this._setEditingMode(aEvent);
         if ([Roles.CHROME_WINDOW,
              Roles.DOCUMENT,
              Roles.APPLICATION].indexOf(acc.role) < 0) {
           this.contentControl.autoMove(acc);
        }
 
        if (this.inTest) {
@@ -481,17 +479,17 @@ this.EventManager.prototype = {
         liveAttrs = parseLiveAttrs(parent);
         if (liveAttrs) {
           return liveAttrs;
         }
         parent = parent.parent
       }
       return {};
     };
-    let {live, relevant, busy, atomic, memberOf} = getLiveAttributes(aEvent);
+    let {live, relevant, /* busy, atomic, memberOf */ } = getLiveAttributes(aEvent);
     // If container-live is not present or is set to |off| ignore the event.
     if (!live || live === 'off') {
       return {};
     }
     // XXX: support busy and atomic.
 
     // Determine if the type of the mutation is relevant. Default is additions
     // and text.
--- a/accessible/jsat/Gestures.jsm
+++ b/accessible/jsat/Gestures.jsm
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global Components, GestureSettings, XPCOMUtils, Utils, Promise, Logger */
 /* exported GestureSettings, GestureTracker */
 
 /******************************************************************************
   All gestures have the following pathways when being resolved(v)/rejected(x):
                Tap -> DoubleTap        (x)
                    -> Dwell            (x)
                    -> Swipe            (x)
 
--- a/accessible/jsat/OutputGenerator.jsm
+++ b/accessible/jsat/OutputGenerator.jsm
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global Components, XPCOMUtils, Utils, PrefCache, States, Roles, Logger */
 /* exported UtteranceGenerator, BrailleGenerator */
 
 'use strict';
 
 const {utils: Cu, interfaces: Ci} = Components;
 
 const INCLUDE_DESC = 0x01;
 const INCLUDE_NAME = 0x02;
--- a/accessible/jsat/PointerAdapter.jsm
+++ b/accessible/jsat/PointerAdapter.jsm
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global Components, XPCOMUtils, Utils, Logger, GestureSettings,
-   GestureTracker */
 /* exported PointerRelay, PointerAdapter */
 
 'use strict';
 
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 this.EXPORTED_SYMBOLS = ['PointerRelay', 'PointerAdapter']; // jshint ignore:line
--- a/accessible/jsat/Presentation.jsm
+++ b/accessible/jsat/Presentation.jsm
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global Components, XPCOMUtils, Utils, Logger, BraillePresenter, Presentation,
-          UtteranceGenerator, BrailleGenerator, States, Roles, PivotContext */
 /* exported Presentation */
 
 'use strict';
 
 const {utils: Cu, interfaces: Ci} = Components;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 Cu.import('resource://gre/modules/accessibility/Utils.jsm');
--- a/accessible/jsat/Traversal.jsm
+++ b/accessible/jsat/Traversal.jsm
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global PrefCache, Roles, Prefilters, States, Filters, Utils,
-   TraversalRules, Components, XPCOMUtils */
 /* exported TraversalRules, TraversalHelper */
 
 'use strict';
 
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 this.EXPORTED_SYMBOLS = ['TraversalRules', 'TraversalHelper']; // jshint ignore:line
--- a/accessible/jsat/Utils.jsm
+++ b/accessible/jsat/Utils.jsm
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global Components, XPCOMUtils, Services, PluralForm, Logger, Rect, Utils,
-          States, Relations, Roles, dump, Events, PivotContext, PrefCache */
 /* exported Utils, Logger, PivotContext, PrefCache */
 
 'use strict';
 
 const {classes: Cc, utils: Cu, interfaces: Ci} = Components;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Services', // jshint ignore:line
--- a/accessible/jsat/content-script.js
+++ b/accessible/jsat/content-script.js
@@ -1,12 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+/* eslint-env mozilla/frame-script */
+
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Logger',
   'resource://gre/modules/accessibility/Utils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Presentation',
   'resource://gre/modules/accessibility/Presentation.jsm');
--- a/accessible/tests/browser/.eslintrc.js
+++ b/accessible/tests/browser/.eslintrc.js
@@ -1,190 +1,100 @@
 "use strict";
 
-module.exports = { // eslint-disable-line no-undef
+module.exports = {
   "extends": [
     "plugin:mozilla/browser-test"
   ],
-  // All globals made available in the test environment.
-  "globals": {
-    // Content scripts have global 'content' object
-    "content": true,
-
-    "add_task": true,
-
-    // Defined in accessible/tests/mochitest/ common.js, name.js, states.js
-    "prettyName": true,
-    "statesToString": true,
-    "eventTypeToString": true,
-    "testAttrs": true,
-    "testAbsentAttrs": true,
-    "testName": true,
-    "testDescr": true,
-    "testStates": true,
-    "testRelation": true,
-    "testValue": true,
-    "testAccessibleTree": true,
-    "isAccessible": true,
-    "getAccessibleDOMNodeID": true,
-
-    // Defined for all top level accessibility browser tests.
-    "setE10sPrefs": true,
-    "unsetE10sPrefs": true,
-    "initPromise": true,
-    "shutdownPromise": true,
-    "forceGC": true,
-
-    // Defined for all e10s accessibility browser tests.
-    "addAccessibleTask": true,
-    "BrowserTestUtils": true,
-    "ContentTask": true,
-    "gBrowser": true,
-    "isDefunct": true,
-    "loadScripts": true,
-    "loadFrameScripts": true,
-    "Logger": true,
-    "MOCHITESTS_DIR": true,
-    "waitForEvent": true,
-    "waitForMultipleEvents": true,
-    "invokeSetAttribute": true,
-    "invokeSetStyle": true,
-    "invokeFocus": true,
-    "findAccessibleChildByID": true
-  },
   "rules": {
-    "mozilla/no-aArgs": "warn",
-    "mozilla/no-cpows-in-tests": "warn",
-    "mozilla/reject-importGlobalProperties": "warn",
-    "mozilla/var-only-at-top-level": "warn",
+    "mozilla/no-aArgs": "error",
+    "mozilla/no-cpows-in-tests": "error",
+    "mozilla/reject-importGlobalProperties": "error",
+    "mozilla/var-only-at-top-level": "error",
 
     "block-scoped-var": "error",
-    "brace-style": ["error", "1tbs"],
     "camelcase": "error",
     "comma-dangle": ["error", "never"],
-    "comma-spacing": "error",
     "comma-style": ["error", "last"],
     "complexity": ["error", 20],
     "consistent-this": "off",
     "curly": ["error", "multi-line"],
     "default-case": "off",
     "dot-location": ["error", "property"],
     "dot-notation": "error",
-    "eol-last": "error",
     "eqeqeq": "off",
-    "func-call-spacing": "error",
     "func-names": "off",
     "func-style": "off",
-    "generator-star": "off",
-    "global-strict": "off",
+    "generator-star-spacing": "off",
     "handle-callback-err": ["error", "er"],
     "indent": ["error", 2, {"SwitchCase": 1}],
-    "key-spacing": ["error", {"beforeColon": false, "afterColon": true}],
-    "linebreak-style": "off",
-    "max-depth": "off",
     "max-nested-callbacks": ["error", 4],
     "max-params": "off",
     "max-statements": "off",
     "new-cap": ["error", {"capIsNew": false}],
     "new-parens": "error",
     "no-array-constructor": "error",
     "no-bitwise": "off",
     "no-caller": "error",
     "no-catch-shadow": "error",
     "no-comma-dangle": "off",
-    "no-cond-assign": "error",
     "no-console": "off",
     "no-constant-condition": "off",
     "no-continue": "off",
     "no-control-regex": "error",
-    "no-debugger": "error",
-    "no-delete-var": "error",
     "no-div-regex": "off",
-    "no-dupe-args": "error",
-    "no-dupe-keys": "error",
-    "no-duplicate-case": "error",
-    "no-else-return": "error",
-    "no-empty": "error",
-    "no-empty-character-class": "error",
     "no-eval": "error",
-    "no-ex-assign": "error",
     "no-extend-native": "error",
-    "no-extra-bind": "error",
-    "no-extra-boolean-cast": "error",
     "no-extra-parens": "off",
     "no-extra-semi": "error",
     "no-extra-strict": "off",
     "no-fallthrough": "error",
     "no-floating-decimal": "off",
     "no-inline-comments": "off",
-    "no-lonely-if": "error",
     "no-mixed-requires": "off",
-    "no-mixed-spaces-and-tabs": "error",
-    "no-multi-spaces": "error",
     "no-multi-str": "error",
     "no-multiple-empty-lines": ["error", {"max": 1}],
-    "no-native-reassign": "error",
-    "no-nested-ternary": "error",
     "no-new-require": "off",
-    "no-octal": "error",
     "no-param-reassign": "off",
     "no-path-concat": "off",
     "no-plusplus": "off",
     "no-process-env": "off",
     "no-process-exit": "off",
     "no-proto": "error",
-    "no-redeclare": "error",
-    "no-regex-spaces": "error",
     "no-reserved-keys": "off",
     "no-restricted-modules": "off",
     "no-return-assign": "error",
     "no-script-url": "off",
-    "no-self-compare": "error",
     "no-sequences": "error",
     "no-shadow": "error",
-    "no-shadow-restricted-names": "error",
     "no-space-before-semi": "off",
     "no-sparse-arrays": "error",
     "no-sync": "off",
     "no-ternary": "off",
     "no-throw-literal": "error",
-    "no-trailing-spaces": "error",
-    "no-undef": "error",
     "no-underscore-dangle": "off",
     "no-undefined": "off",
     "no-unneeded-ternary": "error",
-    "no-unreachable": "error",
     "no-unused-vars": ["error", {"vars": "all", "args": "none"}],
     "no-use-before-define": "off",
     "no-var": "off",
     "no-warning-comments": "off",
-    "no-with": "error",
     "object-shorthand": "off",
     "one-var": ["error", "never"],
     "padded-blocks": ["error", "never"],
     "quote-props": "off",
     "radix": "error",
     "semi": ["error", "always"],
     "semi-spacing": ["error", {"before": false, "after": true}],
     "sort-vars": "off",
-    "space-after-function-name": "off",
-    "keyword-spacing": "error",
-    "space-before-blocks": "error",
-    "space-before-function-parentheses": "off",
-    "space-before-function-paren": ["error", "never"],
     "space-in-brackets": "off",
     "space-in-parens": ["error", "never"],
-    "space-infix-ops": ["error", {"int32Hint": true}],
-    "space-unary-ops": ["error", { "words": true, "nonwords": false }],
     "space-unary-word-ops": "off",
-    "spaced-comment": ["error", "always"],
     "strict": ["error", "global"],
-    "use-isnan": "error",
     "valid-jsdoc": "off",
-    "valid-typeof": "error",
     "vars-on-top": "off",
     "wrap-iife": "off",
     "wrap-regex": "off",
     "yoda": "error",
 
     "guard-for-in": "off",
     "newline-after-var": "off",
     "no-alert": "off",
--- a/accessible/tests/browser/e10s/browser_caching_attributes.js
+++ b/accessible/tests/browser/e10s/browser_caching_attributes.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_FOCUS */
-
+/* import-globals-from ../../mochitest/attributes.js */
 loadScripts({ name: 'attributes.js', dir: MOCHITESTS_DIR });
 
 /**
  * Default textbox accessible attributes.
  */
 const defaultAttributes = {
   'margin-top': '0px',
   'margin-right': '0px',
--- a/accessible/tests/browser/e10s/browser_caching_description.js
+++ b/accessible/tests/browser/e10s/browser_caching_description.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_DESCRIPTION_CHANGE, EVENT_NAME_CHANGE, EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/name.js */
 loadScripts({ name: 'name.js', dir: MOCHITESTS_DIR });
 
 /**
  * Test data has the format of:
  * {
  *   desc      {String}   description for better logging
  *   expected  {String}   expected description value for a given accessible
  *   attrs     {?Array}   an optional list of attributes to update
--- a/accessible/tests/browser/e10s/browser_caching_name.js
+++ b/accessible/tests/browser/e10s/browser_caching_name.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER, EVENT_TEXT_INSERTED */
-
+/* import-globals-from ../../mochitest/name.js */
 loadScripts({ name: 'name.js', dir: MOCHITESTS_DIR });
 
 /**
  * Rules for name tests that are inspired by
  *   accessible/tests/mochitest/name/markuprules.xul
  *
  * Each element in the list of rules represents a name calculation rule for a
  * particular test case.
--- a/accessible/tests/browser/e10s/browser_caching_relations.js
+++ b/accessible/tests/browser/e10s/browser_caching_relations.js
@@ -1,18 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global RELATION_LABELLED_BY, RELATION_LABEL_FOR, RELATION_DESCRIBED_BY,
-          RELATION_DESCRIPTION_FOR, RELATION_CONTROLLER_FOR,
-          RELATION_CONTROLLED_BY, RELATION_FLOWS_TO, RELATION_FLOWS_FROM */
-
+/* import-globals-from ../../mochitest/relations.js */
 loadScripts({ name: 'relations.js', dir: MOCHITESTS_DIR });
 
 /**
  * A test specification that has the following format:
  * [
  *   attr                 relevant aria attribute
  *   hostRelation         corresponding host relation type
  *   dependantRelation    corresponding dependant relation type
--- a/accessible/tests/browser/e10s/browser_caching_states.js
+++ b/accessible/tests/browser/e10s/browser_caching_states.js
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_STATE_CHANGE, STATE_CHECKED, STATE_BUSY, STATE_REQUIRED,
-          STATE_INVALID, EXT_STATE_ENABLED */
-
+/* import-globals-from ../../mochitest/role.js */
+/* import-globals-from ../../mochitest/states.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR },
             { name: 'states.js', dir: MOCHITESTS_DIR });
 
 /**
  * Test data has the format of:
  * {
  *   desc      {String}   description for better logging
  *   expected  {Array}    expected states for a given accessible that have the
--- a/accessible/tests/browser/e10s/browser_caching_value.js
+++ b/accessible/tests/browser/e10s/browser_caching_value.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global nsIAccessibleValue, EVENT_VALUE_CHANGE, EVENT_TEXT_VALUE_CHANGE */
-
+/* import-globals-from ../../mochitest/value.js */
 loadScripts({ name: 'value.js', dir: MOCHITESTS_DIR });
 
 /**
  * Test data has the format of:
  * {
  *   desc      {String}       description for better logging
  *   id        {String}       given accessible DOMNode ID
  *   expected  {String}       expected value for a given accessible
--- a/accessible/tests/browser/e10s/browser_events_caretmove.js
+++ b/accessible/tests/browser/e10s/browser_events_caretmove.js
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global EVENT_TEXT_CARET_MOVED, nsIAccessibleCaretMoveEvent */
-
 'use strict';
 
 /**
  * Test caret move event and its interface:
  *   - caretOffset
  */
 addAccessibleTask('<input id="textbox" value="hello"/>', function*(browser) {
   let onCaretMoved = waitForEvent(EVENT_TEXT_CARET_MOVED, 'textbox');
--- a/accessible/tests/browser/e10s/browser_events_hide.js
+++ b/accessible/tests/browser/e10s/browser_events_hide.js
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global EVENT_HIDE */
-
 'use strict';
 
 /**
  * Test hide event and its interface:
  *   - targetParent
  *   - targetNextSibling
  *   - targetPrevSibling
  */
--- a/accessible/tests/browser/e10s/browser_events_show.js
+++ b/accessible/tests/browser/e10s/browser_events_show.js
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global EVENT_SHOW */
-
 'use strict';
 
 /**
  * Test show event
  */
 addAccessibleTask('<div id="div" style="visibility: hidden;"></div>',
   function*(browser) {
     let onShow = waitForEvent(EVENT_SHOW, 'div');
--- a/accessible/tests/browser/e10s/browser_events_statechange.js
+++ b/accessible/tests/browser/e10s/browser_events_statechange.js
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global STATE_CHECKED, EXT_STATE_EDITABLE, nsIAccessibleStateChangeEvent,
-          EVENT_STATE_CHANGE */
-
 'use strict';
 
+/* import-globals-from ../../mochitest/role.js */
+/* import-globals-from ../../mochitest/states.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR },
             { name: 'states.js', dir: MOCHITESTS_DIR });
 
 function checkStateChangeEvent(event, state, isExtraState, isEnabled) {
   let scEvent = event.QueryInterface(nsIAccessibleStateChangeEvent);
   is(scEvent.state, state, 'Correct state of the statechange event.');
   is(scEvent.isExtraState, isExtraState,
     'Correct extra state bit of the statechange event.');
--- a/accessible/tests/browser/e10s/browser_events_textchange.js
+++ b/accessible/tests/browser/e10s/browser_events_textchange.js
@@ -1,15 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global EVENT_TEXT_INSERTED, EVENT_TEXT_REMOVED,
-          nsIAccessibleTextChangeEvent */
-
 'use strict';
 
 function checkTextChangeEvent(event, id, text, start, end, isInserted, isFromUserInput) {
   let tcEvent = event.QueryInterface(nsIAccessibleTextChangeEvent);
   is(tcEvent.start, start, `Correct start offset for ${prettyName(id)}`);
   is(tcEvent.length, end - start, `Correct length for ${prettyName(id)}`);
   is(tcEvent.isInserted, isInserted,
     `Correct isInserted flag for ${prettyName(id)}`);
--- a/accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_SHOW, ROLE_DIALOG, ROLE_PUSHBUTTON, ROLE_TEXT_LEAF, ROLE_ENTRY,
-          ROLE_DOCUMENT */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 // Test ARIA Dialog
 addAccessibleTask('doc_treeupdate_ariadialog.html', function*(browser, accDoc) {
   testAccessibleTree(accDoc, {
     role: ROLE_DOCUMENT,
     children: [ ]
   });
--- a/accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 function* testContainer1(browser, accDoc) {
   const id = 't1_container';
   const docID = getAccessibleDOMNodeID(accDoc);
   const acc = findAccessibleChildByID(accDoc, id);
 
   /* ================= Initial tree test ==================================== */
--- a/accessible/tests/browser/e10s/browser_treeupdate_canvas.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_canvas.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_SHOW */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask(`
   <canvas id="canvas">
     <div id="dialog" role="dialog" style="display: none;"></div>
   </canvas>`, function*(browser, accDoc) {
   let canvas = findAccessibleChildByID(accDoc, 'canvas');
   let dialog = findAccessibleChildByID(accDoc, 'dialog');
--- a/accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask(`
   <div id="container"><div id="scrollarea" style="overflow:auto;"><input>
   </div></div>
   <div id="container2"><div id="scrollarea2" style="overflow:hidden;">
   </div></div>`, function*(browser, accDoc) {
   const id1 = 'container';
--- a/accessible/tests/browser/e10s/browser_treeupdate_doc.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_doc.js
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global ROLE_PUSHBUTTON, ROLE_TEXT_LEAF, EVENT_REORDER, ROLE_DOCUMENT,
-          nsIAccessibleDocument */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 const iframeSrc = `data:text/html,
   <html>
     <head>
       <meta charset='utf-8'/>
       <title>Inner Iframe</title>
     </head>
--- a/accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask(`
   <style>
     .gentext:before {
       content: "START"
     }
     .gentext:after {
--- a/accessible/tests/browser/e10s/browser_treeupdate_hidden.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_hidden.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 function* setHidden(browser, value) {
   let onReorder = waitForEvent(EVENT_REORDER, 'container');
   yield invokeSetAttribute(browser, 'child', 'hidden', value);
   yield onReorder;
 }
 
--- a/accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER, ROLE_LINK */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 function* testImageMap(browser, accDoc) {
   const id = 'imgmap';
   const acc = findAccessibleChildByID(accDoc, id);
 
   /* ================= Initial tree test ==================================== */
   let tree = {
--- a/accessible/tests/browser/e10s/browser_treeupdate_list.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_list.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global ROLE_TEXT_LEAF, EVENT_REORDER, ROLE_STATICTEXT, ROLE_LISTITEM */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 function* setDisplayAndWaitForReorder(browser, value) {
   let onReorder = waitForEvent(EVENT_REORDER, 'ul');
   yield invokeSetStyle(browser, 'li', 'display', value);
   return yield onReorder;
 }
 
--- a/accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global ROLE_TEXT_LEAF, EVENT_REORDER, ROLE_LISTITEM, ROLE_LIST,
-          ROLE_STATICTEXT */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask('<ol id="list"></ol>', function*(browser, accDoc) {
   let list = findAccessibleChildByID(accDoc, 'list');
 
   testAccessibleTree(list, {
     role: ROLE_LIST,
     children: [ ]
--- a/accessible/tests/browser/e10s/browser_treeupdate_listener.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_listener.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask('<span id="parent"><span id="child"></span></span>',
   function*(browser, accDoc) {
     is(findAccessibleChildByID(accDoc, 'parent'), null,
       'Check that parent is not accessible.');
     is(findAccessibleChildByID(accDoc, 'child'), null,
       'Check that child is not accessible.');
--- a/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask('<select id="select"></select>', function*(browser, accDoc) {
   let select = findAccessibleChildByID(accDoc, 'select');
 
   let onEvent = waitForEvent(EVENT_REORDER, 'select');
   // Create a combobox with grouping and 2 standalone options
   yield ContentTask.spawn(browser, {}, () => {
--- a/accessible/tests/browser/e10s/browser_treeupdate_removal.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_removal.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask('doc_treeupdate_removal.xhtml', function*(browser, accDoc) {
   ok(isAccessible(findAccessibleChildByID(accDoc, 'the_table')),
     'table should be accessible');
 
   // Move the_table element into hidden subtree.
   let onReorder = waitForEvent(EVENT_REORDER, 'body');
--- a/accessible/tests/browser/e10s/browser_treeupdate_table.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_table.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask(`
   <table id="table">
     <tr>
       <td>cell1</td>
       <td>cell2</td>
     </tr>
--- a/accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER, ROLE_TEXT_CONTAINER ROLE_PARAGRAPH, ROLE_TEXT_LEAF */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 function* removeTextData(browser, accessible, id, role) {
   let tree = {
     role: role,
     children: [ { role: ROLE_TEXT_LEAF, name: "text" } ]
   };
   testAccessibleTree(accessible, tree);
--- a/accessible/tests/browser/e10s/browser_treeupdate_visibility.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_visibility.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 function* testTreeOnHide(browser, accDoc, containerID, id, before, after) {
   let acc = findAccessibleChildByID(accDoc, containerID);
   testAccessibleTree(acc, before);
 
   let onReorder = waitForEvent(EVENT_REORDER, containerID);
   yield invokeSetStyle(browser, id, 'visibility', 'hidden');
--- a/accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_REORDER */
-
+/* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR });
 
 addAccessibleTask('doc_treeupdate_whitespace.html', function*(browser, accDoc) {
   let container1 = findAccessibleChildByID(accDoc, 'container1');
   let container2Parent = findAccessibleChildByID(accDoc, 'container2-parent');
 
   let tree = {
     SECTION: [
--- a/accessible/tests/browser/e10s/events.js
+++ b/accessible/tests/browser/e10s/events.js
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global nsIAccessibleEvent, nsIAccessibleDocument,
-          nsIAccessibleStateChangeEvent, nsIAccessibleTextChangeEvent */
+// This is loaded by head.js, so has the same globals, hence we import the
+// globals from there.
+/* import-globals-from head.js */
 
 /* exported EVENT_REORDER, EVENT_SHOW, EVENT_TEXT_INSERTED, EVENT_TEXT_REMOVED,
             EVENT_DOCUMENT_LOAD_COMPLETE, EVENT_HIDE, EVENT_TEXT_CARET_MOVED,
             EVENT_DESCRIPTION_CHANGE, EVENT_NAME_CHANGE, EVENT_STATE_CHANGE,
             EVENT_VALUE_CHANGE, EVENT_TEXT_VALUE_CHANGE, EVENT_FOCUS,
             waitForEvent, waitForMultipleEvents */
 
 const EVENT_DOCUMENT_LOAD_COMPLETE = nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE;
--- a/accessible/tests/browser/e10s/head.js
+++ b/accessible/tests/browser/e10s/head.js
@@ -1,19 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* global EVENT_DOCUMENT_LOAD_COMPLETE, CURRENT_CONTENT_DIR, loadFrameScripts */
-
-/* exported addAccessibleTask */
+/* exported addAccessibleTask, findAccessibleChildByID, isDefunct */
 
 // Load the shared-head file first.
+/* import-globals-from ../shared-head.js */
 Services.scriptloader.loadSubScript(
   'chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js',
   this);
 
 /**
  * A wrapper around browser test add_task that triggers an accessible test task
  * as a new browser test task with given document, data URL or markup snippet.
  * @param  {String}             doc    URL (relative to current directory) or
@@ -74,11 +73,53 @@ function addAccessibleTask(doc, task) {
       Logger.log(`Actually remote browser: ${browser.isRemoteBrowser}`);
 
       let event = yield onDocLoad;
       yield task(browser, event.accessible);
     });
   });
 }
 
+/**
+ * Check if an accessible object has a defunct test.
+ * @param  {nsIAccessible}  accessible object to test defunct state for
+ * @return {Boolean}        flag indicating defunct state
+ */
+function isDefunct(accessible) {
+  let defunct = false;
+  try {
+    let extState = {};
+    accessible.getState({}, extState);
+    defunct = extState.value & Ci.nsIAccessibleStates.EXT_STATE_DEFUNCT;
+  } catch (x) {
+    defunct = true;
+  } finally {
+    if (defunct) {
+      Logger.log(`Defunct accessible: ${prettyName(accessible)}`);
+    }
+  }
+  return defunct;
+}
+
+/**
+ * Traverses the accessible tree starting from a given accessible as a root and
+ * looks for an accessible that matches based on its DOMNode id.
+ * @param  {nsIAccessible}  accessible root accessible
+ * @param  {String}         id         id to look up accessible for
+ * @return {nsIAccessible?}            found accessible if any
+ */
+function findAccessibleChildByID(accessible, id) {
+  if (getAccessibleDOMNodeID(accessible) === id) {
+    return accessible;
+  }
+  for (let i = 0; i < accessible.children.length; ++i) {
+    let found = findAccessibleChildByID(accessible.getChildAt(i), id);
+    if (found) {
+      return found;
+    }
+  }
+}
+
 // Loading and common.js from accessible/tests/mochitest/ for all tests, as
 // well as events.js.
+/* import-globals-from ../../mochitest/common.js */
+/* import-globals-from events.js */
 loadScripts({ name: 'common.js', dir: MOCHITESTS_DIR }, 'e10s/events.js');
--- a/accessible/tests/browser/head.js
+++ b/accessible/tests/browser/head.js
@@ -28,16 +28,17 @@ function setE10sPrefs() {
  */
 function unsetE10sPrefs() {
   return new Promise(resolve => {
     SpecialPowers.popPrefEnv(resolve);
   });
 }
 
 // Load the shared-head file first.
+/* import-globals-from shared-head.js */
 Services.scriptloader.loadSubScript(
   'chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js',
   this);
 
 /**
  * Returns a promise that resolves when 'a11y-init-or-shutdown' event is fired.
  * @return {Promise} event promise evaluating to event's data
  */
--- a/accessible/tests/browser/shared-head.js
+++ b/accessible/tests/browser/shared-head.js
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
-/* exported Logger, MOCHITESTS_DIR, isDefunct, invokeSetAttribute, invokeFocus,
-            invokeSetStyle, findAccessibleChildByID, getAccessibleDOMNodeID,
+/* exported Logger, MOCHITESTS_DIR, invokeSetAttribute, invokeFocus,
+            invokeSetStyle, getAccessibleDOMNodeID,
             CURRENT_CONTENT_DIR, loadScripts, loadFrameScripts, Cc, Cu */
 
 const { interfaces: Ci, utils: Cu, classes: Cc } = Components;
 
 /**
  * Current browser test directory path used to load subscripts.
  */
 const CURRENT_DIR =
@@ -73,37 +73,16 @@ let Logger = {
   logToAppConsole(msg) {
     if (this.dumpToAppConsole) {
       Services.console.logStringMessage(`${msg}`);
     }
   }
 };
 
 /**
- * Check if an accessible object has a defunct test.
- * @param  {nsIAccessible}  accessible object to test defunct state for
- * @return {Boolean}        flag indicating defunct state
- */
-function isDefunct(accessible) {
-  let defunct = false;
-  try {
-    let extState = {};
-    accessible.getState({}, extState);
-    defunct = extState.value & Ci.nsIAccessibleStates.EXT_STATE_DEFUNCT;
-  } catch (x) {
-    defunct = true;
-  } finally {
-    if (defunct) {
-      Logger.log(`Defunct accessible: ${prettyName(accessible)}`);
-    }
-  }
-  return defunct;
-}
-
-/**
  * Asynchronously set or remove content element's attribute (in content process
  * if e10s is enabled).
  * @param  {Object}  browser  current "tabbrowser" element
  * @param  {String}  id       content element id
  * @param  {String}  attr     attribute name
  * @param  {String?} value    optional attribute value, if not present, remove
  *                            attribute
  * @return {Promise}          promise indicating that attribute is set/removed
@@ -167,35 +146,16 @@ function invokeFocus(browser, id) {
         elm instanceof Ci.nsIDOMXULTextBoxElement) {
       elm.selectionStart = elm.selectionEnd = elm.value.length;
     }
     elm.focus();
   });
 }
 
 /**
- * Traverses the accessible tree starting from a given accessible as a root and
- * looks for an accessible that matches based on its DOMNode id.
- * @param  {nsIAccessible}  accessible root accessible
- * @param  {String}         id         id to look up accessible for
- * @return {nsIAccessible?}            found accessible if any
- */
-function findAccessibleChildByID(accessible, id) {
-  if (getAccessibleDOMNodeID(accessible) === id) {
-    return accessible;
-  }
-  for (let i = 0; i < accessible.children.length; ++i) {
-    let found = findAccessibleChildByID(accessible.getChildAt(i), id);
-    if (found) {
-      return found;
-    }
-  }
-}
-
-/**
  * Load a list of scripts into the test
  * @param {Array} scripts  a list of scripts to load
  */
 function loadScripts(...scripts) {
   for (let script of scripts) {
     let path = typeof script === 'string' ? `${CURRENT_DIR}${script}` :
       `${script.dir}${script.name}`;
     Services.scriptloader.loadSubScript(path, this);
new file mode 100644
--- /dev/null
+++ b/accessible/tests/crashtests/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "plugin:mozilla/mochitest-test"
+  ],
+};
--- a/accessible/tests/crashtests/448064.xhtml
+++ b/accessible/tests/crashtests/448064.xhtml
@@ -15,56 +15,56 @@
 </div>
 
 <input id="mw_a"/>
 
 
 <script>
 function dumpAccessibleNode(aNode, level) {
 	var msg = "";
-	
+
 	try {
 		msg += "name=\"" + aNode.name + "\" ";
 	} catch (e) {
 		msg += " noName ";
 	}
-	
+
 	dump(msg + '\n');
 }
 
 
 function dumpAccessibleTree(aNode, level) {
 	level = level || 0;
 
 	dumpAccessibleNode(aNode, level);
-	try {	
+	try {
 		var child = aNode.firstChild;
 		while (child) {
 			dumpAccessibleTree(child, level + 1);
 			child = child.nextSibling;
 		}
 	} catch (e) {
 		dump("Error visiting child nodes: " + e + '\n');
 	}
 }
 
-function A(o) { 
+function A(o) {
   var acc = SpecialPowers.Cc['@mozilla.org/accessibilityService;1']
                          .getService(SpecialPowers.Ci.nsIAccessibilityService);
   return acc.getAccessibleFor(o);
 }
 
 function beginAccessible() {
-  dumpAccessibleTree(A(document),0);
+  dumpAccessibleTree(A(document), 0);
 }
 setTimeout(beginAccessible, 100);
 
 
 setTimeout(doe, 200);
 function doe() {
    document.getElementById('mw_a').appendChild(document.getElementById('mw_b'));
    document.getElementById('mw_c').appendChild(document.getElementById('mw_d'));
-   document.getElementById('mw_e').appendChild(document.getElementById('mw_f')); 
-   document.getElementById('mw_g').appendChild(document.getElementById('mw_b')); 
+   document.getElementById('mw_e').appendChild(document.getElementById('mw_f'));
+   document.getElementById('mw_g').appendChild(document.getElementById('mw_b'));
 }
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
new file mode 100644
--- /dev/null
+++ b/accessible/tests/mochitest/.eslintrc.js
@@ -0,0 +1,24 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "plugin:mozilla/mochitest-test"
+  ],
+  "rules": {
+    "mozilla/no-cpows-in-tests": "error",
+    "mozilla/reject-importGlobalProperties": "error",
+
+    // XXX These are rules that are enabled in the recommended configuration, but
+    // disabled here due to failures when initially implemented. They should be
+    // removed (and hence enabled) at some stage.
+    "comma-spacing": "off",
+    "no-cond-assign": "off",
+    "no-lonely-if": "off",
+    "no-nested-ternary": "off",
+    "no-new-object": "off",
+    "no-redeclare": "off",
+    "no-shadow": "off",
+    "no-undef": "off",
+    "space-unary-ops": "off",
+  }
+};
--- a/accessible/tests/mochitest/actions.js
+++ b/accessible/tests/mochitest/actions.js
@@ -36,17 +36,17 @@ const XUL_EVENTS = CLICK_EVENTS | COMMAN
  *    get targetID() {},
  *
  *    // [optional] perform checks when 'click' event is handled if 'events'
  *    // is used.
  *    checkOnClickEvent: function() {},
  *
  *    // [optional] an array of invoker's checker objects (see eventQueue
  *    // constructor events.js)
- *    get eventSeq() {} 
+ *    get eventSeq() {}
  *  };
  *
  *
  * @param  aArray [in] an array of action cheker objects
  */
 function testActions(aArray)
 {
   gActionsQueue = new eventQueue();
@@ -129,17 +129,17 @@ function actionInvoker(aAccOrElmOrId, aA
       return INVOKER_ACTION_FAILED;
 
     is(acc.getActionName(aActionIndex), aActionName,
        "Wrong action name of the accessible for " + prettyName(aAccOrElmOrId));
 
     try {
       acc.doAction(aActionIndex);
     }
-    catch (e){
+    catch (e) {
       ok(false, "doAction(" + aActionIndex + ") failed with: " + e.name);
       return INVOKER_ACTION_FAILED;
     }
   }
 
   this.eventSeq = aEventSeq;
 
   this.getID = function actionInvoker_getID()
--- a/accessible/tests/mochitest/actions/test_media.html
+++ b/accessible/tests/mochitest/actions/test_media.html
@@ -59,17 +59,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     {
       //////////////////////////////////////////////////////////////////////////
       // test actions of audio controls
 
       todo(false, "Focus test are disabled until bug 494175 is fixed.");
 
       var audioElm = getAccessible("audio");
       var playBtn = audioElm.firstChild;
-      var scrubber = playBtn.nextSibling.nextSibling.nextSibling;
+      // var scrubber = playBtn.nextSibling.nextSibling.nextSibling;
       var muteBtn = audioElm.lastChild.previousSibling;
 
       var actions = [
         {
           ID: muteBtn,
           actionName: "press",
           events: CLICK_EVENTS,
           eventSeq: [
--- a/accessible/tests/mochitest/editabletext/editabletext.js
+++ b/accessible/tests/mochitest/editabletext/editabletext.js
@@ -128,17 +128,17 @@ function editableTextTest(aID)
     function copyNPasteTextInvoke()
     {
       var acc = getAccessible(aID, nsIAccessibleEditableText);
       acc.copyText(aStartPos, aEndPos);
       acc.pasteText(aPos);
     }
 
     this.generateTest(aID, null, [aStartPos, aEndPos, getTextFromClipboard],
-                      copyNPasteInvoke, getValueChecker(aID, aResStr), testID);
+                      copyNPasteTextInvoke, getValueChecker(aID, aResStr), testID);
   }
 
   /**
    * cutText test.
    */
   this.cutText = function cutText(aStartPos, aEndPos, aResStr,
                                   aResStartPos, aResEndPos)
   {
@@ -217,17 +217,16 @@ function editableTextTest(aID)
                       getValueChecker(aID, aResStr), testID);
   }
 
   //////////////////////////////////////////////////////////////////////////////
   // Implementation details.
 
   function getValue(aID)
   {
-    var value = "";
     var elm = getNode(aID);
     if (elm instanceof Components.interfaces.nsIDOMNSEditableElement)
       return elm.value;
 
     if (elm instanceof Components.interfaces.nsIDOMHTMLDocument)
       return elm.body.textContent;
 
     return elm.textContent;
@@ -253,31 +252,16 @@ function editableTextTest(aID)
       check: function clipboardChecker_check()
       {
         is(getTextFromClipboard(), aText, "Wrong text in clipboard.");
       }
     };
     return checker;
   }
 
-  function getValueNClipboardChecker(aID, aValue, aText)
-  {
-    var valueChecker = getValueChecker(aID, aValue);
-    var clipboardChecker = getClipboardChecker(aID, aText);
-
-    var checker = {
-      check: function()
-      {
-        valueChecker.check();
-        clipboardChecker.check();
-      }
-    };
-    return checker;
-  }
-
   /**
    * Process next scheduled test.
    */
   this.unwrapNextTest = function unwrapNextTest()
   {
     var data = this.mEventQueue.mInvokers[this.mEventQueue.mIndex + 1];
     if (data)
       data.func.apply(this, data.funcArgs);
@@ -345,9 +329,8 @@ function editableTextTest(aID)
     }
 
     this.mEventQueue.invoke();
   }
 
   this.mEventQueue = new eventQueue();
   this.mEventQueueReady = false;
 }
-
--- a/accessible/tests/mochitest/elm/test_canvas.html
+++ b/accessible/tests/mochitest/elm/test_canvas.html
@@ -24,17 +24,17 @@
       var canv = document.getElementById("c");
       var context = canv.getContext('2d');
       var element = document.getElementById("showA");
       context.beginPath();
       context.rect(kX, kY, kWidth, kHeight);
       context.addHitRegion({control: element});
 
       var input = getAccessible("showA");
-      var [cnvX, cnvY, cnvWidth, cnvHeight] = getBoundsForDOMElm(canv);
+      var [cnvX, cnvY, /*cnvWidth*/, /*cnvHeight*/] = getBoundsForDOMElm(canv);
       var [accX, accY, accWidth, accHeight] = getBounds(input);
 
       var [x, y, w, h] = CSSToDevicePixels(window, kX, kY, kWidth, kHeight);
       is(accX, cnvX + x, "wrong accX");
       is(accY, cnvY + y, "wrong accY");
       is(accWidth, w, "wrong accWidth");
       is(accHeight, h, "wrong accHeight");
 
--- a/accessible/tests/mochitest/events.js
+++ b/accessible/tests/mochitest/events.js
@@ -500,17 +500,17 @@ function eventQueue(aEventType)
           checker.wasCaught++;
           continue;
         }
 
         // Report an error if we hanlded not expected event of unique type
         // (i.e. event types are matched, targets differs).
         if (!checker.unexpected && checker.unique &&
             eventQueue.compareEventTypes(checker, aEvent)) {
-          var isExppected = false;
+          var isExpected = false;
           for (var jdx = 0; jdx < eventSeq.length; jdx++) {
             isExpected = eventQueue.compareEvents(eventSeq[jdx], aEvent);
             if (isExpected)
               break;
           }
 
           if (!isExpected) {
             ok(false,
@@ -964,17 +964,17 @@ eventQueue.logEvent = function eventQueu
     gLogger.logToDOM(info);
   }
 
   var infoMsg = "unhandled expected events: " + aAreExpectedEventsLeft +
     ", "  + eventQueue.invokerStatusToMsg(aInvokerStatus);
 
   var currType = eventQueue.getEventTypeAsString(aMatchedChecker);
   var currTargetDescr = eventQueue.getEventTargetDescr(aMatchedChecker);
-  var consoleMsg = "*****\nScenario " + aScenarioIdx + 
+  var consoleMsg = "*****\nScenario " + aScenarioIdx +
     ", event " + aEventIdx + " matched: " + currType + "\n" + infoMsg + "\n*****";
   gLogger.logToConsole(consoleMsg);
 
   var emphText = "matched ";
   var msg = "EQ event, type: " + currType + ", target: " + currTargetDescr +
     ", " + infoMsg;
   gLogger.logToDOM(msg, true, emphText);
 }
@@ -1310,18 +1310,18 @@ function synthFocus(aNodeOrID, aCheckerO
     if (this.DOMNode instanceof Components.interfaces.nsIDOMNSEditableElement &&
         this.DOMNode.editor ||
         this.DOMNode instanceof Components.interfaces.nsIDOMXULTextBoxElement) {
       this.DOMNode.selectionStart = this.DOMNode.selectionEnd = this.DOMNode.value.length;
     }
     this.DOMNode.focus();
   }
 
-  this.getID = function synthFocus_getID() 
-  { 
+  this.getID = function synthFocus_getID()
+  {
     return prettyName(aNodeOrID) + " focus";
   }
 }
 
 /**
  * Focus invoker. Focus the HTML body of content document of iframe.
  */
 function synthFocusOnFrame(aNodeOrID, aCheckerOrEventSeq)
@@ -1331,18 +1331,18 @@ function synthFocusOnFrame(aNodeOrID, aC
     aCheckerOrEventSeq ? aCheckerOrEventSeq : new focusChecker(frameDoc);
   this.__proto__ = new synthAction(frameDoc, checkerOrEventSeq);
 
   this.invoke = function synthFocus_invoke()
   {
     this.DOMNode.body.focus();
   }
 
-  this.getID = function synthFocus_getID() 
-  { 
+  this.getID = function synthFocus_getID()
+  {
     return prettyName(aNodeOrID) + " frame document focus";
   }
 }
 
 /**
  * Change the current item when the widget doesn't have a focus.
  */
 function changeCurrentItem(aID, aItemID)
@@ -1986,17 +1986,17 @@ function selChangeSeq(aUnselectedID, aSe
   if (!aUnselectedID) {
     return [
       new stateChangeChecker(STATE_SELECTED, false, true, aSelectedID),
       new invokerChecker(EVENT_SELECTION, aSelectedID)
     ];
   }
 
   // Return two possible scenarios: depending on widget type when selection is
-  // moved the the order of items that get selected and unselected may vary. 
+  // moved the the order of items that get selected and unselected may vary.
   return [
     [
       new stateChangeChecker(STATE_SELECTED, false, false, aUnselectedID),
       new stateChangeChecker(STATE_SELECTED, false, true, aSelectedID),
       new invokerChecker(EVENT_SELECTION, aSelectedID)
     ],
     [
       new stateChangeChecker(STATE_SELECTED, false, true, aSelectedID),
@@ -2146,17 +2146,17 @@ function removeA11yEventListener(aEventT
   if (!listenersArray)
     return false;
 
   var index = listenersArray.indexOf(aEventHandler);
   if (index == -1)
     return false;
 
   listenersArray.splice(index, 1);
-  
+
   if (!listenersArray.length) {
     gA11yEventListeners[aEventType] = null;
     delete gA11yEventListeners[aEventType];
   }
 
   return true;
 }
 
@@ -2265,42 +2265,40 @@ var gLogger =
 // Sequence
 
 /**
  * Base class of sequence item.
  */
 function sequenceItem(aProcessor, aEventType, aTarget, aItemID)
 {
   // private
-  
+
   this.startProcess = function sequenceItem_startProcess()
   {
     this.queue.invoke();
   }
-  
-  var item = this;
-  
+
   this.queue = new eventQueue();
   this.queue.onFinish = function()
   {
     aProcessor.onProcessed();
     return DO_NOT_FINISH_TEST;
   }
-  
+
   var invoker = {
     invoke: function invoker_invoke() {
       return aProcessor.process();
     },
     getID: function invoker_getID()
     {
       return aItemID;
     },
     eventSeq: [ new invokerChecker(aEventType, aTarget) ]
   };
-  
+
   this.queue.push(invoker);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Event queue invokers
 
 /**
  * Invoker base class for prepare an action.
--- a/accessible/tests/mochitest/events/test_fromUserInput.html
+++ b/accessible/tests/mochitest/events/test_fromUserInput.html
@@ -26,19 +26,16 @@
       this.DOMNode = getNode(aID);
 
       this.eventSeq = [
         new textChangeChecker(aID, aStart, aEnd, aText, false, aFromUser)
       ];
 
       this.invoke = function removeTextFromInput_invoke()
       {
-        const nsIDOMNSEditableElement =
-          Components.interfaces.nsIDOMNSEditableElement;
-
         this.DOMNode.focus();
         this.DOMNode.setSelectionRange(aStart, aEnd);
 
         synthesizeKey("VK_DELETE", {});
       }
 
       this.getID = function removeTextFromInput_getID()
       {
@@ -55,19 +52,16 @@
       this.DOMNode = getNode(aID);
 
       this.eventSeq = [
         new textChangeChecker(aID, aStart, aEnd, aText, false, aFromUser)
       ];
 
       this.invoke = function removeTextFromContentEditable_invoke()
       {
-        const nsIDOMNSEditableElement =
-          Components.interfaces.nsIDOMNSEditableElement;
-
         this.DOMNode.focus();
         this.textNode = getNode(aID).firstChild;
         var selection = window.getSelection();
         var range = document.createRange();
         range.setStart(this.textNode, aStart);
         range.setEnd(this.textNode, aEnd);
         selection.addRange(range);
 
--- a/accessible/tests/mochitest/events/test_text.html
+++ b/accessible/tests/mochitest/events/test_text.html
@@ -180,19 +180,16 @@
     {
       this.__proto__ = new textRemoveInvoker(aID, aStart, aEnd, aText);
 
       this.eventSeq.push(new invokerChecker(EVENT_TEXT_VALUE_CHANGE,
                                             this.DOMNode));
 
       this.invoke = function removeTextFromInput_invoke()
       {
-        const nsIDOMNSEditableElement =
-          Components.interfaces.nsIDOMNSEditableElement;
-
         this.DOMNode.focus();
         this.DOMNode.setSelectionRange(aStart, aEnd);
 
         synthesizeKey("VK_DELETE", {});
       }
 
       this.getID = function removeTextFromInput_getID()
       {
--- a/accessible/tests/mochitest/grid.js
+++ b/accessible/tests/mochitest/grid.js
@@ -21,17 +21,16 @@ function grid(aTableIdentifier)
 
   this.getMaxIndex = function getMaxIndex()
   {
     return this.getRowCount() * this.getColsCount() - 1;
   }
 
   this.getCellAtIndex = function getCellAtIndex(aIndex)
   {
-    var rowCount = this.getRowCount();
     var colsCount = this.getColsCount();
 
     var rowIdx = Math.floor(aIndex / colsCount);
     var colIdx = aIndex % colsCount;
 
     var row = this.getRowAtIndex(rowIdx);
     return row.cells[colIdx];
   }
@@ -128,17 +127,17 @@ function grid(aTableIdentifier)
         break;
     }
   }
 
   this.handleClickEvent = function handleClickEvent(aEvent)
   {
     if (aEvent.target.localName != "td")
       return;
-    
+
     var curCell = this.getCurrentCell();
     var cell = aEvent.target;
 
     if (cell != curCell) {
       curCell.removeAttribute("tabindex");
       cell.setAttribute("tabindex", "0");
       cell.focus();
     }
--- a/accessible/tests/mochitest/hittest/test_canvas_hitregion.html
+++ b/accessible/tests/mochitest/hittest/test_canvas_hitregion.html
@@ -46,17 +46,17 @@
 
       var context = document.getElementById("hitcanvas").getContext('2d');
       redrawCheckbox(context, document.getElementById('hitcheck'),
                      offsetX, offsetY);
 
       var hitcanvas = getAccessible("hitcanvas");
       var hitcheck = getAccessible("hitcheck");
 
-      var [hitX, hitY, hitWidth, hitHeight] = getBounds(hitcanvas);
+      var [hitX, hitY, /*hitWidth, hitHeight */] = getBounds(hitcanvas);
       var [deltaX, deltaY] = CSSToDevicePixels(window, offsetX, offsetY);
 
       var docAcc = getAccessible(document);
 
       // test if we hit the region associated with the shadow dom checkbox
       var tgtX = hitX + deltaX;
       var tgtY = hitY + deltaY;
       hitAcc = docAcc.getDeepestChildAtPoint(tgtX, tgtY);
--- a/accessible/tests/mochitest/hittest/test_general.html
+++ b/accessible/tests/mochitest/hittest/test_general.html
@@ -43,19 +43,18 @@ if (!MAC) {
       // document.
       testChildAtPoint(txt, -1, 1, null, null);
 
       // ::MustPrune case, point is outside of root accessible.
       testChildAtPoint(txt, -10000, 10000, null, null);
 
       // Not specific case, point is inside of btn accessible.
       var btn = getAccessible("btn");
-      var btnText = btn.firstChild;
       testChildAtPoint(btn, 1, 1, btn, btn);
-  
+
       // Not specific case, point is outside of btn accessible.
       testChildAtPoint(btn, -1, 1, null, null);
 
       // Out of flow accessible testing, do not return out of flow accessible
       // because it's not a child of the accessible even visually it is.
       var rectArea = getNode("area").getBoundingClientRect();
       var outOfFlow = getNode("outofflow");
       outOfFlow.style.left = rectArea.left + "px";
--- a/accessible/tests/mochitest/hyperlink/test_general.html
+++ b/accessible/tests/mochitest/hyperlink/test_general.html
@@ -67,17 +67,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     function doTest()
     {
       //////////////////////////////////////////////////////////////////////////
       // normal hyperlink
       var normalHyperlinkAcc = getAccessible("NormalHyperlink",
                                              [nsIAccessibleHyperLink]);
       testThis("NormalHyperlink", normalHyperlinkAcc, ROLE_LINK, 1,
                "Mozilla Foundation", true, 17, 18);
-      is(normalHyperlinkAcc.getURI(0).spec, "http://www.mozilla.org/", 
+      is(normalHyperlinkAcc.getURI(0).spec, "http://www.mozilla.org/",
          "URI wrong for normalHyperlinkElement!");
       testStates(normalHyperlinkAcc, STATE_LINKED, 0);
 
       //////////////////////////////////////////////////////////////////////////
       // ARIA hyperlink
       var ariaHyperlinkAcc = getAccessible("AriaHyperlink",
                                            [nsIAccessibleHyperLink]);
       testThis("AriaHyperlink", ariaHyperlinkAcc, ROLE_LINK, 1,
@@ -128,17 +128,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       testAction("emptyLink", EmptyHLAcc, "jump");
 
       //////////////////////////////////////////////////////////////////////////
       // normal hyperlink with embedded span
       var hyperlinkWithSpanAcc = getAccessible("LinkWithSpan",
                                                [nsIAccessibleHyperLink]);
       testThis("LinkWithSpan", hyperlinkWithSpanAcc, ROLE_LINK, 1,
                "Heise Online", true, 119, 120);
-      is(hyperlinkWithSpanAcc.getURI(0).spec, "http://www.heise.de/", 
+      is(hyperlinkWithSpanAcc.getURI(0).spec, "http://www.heise.de/",
          "URI wrong for hyperlinkElementWithSpan!");
       testStates(hyperlinkWithSpanAcc, STATE_LINKED, 0);
       testAction("LinkWithSpan", hyperlinkWithSpanAcc, "jump");
 
       //////////////////////////////////////////////////////////////////////////
       // Named anchor, should never have state_linked
       var namedAnchorAcc = getAccessible("namedAnchor",
                                          [nsIAccessibleHyperLink]);
@@ -163,17 +163,17 @@ https://bugzilla.mozilla.org/show_bug.cg
                                            [nsIAccessibleHyperLink]);
       testThis("linkWithClick", linkWithClickAcc, ROLE_LINK, 1,
                "This should have state_linked", true, 292, 293);
       testStates(linkWithClickAcc, STATE_LINKED, 0);
       testAction("linkWithClick", linkWithClickAcc, "click");
 
       //////////////////////////////////////////////////////////////////////////
       // Maps to group links (bug 431615).
-      var linksMapAcc = getAccessible("linksmap");
+      // var linksMapAcc = getAccessible("linksmap");
 
       //////////////////////////////////////////////////////////////////////////
       // Link with title attribute, no name from the subtree (bug 438325).
       var id = "linkWithTitleNoNameFromSubtree";
       var linkAcc = getAccessible(id, [nsIAccessibleHyperLink]);
       testThis(id, linkAcc, ROLE_LINK, 1, "Link with title", true, 344, 345);
       testStates(linkAcc, STATE_LINKED, 0);
       testAction(id, linkAcc, "jump");
@@ -255,23 +255,23 @@ https://bugzilla.mozilla.org/show_bug.cg
   ><br>Link with embedded span<br
   ><a id="LinkWithSpan" href="http://www.heise.de/"><span lang="de">Heise Online</span></a
   ><br>Named anchor, must not have "linked" state for it to be exposed correctly:<br
   ><a id="namedAnchor" name="named_anchor">This should never be of state_linked</a
   ><br>Link having no attributes, must not have "linked" state:<a id="noLink"
   >This should never be of state_linked</a
   ><br>Link with registered 'click' event: <a id="linkWithClick" onclick="var clicked = true;"
   >This should have state_linked</a
-  ><br>Link with title attribute (no name from subtree): <a 
+  ><br>Link with title attribute (no name from subtree): <a
       id="linkWithTitleNoNameFromSubtree" href="http://www.heise.de/"
       title="Link with title"><img src=""/></a
-  ><br>Link with title attribute (name from subtree): <a 
+  ><br>Link with title attribute (name from subtree): <a
       id="linkWithTitleNameFromSubtree" href="http://www.heise.de/"
       title="Link with title">the name from subtree</a
-  ><br>Link with title attribute (name from nested image): <a 
+  ><br>Link with title attribute (name from nested image): <a
       id="linkWithTitleNameFromImg" href="http://www.heise.de/"
       title="Link with title"><img src="" alt="The title for link"/></a
   ><br><br>Map that is used to group links (www.w3.org/TR/WCAG10-HTML-TECHS/#group-bypass), also see the bug 431615:<br
   ><map id="linksmap" title="Site navigation"><ul
     ><li><a href="http://mozilla.org">About the project</a></li
     ><li><a href="http://mozilla.org">Sites and sounds</a></li
     ></ul
   ></map
--- a/accessible/tests/mochitest/jsat/dom_helper.js
+++ b/accessible/tests/mochitest/jsat/dom_helper.js
@@ -1,12 +1,10 @@
 'use strict';
 
-/* global getMainChromeWindow, AccessFuTest, GestureSettings, GestureTracker,
-   SimpleTest, getBoundsForDOMElm, Point, Utils */
 /* exported loadJSON, eventMap */
 
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
 Cu.import('resource://gre/modules/Geometry.jsm');
 
 var win = getMainChromeWindow(window);
--- a/accessible/tests/mochitest/jsat/test_live_regions.html
+++ b/accessible/tests/mochitest/jsat/test_live_regions.html
@@ -295,17 +295,16 @@
       expected: {
         "eventType": "liveregion-change",
         "data": ["I am replaced", {"string": "main"}],
         "options": {
           "enqueue": true
         }
       },
       action: function action() {
-        var region = document.getElementById("to_replace_region");
         var child = document.getElementById("to_replace");
         child.setAttribute("role", "main");
       }
     }, {
       expected: {
         "eventType": "liveregion-change",
         "data": ["I am a replaced text"],
         "options": {
--- a/accessible/tests/mochitest/name/markup.js
+++ b/accessible/tests/mochitest/name/markup.js
@@ -134,18 +134,16 @@ function testNamesForMarkup(aMarkupElm)
 }
 
 function testNamesForMarkupRules(aMarkupElm, aContainer)
 {
   var testID = aMarkupElm.getAttribute("id");
   if (gDumpToConsole)
     dump("\nProcessing markup rules '" + testID + "'\n");
 
-  var serializer = new XMLSerializer();
-
   var expr = "//html/body/div[@id='test']/" + aMarkupElm.getAttribute("ref");
   var elm = evaluateXPath(document, expr, htmlDocResolver)[0];
 
   var ruleId = aMarkupElm.getAttribute("ruleset");
   var ruleElm = gRuleDoc.querySelector("[id='" + ruleId + "']");
   var ruleElms = getRuleElmsByRulesetId(ruleId);
 
   var processMarkupRules =
--- a/accessible/tests/mochitest/relations.js
+++ b/accessible/tests/mochitest/relations.js
@@ -110,17 +110,16 @@ function testRelation(aIdentifier, aRelT
  *                              accessibles that shouldn't exist for this
  *                              relation.
  */
 function testAbsentRelation(aIdentifier, aRelType, aUnrelatedIdentifiers)
 {
   var relation = getRelationByType(aIdentifier, aRelType);
 
   var relDescr = getRelationErrorMsg(aIdentifier, aRelType);
-  var relDescrStart = getRelationErrorMsg(aIdentifier, aRelType, true);
 
   if (!aUnrelatedIdentifiers) {
     ok(false, "No identifiers given for unrelated accessibles.");
     return;
   }
 
   if (!relation || !relation.targetsCount) {
     ok(true, "No relations exist.");
--- a/accessible/tests/mochitest/scroll/test_zoom.html
+++ b/accessible/tests/mochitest/scroll/test_zoom.html
@@ -17,35 +17,35 @@
   <script type="application/javascript"
           src="../layout.js"></script>
 
   <script type="application/javascript">
     function testScrollToPoint()
     {
       // scrollToPoint relative screen
       var anchor = getAccessible("bottom1");
-      var [x, y] = getPos(anchor);
+      var [x, /*y*/] = getPos(anchor);
       var [docX, docY] = getPos(document);
 
       anchor.scrollToPoint(COORDTYPE_SCREEN_RELATIVE, docX, docY);
       testPos(anchor, [x, docY]);
 
       // scrollToPoint relative window
       anchor = getAccessible("bottom2");
-      var [x, y] = getPos(anchor);
+      var [x, /*y*/] = getPos(anchor);
       var wnd = getRootAccessible().DOMDocument.defaultView;
       var [screenX, screenY] = CSSToDevicePixels(wnd, wnd.screenX, wnd.screenY);
       var scrollToX = docX - screenX, scrollToY = docY - screenY;
 
       anchor.scrollToPoint(COORDTYPE_WINDOW_RELATIVE, scrollToX, scrollToY);
       testPos(anchor, [x, docY]);
 
       // scrollToPoint relative parent
       anchor = getAccessible("bottom3");
-      var [x, y] = getPos(anchor);
+      var [x, /*y*/] = getPos(anchor);
       var [parentX, parentY] = getPos(anchor.parent);
       var scrollToX = parentX - docX, scrollToY = parentY - docY;
 
       anchor.scrollToPoint(COORDTYPE_PARENT_RELATIVE, scrollToX, scrollToY);
       testPos(anchor, [x, docY]);
     }
 
     function doTest()
--- a/accessible/tests/mochitest/scroll/test_zoom_text.html
+++ b/accessible/tests/mochitest/scroll/test_zoom_text.html
@@ -22,29 +22,29 @@
   <script type="application/javascript">
     function doTest()
     {
       var tabDocument = currentTabDocument();
       var paragraphNode = tabDocument.getElementById("paragraph");
       var paragraph = getAccessible(paragraphNode, [nsIAccessibleText]);
       var offset = 64; // beginning of 4th stanza
 
-      var [x, y] = getPos(paragraph);
+      var [x, /*y*/] = getPos(paragraph);
       var [docX, docY] = getPos(tabDocument);
 
       paragraph.scrollSubstringToPoint(offset, offset,
                                        COORDTYPE_SCREEN_RELATIVE, docX, docY);
       testTextPos(paragraph, offset, [x, docY], COORDTYPE_SCREEN_RELATIVE);
 
       zoomDocument(tabDocument, 2.0);
 
       paragraphNode = tabDocument.getElementById("paragraph2");
       paragraph = getAccessible(paragraphNode, [nsIAccessibleText]);
       offset = 52; // // beginning of 4th stanza
-      var [x, y] = getPos(paragraph);
+      var [x, /*y*/] = getPos(paragraph);
       paragraph.scrollSubstringToPoint(offset, offset,
                                        COORDTYPE_SCREEN_RELATIVE, docX, docY);
       testTextPos(paragraph, offset, [x, docY], COORDTYPE_SCREEN_RELATIVE);
 
       closeBrowserWindow();
       SimpleTest.finish();
     }
 
--- a/accessible/tests/mochitest/selectable.js
+++ b/accessible/tests/mochitest/selectable.js
@@ -47,17 +47,17 @@ function testSelectableSelection(aIdenti
 /**
  * Test isItemSelected method, helper for testSelectableSelection
  */
 function testIsItemSelected(aSelectAcc, aTraversedAcc, aIndexObj, aSelectedChildren, aMsg)
 {
   var childCount = aTraversedAcc.childCount;
   for (var idx = 0; idx < childCount; idx++) {
     var child = aTraversedAcc.getChildAt(idx);
-    var [state, extraState] = getStates(child);
+    var [state, /*extraState*/] = getStates(child);
     if (state & STATE_SELECTABLE) {
       var isSelected = false;
       var len = aSelectedChildren.length;
       for (var jdx = 0; jdx < len; jdx++) {
         if (child == getAccessible(aSelectedChildren[jdx])) {
           isSelected = true;
           break;
         }
--- a/accessible/tests/mochitest/states.js
+++ b/accessible/tests/mochitest/states.js
@@ -199,17 +199,17 @@ function testStatesInSubtree(aAccOrElmOr
 }
 
 /**
  * Fails if no defunct state on the accessible.
  */
 function testIsDefunct(aAccessible, aTestName)
 {
   var id = prettyName(aAccessible) + (aTestName ? " [" + aTestName + "]" : "");
-  var [state, extraState] = getStates(aAccessible);
+  var [/*state*/, extraState] = getStates(aAccessible);
   isState(extraState & EXT_STATE_DEFUNCT, EXT_STATE_DEFUNCT, true,
           "no defuct state for " + id + "!");
 }
 
 function getStringStates(aAccOrElmOrID)
 {
   var [state, extraState] = getStates(aAccOrElmOrID);
   return statesToString(state, extraState);
--- a/accessible/tests/mochitest/states/test_aria.html
+++ b/accessible/tests/mochitest/states/test_aria.html
@@ -29,17 +29,17 @@
   <script type="application/javascript">
     function testAriaDisabledTree(aAccOrElmOrID)
     {
       // test accessible and its subtree for propagated state.
       var acc = getAccessible(aAccOrElmOrID);
       if (!acc)
         return;
 
-      var [state, extraState] = getStates(aAccOrElmOrID);
+      var [state, /*extraState*/] = getStates(aAccOrElmOrID);
       if (state & STATE_UNAVAILABLE) {
         var role = getRole(acc);
         if (role != ROLE_GROUPING) {
           testStates(acc, STATE_FOCUSABLE);
         }
       }
 
       // Iterate over its children to see if the state got propagated.
--- a/accessible/tests/mochitest/table.js
+++ b/accessible/tests/mochitest/table.js
@@ -11,17 +11,17 @@
 /**
  * Constants used to describe cells array.
  */
 const kDataCell = 1; // Indicates the cell is origin data cell
 const kRowHeaderCell = 2; // Indicates the cell is row header cell
 const kColHeaderCell = 4; // Indicated the cell is column header cell
 const kOrigin = kDataCell | kRowHeaderCell | kColHeaderCell;
 
-const kRowSpanned = 8; // Indicates the cell is not origin and row spanned 
+const kRowSpanned = 8; // Indicates the cell is not origin and row spanned
 const kColSpanned = 16; // Indicates the cell is not origin and column spanned
 const kSpanned = kRowSpanned | kColSpanned;
 
 /**
  * Constants to define column header type.
  */
 const kNoColumnHeader = 0;
 const kListboxColumnHeader = 1;
@@ -412,17 +412,16 @@ function testTableSelection(aIdentifier,
     is (actualSelCols[i], selCols[i],
         msg + "Column at index " + selCols[i] + " should be selected.");
   }
 
   // Rows selection tests.
   var selRows = new Array();
 
   // isRowSelected test
-  var selrowCount = 0;
   for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) {
     var isRowSelected = true;
     for (var colIdx = 0; colIdx < colsCount; colIdx++) {
       if (aCellsArray[rowIdx][colIdx] == false ||
           aCellsArray[rowIdx][colIdx] == undefined) {
         isRowSelected = false;
         break;
       }
@@ -534,17 +533,16 @@ function testTableSelection(aIdentifier,
 function testUnselectTableColumn(aIdentifier, aColIdx, aCellsArray)
 {
   var acc = getAccessible(aIdentifier, [nsIAccessibleTable]);
   if (!acc)
     return;
 
   var rowCount = aCellsArray.length;
   for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) {
-    var cellState = aCellsArray[rowIdx][aColIdx];
     // Unselect origin cell.
     var [origRowIdx, origColIdx] =
       getOrigRowAndColumn(aCellsArray, rowIdx, aColIdx);
     aCellsArray[origRowIdx][origColIdx] = false;
   }
 
   acc.unselectColumn(aColIdx);
   testTableSelection(aIdentifier, aCellsArray,
--- a/accessible/tests/mochitest/table/test_table_1.html
+++ b/accessible/tests/mochitest/table/test_table_1.html
@@ -45,19 +45,23 @@ function doTest()
   s.addRange(range);
   range = document.createRange();
   cell = getNode("row2c");
   range.selectNode(cell);
   s.addRange(range);
 
   is(accTable.selectedRowCount, 1, "no cells selected");
 
-  var columnDescription = accTable.getColumnDescription(1);
-  var rowDescription = accTable.getRowDescription(1);
-
+  // These shouldn't throw.
+  try {
+    accTable.getColumnDescription(1);
+    accTable.getRowDescription(1);
+  } catch (ex) {
+    ok(false, "getColumnDescription/getRowDescription shouldn't throw.");
+  }
   SimpleTest.finish();
 }
 SimpleTest.waitForExplicitFinish();
 addA11yLoadEvent(doTest);
   </script>
  </head>
  <body >
 
--- a/accessible/tests/mochitest/test_OuterDocAccessible.html
+++ b/accessible/tests/mochitest/test_OuterDocAccessible.html
@@ -35,19 +35,19 @@ https://bugzilla.mozilla.org/show_bug.cg
           testStates(outerDocAcc, STATE_FOCUSABLE, 0);
 
           // see bug 428954: No name wanted for internal frame
           is(outerDocAcc.name, null, "Wrong name for internal frame!");
 
           // see bug 440770, no actions wanted on outer doc
           is(outerDocAcc.actionCount, 0,
              "Wrong number of actions for internal frame!");
-          var actionTempStr; // not really used, just needs to receive a value
+
           try {
-            actionTempStr = outerDocAcc.getActionName(0);
+            outerDocAcc.getActionName(0);
             do_throw("No exception thrown for actionName!");
           } catch(e) {
             ok(e.result, ns_error_invalid_arg,
                "Wrong return value for actionName call!");
           }
 
           try {
             actionTempStr = outerDocAcc.getActionDescription(0);
--- a/accessible/tests/mochitest/text.js
+++ b/accessible/tests/mochitest/text.js
@@ -256,18 +256,18 @@ function testWordCount(aElement, aCount,
 {
   var isFunc = (aToDoFlag == kTodo) ? todo_is : is;
   var acc = getAccessible(aElement, nsIAccessibleText);
   var startOffsetObj = {}, endOffsetObj = {};
   var length = acc.characterCount;
   var offset = 0;
   var wordCount = 0;
   while (true) {
-    var text = acc.getTextAtOffset(offset, BOUNDARY_WORD_START,
-                                   startOffsetObj, endOffsetObj);
+    acc.getTextAtOffset(offset, BOUNDARY_WORD_START,
+                        startOffsetObj, endOffsetObj);
     if (offset >= length)
       break;
 
     wordCount++;
     offset = endOffsetObj.value;
   }
   isFunc(wordCount, aCount,
         "wrong words count for '" + acc.getText(0, -1) + "': " + wordCount +
--- a/accessible/tests/mochitest/tree/test_aria_globals.html
+++ b/accessible/tests/mochitest/tree/test_aria_globals.html
@@ -37,17 +37,17 @@
 
       // Elements having ARIA global state or properties or referred by another
       // element must be accessible.
       ok(isAccessible("pawn"),
          "Must be accessible because referred by another element.");
 
       for (var idx = 0; idx < globalIds.length; idx++) {
         ok(isAccessible(globalIds[idx]),
-           "Must be accessible becuase of " + "aria-" + globalIds[idx] +
+           "Must be accessible becuase of aria-" + globalIds[idx] +
            " presence");
       }
 
       // Unfocusable elements, having ARIA global state or property with a valid
       // IDREF value, and an inherited presentation role. A generic accessible
       // is created (to prevent table cells text jamming).
       ok(!isAccessible("td_nothing", nsIAccessibleTableCell),
          "inherited presentation role takes a place");
--- a/accessible/tests/mochitest/treeupdate/test_ariaowns.html
+++ b/accessible/tests/mochitest/treeupdate/test_ariaowns.html
@@ -582,25 +582,26 @@
       this.eventSeq = [
         new invokerChecker(EVENT_SHOW, () => {
           let doc = getNode('t9_container').contentDocument;
           return doc && doc.getElementById('container');
         })
       ];
 
       this.invoke = () => {
-        getNode('t9_container').src =
-          `data:text/html,
-            <html><body></body>
-            <script>
-              let el = document.createElement('div');
-              el.id = 'container';
-              el.innerHTML = "<input id='input'>";
-              document.documentElement.appendChild(el);
-            </` + `script></html>`;
+        // The \ before the final /script avoids the script from being terminated
+        // by the html parser.
+        getNode('t9_container').src = `data:text/html,
+          <html><body></body>
+          <script>
+            let el = document.createElement('div');
+            el.id = 'container';
+            el.innerHTML = "<input id='input'>";
+            document.documentElement.appendChild(el);
+          <\/script></html>`;
       }
 
       this.finalCheck = () => {
         var tree =
           { INTERNAL_FRAME: [
             { DOCUMENT: [
               { SECTION: [
                 { ENTRY: [] }
--- a/accessible/tests/mochitest/treeupdate/test_list.html
+++ b/accessible/tests/mochitest/treeupdate/test_list.html
@@ -63,33 +63,33 @@
             testDefunctAccessible(aLiAcc, aLiNode);
             testDefunctAccessible(aBulletAcc);
 
             gSequence.processNext();
           },
           0, this.li, this.liNode, this.bullet
         );
       }
-    };
+    }
 
     function showProcessor()
     {
       this.liNode = getNode("li");
 
       this.process = function showProcessor_process()
       {
         this.liNode.style.display = "list-item";
       }
 
       this.onProcessed = function showProcessor_onProcessed()
       {
         testLiAccessibleTree();
         gSequence.processNext();
       }
-    };
+    }
 
     function textReplaceProcessor()
     {
       this.liNode = getNode("li");
 
       this.process = function textReplaceProcessor_process()
       {
         this.liNode.textContent = "hey";
@@ -101,17 +101,17 @@
           LISTITEM: [
             { STATICTEXT: [] },
             { TEXT_LEAF: [] }
           ]
         };
         testAccessibleTree(this.liNode, tree);
         SimpleTest.finish();
       }
-    };
+    }
 
     ////////////////////////////////////////////////////////////////////////////
     // Test
 
     //gA11yEventDumpToConsole = true;
 
     var gSequence = null;
     function doTest()
--- a/accessible/tests/mochitest/treeupdate/test_list_editabledoc.html
+++ b/accessible/tests/mochitest/treeupdate/test_list_editabledoc.html
@@ -60,17 +60,17 @@
         };
         testAccessibleTree(aID, tree);
       }
 
       this.getID = function addLi_getID()
       {
         return "add li";
       }
-    };
+    }
 
     ////////////////////////////////////////////////////////////////////////////
     // Test
 
     //gA11yEventDumpID = "eventdump"; // debug stuff
 
     var gQueue = null;
 
--- a/accessible/tests/mochitest/value/test_general.html
+++ b/accessible/tests/mochitest/value/test_general.html
@@ -31,17 +31,16 @@
       function testValue(aID, aValue)
       {
         var acc = getAccessible(aID);
         if (!acc)
           return;
         is(acc.value, aValue, "Wrong value for " + aID + "!");
       }
 
-      var rootDir = getRootDirectory(window.location.href);
       var href = getRootDirectory(window.location.href) + "foo";
 
       // roles that can't live as HTMLLinkAccessibles
       testValue("aria_menuitem_link", "");
       testValue("aria_button_link", "");
       testValue("aria_checkbox_link", "");
       testValue("aria_application_link", "");
 
--- a/addon-sdk/source/lib/sdk/content/sandbox.js
+++ b/addon-sdk/source/lib/sdk/content/sandbox.js
@@ -254,19 +254,16 @@ const WorkerSandbox = Class({
         profile: genPropDesc('profile'),
         profileEnd: genPropDesc('profileEnd'),
         exception: genPropDesc('exception'),
         assert: genPropDesc('assert'),
         count: genPropDesc('count'),
         table: genPropDesc('table'),
         clear: genPropDesc('clear'),
         dirxml: genPropDesc('dirxml'),
-        markTimeline: genPropDesc('markTimeline'),
-        timeline: genPropDesc('timeline'),
-        timelineEnd: genPropDesc('timelineEnd'),
         timeStamp: genPropDesc('timeStamp'),
       };
 
       Object.defineProperties(con, properties);
       Cu.makeObjectPropsNormal(con);
 
       win.console = con;
     };
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -233,17 +233,17 @@ pref("general.autoScroll", true);
 pref("browser.shell.checkDefaultBrowser", true);
 pref("browser.shell.shortcutFavicons",true);
 pref("browser.shell.mostRecentDateSetAsDefault", "");
 #ifdef RELEASE_OR_BETA
 pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", false);
 #else
 pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", true);
 #endif
-pref("browser.shell.skipDefaultBrowserCheck", true);
+pref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun", false);
 pref("browser.shell.defaultBrowserCheckCount", 0);
 pref("browser.defaultbrowser.notificationbar", false);
 
 // 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
 // The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
 pref("browser.startup.page",                1);
 pref("browser.startup.homepage",            "chrome://branding/locale/browserconfig.properties");
 // Whether we should skip the homepage when opening the first-run page
--- a/browser/base/content/aboutDialog.xul
+++ b/browser/base/content/aboutDialog.xul
@@ -1,9 +1,9 @@
-<?xml version="1.0"?> <!-- -*- Mode: HTML -*- --> 
+<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
@@ -99,17 +99,17 @@
               </hbox>
               <hbox id="manualUpdate" align="center">
                 <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
               </hbox>
               <hbox id="unsupportedSystem" align="center">
                 <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
               </hbox>
               <hbox id="restarting" align="center">
-                <label>&update.restarting;</label>
+                <image class="update-throbber"/><label>&update.restarting;</label>
               </hbox>
             </deck>
 #endif
           </vbox>
 
 #ifdef MOZ_UPDATER
           <description class="text-blurb" id="currentChannelText">
             &channel.description.start;<label id="currentChannel"/>&channel.description.end;
@@ -139,17 +139,17 @@
       <hbox pack="center">
         <label class="text-link bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label>
         <label class="text-link bottom-link" useoriginprincipal="true" href="about:rights">&bottomLinks.rights;</label>
         <label class="text-link bottom-link" href="https://www.mozilla.org/privacy/">&bottomLinks.privacy;</label>
       </hbox>
       <description id="trademark">&trademarkInfo.part1;</description>
     </vbox>
   </vbox>
-  
+
   <keyset>
     <key keycode="VK_ESCAPE" oncommand="window.close();"/>
   </keyset>
 
 #ifdef XP_MACOSX
 #include browserMountPoints.inc
 #endif
 </window>
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -570,17 +570,16 @@
         <div id="ed_corruptedContentErrorv2">&corruptedContentErrorv2.longDesc;</div>
         <div id="ed_sslv3Used">&sslv3Used.longDesc2;</div>
         <div id="ed_inadequateSecurityError">&inadequateSecurityError.longDesc;</div>
       </div>
     </div>
 
     <!-- PAGE CONTAINER (for styling purposes only) -->
     <div id="errorPageContainer" class="container">
-
       <!-- Error Title -->
       <div class="title">
         <h1 class="title-text"/>
       </div>
 
       <!-- LONG CONTENT (the section most likely to require scrolling) -->
       <div id="errorLongContent">
 
@@ -600,55 +599,55 @@
 
         <!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
         <div id="errorLongDesc" />
 
         <div id="learnMoreContainer">
           <p><a href="https://support.mozilla.org/kb/what-does-your-connection-is-not-secure-mean" id="learnMoreLink" target="new">&errorReporting.learnMore;</a></p>
         </div>
 
+        <!-- UI for option to report certificate errors to Mozilla. Removed on
+             init for other error types .-->
+        <div id="certificateErrorReporting">
+          <p class="toggle-container-with-text">
+            <input type="checkbox" id="automaticallyReportInFuture" role="checkbox" />
+            <label for="automaticallyReportInFuture" id="automaticallyReportInFuture">&errorReporting.automatic2;</label>
+          </p>
+        </div>
+
         <div id="prefChangeContainer" class="button-container">
           <p>&prefReset.longDesc;</p>
           <button id="prefResetButton" class="primary" autocomplete="off">&prefReset.label;</button>
         </div>
 
         <div id="certErrorAndCaptivePortalButtonContainer" class="button-container">
           <button id="returnButton" class="primary" autocomplete="off">&returnToPreviousPage.label;</button>
           <button id="openPortalLoginPageButton" class="primary" autocomplete="off">&openPortalLoginPage.label2;</button>
-          <div class="button-spacer"></div>
           <button id="advancedButton" autocomplete="off">&advanced.label;</button>
         </div>
       </div>
 
       <div id="netErrorButtonContainer" class="button-container">
         <button id="errorTryAgain" class="primary" autocomplete="off" onclick="retryThis(this);">&retry.label;</button>
       </div>
 
-      <!-- UI for option to report certificate errors to Mozilla. Removed on
-           init for other error types .-->
-      <div id="certificateErrorReporting">
-        <p class="toggle-container-with-text">
-          <input type="checkbox" id="automaticallyReportInFuture" role="checkbox" />
-          <label for="automaticallyReportInFuture" id="automaticallyReportInFuture">&errorReporting.automatic2;</label>
-        </p>
-      </div>
-
       <div id="advancedPanelContainer">
         <div id="badCertAdvancedPanel" class="advanced-panel">
           <p id="badCertTechnicalInfo"/>
-          <button id="exceptionDialogButton">&securityOverride.exceptionButtonLabel;</button>
+          <div class="exceptionDialogButtonContainer">
+            <button id="exceptionDialogButton">&securityOverride.exceptionButtonLabel;</button>
+          </div>
+        </div>
+
+        <div id="certificateErrorDebugInformation">
+          <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
+          <div id="certificateErrorText"/>
+          <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
         </div>
       </div>
-
-    </div>
-
-    <div id="certificateErrorDebugInformation">
-      <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
-      <div id="certificateErrorText"/>
-      <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
     </div>
 
     <!--
     - Note: It is important to run the script this way, instead of using
     - an onload handler. This is because error pages are loaded as
     - LOAD_BACKGROUND, which means that onload handlers will not be executed.
     -->
     <script type="application/javascript">
--- a/browser/base/content/abouthome/aboutHome.css
+++ b/browser/base/content/abouthome/aboutHome.css
@@ -359,32 +359,32 @@ body[narrow] #restorePreviousSession::be
   height: 32px;
   width: 32px;
 }
 
 #aboutMozilla {
   display: block;
   position: relative; /* pin wordmark to edge of document, not of viewport */
   -moz-box-ordinal-group: 0;
-  opacity: .5;
+  opacity: .2;
   transition: opacity 150ms;
 }
 
 #aboutMozilla:hover {
-  opacity: 1;
+  opacity: .6;
 }
 
 #aboutMozilla::before {
-  content: url("chrome://browser/content/abouthome/mozilla.png");
+  content: url("chrome://browser/content/abouthome/mozilla.svg");
   display: block;
   position: absolute;
   top: 12px;
   right: 12px;
-  width: 69px;
-  height: 19px;
+  width: 70px;
+  height: 20px;
 }
 
 /* [HiDPI]
  * At resolutions above 1dppx, prefer downscaling the 2x Retina graphics
  * rather than upscaling the original-size ones (bug 818940).
  */
 @media not all and (max-resolution: 1dppx) {
   #brandLogo {
@@ -447,14 +447,10 @@ body[narrow] #restorePreviousSession::be
   body[narrow] #restorePreviousSession::before {
     content: url("chrome://browser/content/abouthome/restore@2x.png");
   }
 
   #restorePreviousSession:dir(rtl)::before {
     transform: scale(-0.5, 0.5) translateX(24px);
     transform-origin: top center;
   }
-
-  #aboutMozilla::before {
-    content: url("chrome://browser/content/abouthome/mozilla@2x.png");
-  }
 }
 
deleted file mode 100644
index f2c348d13566a943593afc93934e5503661deaa9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
--- /dev/null
+++ b/browser/base/content/abouthome/mozilla.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 134 38">
+<path d="M54.2,21.8c0,3.2-1.6,5.2-4.1,5.2s-3.9-2.2-3.9-5.1,1.5-4.9,3.9-4.9S54.2,18.4,54.2,21.8Zm61.1,3.5a1.7,1.7,0,0,0,2,1.9c1.7,0,3.5-1.2,3.6-4l-2.4-.2C116.8,23,115.3,23.4,115.3,25.3ZM134,0V38H0V0ZM39.2,26.6H37V19a5.4,5.4,0,0,0-5.7-5.8,5.6,5.6,0,0,0-5.4,3.6,5.4,5.4,0,0,0-5.4-3.6,5.5,5.5,0,0,0-5.1,2.8V13.6h-7v3.6h2.2v9.4H8.4v3.6H18.6V26.6H15.4V20.8c0-2.3.9-3.9,3.2-3.9s2.8,1.1,2.8,4v9.4h7V26.6H26.2V20.8c0-2.3.9-3.9,3.2-3.9s2.8,1.1,2.8,4v9.4h7Zm19.9-4.7c0-4.6-2.9-8.7-8.9-8.7s-8.9,4-8.9,8.9,3.5,8.4,8.7,8.4S59.1,27.2,59.1,21.9Zm18.7,2.5L74,24l-.8,2.6H67.9l9.2-10.5-.4-2.5H62.1l-.6,5.8,3.4.4.7-2.6h5.2L61.8,27.7l.5,2.5H76.8Zm8.5-.1h-5v6h5Zm0-10.7h-5v6h5ZM94,30.2l7.2-25.4H96.6L89.4,30.2Zm9.7,0,7.2-25.4h-4.7L99,30.2Zm23.8-.4V27.3h-.7c-.8,0-1.1-.3-1.1-1.3V18.9c0-3.8-3-5.6-6.6-5.6a16,16,0,0,0-7.1,1.5l-.6,3.8,3.8.4.5-1.9a5.2,5.2,0,0,1,2.5-.5c2.7,0,2.7,2,2.7,3.7v.6h-2.7c-3.8,0-7.7,1-7.7,5.1s2.7,4.8,5.1,4.8a6,6,0,0,0,5.3-3.3,3.4,3.4,0,0,0,3.6,3.3A6.4,6.4,0,0,0,127.5,29.8Z"/>
+</svg>
deleted file mode 100644
index f8fc622d0b47465bbc050afd6ead71227bcdc1c9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -219,48 +219,64 @@ if (AppConstants.platform != "macosx") {
 /* globals gBrowser, gNavToolbox, gURLBar:true, gNavigatorBundle*/
 [
   ["gBrowser",            "content"],
   ["gNavToolbox",         "navigator-toolbox"],
   ["gURLBar",             "urlbar"],
   ["gNavigatorBundle",    "bundle_browser"]
 ].forEach(function(elementGlobal) {
   var [name, id] = elementGlobal;
-  window.__defineGetter__(name, function() {
-    var element = document.getElementById(id);
-    if (!element)
-      return null;
-    delete window[name];
-    return window[name] = element;
-  });
-  window.__defineSetter__(name, function(val) {
-    delete window[name];
-    return window[name] = val;
+  Object.defineProperty(window, name, {
+    configurable: true,
+    enumerable: true,
+    get() {
+      var element = document.getElementById(id);
+      if (!element)
+        return null;
+      delete window[name];
+      return window[name] = element;
+    },
+    set(val) {
+      delete window[name];
+      return window[name] = val;
+    },
   });
 });
 
 // Smart getter for the findbar.  If you don't wish to force the creation of
 // the findbar, check gFindBarInitialized first.
 
-this.__defineGetter__("gFindBar", function() {
-  return window.gBrowser.getFindBar();
-});
-
-this.__defineGetter__("gFindBarInitialized", function() {
-  return window.gBrowser.isFindBarInitialized();
+Object.defineProperty(this, "gFindBar", {
+  configurable: true,
+  enumerable: true,
+  get() {
+    return window.gBrowser.getFindBar();
+  },
 });
 
-this.__defineGetter__("AddonManager", function() {
-  let tmp = {};
-  Cu.import("resource://gre/modules/AddonManager.jsm", tmp);
-  return this.AddonManager = tmp.AddonManager;
+Object.defineProperty(this, "gFindBarInitialized", {
+  configurable: true,
+  enumerable: true,
+  get() {
+    return window.gBrowser.isFindBarInitialized();
+  },
 });
-this.__defineSetter__("AddonManager", function(val) {
-  delete this.AddonManager;
-  return this.AddonManager = val;
+
+Object.defineProperty(this, "AddonManager", {
+  configurable: true,
+  enumerable: true,
+  get() {
+    let tmp = {};
+    Cu.import("resource://gre/modules/AddonManager.jsm", tmp);
+    return this.AddonManager = tmp.AddonManager;
+  },
+  set(val) {
+    delete this.AddonManager;
+    return this.AddonManager = val;
+  },
 });
 
 
 var gInitialPages = [
   "about:blank",
   "about:newtab",
   "about:home",
   "about:privatebrowsing",
@@ -2926,16 +2942,20 @@ var gMenuButtonUpdateBadge = {
   handleUpdateAvailable(update, status) {
     switch (status) {
       case "show-prompt":
         // If an update is available and had the showPrompt flag set, then
         // show an update available doorhanger.
         this.clearCallbacks();
         this.showUpdateAvailableNotification(update, false);
         break;
+      case "cant-apply":
+        this.clearCallbacks();
+        this.showManualUpdateNotification(update, false);
+        break;
     }
   },
 
   observe(subject, topic, status) {
     if (!this.enabled) {
       return;
     }
 
--- a/browser/base/content/test/appUpdate/browser.ini
+++ b/browser/base/content/test/appUpdate/browser.ini
@@ -4,16 +4,18 @@ support-files =
   head.js
   downloadPage.html
   testConstants.js
 
 [browser_updatesBasicPrompt.js]
 skip-if = asan
 reason = Bug 1168003
 [browser_updatesBasicPromptNoStaging.js]
+[browser_updatesCantApply.js]
+skip-if = os != 'win'
 [browser_updatesCompleteAndPartialPatchesWithBadCompleteSize.js]
 [browser_updatesCompleteAndPartialPatchesWithBadPartialSize.js]
 [browser_updatesCompleteAndPartialPatchesWithBadSizes.js]
 [browser_updatesCompletePatchApplyFailure.js]
 [browser_updatesCompletePatchWithBadCompleteSize.js]
 [browser_updatesDownloadFailures.js]
 [browser_updatesMalformedXml.js]
 [browser_updatesPartialPatchApplyFailure.js]
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/appUpdate/browser_updatesCantApply.js
@@ -0,0 +1,37 @@
+add_task(function* testBasicPrompt() {
+  SpecialPowers.pushPrefEnv({set: [
+    [PREF_APP_UPDATE_SERVICE_ENABLED, false],
+  ]});
+  let updateParams = "promptWaitTime=0";
+
+  let file = getWriteTestFile();
+  file.create(file.NORMAL_FILE_TYPE, 0o444);
+  file.fileAttributesWin |= file.WFA_READONLY;
+  file.fileAttributesWin &= ~file.WFA_READWRITE;
+
+  yield runUpdateTest(updateParams, 1, [
+    {
+      notificationId: "update-manual",
+      button: "button",
+      *cleanup() {
+        yield BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
+        is(gBrowser.selectedBrowser.currentURI.spec,
+           URL_MANUAL_UPDATE, "Landed on manual update page.")
+        gBrowser.removeTab(gBrowser.selectedTab);
+        getWriteTestFile();
+      }
+    },
+  ]);
+});
+
+function getWriteTestFile() {
+  let file = getAppBaseDir();
+  file.append(FILE_UPDATE_TEST);
+  file.QueryInterface(Ci.nsILocalFileWin);
+  if (file.exists()) {
+    file.fileAttributesWin |= file.WFA_READWRITE;
+    file.fileAttributesWin &= ~file.WFA_READONLY;
+    file.remove(true);
+  }
+  return file;
+}
--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -115,20 +115,16 @@ var whitelist = new Set([
 
 
   // Starting from here, files in the whitelist are bugs that need fixing.
   // Bug 1339420
   {file: "chrome://branding/content/icon128.png"},
   // Bug 1339424 (wontfix?)
   {file: "chrome://browser/locale/taskbar.properties",
    platforms: ["linux", "macosx"]},
-  // Bug 1320156
-  {file: "chrome://browser/skin/Privacy-16.png", platforms: ["linux"]},
-  // Bug 1343584
-  {file: "chrome://browser/skin/click-to-play-warning-stripes.png"},
   // Bug 1343824
   {file: "chrome://browser/skin/customizableui/customize-illustration-rtl@2x.png",
    platforms: ["linux", "win"]},
   {file: "chrome://browser/skin/customizableui/customize-illustration@2x.png",
    platforms: ["linux", "win"]},
   {file: "chrome://browser/skin/customizableui/info-icon-customizeTip@2x.png",
    platforms: ["linux", "win"]},
   {file: "chrome://browser/skin/customizableui/panelarrow-customizeTip@2x.png",
@@ -184,18 +180,16 @@ var whitelist = new Set([
   {file: "chrome://global/skin/icons/error-large.png", platforms: ["macosx"]},
   {file: "chrome://global/skin/icons/expand.png", platforms: ["linux"]},
   {file: "chrome://global/skin/icons/folder-item.png", platforms: ["linux"]},
   {file: "chrome://global/skin/icons/question-large.png", platforms: ["macosx"]},
   {file: "chrome://global/skin/icons/warning-32.png", platforms: ["macosx"]},
   {file: "chrome://global/skin/icons/warning-64.png", platforms: ["linux", "win"]},
   {file: "chrome://global/skin/icons/warning-large.png", platforms: ["linux"]},
   {file: "chrome://global/skin/icons/windowControls.png", platforms: ["linux"]},
-  // Bug 1348521
-  {file: "chrome://global/skin/linkTree.css"},
   // Bug 1348522
   {file: "chrome://global/skin/media/clicktoplay-bgtexture.png"},
   {file: "chrome://global/skin/media/videoClickToPlayButton.svg"},
   // Bug 1348524
   {file: "chrome://global/skin/notification/close.png", platforms: ["macosx"]},
   // Bug 1348525
   {file: "chrome://global/skin/splitter/grip-bottom.gif", platforms: ["linux"]},
   {file: "chrome://global/skin/splitter/grip-left.gif", platforms: ["linux"]},
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -13,23 +13,27 @@ Components.utils.import("resource:///mod
 
 XPCOMUtils.defineLazyModuleGetter(this, "ShellService",
                                   "resource:///modules/ShellService.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
                                    "@mozilla.org/browser/aboutnewtab-service;1",
                                    "nsIAboutNewTabService");
 
-this.__defineGetter__("BROWSER_NEW_TAB_URL", () => {
-  if (PrivateBrowsingUtils.isWindowPrivate(window) &&
-      !PrivateBrowsingUtils.permanentPrivateBrowsing &&
-      !aboutNewTabService.overridden) {
-    return "about:privatebrowsing";
-  }
-  return aboutNewTabService.newTabURL;
+Object.defineProperty(this, "BROWSER_NEW_TAB_URL", {
+  configurable: true,
+  enumerable: true,
+  get() {
+    if (PrivateBrowsingUtils.isWindowPrivate(window) &&
+        !PrivateBrowsingUtils.permanentPrivateBrowsing &&
+        !aboutNewTabService.overridden) {
+      return "about:privatebrowsing";
+    }
+    return aboutNewTabService.newTabURL;
+  },
 });
 
 var TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab";
 
 var gBidiUI = false;
 
 /**
  * Determines whether the given url is considered a special URL for new tabs.
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -22,28 +22,27 @@ browser.jar:
         content/browser/abouthome/downloads.png       (content/abouthome/downloads.png)
         content/browser/abouthome/bookmarks.png       (content/abouthome/bookmarks.png)
         content/browser/abouthome/history.png         (content/abouthome/history.png)
         content/browser/abouthome/addons.png          (content/abouthome/addons.png)
         content/browser/abouthome/sync.png            (content/abouthome/sync.png)
         content/browser/abouthome/settings.png        (content/abouthome/settings.png)
         content/browser/abouthome/restore.png         (content/abouthome/restore.png)
         content/browser/abouthome/restore-large.png   (content/abouthome/restore-large.png)
-        content/browser/abouthome/mozilla.png         (content/abouthome/mozilla.png)
+        content/browser/abouthome/mozilla.svg         (content/abouthome/mozilla.svg)
         content/browser/abouthome/snippet1@2x.png      (content/abouthome/snippet1@2x.png)
         content/browser/abouthome/snippet2@2x.png      (content/abouthome/snippet2@2x.png)
         content/browser/abouthome/downloads@2x.png     (content/abouthome/downloads@2x.png)
         content/browser/abouthome/bookmarks@2x.png     (content/abouthome/bookmarks@2x.png)
         content/browser/abouthome/history@2x.png       (content/abouthome/history@2x.png)
         content/browser/abouthome/addons@2x.png        (content/abouthome/addons@2x.png)
         content/browser/abouthome/sync@2x.png          (content/abouthome/sync@2x.png)
         content/browser/abouthome/settings@2x.png      (content/abouthome/settings@2x.png)
         content/browser/abouthome/restore@2x.png       (content/abouthome/restore@2x.png)
         content/browser/abouthome/restore-large@2x.png (content/abouthome/restore-large@2x.png)
-        content/browser/abouthome/mozilla@2x.png       (content/abouthome/mozilla@2x.png)
 
         content/browser/aboutNetError.xhtml            (content/aboutNetError.xhtml)
 
 #ifdef MOZ_SERVICES_HEALTHREPORT
         content/browser/abouthealthreport/abouthealth.xhtml   (content/abouthealthreport/abouthealth.xhtml)
         content/browser/abouthealthreport/abouthealth.js      (content/abouthealthreport/abouthealth.js)
         content/browser/abouthealthreport/abouthealth.css     (content/abouthealthreport/abouthealth.css)
 #endif
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -541,12 +541,41 @@
                        label="&printButton.label;"
                        key="printKb"
 #ifdef XP_MACOSX
                        command="cmd_print"
 #else
                        command="cmd_printPreview"
 #endif
                        />
+        <toolbarseparator/>
+        <toolbarbutton id="appMenu-library-button"
+                       class="subviewbutton subviewbutton-iconic"
+                       label="&places.library.title;"
+                       command="Browser:ShowAllBookmarks"
+                       />
+        <toolbarbutton id="appMenu-addons-button"
+                       class="subviewbutton subviewbutton-iconic"
+                       label="&addons.label;"
+                       key="key_openAddons"
+                       command="Tools:Addons"
+                       />
+        <toolbarbutton id="appMenu-preferences-button"
+                       class="subviewbutton subviewbutton-iconic"
+#ifdef XP_WIN
+                       label="&preferencesCmd2.label;"
+#else
+                       label="&preferencesCmdUnix.label;"
+#ifdef XP_MACOSX
+                       key="key_preferencesCmdMac"
+#endif
+#endif
+                       oncommand="openPreferences()"
+                       />
+        <toolbarbutton id="appMenu-customize-button"
+                       class="subviewbutton subviewbutton-iconic"
+                       label="&viewCustomizeToolbar.label;"
+                       command="cmd_CustomizeToolbars"
+                       />
       </vbox>
     </panelview>
   </panelmultiview>
 </panel>
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -296,25 +296,31 @@ const PanelUI = {
       return;
     }
     switch (aEvent.type) {
       case "popupshowing":
         this._adjustLabelsForAutoHyphens();
         updateEditUIVisibility();
         // Fall through
       case "popupshown":
+        if (gPhotonStructure && aEvent.type == "popupshown") {
+          CustomizableUI.addPanelCloseListeners(this.panel);
+        }
         // Fall through
       case "popuphiding":
         if (aEvent.type == "popuphiding") {
           updateEditUIVisibility();
         }
         // Fall through
       case "popuphidden":
         this._updateNotifications();
         this._updatePanelButton(aEvent.target);
+        if (gPhotonStructure && aEvent.type == "popuphidden") {
+          CustomizableUI.removePanelCloseListeners(this.panel);
+        }
         break;
       case "mousedown":
         if (aEvent.button == 0)
           this.toggle(aEvent);
         break;
       case "keypress":
         this.toggle(aEvent);
         break;
--- a/browser/components/extensions/ext-geckoProfiler.js
+++ b/browser/components/extensions/ext-geckoProfiler.js
@@ -131,21 +131,23 @@ async function spawnProcess(name, cmdArg
     const encoder = new TextEncoder("utf-8");
     proc.stdin.write(encoder.encode(stdin));
     proc.stdin.close();
   }
 
   await readAllData(proc.stdout, processData);
 }
 
-async function getSymbolsFromNM(path) {
+async function getSymbolsFromNM(path, arch) {
   const parser = new NMParser();
 
   const args = [path];
-  if (Services.appinfo.OS !== "Darwin") {
+  if (Services.appinfo.OS === "Darwin") {
+    args.unshift("-arch", arch);
+  } else {
     // Mac's `nm` doesn't support the demangle option, so we have to
     // post-process the symbols with c++filt.
     args.unshift("--demangle");
   }
 
   await spawnProcess("nm", args, data => parser.consume(data));
   await spawnProcess("nm", ["-D", ...args], data => parser.consume(data));
   let {syms, approximateLength} = parser.finish();
@@ -204,18 +206,18 @@ function filePathForSymFileInObjDir(bina
   return OS.Path.join(objDirDist,
                       "crashreporter-symbols",
                       ...pathComponentsForSymbolFile(debugName, breakpadId));
 }
 
 const symbolCache = new Map();
 
 function primeSymbolStore(libs) {
-  for (const {debugName, breakpadId, path} of libs) {
-    symbolCache.set(urlForSymFile(debugName, breakpadId), path);
+  for (const {debugName, breakpadId, path, arch} of libs) {
+    symbolCache.set(urlForSymFile(debugName, breakpadId), {path, arch});
   }
 }
 
 const isRunningObserver = {
   _observers: new Set(),
 
   observe(subject, topic, data) {
     switch (topic) {
@@ -300,47 +302,52 @@ this.geckoProfiler = class extends Exten
           return Services.profiler.getProfileDataAsync();
         },
 
         async getSymbols(debugName, breakpadId) {
           if (symbolCache.size === 0) {
             primeSymbolStore(Services.profiler.sharedLibraries);
           }
 
-          const path = symbolCache.get(urlForSymFile(debugName, breakpadId));
+          const cachedLibInfo = symbolCache.get(urlForSymFile(debugName, breakpadId));
 
           const symbolRules = Services.prefs.getCharPref(PREF_GET_SYMBOL_RULES, "localBreakpad,remoteBreakpad");
-          const haveAbsolutePath = path && OS.Path.split(path).absolute;
+          const haveAbsolutePath = cachedLibInfo && OS.Path.split(cachedLibInfo.path).absolute;
 
           // We have multiple options for obtaining symbol information for the given
           // binary.
           //  "localBreakpad"  - Use existing symbol dumps stored in the object directory of a local
           //      Firefox build, generated using `mach buildsymbols` [requires path]
           //  "remoteBreakpad" - Use symbol dumps from the Mozilla symbol server [only requires
           //      debugName + breakpadId]
           //  "nm"             - Use the command line tool `nm` [linux/mac only, requires path]
           for (const rule of symbolRules.split(",")) {
             try {
               switch (rule) {
                 case "localBreakpad":
                   if (haveAbsolutePath) {
+                    const {path} = cachedLibInfo;
                     const filepath = filePathForSymFileInObjDir(path, debugName, breakpadId);
                     if (filepath) {
                       // NOTE: here and below, "return await" is used to ensure we catch any
                       // errors in the promise. A simple return would give the error to the
                       // caller.
                       return await parseSym({filepath});
                     }
                   }
                   break;
                 case "remoteBreakpad":
                   const url = urlForSymFile(debugName, breakpadId);
                   return await parseSym({url});
                 case "nm":
-                  return await getSymbolsFromNM(path);
+                  if (haveAbsolutePath) {
+                    const {path, arch} = cachedLibInfo;
+                    return await getSymbolsFromNM(path, arch);
+                  }
+                  break;
               }
             } catch (e) {
               // Each of our options can go wrong for a variety of reasons, so on failure
               // we will try the next one.
               // "localBreakpad" will fail if this is not a local build that's running from the object
               // directory or if the user hasn't run `mach buildsymbols` on it.
               // "remoteBreakpad" will fail if this is not an official mozilla build (e.g. Nightly) or a
               // known system library.
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1065,17 +1065,17 @@ BrowserGlue.prototype = {
 
     // Perform default browser checking.
     if (ShellService) {
       let shouldCheck = AppConstants.DEBUG ? false :
                                              ShellService.shouldCheckDefaultBrowser;
 
       const skipDefaultBrowserCheck =
         Services.prefs.getBoolPref("browser.shell.skipDefaultBrowserCheckOnFirstRun") &&
-        Services.prefs.getBoolPref("browser.shell.skipDefaultBrowserCheck");
+        !Services.prefs.getBoolPref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun");
 
       const usePromptLimit = !AppConstants.RELEASE_OR_BETA;
       let promptCount =
         usePromptLimit ? Services.prefs.getIntPref("browser.shell.defaultBrowserCheckCount") : 0;
 
       let willRecoverSession = false;
       try {
         let ss = Cc["@mozilla.org/browser/sessionstartup;1"].
@@ -1099,17 +1099,17 @@ BrowserGlue.prototype = {
       }
 
       let willPrompt = shouldCheck && !isDefault && !willRecoverSession;
 
       // Skip the "Set Default Browser" check during first-run or after the
       // browser has been run a few times.
       if (willPrompt) {
         if (skipDefaultBrowserCheck) {
-          Services.prefs.setBoolPref("browser.shell.skipDefaultBrowserCheck", false);
+          Services.prefs.setBoolPref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun", true);
           willPrompt = false;
         } else {
           promptCount++;
         }
         if (usePromptLimit && promptCount > 3) {
           willPrompt = false;
         }
       }
@@ -1661,18 +1661,19 @@ BrowserGlue.prototype = {
     let clickCallback = (subject, topic, data) => {
       if (topic != "alertclickcallback")
         return;
       this._openPreferences("sync");
     }
     AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
   },
 
+  // eslint-disable-next-line complexity
   _migrateUI: function BG__migrateUI() {
-    const UI_VERSION = 44;
+    const UI_VERSION = 45;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
 
     let currentUIVersion;
     if (Services.prefs.prefHasUserValue("browser.migration.version")) {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } else {
       // This is a new profile, nothing to migrate.
       Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -1956,16 +1957,25 @@ BrowserGlue.prototype = {
 
       Services.prefs.setBoolPref("toolkit.cosmeticAnimations.enabled", animate);
 
       Services.prefs.clearUserPref("browser.tabs.animate");
       Services.prefs.clearUserPref("browser.fullscreen.animate");
       Services.prefs.clearUserPref("alerts.disableSlidingEffect");
     }
 
+    if (currentUIVersion < 45) {
+      const LEGACY_PREF = "browser.shell.skipDefaultBrowserCheck";
+      if (Services.prefs.prefHasUserValue(LEGACY_PREF)) {
+        Services.prefs.setBoolPref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun",
+                                   !Services.prefs.getBoolPref(LEGACY_PREF));
+        Services.prefs.clearUserPref(LEGACY_PREF);
+      }
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   // ------------------------------
   // public nsIBrowserGlue members
   // ------------------------------
 
--- a/browser/components/preferences/in-content/advanced.xul
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -150,17 +150,17 @@
       <hbox id="unsupportedSystem" align="center">
         <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
         <spacer flex="1"/>
         <button label="&update.checkForUpdatesButton.label;"
                 accesskey="&update.checkForUpdatesButton.accesskey;"
                 disabled="true"/>
       </hbox>
       <hbox id="restarting" align="center">
-        <label>&update.restarting;</label>
+        <image class="update-throbber"/><label>&update.restarting;</label>
         <spacer flex="1"/>
         <button label="&update.updateButton.label3;"
                 accesskey="&update.updateButton.accesskey;"
                 disabled="true"/>
       </hbox>
     </deck>
   </vbox>
 #endif
--- a/browser/components/preferences/in-content/findInPage.js
+++ b/browser/components/preferences/in-content/findInPage.js
@@ -197,19 +197,18 @@ var gSearchResultsPane = {
       // Showing the Search Results Tag
       gotoPref("paneSearchResults");
 
       this.searchResultsCategory.hidden = false;
 
       let resultsFound = false;
 
       // Building the range for highlighted areas
-      let rootPreferences = document.getElementById("mainPrefPane")
-      let rootPreferencesChildren = rootPreferences
-        .querySelectorAll(":not([data-hidden-from-search])");
+      let rootPreferencesChildren = document
+        .querySelectorAll("#mainPrefPane > *:not([data-hidden-from-search])");
 
       // Showing all the children to bind JS, Access Keys, etc
       for (let i = 0; i < rootPreferencesChildren.length; i++) {
         rootPreferencesChildren[i].hidden = false;
       }
 
       // Showing or Hiding specific section depending on if words in query are found
       for (let i = 0; i < rootPreferencesChildren.length; i++) {
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -3273,18 +3273,16 @@ var SessionStoreInternal = {
 
     // We need to keep track of the initially open tabs so that they
     // can be moved to the end of the restored tabs.
     let initialTabs = [];
     if (!overwriteTabs && firstWindow) {
       initialTabs = Array.slice(tabbrowser.tabs);
     }
 
-    let numVisibleTabs = 0;
-
     let restoreTabsLazily = this._prefBranch.getBoolPref("sessionstore.restore_tabs_lazily") &&
       this._prefBranch.getBoolPref("sessionstore.restore_on_demand");
 
     for (var t = 0; t < newTabCount; t++) {
       let userContextId = winData.tabs[t].userContextId;
       let select = t == selectTab - 1;
       let createLazyBrowser = restoreTabsLazily && !select && !winData.tabs[t].pinned;
       let tab = tabbrowser.addTab("about:blank",
@@ -3304,19 +3302,16 @@ var SessionStoreInternal = {
         }
         tabsToRemove = 0;
       }
 
       tabs.push(tab);
 
       if (winData.tabs[t].hidden) {
         tabbrowser.hideTab(tabs[t]);
-      } else {
-        tabbrowser.showTab(tabs[t]);
-        numVisibleTabs++;
       }
     }
 
     for (let i = 0; i < newTabCount; ++i) {
       if (winData.tabs[i].pinned) {
         tabbrowser.pinTab(tabs[i]);
       } else {
         // Pinned tabs are clustered at the start of the tab strip. As
@@ -3330,22 +3325,16 @@ var SessionStoreInternal = {
       // Move the originally open tabs to the end
       let endPosition = tabbrowser.tabs.length - 1;
       for (let i = 0; i < initialTabs.length; i++) {
         tabbrowser.unpinTab(initialTabs[i]);
         tabbrowser.moveTabTo(initialTabs[i], endPosition);
       }
     }
 
-    // if all tabs to be restored are hidden, make the first one visible
-    if (!numVisibleTabs && winData.tabs.length) {
-      winData.tabs[0].hidden = false;
-      tabbrowser.showTab(tabs[0]);
-    }
-
     // We want to correlate the window with data from the last session, so
     // assign another id if we have one. Otherwise clear so we don't do
     // anything with it.
     delete aWindow.__SS_lastSessionWindowID;
     if (winData.__lastSessionWindowID)
       aWindow.__SS_lastSessionWindowID = winData.__lastSessionWindowID;
 
     if (overwriteTabs) {
deleted file mode 100644
index 013cdc4b9d2ec2b6586d9371dabe2b3d3c50a0b4..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -11,27 +11,22 @@
 @namespace svg url("http://www.w3.org/2000/svg");
 
 %include ../shared/browser.inc
 %include linuxShared.inc
 
 %include ../shared/browser.inc.css
 
 :root {
-  --backbutton-urlbar-overlap: 6px;
   --backbutton-border-color: var(--urlbar-border-color-hover);
   --backbutton-background: rgba(255,255,255,.15);
 
-  /* icon width + border + horizontal padding (without the overlap from backbutton-urlbar-overlap) */
-  --forwardbutton-width: 25px;
-
   --toolbarbutton-border-radius: 1px;
 
-  --toolbarbutton-vertical-inner-padding: 2px;
-  --toolbarbutton-vertical-text-padding: var(--toolbarbutton-vertical-inner-padding);
+  --toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-vertical-inner-padding) - 1px);
 
   --toolbarbutton-hover-background: rgba(255,255,255,.5) linear-gradient(rgba(255,255,255,.5), transparent);
   --toolbarbutton-hover-bordercolor: rgba(0,0,0,.25);
   --toolbarbutton-hover-boxshadow: none;
 
   --toolbarbutton-active-background: rgba(154,154,154,.5) linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.4));
   --toolbarbutton-active-bordercolor: rgba(0,0,0,.3);
   --toolbarbutton-active-boxshadow: 0 1px 1px rgba(0,0,0,.1) inset, 0 0 1px rgba(0,0,0,.3) inset;
deleted file mode 100644
index 29f15f7b8c20a39a79454fc8b81852daa36548a2..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/linux/downloads/indicator.css
+++ b/browser/themes/linux/downloads/indicator.css
@@ -24,19 +24,19 @@
 #downloads-button {
   --downloads-indicator-image: url("chrome://browser/skin/download.svg");
 }
 
 #downloads-button[cui-areatype="toolbar"] > #downloads-indicator-anchor > #downloads-indicator-icon {
   background: var(--downloads-indicator-image) center no-repeat;
   -moz-context-properties: fill;
   fill: var(--toolbarbutton-icon-fill);
-  width: 18px;
-  height: 18px;
-  background-size: 18px;
+  width: 16px;
+  height: 16px;
+  background-size: 16px;
 }
 
 toolbar[brighttext] #downloads-button[cui-areatype="toolbar"]:not([attention="success"]) > #downloads-indicator-anchor > #downloads-indicator-icon {
   fill: var(--toolbarbutton-icon-fill-inverted);
 }
 
 #downloads-button[attention="warning"] > .toolbarbutton-badge-stack > .toolbarbutton-badge,
 #downloads-button[attention="severe"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -7,30 +7,28 @@ browser.jar:
 % override chrome://global/skin/icons/warning-16.png moz-icon://stock/gtk-dialog-warning?size=menu
 #include ../shared/jar.inc.mn
   skin/classic/browser/sanitizeDialog.css
   skin/classic/browser/aboutSessionRestore-window-icon.png
   skin/classic/browser/aboutSyncTabs.css
 * skin/classic/browser/syncedtabs/sidebar.css     (syncedtabs/sidebar.css)
 * skin/classic/browser/browser.css
 * skin/classic/browser/compacttheme.css
-  skin/classic/browser/click-to-play-warning-stripes.png
   skin/classic/browser/Info.png
   skin/classic/browser/menuPanel-customize.png
   skin/classic/browser/menuPanel-customize@2x.png
   skin/classic/browser/menuPanel-exit.png
   skin/classic/browser/menuPanel-exit@2x.png
   skin/classic/browser/menuPanel-help.png
   skin/classic/browser/menuPanel-help@2x.png
   skin/classic/browser/monitor.png
   skin/classic/browser/monitor_16-10.png
 * skin/classic/browser/pageInfo.css
   skin/classic/browser/pageInfo.png
   skin/classic/browser/page-livemarks.png
-  skin/classic/browser/Privacy-16.png
   skin/classic/browser/privatebrowsing-mask.png
   skin/classic/browser/reload-stop-go.png
   skin/classic/browser/reload-stop-go@2x.png
   skin/classic/browser/searchbar.css
   skin/classic/browser/setDesktopBackground.css
   skin/classic/browser/slowStartup-16.png
   skin/classic/browser/Toolbar-small.png
   skin/classic/browser/webRTC-indicator.css  (../shared/webRTC-indicator.css)
--- a/browser/themes/linux/searchbar.css
+++ b/browser/themes/linux/searchbar.css
@@ -208,17 +208,17 @@ menuitem[cmd="cmd_clearhistory"][disable
 .search-panel-one-offs[compact=true] > .searchbar-engine-one-off-item.dummy:not(.last-of-row),
 .search-panel-one-offs[compact=true] > .searchbar-engine-one-off-item.last-engine,
 .search-setting-button-compact {
   background-image: none;
 }
 
 .searchbar-engine-one-off-item:not([selected]):not(.dummy):hover,
 .addengine-item:hover {
-  background-color: hsla(0, 0%, 0%, 0.06);
+  background-color: var(--arrowpanel-dimmed-further);
   color: inherit;
 }
 
 .searchbar-engine-one-off-item[selected] {
   background-color: Highlight;
   background-image: none;
   color: HighlightText;
 }
deleted file mode 100644
index 5291abce4103dc62005dc180fd5ed01f015eaeaa..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -13,26 +13,21 @@
 @namespace svg url("http://www.w3.org/2000/svg");
 
 %include ../shared/browser.inc.css
 
 :root {
   --space-above-tabbar: 9px;
   --tabs-toolbar-color: #333;
 
-  --backbutton-urlbar-overlap: 6px;
   --backbutton-border-color: rgba(0,0,0,0.2);
   --backbutton-background: linear-gradient(rgba(255,255,255,0.9),
                                            rgba(255,255,255,0.7)) repeat-x;
 
-  /* icon width + border + horizontal padding (without the overlap from backbutton-urlbar-overlap) */
-  --forwardbutton-width: 26px;
-
-  --toolbarbutton-vertical-inner-padding: 2px;
-  --toolbarbutton-vertical-text-padding: 4px;
+  --toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-vertical-inner-padding) + 1px);
 
   --toolbarbutton-border-radius: 3px;
 
   --toolbarbutton-hover-background: hsla(0,0%,100%,.1) linear-gradient(hsla(0,0%,100%,.3), hsla(0,0%,100%,.1)) padding-box;
   --toolbarbutton-hover-bordercolor: hsla(0,0%,0%,.2);
   --toolbarbutton-hover-boxshadow: 0 1px 0 hsla(0,0%,100%,.5),
                                    0 1px 0 hsla(0,0%,100%,.5) inset;
 
deleted file mode 100644
index 29f15f7b8c20a39a79454fc8b81852daa36548a2..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/osx/downloads/indicator.css
+++ b/browser/themes/osx/downloads/indicator.css
@@ -2,18 +2,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/. */
 
 %include ../../shared/downloads/indicator.inc.css
 
 /*** Status and progress indicator ***/
 
 #downloads-indicator-anchor {
-  min-width: 18px;
-  min-height: 18px;
+  min-width: 16px;
+  min-height: 16px;
 }
 
 #downloads-animation-container {
   min-height: 1px;
   min-width: 1px;
   height: 1px;
   margin-bottom: -1px;
   /* Makes the outermost animation container element positioned, so that its
@@ -29,17 +29,17 @@
 #downloads-button {
   --downloads-indicator-image: url("chrome://browser/skin/download.svg");
 }
 
 #downloads-indicator-icon {
   background: var(--downloads-indicator-image) center no-repeat;
   -moz-context-properties: fill;
   fill: var(--toolbarbutton-icon-fill);
-  background-size: 18px;
+  background-size: 16px;
 }
 
 toolbar[brighttext] #downloads-indicator-icon {
   fill: var(--toolbarbutton-icon-fill-inverted);
 }
 
 #downloads-button[attention="warning"] > .toolbarbutton-badge-stack > .toolbarbutton-badge,
 #downloads-button[attention="severe"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -6,17 +6,16 @@ browser.jar:
 % skin browser classic/1.0 %skin/classic/browser/
 #include ../shared/jar.inc.mn
   skin/classic/browser/sanitizeDialog.css
   skin/classic/browser/aboutSessionRestore-window-icon.png
   skin/classic/browser/aboutSyncTabs.css
 * skin/classic/browser/syncedtabs/sidebar.css          (syncedtabs/sidebar.css)
 * skin/classic/browser/browser.css
 * skin/classic/browser/compacttheme.css
-  skin/classic/browser/click-to-play-warning-stripes.png
   skin/classic/browser/Info.png
   skin/classic/browser/subtle-pattern.png
   skin/classic/browser/menu-back.png
   skin/classic/browser/menu-forward.png
   skin/classic/browser/menuPanel-customize.png
   skin/classic/browser/menuPanel-customize@2x.png
   skin/classic/browser/menuPanel-exit.png
   skin/classic/browser/menuPanel-exit@2x.png
--- a/browser/themes/osx/searchbar.css
+++ b/browser/themes/osx/searchbar.css
@@ -197,17 +197,17 @@
 .search-panel-one-offs[compact=true] > .searchbar-engine-one-off-item.dummy:not(.last-of-row),
 .search-panel-one-offs[compact=true] > .searchbar-engine-one-off-item.last-engine,
 .search-setting-button-compact {
   background-image: none;
 }
 
 .searchbar-engine-one-off-item:not([selected]):not(.dummy):hover,
 .addengine-item:hover {
-  background-color: hsla(0, 0%, 0%, 0.06);
+  background-color: var(--arrowpanel-dimmed-further);
   color: inherit;
 }
 
 .searchbar-engine-one-off-item[selected] {
   background-color: Highlight;
   background-image: none;
   color: HighlightText;
 }
--- a/browser/themes/shared/aboutNetError.css
+++ b/browser/themes/shared/aboutNetError.css
@@ -1,24 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 @import url("chrome://browser/skin/error-pages.css");
 
-body {
-  background-image: linear-gradient(-45deg, #eeeeee,     #eeeeee 33%,
-                                            #fbfbfb 33%, #fbfbfb 66%,
-                                            #eeeeee 66%, #eeeeee);
-}
-
-body.certerror {
-  background-image: linear-gradient(-45deg, #f0d000,     #f0d000 33%,
-                                            #fedc00 33%, #fedc00 66%,
-                                            #f0d000 66%, #f0d000);
+:root {
+  --exception-button-container-background: #F5F5F7;
 }
 
 body.captiveportal .title {
   background-image: url("wifi.svg");
 }
 
 body.certerror .title {
   background-image: url("cert-error.svg");
@@ -52,21 +44,16 @@ body:not(.neterror) #certErrorAndCaptive
 }
 
 body:not(.neterror) #netErrorButtonContainer {
   display: none;
 }
 
 #errorTryAgain {
   margin-top: 1.2em;
-  min-width: 150px;
-}
-
-#returnButton {
-  min-width: 250px;
 }
 
 #advancedButton {
   display: none;
 }
 
 body.captiveportal #returnButton {
   display: none;
@@ -83,36 +70,30 @@ body:not(.captiveportal) #openPortalLogi
 body:not(.neterror) #advancedButton {
   display: block;
 }
 
 #certificateErrorReporting {
   display: none;
 }
 
-.container {
-  position: relative;
-}
-
 #advancedPanelContainer {
   position: absolute;
-  padding: 24px 0;
   width: 100%;
+  left: 0;
 }
 
 .advanced-panel {
   /* Hidden until the link is clicked */
   display: none;
   background-color: white;
   border: 1px lightgray solid;
-  /* Don't use top padding because the default p style has top padding, and it
-   * makes the overall div look uneven */
-  padding: 0 12px 12px 12px;
-  box-shadow: 0 0 4px #ddd;
-  font-size: 0.9em;
+  margin: 48px auto;
+  min-width: var(--in-content-container-min-width);
+  max-width: var(--in-content-container-max-width);
 }
 
 #overrideWeakCryptoPanel {
   display: none;
   flex-direction: row;
   flex-wrap: wrap;
   justify-content: space-between;
   align-content: space-between;
@@ -134,37 +115,44 @@ span#hostname {
   text-decoration: none;
 }
 
 #errorCode[href] {
   white-space: nowrap;
 }
 
 #badCertTechnicalInfo {
+  margin: 3em;
   overflow: auto;
   white-space: pre-wrap;
 }
 
 #certificateErrorReporting {
   display: none;
 }
 
 #certificateErrorDebugInformation {
   display: none;
   background-color: var(--in-content-box-background-hover) !important;
   border-top: 1px solid var(--in-content-border-color);
   position: absolute;
-  left: 0%;
-  top: 100%;
-  width: 65%;
+  width: 100%;
   padding: 1em 17.5%;
+  box-sizing: border-box;
 }
 
 #certificateErrorText {
   font-family: monospace;
   white-space: pre-wrap;
   padding: 1em 0;
 }
 
 #cert_domain_link:not([href]) {
   color: var(--in-content-page-color);
   text-decoration: none;
-}
\ No newline at end of file
+}
+
+.exceptionDialogButtonContainer {
+  background-color: var(--exception-button-container-background);
+  display: flex;
+  justify-content: end;
+  padding: 10px;
+}
deleted file mode 100644
--- a/browser/themes/shared/content-contextmenu.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
-  <style>
-    path:not(:target),
-    polygon:not(:target) {
-      display: none;
-    }
-  </style>
-  <path id="back" fill-rule="evenodd" d="M1.192,8.893L2.21,9.964c0.064,0.065,0.136,0.117,0.214,0.159 l5.199,5.301c0.607,0.63,1.465,0.764,1.915,0.297l1.02-1.082c0.449-0.467,0.32-1.357-0.288-1.99l-2.116-2.158h5.705 c0.671,0,1.215-0.544,1.215-1.215v-2.43c0-0.671-0.544-1.215-1.215-1.215H8.094l2.271-2.309c0.609-0.626,0.737-1.512,0.288-1.974 L9.635,0.278C9.184-0.188,8.327-0.055,7.718,0.575L2.479,5.901C2.38,5.946,2.289,6.008,2.21,6.089L1.192,7.171 c-0.21,0.219-0.293,0.53-0.26,0.864C0.899,8.367,0.981,8.676,1.192,8.893z"/>
-  <path id="forward" fill-rule="evenodd" d="M14.808,7.107L13.79,6.036c-0.064-0.065-0.136-0.117-0.214-0.159 L8.377,0.576C7.77-0.054,6.912-0.189,6.461,0.278L5.441,1.36c-0.449,0.467-0.32,1.357,0.288,1.99l2.116,2.158H2.14 c-0.671,0-1.215,0.544-1.215,1.215v2.43c0,0.671,0.544,1.215,1.215,1.215h5.765l-2.271,2.309c-0.609,0.626-0.737,1.512-0.288,1.974 l1.019,1.072c0.451,0.465,1.308,0.332,1.917-0.297l5.238-5.326c0.1-0.045,0.191-0.107,0.269-0.188l1.019-1.082 c0.21-0.219,0.293-0.53,0.26-0.864C15.101,7.633,15.019,7.324,14.808,7.107z"/>
-  <path id="reload" fill-rule="evenodd" d="M15.429,8h-8l3.207-3.207C9.889,4.265,8.986,3.947,8,3.947 c-2.554,0-4.625,2.071-4.625,4.625S5.446,13.196,8,13.196c1.638,0,3.069-0.857,3.891-2.141l2.576,1.104 C13.199,14.439,10.794,16,8,16c-4.103,0-7.429-3.326-7.429-7.429S3.897,1.143,8,1.143c1.762,0,3.366,0.624,4.631,1.654L15.429,0V8z"/>
-  <polygon id="stop" points="16,2.748 13.338,0.079 8.038,5.391 2.661,0 0,2.669 5.377,8.059 0.157,13.292 2.819,15.961 8.039,10.728 13.298,16 15.959,13.331 10.701,8.06"/>
-  <path id="bookmark" d="M8.008,3.632l0.986,2.012l0.452,0.922l1.014,0.169l2.326,0.389l-1.719,1.799l-0.676,0.708l0.145,0.967 L10.896,13l-1.959-1.039l-0.937-0.497l-0.937,0.497l-1.957,1.038L5.468,10.6l0.146-0.968L4.937,8.924L3.219,7.126l2.351-0.39 l1.023-0.17l0.45-0.934L8.008,3.632 M8,0C7.72,0,7.44,0.217,7.228,0.65L5.242,4.766L0.907,5.485c-0.958,0.159-1.195,0.861-0.53,1.56 l3.113,3.258l-0.69,4.583c-0.105,0.689,0.172,1.092,0.658,1.092c0.185,0,0.399-0.058,0.635-0.181l3.906-2.072l3.906,2.072 c0.236,0.123,0.45,0.181,0.635,0.181c0.486,0,0.762-0.403,0.659-1.092l-0.687-4.583l3.109-3.255c0.666-0.702,0.428-1.404-0.53-1.564 l-4.303-0.719L8.772,0.65C8.56,0.217,8.28,0,8,0L8,0z"/>
-  <path id="bookmarked" d="M8,0C7.719,0,7.438,0.217,7.225,0.651L5.233,4.773l-4.35,0.72c-0.961,0.159-1.199,0.862-0.531,1.562 l3.124,3.262l-0.692,4.589C2.679,15.596,2.957,16,3.444,16c0.185,0,0.401-0.058,0.637-0.181L8,13.744l3.919,2.075 C12.156,15.942,12.372,16,12.557,16c0.487,0,0.764-0.404,0.661-1.094l-0.69-4.589l3.12-3.259c0.668-0.703,0.43-1.406-0.532-1.566 l-4.317-0.72L8.775,0.651C8.562,0.217,8.281,0,8,0L8,0z"/>
-</svg>
--- a/browser/themes/shared/contextmenu.inc.css
+++ b/browser/themes/shared/contextmenu.inc.css
@@ -7,42 +7,42 @@
 #context-navigation > .menuitem-iconic > .menu-iconic-left {
   -moz-appearance: none;
 }
 
 #context-navigation > .menuitem-iconic > .menu-iconic-left > .menu-iconic-icon {
   width: 16px;
   height: 16px;
   margin: 7px;
-  filter: url(chrome://global/skin/filters.svg#fill);
+  -moz-context-properties: fill;
   fill: currentColor;
 }
 
 #context-back {
-  list-style-image: url("chrome://browser/skin/content-contextmenu.svg#back");
+  list-style-image: url("chrome://browser/skin/back.svg");
 }
 
 #context-forward {
-  list-style-image: url("chrome://browser/skin/content-contextmenu.svg#forward");
+  list-style-image: url("chrome://browser/skin/forward.svg");
 }
 
 #context-reload {
-  list-style-image: url("chrome://browser/skin/content-contextmenu.svg#reload");
+  list-style-image: url("chrome://browser/skin/reload.svg");
 }
 
 #context-stop {
-  list-style-image: url("chrome://browser/skin/content-contextmenu.svg#stop");
+  list-style-image: url("chrome://browser/skin/stop.svg");
 }
 
 #context-bookmarkpage {
-  list-style-image: url("chrome://browser/skin/content-contextmenu.svg#bookmark");
+  list-style-image: url("chrome://browser/skin/bookmark-hollow.svg");
 }
 
 #context-bookmarkpage[starred=true] {
-  list-style-image: url("chrome://browser/skin/content-contextmenu.svg#bookmarked");
+  list-style-image: url("chrome://browser/skin/bookmark.svg");
 }
 
 #context-back:-moz-locale-dir(rtl),
 #context-forward:-moz-locale-dir(rtl),
 #context-reload:-moz-locale-dir(rtl) {
   transform: scaleX(-1);
 }
 
--- a/browser/themes/shared/downloads/indicator.inc.css
+++ b/browser/themes/shared/downloads/indicator.inc.css
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #downloads-indicator-progress-icon {
   background: var(--downloads-indicator-image) bottom no-repeat;
   -moz-context-properties: fill;
   fill: var(--toolbarbutton-icon-fill-attention);
-  background-size: 18px;
-  margin-top: 18px;
+  background-size: 16px;
+  margin-top: 16px;
   /* From javascript side we use animation delay from 0s to -100s to show
    * corresponding frames needed for progress.
    * animation-delay is set to a positive value to make nothing shown.
    */
   animation-play-state: paused;
   animation-delay: 1s;
   animation-duration: 100s;
   animation-timing-function: linear;
--- a/browser/themes/shared/error-pages.css
+++ b/browser/themes/shared/error-pages.css
@@ -15,16 +15,17 @@ body {
    * gets clipped in iframes with small width. We don't accomodate
    * any padding to prioritize real estate in the small viewport. */
   min-width: 13em;
 }
 
 .button-container {
   display: flex;
   flex-flow: row wrap;
+  justify-content: end;
 }
 
 .button-spacer {
   flex: 1;
 }
 
 @media only screen and (max-width: 959px) {
   body {
@@ -73,9 +74,9 @@ body {
   body {
     background-position: 10px -10px;
     padding-top: 38px;
     /* We get rid of bottom padding for width < 640px, but
      * for height < 480px a bit of space between the content
      * and the viewport edge is nice. */
     padding-bottom: 38px;
   }
-}
\ No newline at end of file
+}
--- a/browser/themes/shared/icons/addons.svg
+++ b/browser/themes/shared/icons/addons.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M12,17c0.5,0,1-0.5,1-1v-4c0,0,0.2-0.8,0.8-0.8c0.6,0,0.6,0.8,1.8,0.8 c0.6,0,1.5-0.2,1.5-2c0-1.8-0.9-2-1.5-2c-1.1,0-1.2,0.8-1.8,0.8C13.2,8.8,13,8,13,8V6c0-0.6-0.4-1-1-1H9c0,0-0.8-0.1-0.8-0.8 S9,3.6,9,2.5C9,1.9,8.8,1,7,1S5,1.9,5,2.5c0,1.1,0.8,1.2,0.8,1.8S5,5,5,5H2C1.4,5,1,5.4,1,6l0,2.5c0,0-0.1,1.5,1.1,1.5 c0.8,0,0.9-1,1.9-1c0.5,0,1,0.5,1,1.6c0,1-0.5,1.6-1,1.6c-1,0-1.1-1-1.9-1C0.9,11,1,12.5,1,12.5L1,16c0,0.6,0.4,1,1,1h3.9 c0,0,1.5,0.1,1.5-1.1c0-0.8-1-0.9-1-1.9c0-0.5,0.7-1.2,1.8-1.2s1.9,0.7,1.9,1.2c0,1-1,1.1-1,1.9c0,1.2,1.5,1.1,1.5,1.1H12z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M11 16a1.075 1.075 0 0 0 1-1v-4s.2-.8.8-.8.6.8 1.8.8c.6 0 1.5-.2 1.5-2s-.9-2-1.5-2c-1.1 0-1.2.8-1.8.8S12 7 12 7V5a.945.945 0 0 0-1-1H8s-.8-.1-.8-.8.8-.6.8-1.7C8 .9 7.8 0 6 0S4 .9 4 1.5c0 1.1.8 1.2.8 1.8S4 4 4 4H1a.945.945 0 0 0-1 1v2.5S-.1 9 1.1 9C1.9 9 2 8 3 8c.5 0 1 .5 1 1.6 0 1-.5 1.6-1 1.6-1 0-1.1-1-1.9-1C-.1 10 0 11.5 0 11.5V15a.945.945 0 0 0 1 1h3.9s1.5.1 1.5-1.1c0-.8-1-.9-1-1.9 0-.5.7-1.2 1.8-1.2s1.9.7 1.9 1.2c0 1-1 1.1-1 1.9 0 1.2 1.5 1.1 1.5 1.1z"/>
 </svg>
--- a/browser/themes/shared/icons/back-large.svg
+++ b/browser/themes/shared/icons/back-large.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15,11H8.8l2.8,2.8 c0.4,0.4,0.5,1.1,0.2,1.4l-1.2,1.2c-0.3,0.3-1,0.3-1.4-0.2L2.8,9.9c0,0-0.4-0.5-0.4-0.9c0-0.4,0.4-0.8,0.4-0.8l6.4-6.4 c0.4-0.4,1.1-0.5,1.4-0.2l1.2,1.2c0.3,0.3,0.3,1-0.2,1.4L8.9,7H15c0.6,0,1,0.4,1,1v2C16,10.6,15.6,11,15,11z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14 6H6.5l3-3a.967.967 0 0 0 0-1.4L8.7.7a.967.967 0 0 0-1.4 0L.7 7.3a.967.967 0 0 0 0 1.4l6.6 6.6a.967.967 0 0 0 1.4 0l.8-.8a.965.965 0 0 0 0-1.4l-3-3.1H14c.6 0 1-.2 1-.8V7a.945.945 0 0 0-1-1z"/>
 </svg>
--- a/browser/themes/shared/icons/back.svg
+++ b/browser/themes/shared/icons/back.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M14,11H9.2l1.9,1.9c0.5,0.5,0.6,1.2,0.2,1.6 l-0.8,0.9c-0.4,0.4-1.1,0.3-1.6-0.2L3.5,9.7C3.4,9.7,3.2,9.3,3.1,9c0-0.3,0.3-0.6,0.4-0.7l5.3-5.4c0.5-0.5,1.2-0.6,1.6-0.2l0.8,0.9 C11.6,4,11.5,4.7,11,5.2L9.2,7H14c0.6,0,1,0.4,1,1v2C15,10.6,14.6,11,14,11z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M13 6H8.2l2-2a.967.967 0 0 0 0-1.4l-.8-.9a.967.967 0 0 0-1.4 0L2.4 7.3a.967.967 0 0 0 0 1.4L8 14.3a.967.967 0 0 0 1.4 0l.8-.8a.965.965 0 0 0 0-1.4l-2-2.1H13c.6 0 1-.2 1-.8V7a.945.945 0 0 0-1-1z"/>
 </svg>
--- a/browser/themes/shared/icons/bookmark-hollow.svg
+++ b/browser/themes/shared/icons/bookmark-hollow.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M9,4.6l1,2l0.5,0.9l1,0.2l2.3,0.4l-1.7,1.8l-0.7,0.7l0.1,1l0.4,2.4l-2-1L9,12.5 L8.1,13l-2,1l0.4-2.4l0.1-1L5.9,9.9L4.2,8.1l2.4-0.4l1-0.2L8,6.6L9,4.6 M9,1C8.7,1,8.4,1.2,8.2,1.7l-2,4.1L1.9,6.5 c-1,0.2-1.2,0.9-0.5,1.6l3.1,3.3l-0.7,4.6C3.7,16.6,4,17,4.5,17c0.2,0,0.4-0.1,0.6-0.2L9,14.7l3.9,2.1c0.2,0.1,0.5,0.2,0.6,0.2 c0.5,0,0.8-0.4,0.7-1.1l-0.7-4.6l3.1-3.3c0.7-0.7,0.4-1.4-0.5-1.6l-4.3-0.7l-2-4.1C9.6,1.2,9.3,1,9,1L9,1z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M8 3.6l1 2 .5.9 1 .2 2.3.4-1.7 1.8-.7.7.1 1 .4 2.4-2-1-.9-.5-.9.5-2 1 .4-2.4.1-1-.7-.7-1.7-1.8 2.4-.4 1-.2.4-.9 1-2M8 0c-.3 0-.6.2-.8.7l-2 4.1-4.3.7c-1 .2-1.2.9-.5 1.6l3.1 3.3-.7 4.6c-.1.6.2 1 .7 1a1.421 1.421 0 0 0 .6-.2L8 13.7l3.9 2.1a2.073 2.073 0 0 0 .6.2c.5 0 .8-.4.7-1.1l-.7-4.6L15.6 7c.7-.7.4-1.4-.5-1.6l-4.3-.7-2-4.1A.938.938 0 0 0 8 0z"/>
 </svg>
--- a/browser/themes/shared/icons/bookmark.svg
+++ b/browser/themes/shared/icons/bookmark.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M9,1c-.3,0-.6.2-.8.7l-2,4.1-4.3.7c-1,.2-1.2.9-.5,1.6l3.1,3.3L3.8,16c-.1.6.2,1,.7,1l.6-.2L9,14.7l3.9,2.1.6.2c.5,0,.8-.4.7-1.1l-.7-4.6L16.6,8c.7-.7.4-1.4-.5-1.6l-4.3-.7-2-4.1A.9.9,0,0,0,9,1Z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M8.014 0c-.3 0-.6.2-.8.7l-2 4.1-4.3.7c-1 .2-1.2.9-.5 1.6l3.1 3.3-.7 4.6c-.1.6.2 1 .7 1l.6-.2 3.9-2.1 3.9 2.1.6.2c.5 0 .8-.4.7-1.1l-.7-4.6 3.1-3.3c.7-.7.4-1.4-.5-1.6l-4.3-.7-2-4.1a.9.9 0 0 0-.8-.6z"/>
 </svg>
--- a/browser/themes/shared/icons/bookmarksMenu.svg
+++ b/browser/themes/shared/icons/bookmarksMenu.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M14,16H4c-1.1,0-2-0.9-2-2V6 c0-1.1,0.9-2,2-2h2l3-3l3,3h2c1.1,0,2,0.9,2,2v8C16,15.1,15.1,16,14,16z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,9 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,9,5,9z M5,12c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,12,5,12z M14,6H7v2h7V6z M14,9H7 v2h7V9z M14,12H7v2h7V12z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M13 15H3a2.006 2.006 0 0 1-2-2V5a2.006 2.006 0 0 1 2-2h2l3-3 3 3h2a2.006 2.006 0 0 1 2 2v8a2.006 2.006 0 0 1-2 2zM4 5a.945.945 0 0 0-1 1 .945.945 0 0 0 1 1 .945.945 0 0 0 1-1 .945.945 0 0 0-1-1zm0 3a.945.945 0 0 0-1 1 .945.945 0 0 0 1 1 .945.945 0 0 0 1-1 .945.945 0 0 0-1-1zm0 3a1 1 0 0 0 0 2 1 1 0 0 0 0-2zm9-6H6v2h7zm0 3H6v2h7zm0 3H6v2h7z"/>
 </svg>
--- a/browser/themes/shared/icons/characterEncoding.svg
+++ b/browser/themes/shared/icons/characterEncoding.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M14,16H4c-1.1,0-2-0.9-2-2V4 c0-1.1,0.9-2,2-2h10c1.1,0,2,0.9,2,2v10C16,15.1,15.1,16,14,16z M14,6c0-1.7-1.3-3-3-3H7C5.3,3,4,4.3,4,6v4c0,1.7,1.3,3,3,3h4 c1.7,0,3-0.3,3-2V6z M11,9.2c0.3,0,0.6,0,0.9-0.1c0.3-0.1,0.5-0.2,0.8-0.3v0.8c-0.3,0.1-0.6,0.2-0.8,0.3C11.7,10,11.4,10,11,10 c-1,0-1.7-0.4-2.1-1.2C8.6,9.2,8.3,9.5,8,9.7C7.6,9.9,7.2,10,6.8,10c-0.6,0-1-0.2-1.3-0.5C5.1,9.3,5,8.8,5,8.3c0-0.6,0.2-1,0.6-1.3 c0.4-0.3,1.1-0.5,1.9-0.5l0.9,0V6.1c0-0.5-0.1-0.8-0.3-1C8,4.8,7.7,4.7,7.3,4.7c-0.5,0-1,0.1-1.6,0.4L5.5,4.5C5.7,4.4,6,4.2,6.4,4.1 C6.7,4.1,7,4,7.4,4c0.4,0,0.8,0.1,1.1,0.2C8.7,4.4,9,4.6,9.1,5c0.2-0.3,0.4-0.6,0.7-0.7c0.3-0.2,0.6-0.3,1-0.3 c0.7,0,1.2,0.2,1.6,0.7C12.8,5.2,13,5.8,13,6.6v0.6H9.4C9.4,8.6,10,9.2,11,9.2z M8.5,7.1l-0.8,0C7,7.1,6.6,7.2,6.3,7.4 C6,7.6,5.9,7.9,5.9,8.3c0,0.3,0.1,0.6,0.3,0.7c0.2,0.2,0.4,0.2,0.7,0.2c0.5,0,0.9-0.1,1.2-0.4c0.3-0.3,0.4-0.7,0.4-1.3V7.1z M12.1,6.5c0-0.6-0.1-1-0.3-1.3c-0.2-0.3-0.5-0.4-0.9-0.4c-0.4,0-0.7,0.1-1,0.4C9.6,5.5,9.5,5.9,9.4,6.5H12.1z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M13 15H3a2.006 2.006 0 0 1-2-2V3a2.006 2.006 0 0 1 2-2h10a2.006 2.006 0 0 1 2 2v10a2.006 2.006 0 0 1-2 2zm0-10a2.946 2.946 0 0 0-3-3H6a2.946 2.946 0 0 0-3 3v4a2.946 2.946 0 0 0 3 3h4c1.7 0 3-.3 3-2zm-3 3.2a2.769 2.769 0 0 0 .9-.1c.3-.1.5-.2.8-.3v.8a6.89 6.89 0 0 0-.8.3 2.22 2.22 0 0 1-.9.1 2.149 2.149 0 0 1-2.1-1.2 3.819 3.819 0 0 1-.9.9 2.663 2.663 0 0 1-1.2.3 1.728 1.728 0 0 1-1.3-.5A1.248 1.248 0 0 1 4 7.3 1.486 1.486 0 0 1 4.6 6a3.312 3.312 0 0 1 1.9-.5h.9v-.4a1.327 1.327 0 0 0-.3-1c-.1-.3-.4-.4-.8-.4a3.429 3.429 0 0 0-1.6.4l-.2-.6a3.919 3.919 0 0 1 .9-.4c.3 0 .6-.1 1-.1a3.6 3.6 0 0 1 1.1.2 1.7 1.7 0 0 1 .6.8 1.575 1.575 0 0 1 .7-.7 1.689 1.689 0 0 1 1-.3 1.865 1.865 0 0 1 1.6.7 2.883 2.883 0 0 1 .6 1.9v.6H8.4c0 1.4.6 2 1.6 2zM7.5 6.1h-.8a2.42 2.42 0 0 0-1.4.3.975.975 0 0 0-.4.9.779.779 0 0 0 .3.7.844.844 0 0 0 .7.2 1.594 1.594 0 0 0 1.2-.4 1.7 1.7 0 0 0 .4-1.3zm3.6-.6a2.269 2.269 0 0 0-.3-1.3.975.975 0 0 0-.9-.4 1.284 1.284 0 0 0-1 .4 2.226 2.226 0 0 0-.5 1.3z"/>
 </svg>
--- a/browser/themes/shared/icons/chevron.svg
+++ b/browser/themes/shared/icons/chevron.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M11.6,13H8.5l3.8-4L8.5,5h3l3.9,4L11.6,13 z M6.6,13H3.5l3.8-4L3.5,5h3l3.9,4L6.6,13z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M10.6 12H7.5l3.8-4-3.8-4h3l3.9 4zm-5 0H2.5l3.8-4-3.8-4h3l3.9 4z"/>
 </svg>
--- a/browser/themes/shared/icons/containers.svg
+++ b/browser/themes/shared/icons/containers.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M13,5H5V9h8ZM11,7.75a.25.25,0,0,1-.25.25H7.25A.25.25,0,0,1,7,7.75v-.5A.25.25,0,0,1,7.25,7h3.5a.25.25,0,0,1,.25.25ZM13,10H5v4h8Zm-2,2.75a.25.25,0,0,1-.25.25H7.25A.25.25,0,0,1,7,12.75v-.5A.25.25,0,0,1,7.25,12h3.5a.25.25,0,0,1,.25.25Zm3.854-9.9L14,2H4l-.854.853A.5.5,0,0,0,3,3.207V15a1,1,0,0,0,1,1H14a1,1,0,0,0,1-1V3.207A.5.5,0,0,0,14.854,2.853ZM14,15H4V4H14Z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M12 4H4v4h8zm-2 2.75a.25.25 0 0 1-.25.25h-3.5A.25.25 0 0 1 6 6.75v-.5A.25.25 0 0 1 6.25 6h3.5a.25.25 0 0 1 .25.25zM12 9H4v4h8zm-2 2.75a.25.25 0 0 1-.25.25h-3.5a.25.25 0 0 1-.25-.25v-.5a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25zm3.854-9.9L13 1H3l-.854.853A.5.5 0 0 0 2 2.207V14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2.207a.5.5 0 0 0-.146-.354zM13 14H3V3h10z"/>
 </svg>
--- a/browser/themes/shared/icons/devTools-panel.svg
+++ b/browser/themes/shared/icons/devTools-panel.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M14,17H4a2,2,0,0,1-2-2V7A2,2,0,0,1,4,5H6L9,2l3,3h2a2,2,0,0,1,2,2v8A2,2,0,0,1,14,17ZM13.66,7.631L11.841,9.448a0.917,0.917,0,1,1-1.3-1.3l1.81-1.807a2.979,2.979,0,0,0-4.168,3.694L4.38,13.808a1.271,1.271,0,0,0,0,1.808,1.3,1.3,0,0,0,1.824,0l3.819-3.783a2.98,2.98,0,0,0,3.99-2.823A2.957,2.957,0,0,0,13.66,7.631ZM5.5,15.005a0.5,0.5,0,1,1,.5-0.5A0.5,0.5,0,0,1,5.5,15.005Z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M13 15H3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h2l3-3 3 3h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2zm-.34-9.369l-1.819 1.817a.919.919 0 1 1-1.3-1.3l1.81-1.807a2.979 2.979 0 0 0-4.168 3.694l-3.8 3.773a1.271 1.271 0 0 0-.011 1.8l.011.011a1.3 1.3 0 0 0 1.824 0l3.816-3.786a2.975 2.975 0 0 0 3.637-4.2zM4.5 13.005a.5.5 0 1 1 .5-.5.5.5 0 0 1-.5.5z"/>
 </svg>
--- a/browser/themes/shared/icons/developer.svg
+++ b/browser/themes/shared/icons/developer.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M13.2,6.5L15.8,4 c0.3,0.6,0.5,1.2,0.5,1.9c0,2.2-1.8,4-4.1,4c-0.5,0-1-0.1-1.4-0.3l-6,5.9c-0.6,0.6-1.7,0.6-2.3,0s-0.6-1.6,0-2.3l5.9-5.9 c-0.2-0.5-0.3-1-0.3-1.6c0-2.2,1.8-4,4.1-4c0.7,0,1.3,0.2,1.9,0.5l-2.5,2.5c-0.2,0.2-0.7,1,0,1.7C12.2,7.2,13,6.6,13.2,6.5z M3.6,13.6c-0.5,0-0.9,0.4-0.9,0.9c0,0.5,0.4,0.9,0.9,0.9c0.5,0,0.9-0.4,0.9-0.9C4.5,14,4.1,13.6,3.6,13.6z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M12.2 5.5L14.8 3a4.136 4.136 0 0 1 .5 1.9 4.034 4.034 0 0 1-4.1 4 3.194 3.194 0 0 1-1.4-.3l-6 5.9a1.694 1.694 0 0 1-2.3 0 1.693 1.693 0 0 1 0-2.3l5.9-5.9a4.146 4.146 0 0 1-.3-1.6 4.034 4.034 0 0 1 4.1-4 4.136 4.136 0 0 1 1.9.5l-2.5 2.5a1.2 1.2 0 0 0 0 1.7c.6.8 1.4.2 1.6.1zm-9.6 7.1a.9.9 0 1 0 .9.9.9.9 0 0 0-.9-.9z"/>
 </svg>
--- a/browser/themes/shared/icons/download.svg
+++ b/browser/themes/shared/icons/download.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15.6,10.1L10,15.6C9.8,15.9,9.4,16,9,16 c-0.4,0-0.8-0.1-1.1-0.4l-5.6-5.5C1.8,9.5,1.9,9,2.7,9L6,9V3c0-0.6,0.4-1,1-1h4c0.6,0,1,0.4,1,1v6h3.2C16,9,16.2,9.5,15.6,10.1z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14.6 9.1L9 14.6a1.159 1.159 0 0 1-1 .4 1.5 1.5 0 0 1-1.1-.4L1.3 9.1C.8 8.5.9 8 1.7 8H5V2a.945.945 0 0 1 1-1h4a.945.945 0 0 1 1 1v6h3.2c.8 0 1 .5.4 1.1z"/>
 </svg>
--- a/browser/themes/shared/icons/edit-copy.svg
+++ b/browser/themes/shared/icons/edit-copy.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15,16H9c-0.6,0-1-0.4-1-1v-3V9.4V7 c0-0.6,0.4-1,1-1c0,0,3.2,0,5,0c0,0,2,2,2,2c0,2.2,0,7,0,7C16,15.6,15.6,16,15,16z M13,7v2h2L13,7z M7,5.9V7v1.9V12H3 c-0.6,0-1-0.4-1-1V3c0-0.6,0.4-1,1-1c0,0,3.2,0,5,0c0,0,2,2,2,2c0,0.4,0,0.8,0,1.3H7.5C7.2,5.4,7,5.6,7,5.9z M7,3v2h2L7,3z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14 15H8a.945.945 0 0 1-1-1V6a.945.945 0 0 1 1-1h5l2 2v7a.945.945 0 0 1-1 1zm-2-9v2h2zM6 4.9V11H2a.945.945 0 0 1-1-1V2a.945.945 0 0 1 1-1h5l2 2v1.3H6.5a.634.634 0 0 0-.5.6zM6 2v2h2z"/>
 </svg>
--- a/browser/themes/shared/icons/edit-cut.svg
+++ b/browser/themes/shared/icons/edit-cut.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M14.7,16c-0.8,0-1.5-0.2-2.3-1.3 c-0.8-1.1-1.7-2.5-1.7-2.5s-0.7-0.9-1.1-1.6c-0.5-0.7-1.1-0.5-1.1-0.5S5.6,5.4,5.1,4.7C4.5,3.7,5.7,2,5.7,2l4.4,7 c0,0,1.4,1.9,1.9,2.3c0.5,0.4,1.4-0.4,2.8,0.9C16.7,14,16.1,16,14.7,16z M14.4,13.1c-0.9-1-1.7-0.9-1.9-0.6c-0.2,0.3,0,1.2,0.4,1.7 c0.4,0.5,0.8,0.7,1.4,0.7C14.9,15,15.4,14.2,14.4,13.1z M10.6,8.4L9.4,6.6L12.3,2c0,0,1.2,1.7,0.6,2.7C12.6,5.1,11.5,7,10.6,8.4z M6,11.3c0.3-0.3,1-1.1,1.4-1.7l0.8,1.2c-0.4,0.6-0.9,1.4-0.9,1.4s-0.9,1.4-1.7,2.5C4.9,15.8,4.2,16,3.3,16c-1.4,0-2.1-2-0.1-3.8 C4.6,11,5.5,11.7,6,11.3z M3.6,13.1c-0.9,1-0.4,1.8,0.2,1.8c0.6,0,1-0.2,1.4-0.7c0.4-0.5,0.6-1.5,0.4-1.7 C5.3,12.2,4.5,12.1,3.6,13.1z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M13.7 15a2.56 2.56 0 0 1-2.3-1.3c-.8-1.1-1.7-2.5-1.7-2.5a16.977 16.977 0 0 1-1.1-1.6 1.009 1.009 0 0 0-1.1-.5S4.6 4.4 4.1 3.7c-.6-1 .6-2.7.6-2.7l4.4 7a22.156 22.156 0 0 0 1.9 2.3c.5.4 1.4-.4 2.8.9 1.9 1.8 1.3 3.8-.1 3.8zm-.3-2.9c-.9-1-1.7-.9-1.9-.6a1.955 1.955 0 0 0 .4 1.7 1.622 1.622 0 0 0 1.4.7c.6.1 1.1-.7.1-1.8zM9.6 7.4L8.4 5.6 11.3 1s1.2 1.7.6 2.7c-.3.4-1.4 2.3-2.3 3.7zM5 10.3a14.119 14.119 0 0 0 1.4-1.7l.8 1.2c-.4.6-.9 1.4-.9 1.4s-.9 1.4-1.7 2.5A2.381 2.381 0 0 1 2.3 15c-1.4 0-2.1-2-.1-3.8 1.4-1.2 2.3-.5 2.8-.9zm-2.4 1.8c-.9 1-.4 1.8.2 1.8a1.622 1.622 0 0 0 1.4-.7c.4-.5.6-1.5.4-1.7-.3-.3-1.1-.4-2 .6z"/>
 </svg>
--- a/browser/themes/shared/icons/edit-paste.svg
+++ b/browser/themes/shared/icons/edit-paste.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M12.5,16h-7C4.7,16,4,15.3,4,14.5v-9 C4,4.7,4.7,4,5.5,4H7c0,0,0-2,2-2s2,2,2,2h1.5C13.3,4,14,4.7,14,5.5v9C14,15.3,13.3,16,12.5,16z M11.7,5l-1.1-0.5c0,0,0-1.5-1.6-1.5 C7.4,3,7.4,4.5,7.4,4.5L6.3,5L5.8,6h2.5h3.2h0.8L11.7,5z M11.8,6.7H7.1l-3,1.7l2.8,4.9l6.6-3.8L11.8,6.7z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M11.5 15h-7A1.538 1.538 0 0 1 3 13.5v-9A1.538 1.538 0 0 1 4.5 3H6a1.959 1.959 0 0 1 2-2 1.959 1.959 0 0 1 2 2h1.5A1.538 1.538 0 0 1 13 4.5v9a1.538 1.538 0 0 1-1.5 1.5zm-.8-11l-1.1-.5A1.5 1.5 0 0 0 8 2a1.5 1.5 0 0 0-1.6 1.5L5.3 4l-.5 1h6.5zm.1 1.7H6.1l-3 1.7 2.8 4.9 6.6-3.8z"/>
 </svg>
--- a/browser/themes/shared/icons/feed.svg
+++ b/browser/themes/shared/icons/feed.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15.3,16h-1.5c-0.4,0-0.8-0.3-0.8-0.8 c0,0,0.3-3.6-3.2-7.2C7.3,5,2.8,4.8,2.8,4.8C2.3,4.8,2,4.5,2,4.1V2.7C2,2.3,2.3,2,2.8,2c0,0,6.3,0.4,9.6,4.5 c3.3,3.1,3.6,8.8,3.6,8.8C16,15.7,15.8,16,15.3,16z M2.8,7c0,0,3.7,0.5,5.8,2.4c2.1,2,2.5,5.9,2.5,5.9c0,0.4-0.1,0.8-0.5,0.8H9.1 c-0.4,0-0.6-0.3-0.6-0.8c0,0,0.1-2.4-1.8-4.2C5.2,9.8,2.8,9.7,2.8,9.7C2.3,9.7,2,9.4,2,9V7.7C2,7.3,2.3,7,2.8,7z M4,12 c1.1,0,2,0.9,2,2s-0.9,2-2,2c-1.1,0-2-0.9-2-2S2.9,12,4,12z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14.3 15h-1.5a.789.789 0 0 1-.8-.8s.3-3.6-3.2-7.2c-2.5-3-7-3.2-7-3.2a.713.713 0 0 1-.8-.7V1.7a.713.713 0 0 1 .8-.7s6.3.4 9.6 4.5c3.3 3.1 3.6 8.8 3.6 8.8a.632.632 0 0 1-.7.7zM1.8 6s3.7.5 5.8 2.4c2.1 2 2.5 5.9 2.5 5.9 0 .4-.1.8-.5.8H8.1c-.4 0-.6-.3-.6-.8a5.929 5.929 0 0 0-1.8-4.2 7.256 7.256 0 0 0-3.9-1.4A.713.713 0 0 1 1 8V6.7a.713.713 0 0 1 .8-.7zM3 11a2 2 0 1 1-2 2 2.006 2.006 0 0 1 2-2z"/>
 </svg>
--- a/browser/themes/shared/icons/find.svg
+++ b/browser/themes/shared/icons/find.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M10.5,2C7.5,2,5,4.5,5,7.5c0,1.1,0.3,2.1,0.9,3L2.3,14c-0.4,0.4-0.4,1.2,0,1.6 C2.6,15.9,2.9,16,3.1,16s0.6-0.1,0.8-0.3l3.5-3.5c0.9,0.6,1.9,0.9,3,0.9c3,0,5.5-2.5,5.5-5.5S13.5,2,10.5,2z M10.5,11 C8.6,11,7,9.4,7,7.5S8.6,4,10.5,4S14,5.6,14,7.5S12.4,11,10.5,11z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M9.5 1A5.549 5.549 0 0 0 4 6.5a5.291 5.291 0 0 0 .9 3L1.3 13a1.217 1.217 0 0 0 0 1.6 1.2 1.2 0 0 0 .8.4 1.33 1.33 0 0 0 .8-.3l3.5-3.5a5.291 5.291 0 0 0 3 .9A5.551 5.551 0 0 0 9.5 1zm0 9A3.543 3.543 0 0 1 6 6.5a3.5 3.5 0 0 1 7 0A3.543 3.543 0 0 1 9.5 10z"/>
 </svg>
--- a/browser/themes/shared/icons/forget.svg
+++ b/browser/themes/shared/icons/forget.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M9,17a8,8,0,1,1,8-8A8,8,0,0,1,9,17ZM8.981,4.845V2.685L5.605,5.458,8.981,8.4V6.126A2.815,2.815,0,0,1,11.875,9,2.791,2.791,0,0,1,9,11.875,2.884,2.884,0,0,1,6.184,10H5.017A4.281,4.281,0,0,0,9,13.156,4.3,4.3,0,0,0,13.188,9,4.327,4.327,0,0,0,8.981,4.845Z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M8 16a8 8 0 1 1 8-8 8 8 0 0 1-8 8zM7.981 3.845v-2.16L4.605 4.458 7.981 7.4V5.126a2.815 2.815 0 0 1 2.894 2.734V8a2.791 2.791 0 0 1-2.7 2.875h-.171A2.884 2.884 0 0 1 5.184 9H4.017A4.281 4.281 0 0 0 8 12.156 4.3 4.3 0 0 0 12.188 8a4.327 4.327 0 0 0-4.207-4.155z"/>
 </svg>
--- a/browser/themes/shared/icons/forward.svg
+++ b/browser/themes/shared/icons/forward.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M3,10V8c0-0.6,0.4-1,1-1h4.8L7,5.2 C6.5,4.7,6.4,4,6.8,3.6l0.8-0.9C8,2.3,8.7,2.4,9.2,2.9l5.3,5.4c0.1,0.1,0.4,0.4,0.4,0.7c0,0.3-0.3,0.7-0.4,0.7l-5.4,5.4 c-0.5,0.5-1.2,0.6-1.6,0.2l-0.8-0.9c-0.4-0.4-0.3-1.1,0.2-1.6L8.8,11H4C3.4,11,3,10.6,3,10z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M2 7v2.2c0 .6.4.8 1 .8h4.8l-2 2.1a.965.965 0 0 0 0 1.4l.8.8a.967.967 0 0 0 1.4 0l5.6-5.6a.967.967 0 0 0 0-1.4L8 1.7a.967.967 0 0 0-1.4 0l-.8.9a.967.967 0 0 0 0 1.4l2 2H3a.945.945 0 0 0-1 1z"/>
 </svg>
--- a/browser/themes/shared/icons/fullscreen.svg
+++ b/browser/themes/shared/icons/fullscreen.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M13,12V6l3,3L13,12z M6,13h6l-3,3L6,13 z M11,12H7c-0.6,0-1-0.4-1-1V7c0-0.6,0.4-1,1-1h4c0.6,0,1,0.4,1,1v4C12,11.5,11.6,12,11,12z M11,9c0-0.6-0.4-1-1-1H8 C7.4,8,7,8.4,7,9v1c0,0.6,0.4,1,1,1h2c0.6,0,1-0.4,1-1V9z M9,2l3,3H6L9,2z M5,6v6L2,9L5,6z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M12 11V5l3 3zm-7 1h6l-3 3zm5-1H6a.945.945 0 0 1-1-1V6a.945.945 0 0 1 1-1h4a.945.945 0 0 1 1 1v4a1 1 0 0 1-1 1zm0-3a.945.945 0 0 0-1-1H7a.945.945 0 0 0-1 1v1a.945.945 0 0 0 1 1h2a.945.945 0 0 0 1-1zM8 1l3 3H5zM4 5v6L1 8z"/>
 </svg>
--- a/browser/themes/shared/icons/history.svg
+++ b/browser/themes/shared/icons/history.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M9,16.1c-4,0-7.2-3.2-7.2-7.2 C1.8,5,5,1.8,9,1.8c4,0,7.2,3.2,7.2,7.2C16.2,12.9,13,16.1,9,16.1z M9,4C6.2,4,4,6.2,4,9c0,2.7,2.2,5,5,5c2.8,0,5-2.2,5-5 C14,6.2,11.8,4,9,4z M8.7,9.9C8.3,9.8,8,9.4,8,9V6c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1v2.8c1.1,1.1,2,3.2,2,3.2S9.8,11,8.7,9.9z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M8 15.1A7.15 7.15 0 1 1 15.2 8 7.149 7.149 0 0 1 8 15.1zM8 3a4.951 4.951 0 0 0-5 5 5.015 5.015 0 0 0 5 5 4.951 4.951 0 0 0 5-5 4.951 4.951 0 0 0-5-5zm-.3 5.9A.961.961 0 0 1 7 8V5a.945.945 0 0 1 1-1 .945.945 0 0 1 1 1v2.8a12.417 12.417 0 0 1 2 3.2 13.906 13.906 0 0 1-3.3-2.1z"/>
 </svg>
--- a/browser/themes/shared/icons/home.svg
+++ b/browser/themes/shared/icons/home.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15,9L9,4L3,9H1l8-7l8,7H15z M14,9v7h-4v-5H8 v5H4V9l5-4L14,9z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14 8L8 3 2 8H0l8-7 8 7zm-1 0v7H9v-5H7v5H3V8l5-4z"/>
 </svg>
--- a/browser/themes/shared/icons/mail.svg
+++ b/browser/themes/shared/icons/mail.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M10.8,9c0,0-0.6,0.8-1.8,0.8 C7.8,9.8,7.2,9,7.2,9l-6-5.1C1.5,3.4,2.1,3,2.8,3h12.4c0.7,0,1.3,0.4,1.6,0.9L10.8,9z M7.2,10.7c0,0,0.6,0.8,1.8,0.8 c1.2,0,1.8-0.8,1.8-0.8L17,5.3v8c0,0.9-0.8,1.7-1.8,1.7H2.8c-1,0-1.8-0.8-1.8-1.7v-8L7.2,10.7z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M9.8 8a2.319 2.319 0 0 1-1.8.8A2.319 2.319 0 0 1 6.2 8l-6-5.1A1.893 1.893 0 0 1 1.8 2h12.4a1.893 1.893 0 0 1 1.6.9zM6.2 9.7a2.319 2.319 0 0 0 1.8.8 2.319 2.319 0 0 0 1.8-.8L16 4.3v8a1.774 1.774 0 0 1-1.8 1.7H1.8A1.774 1.774 0 0 1 0 12.3v-8z"/>
 </svg>
--- a/browser/themes/shared/icons/menu.svg
+++ b/browser/themes/shared/icons/menu.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15.5,11h-13C1.7,11,1,10.3,1,9.5 C1,8.7,1.7,8,2.5,8h13C16.3,8,17,8.7,17,9.5C17,10.3,16.3,11,15.5,11z M15.5,6h-13C1.7,6,1,5.3,1,4.5S1.7,3,2.5,3h13 C16.3,3,17,3.7,17,4.5S16.3,6,15.5,6z M2.5,13h13c0.8,0,1.5,0.7,1.5,1.5S16.3,16,15.5,16h-13C1.7,16,1,15.3,1,14.5S1.7,13,2.5,13z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14.5 10h-13a1.5 1.5 0 0 1 0-3h13a1.5 1.5 0 0 1 0 3zm0-5h-13A1.538 1.538 0 0 1 0 3.5 1.538 1.538 0 0 1 1.5 2h13A1.538 1.538 0 0 1 16 3.5 1.538 1.538 0 0 1 14.5 5zm-13 7h13a1.5 1.5 0 0 1 0 3h-13a1.5 1.5 0 0 1 0-3z"/>
 </svg>
--- a/browser/themes/shared/icons/new-tab.svg
+++ b/browser/themes/shared/icons/new-tab.svg
@@ -1,6 +1,8 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M18,12v2a1,1,0,0,1-1,1H2a1,1,0,0,1-1-1V12a1,1,0,0,1,1-1H1.142c2.3,0,2.536-1.773,2.875-4,0.351-2.316.083-4,3.13-4h4.707C14.917,3,14.647,4.684,15,7c0.34,2.228.582,4,2.89,4H17A1,1,0,0,1,18,12ZM11.5,8H10V6.5a0.5,0.5,0,1,0-1,0V8H7.5a0.5,0.5,0,0,0,0,1H9v1.5a0.5,0.5,0,1,0,1,0V9h1.5A0.5,0.5,0,1,0,11.5,8Z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M13 9V5a3 3 0 0 0-3-3H5a3 3 0 0 0-3 3v4a1 1 0 0 1-1 1 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1 1 1 0 0 1-1-1z"/>
+  <rect x="5" y="7" width="5" height="1" rx=".5" ry=".5" fill="#fff7f8"/>
+  <rect x="5" y="7" width="5" height="1" rx=".5" ry=".5" transform="rotate(90 7.5 7.5)" fill="#fff7f8"/>
 </svg>
--- a/browser/themes/shared/icons/new-window.svg
+++ b/browser/themes/shared/icons/new-window.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15.5,16h-13C1.7,16,1,15.3,1,14.5v-11 C1,2.7,1.7,2,2.5,2h13C16.3,2,17,2.7,17,3.5v11C17,15.3,16.3,16,15.5,16z M9.5,3C9.2,3,9,3.2,9,3.5S9.2,4,9.5,4S10,3.8,10,3.5 S9.8,3,9.5,3z M11.4,3c-0.3,0-0.5,0.2-0.5,0.5S11.2,4,11.4,4c0.3,0,0.5-0.2,0.5-0.5S11.7,3,11.4,3z M14.5,3h-1C13.2,3,13,3.2,13,3.5 S13.2,4,13.5,4h1C14.8,4,15,3.8,15,3.5S14.8,3,14.5,3z M15,7c0-0.6-0.4-1-1-1H4C3.4,6,3,6.4,3,7v6c0,0.6,0.4,1,1,1h10 c0.6,0,1-0.4,1-1V7z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14.5 15h-13A1.538 1.538 0 0 1 0 13.5v-11A1.538 1.538 0 0 1 1.5 1h13A1.538 1.538 0 0 1 16 2.5v11a1.538 1.538 0 0 1-1.5 1.5zm-6-13a.472.472 0 0 0-.5.5.5.5 0 0 0 1 0 .472.472 0 0 0-.5-.5zm1.9 0a.472.472 0 0 0-.5.5.536.536 0 0 0 .5.5.472.472 0 0 0 .5-.5.472.472 0 0 0-.5-.5zm3.1 0h-1a.472.472 0 0 0-.5.5.472.472 0 0 0 .5.5h1a.472.472 0 0 0 .5-.5.472.472 0 0 0-.5-.5zm.5 4a.945.945 0 0 0-1-1H3a.945.945 0 0 0-1 1v6a.945.945 0 0 0 1 1h10a.945.945 0 0 0 1-1z"/>
 </svg>
--- a/browser/themes/shared/icons/open.svg
+++ b/browser/themes/shared/icons/open.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M2,6V3c0-0.6,0.5-1,1-1h4 c0.5,0,1.2,0.9,1.2,0.9L9,4l6.5,0C15.8,4,16,4.2,16,4.5V6H2z M1.6,7h14.8c0.2,0,0.3,0.2,0.3,0.3c0,0-0.4,2.1-0.5,4.2 c-0.1,2.1-0.2,4.1-0.2,4.1c0,0.2-0.2,0.4-0.4,0.4H2.3C2.1,16,2,15.8,2,15.6c0,0,0.1-1.6-0.2-4.1C1.6,9.4,1.3,7.3,1.3,7.3 C1.3,7.2,1.5,7,1.6,7z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M1 5V2a1 1 0 0 1 1-1h4c.5 0 1.2.9 1.2.9L8 3h6.5a.472.472 0 0 1 .5.5V5zM.6 6h14.8a.319.319 0 0 1 .3.3 34.537 34.537 0 0 0-.5 4.2c-.1 2.1-.2 4.1-.2 4.1a.43.43 0 0 1-.4.4H1.3c-.2 0-.3-.2-.3-.4a24.983 24.983 0 0 0-.2-4.1C.6 8.4.3 6.3.3 6.3A.451.451 0 0 1 .6 6z"/>
 </svg>
--- a/browser/themes/shared/icons/print.svg
+++ b/browser/themes/shared/icons/print.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M16,14h-2l1,2H3l1-2H2c-0.6,0-1-0.4-1-1V8 c0-0.6,0.4-1,1-1h1V5c0-0.6,0.4-1,1-1V3c0-0.6,0.4-1,1-1h8c0.6,0,1,0.4,1,1v1c0.6,0,1,0.4,1,1v2h1c0.6,0,1,0.4,1,1v5 C17,13.6,16.6,14,16,14z M4,14l0.5-1H4V14z M4.5,9H4H3.5C3.2,9,3,9.2,3,9.5S3.2,10,3.5,10h1C4.8,10,5,9.8,5,9.5S4.8,9,4.5,9z M13,4 c0-0.6-0.4-1-1-1H6C5.4,3,5,3.4,5,4v3c0,0.6,0.4,1,1,1h6c0.6,0,1-0.4,1-1V4z M12.1,13H5.9L5,15h8L12.1,13z M14,13h-0.5l0.5,1V13z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M15 13h-2l1 2H2l1-2H1a.945.945 0 0 1-1-1V7a.945.945 0 0 1 1-1h1V4a.945.945 0 0 1 1-1V2a.945.945 0 0 1 1-1h8a.945.945 0 0 1 1 1v1a.945.945 0 0 1 1 1v2h1a.945.945 0 0 1 1 1v5a.945.945 0 0 1-1 1zM3 13l.5-1H3zm.5-5h-1a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1zM12 3a.945.945 0 0 0-1-1H5a.945.945 0 0 0-1 1v3a.945.945 0 0 0 1 1h6a.945.945 0 0 0 1-1zm-.9 9H4.9L4 14h8zm1.9 0h-.5l.5 1z"/>
 </svg>
--- a/browser/themes/shared/icons/privateBrowsing.svg
+++ b/browser/themes/shared/icons/privateBrowsing.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M16.7,7.5 c-0.1,1.1,0.2,2.5-1.3,4.4C13.9,14,12.3,14,12,14c-1.8-0.1-2-1.5-3-1.5c-0.9,0-1.6,1.4-3,1.5c-0.3,0-1.9,0-3.4-2 C1.1,10,1.4,8.7,1.3,7.5C1.2,6.4,1,5.2,1,5.2S1.7,5.9,2.6,6c0.9,0.1,1.1-0.3,3-0.9C7.7,4.5,9,7,9,7s1.4-2.4,3.4-1.9s2,0.9,2.9,0.9 C16.2,5.9,17,5.2,17,5.2S16.8,6.4,16.7,7.5z M5.9,8C4.8,7.8,4.3,8.2,3.8,8.4C3.4,8.5,3,8.6,3,8.6S3,9.2,4.2,9.8 c1.1,0.6,3.5,0.3,3.5,0.3S7.9,8.4,5.9,8z M14.2,8.4c-0.5-0.2-1-0.6-2.1-0.4c-2,0.4-1.8,2.1-1.8,2.1s2.4,0.3,3.5-0.3 C15,9.2,15,8.6,15,8.6S14.7,8.5,14.2,8.4z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M15.7 6.5c-.1 1.1.2 2.5-1.3 4.4C12.9 13 11.3 13 11 13c-1.8-.1-2-1.5-3-1.5-.9 0-1.6 1.4-3 1.5a4.224 4.224 0 0 1-3.4-2C.1 9 .4 7.7.3 6.5.2 5.4 0 4.2 0 4.2a3.05 3.05 0 0 0 1.6.8c.9.1 1.1-.3 3-.9C6.7 3.5 8 6 8 6s1.4-2.4 3.4-1.9 2 .9 2.9.9a3.618 3.618 0 0 0 1.7-.8s-.2 1.2-.3 2.3zM4.9 7a3.018 3.018 0 0 0-2.1.4l-.8.2s0 .6 1.2 1.2c1.1.6 3.5.3 3.5.3A1.973 1.973 0 0 0 4.9 7zm8.3.4a3.018 3.018 0 0 0-2.1-.4 1.973 1.973 0 0 0-1.8 2.1s2.4.3 3.5-.3C14 8.2 14 7.6 14 7.6a7.347 7.347 0 0 0-.8-.2z"/>
 </svg>
--- a/browser/themes/shared/icons/reload.svg
+++ b/browser/themes/shared/icons/reload.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M16,9H9l2.8-2.8c-0.7-0.5-1.4-0.7-2.3-0.7 c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c1.4,0,2.7-0.7,3.4-1.9l2.3,1c-1.1,2-3.2,3.4-5.7,3.4C5.9,16,3,13.1,3,9.5C3,5.9,5.9,3,9.5,3 c1.5,0,2.9,0.5,4.1,1.4L16,2V9z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M15 8H8l2.8-2.8a3.691 3.691 0 0 0-2.3-.7 4 4 0 0 0 0 8 3.9 3.9 0 0 0 3.4-1.9l2.3 1A6.5 6.5 0 1 1 8.5 2a6.773 6.773 0 0 1 4.1 1.4L15 1z"/>
 </svg>
--- a/browser/themes/shared/icons/save.svg
+++ b/browser/themes/shared/icons/save.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M13.5,16h-9C3.7,16,3,15.3,3,14.5v-11 C3,2.7,3.7,2,4.5,2H12l3,3v9.5C15,15.3,14.3,16,13.5,16z M11,2.7V6h3.3L11,2.7z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M12.5 15h-9A1.538 1.538 0 0 1 2 13.5v-11A1.538 1.538 0 0 1 3.5 1H11l3 3v9.5a1.538 1.538 0 0 1-1.5 1.5zM10 1.7V5h3.3z"/>
 </svg>
--- a/browser/themes/shared/icons/settings.svg
+++ b/browser/themes/shared/icons/settings.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M12.4,14.7l-0.6-1.5c0.3-0.2,0.5-0.4,0.8-0.6c0.2-0.2,0.4-0.5,0.6-0.7l1.5,0.6 c0.3,0.1,0.5,0,0.7-0.3l0.4-0.9c0.1-0.3,0-0.5-0.3-0.7L13.9,10c0.1-0.6,0.1-1.3,0-1.9l1.5-0.6c0.3-0.1,0.4-0.4,0.3-0.7l-0.4-0.9 c-0.1-0.3-0.4-0.4-0.7-0.3l-1.5,0.6C13,6,12.8,5.7,12.5,5.5c-0.2-0.2-0.5-0.4-0.7-0.6l0.6-1.5c0.1-0.3,0-0.5-0.3-0.7l-0.9-0.4 c-0.3-0.1-0.5,0-0.7,0.3L10,4.1C9.4,4,8.7,4,8.1,4.1L7.5,2.6C7.4,2.3,7.1,2.2,6.8,2.3L5.9,2.7C5.7,2.8,5.5,3.1,5.6,3.4l0.6,1.5 C6,5,5.7,5.2,5.5,5.5C5.3,5.7,5.1,5.9,4.9,6.2L3.4,5.5c-0.3-0.1-0.5,0-0.7,0.3L2.4,6.7C2.3,7,2.4,7.3,2.6,7.4L4.1,8 C4,8.6,4,9.3,4.1,9.9l-1.5,0.6c-0.3,0.1-0.4,0.4-0.3,0.7l0.4,0.9c0.1,0.3,0.4,0.4,0.7,0.3l1.5-0.6C5,12,5.2,12.3,5.5,12.5 c0.2,0.2,0.5,0.4,0.7,0.6l-0.6,1.5c-0.1,0.3,0,0.5,0.3,0.7l0.9,0.4c0.3,0.1,0.5,0,0.7-0.3L8,13.9c0.6,0.1,1.3,0.1,1.9,0l0.6,1.5 c0.1,0.3,0.4,0.4,0.7,0.3l0.9-0.4C12.3,15.2,12.5,14.9,12.4,14.7z M7.4,10.6c-0.9-0.9-0.9-2.3,0-3.2c0.9-0.9,2.3-0.9,3.2,0 c0.9,0.9,0.9,2.3,0,3.2C9.7,11.5,8.3,11.5,7.4,10.6z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M11.4 13.7l-.6-1.5c.3-.2.5-.4.8-.6.2-.2.4-.5.6-.7l1.5.6c.3.1.5 0 .7-.3l.4-.9c.1-.3 0-.5-.3-.7L12.9 9a6.054 6.054 0 0 0 0-1.9l1.5-.6a.517.517 0 0 0 .3-.7l-.4-.9a.517.517 0 0 0-.7-.3l-1.5.6a1.874 1.874 0 0 0-.6-.7c-.2-.2-.5-.4-.7-.6l.6-1.5c.1-.3 0-.5-.3-.7l-.9-.4c-.3-.1-.5 0-.7.3L9 3.1a6.054 6.054 0 0 0-1.9 0l-.6-1.5a.517.517 0 0 0-.7-.3l-.9.4a.61.61 0 0 0-.3.7l.6 1.5a1.874 1.874 0 0 0-.7.6 4.349 4.349 0 0 0-.6.7l-1.5-.7c-.3-.1-.5 0-.7.3l-.3.9a.574.574 0 0 0 .2.7l1.5.6a6.054 6.054 0 0 0 0 1.9l-1.5.6a.517.517 0 0 0-.3.7l.4.9a.517.517 0 0 0 .7.3l1.5-.6a1.874 1.874 0 0 0 .6.7c.2.2.5.4.7.6l-.6 1.5c-.1.3 0 .5.3.7l.9.4c.3.1.5 0 .7-.3l.5-1.5a6.054 6.054 0 0 0 1.9 0l.6 1.5a.517.517 0 0 0 .7.3l.9-.4c.2-.1.4-.4.3-.6zm-5-4.1a2.263 2.263 0 1 1 3.2-3.2 2.263 2.263 0 0 1-3.2 3.2z"/>
 </svg>
--- a/browser/themes/shared/icons/share.svg
+++ b/browser/themes/shared/icons/share.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M10,11l5-8l-7,8l2,6l-4-5H2L16,1v13L10,11z M12.6,13.3L10,17v-5L12.6,13.3z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M9 10l5-8-7 8 2 6-4-5H1L15 0v13zm2.6 2.3L9 16v-5z"/>
 </svg>
--- a/browser/themes/shared/icons/sidebars.svg
+++ b/browser/themes/shared/icons/sidebars.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15.5,16h-13C1.7,16,1,15.3,1,14.5v-11 C1,2.7,1.7,2,2.5,2h13C16.3,2,17,2.7,17,3.5v11C17,15.3,16.3,16,15.5,16z M3,7v6c0,0.6,0.4,1,1,1h7V6H4C3.4,6,3,6.4,3,7z M9.5,3 C9.2,3,9,3.2,9,3.5S9.2,4,9.5,4S10,3.8,10,3.5S9.8,3,9.5,3z M11.4,3c-0.3,0-0.5,0.2-0.5,0.5S11.2,4,11.4,4c0.3,0,0.5-0.2,0.5-0.5 S11.7,3,11.4,3z M14.5,3h-1C13.2,3,13,3.2,13,3.5S13.2,4,13.5,4h1C14.8,4,15,3.8,15,3.5S14.8,3,14.5,3z M15,7c0-0.6-0.4-1-1-1h-1v8 h1c0.6,0,1-0.4,1-1V7z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14.5 15h-13A1.538 1.538 0 0 1 0 13.5v-11A1.538 1.538 0 0 1 1.5 1h13A1.538 1.538 0 0 1 16 2.5v11a1.538 1.538 0 0 1-1.5 1.5zM2 6v6a.945.945 0 0 0 1 1h7V5H3a.945.945 0 0 0-1 1zm6.5-4a.472.472 0 0 0-.5.5.5.5 0 0 0 1 0 .472.472 0 0 0-.5-.5zm1.9 0a.472.472 0 0 0-.5.5.536.536 0 0 0 .5.5.472.472 0 0 0 .5-.5.472.472 0 0 0-.5-.5zm3.1 0h-1a.472.472 0 0 0-.5.5.472.472 0 0 0 .5.5h1a.472.472 0 0 0 .5-.5.472.472 0 0 0-.5-.5zm.5 4a.945.945 0 0 0-1-1h-1v8h1a.945.945 0 0 0 1-1z"/>
 </svg>
--- a/browser/themes/shared/icons/stop.svg
+++ b/browser/themes/shared/icons/stop.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M15.4,4.8L11.2,9l4.2,4.2l-2.1,2.1L9,11.2 l-4.2,4.2l-2.1-2.1L6.9,9L2.6,4.8l2.1-2.1L9,6.9l4.2-4.2L15.4,4.8z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M14.4 3.8L10.2 8l4.2 4.2-2.1 2.1L8 10.2l-4.2 4.2-2.1-2.1L5.9 8 1.6 3.8l2.1-2.1L8 5.9l4.2-4.2z"/>
 </svg>
--- a/browser/themes/shared/icons/sync.svg
+++ b/browser/themes/shared/icons/sync.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M16,9.8c-0.1,0.6-0.2,1.2-0.4,1.7 c-0.4,1.3-1.2,2.5-2.5,3.3c0.4,0.4,1.3,0.9,1.3,0.9s-2,0.3-4.1,0.3c0,0-0.1-0.1-0.1-0.1l0,0.1c-1,0-2-0.3-3-0.6 c0.7-0.6,1.2-1.3,1.6-2.1c0.6-1.2,0.6-3,0.6-3c0,0,0.9,1.5,1.4,2.1c1.2-0.6,2-1.8,2.1-3c0.1-0.9-0.2-1.7-0.6-2.3 c-0.4-0.7-1-1.1-1.7-1.4c0.2-0.4,0.5-0.9,0.8-1.3c0.4-0.6,0.9-1,1.3-1.2C14.8,4.3,16.3,6.9,16,9.8z M9,7.8c0,0-1.1-1.5-1.6-2 C6,6.5,5.2,7.8,5.2,9.2c0.1,1.5,1.1,2.7,2.4,3.3c-0.3,0.5-0.6,1-1,1.4c-0.4,0.5-0.9,0.8-1.2,1.1C3.1,13.6,1.7,11,2.1,8.2 c0.1-0.7,0.3-1.4,0.5-2c0.4-1.1,1.1-2,2.1-2.7C4.8,3.4,4.9,3.4,5,3.3C4.6,2.9,3.4,2.5,3.4,2.5s2.5-0.8,6.8-0.3C8.9,4.1,9,7.8,9,7.8z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M15 8.8a8.469 8.469 0 0 1-.4 1.7 5.793 5.793 0 0 1-2.5 3.3 7.683 7.683 0 0 0 1.3.9 31.431 31.431 0 0 1-4.1.3l-.1-.1v.1a10.659 10.659 0 0 1-3-.6 6.524 6.524 0 0 0 1.6-2.1 8.029 8.029 0 0 0 .6-3 24.178 24.178 0 0 0 1.4 2.1 3.821 3.821 0 0 0 2.1-3 3.462 3.462 0 0 0-.6-2.3 3.33 3.33 0 0 0-1.7-1.4 9.129 9.129 0 0 1 .8-1.3 3.559 3.559 0 0 1 1.3-1.2A6.687 6.687 0 0 1 15 8.8zm-7-2s-1.1-1.5-1.6-2a3.8 3.8 0 0 0-2.2 3.4 3.982 3.982 0 0 0 2.4 3.3 7.1 7.1 0 0 1-1 1.4A10.974 10.974 0 0 1 4.4 14a6.833 6.833 0 0 1-3.3-6.8 11.7 11.7 0 0 1 .5-2 5.557 5.557 0 0 1 2.1-2.7c.1-.1.2-.1.3-.2a5.7 5.7 0 0 0-1.6-.8 17.645 17.645 0 0 1 6.8-.3C7.9 3.1 8 6.8 8 6.8z"/>
 </svg>
--- a/browser/themes/shared/icons/webIDE.svg
+++ b/browser/themes/shared/icons/webIDE.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M14.311,5.123A6.579,6.579,0,1,0,5.026,14.24L4.545,15.609A7.985,7.985,0,1,1,16.885,7.7ZM9.034,16.148L5,18l1.863-4.024ZM13.4,4.89c0.009,0.028.014,0.058,0.023,0.085,0.059,0.064.1,0.14,0.16,0.207l-0.89.911c-0.038-.222-0.061-0.458-0.107-0.672a15.86,15.86,0,0,0-1.706-.277c0.034,0.621.058,1.252,0.076,1.9,0.265,0.008.518,0.022,0.778,0.032L10,8.855c0-.283-0.011-0.556-0.014-0.839C9.652,8.013,9.337,8,9,8s-0.652.013-.983,0.017C8.013,8.348,8,8.663,8,9s0.013,0.652.017,0.983C8.308,9.987,8.59,10,8.882,10l-1.8,1.848c-0.012-.3-0.028-0.586-0.036-0.888-0.657-.019-1.3-0.045-1.93-0.081A15.963,15.963,0,0,0,5.389,12.6c0.26,0.059.547,0.089,0.819,0.135l-0.958.982a6.057,6.057,0,0,1-.642-0.6c-0.009-.027-0.014-0.057-0.023-0.085A6,6,0,0,1,3.93,12.2c0.148,0.051.312,0.091,0.466,0.139a13.619,13.619,0,0,1-.275-1.521c-0.282-.02-0.581-0.031-0.857-0.054A5.981,5.981,0,0,1,3.06,9.8c0.313,0.021.651,0.031,0.971,0.049C4.015,9.571,4,9.289,4,9s0.015-.571.032-0.852C3.711,8.166,3.372,8.176,3.06,8.2a5.981,5.981,0,0,1,.2-0.957c0.276-.023.575-0.034,0.857-0.054a13.633,13.633,0,0,1,.268-1.5c-0.158.048-.325,0.088-0.476,0.14a6,6,0,0,1,.671-0.864C4.593,4.938,4.6,4.907,4.607,4.88a6.031,6.031,0,0,1,1.195-1c-0.061.178-.11,0.375-0.165,0.562a13.17,13.17,0,0,1,1.544-.3C7.2,3.827,7.214,3.5,7.239,3.2A5.92,5.92,0,0,1,8.2,3c-0.023.343-.034,0.713-0.053,1.066C8.431,4.046,8.7,4,9,4s0.568,0.046.856,0.063C9.837,3.711,9.826,3.34,9.8,3a5.923,5.923,0,0,1,.957.206c0.025,0.3.037,0.624,0.058,0.931a13.172,13.172,0,0,1,1.518.3c-0.056-.191-0.1-0.391-0.167-0.573A6.032,6.032,0,0,1,13.4,4.89ZM5,9c0,0.308.02,0.6,0.035,0.9,0.648,0.029,1.31.049,1.985,0.064C7.016,9.641,7,9.33,7,9s0.016-.641.02-0.966C6.345,8.049,5.683,8.069,5.035,8.1,5.02,8.4,5,8.692,5,9ZM5.383,5.427a15.968,15.968,0,0,0-.272,1.695c0.631-.036,1.273-0.062,1.93-0.081,0.018-.645.042-1.276,0.076-1.9A15.853,15.853,0,0,0,5.383,5.427Zm4.523-.36C9.606,5.051,9.309,5.031,9,5.031s-0.606.02-.906,0.036c-0.027.638-.046,1.29-0.06,1.954C8.358,7.016,8.67,7,9,7s0.641,0.016.967,0.021C9.952,6.357,9.934,5.7,9.906,5.067Zm4.033,1.872,2.121,2.121L9.884,15.209,7.763,13.087ZM14.5,12.633l2.385-2.313a7.993,7.993,0,0,1-6.806,6.6L12.5,14.569A6.608,6.608,0,0,0,14.5,12.633Z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M9.884 13.209l-2.121-2.122 6.176-6.148L16.06 7.06zM11.46 5c.02.1.019.217.037.32l-.875.9A10.929 10.929 0 0 0 10.456 5H8v2h1.856L8.88 8H8v.9L7 9.925V8H4.322a12.382 12.382 0 0 0 .222 2h2.383l-.977 1H4.808a7.92 7.92 0 0 0 .342.887l-.837 2.379A7.486 7.486 0 1 1 13.6 3.164L11.809 5zm-6.832 7.966A8.619 8.619 0 0 1 3.79 11H2.362a6.111 6.111 0 0 0 2.266 1.966zM1.813 10H3.54a12.64 12.64 0 0 1-.23-2H1.332a6.184 6.184 0 0 0 .481 2zm0-5a6.184 6.184 0 0 0-.481 2H3.31a12.64 12.64 0 0 1 .23-2zm.549-1H3.79a8.619 8.619 0 0 1 .838-1.966A6.111 6.111 0 0 0 2.362 4zM7 1.332a6.216 6.216 0 0 0-.669.13A5.269 5.269 0 0 0 4.808 4H7zM7 5H4.544a12.382 12.382 0 0 0-.222 2H7zm1.669-3.538A6.209 6.209 0 0 0 8 1.332V4h2.192a5.268 5.268 0 0 0-1.523-2.538zm1.7.573A8.619 8.619 0 0 1 11.21 4h1.428a6.111 6.111 0 0 0-2.266-1.966zM9.034 14.148L5 16l1.863-4.024zm1.8.039l3.239-3.14a7.483 7.483 0 0 1-3.241 3.14z" fill-rule="evenodd"/>
 </svg>
--- a/browser/themes/shared/icons/zoom-in.svg
+++ b/browser/themes/shared/icons/zoom-in.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M14,10h-4v4H8v-4H4V8h4V4h2v4h4V10z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M13 9H9v4H7V9H3V7h4V3h2v4h4z"/>
 </svg>
--- a/browser/themes/shared/icons/zoom-out.svg
+++ b/browser/themes/shared/icons/zoom-out.svg
@@ -1,6 +1,6 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
-  <path fill="context-fill" d="M4,8h10v2H4V8z" />
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <path fill="context-fill" d="M3 7h10v2H3z"/>
 </svg>
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -10,17 +10,16 @@
   skin/classic/browser/aboutNetError.css                       (../shared/aboutNetError.css)
   skin/classic/browser/blockedSite.css                         (../shared/blockedSite.css)
   skin/classic/browser/error-pages.css                         (../shared/error-pages.css)
 * skin/classic/browser/aboutProviderDirectory.css              (../shared/aboutProviderDirectory.css)
 * skin/classic/browser/aboutSessionRestore.css                 (../shared/aboutSessionRestore.css)
   skin/classic/browser/aboutSocialError.css                    (../shared/aboutSocialError.css)
   skin/classic/browser/aboutTabCrashed.css                     (../shared/aboutTabCrashed.css)
   skin/classic/browser/aboutWelcomeBack.css                    (../shared/aboutWelcomeBack.css)
-  skin/classic/browser/content-contextmenu.svg                 (../shared/content-contextmenu.svg)
   skin/classic/browser/addons/addon-install-blocked.svg        (../shared/addons/addon-install-blocked.svg)
   skin/classic/browser/addons/addon-install-confirm.svg        (../shared/addons/addon-install-confirm.svg)
   skin/classic/browser/addons/addon-install-downloading.svg    (../shared/addons/addon-install-downloading.svg)
   skin/classic/browser/addons/addon-install-error.svg          (../shared/addons/addon-install-error.svg)
   skin/classic/browser/addons/addon-install-installed.svg      (../shared/addons/addon-install-installed.svg)
   skin/classic/browser/addons/addon-install-restart.svg        (../shared/addons/addon-install-restart.svg)
   skin/classic/browser/addons/addon-install-warning.svg        (../shared/addons/addon-install-warning.svg)
 * skin/classic/browser/addons/addon-install-anchor.svg         (../shared/addons/addon-install-anchor.svg)
@@ -114,20 +113,22 @@
   skin/classic/browser/home.svg                       (../shared/icons/home.svg)
   skin/classic/browser/mail.svg                       (../shared/icons/mail.svg)
   skin/classic/browser/menu.svg                       (../shared/icons/menu.svg)
   skin/classic/browser/new-tab.svg                    (../shared/icons/new-tab.svg)
   skin/classic/browser/new-window.svg                 (../shared/icons/new-window.svg)
   skin/classic/browser/open.svg                       (../shared/icons/open.svg)
   skin/classic/browser/print.svg                      (../shared/icons/print.svg)
   skin/classic/browser/privateBrowsing.svg            (../shared/icons/privateBrowsing.svg)
+  skin/classic/browser/reload.svg                     (../shared/icons/reload.svg)
   skin/classic/browser/save.svg                       (../shared/icons/save.svg)
   skin/classic/browser/settings.svg                   (../shared/icons/settings.svg)
   skin/classic/browser/share.svg                      (../shared/icons/share.svg)
   skin/classic/browser/sidebars.svg                   (../shared/icons/sidebars.svg)
+  skin/classic/browser/stop.svg                       (../shared/icons/stop.svg)
   skin/classic/browser/sync.svg                       (../shared/icons/sync.svg)
   skin/classic/browser/webIDE.svg                     (../shared/icons/webIDE.svg)
   skin/classic/browser/zoom-in.svg                    (../shared/icons/zoom-in.svg)
   skin/classic/browser/zoom-out.svg                   (../shared/icons/zoom-out.svg)
 
 
   skin/classic/browser/search-indicator.png                    (../shared/search/search-indicator.png)
   skin/classic/browser/search-indicator@2x.png                 (../shared/search/search-indicator@2x.png)
@@ -182,11 +183,15 @@
   skin/classic/browser/privatebrowsing/tracking-protection-off.svg (../shared/privatebrowsing/tracking-protection-off.svg)
   skin/classic/browser/privatebrowsing/tracking-protection.svg (../shared/privatebrowsing/tracking-protection.svg)
   skin/classic/browser/compacttheme/loading-inverted.png (../shared/compacttheme/loading-inverted.png)
   skin/classic/browser/compacttheme/loading-inverted@2x.png (../shared/compacttheme/loading-inverted@2x.png)
   skin/classic/browser/compacttheme/urlbar-history-dropmarker.svg (../shared/compacttheme/urlbar-history-dropmarker.svg)
   skin/classic/browser/urlbar-star.svg                         (../shared/urlbar-star.svg)
   skin/classic/browser/urlbar-tab.svg                          (../shared/urlbar-tab.svg)
   skin/classic/browser/page-action.svg                         (../shared/page-action.svg)
+  skin/classic/browser/menu-icons/addons.svg                   (../shared/menu-icons/addons.svg)
+  skin/classic/browser/menu-icons/customize.svg                (../shared/menu-icons/customize.svg)
+  skin/classic/browser/menu-icons/library.svg                  (../shared/menu-icons/library.svg)
   skin/classic/browser/menu-icons/new-window.svg               (../shared/menu-icons/new-window.svg)
   skin/classic/browser/menu-icons/print.svg                    (../shared/menu-icons/print.svg)
   skin/classic/browser/menu-icons/private-window.svg           (../shared/menu-icons/private-window.svg)
+  skin/classic/browser/menu-icons/settings.svg                 (../shared/menu-icons/settings.svg)
new file mode 100644
--- /dev/null
+++ b/browser/themes/shared/menu-icons/addons.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
+  <path fill="context-fill" d="M14.5 8c-.971 0-1 1-1.75 1a.765.765 0 0 1-.75-.75V5a1 1 0 0 0-1-1H7.75A.765.765 0 0 1 7 3.25c0-.75 1-.779 1-1.75C8 .635 7.1 0 6 0S4 .635 4 1.5c0 .971 1 1 1 1.75a.765.765 0 0 1-.75.75H1a1 1 0 0 0-1 1v2.25A.765.765 0 0 0 .75 8c.75 0 .779-1 1.75-1C3.365 7 4 7.9 4 9s-.635 2-1.5 2c-.971 0-1-1-1.75-1a.765.765 0 0 0-.75.75V15a1 1 0 0 0 1 1h3.25a.765.765 0 0 0 .75-.75c0-.75-1-.779-1-1.75 0-.865.9-1.5 2-1.5s2 .635 2 1.5c0 .971-1 1-1 1.75a.765.765 0 0 0 .75.75H11a1 1 0 0 0 1-1v-3.25a.765.765 0 0 1 .75-.75c.75 0 .779 1 1.75 1 .865 0 1.5-.9 1.5-2s-.635-2-1.5-2z"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/browser/themes/shared/menu-icons/customize.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
+  <path fill="context-fill" d="M4 10a1.994 1.994 0 0 0-1.911 1.44c0 .01-.014.015-.017.025-.362 1.135-.705 2.11-1.759 2.573l-.023.012-.024.012A.5.5 0 0 0 0 14.5a.5.5 0 0 0 .5.5 6.974 6.974 0 0 0 4.825-1.5c.006-.006.007-.013.013-.019A1.993 1.993 0 0 0 4 10zM15.693.307a.984.984 0 0 0-1.338-.046l-8.031 7a.982.982 0 0 0-.049 1.433l1.032 1.031a.983.983 0 0 0 .693.287h.033a.982.982 0 0 0 .706-.335l7-8.031a.982.982 0 0 0-.046-1.339z"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/browser/themes/shared/menu-icons/library.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
+  <path fill="context-fill" d="M5 3a1 1 0 0 0-1 1v10a1 1 0 0 0 2 0V4a1 1 0 0 0-1-1zm3-1a1 1 0 0 0-1 1v11a1 1 0 0 0 2 0V3a1 1 0 0 0-1-1zm7.939 11.658l-4-11a1 1 0 1 0-1.879.684l4 11a1 1 0 1 0 1.879-.684zM2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 2 0V2a1 1 0 0 0-1-1z"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/browser/themes/shared/menu-icons/settings.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
+  <path fill="context-fill" d="M15 7h-2.1a4.967 4.967 0 0 0-.732-1.753l1.49-1.49a1 1 0 0 0-1.414-1.414l-1.49 1.49A4.968 4.968 0 0 0 9 3.1V1a1 1 0 1 0-2 0v2.1a4.968 4.968 0 0 0-1.753.732l-1.49-1.49a1 1 0 0 0-1.414 1.415l1.49 1.49A4.967 4.967 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1a4.968 4.968 0 0 0 .737 1.763c-.014.013-.032.017-.045.03l-1.45 1.45a1 1 0 1 0 1.414 1.414l1.45-1.45c.013-.013.018-.031.03-.045A4.968 4.968 0 0 0 7 12.9V15a1 1 0 0 0 2 0v-2.1a4.968 4.968 0 0 0 1.753-.732l1.49 1.49a1 1 0 0 0 1.414-1.414l-1.49-1.49A4.967 4.967 0 0 0 12.9 9H15a1 1 0 0 0 0-2zM5 8a3 3 0 1 1 3 3 3 3 0 0 1-3-3z"/>
+</svg>
--- a/browser/themes/shared/menupanel.inc.css
+++ b/browser/themes/shared/menupanel.inc.css
@@ -191,8 +191,28 @@ toolbarpaletteitem[place="palette"] > #z
   list-style-image: url(chrome://browser/skin/menu-icons/private-window.svg);
   -moz-context-properties: fill;
 }
 
 #appMenu-print-button {
   list-style-image: url(chrome://browser/skin/menu-icons/print.svg);
   -moz-context-properties: fill;
 }
+
+#appMenu-library-button {
+  list-style-image: url(chrome://browser/skin/menu-icons/library.svg);
+  -moz-context-properties: fill;
+}
+
+#appMenu-addons-button {
+  list-style-image: url(chrome://browser/skin/menu-icons/addons.svg);
+  -moz-context-properties: fill;
+}
+
+#appMenu-preferences-button {
+  list-style-image: url(chrome://browser/skin/menu-icons/settings.svg);
+  -moz-context-properties: fill;
+}
+
+#appMenu-customize-button {
+  list-style-image: url(chrome://browser/skin/menu-icons/customize.svg);
+  -moz-context-properties: fill;
+}
--- a/browser/themes/shared/toolbarbuttons.inc.css
+++ b/browser/themes/shared/toolbarbuttons.inc.css
@@ -3,17 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %filter substitution
 %define toolbarShadowColor hsla(209,67%,12%,0.35)
 %define forwardTransitionLength 150ms
 %define conditionalForwardWithUrlbar window:not([chromehidden~="toolbar"]) #urlbar-wrapper
 
 :root {
+  --toolbarbutton-vertical-inner-padding: 3px;
   --toolbarbutton-disabled-opacity: 0.4;
+
+  --backbutton-urlbar-overlap: 6px;
+
+  /* icon width + border + horizontal padding (without the overlap from backbutton-urlbar-overlap) */
+  --forwardbutton-width: 25px;
 }
 
 toolbar:-moz-lwtheme {
   --toolbarbutton-hover-background: rgba(255,255,255,.25);
   --toolbarbutton-hover-bordercolor: rgba(0,0,0,.2);
 
   --toolbarbutton-active-background: rgba(70%,70%,70%,.25);
   --toolbarbutton-active-bordercolor: rgba(0,0,0,.3);
@@ -45,26 +51,21 @@ toolbar[brighttext] .toolbarbutton-1 > .
 }
 
 .toolbarbutton-1 > .toolbarbutton-icon,
 .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
   margin-inline-end: 0;
 }
 
 :-moz-any(toolbar, .widget-overflow-list) .toolbarbutton-1 > .toolbarbutton-icon,
-:-moz-any(toolbar, .widget-overflow-list) .toolbarbutton-1 > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon {
+:-moz-any(toolbar, .widget-overflow-list) .toolbarbutton-1 > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon,
+#bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
   max-width: 16px;
 }
 
-:-moz-any(toolbar, .widget-overflow-list) .toolbarbutton-1:-moz-any(@primaryToolbarButtons@, .toolbarbutton-legacy-addon) > .toolbarbutton-icon,
-:-moz-any(toolbar, .widget-overflow-list) .toolbarbutton-1:-moz-any(@primaryToolbarButtons@, .toolbarbutton-legacy-addon) > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon,
-#bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
-  max-width: 18px;
-}
-
 #TabsToolbar .toolbarbutton-1,
 .tabbrowser-arrowscrollbox > .scrollbutton-up,
 .tabbrowser-arrowscrollbox > .scrollbutton-down {
   margin: 0 0 calc(var(--navbar-tab-toolbar-highlight-overlap) + var(--tab-toolbar-navbar-overlap));
 }
 
 #TabsToolbar .toolbarbutton-1,
 #TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
@@ -137,17 +138,17 @@ toolbar[brighttext] .toolbarbutton-1 > .
 
 .findbar-button > .toolbarbutton-text,
 #nav-bar .toolbarbutton-1 > .toolbarbutton-icon,
 #nav-bar .toolbarbutton-1 > .toolbarbutton-text,
 #nav-bar .toolbarbutton-1 > .toolbarbutton-badge-stack,
 #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
 #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
 @conditionalForwardWithUrlbar@ > .toolbarbutton-1:-moz-any([disabled],:not([open]):not([disabled]):not(:active)) > .toolbarbutton-icon {
-  padding: var(--toolbarbutton-vertical-inner-padding) 6px;
+  padding: var(--toolbarbutton-vertical-inner-padding) 7px;
   background-origin: padding-box !important;
   background-clip: padding-box !important;
   border: 1px solid transparent;
   border-radius: var(--toolbarbutton-border-radius);
   transition-property: background-color, border-color, box-shadow;
   transition-duration: 150ms;
 }
 
@@ -169,22 +170,16 @@ toolbar[brighttext] .toolbarbutton-1 > .
   border-top-left-radius: 0;
   border-bottom-left-radius: 0;
 }
 
 #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
   border-inline-end-style: none;
 }
 
-#nav-bar .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@, .toolbarbutton-legacy-addon)) > .toolbarbutton-icon,
-#nav-bar .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@, .toolbarbutton-legacy-addon)) > .toolbarbutton-badge-stack,
-#nav-bar .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@, .toolbarbutton-legacy-addon)) > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
-  padding: calc(var(--toolbarbutton-vertical-inner-padding) + 1px) 7px;
-}
-
 #nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-icon,
 #nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-badge-stack,
 #nav-bar .toolbarbutton-1[type=menu]:not(#PanelUI-menu-button):not(#back-button):not(#forward-button):not(#new-tab-button) > .toolbarbutton-icon,
 #nav-bar .toolbarbutton-1[type=menu]:not(#PanelUI-menu-button) > .toolbarbutton-badge-stack,
 #nav-bar .toolbarbutton-1[type=menu] > .toolbarbutton-text /* hack for add-ons that forcefully display the label */ {
   padding-inline-end: 17px;
 }
 
@@ -204,17 +199,23 @@ toolbar[brighttext] .toolbarbutton-1 > .
 }
 
 #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
   padding-top: calc(var(--toolbarbutton-vertical-inner-padding) + 6px);
   padding-bottom: calc(var(--toolbarbutton-vertical-inner-padding) + 6px);
 }
 
 #nav-bar .toolbarbutton-1 > .toolbarbutton-text {
-  padding: var(--toolbarbutton-vertical-text-padding) 6px;
+  padding-top: var(--toolbarbutton-vertical-text-padding);
+  padding-bottom: 0;
+  /* To make the hover feedback line up with sibling buttons, it needs the same
+   * height (16px) + padding (2 * 3px) + border (2 * 1px), but as a minimum
+   * because otherwise an increase in text sizes would break things.
+   */
+  min-height: calc(18px + 2 * var(--toolbarbutton-vertical-inner-padding));
 }
 
 #nav-bar .toolbaritem-combined-buttons {
   margin-left: 2px;
   margin-right: 2px;
 }
 
 #nav-bar .toolbaritem-combined-buttons > .toolbarbutton-1 {
@@ -295,18 +296,18 @@ toolbar[brighttext] .toolbarbutton-1 > .
 
 #forward-button > menupopup {
   margin-top: 1px !important;
 }
 
 #forward-button > .toolbarbutton-icon {
   border-left-style: none !important;
   border-radius: 0 !important;
-  padding-left: calc(var(--backbutton-urlbar-overlap) + 3px) !important;
-  padding-right: 3px !important;
+  padding-left: calc(var(--backbutton-urlbar-overlap) + 4px) !important;
+  padding-right: 4px !important;
   max-width: calc(var(--forwardbutton-width) + var(--backbutton-urlbar-overlap)) !important;
 }
 
 @conditionalForwardWithUrlbar@:not([switchingtabs]) > #forward-button {
   transition: margin-left @forwardTransitionLength@ ease-out;
 }
 
 @conditionalForwardWithUrlbar@ > #forward-button[disabled] {
@@ -338,41 +339,30 @@ toolbar[brighttext] .toolbarbutton-1 > .
 }
 
 #back-button > menupopup {
   margin-top: -1px !important;
 }
 
 #back-button > .toolbarbutton-icon {
   border-radius: 10000px !important;
-  padding: 6px !important;
-  max-width: 32px !important; /* icon width + horizontal padding + border */
+  padding: 7px !important;
 }
 
 #back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon {
   transform: scaleX(-1);
 }
 
-/* zoom control text (reset) button special case: */
-
-#nav-bar #zoom-reset-button > .toolbarbutton-text {
-  /* To make this line up with the icons, it needs the same height (18px) +
-   * padding (2 * 2px) + border (2 * 1px), but as a minimum because otherwise
-   * increase in text sizes would break things...
-   */
-  min-height: 24px;
-}
-
 /* bookmarks menu-button */
 
 #bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker {
   -moz-appearance: none !important;
 }
 
-#bookmarks-menu-button[cui-areatype="toolbar"]:not([overflowedItem=true]) > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
+#nav-bar #bookmarks-menu-button[cui-areatype="toolbar"]:not([overflowedItem=true]) > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
   padding-top: var(--toolbarbutton-vertical-inner-padding);
   padding-bottom: var(--toolbarbutton-vertical-inner-padding);
 }
 
 #BMB_bookmarksPopup[side="top"],
 #BMB_bookmarksPopup[side="bottom"] {
   margin-left: -20px;
   margin-right: -20px;
deleted file mode 100644
index ff0c565a8eb89cdd667d3ea13ef5bb8a0d15f393..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -12,23 +12,17 @@
 %include windowsShared.inc
 %define toolbarShadowColor hsla(209,67%,12%,0.35)
 
 %include ../shared/browser.inc.css
 
 :root {
   --space-above-tabbar: 15px;
 
-  --backbutton-urlbar-overlap: 6px;
-
-  /* icon width + border + horizontal padding (without the overlap from backbutton-urlbar-overlap) */
-  --forwardbutton-width: 25px;
-
-  --toolbarbutton-vertical-inner-padding: 2px;
-  --toolbarbutton-vertical-text-padding: var(--toolbarbutton-vertical-inner-padding);
+  --toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-vertical-inner-padding) - 1px);
 
   --toolbarbutton-border-radius: 1px;
 
   --toolbarbutton-hover-background: rgba(0,0,0,.1);
   --toolbarbutton-hover-bordercolor: rgba(0,0,0,.2);
   --toolbarbutton-hover-boxshadow: none;
 
   --toolbarbutton-active-background: rgba(0,0,0,.15);
@@ -768,17 +762,17 @@ toolbar[brighttext] #close-button {
   #urlbar,
   .searchbar-textbox {
     font-size: 1.15em;
     min-height: 28px;
   }
 
   :root {
     /* let toolbar buttons match the location and search bar's minimum height */
-    --toolbarbutton-vertical-inner-padding: 4px;
+    --toolbarbutton-vertical-inner-padding: 5px;
   }
 }
 
 #urlbar:-moz-lwtheme,
 .searchbar-textbox:-moz-lwtheme {
   background-color: rgba(255,255,255,.8);
   color: black;
 }
deleted file mode 100644
index cb4b71e5003cde32f8ffb1ce12f3122da9902fee..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/windows/downloads/indicator.css
+++ b/browser/themes/windows/downloads/indicator.css
@@ -24,19 +24,19 @@
 #downloads-button {
   --downloads-indicator-image: url("chrome://browser/skin/download.svg");
 }
 
 #downloads-indicator-icon {
   background: var(--downloads-indicator-image) center no-repeat;
   -moz-context-properties: fill;
   fill: var(--toolbarbutton-icon-fill);
-  width: 18px;
-  height: 18px;
-  background-size: 18px;
+  width: 16px;
+  height: 16px;
+  background-size: 16px;
 }
 
 toolbar[brighttext] #downloads-button:not([attention="success"]) > #downloads-indicator-anchor > #downloads-indicator-icon {
   fill: var(--toolbarbutton-icon-fill-inverted);
 }
 
 #downloads-button[attention="warning"] > .toolbarbutton-badge-stack > .toolbarbutton-badge,
 #downloads-button[attention="severe"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -7,17 +7,16 @@ browser.jar:
 #include ../shared/jar.inc.mn
   skin/classic/browser/sanitizeDialog.css
   skin/classic/browser/aboutSessionRestore-window-icon.png
   skin/classic/browser/aboutSyncTabs.css
 * skin/classic/browser/syncedtabs/sidebar.css     (syncedtabs/sidebar.css)
 * skin/classic/browser/browser.css
 * skin/classic/browser/compacttheme.css
   skin/classic/browser/caption-buttons.svg
-  skin/classic/browser/click-to-play-warning-stripes.png
   skin/classic/browser/Info.png
   skin/classic/browser/livemark-folder.png
   skin/classic/browser/menu-back.png
   skin/classic/browser/menu-forward.png
   skin/classic/browser/menuPanel-customize.png
   skin/classic/browser/menuPanel-customize@2x.png
   skin/classic/browser/menuPanel-exit.png
   skin/classic/browser/menuPanel-exit@2x.png
--- a/browser/themes/windows/searchbar.css
+++ b/browser/themes/windows/searchbar.css
@@ -209,17 +209,17 @@
 .search-panel-one-offs[compact=true] > .searchbar-engine-one-off-item.dummy:not(.last-of-row),
 .search-panel-one-offs[compact=true] > .searchbar-engine-one-off-item.last-engine,
 .search-setting-button-compact {
   background-image: none;
 }
 
 .searchbar-engine-one-off-item:not([selected]):not(.dummy):hover,
 .addengine-item:hover {
-  background-color: hsla(0, 0%, 0%, 0.06);
+  background-color: var(--arrowpanel-dimmed-further);
   color: inherit;
 }
 
 .searchbar-engine-one-off-item[selected] {
   background-color: Highlight;
   background-image: none;
   color: HighlightText;
 }
--- a/devtools/client/aboutdebugging/aboutdebugging.css
+++ b/devtools/client/aboutdebugging/aboutdebugging.css
@@ -192,16 +192,17 @@ button {
   to a black icon. */
   filter: brightness(0%);
 }
 
 .addons-options {
   flex: 1;
 }
 
+.service-worker-disabled-label,
 .addons-debugging-label,
 .addons-web-ext-tip {
   display: inline-block;
   margin-inline-end: 1ch;
 }
 
 .addons-tip {
   display: flex;
--- a/devtools/client/aboutdebugging/components/addons/controls.js
+++ b/devtools/client/aboutdebugging/components/addons/controls.js
@@ -78,21 +78,20 @@ module.exports = createClass({
             checked: !debugDisabled,
             onChange: this.onEnableAddonDebuggingChange,
             role: "checkbox",
           }),
           dom.label({
             className: "addons-debugging-label",
             htmlFor: "enable-addon-debugging",
             title: Strings.GetStringFromName("addonDebugging.tooltip")
-          }, Strings.GetStringFromName("addonDebugging.label")),
-          "(",
+          }, Strings.GetStringFromName("addonDebugging.label2")),
           dom.a({ href: MORE_INFO_URL, target: "_blank" },
-            Strings.GetStringFromName("moreInfo")),
-          ")"
+            Strings.GetStringFromName("addonDebugging.learnMore")
+          ),
         ),
         dom.button({
           id: "load-addon-from-file",
           onClick: this.loadAddonFromFile,
         }, Strings.GetStringFromName("loadTemporaryAddon"))
       ),
       AddonsInstallError({ error: this.state.installError }));
   }
--- a/devtools/client/aboutdebugging/components/addons/panel.js
+++ b/devtools/client/aboutdebugging/components/addons/panel.js
@@ -152,20 +152,19 @@ module.exports = createClass({
         dom.img({
           className: "addons-tip-icon",
           role: "presentation",
           src: "chrome://devtools/skin/images/help.svg",
         }),
         dom.span({
           className: "addons-web-ext-tip",
         }, Strings.GetStringFromName("webExtTip")),
-        "(",
         dom.a({ href: WEB_EXT_URL, target: "_blank" },
-          Strings.GetStringFromName("moreInfo")),
-        ")"
+          Strings.GetStringFromName("webExtTip.learnMore")
+        )
       )
     ),
     dom.div({ id: "addons" },
       TargetList({
         id: "extensions",
         name: installedName,
         targets: installedTargets,
         client,
--- a/devtools/client/aboutdebugging/components/workers/panel.js
+++ b/devtools/client/aboutdebugging/components/workers/panel.js
@@ -24,17 +24,18 @@ loader.lazyImporter(this, "PrivateBrowsi
 
 loader.lazyRequireGetter(this, "DebuggerClient",
   "devtools/shared/client/main", true);
 
 const Strings = Services.strings.createBundle(
   "chrome://devtools/locale/aboutdebugging.properties");
 
 const WorkerIcon = "chrome://devtools/skin/images/debugging-workers.svg";
-const MORE_INFO_URL = "https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging";
+const MORE_INFO_URL = "https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging" +
+                      "#Service_workers_not_compatible";
 const PROCESS_COUNT_PREF = "dom.ipc.processCount";
 const MULTI_OPTOUT_PREF = "dom.ipc.multiOptOut";
 
 module.exports = createClass({
   displayName: "WorkersPanel",
 
   propTypes: {
     client: PropTypes.instanceOf(DebuggerClient).isRequired,
@@ -180,26 +181,29 @@ module.exports = createClass({
     if (!isDisabled) {
       return "";
     }
     return dom.p(
       {
         className: "service-worker-disabled"
       },
       dom.div({ className: "warning" }),
-      Strings.GetStringFromName("configurationIsNotCompatible"),
-      " (",
+      dom.span(
+        {
+          className: "service-worker-disabled-label",
+        },
+        Strings.GetStringFromName("configurationIsNotCompatible.label")
+      ),
       dom.a(
         {
           href: MORE_INFO_URL,
           target: "_blank"
         },
-        Strings.GetStringFromName("moreInfo")
+        Strings.GetStringFromName("configurationIsNotCompatible.learnMore")
       ),
-      ")"
     );
   },
 
   render() {
     let { client, id } = this.props;
     let { workers, processCount } = this.state;
 
     let isE10S = Services.appinfo.browserTabsRemoteAutostart;
--- a/devtools/client/locales/en-US/aboutdebugging.properties
+++ b/devtools/client/locales/en-US/aboutdebugging.properties
@@ -32,48 +32,56 @@ listeningForFetchEvents = Listening for 
 # LOCALIZATION NOTE (notListeningForFetchEvents):
 # This is used to display the state of the SW in regard to fetch events.
 notListeningForFetchEvents = Not listening for fetch events.
 
 # LOCALIZATION NOTE (addons):
 # This string is displayed as a header of the about:debugging#addons page.
 addons = Add-ons
 
-# LOCALIZATION NOTE (addonDebugging.label):
+# LOCALIZATION NOTE (addonDebugging.label2):
 # This string is displayed next to a check box that enables the user to switch
 # addon debugging on/off.
-addonDebugging.label = Enable add-on debugging
+addonDebugging.label2 = Enable add-on debugging.
 
 # LOCALIZATION NOTE (addonDebugging.tooltip):
 # This string is displayed in a tooltip that appears when hovering over a check
 # box that switches addon debugging on/off.
 addonDebugging.tooltip = Turning this on will allow you to debug add-ons and various other parts of the browser chrome
 
-# LOCALIZATION NOTE (moreInfo):
-# This string is displayed next to addonDebugging.label as a link to a page
-# with documentation.
-moreInfo = more info
+# LOCALIZATION NOTE (addonDebugging.learnMore):
+# This string is displayed as a link next to addonDebugging.label and leads the user to
+# the MDN documentation page for about:debugging.
+# (https://developer.mozilla.org/docs/Tools/about:debugging#Enabling_add-on_debugging)
+addonDebugging.learnMore = Learn more
 
 # LOCALIZATION NOTE (loadTemporaryAddon):
 # This string is displayed as a label of a button that allows the user to
 # load additional add-ons.
 loadTemporaryAddon = Load Temporary Add-on
 
 # LOCALIZATION NOTE (extensions):
 # This string is displayed as a header above the list of loaded add-ons.
 extensions = Extensions
 
 # LOCALIZATION NOTE (temporaryExtensions):
 # This string is displayed as a header above the list of temporarily loaded add-ons.
 temporaryExtensions = Temporary Extensions
 
 # LOCALIZATION NOTE (webExtTip):
 # This string is displayed as a message below the list of temporarily loaded add-ons.
+# Web-ext is a command line tool for web-extensions developers.
+# See https://developer.mozilla.org/Add-ons/WebExtensions/Getting_started_with_web-ext
 webExtTip = You can use web-ext to load temporary WebExtensions from the command line.
 
+# LOCALIZATION NOTE (webExtTip.learnMore):
+# This string is displayed as a link next to webExtTip and leads the user to the MDN
+# documentation page for web-ext.
+# (https://developer.mozilla.org/Add-ons/WebExtensions/Getting_started_with_web-ext)
+webExtTip.learnMore = Learn more
 
 # LOCALIZATION NOTE (selectAddonFromFile2):
 # This string is displayed as the title of the file picker that appears when
 # the user clicks the 'Load Temporary Add-on' button
 selectAddonFromFile2 = Select Manifest File or Package (.xpi)
 
 # LOCALIZATION NOTE (reload):
 # This string is displayed as a label of the button that reloads a given addon.
@@ -122,17 +130,28 @@ pageNotFound = Page not found
 # This string is displayed as an error message when navigating to an invalid page
 # %S will be replaced by the name of the page at run-time.
 doesNotExist = #%S does not exist!
 
 # LOCALIZATION NOTE (nothing):
 # This string is displayed when the list of workers is empty.
 nothing = Nothing yet.
 
-configurationIsNotCompatible = Your browser configuration is not compatible with Service Workers
+# LOCALIZATION NOTE (configurationIsNotCompatible.label):
+# This string is displayed in about:debugging#workers if the current configuration of the
+# browser is incompatible with service workers. More details at
+# https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging#Service_workers_not_compatible
+configurationIsNotCompatible.label = Your browser configuration is not compatible with Service Workers.
+
+# LOCALIZATION NOTE (configurationIsNotCompatible.learnMore):
+# This string is displayed as a link next to configurationIsNotCompatible.label and leads
+# the user to the MDN documentation page for about:debugging, on the section explaining
+# why service workers might not be available.
+# (https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging#Service_workers_not_compatible)
+configurationIsNotCompatible.learnMore = Learn more
 
 # LOCALIZATION NOTE (multiProcessWarningTitle):
 # This string is displayed as a warning message on top of the about:debugging#workers
 # page when multi-e10s is enabled
 multiProcessWarningTitle = Service Worker debugging is not compatible with multiple content processes at the moment.
 
 # LOCALIZATION NOTE (multiProcessWarningMessage):
 # This string is displayed in the warning section for multi-e10s in
--- a/devtools/client/netmonitor/src/assets/styles/netmonitor.css
+++ b/devtools/client/netmonitor/src/assets/styles/netmonitor.css
@@ -114,17 +114,17 @@ body,
 
 .status-bar-label {
   display: inline-flex;
   margin-inline-end: 10px;
   /* Status bar has just one line so, don't wrap labels */
   white-space: nowrap;
 }
 
-.status-bar-label::before {
+.status-bar-label:not(:first-of-type)::before {
   content: "";
   display: inline-block;
   margin-inline-end: 10px;
   margin-top: 4px;
   margin-bottom: 4px;
   width: 1px;
   background: var(--theme-splitter-color);
 }
--- a/devtools/client/shared/components/reps/reps.js
+++ b/devtools/client/shared/components/reps/reps.js
@@ -1160,50 +1160,63 @@ return /******/ (function(modules) { // 
 	
 	  if (Object.keys(interestingObject).length < max) {
 	    // There are not enough props yet (or at least, not enough props to
 	    // be able to know whether we should print "more…" or not).
 	    // Let's display also empty members and functions.
 	    interestingObject = Object.assign({}, interestingObject, getFilteredObject(object, max - Object.keys(interestingObject).length, (type, value) => !isInterestingProp(type, value)));
 	  }
 	
-	  const truncated = Object.keys(object).length > max;
-	  let propsArray = getPropsArray(interestingObject, truncated);
-	  if (truncated) {
+	  let propsArray = getPropsArray(interestingObject);
+	  if (Object.keys(object).length > max) {
 	    propsArray.push(Caption({
 	      object: safeObjectLink(props, {}, Object.keys(object).length - max + " more…")
 	    }));
 	  }
 	
-	  return propsArray;
+	  return unfoldProps(propsArray);
+	}
+	
+	function unfoldProps(items) {
+	  return items.reduce((res, item, index) => {
+	    if (Array.isArray(item)) {
+	      res = res.concat(item);
+	    } else {
+	      res.push(item);
+	    }
+	
+	    // Interleave commas between elements
+	    if (index !== items.length - 1) {
+	      res.push(", ");
+	    }
+	    return res;
+	  }, []);
 	}
 	
 	/**
 	 * Get an array of components representing the properties of the object
 	 *
 	 * @param {Object} object
-	 * @param {Boolean} truncated true if the object is truncated.
 	 * @return {Array} Array of PropRep.
 	 */
-	function getPropsArray(object, truncated) {
+	function getPropsArray(object) {
 	  let propsArray = [];
 	
 	  if (!object) {
 	    return propsArray;
 	  }
 	
 	  // Hardcode tiny mode to avoid recursive handling.
 	  let mode = MODE.TINY;
 	  const objectKeys = Object.keys(object);
 	  return objectKeys.map((name, i) => PropRep({
 	    mode,
 	    name,
 	    object: object[name],
-	    equal: ": ",
-	    delim: i !== objectKeys.length - 1 || truncated ? ", " : null
+	    equal: ": "
 	  }));
 	}
 	
 	/**
 	 * Get a copy of the object filtered by a given predicate.
 	 *
 	 * @param {Object} object.
 	 * @param {Number} max The maximum length of keys array.
@@ -1266,39 +1279,43 @@ return /******/ (function(modules) { // 
 	 * and GripMap (remote JS maps and weakmaps) reps.
 	 * It's used to render object properties.
 	 */
 	PropRep.propTypes = {
 	  // Property name.
 	  name: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.object]).isRequired,
 	  // Equal character rendered between property name and value.
 	  equal: React.PropTypes.string,
-	  // Delimiter character used to separate individual properties.
-	  delim: React.PropTypes.string,
 	  // @TODO Change this to Object.values once it's supported in Node's version of V8
 	  mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])),
 	  objectLink: React.PropTypes.func,
 	  onDOMNodeMouseOver: React.PropTypes.func,
 	  onDOMNodeMouseOut: React.PropTypes.func,
 	  onInspectIconClick: React.PropTypes.func,
 	  // Normally a PropRep will quote a property name that isn't valid
 	  // when unquoted; but this flag can be used to suppress the
 	  // quoting.
 	  suppressQuotes: React.PropTypes.bool
 	};
 	
+	/**
+	 * Function that given a name, a delimiter and an object returns an array
+	 * of React elements representing an object property (e.g. `name: value`)
+	 *
+	 * @param {Object} props
+	 * @return {Array} Array of React elements.
+	 */
 	function PropRep(props) {
 	  const Grip = __webpack_require__(15);
 	  const { Rep } = __webpack_require__(2);
 	
 	  let {
 	    name,
 	    mode,
 	    equal,
-	    delim,
 	    suppressQuotes
 	  } = props;
 	
 	  let key;
 	  // The key can be a simple string, for plain objects,
 	  // or another object for maps and weakmaps.
 	  if (typeof name === "string") {
 	    if (!suppressQuotes) {
@@ -1308,26 +1325,19 @@ return /******/ (function(modules) { // 
 	  } else {
 	    key = Rep(Object.assign({}, props, {
 	      object: name,
 	      mode: mode || MODE.TINY,
 	      defaultRep: Grip
 	    }));
 	  }
 	
-	  let delimElement;
-	  if (delim) {
-	    delimElement = span({
-	      "className": "objectComma"
-	    }, delim);
-	  }
-	
-	  return span({}, key, span({
+	  return [key, span({
 	    "className": "objectEqual"
-	  }, equal), Rep(Object.assign({}, props)), delimElement);
+	  }, equal), Rep(Object.assign({}, props))];
 	}
 	
 	// Exports from this module
 	module.exports = wrapRender(PropRep);
 
 /***/ },
 /* 15 */
 /***/ function(module, exports, __webpack_require__) {
@@ -1359,23 +1369,27 @@ return /******/ (function(modules) { // 
 	  title: React.PropTypes.string,
 	  objectLink: React.PropTypes.func,
 	  onDOMNodeMouseOver: React.PropTypes.func,
 	  onDOMNodeMouseOut: React.PropTypes.func,
 	  onInspectIconClick: React.PropTypes.func
 	};
 	
 	function GripRep(props) {
-	  let object = props.object;
-	  let propsArray = safePropIterator(props, object, props.mode === MODE.LONG ? 10 : 3);
-	
-	  if (props.mode === MODE.TINY) {
+	  let {
+	    mode,
+	    object
+	  } = props;
+	
+	  if (mode === MODE.TINY) {
 	    return span({ className: "objectBox objectBox-object" }, getTitle(props, object));
 	  }
 	
+	  let propsArray = safePropIterator(props, object, mode === MODE.LONG ? 10 : 3);
+	
 	  return span({ className: "objectBox objectBox-object" }, getTitle(props, object), safeObjectLink(props, {
 	    className: "objectLeftBrace"
 	  }, " { "), ...propsArray, safeObjectLink(props, {
 	    className: "objectRightBrace"
 	  }, " }"));
 	}
 	
 	function getTitle(props, object) {
@@ -1420,61 +1434,74 @@ return /******/ (function(modules) { // 
 	  let indexes = getPropIndexes(properties, max, isInterestingProp);
 	  if (indexes.length < max && indexes.length < propertiesLength) {
 	    // There are not enough props yet. Then add uninteresting props to display them.
 	    indexes = indexes.concat(getPropIndexes(properties, max - indexes.length, (t, value, name) => {
 	      return !isInterestingProp(t, value, name);
 	    }));
 	  }
 	
-	  const truncate = Object.keys(properties).length > max;
 	  // The server synthesizes some property names for a Proxy, like
 	  // <target> and <handler>; we don't want to quote these because,
 	  // as synthetic properties, they appear more natural when
 	  // unquoted.
 	  const suppressQuotes = object.class === "Proxy";
-	  let propsArray = getProps(props, properties, indexes, truncate, suppressQuotes);
-	  if (truncate) {
+	  let propsArray = getProps(props, properties, indexes, suppressQuotes);
+	  if (Object.keys(properties).length > max) {
 	    // There are some undisplayed props. Then display "more...".
 	    propsArray.push(Caption({
 	      object: safeObjectLink(props, {}, `${propertiesLength - max} more…`)
 	    }));
 	  }
 	
-	  return propsArray;
+	  return unfoldProps(propsArray);
+	}
+	
+	function unfoldProps(items) {
+	  return items.reduce((res, item, index) => {
+	    if (Array.isArray(item)) {
+	      res = res.concat(item);
+	    } else {
+	      res.push(item);
+	    }
+	
+	    // Interleave commas between elements
+	    if (index !== items.length - 1) {
+	      res.push(", ");
+	    }
+	    return res;
+	  }, []);
 	}
 	
 	/**
 	 * Get props ordered by index.
 	 *
 	 * @param {Object} componentProps Grip Component props.
 	 * @param {Object} properties Properties of the object the Grip describes.
 	 * @param {Array} indexes Indexes of properties.
-	 * @param {Boolean} truncate true if the grip will be truncated.
 	 * @param {Boolean} suppressQuotes true if we should suppress quotes
 	 *                  on property names.
 	 * @return {Array} Props.
 	 */
-	function getProps(componentProps, properties, indexes, truncate, suppressQuotes) {
+	function getProps(componentProps, properties, indexes, suppressQuotes) {
 	  // Make indexes ordered by ascending.
 	  indexes.sort(function (a, b) {
 	    return a - b;
 	  });
 	
 	  const propertiesKeys = Object.keys(properties);
 	  return indexes.map(i => {
 	    let name = propertiesKeys[i];
 	    let value = getPropValue(properties[name]);
 	
 	    return PropRep(Object.assign({}, componentProps, {
 	      mode: MODE.TINY,
 	      name,
 	      object: value,
 	      equal: ": ",
-	      delim: i !== indexes.length - 1 || truncate ? ", " : null,
 	      defaultRep: Grip,
 	      // Do not propagate title and objectLink to properties reps
 	      title: null,
 	      objectLink: null,
 	      suppressQuotes
 	    }));
 	  });
 	}
@@ -2042,27 +2069,33 @@ return /******/ (function(modules) { // 
 	}
 	
 	function getProps(props, promiseState) {
 	  const keys = ["state"];
 	  if (Object.keys(promiseState).includes("value")) {
 	    keys.push("value");
 	  }
 	
-	  return keys.map((key, i) => {
+	  return keys.reduce((res, key, i) => {
 	    let object = promiseState[key];
-	    return PropRep(Object.assign({}, props, {
+	    res = res.concat(PropRep(Object.assign({}, props, {
 	      mode: MODE.TINY,
 	      name: `<${key}>`,
 	      object,
 	      equal: ": ",
-	      delim: i < keys.length - 1 ? ", " : null,
 	      suppressQuotes: true
-	    }));
-	  });
+	    })));
+	
+	    // Interleave commas between elements
+	    if (i !== keys.length - 1) {
+	      res.push(", ");
+	    }
+	
+	    return res;
+	  }, []);
 	}
 	
 	// Registration
 	function supportsObject(object, type) {
 	  if (!isGrip(object)) {
 	    return false;
 	  }
 	  return type === "Promise";
@@ -2948,48 +2981,30 @@ return /******/ (function(modules) { // 
 	    brackets = needSpace(items.length > 0);
 	  }
 	
 	  let title = getTitle(props, object);
 	
 	  return span({
 	    className: "objectBox objectBox-array" }, title, safeObjectLink(props, {
 	    className: "arrayLeftBracket"
-	  }, brackets.left), ...items, safeObjectLink(props, {
+	  }, brackets.left), ...interleaveCommas(items), safeObjectLink(props, {
 	    className: "arrayRightBracket"
 	  }, brackets.right), span({
 	    className: "arrayProperties",
 	    role: "group" }));
 	}
 	
-	/**
-	 * Renders array item. Individual values are separated by
-	 * a delimiter (a comma by default).
-	 */
-	GripArrayItem.propTypes = {
-	  delim: React.PropTypes.string,
-	  object: React.PropTypes.oneOfType([React.PropTypes.object, React.PropTypes.number, React.PropTypes.string]).isRequired,
-	  objectLink: React.PropTypes.func,
-	  // @TODO Change this to Object.values once it's supported in Node's version of V8
-	  mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])),
-	  provider: React.PropTypes.object,
-	  onDOMNodeMouseOver: React.PropTypes.func,
-	  onDOMNodeMouseOut: React.PropTypes.func,
-	  onInspectIconClick: React.PropTypes.func
-	};
-	
-	function GripArrayItem(props) {
-	  let { Rep } = __webpack_require__(2);
-	  let {
-	    delim
-	  } = props;
-	
-	  return span({}, Rep(Object.assign({}, props, {
-	    mode: MODE.TINY
-	  })), delim);
+	function interleaveCommas(items) {
+	  return items.reduce((res, item, index) => {
+	    if (index !== items.length - 1) {
+	      return res.concat(item, ", ");
+	    }
+	    return res.concat(item);
+	  }, []);
 	}
 	
 	function getLength(grip) {
 	  if (!grip.preview) {
 	    return 0;
 	  }
 	
 	  return grip.preview.length || grip.preview.childNodesLength || 0;
@@ -3008,66 +3023,90 @@ return /******/ (function(modules) { // 
 	  if (!grip.preview) {
 	    return null;
 	  }
 	
 	  return grip.preview.items || grip.preview.childNodes || null;
 	}
 	
 	function arrayIterator(props, grip, max) {
+	  let { Rep } = __webpack_require__(2);
+	
 	  let items = [];
 	  const gripLength = getLength(grip);
 	
 	  if (!gripLength) {
 	    return items;
 	  }
 	
 	  const previewItems = getPreviewItems(grip);
 	  if (!previewItems) {
 	    return items;
 	  }
 	
-	  let delim;
-	  // number of grip preview items is limited to 10, but we may have more
-	  // items in grip-array.
-	  let delimMax = gripLength > previewItems.length ? previewItems.length : previewItems.length - 1;
 	  let provider = props.provider;
 	
-	  for (let i = 0; i < previewItems.length && i < max; i++) {
+	  let emptySlots = 0;
+	  let foldedEmptySlots = 0;
+	  items = previewItems.reduce((res, itemGrip) => {
+	    if (res.length >= max) {
+	      return res;
+	    }
+	
+	    let object;
 	    try {
-	      let itemGrip = previewItems[i];
-	      let value = provider ? provider.getValue(itemGrip) : itemGrip;
-	
-	      delim = i == delimMax ? "" : ", ";
-	
-	      items.push(GripArrayItem(Object.assign({}, props, {
-	        object: value,
-	        delim: delim,
-	        // Do not propagate title to array items reps
-	        title: undefined
-	      })));
+	      if (!provider && itemGrip === null) {
+	        emptySlots++;
+	        return res;
+	      }
+	
+	      object = provider ? provider.getValue(itemGrip) : itemGrip;
 	    } catch (exc) {
-	      items.push(GripArrayItem(Object.assign({}, props, {
-	        object: exc,
-	        delim: delim,
+	      object = exc;
+	    }
+	
+	    if (emptySlots > 0) {
+	      res.push(getEmptySlotsElement(emptySlots));
+	      foldedEmptySlots = foldedEmptySlots + emptySlots - 1;
+	      emptySlots = 0;
+	    }
+	
+	    if (res.length < max) {
+	      res.push(Rep(Object.assign({}, props, {
+	        object,
+	        mode: MODE.TINY,
 	        // Do not propagate title to array items reps
 	        title: undefined
 	      })));
 	    }
+	
+	    return res;
+	  }, []);
+	
+	  // Handle trailing empty slots if there are some.
+	  if (items.length < max && emptySlots > 0) {
+	    items.push(getEmptySlotsElement(emptySlots));
+	    foldedEmptySlots = foldedEmptySlots + emptySlots - 1;
 	  }
-	  if (previewItems.length > max || gripLength > previewItems.length) {
-	    let leftItemNum = gripLength - max > 0 ? gripLength - max : gripLength - previewItems.length;
+	
+	  const itemsShown = items.length + foldedEmptySlots;
+	  if (gripLength > itemsShown) {
 	    items.push(Caption({
-	      object: safeObjectLink(props, {}, leftItemNum + " more…")
+	      object: safeObjectLink(props, {}, gripLength - itemsShown + " more…")
 	    }));
 	  }
 	
 	  return items;
 	}
 	
+	function getEmptySlotsElement(number) {
+	  // TODO: Use l10N - See https://github.com/devtools-html/reps/issues/141
+	  return `<${number} empty slot${number > 1 ? "s" : ""}>`;
+	}
+	
 	function supportsObject(grip, type) {
 	  if (!isGrip(grip)) {
 	    return false;
 	  }
 	
 	  return grip.preview && (grip.preview.kind == "ArrayLike" || type === "DocumentFragment");
 	}
 	
@@ -3106,26 +3145,30 @@ return /******/ (function(modules) { // 
 	  isInterestingEntry: React.PropTypes.func,
 	  onDOMNodeMouseOver: React.PropTypes.func,
 	  onDOMNodeMouseOut: React.PropTypes.func,
 	  onInspectIconClick: React.PropTypes.func,
 	  title: React.PropTypes.string
 	};
 	
 	function GripMap(props) {
-	  let object = props.object;
-	  let propsArray = safeEntriesIterator(props, object, props.mode === MODE.LONG ? 10 : 3);
-	
-	  if (props.mode === MODE.TINY) {
+	  let {
+	    mode,
+	    object
+	  } = props;
+	
+	  if (mode === MODE.TINY) {
 	    return span({ className: "objectBox objectBox-object" }, getTitle(props, object));
 	  }
 	
+	  let propsArray = safeEntriesIterator(props, object, props.mode === MODE.LONG ? 10 : 3);
+	
 	  return span({ className: "objectBox objectBox-object" }, getTitle(props, object), safeObjectLink(props, {
 	    className: "objectLeftBrace"
-	  }, " { "), propsArray, safeObjectLink(props, {
+	  }, " { "), ...propsArray, safeObjectLink(props, {
 	    className: "objectRightBrace"
 	  }, " }"));
 	}
 	
 	function getTitle(props, object) {
 	  let title = props.title || (object && object.class ? object.class : "Map");
 	  return safeObjectLink(props, {}, title);
 	}
@@ -3160,17 +3203,33 @@ return /******/ (function(modules) { // 
 	  if (entries.length < mapEntries.length) {
 	    // There are some undisplayed entries. Then display "more…".
 	    entries.push(Caption({
 	      key: "more",
 	      object: safeObjectLink(props, {}, `${mapEntries.length - max} more…`)
 	    }));
 	  }
 	
-	  return entries;
+	  return unfoldEntries(entries);
+	}
+	
+	function unfoldEntries(items) {
+	  return items.reduce((res, item, index) => {
+	    if (Array.isArray(item)) {
+	      res = res.concat(item);
+	    } else {
+	      res.push(item);
+	    }
+	
+	    // Interleave commas between elements
+	    if (index !== items.length - 1) {
+	      res.push(", ");
+	    }
+	    return res;
+	  }, []);
 	}
 	
 	/**
 	 * Get entries ordered by index.
 	 *
 	 * @param {Object} props Component props.
 	 * @param {Array} entries Entries array.
 	 * @param {Array} indexes Indexes of entries.
@@ -3193,19 +3252,16 @@ return /******/ (function(modules) { // 
 	    let [key, entryValue] = entries[index];
 	    let value = entryValue.value !== undefined ? entryValue.value : entryValue;
 	
 	    return PropRep({
 	      // key,
 	      name: key,
 	      equal: ": ",
 	      object: value,
-	      // Do not add a trailing comma on the last entry
-	      // if there won't be a "more..." item.
-	      delim: i < indexes.length - 1 || indexes.length < entries.length ? ", " : null,
 	      mode: MODE.TINY,
 	      objectLink,
 	      onDOMNodeMouseOver,
 	      onDOMNodeMouseOut,
 	      onInspectIconClick
 	    });
 	  });
 	}
--- a/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-array.html
+++ b/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-array.html
@@ -35,16 +35,17 @@ window.onload = Task.async(function* () 
     yield testBasic();
 
     // Test property iterator
     yield testMaxProps();
     yield testMoreThanShortMaxProps();
     yield testMoreThanLongMaxProps();
     yield testRecursiveArray();
     yield testPreviewLimit();
+    yield testEmptySlots();
     yield testNamedNodeMap();
     yield testNodeList();
     yield testDocumentFragment();
 
     yield testOnDomNodeMouseOver();
     yield testOnDomNodeMouseOut();
     yield testOnDomNodeInspectIconClick();
 
@@ -231,16 +232,216 @@ window.onload = Task.async(function* () 
         mode: MODE.LONG,
         expectedOutput: defaultOutput,
       }
     ];
 
     testRepRenderModes(modeTests, testName, componentUnderTest, getGripStub(testName));
   }
 
+  function testEmptySlots() {
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ <5 empty slots> ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[5]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ <5 empty slots> ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ <5 empty slots> ]",
+      }],
+      "Array with empty slots only",
+      componentUnderTest,
+      getGripStub("Array(5)")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ <1 empty slot>, 1, 2, 1 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[4]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ <1 empty slot>, 1, 2, 1 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ <1 empty slot>, 1, 2, 3 ]",
+      }],
+      "Array with one empty slot at the beginning",
+      componentUnderTest,
+      getGripStub("[,1,2,3]")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ <3 empty slots>, 3, 4, 1 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[6]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ <3 empty slots>, 3, 4, 1 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ <3 empty slots>, 3, 4, 5 ]",
+      }],
+      "Array with multiple consecutive empty slots at the beginning",
+      componentUnderTest,
+      getGripStub("[,,,3,4,5]")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ 0, 1, <1 empty slot>, 3 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[6]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ 0, 1, <1 empty slot>, 3 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ 0, 1, <1 empty slot>, 3, 4, 5 ]",
+      }],
+      "Array with one empty slot in the middle",
+      componentUnderTest,
+      getGripStub("[0,1,,3,4,5]")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ 0, 1, <3 empty slots>, 1 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[6]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ 0, 1, <3 empty slots>, 1 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ 0, 1, <3 empty slots>, 5 ]",
+      }],
+      "Array with multiple successive empty slots in the middle",
+      componentUnderTest,
+      getGripStub("[0,1,,,,5]")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ 0, <1 empty slot>, 2, 3 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[6]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ 0, <1 empty slot>, 2, 3 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ 0, <1 empty slot>, 2, <1 empty slot>, 4, 5 ]",
+      }],
+      "Array with multiple non successive single empty slots",
+      componentUnderTest,
+      getGripStub("[0,,2,,4,5]")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ 0, <2 empty slots>, 3, 5 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[9]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ 0, <2 empty slots>, 3, 5 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ 0, <2 empty slots>, 3, <3 empty slots>, 7, 8 ]",
+      }],
+      "Array with multiple multi-slot holes",
+      componentUnderTest,
+      getGripStub("[0,,,3,,,,7,8]")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ 0, 1, 2, 3 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[6]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ 0, 1, 2, 3 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ 0, 1, 2, 3, 4, <1 empty slot> ]",
+      }],
+      "Array with a single slot hole at the end",
+      componentUnderTest,
+      getGripStub("[0,1,2,3,4,,]")
+    );
+
+    testRepRenderModes(
+      [{
+        mode: undefined,
+        expectedOutput: "Array [ 0, 1, 2, 3 more… ]",
+      },
+      {
+        mode: MODE.TINY,
+        expectedOutput: `[6]`,
+      },
+      {
+        mode: MODE.SHORT,
+        expectedOutput: "Array [ 0, 1, 2, 3 more… ]",
+      },
+      {
+        mode: MODE.LONG,
+        expectedOutput: "Array [ 0, 1, 2, <3 empty slots> ]",
+      }],
+      "Array with multiple consecutive empty slots at the end",
+      componentUnderTest,
+      getGripStub("[0,1,2,,,,]")
+    );
+  }
+
   function testNamedNodeMap() {
     const testName = "testNamedNodeMap";
 
     const defaultOutput = `NamedNodeMap [ class="myclass", cellpadding="7", border="3" ]`;
 
     const modeTests = [
       {
         mode: undefined,
@@ -910,16 +1111,214 @@ window.onload = Task.async(function* () 
                     "class": "list-element"
                   },
                   "attributesLength": 2
                 }
               }
             ]
           }
         };
+      case "Array(5)" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj33",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 1,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 5,
+            "items": [
+              null,
+              null,
+              null,
+              null,
+              null
+            ]
+          }
+        };
+      case "[,1,2,3]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj35",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 4,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 4,
+            "items": [
+              null,
+              1,
+              2,
+              3
+            ]
+          }
+        };
+      case "[,,,3,4,5]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj37",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 4,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 6,
+            "items": [
+              null,
+              null,
+              null,
+              3,
+              4,
+              5
+            ]
+          }
+        };
+      case "[0,1,,3,4,5]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj65",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 6,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 6,
+            "items": [
+              0,
+              1,
+              null,
+              3,
+              4,
+              5
+            ]
+          }
+        };
+      case "[0,1,,,,5]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj83",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 4,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 6,
+            "items": [
+              0,
+              1,
+              null,
+              null,
+              null,
+              5
+            ]
+          }
+        };
+      case "[0,,2,,4,5]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj85",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 5,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 6,
+            "items": [
+              0,
+              null,
+              2,
+              null,
+              4,
+              5
+            ]
+          }
+        };
+      case "[0,,,3,,,,7,8]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj87",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 5,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 9,
+            "items": [
+              0,
+              null,
+              null,
+              3,
+              null,
+              null,
+              null,
+              7,
+              8
+            ]
+          }
+        };
+      case "[0,1,2,3,4,,]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn4.child1/obj89",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 6,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 6,
+            "items": [
+              0,
+              1,
+              2,
+              3,
+              4,
+              null
+            ]
+          }
+        };
+      case "[0,1,2,,,,]" :
+        return {
+          "type": "object",
+          "actor": "server1.conn13.child1/obj88",
+          "class": "Array",
+          "extensible": true,
+          "frozen": false,
+          "sealed": false,
+          "ownPropertyLength": 4,
+          "preview": {
+            "kind": "ArrayLike",
+            "length": 6,
+            "items": [
+              0,
+              1,
+              2,
+              null,
+              null,
+              null
+            ]
+          }
+        };
     }
     return null;
   }
 });
 </script>
 </pre>
 </body>
 </html>
--- a/devtools/client/storage/test/head.js
+++ b/devtools/client/storage/test/head.js
@@ -616,63 +616,84 @@ function getRowValues(id, includeHidden 
  */
 function getRowCells(id, includeHidden = false) {
   let doc = gPanelWindow.document;
   let table = gUI.table;
   let item = doc.querySelector(".table-widget-column#" + table.uniqueId +
                                " .table-widget-cell[value='" + id + "']");
 
   if (!item) {
-    ok(false, "Row id '" + id + "' exists");
-
-    showAvailableIds();
+    ok(false, `The row id '${id}' that was passed to getRowCells() does not ` +
+              `exist. ${getAvailableIds()}`);
   }
 
   let index = table.columns.get(table.uniqueId).cellNodes.indexOf(item);
   let cells = {};
 
   for (let [name, column] of [...table.columns]) {
     if (!includeHidden && column.column.parentNode.hidden) {
       continue;
     }
     cells[name] = column.cellNodes[index];
   }
 
   return cells;
 }
 
 /**
- * Show available ids.
+ * Get available ids... useful for error reporting.
  */
-function showAvailableIds() {
+function getAvailableIds() {
   let doc = gPanelWindow.document;
   let table = gUI.table;
 
-  info("Available ids:");
+  let out = "Available ids:\n";
   let cells = doc.querySelectorAll(".table-widget-column#" + table.uniqueId +
                                    " .table-widget-cell");
   for (let cell of cells) {
-    info("  - " + cell.getAttribute("value"));
+    out += `  - ${cell.getAttribute("value")}\n`;
   }
+
+  return out;
+}
+
+/**
+ * Show available ids.
+ */
+function showAvailableIds() {
+  info(getAvailableIds);
 }
 
 /**
  * Get a cell value.
  *
  * @param {String} id
  *        The uniqueId of the row.
  * @param {String} column
  *        The id of the column
  *
  * @yield {String}
  *        The cell value.
  */
 function getCellValue(id, column) {
   let row = getRowValues(id, true);
 
+  if (typeof row[column] === "undefined") {
+    let out = "";
+    for (let key in row) {
+      let value = row[key];
+
+      out += `  - ${key} = ${value}\n`;
+    }
+
+    ok(false, `The column name '${column}' that was passed to ` +
+              `getCellValue() does not exist. Current column names and row ` +
+              `values are:\n${out}`);
+  }
+
   return row[column];
 }
 
 /**
  * Edit a cell value. The cell is assumed to be in edit mode, see startCellEdit.
  *
  * @param {String} id
  *        The uniqueId of the row.
--- a/devtools/server/actors/webconsole.js
+++ b/devtools/server/actors/webconsole.js
@@ -522,17 +522,17 @@ WebConsoleActor.prototype =
 
   /**
    * Release an actor.
    *
    * @param object actor
    *        The actor instance you want to release.
    */
   releaseActor: function (actor) {
-    this._actorPool.removeActor(actor.actorID);
+    this._actorPool.removeActor(actor);
   },
 
   /**
    * Returns the latest web console input evaluation.
    * This is undefined if no evaluations have been completed.
    *
    * @return object
    */
--- a/devtools/shared/webconsole/network-monitor.js
+++ b/devtools/shared/webconsole/network-monitor.js
@@ -532,32 +532,24 @@ NetworkResponseListener.prototype = {
    *
    * @private
    */
   _findOpenResponse: function () {
     if (!this.owner || this._foundOpenResponse) {
       return;
     }
 
-    let openResponse = null;
-
-    for (let id in this.owner.openResponses) {
-      let item = this.owner.openResponses[id];
-      if (item.channel === this.httpActivity.channel) {
-        openResponse = item;
-        break;
-      }
-    }
-
+    let channel = this.httpActivity.channel;
+    let openResponse = this.owner.openResponses.get(channel.channelId);
     if (!openResponse) {
       return;
     }
     this._foundOpenResponse = true;
 
-    delete this.owner.openResponses[openResponse.id];
+    this.owner.openResponses.delete(channel.channelId);
 
     this.httpActivity.owner.addResponseHeaders(openResponse.headers);
     this.httpActivity.owner.addResponseCookies(openResponse.cookies);
   },
 
   /**
    * Clean up the response listener once the response input stream is closed.
    * This is called from onStopRequest() or from onInputStreamReady() when the
@@ -704,18 +696,18 @@ NetworkResponseListener.prototype = {
  *          methods which are used to add further network request/response information.
  *        - stackTraceCollector
  *          If the owner has this optional property, it will be used as a
  *          StackTraceCollector by the NetworkMonitor.
  */
 function NetworkMonitor(filters, owner) {
   this.filters = filters;
   this.owner = owner;
-  this.openRequests = {};
-  this.openResponses = {};
+  this.openRequests = new Map();
+  this.openResponses = new Map();
   this._httpResponseExaminer =
     DevToolsUtils.makeInfallible(this._httpResponseExaminer).bind(this);
   this._httpModifyExaminer =
     DevToolsUtils.makeInfallible(this._httpModifyExaminer).bind(this);
   this._serviceWorkerRequest = this._serviceWorkerRequest.bind(this);
   this._throttleData = null;
   this._throttler = null;
 }
@@ -889,17 +881,17 @@ NetworkMonitor.prototype = {
     channel.QueryInterface(Ci.nsIHttpChannelInternal);
     channel.getResponseVersion(httpVersionMaj, httpVersionMin);
 
     response.status = channel.responseStatus;
     response.statusText = channel.responseStatusText;
     response.httpVersion = "HTTP/" + httpVersionMaj.value + "." +
                                      httpVersionMin.value;
 
-    this.openResponses[response.id] = response;
+    this.openResponses.set(channel.channelId, response);
 
     if (topic === "http-on-examine-cached-response") {
       // Service worker requests emits cached-reponse notification on non-e10s,
       // and we fake one on e10s.
       let fromServiceWorker = this.interceptedChannels.has(channel);
       this.interceptedChannels.delete(channel);
 
       // If this is a cached response, there never was a request event
@@ -1173,23 +1165,17 @@ NetworkMonitor.prototype = {
    * Find an HTTP activity object for the channel.
    *
    * @param nsIHttpChannel channel
    *        The HTTP channel whose activity object we want to find.
    * @return object
    *        The HTTP activity object, or null if it is not found.
    */
   _findActivityObject: function (channel) {
-    for (let id in this.openRequests) {
-      let item = this.openRequests[id];
-      if (item.channel === channel) {
-        return item;
-      }
-    }
-    return null;
+    return this.openRequests.get(channel.channelId) || null;
   },
 
   /**
    * Find an existing HTTP activity object, or create a new one. This
    * object is used for storing all the request and response
    * information.
    *
    * This is a HAR-like object. Conformance to the spec is not guaranteed at
@@ -1221,17 +1207,17 @@ NetworkMonitor.prototype = {
         // internal timing information, see observeActivity()
         timings: {},
         // see _onResponseHeader()
         responseStatus: null,
         // the activity owner which is notified when changes happen
         owner: null,
       };
 
-      this.openRequests[httpActivity.id] = httpActivity;
+      this.openRequests.set(channel.channelId, httpActivity);
     }
 
     return httpActivity;
   },
 
   /**
    * Setup the network response listener for the given HTTP activity. The
    * NetworkResponseListener is responsible for storing the response body.
@@ -1372,17 +1358,17 @@ NetworkMonitor.prototype = {
    *
    * @private
    * @param object httpActivity
    *        The HTTP activity object we work with.
    */
   _onTransactionClose: function (httpActivity) {
     let result = this._setupHarTimings(httpActivity);
     httpActivity.owner.addEventTimings(result.total, result.timings);
-    delete this.openRequests[httpActivity.id];
+    this.openRequests.delete(httpActivity.channel.channelId);
   },
 
   /**
    * Update the HTTP activity object to include timing information as in the HAR
    * spec. The HTTP activity object holds the raw timing information in
    * |timings| - these are timings stored for each activity notification. The
    * HAR timing information is constructed based on these lower level
    * data.
@@ -1491,18 +1477,18 @@ NetworkMonitor.prototype = {
       Services.obs.removeObserver(this._httpModifyExaminer,
                                   "http-on-modify-request");
     }
 
     Services.obs.removeObserver(this._serviceWorkerRequest,
                                 "service-worker-synthesized-response");
 
     this.interceptedChannels.clear();
-    this.openRequests = {};
-    this.openResponses = {};
+    this.openRequests.clear();
+    this.openResponses.clear();
     this.owner = null;
     this.filters = null;
     this._throttler = null;
   },
 };
 
 /**
  * The NetworkMonitorChild is used to proxy all of the network activity of the
--- a/docshell/base/nsContextMenuInfo.cpp
+++ b/docshell/base/nsContextMenuInfo.cpp
@@ -297,17 +297,18 @@ nsContextMenuInfo::GetBackgroundImageReq
 
           imgLoader* il = imgLoader::NormalLoader();
           NS_ENSURE_TRUE(il, NS_ERROR_FAILURE);
 
           return il->LoadImage(bgUri, nullptr, nullptr,
                                doc->GetReferrerPolicy(), principal, nullptr,
                                nullptr, nullptr, nullptr, nsIRequest::LOAD_NORMAL,
                                nullptr, nsIContentPolicy::TYPE_INTERNAL_IMAGE,
-                               EmptyString(), aRequest);
+                               EmptyString(),
+                               /* aUseUrgentStartForChannel */ false, aRequest);
         }
       }
 
       // bail if we encounter non-transparent background-color
       computedStyle->GetPropertyCSSValue(NS_LITERAL_STRING("background-color"),
                                          getter_AddRefs(cssValue));
       primitiveValue = do_QueryInterface(cssValue);
       if (primitiveValue) {
--- a/dom/base/nsContentPolicy.h
+++ b/dom/base/nsContentPolicy.h
@@ -30,29 +30,18 @@ class nsContentPolicy : public nsIConten
     //Array of policies
     nsCategoryCache<nsIContentPolicy> mPolicies;
     nsCategoryCache<nsISimpleContentPolicy> mSimplePolicies;
 
     nsCOMPtr<nsIContentPolicy> mMixedContentBlocker;
     nsCOMPtr<nsIContentPolicy> mCSPService;
 
     //Helper type for CheckPolicy
-    typedef
-    NS_STDCALL_FUNCPROTO(nsresult, CPMethod, nsIContentPolicy,
-                         ShouldProcess,
-                         (uint32_t, nsIURI*, nsIURI*, nsISupports*,
-                           const nsACString &, nsISupports*, nsIPrincipal*,
-                           int16_t*));
-
-    typedef
-    NS_STDCALL_FUNCPROTO(nsresult, SCPMethod, nsISimpleContentPolicy,
-                         ShouldProcess,
-                         (uint32_t, nsIURI*, nsIURI*, nsIDOMElement*, bool,
-                           const nsACString &, nsISupports*, nsIPrincipal*,
-                           int16_t*));
+    typedef decltype(&nsIContentPolicy::ShouldProcess) CPMethod;
+    typedef decltype(&nsISimpleContentPolicy::ShouldProcess) SCPMethod;
 
     //Helper method that applies policyMethod across all policies in mPolicies
     // with the given parameters
     nsresult CheckPolicy(CPMethod policyMethod, SCPMethod simplePolicyMethod,
                          nsContentPolicyType contentType,
                          nsIURI *aURI, nsIURI *origURI,
                          nsISupports *requestingContext,
                          const nsACString &mimeGuess, nsISupports *extra,
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -3507,17 +3507,18 @@ nsContentUtils::IsImageInCache(nsIURI* a
 nsresult
 nsContentUtils::LoadImage(nsIURI* aURI, nsINode* aContext,
                           nsIDocument* aLoadingDocument,
                           nsIPrincipal* aLoadingPrincipal, nsIURI* aReferrer,
                           net::ReferrerPolicy aReferrerPolicy,
                           imgINotificationObserver* aObserver, int32_t aLoadFlags,
                           const nsAString& initiatorType,
                           imgRequestProxy** aRequest,
-                          uint32_t aContentPolicyType)
+                          uint32_t aContentPolicyType,
+                          bool aUseUrgentStartForChannel)
 {
   NS_PRECONDITION(aURI, "Must have a URI");
   NS_PRECONDITION(aContext, "Must have a context");
   NS_PRECONDITION(aLoadingDocument, "Must have a document");
   NS_PRECONDITION(aLoadingPrincipal, "Must have a principal");
   NS_PRECONDITION(aRequest, "Null out param");
 
   imgLoader* imgLoader = GetImgLoaderForDocument(aLoadingDocument);
@@ -3546,16 +3547,17 @@ nsContentUtils::LoadImage(nsIURI* aURI, 
                               loadGroup,            /* loadgroup */
                               aObserver,            /* imgINotificationObserver */
                               aContext,             /* loading context */
                               aLoadingDocument,     /* uniquification key */
                               aLoadFlags,           /* load flags */
                               nullptr,              /* cache key */
                               aContentPolicyType,   /* content policy type */
                               initiatorType,        /* the load initiator */
+                              aUseUrgentStartForChannel, /* urgent-start flag */
                               aRequest);
 }
 
 // static
 already_AddRefed<imgIContainer>
 nsContentUtils::GetImageFromContent(nsIImageLoadingContent* aContent,
                                     imgIRequest **aRequest)
 {
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -764,29 +764,32 @@ public:
    * @param aLoadingPrincipal the principal doing the load
    * @param aReferrer the referrer URI
    * @param aReferrerPolicy the referrer-sending policy to use on channel
    *         creation
    * @param aObserver the observer for the image load
    * @param aLoadFlags the load flags to use.  See nsIRequest
    * @param [aContentPolicyType=nsIContentPolicy::TYPE_INTERNAL_IMAGE] (Optional)
    *        The CP content type to use
+   * @param aUseUrgentStartForChannel,(Optional) a flag to mark on channel if it
+   *        is triggered by user input events.
    * @return the imgIRequest for the image load
    */
   static nsresult LoadImage(nsIURI* aURI,
                             nsINode* aContext,
                             nsIDocument* aLoadingDocument,
                             nsIPrincipal* aLoadingPrincipal,
                             nsIURI* aReferrer,
                             mozilla::net::ReferrerPolicy aReferrerPolicy,
                             imgINotificationObserver* aObserver,
                             int32_t aLoadFlags,
                             const nsAString& initiatorType,
                             imgRequestProxy** aRequest,
-                            uint32_t aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE);
+                            uint32_t aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE,
+                            bool aUseUrgentStartForChannel = false);
 
   /**
    * Obtain an image loader that respects the given document/channel's privacy status.
    * Null document/channel arguments return the public image loader.
    */
   static imgLoader* GetImgLoaderForDocument(nsIDocument* aDoc);
   static imgLoader* GetImgLoaderForChannel(nsIChannel* aChannel,
                                            nsIDocument* aContext);
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -572,36 +572,27 @@ nsFrameMessageManager::SendRpcMessage(co
 {
   return SendMessage(aMessageName, aJSON, aObjects, aPrincipal, aCx, aArgc,
                      aRetval, false);
 }
 
 static bool
 AllowMessage(size_t aDataLength, const nsAString& aMessageName)
 {
-  static const size_t kMinTelemetryMessageSize = 8192;
-
-  if (aDataLength < kMinTelemetryMessageSize) {
-    return true;
-  }
-
-  NS_ConvertUTF16toUTF8 messageName(aMessageName);
-  messageName.StripChars("0123456789");
-
-  Telemetry::Accumulate(Telemetry::MESSAGE_MANAGER_MESSAGE_SIZE2, messageName,
-                        aDataLength);
-
   // A message includes more than structured clone data, so subtract
   // 20KB to make it more likely that a message within this bound won't
   // result in an overly large IPC message.
   static const size_t kMaxMessageSize = IPC::Channel::kMaximumMessageSize - 20 * 1024;
   if (aDataLength < kMaxMessageSize) {
     return true;
   }
 
+  NS_ConvertUTF16toUTF8 messageName(aMessageName);
+  messageName.StripChars("0123456789");
+
   Telemetry::Accumulate(Telemetry::REJECTED_MESSAGE_MANAGER_MESSAGE,
                         messageName);
 
   return false;
 }
 
 nsresult
 nsFrameMessageManager::SendMessage(const nsAString& aMessageName,
--- a/dom/base/nsImageLoadingContent.cpp
+++ b/dom/base/nsImageLoadingContent.cpp
@@ -39,16 +39,17 @@
 #include "nsLayoutUtils.h"
 #include "nsIContentPolicy.h"
 #include "nsSVGEffects.h"
 
 #include "gfxPrefs.h"
 
 #include "mozAutoDocUpdate.h"
 #include "mozilla/AsyncEventDispatcher.h"
+#include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ImageTracker.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/Preferences.h"
 
 #ifdef LoadImage
 // Undefine LoadImage to prevent naming conflict with Windows.
@@ -87,16 +88,17 @@ nsImageLoadingContent::nsImageLoadingCon
     mLoadingEnabled(true),
     mIsImageStateForced(false),
     mLoading(false),
     // mBroken starts out true, since an image without a URI is broken....
     mBroken(true),
     mUserDisabled(false),
     mSuppressed(false),
     mNewRequestsWillNeedAnimationReset(false),
+    mUseUrgentStartForChannel(false),
     mStateChangerDepth(0),
     mCurrentRequestRegistered(false),
     mPendingRequestRegistered(false)
 {
   if (!nsContentUtils::GetImgLoaderForChannel(nullptr, nullptr)) {
     mLoadingEnabled = false;
   }
 
@@ -879,17 +881,22 @@ nsImageLoadingContent::LoadImage(nsIURI*
                                           thisNode,
                                           aDocument,
                                           aDocument->NodePrincipal(),
                                           aDocument->GetDocumentURI(),
                                           referrerPolicy,
                                           this, loadFlags,
                                           content->LocalName(),
                                           getter_AddRefs(req),
-                                          policyType);
+                                          policyType,
+                                          mUseUrgentStartForChannel);
+
+  // Reset the flag to avoid loading from XPCOM or somewhere again else without
+  // initiated by user interaction.
+  mUseUrgentStartForChannel = false;
 
   // Tell the document to forget about the image preload, if any, for
   // this URI, now that we might have another imgRequestProxy for it.
   // That way if we get canceled later the image load won't continue.
   aDocument->ForgetImagePreload(aNewURI);
 
   if (NS_SUCCEEDED(rv)) {
     TrackImage(req);
--- a/dom/base/nsImageLoadingContent.h
+++ b/dom/base/nsImageLoadingContent.h
@@ -450,16 +450,23 @@ protected:
    * that originate from setting .src, we mark them for needing their animation
    * reset when they are ready. mNewRequestsWillNeedAnimationReset is set to
    * true while preparing such requests (as a hack around needing to change an
    * interface), and the other two booleans store which of the current
    * and pending requests are of the sort that need their animation restarted.
    */
   bool mNewRequestsWillNeedAnimationReset : 1;
 
+  /**
+   * Flag to indicate whether the channel should be mark as urgent-start.
+   * It should be set in *Element and passed to nsContentUtils::LoadImage.
+   * True if we want to set nsIClassOfService::UrgentStart to the channel to
+   * get the response ASAP for better user responsiveness.
+   */
+  bool mUseUrgentStartForChannel;
 private:
   /* The number of nested AutoStateChangers currently tracking our state. */
   uint8_t mStateChangerDepth;
 
   // Flags to indicate whether each of the current and pending requests are
   // registered with the refresh driver.
   bool mCurrentRequestRegistered;
   bool mPendingRequestRegistered;
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -6,16 +6,17 @@
 /*
  * A base class implementing nsIObjectLoadingContent for use by
  * various content nodes that want to provide plugin/document/image
  * loading functionality (eg <embed>, <object>, <applet>, etc).
  */
 
 // Interface headers
 #include "imgLoader.h"
+#include "nsIClassOfService.h"
 #include "nsIConsoleService.h"
 #include "nsIContent.h"
 #include "nsIContentInlines.h"
 #include "nsIDocShell.h"
 #include "nsIDocument.h"
 #include "nsIDOMCustomEvent.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMHTMLObjectElement.h"
@@ -79,16 +80,17 @@
 #include "mozilla/BasicEvents.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/PluginCrashedEvent.h"
 #include "mozilla/AsyncEventDispatcher.h"
 #include "mozilla/EventDispatcher.h"
+#include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/dom/HTMLObjectElementBinding.h"
 #include "mozilla/dom/HTMLSharedObjectElement.h"
 #include "mozilla/dom/HTMLObjectElement.h"
 #include "nsChannelClassifier.h"
 
 #ifdef XP_WIN
@@ -2545,16 +2547,21 @@ nsObjectLoadingContent::OpenChannel()
                                          doc->GetReferrerPolicy());
     MOZ_ASSERT(NS_SUCCEEDED(rv));
 
     // Set the initiator type
     nsCOMPtr<nsITimedChannel> timedChannel(do_QueryInterface(httpChan));
     if (timedChannel) {
       timedChannel->SetInitiatorType(thisContent->LocalName());
     }
+
+    nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(httpChan));
+    if (cos && EventStateManager::IsHandlingUserInput()) {
+      cos->AddClassFlags(nsIClassOfService::UrgentStart);
+    }
   }
 
   nsCOMPtr<nsIScriptChannel> scriptChannel = do_QueryInterface(chan);
   if (scriptChannel) {
     // Allow execution against our context if the principals match
     scriptChannel->SetExecutionPolicy(nsIScriptChannel::EXECUTE_NORMAL);
   }
 
--- a/dom/base/test/chrome.ini
+++ b/dom/base/test/chrome.ini
@@ -25,9 +25,10 @@ subsuite = clipboard
 [test_messagemanager_principal.html]
 [test_messagemanager_send_principal.html]
 skip-if = buildapp == 'mulet'
 [test_mozbrowser_apis_allowed.html]
 [test_navigator_resolve_identity_xrays.xul]
 support-files = file_navigator_resolve_identity_xrays.xul
 [test_sandboxed_blob_uri.html]
 [test_sendQueryContentAndSelectionSetEvent.html]
+[test_urgent_start.html]
 [test_websocket_frame.html]
new file mode 100644
--- /dev/null
+++ b/dom/base/test/test_urgent_start.html
@@ -0,0 +1,271 @@
+<!DOCTYPE HTML>
+<!--
+  https://bugzilla.mozilla.org/show_bug.cgi?id=1348050
+  Test for fetch and xhr to guarantee we only mark channel as urgent-start when
+  it is triggered by user input events.
+
+  For { Fetch, SRC-*, XHR }, do the test as following:
+  Step 1: Verify them not mark the channel when there is no any input event.
+  Step 2: Verify them mark the channel there is a user input event.
+  Step 3: Verify them not mark the channel when there is a non input event.
+
+  In each steps, it shows that we only mark channel on direct triggering task.
+  We won't mark the channel for additional task(setTimeout) or
+  micro-task(promise).
+-->
+<html>
+<head>
+  <title>Test for urgent-start on Fetch and XHR</title>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet"
+        type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="manifest.js"></script>
+</head>
+<body>
+<img id="image"></body>
+<audio autoplay id="audio"></audio>
+<iframe id="iframe"></iframe>
+<input type="image" id="input"></input>
+<embed id="embed"></embed>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+const { classes: Cc, interfaces: Ci } = Components;
+
+SimpleTest.waitForExplicitFinish();
+SimpleTest.waitForFocus(runTest);
+
+const topic_request = "http-on-opening-request";
+const topic_response = "http-on-examine-response";
+const topic_cachedResponse = "http-on-examine-cached-response";
+const scope = "http://mochi.test:8888/chrome/dom/base/test/"
+const url = scope + "file_empty.html";
+
+let expectedResults = [];
+let testcases = [
+  "fetch",
+  "src-embed",
+  "src-img",
+  "src-input",
+  "src-media",
+  "xhr",
+];
+let testcase;
+
+function isUrgentStart(aClassFlags) {
+  if (!aClassFlags) {
+    return false;
+  }
+
+  const urgentStartFlag = 1 << 6;
+  return !!(urgentStartFlag & aClassFlags);
+}
+
+// Test for setTimeout (task)
+function testSetTimeout() {
+  return new Promise(aResolve =>
+    setTimeout(function() {
+      testSimple().then(aResolve);
+    }, 0));
+}
+
+// Test for promise chain (micro-task)
+function testPromise() {
+  return Promise.resolve().then(testSimple);
+}
+
+function testSimple() {
+  let testUrl = url + "?" + expectedResults.length;
+
+  if (testcase == "fetch") {
+    return fetch(testUrl);
+  } else if (testcase == "src-embed") {
+    document.getElementById('embed').src = testUrl;
+    return Promise.resolve();
+  } else if (testcase == "src-img") {
+    document.getElementById('image').src = testUrl;
+    return Promise.resolve();
+  } else if (testcase == "src-input") {
+    document.getElementById('input').src = testUrl;
+    return Promise.resolve();
+  } else if (testcase == "src-media") {
+    document.getElementById('audio').src = testUrl;
+    return Promise.resolve();
+  } else if (testcase == "xhr") {
+    let xhr = new XMLHttpRequest();
+    xhr.open("GET", testUrl, true);
+    xhr.send(null);
+    return Promise.resolve();
+  }
+
+  ok(false, "Shouldn't go here.");
+}
+
+function sendRequsetAndCheckUrgentStart(aEventToTest) {
+  info("SendRequsetAndCheckUrgentStart");
+
+  let promise1, promise2;
+  let promise1_resolve, promise2_resolve;
+
+  function checkUrgentStart(aSubject) {
+    var channel = aSubject.QueryInterface(Ci.nsIChannel);
+    if (channel.URI.spec.indexOf(scope) === -1 ) {
+      return;
+    }
+
+    info("CheckUrgentStart");
+
+    let cos = channel.QueryInterface(Ci.nsIClassOfService);
+
+    let expectedResult = expectedResults.shift();
+    is(isUrgentStart(cos.classFlags), expectedResult,
+       "Expect get: " + expectedResult + ", get: " +
+       isUrgentStart(cos.classFlags) + " in the " +
+       (9 - expectedResults.length) + " test of " + testcase);
+
+    // Make sure we've run the check.
+    promise1_resolve();
+  }
+
+  // Resolve this after we've gotten response to prevent from sending too many
+  // requests to Necko in a short time.
+  function getResponse(aSubject) {
+    var channel = aSubject.QueryInterface(Ci.nsIChannel);
+    if (channel.URI.spec.indexOf(scope) === -1 ) {
+      return;
+    }
+    info("GetResponse");
+
+    promise2_resolve();
+  }
+
+  SpecialPowers.addObserver(checkUrgentStart, topic_request);
+  SpecialPowers.addObserver(getResponse, topic_response);
+  SpecialPowers.addObserver(getResponse, topic_cachedResponse);
+
+  return Promise.resolve()
+    .then(() => {
+      promise1 = new Promise(aResolve => { promise1_resolve = aResolve; });
+      promise2 = new Promise(aResolve => { promise2_resolve = aResolve; });
+      return Promise.all([addListenerAndSendEvent(testSimple, aEventToTest),
+                          promise1,
+                          promise2]);
+    })
+    .then(() => {
+      promise1 = new Promise(aResolve => { promise1_resolve = aResolve; });
+      promise2 = new Promise(aResolve => { promise2_resolve = aResolve; });
+      return Promise.all([addListenerAndSendEvent(testSetTimeout, aEventToTest),
+                          promise1,
+                          promise2]);
+    })
+    .then(() => {
+      promise1 = new Promise(aResolve => { promise1_resolve = aResolve; });
+      promise2 = new Promise(aResolve => { promise2_resolve = aResolve; });
+      return Promise.all([addListenerAndSendEvent(testPromise, aEventToTest),
+                          promise1,
+                          promise2]);
+    })
+    .then(() => {
+      // remove obs if we've tested each three conditions
+      // (simple, promise, setTimeout).
+      SpecialPowers.removeObserver(checkUrgentStart, topic_request);
+      SpecialPowers.removeObserver(getResponse,topic_response);
+      SpecialPowers.removeObserver(getResponse, topic_cachedResponse);
+      return Promise.resolve();
+    });
+}
+
+function addListenerAndSendEvent(aFunction, aEventToTest) {
+  info("AddListenerAndSendEvent:" + aEventToTest);
+
+  let eventHandle = function () {
+    return aFunction();
+  };
+
+  if (aEventToTest === TestEvent.USER_INPUT_EVENT) {
+    // User Input Event
+    window.addEventListener("mousedown", eventHandle, {once: true});
+  } else if (aEventToTest === TestEvent.NONUSER_INPUT_EVENT) {
+    window.addEventListener("message", eventHandle, {once: true});
+  }
+
+  if (aEventToTest === TestEvent.USER_INPUT_EVENT) {
+    // User Input Event
+    var utils = SpecialPowers.getDOMWindowUtils(window);
+    utils.sendMouseEvent("mousedown", 1, 1, 0, 1, 0);
+  } else if (aEventToTest === TestEvent.NONUSER_INPUT_EVENT) {
+    window.postMessage("hello", "*");
+  } else if (aEventToTest === TestEvent.NOEVENT) {
+    eventHandle();
+  }
+}
+
+const TestEvent = {
+  NOEVENT: 0,
+  USER_INPUT_EVENT: 1,
+  NONUSER_INPUT_EVENT: 2,
+};
+
+function executeTest() {
+  is(expectedResults.length, 0, "expectedResults should be 0 be executeTest.");
+
+  // We will test fetch first and then xhr.
+  testcase = testcases.shift();
+  info("Verify " + testcase);
+
+  expectedResults = [
+    /* SimpleTest without any events */ false,
+    /* PromiseTest without any events */ false,
+    /* SetTimeoutTest without any events */ false,
+    /* SimpleTest with a user input event */ true,
+    /* PromiseTest with a user input event */ false,
+    /* SetTimeoutTest with user input event */ false,
+    /* SimpleTest with a non user input event */ false,
+    /* PromiseTest with a non user input event */ false,
+    /* SetTimeoutTest with a non user input event */ false,
+  ];
+
+  return Promise.resolve()
+  // Verify urgent-start is not set when the request is not triggered by any
+  // events.
+    .then(() => sendRequsetAndCheckUrgentStart(TestEvent.NOEVENT))
+
+  // Verify urgent-start is set only when the request is triggered by a user
+  // input event. (not for another microtask (e.g. promise-chain) and
+  // task (e.g. setTimeout)).
+    .then(() => sendRequsetAndCheckUrgentStart(TestEvent.USER_INPUT_EVENT))
+
+  // Verify urgent-start is not set when the request is triggered by a non user
+  // input event.
+    .then(() => sendRequsetAndCheckUrgentStart(TestEvent.NONUSER_INPUT_EVENT))
+    .then(_ => {
+      if (testcases.length !== 0) {
+        // Run the other test if we still have tests needed to be run.
+        return executeTest();
+      }
+
+      return Promise.resolve();
+    });
+}
+
+function endCheck() {
+  info("End Check: make sure that we've done all the tests.");
+
+  is(testcases.length, 0, "All the tests should be executed.");
+  is(expectedResults.length, 0, "All the tests should be executed.");
+
+  return Promise.resolve();
+}
+
+function runTest() {
+  return Promise.resolve()
+    .then(executeTest)
+    .then(endCheck)
+    .catch(aError => ok(false, "Some test failed with error " + aError))
+    .then(SimpleTest.finish);
+}
+</script>
+</pre>
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/deqp/temp_externs/webkit_dom.js
+++ b/dom/canvas/test/webgl-conf/checkout/deqp/temp_externs/webkit_dom.js
@@ -153,21 +153,16 @@ Console.prototype.table = function(data,
 Console.prototype.trace = function() {};
 
 /**
  * @param {*} value
  */
 Console.prototype.count = function(value) {};
 
 /**
- * @param {*} value
- */
-Console.prototype.markTimeline = function(value) {};
-
-/**
  * @param {string=} opt_title
  */
 Console.prototype.profile = function(opt_title) {};
 
 /** @type {Array.<ScriptProfile>} */
 Console.prototype.profiles;
 
 /**
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -1115,22 +1115,16 @@ Console::Assert(const GlobalObject& aGlo
 }
 
 /* static */ void
 Console::Count(const GlobalObject& aGlobal, const nsAString& aLabel)
 {
   StringMethod(aGlobal, aLabel, MethodCount, NS_LITERAL_STRING("count"));
 }
 
-/* static */ void
-Console::NoopMethod(const GlobalObject& aGlobal)
-{
-  // Nothing to do.
-}
-
 namespace {
 
 nsresult
 StackFrameToStackEntry(JSContext* aCx, nsIStackFrame* aStackFrame,
                        ConsoleStackEntry& aStackEntry)
 {
   MOZ_ASSERT(aStackFrame);
 
--- a/dom/console/Console.h
+++ b/dom/console/Console.h
@@ -107,19 +107,16 @@ public:
          const Sequence<JS::Value>& aData);
 
   static void
   Count(const GlobalObject& aGlobal, const nsAString& aLabel);
 
   static void
   Clear(const GlobalObject& aGlobal);
 
-  static void
-  NoopMethod(const GlobalObject& aGlobal);
-
   void
   ClearStorage();
 
   void
   RetrieveConsoleEvents(JSContext* aCx, nsTArray<JS::Value>& aEvents,
                         ErrorResult& aRv);
 
   void
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -25,16 +25,17 @@
 #include "nsNetUtil.h"
 #include "nsPrintfCString.h"
 #include "nsStreamUtils.h"
 #include "nsStringStream.h"
 #include "nsHttpChannel.h"
 
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/workers/Workers.h"
+#include "mozilla/EventStateManager.h"
 #include "mozilla/ipc/PBackgroundSharedTypes.h"
 #include "mozilla/Unused.h"
 
 #include "Fetch.h"
 #include "FetchUtil.h"
 #include "InternalRequest.h"
 #include "InternalResponse.h"
 
@@ -250,16 +251,23 @@ FetchDriver::HttpFetch()
   {
     nsCOMPtr<nsIInterfaceRequestor> notificationCallbacks;
     chan->GetNotificationCallbacks(getter_AddRefs(notificationCallbacks));
     MOZ_ASSERT(!notificationCallbacks);
   }
 #endif
   chan->SetNotificationCallbacks(this);
 
+  nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(chan));
+  // Mark channel as urgent-start if the Fetch is triggered by user input
+  // events.
+  if (cos && EventStateManager::IsHandlingUserInput()) {
+    cos->AddClassFlags(nsIClassOfService::UrgentStart);
+  }
+
   // Step 3.5 begins "HTTP network or cache fetch".
   // HTTP network or cache fetch
   // ---------------------------
   // Step 1 "Let HTTPRequest..." The channel is the HTTPRequest.
   nsCOMPtr<nsIHttpChannel> httpChan = do_QueryInterface(chan);
   if (httpChan) {
     // Copy the method.
     nsAutoCString method;
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -74,43 +74,50 @@ namespace mozilla {
 namespace dom {
 
 // Calls LoadSelectedImage on host element unless it has been superseded or
 // canceled -- this is the synchronous section of "update the image data".
 // https://html.spec.whatwg.org/multipage/embedded-content.html#update-the-image-data
 class ImageLoadTask : public Runnable
 {
 public:
-  ImageLoadTask(HTMLImageElement *aElement, bool aAlwaysLoad)
+  ImageLoadTask(HTMLImageElement *aElement, bool aAlwaysLoad,
+                bool aUseUrgentStartForChannel)
     : mElement(aElement)
     , mAlwaysLoad(aAlwaysLoad)
+    , mUseUrgentStartForChannel(aUseUrgentStartForChannel)
   {
     mDocument = aElement->OwnerDoc();
     mDocument->BlockOnload();
   }
 
   NS_IMETHOD Run() override
   {
     if (mElement->mPendingImageLoadTask == this) {
       mElement->mPendingImageLoadTask = nullptr;
+      mElement->mUseUrgentStartForChannel = mUseUrgentStartForChannel;
       mElement->LoadSelectedImage(true, true, mAlwaysLoad);
     }
     mDocument->UnblockOnload(false);
     return NS_OK;
   }
 
   bool AlwaysLoad() {
     return mAlwaysLoad;
   }
 
 private:
   ~ImageLoadTask() {}
   RefPtr<HTMLImageElement> mElement;
   nsCOMPtr<nsIDocument> mDocument;
   bool mAlwaysLoad;
+
+  // True if we want to set nsIClassOfService::UrgentStart to the channel to
+  // get the response ASAP for better user responsiveness.
+  bool mUseUrgentStartForChannel;
 };
 
 HTMLImageElement::HTMLImageElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
   , mForm(nullptr)
   , mInDocResponsiveContent(false)
   , mCurrentDensity(1.0)
 {
@@ -405,33 +412,45 @@ HTMLImageElement::AfterSetAttr(int32_t a
   // parser or some such place; we'll get bound after all the attributes have
   // been set, so we'll do the image load from BindToTree.
 
   nsAttrValueOrString attrVal(aValue);
 
   if (aName == nsGkAtoms::src &&
       aNameSpaceID == kNameSpaceID_None &&
       !aValue) {
+    // Mark channel as urgent-start before load image if the image load is
+    // initaiated by a user interaction.
+    mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
     // SetAttr handles setting src since it needs to catch img.src =
     // img.src, so we only need to handle the unset case
     if (InResponsiveMode()) {
       if (mResponsiveSelector &&
           mResponsiveSelector->Content() == this) {
         mResponsiveSelector->SetDefaultSource(NullString());
       }
       QueueImageLoadTask(true);
     } else {
       // Bug 1076583 - We still behave synchronously in the non-responsive case
       CancelImageRequests(aNotify);
     }
   } else if (aName == nsGkAtoms::srcset &&
              aNameSpaceID == kNameSpaceID_None) {
+    // Mark channel as urgent-start before load image if the image load is
+    // initaiated by a user interaction.
+    mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
     PictureSourceSrcsetChanged(this, attrVal.String(), aNotify);
   } else if (aName == nsGkAtoms::sizes &&
              aNameSpaceID == kNameSpaceID_None) {
+    // Mark channel as urgent-start before load image if the image load is
+    // initaiated by a user interaction.
+    mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
     PictureSourceSizesChanged(this, attrVal.String(), aNotify);
   }
 
   return nsGenericHTMLElement::AfterSetAttr(aNameSpaceID, aName,
                                             aValue, aNotify);
 }
 
 nsresult
@@ -500,16 +519,20 @@ HTMLImageElement::SetAttr(int32_t aNameS
   // If we are in responsive mode, we drop the forced reload behavior,
   // but still trigger a image load task for img.src = img.src per
   // spec.
   //
   // Both cases handle unsetting src in AfterSetAttr
   if (aNameSpaceID == kNameSpaceID_None &&
       aName == nsGkAtoms::src) {
 
+    // Mark channel as urgent-start before load image if the image load is
+    // initaiated by a user interaction.
+    mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
     if (InResponsiveMode()) {
       if (mResponsiveSelector &&
           mResponsiveSelector->Content() == this) {
         mResponsiveSelector->SetDefaultSource(aValue);
       }
       QueueImageLoadTask(true);
     } else if (aNotify) {
       // If aNotify is false, we are coming from the parser or some such place;
@@ -557,16 +580,20 @@ HTMLImageElement::SetAttr(int32_t aNameS
 
   nsresult rv = nsGenericHTMLElement::SetAttr(aNameSpaceID, aName, aPrefix,
                                               aValue, aNotify);
 
   // Because we load image synchronously in non-responsive-mode, we need to do
   // reload after the attribute has been set if the reload is triggerred by
   // cross origin changing.
   if (forceReload) {
+    // Mark channel as urgent-start before load image if the image load is
+    // initaiated by a user interaction.
+    mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
     if (InResponsiveMode()) {
       // per spec, full selection runs when this changes, even though
       // it doesn't directly affect the source selection
       QueueImageLoadTask(true);
     } else {
       // Bug 1076583 - We still use the older synchronous algorithm in
       // non-responsive mode. Force a new load of the image with the
       // new cross origin policy
@@ -595,28 +622,36 @@ HTMLImageElement::BindToTree(nsIDocument
   }
 
   if (HaveSrcsetOrInPicture()) {
     if (aDocument && !mInDocResponsiveContent) {
       aDocument->AddResponsiveContent(this);
       mInDocResponsiveContent = true;
     }
 
+    // Mark channel as urgent-start before load image if the image load is
+    // initaiated by a user interaction.
+    mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
     // Run selection algorithm when an img element is inserted into a document
     // in order to react to changes in the environment. See note of
     // https://html.spec.whatwg.org/multipage/embedded-content.html#img-environment-changes
     QueueImageLoadTask(false);
   } else if (!InResponsiveMode() &&
              HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {
     // We skip loading when our attributes were set from parser land,
     // so trigger a aForce=false load now to check if things changed.
     // This isn't necessary for responsive mode, since creating the
     // image load task is asynchronous we don't need to take special
     // care to avoid doing so when being filled by the parser.
 
+    // Mark channel as urgent-start before load image if the image load is
+    // initaiated by a user interaction.
+    mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
     // FIXME: Bug 660963 it would be nice if we could just have
     // ClearBrokenState update our state and do it fast...
     ClearBrokenState();
     RemoveStatesSilently(NS_EVENT_STATE_BROKEN);
 
     // We still act synchronously for the non-responsive case (Bug
     // 1076583), but still need to delay if it is unsafe to run
     // script.
@@ -825,16 +860,20 @@ HTMLImageElement::CopyInnerTo(Element* a
 
   if (!destIsStatic) {
     // In SetAttr (called from nsGenericHTMLElement::CopyInnerTo), dest skipped
     // doing the image load because we passed in false for aNotify.  But we
     // really do want it to do the load, so set it up to happen once the cloning
     // reaches a stable state.
     if (!dest->InResponsiveMode() &&
         dest->HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {
+      // Mark channel as urgent-start before load image if the image load is
+      // initaiated by a user interaction.
+      mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
       nsContentUtils::AddScriptRunner(
         NewRunnableMethod(dest, &HTMLImageElement::MaybeLoadImage));
     }
   }
 
   return NS_OK;
 }
 
@@ -908,17 +947,19 @@ HTMLImageElement::QueueImageLoadTask(boo
   }
 
   // Ensure that we don't overwrite a previous load request that requires
   // a complete load to occur.
   bool alwaysLoad = aAlwaysLoad;
   if (mPendingImageLoadTask) {
     alwaysLoad = alwaysLoad || mPendingImageLoadTask->AlwaysLoad();
   }
-  RefPtr<ImageLoadTask> task = new ImageLoadTask(this, alwaysLoad);
+  RefPtr<ImageLoadTask> task = new ImageLoadTask(this,
+                                                 alwaysLoad,
+                                                 mUseUrgentStartForChannel);
   // The task checks this to determine if it was the last
   // queued event, and so earlier tasks are implicitly canceled.
   mPendingImageLoadTask = task;
   nsContentUtils::RunInStableState(task.forget());
 }
 
 bool
 HTMLImageElement::HaveSrcsetOrInPicture()
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -1356,16 +1356,20 @@ HTMLInputElement::BeforeSetAttr(int32_t 
     if ((aName == nsGkAtoms::name ||
          (aName == nsGkAtoms::type && !mForm)) &&
         mType == NS_FORM_INPUT_RADIO &&
         (mForm || mDoneCreating)) {
       WillRemoveFromRadioGroup();
     } else if (aNotify && aName == nsGkAtoms::src &&
                mType == NS_FORM_INPUT_IMAGE) {
       if (aValue) {
+        // Mark channel as urgent-start before load image if the image load is
+        // initaiated by a user interaction.
+        mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
         LoadImage(aValue->String(), true, aNotify, eImageLoadType_Normal);
       } else {
         // Null value means the attr got unset; drop the image
         CancelImageRequests(aNotify);
       }
     } else if (aNotify && aName == nsGkAtoms::disabled) {
       mDisabledChanged = true;
     } else if (aName == nsGkAtoms::dir &&
@@ -5096,16 +5100,20 @@ HTMLInputElement::BindToTree(nsIDocument
 
   nsImageLoadingContent::BindToTree(aDocument, aParent, aBindingParent,
                                     aCompileEventHandlers);
 
   if (mType == NS_FORM_INPUT_IMAGE) {
     // Our base URI may have changed; claim that our URI changed, and the
     // nsImageLoadingContent will decide whether a new image load is warranted.
     if (HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {
+      // Mark channel as urgent-start before load image if the image load is
+      // initaiated by a user interaction.
+      mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
       // FIXME: Bug 660963 it would be nice if we could just have
       // ClearBrokenState update our state and do it fast...
       ClearBrokenState();
       RemoveStatesSilently(NS_EVENT_STATE_BROKEN);
       nsContentUtils::AddScriptRunner(
         NewRunnableMethod(this, &HTMLInputElement::MaybeLoadImage));
     }
   }
@@ -5287,16 +5295,20 @@ HTMLInputElement::HandleTypeChange(uint8
     // We're no longer an image input.  Cancel our image requests, if we have
     // any.
     CancelImageRequests(aNotify);
   } else if (aNotify && mType == NS_FORM_INPUT_IMAGE) {
     // We just got switched to be an image input; we should see
     // whether we have an image to load;
     nsAutoString src;
     if (GetAttr(kNameSpaceID_None, nsGkAtoms::src, src)) {
+      // Mark channel as urgent-start before load image if the image load is
+      // initaiated by a user interaction.
+      mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
       LoadImage(src, false, aNotify, eImageLoadType_Normal);
     }
   }
 
   if (mType == NS_FORM_INPUT_PASSWORD && IsInComposedDoc()) {
     AsyncEventDispatcher* dispatcher =
       new AsyncEventDispatcher(this,
                                NS_LITERAL_STRING("DOMInputPasswordAdded"),
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1159,16 +1159,20 @@ public:
       aElement->NotifyLoadError();
       return;
     }
 
     nsCOMPtr<nsIClassOfService> cos;
     if (aElement->mUseUrgentStartForChannel &&
         (cos = do_QueryInterface(channel))) {
       cos->AddClassFlags(nsIClassOfService::UrgentStart);
+
+      // Reset the flag to avoid loading again without initiated by user
+      // interaction.
+      aElement->mUseUrgentStartForChannel = false;
     }
 
     // The listener holds a strong reference to us.  This creates a
     // reference cycle, once we've set mChannel, which is manually broken
     // in the listener's OnStartRequest method after it is finished with
     // the element. The cycle will also be broken if we get a shutdown
     // notification before OnStartRequest fires.  Necko guarantees that
     // OnStartRequest will eventually fire if we don't shut down first.
@@ -1875,16 +1879,22 @@ void HTMLMediaElement::DoLoad()
   }
 
   // Detect if user has interacted with element so that play will not be
   // blocked when initiated by a script. This enables sites to capture user
   // intent to play by calling load() in the click handler of a "catalog
   // view" of a gallery of videos.
   if (EventStateManager::IsHandlingUserInput()) {
     mHasUserInteraction = true;
+
+    // Mark the channel as urgent-start when autopaly so that it will play the
+    // media from src after loading enough resource.
+    if (HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay)) {
+      mUseUrgentStartForChannel = true;
+    }
   }
 
   SetPlayedOrSeeked(false);
   mIsRunningLoadMethod = true;
   AbortExistingLoads();
   SetPlaybackRate(mDefaultPlaybackRate);
   QueueSelectResourceTask();
   ResetState();
--- a/dom/html/HTMLSelectElement.cpp
+++ b/dom/html/HTMLSelectElement.cpp
@@ -1927,16 +1927,36 @@ HTMLSelectElement::SetOpenInParentProces
 {
   nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
   nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
   if (comboFrame) {
     comboFrame->SetOpenInParentProcess(aVal);
   }
 }
 
+void
+HTMLSelectElement::GetPreviewValue(nsAString& aValue)
+{
+  nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
+  nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
+  if (comboFrame) {
+    comboFrame->GetPreviewText(aValue);
+  }
+}
+
+void
+HTMLSelectElement::SetPreviewValue(const nsAString& aValue)
+{
+  nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
+  nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
+  if (comboFrame) {
+    comboFrame->SetPreviewText(aValue);
+  }
+}
+
 JSObject*
 HTMLSelectElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return HTMLSelectElementBinding::Wrap(aCx, this, aGivenProto);
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/html/HTMLSelectElement.h
+++ b/dom/html/HTMLSelectElement.h
@@ -438,16 +438,19 @@ public:
   bool IsCombobox() const
   {
     return !Multiple() && Size() <= 1;
   }
 
   bool OpenInParentProcess();
   void SetOpenInParentProcess(bool aVal);
 
+  void GetPreviewValue(nsAString& aValue);
+  void SetPreviewValue(const nsAString& aValue);
+
 protected:
   virtual ~HTMLSelectElement();
 
   friend class SafeOptionListMutation;
 
   // Helper Methods
   /**
    * Check whether the option specified by the index is selected
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -519,17 +519,17 @@ NS_INTERFACE_MAP_END
 
 mozilla::ipc::IPCResult
 ContentChild::RecvSetXPCOMProcessAttributes(const XPCOMInitData& aXPCOMInit,
                                             const StructuredCloneData& aInitialData,
                                             nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache)
 {
   mLookAndFeelCache = aLookAndFeelIntCache;
   InitXPCOM(aXPCOMInit, aInitialData);
-  InitGraphicsDeviceData(aXPCOMInit.contentDeviceData());
+  InitGraphicsDeviceData();
 
 #ifdef NS_PRINTING
   // Force the creation of the nsPrintingProxy so that it's IPC counterpart,
   // PrintingParent, is always available for printing initiated from the parent.
   // Create nsPrintingProxy instance later than the SystemGroup initialization.
   RefPtr<nsPrintingProxy> printingProxy = nsPrintingProxy::GetInstance();
 #endif
 
@@ -950,21 +950,21 @@ ContentChild::AppendProcessId(nsACString
   if (!aName.IsEmpty()) {
     aName.Append(' ');
   }
   unsigned pid = getpid();
   aName.Append(nsPrintfCString("(pid %u)", pid));
 }
 
 void
-ContentChild::InitGraphicsDeviceData(const ContentDeviceData& aData)
+ContentChild::InitGraphicsDeviceData()
 {
   // Initialize the graphics platform. This may contact the parent process
   // to read device preferences.
-  gfxPlatform::InitChild(aData);
+  gfxPlatform::GetPlatform();
 }
 
 void
 ContentChild::InitXPCOM(const XPCOMInitData& aXPCOMInit,
                         const mozilla::dom::ipc::StructuredCloneData& aInitialData)
 {
   SET_PREF_PHASE(pref_initPhase::BEGIN_ALL_PREFS);
   for (unsigned int i = 0; i < aXPCOMInit.prefs().Length(); i++) {
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -99,17 +99,17 @@ public:
             base::ProcessId aParentPid,
             IPC::Channel* aChannel,
             uint64_t aChildID,
             bool aIsForBrowser);
 
   void InitXPCOM(const XPCOMInitData& aXPCOMInit,
                  const mozilla::dom::ipc::StructuredCloneData& aInitialData);
 
-  void InitGraphicsDeviceData(const ContentDeviceData& aData);
+  void InitGraphicsDeviceData();
 
   static ContentChild* GetSingleton()
   {
     return sSingleton;
   }
 
   const AppInfo& GetAppInfo()
   {
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2219,18 +2219,16 @@ ContentParent::InitInternal(ProcessPrior
   // send the file URL instead.
   StyleSheet* ucs = nsLayoutStylesheetCache::For(StyleBackendType::Gecko)->UserContentSheet();
   if (ucs) {
     SerializeURI(ucs->GetSheetURI(), xpcomInit.userContentSheetURL());
   } else {
     SerializeURI(nullptr, xpcomInit.userContentSheetURL());
   }
 
-  gfxPlatform::GetPlatform()->BuildContentDeviceData(&xpcomInit.contentDeviceData());
-
   nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
   if (gfxInfo) {
     for (int32_t i = 1; i <= nsIGfxInfo::FEATURE_MAX_VALUE; ++i) {
       int32_t status = 0;
       nsAutoCString failureId;
       gfxInfo->GetFeatureStatus(i, failureId, &status);
       dom::GfxInfoFeatureStatus gfxFeatureStatus;
       gfxFeatureStatus.feature() = i;
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -264,17 +264,16 @@ struct XPCOMInitData
     bool haveBidiKeyboards;
     nsString[] dictionaries;
     ClipboardCapabilities clipboardCaps;
     DomainPolicyClone domainPolicy;
     /* used on MacOSX only */
     FontFamilyListEntry[] fontFamilies;
     OptionalURIParams userContentSheetURL;
     PrefSetting[] prefs;
-    ContentDeviceData contentDeviceData;
     GfxInfoFeatureStatus[] gfxFeatureStatus;
     DataStorageEntry[] dataStorage;
     nsCString[] appLocales;
     nsCString[] requestedLocales;
 };
 
 /**
  * The PContent protocol is a top-level protocol between the UI process
--- a/dom/media/MediaDecoderReaderWrapper.cpp
+++ b/dom/media/MediaDecoderReaderWrapper.cpp
@@ -49,18 +49,21 @@ MediaDecoderReaderWrapper::RequestAudioD
   MOZ_ASSERT(!mShutdown);
 
   int64_t startTime = StartTime().ToMicroseconds();
   return InvokeAsync(mReader->OwnerThread(), mReader.get(),
                      __func__, &MediaDecoderReader::RequestAudioData)
     ->Then(mOwnerThread, __func__,
            [startTime] (AudioData* aAudio) {
              aAudio->AdjustForStartTime(startTime);
+             return AudioDataPromise::CreateAndResolve(aAudio, __func__);
            },
-           [] (const MediaResult& aError) {});
+           [] (const MediaResult& aError) {
+             return AudioDataPromise::CreateAndReject(aError, __func__);
+           });
 }
 
 RefPtr<MediaDecoderReaderWrapper::VideoDataPromise>
 MediaDecoderReaderWrapper::RequestVideoData(bool aSkipToNextKeyframe,
                                             media::TimeUnit aTimeThreshold)
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
   MOZ_ASSERT(!mShutdown);
@@ -72,18 +75,21 @@ MediaDecoderReaderWrapper::RequestVideoD
   int64_t startTime = StartTime().ToMicroseconds();
   return InvokeAsync(
     mReader->OwnerThread(), mReader.get(), __func__,
     &MediaDecoderReader::RequestVideoData,
     aSkipToNextKeyframe, aTimeThreshold)
   ->Then(mOwnerThread, __func__,
          [startTime] (VideoData* aVideo) {
            aVideo->AdjustForStartTime(startTime);
+           return VideoDataPromise::CreateAndResolve(aVideo, __func__);
          },
-         [] (const MediaResult& aError) {});
+         [] (const MediaResult& aError) {
+           return VideoDataPromise::CreateAndReject(aError, __func__);
+         });
 }
 
 RefPtr<MediaDecoderReader::SeekPromise>
 MediaDecoderReaderWrapper::Seek(const SeekTarget& aTarget)
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
   SeekTarget adjustedTarget = aTarget;
   adjustedTarget.SetTime(adjustedTarget.GetTime() + StartTime());
@@ -126,27 +132,35 @@ RefPtr<ShutdownPromise>
 MediaDecoderReaderWrapper::Shutdown()
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
   mShutdown = true;
   return InvokeAsync(mReader->OwnerThread(), mReader.get(), __func__,
                      &MediaDecoderReader::Shutdown);
 }
 
-void
+RefPtr<MediaDecoderReaderWrapper::MetadataPromise>
 MediaDecoderReaderWrapper::OnMetadataRead(MetadataHolder* aMetadata)
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
   if (mShutdown) {
-    return;
+    return MetadataPromise::CreateAndReject(
+      NS_ERROR_DOM_MEDIA_ABORT_ERR, __func__);
   }
 
   if (mStartTime.isNothing()) {
     mStartTime.emplace(aMetadata->mInfo.mStartTime);
   }
+  return MetadataPromise::CreateAndResolve(aMetadata, __func__);
+}
+
+RefPtr<MediaDecoderReaderWrapper::MetadataPromise>
+MediaDecoderReaderWrapper::OnMetadataNotRead(const MediaResult& aError)
+{
+  return MetadataPromise::CreateAndReject(aError, __func__);
 }
 
 void
 MediaDecoderReaderWrapper::SetVideoBlankDecode(bool aIsBlankDecode)
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
   nsCOMPtr<nsIRunnable> r =
     NewRunnableMethod<bool>(mReader, &MediaDecoderReader::SetVideoNullDecode,
--- a/dom/media/MediaDecoderReaderWrapper.h
+++ b/dom/media/MediaDecoderReaderWrapper.h
@@ -85,18 +85,18 @@ public:
   }
 
   void SetCDMProxy(CDMProxy* aProxy) { mReader->SetCDMProxy(aProxy); }
 
   void SetVideoBlankDecode(bool aIsBlankDecode);
 
 private:
   ~MediaDecoderReaderWrapper();
-  void OnMetadataRead(MetadataHolder* aMetadata);
-  void OnMetadataNotRead() {}
+  RefPtr<MetadataPromise> OnMetadataRead(MetadataHolder* aMetadata);
+  RefPtr<MetadataPromise> OnMetadataNotRead(const MediaResult& aError);
 
   const RefPtr<AbstractThread> mOwnerThread;
   const RefPtr<MediaDecoderReader> mReader;
 
   bool mShutdown = false;
   Maybe<media::TimeUnit> mStartTime;
 };
 
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -565,18 +565,19 @@ public:
     return mDecoder->SupportDecoderRecycling();
   }
   RefPtr<ShutdownPromise> Shutdown() override
   {
     RefPtr<MediaDataDecoder> decoder = mDecoder.forget();
     RefPtr<Token> token = mToken.forget();
     return decoder->Shutdown()->Then(
       AbstractThread::GetCurrent(), __func__,
-      [token]() {},
-      [token]() { MOZ_RELEASE_ASSERT(false, "Can't reach here"); });
+      [token]() {
+        return ShutdownPromise::CreateAndResolve(true, __func__);
+      });
   }
 
 private:
   RefPtr<MediaDataDecoder> mDecoder;
   RefPtr<Token> mToken;
 };
 
 void
@@ -884,30 +885,42 @@ public:
 
   RefPtr<SeekPromise> Seek(const TimeUnit& aTime) override
   {
     RefPtr<Wrapper> self = this;
     return InvokeAsync(
              mTaskQueue, __func__,
              [self, aTime]() { return self->mTrackDemuxer->Seek(aTime); })
       ->Then(mTaskQueue, __func__,
-             [self]() { self->UpdateRandomAccessPoint(); },
-             [self]() { self->UpdateRandomAccessPoint(); });
+             [self](const TimeUnit& aTime) {
+               self->UpdateRandomAccessPoint();
+               return SeekPromise::CreateAndResolve(aTime, __func__);
+             },
+             [self](const MediaResult& aError) {
+               self->UpdateRandomAccessPoint();
+               return SeekPromise::CreateAndReject(aError, __func__);
+             });
   }
 
   RefPtr<SamplesPromise> GetSamples(int32_t aNumSamples) override
   {
     RefPtr<Wrapper> self = this;
     return InvokeAsync(mTaskQueue, __func__,
                        [self, aNumSamples]() {
                          return self->mTrackDemuxer->GetSamples(aNumSamples);
                        })
       ->Then(mTaskQueue, __func__,
-             [self]() { self->UpdateRandomAccessPoint(); },
-             [self]() { self->UpdateRandomAccessPoint(); });
+             [self](RefPtr<SamplesHolder> aSamples) {
+               self->UpdateRandomAccessPoint();
+               return SamplesPromise::CreateAndResolve(aSamples.forget(), __func__);
+             },
+             [self](const MediaResult& aError) {
+               self->UpdateRandomAccessPoint();
+               return SamplesPromise::CreateAndReject(aError, __func__);
+             });
   }
 
   bool GetSamplesMayBlock() const override
   {
     return mGetSamplesMayBlock;
   }
 
   void Reset() override
@@ -933,18 +946,24 @@ public:
     RefPtr<Wrapper> self = this;
     return InvokeAsync(
              mTaskQueue, __func__,
              [self, aTimeThreshold]()  {
                return self->mTrackDemuxer->SkipToNextRandomAccessPoint(
                  aTimeThreshold);
              })
       ->Then(mTaskQueue, __func__,
-             [self]() { self->UpdateRandomAccessPoint(); },
-             [self]() { self->UpdateRandomAccessPoint(); });
+             [self](uint32_t aVal) {
+               self->UpdateRandomAccessPoint();
+               return SkipAccessPointPromise::CreateAndResolve(aVal, __func__);
+             },
+             [self](const SkipFailureHolder& aError) {
+               self->UpdateRandomAccessPoint();
+               return SkipAccessPointPromise::CreateAndReject(aError, __func__);
+             });
   }
 
   TimeIntervals GetBuffered() override
   {
     MutexAutoLock lock(mMutex);
     return mBuffered;
   }
 
@@ -992,30 +1011,33 @@ private:
     MutexAutoLock lock(mMutex);
     mBuffered = mTrackDemuxer->GetBuffered();
   }
 };
 
 RefPtr<MediaDataDemuxer::InitPromise>
 MediaFormatReader::DemuxerProxy::Init()
 {
+  using InitPromise = MediaDataDemuxer::InitPromise;
+
   RefPtr<Data> data = mData;
   RefPtr<AutoTaskQueue> taskQueue = mTaskQueue;
   return InvokeAsync(mTaskQueue, __func__,
                      [data, taskQueue]() {
                        if (!data->mDemuxer) {
-                         return MediaDataDemuxer::InitPromise::CreateAndReject(
+                         return InitPromise::CreateAndReject(
                            NS_ERROR_DOM_MEDIA_CANCELED, __func__);
                        }
                        return data->mDemuxer->Init();
                      })
     ->Then(taskQueue, __func__,
            [data, taskQueue]() {
              if (!data->mDemuxer) { // Was shutdown.
-               return;
+               return InitPromise::CreateAndReject(
+                   NS_ERROR_DOM_MEDIA_CANCELED, __func__);
              }
              data->mNumAudioTrack =
                data->mDemuxer->GetNumberTracks(TrackInfo::kAudioTrack);
              if (data->mNumAudioTrack) {
                RefPtr<MediaTrackDemuxer> d =
                  data->mDemuxer->GetTrackDemuxer(TrackInfo::kAudioTrack, 0);
                if (d) {
                  RefPtr<Wrapper> wrapper =
@@ -1038,18 +1060,21 @@ MediaFormatReader::DemuxerProxy::Init()
              }
              data->mCrypto = data->mDemuxer->GetCrypto();
              data->mSeekable = data->mDemuxer->IsSeekable();
              data->mSeekableOnlyInBufferedRange =
                data->mDemuxer->IsSeekableOnlyInBufferedRanges();
              data->mShouldComputeStartTime =
                data->mDemuxer->ShouldComputeStartTime();
              data->mInitDone = true;
+             return InitPromise::CreateAndResolve(NS_OK, __func__);
            },
-           []() {});
+           [](const MediaResult& aError) {
+             return InitPromise::CreateAndReject(aError, __func__);
+           });
 }
 
 RefPtr<MediaFormatReader::NotifyDataArrivedPromise>
 MediaFormatReader::DemuxerProxy::NotifyDataArrived()
 {
   RefPtr<Data> data = mData;
   return InvokeAsync(mTaskQueue, __func__, [data]() {
     if (!data->mDemuxer) {
@@ -1609,26 +1634,30 @@ MediaFormatReader::OnDemuxFailed(TrackTy
       NotifyError(aTrack, aError);
       break;
   }
 }
 
 void
 MediaFormatReader::DoDemuxVideo()
 {
+  using SamplesPromise = MediaTrackDemuxer::SamplesPromise;
+
   auto p = mVideo.mTrackDemuxer->GetSamples(1);
 
   if (mVideo.mFirstDemuxedSampleTime.isNothing()) {
     RefPtr<MediaFormatReader> self = this;
     p = p->Then(OwnerThread(), __func__,
                 [self] (RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples) {
                   self->OnFirstDemuxCompleted(TrackInfo::kVideoTrack, aSamples);
+                  return SamplesPromise::CreateAndResolve(aSamples.forget(), __func__);
                 },
                 [self] (const MediaResult& aError) {
                   self->OnFirstDemuxFailed(TrackInfo::kVideoTrack, aError);
+                  return SamplesPromise::CreateAndReject(aError, __func__);
                 });
   }
 
   p->Then(OwnerThread(), __func__, this,
           &MediaFormatReader::OnVideoDemuxCompleted,
           &MediaFormatReader::OnVideoDemuxFailed)
    ->Track(mVideo.mDemuxRequest);
 }
@@ -1682,26 +1711,30 @@ MediaFormatReader::RequestAudioData()
   ScheduleUpdate(TrackInfo::kAudioTrack);
 
   return p;
 }
 
 void
 MediaFormatReader::DoDemuxAudio()
 {
+  using SamplesPromise = MediaTrackDemuxer::SamplesPromise;
+
   auto p = mAudio.mTrackDemuxer->GetSamples(1);
 
   if (mAudio.mFirstDemuxedSampleTime.isNothing()) {
     RefPtr<MediaFormatReader> self = this;
     p = p->Then(OwnerThread(), __func__,
                 [self] (RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples) {
                   self->OnFirstDemuxCompleted(TrackInfo::kAudioTrack, aSamples);
+                  return SamplesPromise::CreateAndResolve(aSamples.forget(), __func__);
                 },
                 [self] (const MediaResult& aError) {
                   self->OnFirstDemuxFailed(TrackInfo::kAudioTrack, aError);
+                  return SamplesPromise::CreateAndReject(aError, __func__);
                 });
   }
 
   p->Then(OwnerThread(), __func__, this,
           &MediaFormatReader::OnAudioDemuxCompleted,
           &MediaFormatReader::OnAudioDemuxFailed)
    ->Track(mAudio.mDemuxRequest);
 }
@@ -2893,19 +2926,17 @@ MediaFormatReader::NotifyTrackDemuxers()
   }
 }
 
 void
 MediaFormatReader::NotifyDataArrived()
 {
   MOZ_ASSERT(OnTaskQueue());
 
-  if (mShutdown
-      || !mDemuxer
-      || (!mDemuxerInitDone && !mDemuxerInitRequest.Exists())) {
+  if (mShutdown || !mDemuxer || !mDemuxerInitDone) {
     return;
   }
 
   if (mNotifyDataArrivedPromise.Exists()) {
     // Already one in progress. Set the dirty flag so we can process it later.
     mPendingNotifyDataArrived = true;
     return;
   }
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -305,16 +305,17 @@ GetSupportedKeySystems()
       widevine.mInitDataTypes.AppendElement(NS_LITERAL_STRING("webm"));
       widevine.mPersistentState = KeySystemFeatureSupport::Requestable;
       widevine.mDistinctiveIdentifier = KeySystemFeatureSupport::Prohibited;
       widevine.mSessionTypes.AppendElement(MediaKeySessionType::Temporary);
 #ifdef MOZ_WIDGET_ANDROID
       widevine.mSessionTypes.AppendElement(MediaKeySessionType::Persistent_license);
 #endif
       widevine.mAudioRobustness.AppendElement(NS_LITERAL_STRING("SW_SECURE_CRYPTO"));
+      widevine.mVideoRobustness.AppendElement(NS_LITERAL_STRING("SW_SECURE_CRYPTO"));
       widevine.mVideoRobustness.AppendElement(NS_LITERAL_STRING("SW_SECURE_DECODE"));
 #if defined(XP_WIN)
       // Widevine CDM doesn't include an AAC decoder. So if WMF can't
       // decode AAC, and a codec wasn't specified, be conservative
       // and reject the MediaKeys request, since we assume Widevine
       // will be used with AAC.
       if (WMFDecoderModule::HasAAC()) {
         widevine.mMP4.SetCanDecrypt(EME_CODEC_AAC);
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -643,25 +643,27 @@ GeckoMediaPluginServiceParent::AsyncAddP
   nsString dir(aDirectory);
   RefPtr<GeckoMediaPluginServiceParent> self = this;
   return InvokeAsync(
            thread, this, __func__,
            &GeckoMediaPluginServiceParent::AddOnGMPThread, dir)
     ->Then(
       mMainThread,
       __func__,
-      [dir, self]() -> void {
+      [dir, self](bool aVal) {
         LOGD(("GeckoMediaPluginServiceParent::AsyncAddPluginDirectory %s succeeded",
               NS_ConvertUTF16toUTF8(dir).get()));
         MOZ_ASSERT(NS_IsMainThread());
         self->UpdateContentProcessGMPCapabilities();
+        return GenericPromise::CreateAndResolve(aVal, __func__);
       },
-      [dir]() -> void {
+      [dir](nsresult aResult) {
         LOGD(("GeckoMediaPluginServiceParent::AsyncAddPluginDirectory %s failed",
               NS_ConvertUTF16toUTF8(dir).get()));
+        return GenericPromise::CreateAndReject(aResult, __func__);
       });
 }
 
 NS_IMETHODIMP
 GeckoMediaPluginServiceParent::AddPluginDirectory(const nsAString& aDirectory)
 {
   MOZ_ASSERT(NS_IsMainThread());
   RefPtr<GenericPromise> p = AsyncAddPluginDirectory(aDirectory);
@@ -869,25 +871,27 @@ GeckoMediaPluginServiceParent::AddOnGMPT
   RefPtr<GMPParent> gmp = CreateGMPParent(mMainThread);
   if (!gmp) {
     NS_WARNING("Can't Create GMPParent");
     return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
   }
 
   RefPtr<GeckoMediaPluginServiceParent> self(this);
   return gmp->Init(this, directory)->Then(thread, __func__,
-    [gmp, self, dir]() -> void {
+    [gmp, self, dir](bool aVal) {
       LOGD(("%s::%s: %s Succeeded", __CLASS__, __FUNCTION__, dir.get()));
       {
         MutexAutoLock lock(self->mMutex);
         self->mPlugins.AppendElement(gmp);
       }
+      return GenericPromise::CreateAndResolve(aVal, __func__);
     },
-    [dir]() -> void {
+    [dir](nsresult aResult) {
       LOGD(("%s::%s: %s Failed", __CLASS__, __FUNCTION__, dir.get()));
+      return GenericPromise::CreateAndReject(aResult, __func__);
     });
 }
 
 void
 GeckoMediaPluginServiceParent::RemoveOnGMPThread(const nsAString& aDirectory,
                                                  const bool aDeleteFromDisk,
                                                  const bool aCanDefer)
 {
--- a/dom/media/gtest/TestMozPromise.cpp
+++ b/dom/media/gtest/TestMozPromise.cpp
@@ -83,17 +83,17 @@ template<typename FunctionType>
 void
 RunOnTaskQueue(TaskQueue* aQueue, FunctionType aFun)
 {
   nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction(aFun);
   aQueue->Dispatch(r.forget());
 }
 
 // std::function can't come soon enough. :-(
-#define DO_FAIL []()->void { EXPECT_TRUE(false); }
+#define DO_FAIL []() { EXPECT_TRUE(false); return TestPromise::CreateAndReject(0, __func__); }
 
 TEST(MozPromise, BasicResolve)
 {
   AutoTaskQueue atq;
   RefPtr<TaskQueue> queue = atq.Queue();
   RunOnTaskQueue(queue, [queue] () -> void {
     TestPromise::CreateAndResolve(42, __func__)->Then(queue, __func__,
       [queue] (int aResolveValue) -> void { EXPECT_EQ(aResolveValue, 42); queue->BeginShutdown(); },
@@ -180,17 +180,21 @@ TEST(MozPromise, CompletionPromises)
   bool invokedPass = false;
   AutoTaskQueue atq;
   RefPtr<TaskQueue> queue = atq.Queue();
   RunOnTaskQueue(queue, [queue, &invokedPass] () -> void {
     TestPromise::CreateAndResolve(40, __func__)
     ->Then(queue, __func__,
       [] (int aVal) -> RefPtr<TestPromise> { return TestPromise::CreateAndResolve(aVal + 10, __func__); },
       DO_FAIL)
-    ->Then(queue, __func__, [&invokedPass] () -> void { invokedPass = true; }, DO_FAIL)
+    ->Then(queue, __func__,
+           [&invokedPass] (int aVal) {
+             invokedPass = true;
+             return TestPromise::CreateAndResolve(aVal, __func__);
+           }, DO_FAIL)
     ->Then(queue, __func__,
       [queue] (int aVal) -> RefPtr<TestPromise> {
         RefPtr<TestPromise::Private> p = new TestPromise::Private(__func__);
         nsCOMPtr<nsIRunnable> resolver = new DelayedResolveOrReject(queue, p, RRValue::MakeResolve(aVal - 8), 10);
         queue->Dispatch(resolver.forget());
         return RefPtr<TestPromise>(p);
       },
       DO_FAIL)
@@ -217,17 +221,17 @@ TEST(MozPromise, PromiseAllResolve)
     TestPromise::All(queue, promises)->Then(queue, __func__,
       [queue] (const nsTArray<int>& aResolveValues) -> void {
         EXPECT_EQ(aResolveValues.Length(), 3UL);
         EXPECT_EQ(aResolveValues[0], 22);
         EXPECT_EQ(aResolveValues[1], 32);
         EXPECT_EQ(aResolveValues[2], 42);
         queue->BeginShutdown();
       },
-      DO_FAIL
+      []() { EXPECT_TRUE(false); }
     );
   });
 }
 
 TEST(MozPromise, PromiseAllReject)
 {
   AutoTaskQueue atq;
   RefPtr<TaskQueue> queue = atq.Queue();
@@ -236,17 +240,17 @@ TEST(MozPromise, PromiseAllReject)
     nsTArray<RefPtr<TestPromise>> promises;
     promises.AppendElement(TestPromise::CreateAndResolve(22, __func__));
     promises.AppendElement(TestPromise::CreateAndReject(32.0, __func__));
     promises.AppendElement(TestPromise::CreateAndResolve(42, __func__));
    // Ensure that more than one rejection doesn't cause a crash (bug #1207312)
     promises.AppendElement(TestPromise::CreateAndReject(52.0, __func__));
 
     TestPromise::All(queue, promises)->Then(queue, __func__,
-      DO_FAIL,
+      []() { EXPECT_TRUE(false); },
       [queue] (float aRejectValue) -> void {
         EXPECT_EQ(aRejectValue, 32.0);
         queue->BeginShutdown();
       }
     );
   });
 }
 
@@ -260,18 +264,21 @@ TEST(MozPromise, Chaining)
 
   RunOnTaskQueue(queue, [queue, &holder] () {
     auto p = TestPromise::CreateAndResolve(42, __func__);
     const size_t kIterations = 100;
     for (size_t i = 0; i < kIterations; ++i) {
       p = p->Then(queue, __func__,
         [] (int aVal) {
           EXPECT_EQ(aVal, 42);
+          return TestPromise::CreateAndResolve(aVal, __func__);
         },
-        [] () {}
+        [] (double aVal) {
+          return TestPromise::CreateAndReject(aVal, __func__);
+        }
       );
 
       if (i == kIterations / 2) {
         p->Then(queue, __func__,
           [queue, &holder] () {
             holder.Disconnect();
             queue->BeginShutdown();
           },
--- a/dom/media/mediasource/MediaSourceDecoder.cpp
+++ b/dom/media/mediasource/MediaSourceDecoder.cpp
@@ -348,12 +348,22 @@ MediaSourceDecoder::ClampIntervalToEnd(c
   if (duration < aInterval.mStart) {
     return aInterval;
   }
   return TimeInterval(aInterval.mStart,
                       std::min(aInterval.mEnd, duration),
                       aInterval.mFuzz);
 }
 
+void
+MediaSourceDecoder::NotifyInitDataArrived()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+
+  if (mDemuxer) {
+    mDemuxer->NotifyInitDataArrived();
+  }
+}
+
 #undef MSE_DEBUG
 #undef MSE_DEBUGV
 
 } // namespace mozilla
--- a/dom/media/mediasource/MediaSourceDecoder.h
+++ b/dom/media/mediasource/MediaSourceDecoder.h
@@ -73,16 +73,18 @@ public:
   bool CanPlayThrough() override;
 
   void NotifyWaitingForKey() override;
 
   MediaEventSource<void>* WaitingForKeyEvent() override;
 
   bool IsMSE() const override { return true; }
 
+  void NotifyInitDataArrived();
+
 private:
   void DoSetMediaSourceDuration(double aDuration);
   media::TimeInterval ClampIntervalToEnd(const media::TimeInterval& aInterval);
 
   // The owning MediaSource holds a strong reference to this decoder, and
   // calls Attach/DetachMediaSource on this decoder to set and clear
   // mMediaSource.
   dom::MediaSource* mMediaSource;
--- a/dom/media/mediasource/MediaSourceDemuxer.cpp
+++ b/dom/media/mediasource/MediaSourceDemuxer.cpp
@@ -61,28 +61,27 @@ MediaSourceDemuxer::AddSizeOfResources(
       for (TrackBuffersManager* manager : self->mSourceBuffers) {
         manager->AddSizeOfResources(sizes);
       }
     });
 
   GetTaskQueue()->Dispatch(task.forget());
 }
 
-void MediaSourceDemuxer::NotifyDataArrived()
+void MediaSourceDemuxer::NotifyInitDataArrived()
 {
   RefPtr<MediaSourceDemuxer> self = this;
-  nsCOMPtr<nsIRunnable> task =
-    NS_NewRunnableFunction([self] () {
-      if (self->mInitPromise.IsEmpty()) {
-        return;
-      }
-      if (self->ScanSourceBuffersForContent()) {
-        self->mInitPromise.ResolveIfExists(NS_OK, __func__);
-      }
-    });
+  nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([self]() {
+    if (self->mInitPromise.IsEmpty()) {
+      return;
+    }
+    if (self->ScanSourceBuffersForContent()) {
+      self->mInitPromise.ResolveIfExists(NS_OK, __func__);
+    }
+  });
   GetTaskQueue()->Dispatch(task.forget());
 }
 
 bool
 MediaSourceDemuxer::ScanSourceBuffersForContent()
 {
   MOZ_ASSERT(OnTaskQueue());
 
--- a/dom/media/mediasource/MediaSourceDemuxer.h
+++ b/dom/media/mediasource/MediaSourceDemuxer.h
@@ -39,22 +39,21 @@ public:
   GetTrackDemuxer(TrackInfo::TrackType aType, uint32_t aTrackNumber) override;
 
   bool IsSeekable() const override;
 
   UniquePtr<EncryptionInfo> GetCrypto() override;
 
   bool ShouldComputeStartTime() const override { return false; }
 
-  void NotifyDataArrived() override;
-
   /* interface for TrackBuffersManager */
   void AttachSourceBuffer(TrackBuffersManager* aSourceBuffer);
   void DetachSourceBuffer(TrackBuffersManager* aSourceBuffer);
   AutoTaskQueue* GetTaskQueue() { return mTaskQueue; }
+  void NotifyInitDataArrived();
 
   // Returns a string describing the state of the MediaSource internal
   // buffered data. Used for debugging purposes.
   void GetMozDebugReaderData(nsACString& aString);
 
   void AddSizeOfResources(MediaSourceDecoder::ResourceSizes* aSizes);
 
   // Gap allowed between frames.
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -429,16 +429,17 @@ SourceBuffer::AppendDataCompletedWithSuc
 {
   MOZ_ASSERT(mUpdating);
   mPendingAppend.Complete();
 
   if (aResult.first()) {
     if (!mActive) {
       mActive = true;
       mMediaSource->SourceBufferIsActive(this);
+      mMediaSource->GetDecoder()->NotifyInitDataArrived();
     }
   }
   if (mActive) {
     // Tell our parent decoder that we have received new data.
     mMediaSource->GetDecoder()->NotifyDataArrived();
     // Send progress event.
     mMediaSource->GetDecoder()->NotifyBytesDownloaded();
   }
--- a/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
@@ -168,18 +168,22 @@ public:
     mDecodePromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
     mThroughputLimiter.Flush();
     for (auto iter = mDecrypts.Iter(); !iter.Done(); iter.Next()) {
       nsAutoPtr<DecryptPromiseRequestHolder>& holder = iter.Data();
       holder->DisconnectIfExists();
       iter.Remove();
     }
     RefPtr<SamplesWaitingForKey> k = mSamplesWaitingForKey;
-    return mDecoder->Flush()->Then(mTaskQueue, __func__,
-                                   [k]() { k->Flush(); });
+    return mDecoder->Flush()->Then(
+      mTaskQueue, __func__,
+      [k]() {
+        k->Flush();
+        return FlushPromise::CreateAndResolve(true, __func__);
+      });
   }
 
   RefPtr<DecodePromise> Drain() override
   {
     MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn());
     MOZ_ASSERT(!mIsShutdown);
     MOZ_ASSERT(mDecodePromise.IsEmpty() && !mDecodeRequest.Exists(),
                "Must wait for decoding to complete");
--- a/dom/media/platforms/omx/OmxDataDecoder.cpp
+++ b/dom/media/platforms/omx/OmxDataDecoder.cpp
@@ -236,18 +236,19 @@ OmxDataDecoder::DoAsyncShutdown()
   // Flush to all ports, so all buffers can be returned from component.
   RefPtr<OmxDataDecoder> self = this;
   mOmxLayer->SendCommand(OMX_CommandFlush, OMX_ALL, nullptr)
     ->Then(mOmxTaskQueue, __func__,
            [self] () -> RefPtr<OmxCommandPromise> {
              LOGL("DoAsyncShutdown: flush complete");
              return self->mOmxLayer->SendCommand(OMX_CommandStateSet, OMX_StateIdle, nullptr);
            },
-           [self] () {
+           [self] (const OmxCommandFailureHolder& aError) {
              self->mOmxLayer->Shutdown();
+             return OmxCommandPromise::CreateAndReject(aError, __func__);
            })
     ->Then(mOmxTaskQueue, __func__,
            [self] () -> RefPtr<OmxCommandPromise> {
              RefPtr<OmxCommandPromise> p =
                self->mOmxLayer->SendCommand(OMX_CommandStateSet, OMX_StateLoaded, nullptr);
 
              // According to spec 3.1.1.2.2.1:
              // OMX_StateLoaded needs to be sent before releasing buffers.
@@ -258,18 +259,19 @@ OmxDataDecoder::DoAsyncShutdown()
              // in layer, it needs to wait before the layer returns the
              // buffers.
              LOGL("DoAsyncShutdown: releasing buffers...");
              self->ReleaseBuffers(OMX_DirInput);
              self->ReleaseBuffers(OMX_DirOutput);
 
              return p;
            },
-           [self] () {
+           [self] (const OmxCommandFailureHolder& aError) {
              self->mOmxLayer->Shutdown();
+             return OmxCommandPromise::CreateAndReject(aError, __func__);
            })
     ->Then(mOmxTaskQueue, __func__,
            [self] () {
              LOGL("DoAsyncShutdown: OMX_StateLoaded, it is safe to shutdown omx");
              self->mOmxLayer->Shutdown();
              self->mWatchManager.Shutdown();
              self->mOmxLayer = nullptr;
              self->mMediaDataHelper = nullptr;
@@ -781,18 +783,19 @@ OmxDataDecoder::PortSettingsChanged()
                // Allocate new port buffers.
                nsresult rv = self->AllocateBuffers(def.eDir);
                if (NS_FAILED(rv)) {
                  self->NotifyError(OMX_ErrorUndefined, __func__);
                }
 
                return p;
              },
-             [self] () {
+             [self] (const OmxCommandFailureHolder& aError) {
                self->NotifyError(OMX_ErrorUndefined, __func__);
+               return OmxCommandPromise::CreateAndReject(aError, __func__);
              })
       ->Then(mOmxTaskQueue, __func__,
              [self] () {
                LOGL("PortSettingsChanged: port settings changed complete");
                // finish port setting changed.
                self->mPortSettingsChanged = -1;
                self->FillAndEmptyBuffers();
              },
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -933,35 +933,37 @@ const { XPCOMUtils } = require("resource
     rootOfCues.style.top = "0";
     rootOfCues.style.bottom = "0";
     overlay.appendChild(rootOfCues);
 
     // Determine if we need to compute the display states of the cues. This could
     // be the case if a cue's state has been changed since the last computation or
     // if it has not been computed yet.
     function shouldCompute(cues) {
-      if (controlBarShown) {
+      if (overlay.lastControlBarShownStatus != controlBarShown) {
         return true;
       }
 
       for (var i = 0; i < cues.length; i++) {
         if (cues[i].hasBeenReset || !cues[i].displayState) {
           return true;
         }
       }
       return false;
     }
 
     // We don't need to recompute the cues' display states. Just reuse them.
     if (!shouldCompute(cues)) {
       for (var i = 0; i < cues.length; i++) {
         rootOfCues.appendChild(cues[i].displayState);
       }
+      overlay.lastControlBarShownStatus = controlBarShown;
       return;
     }
+    overlay.lastControlBarShownStatus = controlBarShown;
 
     var boxPositions = [],
         containerBox = BoxPosition.getSimpleBoxPosition(rootOfCues),
         fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;
     var styleOptions = {
       font: fontSize + "px " + FONT_STYLE
     };
 
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -386,17 +386,17 @@ nsNPAPIPlugin::RetainStream(NPStream *ps
 
 // Create a new NPP GET or POST (given in the type argument) url
 // stream that may have a notify callback
 NPError
 MakeNewNPAPIStreamInternal(NPP npp, const char *relativeURL, const char *target,
                           eNPPStreamTypeInternal type,
                           bool bDoNotify = false,
                           void *notifyData = nullptr, uint32_t len = 0,
-                          const char *buf = nullptr, NPBool file = false)
+                          const char *buf = nullptr)
 {
   if (!npp)
     return NPERR_INVALID_INSTANCE_ERROR;
 
   PluginDestructionGuard guard(npp);
 
   nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata;
   if (!inst || !inst->IsRunning())
@@ -427,17 +427,17 @@ MakeNewNPAPIStreamInternal(NPP npp, cons
     {
       if (NS_FAILED(pluginHost->GetURL(inst, relativeURL, target, listener,
                                        nullptr, nullptr, false)))
         return NPERR_GENERIC_ERROR;
       break;
     }
   case eNPPStreamTypeInternal_Post:
     {
-      if (NS_FAILED(pluginHost->PostURL(inst, relativeURL, len, buf, file,
+      if (NS_FAILED(pluginHost->PostURL(inst, relativeURL, len, buf,
                                         target, listener, nullptr, nullptr,
                                         false, 0, nullptr)))
         return NPERR_GENERIC_ERROR;
       break;
     }
   default:
     NS_ERROR("how'd I get here");
   }
@@ -748,17 +748,17 @@ NPError
                   "notify=%p, url=%s, buf=%s\n",
                   (void*)npp, target, len, file, notifyData, relativeURL,
                   buf));
 
   PluginDestructionGuard guard(npp);
 
   return MakeNewNPAPIStreamInternal(npp, relativeURL, target,
                                     eNPPStreamTypeInternal_Post, true,
-                                    notifyData, len, buf, file);
+                                    notifyData, len, buf);
 }
 
 NPError
 _posturl(NPP npp, const char *relativeURL, const char *target,
          uint32_t len, const char *buf, NPBool file)
 {
   if (!NS_IsMainThread()) {
     NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_posturl called from the wrong thread\n"));
@@ -768,17 +768,17 @@ NPError
                  ("NPN_PostURL: npp=%p, target=%s, file=%d, len=%d, url=%s, "
                   "buf=%s\n",
                   (void*)npp, target, file, len, relativeURL, buf));
 
   PluginDestructionGuard guard(npp);
 
   return MakeNewNPAPIStreamInternal(npp, relativeURL, target,
                                     eNPPStreamTypeInternal_Post, false, nullptr,
-                                    len, buf, file);
+                                    len, buf);
 }
 
 NPError
 _newstream(NPP npp, NPMIMEType type, const char* target, NPStream* *result)
 {
   if (!NS_IsMainThread()) {
     NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_newstream called from the wrong thread\n"));
     return NPERR_INVALID_PARAM;
--- a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp
+++ b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp
@@ -645,19 +645,19 @@ nsNPAPIPluginStreamListener::OnDataAvail
       NPPAutoPusher nppPusher(npp);
       
       int32_t writeCount = 0; // bytes consumed by plugin instance
       NS_TRY_SAFE_CALL_RETURN(writeCount, (*pluginFunctions->write)(npp, &mNPStreamWrapper->mNPStream, streamPosition, numtowrite, ptrStreamBuffer), mInst,
                               NS_PLUGIN_CALL_UNSAFE_TO_REENTER_GECKO);
       
       NPP_PLUGIN_LOG(PLUGIN_LOG_NOISY,
                      ("NPP Write called: this=%p, npp=%p, pos=%d, len=%d, "
-                      "buf=%s, return(written)=%d,  url=%s\n",
+                      "buf=%.*s, return(written)=%d,  url=%s\n",
                       this, npp, streamPosition, numtowrite,
-                      ptrStreamBuffer, writeCount, mNPStreamWrapper->mNPStream.url));
+                      numtowrite, ptrStreamBuffer, writeCount, mNPStreamWrapper->mNPStream.url));
       
       if (mStreamState == eStreamStopped) {
         // The plugin called NPN_DestroyStream() from within
         // NPP_Write(), kill the stream.
         return NS_BINDING_ABORTED;
       }
       
       if (writeCount > 0) {
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -504,17 +504,16 @@ nsresult nsPluginHost::GetURLWithHeaders
   }
   return rv;
 }
 
 nsresult nsPluginHost::PostURL(nsISupports* pluginInst,
                                const char* url,
                                uint32_t postDataLen,
                                const char* postData,
-                               bool isFile,
                                const char* target,
                                nsNPAPIPluginStreamListener* streamListener,
                                const char* altHost,
                                const char* referrer,
                                bool forceJSEnabled,
                                uint32_t postHeadersLength,
                                const char* postHeaders)
 {
@@ -524,55 +523,34 @@ nsresult nsPluginHost::PostURL(nsISuppor
   // by a null target) if we also have a nsNPAPIPluginStreamListener
   // to talk to also
   if (!target && !streamListener)
     return NS_ERROR_ILLEGAL_VALUE;
 
   nsNPAPIPluginInstance* instance = static_cast<nsNPAPIPluginInstance*>(pluginInst);
 
   nsCOMPtr<nsIInputStream> postStream;
-  if (isFile) {
-    nsCOMPtr<nsIFile> file;
-    rv = CreateTempFileToPost(postData, getter_AddRefs(file));
-    if (NS_FAILED(rv))
-      return rv;
-
-    nsCOMPtr<nsIInputStream> fileStream;
-    rv = NS_NewLocalFileInputStream(getter_AddRefs(fileStream),
-                                    file,
-                                    PR_RDONLY,
-                                    0600,
-                                    nsIFileInputStream::DELETE_ON_CLOSE |
-                                    nsIFileInputStream::CLOSE_ON_EOF);
-    if (NS_FAILED(rv))
-      return rv;
-
-    rv = NS_NewBufferedInputStream(getter_AddRefs(postStream), fileStream, 8192);
-    if (NS_FAILED(rv))
-      return rv;
-  } else {
-    char *dataToPost;
-    uint32_t newDataToPostLen;
-    ParsePostBufferToFixHeaders(postData, postDataLen, &dataToPost, &newDataToPostLen);
-    if (!dataToPost)
-      return NS_ERROR_UNEXPECTED;
-
-    nsCOMPtr<nsIStringInputStream> sis = do_CreateInstance("@mozilla.org/io/string-input-stream;1", &rv);
-    if (!sis) {
-      free(dataToPost);
-      return rv;
-    }
-
-    // data allocated by ParsePostBufferToFixHeaders() is managed and
-    // freed by the string stream.
-    postDataLen = newDataToPostLen;
-    sis->AdoptData(dataToPost, postDataLen);
-    postStream = sis;
+  char *dataToPost;
+  uint32_t newDataToPostLen;
+  ParsePostBufferToFixHeaders(postData, postDataLen, &dataToPost, &newDataToPostLen);
+  if (!dataToPost)
+    return NS_ERROR_UNEXPECTED;
+
+  nsCOMPtr<nsIStringInputStream> sis = do_CreateInstance("@mozilla.org/io/string-input-stream;1", &rv);
+  if (!sis) {
+    free(dataToPost);
+    return rv;
   }
 
+  // data allocated by ParsePostBufferToFixHeaders() is managed and
+  // freed by the string stream.
+  postDataLen = newDataToPostLen;
+  sis->AdoptData(dataToPost, postDataLen);
+  postStream = sis;
+
   if (target) {
     RefPtr<nsPluginInstanceOwner> owner = instance->GetOwner();
     if (owner) {
       rv = owner->GetURL(url, target, postStream,
                          (void*)postHeaders, postHeadersLength, true);
     }
   }
 
@@ -3583,117 +3561,16 @@ nsPluginHost::ParsePostBufferToFixHeader
   }
 
   *outPostDataLen = newBufferLen;
 
   return NS_OK;
 }
 
 nsresult
-nsPluginHost::CreateTempFileToPost(const char *aPostDataURL, nsIFile **aTmpFile)
-{
-  nsresult rv;
-  int64_t fileSize;
-  nsAutoCString filename;
-
-  // stat file == get size & convert file:///c:/ to c: if needed
-  nsCOMPtr<nsIFile> inFile;
-  rv = NS_GetFileFromURLSpec(nsDependentCString(aPostDataURL),
-                             getter_AddRefs(inFile));
-  if (NS_FAILED(rv)) {
-    nsCOMPtr<nsIFile> localFile;
-    rv = NS_NewNativeLocalFile(nsDependentCString(aPostDataURL), false,
-                               getter_AddRefs(localFile));
-    if (NS_FAILED(rv)) return rv;
-    inFile = localFile;
-  }
-  rv = inFile->GetFileSize(&fileSize);
-  if (NS_FAILED(rv)) return rv;
-  rv = inFile->GetNativePath(filename);
-  if (NS_FAILED(rv)) return rv;
-
-  if (fileSize != 0) {
-    nsCOMPtr<nsIInputStream> inStream;
-    rv = NS_NewLocalFileInputStream(getter_AddRefs(inStream), inFile);
-    if (NS_FAILED(rv)) return rv;
-
-    // Create a temporary file to write the http Content-length:
-    // %ld\r\n\" header and "\r\n" == end of headers for post data to
-
-    nsCOMPtr<nsIFile> tempFile;
-    rv = GetPluginTempDir(getter_AddRefs(tempFile));
-    if (NS_FAILED(rv))
-      return rv;
-
-    nsAutoCString inFileName;
-    inFile->GetNativeLeafName(inFileName);
-    // XXX hack around bug 70083
-    inFileName.Insert(NS_LITERAL_CSTRING("post-"), 0);
-    rv = tempFile->AppendNative(inFileName);
-
-    if (NS_FAILED(rv))
-      return rv;
-
-    // make it unique, and mode == 0600, not world-readable
-    rv = tempFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
-    if (NS_FAILED(rv))
-      return rv;
-
-    nsCOMPtr<nsIOutputStream> outStream;
-    if (NS_SUCCEEDED(rv)) {
-      rv = NS_NewLocalFileOutputStream(getter_AddRefs(outStream),
-        tempFile,
-        (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE),
-        0600); // 600 so others can't read our form data
-    }
-    NS_ASSERTION(NS_SUCCEEDED(rv), "Post data file couldn't be created!");
-    if (NS_FAILED(rv))
-      return rv;
-
-    char buf[1024];
-    uint32_t br, bw;
-    bool firstRead = true;
-    while (true) {
-      // Read() mallocs if buffer is null
-      rv = inStream->Read(buf, 1024, &br);
-      if (NS_FAILED(rv) || (int32_t)br <= 0)
-        break;
-      if (firstRead) {
-        //"For protocols in which the headers must be distinguished from the body,
-        // such as HTTP, the buffer or file should contain the headers, followed by
-        // a blank line, then the body. If no custom headers are required, simply
-        // add a blank line ('\n') to the beginning of the file or buffer.
-
-        char *parsedBuf;
-        // assuming first 1K (or what we got) has all headers in,
-        // lets parse it through nsPluginHost::ParsePostBufferToFixHeaders()
-        ParsePostBufferToFixHeaders((const char *)buf, br, &parsedBuf, &bw);
-        rv = outStream->Write(parsedBuf, bw, &br);
-        free(parsedBuf);
-        if (NS_FAILED(rv) || (bw != br))
-          break;
-
-        firstRead = false;
-        continue;
-      }
-      bw = br;
-      rv = outStream->Write(buf, bw, &br);
-      if (NS_FAILED(rv) || (bw != br))
-        break;
-    }
-
-    inStream->Close();
-    outStream->Close();
-    if (NS_SUCCEEDED(rv))
-      tempFile.forget(aTmpFile);
-  }
-  return rv;
-}
-
-nsresult
 nsPluginHost::NewPluginNativeWindow(nsPluginNativeWindow ** aPluginNativeWindow)
 {
   return PLUG_NewPluginNativeWindow(aPluginNativeWindow);
 }
 
 nsresult
 nsPluginHost::GetPluginName(nsNPAPIPluginInstance *aPluginInstance,
                             const char** aPluginName)
--- a/dom/plugins/base/nsPluginHost.h
+++ b/dom/plugins/base/nsPluginHost.h
@@ -125,31 +125,29 @@ public:
                   nsNPAPIPluginStreamListener* streamListener,
                   const char* altHost,
                   const char* referrer,
                   bool forceJSEnabled);
   nsresult PostURL(nsISupports* pluginInst,
                    const char* url,
                    uint32_t postDataLen,
                    const char* postData,
-                   bool isFile,
                    const char* target,
                    nsNPAPIPluginStreamListener* streamListener,
                    const char* altHost,
                    const char* referrer,
                    bool forceJSEnabled,
                    uint32_t postHeadersLength,
                    const char* postHeaders);
 
   nsresult UserAgent(const char **retstring);
   nsresult ParsePostBufferToFixHeaders(const char *inPostData,
                                        uint32_t inPostDataLen,
                                        char **outPostData,
                                        uint32_t *outPostDataLen);
-  nsresult CreateTempFileToPost(const char *aPostDataURL, nsIFile **aTmpFile);
   nsresult NewPluginNativeWindow(nsPluginNativeWindow ** aPluginNativeWindow);
 
   void AddIdleTimeTarget(nsIPluginInstanceOwner* objectFrame, bool isVisible);
   void RemoveIdleTimeTarget(nsIPluginInstanceOwner* objectFrame);
 
   nsresult GetPluginName(nsNPAPIPluginInstance *aPluginInstance,
                          const char** aPluginName);
   nsresult StopPluginInstance(nsNPAPIPluginInstance* aInstance);
--- a/dom/plugins/ipc/PluginModuleChild.cpp
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -1164,16 +1164,21 @@ NPError
                void* aNotifyData)
 {
     PLUGIN_LOG_DEBUG_FUNCTION;
     ENSURE_PLUGIN_THREAD(NPERR_INVALID_PARAM);
 
     if (!aBuffer)
         return NPERR_INVALID_PARAM;
 
+    if (aIsFile) {
+      PLUGIN_LOG_DEBUG(("NPN_PostURLNotify with file=true is no longer supported"));
+      return NPERR_GENERIC_ERROR;
+    }
+
     nsCString url = NullableString(aRelativeURL);
     auto* sn = new StreamNotifyChild(url);
 
     NPError err;
     InstCast(aNPP)->CallPStreamNotifyConstructor(
         sn, url, NullableString(aTarget), true,
         nsCString(aBuffer, aLength), aIsFile, &err);
 
@@ -1192,16 +1197,20 @@ NPError
          const char* aTarget,
          uint32_t aLength,
          const char* aBuffer,
          NPBool aIsFile)
 {
     PLUGIN_LOG_DEBUG_FUNCTION;
     ENSURE_PLUGIN_THREAD(NPERR_INVALID_PARAM);
 
+    if (aIsFile) {
+      PLUGIN_LOG_DEBUG(("NPN_PostURL with file=true is no longer supported"));
+      return NPERR_GENERIC_ERROR;
+    }
     NPError err;
     // FIXME what should happen when |aBuffer| is null?
     InstCast(aNPP)->CallNPN_PostURL(NullableString(aRelativeURL),
                                     NullableString(aTarget),
                                     nsDependentCString(aBuffer, aLength),
                                     aIsFile, &err);
     return err;
 }
--- a/dom/plugins/test/mochitest/test_streamNotify.html
+++ b/dom/plugins/test/mochitest/test_streamNotify.html
@@ -78,12 +78,23 @@
                       is(t, "World", "GET data: URI correct");
                       testDone();
                     }, null, true), "streamTest GET data: URI");
 
     ok(!p.streamTest("data:malformed?", false, null, null,
                      function(r, t) {
                        todo(false, "Shouldn't get callback for invalid data: URI");
                      }, null, true), "streamTest GET bad data: URI");
+
+    ok(!p.postFileToURLTest("post.sjs"), "postFileToURLTest POST a file");
+
+    ok(!p.streamTest("post.sjs", true, "non-existent-file",
+                     function(r, t) {
+                       ok(false, "Shouldn't get write callback from file post");
+                     }, function(r, t) {
+                       ok(false, "Shouldn't get notify callback from file post");
+                     }, function(r, t) {
+                       ok(false, "Shouldn't get redirect callback from file post");
+                     }, true, true), "streamTest POST a file");
   }
   </script>
 
   <embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
--- a/dom/plugins/test/testplugin/README
+++ b/dom/plugins/test/testplugin/README
@@ -367,27 +367,35 @@ The attributes which control stream test
 
 "failurecode": one of the NPError constants.  Used to specify the error
   that will be returned by the "functiontofail".
 
 If the plugin is instantiated as a full-page plugin, the following defaults
 are used:
   streammode="seek" frame="testframe" range="100,100"
 
-* streamTest(url, doPost, postData, writeCallback, notifyCallback, redirectCallback, allowRedirects)
+* streamTest(url, doPost, postData, writeCallback, notifyCallback, redirectCallback, allowRedirects, postFile = false)
 This will test how NPN_GetURLNotify and NPN_PostURLNotify behave when they are
 called with arbitrary (malformed) URLs. The function will return `true` if
 NPN_[Get/Post]URLNotify succeeds, and `false` if it fails.
 @url url to request
 @param doPost whether to call NPN_PostURLNotify
 @param postData null, or a string to send a postdata
 @writeCallback will be called when data is received for the stream
 @notifyCallback will be called when the urlnotify is received with the notify result
 @redirectCallback will be called from urlredirectnotify if a redirect is attempted
 @allowRedirects boolean value indicating whether or not to allow redirects
+@postFile boolean optional, defaults to false, set to true if postData contains a filename
+
+* postFileToURLTest(url)
+Calls NPN_PostURL/NPN_PostURLNotify to make a POST request to the URL with
+request from postFile.
+The function will return `0` if NPN_PostURL/NPN_PostURLNotify succeeds, and
+the error code if it fails.
+@param url string, url to request
 
 * setPluginWantsAllStreams(wantsAllStreams)
 Set the value returned by the plugin for NPPVpluginWantsAllNetworkStreams.
 
 == Internal consistency ==
 
 * doInternalConsistencyCheck()
 Does internal consistency checking, returning an empty string if everything is
--- a/dom/plugins/test/testplugin/nptest.cpp
+++ b/dom/plugins/test/testplugin/nptest.cpp
@@ -128,16 +128,17 @@ static bool setInvalidateDuringPaint(NPO
 static bool setSlowPaint(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool getError(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool doInternalConsistencyCheck(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool setColor(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool throwExceptionNextInvoke(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool convertPointX(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool convertPointY(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool streamTest(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
+static bool postFileToURLTest(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool setPluginWantsAllStreams(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool crashPlugin(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool crashOnDestroy(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool getObjectValue(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool getJavaCodebase(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool checkObjectValue(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool enableFPExceptions(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
 static bool asyncCallbackTest(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
@@ -201,16 +202,17 @@ static const NPUTF8* sPluginMethodIdenti
   "setSlowPaint",
   "getError",
   "doInternalConsistencyCheck",
   "setColor",
   "throwExceptionNextInvoke",
   "convertPointX",
   "convertPointY",
   "streamTest",
+  "postFileToURLTest",
   "setPluginWantsAllStreams",
   "crash",
   "crashOnDestroy",
   "getObjectValue",
   "getJavaCodebase",
   "checkObjectValue",
   "enableFPExceptions",
   "asyncCallbackTest",
@@ -275,16 +277,17 @@ static const ScriptableFunction sPluginM
   setSlowPaint,
   getError,
   doInternalConsistencyCheck,
   setColor,
   throwExceptionNextInvoke,
   convertPointX,
   convertPointY,
   streamTest,
+  postFileToURLTest,
   setPluginWantsAllStreams,
   crashPlugin,
   crashOnDestroy,
   getObjectValue,
   getJavaCodebase,
   checkObjectValue,
   enableFPExceptions,
   asyncCallbackTest,
@@ -2713,18 +2716,18 @@ convertPointY(NPObject* npobj, const NPV
 
   DOUBLE_TO_NPVARIANT(resultY, *result);
   return true;
 }
 
 static bool
 streamTest(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result)
 {
-  // .streamTest(url, doPost, doNull, writeCallback, notifyCallback, redirectCallback, allowRedirects)
-  if (7 != argCount)
+  // .streamTest(url, doPost, postData, writeCallback, notifyCallback, redirectCallback, allowRedirects, postFile = false)
+  if (!(7 <= argCount && argCount <= 8))
     return false;
 
   NPP npp = static_cast<TestNPObject*>(npobj)->npp;
 
   if (!NPVARIANT_IS_STRING(args[0]))
     return false;
   NPString url = NPVARIANT_TO_STRING(args[0]);
 
@@ -2771,16 +2774,24 @@ streamTest(NPObject* npobj, const NPVari
       return false;
     }
   }
 
   if (!NPVARIANT_IS_BOOLEAN(args[6]))
     return false;
   bool allowRedirects = NPVARIANT_TO_BOOLEAN(args[6]);
 
+  bool postFile = false;
+  if (argCount >= 8) {
+    if (!NPVARIANT_IS_BOOLEAN(args[7])) {
+      return false;
+    }
+    postFile = NPVARIANT_TO_BOOLEAN(args[7]);
+  }
+
   URLNotifyData* ndata = new URLNotifyData;
   ndata->cookie = "dynamic-cookie";
   ndata->writeCallback = writeCallback;
   ndata->notifyCallback = notifyCallback;
   ndata->redirectCallback = redirectCallback;
   ndata->size = 0;
   ndata->data = nullptr;
   ndata->allowRedirects = allowRedirects;
@@ -2789,17 +2800,17 @@ streamTest(NPObject* npobj, const NPVari
   char* urlstr = (char*) malloc(url.UTF8Length + 1);
   strncpy(urlstr, url.UTF8Characters, url.UTF8Length);
   urlstr[url.UTF8Length] = '\0';
 
   NPError err;
   if (doPost) {
     err = NPN_PostURLNotify(npp, urlstr, nullptr,
                             postData.UTF8Length, postData.UTF8Characters,
-                            false, ndata);
+                            postFile, ndata);
   }
   else {
     err = NPN_GetURLNotify(npp, urlstr, nullptr, ndata);
   }
 
   free(urlstr);
 
   if (NPERR_NO_ERROR == err) {
@@ -2818,16 +2829,48 @@ streamTest(NPObject* npobj, const NPVari
     delete ndata;
     BOOLEAN_TO_NPVARIANT(false, *result);
   }
 
   return true;
 }
 
 static bool
+postFileToURLTest(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+  if (1 != argCount)
+    return false;
+
+  NPP npp = static_cast<TestNPObject*>(npobj)->npp;
+
+  string url;
+  {
+    if (!NPVARIANT_IS_STRING(args[0]))
+      return false;
+    NPString npurl = NPVARIANT_TO_STRING(args[0]);
+    // make a copy to ensure that the url string is null-terminated
+    url = string(npurl.UTF8Characters, npurl.UTF8Length);
+  }
+
+
+  NPError err;
+  {
+    string buf("/path/to/file");
+    err = NPN_PostURL(npp,
+                      url.c_str(),
+                      nullptr /* target */,
+                      buf.length(), buf.c_str(),
+                      true /* file */);
+  }
+
+  BOOLEAN_TO_NPVARIANT(NPERR_NO_ERROR == err, *result);
+  return true;
+}
+
+static bool
 setPluginWantsAllStreams(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result)
 {
   if (1 != argCount)
     return false;
 
   if (!NPVARIANT_IS_BOOLEAN(args[0]))
     return false;
   bool wantsAllStreams = NPVARIANT_TO_BOOLEAN(args[0]);
--- a/dom/svg/SVGFEImageElement.cpp
+++ b/dom/svg/SVGFEImageElement.cpp
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/SVGFEImageElement.h"
 
+#include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/dom/SVGFEImageElementBinding.h"
 #include "mozilla/dom/SVGFilterElement.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
 #include "nsContentUtils.h"
 #include "nsLayoutUtils.h"
 #include "nsSVGUtils.h"
@@ -86,16 +87,19 @@ SVGFEImageElement::LoadSVGImage(bool aFo
   if (NS_SUCCEEDED(StringToURI(href, doc, getter_AddRefs(hrefAsURI)))) {
     bool isEqual;
     if (NS_SUCCEEDED(hrefAsURI->Equals(baseURI, &isEqual)) && isEqual) {
       // Image URI matches our URI exactly! Bail out.
       return NS_OK;
     }
   }
 
+  // Mark channel as urgent-start before load image if the image load is
+  // initaiated by a user interaction.
+  mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
   return LoadImage(href, aForce, aNotify, eImageLoadType_Normal);
 }
 
 //----------------------------------------------------------------------
 // EventTarget methods:
 
 void
 SVGFEImageElement::AsyncEventRunning(AsyncEventDispatcher* aEvent)
--- a/dom/svg/SVGImageElement.cpp
+++ b/dom/svg/SVGImageElement.cpp
@@ -1,15 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ArrayUtils.h"
+#include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 
 #include "mozilla/dom/SVGImageElement.h"
 #include "mozilla/gfx/2D.h"
 #include "nsCOMPtr.h"
 #include "nsIURI.h"
 #include "nsNetUtil.h"
 #include "imgINotificationObserver.h"
@@ -128,16 +129,20 @@ SVGImageElement::LoadSVGImage(bool aForc
   } else {
     mStringAttributes[XLINK_HREF].GetAnimValue(href, this);
   }
   href.Trim(" \t\n\r");
 
   if (baseURI && !href.IsEmpty())
     NS_MakeAbsoluteURI(href, href, baseURI);
 
+  // Mark channel as urgent-start before load image if the image load is
+  // initaiated by a user interaction.
+  mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
+
   return LoadImage(href, aForce, aNotify, eImageLoadType_Normal);
 }
 
 //----------------------------------------------------------------------
 // EventTarget methods:
 
 void
 SVGImageElement::AsyncEventRunning(AsyncEventDispatcher* aEvent)
--- a/dom/tests/mochitest/general/test_consoleAPI.html
+++ b/dom/tests/mochitest/general/test_consoleAPI.html
@@ -35,19 +35,16 @@ function doTest() {
     "timeEnd": "function",
     "profile": "function",
     "profileEnd": "function",
     "assert": "function",
     "count": "function",
     "table": "function",
     "clear": "function",
     "dirxml": "function",
-    "markTimeline": "function",
-    "timeline": "function",
-    "timelineEnd": "function",
     "timeStamp": "function",
   };
 
   var foundProps = 0;
   for (var prop in console) {
     foundProps++;
     is(typeof(console[prop]), expectedProps[prop], "expect console prop " + prop + " exists");
   }
--- a/dom/webidl/Console.webidl
+++ b/dom/webidl/Console.webidl
@@ -38,24 +38,16 @@ namespace console {
   // Mozilla only or Webcompat methods
 
   void _exception(any... data);
   void timeStamp(optional any data);
 
   void profile(any... data);
   void profileEnd(any... data);
 
-  // No-op methods for compatibility with other browsers.
-  [BinaryName="noopMethod"]
-  void markTimeline();
-  [BinaryName="noopMethod"]
-  void timeline();
-  [BinaryName="noopMethod"]
-  void timelineEnd();
-
   [ChromeOnly]
   const boolean IS_NATIVE_CONSOLE = true;
 };
 
 // This is used to propagate console events to the observers.
 dictionary ConsoleEvent {
   (unsigned long long or DOMString) ID;
   (unsigned long long or DOMString) innerID;
--- a/dom/webidl/HTMLSelectElement.webidl
+++ b/dom/webidl/HTMLSelectElement.webidl
@@ -62,9 +62,11 @@ interface HTMLSelectElement : HTMLElemen
 
 // Chrome only interface
 
 partial interface HTMLSelectElement {
   [ChromeOnly]
   attribute boolean openInParentProcess;
   [ChromeOnly]
   AutocompleteInfo getAutocompleteInfo();
+  [ChromeOnly]
+  attribute DOMString previewValue;
 };
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -22,16 +22,17 @@
 #include "mozilla/dom/FetchUtil.h"
 #include "mozilla/dom/FormData.h"
 #include "mozilla/dom/MutableBlobStorage.h"
 #include "mozilla/dom/XMLDocument.h"
 #include "mozilla/dom/URLSearchParams.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventListenerManager.h"
+#include "mozilla/EventStateManager.h"
 #include "mozilla/LoadInfo.h"
 #include "mozilla/LoadContext.h"
 #include "mozilla/MemoryReporting.h"
 #include "nsIDOMDocument.h"
 #include "mozilla/dom/ProgressEvent.h"
 #include "nsIJARChannel.h"
 #include "nsIJARURI.h"
 #include "nsLayoutCID.h"
@@ -2647,16 +2648,22 @@ XMLHttpRequestMainThread::InitiateFetch(
     }
   }
 
   // We never let XHR be blocked by head CSS/JS loads to avoid potential
   // deadlock where server generation of CSS/JS requires an XHR signal.
   nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(mChannel));
   if (cos) {
     cos->AddClassFlags(nsIClassOfService::Unblocked);
+
+    // Mark channel as urgent-start if the XHR is triggered by user input
+    // events.
+    if (EventStateManager::IsHandlingUserInput()) {
+      cos->AddClassFlags(nsIClassOfService::UrgentStart);
+    }
   }
 
   // Disable Necko-internal response timeouts.
   nsCOMPtr<nsIHttpChannelInternal>
     internalHttpChannel(do_QueryInterface(mChannel));
   if (internalHttpChannel) {
     rv = internalHttpChannel->SetResponseTimeoutEnabled(false);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
--- a/editor/libeditor/EditorBase.cpp
+++ b/editor/libeditor/EditorBase.cpp
@@ -198,17 +198,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEventListener)
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSavedSel);
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRangeUpdater);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(EditorBase)
  NS_INTERFACE_MAP_ENTRY(nsIPhonetic)
  NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
- NS_INTERFACE_MAP_ENTRY(nsIEditorIMESupport)
  NS_INTERFACE_MAP_ENTRY(nsIEditor)
  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIEditor)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(EditorBase)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(EditorBase)
 
 
--- a/editor/libeditor/EditorBase.h
+++ b/editor/libeditor/EditorBase.h
@@ -10,18 +10,17 @@
 #include "mozilla/OwningNonNull.h"      // for OwningNonNull
 #include "mozilla/SelectionState.h"     // for RangeUpdater, etc.
 #include "mozilla/StyleSheet.h"   // for StyleSheet
 #include "mozilla/UniquePtr.h"
 #include "mozilla/dom/Text.h"
 #include "nsCOMPtr.h"                   // for already_AddRefed, nsCOMPtr
 #include "nsCycleCollectionParticipant.h"
 #include "nsGkAtoms.h"
-#include "nsIEditor.h"                  // for nsIEditor::EDirection, etc.
-#include "nsIEditorIMESupport.h"        // for NS_DECL_NSIEDITORIMESUPPORT, etc.
+#include "nsIEditor.h"                  // for nsIEditor, etc.
 #include "nsIObserver.h"                // for NS_DECL_NSIOBSERVER, etc.
 #include "nsIPhonetic.h"                // for NS_DECL_NSIPHONETIC, etc.
 #include "nsIPlaintextEditor.h"         // for nsIPlaintextEditor, etc.
 #include "nsISelectionController.h"     // for nsISelectionController constants
 #include "nsISupportsImpl.h"            // for EditorBase::Release, etc.
 #include "nsIWeakReferenceUtils.h"      // for nsWeakPtr
 #include "nsLiteralString.h"            // for NS_LITERAL_STRING
 #include "nsString.h"                   // for nsCString
@@ -140,17 +139,17 @@ struct IMEState;
 
 /**
  * Implementation of an editor object.  it will be the controller/focal point
  * for the main editor services. i.e. the GUIManager, publishing, transaction
  * manager, event interfaces. the idea for the event interfaces is to have them
  * delegate the actual commands to the editor independent of the XPFE
  * implementation.
  */
-class EditorBase : public nsIEditorIMESupport
+class EditorBase : public nsIEditor
                  , public nsSupportsWeakReference
                  , public nsIPhonetic
 {
 public:
   typedef dom::Element Element;
   typedef dom::Selection Selection;
   typedef dom::Text Text;
 
@@ -192,19 +191,16 @@ public:
     eNotifyEditorObserversOfBefore,
     eNotifyEditorObserversOfCancel
   };
   void NotifyEditorObservers(NotificationForEditorObservers aNotification);
 
   // nsIEditor methods
   NS_DECL_NSIEDITOR
 
-  // nsIEditorIMESupport methods
-  NS_DECL_NSIEDITORIMESUPPORT
-
   // nsIPhonetic
   NS_DECL_NSIPHONETIC
 
 public:
   virtual bool IsModifiableNode(nsINode* aNode);
 
   virtual nsresult InsertTextImpl(const nsAString& aStringToInsert,
                                   nsCOMPtr<nsINode>* aInOutNode,
--- a/editor/moz.build
+++ b/editor/moz.build
@@ -11,17 +11,16 @@ DIRS += [
     'composer',
 ]
 
 XPIDL_SOURCES += [
     'nsIContentFilter.idl',
     'nsIDocumentStateListener.idl',
     'nsIEditActionListener.idl',
     'nsIEditor.idl',
-    'nsIEditorIMESupport.idl',
     'nsIEditorMailSupport.idl',
     'nsIEditorObserver.idl',
     'nsIEditorSpellCheck.idl',
     'nsIEditorStyleSheets.idl',
     'nsIEditorUtils.idl',
     'nsIHTMLAbsPosEditor.idl',
     'nsIHTMLEditor.idl',
     'nsIHTMLInlineTableEditor.idl',
deleted file mode 100644
--- a/editor/nsIEditorIMESupport.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsIEditor.idl"
-
-[scriptable, uuid(0ba7f490-afb8-46dd-87fc-bc6137fbc899)]
-interface nsIEditorIMESupport : nsIEditor
-{
-};
old mode 100644
new mode 100755
--- a/gfx/angle/src/libANGLE/moz.build
+++ b/gfx/angle/src/libANGLE/moz.build
@@ -326,16 +326,17 @@ if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
         'renderer/d3d/d3d11/VertexBuffer11.cpp',
     ]
 if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
     SOURCES += [
         'renderer/d3d/d3d11/SwapChain11.cpp',
         'renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp',
     ]
 
+CXXFLAGS += CONFIG['SSE2_FLAGS']
 
 if CONFIG['GNU_CXX']:
     CXXFLAGS += [
         '-Wno-attributes',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unknown-pragmas',
         '-Wno-unreachable-code',
--- a/gfx/ipc/D3DMessageUtils.cpp
+++ b/gfx/ipc/D3DMessageUtils.cpp
@@ -42,16 +42,18 @@ ParamTraits<DxgiAdapterDesc>::Write(Mess
   WriteParam(aMsg, aParam.DeviceId);
   WriteParam(aMsg, aParam.SubSysId);
   WriteParam(aMsg, aParam.Revision);
   WriteParam(aMsg, aParam.DedicatedVideoMemory);
   WriteParam(aMsg, aParam.DedicatedSystemMemory);
   WriteParam(aMsg, aParam.SharedSystemMemory);
   WriteParam(aMsg, aParam.AdapterLuid.LowPart);
   WriteParam(aMsg, aParam.AdapterLuid.HighPart);
+#else
+  MOZ_ASSERT_UNREACHABLE("DxgiAdapterDesc is Windows-only");
 #endif
 }
 
 bool
 ParamTraits<DxgiAdapterDesc>::Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
 {
 #if defined(XP_WIN)
   if (!aMsg->ReadBytesInto(aIter, aResult->Description, sizeof(aResult->Description))) {
@@ -65,15 +67,15 @@ ParamTraits<DxgiAdapterDesc>::Read(const
       ReadParam(aMsg, aIter, &aResult->DedicatedVideoMemory) &&
       ReadParam(aMsg, aIter, &aResult->DedicatedSystemMemory) &&
       ReadParam(aMsg, aIter, &aResult->SharedSystemMemory) &&
       ReadParam(aMsg, aIter, &aResult->AdapterLuid.LowPart) &&
       ReadParam(aMsg, aIter, &aResult->AdapterLuid.HighPart))
   {
     return true;
   }
+#else
+  MOZ_ASSERT_UNREACHABLE("DxgiAdapterDesc is Windows-only");
+#endif
   return false;
-#else
-  return true;
-#endif
 }
 
 } // namespace IPC
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -147,18 +147,16 @@ void ShutdownTileCache();
 using namespace mozilla;
 using namespace mozilla::layers;
 using namespace mozilla::gl;
 using namespace mozilla::gfx;
 
 gfxPlatform *gPlatform = nullptr;
 static bool gEverInitialized = false;
 
-const ContentDeviceData* gContentDeviceInitData = nullptr;
-
 static Mutex* gGfxPlatformPrefsLock = nullptr;
 
 // These two may point to the same profile
 static qcms_profile *gCMSOutputProfile = nullptr;
 static qcms_profile *gCMSsRGBProfile = nullptr;
 
 static qcms_transform *gCMSRGBTransform = nullptr;
 static qcms_transform *gCMSInverseRGBTransform = nullptr;
@@ -524,42 +522,27 @@ gfxPlatform::gfxPlatform()
 
     VRManager::ManagerInit();
 }
 
 gfxPlatform*
 gfxPlatform::GetPlatform()
 {
     if (!gPlatform) {
-        MOZ_RELEASE_ASSERT(!XRE_IsContentProcess(),
-                           "Content Process should have called InitChild() before first GetPlatform()");
         Init();
     }
     return gPlatform;
 }
 
 bool
 gfxPlatform::Initialized()
 {
   return !!gPlatform;
 }
 
-/* static */ void
-gfxPlatform::InitChild(const ContentDeviceData& aData)
-{
-  MOZ_ASSERT(XRE_IsContentProcess());
-  MOZ_RELEASE_ASSERT(!gPlatform,
-                     "InitChild() should be called before first GetPlatform()");
-  // Make the provided initial ContentDeviceData available to the init
-  // routines, so they don't have to do a sync request from the parent.
-  gContentDeviceInitData = &aData;
-  Init();
-  gContentDeviceInitData = nullptr;
-}
-
 void RecordingPrefChanged(const char *aPrefName, void *aClosure)
 {
   if (Preferences::GetBool("gfx.2d.recording", false)) {
     nsAutoCString fileName;
     nsAdoptingString prefFileName = Preferences::GetString("gfx.2d.recordingfile");
 
     if (prefFileName) {
       fileName.Append(NS_ConvertUTF16toUTF8(prefFileName));
@@ -2672,21 +2655,16 @@ gfxPlatform::NotifyGPUProcessDisabled()
   }
 }
 
 void
 gfxPlatform::FetchAndImportContentDeviceData()
 {
   MOZ_ASSERT(XRE_IsContentProcess());
 
-  if (gContentDeviceInitData) {
-    ImportContentDeviceData(*gContentDeviceInitData);
-    return;
-  }
-
   mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton();
 
   mozilla::gfx::ContentDeviceData data;
   cc->SendGetGraphicsDeviceInitData(&data);
 
   ImportContentDeviceData(data);
 }
 
--- a/gfx/thebes/gfxPlatform.h
+++ b/gfx/thebes/gfxPlatform.h
@@ -170,22 +170,16 @@ public:
     static bool Initialized();
 
     /**
      * Shut down Thebes.
      * Init() arranges for this to be called at an appropriate time.
      */
     static void Shutdown();
 
-    /**
-     * Initialize gfxPlatform (if not already done) in a child process, with
-     * the provided ContentDeviceData.
-     */
-    static void InitChild(const mozilla::gfx::ContentDeviceData& aData);
-
     static void InitLayersIPC();
     static void ShutdownLayersIPC();
 
     /**
      * Initialize ScrollMetadata statics. Does not depend on gfxPlatform.
      */
     static void InitNullMetadata();
 
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -25,16 +25,17 @@
 #include "nsContentUtils.h"
 #include "nsNetUtil.h"
 #include "nsNetCID.h"
 #include "nsIProtocolHandler.h"
 #include "nsMimeTypes.h"
 #include "nsStreamUtils.h"
 #include "nsIHttpChannel.h"
 #include "nsICacheInfoChannel.h"
+#include "nsIClassOfService.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIProgressEventSink.h"
 #include "nsIChannelEventSink.h"
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "nsIFileURL.h"
 #include "nsIFile.h"
 #include "nsCRT.h"
@@ -2084,16 +2085,17 @@ imgLoader::LoadImageXPCOM(nsIURI* aURI,
                             aLoadGroup,
                             aObserver,
                             node,
                             doc,
                             aLoadFlags,
                             aCacheKey,
                             aContentPolicyType,
                             EmptyString(),
+                            /* aUseUrgentStartForChannel */ false,
                             &proxy);
     *_retval = proxy;
     return rv;
 }
 
 nsresult
 imgLoader::LoadImage(nsIURI* aURI,
                      nsIURI* aInitialDocumentURI,
@@ -2103,16 +2105,17 @@ imgLoader::LoadImage(nsIURI* aURI,
                      nsILoadGroup* aLoadGroup,
                      imgINotificationObserver* aObserver,
                      nsINode *aContext,
                      nsIDocument* aLoadingDocument,
                      nsLoadFlags aLoadFlags,
                      nsISupports* aCacheKey,
                      nsContentPolicyType aContentPolicyType,
                      const nsAString& initiatorType,
+                     bool aUseUrgentStartForChannel,
                      imgRequestProxy** _retval)
 {
   MOZ_RELEASE_ASSERT(NS_IsMainThread());
 
   VerifyCacheSizes();
 
   NS_ASSERTION(aURI, "imgLoader::LoadImage -- NULL URI pointer");
 
@@ -2272,16 +2275,21 @@ imgLoader::LoadImage(nsIURI* aURI,
     NewRequestAndEntry(forcePrincipalCheck, this, key,
                        getter_AddRefs(request),
                        getter_AddRefs(entry));
 
     MOZ_LOG(gImgLog, LogLevel::Debug,
            ("[this=%p] imgLoader::LoadImage -- Created new imgRequest"
             " [request=%p]\n", this, request.get()));
 
+    nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(newChannel));
+    if (cos && aUseUrgentStartForChannel) {
+      cos->AddClassFlags(nsIClassOfService::UrgentStart);
+    }
+
     nsCOMPtr<nsILoadGroup> channelLoadGroup;
     newChannel->GetLoadGroup(getter_AddRefs(channelLoadGroup));
     rv = request->Init(aURI, aURI, /* aHadInsecureRedirect = */ false,
                        channelLoadGroup, newChannel, entry, aLoadingDocument,
                        aLoadingPrincipal, corsmode, aReferrerPolicy);
     if (NS_FAILED(rv)) {
       return NS_ERROR_FAILURE;
     }
--- a/image/imgLoader.h
+++ b/image/imgLoader.h
@@ -302,16 +302,17 @@ public:
                                   nsILoadGroup* aLoadGroup,
                                   imgINotificationObserver* aObserver,
                                   nsINode* aContext,
                                   nsIDocument* aLoadingDocument,
                                   nsLoadFlags aLoadFlags,
                                   nsISupports* aCacheKey,
                                   nsContentPolicyType aContentPolicyType,
                                   const nsAString& initiatorType,
+                                  bool aUseUrgentStartForChannel,
                                   imgRequestProxy** _retval);
 
   MOZ_MUST_USE nsresult
   LoadImageWithChannel(nsIChannel* channel,
                        imgINotificationObserver* aObserver,
                        nsISupports* aCX,
                        nsIStreamListener** listener,
                        imgRequestProxy** _retval);
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -125,17 +125,17 @@ using mozilla::MonitorAutoUnlock;
             DebugAbort(__FILE__, __LINE__, #_cond,## __VA_ARGS__);  \
     } while (0)
 
 static MessageChannel* gParentProcessBlocker;
 
 namespace mozilla {
 namespace ipc {
 
-static const uint32_t kMinTelemetryMessageSize = 8192;
+static const uint32_t kMinTelemetryMessageSize = 4096;
 
 // Note: we round the time we spend to the nearest millisecond. So a min value
 // of 1 ms actually captures from 500us and above.
 static const uint32_t kMinTelemetryIPCWriteLatencyMs = 1;
 
 // Note: we round the time we spend waiting for a response to the nearest
 // millisecond. So a min value of 1 ms actually captures from 500us and above.
 static const uint32_t kMinTelemetrySyncIPCLatencyMs = 1;
@@ -868,18 +868,17 @@ MessageChannel::Echo(Message* aMsg)
     mLink->EchoMessage(msg.forget());
     return true;
 }
 
 bool
 MessageChannel::Send(Message* aMsg)
 {
     if (aMsg->size() >= kMinTelemetryMessageSize) {
-        Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE,
-                              nsDependentCString(aMsg->name()), aMsg->size());
+        Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE2, aMsg->size());
     }
 
     // If the message was created by the IPC bindings, the create time will be
     // recorded. Use this information to report the IPC_WRITE_MAIN_THREAD_LATENCY_MS (time
     // from message creation to it being sent).
     if (NS_IsMainThread() && aMsg->create_time()) {
         uint32_t latencyMs = round((mozilla::TimeStamp::Now() - aMsg->create_time()).ToMilliseconds());
         if (latencyMs >= kMinTelemetryIPCWriteLatencyMs) {
@@ -1289,18 +1288,17 @@ MessageChannel::ProcessPendingRequests(A
     AssertMaybeDeferredCountCorrect();
 }
 
 bool
 MessageChannel::Send(Message* aMsg, Message* aReply)
 {
     mozilla::TimeStamp start = TimeStamp::Now();
     if (aMsg->size() >= kMinTelemetryMessageSize) {
-        Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE,
-                              nsDependentCString(aMsg->name()), aMsg->size());
+        Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE2, aMsg->size());
     }
 
     nsAutoPtr<Message> msg(aMsg);
 
     // Sanity checks.
     AssertWorkerThread();
     mMonitor->AssertNotCurrentThreadOwns();
 
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -1168,86 +1168,16 @@ ProcessArgs(AutoJSAPI& jsapi, char** arg
 
     if (filename || isInteractive)
         return Process(jsapi, filename, forceTTY);
     return true;
 }
 
 /***************************************************************************/
 
-// #define TEST_InitClassesWithNewWrappedGlobal
-
-#ifdef TEST_InitClassesWithNewWrappedGlobal
-// XXX hacky test code...
-#include "xpctest.h"
-
-class TestGlobal : public nsIXPCTestNoisy, public nsIXPCScriptable
-{
-public:
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIXPCTESTNOISY
-    NS_DECL_NSIXPCSCRIPTABLE
-
-    TestGlobal(){}
-};
-
-NS_IMPL_ISUPPORTS(TestGlobal, nsIXPCTestNoisy, nsIXPCScriptable)
-
-// The nsIXPCScriptable map declaration that will generate stubs for us...
-#define XPC_MAP_CLASSNAME         TestGlobal
-#define XPC_MAP_QUOTED_CLASSNAME "TestGlobal"
-#define XPC_MAP_FLAGS (XPC_SCRIPTABLE_USE_JSSTUB_FOR_ADDPROPERTY |\
-                       XPC_SCRIPTABLE_USE_JSSTUB_FOR_DELPROPERTY |\
-                       XPC_SCRIPTABLE_USE_JSSTUB_FOR_SETPROPERTY)
-#include "xpc_map_end.h" /* This will #undef the above */
-
-NS_IMETHODIMP TestGlobal::Squawk() {return NS_OK;}
-
-#endif
-
-// uncomment to install the test 'this' translator
-// #define TEST_TranslateThis
-
-#ifdef TEST_TranslateThis
-
-#include "xpctest.h"
-
-class nsXPCFunctionThisTranslator : public nsIXPCFunctionThisTranslator
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIXPCFUNCTIONTHISTRANSLATOR
-
-  nsXPCFunctionThisTranslator();
-  virtual ~nsXPCFunctionThisTranslator();
-  /* additional members */
-};
-
-/* Implementation file */
-NS_IMPL_ISUPPORTS(nsXPCFunctionThisTranslator, nsIXPCFunctionThisTranslator)
-
-nsXPCFunctionThisTranslator::nsXPCFunctionThisTranslator()
-{
-}
-
-nsXPCFunctionThisTranslator::~nsXPCFunctionThisTranslator()
-{
-}
-
-NS_IMETHODIMP
-nsXPCFunctionThisTranslator::TranslateThis(nsISupports* aInitialThis,
-                                           nsISupports** _retval)
-{
-    nsCOMPtr<nsISupports> temp = aInitialThis;
-    temp.forget(_retval);
-    return NS_OK;
-}
-
-#endif
-
 static bool
 GetCurrentWorkingDirectory(nsAString& workingDirectory)
 {
 #if !defined(XP_WIN) && !defined(XP_UNIX)
     //XXX: your platform should really implement this
     return false;
 #elif XP_WIN
     DWORD requiredLength = GetCurrentDirectoryW(0, nullptr);
@@ -1503,22 +1433,16 @@ XRE_XPCShellMain(int argc, char** argv, 
             }
         }
 
         const JSSecurityCallbacks* scb = JS_GetSecurityCallbacks(cx);
         MOZ_ASSERT(scb, "We are assuming that nsScriptSecurityManager::Init() has been run");
         shellSecurityCallbacks = *scb;
         JS_SetSecurityCallbacks(cx, &shellSecurityCallbacks);
 
-#ifdef TEST_TranslateThis
-        nsCOMPtr<nsIXPCFunctionThisTranslator>
-            translator(new nsXPCFunctionThisTranslator);
-        xpc->SetFunctionThisTranslator(NS_GET_IID(nsITestXPCFunctionCallback), translator);
-#endif
-
         RefPtr<BackstagePass> backstagePass;
         rv = NS_NewBackstagePass(getter_AddRefs(backstagePass));
         if (NS_FAILED(rv)) {
             fprintf(gErrFile, "+++ Failed to create BackstagePass: %8x\n",
                     static_cast<uint32_t>(rv));
             return 1;
         }
 
@@ -1634,23 +1558,16 @@ XRE_XPCShellMain(int argc, char** argv, 
 
     if (!XRE_ShutdownTestShell())
         NS_ERROR("problem shutting down testshell");
 
     // no nsCOMPtrs are allowed to be alive when you call NS_ShutdownXPCOM
     rv = NS_ShutdownXPCOM( nullptr );
     MOZ_ASSERT(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");
 
-#ifdef TEST_CALL_ON_WRAPPED_JS_AFTER_SHUTDOWN
-    // test of late call and release (see above)
-    JSContext* bogusCX;
-    bogus->Peek(&bogusCX);
-    bogus = nullptr;
-#endif
-
     telStats = nullptr;
 
 #ifdef MOZ_CRASHREPORTER
     // Shut down the crashreporter service to prevent leaking some strings it holds.
     if (CrashReporter::GetEnabled())
         CrashReporter::UnsetExceptionHandler();
 #endif
 
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -827,32 +827,22 @@ nsComboboxControlFrame::Reflow(nsPresCon
   //    mListControlFrame.
 
   if (!mDisplayFrame || !mButtonFrame || !mDropdownFrame) {
     NS_ERROR("Why did the frame constructor allow this to happen?  Fix it!!");
     return;
   }
 
   // Make sure the displayed text is the same as the selected option, bug 297389.
-  int32_t selectedIndex;
-  nsAutoString selectedOptionText;
   if (!mDroppedDown) {
-    selectedIndex = mListControlFrame->GetSelectedIndex();
+    mDisplayedIndex = mListControlFrame->GetSelectedIndex();
   }
-  else {
-    // In dropped down mode the "selected index" is the hovered menu item,
-    // we want the last selected item which is |mDisplayedIndex| in this case.
-    selectedIndex = mDisplayedIndex;
-  }
-  if (selectedIndex != -1) {
-    mListControlFrame->GetOptionText(selectedIndex, selectedOptionText);
-  }
-  if (mDisplayedOptionText != selectedOptionText) {
-    RedisplayText(selectedIndex);
-  }
+  // In dropped down mode the "selected index" is the hovered menu item,
+  // we want the last selected item which is |mDisplayedIndex| in this case.
+  RedisplayText();
 
   // First reflow our dropdown so that we know how tall we should be.
   ReflowDropdown(aPresContext, aReflowInput);
   RefPtr<nsResizeDropdownAtFinalPosition> resize =
     new nsResizeDropdownAtFinalPosition(this);
   if (NS_SUCCEEDED(aPresContext->PresShell()->PostReflowCallback(resize))) {
     // The reflow callback queue doesn't AddRef so we keep it alive until
     // it's released in its ReflowFinished / ReflowCallbackCanceled.
@@ -964,40 +954,55 @@ nsComboboxControlFrame::SetDropDown(nsIF
 nsIFrame*
 nsComboboxControlFrame::GetDropDown()
 {
   return mDropdownFrame;
 }
 
 ///////////////////////////////////////////////////////////////
 
+void
+nsComboboxControlFrame::SetPreviewText(const nsAString& aValue)
+{
+  nsAutoString previewValue(aValue);
+  nsContentUtils::RemoveNewlines(previewValue);
+
+  mPreviewText = previewValue;
+  RedisplayText();
+}
+
 NS_IMETHODIMP
 nsComboboxControlFrame::RedisplaySelectedText()
 {
   nsAutoScriptBlocker scriptBlocker;
-  return RedisplayText(mListControlFrame->GetSelectedIndex());
+  mDisplayedIndex = mListControlFrame->GetSelectedIndex();
+  return RedisplayText();
 }
 
+
 nsresult
-nsComboboxControlFrame::RedisplayText(int32_t aIndex)
+nsComboboxControlFrame::RedisplayText()
 {
+  nsString previousText(mDisplayedOptionTextOrPreview);
   // Get the text to display
-  if (aIndex != -1) {
-    mListControlFrame->GetOptionText(aIndex, mDisplayedOptionText);
+  if (!mPreviewText.IsEmpty()) {
+    mDisplayedOptionTextOrPreview = mPreviewText;
+  } else if (mDisplayedIndex != -1) {
+    mListControlFrame->GetOptionText(mDisplayedIndex, mDisplayedOptionTextOrPreview);
   } else {
-    mDisplayedOptionText.Truncate();
+    mDisplayedOptionTextOrPreview.Truncate();
   }
-  mDisplayedIndex = aIndex;
 
   REFLOW_DEBUG_MSG2("RedisplayText \"%s\"\n",
-                    NS_LossyConvertUTF16toASCII(mDisplayedOptionText).get());
+                    NS_LossyConvertUTF16toASCII(mDisplayedOptionTextOrPreview).get());
 
   // Send reflow command because the new text maybe larger
   nsresult rv = NS_OK;
-  if (mDisplayContent) {
+  if (mDisplayContent &&
+      !previousText.Equals(mDisplayedOptionTextOrPreview)) {
     // Don't call ActuallyDisplayText(true) directly here since that
     // could cause recursive frame construction. See bug 283117 and the comment in
     // HandleRedisplayTextEvent() below.
 
     // Revoke outstanding events to avoid out-of-order events which could mean
     // displaying the wrong text.
     mRedisplayTextEvent.Revoke();
 
@@ -1041,23 +1046,23 @@ nsComboboxControlFrame::HandleRedisplayT
                                                NS_FRAME_IS_DIRTY);
 
   mInRedisplayText = false;
 }
 
 void
 nsComboboxControlFrame::ActuallyDisplayText(bool aNotify)
 {
-  if (mDisplayedOptionText.IsEmpty()) {
+  if (mDisplayedOptionTextOrPreview.IsEmpty()) {
     // Have to use a non-breaking space for line-block-size calculations
     // to be right
     static const char16_t space = 0xA0;
     mDisplayContent->SetText(&space, 1, aNotify);
   } else {
-    mDisplayContent->SetText(mDisplayedOptionText, aNotify);
+    mDisplayContent->SetText(mDisplayedOptionTextOrPreview, aNotify);
   }
 }
 
 int32_t
 nsComboboxControlFrame::GetIndexOfDisplayArea()
 {
   return mDisplayedIndex;
 }
@@ -1091,36 +1096,38 @@ NS_IMETHODIMP
 nsComboboxControlFrame::RemoveOption(int32_t aIndex)
 {
   AutoWeakFrame weakThis(this);
   if (mListControlFrame->GetNumberOfOptions() > 0) {
     if (aIndex < mDisplayedIndex) {
       --mDisplayedIndex;
     } else if (aIndex == mDisplayedIndex) {
       mDisplayedIndex = 0; // IE6 compat
-      RedisplayText(mDisplayedIndex);
+      RedisplayText();
     }
   }
   else {
     // If we removed the last option, we need to blank things out
-    RedisplayText(-1);
+    mDisplayedIndex = -1;
+    RedisplayText();
   }
 
   if (!weakThis.IsAlive())
     return NS_OK;
 
   nsListControlFrame* lcf = static_cast<nsListControlFrame*>(mDropdownFrame);
   return lcf->RemoveOption(aIndex);
 }
 
 NS_IMETHODIMP
 nsComboboxControlFrame::OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex)
 {
   nsAutoScriptBlocker scriptBlocker;
-  RedisplayText(aNewIndex);
+  mDisplayedIndex = aNewIndex;
+  RedisplayText();
   NS_ASSERTION(mDropdownFrame, "No dropdown frame!");
 
   nsISelectControlFrame* listFrame = do_QueryFrame(mDropdownFrame);
   NS_ASSERTION(listFrame, "No list frame!");
 
   return listFrame->OnSetSelectedIndex(aOldIndex, aNewIndex);
 }
 
@@ -1216,17 +1223,17 @@ nsComboboxControlFrame::CreateAnonymousC
 
   nsNodeInfoManager *nimgr = mContent->NodeInfo()->NodeInfoManager();
 
   mDisplayContent = new nsTextNode(nimgr);
 
   // set the value of the text node
   mDisplayedIndex = mListControlFrame->GetSelectedIndex();
   if (mDisplayedIndex != -1) {
-    mListControlFrame->GetOptionText(mDisplayedIndex, mDisplayedOptionText);
+    mListControlFrame->GetOptionText(mDisplayedIndex, mDisplayedOptionTextOrPreview);
   }
   ActuallyDisplayText(false);
 
   if (!aElements.AppendElement(mDisplayContent))
     return NS_ERROR_OUT_OF_MEMORY;
 
   mButtonContent = mContent->OwnerDoc()->CreateHTMLElement(nsGkAtoms::button);
   if (!mButtonContent)
@@ -1625,17 +1632,18 @@ nsComboboxControlFrame::OnOptionSelected
   if (mDroppedDown) {
     nsISelectControlFrame *selectFrame = do_QueryFrame(mListControlFrame);
     if (selectFrame) {
       selectFrame->OnOptionSelected(aIndex, aSelected);
     }
   } else {
     if (aSelected) {
       nsAutoScriptBlocker blocker;
-      RedisplayText(aIndex);
+      mDisplayedIndex = aIndex;
+      RedisplayText();
     } else {
       AutoWeakFrame weakFrame(this);
       RedisplaySelectedText();
       if (weakFrame.IsAlive()) {
         FireValueChangeEvent(); // Fire after old option is unselected
       }
     }
   }
--- a/layout/forms/nsComboboxControlFrame.h
+++ b/layout/forms/nsComboboxControlFrame.h
@@ -172,16 +172,22 @@ public:
     return mIsOpenInParentProcess;
   }
 
   void SetOpenInParentProcess(bool aVal) override
   {
     mIsOpenInParentProcess = aVal;
   }
 
+  void GetPreviewText(nsAString& aValue) override
+  {
+    aValue = mPreviewText;
+  }
+  void SetPreviewText(const nsAString& aValue) override;
+
   // nsISelectControlFrame
   NS_IMETHOD AddOption(int32_t index) override;
   NS_IMETHOD RemoveOption(int32_t index) override;
   NS_IMETHOD DoneAddingChildren(bool aIsDone) override;
   NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected) override;
   NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) override;
 
   //nsIRollupListener
@@ -266,17 +272,17 @@ protected:
    * Show or hide the dropdown list.
    * @param aShowList true to show, false to hide the dropdown.
    * @note This method might destroy |this|.
    * @return false if this frame is destroyed, true if still alive.
    */
   bool ShowList(bool aShowList);
   void CheckFireOnChange();
   void FireValueChangeEvent();
-  nsresult RedisplayText(int32_t aIndex);
+  nsresult RedisplayText();
   void HandleRedisplayTextEvent();
   void ActuallyDisplayText(bool aNotify);
 
 private:
   // If our total transform to the root frame of the root document is only a 2d
   // translation then return that translation, otherwise returns (0,0).
   nsPoint GetCSSTransformTranslation();
 
@@ -292,17 +298,18 @@ protected:
   // The inline size of our display area.  Used by that frame's reflow
   // to size to the full inline size except the drop-marker.
   nscoord mDisplayISize;
   
   nsRevocableEventPtr<RedisplayTextEvent> mRedisplayTextEvent;
 
   int32_t               mRecentSelectedIndex;
   int32_t               mDisplayedIndex;
-  nsString              mDisplayedOptionText;
+  nsString              mDisplayedOptionTextOrPreview;
+  nsString              mPreviewText;
 
   // make someone to listen to the button. If its programmatically pressed by someone like Accessibility
   // then open or close the combo box.
   nsCOMPtr<nsIDOMEventListener> mButtonListener;
 
   // The last y-positions used for estimating available space before and
   // after for the dropdown list in GetAvailableDropdownSpace.  These are
   // reset to nscoord_MIN in AbsolutelyPositionDropDown when placing the
--- a/layout/forms/nsIComboboxControlFrame.h
+++ b/layout/forms/nsIComboboxControlFrame.h
@@ -48,16 +48,26 @@ public:
 
   /**
    * Redisplay the selected text (will do nothing if text has not changed).
    * This method might destroy this frame or any others that happen to be
    * around.  It might even run script.
    */
   NS_IMETHOD RedisplaySelectedText() = 0;
 
+  /*
+   * Update preview text for the select control.
+   */
+  virtual void SetPreviewText(const nsAString& aValue) = 0;
+
+  /**
+   * Get the current preview text for select control.
+   */
+  virtual void GetPreviewText(nsAString& aValue) = 0;
+
   /**
    * Method for the listbox to set and get the recent index
    */
   virtual int32_t UpdateRecentIndex(int32_t aIndex) = 0;
 
   /**
    * Notification that the content has been reset
    */
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -2225,16 +2225,17 @@ nsImageFrame::LoadIcon(const nsAString& 
                        loadGroup,
                        gIconLoad,
                        nullptr,      /* No context */
                        nullptr,      /* Not associated with any particular document */
                        loadFlags,
                        nullptr,
                        contentPolicyType,
                        EmptyString(),
+                       false,        /* aUseUrgentStartForChannel */
                        aRequest);
 }
 
 void
 nsImageFrame::GetDocumentCharacterSet(nsACString& aCharset) const
 {
   if (mContent) {
     NS_ASSERTION(mContent->GetComposedDoc(),
--- a/layout/reftests/usercss/reftest.list
+++ b/layout/reftests/usercss/reftest.list
@@ -1,3 +1,3 @@
 == usercss.html usercss-ref.html
 == usercss-xbl.html usercss-ref.html
-fails-if(stylo) == usercss-moz-document.html usercss-moz-document-ref.html # bug 1355408
+== usercss-moz-document.html usercss-moz-document-ref.html
--- a/layout/reftests/w3c-css/submitted/conditional3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/conditional3/reftest.list
@@ -19,18 +19,18 @@
 == css-supports-019.xht support/pass.xht
 == css-supports-020.xht support/pass.xht
 == css-supports-021.xht support/pass.xht
 == css-supports-022.xht support/pass.xht
 == css-supports-023.xht support/pass.xht
 == css-supports-024.xht support/pass.xht
 == css-supports-025.xht support/pass.xht
 == css-supports-026.xht support/pass.xht
-fails-if(stylo) == css-supports-027.xht support/pass.xht
-fails-if(stylo) == css-supports-028.xht support/pass.xht
+== css-supports-027.xht support/pass.xht
+== css-supports-028.xht support/pass.xht
 == css-supports-029.xht support/pass.xht