RESOLVED FIXED 72055
CodeGeneratorV8.pm can generate Event constructors
https://bugs.webkit.org/show_bug.cgi?id=72055
Summary CodeGeneratorV8.pm can generate Event constructors
Kentaro Hara
Reported 2011-11-10 13:54:44 PST
CodeGeneratorV8.pm implements the following two IDLs and generates Event constructors: - [ConstructorTemplate=Event] IDL indicates that CodeGenerator should generate an Event constructor. - [InitializedByConstructor] IDL on an attribute indicates that the attribute can be initialized by the constructor.
Attachments
Patch (72.29 KB, patch)
2011-11-10 14:04 PST, Kentaro Hara
abarth: review+
patch for commit (70.35 KB, patch)
2011-11-10 14:41 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2011-11-10 14:04:18 PST
WebKit Review Bot
Comment 2 2011-11-10 14:07:18 PST
Attachment 114564 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:28: wtf includes should be <wtf/file.h> instead of "wtf/file.h". [build/include] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:27: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:21: Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:22: Found WebCore config.h after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:24: Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:26: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:29: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:32: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:129: Non-label code inside switch statements should be indented. [whitespace/indent] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:154: Declaration has space between type name and * in GObjectClass *gobjectClass [whitespace/declaration] [3] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:193: Extra space between return and WEBKIT_DOM_TEST_EVENT_CONSTRUCTOR [whitespace/declaration] [3] Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:32: Code inside a namespace should not be indented. [whitespace/indent] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:21: #ifndef header guard has wrong style, please use: WebKitDOMTestEventConstructorPrivate_h [build/header_guard] [5] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:26: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:28: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 15 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 3 2011-11-10 14:25:04 PST
As I mention on the parent bug, I wonder if we can use the fact that an interface inherits from Event as the signal that it should use the Event constructor template. (Although having an IDL attribute is also a nice explicit signal.)
Kentaro Hara
Comment 4 2011-11-10 14:31:28 PST
(In reply to comment #3) > As I mention on the parent bug, I wonder if we can use the fact that an interface inherits from Event as the signal that it should use the Event constructor template. (Although having an IDL attribute is also a nice explicit signal.) Ah, I got it. As you pointed out, it seems to require the refactoring to load all the IDL into the code generator at once, (although I would prefer the explicit signal.)
Adam Barth
Comment 5 2011-11-10 14:32:19 PST
Ok. Let's keep it explicit. We can change our minds later if needed.
Kentaro Hara
Comment 6 2011-11-10 14:41:38 PST
Created attachment 114576 [details] patch for commit
Kentaro Hara
Comment 7 2011-11-10 14:44:07 PST
Kentaro Hara
Comment 8 2011-11-10 14:45:27 PST
Committed it manually to avoid style check errors of CPP/GObject/ObjC (which are unrelated to this patch).
Note You need to log in before you can comment on or make changes to this bug.