ReactOS  0.4.14-dev-77-gd9e7c48
htmlnode.c File Reference
#include "mshtml_private.h"
Include dependency graph for htmlnode.c:

Go to the source code of this file.

Classes

struct  HTMLDOMChildrenCollection
 
struct  HTMLDOMChildrenCollectionEnum
 

Macros

#define DISPID_CHILDCOL_0   MSHTML_DISPID_CUSTOM_MIN
 

Functions

static HTMLDOMNodeget_node_obj (IHTMLDOMNode *)
 
static HRESULT create_node (HTMLDocumentNode *, nsIDOMNode *, HTMLDOMNode **)
 
static HTMLDOMChildrenCollectionEnumimpl_from_IEnumVARIANT (IEnumVARIANT *iface)
 
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_QueryInterface (IEnumVARIANT *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLDOMChildrenCollectionEnum_AddRef (IEnumVARIANT *iface)
 
static ULONG WINAPI HTMLDOMChildrenCollectionEnum_Release (IEnumVARIANT *iface)
 
static ULONG get_enum_len (HTMLDOMChildrenCollectionEnum *This)
 
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Next (IEnumVARIANT *iface, ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched)
 
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Skip (IEnumVARIANT *iface, ULONG celt)
 
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Reset (IEnumVARIANT *iface)
 
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Clone (IEnumVARIANT *iface, IEnumVARIANT **ppEnum)
 
static HTMLDOMChildrenCollectionimpl_from_IHTMLDOMChildrenCollection (IHTMLDOMChildrenCollection *iface)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_QueryInterface (IHTMLDOMChildrenCollection *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLDOMChildrenCollection_AddRef (IHTMLDOMChildrenCollection *iface)
 
static ULONG WINAPI HTMLDOMChildrenCollection_Release (IHTMLDOMChildrenCollection *iface)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_GetTypeInfoCount (IHTMLDOMChildrenCollection *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_GetTypeInfo (IHTMLDOMChildrenCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_GetIDsOfNames (IHTMLDOMChildrenCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_Invoke (IHTMLDOMChildrenCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_get_length (IHTMLDOMChildrenCollection *iface, LONG *p)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_get__newEnum (IHTMLDOMChildrenCollection *iface, IUnknown **p)
 
static HRESULT WINAPI HTMLDOMChildrenCollection_item (IHTMLDOMChildrenCollection *iface, LONG index, IDispatch **ppItem)
 
static HTMLDOMChildrenCollectionimpl_from_DispatchEx (DispatchEx *iface)
 
static HRESULT HTMLDOMChildrenCollection_get_dispid (DispatchEx *dispex, BSTR name, DWORD flags, DISPID *dispid)
 
static HRESULT HTMLDOMChildrenCollection_invoke (DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
 
static IHTMLDOMChildrenCollection * create_child_collection (HTMLDocumentNode *doc, nsIDOMNodeList *nslist)
 
static HTMLDOMNodeimpl_from_IHTMLDOMNode (IHTMLDOMNode *iface)
 
static HRESULT WINAPI HTMLDOMNode_QueryInterface (IHTMLDOMNode *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLDOMNode_AddRef (IHTMLDOMNode *iface)
 
static ULONG WINAPI HTMLDOMNode_Release (IHTMLDOMNode *iface)
 
static HRESULT WINAPI HTMLDOMNode_GetTypeInfoCount (IHTMLDOMNode *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLDOMNode_GetTypeInfo (IHTMLDOMNode *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLDOMNode_GetIDsOfNames (IHTMLDOMNode *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLDOMNode_Invoke (IHTMLDOMNode *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLDOMNode_get_nodeType (IHTMLDOMNode *iface, LONG *p)
 
static HRESULT WINAPI HTMLDOMNode_get_parentNode (IHTMLDOMNode *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMNode_hasChildNodes (IHTMLDOMNode *iface, VARIANT_BOOL *fChildren)
 
static HRESULT WINAPI HTMLDOMNode_get_childNodes (IHTMLDOMNode *iface, IDispatch **p)
 
static HRESULT WINAPI HTMLDOMNode_get_attributes (IHTMLDOMNode *iface, IDispatch **p)
 
static HRESULT WINAPI HTMLDOMNode_insertBefore (IHTMLDOMNode *iface, IHTMLDOMNode *newChild, VARIANT refChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMNode_removeChild (IHTMLDOMNode *iface, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMNode_replaceChild (IHTMLDOMNode *iface, IHTMLDOMNode *newChild, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMNode_cloneNode (IHTMLDOMNode *iface, VARIANT_BOOL fDeep, IHTMLDOMNode **clonedNode)
 
static HRESULT WINAPI HTMLDOMNode_removeNode (IHTMLDOMNode *iface, VARIANT_BOOL fDeep, IHTMLDOMNode **removed)
 
static HRESULT WINAPI HTMLDOMNode_swapNode (IHTMLDOMNode *iface, IHTMLDOMNode *otherNode, IHTMLDOMNode **swappedNode)
 
static HRESULT WINAPI HTMLDOMNode_replaceNode (IHTMLDOMNode *iface, IHTMLDOMNode *replacement, IHTMLDOMNode **replaced)
 
static HRESULT WINAPI HTMLDOMNode_appendChild (IHTMLDOMNode *iface, IHTMLDOMNode *newChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMNode_get_nodeName (IHTMLDOMNode *iface, BSTR *p)
 
static HRESULT WINAPI HTMLDOMNode_put_nodeValue (IHTMLDOMNode *iface, VARIANT v)
 
static HRESULT WINAPI HTMLDOMNode_get_nodeValue (IHTMLDOMNode *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLDOMNode_get_firstChild (IHTMLDOMNode *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMNode_get_lastChild (IHTMLDOMNode *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMNode_get_previousSibling (IHTMLDOMNode *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMNode_get_nextSibling (IHTMLDOMNode *iface, IHTMLDOMNode **p)
 
static HTMLDOMNodeimpl_from_IHTMLDOMNode2 (IHTMLDOMNode2 *iface)
 
static HRESULT WINAPI HTMLDOMNode2_QueryInterface (IHTMLDOMNode2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLDOMNode2_AddRef (IHTMLDOMNode2 *iface)
 
static ULONG WINAPI HTMLDOMNode2_Release (IHTMLDOMNode2 *iface)
 
static HRESULT WINAPI HTMLDOMNode2_GetTypeInfoCount (IHTMLDOMNode2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLDOMNode2_GetTypeInfo (IHTMLDOMNode2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLDOMNode2_GetIDsOfNames (IHTMLDOMNode2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLDOMNode2_Invoke (IHTMLDOMNode2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLDOMNode2_get_ownerDocument (IHTMLDOMNode2 *iface, IDispatch **p)
 
HRESULT HTMLDOMNode_QI (HTMLDOMNode *This, REFIID riid, void **ppv)
 
void HTMLDOMNode_destructor (HTMLDOMNode *This)
 
static HRESULT HTMLDOMNode_clone (HTMLDOMNode *This, nsIDOMNode *nsnode, HTMLDOMNode **ret)
 
void HTMLDOMNode_Init (HTMLDocumentNode *doc, HTMLDOMNode *node, nsIDOMNode *nsnode)
 
static nsresult NSAPI HTMLDOMNode_traverse (void *ccp, void *p, nsCycleCollectionTraversalCallback *cb)
 
static nsresult NSAPI HTMLDOMNode_unlink (void *p)
 
static void NSAPI HTMLDOMNode_delete_cycle_collectable (void *p)
 
void init_node_cc (void)
 
HRESULT get_node (HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
 

Variables

static ExternalCycleCollectionParticipant node_ccp
 
static const IEnumVARIANTVtbl HTMLDOMChildrenCollectionEnumVtbl
 
static const IHTMLDOMChildrenCollectionVtbl HTMLDOMChildrenCollectionVtbl
 
static const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl
 
static const tid_t HTMLDOMChildrenCollection_iface_tids []
 
static dispex_static_data_t HTMLDOMChildrenCollection_dispex
 
static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl
 
static const IHTMLDOMNode2Vtbl HTMLDOMNode2Vtbl
 
static const cpc_entry_t HTMLDOMNode_cpc [] = {{NULL}}
 
static const NodeImplVtbl HTMLDOMNodeImplVtbl
 

Macro Definition Documentation

◆ DISPID_CHILDCOL_0

#define DISPID_CHILDCOL_0   MSHTML_DISPID_CUSTOM_MIN

Definition at line 356 of file htmlnode.c.

Function Documentation

◆ create_child_collection()

static IHTMLDOMChildrenCollection* create_child_collection ( HTMLDocumentNode doc,
nsIDOMNodeList nslist 
)
static

Definition at line 428 of file htmlnode.c.

429 {
431 
432  ret = heap_alloc_zero(sizeof(*ret));
433  if(!ret)
434  return NULL;
435 
436  ret->IHTMLDOMChildrenCollection_iface.lpVtbl = &HTMLDOMChildrenCollectionVtbl;
437  ret->ref = 1;
438 
439  nsIDOMNodeList_AddRef(nslist);
440  ret->nslist = nslist;
441 
442  htmldoc_addref(&doc->basedoc);
443  ret->doc = doc;
444 
445  init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMChildrenCollection_iface,
447 
448  return &ret->IHTMLDOMChildrenCollection_iface;
449 }
static dispex_static_data_t HTMLDOMChildrenCollection_dispex
Definition: htmlnode.c:421
static const IHTMLDOMChildrenCollectionVtbl HTMLDOMChildrenCollectionVtbl
Definition: htmlnode.c:338
HTMLDocument basedoc
smooth NULL
Definition: ftsmooth.c:416
int ret
static ULONG htmldoc_addref(HTMLDocument *This)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:940

Referenced by HTMLDOMNode_get_childNodes().

◆ create_node()

static HRESULT create_node ( HTMLDocumentNode doc,
nsIDOMNode nsnode,
HTMLDOMNode **  ret 
)
static

Definition at line 1216 of file htmlnode.c.

1217 {
1218  UINT16 node_type;
1219  HRESULT hres;
1220 
1221  nsIDOMNode_GetNodeType(nsnode, &node_type);
1222 
1223  switch(node_type) {
1224  case ELEMENT_NODE: {
1225  HTMLElement *elem;
1226  hres = HTMLElement_Create(doc, nsnode, FALSE, &elem);
1227  if(FAILED(hres))
1228  return hres;
1229  *ret = &elem->node;
1230  break;
1231  }
1232  case TEXT_NODE:
1233  hres = HTMLDOMTextNode_Create(doc, nsnode, ret);
1234  if(FAILED(hres))
1235  return hres;
1236  break;
1237  /* doctype nodes are represented as comment nodes (at least in quirks mode) */
1238  case DOCUMENT_TYPE_NODE:
1239  case COMMENT_NODE: {
1241  hres = HTMLCommentElement_Create(doc, nsnode, &comment);
1242  if(FAILED(hres))
1243  return hres;
1244  *ret = &comment->node;
1245  break;
1246  }
1247  case ATTRIBUTE_NODE:
1248  ERR("Called on attribute node\n");
1249  return E_UNEXPECTED;
1250  default: {
1251  HTMLDOMNode *node;
1252 
1253  node = heap_alloc_zero(sizeof(HTMLDOMNode));
1254  if(!node)
1255  return E_OUTOFMEMORY;
1256 
1257  node->vtbl = &HTMLDOMNodeImplVtbl;
1258  HTMLDOMNode_Init(doc, node, nsnode);
1259  *ret = node;
1260  }
1261  }
1262 
1263  TRACE("type %d ret %p\n", node_type, *ret);
1264  return S_OK;
1265 }
void HTMLDOMNode_Init(HTMLDocumentNode *doc, HTMLDOMNode *node, nsIDOMNode *nsnode)
Definition: htmlnode.c:1196
HRESULT HTMLCommentElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLElement **elem)
Definition: htmlcomment.c:179
HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDOMNode **node)
Definition: htmltextnode.c:352
struct node node
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static size_t elem
Definition: string.c:68
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_generic, HTMLElement **ret)
Definition: htmlelem.c:4032
LONG HRESULT
Definition: typedefs.h:77
int ret
Definition: id3.c:18
#define ERR(fmt,...)
Definition: debug.h:109
static const NodeImplVtbl HTMLDOMNodeImplVtbl
Definition: htmlnode.c:1189
#define S_OK
Definition: intsafe.h:59
unsigned short UINT16
#define E_UNEXPECTED
Definition: winerror.h:2456
Definition: dlist.c:348

Referenced by get_node(), and HTMLDOMNode_clone().

◆ get_enum_len()

static ULONG get_enum_len ( HTMLDOMChildrenCollectionEnum This)
static

Definition at line 97 of file htmlnode.c.

98 {
99  ULONG len;
100  nsresult nsres;
101 
102  nsres = nsIDOMNodeList_GetLength(This->col->nslist, &len);
103  assert(nsres == NS_OK);
104  return len;
105 }
#define assert(x)
Definition: debug.h:53
#define NS_OK
GLenum GLsizei len
Definition: glext.h:6722
HRESULT nsresult
Definition: nsiface.idl:39
unsigned int ULONG
Definition: retypes.h:1

Referenced by HTMLDOMChildrenCollectionEnum_Next(), and HTMLDOMChildrenCollectionEnum_Skip().

◆ get_node()

HRESULT get_node ( HTMLDocumentNode This,
nsIDOMNode nsnode,
BOOL  create,
HTMLDOMNode **  ret 
)

Definition at line 1339 of file htmlnode.c.

1340 {
1341  nsISupports *unk = NULL;
1342  nsresult nsres;
1343 
1344  nsres = nsIDOMNode_GetMshtmlNode(nsnode, &unk);
1345  assert(nsres == NS_OK);
1346 
1347  if(unk) {
1348  *ret = get_node_obj((IHTMLDOMNode*)unk);
1349  nsISupports_Release(unk);
1350  return NS_OK;
1351  }
1352 
1353  if(!create) {
1354  *ret = NULL;
1355  return S_OK;
1356  }
1357 
1358  return create_node(This, nsnode, ret);
1359 }
#define assert(x)
Definition: debug.h:53
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
static HRESULT create_node(HTMLDocumentNode *, nsIDOMNode *, HTMLDOMNode **)
Definition: htmlnode.c:1216
int ret
#define S_OK
Definition: intsafe.h:59
HRESULT nsresult
Definition: nsiface.idl:39
static const struct access_res create[16]
Definition: package.c:7720
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045

Referenced by check_event_attr(), create_all_list(), create_collection_from_htmlcol(), create_collection_from_nodelist(), fire_event(), fire_event_obj(), get_elem(), get_elem_source_index(), HTMLDocument3_get_documentElement(), HTMLDocument_elementFromPoint(), HTMLDocument_get_all(), HTMLDocument_get_body(), HTMLDocumentNode_invoke(), HTMLDOMChildrenCollection_item(), HTMLDOMChildrenCollectionEnum_Next(), HTMLDOMNode_appendChild(), HTMLDOMNode_get_firstChild(), HTMLDOMNode_get_lastChild(), HTMLDOMNode_get_nextSibling(), HTMLDOMNode_get_parentNode(), HTMLDOMNode_get_previousSibling(), HTMLDOMNode_insertBefore(), HTMLDOMNode_removeChild(), HTMLDOMNode_replaceChild(), HTMLDOMTextNode_splitText(), HTMLElement_get_offsetParent(), htmlform_item(), HTMLInputElement_get_form(), HTMLOptionElement_get_form(), HTMLOptionElementFactory_create(), htmlselect_item(), HTMLSelectElement_get_form(), HTMLTextAreaElement_get_form(), HTMLTxtRange_parentElement(), insert_adjacent_node(), NPP_New(), nsContextMenuListener_OnShowContextMenu(), run_bind_to_tree(), and script_elem_from_nsscript().

◆ get_node_obj()

static HTMLDOMNode * get_node_obj ( IHTMLDOMNode *  iface)
static

Definition at line 1045 of file htmlnode.c.

1046 {
1047  HTMLDOMNode *ret;
1048 
1049  if(iface->lpVtbl != &HTMLDOMNodeVtbl)
1050  return NULL;
1051 
1052  ret = impl_from_IHTMLDOMNode(iface);
1053  node_addref(ret);
1054  return ret;
1055 }
static void node_addref(HTMLDOMNode *node)
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl
Definition: htmlnode.c:1015
smooth NULL
Definition: ftsmooth.c:416
int ret

Referenced by get_node(), HTMLDOMNode_appendChild(), HTMLDOMNode_insertBefore(), HTMLDOMNode_removeChild(), HTMLDOMNode_replaceChild(), and xslprocessor_transform().

◆ HTMLDOMChildrenCollection_AddRef()

static ULONG WINAPI HTMLDOMChildrenCollection_AddRef ( IHTMLDOMChildrenCollection *  iface)
static

Definition at line 214 of file htmlnode.c.

215 {
218 
219  TRACE("(%p) ref=%d\n", This, ref);
220 
221  return ref;
222 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187

◆ HTMLDOMChildrenCollection_get__newEnum()

static HRESULT WINAPI HTMLDOMChildrenCollection_get__newEnum ( IHTMLDOMChildrenCollection *  iface,
IUnknown **  p 
)
static

Definition at line 282 of file htmlnode.c.

283 {
286 
287  TRACE("(%p)->(%p)\n", This, p);
288 
289  ret = heap_alloc(sizeof(*ret));
290  if(!ret)
291  return E_OUTOFMEMORY;
292 
293  ret->IEnumVARIANT_iface.lpVtbl = &HTMLDOMChildrenCollectionEnumVtbl;
294  ret->ref = 1;
295  ret->iter = 0;
296 
297  IHTMLDOMChildrenCollection_AddRef(&This->IHTMLDOMChildrenCollection_iface);
298  ret->col = This;
299 
300  *p = (IUnknown*)&ret->IEnumVARIANT_iface;
301  return S_OK;
302 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
int ret
static const IEnumVARIANTVtbl HTMLDOMChildrenCollectionEnumVtbl
Definition: htmlnode.c:177
#define S_OK
Definition: intsafe.h:59
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMChildrenCollection_get_dispid()

static HRESULT HTMLDOMChildrenCollection_get_dispid ( DispatchEx dispex,
BSTR  name,
DWORD  flags,
DISPID dispid 
)
static

Definition at line 358 of file htmlnode.c.

359 {
361  WCHAR *ptr;
362  DWORD idx=0;
363  UINT32 len = 0;
364 
365  for(ptr = name; *ptr && isdigitW(*ptr); ptr++)
366  idx = idx*10 + (*ptr-'0');
367  if(*ptr)
368  return DISP_E_UNKNOWNNAME;
369 
370  nsIDOMNodeList_GetLength(This->nslist, &len);
371  if(idx >= len)
372  return DISP_E_UNKNOWNNAME;
373 
374  *dispid = DISPID_CHILDCOL_0 + idx;
375  TRACE("ret %x\n", *dispid);
376  return S_OK;
377 }
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
#define DISPID_CHILDCOL_0
Definition: htmlnode.c:356
unsigned int UINT32
static PVOID ptr
Definition: dispmode.c:27
unsigned int idx
Definition: utils.c:41
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE int isdigitW(WCHAR wc)
Definition: unicode.h:170
Definition: name.c:36
static HTMLDOMChildrenCollection * impl_from_DispatchEx(DispatchEx *iface)
Definition: htmlnode.c:351

◆ HTMLDOMChildrenCollection_get_length()

static HRESULT WINAPI HTMLDOMChildrenCollection_get_length ( IHTMLDOMChildrenCollection *  iface,
LONG p 
)
static

Definition at line 270 of file htmlnode.c.

271 {
273  UINT32 length=0;
274 
275  TRACE("(%p)->(%p)\n", This, p);
276 
277  nsIDOMNodeList_GetLength(This->nslist, &length);
278  *p = length;
279  return S_OK;
280 }
unsigned int UINT32
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define S_OK
Definition: intsafe.h:59
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMChildrenCollection_GetIDsOfNames()

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

Definition at line 253 of file htmlnode.c.

255 {
257  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
258  lcid, rgDispId);
259 }
REFIID riid
Definition: precomp.h:44
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187

◆ HTMLDOMChildrenCollection_GetTypeInfo()

static HRESULT WINAPI HTMLDOMChildrenCollection_GetTypeInfo ( IHTMLDOMChildrenCollection *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 246 of file htmlnode.c.

248 {
250  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
251 }
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187

◆ HTMLDOMChildrenCollection_GetTypeInfoCount()

static HRESULT WINAPI HTMLDOMChildrenCollection_GetTypeInfoCount ( IHTMLDOMChildrenCollection *  iface,
UINT pctinfo 
)
static

Definition at line 240 of file htmlnode.c.

241 {
243  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
244 }
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187

◆ HTMLDOMChildrenCollection_Invoke()

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

Definition at line 261 of file htmlnode.c.

264 {
266  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
267  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
268 }
REFIID riid
Definition: precomp.h:44
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187

◆ HTMLDOMChildrenCollection_invoke()

static HRESULT HTMLDOMChildrenCollection_invoke ( DispatchEx dispex,
DISPID  id,
LCID  lcid,
WORD  flags,
DISPPARAMS *  params,
VARIANT res,
EXCEPINFO *  ei,
IServiceProvider caller 
)
static

Definition at line 379 of file htmlnode.c.

381 {
383 
384  TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller);
385 
386  switch(flags) {
387  case DISPATCH_PROPERTYGET: {
388  IDispatch *disp = NULL;
389  HRESULT hres;
390 
391  hres = IHTMLDOMChildrenCollection_item(&This->IHTMLDOMChildrenCollection_iface,
392  id - DISPID_CHILDCOL_0, &disp);
393  if(FAILED(hres))
394  return hres;
395 
396  V_VT(res) = VT_DISPATCH;
397  V_DISPATCH(res) = disp;
398  break;
399  }
400 
401  default:
402  FIXME("unimplemented flags %x\n", flags);
403  return E_NOTIMPL;
404  }
405 
406  return S_OK;
407 }
disp
Definition: i386-dis.c:3181
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define DISPID_CHILDCOL_0
Definition: htmlnode.c:356
#define V_DISPATCH(A)
Definition: oleauto.h:239
GLenum const GLfloat * params
Definition: glext.h:5645
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161
#define V_VT(A)
Definition: oleauto.h:211
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
GLuint res
Definition: glext.h:9613
static HTMLDOMChildrenCollection * impl_from_DispatchEx(DispatchEx *iface)
Definition: htmlnode.c:351

◆ HTMLDOMChildrenCollection_item()

static HRESULT WINAPI HTMLDOMChildrenCollection_item ( IHTMLDOMChildrenCollection *  iface,
LONG  index,
IDispatch **  ppItem 
)
static

Definition at line 304 of file htmlnode.c.

305 {
307  nsIDOMNode *nsnode = NULL;
308  HTMLDOMNode *node;
309  UINT32 length=0;
310  nsresult nsres;
311  HRESULT hres;
312 
313  TRACE("(%p)->(%d %p)\n", This, index, ppItem);
314 
315  if (ppItem)
316  *ppItem = NULL;
317  else
318  return E_POINTER;
319 
320  nsIDOMNodeList_GetLength(This->nslist, &length);
322  return E_INVALIDARG;
323 
324  nsres = nsIDOMNodeList_Item(This->nslist, index, &nsnode);
325  if(NS_FAILED(nsres) || !nsnode) {
326  ERR("Item failed: %08x\n", nsres);
327  return E_FAIL;
328  }
329 
330  hres = get_node(This->doc, nsnode, TRUE, &node);
331  if(FAILED(hres))
332  return hres;
333 
334  *ppItem = (IDispatch*)&node->IHTMLDOMNode_iface;
335  return S_OK;
336 }
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
struct node node
unsigned int UINT32
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187
HRESULT nsresult
Definition: nsiface.idl:39
#define E_POINTER
Definition: winerror.h:2365
Definition: dlist.c:348

◆ HTMLDOMChildrenCollection_QueryInterface()

static HRESULT WINAPI HTMLDOMChildrenCollection_QueryInterface ( IHTMLDOMChildrenCollection *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 192 of file htmlnode.c.

193 {
195 
196  TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
197 
198  if(IsEqualGUID(&IID_IUnknown, riid)) {
199  *ppv = &This->IHTMLDOMChildrenCollection_iface;
200  }else if(IsEqualGUID(&IID_IHTMLDOMChildrenCollection, riid)) {
201  *ppv = &This->IHTMLDOMChildrenCollection_iface;
202  }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
203  return *ppv ? S_OK : E_NOINTERFACE;
204  }else {
205  *ppv = NULL;
206  WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
207  return E_NOINTERFACE;
208  }
209 
210  IUnknown_AddRef((IUnknown*)*ppv);
211  return S_OK;
212 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187

◆ HTMLDOMChildrenCollection_Release()

static ULONG WINAPI HTMLDOMChildrenCollection_Release ( IHTMLDOMChildrenCollection *  iface)
static

Definition at line 224 of file htmlnode.c.

225 {
228 
229  TRACE("(%p) ref=%d\n", This, ref);
230 
231  if(!ref) {
232  htmldoc_release(&This->doc->basedoc);
233  nsIDOMNodeList_Release(This->nslist);
234  heap_free(This);
235  }
236 
237  return ref;
238 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static ULONG htmldoc_release(HTMLDocument *This)
static HTMLDOMChildrenCollection * impl_from_IHTMLDOMChildrenCollection(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:187
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ HTMLDOMChildrenCollectionEnum_AddRef()

static ULONG WINAPI HTMLDOMChildrenCollectionEnum_AddRef ( IEnumVARIANT iface)
static

Definition at line 72 of file htmlnode.c.

73 {
76 
77  TRACE("(%p) ref=%d\n", This, ref);
78 
79  return ref;
80 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static HTMLDOMChildrenCollectionEnum * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: htmlnode.c:47
#define InterlockedIncrement
Definition: armddk.h:53

◆ HTMLDOMChildrenCollectionEnum_Clone()

static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Clone ( IEnumVARIANT iface,
IEnumVARIANT **  ppEnum 
)
static

Definition at line 170 of file htmlnode.c.

171 {
173  FIXME("(%p)->(%p)\n", This, ppEnum);
174  return E_NOTIMPL;
175 }
#define FIXME(fmt,...)
Definition: debug.h:110
static HTMLDOMChildrenCollectionEnum * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: htmlnode.c:47
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLDOMChildrenCollectionEnum_Next()

static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Next ( IEnumVARIANT iface,
ULONG  celt,
VARIANT rgVar,
ULONG pCeltFetched 
)
static

Definition at line 107 of file htmlnode.c.

108 {
110  ULONG fetched = 0, len;
111  nsIDOMNode *nsnode;
112  HTMLDOMNode *node;
113  nsresult nsres;
114  HRESULT hres;
115 
116  TRACE("(%p)->(%d %p %p)\n", This, celt, rgVar, pCeltFetched);
117 
118  len = get_enum_len(This);
119 
120  while(This->iter+fetched < len && fetched < celt) {
121  nsres = nsIDOMNodeList_Item(This->col->nslist, This->iter+fetched, &nsnode);
122  assert(nsres == NS_OK);
123 
124  hres = get_node(This->col->doc, nsnode, TRUE, &node);
125  nsIDOMNode_Release(nsnode);
126  if(FAILED(hres)) {
127  ERR("get_node failed: %08x\n", hres);
128  break;
129  }
130 
131  V_VT(rgVar+fetched) = VT_DISPATCH;
132  IHTMLDOMNode_AddRef(&node->IHTMLDOMNode_iface);
133  V_DISPATCH(rgVar+fetched) = (IDispatch*)&node->IHTMLDOMNode_iface;
134  fetched++;
135  }
136 
137  This->iter += fetched;
138  if(pCeltFetched)
139  *pCeltFetched = fetched;
140  return fetched == celt ? S_OK : S_FALSE;
141 }
#define TRUE
Definition: types.h:120
#define assert(x)
Definition: debug.h:53
#define V_DISPATCH(A)
Definition: oleauto.h:239
#define NS_OK
struct node node
static ULONG get_enum_len(HTMLDOMChildrenCollectionEnum *This)
Definition: htmlnode.c:97
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static HTMLDOMChildrenCollectionEnum * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: htmlnode.c:47
#define V_VT(A)
Definition: oleauto.h:211
GLenum GLsizei len
Definition: glext.h:6722
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
HRESULT nsresult
Definition: nsiface.idl:39
unsigned int ULONG
Definition: retypes.h:1
Definition: dlist.c:348

◆ HTMLDOMChildrenCollectionEnum_QueryInterface()

static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_QueryInterface ( IEnumVARIANT iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 52 of file htmlnode.c.

53 {
55 
56  TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
57 
59  *ppv = &This->IEnumVARIANT_iface;
60  }else if(IsEqualGUID(riid, &IID_IEnumVARIANT)) {
61  *ppv = &This->IEnumVARIANT_iface;
62  }else {
63  FIXME("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
64  *ppv = NULL;
65  return E_NOINTERFACE;
66  }
67 
68  IUnknown_AddRef((IUnknown*)*ppv);
69  return S_OK;
70 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static HTMLDOMChildrenCollectionEnum * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: htmlnode.c:47
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ HTMLDOMChildrenCollectionEnum_Release()

static ULONG WINAPI HTMLDOMChildrenCollectionEnum_Release ( IEnumVARIANT iface)
static

Definition at line 82 of file htmlnode.c.

83 {
86 
87  TRACE("(%p) ref=%d\n", This, ref);
88 
89  if(!ref) {
90  IHTMLDOMChildrenCollection_Release(&This->col->IHTMLDOMChildrenCollection_iface);
91  heap_free(This);
92  }
93 
94  return ref;
95 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static HTMLDOMChildrenCollectionEnum * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: htmlnode.c:47
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ HTMLDOMChildrenCollectionEnum_Reset()

static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Reset ( IEnumVARIANT iface)
static

Definition at line 160 of file htmlnode.c.

161 {
163 
164  TRACE("(%p)->()\n", This);
165 
166  This->iter = 0;
167  return S_OK;
168 }
#define TRACE(s)
Definition: solgame.cpp:4
static HTMLDOMChildrenCollectionEnum * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: htmlnode.c:47
#define S_OK
Definition: intsafe.h:59

◆ HTMLDOMChildrenCollectionEnum_Skip()

static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Skip ( IEnumVARIANT iface,
ULONG  celt 
)
static

Definition at line 143 of file htmlnode.c.

144 {
146  ULONG len;
147 
148  TRACE("(%p)->(%d)\n", This, celt);
149 
150  len = get_enum_len(This);
151  if(This->iter + celt > len) {
152  This->iter = len;
153  return S_FALSE;
154  }
155 
156  This->iter += celt;
157  return S_OK;
158 }
static ULONG get_enum_len(HTMLDOMChildrenCollectionEnum *This)
Definition: htmlnode.c:97
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
static HTMLDOMChildrenCollectionEnum * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: htmlnode.c:47
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
unsigned int ULONG
Definition: retypes.h:1

◆ HTMLDOMNode2_AddRef()

static ULONG WINAPI HTMLDOMNode2_AddRef ( IHTMLDOMNode2 *  iface)
static

Definition at line 1070 of file htmlnode.c.

1071 {
1073 
1074  return IHTMLDOMNode_AddRef(&This->IHTMLDOMNode_iface);
1075 }
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057

◆ HTMLDOMNode2_get_ownerDocument()

static HRESULT WINAPI HTMLDOMNode2_get_ownerDocument ( IHTMLDOMNode2 *  iface,
IDispatch **  p 
)
static

Definition at line 1115 of file htmlnode.c.

1116 {
1118 
1119  TRACE("(%p)->(%p)\n", This, p);
1120 
1121  /* FIXME: Better check for document node */
1122  if(This == &This->doc->node) {
1123  *p = NULL;
1124  }else {
1125  *p = (IDispatch*)&This->doc->basedoc.IHTMLDocument2_iface;
1126  IDispatch_AddRef(*p);
1127  }
1128  return S_OK;
1129 }
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMNode2_GetIDsOfNames()

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

Definition at line 1097 of file htmlnode.c.

1100 {
1102  return IDispatchEx_GetIDsOfNames(&This->event_target.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1103  lcid, rgDispId);
1104 }
REFIID riid
Definition: precomp.h:44
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057

◆ HTMLDOMNode2_GetTypeInfo()

static HRESULT WINAPI HTMLDOMNode2_GetTypeInfo ( IHTMLDOMNode2 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1090 of file htmlnode.c.

1092 {
1094  return IDispatchEx_GetTypeInfo(&This->event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1095 }
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057

◆ HTMLDOMNode2_GetTypeInfoCount()

static HRESULT WINAPI HTMLDOMNode2_GetTypeInfoCount ( IHTMLDOMNode2 *  iface,
UINT pctinfo 
)
static

Definition at line 1084 of file htmlnode.c.

1085 {
1087  return IDispatchEx_GetTypeInfoCount(&This->event_target.dispex.IDispatchEx_iface, pctinfo);
1088 }
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057

◆ HTMLDOMNode2_Invoke()

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

Definition at line 1106 of file htmlnode.c.

1109 {
1111  return IDispatchEx_Invoke(&This->event_target.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1112  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1113 }
REFIID riid
Definition: precomp.h:44
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519

◆ HTMLDOMNode2_QueryInterface()

static HRESULT WINAPI HTMLDOMNode2_QueryInterface ( IHTMLDOMNode2 *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1062 of file htmlnode.c.

1064 {
1066 
1067  return IHTMLDOMNode_QueryInterface(&This->IHTMLDOMNode_iface, riid, ppv);
1068 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057

◆ HTMLDOMNode2_Release()

static ULONG WINAPI HTMLDOMNode2_Release ( IHTMLDOMNode2 *  iface)
static

Definition at line 1077 of file htmlnode.c.

1078 {
1080 
1081  return IHTMLDOMNode_Release(&This->IHTMLDOMNode_iface);
1082 }
static HTMLDOMNode * impl_from_IHTMLDOMNode2(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1057

◆ HTMLDOMNode_AddRef()

static ULONG WINAPI HTMLDOMNode_AddRef ( IHTMLDOMNode *  iface)
static

Definition at line 464 of file htmlnode.c.

465 {
467  LONG ref;
468 
469  ref = ccref_incr(&This->ccref, (nsISupports*)&This->IHTMLDOMNode_iface);
470 
471  TRACE("(%p) ref=%d\n", This, ref);
472 
473  return ref;
474 }
Definition: send.c:47
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4

◆ HTMLDOMNode_appendChild()

static HRESULT WINAPI HTMLDOMNode_appendChild ( IHTMLDOMNode *  iface,
IHTMLDOMNode *  newChild,
IHTMLDOMNode **  node 
)
static

Definition at line 826 of file htmlnode.c.

828 {
830  HTMLDOMNode *node_obj;
831  nsIDOMNode *nsnode;
832  nsresult nsres;
833  HRESULT hres;
834 
835  TRACE("(%p)->(%p %p)\n", This, newChild, node);
836 
837  node_obj = get_node_obj(newChild);
838  if(!node_obj)
839  return E_FAIL;
840 
841  nsres = nsIDOMNode_AppendChild(This->nsnode, node_obj->nsnode, &nsnode);
842  node_release(node_obj);
843  if(NS_FAILED(nsres)) {
844  ERR("AppendChild failed: %08x\n", nsres);
845  return E_FAIL;
846  }
847 
848  hres = get_node(This->doc, nsnode, TRUE, &node_obj);
849  nsIDOMNode_Release(nsnode);
850  if(FAILED(hres))
851  return hres;
852 
853  /* FIXME: Make sure that node != newChild */
854  *node = &node_obj->IHTMLDOMNode_iface;
855  return S_OK;
856 }
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
static void node_release(HTMLDOMNode *node)
nsIDOMNode * nsnode
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
IHTMLDOMNode IHTMLDOMNode_iface
HRESULT nsresult
Definition: nsiface.idl:39
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045
Definition: dlist.c:348

◆ HTMLDOMNode_clone()

static HRESULT HTMLDOMNode_clone ( HTMLDOMNode This,
nsIDOMNode nsnode,
HTMLDOMNode **  ret 
)
static

Definition at line 1182 of file htmlnode.c.

1183 {
1184  return create_node(This->doc, nsnode, ret);
1185 }
static HRESULT create_node(HTMLDocumentNode *, nsIDOMNode *, HTMLDOMNode **)
Definition: htmlnode.c:1216
int ret

◆ HTMLDOMNode_cloneNode()

static HRESULT WINAPI HTMLDOMNode_cloneNode ( IHTMLDOMNode *  iface,
VARIANT_BOOL  fDeep,
IHTMLDOMNode **  clonedNode 
)
static

Definition at line 777 of file htmlnode.c.

779 {
781  HTMLDOMNode *new_node;
782  nsIDOMNode *nsnode;
783  nsresult nsres;
784  HRESULT hres;
785 
786  TRACE("(%p)->(%x %p)\n", This, fDeep, clonedNode);
787 
788  nsres = nsIDOMNode_CloneNode(This->nsnode, fDeep != VARIANT_FALSE, 1, &nsnode);
789  if(NS_FAILED(nsres) || !nsnode) {
790  ERR("CloneNode failed: %08x\n", nsres);
791  return E_FAIL;
792  }
793 
794  hres = This->vtbl->clone(This, nsnode, &new_node);
795  if(FAILED(hres))
796  return hres;
797 
798  *clonedNode = &new_node->IHTMLDOMNode_iface;
799  return S_OK;
800 }
#define E_FAIL
Definition: ddrawi.h:102
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
IHTMLDOMNode IHTMLDOMNode_iface
HRESULT nsresult
Definition: nsiface.idl:39

◆ HTMLDOMNode_delete_cycle_collectable()

static void NSAPI HTMLDOMNode_delete_cycle_collectable ( void p)
static

Definition at line 1315 of file htmlnode.c.

1316 {
1318 
1319  TRACE("(%p)\n", This);
1320 
1321  if(This->vtbl->unlink)
1322  This->vtbl->unlink(This);
1323  This->vtbl->destructor(This);
1324  release_dispex(&This->event_target.dispex);
1325  heap_free(This);
1326 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat GLfloat p
Definition: glext.h:8902
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by init_node_cc().

◆ HTMLDOMNode_destructor()

void HTMLDOMNode_destructor ( HTMLDOMNode This)

Definition at line 1172 of file htmlnode.c.

1173 {
1174  if(This->nsnode)
1175  nsIDOMNode_Release(This->nsnode);
1176  if(This->doc && &This->doc->node != This)
1177  htmldoc_release(&This->doc->basedoc);
1178  if(This->event_target.ptr)
1179  release_event_target(This->event_target.ptr);
1180 }
void release_event_target(event_target_t *event_target)
Definition: htmlevent.c:1613
static ULONG htmldoc_release(HTMLDocument *This)

Referenced by HTMLElement_destructor().

◆ HTMLDOMNode_get_attributes()

static HRESULT WINAPI HTMLDOMNode_get_attributes ( IHTMLDOMNode *  iface,
IDispatch **  p 
)
static

Definition at line 622 of file htmlnode.c.

623 {
626  HRESULT hres;
627 
628  TRACE("(%p)->(%p)\n", This, p);
629 
630  if(This->vtbl->get_attr_col) {
631  hres = This->vtbl->get_attr_col(This, &col);
632  if(FAILED(hres))
633  return hres;
634 
636  return S_OK;
637  }
638 
639  *p = NULL;
640  return S_OK;
641 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
IHTMLAttributeCollection IHTMLAttributeCollection_iface
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMNode_get_childNodes()

static HRESULT WINAPI HTMLDOMNode_get_childNodes ( IHTMLDOMNode *  iface,
IDispatch **  p 
)
static

Definition at line 602 of file htmlnode.c.

603 {
605  nsIDOMNodeList *nslist;
606  nsresult nsres;
607 
608  TRACE("(%p)->(%p)\n", This, p);
609 
610  nsres = nsIDOMNode_GetChildNodes(This->nsnode, &nslist);
611  if(NS_FAILED(nsres)) {
612  ERR("GetChildNodes failed: %08x\n", nsres);
613  return E_FAIL;
614  }
615 
616  *p = (IDispatch*)create_child_collection(This->doc, nslist);
617  nsIDOMNodeList_Release(nslist);
618 
619  return *p ? S_OK : E_OUTOFMEMORY;
620 }
static IHTMLDOMChildrenCollection * create_child_collection(HTMLDocumentNode *doc, nsIDOMNodeList *nslist)
Definition: htmlnode.c:428
#define E_FAIL
Definition: ddrawi.h:102
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT nsresult
Definition: nsiface.idl:39
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMNode_get_firstChild()

static HRESULT WINAPI HTMLDOMNode_get_firstChild ( IHTMLDOMNode *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 919 of file htmlnode.c.

920 {
922  nsIDOMNode *nschild = NULL;
923  HTMLDOMNode *node;
924  HRESULT hres;
925 
926  TRACE("(%p)->(%p)\n", This, p);
927 
928  nsIDOMNode_GetFirstChild(This->nsnode, &nschild);
929  if(!nschild) {
930  *p = NULL;
931  return S_OK;
932  }
933 
934  hres = get_node(This->doc, nschild, TRUE, &node);
935  nsIDOMNode_Release(nschild);
936  if(FAILED(hres))
937  return hres;
938 
939  *p = &node->IHTMLDOMNode_iface;
940  return S_OK;
941 }
#define TRUE
Definition: types.h:120
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
struct node node
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
GLfloat GLfloat p
Definition: glext.h:8902
Definition: dlist.c:348

◆ HTMLDOMNode_get_lastChild()

static HRESULT WINAPI HTMLDOMNode_get_lastChild ( IHTMLDOMNode *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 943 of file htmlnode.c.

944 {
946  nsIDOMNode *nschild = NULL;
947  HTMLDOMNode *node;
948  HRESULT hres;
949 
950  TRACE("(%p)->(%p)\n", This, p);
951 
952  nsIDOMNode_GetLastChild(This->nsnode, &nschild);
953  if(!nschild) {
954  *p = NULL;
955  return S_OK;
956  }
957 
958  hres = get_node(This->doc, nschild, TRUE, &node);
959  nsIDOMNode_Release(nschild);
960  if(FAILED(hres))
961  return hres;
962 
963  *p = &node->IHTMLDOMNode_iface;
964  return S_OK;
965 }
#define TRUE
Definition: types.h:120
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
struct node node
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
GLfloat GLfloat p
Definition: glext.h:8902
Definition: dlist.c:348

◆ HTMLDOMNode_get_nextSibling()

static HRESULT WINAPI HTMLDOMNode_get_nextSibling ( IHTMLDOMNode *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 991 of file htmlnode.c.

992 {
994  nsIDOMNode *nssibling = NULL;
995  HTMLDOMNode *node;
996  HRESULT hres;
997 
998  TRACE("(%p)->(%p)\n", This, p);
999 
1000  nsIDOMNode_GetNextSibling(This->nsnode, &nssibling);
1001  if(!nssibling) {
1002  *p = NULL;
1003  return S_OK;
1004  }
1005 
1006  hres = get_node(This->doc, nssibling, TRUE, &node);
1007  nsIDOMNode_Release(nssibling);
1008  if(FAILED(hres))
1009  return hres;
1010 
1011  *p = &node->IHTMLDOMNode_iface;
1012  return S_OK;
1013 }
#define TRUE
Definition: types.h:120
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
struct node node
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
GLfloat GLfloat p
Definition: glext.h:8902
Definition: dlist.c:348

◆ HTMLDOMNode_get_nodeName()

static HRESULT WINAPI HTMLDOMNode_get_nodeName ( IHTMLDOMNode *  iface,
BSTR p 
)
static

Definition at line 858 of file htmlnode.c.

859 {
861  nsAString name;
862  nsresult nsres;
863 
864  TRACE("(%p)->(%p)\n", This, p);
865 
867  nsres = nsIDOMNode_GetNodeName(This->nsnode, &name);
868  return return_nsstr(nsres, &name, p);
869 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
smooth NULL
Definition: ftsmooth.c:416
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841
#define TRACE(s)
Definition: solgame.cpp:4
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
Definition: name.c:36
HRESULT nsresult
Definition: nsiface.idl:39
GLfloat GLfloat p
Definition: glext.h:8902
GLuint const GLchar * name
Definition: glext.h:6031

◆ HTMLDOMNode_get_nodeType()

static HRESULT WINAPI HTMLDOMNode_get_nodeType ( IHTMLDOMNode *  iface,
LONG p 
)
static

Definition at line 517 of file htmlnode.c.

518 {
520  UINT16 type = -1;
521 
522  TRACE("(%p)->(%p)\n", This, p);
523 
524  nsIDOMNode_GetNodeType(This->nsnode, &type);
525 
526  switch(type) {
527  case ELEMENT_NODE:
528  *p = 1;
529  break;
530  case TEXT_NODE:
531  *p = 3;
532  break;
533  case COMMENT_NODE:
534  case DOCUMENT_TYPE_NODE:
535  *p = 8;
536  break;
537  case DOCUMENT_NODE:
538  *p = 9;
539  break;
540  case DOCUMENT_FRAGMENT_NODE:
541  *p = 11;
542  break;
543  default:
544  /*
545  * FIXME:
546  * According to MSDN only ELEMENT_NODE and TEXT_NODE are supported.
547  * It needs more tests.
548  */
549  FIXME("type %u\n", type);
550  *p = 0;
551  }
552 
553  return S_OK;
554 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
unsigned short UINT16
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMNode_get_nodeValue()

static HRESULT WINAPI HTMLDOMNode_get_nodeValue ( IHTMLDOMNode *  iface,
VARIANT p 
)
static

Definition at line 895 of file htmlnode.c.

896 {
898  const PRUnichar *val;
899  nsAString val_str;
900 
901  TRACE("(%p)->(%p)\n", This, p);
902 
903  nsAString_Init(&val_str, NULL);
904  nsIDOMNode_GetNodeValue(This->nsnode, &val_str);
905  nsAString_GetData(&val_str, &val);
906 
907  if(*val) {
908  V_VT(p) = VT_BSTR;
910  }else {
911  V_VT(p) = VT_NULL;
912  }
913 
914  nsAString_Finish(&val_str);
915 
916  return S_OK;
917 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
GLuint GLfloat * val
Definition: glext.h:7180
#define TRACE(s)
Definition: solgame.cpp:4
#define V_VT(A)
Definition: oleauto.h:211
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
WCHAR PRUnichar
Definition: nsiface.idl:48
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMNode_get_parentNode()

static HRESULT WINAPI HTMLDOMNode_get_parentNode ( IHTMLDOMNode *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 556 of file htmlnode.c.

557 {
559  HTMLDOMNode *node;
560  nsIDOMNode *nsnode;
561  nsresult nsres;
562  HRESULT hres;
563 
564  TRACE("(%p)->(%p)\n", This, p);
565 
566  nsres = nsIDOMNode_GetParentNode(This->nsnode, &nsnode);
567  if(NS_FAILED(nsres)) {
568  ERR("GetParentNode failed: %08x\n", nsres);
569  return E_FAIL;
570  }
571 
572  if(!nsnode) {
573  *p = NULL;
574  return S_OK;
575  }
576 
577  hres = get_node(This->doc, nsnode, TRUE, &node);
578  nsIDOMNode_Release(nsnode);
579  if(FAILED(hres))
580  return hres;
581 
582  *p = &node->IHTMLDOMNode_iface;
583  return S_OK;
584 }
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
struct node node
smooth NULL
Definition: ftsmooth.c:416
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
HRESULT nsresult
Definition: nsiface.idl:39
GLfloat GLfloat p
Definition: glext.h:8902
Definition: dlist.c:348

◆ HTMLDOMNode_get_previousSibling()

static HRESULT WINAPI HTMLDOMNode_get_previousSibling ( IHTMLDOMNode *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 967 of file htmlnode.c.

968 {
970  nsIDOMNode *nschild = NULL;
971  HTMLDOMNode *node;
972  HRESULT hres;
973 
974  TRACE("(%p)->(%p)\n", This, p);
975 
976  nsIDOMNode_GetPreviousSibling(This->nsnode, &nschild);
977  if(!nschild) {
978  *p = NULL;
979  return S_OK;
980  }
981 
982  hres = get_node(This->doc, nschild, TRUE, &node);
983  nsIDOMNode_Release(nschild);
984  if(FAILED(hres))
985  return hres;
986 
987  *p = &node->IHTMLDOMNode_iface;
988  return S_OK;
989 }
#define TRUE
Definition: types.h:120
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
struct node node
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
GLfloat GLfloat p
Definition: glext.h:8902
Definition: dlist.c:348

◆ HTMLDOMNode_GetIDsOfNames()

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

Definition at line 499 of file htmlnode.c.

502 {
504  return IDispatchEx_GetIDsOfNames(&This->event_target.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
505  lcid, rgDispId);
506 }
REFIID riid
Definition: precomp.h:44
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451

◆ HTMLDOMNode_GetTypeInfo()

static HRESULT WINAPI HTMLDOMNode_GetTypeInfo ( IHTMLDOMNode *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 492 of file htmlnode.c.

494 {
496  return IDispatchEx_GetTypeInfo(&This->event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
497 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451

◆ HTMLDOMNode_GetTypeInfoCount()

static HRESULT WINAPI HTMLDOMNode_GetTypeInfoCount ( IHTMLDOMNode *  iface,
UINT pctinfo 
)
static

Definition at line 486 of file htmlnode.c.

487 {
489  return IDispatchEx_GetTypeInfoCount(&This->event_target.dispex.IDispatchEx_iface, pctinfo);
490 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451

◆ HTMLDOMNode_hasChildNodes()

static HRESULT WINAPI HTMLDOMNode_hasChildNodes ( IHTMLDOMNode *  iface,
VARIANT_BOOL fChildren 
)
static

Definition at line 586 of file htmlnode.c.

587 {
589  cpp_bool has_child = FALSE;
590  nsresult nsres;
591 
592  TRACE("(%p)->(%p)\n", This, fChildren);
593 
594  nsres = nsIDOMNode_HasChildNodes(This->nsnode, &has_child);
595  if(NS_FAILED(nsres))
596  ERR("HasChildNodes failed: %08x\n", nsres);
597 
598  *fChildren = has_child ? VARIANT_TRUE : VARIANT_FALSE;
599  return S_OK;
600 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define NS_FAILED(res)
unsigned char cpp_bool
Definition: atl.c:39
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT nsresult
Definition: nsiface.idl:39

◆ HTMLDOMNode_Init()

void HTMLDOMNode_Init ( HTMLDocumentNode doc,
HTMLDOMNode node,
nsIDOMNode nsnode 
)

Definition at line 1196 of file htmlnode.c.

1197 {
1198  nsresult nsres;
1199 
1200  node->IHTMLDOMNode_iface.lpVtbl = &HTMLDOMNodeVtbl;
1201  node->IHTMLDOMNode2_iface.lpVtbl = &HTMLDOMNode2Vtbl;
1202 
1203  ccref_init(&node->ccref, 1);
1204 
1205  if(&doc->node != node)
1206  htmldoc_addref(&doc->basedoc);
1207  node->doc = doc;
1208 
1209  nsIDOMNode_AddRef(nsnode);
1210  node->nsnode = nsnode;
1211 
1212  nsres = nsIDOMNode_SetMshtmlNode(nsnode, (nsISupports*)&node->IHTMLDOMNode_iface);
1213  assert(nsres == NS_OK);
1214 }
#define assert(x)
Definition: debug.h:53
HTMLDocument basedoc
#define NS_OK
static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl
Definition: htmlnode.c:1015
HTMLDOMNode node
static ULONG htmldoc_addref(HTMLDocument *This)
static const IHTMLDOMNode2Vtbl HTMLDOMNode2Vtbl
Definition: htmlnode.c:1131
HRESULT nsresult
Definition: nsiface.idl:39
Definition: dlist.c:348

Referenced by create_doc_from_nsdoc(), create_document_fragment(), create_node(), HTMLCommentElement_Create(), HTMLDOMTextNode_Create(), and HTMLElement_Init().

◆ HTMLDOMNode_insertBefore()

static HRESULT WINAPI HTMLDOMNode_insertBefore ( IHTMLDOMNode *  iface,
IHTMLDOMNode *  newChild,
VARIANT  refChild,
IHTMLDOMNode **  node 
)
static

Definition at line 643 of file htmlnode.c.

645 {
647  HTMLDOMNode *new_child, *node_obj, *ref_node = NULL;
648  nsIDOMNode *nsnode;
649  nsresult nsres;
650  HRESULT hres = S_OK;
651 
652  TRACE("(%p)->(%p %s %p)\n", This, newChild, debugstr_variant(&refChild), node);
653 
654  new_child = get_node_obj(newChild);
655  if(!new_child) {
656  ERR("invalid newChild\n");
657  return E_INVALIDARG;
658  }
659 
660  switch(V_VT(&refChild)) {
661  case VT_NULL:
662  break;
663  case VT_DISPATCH: {
664  IHTMLDOMNode *ref_iface;
665 
666  if(!V_DISPATCH(&refChild))
667  break;
668 
669  hres = IDispatch_QueryInterface(V_DISPATCH(&refChild), &IID_IHTMLDOMNode, (void**)&ref_iface);
670  if(FAILED(hres))
671  break;
672 
673  ref_node = get_node_obj(ref_iface);
674  IHTMLDOMNode_Release(ref_iface);
675  if(!ref_node) {
676  ERR("unvalid node\n");
677  hres = E_FAIL;
678  break;
679  }
680  break;
681  }
682  default:
683  FIXME("unimplemented refChild %s\n", debugstr_variant(&refChild));
684  hres = E_NOTIMPL;
685  }
686 
687  if(SUCCEEDED(hres)) {
688  nsres = nsIDOMNode_InsertBefore(This->nsnode, new_child->nsnode, ref_node ? ref_node->nsnode : NULL, &nsnode);
689  if(NS_FAILED(nsres)) {
690  ERR("InsertBefore failed: %08x\n", nsres);
691  hres = E_FAIL;
692  }
693  }
694  node_release(new_child);
695  if(ref_node)
696  node_release(ref_node);
697  if(FAILED(hres))
698  return hres;
699 
700  hres = get_node(This->doc, nsnode, TRUE, &node_obj);
701  nsIDOMNode_Release(nsnode);
702  if(FAILED(hres))
703  return hres;
704 
705  *node = &node_obj->IHTMLDOMNode_iface;
706  return S_OK;
707 }
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define V_DISPATCH(A)
Definition: oleauto.h:239
static void node_release(HTMLDOMNode *node)
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
nsIDOMNode * nsnode
smooth NULL
Definition: ftsmooth.c:416
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define V_VT(A)
Definition: oleauto.h:211
#define ERR(fmt,...)
Definition: debug.h:109
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
#define E_NOTIMPL
Definition: ddrawi.h:99
IHTMLDOMNode IHTMLDOMNode_iface
HRESULT nsresult
Definition: nsiface.idl:39
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045
Definition: dlist.c:348

◆ HTMLDOMNode_Invoke()

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

Definition at line 508 of file htmlnode.c.

511 {
513  return IDispatchEx_Invoke(&This->event_target.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
514  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
515 }
REFIID riid
Definition: precomp.h:44
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519

◆ HTMLDOMNode_put_nodeValue()

static HRESULT WINAPI HTMLDOMNode_put_nodeValue ( IHTMLDOMNode *  iface,
VARIANT  v 
)
static

Definition at line 871 of file htmlnode.c.

872 {
874 
875  TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
876 
877  switch(V_VT(&v)) {
878  case VT_BSTR: {
879  nsAString val_str;
880 
881  nsAString_InitDepend(&val_str, V_BSTR(&v));
882  nsIDOMNode_SetNodeValue(This->nsnode, &val_str);
883  nsAString_Finish(&val_str);
884 
885  return S_OK;
886  }
887 
888  default:
889  FIXME("unsupported value %s\n", debugstr_variant(&v));
890  }
891 
892  return E_NOTIMPL;
893 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
const GLdouble * v
Definition: gl.h:2040
#define E_NOTIMPL
Definition: ddrawi.h:99
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836

◆ HTMLDOMNode_QI()

HRESULT HTMLDOMNode_QI ( HTMLDOMNode This,
REFIID  riid,
void **  ppv 
)

Definition at line 1142 of file htmlnode.c.

1143 {
1144  TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
1145 
1146  if(IsEqualGUID(&IID_IUnknown, riid)) {
1147  *ppv = &This->IHTMLDOMNode_iface;
1148  }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1149  *ppv = &This->IHTMLDOMNode_iface;
1150  }else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) {
1151  *ppv = &This->IHTMLDOMNode_iface;
1152  }else if(IsEqualGUID(&IID_IHTMLDOMNode2, riid)) {
1153  *ppv = &This->IHTMLDOMNode2_iface;
1154  }else if(IsEqualGUID(&IID_nsXPCOMCycleCollectionParticipant, riid)) {
1155  *ppv = &node_ccp;
1156  return NS_OK;
1157  }else if(IsEqualGUID(&IID_nsCycleCollectionISupports, riid)) {
1158  *ppv = &This->IHTMLDOMNode_iface;
1159  return NS_OK;
1160  }else if(dispex_query_interface(&This->event_target.dispex, riid, ppv)) {
1161  return *ppv ? S_OK : E_NOINTERFACE;
1162  }else {
1163  *ppv = NULL;
1164  WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
1165  return E_NOINTERFACE;
1166  }
1167 
1168  IUnknown_AddRef((IUnknown*)*ppv);
1169  return S_OK;
1170 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
static ExternalCycleCollectionParticipant node_ccp
Definition: htmlnode.c:24
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:59
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

Referenced by HTMLDocumentNode_QI(), HTMLDOMTextNode_QI(), and HTMLElement_QI().

◆ HTMLDOMNode_QueryInterface()

static HRESULT WINAPI HTMLDOMNode_QueryInterface ( IHTMLDOMNode *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 456 of file htmlnode.c.

458 {
460 
461  return This->vtbl->qi(This, riid, ppv);
462 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451

◆ HTMLDOMNode_Release()

static ULONG WINAPI HTMLDOMNode_Release ( IHTMLDOMNode *  iface)
static

Definition at line 476 of file htmlnode.c.

477 {
479  LONG ref = ccref_decr(&This->ccref, (nsISupports*)&This->IHTMLDOMNode_iface, /*&node_ccp*/ NULL);
480 
481  TRACE("(%p) ref=%d\n", This, ref);
482 
483  return ref;
484 }
Definition: send.c:47
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4

◆ HTMLDOMNode_removeChild()

static HRESULT WINAPI HTMLDOMNode_removeChild ( IHTMLDOMNode *  iface,
IHTMLDOMNode *  oldChild,
IHTMLDOMNode **  node 
)
static

Definition at line 709 of file htmlnode.c.

711 {
713  HTMLDOMNode *node_obj;
714  nsIDOMNode *nsnode;
715  nsresult nsres;
716  HRESULT hres;
717 
718  TRACE("(%p)->(%p %p)\n", This, oldChild, node);
719 
720  node_obj = get_node_obj(oldChild);
721  if(!node_obj)
722  return E_FAIL;
723 
724  nsres = nsIDOMNode_RemoveChild(This->nsnode, node_obj->nsnode, &nsnode);
725  node_release(node_obj);
726  if(NS_FAILED(nsres)) {
727  ERR("RemoveChild failed: %08x\n", nsres);
728  return E_FAIL;
729  }
730 
731  hres = get_node(This->doc, nsnode, TRUE, &node_obj);
732  nsIDOMNode_Release(nsnode);
733  if(FAILED(hres))
734  return hres;
735 
736  /* FIXME: Make sure that node != newChild */
737  *node = &node_obj->IHTMLDOMNode_iface;
738  return S_OK;
739 }
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
static void node_release(HTMLDOMNode *node)
nsIDOMNode * nsnode
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
IHTMLDOMNode IHTMLDOMNode_iface
HRESULT nsresult
Definition: nsiface.idl:39
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045
Definition: dlist.c:348

◆ HTMLDOMNode_removeNode()

static HRESULT WINAPI HTMLDOMNode_removeNode ( IHTMLDOMNode *  iface,
VARIANT_BOOL  fDeep,
IHTMLDOMNode **  removed 
)
static

Definition at line 802 of file htmlnode.c.

804 {
806  FIXME("(%p)->(%x %p)\n", This, fDeep, removed);
807  return E_NOTIMPL;
808 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLDOMNode_replaceChild()

static HRESULT WINAPI HTMLDOMNode_replaceChild ( IHTMLDOMNode *  iface,
IHTMLDOMNode *  newChild,
IHTMLDOMNode *  oldChild,
IHTMLDOMNode **  node 
)
static

Definition at line 741 of file htmlnode.c.

743 {
745  HTMLDOMNode *node_new, *node_old, *ret_node;
746  nsIDOMNode *nsnode;
747  nsresult nsres;
748  HRESULT hres;
749 
750  TRACE("(%p)->(%p %p %p)\n", This, newChild, oldChild, node);
751 
752  node_new = get_node_obj(newChild);
753  if(!node_new)
754  return E_FAIL;
755 
756  node_old = get_node_obj(oldChild);
757  if(!node_old) {
758  node_release(node_new);
759  return E_FAIL;
760  }
761 
762  nsres = nsIDOMNode_ReplaceChild(This->nsnode, node_new->nsnode, node_old->nsnode, &nsnode);
763  node_release(node_new);
764  node_release(node_old);
765  if(NS_FAILED(nsres))
766  return E_FAIL;
767 
768  hres = get_node(This->doc, nsnode, TRUE, &ret_node);
769  nsIDOMNode_Release(nsnode);
770  if(FAILED(hres))
771  return hres;
772 
773  *node = &ret_node->IHTMLDOMNode_iface;
774  return S_OK;
775 }
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
static void node_release(HTMLDOMNode *node)
nsIDOMNode * nsnode
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
IHTMLDOMNode IHTMLDOMNode_iface
HRESULT nsresult
Definition: nsiface.idl:39
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045
Definition: dlist.c:348

◆ HTMLDOMNode_replaceNode()

static HRESULT WINAPI HTMLDOMNode_replaceNode ( IHTMLDOMNode *  iface,
IHTMLDOMNode *  replacement,
IHTMLDOMNode **  replaced 
)
static

Definition at line 818 of file htmlnode.c.

820 {
822  FIXME("(%p)->(%p %p)\n", This, replacement, replaced);
823  return E_NOTIMPL;
824 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLDOMNode_swapNode()

static HRESULT WINAPI HTMLDOMNode_swapNode ( IHTMLDOMNode *  iface,
IHTMLDOMNode *  otherNode,
IHTMLDOMNode **  swappedNode 
)
static

Definition at line 810 of file htmlnode.c.

812 {
814  FIXME("(%p)->(%p %p)\n", This, otherNode, swappedNode);
815  return E_NOTIMPL;
816 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLDOMNode_traverse()

static nsresult NSAPI HTMLDOMNode_traverse ( void ccp,
void p,
nsCycleCollectionTraversalCallback cb 
)
static

Definition at line 1267 of file htmlnode.c.

1268 {
1270 
1271  TRACE("%p\n", This);
1272 
1273  describe_cc_node(&This->ccref, "HTMLDOMNode", cb);
1274 
1275  if(This->nsnode)
1276  note_cc_edge((nsISupports*)This->nsnode, "This->nsnode", cb);
1277  if(This->doc && &This->doc->node != This)
1278  note_cc_edge((nsISupports*)&This->doc->node.IHTMLDOMNode_iface, "This->doc", cb);
1279  dispex_traverse(&This->event_target.dispex, cb);
1280 
1281  if(This->vtbl->traverse)
1282  This->vtbl->traverse(This, cb);
1283 
1284  return NS_OK;
1285 }
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
void dispex_traverse(DispatchEx *This, nsCycleCollectionTraversalCallback *cb)
Definition: dispex.c:1674
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by init_node_cc().

◆ HTMLDOMNode_unlink()

static nsresult NSAPI HTMLDOMNode_unlink ( void p)
static

Definition at line 1287 of file htmlnode.c.

1288 {
1290 
1291  TRACE("%p\n", This);
1292 
1293  if(This->vtbl->unlink)
1294  This->vtbl->unlink(This);
1295 
1296  dispex_unlink(&This->event_target.dispex);
1297 
1298  if(This->nsnode) {
1299  nsIDOMNode *nsnode = This->nsnode;
1300  This->nsnode = NULL;
1301  nsIDOMNode_Release(nsnode);
1302  }
1303 
1304  if(This->doc && &This->doc->node != This) {
1305  HTMLDocument *doc = &This->doc->basedoc;
1306  This->doc = NULL;
1307  htmldoc_release(doc);
1308  }else {
1309  This->doc = NULL;
1310  }
1311 
1312  return NS_OK;
1313 }
void dispex_unlink(DispatchEx *This)
Definition: dispex.c:1689
static HTMLDOMNode * impl_from_IHTMLDOMNode(IHTMLDOMNode *iface)
Definition: htmlnode.c:451
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG htmldoc_release(HTMLDocument *This)
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by init_node_cc().

◆ impl_from_DispatchEx()

static HTMLDOMChildrenCollection* impl_from_DispatchEx ( DispatchEx iface)
inlinestatic

Definition at line 351 of file htmlnode.c.

352 {
353  return CONTAINING_RECORD(iface, HTMLDOMChildrenCollection, dispex);
354 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by HTMLDOMChildrenCollection_get_dispid(), and HTMLDOMChildrenCollection_invoke().

◆ impl_from_IEnumVARIANT()

static HTMLDOMChildrenCollectionEnum* impl_from_IEnumVARIANT ( IEnumVARIANT iface)
inlinestatic

Definition at line 47 of file htmlnode.c.

48 {
49  return CONTAINING_RECORD(iface, HTMLDOMChildrenCollectionEnum, IEnumVARIANT_iface);
50 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by HTMLDOMChildrenCollectionEnum_AddRef(), HTMLDOMChildrenCollectionEnum_Clone(), HTMLDOMChildrenCollectionEnum_Next(), HTMLDOMChildrenCollectionEnum_QueryInterface(), HTMLDOMChildrenCollectionEnum_Release(), HTMLDOMChildrenCollectionEnum_Reset(), and HTMLDOMChildrenCollectionEnum_Skip().

◆ impl_from_IHTMLDOMChildrenCollection()

static HTMLDOMChildrenCollection* impl_from_IHTMLDOMChildrenCollection ( IHTMLDOMChildrenCollection *  iface)
inlinestatic

Definition at line 187 of file htmlnode.c.

188 {
189  return CONTAINING_RECORD(iface, HTMLDOMChildrenCollection, IHTMLDOMChildrenCollection_iface);
190 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by HTMLDOMChildrenCollection_AddRef(), HTMLDOMChildrenCollection_get__newEnum(), HTMLDOMChildrenCollection_get_length(), HTMLDOMChildrenCollection_GetIDsOfNames(), HTMLDOMChildrenCollection_GetTypeInfo(), HTMLDOMChildrenCollection_GetTypeInfoCount(), HTMLDOMChildrenCollection_Invoke(), HTMLDOMChildrenCollection_item(), HTMLDOMChildrenCollection_QueryInterface(), and HTMLDOMChildrenCollection_Release().

◆ impl_from_IHTMLDOMNode()

◆ impl_from_IHTMLDOMNode2()

static HTMLDOMNode* impl_from_IHTMLDOMNode2 ( IHTMLDOMNode2 *  iface)
inlinestatic

Definition at line 1057 of file htmlnode.c.

1058 {
1059  return CONTAINING_RECORD(iface, HTMLDOMNode, IHTMLDOMNode2_iface);
1060 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by HTMLDOMNode2_AddRef(), HTMLDOMNode2_get_ownerDocument(), HTMLDOMNode2_GetIDsOfNames(), HTMLDOMNode2_GetTypeInfo(), HTMLDOMNode2_GetTypeInfoCount(), HTMLDOMNode2_Invoke(), HTMLDOMNode2_QueryInterface(), and HTMLDOMNode2_Release().

◆ init_node_cc()

void init_node_cc ( void  )

Definition at line 1328 of file htmlnode.c.

1329 {
1330  static const CCObjCallback node_ccp_callback = {
1334  };
1335 
1336  ccp_init(&node_ccp, &node_ccp_callback);
1337 }
static nsresult NSAPI HTMLDOMNode_unlink(void *p)
Definition: htmlnode.c:1287
static ExternalCycleCollectionParticipant node_ccp
Definition: htmlnode.c:24
static void NSAPI HTMLDOMNode_delete_cycle_collectable(void *p)
Definition: htmlnode.c:1315
static nsresult NSAPI HTMLDOMNode_traverse(void *ccp, void *p, nsCycleCollectionTraversalCallback *cb)
Definition: htmlnode.c:1267

Referenced by init_xpcom().

Variable Documentation

◆ HTMLDOMChildrenCollection_dispex

dispex_static_data_t HTMLDOMChildrenCollection_dispex
static
Initial value:
= {
DispDOMChildrenCollection_tid,
}
smooth NULL
Definition: ftsmooth.c:416
static const tid_t HTMLDOMChildrenCollection_iface_tids[]
Definition: htmlnode.c:416
static const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl
Definition: htmlnode.c:409

Definition at line 421 of file htmlnode.c.

Referenced by create_child_collection().

◆ HTMLDOMChildrenCollection_dispex_vtbl

const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl
static
Initial value:
= {
}
static HRESULT HTMLDOMChildrenCollection_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags, DISPID *dispid)
Definition: htmlnode.c:358
smooth NULL
Definition: ftsmooth.c:416
static HRESULT HTMLDOMChildrenCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
Definition: htmlnode.c:379

Definition at line 409 of file htmlnode.c.

◆ HTMLDOMChildrenCollection_iface_tids

const tid_t HTMLDOMChildrenCollection_iface_tids[]
static
Initial value:
= {
IHTMLDOMChildrenCollection_tid,
0
}

Definition at line 416 of file htmlnode.c.

◆ HTMLDOMChildrenCollectionEnumVtbl

const IEnumVARIANTVtbl HTMLDOMChildrenCollectionEnumVtbl
static
Initial value:
= {
}
static ULONG WINAPI HTMLDOMChildrenCollectionEnum_AddRef(IEnumVARIANT *iface)
Definition: htmlnode.c:72
static ULONG WINAPI HTMLDOMChildrenCollectionEnum_Release(IEnumVARIANT *iface)
Definition: htmlnode.c:82
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Clone(IEnumVARIANT *iface, IEnumVARIANT **ppEnum)
Definition: htmlnode.c:170
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Reset(IEnumVARIANT *iface)
Definition: htmlnode.c:160
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched)
Definition: htmlnode.c:107
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Skip(IEnumVARIANT *iface, ULONG celt)
Definition: htmlnode.c:143
static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **ppv)
Definition: htmlnode.c:52

Definition at line 177 of file htmlnode.c.

Referenced by HTMLDOMChildrenCollection_get__newEnum().

◆ HTMLDOMChildrenCollectionVtbl

const IHTMLDOMChildrenCollectionVtbl HTMLDOMChildrenCollectionVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLDOMChildrenCollection_Invoke(IHTMLDOMChildrenCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlnode.c:261
static HRESULT WINAPI HTMLDOMChildrenCollection_QueryInterface(IHTMLDOMChildrenCollection *iface, REFIID riid, void **ppv)
Definition: htmlnode.c:192
static HRESULT WINAPI HTMLDOMChildrenCollection_GetTypeInfoCount(IHTMLDOMChildrenCollection *iface, UINT *pctinfo)
Definition: htmlnode.c:240
static HRESULT WINAPI HTMLDOMChildrenCollection_GetTypeInfo(IHTMLDOMChildrenCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlnode.c:246
static HRESULT WINAPI HTMLDOMChildrenCollection_get_length(IHTMLDOMChildrenCollection *iface, LONG *p)
Definition: htmlnode.c:270
static HRESULT WINAPI HTMLDOMChildrenCollection_item(IHTMLDOMChildrenCollection *iface, LONG index, IDispatch **ppItem)
Definition: htmlnode.c:304
static ULONG WINAPI HTMLDOMChildrenCollection_AddRef(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:214
static ULONG WINAPI HTMLDOMChildrenCollection_Release(IHTMLDOMChildrenCollection *iface)
Definition: htmlnode.c:224
static HRESULT WINAPI HTMLDOMChildrenCollection_get__newEnum(IHTMLDOMChildrenCollection *iface, IUnknown **p)
Definition: htmlnode.c:282
static HRESULT WINAPI HTMLDOMChildrenCollection_GetIDsOfNames(IHTMLDOMChildrenCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlnode.c:253

Definition at line 338 of file htmlnode.c.

Referenced by create_child_collection().

◆ HTMLDOMNode2Vtbl

const IHTMLDOMNode2Vtbl HTMLDOMNode2Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLDOMNode2_GetTypeInfoCount(IHTMLDOMNode2 *iface, UINT *pctinfo)
Definition: htmlnode.c:1084
static HRESULT WINAPI HTMLDOMNode2_QueryInterface(IHTMLDOMNode2 *iface, REFIID riid, void **ppv)
Definition: htmlnode.c:1062
static HRESULT WINAPI HTMLDOMNode2_get_ownerDocument(IHTMLDOMNode2 *iface, IDispatch **p)
Definition: htmlnode.c:1115
static HRESULT WINAPI HTMLDOMNode2_Invoke(IHTMLDOMNode2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlnode.c:1106
static ULONG WINAPI HTMLDOMNode2_AddRef(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1070
static ULONG WINAPI HTMLDOMNode2_Release(IHTMLDOMNode2 *iface)
Definition: htmlnode.c:1077
static HRESULT WINAPI HTMLDOMNode2_GetIDsOfNames(IHTMLDOMNode2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlnode.c:1097
static HRESULT WINAPI HTMLDOMNode2_GetTypeInfo(IHTMLDOMNode2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlnode.c:1090

Definition at line 1131 of file htmlnode.c.

Referenced by HTMLDOMNode_Init().

◆ HTMLDOMNode_cpc

const cpc_entry_t HTMLDOMNode_cpc[] = {{NULL}}
static

Definition at line 1187 of file htmlnode.c.

◆ HTMLDOMNodeImplVtbl

const NodeImplVtbl HTMLDOMNodeImplVtbl
static
Initial value:
= {
}
static HRESULT HTMLDOMNode_clone(HTMLDOMNode *This, nsIDOMNode *nsnode, HTMLDOMNode **ret)
Definition: htmlnode.c:1182
void HTMLDOMNode_destructor(HTMLDOMNode *This)
Definition: htmlnode.c:1172
HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
Definition: htmlnode.c:1142
static const cpc_entry_t HTMLDOMNode_cpc[]
Definition: htmlnode.c:1187

Definition at line 1189 of file htmlnode.c.

Referenced by create_node().

◆ HTMLDOMNodeVtbl

const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl
static
Initial value:
= {
}
static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface)
Definition: htmlnode.c:476
static HRESULT WINAPI HTMLDOMNode_get_firstChild(IHTMLDOMNode *iface, IHTMLDOMNode **p)
Definition: htmlnode.c:919
static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
Definition: htmlnode.c:464
static HRESULT WINAPI HTMLDOMNode_removeChild(IHTMLDOMNode *iface, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
Definition: htmlnode.c:709
static HRESULT WINAPI HTMLDOMNode_Invoke(IHTMLDOMNode *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlnode.c:508
static HRESULT WINAPI HTMLDOMNode_replaceChild(IHTMLDOMNode *iface, IHTMLDOMNode *newChild, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
Definition: htmlnode.c:741
static HRESULT WINAPI HTMLDOMNode_GetTypeInfoCount(IHTMLDOMNode *iface, UINT *pctinfo)
Definition: htmlnode.c:486
static HRESULT WINAPI HTMLDOMNode_GetIDsOfNames(IHTMLDOMNode *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlnode.c:499
static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlnode.c:456
static HRESULT WINAPI HTMLDOMNode_get_nextSibling(IHTMLDOMNode *iface, IHTMLDOMNode **p)
Definition: htmlnode.c:991
static HRESULT WINAPI HTMLDOMNode_swapNode(IHTMLDOMNode *iface, IHTMLDOMNode *otherNode, IHTMLDOMNode **swappedNode)
Definition: htmlnode.c:810
static HRESULT WINAPI HTMLDOMNode_get_nodeName(IHTMLDOMNode *iface, BSTR *p)
Definition: htmlnode.c:858
static HRESULT WINAPI HTMLDOMNode_get_previousSibling(IHTMLDOMNode *iface, IHTMLDOMNode **p)
Definition: htmlnode.c:967
static HRESULT WINAPI HTMLDOMNode_get_nodeValue(IHTMLDOMNode *iface, VARIANT *p)
Definition: htmlnode.c:895
static HRESULT WINAPI HTMLDOMNode_get_parentNode(IHTMLDOMNode *iface, IHTMLDOMNode **p)
Definition: htmlnode.c:556
static HRESULT WINAPI HTMLDOMNode_put_nodeValue(IHTMLDOMNode *iface, VARIANT v)
Definition: htmlnode.c:871
static HRESULT WINAPI HTMLDOMNode_insertBefore(IHTMLDOMNode *iface, IHTMLDOMNode *newChild, VARIANT refChild, IHTMLDOMNode **node)
Definition: htmlnode.c:643
static HRESULT WINAPI HTMLDOMNode_GetTypeInfo(IHTMLDOMNode *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlnode.c:492
static HRESULT WINAPI HTMLDOMNode_cloneNode(IHTMLDOMNode *iface, VARIANT_BOOL fDeep, IHTMLDOMNode **clonedNode)
Definition: htmlnode.c:777
static HRESULT WINAPI HTMLDOMNode_replaceNode(IHTMLDOMNode *iface, IHTMLDOMNode *replacement, IHTMLDOMNode **replaced)
Definition: htmlnode.c:818
static HRESULT WINAPI HTMLDOMNode_get_lastChild(IHTMLDOMNode *iface, IHTMLDOMNode **p)
Definition: htmlnode.c:943
static HRESULT WINAPI HTMLDOMNode_get_childNodes(IHTMLDOMNode *iface, IDispatch **p)
Definition: htmlnode.c:602
static HRESULT WINAPI HTMLDOMNode_removeNode(IHTMLDOMNode *iface, VARIANT_BOOL fDeep, IHTMLDOMNode **removed)
Definition: htmlnode.c:802
static HRESULT WINAPI HTMLDOMNode_get_attributes(IHTMLDOMNode *iface, IDispatch **p)
Definition: htmlnode.c:622
static HRESULT WINAPI HTMLDOMNode_get_nodeType(IHTMLDOMNode *iface, LONG *p)
Definition: htmlnode.c:517
static HRESULT WINAPI HTMLDOMNode_hasChildNodes(IHTMLDOMNode *iface, VARIANT_BOOL *fChildren)
Definition: htmlnode.c:586
static HRESULT WINAPI HTMLDOMNode_appendChild(IHTMLDOMNode *iface, IHTMLDOMNode *newChild, IHTMLDOMNode **node)
Definition: htmlnode.c:826

Definition at line 1015 of file htmlnode.c.

Referenced by get_node_obj(), and HTMLDOMNode_Init().

◆ node_ccp

Definition at line 24 of file htmlnode.c.

Referenced by HTMLDOMNode_QI(), and init_node_cc().