Commit d7e693cd authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLStyle::[get|put]_cursor implementation.

parent d7d2587c
......@@ -45,6 +45,8 @@ static const WCHAR attrBorderLeft[] =
{'b','o','r','d','e','r','-','l','e','f','t',0};
static const WCHAR attrColor[] =
{'c','o','l','o','r',0};
static const WCHAR attrCursor[] =
{'c','u','r','s','o','r',0};
static const WCHAR attrDisplay[] =
{'d','i','s','p','l','a','y',0};
static const WCHAR attrFontFamily[] =
......@@ -79,6 +81,7 @@ static const LPCWSTR style_strings[] = {
attrBorder,
attrBorderLeft,
attrColor,
attrCursor,
attrDisplay,
attrFontFamily,
attrFontSize,
......@@ -1685,15 +1688,19 @@ static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_style_attr(This, STYLEID_CURSOR, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_style_attr(This, STYLEID_CURSOR, p);
}
static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
......
......@@ -37,6 +37,7 @@ typedef enum {
STYLEID_BORDER,
STYLEID_BORDER_LEFT,
STYLEID_COLOR,
STYLEID_CURSOR,
STYLEID_DISPLAY,
STYLEID_FONT_FAMILY,
STYLEID_FONT_SIZE,
......
......@@ -2118,6 +2118,22 @@ static void test_default_style(IHTMLStyle *style)
ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
str = (void*)0xdeadbeef;
hres = IHTMLStyle_get_cursor(style, &str);
ok(hres == S_OK, "get_cursor failed: %08x\n", hres);
ok(!str, "get_cursor != NULL\n");
SysFreeString(str);
str = a2bstr("default");
hres = IHTMLStyle_put_cursor(style, str);
ok(hres == S_OK, "get_cursor failed: %08x\n", hres);
SysFreeString(str);
str = NULL;
hres = IHTMLStyle_get_cursor(style, &str);
ok(hres == S_OK, "get_cursor failed: %08x\n", hres);
ok(!strcmp_wa(str, "default"), "get_cursor returned %s\n", dbgstr_w(str));
SysFreeString(str);
}
static void test_default_selection(IHTMLDocument2 *doc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment