Changeset 220004 in webkit
- Timestamp:
- Jul 28, 2017 10:27:43 AM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r219972 r220004 1 2017-07-28 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Cleanup unused/invalid parameters for TreeElements 4 https://bugs.webkit.org/show_bug.cgi?id=173987 5 6 Reviewed by Brian Burg. 7 8 * UserInterface/Views/TreeElement.js: 9 * UserInterface/Views/GeneralTreeElement.js: 10 11 * UserInterface/Views/ApplicationCacheFrameTreeElement.js: 12 * UserInterface/Views/BreakpointTreeElement.js: 13 * UserInterface/Views/CSSStyleSheetTreeElement.js: 14 * UserInterface/Views/CallFrameTreeElement.js: 15 * UserInterface/Views/ContentFlowTreeElement.js: 16 * UserInterface/Views/DOMNodeTreeElement.js: 17 * UserInterface/Views/DatabaseTableTreeElement.js: 18 * UserInterface/Views/DatabaseTreeElement.js: 19 * UserInterface/Views/FolderTreeElement.js: 20 * UserInterface/Views/FolderizedTreeElement.js: 21 * UserInterface/Views/FrameTreeElement.js: 22 * UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js: 23 * UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js: 24 * UserInterface/Views/IndexedDatabaseTreeElement.js: 25 * UserInterface/Views/IssueTreeElement.js: 26 * UserInterface/Views/ObjectTreeBaseTreeElement.js: 27 * UserInterface/Views/ProfileNodeTreeElement.js: 28 * UserInterface/Views/ResourceTreeElement.js: 29 * UserInterface/Views/ScriptTreeElement.js: 30 * UserInterface/Views/SearchResultTreeElement.js: 31 * UserInterface/Views/SourceCodeTreeElement.js: 32 * UserInterface/Views/SourceMapResourceTreeElement.js: 33 * UserInterface/Views/StorageTreeElement.js: 34 * UserInterface/Views/TimelineRecordTreeElement.js: 35 * UserInterface/Views/TypeTreeElement.js: 36 1 37 2017-07-26 Devin Rousso <drousso@apple.com> 2 38 -
trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameTreeElement.js
r210311 r220004 30 30 console.assert(representedObject instanceof WebInspector.ApplicationCacheFrame); 31 31 32 super("application-cache-frame", "", "", representedObject, false); 32 const title = null; 33 const subtitle = null; 34 super("application-cache-frame", title, subtitle, representedObject); 33 35 34 36 this.updateTitles(); -
trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js
r214354 r220004 33 33 className = WebInspector.BreakpointTreeElement.GenericLineIconStyleClassName; 34 34 35 super(["breakpoint", className], title, null, breakpoint, false); 35 const subtitle = null; 36 super(["breakpoint", className], title, subtitle, breakpoint); 36 37 37 38 this._breakpoint = breakpoint; -
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleSheetTreeElement.js
r217258 r220004 31 31 console.assert(styleSheet.isInspectorStyleSheet()); 32 32 33 const classNames = ["stylesheet", "stylesheet-icon"]; 34 const title = WebInspector.UIString("Inspector Style Sheet"); 35 const subtitle = null; 36 const hasChildren = false; 37 super(styleSheet, classNames, title, subtitle, styleSheet, hasChildren); 33 super(styleSheet, ["stylesheet", "stylesheet-icon"], WebInspector.UIString("Inspector Style Sheet")); 38 34 } 39 35 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.js
r209062 r220004 32 32 let className = WebInspector.CallFrameView.iconClassNameForCallFrame(callFrame); 33 33 let title = callFrame.functionName || WebInspector.UIString("(anonymous function)"); 34 35 super(["call-frame", className], title, null, callFrame, false);34 const subtitle = null; 35 super(["call-frame", className], title, subtitle, callFrame); 36 36 37 37 this._callFrame = callFrame; -
trunk/Source/WebInspectorUI/UserInterface/Views/ContentFlowTreeElement.js
r195303 r220004 35 35 console.assert(representedObject instanceof WebInspector.ContentFlow); 36 36 37 super("content-flow-icon", representedObject.name, null, representedObject, false); 37 const subtitle = null; 38 super("content-flow-icon", representedObject.name, subtitle, representedObject); 38 39 } 39 40 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeTreeElement.js
r216681 r220004 30 30 console.assert(domNode instanceof WebInspector.DOMNode); 31 31 32 super("dom-node", domNode.displayName, null, domNode, true); 32 const subtitle = null; 33 super("dom-node", domNode.displayName, subtitle, domNode, {hasChildren: true}); 33 34 34 35 this.status = WebInspector.linkifyNodeReferenceElement(domNode, WebInspector.createGoToArrowButton()); -
trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTableTreeElement.js
r195303 r220004 30 30 console.assert(representedObject instanceof WebInspector.DatabaseTableObject); 31 31 32 super("database-table-icon", representedObject.name, null, representedObject, false); 32 const subtitle = null; 33 super("database-table-icon", representedObject.name, subtitle, representedObject); 33 34 } 34 35 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTreeElement.js
r195303 r220004 30 30 console.assert(representedObject instanceof WebInspector.DatabaseObject); 31 31 32 super("database-icon", representedObject.name, null, representedObject, true); 32 const subtitle = null; 33 super("database-icon", representedObject.name, subtitle, representedObject, {hasChildren: true}); 33 34 34 35 this.hasChildren = false; -
trunk/Source/WebInspectorUI/UserInterface/Views/FolderTreeElement.js
r208337 r220004 32 32 const classNames = [WebInspector.FolderTreeElement.FolderIconStyleClassName]; 33 33 const subtitle = null; 34 const hasChildren = true; 35 super(classNames, title, subtitle, representedObject, hasChildren); 34 super(classNames, title, subtitle, representedObject, {hasChildren: true}); 36 35 } 37 36 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/FolderizedTreeElement.js
r219014 r220004 26 26 WebInspector.FolderizedTreeElement = class FolderizedTreeElement extends WebInspector.GeneralTreeElement 27 27 { 28 constructor(classNames, title, subtitle, representedObject , hasChildren)29 { 30 super(classNames, title, subtitle, representedObject , hasChildren);28 constructor(classNames, title, subtitle, representedObject) 29 { 30 super(classNames, title, subtitle, representedObject); 31 31 32 32 this.shouldRefreshChildren = true; -
trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js
r219269 r220004 26 26 WebInspector.FrameTreeElement = class FrameTreeElement extends WebInspector.ResourceTreeElement 27 27 { 28 constructor(frame , representedObject)28 constructor(frame) 29 29 { 30 30 console.assert(frame instanceof WebInspector.Frame); 31 31 32 super(frame.mainResource, representedObject ||frame);32 super(frame.mainResource, frame); 33 33 34 34 this._frame = frame; -
trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js
r214354 r220004 26 26 WebInspector.GeneralTreeElement = class GeneralTreeElement extends WebInspector.TreeElement 27 27 { 28 constructor(classNames, title, subtitle, representedObject, hasChildren)29 { 30 super("", representedObject, hasChildren);28 constructor(classNames, title, subtitle, representedObject, options) 29 { 30 super("", representedObject, options); 31 31 32 32 this.classNames = classNames; -
trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js
r195303 r220004 30 30 console.assert(objectStoreIndex instanceof WebInspector.IndexedDatabaseObjectStoreIndex); 31 31 32 super("database-table-icon", objectStoreIndex.name, null, objectStoreIndex, false); 32 const subtitle = null; 33 super("database-table-icon", objectStoreIndex.name, subtitle, objectStoreIndex); 33 34 34 35 this._objectStoreIndex = objectStoreIndex; -
trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js
r195303 r220004 30 30 console.assert(objectStore instanceof WebInspector.IndexedDatabaseObjectStore); 31 31 32 super("database-table-icon", objectStore.name, null, objectStore, !!objectStore.indexes.length); 32 const subtitle = null; 33 super("database-table-icon", objectStore.name, subtitle, objectStore, {hasChildren: !!objectStore.indexes.length}); 33 34 34 35 this._objectStore = objectStore; -
trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseTreeElement.js
r195303 r220004 30 30 console.assert(indexedDatabase instanceof WebInspector.IndexedDatabase); 31 31 32 super("database-icon", indexedDatabase.name, null, indexedDatabase, !!indexedDatabase.objectStores.length); 32 const subtitle = null; 33 super("database-icon", indexedDatabase.name, subtitle, indexedDatabase, {hasChildren: !!indexedDatabase.objectStores.length}); 33 34 34 35 this._indexedDatabase = indexedDatabase; -
trunk/Source/WebInspectorUI/UserInterface/Views/IssueTreeElement.js
r214064 r220004 38 38 } 39 39 40 super([WebInspector.IssueTreeElement.StyleClassName, levelStyleClassName], null, null, issueMessage, false); 40 const title = null; 41 const subtitle = null; 42 super([WebInspector.IssueTreeElement.StyleClassName, levelStyleClassName], title, subtitle, issueMessage); 41 43 42 44 this._issueMessage = issueMessage; -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js
r215630 r220004 32 32 console.assert(!property || property instanceof WebInspector.PropertyDescriptor); 33 33 34 super(null, null, null, representedObject, false); 34 const classNames = null; 35 const title = null; 36 const subtitle = null; 37 super(classNames, title, subtitle, representedObject); 35 38 36 39 this._property = property; -
trunk/Source/WebInspectorUI/UserInterface/Views/ProfileNodeTreeElement.js
r195303 r220004 73 73 className = WebInspector.CallFrameView.EventListenerIconStyleClassName; 74 74 75 var hasChildren = !!profileNode.childNodes.length; 76 77 super([className], title, subtitle, profileNode, hasChildren); 75 super([className], title, subtitle, profileNode, {hasChildren: !!profileNode.childNodes.length}); 78 76 79 77 this._profileNode = profileNode; -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js
r219269 r220004 30 30 console.assert(resource instanceof WebInspector.Resource); 31 31 32 super(resource, ["resource", WebInspector.ResourceTreeElement.ResourceIconStyleClassName, resource.type], "", "", representedObject || resource, false); 32 const title = null; 33 const subtitle = null; 34 super(resource, ["resource", WebInspector.ResourceTreeElement.ResourceIconStyleClassName, resource.type], title, subtitle, representedObject || resource); 33 35 34 36 this._updateResource(resource); -
trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTreeElement.js
r208304 r220004 30 30 console.assert(script instanceof WebInspector.Script); 31 31 32 super(script, "script", null, null, script, false); 32 const title = null; 33 const subtitle = null; 34 super(script, "script", title, subtitle); 33 35 34 36 this.mainTitle = script.displayName; … … 36 38 if (script.url && !script.dynamicallyAddedScriptElement) { 37 39 // Show the host as the subtitle if it is different from the main title. 38 var subtitle= WebInspector.displayNameForHost(script.urlComponents.host);39 this.subtitle = this.mainTitle !== subtitle ? subtitle: null;40 let host = WebInspector.displayNameForHost(script.urlComponents.host); 41 this.subtitle = this.mainTitle !== host ? host : null; 40 42 41 43 this.tooltip = script.url; -
trunk/Source/WebInspectorUI/UserInterface/Views/SearchResultTreeElement.js
r214864 r220004 31 31 32 32 var title = WebInspector.SearchResultTreeElement.truncateAndHighlightTitle(representedObject.title, representedObject.searchTerm, representedObject.sourceCodeTextRange); 33 34 super(representedObject.className, title, null, representedObject, false);33 const subtitle = null; 34 super(representedObject.className, title, subtitle, representedObject); 35 35 } 36 36 -
trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTreeElement.js
r208520 r220004 26 26 WebInspector.SourceCodeTreeElement = class SourceCodeTreeElement extends WebInspector.FolderizedTreeElement 27 27 { 28 constructor(sourceCode, classNames, title, subtitle, representedObject , hasChildren)28 constructor(sourceCode, classNames, title, subtitle, representedObject) 29 29 { 30 30 console.assert(sourceCode instanceof WebInspector.SourceCode); 31 31 32 super(classNames, title, subtitle, representedObject || sourceCode , hasChildren);32 super(classNames, title, subtitle, representedObject || sourceCode); 33 33 34 34 this._updateSourceCode(sourceCode); -
trunk/Source/WebInspectorUI/UserInterface/Views/SourceMapResourceTreeElement.js
r182042 r220004 26 26 WebInspector.SourceMapResourceTreeElement = class SourceMapResourceTreeElement extends WebInspector.ResourceTreeElement 27 27 { 28 constructor(sourceMapResource , representedObject)28 constructor(sourceMapResource) 29 29 { 30 30 console.assert(sourceMapResource instanceof WebInspector.SourceMapResource); -
trunk/Source/WebInspectorUI/UserInterface/Views/StorageTreeElement.js
r195303 r220004 28 28 constructor(classNames, title, representedObject) 29 29 { 30 super(classNames, title, null, representedObject, false); 30 const subtitle = null; 31 super(classNames, title, subtitle, representedObject); 31 32 32 33 this.flattened = false; -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js
r195303 r220004 56 56 let title = WebInspector.TimelineTabContentView.displayNameForRecord(timelineRecord); 57 57 58 super([iconStyleClass], title, subtitle, representedObject || timelineRecord , false);58 super([iconStyleClass], title, subtitle, representedObject || timelineRecord); 59 59 60 60 this._record = timelineRecord; -
trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js
r219270 r220004 29 29 WebInspector.TreeElement = class TreeElement extends WebInspector.Object 30 30 { 31 constructor(title, representedObject, hasChildren)31 constructor(title, representedObject, options = {}) 32 32 { 33 33 super(); 34 34 35 35 this._title = title; 36 this.representedObject = (representedObject || {});36 this.representedObject = representedObject || {}; 37 37 38 38 if (this.representedObject.__treeElementIdentifier) … … 47 47 this.expanded = false; 48 48 this.selected = false; 49 this.hasChildren = hasChildren;49 this.hasChildren = options.hasChildren; 50 50 this.children = []; 51 51 this.treeOutline = null; -
trunk/Source/WebInspectorUI/UserInterface/Views/TypeTreeElement.js
r211462 r220004 28 28 constructor(name, structureDescription, isPrototype) 29 29 { 30 super(null, null, null, structureDescription || null, false); 30 const classNames = null; 31 const title = null; 32 const subtitle = null; 33 super(classNames, title, subtitle, structureDescription || null); 31 34 32 35 console.assert(!structureDescription || structureDescription instanceof WebInspector.StructureDescription);
Note: See TracChangeset
for help on using the changeset viewer.