+2008-11-23 Andreia Gaita <shana@jitted.com>
+
+ * Mono.Mozilla/WebBrowser.cs: Do delayed resizing, when the resize happens
+ before a window is created. Fix the window getter so it gets the top content
+ window if no window is focused.
+
2008-11-23 Andreia Gaita <shana@jitted.com>
* Mono.Mozilla/Callback.cs: Send NS_BINDING_ABORTED code for a cancelled request.
bool streamingMode;
internal Hashtable documents;
+
+ int width;
+ int height;
+ bool isDirty;
public WebBrowser (Platform platform)
{
if (!creating && !created) {
creating = true;
created = Base.Create (this);
+ if (created && isDirty) {
+ isDirty = false;
+ Base.Resize (this, width, height);
+ }
}
return created;
}
nsIWebBrowserFocus webBrowserFocus = (nsIWebBrowserFocus) (navigation.navigation);
nsIDOMWindow window;
webBrowserFocus.getFocusedWindow (out window);
- return new DOM.Window (this, window) as IWindow;
+ if (window == null)
+ ((nsIWebBrowser) navigation.navigation).getContentDOMWindow (out window);
+ if (window != null)
+ return new DOM.Window (this, window) as IWindow;
}
return null;
}
public void Resize (int width, int height)
{
+ this.width = width;
+ this.height = height;
+ isDirty = true;
if (!created) return;
Base.Resize (this, width, height);
}