Bug 148441

Summary: Construct default winding string arguments in CanvasRenderingContext2D from ASCIILiteral objects
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, gyuyoung.kim
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Zan Dobersek 2015-08-25 12:17:29 PDT
Construct default winding string arguments in CanvasRenderingContext2D from ASCIILiteral objects
Comment 1 Zan Dobersek 2015-08-25 12:21:16 PDT
Created attachment 259870 [details]
Patch
Comment 2 Darin Adler 2015-08-25 13:25:47 PDT
Comment on attachment 259870 [details]
Patch

This is a slight optimization. Could optimize even more by overloading instead so we wouldn’t even have to allocate/destroy a StringImpl each time.
Comment 3 Zan Dobersek 2015-09-02 07:15:08 PDT
At least this case could be improved by generating better bindings code. There the string value is already tested to throw a type error if it doesn't equal either 'nonzero' or 'evenodd', so it would then just be a matter of passing an enum value to the implementation function.
Comment 4 Zan Dobersek 2015-09-02 09:49:37 PDT
Committed r189248: <http://trac.webkit.org/changeset/189248>