RESOLVED FIXED Bug 39100
Implement TypedArray BYTES_PER_ELEMENT
https://bugs.webkit.org/show_bug.cgi?id=39100
Summary Implement TypedArray BYTES_PER_ELEMENT
Kenneth Russell
Reported 2010-05-13 18:20:01 PDT
The constant value BYTES_PER_ELEMENT needs to be added to the various TypedArray interfaces.
Attachments
Patch (31.56 KB, patch)
2010-06-09 16:52 PDT, Kenneth Russell
dglazkov: review+
kbr: commit-queue-
Kenneth Russell
Comment 1 2010-06-09 16:52:28 PDT
Created attachment 58308 [details] Patch From the ChangeLog: Implemented BYTES_PER_ELEMENT on all ArrayBufferView subclasses. Required bug fixes to JSC bindings' custom constructors. Updated fast/canvas/webgl/array-unit-tests.html to verify. Ran all WebGL layout tests in Safari and Chromium.
Kenneth Russell
Comment 2 2010-06-10 10:43:23 PDT
Note: the modifications to the JSC custom bindings came from looking at the autogenerated JSCSSValue.{cpp.h}, which has values like CSS_INHERIT attached to its prototype. From experimentation these are the minimal changes to the custom constructors which allow the BYTES_PER_ELEMENT lookup to succeed on the constructor functions (i.e., "Float32Array.BYTES_PER_ELEMENT") while also not perturbing the functionality in any way.
Dimitri Glazkov (Google)
Comment 3 2010-06-10 10:46:20 PDT
Comment on attachment 58308 [details] Patch ok. Can we not make the constructors non-custom with the new overloading goodness that Yaar had built?
Kenneth Russell
Comment 4 2010-06-10 10:55:34 PDT
(In reply to comment #3) > (From update of attachment 58308 [details]) > ok. Can we not make the constructors non-custom with the new overloading goodness that Yaar had built? It may be possible; I'll ask Yaar. I don't know how the IDL and code generator handle autogenerated constructors and/or overloaded constructors.
Kenneth Russell
Comment 5 2010-06-10 11:53:39 PDT
Note You need to log in before you can comment on or make changes to this bug.