Merge mozilla-central to mozilla-inbound
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 03 Jun 2014 14:52:51 +0200
changeset 205566 7a460ea73edac3bd75d9399912418d4b87fe5c83
parent 205565 757c578c35742b97640aebaa7042438935f40749 (current diff)
parent 205537 78245b8d422d70450671c33e98261319661cb372 (diff)
child 205567 5bcb4980eb179349309d271abd7011d8cea424fc
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone32.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/themes/shared/devtools/images/responsive-background.png
browser/themes/shared/devtools/images/responsive-horizontal-resizer.png
browser/themes/shared/devtools/images/responsive-se-resizer.png
browser/themes/shared/devtools/images/responsive-vertical-resizer.png
browser/themes/shared/devtools/responsiveui-rotate.png
browser/themes/shared/devtools/responsiveui-screenshot.png
browser/themes/shared/devtools/responsiveui-touch.png
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="6e2a3b589d1e8cc1d9df25f5e630ce30a0aa39f3">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="librecovery" patch="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="6e2a3b589d1e8cc1d9df25f5e630ce30a0aa39f3">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
         "git_revision": "", 
         "remote": "", 
         "branch": ""
     }, 
-    "revision": "fe1d2cacb28a6876729ebb4315432c9cce2eb797", 
+    "revision": "d69102eda2275b178a4b5c2916522fb82feb05f5", 
     "repo_path": "/integration/gaia-central"
 }
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="6e2a3b589d1e8cc1d9df25f5e630ce30a0aa39f3">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="61cd07a8b5fa017777db6d345e00afb4fb8789b7"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="dd9e74d196675b0b05170f0ab94a80a36697a551"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="600ef6ddc915ceffc1a89d51b7be8453fe709992"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
--- a/browser/devtools/layoutview/test/browser.ini
+++ b/browser/devtools/layoutview/test/browser.ini
@@ -1,12 +1,17 @@
 [DEFAULT]
 skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
 subsuite = devtools
 support-files =
+  doc_layoutview_iframe1.html
+  doc_layoutview_iframe2.html
   head.js
 
 [browser_layoutview.js]
 [browser_layoutview_rotate-labels-on-sides.js]
+[browser_layoutview_update-after-navigation.js]
+[browser_layoutview_update-after-reload.js]
+[browser_layoutview_update-in-iframes.js]
 [browser_editablemodel.js]
 [browser_editablemodel_allproperties.js]
 [browser_editablemodel_border.js]
 [browser_editablemodel_stylerules.js]
new file mode 100644
--- /dev/null
+++ b/browser/devtools/layoutview/test/browser_layoutview_update-after-navigation.js
@@ -0,0 +1,99 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the layout-view continues to work after a page navigation and that
+// it also works after going back
+
+let test = asyncTest(function*() {
+  yield addTab(TEST_URL_ROOT + "doc_layoutview_iframe1.html");
+  let {toolbox, inspector, view} = yield openLayoutView();
+  yield runTests(inspector, view);
+  yield destroyToolbox(inspector);
+});
+
+addTest("Test that the layout-view works on the first page",
+function*(inspector, view) {
+  info("Selecting the test node");
+  yield selectNode("p", inspector);
+
+  info("Checking that the layout-view shows the right value");
+  let paddingElt = view.doc.querySelector(".padding.top > span");
+  is(paddingElt.textContent, "50");
+
+  info("Listening for layout-view changes and modifying the padding");
+  let onUpdated = waitForUpdate(inspector);
+  getNode("p").style.padding = "20px";
+  yield onUpdated;
+  ok(true, "Layout-view got updated");
+
+  info("Checking that the layout-view shows the right value after update");
+  is(paddingElt.textContent, "20");
+});
+
+addTest("Navigate to the second page",
+function*(inspector, view) {
+  yield navigateTo(TEST_URL_ROOT + "doc_layoutview_iframe2.html");
+  yield inspector.once("markuploaded");
+});
+
+addTest("Test that the layout-view works on the second page",
+function*(inspector, view) {
+  info("Selecting the test node");
+  yield selectNode("p", inspector);
+
+  info("Checking that the layout-view shows the right value");
+  let sizeElt = view.doc.querySelector(".size > span");
+  is(sizeElt.textContent, "100x100");
+
+  info("Listening for layout-view changes and modifying the size");
+  let onUpdated = waitForUpdate(inspector);
+  getNode("p").style.width = "200px";
+  yield onUpdated;
+  ok(true, "Layout-view got updated");
+
+  info("Checking that the layout-view shows the right value after update");
+  is(sizeElt.textContent, "200x100");
+});
+
+addTest("Go back to the first page",
+function*(inspector, view) {
+  content.history.back();
+  yield inspector.once("markuploaded");
+});
+
+addTest("Test that the layout-view works on the first page after going back",
+function*(inspector, view) {
+  info("Selecting the test node");
+  yield selectNode("p", inspector);
+
+  info("Checking that the layout-view shows the right value, which is the" +
+    "modified value from step one because of the bfcache");
+  let paddingElt = view.doc.querySelector(".padding.top > span");
+  is(paddingElt.textContent, "20");
+
+  info("Listening for layout-view changes and modifying the padding");
+  let onUpdated = waitForUpdate(inspector);
+  getNode("p").style.padding = "100px";
+  yield onUpdated;
+  ok(true, "Layout-view got updated");
+
+  info("Checking that the layout-view shows the right value after update");
+  is(paddingElt.textContent, "100");
+});
+
+function navigateTo(url) {
+  info("Navigating to " + url);
+
+  let def = promise.defer();
+  gBrowser.selectedBrowser.addEventListener("load", function onload() {
+    gBrowser.selectedBrowser.removeEventListener("load", onload, true);
+    info("URL " + url + " loading complete");
+    waitForFocus(def.resolve, content);
+  }, true);
+  content.location = url;
+
+  return def.promise;
+}
new file mode 100644
--- /dev/null
+++ b/browser/devtools/layoutview/test/browser_layoutview_update-after-reload.js
@@ -0,0 +1,42 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the layout-view continues to work after the page is reloaded
+
+let test = asyncTest(function*() {
+  yield addTab(TEST_URL_ROOT + "doc_layoutview_iframe1.html");
+  let {toolbox, inspector, view} = yield openLayoutView();
+
+  info("Test that the layout-view works on the first page");
+  yield assertLayoutView(inspector, view);
+
+  info("Reload the page");
+  content.location.reload();
+  yield inspector.once("markuploaded");
+
+  info("Test that the layout-view works on the reloaded page");
+  yield assertLayoutView(inspector, view);
+
+  yield destroyToolbox(inspector);
+});
+
+function* assertLayoutView(inspector, view) {
+  info("Selecting the test node");
+  yield selectNode("p", inspector);
+
+  info("Checking that the layout-view shows the right value");
+  let paddingElt = view.doc.querySelector(".padding.top > span");
+  is(paddingElt.textContent, "50");
+
+  info("Listening for layout-view changes and modifying the padding");
+  let onUpdated = waitForUpdate(inspector);
+  getNode("p").style.padding = "20px";
+  yield onUpdated;
+  ok(true, "Layout-view got updated");
+
+  info("Checking that the layout-view shows the right value after update");
+  is(paddingElt.textContent, "20");
+}
new file mode 100644
--- /dev/null
+++ b/browser/devtools/layoutview/test/browser_layoutview_update-in-iframes.js
@@ -0,0 +1,61 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the layout-view for elements within iframes also updates when they
+// change
+
+let test = asyncTest(function*() {
+  yield addTab(TEST_URL_ROOT + "doc_layoutview_iframe1.html");
+  let iframe2 = getNode("iframe").contentDocument.querySelector("iframe");
+
+  let {toolbox, inspector, view} = yield openLayoutView();
+  yield runTests(inspector, view, iframe2);
+  yield destroyToolbox(inspector);
+});
+
+addTest("Test that resizing an element in an iframe updates its box model",
+function*(inspector, view, iframe2) {
+  info("Selecting the nested test node");
+  let node = iframe2.contentDocument.querySelector("div");
+  yield selectNode(node, inspector);
+
+  info("Checking that the layout-view shows the right value");
+  let sizeElt = view.doc.querySelector(".size > span");
+  is(sizeElt.textContent, "400x200");
+
+  info("Listening for layout-view changes and modifying its size");
+  let onUpdated = waitForUpdate(inspector);
+  node.style.width = "200px";
+  yield onUpdated;
+  ok(true, "Layout-view got updated");
+
+  info("Checking that the layout-view shows the right value after update");
+  is(sizeElt.textContent, "200x200");
+});
+
+addTest("Test reflows are still sent to the layout-view after deleting an iframe",
+function*(inspector, view, iframe2) {
+  info("Deleting the iframe2");
+  iframe2.remove();
+  yield inspector.once("inspector-updated");
+
+  info("Selecting the test node in iframe1");
+  let node = getNode("iframe").contentDocument.querySelector("p");
+  yield selectNode(node, inspector);
+
+  info("Checking that the layout-view shows the right value");
+  let sizeElt = view.doc.querySelector(".size > span");
+  is(sizeElt.textContent, "100x100");
+
+  info("Listening for layout-view changes and modifying its size");
+  let onUpdated = waitForUpdate(inspector);
+  node.style.width = "200px";
+  yield onUpdated;
+  ok(true, "Layout-view got updated");
+
+  info("Checking that the layout-view shows the right value after update");
+  is(sizeElt.textContent, "200x100");
+});
new file mode 100644
--- /dev/null
+++ b/browser/devtools/layoutview/test/doc_layoutview_iframe1.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<p style="padding:50px;color:#f06;">Root page</p>
+<iframe src="doc_layoutview_iframe2.html"></iframe>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/browser/devtools/layoutview/test/doc_layoutview_iframe2.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<p style="width:100px;height:100px;background:red;">iframe 1</p>
+<iframe src="data:text/html,<div style='width:400px;height:200px;background:yellow;'>iframe 2</div>"></iframe>
\ No newline at end of file
--- a/browser/devtools/scratchpad/test/browser.ini
+++ b/browser/devtools/scratchpad/test/browser.ini
@@ -18,22 +18,24 @@ support-files = head.js
 # [browser_scratchpad_confirm_close.js]
 # Disable test due to bug 807234 becoming basically permanent
 [browser_scratchpad_tab.js]
 [browser_scratchpad_wrong_window_focus.js]
 [browser_scratchpad_unsaved.js]
 [browser_scratchpad_falsy.js]
 [browser_scratchpad_edit_ui_updates.js]
 [browser_scratchpad_revert_to_saved.js]
+[browser_scratchpad_run_error_goto_line.js]
 [browser_scratchpad_contexts.js]
 [browser_scratchpad_execute_print.js]
 [browser_scratchpad_files.js]
 [browser_scratchpad_initialization.js]
 [browser_scratchpad_inspect.js]
 [browser_scratchpad_long_string.js]
 [browser_scratchpad_open.js]
 [browser_scratchpad_open_error_console.js]
 [browser_scratchpad_throw_output.js]
 [browser_scratchpad_pprint-02.js]
 [browser_scratchpad_pprint.js]
+[browser_scratchpad_pprint_error_goto_line.js]
 [browser_scratchpad_restore.js]
 [browser_scratchpad_tab_switch.js]
 [browser_scratchpad_ui.js]
new file mode 100644
--- /dev/null
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_pprint_error_goto_line.js
@@ -0,0 +1,66 @@
+/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+function test()
+{
+  waitForExplicitFinish();
+
+  gBrowser.selectedTab = gBrowser.addTab();
+  gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
+    gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
+    openScratchpad(runTests);
+  }, true);
+
+  content.location = "data:text/html;charset=utf8,test Scratchpad pretty print error goto line.";
+}
+
+function testJumpToPrettyPrintError(sp, error, remark) {
+  info("will test jumpToLine after prettyPrint error" + remark);
+    // CodeMirror lines and columns are 0-based, Scratchpad UI and error
+    // stack are 1-based.
+    is(/Invalid regexp flag \(3:10\)/.test(error), true, "prettyPrint expects error in editor text:\n" + error);
+    const errorLine = 3, errorColumn = 10;
+    const editorDoc = sp.editor.container.contentDocument;
+    sp.editor.jumpToLine();
+    const lineInput = editorDoc.querySelector("input");
+    const errorLocation = lineInput.value;
+    const [ inputLine, inputColumn ] = errorLocation.split(":");
+    is(inputLine, errorLine, "jumpToLine input field is set from editor selection (line)");
+    is(inputColumn, errorColumn, "jumpToLine input field is set from editor selection (column)");
+    EventUtils.synthesizeKey("VK_RETURN", { }, editorDoc.defaultView);
+    // CodeMirror lines and columns are 0-based, Scratchpad UI and error
+    // stack are 1-based.
+    const cursor = sp.editor.getCursor();
+    is(inputLine, cursor.line + 1, "jumpToLine goto error location (line)");
+    is(inputColumn, cursor.ch + 1, "jumpToLine goto error location (column)");
+}
+
+function runTests(sw, sp)
+{
+  sp.setText([
+    "// line 1",
+    "// line 2",
+    "var re = /a bad /regexp/; // line 3 is an obvious syntax error!",
+    "// line 4",
+    "// line 5",
+    ""
+  ].join("\n"));
+  sp.prettyPrint().then(aFulfill => {
+    ok(false, "Expecting Invalid regexp flag (3:10)");
+    finish();
+  }, error => {
+    testJumpToPrettyPrintError(sp, error, " (Bug 1005471, first time)");
+  });
+  sp.prettyPrint().then(aFulfill => {
+    ok(false, "Expecting Invalid regexp flag (3:10)");
+    finish();
+  }, error => {
+    // Second time verifies bug in earlier implementation fixed.
+    testJumpToPrettyPrintError(sp, error, " (second time)");
+    finish();
+  });
+}
new file mode 100644
--- /dev/null
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_run_error_goto_line.js
@@ -0,0 +1,49 @@
+/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+function test()
+{
+  waitForExplicitFinish();
+
+  gBrowser.selectedTab = gBrowser.addTab();
+  gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
+    gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
+    openScratchpad(runTests);
+  }, true);
+
+  content.location = "data:text/html;charset=utf8,test Scratchpad pretty print.";
+}
+
+function runTests(sw)
+{
+  const sp = sw.Scratchpad;
+  sp.setText([
+    "// line 1",
+    "// line 2",
+    "var re = /a bad /regexp/; // line 3 is an obvious syntax error!",
+    "// line 4",
+    "// line 5",
+    ""
+  ].join("\n"));
+  sp.run().then(() => {
+    // CodeMirror lines and columns are 0-based, Scratchpad UI and error
+    // stack are 1-based.
+    let errorLine = 3;
+    let editorDoc = sp.editor.container.contentDocument;
+    sp.editor.jumpToLine();
+    let lineInput = editorDoc.querySelector("input");
+    let inputLine = lineInput.value;
+    is(inputLine, errorLine, "jumpToLine input field is set from editor selection");
+    EventUtils.synthesizeKey("VK_RETURN", { }, editorDoc.defaultView);
+    // CodeMirror lines and columns are 0-based, Scratchpad UI and error
+    // stack are 1-based.
+    let cursor = sp.editor.getCursor();
+    is(cursor.line + 1, inputLine, "jumpToLine goto error location (line)");
+    is(cursor.ch + 1, 1, "jumpToLine goto error location (column)");
+    finish();
+  });
+}
--- a/browser/devtools/sourceeditor/editor.js
+++ b/browser/devtools/sourceeditor/editor.js
@@ -1,8 +1,9 @@
+/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
 /* vim:set ts=2 sw=2 sts=2 et 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/. */
 
 "use strict";
 
 const { Cu, Cc, Ci, components } = require("chrome");
