mshtml: Implement IHTMLElement2::accessKey property on top of nsIDOMHTMLElement.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40821 Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4efad17a9f
commit
7b52ece404
@ -2790,22 +2790,38 @@ static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
|
||||
static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
|
||||
{
|
||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||
VARIANT var;
|
||||
|
||||
static WCHAR accessKeyW[] = L"accessKey";
|
||||
nsAString nsstr;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = v;
|
||||
return IHTMLElement_setAttribute(&This->IHTMLElement_iface, accessKeyW, var, 0);
|
||||
if(!This->html_element) {
|
||||
FIXME("non-HTML element\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
nsAString_InitDepend(&nsstr, v);
|
||||
nsres = nsIDOMHTMLElement_SetAccessKey(This->html_element, &nsstr);
|
||||
nsAString_Finish(&nsstr);
|
||||
return map_nsresult(nsres);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
|
||||
{
|
||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
nsAString nsstr;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
if(!This->html_element) {
|
||||
FIXME("non-HTML element\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
nsAString_InitDepend(&nsstr, NULL);
|
||||
nsres = nsIDOMHTMLElement_GetAccessKey(This->html_element, &nsstr);
|
||||
return return_nsstr(nsres, &nsstr, p);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
|
||||
|
@ -425,3 +425,11 @@ sync_test("navigator", function() {
|
||||
v.testProp = true;
|
||||
ok(window.navigator.testProp, "window.navigator.testProp = " + window.navigator.testProp);
|
||||
});
|
||||
|
||||
sync_test("elem_props", function() {
|
||||
var elem = document.body;
|
||||
|
||||
ok(elem.accessKey === "", "accessKey = " + elem.accessKey);
|
||||
elem.accessKey = "q";
|
||||
ok(elem.accessKey === "q", "accessKey = " + elem.accessKey + " expected q");
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user