WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
115477
handle enum in overloaded methods
https://bugs.webkit.org/show_bug.cgi?id=115477
Summary
handle enum in overloaded methods
arno.
Reported
2013-05-01 10:26:12 PDT
Hi, currently, enum are not handled correctly in overloaded methods: The check done is: The binding try to check if argument is an object of type whateverEnum. Instead, it should check if it's a string.
Attachments
patch proposal
(5.24 KB, patch)
2013-05-01 10:35 PDT
,
arno.
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
arno.
Comment 1
2013-05-01 10:35:52 PDT
Created
attachment 200220
[details]
patch proposal
Geoffrey Garen
Comment 2
2013-05-01 11:26:21 PDT
Can you give an example of how this will be used? Why do we want to use strings for enumerated values, instead of numbers?
Kentaro Hara
Comment 3
2013-05-01 11:29:25 PDT
> Why do we want to use strings for enumerated values, instead of numbers?
Because it's speced:
http://dev.w3.org/2006/webapi/WebIDL/#idl-enums
> Can you give an example of how this will be used?
arno: Enum is used more and more in the spec (but is poorly supported in WebKit and Blink), so your patch basically looks good. What use case do you have in mind?
arno.
Comment 4
2013-05-01 11:30:46 PDT
(In reply to
comment #3
)
> arno: Enum is used more and more in the spec (but is poorly supported in WebKit and Blink), so your patch basically looks good. What use case do you have in mind?
the overloaded fill method of canvas2d:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#2dcontext
Anders Carlsson
Comment 5
2015-11-11 10:01:28 PST
Comment on
attachment 200220
[details]
patch proposal This patch hasn't been touched in over 2.5 years, so I think we can go ahead and clear the review flag now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug