Commit 5e8210bb authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Move console to the inner window.

parent c81c0aa7
...@@ -257,9 +257,6 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface) ...@@ -257,9 +257,6 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
TRACE("(%p) ref=%ld\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) { if(!ref) {
if (This->console)
IWineMSHTMLConsole_Release(This->console);
if(is_outer_window(This)) if(is_outer_window(This))
release_outer_window(This->outer_window); release_outer_window(This->outer_window);
else else
...@@ -3255,15 +3252,16 @@ static HRESULT WINAPI window_private_postMessage(IWineHTMLWindowPrivate *iface, ...@@ -3255,15 +3252,16 @@ static HRESULT WINAPI window_private_postMessage(IWineHTMLWindowPrivate *iface,
static HRESULT WINAPI window_private_get_console(IWineHTMLWindowPrivate *iface, IDispatch **console) static HRESULT WINAPI window_private_get_console(IWineHTMLWindowPrivate *iface, IDispatch **console)
{ {
HTMLWindow *This = impl_from_IWineHTMLWindowPrivateVtbl(iface); HTMLWindow *This = impl_from_IWineHTMLWindowPrivateVtbl(iface);
HTMLInnerWindow *window = This->inner_window;
TRACE("iface %p, console %p.\n", iface, console); TRACE("iface %p, console %p.\n", iface, console);
if (!This->console) if (!window->console)
create_console(dispex_compat_mode(&This->inner_window->event_target.dispex), &This->console); create_console(dispex_compat_mode(&window->event_target.dispex), &window->console);
*console = (IDispatch *)This->console; *console = (IDispatch *)window->console;
if (This->console) if (window->console)
IWineMSHTMLConsole_AddRef(This->console); IWineMSHTMLConsole_AddRef(window->console);
return S_OK; return S_OK;
} }
...@@ -3725,7 +3723,7 @@ static void HTMLWindow_unlink(DispatchEx *dispex) ...@@ -3725,7 +3723,7 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
TRACE("%p\n", This); TRACE("%p\n", This);
unlink_ref(&This->base.console); unlink_ref(&This->console);
detach_inner_window(This); detach_inner_window(This);
if(This->doc) { if(This->doc) {
......
...@@ -569,8 +569,6 @@ struct HTMLWindow { ...@@ -569,8 +569,6 @@ struct HTMLWindow {
IWineHTMLWindowPrivate IWineHTMLWindowPrivate_iface; IWineHTMLWindowPrivate IWineHTMLWindowPrivate_iface;
IWineHTMLWindowCompatPrivate IWineHTMLWindowCompatPrivate_iface; IWineHTMLWindowCompatPrivate IWineHTMLWindowCompatPrivate_iface;
IWineMSHTMLConsole *console;
LONG ref; LONG ref;
HTMLInnerWindow *inner_window; HTMLInnerWindow *inner_window;
...@@ -625,6 +623,7 @@ struct HTMLInnerWindow { ...@@ -625,6 +623,7 @@ struct HTMLInnerWindow {
IOmNavigator *navigator; IOmNavigator *navigator;
IHTMLStorage *session_storage; IHTMLStorage *session_storage;
IHTMLStorage *local_storage; IHTMLStorage *local_storage;
IWineMSHTMLConsole *console;
BOOL performance_initialized; BOOL performance_initialized;
VARIANT performance; VARIANT performance;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment