Changeset 220004 in webkit


Ignore:
Timestamp:
Jul 28, 2017 10:27:43 AM (7 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Cleanup unused/invalid parameters for TreeElements
https://bugs.webkit.org/show_bug.cgi?id=173987

Reviewed by Brian Burg.

  • UserInterface/Views/TreeElement.js:
  • UserInterface/Views/GeneralTreeElement.js:
  • UserInterface/Views/ApplicationCacheFrameTreeElement.js:
  • UserInterface/Views/BreakpointTreeElement.js:
  • UserInterface/Views/CSSStyleSheetTreeElement.js:
  • UserInterface/Views/CallFrameTreeElement.js:
  • UserInterface/Views/ContentFlowTreeElement.js:
  • UserInterface/Views/DOMNodeTreeElement.js:
  • UserInterface/Views/DatabaseTableTreeElement.js:
  • UserInterface/Views/DatabaseTreeElement.js:
  • UserInterface/Views/FolderTreeElement.js:
  • UserInterface/Views/FolderizedTreeElement.js:
  • UserInterface/Views/FrameTreeElement.js:
  • UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js:
  • UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js:
  • UserInterface/Views/IndexedDatabaseTreeElement.js:
  • UserInterface/Views/IssueTreeElement.js:
  • UserInterface/Views/ObjectTreeBaseTreeElement.js:
  • UserInterface/Views/ProfileNodeTreeElement.js:
  • UserInterface/Views/ResourceTreeElement.js:
  • UserInterface/Views/ScriptTreeElement.js:
  • UserInterface/Views/SearchResultTreeElement.js:
  • UserInterface/Views/SourceCodeTreeElement.js:
  • UserInterface/Views/SourceMapResourceTreeElement.js:
  • UserInterface/Views/StorageTreeElement.js:
  • UserInterface/Views/TimelineRecordTreeElement.js:
  • UserInterface/Views/TypeTreeElement.js:
Location:
trunk/Source/WebInspectorUI
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r219972 r220004  
     12017-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
    1372017-07-26  Devin Rousso  <drousso@apple.com>
    238
  • trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameTreeElement.js

    r210311 r220004  
    3030        console.assert(representedObject instanceof WebInspector.ApplicationCacheFrame);
    3131
    32         super("application-cache-frame", "", "", representedObject, false);
     32        const title = null;
     33        const subtitle = null;
     34        super("application-cache-frame", title, subtitle, representedObject);
    3335
    3436        this.updateTitles();
  • trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js

    r214354 r220004  
    3333            className = WebInspector.BreakpointTreeElement.GenericLineIconStyleClassName;
    3434
    35         super(["breakpoint", className], title, null, breakpoint, false);
     35        const subtitle = null;
     36        super(["breakpoint", className], title, subtitle, breakpoint);
    3637
    3738        this._breakpoint = breakpoint;
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleSheetTreeElement.js

    r217258 r220004  
    3131        console.assert(styleSheet.isInspectorStyleSheet());
    3232
    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"));
    3834    }
    3935};
  • trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.js

    r209062 r220004  
    3232        let className = WebInspector.CallFrameView.iconClassNameForCallFrame(callFrame);
    3333        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);
    3636
    3737        this._callFrame = callFrame;
  • trunk/Source/WebInspectorUI/UserInterface/Views/ContentFlowTreeElement.js

    r195303 r220004  
    3535        console.assert(representedObject instanceof WebInspector.ContentFlow);
    3636
    37         super("content-flow-icon", representedObject.name, null, representedObject, false);
     37        const subtitle = null;
     38        super("content-flow-icon", representedObject.name, subtitle, representedObject);
    3839    }
    3940};
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeTreeElement.js

    r216681 r220004  
    3030        console.assert(domNode instanceof WebInspector.DOMNode);
    3131
    32         super("dom-node", domNode.displayName, null, domNode, true);
     32        const subtitle = null;
     33        super("dom-node", domNode.displayName, subtitle, domNode, {hasChildren: true});
    3334
    3435        this.status = WebInspector.linkifyNodeReferenceElement(domNode, WebInspector.createGoToArrowButton());
  • trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTableTreeElement.js

    r195303 r220004  
    3030        console.assert(representedObject instanceof WebInspector.DatabaseTableObject);
    3131
    32         super("database-table-icon", representedObject.name, null, representedObject, false);
     32        const subtitle = null;
     33        super("database-table-icon", representedObject.name, subtitle, representedObject);
    3334    }
    3435};
  • trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTreeElement.js

    r195303 r220004  
    3030        console.assert(representedObject instanceof WebInspector.DatabaseObject);
    3131
    32         super("database-icon", representedObject.name, null, representedObject, true);
     32        const subtitle = null;
     33        super("database-icon", representedObject.name, subtitle, representedObject, {hasChildren: true});
    3334
    3435        this.hasChildren = false;
  • trunk/Source/WebInspectorUI/UserInterface/Views/FolderTreeElement.js

    r208337 r220004  
    3232        const classNames = [WebInspector.FolderTreeElement.FolderIconStyleClassName];
    3333        const subtitle = null;
    34         const hasChildren = true;
    35         super(classNames, title, subtitle, representedObject, hasChildren);
     34        super(classNames, title, subtitle, representedObject, {hasChildren: true});
    3635    }
    3736};
  • trunk/Source/WebInspectorUI/UserInterface/Views/FolderizedTreeElement.js

    r219014 r220004  
    2626WebInspector.FolderizedTreeElement = class FolderizedTreeElement extends WebInspector.GeneralTreeElement
    2727{
    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);
    3131
    3232        this.shouldRefreshChildren = true;
  • trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js

    r219269 r220004  
    2626WebInspector.FrameTreeElement = class FrameTreeElement extends WebInspector.ResourceTreeElement
    2727{
    28     constructor(frame, representedObject)
     28    constructor(frame)
    2929    {
    3030        console.assert(frame instanceof WebInspector.Frame);
    3131
    32         super(frame.mainResource, representedObject || frame);
     32        super(frame.mainResource, frame);
    3333
    3434        this._frame = frame;
  • trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js

    r214354 r220004  
    2626WebInspector.GeneralTreeElement = class GeneralTreeElement extends WebInspector.TreeElement
    2727{
    28     constructor(classNames, title, subtitle, representedObject, hasChildren)
    29     {
    30         super("", representedObject, hasChildren);
     28    constructor(classNames, title, subtitle, representedObject, options)
     29    {
     30        super("", representedObject, options);
    3131
    3232        this.classNames = classNames;
  • trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js

    r195303 r220004  
    3030        console.assert(objectStoreIndex instanceof WebInspector.IndexedDatabaseObjectStoreIndex);
    3131
    32         super("database-table-icon", objectStoreIndex.name, null, objectStoreIndex, false);
     32        const subtitle = null;
     33        super("database-table-icon", objectStoreIndex.name, subtitle, objectStoreIndex);
    3334
    3435        this._objectStoreIndex = objectStoreIndex;
  • trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js

    r195303 r220004  
    3030        console.assert(objectStore instanceof WebInspector.IndexedDatabaseObjectStore);
    3131
    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});
    3334
    3435        this._objectStore = objectStore;
  • trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseTreeElement.js

    r195303 r220004  
    3030        console.assert(indexedDatabase instanceof WebInspector.IndexedDatabase);
    3131
    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});
    3334
    3435        this._indexedDatabase = indexedDatabase;
  • trunk/Source/WebInspectorUI/UserInterface/Views/IssueTreeElement.js

    r214064 r220004  
    3838        }
    3939
    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);
    4143
    4244        this._issueMessage = issueMessage;
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js

    r215630 r220004  
    3232        console.assert(!property || property instanceof WebInspector.PropertyDescriptor);
    3333
    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);
    3538
    3639        this._property = property;
  • trunk/Source/WebInspectorUI/UserInterface/Views/ProfileNodeTreeElement.js

    r195303 r220004  
    7373            className = WebInspector.CallFrameView.EventListenerIconStyleClassName;
    7474
    75         var hasChildren = !!profileNode.childNodes.length;
    76 
    77         super([className], title, subtitle, profileNode, hasChildren);
     75        super([className], title, subtitle, profileNode, {hasChildren: !!profileNode.childNodes.length});
    7876
    7977        this._profileNode = profileNode;
  • trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js

    r219269 r220004  
    3030        console.assert(resource instanceof WebInspector.Resource);
    3131
    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);
    3335
    3436        this._updateResource(resource);
  • trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTreeElement.js

    r208304 r220004  
    3030        console.assert(script instanceof WebInspector.Script);
    3131
    32         super(script, "script", null, null, script, false);
     32        const title = null;
     33        const subtitle = null;
     34        super(script, "script", title, subtitle);
    3335
    3436        this.mainTitle = script.displayName;
     
    3638        if (script.url && !script.dynamicallyAddedScriptElement) {
    3739            // 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;
    4042
    4143            this.tooltip = script.url;
  • trunk/Source/WebInspectorUI/UserInterface/Views/SearchResultTreeElement.js

    r214864 r220004  
    3131
    3232        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);
    3535    }
    3636
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTreeElement.js

    r208520 r220004  
    2626WebInspector.SourceCodeTreeElement = class SourceCodeTreeElement extends WebInspector.FolderizedTreeElement
    2727{
    28     constructor(sourceCode, classNames, title, subtitle, representedObject, hasChildren)
     28    constructor(sourceCode, classNames, title, subtitle, representedObject)
    2929    {
    3030        console.assert(sourceCode instanceof WebInspector.SourceCode);
    3131
    32         super(classNames, title, subtitle, representedObject || sourceCode, hasChildren);
     32        super(classNames, title, subtitle, representedObject || sourceCode);
    3333
    3434        this._updateSourceCode(sourceCode);
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceMapResourceTreeElement.js

    r182042 r220004  
    2626WebInspector.SourceMapResourceTreeElement = class SourceMapResourceTreeElement extends WebInspector.ResourceTreeElement
    2727{
    28     constructor(sourceMapResource, representedObject)
     28    constructor(sourceMapResource)
    2929    {
    3030        console.assert(sourceMapResource instanceof WebInspector.SourceMapResource);
  • trunk/Source/WebInspectorUI/UserInterface/Views/StorageTreeElement.js

    r195303 r220004  
    2828    constructor(classNames, title, representedObject)
    2929    {
    30         super(classNames, title, null, representedObject, false);
     30        const subtitle = null;
     31        super(classNames, title, subtitle, representedObject);
    3132
    3233        this.flattened = false;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js

    r195303 r220004  
    5656        let title = WebInspector.TimelineTabContentView.displayNameForRecord(timelineRecord);
    5757
    58         super([iconStyleClass], title, subtitle, representedObject || timelineRecord, false);
     58        super([iconStyleClass], title, subtitle, representedObject || timelineRecord);
    5959
    6060        this._record = timelineRecord;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js

    r219270 r220004  
    2929WebInspector.TreeElement = class TreeElement extends WebInspector.Object
    3030{
    31     constructor(title, representedObject, hasChildren)
     31    constructor(title, representedObject, options = {})
    3232    {
    3333        super();
    3434
    3535        this._title = title;
    36         this.representedObject = (representedObject || {});
     36        this.representedObject = representedObject || {};
    3737
    3838        if (this.representedObject.__treeElementIdentifier)
     
    4747        this.expanded = false;
    4848        this.selected = false;
    49         this.hasChildren = hasChildren;
     49        this.hasChildren = options.hasChildren;
    5050        this.children = [];
    5151        this.treeOutline = null;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TypeTreeElement.js

    r211462 r220004  
    2828    constructor(name, structureDescription, isPrototype)
    2929    {
    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);
    3134
    3235        console.assert(!structureDescription || structureDescription instanceof WebInspector.StructureDescription);
Note: See TracChangeset for help on using the changeset viewer.