Commit fb4980d6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added get_parentWindow implementation.

parent 92ecf233
......@@ -24,6 +24,7 @@ C_SRCS = \
htmlstylesheet.c \
htmltextcont.c \
htmltextarea.c \
htmlwindow.c \
install.c \
loadopts.c \
main.c \
......
......@@ -162,6 +162,7 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
if(This->hwnd)
DestroyWindow(This->hwnd);
IHTMLWindow2_Release(HTMLWINDOW2(This->window));
release_nodes(This);
HTMLDocument_ConnectionPoints_Destroy(This);
......@@ -920,8 +921,13 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, long
static HRESULT WINAPI HTMLDocument_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p)
{
FIXME("(%p)->(%p)\n", iface, p);
return E_NOTIMPL;
HTMLDocument *This = HTMLDOC_THIS(iface);
TRACE("(%p)->(%p)\n", This, p);
*p = HTMLWINDOW2(This->window);
IHTMLWindow2_AddRef(*p);
return S_OK;
}
static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface,
......@@ -1124,6 +1130,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
HTMLDocument_ConnectionPoints_Init(ret);
ret->nscontainer = NSContainer_Create(ret, NULL);
ret->window = HTMLWindow_Create(ret);
get_thread_hwnd();
......
......@@ -52,6 +52,15 @@ typedef struct HTMLDOMNode HTMLDOMNode;
typedef struct ConnectionPoint ConnectionPoint;
typedef struct BSCallback BSCallback;
typedef struct {
const IHTMLWindow2Vtbl *lpHTMLWindow2Vtbl;
LONG ref;
HTMLDocument *doc;
nsIDOMWindow *nswindow;
} HTMLWindow;
typedef enum {
UNKNOWN_USERMODE,
BROWSEMODE,
......@@ -80,6 +89,7 @@ struct HTMLDocument {
LONG ref;
NSContainer *nscontainer;
HTMLWindow *window;
IOleClientSite *client;
IDocHostUIHandler *hostui;
......@@ -226,6 +236,8 @@ typedef struct {
HTMLElement *element;
} HTMLTextContainer;
#define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl)
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
#define HTMLDOC3(x) ((IHTMLDocument3*) &(x)->lpHTMLDocument3Vtbl)
#define PERSIST(x) ((IPersist*) &(x)->lpPersistFileVtbl)
......@@ -277,6 +289,9 @@ typedef struct {
HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**);
HTMLWindow *HTMLWindow_Create(HTMLDocument*);
HTMLWindow *nswindow_to_window(nsIDOMWindow*);
void HTMLDocument_HTMLDocument3_Init(HTMLDocument*);
void HTMLDocument_Persist_Init(HTMLDocument*);
void HTMLDocument_OleCmd_Init(HTMLDocument*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment