Right now the type is sent in InspectorResourceAgent::didReceiveResponse. But the type is known for most loads in InspectorResourceAgent::willSendRequest because the cached CachedResource was created with the type before loading. Only XHRs, the document and favicons don't know their type, but those are easy to fix. Passing this type along in requestWillBeSent to the front-end would let the Network panel group long polling XHRs in the XHR category instead of Other. So when you are filtering by XHR they will show up. Facebook is a good example of this. They have a long poll XHR that sits in Other for minutes, then once it loads moves to the XHR category and another one is started in Other. It would be great to see the pend and finished ones all under XHR.
Created attachment 120029 [details] Facebook filtered by Other
Created attachment 120030 [details] Facebook filtered by XHR
Created attachment 127002 [details] WIP Change Attaching WIP patch. This does not solve the problem on Facebook yet. We need to get told about XHRs sooner so we can set the type before willSendRequest.
<rdar://problem/13726105>
Created attachment 201303 [details] Patch
Comment on attachment 201303 [details] Patch We still send the type in didReceiveResponse, since it can change from Other to XHR still in some cases.
Comment on attachment 201303 [details] Patch Attachment 201303 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/322076 New failing tests: http/tests/inspector/network/network-disable-cache-memory.html http/tests/inspector/resource-tree/resource-tree-non-unique-url.html http/tests/inspector/network/network-cachedresources-with-same-urls.html http/tests/inspector/network/network-disable-cache-xhrs.html
Created attachment 201323 [details] Archive of layout-test-results from webkit-ews-04 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.2
Comment on attachment 201303 [details] Patch Attachment 201303 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/339314 New failing tests: http/tests/inspector/network/network-disable-cache-memory.html http/tests/inspector/resource-tree/resource-tree-non-unique-url.html http/tests/inspector/network/network-disable-cache-xhrs.html http/tests/inspector/network/network-cachedresources-with-same-urls.html http/tests/security/cross-frame-access-put.html
Created attachment 201324 [details] Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.2
Created attachment 201347 [details] Patch
Comment on attachment 201347 [details] Patch r=me
Comment on attachment 201347 [details] Patch Clearing flags on attachment: 201347 Committed r149905: <http://trac.webkit.org/changeset/149905>
All reviewed patches have been landed. Closing bug.