mshtml: Share connection points between HTMLDocumentObj and its main HTMLDocumentNode.

This commit is contained in:
Jacek Caban 2009-11-23 19:28:17 +01:00 committed by Alexandre Julliard
parent 24cccbf4d1
commit 19415addec
3 changed files with 7 additions and 1 deletions

View File

@ -260,6 +260,9 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
TRACE("(%p)->(%s %p)\n", This, debugstr_cp_guid(riid), ppCP);
if(This->forward_container)
return IConnectionPointContainer_FindConnectionPoint(CONPTCONT(This), riid, ppCP);
*ppCP = NULL;
for(iter = This->cp_list; iter; iter = iter->next) {

View File

@ -1825,6 +1825,8 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
doc->ref = 1;
doc->basedoc.window = window;
if(window == doc_obj->basedoc.window)
doc->basedoc.cp_container.forward_container = &doc_obj->basedoc.cp_container;
nsIDOMHTMLDocument_AddRef(nsdoc);
doc->nsdoc = nsdoc;

View File

@ -261,11 +261,12 @@ typedef enum {
EDITMODE
} USERMODE;
typedef struct {
typedef struct ConnectionPointContainer {
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
ConnectionPoint *cp_list;
IUnknown *outer;
struct ConnectionPointContainer *forward_container;
} ConnectionPointContainer;
struct ConnectionPoint {