@@ -15,16 +16,21 @@ const DETECT_INDENT = "devtools.editor.d
 const DETECT_INDENT_MAX_LINES = 500;
 const L10N_BUNDLE = "chrome://browser/locale/devtools/sourceeditor.properties";
 const XUL_NS      = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 // Maximum allowed margin (in number of lines) from top or bottom of the editor
 // while shifting to a line which was initially out of view.
 const MAX_VERTICAL_OFFSET = 3;
 
+// Match @Scratchpad/N:LINE[:COLUMN] or (LINE[:COLUMN]) anywhere at an end of
+// line in text selection.
+const RE_SCRATCHPAD_ERROR = /(?:@Scratchpad\/\d+:|\()(\d+):?(\d+)?(?:\)|\n)/;
+const RE_JUMP_TO_LINE = /^(\d+):?(\d+)?/;
+
 const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
 const events  = require("devtools/toolkit/event-emitter");
 
 Cu.import("resource://gre/modules/Services.jsm");
 const L10N = Services.strings.createBundle(L10N_BUNDLE);
 
 // CM_STYLES, CM_SCRIPTS and CM_IFRAME represent the HTML,
 // JavaScript and CSS that is injected into an iframe in
@@ -747,17 +753,38 @@ Editor.prototype = {
 
     inp.type = "text";
     inp.style.width = "10em";
     inp.style.MozMarginStart = "1em";
 
     div.appendChild(txt);
     div.appendChild(inp);
 
-    this.openDialog(div, (line) => this.setCursor({ line: line - 1, ch: 0 }));
+    if (!this.hasMultipleSelections()) {
+      let cm = editors.get(this);
+      let sel = cm.getSelection();
+      // Scratchpad inserts and selects a comment after an error happens:
+      // "@Scratchpad/1:10:2". Parse this to get the line and column.
+      // In the string above this is line 10, column 2.
+      let match = sel.match(RE_SCRATCHPAD_ERROR);
+      if (match) {
+        let [ , line, column ] = match;
+        inp.value = column ? line + ":" + column : line;
+        inp.selectionStart = inp.selectionEnd = inp.value.length;
+      }
+    }
+
+    this.openDialog(div, (line) => {
+      // Handle LINE:COLUMN as well as LINE
+      let match = line.toString().match(RE_JUMP_TO_LINE);
+      if (match) {
+        let [ , line, column ] = match;
+        this.setCursor({line: line - 1, ch: column ? column - 1 : 0 });
+      }
+    });
   },
 
   /**
    * Moves the content of the current line or the lines selected up a line.
    */
   moveLineUp: function () {
     let cm = editors.get(this);
     let start = cm.getCursor("start");
--- a/browser/devtools/sourceeditor/test/browser.ini
+++ b/browser/devtools/sourceeditor/test/browser.ini
@@ -17,16 +17,17 @@ support-files =
   css_statemachine_testcases.css
   css_statemachine_tests.json
   css_autocompletion_tests.json
   vimemacs.html
   head.js
 
 [browser_editor_basic.js]
 [browser_editor_cursor.js]
+[browser_editor_goto_line.js]
 [browser_editor_history.js]
 [browser_editor_markers.js]
 [browser_editor_movelines.js]
 [browser_editor_addons.js]
 [browser_codemirror.js]
 [browser_css_autocompletion.js]
 [browser_css_getInfo.js]
 [browser_css_statemachine.js]
new file mode 100644
--- /dev/null
+++ b/browser/devtools/sourceeditor/test/browser_editor_goto_line.js
@@ -0,0 +1,130 @@
+/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+function testJumpToLine (ed, inputLine, expectCursor) {
+  ed.jumpToLine();
+  let editorDoc = ed.container.contentDocument;
+  let lineInput = editorDoc.querySelector("input");
+  lineInput.value = inputLine;
+  EventUtils.synthesizeKey("VK_RETURN", { }, editorDoc.defaultView);
+  // CodeMirror lines and columns are 0-based, Scratchpad UI is 1-based.
+  ch(ed.getCursor(), expectCursor, "jumpToLine " + inputLine + " expects cursor " + expectCursor.toSource());
+}
+
+function test() {
+  waitForExplicitFinish();
+  setup((ed, win) => {
+    let textLines = [
+      "// line 1",
+      "//  line 2",
+      "//   line 3",
+      "//    line 4",
+      "//     line 5",
+      ""];
+    ed.setText(textLines.join("\n"));
+    waitForFocus(function () {
+      let testVectors = [
+        // Various useless inputs go to line 0, column 0 or do nothing.
+        ["",
+         {line:0, ch:0}],
+        [":",
+         {line:0, ch:0}],
+        [" ",
+         {line:0, ch:0}],
+        [" : ",
+         {line:0, ch:0}],
+        ["a:b",
+         {line:0, ch:0}],
+        ["LINE:COLUMN",
+         {line:0, ch:0}],
+        ["-1",
+         {line:0, ch:0}],
+        [":-1",
+         {line:0, ch:0}],
+        ["-1:-1",
+         {line:0, ch:0}],
+        ["0",
+         {line:0, ch:0}],
+        [":0",
+         {line:0, ch:0}],
+        ["0:0",
+         {line:0, ch:0}],
+        // Starting here expect data needs to get updated for length changes to
+        // "textLines" above.
+        // Just jump to line
+        ["1",
+         {line:0, ch:0}],
+        // Jump to second character in line
+        ["1:2",
+         {line:0, ch:1}],
+        // Jump to last character on line
+        ["1:9",
+         {line:0, ch:8}],
+        // Jump just after last character on line (end of line)
+        ["1:10",
+         {line:0, ch:9}],
+        // Jump one character past end of line (gets clamped to end of line)
+        ["1:11",
+         {line:0, ch:9}],
+        ["2",
+         {line:1, ch:0}],
+        ["2:2",
+         {line:1, ch:1}],
+        ["2:10",
+         {line:1, ch:9}],
+        ["2:11",
+         {line:1, ch:10}],
+        ["2:12",
+         {line:1, ch:10}],
+        ["3",
+         {line:2, ch:0}],
+        ["3:2",
+         {line:2, ch:1}],
+        ["3:11",
+         {line:2, ch:10}],
+        ["3:12",
+         {line:2, ch:11}],
+        ["3:13",
+         {line:2, ch:11}],
+        ["4",
+         {line:3, ch:0}],
+        ["4:2",
+         {line:3, ch:1}],
+        ["4:12",
+         {line:3, ch:11}],
+        ["4:13",
+         {line:3, ch:12}],
+        ["4:14",
+         {line:3, ch:12}],
+        ["5",
+         {line:4, ch:0}],
+        ["5:2",
+         {line:4, ch:1}],
+        ["5:13",
+         {line:4, ch:12}],
+        ["5:14",
+         {line:4, ch:13}],
+        ["5:15",
+         {line:4, ch:13}],
+        // One line beyond last newline in editor text:
+        ["6",
+         {line:5, ch:0}],
+        ["6:2",
+         {line:5, ch:0}],
+        // Two line beyond last newline in editor text (gets clamped):
+        ["7",
+         {line:5, ch:0}],
+        ["7:2",
+         {line:5, ch:0}]
+      ];
+      testVectors.forEach(function (vector) {
+        testJumpToLine(ed, vector[0], vector[1]);
+      });
+      teardown(ed, win);
+    });
+  });
+}
--- a/browser/devtools/styleeditor/test/browser_styleeditor_private_perwindowpb.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_private_perwindowpb.js
@@ -1,57 +1,51 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This test makes sure that the style editor does not store any
 // content CSS files in the permanent cache when opened from PB mode.
 
-let gUI;
-
 function test() {
   waitForExplicitFinish();
-  let windowsToClose = [];
+  let gUI;
   let testURI = 'http://' + TEST_HOST + '/browser/browser/devtools/styleeditor/test/test_private.html';
 
-  function checkCache() {
-    checkDiskCacheFor(TEST_HOST, function() {
-      gUI = null;
-      finish();
-    });
-  }
+  info("Opening a new private window");
+  let win = OpenBrowserWindow({private: true});
+  win.addEventListener("load", function onLoad() {
+    win.removeEventListener("load", onLoad, false);
+    executeSoon(startTest);
+  }, false);
 
-  function doTest(aWindow) {
-    aWindow.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
-      aWindow.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
+  function startTest() {
+    win.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
+      win.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
+
+      info("Clearing the browser cache");
       cache.clear();
-      openStyleEditorInWindow(aWindow, function(panel) {
+
+      info("Opening the style editor in the private window");
+      openStyleEditorInWindow(win, function(panel) {
         gUI = panel.UI;
         gUI.on("editor-added", onEditorAdded);
       });
     }, true);
 
-    aWindow.gBrowser.selectedBrowser.loadURI(testURI);
+    info("Loading the test URL in the new private window");
+    win.content.location = testURI;
   }
 
   function onEditorAdded(aEvent, aEditor) {
+    info("The style editor is ready")
     aEditor.getSourceEditor().then(checkCache);
   }
 
-  function testOnWindow(options, callback) {
-    let win = OpenBrowserWindow(options);
-    win.addEventListener("load", function onLoad() {
-      win.removeEventListener("load", onLoad, false);
-      windowsToClose.push(win);
-      executeSoon(function() callback(win));
-    }, false);
-  };
-
-  registerCleanupFunction(function() {
-    windowsToClose.forEach(function(win) {
+  function checkCache() {
+    checkDiskCacheFor(TEST_HOST, function() {
       win.close();
+      win = null;
+      gUI = null;
+      finish();
     });
-  });
-
-  testOnWindow({private: true}, function(win) {
-    doTest(win);
-  });
+  }
 }
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -267,20 +267,28 @@ browser.jar:
   skin/classic/browser/devtools/debugger-step-over.png (../shared/devtools/images/debugger-step-over.png)
   skin/classic/browser/devtools/debugger-step-over@2x.png (../shared/devtools/images/debugger-step-over@2x.png)
   skin/classic/browser/devtools/debugger-blackbox.png  (../shared/devtools/images/debugger-blackbox.png)
   skin/classic/browser/devtools/debugger-blackbox@2x.png  (../shared/devtools/images/debugger-blackbox@2x.png)
   skin/classic/browser/devtools/debugger-toggleBreakpoints.png (../shared/devtools/images/debugger-toggleBreakpoints.png)
   skin/classic/browser/devtools/debugger-toggleBreakpoints@2x.png (../shared/devtools/images/debugger-toggleBreakpoints@2x.png)
   skin/classic/browser/devtools/tracer-icon.png        (../shared/devtools/images/tracer-icon.png)
   skin/classic/browser/devtools/tracer-icon@2x.png     (../shared/devtools/images/tracer-icon@2x.png)
-  skin/classic/browser/devtools/responsive-se-resizer.png (../shared/devtools/images/responsive-se-resizer.png)
-  skin/classic/browser/devtools/responsive-vertical-resizer.png (../shared/devtools/images/responsive-vertical-resizer.png)
-  skin/classic/browser/devtools/responsive-horizontal-resizer.png (../shared/devtools/images/responsive-horizontal-resizer.png)
-  skin/classic/browser/devtools/responsive-background.png (../shared/devtools/images/responsive-background.png)
+  skin/classic/browser/devtools/responsive-se-resizer.png          (../shared/devtools/images/responsivemode/responsive-se-resizer.png)
+  skin/classic/browser/devtools/responsive-se-resizer@2x.png       (../shared/devtools/images/responsivemode/responsive-se-resizer@2x.png)
+  skin/classic/browser/devtools/responsive-vertical-resizer.png    (../shared/devtools/images/responsivemode/responsive-vertical-resizer.png)
+  skin/classic/browser/devtools/responsive-vertical-resizer@2x.png (../shared/devtools/images/responsivemode/responsive-vertical-resizer@2x.png)
+  skin/classic/browser/devtools/responsive-horizontal-resizer.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer.png)
+  skin/classic/browser/devtools/responsive-horizontal-resizer@2x.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer@2x.png)
+  skin/classic/browser/devtools/responsiveui-rotate.png          (../shared/devtools/images/responsivemode/responsiveui-rotate.png)
+  skin/classic/browser/devtools/responsiveui-rotate@2x.png       (../shared/devtools/images/responsivemode/responsiveui-rotate@2x.png)
+  skin/classic/browser/devtools/responsiveui-touch.png           (../shared/devtools/images/responsivemode/responsiveui-touch.png)
+  skin/classic/browser/devtools/responsiveui-touch@2x.png        (../shared/devtools/images/responsivemode/responsiveui-touch@2x.png)
+  skin/classic/browser/devtools/responsiveui-screenshot.png      (../shared/devtools/images/responsivemode/responsiveui-screenshot.png)
+  skin/classic/browser/devtools/responsiveui-screenshot@2x.png   (../shared/devtools/images/responsivemode/responsiveui-screenshot@2x.png)
   skin/classic/browser/devtools/toggle-tools.png          (../shared/devtools/images/toggle-tools.png)
   skin/classic/browser/devtools/dock-bottom@2x.png        (../shared/devtools/images/dock-bottom@2x.png)
   skin/classic/browser/devtools/dock-side@2x.png          (../shared/devtools/images/dock-side@2x.png)
   skin/classic/browser/devtools/floating-scrollbars.css   (devtools/floating-scrollbars.css)
   skin/classic/browser/devtools/floating-scrollbars-light.css (devtools/floating-scrollbars-light.css)
 * skin/classic/browser/devtools/inspector.css               (../shared/devtools/inspector.css)
   skin/classic/browser/devtools/profiler-stopwatch.svg      (../shared/devtools/images/profiler-stopwatch.svg)
   skin/classic/browser/devtools/profiler-stopwatch-checked.svg      (../shared/devtools/images/profiler-stopwatch-checked.svg)
@@ -304,19 +312,16 @@ browser.jar:
   skin/classic/browser/devtools/vview-lock.png              (../shared/devtools/images/vview-lock.png)
   skin/classic/browser/devtools/vview-lock@2x.png           (../shared/devtools/images/vview-lock@2x.png)
   skin/classic/browser/devtools/vview-open-inspector.png    (../shared/devtools/images/vview-open-inspector.png)
   skin/classic/browser/devtools/vview-open-inspector@2x.png (../shared/devtools/images/vview-open-inspector@2x.png)
   skin/classic/browser/devtools/undock@2x.png               (../shared/devtools/images/undock@2x.png)
   skin/classic/browser/devtools/font-inspector.css          (../shared/devtools/font-inspector.css)
   skin/classic/browser/devtools/computedview.css            (../shared/devtools/computedview.css)
   skin/classic/browser/devtools/arrow-e.png                 (../shared/devtools/images/arrow-e.png)
-  skin/classic/browser/devtools/responsiveui-rotate.png     (../shared/devtools/responsiveui-rotate.png)
-  skin/classic/browser/devtools/responsiveui-touch.png      (../shared/devtools/responsiveui-touch.png)
-  skin/classic/browser/devtools/responsiveui-screenshot.png (../shared/devtools/responsiveui-screenshot.png)
   skin/classic/browser/devtools/projecteditor/projecteditor.css         (../shared/devtools/projecteditor/projecteditor.css)
   skin/classic/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
   skin/classic/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
   skin/classic/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
   skin/classic/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
   skin/classic/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
   skin/classic/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
   skin/classic/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
--- a/browser/themes/linux/preferences/in-content/preferences.css
+++ b/browser/themes/linux/preferences/in-content/preferences.css
@@ -1,14 +1,22 @@
 /* - This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
    - You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %include ../../../shared/incontentprefs/preferences.css
 
+tab[selected] {
+  /* Override styles for tab[selected] from
+     toolkit/themes/linux/global/tabbox.css */
+  margin-bottom: 0;
+  border-bottom-left-radius: 0;
+  border-bottom-right-radius: 0;
+}
+
 button > .button-box,
 menulist > .menulist-label-box {
   -moz-appearance: none;
 }
 
 button[type="menu"] > .button-box > .button-menu-dropmarker {
   -moz-appearance: none !important;
 }
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -387,20 +387,28 @@ browser.jar:
   skin/classic/browser/devtools/debugger-blackbox.png       (../shared/devtools/images/debugger-blackbox.png)
   skin/classic/browser/devtools/debugger-blackbox@2x.png    (../shared/devtools/images/debugger-blackbox@2x.png)
   skin/classic/browser/devtools/debugger-toggleBreakpoints.png (../shared/devtools/images/debugger-toggleBreakpoints.png)
   skin/classic/browser/devtools/debugger-toggleBreakpoints@2x.png (../shared/devtools/images/debugger-toggleBreakpoints@2x.png)
   skin/classic/browser/devtools/tracer-icon.png             (../shared/devtools/images/tracer-icon.png)
   skin/classic/browser/devtools/tracer-icon@2x.png          (../shared/devtools/images/tracer-icon@2x.png)
   skin/classic/browser/devtools/floating-scrollbars.css     (devtools/floating-scrollbars.css)
   skin/classic/browser/devtools/floating-scrollbars-light.css (devtools/floating-scrollbars-light.css)
-  skin/classic/browser/devtools/responsive-se-resizer.png   (../shared/devtools/images/responsive-se-resizer.png)
-  skin/classic/browser/devtools/responsive-vertical-resizer.png (../shared/devtools/images/responsive-vertical-resizer.png)
-  skin/classic/browser/devtools/responsive-horizontal-resizer.png (../shared/devtools/images/responsive-horizontal-resizer.png)
-  skin/classic/browser/devtools/responsive-background.png   (../shared/devtools/images/responsive-background.png)
+  skin/classic/browser/devtools/responsive-se-resizer.png          (../shared/devtools/images/responsivemode/responsive-se-resizer.png)
+  skin/classic/browser/devtools/responsive-se-resizer@2x.png       (../shared/devtools/images/responsivemode/responsive-se-resizer@2x.png)
+  skin/classic/browser/devtools/responsive-vertical-resizer.png    (../shared/devtools/images/responsivemode/responsive-vertical-resizer.png)
+  skin/classic/browser/devtools/responsive-vertical-resizer@2x.png (../shared/devtools/images/responsivemode/responsive-vertical-resizer@2x.png)
+  skin/classic/browser/devtools/responsive-horizontal-resizer.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer.png)
+  skin/classic/browser/devtools/responsive-horizontal-resizer@2x.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer@2x.png)
+  skin/classic/browser/devtools/responsiveui-rotate.png          (../shared/devtools/images/responsivemode/responsiveui-rotate.png)
+  skin/classic/browser/devtools/responsiveui-rotate@2x.png       (../shared/devtools/images/responsivemode/responsiveui-rotate@2x.png)
+  skin/classic/browser/devtools/responsiveui-touch.png           (../shared/devtools/images/responsivemode/responsiveui-touch.png)
+  skin/classic/browser/devtools/responsiveui-touch@2x.png        (../shared/devtools/images/responsivemode/responsiveui-touch@2x.png)
+  skin/classic/browser/devtools/responsiveui-screenshot.png      (../shared/devtools/images/responsivemode/responsiveui-screenshot.png)
+  skin/classic/browser/devtools/responsiveui-screenshot@2x.png   (../shared/devtools/images/responsivemode/responsiveui-screenshot@2x.png)
   skin/classic/browser/devtools/toggle-tools.png            (../shared/devtools/images/toggle-tools.png)
   skin/classic/browser/devtools/dock-bottom@2x.png          (../shared/devtools/images/dock-bottom@2x.png)
   skin/classic/browser/devtools/dock-side@2x.png          (../shared/devtools/images/dock-side@2x.png)
 * skin/classic/browser/devtools/inspector.css               (../shared/devtools/inspector.css)
   skin/classic/browser/devtools/profiler-stopwatch.svg      (../shared/devtools/images/profiler-stopwatch.svg)
   skin/classic/browser/devtools/profiler-stopwatch-checked.svg      (../shared/devtools/images/profiler-stopwatch-checked.svg)
   skin/classic/browser/devtools/tool-options.svg            (../shared/devtools/images/tool-options.svg)
   skin/classic/browser/devtools/tool-webconsole.svg         (../shared/devtools/images/tool-webconsole.svg)
