Module: wine Branch: master Commit: 067e982b3ca6225cddbc915af0f7fe11387035e2 URL: https://source.winehq.org/git/wine.git/?a=commit;h=067e982b3ca6225cddbc915af...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Mar 11 14:23:30 2019 +0100
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
---
dlls/mshtml/htmldoc.c | 3 ++- dlls/mshtml/htmlwindow.c | 6 ++---- dlls/mshtml/mshtml_private.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 100dc97..2d58b8d 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -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); diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 0ab81f1..71ffaea 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -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; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 03a3f3d..34a0d8b 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -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;