mshtml: Get rid of no longer useful get_nsdoc_window helper.
This commit is contained in:
parent
43d9122e3c
commit
05d3b9cd1a
|
@ -39,13 +39,14 @@ HRESULT set_frame_doc(HTMLFrameBase *frame, nsIDOMDocument *nsdoc)
|
|||
{
|
||||
nsIDOMWindow *nswindow;
|
||||
HTMLWindow *window;
|
||||
nsresult nsres;
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
if(frame->content_window)
|
||||
return S_OK;
|
||||
|
||||
nswindow = get_nsdoc_window(nsdoc);
|
||||
if(!nswindow)
|
||||
nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
|
||||
if(NS_FAILED(nsres) || !nswindow)
|
||||
return E_FAIL;
|
||||
|
||||
window = nswindow_to_window(nswindow);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
HTMLWindow *child;
|
||||
|
|
|
@ -609,7 +609,6 @@ HRESULT create_document_fragment(nsIDOMNode*,HTMLDocumentNode*,HTMLDocumentNode*
|
|||
HRESULT HTMLWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLWindow*,HTMLWindow**) DECLSPEC_HIDDEN;
|
||||
void update_window_doc(HTMLWindow*) DECLSPEC_HIDDEN;
|
||||
HTMLWindow *nswindow_to_window(const nsIDOMWindow*) DECLSPEC_HIDDEN;
|
||||
nsIDOMWindow *get_nsdoc_window(nsIDOMDocument*) DECLSPEC_HIDDEN;
|
||||
HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
|
||||
HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
|
||||
HRESULT HTMLLocation_Create(HTMLWindow*,HTMLLocation**) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -126,9 +126,9 @@ static HTMLWindow *get_elem_window(nsIDOMElement *elem)
|
|||
if(NS_FAILED(nsres))
|
||||
return NULL;
|
||||
|
||||
nswindow = get_nsdoc_window(nsdoc);
|
||||
nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
|
||||
nsIDOMDocument_Release(nsdoc);
|
||||
if(!nswindow)
|
||||
if(NS_FAILED(nsres) || !nswindow)
|
||||
return NULL;
|
||||
|
||||
window = nswindow_to_window(nswindow);
|
||||
|
|
Loading…
Reference in New Issue