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

mshtml: Added IHTMLStyle2::direction property implementation.

parent 51b3100a
...@@ -97,6 +97,8 @@ static const WCHAR attrColor[] = ...@@ -97,6 +97,8 @@ static const WCHAR attrColor[] =
{'c','o','l','o','r',0}; {'c','o','l','o','r',0};
static const WCHAR attrCursor[] = static const WCHAR attrCursor[] =
{'c','u','r','s','o','r',0}; {'c','u','r','s','o','r',0};
static const WCHAR attrDirection[] =
{'d','i','r','e','c','t','i','o','n',0};
static const WCHAR attrDisplay[] = static const WCHAR attrDisplay[] =
{'d','i','s','p','l','a','y',0}; {'d','i','s','p','l','a','y',0};
static const WCHAR attrFilter[] = static const WCHAR attrFilter[] =
...@@ -207,6 +209,7 @@ static const struct{ ...@@ -207,6 +209,7 @@ static const struct{
{attrClip, DISPID_IHTMLSTYLE_CLIP}, {attrClip, DISPID_IHTMLSTYLE_CLIP},
{attrColor, DISPID_IHTMLSTYLE_COLOR}, {attrColor, DISPID_IHTMLSTYLE_COLOR},
{attrCursor, DISPID_IHTMLSTYLE_CURSOR}, {attrCursor, DISPID_IHTMLSTYLE_CURSOR},
{attrDirection, DISPID_IHTMLSTYLE2_DIRECTION},
{attrDisplay, DISPID_IHTMLSTYLE_DISPLAY}, {attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
{attrFilter, DISPID_IHTMLSTYLE_FILTER}, {attrFilter, DISPID_IHTMLSTYLE_FILTER},
{attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY}, {attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
......
...@@ -62,6 +62,7 @@ typedef enum { ...@@ -62,6 +62,7 @@ typedef enum {
STYLEID_CLIP, STYLEID_CLIP,
STYLEID_COLOR, STYLEID_COLOR,
STYLEID_CURSOR, STYLEID_CURSOR,
STYLEID_DIRECTION,
STYLEID_DISPLAY, STYLEID_DISPLAY,
STYLEID_FILTER, STYLEID_FILTER,
STYLEID_FONT_FAMILY, STYLEID_FONT_FAMILY,
......
...@@ -121,15 +121,19 @@ static HRESULT WINAPI HTMLStyle2_get_borderCollapse(IHTMLStyle2 *iface, BSTR *p) ...@@ -121,15 +121,19 @@ static HRESULT WINAPI HTMLStyle2_get_borderCollapse(IHTMLStyle2 *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle2_put_direction(IHTMLStyle2 *iface, BSTR v) static HRESULT WINAPI HTMLStyle2_put_direction(IHTMLStyle2 *iface, BSTR v)
{ {
HTMLStyle *This = impl_from_IHTMLStyle2(iface); HTMLStyle *This = impl_from_IHTMLStyle2(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL; TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_nsstyle_attr(This->nsstyle, STYLEID_DIRECTION, v, 0);
} }
static HRESULT WINAPI HTMLStyle2_get_direction(IHTMLStyle2 *iface, BSTR *p) static HRESULT WINAPI HTMLStyle2_get_direction(IHTMLStyle2 *iface, BSTR *p)
{ {
HTMLStyle *This = impl_from_IHTMLStyle2(iface); HTMLStyle *This = impl_from_IHTMLStyle2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_DIRECTION, p, 0);
} }
static HRESULT WINAPI HTMLStyle2_put_behavior(IHTMLStyle2 *iface, BSTR v) static HRESULT WINAPI HTMLStyle2_put_behavior(IHTMLStyle2 *iface, BSTR v)
......
...@@ -277,6 +277,23 @@ static void test_style2(IHTMLStyle2 *style2) ...@@ -277,6 +277,23 @@ static void test_style2(IHTMLStyle2 *style2)
ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v));
ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v); VariantClear(&v);
/* direction */
str = (void*)0xdeadbeef;
hres = IHTMLStyle2_get_direction(style2, &str);
ok(hres == S_OK, "get_direction failed: %08x\n", hres);
ok(!str, "str = %s\n", wine_dbgstr_w(str));
str = a2bstr("ltr");
hres = IHTMLStyle2_put_direction(style2, str);
ok(hres == S_OK, "put_direction failed: %08x\n", hres);
SysFreeString(str);
str = NULL;
hres = IHTMLStyle2_get_direction(style2, &str);
ok(hres == S_OK, "get_direction failed: %08x\n", hres);
ok(!strcmp_wa(str, "ltr"), "str = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
} }
static void test_style3(IHTMLStyle3 *style3) static void test_style3(IHTMLStyle3 *style3)
......
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