Summary: | Implement TypedArray BYTES_PER_ELEMENT | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kenneth Russell <kbr> | ||||
Component: | WebGL | Assignee: | Kenneth Russell <kbr> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cmarrin, dglazkov, fishd, oliver, zmo | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Kenneth Russell
2010-05-13 18:20:01 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.
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. Comment on attachment 58308 [details]
Patch
ok. Can we not make the constructors non-custom with the new overloading goodness that Yaar had built?
(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. Committed r60967: <http://trac.webkit.org/changeset/60967> |