Jacek Caban : mshtml: Added IHTMLCSSStyleDeclaration:: zoom property implementation.

Alexandre Julliard julliard at winehq.org
Thu Sep 6 15:51:52 CDT 2018


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Sep  6 16:15:19 2018 +0200

mshtml: Added IHTMLCSSStyleDeclaration::zoom property implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmlstyle.c   |  8 ++++----
 dlls/mshtml/tests/style.c | 25 +++++++++++++++++++++++--
 2 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index a467d2e..2bc7f9e 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -6225,15 +6225,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_layoutFlow(IHTMLCSSStyleDeclar
 static HRESULT WINAPI HTMLCSSStyleDeclaration_put_zoom(IHTMLCSSStyleDeclaration *iface, VARIANT v)
 {
     HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
-    FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
-    return E_NOTIMPL;
+    TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
+    return IHTMLStyle3_put_zoom(&This->IHTMLStyle3_iface, v);
 }
 
 static HRESULT WINAPI HTMLCSSStyleDeclaration_get_zoom(IHTMLCSSStyleDeclaration *iface, VARIANT *p)
 {
     HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    TRACE("(%p)->(%p)\n", This, p);
+    return IHTMLStyle3_get_zoom(&This->IHTMLStyle3_iface, p);
 }
 
 static HRESULT WINAPI HTMLCSSStyleDeclaration_put_wordWrap(IHTMLCSSStyleDeclaration *iface, BSTR v)
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index 72f3690..8594363 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -488,7 +488,7 @@ static void test_style2(IHTMLStyle2 *style2)
     SysFreeString(str);
 }
 
-static void test_style3(IHTMLStyle3 *style3)
+static void test_style3(IHTMLStyle3 *style3, IHTMLCSSStyleDeclaration *css_style)
 {
     VARIANT v;
     BSTR str;
@@ -521,6 +521,7 @@ static void test_style3(IHTMLStyle3 *style3)
     V_BSTR(&v) = a2bstr("100%");
     hres = IHTMLStyle3_put_zoom(style3, v);
     ok(hres == S_OK, "put_zoom failed: %08x\n", hres);
+    VariantClear(&v);
 
     V_VT(&v) = VT_ERROR;
     hres = IHTMLStyle3_get_zoom(style3, &v);
@@ -529,6 +530,13 @@ static void test_style3(IHTMLStyle3 *style3)
     ok(!strcmp_wa(V_BSTR(&v), "100%"), "V_BSTR(zoom) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
     VariantClear(&v);
 
+    if(css_style) {
+        hres = IHTMLCSSStyleDeclaration_get_zoom(css_style, &v);
+        ok(hres == S_OK, "get_zoom failed: %08x\n", hres);
+        test_var_bstr(&v, "100%");
+        VariantClear(&v);
+    }
+
     V_VT(&v) = VT_I4;
     V_I4(&v) = 1;
     hres = IHTMLStyle3_put_zoom(style3, v);
@@ -540,6 +548,19 @@ static void test_style3(IHTMLStyle3 *style3)
     ok(V_VT(&v) == VT_BSTR, "V_VT(zoom) = %d\n", V_VT(&v));
     ok(!strcmp_wa(V_BSTR(&v), "1"), "V_BSTR(zoom) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
     VariantClear(&v);
+
+    if(css_style) {
+        V_VT(&v) = VT_BSTR;
+        V_BSTR(&v) = a2bstr("100%");
+        hres = IHTMLCSSStyleDeclaration_put_zoom(css_style, v);
+        ok(hres == S_OK, "put_zoom failed: %08x\n", hres);
+        VariantClear(&v);
+
+        hres = IHTMLCSSStyleDeclaration_get_zoom(css_style, &v);
+        ok(hres == S_OK, "get_zoom failed: %08x\n", hres);
+        test_var_bstr(&v, "100%");
+        VariantClear(&v);
+    }
 }
 
 static void test_style4(IHTMLStyle4 *style4)
@@ -2844,7 +2865,7 @@ static void test_body_style(IHTMLStyle *style)
     hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle3, (void**)&style3);
     ok(hres == S_OK, "Could not get IHTMLStyle3 iface: %08x\n", hres);
     if(SUCCEEDED(hres)) {
-        test_style3(style3);
+        test_style3(style3, css_style);
         IHTMLStyle3_Release(style3);
     }
 




More information about the wine-cvs mailing list