Bug 152647 - Web Inspector: List all resources that are initiated by the selected resource in the Network tab
Summary: Web Inspector: List all resources that are initiated by the selected resource...
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: InRadar
Depends on:
Blocks:
 
Reported: 2016-01-01 21:10 PST by Devin Rousso
Modified: 2016-01-02 18:12 PST (History)
8 users (show)

See Also:


Attachments
Patch (11.14 KB, patch)
2016-01-01 21:25 PST, Devin Rousso
timothy: review+
Details | Formatted Diff | Diff
After patch is applied (123.43 KB, image/png)
2016-01-01 21:26 PST, Devin Rousso
no flags Details
Patch (3.72 KB, patch)
2016-01-02 13:58 PST, Devin Rousso
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch (10.56 KB, patch)
2016-01-02 15:39 PST, Devin Rousso
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch (10.48 KB, patch)
2016-01-02 15:42 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (12.68 KB, patch)
2016-01-02 18:09 PST, 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 2016-01-01 21:10:54 PST
While debugging 3rd party scripts, I often find myself wanting to be able to see what each resource loads.  It is currently possible to just look at each loaded resource and compare all the "Initiated" values, but this is very time consuming if there are a lot of loaded resources.  As such, I think that adding another section just below that called "Initiated" which lists all the resources loaded by the selected one would be helpful.
Comment 1 Radar WebKit Bug Importer 2016-01-01 21:11:06 PST
<rdar://problem/24031233>
Comment 2 Devin Rousso 2016-01-01 21:25:46 PST
Created attachment 268082 [details]
Patch
Comment 3 Devin Rousso 2016-01-01 21:26:19 PST
Created attachment 268083 [details]
After patch is applied
Comment 4 Timothy Hatcher 2016-01-02 12:48:29 PST
Comment on attachment 268082 [details]
Patch

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

Very cool!

> Source/WebInspectorUI/UserInterface/Base/Main.js:2170
> +WebInspector.createResourceLink = function(resource, className)
> +{
> +    function handleClick(event)
> +    {
> +        event.stopPropagation();
> +        event.preventDefault();
> +
> +        WebInspector.showRepresentedObject(resource);
> +    }
> +
> +    let linkNode = document.createElement("a");
> +    linkNode.classList.add("resource-link", className);
> +    linkNode.title = resource.url;
> +    linkNode.textContent = (resource.urlComponents.lastPathComponent || resource.url).insertWordBreakCharacters();
> +    linkNode.addEventListener("click", handleClick.bind(this));
> +    return linkNode;
> +}
> +
> +WebInspector.createResourceLinkContainer = function(resources, containerClass, linkClass) {
> +    let resourceLinkContainer = document.createElement("div");
> +    resourceLinkContainer.classList.add("resource-list", containerClass);
> +    for (let resource of resources)
> +        resourceLinkContainer.appendChild(WebInspector.createResourceLink(resource, linkClass));
> +    return resourceLinkContainer;
> +}

This might be too special case to be reusable. Maybe just put in the sidebar code for now.

> Source/WebInspectorUI/UserInterface/Views/Main.css:255
> +    content: "-";

I don't think we need this. One per line is likely enough.
Comment 5 Devin Rousso 2016-01-02 13:58:40 PST
Created attachment 268111 [details]
Patch
Comment 6 WebKit Commit Bot 2016-01-02 14:00:20 PST
Comment on attachment 268111 [details]
Patch

Rejecting attachment 268111 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 268111, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ws/Main.css
Hunk #1 FAILED at 243.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebInspectorUI/UserInterface/Views/Main.css.rej
patching file Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js
Hunk #1 FAILED at 219.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js.rej

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/640937
Comment 7 Devin Rousso 2016-01-02 15:39:07 PST
Created attachment 268116 [details]
Patch

Gotta love localizedStrings.js...
Comment 8 WebKit Commit Bot 2016-01-02 15:40:14 PST
Comment on attachment 268116 [details]
Patch

Rejecting attachment 268116 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 268116, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebInspectorUI/ChangeLog is not at the top of the file.

Full output: http://webkit-queues.webkit.org/results/641240
Comment 9 Devin Rousso 2016-01-02 15:42:21 PST
Created attachment 268117 [details]
Patch

Damn I'm just getting sloppy...
Comment 10 WebKit Commit Bot 2016-01-02 16:40:01 PST
Comment on attachment 268117 [details]
Patch

Clearing flags on attachment: 268117

Committed r194506: <http://trac.webkit.org/changeset/194506>
Comment 11 WebKit Commit Bot 2016-01-02 16:40:05 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Devin Rousso 2016-01-02 18:09:28 PST
Reopening to attach new patch.
Comment 13 Devin Rousso 2016-01-02 18:09:30 PST
Created attachment 268122 [details]
Patch
Comment 14 Devin Rousso 2016-01-02 18:10:15 PST
Comment on attachment 268122 [details]
Patch

Sorry I copied the wrong bug number.