Bug 108649 - Web Inspector: [WebGL] show WebGL enum names instead of numbers
Summary: Web Inspector: [WebGL] show WebGL enum names instead of numbers
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Adaikin
URL: http://www.khronos.org/registry/webgl...
Keywords:
Depends on: 109060
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-01 09:26 PST by Andrey Adaikin
Modified: 2014-12-13 13:48 PST (History)
12 users (show)

See Also:


Attachments
Patch (10.33 KB, patch)
2013-02-01 09:27 PST, Andrey Adaikin
no flags Details | Formatted Diff | Diff
Screenshot (194.42 KB, image/png)
2013-02-01 09:33 PST, Andrey Adaikin
no flags Details
Added a test (21.18 KB, patch)
2013-02-04 02:54 PST, Andrey Adaikin
pfeldman: review-
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Adaikin 2013-02-01 09:26:13 PST
In canvas replay log we should show WebGL enum names instead of numbers.

Patch to follow.
Comment 1 Andrey Adaikin 2013-02-01 09:27:28 PST
Created attachment 186060 [details]
Patch
Comment 2 Andrey Adaikin 2013-02-01 09:33:36 PST
Created attachment 186063 [details]
Screenshot
Comment 3 Pavel Feldman 2013-02-04 00:25:32 PST
Comment on attachment 186060 [details]
Patch

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

> Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js:2761
> +    f("activeTexture", 0);

Do you need a test that nothing is missing?
Comment 4 Andrey Adaikin 2013-02-04 02:54:07 PST
Created attachment 186331 [details]
Added a test
Comment 5 Andrey Adaikin 2013-02-04 02:58:51 PST
(In reply to comment #3)
> (From update of attachment 186060 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=186060&action=review
> 
> > Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js:2761
> > +    f("activeTexture", 0);
> 
> Do you need a test that nothing is missing?

I added a test to dump some of those calls with enum descriptions.

To test automatically that nothing is missing seems impossible - only manually by checking the specs with scrupulous attention.
Comment 6 Pavel Feldman 2013-02-04 03:42:22 PST
> To test automatically that nothing is missing seems impossible - only manually by checking the specs with scrupulous attention.

But we can't afford it. Can you walk the wrapped object methods, etc.?
Comment 7 Andrey Adaikin 2013-02-04 03:56:06 PST
(In reply to comment #6)
> > To test automatically that nothing is missing seems impossible - only manually by checking the specs with scrupulous attention.
> 
> But we can't afford it. Can you walk the wrapped object methods, etc.?

I hardly can guess what you mean... But here is an example of a call in the log:

gl.texImage2D(3553, 0, 6408, 512, 512, 0, 6408, 5121, null);

Now, without consulting the specs, how do you know that only arguments at indexes {0,2,6,7} are enums? i.e.:

gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 512, 512, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
Comment 8 Pavel Feldman 2013-02-04 04:03:38 PST
(In reply to comment #7)
> (In reply to comment #6)
> > > To test automatically that nothing is missing seems impossible - only manually by checking the specs with scrupulous attention.
> > 
> > But we can't afford it. Can you walk the wrapped object methods, etc.?
> 
> I hardly can guess what you mean... But here is an example of a call in the log:
> 
> gl.texImage2D(3553, 0, 6408, 512, 512, 0, 6408, 5121, null);
> 
> Now, without consulting the specs, how do you know that only arguments at indexes {0,2,6,7} are enums? i.e.:
> 
> gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 512, 512, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);

I don't know. Maybe via generating something off the idl and/or header. Otherwise this is a write-once work that is going to be out of date and not tested.
Comment 9 Build Bot 2013-02-04 06:00:37 PST
Comment on attachment 186331 [details]
Added a test

Attachment 186331 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/16373193

New failing tests:
inspector/profiler/webgl/webgl-profiler-enum-descriptions.html
Comment 10 Build Bot 2013-02-04 06:17:09 PST
Comment on attachment 186331 [details]
Added a test

Attachment 186331 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://queues.webkit.org/results/16378117

New failing tests:
inspector/profiler/webgl/webgl-profiler-enum-descriptions.html
Comment 11 Pavel Feldman 2013-02-05 02:03:10 PST
Comment on attachment 186331 [details]
Added a test

As per comment #8.