Bug 133711

Summary: Web Inspector: Typebuilder should handle an Array of $ref type string with enum.
Product: WebKit Reporter: James Craig <jcraig>
Component: Web InspectorAssignee: 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:    

Description James Craig 2014-06-10 18:35:12 PDT
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.
Comment 1 Radar WebKit Bug Importer 2014-06-10 18:36:09 PDT
<rdar://problem/17262363>
Comment 2 James Craig 2014-06-10 18:38:23 PDT
Originally noticed when working on bug 130913.
Comment 3 Brian Burg 2014-06-27 14:30:59 PDT
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.