@@ -64,17 +64,12 @@ const InspectorOverlay = Class(
64
64
// Tooltip events
65
65
this . onClickTooltip = this . onClickTooltip . bind ( this ) ;
66
66
67
- // Handler for messages from MarkupView content.
68
- this . onContentMessage = this . onContentMessage . bind ( this ) ;
69
-
70
67
// FireQueryToolboxOverlay events
71
68
this . onAttach = this . onAttach . bind ( this ) ;
72
69
this . onDetach = this . onDetach . bind ( this ) ;
73
70
74
71
// Backend events
75
72
this . onDataModified = this . onDataModified . bind ( this ) ;
76
-
77
- this . nodes = [ ] ;
78
73
} ,
79
74
80
75
destroy : function ( ) {
@@ -131,60 +126,10 @@ const InspectorOverlay = Class(
131
126
frame . addEventListener ( "unload" , this . onMarkupViewUnloaded , true ) ;
132
127
133
128
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" ) ;
181
129
} ,
182
130
183
131
onMarkupViewUnloaded : function ( ) {
184
132
Trace . sysout ( "InspectorOverlay.onMarkupViewUnloaded;" ) ;
185
-
186
- this . markupScriptReady = false ;
187
- this . nodes = [ ] ;
188
133
} ,
189
134
190
135
onInspectorUpdated : function ( eventId , name ) {
@@ -288,8 +233,6 @@ const InspectorOverlay = Class(
288
233
} ,
289
234
290
235
showDOMProperties : function ( ) {
291
- Trace . sysout ( "InspectorOverlay.showDOMProperties;" , this . panel ) ;
292
-
293
236
let original = this . showDOMPropertiesOriginal ;
294
237
295
238
// The user needs to click on the jQueryData element (an envelope)
@@ -305,6 +248,8 @@ const InspectorOverlay = Class(
305
248
return original . apply ( this . panel , arguments ) ;
306
249
}
307
250
251
+ Trace . sysout ( "InspectorOverlay.showDOMProperties;" , jQueryData ) ;
252
+
308
253
// Display clicked jQuery data instead of element properties.
309
254
this . toolbox . openSplitConsole ( ) . then ( ( ) => {
310
255
let panel = this . toolbox . getPanel ( "webconsole" ) ;
@@ -319,17 +264,6 @@ const InspectorOverlay = Class(
319
264
} ) ;
320
265
} ,
321
266
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
-
333
267
// ToolboxOverlay Events
334
268
335
269
onAttach : function ( front ) {
@@ -375,48 +309,6 @@ const InspectorOverlay = Class(
375
309
} else {
376
310
this . createDataIcon ( element ) ;
377
311
}
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 ) ;
420
312
} ,
421
313
} ) ;
422
314
0 commit comments