RESOLVED FIXED 35403
Web Inspector: resources panel only shows uncompressed resource size.
https://bugs.webkit.org/show_bug.cgi?id=35403
Summary Web Inspector: resources panel only shows uncompressed resource size.
Pavel Feldman
Reported 2010-02-25 14:01:16 PST
We should show both: gzipped and raw sizes. - We should render is as on Time / Sort by Duration (both sizes on the same bar), except for solid chunk should go first - Solid would correspond to gzipped (network) size, semi-transparent should correspond to actual resource size. - There should be additional sorting option "Sort by Uncompressed Size" - Existing sorting should be default and sort by compressed size.
Attachments
[PATCH] Suggested solution (13.72 KB, patch)
2010-03-01 10:10 PST, Alexander Pavlov (apavlov)
pfeldman: review-
[PATCH] Comments addressed (20.75 KB, patch)
2010-03-03 07:50 PST, Alexander Pavlov (apavlov)
pfeldman: review-
[PATCH] Rendering option extracted from the TreeElement (18.46 KB, patch)
2010-03-03 09:00 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Anthony Ricaud
Comment 1 2010-02-25 23:53:38 PST
Alexander Pavlov (apavlov)
Comment 2 2010-03-01 10:10:42 PST
Created attachment 49729 [details] [PATCH] Suggested solution
Pavel Feldman
Comment 3 2010-03-03 03:18:01 PST
Comment on attachment 49729 [details] [PATCH] Suggested solution > + get transferSize() > + { > + return this.cached ? 0 : (this.responseHeaders["Content-Length"] || this.contentLength || 0); > + }, What is the difference between Content-Length header and this.contentLength? > + var resourceBytes = this._value(resource); > + if (networkBytes && networkBytes != resourceBytes) { !== > + _networkBytes: function(resource) > + { > + return resource.responseHeaders["Content-Length"]; Why not this.contentLength? > + const isTransparentRight = panel && panel.calculator && panel.calculator.isTransparentRight; What is calculator's 'isTransparentRight'? Does not sound like calculator property? r- is for "Content-Length" vs contentLength confusion, also for 'isTransparentRight' on calculator.
Alexander Pavlov (apavlov)
Comment 4 2010-03-03 07:50:31 PST
Created attachment 49909 [details] [PATCH] Comments addressed
Alexander Pavlov (apavlov)
Comment 5 2010-03-03 07:52:49 PST
(In reply to comment #3) > (From update of attachment 49729 [details]) > > + get transferSize() > > + { > > + return this.cached ? 0 : (this.responseHeaders["Content-Length"] || this.contentLength || 0); > > + }, > > What is the difference between Content-Length header and this.contentLength? These two are the opposites. Content-Length is the network transfer size while this.contentLength is the actual resource size, contrary to its name. Fixed the name. > > + var resourceBytes = this._value(resource); > > + if (networkBytes && networkBytes != resourceBytes) { > > !== networkBytes used to be a string, hence !=. Fixed to be a number. > > + _networkBytes: function(resource) > > + { > > + return resource.responseHeaders["Content-Length"]; > > Why not this.contentLength? See above. > > + const isTransparentRight = panel && panel.calculator && panel.calculator.isTransparentRight; > > What is calculator's 'isTransparentRight'? Does not sound like calculator > property? Fixed, now resides in the sorting options along with the sorter and calculator.
Pavel Feldman
Comment 6 2010-03-03 08:09:54 PST
Comment on attachment 49909 [details] [PATCH] Comments addressed isBarOpaqueAtLeft should not be a sorting function option. It is a graph item property (time is always 'false', size is always 'true'). > refresh: function(calculator) Let it receive and cache isBarOpaqueAtLeft?
Alexander Pavlov (apavlov)
Comment 7 2010-03-03 09:00:56 PST
Created attachment 49913 [details] [PATCH] Rendering option extracted from the TreeElement
Alexander Pavlov (apavlov)
Comment 8 2010-03-03 10:20:48 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/English.lproj/localizedStrings.js M WebCore/inspector/InspectorResource.cpp M WebCore/inspector/front-end/AbstractTimelinePanel.js M WebCore/inspector/front-end/AuditRules.js M WebCore/inspector/front-end/ImageView.js M WebCore/inspector/front-end/Resource.js M WebCore/inspector/front-end/ResourcesPanel.js M WebCore/inspector/front-end/inspector.css M WebCore/inspector/front-end/inspector.js Committed r55466
Note You need to log in before you can comment on or make changes to this bug.