Bug 144110

Summary: Web Inspector: Make showing a content view work in the tab world
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch joepeck: review+, timothy: commit-queue-

Description Timothy Hatcher 2015-04-23 12:04:54 PDT
Move content view showing out of ResourceSidebarPanel and make it global and know how to show tabs.
Comment 1 Timothy Hatcher 2015-04-23 12:10:06 PDT
Created attachment 251464 [details]
Patch
Comment 2 Joseph Pecoraro 2015-04-23 13:58:31 PDT
Comment on attachment 251464 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=251464&action=review

r=me! Nice

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:28
> -    constructor()
> +    constructor(contentBrowser)

The call to "new WebInspector.DebuggerSidebarPanel" should pass the contentBrowser. I assume that should be in Main.js and was just missed in this patch.

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:193
>      showDefaultContentView()
>      {
> -        WebInspector.resourceSidebarPanel.showDefaultContentView();
> +        var currentTreeElement = this._contentTreeOutline.children[0];
> +        while (currentTreeElement && !currentTreeElement.root) {
> +            if (currentTreeElement instanceof WebInspector.ResourceTreeElement || currentTreeElement instanceof WebInspector.ScriptTreeElement) {
> +                currentTreeElement.revealAndSelect();
> +                return;
> +            }
> +
> +            currentTreeElement = currentTreeElement.traverseNextTreeElement(false, null, true);
> +        }
>      }

What should this show in the case that there is no tree element? Maybe then blank is fine, but perhaps it would be nice to have something.

E.g. a JSContext inspector with no scripts.
Comment 3 Timothy Hatcher 2015-04-23 16:07:39 PDT
Comment on attachment 251464 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=251464&action=review

>> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:28
>> +    constructor(contentBrowser)
> 
> The call to "new WebInspector.DebuggerSidebarPanel" should pass the contentBrowser. I assume that should be in Main.js and was just missed in this patch.

It is in DebuggerTabContentView. I added it locally but it wasn't in this patch. My patch sets are bleeding together in spots like this.

>> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:193
>>      }
> 
> What should this show in the case that there is no tree element? Maybe then blank is fine, but perhaps it would be nice to have something.
> 
> E.g. a JSContext inspector with no scripts.

I think blank is fine for now.
Comment 4 Timothy Hatcher 2015-04-25 18:36:19 PDT
r183322r183342

http://trac.webkit.org/log/?revs=183322-183342