From 807c716dd1956d4123fc5a6e34294a356525d57f Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 23 Dec 2014 21:12:36 +0100 Subject: [PATCH] mshtml: Added nsIEmbeddingSiteWindow::GetDimensions implementation. --- dlls/mshtml/nsembed.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index f18d52875b2..2854ac37367 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -1712,8 +1712,24 @@ static nsresult NSAPI nsEmbeddingSiteWindow_GetDimensions(nsIEmbeddingSiteWindow UINT32 flags, LONG *x, LONG *y, LONG *cx, LONG *cy) { NSContainer *This = impl_from_nsIEmbeddingSiteWindow(iface); - WARN("(%p)->(%08x %p %p %p %p)\n", This, flags, x, y, cx, cy); - return NS_ERROR_NOT_IMPLEMENTED; + RECT r; + + TRACE("(%p)->(%x %p %p %p %p)\n", This, flags, x, y, cx, cy); + + if(!GetWindowRect(This->hwnd, &r)) { + ERR("GetWindowRect failed\n"); + return NS_ERROR_FAILURE; + } + + if(x) + *x = r.left; + if(y) + *y = r.top; + if(cx) + *cx = r.right-r.left; + if(cy) + *cy = r.bottom-r.top; + return NS_OK; } static nsresult NSAPI nsEmbeddingSiteWindow_SetFocus(nsIEmbeddingSiteWindow *iface)