DocShell/Window targeting: Difference between revisions

m
GPHemsley moved page DocShell:Window targeting to DocShell/Window targeting without leaving a redirect
No edit summary
m (GPHemsley moved page DocShell:Window targeting to DocShell/Window targeting without leaving a redirect)
 
(7 intermediate revisions by 3 users not shown)
Line 15: Line 15:


I want to change step 8 to do the following instead:  If no docshell with the given name is found, get a "window provider" or something service and ask it for a new rendering area (nsIDOMWindow, probably, or nsIWebNavigation).  Pass in the initial target docshell (or its DOMWindow?) to this service, so that it can create new tabs, eg, in the right places (in the same window).  The service implementation would live in the embedding app (in toolkit or xpfe in Firefox/Seamonkey, for example) and would be free to return whatever window/webnavigation it wants.  If it returns nothing, we'd fall back to opening a new window via the window watcher as we do now.
I want to change step 8 to do the following instead:  If no docshell with the given name is found, get a "window provider" or something service and ask it for a new rendering area (nsIDOMWindow, probably, or nsIWebNavigation).  Pass in the initial target docshell (or its DOMWindow?) to this service, so that it can create new tabs, eg, in the right places (in the same window).  The service implementation would live in the embedding app (in toolkit or xpfe in Firefox/Seamonkey, for example) and would be free to return whatever window/webnavigation it wants.  If it returns nothing, we'd fall back to opening a new window via the window watcher as we do now.
In this setup, the webnavigation impl returned could do IPC or whatever it needs as necessary.  I don't see a reasonable way of doing POST across IPC short of defining our own IPC setup for it, so it would probably just throw on POST attempts.


We need to do something to fix steps 5 and 7.
We need to do something to fix steps 5 and 7.
== Comments ==
The use-case I'm running up against is a xulrunner-based "webrunner" (imagine gmail in a separate process). It will call window.open(url, "_blank") and I need to redirect this load into the externalprotocolhandler. I think I can hack this on the 1.8 branch by implementing nsIBrowserDOMWindow and setting "openinnewtab" to true, and then forcing nsIBrowserDOMWindow.openURI into the external protocol handler. The problem is that this catches all popup windows, whether they are meant to be "application popups" or "browser loads. I could imagine window.open("appwindow=true") to be overloaded so that webrunner apps could open app popup windows, or "external=true" to force open-in-default-browser. But both of those require coordinating windowwatcher with docshell.
--[[User:Benjamin Smedberg|bsmedberg]] 09:06, 28 Oct 2005 (PDT)
canmove, Confirmed users, Bureaucrats and Sysops emeriti
960

edits