diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 730ae2daf7e..33318ffb6c9 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -110,6 +110,8 @@ static const WCHAR attrDisplay[] =
{'d','i','s','p','l','a','y',0};
static const WCHAR attrFilter[] =
{'f','i','l','e','t','e','r',0};
+static const WCHAR attrFloat[] =
+ {'f','l','o','a','t',0};
static const WCHAR attrFontFamily[] =
{'f','o','n','t','-','f','a','m','i','l','y',0};
static const WCHAR attrFontSize[] =
@@ -251,6 +253,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrDirection, DISPID_IHTMLSTYLE2_DIRECTION},
{attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
{attrFilter, DISPID_IHTMLSTYLE_FILTER},
+ {attrFloat, DISPID_IHTMLSTYLE_STYLEFLOAT},
{attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
{attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
{attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
@@ -300,6 +303,8 @@ static const style_tbl_entry_t style_tbl[] = {
{attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
};
+C_ASSERT(sizeof(style_tbl)/sizeof(*style_tbl) == STYLEID_MAX_VALUE);
+
static const WCHAR valLineThrough[] =
{'l','i','n','e','-','t','h','r','o','u','g','h',0};
static const WCHAR valUnderline[] =
@@ -2132,15 +2137,19 @@ static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
{
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)
{
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)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index de6f37eb3e5..6fbbea2ad7c 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -70,6 +70,7 @@ typedef enum {
STYLEID_DIRECTION,
STYLEID_DISPLAY,
STYLEID_FILTER,
+ STYLEID_FLOAT,
STYLEID_FONT_FAMILY,
STYLEID_FONT_SIZE,
STYLEID_FONT_STYLE,
@@ -116,7 +117,8 @@ typedef enum {
STYLEID_WIDTH,
STYLEID_WORD_SPACING,
STYLEID_WORD_WRAP,
- STYLEID_Z_INDEX
+ STYLEID_Z_INDEX,
+ STYLEID_MAX_VALUE
} styleid_t;
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index 0eea1c56306..1cdd1c73fbe 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -2446,6 +2446,21 @@ static void test_body_style(IHTMLStyle *style)
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);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) {