Backed out 4 changesets (bug 1297758) for browser_dbg_variables-view-popup-13.js failures
authorPhil Ringnalda <philringnalda@gmail.com>
Tue, 27 Sep 2016 18:21:57 -0700
changeset 315386 ea0886a6ed22cf814e0e9886230fd41448fb2711
parent 315385 1df9cc4f98bad5368c779ba383fce5a48f596583
child 315387 aed585286446d6d39996d8c878a6ccabdef0d4f5
push id30748
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 13:53:19 +0000
treeherdermozilla-central@8c84b7618840 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1297758
milestone52.0a1
backs out95ca02cec38d17f853320e86c916598f57047ce9
80bc957e105281545ca872e67fa9f47015fec7f2
fee0da9566185a4b6ea19bcb2c67f6fd3dcaf195
1ac36ff4b601e5d2188456bb7c6f0d979d291c14
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
Backed out 4 changesets (bug 1297758) for browser_dbg_variables-view-popup-13.js failures CLOSED TREE Backed out changeset 95ca02cec38d (bug 1297758) Backed out changeset 80bc957e1052 (bug 1297758) Backed out changeset fee0da956618 (bug 1297758) Backed out changeset 1ac36ff4b601 (bug 1297758)
devtools/client/animationinspector/animation-controller.js
devtools/client/definitions.js
devtools/client/inspector/components/box-model.js
devtools/client/inspector/inspector-panel.js
devtools/client/inspector/inspector.js
devtools/client/inspector/inspector.xhtml
devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
devtools/client/inspector/moz.build
devtools/client/inspector/panel.js
devtools/client/inspector/rules/rules.js
devtools/client/inspector/rules/views/rule-editor.js
devtools/client/inspector/test/browser_inspector_highlighter-03.js
devtools/client/inspector/test/browser_inspector_highlighter-04.js
devtools/client/inspector/test/browser_inspector_highlighter-hover_02.js
devtools/client/inspector/test/browser_inspector_highlighter-keybinding_03.js
devtools/client/inspector/test/browser_inspector_highlighter-options.js
devtools/client/inspector/test/browser_inspector_highlighter-xbl.js
devtools/client/inspector/test/browser_inspector_invalidate.js
devtools/client/inspector/test/browser_inspector_pseudoclass-lock.js
devtools/client/jar.mn
devtools/client/shared/widgets/Tooltip.js
--- a/devtools/client/animationinspector/animation-controller.js
+++ b/devtools/client/animationinspector/animation-controller.js
@@ -137,17 +137,17 @@ var AnimationsController = {
       return;
     }
     this.initialized = promise.defer();
 
     this.onPanelVisibilityChange = this.onPanelVisibilityChange.bind(this);
     this.onNewNodeFront = this.onNewNodeFront.bind(this);
     this.onAnimationMutations = this.onAnimationMutations.bind(this);
 
-    let target = gInspector.target;
+    let target = gToolbox.target;
     this.animationsFront = new AnimationsFront(target.client, target.form);
 
     // Expose actor capabilities.
     this.traits = yield getServerTraits(target);
 
     if (this.destroyed) {
       console.warn("Could not fully initialize the AnimationsController");
       return;
--- a/devtools/client/definitions.js
+++ b/devtools/client/definitions.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 const Services = require("Services");
 const osString = Services.appinfo.OS;
 
 // Panels
 loader.lazyGetter(this, "OptionsPanel", () => require("devtools/client/framework/toolbox-options").OptionsPanel);
-loader.lazyGetter(this, "InspectorPanel", () => require("devtools/client/inspector/panel").InspectorPanel);
+loader.lazyGetter(this, "InspectorPanel", () => require("devtools/client/inspector/inspector-panel").InspectorPanel);
 loader.lazyGetter(this, "WebConsolePanel", () => require("devtools/client/webconsole/panel").WebConsolePanel);
 loader.lazyGetter(this, "DebuggerPanel", () => require("devtools/client/debugger/panel").DebuggerPanel);
 loader.lazyGetter(this, "StyleEditorPanel", () => require("devtools/client/styleeditor/styleeditor-panel").StyleEditorPanel);
 loader.lazyGetter(this, "ShaderEditorPanel", () => require("devtools/client/shadereditor/panel").ShaderEditorPanel);
 loader.lazyGetter(this, "CanvasDebuggerPanel", () => require("devtools/client/canvasdebugger/panel").CanvasDebuggerPanel);
 loader.lazyGetter(this, "WebAudioEditorPanel", () => require("devtools/client/webaudioeditor/panel").WebAudioEditorPanel);
 loader.lazyGetter(this, "MemoryPanel", () => require("devtools/client/memory/panel").MemoryPanel);
 loader.lazyGetter(this, "PerformancePanel", () => require("devtools/client/performance/panel").PerformancePanel);
--- a/devtools/client/inspector/components/box-model.js
+++ b/devtools/client/inspector/components/box-model.js
@@ -336,20 +336,20 @@ BoxModelView.prototype = {
     }
   },
 
   /**
    * Start listening to reflows in the current tab.
    */
   trackReflows: function () {
     if (!this.reflowFront) {
-      let { target } = this.inspector;
-      if (target.form.reflowActor) {
-        this.reflowFront = ReflowFront(target.client,
-                                       target.form);
+      let toolbox = this.inspector.toolbox;
+      if (toolbox.target.form.reflowActor) {
+        this.reflowFront = ReflowFront(toolbox.target.client,
+                                       toolbox.target.form);
       } else {
         return;
       }
     }
 
     this.reflowFront.on("reflows", this.update);
     this.reflowFront.start();
   },
@@ -463,17 +463,17 @@ BoxModelView.prototype = {
     if (this.inspector.markup) {
       this.inspector.markup.off("leave", this.onMarkupViewLeave);
       this.inspector.markup.off("node-hover", this.onMarkupViewNodeHover);
     }
 
     this.inspector.sidebar.off("computedview-selected", this.onNewNode);
     this.inspector.selection.off("new-node-front", this.onNewSelection);
     this.inspector.sidebar.off("select", this.onSidebarSelect);
-    this.inspector.target.off("will-navigate", this.onWillNavigate);
+    this.inspector._target.off("will-navigate", this.onWillNavigate);
     this.inspector.off("computed-view-filtered", this.onFilterComputedView);
 
     this.inspector = null;
     this.doc = null;
     this.wrapper = null;
     this.container = null;
     this.expander = null;
     this.sizeLabel = null;
@@ -787,17 +787,17 @@ BoxModelView.prototype = {
         // Hide completely the geometry editor if the picker is clicked
         toolbox.on("picker-started", this.onPickerStarted);
 
         // Temporary hide the geometry editor
         this.inspector.markup.on("leave", this.onMarkupViewLeave);
         this.inspector.markup.on("node-hover", this.onMarkupViewNodeHover);
 
         // Release the actor on will-navigate event
-        this.inspector.target.once("will-navigate", this.onWillNavigate);
+        this.inspector._target.once("will-navigate", this.onWillNavigate);
       });
   },
 
   /**
    * Hide the geometry editor highlighter on the currently selected element
    * @param {Boolean} [updateButton=true]
    *   Indicates if the Geometry Editor's button needs to be unchecked too
    */
rename from devtools/client/inspector/inspector.js
rename to devtools/client/inspector/inspector-panel.js
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector-panel.js
@@ -1,20 +1,16 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* global window */
-
 "use strict";
 
-var Cu = Components.utils;
-var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
 var Services = require("Services");
 var promise = require("promise");
 var defer = require("devtools/shared/defer");
 var EventEmitter = require("devtools/shared/event-emitter");
 const {executeSoon} = require("devtools/shared/DevToolsUtils");
 var {KeyShortcuts} = require("devtools/client/shared/key-shortcuts");
 var {Task} = require("devtools/shared/task");
 const {initCssProperties} = require("devtools/shared/fronts/css-properties");
@@ -80,21 +76,21 @@ const PORTRAIT_MODE_WIDTH = 700;
  * - computed-view-filtered
  *      Fired when the computed rules view is filtered
  * - rule-view-refreshed
  *      Fired when the rule view updates to a new node
  * - rule-view-sourcelinks-updated
  *      Fired when the stylesheet source links have been updated (when switching
  *      to source-mapped files)
  */
-function Inspector(toolbox) {
+function InspectorPanel(iframeWindow, toolbox) {
   this._toolbox = toolbox;
   this._target = toolbox.target;
-  this.panelDoc = window.document;
-  this.panelWin = window;
+  this.panelDoc = iframeWindow.document;
+  this.panelWin = iframeWindow;
   this.panelWin.inspector = this;
 
   this.telemetry = new Telemetry();
 
   this.nodeMenuTriggerInfo = null;
 
   this._handleRejectionIfNotDestroyed = this._handleRejectionIfNotDestroyed.bind(this);
   this._onBeforeNavigate = this._onBeforeNavigate.bind(this);
@@ -111,21 +107,23 @@ function Inspector(toolbox) {
   this.onSidebarHidden = this.onSidebarHidden.bind(this);
 
   this._target.on("will-navigate", this._onBeforeNavigate);
   this._detectingActorFeatures = this._detectActorFeatures();
 
   EventEmitter.decorate(this);
 }
 
-Inspector.prototype = {
+exports.InspectorPanel = InspectorPanel;
+
+InspectorPanel.prototype = {
   /**
    * open is effectively an asynchronous constructor
    */
-  init: Task.async(function* () {
+  open: Task.async(function* () {
     // Localize all the nodes containing a data-localization attribute.
     localizeMarkup(this.panelDoc);
 
     this._cssPropertiesLoaded = initCssProperties(this.toolbox);
     yield this._cssPropertiesLoaded;
     yield this.target.makeRemote();
     yield this._getPageStyle();
     let defaultSelection = yield this._getDefaultNodeForSelection();
@@ -143,20 +141,16 @@ Inspector.prototype = {
   get walker() {
     return this._toolbox.walker;
   },
 
   get selection() {
     return this._toolbox.selection;
   },
 
-  get highlighter() {
-    return this._toolbox.highlighter;
-  },
-
   get isOuterHTMLEditable() {
     return this._target.client.traits.editOuterHTML;
   },
 
   get hasUrlToImageDataResolver() {
     return this._target.client.traits.urlToImageDataResolver;
   },
 
@@ -276,17 +270,17 @@ Inspector.prototype = {
     this._defaultNode = null;
     this.selection.setNodeFront(null);
     this._destroyMarkup();
     this.isDirty = false;
     this._pendingSelection = null;
   },
 
   _getPageStyle: function () {
-    return this.inspector.getPageStyle().then(pageStyle => {
+    return this._toolbox.inspector.getPageStyle().then(pageStyle => {
       this.pageStyle = pageStyle;
     }, this._handleRejectionIfNotDestroyed);
   },
 
   /**
    * Return a promise that will resolve to the default node for selection.
    */
   _getDefaultNodeForSelection: function () {
@@ -603,17 +597,17 @@ Inspector.prototype = {
 
     // Setup the add-node button.
     this.addNode = this.addNode.bind(this);
     this.addNodeButton = this.panelDoc.getElementById("inspector-element-add-button");
     this.addNodeButton.addEventListener("click", this.addNode);
 
     // Setup the eye-dropper icon if we're in an HTML document and we have actor support.
     if (this.selection.nodeFront && this.selection.nodeFront.isInHTMLDocument) {
-      this.target.actorHasMethod("inspector", "pickColorFromPage").then(value => {
+      this.toolbox.target.actorHasMethod("inspector", "pickColorFromPage").then(value => {
         if (!value) {
           return;
         }
 
         this.onEyeDropperDone = this.onEyeDropperDone.bind(this);
         this.onEyeDropperButtonClicked = this.onEyeDropperButtonClicked.bind(this);
         this.eyeDropperButton = this.panelDoc
                                     .getElementById("inspector-eyedropper-toggle");
@@ -1817,95 +1811,8 @@ Inspector.prototype = {
   copyAttributeLink: function (link) {
     // When the inspector menu was setup on click (see _getNodeLinkMenuItems), we
     // already checked that resolveRelativeURL existed.
     this.inspector.resolveRelativeURL(link, this.selection.nodeFront).then(url => {
       clipboardHelper.copyString(url);
     }, console.error);
   }
 };
-
-// URL constructor doesn't support chrome: scheme
-let href = window.location.href.replace(/chrome:/, "http://");
-let url = new window.URL(href);
-
-// Only use this method to attach the toolbox if some query parameters are given
-if (url.search.length > 1) {
-  const { targetFromURL } = require("devtools/client/framework/target-from-url");
-  const { attachThread } = require("devtools/client/framework/attach-thread");
-  const { BrowserLoader } =
-    Cu.import("resource://devtools/client/shared/browser-loader.js", {});
-
-  const { Selection } = require("devtools/client/framework/selection");
-  const { InspectorFront } = require("devtools/shared/fronts/inspector");
-  const { getHighlighterUtils } = require("devtools/client/framework/toolbox-highlighter-utils");
-
-  Task.spawn(function* () {
-    let target = yield targetFromURL(url);
-
-    let notImplemented = function () {
-      throw new Error("Not implemented when the inspector is in a tab");
-    };
-    let fakeToolbox = {
-      target,
-      hostType: "bottom",
-      doc: window.document,
-      win: window,
-      on() {}, emit() {}, off() {},
-      initInspector() {},
-      browserRequire: BrowserLoader({
-        window: window,
-        useOnlyShared: true
-      }).require,
-      get React() {
-        return this.browserRequire("devtools/client/shared/vendor/react");
-      },
-      get ReactDOM() {
-        return this.browserRequire("devtools/client/shared/vendor/react-dom");
-      },
-      isToolRegistered() {
-        return false;
-      },
-      currentToolId: "inspector",
-      getCurrentPanel() {
-        return "inspector";
-      },
-      get textboxContextMenuPopup() {
-        notImplemented();
-      },
-      getPanel: notImplemented,
-      openSplitConsole: notImplemented,
-      viewCssSourceInStyleEditor: notImplemented,
-      viewJsSourceInDebugger: notImplemented,
-      viewSource: notImplemented,
-      viewSourceInDebugger: notImplemented,
-      viewSourceInStyleEditor: notImplemented,
-
-      // For attachThread:
-      highlightTool() {},
-      unhighlightTool() {},
-      selectTool() {},
-      raise() {},
-      getNotificationBox() {}
-    };
-
-    // attachThread also expect a toolbox as argument
-    fakeToolbox.threadClient = yield attachThread(fakeToolbox);
-
-    let inspector = InspectorFront(target.client, target.form);
-    let showAllAnonymousContent =
-      Services.prefs.getBoolPref("devtools.inspector.showAllAnonymousContent");
-    let walker = yield inspector.getWalker({ showAllAnonymousContent });
-    let selection = new Selection(walker);
-    let highlighter = yield inspector.getHighlighter(false);
-
-    fakeToolbox.inspector = inspector;
-    fakeToolbox.walker = walker;
-    fakeToolbox.selection = selection;
-    fakeToolbox.highlighter = highlighter;
-    fakeToolbox.highlighterUtils = getHighlighterUtils(fakeToolbox);
-
-    let inspectorUI = new Inspector(fakeToolbox);
-    inspectorUI.init();
-  }).then(null, e => {
-    window.alert("Unable to start the inspector:" + e.message + "\n" + e.stack);
-  });
-}
--- a/devtools/client/inspector/inspector.xhtml
+++ b/devtools/client/inspector/inspector.xhtml
@@ -20,17 +20,16 @@
 
 <!DOCTYPE html>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <script type="application/javascript;version=1.8"
           src="chrome://devtools/content/shared/theme-switching.js"></script>
-  <script type="application/javascript;version=1.8" src="inspector.js" defer="true"></script>
 </head>
 <body class="theme-body" role="application">
   <div class="inspector-responsive-container theme-body inspector">
 
     <!-- Main Panel Content -->
     <div id="inspector-main-content" class="devtools-main-content">
       <div id="inspector-toolbar" class="devtools-toolbar" nowindowdrag="true"
                 data-localization-bundle="devtools/locale/inspector.properties">
--- a/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
+++ b/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
@@ -10,17 +10,17 @@ const URL_1 = SCHEMA + "<div id='one' st
 const URL_2 = SCHEMA + "<div id='two' style='color:green;'>TWO</div>";
 
 add_task(function* () {
   let {inspector, testActor} = yield openInspectorForURL(URL_1);
 
   assertMarkupViewIsLoaded();
   yield selectNode("#one", inspector);
 
-  let willNavigate = inspector.target.once("will-navigate");
+  let willNavigate = inspector.toolbox.target.once("will-navigate");
   yield testActor.eval(`content.location = "${URL_2}"`);
 
   info("Waiting for will-navigate");
   yield willNavigate;
 
   info("Navigation to page 2 has started, the inspector should be empty");
   assertMarkupViewIsEmpty();
 
--- a/devtools/client/inspector/moz.build
+++ b/devtools/client/inspector/moz.build
@@ -9,15 +9,15 @@ DIRS += [
     'markup',
     'rules',
     'shared'
 ]
 
 DevToolsModules(
     'breadcrumbs.js',
     'inspector-commands.js',
+    'inspector-panel.js',
     'inspector-search.js',
     'inspector.xhtml',
-    'panel.js',
     'toolsidebar.js',
 )
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
deleted file mode 100644
--- a/devtools/client/inspector/panel.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-function InspectorPanel(iframeWindow, toolbox) {
-  this._inspector = new iframeWindow.Inspector(toolbox);
-}
-InspectorPanel.prototype = {
-  open() {
-    return this._inspector.init();
-  },
-
-  destroy() {
-    return this._inspector.destroy();
-  }
-};
-exports.InspectorPanel = InspectorPanel;
--- a/devtools/client/inspector/rules/rules.js
+++ b/devtools/client/inspector/rules/rules.js
@@ -465,17 +465,17 @@ CssRuleView.prototype = {
   },
 
   /**
    * Add a new rule to the current element.
    */
   _onAddRule: function () {
     let elementStyle = this._elementStyle;
     let element = elementStyle.element;
-    let client = this.inspector.target.client;
+    let client = this.inspector.toolbox.target.client;
     let pseudoClasses = element.pseudoClassLocks;
 
     if (!client.traits.addNewRule) {
       return;
     }
 
     if (!this.pageStyle.supportsAuthoredStyles) {
       // We're talking to an old server.
--- a/devtools/client/inspector/rules/views/rule-editor.js
+++ b/devtools/client/inspector/rules/views/rule-editor.js
@@ -82,17 +82,17 @@ RuleEditor.prototype = {
   destroy: function () {
     this.rule.domRule.off("location-changed");
     this.toolbox.off("tool-registered", this.updateSourceLink);
     this.toolbox.off("tool-unregistered", this.updateSourceLink);
   },
 
   get isSelectorEditable() {
     let trait = this.isEditable &&
-      this.ruleView.inspector.target.client.traits.selectorEditable &&
+      this.toolbox.target.client.traits.selectorEditable &&
       this.rule.domRule.type !== ELEMENT_STYLE &&
       this.rule.domRule.type !== CSSRule.KEYFRAME_RULE;
 
     // Do not allow editing anonymousselectors until we can
     // detect mutations on  pseudo elements in Bug 1034110.
     return trait && !this.rule.elementStyle.element.isAnonymous;
   },
 
--- a/devtools/client/inspector/test/browser_inspector_highlighter-03.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-03.js
@@ -29,17 +29,17 @@ const DOCUMENT_SRC = "<style>" +
 
 const TEST_URI = "data:text/html;charset=utf-8," + DOCUMENT_SRC;
 
 add_task(function* () {
   let { inspector, toolbox, testActor } = yield openInspectorForURL(TEST_URI);
 
   info("Waiting for box mode to show.");
   let body = yield getNodeFront("body", inspector);
-  yield inspector.highlighter.showBoxModel(body);
+  yield toolbox.highlighter.showBoxModel(body);
 
   info("Waiting for element picker to become active.");
   yield startPicker(toolbox);
 
   info("Moving mouse over iframe padding.");
   yield moveMouseOver("iframe", 1, 1);
 
   info("Performing checks");
--- a/devtools/client/inspector/test/browser_inspector_highlighter-04.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-04.js
@@ -22,22 +22,22 @@ const ELEMENTS = ["box-model-root",
                   "box-model-infobar-container",
                   "box-model-infobar-tagname",
                   "box-model-infobar-id",
                   "box-model-infobar-classes",
                   "box-model-infobar-pseudo-classes",
                   "box-model-infobar-dimensions"];
 
 add_task(function* () {
-  let {inspector, testActor} = yield openInspectorForURL(TEST_URL);
+  let {inspector, toolbox, testActor} = yield openInspectorForURL(TEST_URL);
 
   info("Show the box-model highlighter");
   let divFront = yield getNodeFront("div", inspector);
-  yield inspector.highlighter.showBoxModel(divFront);
+  yield toolbox.highlighter.showBoxModel(divFront);
 
   for (let id of ELEMENTS) {
     let foundId = yield testActor.getHighlighterNodeAttribute(id, "id");
     is(foundId, id, "Element " + id + " found");
   }
 
   info("Hide the box-model highlighter");
-  yield inspector.highlighter.hideBoxModel();
+  yield toolbox.highlighter.hideBoxModel();
 });
--- a/devtools/client/inspector/test/browser_inspector_highlighter-hover_02.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-hover_02.js
@@ -6,30 +6,30 @@
 
 // Test that when after an element is selected and highlighted on hover, if the
 // mouse leaves the markup-view and comes back again on the same element, that
 // the highlighter is shown again on the node
 
 const TEST_URL = "data:text/html;charset=utf-8,<p>Select me!</p>";
 
 add_task(function* () {
-  let {inspector, testActor} = yield openInspectorForURL(TEST_URL);
+  let {toolbox, inspector, testActor} = yield openInspectorForURL(TEST_URL);
 
   info("hover over the <p> line in the markup-view so that it's the " +
        "currently hovered node");
   yield hoverContainer("p", inspector);
 
   info("select the <p> markup-container line by clicking");
   yield clickContainer("p", inspector);
   let isVisible = yield testActor.isHighlighting();
   ok(isVisible, "the highlighter is shown");
 
   info("listen to the highlighter's hidden event");
   let onHidden = testActor.waitForHighlighterEvent("hidden",
-    inspector.highlighter);
+    toolbox.highlighter);
   info("mouse-leave the markup-view");
   yield mouseLeaveMarkupView(inspector);
   yield onHidden;
   isVisible = yield testActor.isHighlighting();
   ok(!isVisible, "the highlighter is hidden after mouseleave");
 
   info("hover over the <p> line again, which is still selected");
   yield hoverContainer("p", inspector);
--- a/devtools/client/inspector/test/browser_inspector_highlighter-keybinding_03.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-keybinding_03.js
@@ -41,17 +41,17 @@ add_task(function* () {
   yield doKeyStop(shortcutOpts);
   is(inspector.selection.nodeFront.id, "another",
      "The #another DIV is still selected. Passed.");
 
   function doKeyPick(args) {
     info("Key pressed. Waiting for element to be picked");
     testActor.synthesizeKey(args);
     return promise.all([
-      inspector.selection.once("new-node-front"),
+      toolbox.selection.once("new-node-front"),
       inspector.once("inspector-updated")
     ]);
   }
 
   function doKeyStop(args) {
     info("Key pressed. Waiting for picker to be canceled");
     testActor.synthesizeKey(args);
     return inspector.toolbox.once("picker-stopped");
--- a/devtools/client/inspector/test/browser_inspector_highlighter-options.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-options.js
@@ -180,25 +180,25 @@ const TEST_DATA = [
           is(faded, "true", "Region " + region + " is faded");
         }
       }
     }
   }
 ];
 
 add_task(function* () {
-  let {inspector, testActor} = yield openInspectorForURL(
+  let {inspector, toolbox, testActor} = yield openInspectorForURL(
     "data:text/html;charset=utf-8," + encodeURI(TEST_URL));
 
   let divFront = yield getNodeFront("div", inspector);
 
   for (let {desc, options, checkHighlighter} of TEST_DATA) {
     info("Running test: " + desc);
 
     info("Show the box-model highlighter with options " + options);
-    yield inspector.highlighter.showBoxModel(divFront, options);
+    yield toolbox.highlighter.showBoxModel(divFront, options);
 
     yield checkHighlighter(testActor);
 
     info("Hide the box-model highlighter");
-    yield inspector.highlighter.hideBoxModel();
+    yield toolbox.highlighter.hideBoxModel();
   }
 });
--- a/devtools/client/inspector/test/browser_inspector_highlighter-xbl.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-xbl.js
@@ -17,17 +17,17 @@ add_task(function* () {
   yield doKeyPick({key: "VK_RETURN", options: {}});
   is(inspector.selection.nodeFront.className, "scale-slider",
      "The .scale-slider inside the scale was selected");
 
   function doKeyPick(msg) {
     info("Key pressed. Waiting for element to be picked");
     testActor.synthesizeKey(msg);
     return promise.all([
-      inspector.selection.once("new-node-front"),
+      toolbox.selection.once("new-node-front"),
       inspector.once("inspector-updated")
     ]);
   }
 
   function moveMouseOver(selector) {
     info("Waiting for element " + selector + " to be highlighted");
     testActor.synthesizeMouse({
       options: {type: "mousemove"},
--- a/devtools/client/inspector/test/browser_inspector_invalidate.js
+++ b/devtools/client/inspector/test/browser_inspector_invalidate.js
@@ -10,26 +10,26 @@ const TEST_URI = "data:text/html;charset
   "browser_inspector_invalidate.js\n" +
   "<div style=\"width: 100px; height: 100px; background:yellow;\"></div>";
 
 add_task(function* () {
   let {inspector, testActor} = yield openInspectorForURL(TEST_URI);
   let divFront = yield getNodeFront("div", inspector);
 
   info("Waiting for highlighter to activate");
-  yield inspector.highlighter.showBoxModel(divFront);
+  yield inspector.toolbox.highlighter.showBoxModel(divFront);
 
   let rect = yield testActor.getSimpleBorderRect();
   is(rect.width, 100, "The highlighter has the right width.");
 
   info("Changing the test element's size and waiting for the highlighter " +
        "to update");
   yield testActor.changeHighlightedNodeWaitForUpdate(
     "style",
     "width: 200px; height: 100px; background:yellow;"
   );
 
   rect = yield testActor.getSimpleBorderRect();
   is(rect.width, 200, "The highlighter has the right width after update");
 
   info("Waiting for highlighter to hide");
-  yield inspector.highlighter.hideBoxModel();
+  yield inspector.toolbox.highlighter.hideBoxModel();
 });
--- a/devtools/client/inspector/test/browser_inspector_pseudoclass-lock.js
+++ b/devtools/client/inspector/test/browser_inspector_pseudoclass-lock.js
@@ -84,18 +84,19 @@ function* testNavigate(inspector, testAc
   ok(!(yield testActor.hasPseudoClassLock("#div-1", PSEUDO)),
      "pseudo-class lock is removed after inspecting sibling node");
 
   yield selectNode("#div-1", inspector);
   yield togglePseudoClass(inspector);
 }
 
 function* showPickerOn(selector, inspector) {
+  let highlighter = inspector.toolbox.highlighter;
   let nodeFront = yield getNodeFront(selector, inspector);
-  yield inspector.highlighter.showBoxModel(nodeFront);
+  yield highlighter.showBoxModel(nodeFront);
 }
 
 function* assertPseudoAddedToNode(inspector, testActor, ruleview) {
   info("Make sure the pseudoclass lock is applied to #div-1 and its ancestors");
 
   let hasLock = yield testActor.hasPseudoClassLock("#div-1", PSEUDO);
   ok(hasLock, "pseudo-class lock has been applied");
   hasLock = yield testActor.hasPseudoClassLock("#parent-div", PSEUDO);
@@ -113,17 +114,17 @@ function* assertPseudoAddedToNode(inspec
 
   info("Show the highlighter on #div-1");
   yield showPickerOn("#div-1", inspector);
 
   info("Check that the infobar selector contains the pseudo-class");
   let value = yield testActor.getHighlighterNodeTextContent(
     "box-model-infobar-pseudo-classes");
   is(value, PSEUDO, "pseudo-class in infobar selector");
-  yield inspector.highlighter.hideBoxModel();
+  yield inspector.toolbox.highlighter.hideBoxModel();
 }
 
 function* assertPseudoRemovedFromNode(testActor) {
   info("Make sure the pseudoclass lock is removed from #div-1 and its " +
        "ancestors");
 
   let hasLock = yield testActor.hasPseudoClassLock("#div-1", PSEUDO);
   ok(!hasLock, "pseudo-class lock has been removed");
@@ -139,10 +140,10 @@ function* assertPseudoRemovedFromView(in
     ".ruleview-rule.theme-separator");
   is(rules.length, 2, "rule view is showing 2 rules after removing lock");
 
   yield showPickerOn("#div-1", inspector);
 
   let value = yield testActor.getHighlighterNodeTextContent(
     "box-model-infobar-pseudo-classes");
   is(value, "", "pseudo-class removed from infobar selector");
-  yield inspector.highlighter.hideBoxModel();
+  yield inspector.toolbox.highlighter.hideBoxModel();
 }
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -20,17 +20,16 @@ devtools.jar:
     content/webconsole/webconsole.xul (webconsole/webconsole.xul)
 *   content/scratchpad/scratchpad.xul (scratchpad/scratchpad.xul)
     content/scratchpad/scratchpad.js (scratchpad/scratchpad.js)
     content/shared/splitview.css (shared/splitview.css)
     content/shared/theme-switching.js (shared/theme-switching.js)
     content/shared/frame-script-utils.js (shared/frame-script-utils.js)
     content/styleeditor/styleeditor.xul (styleeditor/styleeditor.xul)
     content/storage/storage.xul (storage/storage.xul)
-    content/inspector/inspector.js (inspector/inspector.js)
     content/inspector/fonts/fonts.js (inspector/fonts/fonts.js)
     content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
     content/animationinspector/animation-controller.js (animationinspector/animation-controller.js)
     content/animationinspector/animation-panel.js (animationinspector/animation-panel.js)
     content/animationinspector/animation-inspector.xhtml (animationinspector/animation-inspector.xhtml)
     content/sourceeditor/codemirror/addon/dialog/dialog.css (sourceeditor/codemirror/addon/dialog/dialog.css)
     content/sourceeditor/codemirror/addon/hint/show-hint.js (sourceeditor/codemirror/addon/hint/show-hint.js)
     content/sourceeditor/codemirror/addon/tern/tern.js (sourceeditor/codemirror/addon/tern/tern.js)
--- a/devtools/client/shared/widgets/Tooltip.js
+++ b/devtools/client/shared/widgets/Tooltip.js
@@ -736,17 +736,17 @@ Heritage.extend(SwatchBasedEditorTooltip
       this._originalColor = this.currentSwatchColor.textContent;
       let color = this.activeSwatch.style.backgroundColor;
       this.spectrum.off("changed", this._onSpectrumColorChange);
       this.spectrum.rgb = this._colorToRgba(color);
       this.spectrum.on("changed", this._onSpectrumColorChange);
       this.spectrum.updateUI();
     }
 
-    let {target} = this.inspector;
+    let {target} = this.inspector.toolbox;
     target.actorHasMethod("inspector", "pickColorFromPage").then(value => {
       let tooltipDoc = this.tooltip.doc;
       let eyeButton = tooltipDoc.querySelector("#eyedropper-button");
       if (value && this.inspector.selection.nodeFront.isInHTMLDocument) {
         eyeButton.addEventListener("click", this._openEyeDropper);
       } else {
         eyeButton.style.display = "none";
       }