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

mshtml: Use lazy allocation for connection points.

parent 1d05cd51
...@@ -48,16 +48,6 @@ static const char *debugstr_cp_guid(REFIID riid) ...@@ -48,16 +48,6 @@ static const char *debugstr_cp_guid(REFIID riid)
return debugstr_guid(riid); return debugstr_guid(riid);
} }
void call_property_onchanged(ConnectionPoint *This, DISPID dispid)
{
DWORD i;
for(i=0; i<This->sinks_size; i++) {
if(This->sinks[i].propnotif)
IPropertyNotifySink_OnChanged(This->sinks[i].propnotif, dispid);
}
}
static inline ConnectionPoint *impl_from_IConnectionPoint(IConnectionPoint *iface) static inline ConnectionPoint *impl_from_IConnectionPoint(IConnectionPoint *iface)
{ {
return CONTAINING_RECORD(iface, ConnectionPoint, IConnectionPoint_iface); return CONTAINING_RECORD(iface, ConnectionPoint, IConnectionPoint_iface);
...@@ -201,7 +191,7 @@ static const IConnectionPointVtbl ConnectionPointVtbl = ...@@ -201,7 +191,7 @@ static const IConnectionPointVtbl ConnectionPointVtbl =
ConnectionPoint_EnumConnections ConnectionPoint_EnumConnections
}; };
void ConnectionPoint_Init(ConnectionPoint *cp, ConnectionPointContainer *container, REFIID riid, cp_static_data_t *data) static void ConnectionPoint_Init(ConnectionPoint *cp, ConnectionPointContainer *container, REFIID riid, cp_static_data_t *data)
{ {
cp->IConnectionPoint_iface.lpVtbl = &ConnectionPointVtbl; cp->IConnectionPoint_iface.lpVtbl = &ConnectionPointVtbl;
cp->container = container; cp->container = container;
...@@ -209,9 +199,6 @@ void ConnectionPoint_Init(ConnectionPoint *cp, ConnectionPointContainer *contain ...@@ -209,9 +199,6 @@ void ConnectionPoint_Init(ConnectionPoint *cp, ConnectionPointContainer *contain
cp->sinks_size = 0; cp->sinks_size = 0;
cp->iid = riid; cp->iid = riid;
cp->data = data; cp->data = data;
cp->next = container->cp_list;
container->cp_list = cp;
} }
static void ConnectionPoint_Destroy(ConnectionPoint *This) static void ConnectionPoint_Destroy(ConnectionPoint *This)
...@@ -226,6 +213,51 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This) ...@@ -226,6 +213,51 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
heap_free(This->sinks); heap_free(This->sinks);
} }
static ConnectionPoint *get_cp(ConnectionPointContainer *container, REFIID riid, BOOL do_create)
{
const cpc_entry_t *iter;
unsigned idx, i;
for(iter = container->cp_entries; iter->riid; iter++) {
if(IsEqualGUID(iter->riid, riid))
break;
}
if(!iter->riid)
return NULL;
idx = iter - container->cp_entries;
if(!container->cps) {
if(!do_create)
return NULL;
while(iter->riid)
iter++;
container->cps = heap_alloc((iter - container->cp_entries) * sizeof(*container->cps));
if(!container->cps)
return NULL;
for(i=0; container->cp_entries[i].riid; i++)
ConnectionPoint_Init(container->cps+i, container, container->cp_entries[i].riid, container->cp_entries[i].desc);
}
return container->cps+idx;
}
void call_property_onchanged(ConnectionPointContainer *container, DISPID dispid)
{
ConnectionPoint *cp;
DWORD i;
cp = get_cp(container, &IID_IPropertyNotifySink, FALSE);
if(!cp)
return;
for(i=0; i<cp->sinks_size; i++) {
if(cp->sinks[i].propnotif)
IPropertyNotifySink_OnChanged(cp->sinks[i].propnotif, dispid);
}
}
static inline ConnectionPointContainer *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface) static inline ConnectionPointContainer *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
{ {
return CONTAINING_RECORD(iface, ConnectionPointContainer, IConnectionPointContainer_iface); return CONTAINING_RECORD(iface, ConnectionPointContainer, IConnectionPointContainer_iface);
...@@ -262,7 +294,7 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo ...@@ -262,7 +294,7 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
REFIID riid, IConnectionPoint **ppCP) REFIID riid, IConnectionPoint **ppCP)
{ {
ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface); ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface);
ConnectionPoint *iter; ConnectionPoint *cp;
TRACE("(%p)->(%s %p)\n", This, debugstr_cp_guid(riid), ppCP); TRACE("(%p)->(%s %p)\n", This, debugstr_cp_guid(riid), ppCP);
...@@ -270,20 +302,16 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo ...@@ -270,20 +302,16 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
return IConnectionPointContainer_FindConnectionPoint(&This->forward_container->IConnectionPointContainer_iface, return IConnectionPointContainer_FindConnectionPoint(&This->forward_container->IConnectionPointContainer_iface,
riid, ppCP); riid, ppCP);
*ppCP = NULL; cp = get_cp(This, riid, TRUE);
if(!cp) {
for(iter = This->cp_list; iter; iter = iter->next) { FIXME("unsupported riid %s\n", debugstr_cp_guid(riid));
if(IsEqualGUID(iter->iid, riid)) *ppCP = NULL;
*ppCP = &iter->IConnectionPoint_iface; return CONNECT_E_NOCONNECTION;
}
if(*ppCP) {
IConnectionPoint_AddRef(*ppCP);
return S_OK;
} }
FIXME("unsupported riid %s\n", debugstr_cp_guid(riid)); *ppCP = &cp->IConnectionPoint_iface;
return CONNECT_E_NOCONNECTION; IConnectionPoint_AddRef(*ppCP);
return S_OK;
} }
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = { static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
...@@ -294,19 +322,23 @@ static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = { ...@@ -294,19 +322,23 @@ static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
ConnectionPointContainer_FindConnectionPoint ConnectionPointContainer_FindConnectionPoint
}; };
void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *outer) void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *outer, const cpc_entry_t *cp_entries)
{ {
This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
This->cp_list = NULL; This->cp_entries = cp_entries;
This->cps = NULL;
This->outer = outer; This->outer = outer;
This->forward_container = NULL;
} }
void ConnectionPointContainer_Destroy(ConnectionPointContainer *This) void ConnectionPointContainer_Destroy(ConnectionPointContainer *This)
{ {
ConnectionPoint *iter = This->cp_list; unsigned i;
while(iter) { if(!This->cps)
ConnectionPoint_Destroy(iter); return;
iter = iter->next;
} for(i=0; This->cp_entries[i].riid; i++)
ConnectionPoint_Destroy(This->cps+i);
heap_free(This->cps);
} }
...@@ -684,6 +684,7 @@ static HRESULT HTMLAnchorElement_handle_event(HTMLDOMNode *iface, eventid_t eid, ...@@ -684,6 +684,7 @@ static HRESULT HTMLAnchorElement_handle_event(HTMLDOMNode *iface, eventid_t eid,
static const NodeImplVtbl HTMLAnchorElementImplVtbl = { static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
HTMLAnchorElement_QI, HTMLAnchorElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLAnchorElement_handle_event, HTMLAnchorElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -38,8 +38,6 @@ typedef struct { ...@@ -38,8 +38,6 @@ typedef struct {
IHTMLBodyElement IHTMLBodyElement_iface; IHTMLBodyElement IHTMLBodyElement_iface;
ConnectionPoint cp_propnotif;
nsIDOMHTMLBodyElement *nsbody; nsIDOMHTMLBodyElement *nsbody;
} HTMLBodyElement; } HTMLBodyElement;
...@@ -771,9 +769,17 @@ static event_target_t **HTMLBodyElement_get_event_target(HTMLDOMNode *iface) ...@@ -771,9 +769,17 @@ static event_target_t **HTMLBodyElement_get_event_target(HTMLDOMNode *iface)
: &This->textcont.element.node.event_target; : &This->textcont.element.node.event_target;
} }
static const cpc_entry_t HTMLBodyElement_cpc[] = {
{&DIID_HTMLTextContainerEvents},
{&IID_IPropertyNotifySink},
HTMLELEMENT_CPC,
{NULL}
};
static const NodeImplVtbl HTMLBodyElementImplVtbl = { static const NodeImplVtbl HTMLBodyElementImplVtbl = {
HTMLBodyElement_QI, HTMLBodyElement_QI,
HTMLBodyElement_destructor, HTMLBodyElement_destructor,
HTMLBodyElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
...@@ -817,8 +823,6 @@ HRESULT HTMLBodyElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, ...@@ -817,8 +823,6 @@ HRESULT HTMLBodyElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
HTMLTextContainer_Init(&ret->textcont, doc, nselem, &HTMLBodyElement_dispex); HTMLTextContainer_Init(&ret->textcont, doc, nselem, &HTMLBodyElement_dispex);
ConnectionPoint_Init(&ret->cp_propnotif, &ret->textcont.element.cp_container, &IID_IPropertyNotifySink, NULL);
*elem = &ret->textcont.element; *elem = &ret->textcont.element;
return S_OK; return S_OK;
} }
...@@ -172,6 +172,7 @@ static void HTMLCommentElement_destructor(HTMLDOMNode *iface) ...@@ -172,6 +172,7 @@ static void HTMLCommentElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLCommentElementImplVtbl = { static const NodeImplVtbl HTMLCommentElementImplVtbl = {
HTMLCommentElement_QI, HTMLCommentElement_QI,
HTMLCommentElement_destructor, HTMLCommentElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -2055,6 +2055,14 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) ...@@ -2055,6 +2055,14 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
static cp_static_data_t HTMLDocumentEvents_data = { HTMLDocumentEvents_tid, HTMLDocument_on_advise }; static cp_static_data_t HTMLDocumentEvents_data = { HTMLDocumentEvents_tid, HTMLDocument_on_advise };
static const cpc_entry_t HTMLDocument_cpc[] = {
{&IID_IDispatch, &HTMLDocumentEvents_data},
{&IID_IPropertyNotifySink},
{&DIID_HTMLDocumentEvents, &HTMLDocumentEvents_data},
{&DIID_HTMLDocumentEvents2},
{NULL}
};
static void init_doc(HTMLDocument *doc, IUnknown *unk_impl, IDispatchEx *dispex) static void init_doc(HTMLDocument *doc, IUnknown *unk_impl, IDispatchEx *dispex)
{ {
doc->IHTMLDocument2_iface.lpVtbl = &HTMLDocumentVtbl; doc->IHTMLDocument2_iface.lpVtbl = &HTMLDocumentVtbl;
...@@ -2076,11 +2084,7 @@ static void init_doc(HTMLDocument *doc, IUnknown *unk_impl, IDispatchEx *dispex) ...@@ -2076,11 +2084,7 @@ static void init_doc(HTMLDocument *doc, IUnknown *unk_impl, IDispatchEx *dispex)
HTMLDocument_Service_Init(doc); HTMLDocument_Service_Init(doc);
HTMLDocument_Hlink_Init(doc); HTMLDocument_Hlink_Init(doc);
ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->IHTMLDocument2_iface); ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->IHTMLDocument2_iface, HTMLDocument_cpc);
ConnectionPoint_Init(&doc->cp_dispatch, &doc->cp_container, &IID_IDispatch, &HTMLDocumentEvents_data);
ConnectionPoint_Init(&doc->cp_propnotif, &doc->cp_container, &IID_IPropertyNotifySink, NULL);
ConnectionPoint_Init(&doc->cp_htmldocevents, &doc->cp_container, &DIID_HTMLDocumentEvents, &HTMLDocumentEvents_data);
ConnectionPoint_Init(&doc->cp_htmldocevents2, &doc->cp_container, &DIID_HTMLDocumentEvents2, NULL);
} }
static void destroy_htmldoc(HTMLDocument *This) static void destroy_htmldoc(HTMLDocument *This)
...@@ -2192,6 +2196,7 @@ static void HTMLDocumentNode_unlink(HTMLDOMNode *iface) ...@@ -2192,6 +2196,7 @@ static void HTMLDocumentNode_unlink(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLDocumentNodeImplVtbl = { static const NodeImplVtbl HTMLDocumentNodeImplVtbl = {
HTMLDocumentNode_QI, HTMLDocumentNode_QI,
HTMLDocumentNode_destructor, HTMLDocumentNode_destructor,
HTMLDocument_cpc,
HTMLDocumentNode_clone, HTMLDocumentNode_clone,
NULL, NULL,
NULL, NULL,
...@@ -2280,6 +2285,7 @@ static const dispex_static_data_vtbl_t HTMLDocumentNode_dispex_vtbl = { ...@@ -2280,6 +2285,7 @@ static const dispex_static_data_vtbl_t HTMLDocumentNode_dispex_vtbl = {
static const NodeImplVtbl HTMLDocumentFragmentImplVtbl = { static const NodeImplVtbl HTMLDocumentFragmentImplVtbl = {
HTMLDocumentNode_QI, HTMLDocumentNode_QI,
HTMLDocumentNode_destructor, HTMLDocumentNode_destructor,
HTMLDocument_cpc,
HTMLDocumentFragment_clone HTMLDocumentFragment_clone
}; };
......
...@@ -1679,9 +1679,15 @@ HRESULT HTMLElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *eve ...@@ -1679,9 +1679,15 @@ HRESULT HTMLElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *eve
return S_OK; return S_OK;
} }
const cpc_entry_t HTMLElement_cpc[] = {
HTMLELEMENT_CPC,
{NULL}
};
static const NodeImplVtbl HTMLElementImplVtbl = { static const NodeImplVtbl HTMLElementImplVtbl = {
HTMLElement_QI, HTMLElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
...@@ -1838,7 +1844,8 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen ...@@ -1838,7 +1844,8 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen
This->nselem = nselem; This->nselem = nselem;
} }
ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface); This->node.cp_container = &This->cp_container;
ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface, This->node.vtbl->cpc_entries);
} }
HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_generic, HTMLElement **ret) HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_generic, HTMLElement **ret)
...@@ -1868,8 +1875,8 @@ HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_g ...@@ -1868,8 +1875,8 @@ HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_g
}else { }else {
elem = heap_alloc_zero(sizeof(HTMLElement)); elem = heap_alloc_zero(sizeof(HTMLElement));
if(elem) { if(elem) {
HTMLElement_Init(elem, doc, nselem, &HTMLElement_dispex);
elem->node.vtbl = &HTMLElementImplVtbl; elem->node.vtbl = &HTMLElementImplVtbl;
HTMLElement_Init(elem, doc, nselem, &HTMLElement_dispex);
hres = S_OK; hres = S_OK;
}else { }else {
hres = E_OUTOFMEMORY; hres = E_OUTOFMEMORY;
......
...@@ -254,6 +254,7 @@ static void HTMLEmbedElement_destructor(HTMLDOMNode *iface) ...@@ -254,6 +254,7 @@ static void HTMLEmbedElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLEmbedElementImplVtbl = { static const NodeImplVtbl HTMLEmbedElementImplVtbl = {
HTMLEmbedElement_QI, HTMLEmbedElement_QI,
HTMLEmbedElement_destructor, HTMLEmbedElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -1001,44 +1001,44 @@ static void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj, ...@@ -1001,44 +1001,44 @@ static void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj,
* it's safe to call event handler by checking nsevent_listener, which is NULL for * it's safe to call event handler by checking nsevent_listener, which is NULL for
* detached documents. * detached documents.
*/ */
if(cp_container && doc->nsevent_listener) { if(cp_container && cp_container->forward_container)
cp_container = cp_container->forward_container;
if(cp_container && cp_container->cps && doc->nsevent_listener) {
ConnectionPoint *cp; ConnectionPoint *cp;
unsigned i, j;
if(cp_container->forward_container) for(j=0; cp_container->cp_entries[j].riid; j++) {
cp_container = cp_container->forward_container; cp = cp_container->cps + j;
if(!cp->sinks_size || !is_cp_event(cp->data, event_info[eid].dispid))
for(cp = cp_container->cp_list; cp; cp = cp->next) { continue;
if(cp->sinks_size && is_cp_event(cp->data, event_info[eid].dispid)) {
unsigned int i;
for(i=0; doc->nsevent_listener && i < cp->sinks_size; i++) { for(i=0; doc->nsevent_listener && i < cp->sinks_size; i++) {
if(!cp->sinks[i].disp) if(!cp->sinks[i].disp)
continue; continue;
V_VT(&v) = VT_EMPTY; V_VT(&v) = VT_EMPTY;
TRACE("cp %s [%u] >>>\n", debugstr_w(event_info[eid].name), i); TRACE("cp %s [%u] >>>\n", debugstr_w(event_info[eid].name), i);
hres = call_cp_func(cp->sinks[i].disp, event_info[eid].dispid, &v); hres = call_cp_func(cp->sinks[i].disp, event_info[eid].dispid, &v);
if(hres == S_OK) { if(hres == S_OK) {
TRACE("cp %s [%u] <<<\n", debugstr_w(event_info[eid].name), i); TRACE("cp %s [%u] <<<\n", debugstr_w(event_info[eid].name), i);
if(cancelable) { if(cancelable) {
if(V_VT(&v) == VT_BOOL) { if(V_VT(&v) == VT_BOOL) {
if(!V_BOOL(&v)) if(!V_BOOL(&v))
event_obj->prevent_default = TRUE; event_obj->prevent_default = TRUE;
}else if(V_VT(&v) != VT_EMPTY) { }else if(V_VT(&v) != VT_EMPTY) {
FIXME("unhandled result %s\n", debugstr_variant(&v)); FIXME("unhandled result %s\n", debugstr_variant(&v));
}
} }
VariantClear(&v);
}else {
WARN("cp %s [%u] <<< %08x\n", debugstr_w(event_info[eid].name), i, hres);
} }
VariantClear(&v);
}else {
WARN("cp %s [%u] <<< %08x\n", debugstr_w(event_info[eid].name), i, hres);
} }
if(!doc->nsevent_listener)
break;
} }
if(!doc->nsevent_listener)
break;
} }
} }
} }
......
...@@ -629,6 +629,7 @@ static HRESULT HTMLFormElement_invoke(HTMLDOMNode *iface, ...@@ -629,6 +629,7 @@ static HRESULT HTMLFormElement_invoke(HTMLDOMNode *iface,
static const NodeImplVtbl HTMLFormElementImplVtbl = { static const NodeImplVtbl HTMLFormElementImplVtbl = {
HTMLFormElement_QI, HTMLFormElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -269,6 +269,7 @@ static HRESULT HTMLFrameElement_bind_to_tree(HTMLDOMNode *iface) ...@@ -269,6 +269,7 @@ static HRESULT HTMLFrameElement_bind_to_tree(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLFrameElementImplVtbl = { static const NodeImplVtbl HTMLFrameElementImplVtbl = {
HTMLFrameElement_QI, HTMLFrameElement_QI,
HTMLFrameElement_destructor, HTMLFrameElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -154,6 +154,7 @@ static void HTMLGenericElement_destructor(HTMLDOMNode *iface) ...@@ -154,6 +154,7 @@ static void HTMLGenericElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLGenericElementImplVtbl = { static const NodeImplVtbl HTMLGenericElementImplVtbl = {
HTMLGenericElement_QI, HTMLGenericElement_QI,
HTMLGenericElement_destructor, HTMLGenericElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -155,6 +155,7 @@ static void HTMLTitleElement_destructor(HTMLDOMNode *iface) ...@@ -155,6 +155,7 @@ static void HTMLTitleElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLTitleElementImplVtbl = { static const NodeImplVtbl HTMLTitleElementImplVtbl = {
HTMLTitleElement_QI, HTMLTitleElement_QI,
HTMLTitleElement_destructor, HTMLTitleElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
...@@ -314,6 +315,7 @@ static void HTMLHeadElement_destructor(HTMLDOMNode *iface) ...@@ -314,6 +315,7 @@ static void HTMLHeadElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLHeadElementImplVtbl = { static const NodeImplVtbl HTMLHeadElementImplVtbl = {
HTMLHeadElement_QI, HTMLHeadElement_QI,
HTMLHeadElement_destructor, HTMLHeadElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -542,6 +542,7 @@ static HRESULT HTMLIFrame_bind_to_tree(HTMLDOMNode *iface) ...@@ -542,6 +542,7 @@ static HRESULT HTMLIFrame_bind_to_tree(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLIFrameImplVtbl = { static const NodeImplVtbl HTMLIFrameImplVtbl = {
HTMLIFrame_QI, HTMLIFrame_QI,
HTMLIFrame_destructor, HTMLIFrame_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -647,6 +647,7 @@ static HRESULT HTMLImgElement_get_readystate(HTMLDOMNode *iface, BSTR *p) ...@@ -647,6 +647,7 @@ static HRESULT HTMLImgElement_get_readystate(HTMLDOMNode *iface, BSTR *p)
static const NodeImplVtbl HTMLImgElementImplVtbl = { static const NodeImplVtbl HTMLImgElementImplVtbl = {
HTMLImgElement_QI, HTMLImgElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -1194,6 +1194,7 @@ static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOO ...@@ -1194,6 +1194,7 @@ static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOO
static const NodeImplVtbl HTMLInputElementImplVtbl = { static const NodeImplVtbl HTMLInputElementImplVtbl = {
HTMLInputElement_QI, HTMLInputElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
...@@ -1377,6 +1378,7 @@ static HRESULT HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) ...@@ -1377,6 +1378,7 @@ static HRESULT HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static const NodeImplVtbl HTMLLabelElementImplVtbl = { static const NodeImplVtbl HTMLLabelElementImplVtbl = {
HTMLLabelElement_QI, HTMLLabelElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
...@@ -1604,6 +1606,7 @@ static HRESULT HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) ...@@ -1604,6 +1606,7 @@ static HRESULT HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static const NodeImplVtbl HTMLButtonElementImplVtbl = { static const NodeImplVtbl HTMLButtonElementImplVtbl = {
HTMLButtonElement_QI, HTMLButtonElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -362,6 +362,7 @@ static HRESULT HTMLLinkElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL ...@@ -362,6 +362,7 @@ static HRESULT HTMLLinkElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL
static const NodeImplVtbl HTMLLinkElementImplVtbl = { static const NodeImplVtbl HTMLLinkElementImplVtbl = {
HTMLLinkElement_QI, HTMLLinkElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -253,6 +253,7 @@ static void HTMLMetaElement_destructor(HTMLDOMNode *iface) ...@@ -253,6 +253,7 @@ static void HTMLMetaElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLMetaElementImplVtbl = { static const NodeImplVtbl HTMLMetaElementImplVtbl = {
HTMLMetaElement_QI, HTMLMetaElement_QI,
HTMLMetaElement_destructor, HTMLMetaElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -1057,9 +1057,12 @@ static HRESULT HTMLDOMNode_clone(HTMLDOMNode *This, nsIDOMNode *nsnode, HTMLDOMN ...@@ -1057,9 +1057,12 @@ static HRESULT HTMLDOMNode_clone(HTMLDOMNode *This, nsIDOMNode *nsnode, HTMLDOMN
return create_node(This->doc, nsnode, ret); return create_node(This->doc, nsnode, ret);
} }
static const cpc_entry_t HTMLDOMNode_cpc[] = {{NULL}};
static const NodeImplVtbl HTMLDOMNodeImplVtbl = { static const NodeImplVtbl HTMLDOMNodeImplVtbl = {
HTMLDOMNode_QI, HTMLDOMNode_QI,
HTMLDOMNode_destructor, HTMLDOMNode_destructor,
HTMLDOMNode_cpc,
HTMLDOMNode_clone HTMLDOMNode_clone
}; };
......
...@@ -707,6 +707,7 @@ static HRESULT HTMLObjectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid ...@@ -707,6 +707,7 @@ static HRESULT HTMLObjectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid
static const NodeImplVtbl HTMLObjectElementImplVtbl = { static const NodeImplVtbl HTMLObjectElementImplVtbl = {
HTMLObjectElement_QI, HTMLObjectElement_QI,
HTMLObjectElement_destructor, HTMLObjectElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -314,6 +314,7 @@ static HRESULT HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) ...@@ -314,6 +314,7 @@ static HRESULT HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static const NodeImplVtbl HTMLOptionElementImplVtbl = { static const NodeImplVtbl HTMLOptionElementImplVtbl = {
HTMLOptionElement_QI, HTMLOptionElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -394,6 +394,7 @@ static HRESULT HTMLScriptElement_get_readystate(HTMLDOMNode *iface, BSTR *p) ...@@ -394,6 +394,7 @@ static HRESULT HTMLScriptElement_get_readystate(HTMLDOMNode *iface, BSTR *p)
static const NodeImplVtbl HTMLScriptElementImplVtbl = { static const NodeImplVtbl HTMLScriptElementImplVtbl = {
HTMLScriptElement_QI, HTMLScriptElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -599,6 +599,7 @@ static HRESULT HTMLSelectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid ...@@ -599,6 +599,7 @@ static HRESULT HTMLSelectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid
static const NodeImplVtbl HTMLSelectElementImplVtbl = { static const NodeImplVtbl HTMLSelectElementImplVtbl = {
HTMLSelectElement_QI, HTMLSelectElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -322,6 +322,7 @@ static void HTMLStyleElement_destructor(HTMLDOMNode *iface) ...@@ -322,6 +322,7 @@ static void HTMLStyleElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLStyleElementImplVtbl = { static const NodeImplVtbl HTMLStyleElementImplVtbl = {
HTMLStyleElement_QI, HTMLStyleElement_QI,
HTMLStyleElement_destructor, HTMLStyleElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -39,7 +39,6 @@ struct HTMLTable { ...@@ -39,7 +39,6 @@ struct HTMLTable {
IHTMLTable2 IHTMLTable2_iface; IHTMLTable2 IHTMLTable2_iface;
IHTMLTable3 IHTMLTable3_iface; IHTMLTable3 IHTMLTable3_iface;
ConnectionPoint cp;
nsIDOMHTMLTableElement *nstable; nsIDOMHTMLTableElement *nstable;
}; };
...@@ -742,9 +741,16 @@ static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) ...@@ -742,9 +741,16 @@ static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
return HTMLElement_QI(&This->element.node, riid, ppv); return HTMLElement_QI(&This->element.node, riid, ppv);
} }
static const cpc_entry_t HTMLTable_cpc[] = {
{&DIID_HTMLTableEvents},
HTMLELEMENT_CPC,
{NULL}
};
static const NodeImplVtbl HTMLTableImplVtbl = { static const NodeImplVtbl HTMLTableImplVtbl = {
HTMLTable_QI, HTMLTable_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLTable_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
...@@ -783,8 +789,6 @@ HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLE ...@@ -783,8 +789,6 @@ HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLE
assert(nsres == NS_OK && (nsIDOMNode*)ret->nstable == ret->element.node.nsnode); assert(nsres == NS_OK && (nsIDOMNode*)ret->nstable == ret->element.node.nsnode);
nsIDOMNode_Release(ret->element.node.nsnode); nsIDOMNode_Release(ret->element.node.nsnode);
ConnectionPoint_Init(&ret->cp, &ret->element.cp_container, &DIID_HTMLTableEvents, NULL);
*elem = &ret->element; *elem = &ret->element;
return S_OK; return S_OK;
} }
...@@ -340,6 +340,7 @@ static void HTMLTableCell_destructor(HTMLDOMNode *iface) ...@@ -340,6 +340,7 @@ static void HTMLTableCell_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLTableCellImplVtbl = { static const NodeImplVtbl HTMLTableCellImplVtbl = {
HTMLTableCell_QI, HTMLTableCell_QI,
HTMLTableCell_destructor, HTMLTableCell_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -291,6 +291,7 @@ static HRESULT HTMLTableRow_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) ...@@ -291,6 +291,7 @@ static HRESULT HTMLTableRow_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static const NodeImplVtbl HTMLTableRowImplVtbl = { static const NodeImplVtbl HTMLTableRowImplVtbl = {
HTMLTableRow_QI, HTMLTableRow_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col HTMLElement_get_attr_col
......
...@@ -414,6 +414,7 @@ static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_ ...@@ -414,6 +414,7 @@ static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_
static const NodeImplVtbl HTMLTextAreaElementImplVtbl = { static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
HTMLTextAreaElement_QI, HTMLTextAreaElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_handle_event, HTMLElement_handle_event,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
......
...@@ -191,6 +191,4 @@ void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, nsID ...@@ -191,6 +191,4 @@ void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, nsID
This->IHTMLTextContainer_iface.lpVtbl = &HTMLTextContainerVtbl; This->IHTMLTextContainer_iface.lpVtbl = &HTMLTextContainerVtbl;
HTMLElement_Init(&This->element, doc, nselem, dispex_data); HTMLElement_Init(&This->element, doc, nselem, dispex_data);
ConnectionPoint_Init(&This->cp, &This->element.cp_container, &DIID_HTMLTextContainerEvents, NULL);
} }
...@@ -186,9 +186,12 @@ static HRESULT HTMLDOMTextNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTM ...@@ -186,9 +186,12 @@ static HRESULT HTMLDOMTextNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTM
return HTMLDOMTextNode_Create(This->node.doc, nsnode, ret); return HTMLDOMTextNode_Create(This->node.doc, nsnode, ret);
} }
static const cpc_entry_t HTMLDOMTextNode_cpc[] = {{NULL}};
static const NodeImplVtbl HTMLDOMTextNodeImplVtbl = { static const NodeImplVtbl HTMLDOMTextNodeImplVtbl = {
HTMLDOMTextNode_QI, HTMLDOMTextNode_QI,
HTMLDOMNode_destructor, HTMLDOMNode_destructor,
HTMLDOMTextNode_cpc,
HTMLDOMTextNode_clone HTMLDOMTextNode_clone
}; };
......
...@@ -434,15 +434,21 @@ typedef struct _cp_static_data_t { ...@@ -434,15 +434,21 @@ typedef struct _cp_static_data_t {
DISPID *ids; DISPID *ids;
} cp_static_data_t; } cp_static_data_t;
typedef struct {
const IID *riid;
cp_static_data_t *desc;
} cpc_entry_t;
typedef struct ConnectionPointContainer { typedef struct ConnectionPointContainer {
IConnectionPointContainer IConnectionPointContainer_iface; IConnectionPointContainer IConnectionPointContainer_iface;
ConnectionPoint *cp_list; ConnectionPoint *cps;
const cpc_entry_t *cp_entries;
IUnknown *outer; IUnknown *outer;
struct ConnectionPointContainer *forward_container; struct ConnectionPointContainer *forward_container;
} ConnectionPointContainer; } ConnectionPointContainer;
struct ConnectionPoint { struct ConnectionPoint {
IConnectionPoint IConnectionPoint_iface; IConnectionPoint IConnectionPoint_iface;
ConnectionPointContainer *container; ConnectionPointContainer *container;
...@@ -456,8 +462,6 @@ struct ConnectionPoint { ...@@ -456,8 +462,6 @@ struct ConnectionPoint {
const IID *iid; const IID *iid;
cp_static_data_t *data; cp_static_data_t *data;
ConnectionPoint *next;
}; };
struct HTMLDocument { struct HTMLDocument {
...@@ -499,11 +503,6 @@ struct HTMLDocument { ...@@ -499,11 +503,6 @@ struct HTMLDocument {
LONG task_magic; LONG task_magic;
ConnectionPointContainer cp_container; ConnectionPointContainer cp_container;
ConnectionPoint cp_htmldocevents;
ConnectionPoint cp_htmldocevents2;
ConnectionPoint cp_propnotif;
ConnectionPoint cp_dispatch;
IOleAdviseHolder *advise_holder; IOleAdviseHolder *advise_holder;
}; };
...@@ -602,6 +601,7 @@ struct NSContainer { ...@@ -602,6 +601,7 @@ struct NSContainer {
typedef struct { typedef struct {
HRESULT (*qi)(HTMLDOMNode*,REFIID,void**); HRESULT (*qi)(HTMLDOMNode*,REFIID,void**);
void (*destructor)(HTMLDOMNode*); void (*destructor)(HTMLDOMNode*);
const cpc_entry_t *cpc_entries;
HRESULT (*clone)(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**); HRESULT (*clone)(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
HRESULT (*handle_event)(HTMLDOMNode*,DWORD,nsIDOMEvent*,BOOL*); HRESULT (*handle_event)(HTMLDOMNode*,DWORD,nsIDOMEvent*,BOOL*);
HRESULT (*get_attr_col)(HTMLDOMNode*,HTMLAttributeCollection**); HRESULT (*get_attr_col)(HTMLDOMNode*,HTMLAttributeCollection**);
...@@ -666,12 +666,13 @@ typedef struct { ...@@ -666,12 +666,13 @@ typedef struct {
IHTMLElement3_tid, \ IHTMLElement3_tid, \
IHTMLElement4_tid IHTMLElement4_tid
#define HTMLELEMENT_CPC {NULL}
extern const cpc_entry_t HTMLElement_cpc[];
typedef struct { typedef struct {
HTMLElement element; HTMLElement element;
IHTMLTextContainer IHTMLTextContainer_iface; IHTMLTextContainer IHTMLTextContainer_iface;
ConnectionPoint cp;
} HTMLTextContainer; } HTMLTextContainer;
struct HTMLFrameBase { struct HTMLFrameBase {
...@@ -755,8 +756,7 @@ void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN; ...@@ -755,8 +756,7 @@ void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
HRESULT HTMLCurrentStyle_Create(HTMLElement*,IHTMLCurrentStyle**) DECLSPEC_HIDDEN; HRESULT HTMLCurrentStyle_Create(HTMLElement*,IHTMLCurrentStyle**) DECLSPEC_HIDDEN;
void ConnectionPoint_Init(ConnectionPoint*,ConnectionPointContainer*,REFIID,cp_static_data_t*) DECLSPEC_HIDDEN; void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*,const cpc_entry_t*) DECLSPEC_HIDDEN;
void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*) DECLSPEC_HIDDEN;
void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN; void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN;
HRESULT create_nscontainer(HTMLDocumentObj*,NSContainer**) DECLSPEC_HIDDEN; HRESULT create_nscontainer(HTMLDocumentObj*,NSContainer**) DECLSPEC_HIDDEN;
...@@ -789,7 +789,7 @@ HRESULT nsuri_to_url(LPCWSTR,BOOL,BSTR*) DECLSPEC_HIDDEN; ...@@ -789,7 +789,7 @@ HRESULT nsuri_to_url(LPCWSTR,BOOL,BSTR*) DECLSPEC_HIDDEN;
HRESULT set_frame_doc(HTMLFrameBase*,nsIDOMDocument*) DECLSPEC_HIDDEN; HRESULT set_frame_doc(HTMLFrameBase*,nsIDOMDocument*) DECLSPEC_HIDDEN;
void call_property_onchanged(ConnectionPoint*,DISPID) DECLSPEC_HIDDEN; void call_property_onchanged(ConnectionPointContainer*,DISPID) DECLSPEC_HIDDEN;
HRESULT call_set_active_object(IOleInPlaceUIWindow*,IOleInPlaceActiveObject*) DECLSPEC_HIDDEN; HRESULT call_set_active_object(IOleInPlaceUIWindow*,IOleInPlaceActiveObject*) DECLSPEC_HIDDEN;
void *nsalloc(size_t) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN; void *nsalloc(size_t) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN;
......
...@@ -265,7 +265,7 @@ static void parse_complete(HTMLDocumentObj *doc) ...@@ -265,7 +265,7 @@ static void parse_complete(HTMLDocumentObj *doc)
call_explorer_69(doc); call_explorer_69(doc);
if(doc->view_sink) if(doc->view_sink)
IAdviseSink_OnViewChange(doc->view_sink, DVASPECT_CONTENT, -1); IAdviseSink_OnViewChange(doc->view_sink, DVASPECT_CONTENT, -1);
call_property_onchanged(&doc->basedoc.cp_propnotif, 1005); call_property_onchanged(&doc->basedoc.cp_container, 1005);
call_explorer_69(doc); call_explorer_69(doc);
if(doc->is_webbrowser && doc->usermode != EDITMODE && !(doc->basedoc.window->load_flags & BINDING_REFRESH)) if(doc->is_webbrowser && doc->usermode != EDITMODE && !(doc->basedoc.window->load_flags & BINDING_REFRESH))
......
...@@ -413,7 +413,7 @@ void set_ready_state(HTMLOuterWindow *window, READYSTATE readystate) ...@@ -413,7 +413,7 @@ void set_ready_state(HTMLOuterWindow *window, READYSTATE readystate)
window->readystate = readystate; window->readystate = readystate;
if(window->doc_obj && window->doc_obj->basedoc.window == window) if(window->doc_obj && window->doc_obj->basedoc.window == window)
call_property_onchanged(&window->doc_obj->basedoc.cp_propnotif, DISPID_READYSTATE); call_property_onchanged(&window->doc_obj->basedoc.cp_container, DISPID_READYSTATE);
fire_event(window->base.inner_window->doc, EVENTID_READYSTATECHANGE, FALSE, fire_event(window->base.inner_window->doc, EVENTID_READYSTATECHANGE, FALSE,
window->base.inner_window->doc->node.nsnode, NULL, NULL); window->base.inner_window->doc->node.nsnode, NULL, NULL);
......
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