@@ -422,19 +430,16 @@ browser.jar:
   skin/classic/browser/devtools/vview-lock.png              (../shared/devtools/images/vview-lock.png)
   skin/classic/browser/devtools/vview-lock@2x.png           (../shared/devtools/images/vview-lock@2x.png)
   skin/classic/browser/devtools/vview-open-inspector.png    (../shared/devtools/images/vview-open-inspector.png)
   skin/classic/browser/devtools/vview-open-inspector@2x.png (../shared/devtools/images/vview-open-inspector@2x.png)
   skin/classic/browser/devtools/undock@2x.png               (../shared/devtools/images/undock@2x.png)
   skin/classic/browser/devtools/font-inspector.css          (../shared/devtools/font-inspector.css)
   skin/classic/browser/devtools/computedview.css            (../shared/devtools/computedview.css)
   skin/classic/browser/devtools/arrow-e.png                 (../shared/devtools/images/arrow-e.png)
-  skin/classic/browser/devtools/responsiveui-rotate.png     (../shared/devtools/responsiveui-rotate.png)
-  skin/classic/browser/devtools/responsiveui-touch.png      (../shared/devtools/responsiveui-touch.png)
-  skin/classic/browser/devtools/responsiveui-screenshot.png (../shared/devtools/responsiveui-screenshot.png)
   skin/classic/browser/devtools/projecteditor/projecteditor.css         (../shared/devtools/projecteditor/projecteditor.css)
   skin/classic/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
   skin/classic/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
   skin/classic/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
   skin/classic/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
   skin/classic/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
   skin/classic/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
   skin/classic/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
