diff options
author | Andreia Gaita <avidigal@novell.com> | 2008-11-23 18:21:19 +0300 |
---|---|---|
committer | Andreia Gaita <avidigal@novell.com> | 2008-11-23 18:21:19 +0300 |
commit | 1f907e954a20c23bec0c70d5149673e409f9afe5 (patch) | |
tree | 303d73ec2600ccbe2e33b2036e5c821ad9f4e10c /mcs/class/Mono.WebBrowser | |
parent | 5c6aaadcd463fb48ad0a65b9af364dbb0a3cecdb (diff) |
* 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>
svn path=/trunk/mcs/; revision=119745
Diffstat (limited to 'mcs/class/Mono.WebBrowser')
-rw-r--r-- | mcs/class/Mono.WebBrowser/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/Mono.WebBrowser/Mono.Mozilla/WebBrowser.cs | 16 |
2 files changed, 21 insertions, 1 deletions
diff --git a/mcs/class/Mono.WebBrowser/ChangeLog b/mcs/class/Mono.WebBrowser/ChangeLog index 1a4d7d655f5..7884a1df29b 100644 --- a/mcs/class/Mono.WebBrowser/ChangeLog +++ b/mcs/class/Mono.WebBrowser/ChangeLog @@ -1,5 +1,11 @@ 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. * Mono.Mozilla/interfaces/nsIRequest.cs: Fix status type [Fixes #445498] diff --git a/mcs/class/Mono.WebBrowser/Mono.Mozilla/WebBrowser.cs b/mcs/class/Mono.WebBrowser/Mono.Mozilla/WebBrowser.cs index aaae0d89a7c..41a603a1eee 100644 --- a/mcs/class/Mono.WebBrowser/Mono.Mozilla/WebBrowser.cs +++ b/mcs/class/Mono.WebBrowser/Mono.Mozilla/WebBrowser.cs @@ -56,6 +56,10 @@ namespace Mono.Mozilla bool streamingMode; internal Hashtable documents; + + int width; + int height; + bool isDirty; public WebBrowser (Platform platform) { @@ -76,6 +80,10 @@ namespace Mono.Mozilla if (!creating && !created) { creating = true; created = Base.Create (this); + if (created && isDirty) { + isDirty = false; + Base.Resize (this, width, height); + } } return created; } @@ -104,7 +112,10 @@ namespace Mono.Mozilla 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; } @@ -284,6 +295,9 @@ namespace Mono.Mozilla public void Resize (int width, int height) { + this.width = width; + this.height = height; + isDirty = true; if (!created) return; Base.Resize (this, width, height); } |