WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48915
Web Inspector: show proper image size for cached resources.
https://bugs.webkit.org/show_bug.cgi?id=48915
Summary
Web Inspector: show proper image size for cached resources.
Pavel Feldman
Reported
2010-11-03 07:15:27 PDT
Patch to follow.
Attachments
[PATCH] Proposed change.
(7.95 KB, patch)
2010-11-03 07:18 PDT
,
Pavel Feldman
simon.fraser
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2010-11-03 07:18:01 PDT
Created
attachment 72820
[details]
[PATCH] Proposed change.
Andrey Kosyakov
Comment 2
2010-11-03 07:32:24 PDT
Comment on
attachment 72820
[details]
[PATCH] Proposed change. View in context:
https://bugs.webkit.org/attachment.cgi?id=72820&action=review
> WebCore/inspector/front-end/ImageView.js:79 > + var resourceSize = this.resource.resourceSize;
Wouldn't it be more readable with a ternary operator?
> WebCore/inspector/front-end/ImageView.js:101 > + _base64ToSize: function(content)
This is rather generic, I would consider moving this to utilities.js or making it a member of Resource.
> WebCore/inspector/front-end/ImageView.js:105 > + var size = (content.length || 0) * 3 / 4;
content.length || 0 seems to be redundant considering the above line.
> WebCore/inspector/front-end/ImageView.js:107 > + size--;
ditto.
Simon Fraser (smfr)
Comment 3
2010-11-03 11:21:55 PDT
Comment on
attachment 72820
[details]
[PATCH] Proposed change. View in context:
https://bugs.webkit.org/attachment.cgi?id=72820&action=review
> WebCore/ChangeLog:9 > +
https://bugs.webkit.org/show_bug.cgi?id=48915
> + > + * inspector/front-end/ExtensionServer.js: > + (WebInspector.ExtensionServer.prototype._onGetResourceContent):
I'd like to see some explanation of what the problem was and how you fixed it here.
Pavel Feldman
Comment 4
2010-11-03 11:23:57 PDT
(In reply to
comment #3
)
> (From update of
attachment 72820
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=72820&action=review
> > > WebCore/ChangeLog:9 > > +
https://bugs.webkit.org/show_bug.cgi?id=48915
> > + > > + * inspector/front-end/ExtensionServer.js: > > + (WebInspector.ExtensionServer.prototype._onGetResourceContent): > > I'd like to see some explanation of what the problem was and how you fixed it here.
The problem was that resourceSize for cached resources is 0 and I calculate it from the actual image object instead. And height is a drive-by fix via using naturalHeight.
Pavel Feldman
Comment 5
2010-11-03 11:38:34 PDT
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebCore/ChangeLog M WebCore/inspector/front-end/ExtensionServer.js M WebCore/inspector/front-end/ImageView.js M WebCore/inspector/front-end/NetworkPanel.js M WebCore/inspector/front-end/Resource.js M WebCore/inspector/front-end/ResourceManager.js M WebCore/inspector/front-end/SourceView.js Committed
r71254
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug