Closed
Bug 999687
Opened 11 years ago
Closed 11 years ago
Some arguments are treated as enums when they shouldn't be
Categories
(DevTools Graveyard :: Canvas Debugger, defect)
DevTools Graveyard
Canvas Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: vporof, Assigned: jsantell)
References
Details
Attachments
(1 file, 1 obsolete file)
9.53 KB,
patch
|
jsantell
:
review+
|
Details | Diff | Splinter Review |
Like, in the case of vertexAttribPointer or disable/enableVertexAttribArray. The arg is a simple int, not an enum.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jsantell
Assignee | ||
Comment 1•11 years ago
|
||
Canvas (all chrome-only):
* asyncDrawXULElement[1], 7th arg
* drawWindow [2], 7th arg
3D Context (lots):
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext
[1] https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D#asyncDrawXULElement%28%29
[2] https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D#drawWindow%28%29
Reporter | ||
Comment 2•11 years ago
|
||
Good picks for the 2D context Jordan. Here are the ones for WebGL, the enum params being named `enum`.
* activeTexture(enum);
* bindBuffer(enum, WebGLBuffer);
* bindFramebuffer(enum, WebGLFramebuffer);
* bindRenderbuffer(enum, WebGLRenderbuffer);
* bindTexture(enum, WebGLTexture);
* blendEquation(enum);
* blendEquationSeparate(enum, enum);
* blendFunc(enum, enum);
* blendFuncSeparate(enum, enum, enum, enum);
* bufferData(enum, enum, enum);
* bufferData(enum, ArrayBufferView, enum);
* bufferData(enum, ArrayBuffer, enum);
* bufferSubData(enum, enum, ArrayBufferView);
* bufferSubData(enum, enum, ArrayBuffer);
* checkFramebufferStatus(enum);
* clear(unsigned enum);
* compressedTexImage2D(enum, int, enum, int, int, int, ArrayBufferView);
* compressedTexSubImage2D(enum, int, int, int, int, int, enum, ArrayBufferView);
* copyTexImage2D(enum, int, enum, int, int, int, int, int);
* copyTexSubImage2D(enum, int, int, int, int, int, int, int);
* createShader(enum);
* cullFace(enum);
* depthFunc(enum);
* disable(enum);
* drawArrays(enum, int, int);
* drawElements(enum, int, enum, int);
* enable(enum);
* framebufferRenderbuffer(enum, enum, enum, WebGLRenderbuffer);
* framebufferTexture2D(enum, enum, enum, WebGLTexture, int);
* frontFace(enum);
* generateMipmap(enum);
* getBufferParameter(enum, enum);
* getParameter(enum);
* getError();
* getFramebufferAttachmentParameter(enum, enum, enum);
* getProgramParameter(WebGLProgram, enum);
* getRenderbufferParameter(enum, enum);
* getShaderParameter(WebGLShader, enum);
* getShaderPrecisionFormat(enum, enum);
* getTexParameter(enum, enum);
* getVertexAttrib(uint, enum);
* getVertexAttribOffset(uint, enum);
* hint(enum, enum);
* isEnabled(enum);
* pixelStorei(enum, int);
* readPixels(int, int, int, int, enum, enum, ArrayBufferView);
* renderbufferStorage(enum, enum, int, int);
* stencilFunc(enum, int, uint);
* stencilFuncSeparate(enum, enum, int, uint);
* stencilMaskSeparate(enum, uint);
* stencilOp(enum, enum, enum);
* stencilOpSeparate(enum, enum, enum, enum);
* texImage2D(enum, int, enum, int, int, int, enum, enum, ArrayBufferView);
* texImage2D(enum, int, enum, enum, enum, ImageData);
* texImage2D(enum, int, enum, enum, enum, HTMLImageElement);
* texImage2D(enum, int, enum, enum, enum, HTMLCanvasElement);
* texImage2D(enum, int, enum, enum, enum, HTMLVideoElement);
* texParameterf(enum, enum, float);
* texParameteri(enum, enum, int);
* texSubImage2D(enum, int, int, int, int, int, enum, enum, ArrayBufferView);
* texSubImage2D(enum, int, int, int, enum, enum, ImageData);
* texSubImage2D(enum, int, int, int, enum, enum, WebGLUniformLocation, float);
* vertexAttribPointer(uint, int, enum, bool, int, int);
Reporter | ||
Comment 3•11 years ago
|
||
Clarification for the above list:
* clear(unsigned enum); // takes a single enum parameter
* getError(); // actually returns an enum, so we don't really need to handle this one
Assignee | ||
Comment 4•11 years ago
|
||
dang.
Assignee | ||
Comment 5•11 years ago
|
||
A working idea. How do you like this? Anything else it needs?
Attachment #8446907 -
Flags: review?(vporof)
Reporter | ||
Comment 6•11 years ago
|
||
Comment on attachment 8446907 [details] [diff] [review]
999687-enum-canvas-debugger.patch
Review of attachment 8446907 [details] [diff] [review]:
-----------------------------------------------------------------
I am thoroughly satisfied.
A better test would've been one one with some WebGL calls and actual enums, but we have DRAWWINDOW_DRAW_VIEW == 4 which is ok. Maybe you should assert this in the test, so if this enum's value ever changes (it's non-standard after all) then this test gets updated.
::: toolkit/devtools/server/actors/call-watcher.js
@@ +220,5 @@
> return "Object";
> }
> + // If this argument matches the method's signature
> + // and is an enum, change it to its constant name.
> + if (enumArgs && ~enumArgs.indexOf(i)) {
Fun, but is == -1 really that ugly? :P
Attachment #8446907 -
Flags: review?(vporof) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Fine, fine, we'll settle for == -1
Attachment #8446907 -
Attachment is obsolete: true
Attachment #8447349 -
Flags: review+
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 10•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•