Skip to content

Commit d7720a0

Browse files
committed
Remove obsolete data
1 parent 113b474 commit d7720a0

File tree

2 files changed

+2
-170
lines changed

2 files changed

+2
-170
lines changed

data/markup-view-content.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

lib/inspector-overlay.js

Lines changed: 2 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,12 @@ const InspectorOverlay = Class(
6464
// Tooltip events
6565
this.onClickTooltip = this.onClickTooltip.bind(this);
6666

67-
// Handler for messages from MarkupView content.
68-
this.onContentMessage = this.onContentMessage.bind(this);
69-
7067
// FireQueryToolboxOverlay events
7168
this.onAttach = this.onAttach.bind(this);
7269
this.onDetach = this.onDetach.bind(this);
7370

7471
// Backend events
7572
this.onDataModified = this.onDataModified.bind(this);
76-
77-
this.nodes = [];
7873
},
7974

8075
destroy: function() {
@@ -131,60 +126,10 @@ const InspectorOverlay = Class(
131126
frame.addEventListener("unload", this.onMarkupViewUnloaded, true);
132127

133128
loadSheet(win, "chrome://firequery/skin/firequery.css", "author");
134-
//loadSheet(win, "chrome://firebug.sdk/skin/domTree.css", "author");
135-
136-
// xxxHonza: The inspector panel doesn't render jQuery data directly
137-
// anymore. It's only displaying a little icon (an envelope) that
138-
// indicates presence of data. The user can see details in a tooltip
139-
// after clicking the icon.
140-
return;
141-
142-
let requireUrl = self.data.url("./lib/require.js");
143-
let configUrl = self.data.url("./inspector-config.js");
144-
145-
// Require configuration script. It's hardcoded here, so the
146-
// base URL can be dynamically provided. Note that base URL of
147-
// the markup frame is pointing into native DevTools chrome location.
148-
// xxxHonza: should be in a *.js file
149-
let configScript =
150-
"require.config({" +
151-
" baseUrl: '" + self.data.url() + "'," +
152-
" paths: {" +
153-
" 'react': './lib/react'," +
154-
" 'firebug.sdk': '../node_modules/firebug.sdk'," +
155-
" 'reps': '../node_modules/firebug.sdk/lib/reps'," +
156-
" }" +
157-
"});" +
158-
"requirejs(['markup-view-content']);";
159-
160-
// First, load RequireJS library.
161-
Dom.loadScript(doc, requireUrl, event => {
162-
// As soon as the RequireJS library is loaded, execute also
163-
// configuration script that loads the main module.
164-
Dom.addScript(doc, "firequery-inspector-config", configScript);
165-
166-
// Listen for messages from the content. The communication
167-
// is done through DOM events since the message manager
168-
// isn't available for the markup frame.
169-
win.addEventListener("firequery/content/message",
170-
this.onContentMessage, true);
171-
172-
// xxxHonza: expose tracing to the content.
173-
});
174-
175-
let ContentTrace = {
176-
sysout: () => FBTrace.sysout.apply(FBTrace, arguments)
177-
}
178-
179-
// Expose tracing into the MarkupView content.
180-
Content.exportIntoContentScope(win, ContentTrace, "Trace");
181129
},
182130

183131
onMarkupViewUnloaded: function() {
184132
Trace.sysout("InspectorOverlay.onMarkupViewUnloaded;");
185-
186-
this.markupScriptReady = false;
187-
this.nodes = [];
188133
},
189134

190135
onInspectorUpdated: function(eventId, name) {
@@ -288,8 +233,6 @@ const InspectorOverlay = Class(
288233
},
289234

290235
showDOMProperties: function() {
291-
Trace.sysout("InspectorOverlay.showDOMProperties;", this.panel);
292-
293236
let original = this.showDOMPropertiesOriginal;
294237

295238
// The user needs to click on the jQueryData element (an envelope)
@@ -305,6 +248,8 @@ const InspectorOverlay = Class(
305248
return original.apply(this.panel, arguments);
306249
}
307250

251+
Trace.sysout("InspectorOverlay.showDOMProperties;", jQueryData);
252+
308253
// Display clicked jQuery data instead of element properties.
309254
this.toolbox.openSplitConsole().then(() => {
310255
let panel = this.toolbox.getPanel("webconsole");
@@ -319,17 +264,6 @@ const InspectorOverlay = Class(
319264
});
320265
},
321266

322-
onMarkupScriptReady: function() {
323-
Trace.sysout("InspectorOverlay.onMarkupScriptReady; " +
324-
this.nodes.length, this.nodes);
325-
326-
this.markupScriptReady = true;
327-
328-
if (this.nodes.length) {
329-
this.postContentMessage("render", this.nodes);
330-
}
331-
},
332-
333267
// ToolboxOverlay Events
334268

335269
onAttach: function(front) {
@@ -375,48 +309,6 @@ const InspectorOverlay = Class(
375309
} else {
376310
this.createDataIcon(element);
377311
}
378-
379-
/*let nodes = [{
380-
element: container.elt,
381-
jQueryData: jQueryData
382-
}];*/
383-
384-
// Re-render nodes within the MarkupView frame.
385-
//this.postContentMessage("render", nodes);
386-
},
387-
388-
// Communication: content <-> chrome
389-
390-
onContentMessage: function(event) {
391-
Trace.sysout("InspectorOverlay.onContentMessage; ", event);
392-
393-
let { data } = event;
394-
switch (data.type) {
395-
case "ready":
396-
this.onMarkupScriptReady();
397-
break;
398-
}
399-
},
400-
401-
/**
402-
* Send message to the content scope (panel's iframe)
403-
*/
404-
postContentMessage: function(type, args) {
405-
let frame = this.panel._markupFrame;
406-
let win = frame.contentWindow;
407-
408-
var data = {
409-
type: type,
410-
args: args,
411-
};
412-
413-
var event = new win.MessageEvent("firequery/chrome/message", {
414-
bubbles: true,
415-
cancelable: true,
416-
data: data,
417-
});
418-
419-
win.dispatchEvent(event);
420312
},
421313
});
422314

0 commit comments

Comments
 (0)