Bug 62477 - Web Inspector: [refactoring] Remove dependencies of components requiring network resource list from network panel
Summary: Web Inspector: [refactoring] Remove dependencies of components requiring netw...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-10 14:14 PDT by Andrey Kosyakov
Modified: 2011-07-11 07:39 PDT (History)
12 users (show)

See Also:


Attachments
patch (11.14 KB, patch)
2011-06-10 14:20 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
patch (13.54 KB, patch)
2011-06-10 14:41 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-03 (1.58 MB, application/zip)
2011-06-10 15:00 PDT, WebKit Review Bot
no flags Details
patch (13.61 KB, patch)
2011-07-11 05:04 PDT, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
patch (13.61 KB, patch)
2011-07-11 06:57 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-06-10 14:14:09 PDT
Currently, several components call WebInspector.networkResources() to retrieve network resources list from the Network panel. This is a layering violation and causes certain bugs (e.g. when network panel is set to preserve resources list during navigation, Audits panel will use resource list from several sessions).

This patch introduces WebInspector.NetworkLog that maintains current list of network resources.

Note that webInspector.resources.getHAR() extension call will not honor "Preserve log upon navigation" button of Network panel now. This is intentional.

Also note that NetworkManager still indirectly uses NetworkPanel.resourceById(). This should be removed later (see bug 62476).
Comment 1 Andrey Kosyakov 2011-06-10 14:20:16 PDT
Created attachment 96785 [details]
patch
Comment 2 Andrey Kosyakov 2011-06-10 14:41:05 PDT
Created attachment 96792 [details]
patch

Also removed NetworkPanel.resources
Comment 3 WebKit Review Bot 2011-06-10 15:00:27 PDT
Comment on attachment 96792 [details]
patch

Attachment 96792 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8829316

New failing tests:
http/tests/inspector/network/network-open-load-reopen.html
http/tests/inspector/network/network-clear-after-disabled.html
http/tests/inspector/network/network-close-load-open.html
Comment 4 WebKit Review Bot 2011-06-10 15:00:32 PDT
Created attachment 96795 [details]
Archive of layout-test-results from ec2-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-03  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 5 Eric Seidel (no email) 2011-06-13 14:54:21 PDT
Comment on attachment 96792 [details]
patch

So this is no functional change?
Comment 6 Pavel Feldman 2011-06-15 04:53:14 PDT
Comment on attachment 96792 [details]
patch

As we agreed offline, this is not ready for review.
Comment 7 Andrey Kosyakov 2011-07-11 05:04:00 PDT
Created attachment 100269 [details]
patch

- use old logic for preserving resources during navigation (check loaderId)
- preserve NetworkPanel.resources(), as it is used by layout tests
Comment 8 Pavel Feldman 2011-07-11 05:22:39 PDT
Comment on attachment 100269 [details]
patch

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

> Source/WebCore/inspector/front-end/NetworkManager.js:330
> +        return this._resources;

I'd rather further encapsulate "resources" (via addResource) since you swap the instance in the frameNavigated.
Comment 9 Andrey Kosyakov 2011-07-11 06:57:33 PDT
Created attachment 100293 [details]
patch

- retain resources array object while clearing old resources list during navigation
Comment 10 Pavel Feldman 2011-07-11 07:29:15 PDT
Comment on attachment 100293 [details]
patch

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

> Source/WebCore/inspector/front-end/NetworkManager.js:338
> +        var oldResources = this._resources.splice(0, this._resources.length);

this._resources.length = 0;
Comment 11 Andrey Kosyakov 2011-07-11 07:38:51 PDT
Comment on attachment 100293 [details]
patch

Clearing flags on attachment: 100293

Committed r90745: <http://trac.webkit.org/changeset/90745>
Comment 12 Andrey Kosyakov 2011-07-11 07:39:05 PDT
All reviewed patches have been landed.  Closing bug.