RESOLVED FIXED 66646
ArrayBuffer should have slice method.
https://bugs.webkit.org/show_bug.cgi?id=66646
Summary ArrayBuffer should have slice method.
Shinya Kawanaka
Reported 2011-08-21 23:45:38 PDT
Attachments
Patch (5.98 KB, patch)
2011-08-21 23:51 PDT, Shinya Kawanaka
no flags
Patch (6.54 KB, patch)
2011-08-23 18:16 PDT, Shinya Kawanaka
no flags
Patch (6.47 KB, patch)
2011-10-18 21:43 PDT, Shinya Kawanaka
no flags
Patch (6.48 KB, patch)
2011-10-18 21:46 PDT, Shinya Kawanaka
no flags
Shinya Kawanaka
Comment 1 2011-08-21 23:47:20 PDT
Sorry I mistook the URL. http://code.google.com/p/chromium/issues/detail?id=85049 is correct. (In reply to comment #0) > ArrayBuffer should have slice method. > > See also the following references. > > http://code.google.com/p/chromium/issues/detail?id=85047 > http://www.khronos.org/registry/typedarray/specs/latest/#5
Shinya Kawanaka
Comment 2 2011-08-21 23:51:35 PDT
Sam Weinig
Comment 3 2011-08-22 08:07:58 PDT
Comment on attachment 104649 [details] Patch long in IDL is meant to map to int in c++ code.
Shinya Kawanaka
Comment 4 2011-08-23 18:16:09 PDT
Hajime Morrita
Comment 5 2011-10-16 21:59:08 PDT
This looks a trivial change. What needed for this patch is a drop of love from some expert...
Kenneth Russell
Comment 6 2011-10-18 12:02:42 PDT
Comment on attachment 104951 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104951&action=review Thanks for picking up this work. The code looks fine and the test looks great. A couple of minor nits to clean up before committing. Also, please mark cq? on the bug if you would like it committed after review. > LayoutTests/ChangeLog:3 > + Added unittest for ArrayBuffer#slice Please use the bug description verbatim along with the URL. If necessary, provide detail in additional paragraphs. > Source/WebCore/ChangeLog:3 > + Implemented ArrayBuffer#slice. Same comment here. > Source/WebCore/html/canvas/ArrayBuffer.cpp:33 > +static long clampValue(long x, long left, long right) This should take and return ints instead of longs. > Source/WebCore/html/canvas/ArrayBuffer.h:54 > + unsigned index(int idx) const; This method name is a little confusing; what about "clampIndex"? Also, avoid abbreviations (see http://www.webkit.org/coding/coding-style.html ), so the argument should be named "index".
Shinya Kawanaka
Comment 7 2011-10-18 21:43:09 PDT
Shinya Kawanaka
Comment 8 2011-10-18 21:46:42 PDT
Shinya Kawanaka
Comment 9 2011-10-18 21:47:35 PDT
Hi, I've fixed them. Could you review it again? (In reply to comment #6) > (From update of attachment 104951 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=104951&action=review > > Thanks for picking up this work. The code looks fine and the test looks great. A couple of minor nits to clean up before committing. Also, please mark cq? on the bug if you would like it committed after review. > > > LayoutTests/ChangeLog:3 > > + Added unittest for ArrayBuffer#slice > > Please use the bug description verbatim along with the URL. If necessary, provide detail in additional paragraphs. > > > Source/WebCore/ChangeLog:3 > > + Implemented ArrayBuffer#slice. > > Same comment here. > > > Source/WebCore/html/canvas/ArrayBuffer.cpp:33 > > +static long clampValue(long x, long left, long right) > > This should take and return ints instead of longs. > > > Source/WebCore/html/canvas/ArrayBuffer.h:54 > > + unsigned index(int idx) const; > > This method name is a little confusing; what about "clampIndex"? Also, avoid abbreviations (see http://www.webkit.org/coding/coding-style.html ), so the argument should be named "index".
Kenneth Russell
Comment 10 2011-10-19 10:36:42 PDT
Comment on attachment 111562 [details] Patch Thanks, looks great. r=me
WebKit Review Bot
Comment 11 2011-10-19 16:30:18 PDT
Comment on attachment 111562 [details] Patch Clearing flags on attachment: 111562 Committed r97893: <http://trac.webkit.org/changeset/97893>
WebKit Review Bot
Comment 12 2011-10-19 16:30:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.