The numbers displayed in Size column of Network panel are wrong for cached resources:
- Size should be the actual size of cached resource (currently 0)
- Transfer Size should be the size of response headers (currently 0)
Created attachment 80075 [details]
Comment on attachment 80075 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=80075&action=review
> + [notify, domain=Network] void didReceiveResponse(out long identifier, out double time, out String resourceType, out long cachedSize, out Object response);
didReceiveResponse should not special-case cached resources. It would be better to call didReceiveContentLength for cached resources instead.
> + if (resource.revalidated)
This would go away.
> + var size = this.cached || this.revalidated ? 0 : Number(this.resourceSize || this.responseHeaders["Content-Length"] || 0);
Could you replace ternary operators with guards for ease of understanding?
> + get revalidated()
Created attachment 80181 [details]
Removed additional resource size parameter to didReceiveResponse, issue additional call to didReceiveContentLength in case we got 304 and had a cached resource.
Comment on attachment 80181 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=80181&action=review
> + var bodySize = Number(this.resourceSize || this.responseHeaders["Content-Length"] || 0);
In what cases do we use Content-Length header Is it more accurate? Was is used for gzip?
http://trac.webkit.org/changeset/76690 might have broken Leopard Intel Release (Tests)
Manually committed r76690: http://trac.webkit.org/changeset/76690