 
            -- v2: mshtml: Implement enctype for HTMLFormElement. mshtml: Implement checkValidity for HTMLInputElement. mshtml: Add private stub interfaces for validating text area elements. mshtml: Add private stub interfaces for validating select elements. mshtml: Add private stub interfaces for validating object elements. mshtml: Add private stub interfaces for validating button elements. mshtml: Add private stub interfaces for validating input elements. mshtml: Add private stub interfaces for validating form elements.
 
            From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlform.c | 70 ++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/mshtml_private_iface.idl | 49 +++++++++++++++++++ dlls/mshtml/tests/documentmode.js | 2 +- 4 files changed, 122 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c index c28423dec5d..d6ccce56d41 100644 --- a/dlls/mshtml/htmlform.c +++ b/dlls/mshtml/htmlform.c @@ -38,6 +38,7 @@ struct HTMLFormElement { HTMLElement element;
IHTMLFormElement IHTMLFormElement_iface; + IWineHTMLFormPrivate IWineHTMLFormPrivate_iface;
nsIDOMHTMLFormElement *nsform; }; @@ -567,6 +568,64 @@ static const IHTMLFormElementVtbl HTMLFormElementVtbl = { HTMLFormElement_tags };
+static inline HTMLFormElement *impl_from_IWineHTMLFormPrivateVtbl(IWineHTMLFormPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLFormElement, IWineHTMLFormPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLFormElement_private, IWineHTMLFormPrivate, + impl_from_IWineHTMLFormPrivateVtbl(iface)->element.node.event_target.dispex) + +static HRESULT WINAPI HTMLFormElement_private_put_enctype(IWineHTMLFormPrivate *iface, BSTR v) +{ + HTMLFormElement *This = impl_from_IWineHTMLFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLFormElement_private_get_enctype(IWineHTMLFormPrivate *iface, BSTR *ret) +{ + HTMLFormElement *This = impl_from_IWineHTMLFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLFormElement_private_put_noValidate(IWineHTMLFormPrivate *iface, VARIANT_BOOL v) +{ + HTMLFormElement *This = impl_from_IWineHTMLFormPrivateVtbl(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLFormElement_private_get_noValidate(IWineHTMLFormPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLFormElement *This = impl_from_IWineHTMLFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLFormElement_private_checkValidity(IWineHTMLFormPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLFormElement *This = impl_from_IWineHTMLFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLFormPrivateVtbl WineHTMLFormPrivateVtbl = { + HTMLFormElement_private_QueryInterface, + HTMLFormElement_private_AddRef, + HTMLFormElement_private_Release, + HTMLFormElement_private_GetTypeInfoCount, + HTMLFormElement_private_GetTypeInfo, + HTMLFormElement_private_GetIDsOfNames, + HTMLFormElement_private_Invoke, + HTMLFormElement_private_put_enctype, + HTMLFormElement_private_get_enctype, + HTMLFormElement_private_put_noValidate, + HTMLFormElement_private_get_noValidate, + HTMLFormElement_private_checkValidity, +}; + static inline HTMLFormElement *impl_from_DispatchEx(DispatchEx *iface) { return CONTAINING_RECORD(iface, HTMLFormElement, element.node.event_target.dispex); @@ -580,6 +639,8 @@ static void *HTMLFormElement_query_interface(DispatchEx *dispex, REFIID riid) return &This->IHTMLFormElement_iface; if(IsEqualGUID(&DIID_DispHTMLFormElement, riid)) return &This->IHTMLFormElement_iface; + if(IsEqualGUID(&IID_IWineHTMLFormPrivate, riid)) + return &This->IWineHTMLFormPrivate_iface;
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid); } @@ -765,7 +826,15 @@ static void HTMLFormElement_init_dispex_info(dispex_data_t *info, compat_mode_t {DISPID_COLLECTION, .noattr = TRUE}, {DISPID_UNKNOWN} }; + static const dispex_hook_t private_ie9_hooks[] = { + {DISPID_IWINEHTMLFORMPRIVATE_NOVALIDATE}, + {DISPID_IWINEHTMLFORMPRIVATE_CHECKVALIDITY}, + {DISPID_UNKNOWN} + }; + dispex_info_add_interface(info, IHTMLFormElement_tid, hooks); + if(mode >= COMPAT_MODE_IE9) + dispex_info_add_interface(info, IWineHTMLFormPrivate_tid, mode < COMPAT_MODE_IE10 ? private_ie9_hooks : NULL);
HTMLElement_init_dispex_info(info, mode); } @@ -805,6 +874,7 @@ HRESULT HTMLFormElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTM return E_OUTOFMEMORY;
ret->IHTMLFormElement_iface.lpVtbl = &HTMLFormElementVtbl; + ret->IWineHTMLFormPrivate_iface.lpVtbl = &WineHTMLFormPrivateVtbl; ret->element.node.vtbl = &HTMLFormElementImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLFormElement_dispex); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index e0b8a693757..2f59e0dca5d 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -311,6 +311,8 @@ struct constructor; XIID(IWineHTMLCharacterData) \ XIID(IWineHTMLDOMNodePrivate) \ XIID(IWineHTMLElementPrivate) \ + XIID(IWineHTMLInputPrivate) \ + XIID(IWineHTMLFormPrivate) \ XIID(IWineHTMLWindowPrivate) \ XIID(IWineHTMLWindowCompatPrivate) \ XIID(IWineCSSProperties) \ diff --git a/dlls/mshtml/mshtml_private_iface.idl b/dlls/mshtml/mshtml_private_iface.idl index 5214315c743..f0c13b50233 100644 --- a/dlls/mshtml/mshtml_private_iface.idl +++ b/dlls/mshtml/mshtml_private_iface.idl @@ -203,6 +203,55 @@ interface IWineHTMLElementPrivate : IDispatch HRESULT classList([retval, out] IDispatch **class_list); }
+const long DISPID_IWINEHTMLFORMPRIVATE_NOVALIDATE = 51; +const long DISPID_IWINEHTMLFORMPRIVATE_CHECKVALIDITY = 52; +[ + odl, + oleautomation, + dual, + hidden, + uuid(8a11c39f-12e3-dcc3-14ec-479ba0bddac1) +] +interface IWineHTMLFormPrivate : IDispatch +{ + [propput, id(50)] + HRESULT enctype([in] BSTR v); + [propget, id(50)] + HRESULT enctype([retval, out] BSTR *ret); + [propput, id(DISPID_IWINEHTMLFORMPRIVATE_NOVALIDATE)] + HRESULT noValidate([in] VARIANT_BOOL v); + [propget, id(DISPID_IWINEHTMLFORMPRIVATE_NOVALIDATE)] + HRESULT noValidate([retval, out] VARIANT_BOOL *ret); + [id(DISPID_IWINEHTMLFORMPRIVATE_CHECKVALIDITY)] + HRESULT checkValidity([retval, out] VARIANT_BOOL *ret); +} + +const long DISPID_IWINEHTMLINPUTPRIVATE_AUTOFOCUS = 50; +[ + odl, + oleautomation, + dual, + hidden, + uuid(f356f6d2-f210-4f54-24c7-3f88fa3c20fc) +] +interface IWineHTMLInputPrivate : IDispatch +{ + [propput, id(DISPID_IWINEHTMLINPUTPRIVATE_AUTOFOCUS)] + HRESULT autofocus([in] VARIANT_BOOL v); + [propget, id(DISPID_IWINEHTMLINPUTPRIVATE_AUTOFOCUS)] + HRESULT autofocus([retval, out] VARIANT_BOOL *ret); + [propget, id(51)] + HRESULT validationMessage([retval, out] BSTR *ret); + [propget, id(52)] + HRESULT validity([retval, out] IDispatch **ret); + [propget, id(53)] + HRESULT willValidate([retval, out] VARIANT_BOOL *ret); + [id(54)] + HRESULT setCustomValidity([in] VARIANT *message); + [id(55)] + HRESULT checkValidity([retval, out] VARIANT_BOOL *ret); +} + [ odl, oleautomation, diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index acee34c8bc1..b4ad5dd39bd 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4326,7 +4326,7 @@ sync_test("prototype props", function() { check(HTMLFormElement, [ "acceptCharset", "action", ["autocomplete",10], ["checkValidity",10], "elements", "encoding", "enctype", "item", "length", "method", "name", "namedItem", ["noValidate",10], "reset", "submit", "tags", "target", "urns" - ], [ "_newEnum", "acceptCharset", ["autocomplete",10], ["checkValidity",10], "enctype", "namedItem", ["noValidate",10], "urns" ]); + ], [ "_newEnum", "acceptCharset", ["autocomplete",10], "namedItem", "urns" ]); check(HTMLFrameElement, [ "border", "borderColor", "contentDocument", "contentWindow", ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "frameBorder", "frameSpacing", "getSVGDocument", "height", "longDesc", "marginHeight", "marginWidth", "name", "noResize", "onload", "scrolling", "security", "src", "width"
 
            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" ],
 
            From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlinput.c | 184 ++++++++++++++++++++++++++++++ dlls/mshtml/tests/documentmode.js | 6 +- 2 files changed, 185 insertions(+), 5 deletions(-)
diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 2231310ae2a..117e8008690 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1664,6 +1664,8 @@ struct HTMLButtonElement { HTMLElement element;
IHTMLButtonElement IHTMLButtonElement_iface; + IWineHTMLInputPrivate IWineHTMLInputPrivate_iface; + IWineHTMLParentFormPrivate IWineHTMLParentFormPrivate_iface;
nsIDOMHTMLButtonElement *nsbutton; }; @@ -1841,6 +1843,178 @@ static const IHTMLButtonElementVtbl HTMLButtonElementVtbl = { HTMLButtonElement_createTextRange };
+static inline HTMLButtonElement *button_from_IWineHTMLInputPrivateVtbl(IWineHTMLInputPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLButtonElement, IWineHTMLInputPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLButtonElement_private, IWineHTMLInputPrivate, + button_from_IWineHTMLInputPrivateVtbl(iface)->element.node.event_target.dispex) + +static HRESULT WINAPI HTMLButtonElement_private_put_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL v) +{ + HTMLButtonElement *This = button_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_private_get_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_private_get_validationMessage(IWineHTMLInputPrivate *iface, BSTR *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_private_get_validity(IWineHTMLInputPrivate *iface, IDispatch **ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_private_get_willValidate(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_private_setCustomValidity(IWineHTMLInputPrivate *iface, VARIANT *message) +{ + HTMLButtonElement *This = button_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(message)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_private_checkValidity(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLInputPrivateVtbl WineHTMLButtonInputPrivateVtbl = { + HTMLButtonElement_private_QueryInterface, + HTMLButtonElement_private_AddRef, + HTMLButtonElement_private_Release, + HTMLButtonElement_private_GetTypeInfoCount, + HTMLButtonElement_private_GetTypeInfo, + HTMLButtonElement_private_GetIDsOfNames, + HTMLButtonElement_private_Invoke, + HTMLButtonElement_private_put_autofocus, + HTMLButtonElement_private_get_autofocus, + HTMLButtonElement_private_get_validationMessage, + HTMLButtonElement_private_get_validity, + HTMLButtonElement_private_get_willValidate, + HTMLButtonElement_private_setCustomValidity, + HTMLButtonElement_private_checkValidity +}; + +static inline HTMLButtonElement *button_from_IWineHTMLParentFormPrivateVtbl(IWineHTMLParentFormPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLButtonElement, IWineHTMLParentFormPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLButtonElement_form_private, IWineHTMLParentFormPrivate, + button_from_IWineHTMLParentFormPrivateVtbl(iface)->element.node.event_target.dispex) + +static HRESULT WINAPI HTMLButtonElement_form_private_put_formAction(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_get_formAction(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_put_formEnctype(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_get_formEnctype(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_put_formMethod(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_get_formMethod(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_put_formNoValidate(IWineHTMLParentFormPrivate *iface, VARIANT_BOOL v) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_get_formNoValidate(IWineHTMLParentFormPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_put_formTarget(IWineHTMLParentFormPrivate *iface, BSTR v) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLButtonElement_form_private_get_formTarget(IWineHTMLParentFormPrivate *iface, BSTR *ret) +{ + HTMLButtonElement *This = button_from_IWineHTMLParentFormPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLParentFormPrivateVtbl WineHTMLButtonParentFormPrivateVtbl = { + HTMLButtonElement_form_private_QueryInterface, + HTMLButtonElement_form_private_AddRef, + HTMLButtonElement_form_private_Release, + HTMLButtonElement_form_private_GetTypeInfoCount, + HTMLButtonElement_form_private_GetTypeInfo, + HTMLButtonElement_form_private_GetIDsOfNames, + HTMLButtonElement_form_private_Invoke, + HTMLButtonElement_form_private_put_formAction, + HTMLButtonElement_form_private_get_formAction, + HTMLButtonElement_form_private_put_formEnctype, + HTMLButtonElement_form_private_get_formEnctype, + HTMLButtonElement_form_private_put_formMethod, + HTMLButtonElement_form_private_get_formMethod, + HTMLButtonElement_form_private_put_formNoValidate, + HTMLButtonElement_form_private_get_formNoValidate, + HTMLButtonElement_form_private_put_formTarget, + HTMLButtonElement_form_private_get_formTarget +}; + static inline HTMLButtonElement *button_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLButtonElement, element.node); @@ -1874,6 +2048,10 @@ static void *HTMLButtonElement_query_interface(DispatchEx *dispex, REFIID riid)
if(IsEqualGUID(&IID_IHTMLButtonElement, riid)) return &This->IHTMLButtonElement_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); } @@ -1913,6 +2091,10 @@ static void HTMLButtonElement_init_dispex_info(dispex_data_t *info, compat_mode_ {DISPID_UNKNOWN} }; dispex_info_add_interface(info, IHTMLButtonElement_tid, button_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); } @@ -1947,6 +2129,8 @@ HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, H return E_OUTOFMEMORY;
ret->IHTMLButtonElement_iface.lpVtbl = &HTMLButtonElementVtbl; + ret->IWineHTMLInputPrivate_iface.lpVtbl = &WineHTMLButtonInputPrivateVtbl; + ret->IWineHTMLParentFormPrivate_iface.lpVtbl = &WineHTMLButtonParentFormPrivateVtbl; ret->element.node.vtbl = &HTMLButtonElementImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLButtonElement_dispex); diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 56148a8cc87..46c2aa8a6eb 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4288,11 +4288,7 @@ sync_test("prototype props", function() { ["autofocus",10], ["checkValidity",10], "createTextRange", ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "form", ["formAction",10], ["formEnctype",10], ["formMethod",10], ["formNoValidate",10], ["formTarget",10], "name", ["setCustomValidity",10], "status", "type", ["validationMessage",10], ["validity",10], "value", ["willValidate",10] - ], [ - ["autofocus",10], ["checkValidity",10], ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], ["formAction",10], - ["formEnctype",10], ["formMethod",10], ["formNoValidate",10], ["formTarget",10], ["setCustomValidity",10], - ["validationMessage",10], ["validity",10], ["willValidate",10] - ]); + ], [ ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10] ]); if(v >= 11) check(HTMLDocument, []); check(HTMLElement, [
 
            From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlobject.c | 85 +++++++++++++++++++++++++++++++ dlls/mshtml/tests/documentmode.js | 5 +- 2 files changed, 87 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index aedbdefb00b..5241305ae93 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -40,6 +40,7 @@ struct HTMLObjectElement {
IHTMLObjectElement IHTMLObjectElement_iface; IHTMLObjectElement2 IHTMLObjectElement2_iface; + IWineHTMLInputPrivate IWineHTMLInputPrivate_iface;
nsIDOMHTMLObjectElement *nsobject; }; @@ -580,6 +581,80 @@ ULONG WINAPI wrapper_Release(IUnknown *iface) return ref; }
+static inline HTMLObjectElement *impl_from_IWineHTMLInputPrivateVtbl(IWineHTMLInputPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLObjectElement, IWineHTMLInputPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLObjectElement_input_private, IWineHTMLInputPrivate, + impl_from_IWineHTMLInputPrivateVtbl(iface)->plugin_container.element.node.event_target.dispex) + +static HRESULT WINAPI HTMLObjectElement_input_private_put_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL v) +{ + HTMLObjectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + WARN("(%p)->(%x)\n", This, v); + return E_UNEXPECTED; +} + +static HRESULT WINAPI HTMLObjectElement_input_private_get_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLObjectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + WARN("(%p)->(%p)\n", This, ret); + return E_UNEXPECTED; +} + +static HRESULT WINAPI HTMLObjectElement_input_private_get_validationMessage(IWineHTMLInputPrivate *iface, BSTR *ret) +{ + HTMLObjectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLObjectElement_input_private_get_validity(IWineHTMLInputPrivate *iface, IDispatch **ret) +{ + HTMLObjectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLObjectElement_input_private_get_willValidate(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLObjectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLObjectElement_input_private_setCustomValidity(IWineHTMLInputPrivate *iface, VARIANT *message) +{ + HTMLObjectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(message)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLObjectElement_input_private_checkValidity(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLObjectElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLInputPrivateVtbl WineHTMLInputPrivateVtbl = { + HTMLObjectElement_input_private_QueryInterface, + HTMLObjectElement_input_private_AddRef, + HTMLObjectElement_input_private_Release, + HTMLObjectElement_input_private_GetTypeInfoCount, + HTMLObjectElement_input_private_GetTypeInfo, + HTMLObjectElement_input_private_GetIDsOfNames, + HTMLObjectElement_input_private_Invoke, + HTMLObjectElement_input_private_put_autofocus, + HTMLObjectElement_input_private_get_autofocus, + HTMLObjectElement_input_private_get_validationMessage, + HTMLObjectElement_input_private_get_validity, + HTMLObjectElement_input_private_get_willValidate, + HTMLObjectElement_input_private_setCustomValidity, + HTMLObjectElement_input_private_checkValidity +}; + static inline HTMLObjectElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLObjectElement, plugin_container.element.node); @@ -606,6 +681,8 @@ static void *HTMLObjectElement_query_interface(DispatchEx *dispex, REFIID riid) return &This->IHTMLObjectElement_iface; if(IsEqualGUID(&IID_IHTMLObjectElement2, riid)) return &This->IHTMLObjectElement2_iface; + if(IsEqualGUID(&IID_IWineHTMLInputPrivate, riid)) + return &This->IWineHTMLInputPrivate_iface; if(IsEqualGUID(&IID_HTMLPluginContainer, riid)) { /* Special pseudo-interface returning HTMLPluginContainer struct. */ return &This->plugin_container; @@ -671,8 +748,15 @@ static void HTMLObjectElement_init_dispex_info(dispex_data_t *info, compat_mode_ {DISPID_IHTMLOBJECTELEMENT_ALTHTML, .noattr = TRUE}, {DISPID_UNKNOWN} }; + static const dispex_hook_t private_hooks[] = { + {DISPID_IWINEHTMLINPUTPRIVATE_AUTOFOCUS}, + {DISPID_UNKNOWN} + }; + dispex_info_add_interface(info, IHTMLObjectElement2_tid, NULL); dispex_info_add_interface(info, IHTMLObjectElement_tid, hooks); + if(mode >= COMPAT_MODE_IE10) + dispex_info_add_interface(info, IWineHTMLInputPrivate_tid, private_hooks);
HTMLElement_init_dispex_info(info, mode); } @@ -711,6 +795,7 @@ HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, H
ret->IHTMLObjectElement_iface.lpVtbl = &HTMLObjectElementVtbl; ret->IHTMLObjectElement2_iface.lpVtbl = &HTMLObjectElement2Vtbl; + ret->IWineHTMLInputPrivate_iface.lpVtbl = &WineHTMLInputPrivateVtbl; ret->plugin_container.element.node.vtbl = &HTMLObjectElementImplVtbl;
HTMLElement_Init(&ret->plugin_container.element, doc, nselem, &HTMLObjectElement_dispex); diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 46c2aa8a6eb..388842aa2cc 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4370,9 +4370,8 @@ sync_test("prototype props", function() { ["msPlayToPreferredSourceUri",11], ["msPlayToPrimary",11], "name", "namedRecordset", "object", ["readyState",11], "recordset", ["setCustomValidity",10], "standby", "type", "useMap", ["validationMessage",10], ["validity",10], "vspace", "width", ["willValidate",10] ], [ - "alt", "archive", "border", ["checkValidity",10], "contentDocument", ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "declare", "getSVGDocument", - ["msPlayToDisabled",11], ["msPlayToPreferredSourceUri",11], ["msPlayToPrimary",11], ["onreadystatechange",11], ["readyState",11], ["setCustomValidity",10], - "standby", "useMap", ["validationMessage",10], ["validity",10], ["willValidate",10] + "alt", "archive", "border", "contentDocument", ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "declare", "getSVGDocument", ["msPlayToDisabled",11], + ["msPlayToPreferredSourceUri",11], ["msPlayToPrimary",11], ["onreadystatechange",11], ["readyState",11], "standby", "useMap" ]); check(HTMLOptionElement, [ ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "defaultSelected", "form", "index", "label", "selected", "text", "value" ], [ ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], "label" ]);
 
            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",
 
            From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmltextarea.c | 80 +++++++++++++++++++++++++++++++ dlls/mshtml/tests/documentmode.js | 4 +- 2 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c index 3eb714b7b08..a2cc8ec1826 100644 --- a/dlls/mshtml/htmltextarea.c +++ b/dlls/mshtml/htmltextarea.c @@ -37,6 +37,7 @@ struct HTMLTextAreaElement { HTMLElement element;
IHTMLTextAreaElement IHTMLTextAreaElement_iface; + IWineHTMLInputPrivate IWineHTMLInputPrivate_iface;
nsIDOMHTMLTextAreaElement *nstextarea; }; @@ -335,6 +336,80 @@ static const IHTMLTextAreaElementVtbl HTMLTextAreaElementVtbl = { HTMLTextAreaElement_createTextRange };
+static inline HTMLTextAreaElement *impl_from_IWineHTMLInputPrivateVtbl(IWineHTMLInputPrivate *iface) +{ + return CONTAINING_RECORD(iface, HTMLTextAreaElement, IWineHTMLInputPrivate_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLTextAreaElement_input_private, IWineHTMLInputPrivate, + impl_from_IWineHTMLInputPrivateVtbl(iface)->element.node.event_target.dispex) + +static HRESULT WINAPI HTMLTextAreaElement_input_private_put_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL v) +{ + HTMLTextAreaElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLTextAreaElement_input_private_get_autofocus(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLTextAreaElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLTextAreaElement_input_private_get_validationMessage(IWineHTMLInputPrivate *iface, BSTR *ret) +{ + HTMLTextAreaElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLTextAreaElement_input_private_get_validity(IWineHTMLInputPrivate *iface, IDispatch **ret) +{ + HTMLTextAreaElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLTextAreaElement_input_private_get_willValidate(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLTextAreaElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLTextAreaElement_input_private_setCustomValidity(IWineHTMLInputPrivate *iface, VARIANT *message) +{ + HTMLTextAreaElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(message)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLTextAreaElement_input_private_checkValidity(IWineHTMLInputPrivate *iface, VARIANT_BOOL *ret) +{ + HTMLTextAreaElement *This = impl_from_IWineHTMLInputPrivateVtbl(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static const IWineHTMLInputPrivateVtbl WineHTMLInputPrivateVtbl = { + HTMLTextAreaElement_input_private_QueryInterface, + HTMLTextAreaElement_input_private_AddRef, + HTMLTextAreaElement_input_private_Release, + HTMLTextAreaElement_input_private_GetTypeInfoCount, + HTMLTextAreaElement_input_private_GetTypeInfo, + HTMLTextAreaElement_input_private_GetIDsOfNames, + HTMLTextAreaElement_input_private_Invoke, + HTMLTextAreaElement_input_private_put_autofocus, + HTMLTextAreaElement_input_private_get_autofocus, + HTMLTextAreaElement_input_private_get_validationMessage, + HTMLTextAreaElement_input_private_get_validity, + HTMLTextAreaElement_input_private_get_willValidate, + HTMLTextAreaElement_input_private_setCustomValidity, + HTMLTextAreaElement_input_private_checkValidity +}; + static inline HTMLTextAreaElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLTextAreaElement, element.node); @@ -368,6 +443,8 @@ static void *HTMLTextAreaElement_query_interface(DispatchEx *dispex, REFIID riid
if(IsEqualGUID(&IID_IHTMLTextAreaElement, riid)) return &This->IHTMLTextAreaElement_iface; + if(IsEqualGUID(&IID_IWineHTMLInputPrivate, riid)) + return &This->IWineHTMLInputPrivate_iface;
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid); } @@ -408,6 +485,8 @@ static void HTMLTextAreaElement_init_dispex_info(dispex_data_t *info, compat_mod {DISPID_UNKNOWN} }; dispex_info_add_interface(info, IHTMLTextAreaElement_tid, hooks); + if(mode >= COMPAT_MODE_IE10) + dispex_info_add_interface(info, IWineHTMLInputPrivate_tid, NULL);
HTMLElement_init_dispex_info(info, mode); } @@ -442,6 +521,7 @@ HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, return E_OUTOFMEMORY;
ret->IHTMLTextAreaElement_iface.lpVtbl = &HTMLTextAreaElementVtbl; + ret->IWineHTMLInputPrivate_iface.lpVtbl = &WineHTMLInputPrivateVtbl; ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex); diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 70fdeb3411c..6cacb0f2303 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4405,8 +4405,8 @@ sync_test("prototype props", function() { ["maxLength",10], "name", ["placeholder",10], "readOnly", ["required",10], "rows", "select", "selectionEnd", "selectionStart", ["setCustomValidity",10], "setSelectionRange", "status", "type", ["validationMessage",10], ["validity",10], "value", ["willValidate",10], "wrap" ], [ - ["autofocus",10], ["checkValidity",10], ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], ["maxLength",10], ["placeholder",10], ["required",10], - "selectionEnd", "selectionStart", ["setCustomValidity",10], "setSelectionRange", ["validationMessage",10], ["validity",10], ["willValidate",10] + ["dataFld",9,10], ["dataFormatAs",9,10], ["dataSrc",9,10], ["maxLength",10], ["placeholder",10], ["required",10], "selectionEnd", "selectionStart", + "setSelectionRange" ]); check(HTMLTitleElement, [ "text" ]); check(HTMLUnknownElement, [ "namedRecordset", "recordset" ]);
 
            From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlevent.c | 2 ++ dlls/mshtml/htmlevent.h | 1 + dlls/mshtml/htmlinput.c | 13 +++++++++++-- dlls/mshtml/nsiface.idl | 20 +++++++++++++++++++- dlls/mshtml/tests/es5.js | 23 +++++++++++++++++++++++ 5 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 3d6df5e2b44..cb5c1127bd2 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -161,6 +161,8 @@ static const event_info_t event_info[] = { EVENT_BUBBLES | EVENT_CANCELABLE}, {L"input", EVENT_TYPE_EVENT, DISPID_UNKNOWN, EVENT_DEFAULTLISTENER | EVENT_BUBBLES}, + {L"invalid", EVENT_TYPE_EVENT, DISPID_EVPROP_INVALID, + EVENT_BIND_TO_TARGET | EVENT_CANCELABLE}, {L"keydown", EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYDOWN, EVENT_DEFAULTLISTENER | EVENT_HASDEFAULTHANDLERS | EVENT_BUBBLES | EVENT_CANCELABLE }, {L"keypress", EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYPRESS, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index 6dec8cf9a9a..3f4e11690f8 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -40,6 +40,7 @@ typedef enum { EVENTID_FOCUSOUT, EVENTID_HELP, EVENTID_INPUT, + EVENTID_INVALID, EVENTID_KEYDOWN, EVENTID_KEYPRESS, EVENTID_KEYUP, diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 117e8008690..3f3894fda80 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1245,8 +1245,17 @@ static HRESULT WINAPI HTMLInputElement_private_setCustomValidity(IWineHTMLInputP 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; + nsresult nsres; + cpp_bool b; + + TRACE("(%p)->(%p)\n", This, ret); + + nsres = nsIDOMHTMLInputElement_CheckValidity(This->nsinput, &b); + if(NS_FAILED(nsres)) + return map_nsresult(nsres); + + *ret = variant_bool(b); + return S_OK; }
static const IWineHTMLInputPrivateVtbl WineHTMLInputPrivateVtbl = { diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 1f2131dfb24..dd4aeba27df 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -161,7 +161,6 @@ typedef nsISupports nsITransferable; typedef nsISupports nsIDOMFileList; typedef nsISupports nsIDOMFile; typedef nsISupports nsIControllers; -typedef nsISupports nsIDOMValidityState; typedef nsISupports nsIPluginInstanceOwner; typedef nsISupports nsIPluginStreamListener; typedef nsISupports nsIPluginTag; @@ -976,6 +975,25 @@ interface nsIDOMMozNamedAttrMap : nsISupports nsresult RemoveNamedItemNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMAttr **_retval); }
+[ + object, + uuid(00bed276-f1f7-492f-a039-dbd9b9efc10b), + local +] +interface nsIDOMValidityState : nsISupports +{ + nsresult GetValueMissing(bool *_retval); + nsresult GetTypeMismatch(bool *_retval); + nsresult GetPatternMismatch(bool *_retval); + nsresult GetTooLong(bool *_retval); + nsresult GetRangeUnderflow(bool *_retval); + nsresult GetRangeOverflow(bool *_retval); + nsresult GetStepMismatch(bool *_retval); + nsresult GetBadInput(bool *_retval); + nsresult GetCustomError(bool *_retval); + nsresult GetValid(bool *_retval); +} + [ object, uuid(cc35b412-009b-46a3-9be0-76448f12548d), diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 6a3f24a265f..402be2f9d9a 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -2594,6 +2594,29 @@ sync_test("functions scope", function() { })(); });
+sync_test("input validation", function() { + var fired, elem = document.createElement("input"); + elem.type = "number"; + elem.setAttribute("min", "1"); + elem.setAttribute("max", "4"); + elem.addEventListener("invalid", function(e) { + ok(e.target === elem, "unexpected target " + e.target); + fired = true; + }); + fired = false; + elem.value = 1; + ok(elem.checkValidity() === true, "input number (1-4) with value 1: invalid"); + ok(fired === false, "input number (1-4) with value 1 fired invalid event"); + fired = false; + elem.value = 0; + ok(elem.checkValidity() === false, "input number (1-4) with value 0: valid"); + ok(fired === true, "input number (1-4) with value 0 did not fire invalid event"); + fired = false; + elem.value = 5; + ok(elem.checkValidity() === false, "input number (1-4) with value 5: valid"); + ok(fired === true, "input number (1-4) with value 5 did not fire invalid event"); +}); + sync_test("perf toJSON", function() { var json, objs = [ performance, performance.navigation, performance.timing ]; var non_props = [ "constructor", "TYPE_BACK_FORWARD", "TYPE_NAVIGATE", "TYPE_RELOAD", "TYPE_RESERVED" ];
 
            From: Gabriel Ivăncescu gabrielopcode@gmail.com
It's an alternative name for `encoding`.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlform.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c index d6ccce56d41..b7b06c17794 100644 --- a/dlls/mshtml/htmlform.c +++ b/dlls/mshtml/htmlform.c @@ -579,15 +579,19 @@ DISPEX_IDISPATCH_IMPL(HTMLFormElement_private, IWineHTMLFormPrivate, static HRESULT WINAPI HTMLFormElement_private_put_enctype(IWineHTMLFormPrivate *iface, BSTR v) { HTMLFormElement *This = impl_from_IWineHTMLFormPrivateVtbl(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return IHTMLFormElement_put_encoding(&This->IHTMLFormElement_iface, v); }
static HRESULT WINAPI HTMLFormElement_private_get_enctype(IWineHTMLFormPrivate *iface, BSTR *ret) { HTMLFormElement *This = impl_from_IWineHTMLFormPrivateVtbl(iface); - FIXME("(%p)->(%p)\n", This, ret); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, ret); + + return IHTMLFormElement_get_encoding(&This->IHTMLFormElement_iface, ret); }
static HRESULT WINAPI HTMLFormElement_private_put_noValidate(IWineHTMLFormPrivate *iface, VARIANT_BOOL v)
 
            Jacek Caban (@jacek) commented about dlls/mshtml/htmlevent.c:
EVENT_BUBBLES | EVENT_CANCELABLE}, {L"input", EVENT_TYPE_EVENT, DISPID_UNKNOWN, EVENT_DEFAULTLISTENER | EVENT_BUBBLES},
- {L"invalid", EVENT_TYPE_EVENT, DISPID_EVPROP_INVALID,
EVENT_BIND_TO_TARGET | EVENT_CANCELABLE},
Why does it need `EVENT_BIND_TO_TARGET`? Isn't `EVENT_DEFAULTLISTENER` enough?
 
            Jacek Caban (@jacek) commented about dlls/mshtml/nsiface.idl:
- uuid(00bed276-f1f7-492f-a039-dbd9b9efc10b),
- local
+] +interface nsIDOMValidityState : nsISupports +{
- nsresult GetValueMissing(bool *_retval);
- nsresult GetTypeMismatch(bool *_retval);
- nsresult GetPatternMismatch(bool *_retval);
- nsresult GetTooLong(bool *_retval);
- nsresult GetRangeUnderflow(bool *_retval);
- nsresult GetRangeOverflow(bool *_retval);
- nsresult GetStepMismatch(bool *_retval);
- nsresult GetBadInput(bool *_retval);
- nsresult GetCustomError(bool *_retval);
- nsresult GetValid(bool *_retval);
+}
It's no longer needed.
 
            Jacek Caban (@jacek) commented about dlls/mshtml/mshtml_private_iface.idl:
HRESULT classList([retval, out] IDispatch **class_list);}
+const long DISPID_IWINEHTMLFORMPRIVATE_NOVALIDATE = 51; +const long DISPID_IWINEHTMLFORMPRIVATE_CHECKVALIDITY = 52;
What's special about those ids?
 
            Jacek Caban (@jacek) commented about dlls/mshtml/mshtml_private_iface.idl:
+{
- [propput, id(DISPID_IWINEHTMLINPUTPRIVATE_AUTOFOCUS)]
- HRESULT autofocus([in] VARIANT_BOOL v);
- [propget, id(DISPID_IWINEHTMLINPUTPRIVATE_AUTOFOCUS)]
- HRESULT autofocus([retval, out] VARIANT_BOOL *ret);
- [propget, id(51)]
- HRESULT validationMessage([retval, out] BSTR *ret);
- [propget, id(52)]
- HRESULT validity([retval, out] IDispatch **ret);
- [propget, id(53)]
- HRESULT willValidate([retval, out] VARIANT_BOOL *ret);
- [id(54)]
- HRESULT setCustomValidity([in] VARIANT *message);
- [id(55)]
- HRESULT checkValidity([retval, out] VARIANT_BOOL *ret);
+}
This does not belong to this commit.
 
            Jacek Caban (@jacek) commented about dlls/mshtml/mshtml_private_iface.idl:
HRESULT checkValidity([retval, out] VARIANT_BOOL *ret);}
+[
- odl,
- oleautomation,
- dual,
- hidden,
- uuid(653c4bd0-1c68-5263-f82d-c2343ae7cd44)
+] +interface IWineHTMLParentFormPrivate : IDispatch
What's the point of it? We're not going to share its implementations, so we could as well just have those properties in element-specific interfaces (like Gecko does).
 
            On Wed Oct 22 16:37:20 2025 +0000, Jacek Caban wrote:
What's the point of it? We're not going to share its implementations, so we could as well just have those properties in element-specific interfaces (like Gecko does).
It wasn't about sharing implementations, but about having to define less interfaces, instead of copy pasting those methods on multiple objects' interfaces. So you want to merge them into multiple interfaces for different objects?
 
            On Wed Oct 22 16:37:19 2025 +0000, Jacek Caban wrote:
What's special about those ids?
They're used for hooks since they're not available in IE9 mode.
 
            On Wed Oct 22 16:37:19 2025 +0000, Jacek Caban wrote:
It's no longer needed.
Ah right. Should I add it as a separate commit, regardless? It would still be useful later on.
 
            On Wed Oct 22 16:51:12 2025 +0000, Gabriel Ivăncescu wrote:
Ah right. Should I add it as a separate commit, regardless? It would still be useful later on.
It's not used by this MR, so no. It can be added when it will be used.
 
            On Wed Oct 22 16:50:20 2025 +0000, Gabriel Ivăncescu wrote:
It wasn't about sharing implementations, but about having to define less interfaces, instead of copy pasting those methods on multiple objects' interfaces. So you want to merge them into multiple interfaces for different objects?
Yes.
 
            On Wed Oct 22 16:37:19 2025 +0000, Jacek Caban wrote:
Why does it need `EVENT_BIND_TO_TARGET`? Isn't `EVENT_DEFAULTLISTENER` enough?
Sorry, I missed this. But nope, I get test failures without it:
``` script.c:1247: Test failed: L"/index.html?es5.js:input validation: input number (1-4) with value 0 did not fire invalid event" script.c:1247: Test failed: L"/index.html?es5.js:input validation: input number (1-4) with value 5 did not fire invalid event" ```


