Changeset 183580 in webkit
- Timestamp:
- Apr 29, 2015 3:00:06 PM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 added
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r183579 r183580 1 2015-04-29 Timothy Hatcher <timothy@apple.com> 2 3 Web Inspector: Split Storage from Resources tab 4 https://bugs.webkit.org/show_bug.cgi?id=144404 5 6 Reviewed by Joseph Pecoraro. 7 8 * Localizations/en.lproj/localizedStrings.js: 9 * UserInterface/Base/Main.js: 10 (WebInspector.loaded): 11 (WebInspector.isTabTypeAllowed): 12 (WebInspector._tabContentViewForType): 13 (WebInspector._updateNewTabButtonState): 14 (WebInspector.showStorageTab): 15 (WebInspector._storageWasInspected): 16 * UserInterface/Controllers/ApplicationCacheManager.js: 17 (WebInspector.ApplicationCacheManager.prototype.initialize): 18 (WebInspector.ApplicationCacheManager.prototype.get applicationCacheObjects): 19 * UserInterface/Controllers/StorageManager.js: 20 (WebInspector.StorageManager.prototype.get domStorageObjects): 21 (WebInspector.StorageManager.prototype.get databases): 22 (WebInspector.StorageManager.prototype.get indexedDatabases): 23 (WebInspector.StorageManager.prototype.get cookieStorageObjects): 24 * UserInterface/Images/Storage.svg: Added. 25 * UserInterface/Main.html: 26 * UserInterface/Views/DatabaseTableContentView.js: 27 (WebInspector.DatabaseTableContentView.prototype._queryFinished): Clear _dataGrid, 28 since it might have been allocated but still be empty. This avoids an exception in 29 updateLayout next time layout is updated. 30 * UserInterface/Views/NewTabContentView.js: 31 (WebInspector.NewTabContentView): 32 * UserInterface/Views/ResourceSidebarPanel.js: 33 (WebInspector.ResourceSidebarPanel): 34 (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): 35 (WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasAdded): Deleted. 36 (WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasInspected): Deleted. 37 (WebInspector.ResourceSidebarPanel.prototype._databaseWasAdded): Deleted. 38 (WebInspector.ResourceSidebarPanel.prototype._databaseWasInspected): Deleted. 39 (WebInspector.ResourceSidebarPanel.prototype._indexedDatabaseWasAdded): Deleted. 40 (WebInspector.ResourceSidebarPanel.prototype._cookieStorageObjectWasAdded): Deleted. 41 (WebInspector.ResourceSidebarPanel.prototype._frameManifestAdded): Deleted. 42 (WebInspector.ResourceSidebarPanel.prototype._frameManifestRemoved): Deleted. 43 (WebInspector.ResourceSidebarPanel.prototype._addStorageChild): Deleted. 44 (WebInspector.ResourceSidebarPanel.prototype._storageCleared): Deleted. 45 * UserInterface/Views/ResourcesTabContentView.js: 46 (WebInspector.ResourcesTabContentView): 47 (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject): 48 * UserInterface/Views/StorageSidebarPanel.js: Added. 49 (WebInspector.StorageSidebarPanel): 50 (WebInspector.StorageSidebarPanel.prototype.showDefaultContentView): 51 (WebInspector.StorageSidebarPanel.prototype.closed): 52 (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): 53 (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded): 54 (WebInspector.StorageSidebarPanel.prototype._addDOMStorageObject): 55 (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasInspected): 56 (WebInspector.StorageSidebarPanel.prototype._databaseWasAdded): 57 (WebInspector.StorageSidebarPanel.prototype._addDatabase): 58 (WebInspector.StorageSidebarPanel.prototype._databaseWasInspected): 59 (WebInspector.StorageSidebarPanel.prototype._indexedDatabaseWasAdded): 60 (WebInspector.StorageSidebarPanel.prototype._addIndexedDatabase): 61 (WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded): 62 (WebInspector.StorageSidebarPanel.prototype._addCookieStorageObject): 63 (WebInspector.StorageSidebarPanel.prototype._frameManifestAdded): 64 (WebInspector.StorageSidebarPanel.prototype._addFrameManifest): 65 (WebInspector.StorageSidebarPanel.prototype._frameManifestRemoved): 66 (WebInspector.StorageSidebarPanel.prototype._compareTreeElements): 67 (WebInspector.StorageSidebarPanel.prototype._addStorageChild): 68 (WebInspector.StorageSidebarPanel.prototype._storageCleared): 69 * UserInterface/Views/StorageTabContentView.js: Copied from Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js. 70 (WebInspector.StorageTabContentView): 71 (WebInspector.StorageTabContentView.prototype.get type): 72 (WebInspector.StorageTabContentView.prototype.canShowRepresentedObject): 73 1 74 2015-04-29 Timothy Hatcher <timothy@apple.com> 2 75 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r183468 r183580 225 225 localizedStrings["Filter Resource List"] = "Filter Resource List"; 226 226 localizedStrings["Filter Search Results"] = "Filter Search Results"; 227 localizedStrings["Filter Storage List"] = "Filter Storage List"; 227 228 localizedStrings["Flows"] = "Flows"; 228 229 localizedStrings["Focused"] = "Focused"; -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r183579 r183580 141 141 this._splitConsoleHeightSetting = new WebInspector.Setting("split-console-height", 150); 142 142 143 this._openTabsSetting = new WebInspector.Setting("open-tabs", ["elements", "resources", "timeline", "debugger", " console"]);143 this._openTabsSetting = new WebInspector.Setting("open-tabs", ["elements", "resources", "timeline", "debugger", "storage", "console"]); 144 144 this._selectedTabIndexSetting = new WebInspector.Setting("selected-tab-index", 0); 145 145 … … 377 377 case WebInspector.ElementsTabContentView.Type: 378 378 return !!window.DOMAgent; 379 case WebInspector.StorageTabContentView.Type: 380 return !!window.DOMStorageAgent || !!window.DatabaseAgent || !!window.IndexedDBAgent; 379 381 case WebInspector.TimelineTabContentView.Type: 380 382 return !!window.TimelineAgent; … … 387 389 { 388 390 switch (tabType) { 391 case WebInspector.ConsoleTabContentView.Type: 392 return new WebInspector.ConsoleTabContentView; 393 case WebInspector.DebuggerTabContentView.Type: 394 return new WebInspector.DebuggerTabContentView; 389 395 case WebInspector.ElementsTabContentView.Type: 390 396 return new WebInspector.ElementsTabContentView; 397 case WebInspector.NewTabContentView.Type: 398 return new WebInspector.NewTabContentView; 391 399 case WebInspector.ResourcesTabContentView.Type: 392 400 return new WebInspector.ResourcesTabContentView; 401 case WebInspector.SearchTabContentView.Type: 402 return new WebInspector.SearchTabContentView; 403 case WebInspector.StorageTabContentView.Type: 404 return new WebInspector.StorageTabContentView; 393 405 case WebInspector.TimelineTabContentView.Type: 394 406 return new WebInspector.TimelineTabContentView; 395 case WebInspector.DebuggerTabContentView.Type:396 return new WebInspector.DebuggerTabContentView;397 case WebInspector.ConsoleTabContentView.Type:398 return new WebInspector.ConsoleTabContentView;399 case WebInspector.SearchTabContentView.Type:400 return new WebInspector.SearchTabContentView;401 case WebInspector.NewTabTabContentView.Type:402 return new WebInspector.NewTabTabContentView;403 407 default: 404 408 console.error("Unknown tab type", tabType); … … 427 431 WebInspector._updateNewTabButtonState = function(event) 428 432 { 429 var newTabAllowed = this.isNewTabWithTypeAllowed(WebInspector.ConsoleTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.ElementsTabContentView.Type); 433 var newTabAllowed = this.isNewTabWithTypeAllowed(WebInspector.ConsoleTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.ElementsTabContentView.Type) 434 || this.isNewTabWithTypeAllowed(WebInspector.StorageTabContentView.Type); 430 435 this.tabBar.newTabItem.disabled = !newTabAllowed; 431 436 }; … … 754 759 }; 755 760 761 WebInspector.showStorageTab = function() 762 { 763 var tabContentView = this.tabBrowser.bestTabContentViewForClass(WebInspector.StorageTabContentView); 764 if (!tabContentView) 765 tabContentView = new WebInspector.StorageTabContentView; 766 this.tabBrowser.showTabForContentView(tabContentView); 767 }; 768 756 769 WebInspector.showTimelineTab = function() 757 770 { … … 1441 1454 WebInspector._storageWasInspected = function(event) 1442 1455 { 1443 // FIXME: This should show a Storage tab when we have one. 1444 this.showResourcesTab(); 1456 this.showStorageTab(); 1445 1457 }; 1446 1458 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/ApplicationCacheManager.js
r181844 r183580 45 45 initialize() 46 46 { 47 this._applicationCacheObjects = [];47 this._applicationCacheObjects = {}; 48 48 49 49 if (window.ApplicationCacheAgent) 50 50 ApplicationCacheAgent.getFramesWithManifests(this._framesWithManifestsLoaded.bind(this)); 51 } 52 53 get applicationCacheObjects() 54 { 55 var applicationCacheObjects = []; 56 for (var id in this._applicationCacheObjects) 57 applicationCacheObjects.push(this._applicationCacheObjects[id]); 58 return applicationCacheObjects; 51 59 } 52 60 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/StorageManager.js
r182113 r183580 61 61 } 62 62 63 get domStorageObjects() 64 { 65 return this._domStorageObjects; 66 } 67 68 get databases() 69 { 70 return this._databaseObjects; 71 } 72 73 get indexedDatabases() 74 { 75 return this._indexedDatabases; 76 } 77 78 get cookieStorageObjects() 79 { 80 var cookieStorageObjects = []; 81 for (var host in this._cookieStorageObjects) 82 cookieStorageObjects.push(this._cookieStorageObjects[host]); 83 return cookieStorageObjects; 84 } 85 63 86 domStorageWasAdded(id, host, isLocalStorage) 64 87 { -
trunk/Source/WebInspectorUI/UserInterface/Main.html
r183469 r183580 354 354 <script src="Views/SearchTabContentView.js"></script> 355 355 <script src="Views/SettingsTabContentView.js"></script> 356 <script src="Views/StorageTabContentView.js"></script> 356 357 <script src="Views/TimelineTabContentView.js"></script> 357 358 … … 505 506 <script src="Views/SourceCodeTimelineTreeElement.js"></script> 506 507 <script src="Views/SourceMapResourceTreeElement.js"></script> 508 <script src="Views/StorageSidebarPanel.js"></script> 507 509 <script src="Views/SyntaxHighlightingSupport.js"></script> 508 510 <script src="Views/TextContentView.js"></script> -
trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTableContentView.js
r183579 r183580 91 91 this._dataGrid = new WebInspector.DataGrid.createSortableDataGrid(columnNames, values); 92 92 if (!this._dataGrid || !this._dataGrid.element) { 93 this._dataGrid = undefined; 94 93 95 // If the DataGrid is empty, then we were returned a table with no columns. This can happen when a table has 94 96 // no data, the SELECT query only returns column names when there is data. -
trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js
r183468 r183580 32 32 var allowedNewTabs = [ 33 33 {image: "Images/Elements.svg", title: WebInspector.UIString("Elements"), type: WebInspector.ElementsTabContentView.Type}, 34 {image: "Images/Storage.svg", title: WebInspector.UIString("Storage"), type: WebInspector.StorageTabContentView.Type}, 34 35 {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type} 35 36 ]; -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
r183375 r183580 36 36 this._waitingForInitialMainFrame = true; 37 37 38 this._localStorageRootTreeElement = null;39 this._sessionStorageRootTreeElement = null;40 41 this._databaseRootTreeElement = null;42 this._databaseHostTreeElementMap = {};43 44 this._indexedDatabaseRootTreeElement = null;45 this._indexedDatabaseHostTreeElementMap = {};46 47 this._cookieStorageRootTreeElement = null;48 49 this._applicationCacheRootTreeElement = null;50 this._applicationCacheURLTreeElementMap = {};51 52 WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.CookieStorageObjectWasAdded, this._cookieStorageObjectWasAdded, this);53 WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.DOMStorageObjectWasAdded, this._domStorageObjectWasAdded, this);54 WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.DOMStorageObjectWasInspected, this._domStorageObjectWasInspected, this);55 WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.DatabaseWasAdded, this._databaseWasAdded, this);56 WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.DatabaseWasInspected, this._databaseWasInspected, this);57 WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.IndexedDatabaseWasAdded, this._indexedDatabaseWasAdded, this);58 WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.Cleared, this._storageCleared, this);59 60 WebInspector.applicationCacheManager.addEventListener(WebInspector.ApplicationCacheManager.Event.FrameManifestAdded, this._frameManifestAdded, this);61 WebInspector.applicationCacheManager.addEventListener(WebInspector.ApplicationCacheManager.Event.FrameManifestRemoved, this._frameManifestRemoved, this);62 63 38 WebInspector.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.MainFrameDidChange, this._mainFrameDidChange, this); 64 39 … … 301 276 _treeElementSelected(treeElement, selectedByUser) 302 277 { 303 if (treeElement instanceof WebInspector.FolderTreeElement || treeElement instanceof WebInspector.DatabaseHostTreeElement || 304 treeElement instanceof WebInspector.IndexedDatabaseHostTreeElement || treeElement instanceof WebInspector.IndexedDatabaseTreeElement) 305 return; 306 307 if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement || 308 treeElement instanceof WebInspector.StorageTreeElement || treeElement instanceof WebInspector.DatabaseTableTreeElement || 309 treeElement instanceof WebInspector.DatabaseTreeElement || treeElement instanceof WebInspector.ApplicationCacheFrameTreeElement || 310 treeElement instanceof WebInspector.ContentFlowTreeElement || treeElement instanceof WebInspector.IndexedDatabaseObjectStoreTreeElement || 311 treeElement instanceof WebInspector.IndexedDatabaseObjectStoreIndexTreeElement) { 278 if (treeElement instanceof WebInspector.FolderTreeElement) 279 return; 280 281 if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) { 312 282 WebInspector.showRepresentedObject(treeElement.representedObject); 313 283 return; … … 315 285 316 286 console.error("Unknown tree element", treeElement); 317 }318 319 _domStorageObjectWasAdded(event)320 {321 var domStorage = event.data.domStorage;322 var storageElement = new WebInspector.DOMStorageTreeElement(domStorage);323 324 if (domStorage.isLocalStorage())325 this._localStorageRootTreeElement = this._addStorageChild(storageElement, this._localStorageRootTreeElement, WebInspector.UIString("Local Storage"));326 else327 this._sessionStorageRootTreeElement = this._addStorageChild(storageElement, this._sessionStorageRootTreeElement, WebInspector.UIString("Session Storage"));328 }329 330 _domStorageObjectWasInspected(event)331 {332 var domStorage = event.data.domStorage;333 var treeElement = this.treeElementForRepresentedObject(domStorage);334 treeElement.revealAndSelect(true);335 }336 337 _databaseWasAdded(event)338 {339 var database = event.data.database;340 341 console.assert(database instanceof WebInspector.DatabaseObject);342 343 if (!this._databaseHostTreeElementMap[database.host]) {344 this._databaseHostTreeElementMap[database.host] = new WebInspector.DatabaseHostTreeElement(database.host);345 this._databaseRootTreeElement = this._addStorageChild(this._databaseHostTreeElementMap[database.host], this._databaseRootTreeElement, WebInspector.UIString("Databases"));346 }347 348 var databaseElement = new WebInspector.DatabaseTreeElement(database);349 this._databaseHostTreeElementMap[database.host].appendChild(databaseElement);350 }351 352 _databaseWasInspected(event)353 {354 var database = event.data.database;355 var treeElement = this.treeElementForRepresentedObject(database);356 treeElement.revealAndSelect(true);357 }358 359 _indexedDatabaseWasAdded(event)360 {361 var indexedDatabase = event.data.indexedDatabase;362 363 console.assert(indexedDatabase instanceof WebInspector.IndexedDatabase);364 365 if (!this._indexedDatabaseHostTreeElementMap[indexedDatabase.host]) {366 this._indexedDatabaseHostTreeElementMap[indexedDatabase.host] = new WebInspector.IndexedDatabaseHostTreeElement(indexedDatabase.host);367 this._indexedDatabaseRootTreeElement = this._addStorageChild(this._indexedDatabaseHostTreeElementMap[indexedDatabase.host], this._indexedDatabaseRootTreeElement, WebInspector.UIString("Indexed Databases"));368 }369 370 var indexedDatabaseElement = new WebInspector.IndexedDatabaseTreeElement(indexedDatabase);371 this._indexedDatabaseHostTreeElementMap[indexedDatabase.host].appendChild(indexedDatabaseElement);372 }373 374 _cookieStorageObjectWasAdded(event)375 {376 console.assert(event.data.cookieStorage instanceof WebInspector.CookieStorageObject);377 378 var cookieElement = new WebInspector.CookieStorageTreeElement(event.data.cookieStorage);379 this._cookieStorageRootTreeElement = this._addStorageChild(cookieElement, this._cookieStorageRootTreeElement, WebInspector.UIString("Cookies"));380 }381 382 _frameManifestAdded(event)383 {384 var frameManifest = event.data.frameManifest;385 console.assert(frameManifest instanceof WebInspector.ApplicationCacheFrame);386 387 var manifest = frameManifest.manifest;388 var manifestURL = manifest.manifestURL;389 if (!this._applicationCacheURLTreeElementMap[manifestURL]) {390 this._applicationCacheURLTreeElementMap[manifestURL] = new WebInspector.ApplicationCacheManifestTreeElement(manifest);391 this._applicationCacheRootTreeElement = this._addStorageChild(this._applicationCacheURLTreeElementMap[manifestURL], this._applicationCacheRootTreeElement, WebInspector.UIString("Application Cache"));392 }393 394 var frameCacheElement = new WebInspector.ApplicationCacheFrameTreeElement(frameManifest);395 this._applicationCacheURLTreeElementMap[manifestURL].appendChild(frameCacheElement);396 }397 398 _frameManifestRemoved(event)399 {400 // FIXME: Implement this.401 287 } 402 288 … … 415 301 } 416 302 417 _addStorageChild(childElement, parentElement, folderName)418 {419 if (!parentElement) {420 childElement.flattened = true;421 422 this.contentTreeOutline.insertChild(childElement, insertionIndexForObjectInListSortedByFunction(childElement, this.contentTreeOutline.children, this._compareTreeElements));423 424 return childElement;425 }426 427 if (parentElement instanceof WebInspector.StorageTreeElement) {428 console.assert(parentElement.flattened);429 430 var previousOnlyChild = parentElement;431 previousOnlyChild.flattened = false;432 this.contentTreeOutline.removeChild(previousOnlyChild);433 434 var folderElement = new WebInspector.FolderTreeElement(folderName);435 this.contentTreeOutline.insertChild(folderElement, insertionIndexForObjectInListSortedByFunction(folderElement, this.contentTreeOutline.children, this._compareTreeElements));436 437 folderElement.appendChild(previousOnlyChild);438 folderElement.insertChild(childElement, insertionIndexForObjectInListSortedByFunction(childElement, folderElement.children, this._compareTreeElements));439 440 return folderElement;441 }442 443 console.assert(parentElement instanceof WebInspector.FolderTreeElement);444 parentElement.insertChild(childElement, insertionIndexForObjectInListSortedByFunction(childElement, parentElement.children, this._compareTreeElements));445 446 return parentElement;447 }448 449 _storageCleared(event)450 {451 // Close all DOM and cookie storage content views since the main frame has navigated and all storages are cleared.452 this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.CookieStorageContentView);453 this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DOMStorageContentView);454 this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DatabaseTableContentView);455 this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DatabaseContentView);456 this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.ApplicationCacheFrameContentView);457 458 if (this._localStorageRootTreeElement && this._localStorageRootTreeElement.parent)459 this._localStorageRootTreeElement.parent.removeChild(this._localStorageRootTreeElement);460 461 if (this._sessionStorageRootTreeElement && this._sessionStorageRootTreeElement.parent)462 this._sessionStorageRootTreeElement.parent.removeChild(this._sessionStorageRootTreeElement);463 464 if (this._databaseRootTreeElement && this._databaseRootTreeElement.parent)465 this._databaseRootTreeElement.parent.removeChild(this._databaseRootTreeElement);466 467 if (this._indexedDatabaseRootTreeElement && this._indexedDatabaseRootTreeElement.parent)468 this._indexedDatabaseRootTreeElement.parent.removeChild(this._indexedDatabaseRootTreeElement);469 470 if (this._cookieStorageRootTreeElement && this._cookieStorageRootTreeElement.parent)471 this._cookieStorageRootTreeElement.parent.removeChild(this._cookieStorageRootTreeElement);472 473 if (this._applicationCacheRootTreeElement && this._applicationCacheRootTreeElement.parent)474 this._applicationCacheRootTreeElement.parent.removeChild(this._applicationCacheRootTreeElement);475 476 this._localStorageRootTreeElement = null;477 this._sessionStorageRootTreeElement = null;478 this._databaseRootTreeElement = null;479 this._databaseHostTreeElementMap = {};480 this._indexedDatabaseRootTreeElement = null;481 this._indexedDatabaseHostTreeElementMap = {};482 this._cookieStorageRootTreeElement = null;483 this._applicationCacheRootTreeElement = null;484 this._applicationCacheURLTreeElementMap = {};485 }486 487 303 _extraDomainsActivated() 488 304 { -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js
r183323 r183580 27 27 { 28 28 var tabBarItem = new WebInspector.TabBarItem("Images/Resources.svg", WebInspector.UIString("Resources")); 29 var detailsSidebarPanels = [WebInspector.resourceDetailsSidebarPanel, WebInspector. applicationCacheDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel];29 var detailsSidebarPanels = [WebInspector.resourceDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel]; 30 30 31 31 // FIXME: Until ContentFlows are moved to the Elements tab, these details sidebar panels need to be included. … … 53 53 canShowRepresentedObject: function(representedObject) 54 54 { 55 return representedObject instanceof WebInspector.Frame || representedObject instanceof WebInspector.Resource || 56 representedObject instanceof WebInspector.Script || representedObject instanceof WebInspector.ContentFlow || 57 representedObject instanceof WebInspector.DOMStorageObject || representedObject instanceof WebInspector.CookieStorageObject || 58 representedObject instanceof WebInspector.DatabaseTableObject || representedObject instanceof WebInspector.DatabaseObject || 59 representedObject instanceof WebInspector.ApplicationCacheFrame || representedObject instanceof WebInspector.IndexedDatabaseObjectStore || 60 representedObject instanceof WebInspector.IndexedDatabaseObjectStoreIndex; 55 return representedObject instanceof WebInspector.Frame || representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.Script; 61 56 } 62 57 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/StorageTabContentView.js
r183579 r183580 24 24 */ 25 25 26 WebInspector. ResourcesTabContentView = function(identifier)26 WebInspector.StorageTabContentView = function(identifier) 27 27 { 28 var tabBarItem = new WebInspector.TabBarItem("Images/ Resources.svg", WebInspector.UIString("Resources"));29 var detailsSidebarPanels = [WebInspector. resourceDetailsSidebarPanel, WebInspector.applicationCacheDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel];28 var tabBarItem = new WebInspector.TabBarItem("Images/Storage.svg", WebInspector.UIString("Storage")); 29 var detailsSidebarPanels = [WebInspector.applicationCacheDetailsSidebarPanel]; 30 30 31 // FIXME: Until ContentFlows are moved to the Elements tab, these details sidebar panels need to be included. 32 detailsSidebarPanels = detailsSidebarPanels.concat([WebInspector.domNodeDetailsSidebarPanel, WebInspector.cssStyleDetailsSidebarPanel]); 33 if (WebInspector.layerTreeDetailsSidebarPanel) 34 detailsSidebarPanels.push(WebInspector.layerTreeDetailsSidebarPanel); 35 36 // FIME: Until ResourceSidebarPanel supports instantiating after inspector launch, disable closing. 37 tabBarItem.hideCloseButton = true; 38 39 WebInspector.ContentBrowserTabContentView.call(this, identifier || "resources", "resources", tabBarItem, WebInspector.ResourceSidebarPanel, detailsSidebarPanels); 31 WebInspector.ContentBrowserTabContentView.call(this, identifier || "storage", "storage", tabBarItem, WebInspector.StorageSidebarPanel, detailsSidebarPanels); 40 32 }; 41 33 42 WebInspector. ResourcesTabContentView.prototype = {43 constructor: WebInspector. ResourcesTabContentView,34 WebInspector.StorageTabContentView.prototype = { 35 constructor: WebInspector.StorageTabContentView, 44 36 __proto__: WebInspector.ContentBrowserTabContentView.prototype, 45 37 … … 48 40 get type() 49 41 { 50 return WebInspector. ResourcesTabContentView.Type;42 return WebInspector.StorageTabContentView.Type; 51 43 }, 52 44 53 45 canShowRepresentedObject: function(representedObject) 54 46 { 55 return representedObject instanceof WebInspector.Frame || representedObject instanceof WebInspector.Resource || 56 representedObject instanceof WebInspector.Script || representedObject instanceof WebInspector.ContentFlow || 57 representedObject instanceof WebInspector.DOMStorageObject || representedObject instanceof WebInspector.CookieStorageObject || 47 return representedObject instanceof WebInspector.DOMStorageObject || representedObject instanceof WebInspector.CookieStorageObject || 58 48 representedObject instanceof WebInspector.DatabaseTableObject || representedObject instanceof WebInspector.DatabaseObject || 59 49 representedObject instanceof WebInspector.ApplicationCacheFrame || representedObject instanceof WebInspector.IndexedDatabaseObjectStore || … … 62 52 }; 63 53 64 WebInspector. ResourcesTabContentView.Type = "resources";54 WebInspector.StorageTabContentView.Type = "storage";
Note: See TracChangeset
for help on using the changeset viewer.