Module: wine Branch: master Commit: 78d0aab45b433ed69a0d6dd6ba46f0240a5ab406 URL: https://source.winehq.org/git/wine.git/?a=commit;h=78d0aab45b433ed69a0d6dd6b...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Sep 7 14:44:24 2018 +0200
mshtml: Added IHTMLCSSStyleDeclaration::cssFloat property implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/htmlstyle.c | 8 ++++---- dlls/mshtml/tests/style.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 479c1df..fbdf633 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -7284,15 +7284,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_clipLeft(IHTMLCSSStyleDeclarat static HRESULT WINAPI HTMLCSSStyleDeclaration_put_cssFloat(IHTMLCSSStyleDeclaration *iface, BSTR v) { HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + return set_style_property(This, STYLEID_FLOAT, v); }
static HRESULT WINAPI HTMLCSSStyleDeclaration_get_cssFloat(IHTMLCSSStyleDeclaration *iface, BSTR *p) { HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_style_property(This, STYLEID_FLOAT, p); }
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_backgroundClip(IHTMLCSSStyleDeclaration *iface, BSTR v) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 9addbcf..ca1909c 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -2861,6 +2861,26 @@ static void test_body_style(IHTMLStyle *style) 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)); + SysFreeString(str); + + if(css_style) { + str = NULL; + hres = IHTMLCSSStyleDeclaration_get_cssFloat(css_style, &str); + ok(hres == S_OK, "get_cssFloat failed: %08x\n", hres); + ok(!strcmp_wa(str, "left"), "styleFloat = %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + + str = a2bstr("right"); + hres = IHTMLCSSStyleDeclaration_put_cssFloat(css_style, str); + ok(hres == S_OK, "put_styleFloat failed: %08x\n", hres); + SysFreeString(str); + + str = NULL; + hres = IHTMLCSSStyleDeclaration_get_cssFloat(css_style, &str); + ok(hres == S_OK, "get_cssFloat failed: %08x\n", hres); + ok(!strcmp_wa(str, "right"), "styleFloat = %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + }
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2); ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);