mshtml: Pass GeckoBrowser instead of HTMLDocumentObj to create_outer_window.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5e581621ab
commit
2d8610050d
|
@ -5445,7 +5445,6 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
|
|||
{
|
||||
mozIDOMWindowProxy *mozwindow;
|
||||
HTMLDocumentObj *doc;
|
||||
nsIDOMWindow *nswindow = NULL;
|
||||
nsresult nsres;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -5497,13 +5496,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
|
|||
if(NS_FAILED(nsres))
|
||||
ERR("GetContentDOMWindow failed: %08x\n", nsres);
|
||||
|
||||
nsres = mozIDOMWindowProxy_QueryInterface(mozwindow, &IID_nsIDOMWindow, (void**)&nswindow);
|
||||
mozIDOMWindowProxy_Release(mozwindow);
|
||||
assert(nsres == NS_OK);
|
||||
|
||||
hres = HTMLOuterWindow_Create(doc, nswindow, NULL /* FIXME */, &doc->basedoc.window);
|
||||
if(nswindow)
|
||||
nsIDOMWindow_Release(nswindow);
|
||||
hres = create_outer_window(doc->nscontainer, mozwindow, NULL, &doc->basedoc.window);
|
||||
if(FAILED(hres)) {
|
||||
htmldoc_release(&doc->basedoc);
|
||||
return hres;
|
||||
|
|
|
@ -54,15 +54,9 @@ static HRESULT set_frame_doc(HTMLFrameBase *frame, nsIDOMDocument *nsdoc)
|
|||
return E_FAIL;
|
||||
|
||||
window = mozwindow_to_window(mozwindow);
|
||||
if(!window) {
|
||||
nsIDOMWindow *nswindow;
|
||||
nsres = mozIDOMWindowProxy_QueryInterface(mozwindow, &IID_nsIDOMWindow, (void**)&nswindow);
|
||||
assert(nsres == NS_OK);
|
||||
|
||||
hres = HTMLOuterWindow_Create(frame->element.node.doc->basedoc.doc_obj, nswindow,
|
||||
if(!window && frame->element.node.doc->browser)
|
||||
hres = create_outer_window(frame->element.node.doc->browser, mozwindow,
|
||||
frame->element.node.doc->basedoc.window, &window);
|
||||
nsIDOMWindow_Release(nswindow);
|
||||
}
|
||||
mozIDOMWindowProxy_Release(mozwindow);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
|
|
@ -3532,10 +3532,11 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, IMoniker *mon,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow,
|
||||
HRESULT create_outer_window(GeckoBrowser *browser, mozIDOMWindowProxy *mozwindow,
|
||||
HTMLOuterWindow *parent, HTMLOuterWindow **ret)
|
||||
{
|
||||
HTMLOuterWindow *window;
|
||||
nsresult nsres;
|
||||
HRESULT hres;
|
||||
|
||||
window = alloc_window(sizeof(HTMLOuterWindow));
|
||||
|
@ -3545,17 +3546,12 @@ HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow,
|
|||
window->base.outer_window = window;
|
||||
window->base.inner_window = NULL;
|
||||
|
||||
window->doc_obj = doc_obj;
|
||||
window->doc_obj = browser->doc;
|
||||
|
||||
if(nswindow) {
|
||||
nsresult nsres;
|
||||
|
||||
nsIDOMWindow_AddRef(nswindow);
|
||||
window->nswindow = nswindow;
|
||||
|
||||
nsres = nsIDOMWindow_QueryInterface(nswindow, &IID_mozIDOMWindowProxy, (void**)&window->window_proxy);
|
||||
assert(nsres == NS_OK);
|
||||
}
|
||||
mozIDOMWindowProxy_AddRef(mozwindow);
|
||||
window->window_proxy = mozwindow;
|
||||
nsres = mozIDOMWindowProxy_QueryInterface(mozwindow, &IID_nsIDOMWindow, (void**)&window->nswindow);
|
||||
assert(nsres == NS_OK);
|
||||
|
||||
window->scriptmode = parent ? parent->scriptmode : SCRIPTMODE_GECKO;
|
||||
window->readystate = READYSTATE_UNINITIALIZED;
|
||||
|
|
|
@ -867,7 +867,7 @@ HRESULT MHTMLDocument_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
|||
HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
HRESULT create_document_node(nsIDOMHTMLDocument*,GeckoBrowser*,HTMLInnerWindow*,HTMLDocumentNode**) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT HTMLOuterWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLOuterWindow*,HTMLOuterWindow**) DECLSPEC_HIDDEN;
|
||||
HRESULT create_outer_window(GeckoBrowser*,mozIDOMWindowProxy*,HTMLOuterWindow*,HTMLOuterWindow**) DECLSPEC_HIDDEN;
|
||||
HRESULT update_window_doc(HTMLInnerWindow*) DECLSPEC_HIDDEN;
|
||||
HTMLOuterWindow *mozwindow_to_window(const mozIDOMWindowProxy*) DECLSPEC_HIDDEN;
|
||||
void get_top_window(HTMLOuterWindow*,HTMLOuterWindow**) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue