mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
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) --HG-- rename : devtools/client/inspector/inspector.js => devtools/client/inspector/inspector-panel.js
This commit is contained in:
parent
6f3a9050ba
commit
e3f2f0fb27
@ -142,7 +142,7 @@ var AnimationsController = {
|
|||||||
this.onNewNodeFront = this.onNewNodeFront.bind(this);
|
this.onNewNodeFront = this.onNewNodeFront.bind(this);
|
||||||
this.onAnimationMutations = this.onAnimationMutations.bind(this);
|
this.onAnimationMutations = this.onAnimationMutations.bind(this);
|
||||||
|
|
||||||
let target = gInspector.target;
|
let target = gToolbox.target;
|
||||||
this.animationsFront = new AnimationsFront(target.client, target.form);
|
this.animationsFront = new AnimationsFront(target.client, target.form);
|
||||||
|
|
||||||
// Expose actor capabilities.
|
// Expose actor capabilities.
|
||||||
|
@ -9,7 +9,7 @@ const osString = Services.appinfo.OS;
|
|||||||
|
|
||||||
// Panels
|
// Panels
|
||||||
loader.lazyGetter(this, "OptionsPanel", () => require("devtools/client/framework/toolbox-options").OptionsPanel);
|
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, "WebConsolePanel", () => require("devtools/client/webconsole/panel").WebConsolePanel);
|
||||||
loader.lazyGetter(this, "DebuggerPanel", () => require("devtools/client/debugger/panel").DebuggerPanel);
|
loader.lazyGetter(this, "DebuggerPanel", () => require("devtools/client/debugger/panel").DebuggerPanel);
|
||||||
loader.lazyGetter(this, "StyleEditorPanel", () => require("devtools/client/styleeditor/styleeditor-panel").StyleEditorPanel);
|
loader.lazyGetter(this, "StyleEditorPanel", () => require("devtools/client/styleeditor/styleeditor-panel").StyleEditorPanel);
|
||||||
|
@ -341,10 +341,10 @@ BoxModelView.prototype = {
|
|||||||
*/
|
*/
|
||||||
trackReflows: function () {
|
trackReflows: function () {
|
||||||
if (!this.reflowFront) {
|
if (!this.reflowFront) {
|
||||||
let { target } = this.inspector;
|
let toolbox = this.inspector.toolbox;
|
||||||
if (target.form.reflowActor) {
|
if (toolbox.target.form.reflowActor) {
|
||||||
this.reflowFront = ReflowFront(target.client,
|
this.reflowFront = ReflowFront(toolbox.target.client,
|
||||||
target.form);
|
toolbox.target.form);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@ BoxModelView.prototype = {
|
|||||||
this.inspector.sidebar.off("computedview-selected", this.onNewNode);
|
this.inspector.sidebar.off("computedview-selected", this.onNewNode);
|
||||||
this.inspector.selection.off("new-node-front", this.onNewSelection);
|
this.inspector.selection.off("new-node-front", this.onNewSelection);
|
||||||
this.inspector.sidebar.off("select", this.onSidebarSelect);
|
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.off("computed-view-filtered", this.onFilterComputedView);
|
||||||
|
|
||||||
this.inspector = null;
|
this.inspector = null;
|
||||||
@ -792,7 +792,7 @@ BoxModelView.prototype = {
|
|||||||
this.inspector.markup.on("node-hover", this.onMarkupViewNodeHover);
|
this.inspector.markup.on("node-hover", this.onMarkupViewNodeHover);
|
||||||
|
|
||||||
// Release the actor on will-navigate event
|
// Release the actor on will-navigate event
|
||||||
this.inspector.target.once("will-navigate", this.onWillNavigate);
|
this.inspector._target.once("will-navigate", this.onWillNavigate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -4,12 +4,8 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
/* global window */
|
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var Cu = Components.utils;
|
|
||||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
|
||||||
var Services = require("Services");
|
var Services = require("Services");
|
||||||
var promise = require("promise");
|
var promise = require("promise");
|
||||||
var defer = require("devtools/shared/defer");
|
var defer = require("devtools/shared/defer");
|
||||||
@ -85,11 +81,11 @@ const PORTRAIT_MODE_WIDTH = 700;
|
|||||||
* Fired when the stylesheet source links have been updated (when switching
|
* Fired when the stylesheet source links have been updated (when switching
|
||||||
* to source-mapped files)
|
* to source-mapped files)
|
||||||
*/
|
*/
|
||||||
function Inspector(toolbox) {
|
function InspectorPanel(iframeWindow, toolbox) {
|
||||||
this._toolbox = toolbox;
|
this._toolbox = toolbox;
|
||||||
this._target = toolbox.target;
|
this._target = toolbox.target;
|
||||||
this.panelDoc = window.document;
|
this.panelDoc = iframeWindow.document;
|
||||||
this.panelWin = window;
|
this.panelWin = iframeWindow;
|
||||||
this.panelWin.inspector = this;
|
this.panelWin.inspector = this;
|
||||||
|
|
||||||
this.telemetry = new Telemetry();
|
this.telemetry = new Telemetry();
|
||||||
@ -116,11 +112,13 @@ function Inspector(toolbox) {
|
|||||||
EventEmitter.decorate(this);
|
EventEmitter.decorate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Inspector.prototype = {
|
exports.InspectorPanel = InspectorPanel;
|
||||||
|
|
||||||
|
InspectorPanel.prototype = {
|
||||||
/**
|
/**
|
||||||
* open is effectively an asynchronous constructor
|
* open is effectively an asynchronous constructor
|
||||||
*/
|
*/
|
||||||
init: Task.async(function* () {
|
open: Task.async(function* () {
|
||||||
// Localize all the nodes containing a data-localization attribute.
|
// Localize all the nodes containing a data-localization attribute.
|
||||||
localizeMarkup(this.panelDoc);
|
localizeMarkup(this.panelDoc);
|
||||||
|
|
||||||
@ -148,10 +146,6 @@ Inspector.prototype = {
|
|||||||
return this._toolbox.selection;
|
return this._toolbox.selection;
|
||||||
},
|
},
|
||||||
|
|
||||||
get highlighter() {
|
|
||||||
return this._toolbox.highlighter;
|
|
||||||
},
|
|
||||||
|
|
||||||
get isOuterHTMLEditable() {
|
get isOuterHTMLEditable() {
|
||||||
return this._target.client.traits.editOuterHTML;
|
return this._target.client.traits.editOuterHTML;
|
||||||
},
|
},
|
||||||
@ -281,7 +275,7 @@ Inspector.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_getPageStyle: function () {
|
_getPageStyle: function () {
|
||||||
return this.inspector.getPageStyle().then(pageStyle => {
|
return this._toolbox.inspector.getPageStyle().then(pageStyle => {
|
||||||
this.pageStyle = pageStyle;
|
this.pageStyle = pageStyle;
|
||||||
}, this._handleRejectionIfNotDestroyed);
|
}, this._handleRejectionIfNotDestroyed);
|
||||||
},
|
},
|
||||||
@ -608,7 +602,7 @@ Inspector.prototype = {
|
|||||||
|
|
||||||
// Setup the eye-dropper icon if we're in an HTML document and we have actor support.
|
// 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) {
|
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) {
|
if (!value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1822,90 +1816,3 @@ Inspector.prototype = {
|
|||||||
}, console.error);
|
}, 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);
|
|
||||||
});
|
|
||||||
}
|
|
@ -25,7 +25,6 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
<script type="application/javascript;version=1.8"
|
<script type="application/javascript;version=1.8"
|
||||||
src="chrome://devtools/content/shared/theme-switching.js"></script>
|
src="chrome://devtools/content/shared/theme-switching.js"></script>
|
||||||
<script type="application/javascript;version=1.8" src="inspector.js" defer="true"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body class="theme-body" role="application">
|
<body class="theme-body" role="application">
|
||||||
<div class="inspector-responsive-container theme-body inspector">
|
<div class="inspector-responsive-container theme-body inspector">
|
||||||
|
@ -15,7 +15,7 @@ add_task(function* () {
|
|||||||
assertMarkupViewIsLoaded();
|
assertMarkupViewIsLoaded();
|
||||||
yield selectNode("#one", inspector);
|
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}"`);
|
yield testActor.eval(`content.location = "${URL_2}"`);
|
||||||
|
|
||||||
info("Waiting for will-navigate");
|
info("Waiting for will-navigate");
|
||||||
|
@ -14,9 +14,9 @@ DIRS += [
|
|||||||
DevToolsModules(
|
DevToolsModules(
|
||||||
'breadcrumbs.js',
|
'breadcrumbs.js',
|
||||||
'inspector-commands.js',
|
'inspector-commands.js',
|
||||||
|
'inspector-panel.js',
|
||||||
'inspector-search.js',
|
'inspector-search.js',
|
||||||
'inspector.xhtml',
|
'inspector.xhtml',
|
||||||
'panel.js',
|
|
||||||
'toolsidebar.js',
|
'toolsidebar.js',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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;
|
|
@ -470,7 +470,7 @@ CssRuleView.prototype = {
|
|||||||
_onAddRule: function () {
|
_onAddRule: function () {
|
||||||
let elementStyle = this._elementStyle;
|
let elementStyle = this._elementStyle;
|
||||||
let element = elementStyle.element;
|
let element = elementStyle.element;
|
||||||
let client = this.inspector.target.client;
|
let client = this.inspector.toolbox.target.client;
|
||||||
let pseudoClasses = element.pseudoClassLocks;
|
let pseudoClasses = element.pseudoClassLocks;
|
||||||
|
|
||||||
if (!client.traits.addNewRule) {
|
if (!client.traits.addNewRule) {
|
||||||
|
@ -87,7 +87,7 @@ RuleEditor.prototype = {
|
|||||||
|
|
||||||
get isSelectorEditable() {
|
get isSelectorEditable() {
|
||||||
let trait = this.isEditable &&
|
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 !== ELEMENT_STYLE &&
|
||||||
this.rule.domRule.type !== CSSRule.KEYFRAME_RULE;
|
this.rule.domRule.type !== CSSRule.KEYFRAME_RULE;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ add_task(function* () {
|
|||||||
|
|
||||||
info("Waiting for box mode to show.");
|
info("Waiting for box mode to show.");
|
||||||
let body = yield getNodeFront("body", inspector);
|
let body = yield getNodeFront("body", inspector);
|
||||||
yield inspector.highlighter.showBoxModel(body);
|
yield toolbox.highlighter.showBoxModel(body);
|
||||||
|
|
||||||
info("Waiting for element picker to become active.");
|
info("Waiting for element picker to become active.");
|
||||||
yield startPicker(toolbox);
|
yield startPicker(toolbox);
|
||||||
|
@ -27,11 +27,11 @@ const ELEMENTS = ["box-model-root",
|
|||||||
"box-model-infobar-dimensions"];
|
"box-model-infobar-dimensions"];
|
||||||
|
|
||||||
add_task(function* () {
|
add_task(function* () {
|
||||||
let {inspector, testActor} = yield openInspectorForURL(TEST_URL);
|
let {inspector, toolbox, testActor} = yield openInspectorForURL(TEST_URL);
|
||||||
|
|
||||||
info("Show the box-model highlighter");
|
info("Show the box-model highlighter");
|
||||||
let divFront = yield getNodeFront("div", inspector);
|
let divFront = yield getNodeFront("div", inspector);
|
||||||
yield inspector.highlighter.showBoxModel(divFront);
|
yield toolbox.highlighter.showBoxModel(divFront);
|
||||||
|
|
||||||
for (let id of ELEMENTS) {
|
for (let id of ELEMENTS) {
|
||||||
let foundId = yield testActor.getHighlighterNodeAttribute(id, "id");
|
let foundId = yield testActor.getHighlighterNodeAttribute(id, "id");
|
||||||
@ -39,5 +39,5 @@ add_task(function* () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
info("Hide the box-model highlighter");
|
info("Hide the box-model highlighter");
|
||||||
yield inspector.highlighter.hideBoxModel();
|
yield toolbox.highlighter.hideBoxModel();
|
||||||
});
|
});
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
const TEST_URL = "data:text/html;charset=utf-8,<p>Select me!</p>";
|
const TEST_URL = "data:text/html;charset=utf-8,<p>Select me!</p>";
|
||||||
|
|
||||||
add_task(function* () {
|
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 " +
|
info("hover over the <p> line in the markup-view so that it's the " +
|
||||||
"currently hovered node");
|
"currently hovered node");
|
||||||
@ -24,7 +24,7 @@ add_task(function* () {
|
|||||||
|
|
||||||
info("listen to the highlighter's hidden event");
|
info("listen to the highlighter's hidden event");
|
||||||
let onHidden = testActor.waitForHighlighterEvent("hidden",
|
let onHidden = testActor.waitForHighlighterEvent("hidden",
|
||||||
inspector.highlighter);
|
toolbox.highlighter);
|
||||||
info("mouse-leave the markup-view");
|
info("mouse-leave the markup-view");
|
||||||
yield mouseLeaveMarkupView(inspector);
|
yield mouseLeaveMarkupView(inspector);
|
||||||
yield onHidden;
|
yield onHidden;
|
||||||
|
@ -46,7 +46,7 @@ add_task(function* () {
|
|||||||
info("Key pressed. Waiting for element to be picked");
|
info("Key pressed. Waiting for element to be picked");
|
||||||
testActor.synthesizeKey(args);
|
testActor.synthesizeKey(args);
|
||||||
return promise.all([
|
return promise.all([
|
||||||
inspector.selection.once("new-node-front"),
|
toolbox.selection.once("new-node-front"),
|
||||||
inspector.once("inspector-updated")
|
inspector.once("inspector-updated")
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ const TEST_DATA = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
add_task(function* () {
|
add_task(function* () {
|
||||||
let {inspector, testActor} = yield openInspectorForURL(
|
let {inspector, toolbox, testActor} = yield openInspectorForURL(
|
||||||
"data:text/html;charset=utf-8," + encodeURI(TEST_URL));
|
"data:text/html;charset=utf-8," + encodeURI(TEST_URL));
|
||||||
|
|
||||||
let divFront = yield getNodeFront("div", inspector);
|
let divFront = yield getNodeFront("div", inspector);
|
||||||
@ -194,11 +194,11 @@ add_task(function* () {
|
|||||||
info("Running test: " + desc);
|
info("Running test: " + desc);
|
||||||
|
|
||||||
info("Show the box-model highlighter with options " + options);
|
info("Show the box-model highlighter with options " + options);
|
||||||
yield inspector.highlighter.showBoxModel(divFront, options);
|
yield toolbox.highlighter.showBoxModel(divFront, options);
|
||||||
|
|
||||||
yield checkHighlighter(testActor);
|
yield checkHighlighter(testActor);
|
||||||
|
|
||||||
info("Hide the box-model highlighter");
|
info("Hide the box-model highlighter");
|
||||||
yield inspector.highlighter.hideBoxModel();
|
yield toolbox.highlighter.hideBoxModel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,7 @@ add_task(function* () {
|
|||||||
info("Key pressed. Waiting for element to be picked");
|
info("Key pressed. Waiting for element to be picked");
|
||||||
testActor.synthesizeKey(msg);
|
testActor.synthesizeKey(msg);
|
||||||
return promise.all([
|
return promise.all([
|
||||||
inspector.selection.once("new-node-front"),
|
toolbox.selection.once("new-node-front"),
|
||||||
inspector.once("inspector-updated")
|
inspector.once("inspector-updated")
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ add_task(function* () {
|
|||||||
let divFront = yield getNodeFront("div", inspector);
|
let divFront = yield getNodeFront("div", inspector);
|
||||||
|
|
||||||
info("Waiting for highlighter to activate");
|
info("Waiting for highlighter to activate");
|
||||||
yield inspector.highlighter.showBoxModel(divFront);
|
yield inspector.toolbox.highlighter.showBoxModel(divFront);
|
||||||
|
|
||||||
let rect = yield testActor.getSimpleBorderRect();
|
let rect = yield testActor.getSimpleBorderRect();
|
||||||
is(rect.width, 100, "The highlighter has the right width.");
|
is(rect.width, 100, "The highlighter has the right width.");
|
||||||
@ -31,5 +31,5 @@ add_task(function* () {
|
|||||||
is(rect.width, 200, "The highlighter has the right width after update");
|
is(rect.width, 200, "The highlighter has the right width after update");
|
||||||
|
|
||||||
info("Waiting for highlighter to hide");
|
info("Waiting for highlighter to hide");
|
||||||
yield inspector.highlighter.hideBoxModel();
|
yield inspector.toolbox.highlighter.hideBoxModel();
|
||||||
});
|
});
|
||||||
|
@ -89,8 +89,9 @@ function* testNavigate(inspector, testActor, ruleview) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function* showPickerOn(selector, inspector) {
|
function* showPickerOn(selector, inspector) {
|
||||||
|
let highlighter = inspector.toolbox.highlighter;
|
||||||
let nodeFront = yield getNodeFront(selector, inspector);
|
let nodeFront = yield getNodeFront(selector, inspector);
|
||||||
yield inspector.highlighter.showBoxModel(nodeFront);
|
yield highlighter.showBoxModel(nodeFront);
|
||||||
}
|
}
|
||||||
|
|
||||||
function* assertPseudoAddedToNode(inspector, testActor, ruleview) {
|
function* assertPseudoAddedToNode(inspector, testActor, ruleview) {
|
||||||
@ -118,7 +119,7 @@ function* assertPseudoAddedToNode(inspector, testActor, ruleview) {
|
|||||||
let value = yield testActor.getHighlighterNodeTextContent(
|
let value = yield testActor.getHighlighterNodeTextContent(
|
||||||
"box-model-infobar-pseudo-classes");
|
"box-model-infobar-pseudo-classes");
|
||||||
is(value, PSEUDO, "pseudo-class in infobar selector");
|
is(value, PSEUDO, "pseudo-class in infobar selector");
|
||||||
yield inspector.highlighter.hideBoxModel();
|
yield inspector.toolbox.highlighter.hideBoxModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
function* assertPseudoRemovedFromNode(testActor) {
|
function* assertPseudoRemovedFromNode(testActor) {
|
||||||
@ -144,5 +145,5 @@ function* assertPseudoRemovedFromView(inspector, testActor, ruleview) {
|
|||||||
let value = yield testActor.getHighlighterNodeTextContent(
|
let value = yield testActor.getHighlighterNodeTextContent(
|
||||||
"box-model-infobar-pseudo-classes");
|
"box-model-infobar-pseudo-classes");
|
||||||
is(value, "", "pseudo-class removed from infobar selector");
|
is(value, "", "pseudo-class removed from infobar selector");
|
||||||
yield inspector.highlighter.hideBoxModel();
|
yield inspector.toolbox.highlighter.hideBoxModel();
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ devtools.jar:
|
|||||||
content/shared/frame-script-utils.js (shared/frame-script-utils.js)
|
content/shared/frame-script-utils.js (shared/frame-script-utils.js)
|
||||||
content/styleeditor/styleeditor.xul (styleeditor/styleeditor.xul)
|
content/styleeditor/styleeditor.xul (styleeditor/styleeditor.xul)
|
||||||
content/storage/storage.xul (storage/storage.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/fonts/fonts.js (inspector/fonts/fonts.js)
|
||||||
content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
|
content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
|
||||||
content/animationinspector/animation-controller.js (animationinspector/animation-controller.js)
|
content/animationinspector/animation-controller.js (animationinspector/animation-controller.js)
|
||||||
|
@ -741,7 +741,7 @@ Heritage.extend(SwatchBasedEditorTooltip.prototype, {
|
|||||||
this.spectrum.updateUI();
|
this.spectrum.updateUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
let {target} = this.inspector;
|
let {target} = this.inspector.toolbox;
|
||||||
target.actorHasMethod("inspector", "pickColorFromPage").then(value => {
|
target.actorHasMethod("inspector", "pickColorFromPage").then(value => {
|
||||||
let tooltipDoc = this.tooltip.doc;
|
let tooltipDoc = this.tooltip.doc;
|
||||||
let eyeButton = tooltipDoc.querySelector("#eyedropper-button");
|
let eyeButton = tooltipDoc.querySelector("#eyedropper-button");
|
||||||
|
Loading…
Reference in New Issue
Block a user