Bug 148449 - A WebIDL callback interface is allowed to have constants
Summary: A WebIDL callback interface is allowed to have constants
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 148434
Blocks: 148415
  Show dependency treegraph
 
Reported: 2015-08-25 15:44 PDT by Chris Dumez
Modified: 2015-08-27 15:36 PDT (History)
6 users (show)

See Also:


Attachments
Patch (16.06 KB, patch)
2015-08-27 14:05 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 2015-08-25 15:44:28 PDT
A WebIDL callback interface is allowed to have constants. Currently, our bindings generator does not support that.

Spec for constants:
https://heycam.github.io/webidl/#dfn-constant

Part about constants and callback interfaces:
https://heycam.github.io/webidl/#es-user-objects
"The [NoInterfaceObject] extended attribute must not be specified on a callback interface unless it has a constant declared on it. This is because callback interfaces without constants never have interface objects."

The callback interface should also have a corresponding property on the global object if they are constants:
https://heycam.github.io/webidl/#es-interfaces
Comment 1 Chris Dumez 2015-08-27 14:05:02 PDT
Created attachment 260085 [details]
Patch
Comment 2 WebKit Commit Bot 2015-08-27 14:06:28 PDT
Attachment 260085 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h:37:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h:38:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Geoffrey Garen 2015-08-27 14:45:59 PDT
Comment on attachment 260085 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2015-08-27 15:36:04 PDT
Comment on attachment 260085 [details]
Patch

Clearing flags on attachment: 260085

Committed r189063: <http://trac.webkit.org/changeset/189063>
Comment 5 WebKit Commit Bot 2015-08-27 15:36:10 PDT
All reviewed patches have been landed.  Closing bug.