39 return IHTMLDOMNode_QueryInterface(&
This->element.node.IHTMLDOMNode_iface,
riid,
ppv);
46 return IHTMLDOMNode_AddRef(&
This->element.node.IHTMLDOMNode_iface);
53 return IHTMLDOMNode_Release(&
This->element.node.IHTMLDOMNode_iface);
59 return IDispatchEx_GetTypeInfoCount(&
This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
66 return IDispatchEx_GetTypeInfo(&
This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
75 return IDispatchEx_GetIDsOfNames(&
This->element.node.event_target.dispex.IDispatchEx_iface,
riid, rgszNames,
76 cNames, lcid, rgDispId);
81 VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
84 return IDispatchEx_Invoke(&
This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember,
riid,
85 lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
95 nsres = nsIDOMHTMLOptionElement_SetSelected(
This->nsoption,
v != VARIANT_FALSE);
97 ERR(
"SetSelected failed: %08x\n", nsres);
112 nsres = nsIDOMHTMLOptionElement_GetSelected(
This->nsoption, &
selected);
114 ERR(
"GetSelected failed: %08x\n", nsres);
118 *
p =
selected ? VARIANT_TRUE : VARIANT_FALSE;
131 nsres = nsIDOMHTMLOptionElement_SetValue(
This->nsoption, &
value_str);
134 ERR(
"SetValue failed: %08x\n", nsres);
148 nsres = nsIDOMHTMLOptionElement_GetValue(
This->nsoption, &
value_str);
160 val = (
v == VARIANT_TRUE);
162 nsres = nsIDOMHTMLOptionElement_GetSelected(
This->nsoption, &
selected);
164 ERR(
"GetSelected failed: %08x\n", nsres);
168 nsres = nsIDOMHTMLOptionElement_SetDefaultSelected(
This->nsoption,
val);
170 ERR(
"SetDefaultSelected failed: %08x\n", nsres);
175 nsres = nsIDOMHTMLOptionElement_SetSelected(
This->nsoption,
selected);
177 ERR(
"SetSelected failed: %08x\n", nsres);
194 nsres = nsIDOMHTMLOptionElement_GetDefaultSelected(
This->nsoption, &
val);
196 ERR(
"GetDefaultSelected failed: %08x\n", nsres);
200 *
p =
val ? VARIANT_TRUE : VARIANT_FALSE;
222 nsres = nsIDOMHTMLOptionElement_GetIndex(
This->nsoption, &
val);
224 ERR(
"GetIndex failed: %08x\n", nsres);
241 if(!
This->element.node.doc->nsdoc) {
242 WARN(
"NULL nsdoc\n");
249 nsres = nsIDOMHTMLElement_GetFirstChild(
This->element.nselem, &
child);
253 nsres = nsIDOMHTMLElement_RemoveChild(
This->element.nselem,
child, &tmp);
254 nsIDOMNode_Release(
child);
256 nsIDOMNode_Release(tmp);
258 ERR(
"RemoveChild failed: %08x\n", nsres);
264 nsres = nsIDOMHTMLDocument_CreateTextNode(
This->element.node.doc->nsdoc, &text_str, &text_node);
267 ERR(
"CreateTextNode failed: %08x\n", nsres);
271 nsres = nsIDOMHTMLElement_AppendChild(
This->element.nselem, (
nsIDOMNode*)text_node, &tmp);
273 nsIDOMNode_Release(tmp);
275 ERR(
"AppendChild failed: %08x\n", nsres);
289 nsres = nsIDOMHTMLOptionElement_GetText(
This->nsoption, &text_str);
307 nsres = nsIDOMHTMLOptionElement_GetForm(
This->nsoption, &nsform);
309 ERR(
"GetForm failed: %08x, nsform: %p\n", nsres, nsform);
313 if (nsform ==
NULL) {
314 TRACE(
"nsform not found\n");
319 nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (
void**)&form_node);
320 nsIDOMHTMLFormElement_Release(nsform);
324 nsIDOMNode_Release(form_node);
328 hres = IHTMLDOMNode_QueryInterface(&
node->IHTMLDOMNode_iface, &IID_IHTMLElement, (
void**)
p);
368 *
ppv = &
This->IHTMLOptionElement_iface;
371 *
ppv = &
This->IHTMLOptionElement_iface;
373 TRACE(
"(%p)->(IID_IHTMLOptionElement %p)\n",
This,
ppv);
374 *
ppv = &
This->IHTMLOptionElement_iface;
401 nsIDOMHTMLOptionElement_Release(nsoption);
427 IHTMLOptionElement_tid,
432 DispHTMLOptionElement_tid,
451 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLOptionElement, (
void**)&
ret->nsoption);
471 *
ppv = &
This->IHTMLOptionElementFactory_iface;
473 *
ppv = &
This->IHTMLOptionElementFactory_iface;
475 *
ppv = &
This->IHTMLOptionElementFactory_iface;
516 return IDispatchEx_GetTypeInfoCount(&
This->dispex.IDispatchEx_iface, pctinfo);
523 return IDispatchEx_GetTypeInfo(&
This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
531 return IDispatchEx_GetIDsOfNames(&
This->dispex.IDispatchEx_iface,
riid, rgszNames, cNames, lcid, rgDispId);
536 VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
539 return IDispatchEx_Invoke(&
This->dispex.IDispatchEx_iface, dispIdMember,
riid, lcid,
wFlags, pDispParams,
540 pVarResult, pExcepInfo, puArgErr);
545 IHTMLOptionElement **optelem)
557 if(!
This->window || !
This->window->doc) {
569 nsIDOMHTMLElement_Release(nselem);
573 hres = IHTMLDOMNode_QueryInterface(&
node->IHTMLDOMNode_iface,
574 &IID_IHTMLOptionElement, (
void**)optelem);
578 IHTMLOptionElement_put_text(*optelem,
V_BSTR(&
text));
583 IHTMLOptionElement_put_value(*optelem,
V_BSTR(&
value));
607 IHTMLOptionElementFactory_tid,
613 IHTMLOptionElementFactory_tid,
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
static char selected[MAX_PATH+1]
const char * debugstr_mshtml_guid(const GUID *iid)
static const WCHAR optionW[]
HRESULT HTMLElement_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
void HTMLElement_destructor(HTMLDOMNode *iface)
HRESULT HTMLElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *event, BOOL *prevent_default)
const cpc_entry_t HTMLElement_cpc[]
void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac)
HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
HRESULT create_nselem(HTMLDocumentNode *doc, const WCHAR *tag, nsIDOMHTMLElement **ret)
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
static dispex_static_data_t HTMLOptionElementFactory_dispex
static HRESULT WINAPI HTMLOptionElement_GetIDsOfNames(IHTMLOptionElement *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
HRESULT HTMLOptionElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
static const IHTMLOptionElementVtbl HTMLOptionElementVtbl
static ULONG WINAPI HTMLOptionElementFactory_AddRef(IHTMLOptionElementFactory *iface)
static HRESULT WINAPI HTMLOptionElement_get_text(IHTMLOptionElement *iface, BSTR *p)
static HRESULT WINAPI HTMLOptionElement_get_defaultSelected(IHTMLOptionElement *iface, VARIANT_BOOL *p)
static HRESULT WINAPI HTMLOptionElement_put_defaultSelected(IHTMLOptionElement *iface, VARIANT_BOOL v)
static void HTMLOptionElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
static HRESULT WINAPI HTMLOptionElementFactory_Invoke(IHTMLOptionElementFactory *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static const tid_t HTMLOptionElementFactory_iface_tids[]
static HRESULT WINAPI HTMLOptionElement_GetTypeInfoCount(IHTMLOptionElement *iface, UINT *pctinfo)
static HRESULT WINAPI HTMLOptionElement_get_index(IHTMLOptionElement *iface, LONG *p)
static HRESULT WINAPI HTMLOptionElement_put_index(IHTMLOptionElement *iface, LONG v)
static HRESULT WINAPI HTMLOptionElement_get_form(IHTMLOptionElement *iface, IHTMLFormElement **p)
static HTMLOptionElement * impl_from_HTMLDOMNode(HTMLDOMNode *iface)
static const IHTMLOptionElementFactoryVtbl HTMLOptionElementFactoryVtbl
static ULONG WINAPI HTMLOptionElement_Release(IHTMLOptionElement *iface)
static void HTMLOptionElement_unlink(HTMLDOMNode *iface)
static HRESULT WINAPI HTMLOptionElementFactory_GetTypeInfo(IHTMLOptionElementFactory *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static HRESULT WINAPI HTMLOptionElement_get_value(IHTMLOptionElement *iface, BSTR *p)
static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR v)
static const tid_t HTMLOptionElement_iface_tids[]
static HRESULT WINAPI HTMLOptionElement_GetTypeInfo(IHTMLOptionElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static HTMLOptionElement * impl_from_IHTMLOptionElement(IHTMLOptionElement *iface)
static HRESULT WINAPI HTMLOptionElement_Invoke(IHTMLOptionElement *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HRESULT WINAPI HTMLOptionElement_put_value(IHTMLOptionElement *iface, BSTR v)
static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory *iface, VARIANT text, VARIANT value, VARIANT defaultselected, VARIANT selected, IHTMLOptionElement **optelem)
static HTMLOptionElementFactory * impl_from_IHTMLOptionElementFactory(IHTMLOptionElementFactory *iface)
static dispex_static_data_t HTMLOptionElement_dispex
static ULONG WINAPI HTMLOptionElement_AddRef(IHTMLOptionElement *iface)
static HRESULT WINAPI HTMLOptionElement_put_selected(IHTMLOptionElement *iface, VARIANT_BOOL v)
static HRESULT WINAPI HTMLOptionElementFactory_GetTypeInfoCount(IHTMLOptionElementFactory *iface, UINT *pctinfo)
static HRESULT HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionElementFactory **ret_ptr)
static HRESULT WINAPI HTMLOptionElementFactory_QueryInterface(IHTMLOptionElementFactory *iface, REFIID riid, void **ppv)
static const NodeImplVtbl HTMLOptionElementImplVtbl
static HRESULT WINAPI HTMLOptionElement_get_selected(IHTMLOptionElement *iface, VARIANT_BOOL *p)
static HRESULT WINAPI HTMLOptionElementFactory_GetIDsOfNames(IHTMLOptionElementFactory *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI HTMLOptionElement_QueryInterface(IHTMLOptionElement *iface, REFIID riid, void **ppv)
static ULONG WINAPI HTMLOptionElementFactory_Release(IHTMLOptionElementFactory *iface)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
static const char * debugstr_variant(const VARIANT *var)
static HMODULE MODULEINFO DWORD cb
static IHTMLWindow2 * window
static UNICODE_STRING value_str
static VARIANTARG static DISPID
void release_dispex(DispatchEx *This)
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
static void node_release(HTMLDOMNode *node)
struct nsCycleCollectionTraversalCallback nsCycleCollectionTraversalCallback
#define NS_SUCCEEDED(res)
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
#define IsEqualGUID(rguid1, rguid2)
nsIDOMHTMLOptionElement * nsoption
IHTMLOptionElement IHTMLOptionElement_iface
#define CONTAINING_RECORD(address, type, field)
_In_ DWORD _Out_ _In_ WORD wFlags