Bug 74954 - Web Inspector: CodeGeneratorInspector.py: generate enum types.
Summary: Web Inspector: CodeGeneratorInspector.py: generate enum types.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 72861 75307
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-20 14:05 PST by Peter Rybin
Modified: 2012-01-11 06:18 PST (History)
14 users (show)

See Also:


Attachments
Patch (17.06 KB, patch)
2011-12-22 10:55 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
Sample InspectorFrontend.h (140.48 KB, text/plain)
2011-12-22 10:57 PST, Peter Rybin
no flags Details
Sample InspectorFrontend.cpp (38.84 KB, text/plain)
2011-12-22 10:58 PST, Peter Rybin
no flags Details
Patch (18.77 KB, patch)
2011-12-22 11:49 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
Patch (20.64 KB, patch)
2011-12-22 12:57 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
For win trybot (20.71 KB, patch)
2011-12-23 04:16 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
Patch (16.79 KB, patch)
2011-12-23 05:18 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
Sample InspectorFrontend.h (140.21 KB, text/plain)
2011-12-23 05:20 PST, Peter Rybin
no flags Details
For win trybot (16.80 KB, patch)
2011-12-23 05:58 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
For win trybot (16.85 KB, patch)
2011-12-23 07:47 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
For trybots (19.59 KB, patch)
2011-12-27 09:41 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
InspectorFrontend.h base version (138.72 KB, text/plain)
2011-12-27 10:03 PST, Peter Rybin
no flags Details
InspectorFrontend.cpp base version (37.70 KB, text/plain)
2011-12-27 10:04 PST, Peter Rybin
no flags Details
Patch (17.29 KB, patch)
2011-12-27 10:25 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
New InspectorFrontend.h (140.51 KB, text/plain)
2011-12-27 10:26 PST, Peter Rybin
no flags Details
New InspectorFrontend.cpp (38.84 KB, text/plain)
2011-12-27 10:28 PST, Peter Rybin
no flags Details
Generator output diff (14.26 KB, text/plain)
2011-12-27 10:31 PST, Peter Rybin
no flags Details
Patch (17.28 KB, patch)
2011-12-28 08:18 PST, Peter Rybin
no flags Details | Formatted Diff | Diff
New InspectorFrontend.h (140.50 KB, text/plain)
2011-12-28 08:25 PST, Peter Rybin
no flags Details
New InspectorFrontend.cpp (38.84 KB, text/plain)
2011-12-28 08:26 PST, Peter Rybin
no flags Details
Generator output diff (14.25 KB, text/plain)
2011-12-28 08:27 PST, Peter Rybin
no flags Details
Same patch to test it on Mac bot (17.28 KB, patch)
2011-12-28 08:35 PST, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Rybin 2011-12-20 14:05:45 PST
Generate enum types in C++ TypeBuilder.
As we discussed with caseq@, JSON enums are morphed into C++ enums with its numeric values pointing to an actual string value in pre-build array.
This also requires setter methods to become overloaded so that both old string-based and new enum-based code styles could co-exist.
Comment 1 Peter Rybin 2011-12-22 10:55:31 PST
Created attachment 120340 [details]
Patch
Comment 2 Peter Rybin 2011-12-22 10:57:29 PST
Created attachment 120341 [details]
Sample InspectorFrontend.h
Comment 3 Peter Rybin 2011-12-22 10:58:32 PST
Created attachment 120342 [details]
Sample InspectorFrontend.cpp
Comment 4 Peter Rybin 2011-12-22 11:49:28 PST
Created attachment 120356 [details]
Patch
Comment 5 Gyuyoung Kim 2011-12-22 12:12:31 PST
Comment on attachment 120356 [details]
Patch

Attachment 120356 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/10997623
Comment 6 Early Warning System Bot 2011-12-22 12:18:15 PST
Comment on attachment 120356 [details]
Patch

Attachment 120356 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10997627
Comment 7 WebKit Review Bot 2011-12-22 12:22:44 PST
Comment on attachment 120356 [details]
Patch

