From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlselect.c | 80 +++++++++++++++++++++++++++++++ dlls/mshtml/tests/documentmode.js | 5 +- 2 files changed, 81 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index a5b0f7a0297..789cae43fdf 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -525,6 +525,7 @@ struct HTMLSelectElement { HTMLElement element;
IHTMLSelectElement IHTMLSelectElement_iface; + IWineHTMLInputPrivate IWineHTMLInputPrivate_iface;
nsIDOMHTMLSelectElement *nsselect; }; @@ -986,6 +987,80 @@ static const IHTMLSelectElementVtbl HTMLSelectElementVtbl = { HTMLSelectElement_tags };
+static inline HTMLSelectElement *impl_from_IWineHTMLInputPrivateVtbl(IWineHTMLInputPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLSelectElement, IWineHTMLInputPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLSelectElement_input_private, IWineHTMLInputPrivate, + impl_from_IWineHTMLInputPrivateVtbl(iface)->element.node.event_target.dispex) + +static HRESULT WINAPI HTMLSelectElement_input_private_put_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL v) +{ + HTMLSelectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLSelectElement_input_private_get_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLSelectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLSelectElement_input_private_get_validationMessage(IWineHTMLInputPrivate *iface, BSTR *ret) +{ + HTMLSelectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLSelectElement_input_private_get_validity(IWineHTMLInputPrivate *iface, IDispatch **ret) +{ + HTMLSelectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLSelectElement_input_private_get_willValidate(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLSelectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLSelectElement_input_private_setCustomValidity(IWineHTMLInputPrivate *iface, VARIANT *message) +{ + HTMLSelectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(message)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLSelectElement_input_private_checkValidity(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLSelectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLInputPrivateVtbl WineHTMLInputPrivateVtbl = { + HTMLSelectElement_input_private_QueryInterface, + HTMLSelectElement_input_private_AddRef, + HTMLSelectElement_input_private_Release, + HTMLSelectElement_input_private_GetTypeInfoCount, + HTMLSelectElement_input_private_GetTypeInfo, + HTMLSelectElement_input_private_GetIDsOfNames, + HTMLSelectElement_input_private_Invoke, + HTMLSelectElement_input_private_put_autofocus, + HTMLSelectElement_input_private_get_autofocus, + HTMLSelectElement_input_private_get_validationMessage, + HTMLSelectElement_input_private_get_validity, + HTMLSelectElement_input_private_get_willValidate, + HTMLSelectElement_input_private_setCustomValidity, + HTMLSelectElement_input_private_checkValidity +}; + static inline HTMLSelectElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLSelectElement, element.node); @@ -1014,6 +1089,8 @@ static void *HTMLSelectElement_query_interface(DispatchEx *dispex, REFIID riid)
if(IsEqualGUID(&IID_IHTMLSelectElement, riid)) return &This->IHTMLSelectElement_iface; + if(IsEqualGUID(&IID_IWineHTMLInputPrivate, riid)) + return &This->IWineHTMLInputPrivate_iface;
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid); } @@ -1127,6 +1204,8 @@ static void HTMLSelectElement_init_dispex_info(dispex_data_t *info, compat_mode_ {DISPID_UNKNOWN} }; dispex_info_add_interface(info, IHTMLSelectElement_tid, select_hooks); + if(mode >= COMPAT_MODE_IE10) + dispex_info_add_interface(info, IWineHTMLInputPrivate_tid, NULL);
HTMLElement_init_dispex_info(info, mode); } @@ -1166,6 +1245,7 @@ HRESULT HTMLSelectElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, H return E_OUTOFMEMORY;
ret->IHTMLSelectElement_iface.lpVtbl = &HTMLSelectElementVtbl; + ret->IWineHTMLInputPrivate_iface.lpVtbl = &WineHTMLInputPrivateVtbl; ret->element.node.vtbl = &HTMLSelectElementImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLSelectElement_dispex); diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 388842aa2cc..70fdeb3411c 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4380,10 +4380,7 @@ sync_test("prototype props", function() { "add", ["autofocus",10], ["checkValidity",10], ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "form", "item", "length", "multiple", "name", "namedItem", "options", "remove", ["required",10], "selectedIndex", ["setCustomValidity",10], "size", "tags", "type", "urns", ["validationMessage",10], ["validity",10], "value", ["willValidate",10] - ], [ - ["autofocus",10], ["checkValidity",10], ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "namedItem", ["required",10], - ["setCustomValidity",10], "urns", ["validationMessage",10], ["validity",10], ["willValidate",10] - ]); + ], [ ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "namedItem", ["required",10], "urns" ]); check(HTMLStyleElement, [ "media", "sheet", ["styleSheet",9,10], "type" ], [ ["onreadystatechange",11] ]); check(HTMLTableCellElement, [ "abbr", "align", "axis", "background", "bgColor", "borderColor", "borderColorDark", "borderColorLight",