Bug 53626

Summary: bufferData and bufferSubData should generate INVALID_VALUE with negative input
Product: WebKit Reporter: Zhenyao Mo <zmo>
Component: WebGLAssignee: Zhenyao Mo <zmo>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, enne, kbr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch kbr: review+

Zhenyao Mo
Reported 2011-02-02 13:46:50 PST
Originally since we used the unsigned types we don't have the logic to check if these inputs are non-negative or not. Now we use the correct signed types, we should check if they are negative or not and generate an INVALID_VALUE error if they are.
Attachments
Patch (4.49 KB, patch)
2011-02-02 14:02 PST, Zhenyao Mo
kbr: review+
Zhenyao Mo
Comment 1 2011-02-02 14:02:39 PST
Zhenyao Mo
Comment 2 2011-02-02 14:03:17 PST
The test is in sync with khronos.
Kenneth Russell
Comment 3 2011-02-02 14:16:29 PST
Comment on attachment 80966 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80966&action=review Looks good; one more test case is needed though. > LayoutTests/fast/canvas/webgl/buffer-data-array-buffer.html:44 > +glErrorShouldBe(gl, gl.INVALID_VALUE); Please also test the bufferSubData entry point taking ArrayBufferView.
Zhenyao Mo
Comment 4 2011-02-02 14:38:38 PST
Will do.
Zhenyao Mo
Comment 5 2011-02-02 14:39:51 PST
Note You need to log in before you can comment on or make changes to this bug.