Commit 76f7be04 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLStyle::styleFloat attribute implementation.

parent cba322d7
...@@ -110,6 +110,8 @@ static const WCHAR attrDisplay[] = ...@@ -110,6 +110,8 @@ 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[] =
{'f','i','l','e','t','e','r',0}; {'f','i','l','e','t','e','r',0};
static const WCHAR attrFloat[] =
{'f','l','o','a','t',0};
static const WCHAR attrFontFamily[] = static const WCHAR attrFontFamily[] =
{'f','o','n','t','-','f','a','m','i','l','y',0}; {'f','o','n','t','-','f','a','m','i','l','y',0};
static const WCHAR attrFontSize[] = static const WCHAR attrFontSize[] =
...@@ -251,6 +253,7 @@ static const style_tbl_entry_t style_tbl[] = { ...@@ -251,6 +253,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrDirection, DISPID_IHTMLSTYLE2_DIRECTION}, {attrDirection, DISPID_IHTMLSTYLE2_DIRECTION},
{attrDisplay, DISPID_IHTMLSTYLE_DISPLAY}, {attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
{attrFilter, DISPID_IHTMLSTYLE_FILTER}, {attrFilter, DISPID_IHTMLSTYLE_FILTER},
{attrFloat, DISPID_IHTMLSTYLE_STYLEFLOAT},
{attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY}, {attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
{attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE}, {attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
{attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE}, {attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
...@@ -300,6 +303,8 @@ static const style_tbl_entry_t style_tbl[] = { ...@@ -300,6 +303,8 @@ static const style_tbl_entry_t style_tbl[] = {
{attrZIndex, DISPID_IHTMLSTYLE_ZINDEX} {attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
}; };
C_ASSERT(sizeof(style_tbl)/sizeof(*style_tbl) == STYLEID_MAX_VALUE);
static const WCHAR valLineThrough[] = static const WCHAR valLineThrough[] =
{'l','i','n','e','-','t','h','r','o','u','g','h',0}; {'l','i','n','e','-','t','h','r','o','u','g','h',0};
static const WCHAR valUnderline[] = static const WCHAR valUnderline[] =
...@@ -2132,15 +2137,19 @@ static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p) ...@@ -2132,15 +2137,19 @@ static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v) static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
{ {
HTMLStyle *This = impl_from_IHTMLStyle(iface); HTMLStyle *This = impl_from_IHTMLStyle(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_FLOAT, v, 0);
} }
static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p) static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
{ {
HTMLStyle *This = impl_from_IHTMLStyle(iface); HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_style_attr(This, STYLEID_FLOAT, p);
} }
static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v) static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
......
...@@ -70,6 +70,7 @@ typedef enum { ...@@ -70,6 +70,7 @@ typedef enum {
STYLEID_DIRECTION, STYLEID_DIRECTION,
STYLEID_DISPLAY, STYLEID_DISPLAY,
STYLEID_FILTER, STYLEID_FILTER,
STYLEID_FLOAT,
STYLEID_FONT_FAMILY, STYLEID_FONT_FAMILY,
STYLEID_FONT_SIZE, STYLEID_FONT_SIZE,
STYLEID_FONT_STYLE, STYLEID_FONT_STYLE,
...@@ -116,7 +117,8 @@ typedef enum { ...@@ -116,7 +117,8 @@ typedef enum {
STYLEID_WIDTH, STYLEID_WIDTH,
STYLEID_WORD_SPACING, STYLEID_WORD_SPACING,
STYLEID_WORD_WRAP, STYLEID_WORD_WRAP,
STYLEID_Z_INDEX STYLEID_Z_INDEX,
STYLEID_MAX_VALUE
} styleid_t; } styleid_t;
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN; HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
......
...@@ -2446,6 +2446,21 @@ static void test_body_style(IHTMLStyle *style) ...@@ -2446,6 +2446,21 @@ static void test_body_style(IHTMLStyle *style)
win_skip("IHTMLStyle_put_listStyle already failed\n"); win_skip("IHTMLStyle_put_listStyle already failed\n");
} }
str = (void*)0xdeadbeef;
hres = IHTMLStyle_get_styleFloat(style, &str);
ok(hres == S_OK, "get_styleFloat failed: %08x\n", hres);
ok(!str, "styleFloat = %s\n", wine_dbgstr_w(str));
str = a2bstr("left");
hres = IHTMLStyle_put_styleFloat(style, str);
ok(hres == S_OK, "put_styleFloat failed: %08x\n", hres);
SysFreeString(str);
str = NULL;
hres = IHTMLStyle_get_styleFloat(style, &str);
ok(hres == S_OK, "get_styleFloat failed: %08x\n", hres);
ok(!strcmp_wa(str, "left"), "styleFloat = %s\n", wine_dbgstr_w(str));
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2); hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres); ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
......
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