Bug 112123

Summary: Web Inspector: add html canvas memory details to the native memory overview
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch apavlov: review+

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>