Bug 155102

Summary: Web Inspector: It should be possible to initialize generated ObjC protocol types from an NSDictionary payload
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, keith_miller, mark.lam, mattbaker, msaboff, nvasilyev, saam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed Fix
none
For Landing none

Description BJ Burg 2016-03-06 22:06:50 PST
Generate this.
Comment 1 Radar WebKit Bug Importer 2016-03-06 22:07:06 PST
<rdar://problem/25002015>
Comment 2 BJ Burg 2016-03-06 23:30:34 PST
Created attachment 273163 [details]
Proposed Fix
Comment 3 WebKit Commit Bot 2016-03-06 23:31:36 PST
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)
Comment 4 Timothy Hatcher 2016-03-07 09:04:09 PST
Comment on attachment 273163 [details]
Proposed Fix

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

> Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:124
> +        lines.append('')

You should drop this. It leads to two newlines in a row.

> Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:1462
> +
> +

This should be one newline. See above.
Comment 5 BJ Burg 2016-03-07 09:43:47 PST
Created attachment 273187 [details]
For Landing
Comment 6 BJ Burg 2016-03-07 09:45:19 PST
(In reply to comment #4)
> Comment on attachment 273163 [details]
> Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=273163&action=review
> 
> > Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:124
> > +        lines.append('')
> 
> You should drop this. It leads to two newlines in a row.
> 
> > Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:1462
> > +
> > +
> 
> This should be one newline. See above.

Ok. I also guarded this new method so it's only generated when we pass '--frontend' to the generator, and rebaselined.
Comment 7 WebKit Commit Bot 2016-03-07 09:46:05 PST
Attachment 273187 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py:164:  [ObjCHeaderGenerator._generate_type_interface] Instance of 'ObjCHeaderGenerator' has no 'get_generator_setting' member  [pylint/E1101] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:94:  [ObjCProtocolTypesImplementationGenerator.generate_type_implementation] Instance of 'ObjCProtocolTypesImplementationGenerator' has no 'get_generator_setting' member  [pylint/E1101] [5]
Total errors found: 2 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 WebKit Commit Bot 2016-03-07 10:41:20 PST
Comment on attachment 273187 [details]
For Landing

Clearing flags on attachment: 273187

Committed r197689: <http://trac.webkit.org/changeset/197689>
Comment 9 WebKit Commit Bot 2016-03-07 10:41:25 PST
All reviewed patches have been landed.  Closing bug.