Bug 177308 - eventInitDict parameter to GamepadEvent constructor should be optional
Summary: eventInitDict parameter to GamepadEvent constructor should be optional
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-09-21 09:52 PDT by Chris Dumez
Modified: 2017-09-27 12:19 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.84 KB, patch)
2017-09-21 10:25 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-09-21 09:52:36 PDT
eventInitDict parameter to GamepadEvent constructor should be optional to match Firefox and Chrome.
Comment 1 Chris Dumez 2017-09-21 09:54:55 PDT
Per Web IDL:
"""
If the type of an argument is a dictionary type (or a union type that has a dictionary as one of its flattened member types), and that dictionary type and its ancestors have no required members, and the argument is either the final argument or is followed only by optional arguments, then the argument must be specified as optional. Such arguments are always considered to have a default value of an empty dictionary, unless otherwise specified.
"""
Comment 2 Chris Dumez 2017-09-21 10:25:31 PDT
Created attachment 321443 [details]
Patch
Comment 4 Sam Weinig 2017-09-21 13:44:55 PDT
Comment on attachment 321443 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321443&action=review

> Source/WebCore/ChangeLog:9
> +        and Chrome. Having such dictionary parameter is also not valid Web IDL:

Can you make this an error in the generator?
Comment 5 Chris Dumez 2017-09-21 13:46:57 PDT
Comment on attachment 321443 [details]
Patch

Clearing flags on attachment: 321443

Committed r222348: <http://trac.webkit.org/changeset/222348>
Comment 6 Chris Dumez 2017-09-21 13:46:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Darin Adler 2017-09-23 14:59:25 PDT
Comment on attachment 321443 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321443&action=review

>> Source/WebCore/ChangeLog:9
>> +        and Chrome. Having such dictionary parameter is also not valid Web IDL:
> 
> Can you make this an error in the generator?

Heh, I came here to ask the same question.
Comment 8 Chris Dumez 2017-09-25 09:44:24 PDT
(In reply to Darin Adler from comment #7)
> Comment on attachment 321443 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=321443&action=review
> 
> >> Source/WebCore/ChangeLog:9
> >> +        and Chrome. Having such dictionary parameter is also not valid Web IDL:
> > 
> > Can you make this an error in the generator?
> 
> Heh, I came here to ask the same question.

Yes, will take a look once I am done with some urgent tasks.
Comment 9 Radar WebKit Bug Importer 2017-09-27 12:19:34 PDT
<rdar://problem/34693049>