From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlinput.c | 184 +++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/mshtml_private_iface.idl | 31 +++++ dlls/mshtml/tests/documentmode.js | 6 +- 4 files changed, 218 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 779085e4107..2231310ae2a 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -40,6 +40,8 @@ struct HTMLInputElement { IHTMLInputElement IHTMLInputElement_iface; IHTMLInputTextElement IHTMLInputTextElement_iface; IHTMLInputTextElement2 IHTMLInputTextElement2_iface; + IWineHTMLInputPrivate IWineHTMLInputPrivate_iface; + IWineHTMLParentFormPrivate IWineHTMLParentFormPrivate_iface;
nsIDOMHTMLInputElement *nsinput; }; @@ -1190,6 +1192,178 @@ static const IHTMLInputTextElement2Vtbl HTMLInputTextElement2Vtbl = { HTMLInputTextElement2_setSelectionRange };
+static inline HTMLInputElement *impl_from_IWineHTMLInputPrivateVtbl(IWineHTMLInputPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLInputElement, IWineHTMLInputPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLInputElement_private, IWineHTMLInputPrivate, + impl_from_IWineHTMLInputPrivateVtbl(iface)->element.node.event_target.dispex) + +static HRESULT WINAPI HTMLInputElement_private_put_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL v) +{ + HTMLInputElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_private_get_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_private_get_validationMessage(IWineHTMLInputPrivate *iface, BSTR *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_private_get_validity(IWineHTMLInputPrivate *iface, IDispatch **ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_private_get_willValidate(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_private_setCustomValidity(IWineHTMLInputPrivate *iface, VARIANT *message) +{ + HTMLInputElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(message)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_private_checkValidity(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLInputPrivateVtbl WineHTMLInputPrivateVtbl = { + HTMLInputElement_private_QueryInterface, + HTMLInputElement_private_AddRef, + HTMLInputElement_private_Release, + HTMLInputElement_private_GetTypeInfoCount, + HTMLInputElement_private_GetTypeInfo, + HTMLInputElement_private_GetIDsOfNames, + HTMLInputElement_private_Invoke, + HTMLInputElement_private_put_autofocus, + HTMLInputElement_private_get_autofocus, + HTMLInputElement_private_get_validationMessage, + HTMLInputElement_private_get_validity, + HTMLInputElement_private_get_willValidate, + HTMLInputElement_private_setCustomValidity, + HTMLInputElement_private_checkValidity +}; + +static inline HTMLInputElement *impl_from_IWineHTMLParentFormPrivateVtbl(IWineHTMLParentFormPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLInputElement, IWineHTMLParentFormPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLInputElement_form_private, IWineHTMLParentFormPrivate, + impl_from_IWineHTMLParentFormPrivateVtbl(iface)->element.node.event_target.dispex) + +static HRESULT WINAPI HTMLInputElement_form_private_put_formAction(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_get_formAction(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_put_formEnctype(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_get_formEnctype(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_put_formMethod(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_get_formMethod(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_put_formNoValidate(IWineHTMLParentFormPrivate *iface, VARIANT_BOOL v) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_get_formNoValidate(IWineHTMLParentFormPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_put_formTarget(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputElement_form_private_get_formTarget(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLInputElement *This = impl_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLParentFormPrivateVtbl WineHTMLParentFormPrivateVtbl = { + HTMLInputElement_form_private_QueryInterface, + HTMLInputElement_form_private_AddRef, + HTMLInputElement_form_private_Release, + HTMLInputElement_form_private_GetTypeInfoCount, + HTMLInputElement_form_private_GetTypeInfo, + HTMLInputElement_form_private_GetIDsOfNames, + HTMLInputElement_form_private_Invoke, + HTMLInputElement_form_private_put_formAction, + HTMLInputElement_form_private_get_formAction, + HTMLInputElement_form_private_put_formEnctype, + HTMLInputElement_form_private_get_formEnctype, + HTMLInputElement_form_private_put_formMethod, + HTMLInputElement_form_private_get_formMethod, + HTMLInputElement_form_private_put_formNoValidate, + HTMLInputElement_form_private_get_formNoValidate, + HTMLInputElement_form_private_put_formTarget, + HTMLInputElement_form_private_get_formTarget +}; + static inline HTMLInputElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLInputElement, element.node); @@ -1241,6 +1415,10 @@ static void *HTMLInputElement_query_interface(DispatchEx *dispex, REFIID riid) return &This->IHTMLInputTextElement_iface; if(IsEqualGUID(&IID_IHTMLInputTextElement2, riid)) return &This->IHTMLInputTextElement2_iface; + if(IsEqualGUID(&IID_IWineHTMLInputPrivate, riid)) + return &This->IWineHTMLInputPrivate_iface; + if(IsEqualGUID(&IID_IWineHTMLParentFormPrivate, riid)) + return &This->IWineHTMLParentFormPrivate_iface;
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid); } @@ -1288,6 +1466,10 @@ static void HTMLInputElement_init_dispex_info(dispex_data_t *info, compat_mode_t }; dispex_info_add_interface(info, IHTMLInputElement_tid, input_hooks); dispex_info_add_interface(info, IHTMLInputTextElement2_tid, inputtext_hooks); + if(mode >= COMPAT_MODE_IE10) { + dispex_info_add_interface(info, IWineHTMLInputPrivate_tid, NULL); + dispex_info_add_interface(info, IWineHTMLParentFormPrivate_tid, NULL); + }
HTMLElement_init_dispex_info(info, mode); } @@ -1324,6 +1506,8 @@ HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HT ret->IHTMLInputElement_iface.lpVtbl = &HTMLInputElementVtbl; ret->IHTMLInputTextElement_iface.lpVtbl = &HTMLInputTextElementVtbl; ret->IHTMLInputTextElement2_iface.lpVtbl = &HTMLInputTextElement2Vtbl; + ret->IWineHTMLInputPrivate_iface.lpVtbl = &WineHTMLInputPrivateVtbl; + ret->IWineHTMLParentFormPrivate_iface.lpVtbl = &WineHTMLParentFormPrivateVtbl; ret->element.node.vtbl = &HTMLInputElementImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLInputElement_dispex); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 2f59e0dca5d..b5a90494424 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -313,6 +313,7 @@ struct constructor; XIID(IWineHTMLElementPrivate) \ XIID(IWineHTMLInputPrivate) \ XIID(IWineHTMLFormPrivate) \ + XIID(IWineHTMLParentFormPrivate) \ XIID(IWineHTMLWindowPrivate) \ XIID(IWineHTMLWindowCompatPrivate) \ XIID(IWineCSSProperties) \ diff --git a/dlls/mshtml/mshtml_private_iface.idl b/dlls/mshtml/mshtml_private_iface.idl index f0c13b50233..2dbf96a3428 100644 --- a/dlls/mshtml/mshtml_private_iface.idl +++ b/dlls/mshtml/mshtml_private_iface.idl @@ -226,6 +226,37 @@ interface IWineHTMLFormPrivate : IDispatch HRESULT checkValidity([retval, out] VARIANT_BOOL *ret); }
+[ + odl, + oleautomation, + dual, + hidden, + uuid(653c4bd0-1c68-5263-f82d-c2343ae7cd44) +] +interface IWineHTMLParentFormPrivate : IDispatch +{ + [propput, id(60)] + HRESULT formAction([in] BSTR v); + [propget, id(60)] + HRESULT formAction([retval, out] BSTR *ret); + [propput, id(61)] + HRESULT formEnctype([in] BSTR v); + [propget, id(61)] + HRESULT formEnctype([retval, out] BSTR *ret); + [propput, id(62)] + HRESULT formMethod([in] BSTR v); + [propget, id(62)] + HRESULT formMethod([retval, out] BSTR *ret); + [propput, id(63)] + HRESULT formNoValidate([in] VARIANT_BOOL v); + [propget, id(63)] + HRESULT formNoValidate([retval, out] VARIANT_BOOL *ret); + [propput, id(64)] + HRESULT formTarget([in] BSTR v); + [propget, id(64)] + HRESULT formTarget([retval, out] BSTR *ret); +} + const long DISPID_IWINEHTMLINPUTPRIVATE_AUTOFOCUS = 50; [ odl, diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index b4ad5dd39bd..56148a8cc87 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4361,10 +4361,8 @@ sync_test("prototype props", function() { "size", "src", "start", "status", ["step",10], ["stepDown",10], ["stepUp",10], "type", "useMap", ["validationMessage",10], ["validity",10], "value", ["valueAsNumber",10], "vrml", "vspace", "width", ["willValidate",10] ], [ - "accept", ["autocomplete",10], ["autofocus",10], ["checkValidity",10], ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], ["files",10], ["formAction",10], - ["formEnctype",10], ["formMethod",10], ["formNoValidate",10], ["formTarget",10], ["list",10], ["max",10], ["min",10], ["multiple",10], ["pattern",10], - ["placeholder",10], ["readyState",11], ["required",10], ["setCustomValidity",10], ["step",10], ["stepDown",10], ["stepUp",10], "useMap", ["validationMessage",10], - ["validity",10], ["valueAsNumber",10], ["willValidate",10] + "accept", ["autocomplete",10], ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], ["files",10],["list",10], ["max",10], ["min",10], ["multiple",10], + ["pattern",10], ["placeholder",10], ["readyState",11], ["required",10], ["step",10], ["stepDown",10], ["stepUp",10], "useMap", ["valueAsNumber",10] ]); check(HTMLLabelElement, [ ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "form", "htmlFor" ], [ ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "form" ]); check(HTMLLinkElement, [ "charset", "href", "hreflang", "media", "rel", "rev", "sheet", ["styleSheet",9,10], "target", "type" ],