Jacek Caban : mshtml: Added IHTMLCurrentStyle4:: get_maxHeight implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 11 08:22:28 CST 2016


Module: wine
Branch: master
Commit: 27182667ccbe6f903ab1986bf89f9e4b392c9fb8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=27182667ccbe6f903ab1986bf89f9e4b392c9fb8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Jan 11 13:52:07 2016 +0100

mshtml: Added IHTMLCurrentStyle4::get_maxHeight implementation.

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

---

 dlls/mshtml/htmlcurstyle.c |  4 ++--
 dlls/mshtml/tests/style.c  | 11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c
index b7f9731..df3281d 100644
--- a/dlls/mshtml/htmlcurstyle.c
+++ b/dlls/mshtml/htmlcurstyle.c
@@ -1281,8 +1281,8 @@ static HRESULT WINAPI HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4 *iface,
 static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
 {
     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    TRACE("(%p)->(%p)\n", This, p);
+    return get_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_WIDTH, p, 0);
 }
 
 static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index d568a2f..94ccc76 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -2634,6 +2634,7 @@ static void test_current_style(IHTMLCurrentStyle *current_style)
 {
     IHTMLCurrentStyle2 *current_style2;
     IHTMLCurrentStyle3 *current_style3;
+    IHTMLCurrentStyle4 *current_style4;
     VARIANT_BOOL b;
     BSTR str;
     HRESULT hres;
@@ -2932,6 +2933,16 @@ static void test_current_style(IHTMLCurrentStyle *current_style)
     SysFreeString(str);
 
     IHTMLCurrentStyle3_Release(current_style3);
+
+    hres = IHTMLCurrentStyle_QueryInterface(current_style, &IID_IHTMLCurrentStyle4, (void**)&current_style4);
+    ok(hres == S_OK, "Could not get IHTMLCurrentStyle4 iface: %08x\n", hres);
+
+    hres = IHTMLCurrentStyle4_get_minWidth(current_style4, &v);
+    ok(hres == S_OK, "get_minWidth failed: %08x\n", hres);
+    ok(V_VT(&v) == VT_BSTR, "V_VT(minWidth) = %d\n", V_VT(&v));
+    VariantClear(&v);
+
+    IHTMLCurrentStyle4_Release(current_style4);
 }
 
 static const char basic_test_str[] = "<html><body><div id=\"divid\"></div/</body></html>";




More information about the wine-cvs mailing list