@@ -85,9 +85,6 @@ cls.ResourceInspector = function(network_logger)
8585 // build the context
8686 var ctx = { } ;
8787
88- // get the order of the groups of resources
89- ctx . group_order = this . tree_view . get_group_order ( ) ;
90-
9188 // get list of window_contexts for which we saw the main_document
9289 ctx . window_list = ( this . _network_logger . get_window_contexts ( ) || [ ] ) . filter ( function ( w ) {
9390 return w . saw_main_document ;
@@ -100,6 +97,13 @@ cls.ResourceInspector = function(network_logger)
10097 return ! this . _suppress_uids . hasOwnProperty ( v . uid ) && v . responsecode != 204 ;
10198 } , this ) ;
10299
100+ ctx . selected_resource_uid = this . _selected_resource_uid ;
101+ ctx . collapsed = this . _collapsed_hash ;
102+ ctx . document_resources = this . _document_resources ;
103+
104+ // get the order of the groups of resources,
105+ ctx . group_order = this . tree_view . get_group_order ( ) ;
106+
103107 ctx . document_resource_hash = { } ;
104108
105109 // mapping of the WindowIDs in the debugging context
@@ -174,6 +178,7 @@ cls.ResourceInspector = function(network_logger)
174178
175179 r . full_id = d . pivot_id + "_" + ctx . group_order . indexOf ( r . group ) + r . group + "_" + r . uid ;
176180 r . pivot_id = d . pivot_id + "_" + r . group ;
181+ r . is_hidden = ctx . collapsed [ r . pivot_id ] == true ;
177182
178183 return true ;
179184 } , this ) ;
@@ -197,9 +202,6 @@ cls.ResourceInspector = function(network_logger)
197202 if ( ! ctx . document_list . length || unknown_document_id || null_document_id )
198203 this . _list_documents ( ) ;
199204
200- ctx . _selected_resource_uid = this . _selected_resource_uid ;
201- ctx . document_resources = this . _document_resources ;
202- ctx . collapsed = this . _collapsed_hash ;
203205 this . _context = ctx ;
204206 }
205207 else
@@ -291,7 +293,7 @@ cls.ResourceInspector = function(network_logger)
291293
292294 while ( list [ i ] != null && list [ i ] . uid != this . _selected_resource_uid )
293295 {
294- if ( list [ i ] . is_visible )
296+ if ( ! list [ i ] . is_hidden )
295297 uid = list [ i ] . uid ;
296298
297299 i += inc ;
0 commit comments