Changeset 216147 in webkit
- Timestamp:
- May 3, 2017 3:13:26 PM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r216138 r216147 1 2017-05-03 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Uncaught Exception: Can't make a ContentView for an unknown representedObject of type: IndexedDatabase 4 https://bugs.webkit.org/show_bug.cgi?id=167473 5 <rdar://problem/30249715> 6 7 Reviewed by Matt Baker. 8 9 When an indexed database is selected in the Storage navigation sidebar, show its host, security origin, and version. 10 11 Previously, selecting an indexed database didn't change the content view. It could lead to a misleading state 12 when an indexed database is selected in the sidebar, but the content view showed previously selected item such as 13 Cookies or Local Storage. 14 15 * UserInterface/Main.html: 16 * UserInterface/Views/ContentView.css: 17 (.content-view .details-section): 18 (.content-view .details-section > .content): 19 (.content-view .details-section > .content > .group > .row.simple > .label): 20 (.content-view .details-section:last-child): 21 * UserInterface/Views/ContentView.js: 22 (WebInspector.ContentView.createFromRepresentedObject): 23 (WebInspector.ContentView.isViewable): 24 * UserInterface/Views/IndexedDatabaseContentView.css: Added. 25 (.indexed-database.content-view): 26 (.indexed-database.content-view .indexed-database-details): 27 (.indexed-database.content-view .details-section > .header): 28 * UserInterface/Views/IndexedDatabaseContentView.js: Added. 29 (WebInspector.IndexedDatabaseContentView): 30 * UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: 31 (WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.inspect): 32 Don't show the details sidebar for IndexedDB top level item since it has the same content as the content view. 33 34 * UserInterface/Views/StorageSidebarPanel.js: 35 (WebInspector.StorageSidebarPanel._treeSelectionDidChange): 36 * UserInterface/Views/StorageTabContentView.js: 37 (WebInspector.StorageTabContentView.prototype.canShowRepresentedObject): 38 (WebInspector.StorageTabContentView): 39 1 40 2017-05-03 Joseph Pecoraro <pecoraro@apple.com> 2 41 -
trunk/Source/WebInspectorUI/UserInterface/Main.html
r215915 r216147 103 103 <link rel="stylesheet" href="Views/ImageResourceContentView.css"> 104 104 <link rel="stylesheet" href="Views/IndeterminateProgressSpinner.css"> 105 <link rel="stylesheet" href="Views/IndexedDatabaseContentView.css"> 105 106 <link rel="stylesheet" href="Views/IndexedDatabaseObjectStoreContentView.css"> 106 107 <link rel="stylesheet" href="Views/InlineSwatch.css"> … … 587 588 <script src="Views/ImageResourceContentView.js"></script> 588 589 <script src="Views/IndeterminateProgressSpinner.js"></script> 590 <script src="Views/IndexedDatabaseContentView.js"></script> 589 591 <script src="Views/IndexedDatabaseDetailsSidebarPanel.js"></script> 590 592 <script src="Views/IndexedDatabaseEntryDataGridNode.js"></script> -
trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.css
r164543 r216147 35 35 margin-right: -16px; 36 36 } 37 38 .content-view .details-section { 39 font-size: 11px; 40 background-color: initial; 41 } 42 43 .content-view .details-section > .content { 44 width: auto; 45 } 46 47 .content-view .details-section > .content > .group > .row.simple > .label { 48 width: auto; 49 font-weight: 600; 50 } 51 52 .content-view .details-section:last-child { 53 border-bottom: none; 54 } -
trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js
r215113 r216147 96 96 return new WebInspector.DatabaseContentView(representedObject, extraArguments); 97 97 98 if (representedObject instanceof WebInspector.IndexedDatabase) 99 return new WebInspector.IndexedDatabaseContentView(representedObject, extraArguments); 100 98 101 if (representedObject instanceof WebInspector.IndexedDatabaseObjectStore) 99 102 return new WebInspector.IndexedDatabaseObjectStoreContentView(representedObject, extraArguments); … … 246 249 if (representedObject instanceof WebInspector.DatabaseObject) 247 250 return true; 251 if (representedObject instanceof WebInspector.IndexedDatabase) 252 return true; 248 253 if (representedObject instanceof WebInspector.IndexedDatabaseObjectStore) 249 254 return true; -
trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseContentView.css
r216145 r216147 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 .content-view > .indeterminate-progress-spinner { 27 position: absolute; 28 top: 50%; 29 left: 50%; 26 .indexed-database.content-view { 27 -webkit-user-select: text; 28 } 30 29 31 width: 32px; 32 height: 32px; 30 .indexed-database.content-view .indexed-database-details { 31 margin: 0.4em 1.2em; 32 } 33 33 34 margin-left: -16px; 35 margin-right: -16px;34 .indexed-database.content-view .details-section > .header { 35 display: none; 36 36 } -
trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseContentView.js
r216145 r216147 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 .content-view > .indeterminate-progress-spinner { 27 position: absolute; 28 top: 50%; 29 left: 50%; 26 WebInspector.IndexedDatabaseContentView = class IndexedDatabaseContentView extends WebInspector.ContentView 27 { 28 constructor(database) 29 { 30 super(database); 30 31 31 width: 32px; 32 height: 32px; 32 this._element.classList.add("indexed-database"); 33 33 34 margin-left: -16px; 35 margin-right: -16px; 36 } 34 this._databaseHostRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Host")); 35 this._databaseSecurityOriginRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Security Origin")); 36 this._databaseVersionRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Version")); 37 this._databaseGroup = new WebInspector.DetailsSectionGroup([this._databaseHostRow, this._databaseSecurityOriginRow, this._databaseVersionRow]); 38 this._databaseSection = new WebInspector.DetailsSection("indexed-database-details", WebInspector.UIString("Database"), [this._databaseGroup]); 39 40 this.element.append(this._databaseSection.element); 41 42 this._databaseHostRow.value = database.host; 43 this._databaseSecurityOriginRow.value = database.securityOrigin; 44 this._databaseVersionRow.value = database.version.toLocaleString(); 45 } 46 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js
r214405 r216147 73 73 74 74 for (let object of objects) { 75 if (object instanceof WebInspector.IndexedDatabase) { 76 console.assert(!this._database, "Shouldn't have multiple IndexedDatabase objects in the list."); 77 this._database = object; 78 } else if (object instanceof WebInspector.IndexedDatabaseObjectStore) { 75 if (object instanceof WebInspector.IndexedDatabaseObjectStore) { 79 76 console.assert(!this._database, "Shouldn't have multiple IndexedDatabase objects in the list."); 80 77 this._objectStore = object; -
trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js
r206195 r216147 179 179 180 180 if (treeElement instanceof WebInspector.FolderTreeElement || treeElement instanceof WebInspector.DatabaseHostTreeElement || 181 treeElement instanceof WebInspector.IndexedDatabaseHostTreeElement || treeElement instanceof WebInspector.IndexedDatabaseTreeElement 182 || treeElement instanceof WebInspector.ApplicationCacheManifestTreeElement) 181 treeElement instanceof WebInspector.IndexedDatabaseHostTreeElement || treeElement instanceof WebInspector.ApplicationCacheManifestTreeElement) 183 182 return; 184 183 185 184 if (treeElement instanceof WebInspector.StorageTreeElement || treeElement instanceof WebInspector.DatabaseTableTreeElement || 186 185 treeElement instanceof WebInspector.DatabaseTreeElement || treeElement instanceof WebInspector.ApplicationCacheFrameTreeElement || 187 treeElement instanceof WebInspector.IndexedDatabase ObjectStoreTreeElement || treeElement instanceof WebInspector.IndexedDatabaseObjectStoreIndexTreeElement) {186 treeElement instanceof WebInspector.IndexedDatabaseTreeElement || treeElement instanceof WebInspector.IndexedDatabaseObjectStoreTreeElement || treeElement instanceof WebInspector.IndexedDatabaseObjectStoreIndexTreeElement) { 188 187 WebInspector.showRepresentedObject(treeElement.representedObject); 189 188 return; -
trunk/Source/WebInspectorUI/UserInterface/Views/StorageTabContentView.js
r212400 r216147 65 65 representedObject instanceof WebInspector.DatabaseTableObject || representedObject instanceof WebInspector.DatabaseObject || 66 66 representedObject instanceof WebInspector.ApplicationCacheFrame || representedObject instanceof WebInspector.IndexedDatabaseObjectStore || 67 representedObject instanceof WebInspector.IndexedDatabase ObjectStoreIndex;67 representedObject instanceof WebInspector.IndexedDatabase || representedObject instanceof WebInspector.IndexedDatabaseObjectStoreIndex; 68 68 } 69 69 };
Note: See TracChangeset
for help on using the changeset viewer.