--- a/browser/themes/osx/preferences/in-content/preferences.css
+++ b/browser/themes/osx/preferences/in-content/preferences.css
@@ -1,14 +1,28 @@
 /* - This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
    - You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %include ../../../shared/incontentprefs/preferences.css
 
+prefpane .groupbox-title {
+  background: none;
+  margin-bottom: 0;
+}
+
+tabs {
+  padding-right: 0;
+  padding-left: 0;
+}
+
+tab[selected] {
+  text-shadow: none;
+}
+
 menulist:not([editable="true"]) > menupopup > menuitem[checked="true"]::before,
 menulist:not([editable="true"]) > menupopup > menuitem[selected="true"]::before {
   display: none;
 }
 
 menulist:not([editable="true"]) > .menulist-dropmarker {
   display: -moz-box;
   margin-top: 1px;
deleted file mode 100644
index 271dd5ebcfbdc858f83f0f7ea18a59bb1980d74f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
rename from browser/themes/shared/devtools/images/responsive-horizontal-resizer.png
rename to browser/themes/shared/devtools/images/responsivemode/responsive-horizontal-resizer.png
index 86ce453b22601b6d1e6e2b6be5a4e8a6e108b7f2..7d113f0df411078d756230cdc62e7a9257febeae
GIT binary patch
literal 102
zc%17D@N?(olHy`uVBq!ia0vp^5<tw(!3HFSzV~heQo5cljv*T7lM@!O|M>Ja{pR)e
z`_qDi>wo{;&6CI2;hf98ujY5`IR|qCDVHA%3{RwtR&Ad4TokC0!PC{xWt~$(69CO8
BA;<s#
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bb3c4bde064c0817c853ce90efb018b335a8ea0e
GIT binary patch
literal 129
zc%17D@N?(olHy`uVBq!ia0vp^20+Zm!3HEVi{?iGDGyH<#}JR>$q5py%`7$l{sce2
z-9JAze*gbjmNN`b^eSvmsz}hVkh>}De2Y1L-`_V9n>;z5RIKsL5b2rbw0P--3{8_L
du3irYhDlndT-S5_S_d?f!PC{xWt~$(69COGEFk~@
rename from browser/themes/shared/devtools/images/responsive-se-resizer.png
rename to browser/themes/shared/devtools/images/responsivemode/responsive-se-resizer.png
index bdc03ee24ae6e011d00e983b93c9f270b6bb813f..35b54d62cb4b0b79b9719a25a5176fb58182247a
GIT binary patch
literal 129
zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`9-c0aAr_~T6C_xfnfKNFj{Nra
z`Fo>HCiQ>+Wvg-2|NORlPR>~cn+>x(xtL4Ns<bldopq^fRywO-zv%bOB?b(hO1~!x
c%vWMyQ0`i~>Qi#`R-l;-p00i_>zopr00hh|)&Kwi
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9dbf4fe8e8e42a01ce4436e30f02c7ec506b406e
GIT binary patch
literal 205
zc%17D@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJDV{ElAr-gYPVweyFyL{iR&c#j
z;Z~^s$ny8blWvj%yCx_ty`Ye$5Fjy0oJ(?X(8`ciVM<oN1u`8Yy<>xS6x+0%SZ!b7
zp2%rvaf)@;(g!QfR?8iI&{!GtL;m4;nGCk`Pa6bmAXq|X-=Y1S$7P?l@Bh8y?<yIG
z<g|*7{pClQGAmZbPh@_{eX+-S-N%n+tD?m(3EkwBb<E8Gx{txr)z4*}Q$iB}bOldq
rename from browser/themes/shared/devtools/images/responsive-vertical-resizer.png
rename to browser/themes/shared/devtools/images/responsivemode/responsive-vertical-resizer.png
index 1bb622dd397bf5b62cc89c03f5f77195713bf0da..3b4e78c6fd55144019fcf9df882cc7d5377852ae
GIT binary patch
literal 105
zc%17D@N?(olHy`uVBq!ia0vp^>_9BR!3HGFE<K+MqzpV=978mMlM@tJ_SO83{Py<w
zd!rIFiJHIvveh^iZ+2I8SM8k2qPjx=e%<uNn?Eu!@ZL3ACA5;U2&k9A)78&qol`;+
E0NwK;1poj5
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cbae60621ddc6b71a468964e16162b5fdd419c9a
GIT binary patch
literal 141
zc%17D@N?(olHy`uVBq!ia0vp^d_Zi#!VDxYi-p+(DgFST5LY1m`SZ^&-+q4k@$>8V
zUuDl;d;kiumIV0)Gw5`5&FmLr*8>V@c)B=-NQ5URIItgTQ#f)U;SrA$509Rnf{E8;
k@7WfO0tPXnjvTTK41%?~-cCko!azL?p00i_>zopr06pR<L;wH)
rename from browser/themes/shared/devtools/responsiveui-rotate.png
rename to browser/themes/shared/devtools/images/responsivemode/responsiveui-rotate.png
index 1e30f708697532e260694d36d6d0ae50cd491ef7..2bacbd2d559b72468aca1b72e07d8d900359a63a
GIT binary patch
literal 245
zc$@+C01E$!P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0002INkl<Zc-qyH
zJqiLb5QQTiMNrV%N^CuV=n1T>xA6qtz*^A8QuJmfncpHZTkT@Vih|&SDU!$cW+ue_
zuK;+JH9YeeQFnlHj==W-d<sAnQ5rU3^IBj^sUJzUW@L->7Ev}Hcx~sGfIM8T*4Ql*
z<rq=-5#;bzfbDD-_1;mYt|1~C1(ZuMpaw~=L^Q~~cIO0jchaf^cTNyU7X`Q+VBJA=
v=0278JOSXP`$iAc`8T}%#Gd^|_iH@?(^^+@;3c~}00000NkvXXu0mjfzR6`a
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..eeeb823287fddd28de8d3127559a3675f545a25b
GIT binary patch
literal 438
zc$@*Y0ZIOeP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F80004fNkl<Zc-rlj
zyGlbr5QgIgW0S@{f)-X<_yoRyg@uBmjoPLNh}fGbhzj}!5^JNx$4aAScP_huks)Y6
zPvTiuSdcR?)z0#NyJzM<TPmW6Q~|)7NyRPjbMQt)TrkLc7X3M(ySL=qnt-ll(Kik7
z4uDkihz9}mn3sY0Qa9yF^rvq`OQXbd1Bl2BkgHkp9o-O^9c$g8h)idRYyKo&G2pJW
zFe;H70KA>GHumHO-1V?HK7#=C+O;4FfHAzH-#i(>xNbMVEd#C&+~2a6Hw?OcAimIs
z`xAf{qQ$I2Ab)GETNROs5&kf5(Kn(2)MUPkyPA$tj**?z#*G3{hx>B!BRzG9y+#43
zy$<Ks-HFI-sCe8B06%^fP=7sCJRX32dm!$gy4`LiP&^($$4nOtxtj>_s3vR<=ADjz
zAs!F#@zYSVN%T^Y>Hxr>lv0I7K2tkR2B0q)ApamD<%GB34tnU<k^zXwltJEA8%_yP
geifN374hHW9o`}do}$9<-~a#s07*qoM6N<$f+ZBg@&Et;
rename from browser/themes/shared/devtools/responsiveui-screenshot.png
rename to browser/themes/shared/devtools/images/responsivemode/responsiveui-screenshot.png
index 82e6c3f3c5446fb17b430f688a33fbd28042120f..084220ed1d903c4450c11583a4e9da9398282454
GIT binary patch
literal 303
zc$@(*0nq-5P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0002?Nkl<Zc-qaA
zO-ckY5QP=RtqLOkAb10};!4GZf(t!__YidN2~<QK#DyCVCYV&cq|)%DdS(QB8pG@+
z@Ig_$`a%&hH+x5w+Y$CAnm_-L%14a0_wO*tMS)%UKrhJGB$p-zquQMZrom@^1(P?~
zeLy+-B3B%*1@_R*^$I*la(T4Uf-|aD1@>4K#FS3F7l30)<=qLuVY_N7r&Yl>xz>h}
z2jiZ?1|;W2WUDF&A*^==UJsvGcdCMvnzLcJ94PErU{9*H-{w+tUKK>mFC;g*Pc6bt
zg}qh<P8-b41;AZLb8|Ufsb7F{<Bh36xt)#A_XF{K_MA(_L%aY0002ovPDHLkV1nhQ
BfWZI&
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..927c5cf0bcf649168a687e60dd4757ede293e63f
GIT binary patch
literal 531
zc$@(f0_^>XP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F80005nNkl<Zc-rk&
z&nrYx6n;e!SxhN~6blQ3QnIlj`3vkM3$wHo3oEuZQkspj5amY_{;_H1-gEA`S6#j$
zZ{B#kH}6tvPJQ*d=R4<o^X_@)Ow_S|W#0RqH}wC2zTkyxwOWacJJux6SwL(rwYKxY
z1ZcJuB+do4XCVbtku)!e{7BwA?n>NeiR5Js$=U+Tf!2CBk+bW|;&pP1#P$Y(zX{Yp
ztrh{q_6mf*0BW@e$QrCjE)>g#QZl2IA0na=B{GXM__F57FTl7b=9f+HeQ%Uv@PPwv
zPytBTV7DA)G-kJim~aBLt)%?o0U+hm-3lTA4U-(N4UuUw?&O1mXY@ouTpwZ!3&0di
z6ra*04@n-*8VxBYCus3EKz1R{Bjb+JxbVffh%GFjX3RwFwRV5kT=0SO*^E41Sb#Bp
zGCry`$zvK9zWAs`Z1F2_&0|xu9Hw#Mi*pfMya|onZvMu3Op&zg44lCi=OQ-59Js?)
zY;G<ZWpVr3xLW|vIE!--gV-R0h{)|lISnyEcY$JA&srSZ;L8Xg<96%b52h7{51i23
zFo}CbW=FAG!T8nM&M9S9aRy)e>zM6190gG9537hTYh$a5?e%X$lRZVPsAC;_w^uVM
VXou&f+`s?;002ovPDHLkV1jZN^11*3
rename from browser/themes/shared/devtools/responsiveui-touch.png
rename to browser/themes/shared/devtools/images/responsivemode/responsiveui-touch.png
index c25b44d04402adadda813d70c849c1c19507e161..90587034ce786c0f0d061a3e893e2d4af2492345
GIT binary patch
literal 470
zc$@*&0V)28P)<h;3K|Lk000e1NJLTq001BW000mO1^@s6cL04^0004<Nkl<Zc-qaB
zF-ycS6vvAeCqWMU7LE?ua>K1oPNJXSocs=g)7>K8C<q=Rh3j?koLp|vkKp7WB8}p3
z2)1b(m6-q8m~dcCI{Dy{m)9omm;PVl=r$g6mlhw}31x>#UUU#6=NMW`yz57#?MHFo
z4aq5D<Q!8&L7KC@$%HS#5x>!5$8`O)co^?DFJBvQ#9l~tjRA0S6i#T-rTKdoF>>Yr
zae%_&^w+{~5F=*{Ac}TSG^ND|&N*+`0C*AUmjE2z8j)oHSV^D*Ahwl22S98kfowPl
zfY`PPF-icHvoZxBd%<qC0+78>8=xMD0;mb10BV9LfNBtX0PXK^?E#dp3~m=3X=1av
zG-vH3V<$9YXH$TT9alo+?5DH027KNhk|Qr7_rjmQ0phzV06%)_sne!xRcv~pcfJ4#
zssQj@u3rxyH^io&a`W;+np6Scxue?)=ZloFwKOXZ$}iA21%NfrA8_q%`VqM*0b(lv
zT@H+p#8d*9E(b<PVk*IJATEl`N`X1@e>EYR3`J(8z#Mtmg#W_609(Vpb)!QZy#N3J
M07*qoM6N<$g07*(+W-In
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e4645039cf57e2276838fbb9d4ad7aa27a96a1e9
GIT binary patch
literal 927
zc$@*B17Q4#P)<h;3K|Lk000e1NJLTq002M$001Be1^@s6qMd$(000AKNkl<Zc-rll
zziSjh6vwwnj0sUuY%H|WBBT*gc)LM~b^*1p5ft%Hu+X5DKZ2n6tI(jvU?aieb}s<~
ziXf!15V5fk!6*ijn@EBoaJMu20~zO=WK`C3Z*x2E()i$UGj9goyw84jc5bY!HaRI<
zgoqDTd3@gI(Oo#&h+)hkwmy}^cE26Az4A@lWiA|T#QLc7FD)%?^+kNq7twGn#~9{N
z<?ngQwyR=?lu!J_hcJgEIiBwC;={oxiuQh$aw8mV#54pcWedrZ*TuW+p;Mf-?cz*3
z9BssYK^T75Y8(J0u8UU%wkO9C(-0~`95S6B64%A|Ot6mRIAR(?!7Cpz4gl{tio?@J
z-}j@QDi5E)(MAkom{S$u1=IQQo})NCZS)K7OuyqX21gq)j4cCj*)8J$u-TzFNFM#=
z!g)9WM;kGWVGib+R{(QS93+oE3b#Eb;b<d<G0eeSG61@-i`TB>)Bto}7q4B%$pAps
zSpZPI0+4l90GLa%31$VL=8|lJnE@2bN69{e^#O#Jq?D~xpTP_OhPsO%Hjo{J>H(lW
z2&Dqhb7(Cc0KKIHfUOIF<hh{P0Fvi|rUOWx3z`iec`j%=0D48F1IVEW8URT}&;v+U
z1UUeDMWh4BsR()iNktF?pjQM6$>Z}<b`k?f_u|a9bp;Rv!JhR5&|8`<)J-C#Y~wsU
z=8O2MFQSo(2u75AZ<qj35#m5<a(&6+l?Rl+QnLNxl-Osr_}3-?IHlQBsmU3W9X^ll
z)mpp}06aXNmVe*q_sy#C_q7&p2Eg3qdVhaUVxd$3co3aQm-yTjER+ra8%+hkgZQi;
z#A9>-;(@gMSfJyT10n$M@hp2lYo!u)t?mPZYT?gT0RWJj3jmML)yv=ie5%cM%MSJd
z$73(mqJR7Wpqf(wZUdJhVpo+%x6xL=ck%$hE4J4Bz2026TKt<;0B>{d0oScY3||KP
zLKXQwgK~Ex`Sq1JRFMZjp;Yd*@|aw?0e;j-@whe0eM3~7?^F<`8Uj#aFDw(rIp3)u
zJYG}rL3Dp{adC^0i_$UHr3#u}BY=<lOVc|nQ?{_Mu&FAd(<|5E;dsrW5f{+|A;J?-
zj%Cnrq*X;-Q)>96JgikT;wT)SRw&2%Z~yHt`w46JtHcwcv8@0A002ovPDHLkV1i`T
Brj7sr
--- a/browser/themes/shared/devtools/responsivedesign.inc.css
+++ b/browser/themes/shared/devtools/responsivedesign.inc.css
@@ -2,17 +2,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/. */
 %endif
 
 /* Responsive Mode */
 
 .browserContainer[responsivemode] {
-  background: #222 url("chrome://browser/skin/devtools/responsive-background.png");
+  background-color: #222;
   padding: 0 20px 20px 20px;
 }
 
 .browserStack[responsivemode] {
   box-shadow: 0 0 7px black;
 }
 
 .devtools-responsiveui-toolbar {
@@ -38,16 +38,21 @@
   border: 1px solid hsla(210,8%,5%,.45);
   border-radius: 0;
   background: linear-gradient(hsla(212,7%,57%,.35), hsla(212,7%,57%,.1)) padding-box;
   box-shadow: 0 1px 0 hsla(210,16%,76%,.15) inset, 0 0 0 1px hsla(210,16%,76%,.15) inset, 0 1px 0 hsla(210,16%,76%,.15);
   margin: 0 3px;
   color: inherit;
 }
 
