Bug 133711
Summary: | Web Inspector: Typebuilder should handle an Array of $ref type string with enum. | ||
---|---|---|---|
Product: | WebKit | Reporter: | James Craig <jcraig> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | bburg, inspector-bugzilla-changes, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 131596 | ||
Bug Blocks: |
James Craig
via JoePeck, Typebuilder should handle an Array of $ref type string with enum.
1. Recognize when an array has a $ref which is a string with enums. In such cases we should probably have an Array<String> instead of Array<Enum>
2. In such cases allow Array::addItem(Type::Enum) instead of Array::addItem(String) which under the hood does pushString(getWebEnumConstantValue(enumValue)).
3. For this to work, we may need something special like "EnumArray", or Array<T1, T2> where T1 is the storage, and T2 is the input.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/17262363>
James Craig
Originally noticed when working on bug 130913.
Brian Burg
As far as I remember, this is supported by the new code generator (if not from C++, at least in the JSON file). These issues are much harder to fix in the current generator because the ordering of enums, typedefs, etc is very fragile.