While you're addressing nsIWebBrowserChrome here are a couple of things i noticed:

1. nsIWebBrowserChrome::CreateBrowserWindow() gets called to create a window - fo ex. in the case of JS window.open(). However, issuing a JS window.close() on that same window results in nsIBaseWindow::Destroy() being called. It works but is confusing since it's done via two different interfaces.

2. Setting the size/position(via JS) of the same window  created thru' the nsIWebBrowserChrome::CreateBrowserWindow() is also done thru' the nsIBaseWindow interface.

Should'nt all interactions with a WebBrowserChrome window be done via a single interface i.e. embedders have to implement just a single interface for operating on a Web browser chrome window.

Or, is there some other reason (which i'm missing) for having these in two different interfaces?

3. The nsIWebBrowserChrome::SetChromeFlags() does not seem to be used. I expected this method to be called when someone did the following in JS:

   var theWin =  window.open(....,"toolbar=1, statusbar=1", ....)';

   // Then at a later point decided to hide the toolbar via JS by doing

  theWin.toolbar.visible = false;

However, the nsIWebBrowserChrome::SetChromeFlags() does not get called.
Is this what this method is intended for?

Thanks
Chak


Judson Valeski wrote:
[EMAIL PROTECTED]">


It's sounding like nsIWebBrowserChrome has some other issues as well. Here's a
snippet from a msg from Conrad:

"There are two methods which would imply that it's a singleton and hopefully they
can be put elsewhere: nsIWebBrowserChrome::CreateBrowserWindow() and
nsIWebBrowserChrome::FindNamedBrowserItem()."

Let's discuss nsIWebBrowserChrome in it's entirety in the next api review meeting.

Jud




Reply via email to