ReactOS 0.4.15-dev-8116-gf69e256
htmlframe.c File Reference
#include "mshtml_private.h"
Include dependency graph for htmlframe.c:

Go to the source code of this file.

Classes

struct  HTMLFrameElement
 

Functions

static HTMLFrameElementimpl_from_IHTMLFrameElement3 (IHTMLFrameElement3 *iface)
 
static HRESULT WINAPI HTMLFrameElement3_QueryInterface (IHTMLFrameElement3 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLFrameElement3_AddRef (IHTMLFrameElement3 *iface)
 
static ULONG WINAPI HTMLFrameElement3_Release (IHTMLFrameElement3 *iface)
 
static HRESULT WINAPI HTMLFrameElement3_GetTypeInfoCount (IHTMLFrameElement3 *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLFrameElement3_GetTypeInfo (IHTMLFrameElement3 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLFrameElement3_GetIDsOfNames (IHTMLFrameElement3 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLFrameElement3_Invoke (IHTMLFrameElement3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLFrameElement3_get_contentDocument (IHTMLFrameElement3 *iface, IDispatch **p)
 
static HRESULT WINAPI HTMLFrameElement3_put_src (IHTMLFrameElement3 *iface, BSTR v)
 
static HRESULT WINAPI HTMLFrameElement3_get_src (IHTMLFrameElement3 *iface, BSTR *p)
 
static HRESULT WINAPI HTMLFrameElement3_put_longDesc (IHTMLFrameElement3 *iface, BSTR v)
 
static HRESULT WINAPI HTMLFrameElement3_get_longDesc (IHTMLFrameElement3 *iface, BSTR *p)
 
static HRESULT WINAPI HTMLFrameElement3_put_frameBorder (IHTMLFrameElement3 *iface, BSTR v)
 
static HRESULT WINAPI HTMLFrameElement3_get_frameBorder (IHTMLFrameElement3 *iface, BSTR *p)
 
static HTMLFrameElementimpl_from_HTMLDOMNode (HTMLDOMNode *iface)
 
static HRESULT HTMLFrameElement_QI (HTMLDOMNode *iface, REFIID riid, void **ppv)
 
static void HTMLFrameElement_destructor (HTMLDOMNode *iface)
 
static HRESULT HTMLFrameElement_get_document (HTMLDOMNode *iface, IDispatch **p)
 
static HRESULT HTMLFrameElement_get_readystate (HTMLDOMNode *iface, BSTR *p)
 
static HRESULT HTMLFrameElement_get_dispid (HTMLDOMNode *iface, BSTR name, DWORD grfdex, DISPID *pid)
 
static HRESULT HTMLFrameElement_invoke (HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
 
static HRESULT HTMLFrameElement_bind_to_tree (HTMLDOMNode *iface)
 
static void HTMLFrameElement_traverse (HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
 
static void HTMLFrameElement_unlink (HTMLDOMNode *iface)
 
HRESULT HTMLFrameElement_Create (HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
 

Variables

static const IHTMLFrameElement3Vtbl HTMLFrameElement3Vtbl
 
static const NodeImplVtbl HTMLFrameElementImplVtbl
 
static const tid_t HTMLFrameElement_iface_tids []
 
static dispex_static_data_t HTMLFrameElement_dispex
 

Function Documentation

◆ HTMLFrameElement3_AddRef()

static ULONG WINAPI HTMLFrameElement3_AddRef ( IHTMLFrameElement3 *  iface)
static

Definition at line 39 of file htmlframe.c.

40{
42
43 return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface);
44}
static HTMLFrameElement * impl_from_IHTMLFrameElement3(IHTMLFrameElement3 *iface)
Definition: htmlframe.c:26

◆ HTMLFrameElement3_get_contentDocument()

static HRESULT WINAPI HTMLFrameElement3_get_contentDocument ( IHTMLFrameElement3 *  iface,
IDispatch **  p 
)
static

Definition at line 85 of file htmlframe.c.

86{
88 IHTMLDocument2 *doc;
90
91 TRACE("(%p)->(%p)\n", This, p);
92
93 if(!This->framebase.content_window) {
94 FIXME("NULL window\n");
95 return E_FAIL;
96 }
97
98 hres = IHTMLWindow2_get_document(&This->framebase.content_window->base.IHTMLWindow2_iface, &doc);
99 if(FAILED(hres))
100 return hres;
101
102 *p = doc ? (IDispatch*)doc : NULL;
103 return S_OK;
104}
#define FIXME(fmt,...)
Definition: debug.h:114
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hres
Definition: protocol.c:465
#define TRACE(s)
Definition: solgame.cpp:4

◆ HTMLFrameElement3_get_frameBorder()

static HRESULT WINAPI HTMLFrameElement3_get_frameBorder ( IHTMLFrameElement3 *  iface,
BSTR p 
)
static

Definition at line 141 of file htmlframe.c.

142{
144 FIXME("(%p)->(%p)\n", This, p);
145 return E_NOTIMPL;
146}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLFrameElement3_get_longDesc()

static HRESULT WINAPI HTMLFrameElement3_get_longDesc ( IHTMLFrameElement3 *  iface,
BSTR p 
)
static

Definition at line 127 of file htmlframe.c.

128{
130 FIXME("(%p)->(%p)\n", This, p);
131 return E_NOTIMPL;
132}

◆ HTMLFrameElement3_get_src()

static HRESULT WINAPI HTMLFrameElement3_get_src ( IHTMLFrameElement3 *  iface,
BSTR p 
)
static

Definition at line 113 of file htmlframe.c.

114{
116 FIXME("(%p)->(%p)\n", This, p);
117 return E_NOTIMPL;
118}

◆ HTMLFrameElement3_GetIDsOfNames()

static HRESULT WINAPI HTMLFrameElement3_GetIDsOfNames ( IHTMLFrameElement3 *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 68 of file htmlframe.c.

70{
72 return IDispatchEx_GetIDsOfNames(&This->framebase.element.node.event_target.dispex.IDispatchEx_iface, riid,
73 rgszNames, cNames, lcid, rgDispId);
74}
REFIID riid
Definition: atlbase.h:39

◆ HTMLFrameElement3_GetTypeInfo()

static HRESULT WINAPI HTMLFrameElement3_GetTypeInfo ( IHTMLFrameElement3 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 60 of file htmlframe.c.

62{
64 return IDispatchEx_GetTypeInfo(&This->framebase.element.node.event_target.dispex.IDispatchEx_iface, iTInfo,
65 lcid, ppTInfo);
66}

◆ HTMLFrameElement3_GetTypeInfoCount()

static HRESULT WINAPI HTMLFrameElement3_GetTypeInfoCount ( IHTMLFrameElement3 *  iface,
UINT pctinfo 
)
static

Definition at line 53 of file htmlframe.c.

54{
56 return IDispatchEx_GetTypeInfoCount(&This->framebase.element.node.event_target.dispex.IDispatchEx_iface,
57 pctinfo);
58}

◆ HTMLFrameElement3_Invoke()

static HRESULT WINAPI HTMLFrameElement3_Invoke ( IHTMLFrameElement3 *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 76 of file htmlframe.c.

79{
81 return IDispatchEx_Invoke(&This->framebase.element.node.event_target.dispex.IDispatchEx_iface, dispIdMember,
82 riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
83}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ HTMLFrameElement3_put_frameBorder()

static HRESULT WINAPI HTMLFrameElement3_put_frameBorder ( IHTMLFrameElement3 *  iface,
BSTR  v 
)
static

Definition at line 134 of file htmlframe.c.

135{
137 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
138 return E_NOTIMPL;
139}
const GLdouble * v
Definition: gl.h:2040
#define debugstr_w
Definition: kernel32.h:32

◆ HTMLFrameElement3_put_longDesc()

static HRESULT WINAPI HTMLFrameElement3_put_longDesc ( IHTMLFrameElement3 *  iface,
BSTR  v 
)
static

Definition at line 120 of file htmlframe.c.

121{
123 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
124 return E_NOTIMPL;
125}

◆ HTMLFrameElement3_put_src()

static HRESULT WINAPI HTMLFrameElement3_put_src ( IHTMLFrameElement3 *  iface,
BSTR  v 
)
static

Definition at line 106 of file htmlframe.c.

107{
109 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
110 return E_NOTIMPL;
111}

◆ HTMLFrameElement3_QueryInterface()

static HRESULT WINAPI HTMLFrameElement3_QueryInterface ( IHTMLFrameElement3 *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 31 of file htmlframe.c.

33{
35
36 return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
37}
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ HTMLFrameElement3_Release()

static ULONG WINAPI HTMLFrameElement3_Release ( IHTMLFrameElement3 *  iface)
static

Definition at line 46 of file htmlframe.c.

47{
49
50 return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface);
51}

◆ HTMLFrameElement_bind_to_tree()

static HRESULT HTMLFrameElement_bind_to_tree ( HTMLDOMNode iface)
static

Definition at line 238 of file htmlframe.c.

239{
241 nsIDOMDocument *nsdoc;
242 nsresult nsres;
244
245 nsres = nsIDOMHTMLFrameElement_GetContentDocument(This->framebase.nsframe, &nsdoc);
246 if(NS_FAILED(nsres) || !nsdoc) {
247 ERR("GetContentDocument failed: %08x\n", nsres);
248 return E_FAIL;
249 }
250
251 hres = set_frame_doc(&This->framebase, nsdoc);
252 nsIDOMDocument_Release(nsdoc);
253 return hres;
254}
#define ERR(fmt,...)
Definition: debug.h:113
static HTMLFrameElement * impl_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmlframe.c:165
HRESULT set_frame_doc(HTMLFrameBase *frame, nsIDOMDocument *nsdoc)
Definition: htmlframebase.c:26
#define NS_FAILED(res)

◆ HTMLFrameElement_Create()

HRESULT HTMLFrameElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 311 of file htmlframe.c.

312{
314
315 ret = heap_alloc_zero(sizeof(HTMLFrameElement));
316 if(!ret)
317 return E_OUTOFMEMORY;
318
319 ret->framebase.element.node.vtbl = &HTMLFrameElementImplVtbl;
320 ret->IHTMLFrameElement3_iface.lpVtbl = &HTMLFrameElement3Vtbl;
321
322 HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLFrameElement_dispex);
323
324 *elem = &ret->framebase.element;
325 return S_OK;
326}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const NodeImplVtbl HTMLFrameElementImplVtbl
Definition: htmlframe.c:276
static const IHTMLFrameElement3Vtbl HTMLFrameElement3Vtbl
Definition: htmlframe.c:148
static dispex_static_data_t HTMLFrameElement_dispex
Definition: htmlframe.c:304
void HTMLFrameBase_Init(HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
static size_t elem
Definition: string.c:68
int ret

◆ HTMLFrameElement_destructor()

static void HTMLFrameElement_destructor ( HTMLDOMNode iface)
static

Definition at line 185 of file htmlframe.c.

186{
188
189 HTMLFrameBase_destructor(&This->framebase);
190}
void HTMLFrameBase_destructor(HTMLFrameBase *This)

◆ HTMLFrameElement_get_dispid()

static HRESULT HTMLFrameElement_get_dispid ( HTMLDOMNode iface,
BSTR  name,
DWORD  grfdex,
DISPID pid 
)
static

Definition at line 213 of file htmlframe.c.

215{
217
218 if(!This->framebase.content_window)
219 return DISP_E_UNKNOWNNAME;
220
221 return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, pid);
222}
HRESULT search_window_props(HTMLInnerWindow *This, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: htmlwindow.c:2513
Definition: name.c:39
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515

◆ HTMLFrameElement_get_document()

static HRESULT HTMLFrameElement_get_document ( HTMLDOMNode iface,
IDispatch **  p 
)
static

Definition at line 192 of file htmlframe.c.

193{
195
196 if(!This->framebase.content_window || !This->framebase.content_window->base.inner_window->doc) {
197 *p = NULL;
198 return S_OK;
199 }
200
201 *p = (IDispatch*)&This->framebase.content_window->base.inner_window->doc->basedoc.IHTMLDocument2_iface;
202 IDispatch_AddRef(*p);
203 return S_OK;
204}

◆ HTMLFrameElement_get_readystate()

static HRESULT HTMLFrameElement_get_readystate ( HTMLDOMNode iface,
BSTR p 
)
static

Definition at line 206 of file htmlframe.c.

207{
209
210 return IHTMLFrameBase2_get_readyState(&This->framebase.IHTMLFrameBase2_iface, p);
211}

◆ HTMLFrameElement_invoke()

static HRESULT HTMLFrameElement_invoke ( HTMLDOMNode iface,
DISPID  id,
LCID  lcid,
WORD  flags,
DISPPARAMS *  params,
VARIANT res,
EXCEPINFO *  ei,
IServiceProvider caller 
)
static

Definition at line 224 of file htmlframe.c.

226{
228
229 if(!This->framebase.content_window) {
230 ERR("no content window to invoke on\n");
231 return E_FAIL;
232 }
233
234 return IDispatchEx_InvokeEx(&This->framebase.content_window->base.IDispatchEx_iface, id, lcid,
235 flags, params, res, ei, caller);
236}
GLuint res
Definition: glext.h:9613
GLenum const GLfloat * params
Definition: glext.h:5645
GLbitfield flags
Definition: glext.h:7161

◆ HTMLFrameElement_QI()

static HRESULT HTMLFrameElement_QI ( HTMLDOMNode iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 170 of file htmlframe.c.

171{
173
174 if(IsEqualGUID(&IID_IHTMLFrameElement3, riid)) {
175 TRACE("(%p)->(IID_IHTMLFrameElement3 %p)\n", This, ppv);
176 *ppv = &This->IHTMLFrameElement3_iface;
177 }else {
178 return HTMLFrameBase_QI(&This->framebase, riid, ppv);
179 }
180
181 IUnknown_AddRef((IUnknown*)*ppv);
182 return S_OK;
183}
HRESULT HTMLFrameBase_QI(HTMLFrameBase *This, REFIID riid, void **ppv)
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ HTMLFrameElement_traverse()

static void HTMLFrameElement_traverse ( HTMLDOMNode iface,
nsCycleCollectionTraversalCallback cb 
)
static

Definition at line 256 of file htmlframe.c.

257{
259
260 if(This->framebase.nsframe)
261 note_cc_edge((nsISupports*)This->framebase.nsframe, "This->nsframe", cb);
262}
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33

◆ HTMLFrameElement_unlink()

static void HTMLFrameElement_unlink ( HTMLDOMNode iface)
static

Definition at line 264 of file htmlframe.c.

265{
267
268 if(This->framebase.nsframe) {
269 nsIDOMHTMLFrameElement *nsframe = This->framebase.nsframe;
270
271 This->framebase.nsframe = NULL;
272 nsIDOMHTMLFrameElement_Release(nsframe);
273 }
274}

◆ impl_from_HTMLDOMNode()

static HTMLFrameElement * impl_from_HTMLDOMNode ( HTMLDOMNode iface)
inlinestatic

◆ impl_from_IHTMLFrameElement3()

Variable Documentation

◆ HTMLFrameElement3Vtbl

const IHTMLFrameElement3Vtbl HTMLFrameElement3Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLFrameElement3_GetTypeInfo(IHTMLFrameElement3 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlframe.c:60
static HRESULT WINAPI HTMLFrameElement3_get_longDesc(IHTMLFrameElement3 *iface, BSTR *p)
Definition: htmlframe.c:127
static HRESULT WINAPI HTMLFrameElement3_put_longDesc(IHTMLFrameElement3 *iface, BSTR v)
Definition: htmlframe.c:120
static HRESULT WINAPI HTMLFrameElement3_Invoke(IHTMLFrameElement3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlframe.c:76
static ULONG WINAPI HTMLFrameElement3_Release(IHTMLFrameElement3 *iface)
Definition: htmlframe.c:46
static HRESULT WINAPI HTMLFrameElement3_GetIDsOfNames(IHTMLFrameElement3 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlframe.c:68
static HRESULT WINAPI HTMLFrameElement3_put_frameBorder(IHTMLFrameElement3 *iface, BSTR v)
Definition: htmlframe.c:134
static HRESULT WINAPI HTMLFrameElement3_get_frameBorder(IHTMLFrameElement3 *iface, BSTR *p)
Definition: htmlframe.c:141
static HRESULT WINAPI HTMLFrameElement3_GetTypeInfoCount(IHTMLFrameElement3 *iface, UINT *pctinfo)
Definition: htmlframe.c:53
static HRESULT WINAPI HTMLFrameElement3_get_src(IHTMLFrameElement3 *iface, BSTR *p)
Definition: htmlframe.c:113
static HRESULT WINAPI HTMLFrameElement3_get_contentDocument(IHTMLFrameElement3 *iface, IDispatch **p)
Definition: htmlframe.c:85
static HRESULT WINAPI HTMLFrameElement3_QueryInterface(IHTMLFrameElement3 *iface, REFIID riid, void **ppv)
Definition: htmlframe.c:31
static HRESULT WINAPI HTMLFrameElement3_put_src(IHTMLFrameElement3 *iface, BSTR v)
Definition: htmlframe.c:106
static ULONG WINAPI HTMLFrameElement3_AddRef(IHTMLFrameElement3 *iface)
Definition: htmlframe.c:39

Definition at line 148 of file htmlframe.c.

Referenced by HTMLFrameElement_Create().

◆ HTMLFrameElement_dispex

dispex_static_data_t HTMLFrameElement_dispex
static
Initial value:
= {
DispHTMLFrameElement_tid,
}
static const tid_t HTMLFrameElement_iface_tids[]
Definition: htmlframe.c:296

Definition at line 304 of file htmlframe.c.

Referenced by HTMLFrameElement_Create().

◆ HTMLFrameElement_iface_tids

const tid_t HTMLFrameElement_iface_tids[]
static
Initial value:
= {
IHTMLFrameBase_tid,
IHTMLFrameBase2_tid,
IHTMLFrameElement3_tid,
0
}
#define HTMLELEMENT_TIDS

Definition at line 296 of file htmlframe.c.

◆ HTMLFrameElementImplVtbl

const NodeImplVtbl HTMLFrameElementImplVtbl
static
Initial value:
= {
}
HRESULT HTMLElement_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
Definition: htmlelem.c:3793
HRESULT HTMLElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *event, BOOL *prevent_default)
Definition: htmlelem.c:3815
const cpc_entry_t HTMLElement_cpc[]
Definition: htmlelem.c:3847
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac)
Definition: htmlelem.c:4827
static HRESULT HTMLFrameElement_get_document(HTMLDOMNode *iface, IDispatch **p)
Definition: htmlframe.c:192
static HRESULT HTMLFrameElement_get_dispid(HTMLDOMNode *iface, BSTR name, DWORD grfdex, DISPID *pid)
Definition: htmlframe.c:213
static void HTMLFrameElement_destructor(HTMLDOMNode *iface)
Definition: htmlframe.c:185
static HRESULT HTMLFrameElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlframe.c:170
static HRESULT HTMLFrameElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
Definition: htmlframe.c:224
static void HTMLFrameElement_unlink(HTMLDOMNode *iface)
Definition: htmlframe.c:264
static HRESULT HTMLFrameElement_get_readystate(HTMLDOMNode *iface, BSTR *p)
Definition: htmlframe.c:206
static void HTMLFrameElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
Definition: htmlframe.c:256
static HRESULT HTMLFrameElement_bind_to_tree(HTMLDOMNode *iface)
Definition: htmlframe.c:238

Definition at line 276 of file htmlframe.c.

Referenced by HTMLFrameElement_Create().