Changeset 208441 in webkit
- Timestamp:
- Nov 9, 2016 10:25:30 AM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r208348 r208441 1 2016-11-09 Devin Rousso <dcrousso+webkit@gmail.com> 2 3 Web Inspector: Allow FolderTreeElement to display content when selected 4 https://bugs.webkit.org/show_bug.cgi?id=164407 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Main.html: 9 Add CollectionContentView and TitleView. 10 11 * UserInterface/Base/Main.js: 12 * UserInterface/Views/ContentView.js: 13 (WebInspector.ContentView.createFromRepresentedObject): 14 (WebInspector.ContentView.isViewable): 15 Add support for Collection as the representedObject of a content view. 16 17 * UserInterface/Views/CollectionContentView.css: Added. 18 (.content-view.collection): 19 (.content-view.collection > .content-view): 20 * UserInterface/Views/CollectionContentView.js: Added. 21 (WebInspector.CollectionContentView): 22 (WebInspector.CollectionContentView.prototype.initialLayout): 23 (WebInspector.CollectionContentView.prototype._addContentViewForItem): 24 (WebInspector.CollectionContentView.prototype._removeContentViewForItem): 25 (WebInspector.CollectionContentView.prototype._handleItemAdded): 26 (WebInspector.CollectionContentView.prototype._handleItemRemoved): 27 (WebInspector.CollectionContentView.prototype._handleContentError): 28 Takes in a Collection when constructed, and attempts to display a sub-ContentView for each 29 item in the collection if the type of the collection is viewable en masse. Currently, this 30 is only supported for WebInspector.Resource.Type.Image collections. 31 32 * UserInterface/Views/ResourceContentView.js: 33 (WebInspector.ResourceContentView.prototype._contentError): 34 Dispatch an event whenever the content fails to load. 35 36 * UserInterface/Views/ResourceSidebarPanel.js: 37 (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange): 38 * UserInterface/Views/ResourcesTabContentView.js: 39 (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject): 40 Allow FolderTreeElements to be selected. 41 42 * UserInterface/Views/TitleView.css: Added. 43 (.title-view): 44 * UserInterface/Views/TitleView.js: Added. 45 (WebInspector.TitleView): 46 Basic view that displays the given text in the center of the viewable area. 47 1 48 2016-11-03 Nikita Vasilyev <nvasilyev@apple.com> 2 49 -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r208304 r208441 1111 1111 return WebInspector.ResourcesTabContentView; 1112 1112 1113 if (representedObject instanceof WebInspector.Collection) 1114 return WebInspector.CollectionContentView; 1115 1113 1116 return null; 1114 1117 }; -
trunk/Source/WebInspectorUI/UserInterface/Main.html
r208304 r208441 50 50 <link rel="stylesheet" href="Views/ClusterContentView.css"> 51 51 <link rel="stylesheet" href="Views/CodeMirrorOverrides.css"> 52 <link rel="stylesheet" href="Views/CollectionContentView.css"> 52 53 <link rel="stylesheet" href="Views/ColorPicker.css"> 53 54 <link rel="stylesheet" href="Views/ColorWheel.css"> … … 176 177 <link rel="stylesheet" href="Views/TimelineTabContentView.css"> 177 178 <link rel="stylesheet" href="Views/TimelineView.css"> 179 <link rel="stylesheet" href="Views/TitleView.css"> 178 180 <link rel="stylesheet" href="Views/Toolbar.css"> 179 181 <link rel="stylesheet" href="Views/TreeElementStatusButton.css"> … … 490 492 <script src="Views/CodeMirrorFormatters.js"></script> 491 493 <script src="Views/CodeMirrorTextMarkers.js"></script> 494 <script src="Views/CollectionContentView.js"></script> 492 495 <script src="Views/ColorPicker.js"></script> 493 496 <script src="Views/ColorWheel.js"></script> … … 653 656 <script src="Views/TimelineRecordingProgressView.js"></script> 654 657 <script src="Views/TimelineRuler.js"></script> 658 <script src="Views/TitleView.js"></script> 655 659 <script src="Views/ToggleButtonNavigationItem.js"></script> 656 660 <script src="Views/TextToggleButtonNavigationItem.js"></script> -
trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js
r200064 r208441 142 142 return new WebInspector.HeapSnapshotClusterContentView(representedObject, extraArguments); 143 143 144 if (representedObject instanceof WebInspector.Collection) 145 return new WebInspector.CollectionContentView(representedObject, extraArguments); 146 144 147 if (typeof representedObject === "string" || representedObject instanceof String) 145 148 return new WebInspector.TextContentView(representedObject, extraArguments); … … 244 247 return true; 245 248 if (representedObject instanceof WebInspector.HeapSnapshotProxy || representedObject instanceof WebInspector.HeapSnapshotDiffProxy) 249 return true; 250 if (representedObject instanceof WebInspector.Collection) 246 251 return true; 247 252 if (typeof representedObject === "string" || representedObject instanceof String) -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js
r208091 r208441 105 105 this.element.removeChildren(); 106 106 this.element.appendChild(WebInspector.createMessageTextView(error, true)); 107 108 this.dispatchEventToListeners(WebInspector.ResourceContentView.Event.ContentError); 107 109 } 108 110 … … 133 135 } 134 136 }; 137 138 WebInspector.ResourceContentView.Event = { 139 ContentError: "resource-content-view-content-error", 140 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
r208337 r208441 114 114 // A custom implementation is needed for this since the frames are populated lazily. 115 115 116 if (!this._mainFrameTreeElement && (representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.Frame )) {116 if (!this._mainFrameTreeElement && (representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.Frame || representedObject instanceof WebInspector.Collection)) { 117 117 // All resources are under the main frame, so we need to return early if we don't have the main frame yet. 118 118 return null; … … 441 441 { 442 442 let treeElement = event.data.selectedElement; 443 if (!treeElement || treeElement instanceof WebInspector.FolderTreeElement) 444 return; 445 446 if (treeElement instanceof WebInspector.ResourceTreeElement 443 if (!treeElement) 444 return; 445 446 if (treeElement instanceof WebInspector.FolderTreeElement 447 || treeElement instanceof WebInspector.ResourceTreeElement 447 448 || treeElement instanceof WebInspector.ScriptTreeElement 448 449 || treeElement instanceof WebInspector.ContentFlowTreeElement) { -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js
r208091 r208441 60 60 || representedObject instanceof WebInspector.Resource 61 61 || representedObject instanceof WebInspector.Script 62 || representedObject instanceof WebInspector.ContentFlow; 62 || representedObject instanceof WebInspector.ContentFlow 63 || representedObject instanceof WebInspector.Collection; 63 64 } 64 65 };
Note: See TracChangeset
for help on using the changeset viewer.