Bug 105977

Summary: Implement WebIDL-style string constants in WebAudio (part 2)
Product: WebKit Reporter: Chris Rogers <crogers>
Component: New BugsAssignee: Chris Rogers <crogers>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, eric.carlson, feature-media-reviews, gyuyoung.kim, haraken, japhet, mkwst+watchlist, nbarth, ojan.autocc, rakuco, s.choi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch haraken: review+

Chris Rogers
Reported 2013-01-02 17:28:39 PST
Implement WebIDL-style string constants in WebAudio (part 2)
Attachments
Patch (62.75 KB, patch)
2013-01-02 17:49 PST, Chris Rogers
no flags
Patch (62.60 KB, patch)
2013-01-02 18:21 PST, Chris Rogers
haraken: review+
Chris Rogers
Comment 1 2013-01-02 17:49:59 PST
Adam Barth
Comment 2 2013-01-02 17:58:56 PST
Comment on attachment 181123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181123&action=review > Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp:47 > + return "lowpass"; You can wrap these constants in ASCIILiteral if you want to make things slightly faster.
WebKit Review Bot
Comment 3 2013-01-02 18:12:10 PST
Comment on attachment 181123 [details] Patch Attachment 181123 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15656259
Chris Rogers
Comment 4 2013-01-02 18:21:56 PST
Chris Rogers
Comment 5 2013-01-03 11:58:50 PST
Comment on attachment 181123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181123&action=review >> Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp:47 >> + return "lowpass"; > > You can wrap these constants in ASCIILiteral if you want to make things slightly faster. I'm not super worried about efficiency on the getters and it seems like it might be a little less readable this way. Do you have a strong preference?
Chris Rogers
Comment 6 2013-01-03 12:00:52 PST
Kentaro, would you mind having a look. This one is very similar to the "part 1" patch: https://bugs.webkit.org/show_bug.cgi?id=105058 Thanks!
Adam Barth
Comment 7 2013-01-03 13:44:02 PST
> Do you have a strong preference? Nope!
Kentaro Hara
Comment 8 2013-01-04 07:07:17 PST
Comment on attachment 181126 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181126&action=review LGTM > Source/WebCore/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:40 > + v8::Handle<v8::Object> holder = info.Holder(); > + BiquadFilterNode* imp = V8BiquadFilterNode::toNative(holder); Nit: You can just write 'info.Holder()' instead of putting it into 'holder'. > Source/WebCore/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:46 > + if (!ok || !imp->setType(type)) This should be 'ASSERT(ok)'. Since you are checking IsNumber() above, toUInt32() should not fail. > Source/WebCore/bindings/v8/custom/V8PannerNodeCustom.cpp:40 > + v8::Handle<v8::Object> holder = info.Holder(); > + PannerNode* imp = V8PannerNode::toNative(holder); Ditto. You can write 'info.Holder()'. > Source/WebCore/bindings/v8/custom/V8PannerNodeCustom.cpp:46 > + if (!ok || !imp->setPanningModel(model)) Ditto. 'ASSERT(ok)'. > Source/WebCore/bindings/v8/custom/V8PannerNodeCustom.cpp:66 > + v8::Handle<v8::Object> holder = info.Holder(); > + PannerNode* imp = V8PannerNode::toNative(holder); Ditto. > Source/WebCore/bindings/v8/custom/V8PannerNodeCustom.cpp:72 > + if (!ok || !imp->setDistanceModel(model)) Ditto.
Kentaro Hara
Comment 9 2013-01-04 07:09:15 PST
nbarth: Once you implement 'enum' in WebKit IDLs, you might want to clean up the custom bindings of this patch.
Chris Rogers
Comment 10 2013-01-04 13:34:48 PST
Note You need to log in before you can comment on or make changes to this bug.