WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71093
[meta] CodeGenerator*.pm should support [NamedConstructor] IDL
https://bugs.webkit.org/show_bug.cgi?id=71093
Summary
[meta] CodeGenerator*.pm should support [NamedConstructor] IDL
Kentaro Hara
Reported
2011-10-27 23:24:45 PDT
CodeGeneratorJS.pm and CodeGeneratorV8.pm should support [NamedConstructor] IDL. The spec:
http://www.w3.org/TR/WebIDL/#NamedConstructor
Currently, HTMLAudioElement, HTMLImageElement and HTMLOptionElement have [NamedConstructor] and implement the constructors as custom constructors. We should generate the constructors automatically by the [NamedConstructor] IDL. First I will make a patch for V8, and then for JSC.
Attachments
WIP patch for V8
(100.89 KB, patch)
2011-11-04 19:33 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
WIP patch for V8 to see if a build passes
(104.73 KB, patch)
2011-11-06 10:53 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Patch
(46.84 KB, patch)
2011-11-29 04:09 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2011-11-04 19:33:02 PDT
Created
attachment 113745
[details]
WIP patch for V8
WebKit Review Bot
Comment 2
2011-11-04 19:38:09 PDT
Attachment 113745
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1 Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:27: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:21: #ifndef header guard has wrong style, please use: WebKitDOMTestNamedConstructorPrivate_h [build/header_guard] [5] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:26: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:28: Code inside a namespace should not be indented. [whitespace/indent] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.cpp:26: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.cpp:120: Declaration has space between type name and * in GObjectClass *gobjectClass [whitespace/declaration] [3] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:145: Extra space between return and WEBKIT_DOM_TEST_NAMED_CONSTRUCTOR [whitespace/declaration] [3] Source/WebCore/bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:32: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 13 in 26 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kentaro Hara
Comment 3
2011-11-04 19:41:23 PDT
I uploaded a big WIP patch that implements the [NamedConstructor] IDL for V8. I am planning to land it in the following steps: [1] Refactor CodeGeneratorV8.pm. [2] Fix the wrong test results of fast/js/custom-constructors.html. [3] Remove [CustomGetter] from HTMLAudioElementConstructor. [4] Remove [CustomGetter] from HTMLOptionElementConstructor. [5] Implement the [NamedConstructor] IDL in IDLParser.pm and CodeGeneratorV8.pm. [6] Replace the custom constructor of HTMLAudioElement with the [NamedConstructor] IDL. [7] Replace the custom constructor of HTMLOptionElement with the [NamedConstructor] IDL. Any thoughts?
Adam Barth
Comment 4
2011-11-04 19:44:15 PDT
Sounds like a reasonable approach. I can look at the work in progress patch, or I'm also happy to review the changes in the order you propose them (which sounds quite a bit easier to review).
Early Warning System Bot
Comment 5
2011-11-04 19:49:21 PDT
Comment on
attachment 113745
[details]
WIP patch for V8
Attachment 113745
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10334204
Gyuyoung Kim
Comment 6
2011-11-04 20:08:26 PDT
Comment on
attachment 113745
[details]
WIP patch for V8
Attachment 113745
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/10332171
Gustavo Noronha (kov)
Comment 7
2011-11-04 20:13:59 PDT
Comment on
attachment 113745
[details]
WIP patch for V8
Attachment 113745
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/10334209
Kentaro Hara
Comment 8
2011-11-04 20:48:44 PDT
(In reply to
comment #4
)
> Sounds like a reasonable approach. I can look at the work in progress patch, or I'm also happy to review the changes in the order you propose them (which sounds quite a bit easier to review).
Thank you very much, Adam! After the WIP patch passes all builds and tests, I'll upload sub-patches with more explanations. I would be happy if you take a detailed look at those sub-patches. (Please use the WIP patch just for capturing the overall image of those patches.)
Kentaro Hara
Comment 9
2011-11-06 10:53:10 PST
Created
attachment 113793
[details]
WIP patch for V8 to see if a build passes
WebKit Review Bot
Comment 10
2011-11-06 10:56:49 PST
Attachment 113793
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1 Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:27: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:21: #ifndef header guard has wrong style, please use: WebKitDOMTestNamedConstructorPrivate_h [build/header_guard] [5] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:26: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:28: Code inside a namespace should not be indented. [whitespace/indent] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.cpp:26: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.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/WebKitDOMTestNamedConstructor.cpp:120: Declaration has space between type name and * in GObjectClass *gobjectClass [whitespace/declaration] [3] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:145: Extra space between return and WEBKIT_DOM_TEST_NAMED_CONSTRUCTOR [whitespace/declaration] [3] Source/WebCore/bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:32: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 13 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kentaro Hara
Comment 11
2011-11-09 12:40:00 PST
OK. All V8-related patches were landed. I will write a patch for JSC in a few weeks.
Kentaro Hara
Comment 12
2011-11-29 04:09:33 PST
Created
attachment 116943
[details]
Patch
Kentaro Hara
Comment 13
2011-11-29 04:11:15 PST
I uploaded a WIP patch that implements the [NamedConstructor] IDL for JSC. I am planning to land it in the following steps: [1] Implement the [NamedConstructor] IDL in CodeGeneratorV8.pm. [2] Replace the custom constructor of HTMLAudioElement with the [NamedConstructor] IDL. [3] Replace the custom constructor of HTMLOptionElement with the [NamedConstructor] IDL.
Kentaro Hara
Comment 14
2011-11-29 04:27:43 PST
(In reply to
comment #13
)
> I uploaded a WIP patch that implements the [NamedConstructor] IDL for JSC. I am planning to land it in the following steps: > > [1] Implement the [NamedConstructor] IDL in CodeGeneratorV8.pm.
Correction: [1] Implement the [NamedConstructor] IDL in CodeGeneratorJS.pm.
Kentaro Hara
Comment 15
2011-12-01 17:05:58 PST
All related patches were landed. Now both JSC and V8 have the [NamedConstructor] IDL. Closing bug.
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