+.devtools-responsiveui-toolbarbutton > .toolbarbutton-icon {
+  width: 16px;
+  height: 16px;
+}
+
 .devtools-responsiveui-toolbarbutton > .toolbarbutton-menubutton-button {
   -moz-box-orient: horizontal;
 }
 
 .devtools-responsiveui-menulist:-moz-focusring,
 .devtools-responsiveui-toolbarbutton:-moz-focusring {
   outline: 1px dotted hsla(210,30%,85%,0.7);
   outline-offset: -4px;
@@ -130,44 +135,88 @@
 .devtools-responsiveui-close {
   list-style-image: url("chrome://browser/skin/devtools/close.png");
 }
 
 .devtools-responsiveui-rotate {
   list-style-image: url("chrome://browser/skin/devtools/responsiveui-rotate.png");
 }
 
+@media (min-resolution: 2dppx) {
+  .devtools-responsiveui-close {
+    list-style-image: url("chrome://browser/skin/devtools/close@2x.png");
+  }
+
+  .devtools-responsiveui-rotate {
+    list-style-image: url("chrome://browser/skin/devtools/responsiveui-rotate@2x.png");
+  }
+}
+
 .devtools-responsiveui-touch {
   list-style-image: url("chrome://browser/skin/devtools/responsiveui-touch.png");
   -moz-image-region: rect(0px,16px,16px,0px);
 }
 
 .devtools-responsiveui-touch[checked] {
   -moz-image-region: rect(0px,32px,16px,16px);
 }
 
+@media (min-resolution: 2dppx) {
+  .devtools-responsiveui-touch {
+    list-style-image: url("chrome://browser/skin/devtools/responsiveui-touch@2x.png");
+    -moz-image-region: rect(0px,32px,32px,0px);
+  }
+
+  .devtools-responsiveui-touch[checked] {
+    -moz-image-region: rect(0px,64px,32px,32px);
+  }
+}
+
 .devtools-responsiveui-screenshot {
   list-style-image: url("chrome://browser/skin/devtools/responsiveui-screenshot.png");
 }
 
+@media (min-resolution: 2dppx) {
+  .devtools-responsiveui-screenshot {
+    list-style-image: url("chrome://browser/skin/devtools/responsiveui-screenshot@2x.png");
+  }
+}
+
 .devtools-responsiveui-resizebarV {
   width: 7px;
   height: 24px;
   cursor: ew-resize;
   transform: translate(12px, -12px);
+  background-size: cover;
   background-image: url("chrome://browser/skin/devtools/responsive-vertical-resizer.png");
 }
 
 .devtools-responsiveui-resizebarH {
   width: 24px;
   height: 7px;
   cursor: ns-resize;
   transform: translate(-12px, 12px);
+  background-size: cover;
   background-image: url("chrome://browser/skin/devtools/responsive-horizontal-resizer.png");
 }
 
 .devtools-responsiveui-resizehandle {
   width: 16px;
   height: 16px;
   cursor: se-resize;
   transform: translate(12px, 12px);
+  background-size: cover;
   background-image: url("chrome://browser/skin/devtools/responsive-se-resizer.png");
 }
+
+@media (min-resolution: 2dppx) {
+  .devtools-responsiveui-resizebarV {
+    background-image: url("chrome://browser/skin/devtools/responsive-vertical-resizer@2x.png");
+  }
+
+  .devtools-responsiveui-resizebarH {
+    background-image: url("chrome://browser/skin/devtools/responsive-horizontal-resizer@2x.png");
+  }
+
+  .devtools-responsiveui-resizehandle {
+    background-image: url("chrome://browser/skin/devtools/responsive-se-resizer@2x.png");
+  }
+}
\ No newline at end of file
--- a/browser/themes/shared/incontentprefs/preferences.css
+++ b/browser/themes/shared/incontentprefs/preferences.css
@@ -7,17 +7,17 @@
 
 @font-face {
   font-family: "Clear Sans";
   src: url("chrome://browser/content/fonts/ClearSans-Regular.woff") format('woff');
 }
 
 page {
   -moz-appearance: none;
-  background-image: linear-gradient(#FFFFFF, #EDEDED 100px);
+  background-color: white;
 }
 
 * {
   -moz-user-select: text;
 }
 
 caption {
   -moz-appearance: none;
@@ -79,62 +79,49 @@ tabpanels {
   border: none;
   padding: 0;
   background-color: transparent;
 }
 
 tabs {
   -moz-margin-start: 60px;
   margin-bottom: 15px;
-  border-top: 2px solid;
-  border-bottom: 2px solid;
-  -moz-border-top-colors: #BBBBBB #F9F9F9;
-  -moz-border-bottom-colors: #F9F9F9 #BBBBBB;
+  border-top: 1px solid #c1c1c1;
+  border-bottom: 1px solid #c1c1c1;
+  background-color: #fbfbfb;
 }
 
 .tabs-left,
 .tabs-right {
   border-bottom: none;
 }
 
 tab {
   -moz-appearance: none;
   margin-top: 0;
-  padding: 0;
-  -moz-margin-end: 30px;
-  min-height: 60px;
-  background-color: transparent;
+  padding: 0 20px;
+  min-height: 44px;
+  color: #424f5a;
+  background-color: #fbfbfb;
   border-width: 0;
-  border-bottom: 3px solid transparent;
+  transition: background-color 50ms ease 0s;
+}
+
+tab:hover {
+  background-color: #ebebeb;
 }
 
 tab[selected] {
-  border-bottom-color: #FF9500;
+  background-color: #ebebeb;
+  box-shadow: inset 0 -4px 0 0 #ff9500;
 }
 
 .tab-text {
   font-size: 1.3rem;
   line-height: 22px;
-  color: #333333;
-  border: 1px solid transparent;
-  border-radius: 5px;
-}
-
-tab:not([selected]):hover > .tab-middle > .tab-text {
-  background-color: rgba(255,255,255,0.5);
-  border-color: #FFFFFF;
-}
-
-tab:not([selected]):hover:active > .tab-middle > .tab-text {
-  background-color: rgba(0,0,0,0.03);
-}
-
-tab[selected] > .tab-middle > .tab-text {
-  font-weight: bold;
-  color: #424E5A;
 }
 
 /* buttons and menulists */
 
 button,
 menulist {
   -moz-appearance: none;
   height: 30px;
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -305,20 +305,28 @@ browser.jar:
         skin/classic/browser/devtools/debugger-step-over.png        (../shared/devtools/images/debugger-step-over.png)
         skin/classic/browser/devtools/debugger-step-over@2x.png     (../shared/devtools/images/debugger-step-over@2x.png)
         skin/classic/browser/devtools/debugger-blackbox.png         (../shared/devtools/images/debugger-blackbox.png)
         skin/classic/browser/devtools/debugger-blackbox@2x.png      (../shared/devtools/images/debugger-blackbox@2x.png)
         skin/classic/browser/devtools/debugger-toggleBreakpoints.png  (../shared/devtools/images/debugger-toggleBreakpoints.png)
         skin/classic/browser/devtools/debugger-toggleBreakpoints@2x.png  (../shared/devtools/images/debugger-toggleBreakpoints@2x.png)
         skin/classic/browser/devtools/tracer-icon.png               (../shared/devtools/images/tracer-icon.png)
         skin/classic/browser/devtools/tracer-icon@2x.png            (../shared/devtools/images/tracer-icon@2x.png)
-        skin/classic/browser/devtools/responsive-se-resizer.png     (../shared/devtools/images/responsive-se-resizer.png)
-        skin/classic/browser/devtools/responsive-vertical-resizer.png (../shared/devtools/images/responsive-vertical-resizer.png)
-        skin/classic/browser/devtools/responsive-horizontal-resizer.png (../shared/devtools/images/responsive-horizontal-resizer.png)
-        skin/classic/browser/devtools/responsive-background.png     (../shared/devtools/images/responsive-background.png)
+        skin/classic/browser/devtools/responsive-se-resizer.png     (../shared/devtools/images/responsivemode/responsive-se-resizer.png)
+        skin/classic/browser/devtools/responsive-se-resizer@2x.png       (../shared/devtools/images/responsivemode/responsive-se-resizer@2x.png)
+        skin/classic/browser/devtools/responsive-vertical-resizer.png    (../shared/devtools/images/responsivemode/responsive-vertical-resizer.png)
+        skin/classic/browser/devtools/responsive-vertical-resizer@2x.png (../shared/devtools/images/responsivemode/responsive-vertical-resizer@2x.png)
+        skin/classic/browser/devtools/responsive-horizontal-resizer.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer.png)
+        skin/classic/browser/devtools/responsive-horizontal-resizer@2x.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer@2x.png)
+        skin/classic/browser/devtools/responsiveui-rotate.png       (../shared/devtools/images/responsivemode/responsiveui-rotate.png)
+        skin/classic/browser/devtools/responsiveui-rotate@2x.png       (../shared/devtools/images/responsivemode/responsiveui-rotate@2x.png)
+        skin/classic/browser/devtools/responsiveui-touch.png        (../shared/devtools/images/responsivemode/responsiveui-touch.png)
+        skin/classic/browser/devtools/responsiveui-touch@2x.png        (../shared/devtools/images/responsivemode/responsiveui-touch@2x.png)
+        skin/classic/browser/devtools/responsiveui-screenshot.png   (../shared/devtools/images/responsivemode/responsiveui-screenshot.png)
+        skin/classic/browser/devtools/responsiveui-screenshot@2x.png   (../shared/devtools/images/responsivemode/responsiveui-screenshot@2x.png)
         skin/classic/browser/devtools/toggle-tools.png              (../shared/devtools/images/toggle-tools.png)
         skin/classic/browser/devtools/dock-bottom@2x.png            (../shared/devtools/images/dock-bottom@2x.png)
         skin/classic/browser/devtools/dock-side@2x.png              (../shared/devtools/images/dock-side@2x.png)
         skin/classic/browser/devtools/floating-scrollbars.css       (devtools/floating-scrollbars.css)
         skin/classic/browser/devtools/floating-scrollbars-light.css (devtools/floating-scrollbars-light.css)
 *       skin/classic/browser/devtools/inspector.css                 (../shared/devtools/inspector.css)
         skin/classic/browser/devtools/profiler-stopwatch.svg        (../shared/devtools/images/profiler-stopwatch.svg)
         skin/classic/browser/devtools/profiler-stopwatch-checked.svg  (../shared/devtools/images/profiler-stopwatch-checked.svg)
@@ -341,19 +349,16 @@ browser.jar:
         skin/classic/browser/devtools/vview-lock.png                (../shared/devtools/images/vview-lock.png)
         skin/classic/browser/devtools/vview-lock@2x.png             (../shared/devtools/images/vview-lock@2x.png)
         skin/classic/browser/devtools/vview-open-inspector.png      (../shared/devtools/images/vview-open-inspector.png)
         skin/classic/browser/devtools/vview-open-inspector@2x.png   (../shared/devtools/images/vview-open-inspector@2x.png)
         skin/classic/browser/devtools/undock@2x.png                 (../shared/devtools/images/undock@2x.png)
         skin/classic/browser/devtools/font-inspector.css            (../shared/devtools/font-inspector.css)
         skin/classic/browser/devtools/computedview.css              (../shared/devtools/computedview.css)
         skin/classic/browser/devtools/arrow-e.png                   (../shared/devtools/images/arrow-e.png)
-        skin/classic/browser/devtools/responsiveui-rotate.png       (../shared/devtools/responsiveui-rotate.png)
-        skin/classic/browser/devtools/responsiveui-touch.png        (../shared/devtools/responsiveui-touch.png)
-        skin/classic/browser/devtools/responsiveui-screenshot.png   (../shared/devtools/responsiveui-screenshot.png)
         skin/classic/browser/devtools/projecteditor/projecteditor.css           (../shared/devtools/projecteditor/projecteditor.css)
         skin/classic/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
         skin/classic/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
         skin/classic/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
         skin/classic/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
         skin/classic/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
         skin/classic/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
         skin/classic/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
@@ -700,20 +705,28 @@ browser.jar:
         skin/classic/aero/browser/devtools/debugger-step-over.png    (../shared/devtools/images/debugger-step-over.png)
         skin/classic/aero/browser/devtools/debugger-step-over@2x.png  (../shared/devtools/images/debugger-step-over@2x.png)
         skin/classic/aero/browser/devtools/debugger-blackbox.png      (../shared/devtools/images/debugger-blackbox.png)
         skin/classic/aero/browser/devtools/debugger-blackbox@2x.png   (../shared/devtools/images/debugger-blackbox@2x.png)
         skin/classic/aero/browser/devtools/debugger-toggleBreakpoints.png (../shared/devtools/images/debugger-toggleBreakpoints.png)
         skin/classic/aero/browser/devtools/debugger-toggleBreakpoints@2x.png (../shared/devtools/images/debugger-toggleBreakpoints@2x.png)
         skin/classic/aero/browser/devtools/tracer-icon.png           (../shared/devtools/images/tracer-icon.png)
         skin/classic/aero/browser/devtools/tracer-icon@2x.png        (../shared/devtools/images/tracer-icon@2x.png)
-        skin/classic/aero/browser/devtools/responsive-se-resizer.png (../shared/devtools/images/responsive-se-resizer.png)
-        skin/classic/aero/browser/devtools/responsive-vertical-resizer.png (../shared/devtools/images/responsive-vertical-resizer.png)
-        skin/classic/aero/browser/devtools/responsive-horizontal-resizer.png (../shared/devtools/images/responsive-horizontal-resizer.png)
-        skin/classic/aero/browser/devtools/responsive-background.png (../shared/devtools/images/responsive-background.png)
+        skin/classic/aero/browser/devtools/responsive-se-resizer.png          (../shared/devtools/images/responsivemode/responsive-se-resizer.png)
+        skin/classic/aero/browser/devtools/responsive-se-resizer@2x.png       (../shared/devtools/images/responsivemode/responsive-se-resizer@2x.png)
+        skin/classic/aero/browser/devtools/responsive-vertical-resizer.png    (../shared/devtools/images/responsivemode/responsive-vertical-resizer.png)
+        skin/classic/aero/browser/devtools/responsive-vertical-resizer@2x.png (../shared/devtools/images/responsivemode/responsive-vertical-resizer@2x.png)
+        skin/classic/aero/browser/devtools/responsive-horizontal-resizer.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer.png)
+        skin/classic/aero/browser/devtools/responsive-horizontal-resizer@2x.png  (../shared/devtools/images/responsivemode/responsive-horizontal-resizer@2x.png)
+        skin/classic/aero/browser/devtools/responsiveui-rotate.png          (../shared/devtools/images/responsivemode/responsiveui-rotate.png)
+        skin/classic/aero/browser/devtools/responsiveui-rotate@2x.png       (../shared/devtools/images/responsivemode/responsiveui-rotate@2x.png)
+        skin/classic/aero/browser/devtools/responsiveui-touch.png           (../shared/devtools/images/responsivemode/responsiveui-touch.png)
+        skin/classic/aero/browser/devtools/responsiveui-touch@2x.png        (../shared/devtools/images/responsivemode/responsiveui-touch@2x.png)
+        skin/classic/aero/browser/devtools/responsiveui-screenshot.png      (../shared/devtools/images/responsivemode/responsiveui-screenshot.png)
+        skin/classic/aero/browser/devtools/responsiveui-screenshot@2x.png   (../shared/devtools/images/responsivemode/responsiveui-screenshot@2x.png)
         skin/classic/aero/browser/devtools/toggle-tools.png          (../shared/devtools/images/toggle-tools.png)
         skin/classic/aero/browser/devtools/dock-bottom@2x.png        (../shared/devtools/images/dock-bottom@2x.png)
         skin/classic/aero/browser/devtools/dock-side@2x.png          (../shared/devtools/images/dock-side@2x.png)
         skin/classic/aero/browser/devtools/floating-scrollbars.css   (devtools/floating-scrollbars.css)
         skin/classic/aero/browser/devtools/floating-scrollbars-light.css (devtools/floating-scrollbars-light.css)
 *       skin/classic/aero/browser/devtools/inspector.css             (../shared/devtools/inspector.css)
         skin/classic/aero/browser/devtools/profiler-stopwatch.svg    (../shared/devtools/images/profiler-stopwatch.svg)
         skin/classic/aero/browser/devtools/profiler-stopwatch-checked.svg      (../shared/devtools/images/profiler-stopwatch-checked.svg)
@@ -736,19 +749,16 @@ browser.jar:
         skin/classic/aero/browser/devtools/vview-lock.png            (../shared/devtools/images/vview-lock.png)
         skin/classic/aero/browser/devtools/vview-lock@2x.png         (../shared/devtools/images/vview-lock@2x.png)
         skin/classic/aero/browser/devtools/vview-open-inspector.png  (../shared/devtools/images/vview-open-inspector.png)
         skin/classic/aero/browser/devtools/vview-open-inspector@2x.png (../shared/devtools/images/vview-open-inspector@2x.png)
         skin/classic/aero/browser/devtools/undock@2x.png             (../shared/devtools/images/undock@2x.png)
         skin/classic/aero/browser/devtools/font-inspector.css        (../shared/devtools/font-inspector.css)
         skin/classic/aero/browser/devtools/computedview.css          (../shared/devtools/computedview.css)
         skin/classic/aero/browser/devtools/arrow-e.png               (../shared/devtools/images/arrow-e.png)
-        skin/classic/aero/browser/devtools/responsiveui-rotate.png   (../shared/devtools/responsiveui-rotate.png)
-        skin/classic/aero/browser/devtools/responsiveui-touch.png    (../shared/devtools/responsiveui-touch.png)
-        skin/classic/aero/browser/devtools/responsiveui-screenshot.png (../shared/devtools/responsiveui-screenshot.png)
         skin/classic/aero/browser/devtools/projecteditor/projecteditor.css       (../shared/devtools/projecteditor/projecteditor.css)
         skin/classic/aero/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
         skin/classic/aero/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
         skin/classic/aero/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
         skin/classic/aero/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
         skin/classic/aero/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
         skin/classic/aero/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
         skin/classic/aero/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
--- a/browser/themes/windows/preferences/in-content/preferences.css
+++ b/browser/themes/windows/preferences/in-content/preferences.css
@@ -1,14 +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/. */
 
 %include ../../../shared/incontentprefs/preferences.css
 
+caption {
+  background-color: transparent;
+}
+
 menulist:not([editable="true"]) > .menulist-dropmarker {
   margin-top: 1px;
   margin-bottom: 1px;
 }
 
 checkbox {
   -moz-padding-start: 0;
 }
--- a/dom/bluetooth2/BluetoothAdapter.cpp
+++ b/dom/bluetooth2/BluetoothAdapter.cpp
@@ -98,17 +98,17 @@ public:
     nsIScriptContext* sc = mAdapterPtr->GetContextForEventHandlers(&rv);
     if (!sc) {
       BT_WARNING("Cannot create script context!");
       SetError(NS_LITERAL_STRING("BluetoothScriptContextError"));
       return false;
     }
 
     AutoPushJSContext cx(sc->GetNativeContext());
-    JSObject* JsDevices = nullptr;
+    JS::Rooted<JSObject*> JsDevices(cx);
     rv = nsTArrayToJSArray(cx, devices, &JsDevices);
     if (!JsDevices) {
       BT_WARNING("Cannot create JS array!");
       SetError(NS_LITERAL_STRING("BluetoothError"));
       return false;
     }
 
     aValue.setObject(*JsDevices);
@@ -255,34 +255,33 @@ BluetoothAdapter::SetPropertyByValue(con
     mUuids = value.get_ArrayOfnsString();
     nsresult rv;
     nsIScriptContext* sc = GetContextForEventHandlers(&rv);
     NS_ENSURE_SUCCESS_VOID(rv);
     NS_ENSURE_TRUE_VOID(sc);
 
     AutoPushJSContext cx(sc->GetNativeContext());
     JS::Rooted<JSObject*> uuids(cx);
-    if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, uuids.address()))) {
+    if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, &uuids))) {
       BT_WARNING("Cannot set JS UUIDs object!");
       return;
     }
     mJsUuids = uuids;
     Root();
   } else if (name.EqualsLiteral("Devices")) {
     mDeviceAddresses = value.get_ArrayOfnsString();
 
     nsresult rv;
     nsIScriptContext* sc = GetContextForEventHandlers(&rv);
     NS_ENSURE_SUCCESS_VOID(rv);
     NS_ENSURE_TRUE_VOID(sc);
 
     AutoPushJSContext cx(sc->GetNativeContext());
     JS::Rooted<JSObject*> deviceAddresses(cx);
-    if (NS_FAILED(nsTArrayToJSArray(cx, mDeviceAddresses,
-                                    deviceAddresses.address()))) {
+    if (NS_FAILED(nsTArrayToJSArray(cx, mDeviceAddresses, &deviceAddresses))) {
       BT_WARNING("Cannot set JS Devices object!");
       return;
     }
     mJsDeviceAddresses = deviceAddresses;
     Root();
   } else {
 #ifdef DEBUG
     nsCString warningMsg;
--- a/dom/bluetooth2/BluetoothDevice.cpp
+++ b/dom/bluetooth2/BluetoothDevice.cpp
@@ -132,33 +132,33 @@ BluetoothDevice::SetPropertyByValue(cons
     nsresult rv;
     nsIScriptContext* sc = GetContextForEventHandlers(&rv);
     NS_ENSURE_SUCCESS_VOID(rv);
     NS_ENSURE_TRUE_VOID(sc);
 
     AutoPushJSContext cx(sc->GetNativeContext());
 
     JS::Rooted<JSObject*> uuids(cx);
-    if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, uuids.address()))) {
+    if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, &uuids))) {
       BT_WARNING("Cannot set JS UUIDs object!");
       return;
     }
     mJsUuids = uuids;
     Root();
   } else if (name.EqualsLiteral("Services")) {
     mServices = value.get_ArrayOfnsString();
     nsresult rv;
     nsIScriptContext* sc = GetContextForEventHandlers(&rv);
     NS_ENSURE_SUCCESS_VOID(rv);
     NS_ENSURE_TRUE_VOID(sc);
 
     AutoPushJSContext cx(sc->GetNativeContext());
 
     JS::Rooted<JSObject*> services(cx);
-    if (NS_FAILED(nsTArrayToJSArray(cx, mServices, services.address()))) {
+    if (NS_FAILED(nsTArrayToJSArray(cx, mServices, &services))) {
       BT_WARNING("Cannot set JS Services object!");
       return;
     }
     mJsServices = services;
     Root();
   } else {
     nsCString warningMsg;
     warningMsg.AssignLiteral("Not handling device property: ");
--- a/dom/bluetooth2/BluetoothRilListener.cpp
+++ b/dom/bluetooth2/BluetoothRilListener.cpp
@@ -176,17 +176,16 @@ MobileConnectionListener::Listen(bool aS
  */
 NS_IMPL_ISUPPORTS(TelephonyListener, nsITelephonyListener)
 
 NS_IMETHODIMP
 TelephonyListener::CallStateChanged(uint32_t aServiceId,
                                     uint32_t aCallIndex,
                                     uint16_t aCallState,
                                     const nsAString& aNumber,
-                                    bool aIsActive,
                                     bool aIsOutgoing,
                                     bool aIsEmergency,
                                     bool aIsConference,
                                     bool aIsSwitchable,
                                     bool aIsMergeable)
 {
   BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
   NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
@@ -196,17 +195,16 @@ TelephonyListener::CallStateChanged(uint
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyListener::EnumerateCallState(uint32_t aServiceId,
                                       uint32_t aCallIndex,
                                       uint16_t aCallState,
                                       const nsAString_internal& aNumber,
-                                      bool aIsActive,
                                       bool aIsOutgoing,
                                       bool aIsEmergency,
                                       bool aIsConference,
                                       bool aIsSwitchable,
                                       bool aIsMergeable)
 {
   BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
   NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -411,29 +411,16 @@ abstract public class BrowserApp extends
         final ContentValues values = new ContentValues();
         values.put(ReadingListItems.URL, message.optString("url"));
         values.put(ReadingListItems.TITLE, message.optString("title"));
         values.put(ReadingListItems.LENGTH, message.optInt("length"));
         values.put(ReadingListItems.EXCERPT, message.optString("excerpt"));
         return values;
     }
 
-    void handleReaderRemoved(final String url) {
-        ThreadUtils.postToBackgroundThread(new Runnable() {
-            @Override
-            public void run() {
-                BrowserDB.removeReadingListItemWithURL(getContentResolver(), url);
-                showToast(R.string.page_removed, Toast.LENGTH_SHORT);
-
-                final int count = BrowserDB.getReadingListCount(getContentResolver());
-                GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Reader:ListCountUpdated", Integer.toString(count)));
-            }
-        });
-    }
-
     private void handleReaderFaviconRequest(final String url) {
         (new UiAsyncTask<Void, Void, String>(ThreadUtils.getBackgroundHandler()) {
             @Override
             public String doInBackground(Void... params) {
                 return Favicons.getFaviconURLForPageURL(url);
             }
 
             @Override
@@ -537,17 +524,16 @@ abstract public class BrowserApp extends
             "CharEncoding:Data",
             "CharEncoding:State",
             "Feedback:LastUrl",
             "Feedback:MaybeLater",
             "Feedback:OpenPlayStore",
             "Menu:Add",
             "Menu:Remove",
             "Reader:ListStatusRequest",
-            "Reader:Removed",
             "Reader:Share",
             "Settings:Show",
             "Telemetry:Gather",
             "Updater:Launch");
 
         Distribution.init(this);
         JavaAddonManager.getInstance().init(getApplicationContext());
         mSharedPreferencesHelper = new SharedPreferencesHelper(getApplicationContext());
@@ -895,17 +881,16 @@ abstract public class BrowserApp extends
             "CharEncoding:Data",
             "CharEncoding:State",
             "Feedback:LastUrl",
             "Feedback:MaybeLater",
             "Feedback:OpenPlayStore",
             "Menu:Add",
             "Menu:Remove",
             "Reader:ListStatusRequest",
-            "Reader:Removed",
             "Reader:Share",
             "Settings:Show",
             "Telemetry:Gather",
             "Updater:Launch");
 
         if (AppConstants.MOZ_ANDROID_BEAM && Build.VERSION.SDK_INT >= 14) {
             NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
             if (nfc != null) {
@@ -1226,20 +1211,16 @@ abstract public class BrowserApp extends
                 public void run() {
                     removeAddonMenuItem(id);
                 }
             });
 
         } else if ("Reader:ListStatusRequest".equals(event)) {
             handleReaderListStatusRequest(message.getString("url"));
 
-        } else if ("Reader:Removed".equals(event)) {
-            final String url = message.getString("url");
-            handleReaderRemoved(url);
-
         } else if ("Reader:Share".equals(event)) {
             final String title = message.getString("title");
             final String url = message.getString("url");
             GeckoAppShell.openUriExternal(url, "text/plain", "", "", Intent.ACTION_SEND, title);
 
         } else if ("Settings:Show".equals(event)) {
             final String resource =
                     message.optString(GeckoPreferences.INTENT_EXTRA_RESOURCES, null);
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -494,20 +494,16 @@ public abstract class GeckoApp
 
         return super.onKeyDown(keyCode, event);
     }
 
     @Override
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
 
-        if (mToast != null) {
-            mToast.onSaveInstanceState(outState);
-        }
-
         outState.putBoolean(SAVED_STATE_IN_BACKGROUND, isApplicationInBackground());
         outState.putString(SAVED_STATE_PRIVATE_SESSION, mPrivateBrowsingSession);
     }
 
     void handleClearHistory() {
         BrowserDB.clearHistory(getContentResolver());
     }
 
--- a/mobile/android/base/Telemetry.java
+++ b/mobile/android/base/Telemetry.java
@@ -149,18 +149,25 @@ public class Telemetry {
     private static String getSessionName(final Session session, final String sessionNameSuffix) {
         if (sessionNameSuffix != null) {
             return session.toString() + ":" + sessionNameSuffix;
         } else {
             return session.toString();
         }
     }
 
+    /**
+     * @param method A non-null method (if null is desired, consider using Method.NONE)
+     */
     private static void sendUIEvent(final String eventName, final Method method,
             final long timestamp, final String extras) {
+        if (method == null) {
+            throw new IllegalArgumentException("Expected non-null method - use Method.NONE?");
+        }
+
         Log.d(LOGTAG, "SendUIEvent: event = " + eventName + " method = " + method +
                 " timestamp = " + timestamp + " extras = " + extras);
         final GeckoEvent geckoEvent = GeckoEvent.createTelemetryUIEvent(
                 eventName, method.toString(), timestamp, extras);
         GeckoAppShell.sendEventToGecko(geckoEvent);
     }
 
     public static void sendUIEvent(final Event event, final Method method, final long timestamp,
--- a/mobile/android/base/preferences/GeckoPreferences.java
+++ b/mobile/android/base/preferences/GeckoPreferences.java
@@ -21,16 +21,17 @@ import org.mozilla.gecko.GeckoApplicatio
 import org.mozilla.gecko.GeckoEvent;
 import org.mozilla.gecko.GeckoProfile;
 import org.mozilla.gecko.GeckoSharedPrefs;
 import org.mozilla.gecko.LocaleManager;
 import org.mozilla.gecko.PrefsHelper;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
+import org.mozilla.gecko.TelemetryContract.Method;
 import org.mozilla.gecko.background.announcements.AnnouncementsConstants;
 import org.mozilla.gecko.background.common.GlobalConstants;
 import org.mozilla.gecko.background.healthreport.HealthReportConstants;
 import org.mozilla.gecko.db.BrowserContract.SuggestedSites;
 import org.mozilla.gecko.home.HomePanelPicker;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.ThreadUtils;
 import org.mozilla.gecko.widget.FloatingHintEditText;
@@ -849,19 +850,19 @@ OnSharedPreferenceChangeListener
 
                 if (TextUtils.isEmpty(newValue)) {
                     BrowserLocaleManager.getInstance().resetToSystemLocale(context);
                     Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_RESET);
                 } else {
                     if (null == localeManager.setSelectedLocale(context, newValue)) {
                         localeManager.updateConfiguration(context, Locale.getDefault());
                     }
-                    Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_UNSELECTED, null,
+                    Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_UNSELECTED, Method.NONE,
                                           currentLocale == null ? "unknown" : currentLocale);
-                    Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_SELECTED, null, newValue);
+                    Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_SELECTED, Method.NONE, newValue);
                 }
 
                 ThreadUtils.postToUiThread(new Runnable() {
                     @Override
                     public void run() {
                         onLocaleChanged(Locale.getDefault());
                     }
                 });
--- a/mobile/android/base/preferences/PanelsPreferenceCategory.java
+++ b/mobile/android/base/preferences/PanelsPreferenceCategory.java
@@ -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/. */
 
 package org.mozilla.gecko.preferences;
 
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
+import org.mozilla.gecko.TelemetryContract.Method;
 import org.mozilla.gecko.home.HomeConfig;
 import org.mozilla.gecko.home.HomeConfig.PanelConfig;
 import org.mozilla.gecko.home.HomeConfig.State;
 import org.mozilla.gecko.util.ThreadUtils;
 import org.mozilla.gecko.util.UiAsyncTask;
 
 import android.content.Context;
 import android.text.TextUtils;
@@ -157,17 +158,17 @@ public class PanelsPreferenceCategory ex
         final String defaultPanelId = mConfigEditor.getDefaultPanelId();
         if (defaultPanelId != null && defaultPanelId.equals(id)) {
             return;
         }
 
         mConfigEditor.setDefault(id);
         mConfigEditor.apply();
 
-        Telemetry.sendUIEvent(TelemetryContract.Event.PANEL_SET_DEFAULT, null, id);
+        Telemetry.sendUIEvent(TelemetryContract.Event.PANEL_SET_DEFAULT, Method.NONE, id);
     }
 
     @Override
     protected void onPrepareForRemoval() {
         if (mLoadTask != null) {
             mLoadTask.cancel(true);
         }
     }
--- a/mobile/android/base/widget/ButtonToast.java
+++ b/mobile/android/base/widget/ButtonToast.java
@@ -33,23 +33,22 @@ public class ButtonToast {
     private final static String LOGTAG = "GeckoButtonToast";
 
     private final static int TOAST_DURATION = 5000;
 
     private final View mView;
     private final TextView mMessageView;
     private final Button mButton;
     private final Handler mHideHandler = new Handler();
-
-    private final LinkedList<Toast> mQueue = new LinkedList<Toast>();
     private Toast mCurrentToast;
 
     public enum ReasonHidden {
         CLICKED,
         TIMEOUT,
+        REPLACED,
         STARTUP
     }
 
     // State objects
     private static class Toast {
         public final CharSequence buttonMessage;
         public Drawable buttonDrawable;
         public final CharSequence message;
@@ -99,20 +98,20 @@ public class ButtonToast {
 
     public void show(boolean immediate, CharSequence message,
                      CharSequence buttonMessage, Drawable buttonDrawable,
                      ToastListener listener) {
         show(new Toast(message, buttonMessage, buttonDrawable, listener), immediate);
     }
 
     private void show(Toast t, boolean immediate) {
-        // If we're already showing a toast, add this one to the queue to show later
-        if (mView.getVisibility() == View.VISIBLE) {
-            mQueue.offer(t);
-            return;
+        // If we're already showing a toast, replace it with the new one by hiding the old one and quickly showing the new one.
+        if (mCurrentToast != null) {
+            hide(true, ReasonHidden.REPLACED);
+            immediate = true;
         }
 
         mCurrentToast = t;
         mButton.setEnabled(true);
 
         // Our toast is re-used, so we update all fields to clear any old values.
         mMessageView.setText(null != t.message ? t.message : "");
         mButton.setText(null != t.buttonMessage ? t.buttonMessage : "");
@@ -125,64 +124,43 @@ public class ButtonToast {
         int duration = immediate ? 0 : mView.getResources().getInteger(android.R.integer.config_longAnimTime);
 
         PropertyAnimator animator = new PropertyAnimator(duration);
         animator.attach(mView, PropertyAnimator.Property.ALPHA, 1.0f);
         animator.start();
     }
 
     public void hide(boolean immediate, ReasonHidden reason) {
-        if (mButton.isPressed() && reason != ReasonHidden.CLICKED) {
-            mHideHandler.postDelayed(mHideRunnable, TOAST_DURATION);
-            return;
-        }
-
         if (mCurrentToast != null && mCurrentToast.listener != null) {
             mCurrentToast.listener.onToastHidden(reason);
         }
         mCurrentToast = null;
         mButton.setEnabled(false);
         mHideHandler.removeCallbacks(mHideRunnable);
         int duration = immediate ? 0 : mView.getResources().getInteger(android.R.integer.config_longAnimTime);
 
         mView.clearAnimation();
         if (immediate) {
             mView.setVisibility(View.GONE);
-            showNextInQueue();
         } else {
             // Using Android's animation frameworks will not correctly turn off clicking.
             // See bug 885717.
             PropertyAnimator animator = new PropertyAnimator(duration);
             animator.attach(mView, PropertyAnimator.Property.ALPHA, 0.0f);
             animator.addPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener () {
                 // If we are showing a toast and go in the background
                 // onAnimationEnd will be called when the app is restored
                 public void onPropertyAnimationEnd() {
                     mView.setVisibility(View.GONE);
-                    showNextInQueue();
                 }
                 public void onPropertyAnimationStart() { }
             });
             animator.start();
         }
     }
 
-    public void onSaveInstanceState(Bundle outState) {
-        // Add whatever toast we're currently showing to the front of the queue
-        if (mCurrentToast != null) {
-            mQueue.add(0, mCurrentToast);
-        }
-    }
-
-    private void showNextInQueue() {
-        Toast t = mQueue.poll();
-        if (t != null) {
-            show(t, false);
-        }
-    }
-
     private Runnable mHideRunnable = new Runnable() {
         @Override
         public void run() {
             hide(false, ReasonHidden.TIMEOUT);
         }
     };
 }
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -7518,23 +7518,16 @@ let Reader = {
         }.bind(this));
         break;
       }
 
       case "Reader:Remove": {
         let url = aData;
         this.removeArticleFromCache(url, function(success) {
           this.log("Reader:Remove success=" + success + ", url=" + url);
-
-          if (success) {
-            sendMessageToJava({
-              type: "Reader:Removed",
-              url: url
-            });
-          }
         }.bind(this));
         break;
       }
 
       case "nsPref:changed": {
         if (aData.startsWith("reader.parse-on-load.")) {
           this.isEnabledForParseOnLoad = this.getStateForParseOnLoad();
         }
--- a/toolkit/content/widgets/radio.xml
+++ b/toolkit/content/widgets/radio.xml
@@ -371,32 +371,36 @@
            takes you to the next widget in the tab order -->
       <handler event="keypress" key=" " phase="target">
          this.selectedItem = this.focusedItem;
          this.selectedItem.doCommand();
       </handler>
       <handler event="keypress" keycode="VK_UP" phase="target">
         this.checkAdjacentElement(false);
         event.stopPropagation();
+        event.preventDefault();
       </handler>
       <handler event="keypress" keycode="VK_LEFT" phase="target">
         // left arrow goes back when we are ltr, forward when we are rtl
         this.checkAdjacentElement(document.defaultView.getComputedStyle(
                                     this, "").direction == "rtl");
         event.stopPropagation();
+        event.preventDefault();
       </handler>
       <handler event="keypress" keycode="VK_DOWN" phase="target">
         this.checkAdjacentElement(true);
         event.stopPropagation();
+        event.preventDefault();
       </handler>
       <handler event="keypress" keycode="VK_RIGHT" phase="target">
         // right arrow goes forward when we are ltr, back when we are rtl
         this.checkAdjacentElement(document.defaultView.getComputedStyle(
                                     this, "").direction == "ltr");
         event.stopPropagation();
+        event.preventDefault();
       </handler>
 
       <!-- set a focused attribute on the selected item when the group
            receives focus so that we can style it as if it were focused even though
            it is not (Windows platform behaviour is for the group to receive focus,
            not the item -->
       <handler event="focus" phase="target">
         <![CDATA[
--- a/toolkit/devtools/server/actors/layout.js
+++ b/toolkit/devtools/server/actors/layout.js
@@ -25,16 +25,17 @@
  */
 
 const {Ci, Cu} = require("chrome");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 const protocol = require("devtools/server/protocol");
 const {method, Arg, RetVal, types} = protocol;
 const events = require("sdk/event/core");
 const Heritage = require("sdk/core/heritage");
+const {setTimeout, clearTimeout} = require("sdk/timers");
 const EventEmitter = require("devtools/toolkit/event-emitter");
 
 exports.register = function(handle) {
   handle.addGlobalActor(ReflowActor, "reflowActor");
   handle.addTabActor(ReflowActor, "reflowActor");
 };
 
 exports.unregister = function(handle) {
@@ -143,17 +144,16 @@ exports.ReflowFront = protocol.FrontClas
 
 /**
  * Base class for all sorts of observers we need to create for a given window.
  * @param {TabActor} tabActor
  * @param {Function} callback Executed everytime the observer observes something
  */
 function Observable(tabActor, callback) {
   this.tabActor = tabActor;
-  this.win = tabActor.window;
   this.callback = callback;
 }
 
 Observable.prototype = {
   /**
    * Is the observer currently observing
    */
   observing: false,
@@ -194,17 +194,16 @@ Observable.prototype = {
   },
 
   /**
    * Stop observing and detroy this observer instance
    */
   destroy: function() {
     this.stop();
     this.callback = null;
-    this.win = null;
     this.tabActor = null;
   }
 };
 
 /**
  * The LayoutChangesObserver class is instantiated only once per given tab
  * and is used to track reflows and dom and style changes in that tab.
  * The LayoutActor uses this class to send reflow events to its clients.
@@ -232,16 +231,18 @@ function LayoutChangesObserver(tabActor)
   // For now, just the reflow observer, but later we can add markupMutation,
   // styleSheetChanges and styleRuleChanges
   this._onReflow = this._onReflow.bind(this);
   this.reflowObserver = new ReflowObserver(this.tabActor, this._onReflow);
 
   EventEmitter.decorate(this);
 }
 
+exports.LayoutChangesObserver = LayoutChangesObserver;
+
 LayoutChangesObserver.prototype = Heritage.extend(Observable.prototype, {
   /**
    * How long does this observer waits before emitting a batched reflows event.
    * The lower the value, the more event packets will be sent to clients,
    * potentially impacting performance.
    * The higher the value, the more time we'll wait, this is better for
    * performance but has an effect on how soon changes are shown in the toolbox.
    */
@@ -276,22 +277,30 @@ LayoutChangesObserver.prototype = Herita
    * Calls itself in a loop.
    */
   _startEventLoop: function() {
     // Send any reflows we have
     if (this.reflows && this.reflows.length) {
       this.emit("reflows", this.reflows);
       this.reflows = [];
     }
-    this.eventLoopTimer = this.win.setTimeout(this._startEventLoop,
+    this.eventLoopTimer = this._setTimeout(this._startEventLoop,
       this.EVENT_BATCHING_DELAY);
   },
 
   _stopEventLoop: function() {
-    this.win.clearTimeout(this.eventLoopTimer);
+    this._clearTimeout(this.eventLoopTimer);
+  },
+
+  // Exposing set/clearTimeout here to let tests override them if needed
+  _setTimeout: function(cb, ms) {
+    return setTimeout(cb, ms);
+  },
+  _clearTimeout: function(t) {
+    return clearTimeout(t);
   },
 
   /**
    * Executed whenever a reflow is observed. Only stacks the reflow in the
    * reflows array.
    * The EVENT_BATCHING_DELAY loop will take care of it later.
    * @param {Number} start When the reflow started
    * @param {Number} end When the reflow ended
@@ -357,38 +366,83 @@ exports.releaseLayoutChangesObserver = r
  * Instantiate and start a reflow observer on a given window's document element.
  * Will report any reflow that occurs in this window's docshell.
  * @extends Observable
  * @param {TabActor} tabActor
  * @param {Function} callback Executed everytime a reflow occurs
  */
 function ReflowObserver(tabActor, callback) {
   Observable.call(this, tabActor, callback);
-  this.docshell = this.win.QueryInterface(Ci.nsIInterfaceRequestor)
-                     .getInterface(Ci.nsIWebNavigation)
-                     .QueryInterface(Ci.nsIDocShell);
+
+  this._onWindowReady = this._onWindowReady.bind(this);
+  events.on(this.tabActor, "window-ready", this._onWindowReady);
+  this._onWindowDestroyed = this._onWindowDestroyed.bind(this);
+  events.on(this.tabActor, "window-destroyed", this._onWindowDestroyed);
 }
 
 ReflowObserver.prototype = Heritage.extend(Observable.prototype, {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
     Ci.nsISupportsWeakReference]),
 
+  _onWindowReady: function({window}) {
+    if (this.observing) {
+      this._startListeners([window]);
+    }
+  },
+
+  _onWindowDestroyed: function({window}) {
+    if (this.observing) {
+      this._stopListeners([window]);
+    }
+  },
+
   _start: function() {
-    this.docshell.addWeakReflowObserver(this);
+    this._startListeners(this.tabActor.windows);
   },
 
   _stop: function() {
-    this.docshell.removeWeakReflowObserver(this);
+    if (this.tabActor.attached && this.tabActor.docShell) {
+      // It's only worth stopping if the tabActor is still attached
+      this._stopListeners(this.tabActor.windows);
+    }
+  },
+
+  _startListeners: function(windows) {
+    for (let window of windows) {
+      let docshell = window.QueryInterface(Ci.nsIInterfaceRequestor)
+                     .getInterface(Ci.nsIWebNavigation)
+                     .QueryInterface(Ci.nsIDocShell);
+      docshell.addWeakReflowObserver(this);
+    }
+  },
+
+  _stopListeners: function(windows) {
+    for (let window of windows) {
+      // Corner cases where a global has already been freed may happen, in which
+      // case, no need to remove the observer
+      try {
+        let docshell = window.QueryInterface(Ci.nsIInterfaceRequestor)
+                       .getInterface(Ci.nsIWebNavigation)
+                       .QueryInterface(Ci.nsIDocShell);
+        docshell.removeWeakReflowObserver(this);
+      } catch (e) {}
+    }
   },
 
   reflow: function(start, end) {
     this.notifyCallback(start, end, false);
   },
 
   reflowInterruptible: function(start, end) {
     this.notifyCallback(start, end, true);
   },
 
   destroy: function() {
+    if (this._isDestroyed) {
+      return;
+    }
+    this._isDestroyed = true;
+
+    events.off(this.tabActor, "window-ready", this._onWindowReady);
+    events.off(this.tabActor, "window-destroyed", this._onWindowDestroyed);
     Observable.prototype.destroy.call(this);
-    this.docshell = null;
   }
 });
--- a/toolkit/devtools/server/actors/root.js
+++ b/toolkit/devtools/server/actors/root.js
@@ -137,27 +137,61 @@ RootActor.prototype = {
   get isRootActor() true,
 
   /**
    * The (chrome) window, for use by child actors
    */
   get window() Services.wm.getMostRecentWindow(DebuggerServer.chromeWindowType),
 
   /**
+   * The list of all windows
+   */
+  get windows() {
+    return this.docShells.map(docShell => {
+      return docShell.QueryInterface(Ci.nsIInterfaceRequestor)
+                     .getInterface(Ci.nsIDOMWindow);
+    });
+  },
+
+  /**
    * URL of the chrome window.
    */
   get url() { return this.window ? this.window.document.location.href : null; },
 
   /**
+   * The top level window's docshell
+   */
+  get docShell() {
+    return this.window
+      .QueryInterface(Ci.nsIInterfaceRequestor)
+      .getInterface(Ci.nsIDocShell);
+  },
+
+  /**
+   * The list of all docshells
+   */
+  get docShells() {
+    let docShellsEnum = this.docShell.getDocShellEnumerator(
+      Ci.nsIDocShellTreeItem.typeAll,
+      Ci.nsIDocShell.ENUMERATE_FORWARDS
+    );
+
+    let docShells = [];
+    while (docShellsEnum.hasMoreElements()) {
+      docShells.push(docShellsEnum.getNext());
+    }
+
+    return docShells;
+  },
+
+  /**
    * Getter for the best nsIWebProgress for to watching this window.
    */
   get webProgress() {
-    return this.window
-      .QueryInterface(Ci.nsIInterfaceRequestor)
-      .getInterface(Ci.nsIDocShell)
+    return this.docShell
       .QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIWebProgress);
   },
 
   /**
    * Disconnects the actor from the browser window.
    */
   disconnect: function() {
--- a/toolkit/devtools/server/actors/webbrowser.js
+++ b/toolkit/devtools/server/actors/webbrowser.js
@@ -8,17 +8,17 @@
 
 let { Ci, Cu } = require("chrome");
 let Services = require("Services");
 let { ActorPool, createExtraActors, appendExtraActors } = require("devtools/server/actors/common");
 let { RootActor } = require("devtools/server/actors/root");
 let { AddonThreadActor, ThreadActor } = require("devtools/server/actors/script");
 let { DebuggerServer } = require("devtools/server/main");
 let DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
-let { dbg_assert, dumpn } = DevToolsUtils;
+let { dbg_assert } = DevToolsUtils;
 
 let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm");
 
 // Assumptions on events module:
 // events needs to be dispatched synchronously,
@@ -563,25 +563,54 @@ TabActor.prototype = {
   /**
    * Getter for the tab's doc shell.
    */
   get docShell() {
     throw "The docShell getter should be implemented by a subclass of TabActor";
   },
 
   /**
+   * Getter for the list of all docshell in this tabActor
+   * @return {Array}
+   */
+  get docShells() {
+    let docShellsEnum = this.docShell.getDocShellEnumerator(
+      Ci.nsIDocShellTreeItem.typeAll,
+      Ci.nsIDocShell.ENUMERATE_FORWARDS
+    );
+
+    let docShells = [];
+    while (docShellsEnum.hasMoreElements()) {
+      docShells.push(docShellsEnum.getNext());
+    }
+
+    return docShells;
+  },
+
+  /**
    * Getter for the tab content's DOM window.
    */
   get window() {
     return this.docShell
       .QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIDOMWindow);
   },
 
   /**
+   * Getter for the list of all content DOM windows in this tabActor
+   * @return {Array}
+   */
+  get windows() {
+    return this.docShells.map(docShell => {
+      return docShell.QueryInterface(Ci.nsIInterfaceRequestor)
+                     .getInterface(Ci.nsIDOMWindow);
+    });
+  },
+
+  /**
    * Getter for the nsIWebProgress for watching this window.
    */
   get webProgress() {
     return this.docShell
       .QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIWebProgress);
   },
 
@@ -735,28 +764,29 @@ TabActor.prototype = {
     this._contextPool = null;
     this.threadActor.exit();
     this.threadActor = null;
   },
 
   /**
    * Does the actual work of detaching from a tab.
    *
-   * @returns false if the tab wasn't attached or true of detahing succeeds.
+   * @returns false if the tab wasn't attached or true of detaching succeeds.
    */
   _detach: function BTA_detach() {
     if (!this.attached) {
       return false;
     }
 
     // Check for docShell availability, as it can be already gone
     // during Firefox shutdown.
     if (this.docShell) {
       this._progressListener.unwatch(this.docShell);
     }
+    this._progressListener.destroy();
     this._progressListener = null;
 
     this._popContext();
 
     // Shut down actors that belong to this tab's pool.
     this.conn.removeActorPool(this._tabPool);
     this._tabPool = null;
     if (this._tabActorPool) {
@@ -940,17 +970,16 @@ TabActor.prototype = {
 
   /**
    * Handle location changes, by clearing the previous debuggees and enabling
    * debugging, which may have been disabled temporarily by the
    * DebuggerProgressListener.
    */
   _windowReady: function (window) {
     let isTopLevel = window == this.window;
-    dumpn("window-ready: " + window.location + " isTopLevel:" + isTopLevel);
 
     events.emit(this, "window-ready", {
       window: window,
       isTopLevel: isTopLevel
     });
 
     // TODO bug 997119: move that code to ThreadActor by listening to window-ready
     let threadActor = this.threadActor;
@@ -965,16 +994,23 @@ TabActor.prototype = {
 
     // Refresh the debuggee list when a new window object appears (top window or
     // iframe).
     if (threadActor.attached) {
       threadActor.findGlobals();
     }
   },
 
+  _windowDestroyed: function (window) {
+    events.emit(this, "window-destroyed", {
+      window: window,
+      isTopLevel: window == this.window
+    });
+  },
+
   /**
    * Start notifying server codebase and client about a new document
    * being loaded in the currently targeted context.
    */
   _willNavigate: function (window, newURI, request) {
     let isTopLevel = window == this.window;
 
     // will-navigate event needs to be dispatched synchronously,
@@ -984,17 +1020,16 @@ TabActor.prototype = {
     // but before the first request starts.
     events.emit(this, "will-navigate", {
       window: window,
       isTopLevel: isTopLevel,
       newURI: newURI,
       request: request
     });
 
-
     // We don't do anything for inner frames in TabActor.
     // (we will only update thread actor on window-ready)
     if (!isTopLevel) {
       return;
     }
 
     // Proceed normally only if the debuggee is not paused.
     // TODO bug 997119: move that code to ThreadActor by listening to will-navigate
@@ -1385,79 +1420,158 @@ BrowserAddonActor.prototype.requestTypes
  * is resumed before the navigation begins.
  *
  * @param TabActor aTabActor
  *        The tab actor associated with this listener.
  */
 function DebuggerProgressListener(aTabActor) {
   this._tabActor = aTabActor;
   this._onWindowCreated = this.onWindowCreated.bind(this);
+  this._onWindowHidden = this.onWindowHidden.bind(this);
+
+  // Watch for windows destroyed (global observer that will need filtering)
+  Services.obs.addObserver(this, "inner-window-destroyed", false);
+
+  // XXX: for now we maintain the list of windows we know about in this instance
+  // so that we can discriminate windows we care about when observing
+  // inner-window-destroyed events. Bug 1016952 would remove the need for this.
+  this._knownWindowIDs = new Map();
 }
 
 DebuggerProgressListener.prototype = {
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIWebProgressListener,
     Ci.nsISupportsWeakReference,
     Ci.nsISupports,
   ]),
 
-  watch: function DPL_watch(docShell) {
+  destroy: function() {
+    Services.obs.removeObserver(this, "inner-window-destroyed", false);
+    this._knownWindowIDs.clear();
+    this._knownWindowIDs = null;
+  },
+
+  watch: function(docShell) {
     let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIWebProgress);
     webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATUS |
                                           Ci.nsIWebProgress.NOTIFY_STATE_WINDOW |
                                           Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
 
     // TODO: fix docShell.chromeEventHandler in child processes!
-    let chromeEventHandler = docShell.chromeEventHandler ||
-                             docShell.QueryInterface(Ci.nsIInterfaceRequestor)
-                                     .getInterface(Ci.nsIContentFrameMessageManager);
+    let handler = docShell.chromeEventHandler ||
+                  docShell.QueryInterface(Ci.nsIInterfaceRequestor)
+                    .getInterface(Ci.nsIContentFrameMessageManager);
 
-    // Watch for globals being created in this docshell tree.
-    chromeEventHandler.addEventListener("DOMWindowCreated",
-                                        this._onWindowCreated, true);
-    chromeEventHandler.addEventListener("pageshow",
-                                        this._onWindowCreated, true);
+    handler.addEventListener("DOMWindowCreated", this._onWindowCreated, true);
+    handler.addEventListener("pageshow", this._onWindowCreated, true);
+    handler.addEventListener("pagehide", this._onWindowHidden, true);
+
+    // Dispatch the _windowReady event on the tabActor for pre-existing windows
+    for (let win of this._getWindowsInDocShell(docShell)) {
+      this._tabActor._windowReady(win);
+      this._knownWindowIDs.set(this._getWindowID(win), win);
+    }
   },
 
-  unwatch: function DPL_unwatch(docShell) {
+  unwatch: function(docShell) {
     let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIWebProgress);
     webProgress.removeProgressListener(this);
 
     // TODO: fix docShell.chromeEventHandler in child processes!
-    let chromeEventHandler = docShell.chromeEventHandler ||
-                             docShell.QueryInterface(Ci.nsIInterfaceRequestor)
-                                     .getInterface(Ci.nsIContentFrameMessageManager);
-    chromeEventHandler.removeEventListener("DOMWindowCreated",
-                                           this._onWindowCreated, true);
-    chromeEventHandler.removeEventListener("pageshow",
-                                           this._onWindowCreated, true);
+    let handler = docShell.chromeEventHandler ||
+                  docShell.QueryInterface(Ci.nsIInterfaceRequestor)
+                    .getInterface(Ci.nsIContentFrameMessageManager);
+
+    handler.removeEventListener("DOMWindowCreated", this._onWindowCreated, true);
+    handler.removeEventListener("pageshow", this._onWindowCreated, true);
+    handler.removeEventListener("pagehide", this._onWindowHidden, true);
+
+    for (let win of this._getWindowsInDocShell(docShell)) {
+      this._knownWindowIDs.delete(this._getWindowID(win));
+    }
   },
 
-  onWindowCreated:
-  DevToolsUtils.makeInfallible(function DPL_onWindowCreated(evt) {
-    // Ignore any event if the tab actor isn't attached.
+  _getWindowsInDocShell: function(docShell) {
+    let docShellsEnum = docShell.getDocShellEnumerator(
+      Ci.nsIDocShellTreeItem.typeAll,
+      Ci.nsIDocShell.ENUMERATE_FORWARDS
+    );
+
+    let windows = [];
+    while (docShellsEnum.hasMoreElements()) {
+      let w = docShellsEnum.getNext().QueryInterface(Ci.nsIInterfaceRequestor)
+                                     .getInterface(Ci.nsIDOMWindow);
+      windows.push(w);
+    }
+    return windows;
+  },
+
+  _getWindowID: function(window) {
+    return window.QueryInterface(Ci.nsIInterfaceRequestor)
+                 .getInterface(Ci.nsIDOMWindowUtils)
+                 .currentInnerWindowID;
+  },
+
+  onWindowCreated: DevToolsUtils.makeInfallible(function(evt) {
     if (!this._tabActor.attached) {
       return;
     }
 
     // pageshow events for non-persisted pages have already been handled by a
-    // prior DOMWindowCreated event.
+    // prior DOMWindowCreated event. For persisted pages, act as if the window
+    // had just been created since it's been unfrozen from bfcache.
     if (evt.type == "pageshow" && !evt.persisted) {
       return;
     }
 
     let window = evt.target.defaultView;
     this._tabActor._windowReady(window);
+
+    if (evt.type !== "pageshow") {
+      this._knownWindowIDs.set(this._getWindowID(window), window);
+    }
   }, "DebuggerProgressListener.prototype.onWindowCreated"),
 
+  onWindowHidden: DevToolsUtils.makeInfallible(function(evt) {
+    if (!this._tabActor.attached) {
+      return;
+    }
+
+    // Only act as if the window has been destroyed if the 'pagehide' event
+    // was sent for a persisted window (persisted is set when the page is put
+    // and frozen in the bfcache). If the page isn't persisted, the observer's
+    // inner-window-destroyed event will handle it.
+    if (!evt.persisted) {
+      return;
+    }
+
+    let window = evt.target.defaultView;
+    this._tabActor._windowDestroyed(window);
+  }, "DebuggerProgressListener.prototype.onWindowHidden"),
+
+  observe: DevToolsUtils.makeInfallible(function(subject, topic) {
+    if (!this._tabActor.attached) {
+      return;
+    }
+
+    // Because this observer will be called for all inner-window-destroyed in
+    // the application, we need to filter out events for windows we are not
+    // watching
+    let innerID = subject.QueryInterface(Ci.nsISupportsPRUint64).data;
+    let window = this._knownWindowIDs.get(innerID);
+    if (window) {
+      this._knownWindowIDs.delete(innerID);
+      this._tabActor._windowDestroyed(window);
+    }
+  }, "DebuggerProgressListener.prototype.observe"),
+
   onStateChange:
-  DevToolsUtils.makeInfallible(function DPL_onStateChange(aProgress, aRequest, aFlag, aStatus) {
-    // Ignore any event if the tab actor isn't attached.
+  DevToolsUtils.makeInfallible(function(aProgress, aRequest, aFlag, aStatus) {
     if (!this._tabActor.attached) {
       return;
     }
 
     let isStart = aFlag & Ci.nsIWebProgressListener.STATE_START;
     let isStop = aFlag & Ci.nsIWebProgressListener.STATE_STOP;
     let isDocument = aFlag & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT;
     let isWindow = aFlag & Ci.nsIWebProgressListener.STATE_IS_WINDOW;
--- a/toolkit/devtools/server/tests/unit/test_layout-reflows-observer.js
+++ b/toolkit/devtools/server/tests/unit/test_layout-reflows-observer.js
@@ -1,33 +1,44 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test the LayoutChangesObserver
 
 let {
   getLayoutChangesObserver,
-  releaseLayoutChangesObserver
+  releaseLayoutChangesObserver,
+  LayoutChangesObserver
 } = devtools.require("devtools/server/actors/layout");
 
+// Override set/clearTimeout on LayoutChangesObserver to avoid depending on
+// time in this unit test. This means that LayoutChangesObserver.eventLoopTimer
+// will be the timeout callback instead of the timeout itself, so test cases
+// will need to execute it to fake a timeout
+LayoutChangesObserver.prototype._setTimeout = cb => cb;
+LayoutChangesObserver.prototype._clearTimeout = function() {};
+
 // Mock the tabActor since we only really want to test the LayoutChangesObserver
 // and don't want to depend on a window object, nor want to test protocol.js
 function MockTabActor() {
   this.window = new MockWindow();
+  this.windows = [this.window];
 }
 
 function MockWindow() {}
 MockWindow.prototype = {
   QueryInterface: function() {
     let self = this;
     return {
       getInterface: function() {
         return {
           QueryInterface: function() {
-            self.docShell = new MockDocShell();
+            if (!self.docShell) {
+              self.docShell = new MockDocShell();
+            }
             return self.docShell;
           }
         };
       }
     };
   },
   setTimeout: function(cb) {
     // Simply return the cb itself so that we can execute it in the test instead
@@ -86,17 +97,16 @@ function instancesOfObserversAreSharedBe
 
 function eventsAreBatched() {
   do_print("Checking that reflow events are batched and only sent when the " +
     "timeout expires");
 
   // Note that in this test, we mock the TabActor and its window property, so we
   // also mock the setTimeout/clearTimeout mechanism and just call the callback
   // manually
-
   let tabActor = new MockTabActor();
   let observer = getLayoutChangesObserver(tabActor);
 
   let reflowsEvents = [];
   let onReflows = (event, reflows) => reflowsEvents.push(reflows);
   observer.on("reflows", onReflows);
 
   do_print("Fake one reflow event");
--- a/toolkit/mozapps/plugins/content/pluginProblemContent.css
+++ b/toolkit/mozapps/plugins/content/pluginProblemContent.css
@@ -48,17 +48,16 @@ html|applet:not([height]), html|applet[h
   /* used to block inherited properties */
   text-transform: none;
   text-indent: 0;
   cursor: initial;
   white-space: initial;
   word-spacing: initial;
   letter-spacing: initial;
   line-height: initial;
-  position: relative;
 }
 
 /* Initialize the overlay with visibility:hidden to prevent flickering if
 * the plugin is too small to show the overlay */
 .mainBox > .hoverBox,
 .mainBox > .closeIcon {
   visibility: hidden;
 }
--- a/toolkit/themes/shared/plugins/pluginProblem.css
+++ b/toolkit/themes/shared/plugins/pluginProblem.css
@@ -11,17 +11,16 @@
   font-size: 12px;
   text-align: center;
   display: table;
   width: 100%;
   height: 100%;
   background-color: rgb(72,72,72);
   color: white;
   -moz-user-select: none;
-  position: relative;
 }
 
 .hoverBox {
   display: table-cell;
   box-sizing: border-box;
   padding: 5px;
   vertical-align: middle;
   width: 100%;
@@ -163,32 +162,27 @@ html|a {
 }
 
 .mainBox[chromedir="rtl"] .helpIcon {
   float: right;
 }
 
 .closeIcon {
   display: block;
-  position: absolute;
   width: 16px;
   height: 16px;
-  top: 4px;
-  right: 4px;
+  margin-top: 4px;
+  -moz-margin-start: -20px;
+  -moz-margin-end: 4px;
   border: none;
   background-color: transparent;
   background-image: url("chrome://mozapps/skin/plugins/contentPluginClose.png");
   background-repeat: no-repeat;
 }
 
-.mainBox[chromedir="rtl"] .closeIcon {
-  right: auto;
-  left: 4px;
-}
-
 .closeIcon:hover {
   background-position: -16px 0;
 }
 
 .closeIcon:hover:active {
   background-position: -32px 0;
 }