mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
mshtml: Return content document in get_document for frame elements.
This commit is contained in:
parent
7c64ab1e83
commit
999371724a
@ -569,9 +569,11 @@ static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch **
|
||||
if(!p)
|
||||
return E_POINTER;
|
||||
|
||||
if(This->node.vtbl->get_document)
|
||||
return This->node.vtbl->get_document(&This->node, p);
|
||||
|
||||
*p = (IDispatch*)HTMLDOC(&This->node.doc->basedoc);
|
||||
IDispatch_AddRef(*p);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -443,11 +443,30 @@ static void HTMLFrameElement_destructor(HTMLDOMNode *iface)
|
||||
HTMLFrameBase_destructor(&This->framebase);
|
||||
}
|
||||
|
||||
static HRESULT HTMLFrameElement_get_document(HTMLDOMNode *iface, IDispatch **p)
|
||||
{
|
||||
HTMLFrameElement *This = HTMLFRAME_NODE_THIS(iface);
|
||||
|
||||
if(!This->framebase.content_window || !This->framebase.content_window->doc) {
|
||||
*p = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
*p = (IDispatch*)HTMLDOC(&This->framebase.content_window->doc->basedoc);
|
||||
IDispatch_AddRef(*p);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#undef HTMLFRAME_NODE_THIS
|
||||
|
||||
static const NodeImplVtbl HTMLFrameElementImplVtbl = {
|
||||
HTMLFrameElement_QI,
|
||||
HTMLFrameElement_destructor
|
||||
HTMLFrameElement_destructor,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
HTMLFrameElement_get_document
|
||||
};
|
||||
|
||||
HTMLElement *HTMLFrameElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLWindow *content_window)
|
||||
|
@ -58,11 +58,30 @@ static void HTMLIFrame_destructor(HTMLDOMNode *iface)
|
||||
HTMLFrameBase_destructor(&This->framebase);
|
||||
}
|
||||
|
||||
static HRESULT HTMLIFrame_get_document(HTMLDOMNode *iface, IDispatch **p)
|
||||
{
|
||||
HTMLIFrame *This = HTMLIFRAME_NODE_THIS(iface);
|
||||
|
||||
if(!This->framebase.content_window || !This->framebase.content_window->doc) {
|
||||
*p = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
*p = (IDispatch*)HTMLDOC(&This->framebase.content_window->doc->basedoc);
|
||||
IDispatch_AddRef(*p);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#undef HTMLIFRAME_NODE_THIS
|
||||
|
||||
static const NodeImplVtbl HTMLIFrameImplVtbl = {
|
||||
HTMLIFrame_QI,
|
||||
HTMLIFrame_destructor
|
||||
HTMLIFrame_destructor,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
HTMLIFrame_get_document
|
||||
};
|
||||
|
||||
static const tid_t HTMLIFrame_iface_tids[] = {
|
||||
|
@ -445,6 +445,7 @@ typedef struct {
|
||||
HRESULT (*call_event)(HTMLDOMNode*,DWORD,BOOL*);
|
||||
HRESULT (*put_disabled)(HTMLDOMNode*,VARIANT_BOOL);
|
||||
HRESULT (*get_disabled)(HTMLDOMNode*,VARIANT_BOOL*);
|
||||
HRESULT (*get_document)(HTMLDOMNode*,IDispatch**);
|
||||
} NodeImplVtbl;
|
||||
|
||||
struct HTMLDOMNode {
|
||||
|
Loading…
Reference in New Issue
Block a user