Bug 164407

Summary: Web Inspector: Allow FolderTreeElement to display content when selected
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 145906    
Attachments:
Description Flags
Patch
none
[Image] After Patch is applied none

Description Devin Rousso 2016-11-04 00:09:59 PDT
Currently, selecting a FolderTreeElement in the Resources sidebar will not change the content of the Resources tab.  This is awkward, and isn't a good experience for the user.
Comment 1 Radar WebKit Bug Importer 2016-11-04 00:10:23 PDT
<rdar://problem/29106728>
Comment 2 Devin Rousso 2016-11-04 00:16:32 PDT
Created attachment 293873 [details]
Patch
Comment 3 Timothy Hatcher 2016-11-04 09:49:30 PDT
Screenshot?
Comment 4 Devin Rousso 2016-11-04 12:10:41 PDT
Created attachment 293909 [details]
[Image] After Patch is applied
Comment 5 Joseph Pecoraro 2016-11-08 11:27:02 PST
Comment on attachment 293873 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.css:33
> +    flex-grow: 1;

o.O

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:43
> +        switch (this.representedObject.typeVerifier) {
> +        case WebInspector.Collection.TypeVerifier.Frame:

Style: Putting this large switch into a static function would make it way easier to read the constructor, and you could half the number of lines (returns instead of breaks).

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:98
> +     // Public

Style: Weird whitespace.

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:110
> +     // Private

Style: Weird whitespace.

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:169
> +        let item = event.data.item;
> +        if (!item)
> +            return;

This seems unnecessarily safe. If Item Added doesn't contain an item, then that would be a bigger bug, workaround here hides it. Drop the early return and inline?

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:178
> +        let item = event.data.item;
> +        if (!item)
> +            return;

Ditto

> Source/WebInspectorUI/UserInterface/Views/TitleView.css:36
> +    font-weight: lighter;

o.O
Comment 6 WebKit Commit Bot 2016-11-09 10:28:35 PST
Comment on attachment 293873 [details]
Patch

Clearing flags on attachment: 293873

Committed r208441: <http://trac.webkit.org/changeset/208441>
Comment 7 WebKit Commit Bot 2016-11-09 10:28:38 PST
All reviewed patches have been landed.  Closing bug.