Bug 121121

Summary: Web Inspector: Make WebKitGTK+ port work with Eclipse chromedevtools plugin
Product: WebKit Reporter: Andre Moreira Magalhaes <andrunko>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, danilo.eu, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 121123    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Updated patch against upstream master
gustavo: review+, gustavo: commit-queue-
Patch with review suggestions applied none

Description Andre Moreira Magalhaes 2013-09-10 14:08:05 PDT
The chromedevtools plugin (http://code.google.com/p/chromedevtools/) requires a specific json format to connect to the webkit inspector. 

The current format is missing some required fields that make the connection with the plugin fails.

The format expected by the plugin is as follows:
  {
   "title": "Foo",
   "url": "http://foo",
   "devtoolsFrontendUrl": "/inspector.html?ws=localhost:9222/devtools/page/1",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/1"
  }

The current format is missing the entries for "devtoolsFrontendUrl" and "webSocketDebuggerUrl".

The plugin also sends a GET request to http://host:port/json instead of http://host:port/pagelist.json when retrieving the pages list.

Patch to follow.
Comment 1 Radar WebKit Bug Importer 2013-09-10 14:08:44 PDT
<rdar://problem/14958022>
Comment 2 Andre Moreira Magalhaes 2013-09-10 14:34:12 PDT
Created attachment 211244 [details]
Patch

This patch requires the patch from bug #121123 to work properly.
Comment 3 Andre Moreira Magalhaes 2013-09-13 13:46:20 PDT
Created attachment 211586 [details]
Updated patch against upstream master

Updated patch after http://trac.webkit.org/changeset/155714 - to use Main.html instead of inspector.html on the "devtoolsFrontendUrl" entry on results to /json requests.

Tested chromedevtools 0.3.8 plugin with master at 6fa836 + this updated patch and everything is working fine.
Comment 4 Gustavo Noronha (kov) 2013-09-27 08:30:06 PDT
Comment on attachment 211586 [details]
Updated patch against upstream master

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

> Source/WebKit2/ChangeLog:12
> +        fails.

s/fails/fail/

> Source/WebKit2/ChangeLog:28
> +        This patch fix the issues by adding support for the missing fields and accepting requests

s/fix/fixes/

> Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:128
> +
> +    // chromedevtools (http://code.google.com/p/chromedevtools) 0.3.8 expected JSON format:
> +    // {
> +    //  "title": "Foo",
> +    //  "url": "http://foo",
> +    //  "devtoolsFrontendUrl": "/Main.html?ws=localhost:9222/devtools/page/1",
> +    //  "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/1"
> +    // },
> +

This comment might be more useful if it comes before the response is built.
Comment 5 Andre Moreira Magalhaes 2013-09-27 08:50:04 PDT
Created attachment 212812 [details]
Patch with review suggestions applied

Patch with review suggestions applied.
Comment 6 Gustavo Noronha (kov) 2013-09-27 08:51:27 PDT
Comment on attachment 212812 [details]
Patch with review suggestions applied

Will just wait on the EWS to cq+
Comment 7 WebKit Commit Bot 2013-09-27 10:47:06 PDT
Comment on attachment 212812 [details]
Patch with review suggestions applied

Clearing flags on attachment: 212812

Committed r156555: <http://trac.webkit.org/changeset/156555>
Comment 8 WebKit Commit Bot 2013-09-27 10:47:09 PDT
All reviewed patches have been landed.  Closing bug.