mshtml: Get rid of no longer useful get_nsdoc_window helper.

This commit is contained in:
Jacek Caban 2011-08-24 15:38:08 +02:00 committed by Alexandre Julliard
parent 43d9122e3c
commit 05d3b9cd1a
4 changed files with 5 additions and 19 deletions

View File

@ -39,13 +39,14 @@ HRESULT set_frame_doc(HTMLFrameBase *frame, nsIDOMDocument *nsdoc)
{ {
nsIDOMWindow *nswindow; nsIDOMWindow *nswindow;
HTMLWindow *window; HTMLWindow *window;
nsresult nsres;
HRESULT hres = S_OK; HRESULT hres = S_OK;
if(frame->content_window) if(frame->content_window)
return S_OK; return S_OK;
nswindow = get_nsdoc_window(nsdoc); nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
if(!nswindow) if(NS_FAILED(nsres) || !nswindow)
return E_FAIL; return E_FAIL;
window = nswindow_to_window(nswindow); window = nswindow_to_window(nswindow);

View File

@ -83,20 +83,6 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node)
} }
} }
nsIDOMWindow *get_nsdoc_window(nsIDOMDocument *nsdoc)
{
nsIDOMWindow *nswindow;
nsresult nsres;
nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
if(NS_FAILED(nsres)) {
ERR("GetDefaultView failed: %08x\n", nsres);
return NULL;
}
return nswindow;
}
static void release_children(HTMLWindow *This) static void release_children(HTMLWindow *This)
{ {
HTMLWindow *child; HTMLWindow *child;

View File

@ -609,7 +609,6 @@ HRESULT create_document_fragment(nsIDOMNode*,HTMLDocumentNode*,HTMLDocumentNode*
HRESULT HTMLWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLWindow*,HTMLWindow**) DECLSPEC_HIDDEN; HRESULT HTMLWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLWindow*,HTMLWindow**) DECLSPEC_HIDDEN;
void update_window_doc(HTMLWindow*) DECLSPEC_HIDDEN; void update_window_doc(HTMLWindow*) DECLSPEC_HIDDEN;
HTMLWindow *nswindow_to_window(const nsIDOMWindow*) DECLSPEC_HIDDEN; HTMLWindow *nswindow_to_window(const nsIDOMWindow*) DECLSPEC_HIDDEN;
nsIDOMWindow *get_nsdoc_window(nsIDOMDocument*) DECLSPEC_HIDDEN;
HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN; HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN; HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
HRESULT HTMLLocation_Create(HTMLWindow*,HTMLLocation**) DECLSPEC_HIDDEN; HRESULT HTMLLocation_Create(HTMLWindow*,HTMLLocation**) DECLSPEC_HIDDEN;

View File

@ -126,9 +126,9 @@ static HTMLWindow *get_elem_window(nsIDOMElement *elem)
if(NS_FAILED(nsres)) if(NS_FAILED(nsres))
return NULL; return NULL;
nswindow = get_nsdoc_window(nsdoc); nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
nsIDOMDocument_Release(nsdoc); nsIDOMDocument_Release(nsdoc);
if(!nswindow) if(NS_FAILED(nsres) || !nswindow)
return NULL; return NULL;
window = nswindow_to_window(nswindow); window = nswindow_to_window(nswindow);