Bug 173435 - Web Inspector: Group Inspector Style Sheets as part of the Stylesheets folder
Summary: Web Inspector: Group Inspector Style Sheets as part of the Stylesheets folder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 14:17 PDT by Devin Rousso
Modified: 2017-07-05 20:42 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.82 KB, patch)
2017-06-15 14:39 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2017-06-15 14:17:39 PDT
Currently, Inspector Style Sheet resources are only visible in the "All Resources" option.
Comment 1 Devin Rousso 2017-06-15 14:39:35 PDT
Created attachment 313012 [details]
Patch
Comment 2 Nikita Vasilyev 2017-06-19 12:21:56 PDT
Comment on attachment 313012 [details]
Patch

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

> Source/WebInspectorUI/ChangeLog:4
> +        Web Inspector: Group Inspector Style Sheets as part of the Stylesheets folder
> +        https://bugs.webkit.org/show_bug.cgi?id=173435

Would be nice to add a comment to make it clear it's Stylesheets folder in the *Resources* tab.

> Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js:230
> +            if (treeElement instanceof WebInspector.CSSStyleSheetTreeElement)
> +                return selectedScopeBarItem[WebInspector.ResourceSidebarPanel.ResourceTypeSymbol] === WebInspector.Resource.Type.Stylesheet;
> +

Non Web Inspector created stylesheets go through the code path a few lines below:

    return treeElement.resource.type === selectedScopeBarItem[WebInspector.ResourceSidebarPanel.ResourceTypeSymbol];

Since a Web Inspector created stylesheet doesn't have treeElement.resource.type, we need a special case.

Did I understand it correctly?
Comment 3 Joseph Pecoraro 2017-07-05 20:14:37 PDT
Comment on attachment 313012 [details]
Patch

This seems fine.
Comment 4 WebKit Commit Bot 2017-07-05 20:42:32 PDT
Comment on attachment 313012 [details]
Patch

Clearing flags on attachment: 313012

Committed r219185: <http://trac.webkit.org/changeset/219185>
Comment 5 WebKit Commit Bot 2017-07-05 20:42:34 PDT
All reviewed patches have been landed.  Closing bug.