Bug 61853 - Web Inspector: allow opening inspector for existing workers
Summary: Web Inspector: allow opening inspector for existing workers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks: 58541
  Show dependency treegraph
 
Reported: 2011-06-01 04:08 PDT by Yury Semikhatsky
Modified: 2011-06-01 07:35 PDT (History)
12 users (show)

See Also:


Attachments
Patch (20.67 KB, patch)
2011-06-01 04:11 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (20.89 KB, patch)
2011-06-01 04:36 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (21.36 KB, patch)
2011-06-01 07:25 PDT, Yury Semikhatsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2011-06-01 04:08:54 PDT
We need a sidebar pane that would enumerate all running workers and allow to open inspector for each of them.
Comment 1 Yury Semikhatsky 2011-06-01 04:11:35 PDT
Created attachment 95582 [details]
Patch
Comment 2 WebKit Review Bot 2011-06-01 04:23:13 PDT
Comment on attachment 95582 [details]
Patch

Attachment 95582 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8754499
Comment 3 Yury Semikhatsky 2011-06-01 04:36:23 PDT
Created attachment 95585 [details]
Patch
Comment 4 Pavel Feldman 2011-06-01 06:59:21 PDT
Is there a screenshot? I was thinking that workers could be opened via clicking the links, not the checkboxes...
Comment 5 Pavel Feldman 2011-06-01 07:04:21 PDT
Comment on attachment 95585 [details]
Patch

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

Overall looks good. r- for no constants, no screenshots. Btw, how do we test this?

> Source/WebCore/inspector/front-end/WorkerManager.js:77
> +        var win = this._workerIdToWindow[workerId];

please do not use abbreviations. workerWindow?

> Source/WebCore/inspector/front-end/WorkerManager.js:85
> +        url = url.replace("docked=true&", "");

I thought that "docked" was processed in /chromium/ only. Is it not so?

> Source/WebCore/inspector/front-end/WorkersSidebarPane.js:119
> +    workerManager.addEventListener("worker-added", this._workerAdded, this);

These should be constants.

> Source/WebCore/inspector/front-end/WorkersSidebarPane.js:139
> +        workerItem.checkbox.checked = false;

I'd rather have a list of links.
Comment 6 Yury Semikhatsky 2011-06-01 07:25:36 PDT
Created attachment 95598 [details]
Patch
Comment 7 Yury Semikhatsky 2011-06-01 07:29:19 PDT
(In reply to comment #5)
> (From update of attachment 95585 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=95585&action=review
> 
> Overall looks good. r- for no constants, no screenshots. Btw, how do we test this?
> 
> > Source/WebCore/inspector/front-end/WorkerManager.js:77
> > +        var win = this._workerIdToWindow[workerId];
> 
> please do not use abbreviations. workerWindow?
> 
Done.

> > Source/WebCore/inspector/front-end/WorkerManager.js:85
> > +        url = url.replace("docked=true&", "");
> 
> I thought that "docked" was processed in /chromium/ only. Is it not so?
> 
Yes, it is. We can add platform-dependent hook here or try to refactor Chromium code to make it mimic other ports behavior.

> > Source/WebCore/inspector/front-end/WorkersSidebarPane.js:119
> > +    workerManager.addEventListener("worker-added", this._workerAdded, this);
> 
> These should be constants.
> 
Done.

> > Source/WebCore/inspector/front-end/WorkersSidebarPane.js:139
> > +        workerItem.checkbox.checked = false;
> 
> I'd rather have a list of links.

I started with a list of links but it doesn't give you an idea on which workers are already being inspected. So I'd leave it as a list of checkboxes for now.
Comment 8 Yury Semikhatsky 2011-06-01 07:35:14 PDT
Committed r87803: <http://trac.webkit.org/changeset/87803>