Bug 144110 - Web Inspector: Make showing a content view work in the tab world
Summary: Web Inspector: Make showing a content view work in the tab world
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2015-04-23 12:04 PDT by Timothy Hatcher
Modified: 2015-04-25 18:36 PDT (History)
7 users (show)

See Also:


Attachments
Patch (58.04 KB, patch)
2015-04-23 12:10 PDT, Timothy Hatcher
joepeck: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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