ReactOS 0.4.16-dev-297-gc569aee
htmlattr.c File Reference
#include "mshtml_private.h"
Include dependency graph for htmlattr.c:

Go to the source code of this file.

Functions

static HTMLDOMAttributeimpl_from_IHTMLDOMAttribute (IHTMLDOMAttribute *iface)
 
static HRESULT WINAPI HTMLDOMAttribute_QueryInterface (IHTMLDOMAttribute *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLDOMAttribute_AddRef (IHTMLDOMAttribute *iface)
 
static ULONG WINAPI HTMLDOMAttribute_Release (IHTMLDOMAttribute *iface)
 
static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfoCount (IHTMLDOMAttribute *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfo (IHTMLDOMAttribute *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLDOMAttribute_GetIDsOfNames (IHTMLDOMAttribute *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLDOMAttribute_Invoke (IHTMLDOMAttribute *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLDOMAttribute_get_nodeName (IHTMLDOMAttribute *iface, BSTR *p)
 
static HRESULT WINAPI HTMLDOMAttribute_put_nodeValue (IHTMLDOMAttribute *iface, VARIANT v)
 
static HRESULT WINAPI HTMLDOMAttribute_get_nodeValue (IHTMLDOMAttribute *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLDOMAttribute_get_specified (IHTMLDOMAttribute *iface, VARIANT_BOOL *p)
 
static HTMLDOMAttributeimpl_from_IHTMLDOMAttribute2 (IHTMLDOMAttribute2 *iface)
 
static HRESULT WINAPI HTMLDOMAttribute2_QueryInterface (IHTMLDOMAttribute2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLDOMAttribute2_AddRef (IHTMLDOMAttribute2 *iface)
 
static ULONG WINAPI HTMLDOMAttribute2_Release (IHTMLDOMAttribute2 *iface)
 
static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfoCount (IHTMLDOMAttribute2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfo (IHTMLDOMAttribute2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLDOMAttribute2_GetIDsOfNames (IHTMLDOMAttribute2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLDOMAttribute2_Invoke (IHTMLDOMAttribute2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_name (IHTMLDOMAttribute2 *iface, BSTR *p)
 
static HRESULT WINAPI HTMLDOMAttribute2_put_value (IHTMLDOMAttribute2 *iface, BSTR v)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_value (IHTMLDOMAttribute2 *iface, BSTR *p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_expando (IHTMLDOMAttribute2 *iface, VARIANT_BOOL *p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_nodeType (IHTMLDOMAttribute2 *iface, LONG *p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_parentNode (IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_childNodes (IHTMLDOMAttribute2 *iface, IDispatch **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_firstChild (IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_lastChild (IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_previousSibling (IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_nextSibling (IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_attributes (IHTMLDOMAttribute2 *iface, IDispatch **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_get_ownerDocument (IHTMLDOMAttribute2 *iface, IDispatch **p)
 
static HRESULT WINAPI HTMLDOMAttribute2_insertBefore (IHTMLDOMAttribute2 *iface, IHTMLDOMNode *newChild, VARIANT refChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMAttribute2_replaceChild (IHTMLDOMAttribute2 *iface, IHTMLDOMNode *newChild, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMAttribute2_removeChild (IHTMLDOMAttribute2 *iface, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMAttribute2_appendChild (IHTMLDOMAttribute2 *iface, IHTMLDOMNode *newChild, IHTMLDOMNode **node)
 
static HRESULT WINAPI HTMLDOMAttribute2_hasChildNodes (IHTMLDOMAttribute2 *iface, VARIANT_BOOL *fChildren)
 
static HRESULT WINAPI HTMLDOMAttribute2_cloneNode (IHTMLDOMAttribute2 *iface, VARIANT_BOOL fDeep, IHTMLDOMAttribute **clonedNode)
 
HRESULT HTMLDOMAttribute_Create (const WCHAR *name, HTMLElement *elem, DISPID dispid, HTMLDOMAttribute **attr)
 

Variables

static const IHTMLDOMAttributeVtbl HTMLDOMAttributeVtbl
 
static const IHTMLDOMAttribute2Vtbl HTMLDOMAttribute2Vtbl
 
static const tid_t HTMLDOMAttribute_iface_tids []
 
static dispex_static_data_t HTMLDOMAttribute_dispex
 

Function Documentation

◆ HTMLDOMAttribute2_AddRef()

static ULONG WINAPI HTMLDOMAttribute2_AddRef ( IHTMLDOMAttribute2 *  iface)
static

Definition at line 232 of file htmlattr.c.

233{
235 return IHTMLDOMAttribute_AddRef(&This->IHTMLDOMAttribute_iface);
236}
static HTMLDOMAttribute * impl_from_IHTMLDOMAttribute2(IHTMLDOMAttribute2 *iface)
Definition: htmlattr.c:221

◆ HTMLDOMAttribute2_appendChild()

static HRESULT WINAPI HTMLDOMAttribute2_appendChild ( IHTMLDOMAttribute2 *  iface,
IHTMLDOMNode *  newChild,
IHTMLDOMNode **  node 
)
static

Definition at line 409 of file htmlattr.c.

411{
413 FIXME("(%p)->(%p %p)\n", This, newChild, node);
414 return E_NOTIMPL;
415}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: dlist.c:348

◆ HTMLDOMAttribute2_cloneNode()

static HRESULT WINAPI HTMLDOMAttribute2_cloneNode ( IHTMLDOMAttribute2 *  iface,
VARIANT_BOOL  fDeep,
IHTMLDOMAttribute **  clonedNode 
)
static

Definition at line 424 of file htmlattr.c.

426{
428 FIXME("(%p)->(%x %p)\n", This, fDeep, clonedNode);
429 return E_NOTIMPL;
430}

◆ HTMLDOMAttribute2_get_attributes()

static HRESULT WINAPI HTMLDOMAttribute2_get_attributes ( IHTMLDOMAttribute2 *  iface,
IDispatch **  p 
)
static

Definition at line 371 of file htmlattr.c.

372{
374 FIXME("(%p)->(%p)\n", This, p);
375 return E_NOTIMPL;
376}
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLDOMAttribute2_get_childNodes()

static HRESULT WINAPI HTMLDOMAttribute2_get_childNodes ( IHTMLDOMAttribute2 *  iface,
IDispatch **  p 
)
static

Definition at line 336 of file htmlattr.c.

337{
339 FIXME("(%p)->(%p)\n", This, p);
340 return E_NOTIMPL;
341}

◆ HTMLDOMAttribute2_get_expando()

static HRESULT WINAPI HTMLDOMAttribute2_get_expando ( IHTMLDOMAttribute2 *  iface,
VARIANT_BOOL p 
)
static

Definition at line 312 of file htmlattr.c.

313{
315
316 TRACE("(%p)->(%p)\n", This, p);
317
318 *p = get_dispid_type(This->dispid) == DISPEXPROP_BUILTIN ? VARIANT_FALSE : VARIANT_TRUE;
319 return S_OK;
320}
#define S_OK
Definition: intsafe.h:52
dispex_prop_type_t get_dispid_type(DISPID id)
Definition: dispex.c:464
@ DISPEXPROP_BUILTIN
#define TRACE(s)
Definition: solgame.cpp:4

◆ HTMLDOMAttribute2_get_firstChild()

static HRESULT WINAPI HTMLDOMAttribute2_get_firstChild ( IHTMLDOMAttribute2 *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 343 of file htmlattr.c.

344{
346 FIXME("(%p)->(%p)\n", This, p);
347 return E_NOTIMPL;
348}

◆ HTMLDOMAttribute2_get_lastChild()

static HRESULT WINAPI HTMLDOMAttribute2_get_lastChild ( IHTMLDOMAttribute2 *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 350 of file htmlattr.c.

351{
353 FIXME("(%p)->(%p)\n", This, p);
354 return E_NOTIMPL;
355}

◆ HTMLDOMAttribute2_get_name()

static HRESULT WINAPI HTMLDOMAttribute2_get_name ( IHTMLDOMAttribute2 *  iface,
BSTR p 
)
static

Definition at line 274 of file htmlattr.c.

275{
277 FIXME("(%p)->(%p)\n", This, p);
278 return E_NOTIMPL;
279}

◆ HTMLDOMAttribute2_get_nextSibling()

static HRESULT WINAPI HTMLDOMAttribute2_get_nextSibling ( IHTMLDOMAttribute2 *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 364 of file htmlattr.c.

365{
367 FIXME("(%p)->(%p)\n", This, p);
368 return E_NOTIMPL;
369}

◆ HTMLDOMAttribute2_get_nodeType()

static HRESULT WINAPI HTMLDOMAttribute2_get_nodeType ( IHTMLDOMAttribute2 *  iface,
LONG p 
)
static

Definition at line 322 of file htmlattr.c.

323{
325 FIXME("(%p)->(%p)\n", This, p);
326 return E_NOTIMPL;
327}

◆ HTMLDOMAttribute2_get_ownerDocument()

static HRESULT WINAPI HTMLDOMAttribute2_get_ownerDocument ( IHTMLDOMAttribute2 *  iface,
IDispatch **  p 
)
static

Definition at line 378 of file htmlattr.c.

379{
381 FIXME("(%p)->(%p)\n", This, p);
382 return E_NOTIMPL;
383}

◆ HTMLDOMAttribute2_get_parentNode()

static HRESULT WINAPI HTMLDOMAttribute2_get_parentNode ( IHTMLDOMAttribute2 *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 329 of file htmlattr.c.

330{
332 FIXME("(%p)->(%p)\n", This, p);
333 return E_NOTIMPL;
334}

◆ HTMLDOMAttribute2_get_previousSibling()

static HRESULT WINAPI HTMLDOMAttribute2_get_previousSibling ( IHTMLDOMAttribute2 *  iface,
IHTMLDOMNode **  p 
)
static

Definition at line 357 of file htmlattr.c.

358{
360 FIXME("(%p)->(%p)\n", This, p);
361 return E_NOTIMPL;
362}

◆ HTMLDOMAttribute2_get_value()

static HRESULT WINAPI HTMLDOMAttribute2_get_value ( IHTMLDOMAttribute2 *  iface,
BSTR p 
)
static

Definition at line 288 of file htmlattr.c.

289{
291 VARIANT val;
293
294 TRACE("(%p)->(%p)\n", This, p);
295
296 if(!This->elem) {
297 FIXME("NULL This->elem\n");
298 return E_UNEXPECTED;
299 }
300
302 if(FAILED(hres))
303 return hres;
304
305 assert(V_VT(&val) == VT_BSTR);
306 *p = V_BSTR(&val);
307 if(!*p && !(*p = SysAllocStringLen(NULL, 0)))
308 return E_OUTOFMEMORY;
309 return S_OK;
310}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
@ VT_BSTR
Definition: compat.h:2303
#define assert(x)
Definition: debug.h:53
GLuint GLfloat * val
Definition: glext.h:7180
HRESULT get_elem_attr_value_by_dispid(HTMLElement *elem, DISPID dispid, DWORD flags, VARIANT *ret)
Definition: htmlelem.c:621
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hres
Definition: protocol.c:465
#define ATTRFLAG_ASSTRING
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ HTMLDOMAttribute2_GetIDsOfNames()

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

Definition at line 257 of file htmlattr.c.

259{
261 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
262 lcid, rgDispId);
263}
REFIID riid
Definition: atlbase.h:39

◆ HTMLDOMAttribute2_GetTypeInfo()

static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfo ( IHTMLDOMAttribute2 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 250 of file htmlattr.c.

252{
254 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
255}

◆ HTMLDOMAttribute2_GetTypeInfoCount()

static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfoCount ( IHTMLDOMAttribute2 *  iface,
UINT pctinfo 
)
static

Definition at line 244 of file htmlattr.c.

245{
247 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
248}

◆ HTMLDOMAttribute2_hasChildNodes()

static HRESULT WINAPI HTMLDOMAttribute2_hasChildNodes ( IHTMLDOMAttribute2 *  iface,
VARIANT_BOOL fChildren 
)
static

Definition at line 417 of file htmlattr.c.

418{
420 FIXME("(%p)->(%p)\n", This, fChildren);
421 return E_NOTIMPL;
422}

◆ HTMLDOMAttribute2_insertBefore()

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

Definition at line 385 of file htmlattr.c.

387{
389 FIXME("(%p)->(%p %s %p)\n", This, newChild, debugstr_variant(&refChild), node);
390 return E_NOTIMPL;
391}
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46

◆ HTMLDOMAttribute2_Invoke()

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

Definition at line 265 of file htmlattr.c.

268{
270 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
271 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
272}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ HTMLDOMAttribute2_put_value()

static HRESULT WINAPI HTMLDOMAttribute2_put_value ( IHTMLDOMAttribute2 *  iface,
BSTR  v 
)
static

Definition at line 281 of file htmlattr.c.

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

◆ HTMLDOMAttribute2_QueryInterface()

static HRESULT WINAPI HTMLDOMAttribute2_QueryInterface ( IHTMLDOMAttribute2 *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 226 of file htmlattr.c.

227{
229 return IHTMLDOMAttribute_QueryInterface(&This->IHTMLDOMAttribute_iface, riid, ppv);
230}
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ HTMLDOMAttribute2_Release()

static ULONG WINAPI HTMLDOMAttribute2_Release ( IHTMLDOMAttribute2 *  iface)
static

Definition at line 238 of file htmlattr.c.

239{
241 return IHTMLDOMAttribute_Release(&This->IHTMLDOMAttribute_iface);
242}

◆ HTMLDOMAttribute2_removeChild()

static HRESULT WINAPI HTMLDOMAttribute2_removeChild ( IHTMLDOMAttribute2 *  iface,
IHTMLDOMNode *  oldChild,
IHTMLDOMNode **  node 
)
static

Definition at line 401 of file htmlattr.c.

403{
405 FIXME("(%p)->(%p %p)\n", This, oldChild, node);
406 return E_NOTIMPL;
407}

◆ HTMLDOMAttribute2_replaceChild()

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

Definition at line 393 of file htmlattr.c.

395{
397 FIXME("(%p)->(%p %p %p)\n", This, newChild, oldChild, node);
398 return E_NOTIMPL;
399}

◆ HTMLDOMAttribute_AddRef()

static ULONG WINAPI HTMLDOMAttribute_AddRef ( IHTMLDOMAttribute *  iface)
static

Definition at line 51 of file htmlattr.c.

52{
55
56 TRACE("(%p) ref=%d\n", This, ref);
57
58 return ref;
59}
#define InterlockedIncrement
Definition: armddk.h:53
static HTMLDOMAttribute * impl_from_IHTMLDOMAttribute(IHTMLDOMAttribute *iface)
Definition: htmlattr.c:21
long LONG
Definition: pedump.c:60
Definition: send.c:48

◆ HTMLDOMAttribute_Create()

HRESULT HTMLDOMAttribute_Create ( const WCHAR name,
HTMLElement elem,
DISPID  dispid,
HTMLDOMAttribute **  attr 
)

Definition at line 473 of file htmlattr.c.

474{
478
479 ret = heap_alloc_zero(sizeof(*ret));
480 if(!ret)
481 return E_OUTOFMEMORY;
482
483 ret->IHTMLDOMAttribute_iface.lpVtbl = &HTMLDOMAttributeVtbl;
484 ret->IHTMLDOMAttribute2_iface.lpVtbl = &HTMLDOMAttribute2Vtbl;
485 ret->ref = 1;
486 ret->dispid = dispid;
487 ret->elem = elem;
488
489 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMAttribute_iface,
491
492 /* For attributes attached to an element, (elem,dispid) pair should be valid used for its operation. */
493 if(elem) {
494 hres = HTMLElement_get_attr_col(&elem->node, &col);
495 if(FAILED(hres)) {
496 IHTMLDOMAttribute_Release(&ret->IHTMLDOMAttribute_iface);
497 return hres;
498 }
499 IHTMLAttributeCollection_Release(&col->IHTMLAttributeCollection_iface);
500
501 list_add_tail(&elem->attrs->attrs, &ret->entry);
502 }
503
504 /* For detached attributes we may still do most operations if we have its name available. */
505 if(name) {
506 ret->name = heap_strdupW(name);
507 if(!ret->name) {
508 IHTMLDOMAttribute_Release(&ret->IHTMLDOMAttribute_iface);
509 return E_OUTOFMEMORY;
510 }
511 }
512
513 *attr = ret;
514 return S_OK;
515}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: edit.c:4312
static dispex_static_data_t HTMLDOMAttribute_dispex
Definition: htmlattr.c:466
static const IHTMLDOMAttribute2Vtbl HTMLDOMAttribute2Vtbl
Definition: htmlattr.c:432
static const IHTMLDOMAttributeVtbl HTMLDOMAttributeVtbl
Definition: htmlattr.c:207
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac)
Definition: htmlelem.c:4827
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
static size_t elem
Definition: string.c:68
IHTMLAttributeCollection IHTMLAttributeCollection_iface
Definition: cookie.c:202
Definition: name.c:39
int ret

Referenced by get_domattr(), and HTMLDocument5_createAttribute().

◆ HTMLDOMAttribute_get_nodeName()

static HRESULT WINAPI HTMLDOMAttribute_get_nodeName ( IHTMLDOMAttribute *  iface,
BSTR p 
)
static

Definition at line 109 of file htmlattr.c.

110{
112
113 TRACE("(%p)->(%p)\n", This, p);
114
115 if(!This->elem) {
116 if(!This->name) {
117 FIXME("No name available\n");
118 return E_FAIL;
119 }
120
121 *p = SysAllocString(This->name);
122 return *p ? S_OK : E_OUTOFMEMORY;
123 }
124
125 return IDispatchEx_GetMemberName(&This->elem->node.event_target.dispex.IDispatchEx_iface, This->dispid, p);
126}
#define E_FAIL
Definition: ddrawi.h:102
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

◆ HTMLDOMAttribute_get_nodeValue()

static HRESULT WINAPI HTMLDOMAttribute_get_nodeValue ( IHTMLDOMAttribute *  iface,
VARIANT p 
)
static

Definition at line 149 of file htmlattr.c.

150{
152
153 TRACE("(%p)->(%p)\n", This, p);
154
155 if(!This->elem) {
156 FIXME("NULL This->elem\n");
157 return E_UNEXPECTED;
158 }
159
160 return get_elem_attr_value_by_dispid(This->elem, This->dispid, 0, p);
161}

◆ HTMLDOMAttribute_get_specified()

static HRESULT WINAPI HTMLDOMAttribute_get_specified ( IHTMLDOMAttribute *  iface,
VARIANT_BOOL p 
)
static

Definition at line 163 of file htmlattr.c.

164{
166 nsIDOMAttr *nsattr;
167 nsAString nsname;
168 BSTR name;
169 nsresult nsres;
171
172 TRACE("(%p)->(%p)\n", This, p);
173
174 if(!This->elem || !This->elem->nselem) {
175 FIXME("NULL This->elem\n");
176 return E_UNEXPECTED;
177 }
178
179 if(get_dispid_type(This->dispid) != DISPEXPROP_BUILTIN) {
180 *p = VARIANT_TRUE;
181 return S_OK;
182 }
183
184 hres = IDispatchEx_GetMemberName(&This->elem->node.event_target.dispex.IDispatchEx_iface, This->dispid, &name);
185 if(FAILED(hres))
186 return hres;
187
188 /* FIXME: This is not exactly right, we have some attributes that don't map directly to Gecko attributes. */
189 nsAString_InitDepend(&nsname, name);
190 nsres = nsIDOMHTMLElement_GetAttributeNode(This->elem->nselem, &nsname, &nsattr);
191 nsAString_Finish(&nsname);
193 if(NS_FAILED(nsres))
194 return E_FAIL;
195
196 /* If the Gecko attribute node can be found, we know that the attribute is specified.
197 There is no point in calling GetSpecified */
198 if(nsattr) {
199 nsIDOMAttr_Release(nsattr);
200 *p = VARIANT_TRUE;
201 }else {
202 *p = VARIANT_FALSE;
203 }
204 return S_OK;
205}
OLECHAR * BSTR
Definition: compat.h:2293
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
#define NS_FAILED(res)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271

◆ HTMLDOMAttribute_GetIDsOfNames()

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

Definition at line 91 of file htmlattr.c.

94{
96 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
97 lcid, rgDispId);
98}

◆ HTMLDOMAttribute_GetTypeInfo()

static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfo ( IHTMLDOMAttribute *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 84 of file htmlattr.c.

86{
88 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
89}

◆ HTMLDOMAttribute_GetTypeInfoCount()

static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfoCount ( IHTMLDOMAttribute *  iface,
UINT pctinfo 
)
static

Definition at line 78 of file htmlattr.c.

79{
81 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
82}

◆ HTMLDOMAttribute_Invoke()

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

Definition at line 100 of file htmlattr.c.

103{
105 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
106 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
107}

◆ HTMLDOMAttribute_put_nodeValue()

static HRESULT WINAPI HTMLDOMAttribute_put_nodeValue ( IHTMLDOMAttribute *  iface,
VARIANT  v 
)
static

Definition at line 128 of file htmlattr.c.

129{
131 DISPID dispidNamed = DISPID_PROPERTYPUT;
132 DISPPARAMS dp = {&v, &dispidNamed, 1, 1};
133 EXCEPINFO ei;
134 VARIANT ret;
135
136 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
137
138 if(!This->elem) {
139 FIXME("NULL This->elem\n");
140 return E_UNEXPECTED;
141 }
142
143 memset(&ei, 0, sizeof(ei));
144
145 return IDispatchEx_InvokeEx(&This->elem->node.event_target.dispex.IDispatchEx_iface, This->dispid, LOCALE_SYSTEM_DEFAULT,
146 DISPATCH_PROPERTYPUT, &dp, &ret, &ei, NULL);
147}
static VARIANTARG static DISPID
Definition: ordinal.c:52
struct stdole::DISPPARAMS DISPPARAMS
struct stdole::EXCEPINFO EXCEPINFO
#define LOCALE_SYSTEM_DEFAULT
#define DISPATCH_PROPERTYPUT
Definition: oleauto.h:1008
#define memset(x, y, z)
Definition: compat.h:39

◆ HTMLDOMAttribute_QueryInterface()

static HRESULT WINAPI HTMLDOMAttribute_QueryInterface ( IHTMLDOMAttribute *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 26 of file htmlattr.c.

28{
30
31 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
32
34 *ppv = &This->IHTMLDOMAttribute_iface;
35 }else if(IsEqualGUID(&IID_IHTMLDOMAttribute, riid)) {
36 *ppv = &This->IHTMLDOMAttribute_iface;
37 }else if(IsEqualGUID(&IID_IHTMLDOMAttribute2, riid)) {
38 *ppv = &This->IHTMLDOMAttribute2_iface;
39 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
40 return *ppv ? S_OK : E_NOINTERFACE;
41 }else {
42 WARN("%s not supported\n", debugstr_mshtml_guid(riid));
43 *ppv = NULL;
44 return E_NOINTERFACE;
45 }
46
47 IUnknown_AddRef((IUnknown*)*ppv);
48 return S_OK;
49}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:542
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ HTMLDOMAttribute_Release()

static ULONG WINAPI HTMLDOMAttribute_Release ( IHTMLDOMAttribute *  iface)
static

Definition at line 61 of file htmlattr.c.

62{
65
66 TRACE("(%p) ref=%d\n", This, ref);
67
68 if(!ref) {
69 assert(!This->elem);
70 release_dispex(&This->dispex);
71 heap_free(This->name);
73 }
74
75 return ref;
76}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706

◆ impl_from_IHTMLDOMAttribute()

◆ impl_from_IHTMLDOMAttribute2()

Variable Documentation

◆ HTMLDOMAttribute2Vtbl

const IHTMLDOMAttribute2Vtbl HTMLDOMAttribute2Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfo(IHTMLDOMAttribute2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlattr.c:250
static HRESULT WINAPI HTMLDOMAttribute2_GetIDsOfNames(IHTMLDOMAttribute2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlattr.c:257
static HRESULT WINAPI HTMLDOMAttribute2_get_childNodes(IHTMLDOMAttribute2 *iface, IDispatch **p)
Definition: htmlattr.c:336
static HRESULT WINAPI HTMLDOMAttribute2_get_firstChild(IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
Definition: htmlattr.c:343
static HRESULT WINAPI HTMLDOMAttribute2_get_nextSibling(IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
Definition: htmlattr.c:364
static HRESULT WINAPI HTMLDOMAttribute2_insertBefore(IHTMLDOMAttribute2 *iface, IHTMLDOMNode *newChild, VARIANT refChild, IHTMLDOMNode **node)
Definition: htmlattr.c:385
static HRESULT WINAPI HTMLDOMAttribute2_get_ownerDocument(IHTMLDOMAttribute2 *iface, IDispatch **p)
Definition: htmlattr.c:378
static HRESULT WINAPI HTMLDOMAttribute2_get_previousSibling(IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
Definition: htmlattr.c:357
static HRESULT WINAPI HTMLDOMAttribute2_get_value(IHTMLDOMAttribute2 *iface, BSTR *p)
Definition: htmlattr.c:288
static ULONG WINAPI HTMLDOMAttribute2_Release(IHTMLDOMAttribute2 *iface)
Definition: htmlattr.c:238
static HRESULT WINAPI HTMLDOMAttribute2_replaceChild(IHTMLDOMAttribute2 *iface, IHTMLDOMNode *newChild, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
Definition: htmlattr.c:393
static HRESULT WINAPI HTMLDOMAttribute2_hasChildNodes(IHTMLDOMAttribute2 *iface, VARIANT_BOOL *fChildren)
Definition: htmlattr.c:417
static HRESULT WINAPI HTMLDOMAttribute2_put_value(IHTMLDOMAttribute2 *iface, BSTR v)
Definition: htmlattr.c:281
static HRESULT WINAPI HTMLDOMAttribute2_get_name(IHTMLDOMAttribute2 *iface, BSTR *p)
Definition: htmlattr.c:274
static HRESULT WINAPI HTMLDOMAttribute2_get_attributes(IHTMLDOMAttribute2 *iface, IDispatch **p)
Definition: htmlattr.c:371
static HRESULT WINAPI HTMLDOMAttribute2_Invoke(IHTMLDOMAttribute2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlattr.c:265
static HRESULT WINAPI HTMLDOMAttribute2_QueryInterface(IHTMLDOMAttribute2 *iface, REFIID riid, void **ppv)
Definition: htmlattr.c:226
static HRESULT WINAPI HTMLDOMAttribute2_cloneNode(IHTMLDOMAttribute2 *iface, VARIANT_BOOL fDeep, IHTMLDOMAttribute **clonedNode)
Definition: htmlattr.c:424
static HRESULT WINAPI HTMLDOMAttribute2_removeChild(IHTMLDOMAttribute2 *iface, IHTMLDOMNode *oldChild, IHTMLDOMNode **node)
Definition: htmlattr.c:401
static HRESULT WINAPI HTMLDOMAttribute2_get_lastChild(IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
Definition: htmlattr.c:350
static HRESULT WINAPI HTMLDOMAttribute2_appendChild(IHTMLDOMAttribute2 *iface, IHTMLDOMNode *newChild, IHTMLDOMNode **node)
Definition: htmlattr.c:409
static HRESULT WINAPI HTMLDOMAttribute2_get_expando(IHTMLDOMAttribute2 *iface, VARIANT_BOOL *p)
Definition: htmlattr.c:312
static HRESULT WINAPI HTMLDOMAttribute2_get_nodeType(IHTMLDOMAttribute2 *iface, LONG *p)
Definition: htmlattr.c:322
static ULONG WINAPI HTMLDOMAttribute2_AddRef(IHTMLDOMAttribute2 *iface)
Definition: htmlattr.c:232
static HRESULT WINAPI HTMLDOMAttribute2_get_parentNode(IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p)
Definition: htmlattr.c:329
static HRESULT WINAPI HTMLDOMAttribute2_GetTypeInfoCount(IHTMLDOMAttribute2 *iface, UINT *pctinfo)
Definition: htmlattr.c:244

Definition at line 432 of file htmlattr.c.

Referenced by HTMLDOMAttribute_Create().

◆ HTMLDOMAttribute_dispex

dispex_static_data_t HTMLDOMAttribute_dispex
static
Initial value:
= {
DispHTMLDOMAttribute_tid,
0,
}
static const tid_t HTMLDOMAttribute_iface_tids[]
Definition: htmlattr.c:461

Definition at line 466 of file htmlattr.c.

Referenced by HTMLDOMAttribute_Create().

◆ HTMLDOMAttribute_iface_tids

const tid_t HTMLDOMAttribute_iface_tids[]
static
Initial value:
= {
IHTMLDOMAttribute_tid,
IHTMLDOMAttribute2_tid,
0
}

Definition at line 461 of file htmlattr.c.

◆ HTMLDOMAttributeVtbl

const IHTMLDOMAttributeVtbl HTMLDOMAttributeVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfo(IHTMLDOMAttribute *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlattr.c:84
static HRESULT WINAPI HTMLDOMAttribute_get_nodeName(IHTMLDOMAttribute *iface, BSTR *p)
Definition: htmlattr.c:109
static HRESULT WINAPI HTMLDOMAttribute_get_nodeValue(IHTMLDOMAttribute *iface, VARIANT *p)
Definition: htmlattr.c:149
static HRESULT WINAPI HTMLDOMAttribute_GetIDsOfNames(IHTMLDOMAttribute *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlattr.c:91
static HRESULT WINAPI HTMLDOMAttribute_get_specified(IHTMLDOMAttribute *iface, VARIANT_BOOL *p)
Definition: htmlattr.c:163
static HRESULT WINAPI HTMLDOMAttribute_put_nodeValue(IHTMLDOMAttribute *iface, VARIANT v)
Definition: htmlattr.c:128
static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfoCount(IHTMLDOMAttribute *iface, UINT *pctinfo)
Definition: htmlattr.c:78
static ULONG WINAPI HTMLDOMAttribute_AddRef(IHTMLDOMAttribute *iface)
Definition: htmlattr.c:51
static ULONG WINAPI HTMLDOMAttribute_Release(IHTMLDOMAttribute *iface)
Definition: htmlattr.c:61
static HRESULT WINAPI HTMLDOMAttribute_QueryInterface(IHTMLDOMAttribute *iface, REFIID riid, void **ppv)
Definition: htmlattr.c:26
static HRESULT WINAPI HTMLDOMAttribute_Invoke(IHTMLDOMAttribute *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlattr.c:100

Definition at line 207 of file htmlattr.c.

Referenced by HTMLDOMAttribute_Create().