Jacek Caban : mshtml: Added IHTMLScreen::get_colorDepth implementation.

Alexandre Julliard julliard at winehq.org
Tue Dec 1 09:19:39 CST 2009


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Nov 30 17:58:16 2009 +0100

mshtml: Added IHTMLScreen::get_colorDepth implementation.

---

 dlls/mshtml/htmlscreen.c |    7 +++++--
 dlls/mshtml/tests/dom.c  |    6 ++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlscreen.c b/dlls/mshtml/htmlscreen.c
index c1d1f92..cc3f4b2 100644
--- a/dlls/mshtml/htmlscreen.c
+++ b/dlls/mshtml/htmlscreen.c
@@ -127,8 +127,11 @@ static HRESULT WINAPI HTMLScreen_Invoke(IHTMLScreen *iface, DISPID dispIdMember,
 static HRESULT WINAPI HTMLScreen_get_colorDepth(IHTMLScreen *iface, LONG *p)
 {
     HTMLScreen *This = HTMLSCREEN_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    *p = GetDeviceCaps(get_display_dc(), BITSPIXEL);
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLScreen_put_bufferDepth(IHTMLScreen *iface, LONG v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index a29a4c3..f370fe5 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -3069,6 +3069,12 @@ static void test_screen(IHTMLWindow2 *window)
     ok(hres == S_OK, "get_height failed: %08x\n", hres);
     ok(l == exl, "height = %d, expected %d\n", l, exl);
 
+    exl = GetDeviceCaps(hdc, BITSPIXEL);
+    l = 0xdeadbeef;
+    hres = IHTMLScreen_get_colorDepth(screen, &l);
+    ok(hres == S_OK, "get_height failed: %08x\n", hres);
+    ok(l == exl, "height = %d, expected %d\n", l, exl);
+
     DeleteObject(hdc);
 
     IHTMLScreen_Release(screen);




More information about the wine-cvs mailing list