Jacek Caban : mshtml: Add IHTMLCSSStyleDeclaration2::transition property implementation.

Alexandre Julliard julliard at winehq.org
Fri Jun 5 14:16:53 CDT 2020


Module: wine
Branch: master
Commit: ed1a4087e8295a675939fdedc2309e40051dcbd6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ed1a4087e8295a675939fdedc2309e40051dcbd6

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Jun  5 18:29:11 2020 +0200

mshtml: Add IHTMLCSSStyleDeclaration2::transition property implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 339220016d..845eeb1da1 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -801,6 +801,10 @@ static const style_tbl_entry_t style_tbl[] = {
         L"transform",
         DISPID_IHTMLCSSSTYLEDECLARATION2_TRANSFORM
     },
+    {
+        L"transition",
+        DISPID_IHTMLCSSSTYLEDECLARATION2_TRANSITION
+    },
     {
         vertical_alignW,
         DISPID_IHTMLCSSSTYLEDECLARATION_VERTICALALIGN,
@@ -9725,15 +9729,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_transitionDelay(IHTMLCSSStyle
 static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_transition(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_TRANSITION, v);
 }
 
 static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_transition(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_TRANSITION, p);
 }
 
 static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_fontFeatureSettings(IHTMLCSSStyleDeclaration2 *iface, BSTR v)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index 60f099cc65..662227cd99 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -128,6 +128,7 @@ typedef enum {
     STYLEID_TEXT_TRANSFORM,
     STYLEID_TOP,
     STYLEID_TRANSFORM,
+    STYLEID_TRANSITION,
     STYLEID_VERTICAL_ALIGN,
     STYLEID_VISIBILITY,
     STYLEID_WHITE_SPACE,
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index 5b0c553a2b..e8771838f4 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -872,6 +872,23 @@ static void test_css_style_declaration2(IHTMLCSSStyleDeclaration2 *css_style)
     ok(hres == S_OK, "get_animationName failed: %08x\n", hres);
     ok(!lstrcmpW(str, L"none"), "animationName = %s\n", wine_dbgstr_w(str));
     SysFreeString(str);
+
+    str = NULL;
+    hres = IHTMLCSSStyleDeclaration2_get_transition(css_style, &str);
+    ok(hres == S_OK, "get_transition failed: %08x\n", hres);
+    ok(!str, "transition = %s\n", wine_dbgstr_w(str));
+    SysFreeString(str);
+
+    str = SysAllocString(L"marigin-right 1s ease-out");
+    hres = IHTMLCSSStyleDeclaration2_put_transition(css_style, str);
+    ok(hres == S_OK, "put_transition failed: %08x\n", hres);
+    SysFreeString(str);
+
+    str = NULL;
+    hres = IHTMLCSSStyleDeclaration2_get_transition(css_style, &str);
+    ok(hres == S_OK, "get_transition failed: %08x\n", hres);
+    ok(!wcsncmp(str, L"marigin-right 1s", wcslen(L"marigin-right 1s")), "transition = %s\n", wine_dbgstr_w(str));
+    SysFreeString(str);
 }
 
 static void test_body_style(IHTMLStyle *style)




More information about the wine-cvs mailing list