Bug 149263

Summary: [WebIDL] Add support for default parameter values
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, darin, ggaren, m.goleb+bugzilla, rniwa, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
URL: https://heycam.github.io/webidl/#dfn-optional-argument-default-value
See Also: https://bugs.webkit.org/show_bug.cgi?id=148582
Bug Depends on:    
Bug Blocks: 149331    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2015-09-17 09:44:28 PDT
Add support for default parameter values to our Web IDL parser / JS bindings generator. This will allow the bindings to convert undefined to the parameter's default value for optional parameters:
https://heycam.github.io/webidl/#dfn-optional-argument-default-value

Initially, this will be used for document.createNodeIterator() / document.createTreeWalker()'s whatToShow parameter:
https://dom.spec.whatwg.org/#document

WebKit currently converts undefined to 0 in this case, even though it should be OxFFFFFFFF.
Comment 1 Chris Dumez 2015-09-17 09:45:07 PDT
rdar://problem/22545600
Comment 2 Chris Dumez 2015-09-17 10:01:14 PDT
Created attachment 261394 [details]
Patch
Comment 3 WebKit Commit Bot 2015-09-17 18:48:38 PDT
Comment on attachment 261394 [details]
Patch

Clearing flags on attachment: 261394

Committed r189957: <http://trac.webkit.org/changeset/189957>
Comment 4 WebKit Commit Bot 2015-09-17 18:48:45 PDT
All reviewed patches have been landed.  Closing bug.