Module: wine Branch: master Commit: 4b29a69b1b3a63cb735080a1e5a7a6aced2ad824 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4b29a69b1b3a63cb735080a1e...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Jun 5 18:29:02 2020 +0200
mshtml: Add IHTMLCSSStyleDeclaration2::animationName property implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/htmlstyle.c | 12 ++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/style.c | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index fb58d09063..339220016d 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -340,6 +340,10 @@ typedef struct { } style_tbl_entry_t;
static const style_tbl_entry_t style_tbl[] = { + { + L"animation-name", + DISPID_IHTMLCSSSTYLEDECLARATION2_ANIMATIONNAME + }, { backgroundW, DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUND, @@ -9749,15 +9753,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_fontFeatureSettings(IHTMLCSSS static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_animationName(IHTMLCSSStyleDeclaration2 *iface, BSTR v) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(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_ANIMATION_NAME, v); }
static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_animationName(IHTMLCSSStyleDeclaration2 *iface, BSTR *p) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_style_property(This, STYLEID_ANIMATION_NAME, p); }
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_animationDuration(IHTMLCSSStyleDeclaration2 *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 5e7ba0b6e1..60f099cc65 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -44,6 +44,7 @@ struct HTMLStyle {
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */ typedef enum { + STYLEID_ANIMATION_NAME, STYLEID_BACKGROUND, STYLEID_BACKGROUND_ATTACHMENT, STYLEID_BACKGROUND_CLIP, diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index de685dd318..5b0c553a2b 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -855,6 +855,23 @@ static void test_css_style_declaration2(IHTMLCSSStyleDeclaration2 *css_style) ok(hres == S_OK, "get_transform failed: %08x\n", hres); ok(!lstrcmpW(str, L"none"), "transform = %s\n", wine_dbgstr_w(str)); SysFreeString(str); + + str = NULL; + hres = IHTMLCSSStyleDeclaration2_get_animationName(css_style, &str); + ok(hres == S_OK, "get_animationName failed: %08x\n", hres); + ok(!str, "animationName = %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + + str = SysAllocString(L"none"); + hres = IHTMLCSSStyleDeclaration2_put_animationName(css_style, str); + ok(hres == S_OK, "put_animationName failed: %08x\n", hres); + SysFreeString(str); + + str = NULL; + hres = IHTMLCSSStyleDeclaration2_get_animationName(css_style, &str); + ok(hres == S_OK, "get_animationName failed: %08x\n", hres); + ok(!lstrcmpW(str, L"none"), "animationName = %s\n", wine_dbgstr_w(str)); + SysFreeString(str); }
static void test_body_style(IHTMLStyle *style)