mshtml: Pass GeckoBrowser instead of HTMLDocumentObj to create_document_node.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-03-11 14:23:30 +01:00 committed by Alexandre Julliard
parent 521888958c
commit 067e982b3c
3 changed files with 5 additions and 6 deletions

View File

@ -5163,8 +5163,9 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
return doc;
}
HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_obj, HTMLInnerWindow *window, HTMLDocumentNode **ret)
HRESULT create_document_node(nsIDOMHTMLDocument *nsdoc, GeckoBrowser *browser, HTMLInnerWindow *window, HTMLDocumentNode **ret)
{
HTMLDocumentObj *doc_obj = browser->doc;
HTMLDocumentNode *doc;
doc = alloc_doc_node(doc_obj, window);

View File

@ -3627,10 +3627,8 @@ HRESULT update_window_doc(HTMLInnerWindow *window)
assert(!window->doc);
if(!outer_window) {
ERR("NULL outer window\n");
if(!outer_window)
return E_UNEXPECTED;
}
nsres = nsIDOMWindow_GetDocument(outer_window->nswindow, &nsdoc);
if(NS_FAILED(nsres) || !nsdoc) {
@ -3645,7 +3643,7 @@ HRESULT update_window_doc(HTMLInnerWindow *window)
return E_FAIL;
}
hres = create_doc_from_nsdoc(nshtmldoc, outer_window->doc_obj, window, &window->doc);
hres = create_document_node(nshtmldoc, outer_window->doc_obj->nscontainer, window, &window->doc);
nsIDOMHTMLDocument_Release(nshtmldoc);
if(FAILED(hres))
return hres;

View File

@ -862,7 +862,7 @@ struct HTMLDocumentNode {
HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT MHTMLDocument_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument*,HTMLDocumentObj*,HTMLInnerWindow*,HTMLDocumentNode**) DECLSPEC_HIDDEN;
HRESULT create_document_node(nsIDOMHTMLDocument*,GeckoBrowser*,HTMLInnerWindow*,HTMLDocumentNode**) DECLSPEC_HIDDEN;
HRESULT HTMLOuterWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLOuterWindow*,HTMLOuterWindow**) DECLSPEC_HIDDEN;
HRESULT update_window_doc(HTMLInnerWindow*) DECLSPEC_HIDDEN;