Bug 121121 - Web Inspector: Make WebKitGTK+ port work with Eclipse chromedevtools plugin
Summary: Web Inspector: Make WebKitGTK+ port work with Eclipse chromedevtools plugin
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 121123
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-10 14:08 PDT by Andre Moreira Magalhaes
Modified: 2013-09-27 10:47 PDT (History)
6 users (show)

See Also:


Attachments
Patch (5.74 KB, patch)
2013-09-10 14:34 PDT, Andre Moreira Magalhaes
no flags Details | Formatted Diff | Diff
Updated patch against upstream master (5.63 KB, patch)
2013-09-13 13:46 PDT, Andre Moreira Magalhaes
gustavo: review+
gustavo: commit-queue-
Details | Formatted Diff | Diff
Patch with review suggestions applied (5.78 KB, patch)
2013-09-27 08:50 PDT, Andre Moreira Magalhaes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.