Jacek Caban : mshtml: Added IHTMLScreen::get_height implementation.
Alexandre Julliard
julliard at winehq.org
Tue Dec 1 09:19:39 CST 2009
Module: wine
Branch: master
Commit: fd24068c8f35faf22d8b6ae46103888ff422508e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd24068c8f35faf22d8b6ae46103888ff422508e
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Nov 30 17:57:56 2009 +0100
mshtml: Added IHTMLScreen::get_height implementation.
---
dlls/mshtml/htmlscreen.c | 7 +++++--
dlls/mshtml/tests/dom.c | 7 ++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/htmlscreen.c b/dlls/mshtml/htmlscreen.c
index 3ed403f..c1d1f92 100644
--- a/dlls/mshtml/htmlscreen.c
+++ b/dlls/mshtml/htmlscreen.c
@@ -158,8 +158,11 @@ static HRESULT WINAPI HTMLScreen_get_width(IHTMLScreen *iface, LONG *p)
static HRESULT WINAPI HTMLScreen_get_height(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(), VERTRES);
+ return S_OK;
}
static HRESULT WINAPI HTMLScreen_put_updateInterval(IHTMLScreen *iface, LONG v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index ff58013..a29a4c3 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -3058,12 +3058,17 @@ static void test_screen(IHTMLWindow2 *window)
hdc = CreateICW(displayW, NULL, NULL, NULL);
exl = GetDeviceCaps(hdc, HORZRES);
-
l = 0xdeadbeef;
hres = IHTMLScreen_get_width(screen, &l);
ok(hres == S_OK, "get_width failed: %08x\n", hres);
ok(l == exl, "width = %d, expected %d\n", l, exl);
+ exl = GetDeviceCaps(hdc, VERTRES);
+ l = 0xdeadbeef;
+ hres = IHTMLScreen_get_height(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