Bug 72506 - [WebKit2] Web Inspector: window.open should work inside inspector front-end
Summary: [WebKit2] Web Inspector: window.open should work inside inspector front-end
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords: InRadar
Depends on:
Blocks: 73069
  Show dependency treegraph
 
Reported: 2011-11-16 07:58 PST by Yury Semikhatsky
Modified: 2014-08-04 07:42 PDT (History)
15 users (show)

See Also:


Attachments
Patch (4.04 KB, patch)
2011-11-16 08:06 PST, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (4.38 KB, patch)
2011-11-17 08:39 PST, Yury Semikhatsky
timothy: 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-11-16 07:58:51 PST
window.open needs to be implemented for inspector front-end pages in order to open inspector windows for dedicated workers.
Comment 1 Yury Semikhatsky 2011-11-16 08:06:53 PST
Created attachment 115380 [details]
Patch
Comment 2 Yury Semikhatsky 2011-11-16 08:09:53 PST
(In reply to comment #1)
> Created an attachment (id=115380) [details]
> Patch

I'm not sure if it is correct approach to initialize one WebUIClient from another or should we only copy createNewPage* mehods and version on the corresponding WKPageUIClient instances.
Comment 3 Yury Semikhatsky 2011-11-16 22:49:37 PST
Timothy or Joseph, can you take a look at this change?
Comment 4 Timothy Hatcher 2011-11-17 07:33:33 PST
What do you mean by "open inspector windows for dedicated workers"? Workers as in the Workers API or just helper windows?
Comment 5 Timothy Hatcher 2011-11-17 07:49:09 PST
Comment on attachment 115380 [details]
Patch

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

> Source/WebKit2/ChangeLog:6
> +        Inspector front-end page now has the same WebUIClient as inspected page.

Please describe the reason/motivation for these changes.
Comment 6 Yury Semikhatsky 2011-11-17 08:16:33 PST
(In reply to comment #4)
> What do you mean by "open inspector windows for dedicated workers"? Workers as in the Workers API or just helper windows?

I meant that we need this to inspect dedicated workers running inside inspected page. Page inspector lists all running workers and should allow opening separate inspector front-end for each of them. To open such front-end from the page's inspector front-end we need window.open() to work there.
Comment 7 Yury Semikhatsky 2011-11-17 08:39:52 PST
Created attachment 115600 [details]
Patch
Comment 8 Timothy Hatcher 2011-11-19 12:53:16 PST
I'd like Sam or Anders to look at this.
Comment 9 Timothy Hatcher 2011-11-29 12:55:16 PST
Comment on attachment 115600 [details]
Patch

Sorry for not giving this much thought earlier. But now that I understand what is going on here, this should not land.

Hooking up the inspected page's UI client to a non-Safari created WKView is a bad idea (breaking some assumptions that Safari has the WKPage that gets passed ot its client).

Also windows opened with window.open will be Safari windows, not WebKit controlled windows. You will have Find in Page and other browser features in the window.open windows that don't (and shouldn't exist) in the Web Inspector.

We should implement a UIClient in WebKit2 that handles window.open and makes a WebKit owned window/WKView.

This patch is all about WebKit2, but we should implement this in WebKit also, which still has the Web Inspector and is used by clients other than Safari.
Comment 10 Brian Burg 2014-08-03 19:21:57 PDT
I don't think we have any need for opening extra inspector windows, as workers are not inspectable right now. In any case, the WK2 bits will need to be rewritten.
Comment 11 Radar WebKit Bug Importer 2014-08-03 19:22:04 PDT
<rdar://problem/17898462>
Comment 12 Timothy Hatcher 2014-08-04 07:42:31 PDT
YEah and our ideal worker debugging experience is not a separate window.