Attachment 120356 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11001595
Comment 8 Gustavo Noronha (kov) 2011-12-22 12:35:00 PST
Comment on attachment 120356 [details]
Patch

Attachment 120356 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/10997636
Comment 9 Peter Rybin 2011-12-22 12:57:09 PST
Created attachment 120367 [details]
Patch
Comment 10 Peter Rybin 2011-12-23 04:16:50 PST
Created attachment 120456 [details]
For win trybot
Comment 11 Peter Rybin 2011-12-23 05:18:50 PST
Created attachment 120460 [details]
Patch
Comment 12 Peter Rybin 2011-12-23 05:20:11 PST
Created attachment 120461 [details]
Sample InspectorFrontend.h
Comment 13 Peter Rybin 2011-12-23 05:58:28 PST
Created attachment 120463 [details]
For win trybot
Comment 14 Peter Rybin 2011-12-23 07:47:40 PST
Created attachment 120465 [details]
For win trybot
Comment 15 Ilya Tikhonovsky 2011-12-23 08:14:31 PST
I'd like to see enum constants declared as CamelCase according to WebKit style guide. 

Rule Names:12.  Enum members should user InterCaps with an initial capital letter.

If it is not possible then I prefer the chromium style kCamelCase
Comment 16 Peter Rybin 2011-12-27 09:41:48 PST
Created attachment 120595 [details]
For trybots
Comment 17 Peter Rybin 2011-12-27 10:03:20 PST
Created attachment 120599 [details]
InspectorFrontend.h base version
Comment 18 Peter Rybin 2011-12-27 10:04:28 PST
Created attachment 120600 [details]
InspectorFrontend.cpp base version
Comment 19 Peter Rybin 2011-12-27 10:25:27 PST
Created attachment 120601 [details]
Patch
Comment 20 Peter Rybin 2011-12-27 10:26:43 PST
Created attachment 120602 [details]
New InspectorFrontend.h
Comment 21 Peter Rybin 2011-12-27 10:28:19 PST
Created attachment 120603 [details]
New InspectorFrontend.cpp
Comment 22 Peter Rybin 2011-12-27 10:31:36 PST
Created attachment 120604 [details]
Generator output diff
Comment 23 Yury Semikhatsky 2011-12-27 11:28:36 PST
Comment on attachment 120601 [details]
Patch

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

> Source/WebCore/inspector/CodeGeneratorInspector.py:54
> +    "": "Empty",

Please change this to some non-empty constant ("regular" should be find for CSSRule.origin as we discussed offline) or  file a bug about this.
Comment 24 Yury Semikhatsky 2011-12-28 05:29:47 PST
Comment on attachment 120601 [details]
Patch

Clearing flags on attachment: 120601

Committed r103763: <http://trac.webkit.org/changeset/103763>
Comment 25 Yury Semikhatsky 2011-12-28 05:30:02 PST
All reviewed patches have been landed.  Closing bug.
Comment 26 Yury Semikhatsky 2011-12-28 06:58:18 PST
Reopening since the patch was rolled out in https://bugs.webkit.org/show_bug.cgi?id=75307 due to Mac compile failures.
Comment 27 Peter Rybin 2011-12-28 08:18:52 PST
Created attachment 120671 [details]
Patch
Comment 28 Peter Rybin 2011-12-28 08:25:27 PST
Created attachment 120673 [details]
New InspectorFrontend.h
Comment 29 Peter Rybin 2011-12-28 08:26:03 PST
Created attachment 120674 [details]
New InspectorFrontend.cpp
Comment 30 Peter Rybin 2011-12-28 08:27:32 PST
Created attachment 120675 [details]
Generator output diff
Comment 31 Yury Semikhatsky 2011-12-28 08:35:04 PST
Created attachment 120676 [details]
Same patch to test it on Mac bot
Comment 32 Yury Semikhatsky 2012-01-11 06:18:00 PST
Comment on attachment 120671 [details]
Patch

Clearing flags on attachment: 120671

Committed r104707: <http://trac.webkit.org/changeset/104707>
Comment 33 Yury Semikhatsky 2012-01-11 06:18:27 PST
All reviewed patches have been landed.  Closing bug.