Commit 067e982b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Pass GeckoBrowser instead of HTMLDocumentObj to create_document_node.

parent 52188895
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
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