Bug 112123 - Web Inspector: add html canvas memory details to the native memory overview
Summary: Web Inspector: add html canvas memory details to the native memory overview
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: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-12 02:54 PDT by Yury Semikhatsky
Modified: 2013-03-12 07:37 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2013-03-12 02:56 PDT, Yury Semikhatsky
apavlov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2013-03-12 02:54:43 PDT
In addition to cached images we can show memory occupied by HTMLCanvasElements under Image category.
Comment 1 Yury Semikhatsky 2013-03-12 02:56:03 PDT
Created attachment 192687 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2013-03-12 04:20:36 PDT
Comment on attachment 192687 [details]
Patch

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

> Source/WebCore/inspector/front-end/NativeHeapSnapshot.js:82
> +        var canvases = aggregatesByClassName["WebCore::HTMLCanvasElement"];

Please add a blank line above to separate the two types of "images".

> Source/WebCore/inspector/front-end/NativeHeapSnapshot.js:85
> +            return "HTMLCanvasElement";

node.name() above returns something akin to "IMG", which is an HTML name of the tag, as opposed to "HTMLCanvasElement", which is a DOM type name. Inconsistency ensues.
Comment 3 Yury Semikhatsky 2013-03-12 07:35:27 PDT
(In reply to comment #2)
> (From update of attachment 192687 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=192687&action=review
> 
> > Source/WebCore/inspector/front-end/NativeHeapSnapshot.js:82
> > +        var canvases = aggregatesByClassName["WebCore::HTMLCanvasElement"];
> 
> Please add a blank line above to separate the two types of "images".
> 
Done.

> > Source/WebCore/inspector/front-end/NativeHeapSnapshot.js:85
> > +            return "HTMLCanvasElement";
> 
> node.name() above returns something akin to "IMG", which is an HTML name of the tag, as opposed to "HTMLCanvasElement", which is a DOM type name. Inconsistency ensues.
No, node.name() returns URL of the cached image. We don't have user-friendly name yet so return generic name.
Comment 4 Yury Semikhatsky 2013-03-12 07:37:47 PDT
Committed r145540: <http://trac.webkit.org/changeset/145540>