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" ]);