mshtml: Added IConnectionPointContainer iface to all HTMLElement objects.
This commit is contained in:
parent
a9e77575b3
commit
2bcd1f0e9e
|
@ -40,7 +40,6 @@ typedef struct {
|
||||||
|
|
||||||
const IHTMLBodyElementVtbl *lpHTMLBodyElementVtbl;
|
const IHTMLBodyElementVtbl *lpHTMLBodyElementVtbl;
|
||||||
|
|
||||||
ConnectionPointContainer cp_container;
|
|
||||||
ConnectionPoint cp_propnotif;
|
ConnectionPoint cp_propnotif;
|
||||||
ConnectionPoint cp_txtcontevents;
|
ConnectionPoint cp_txtcontevents;
|
||||||
|
|
||||||
|
@ -464,9 +463,6 @@ static HRESULT HTMLBodyElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
||||||
}else if(IsEqualGUID(&IID_IHTMLTextContainer, riid)) {
|
}else if(IsEqualGUID(&IID_IHTMLTextContainer, riid)) {
|
||||||
TRACE("(%p)->(IID_IHTMLTextContainer %p)\n", &This->textcont, ppv);
|
TRACE("(%p)->(IID_IHTMLTextContainer %p)\n", &This->textcont, ppv);
|
||||||
*ppv = HTMLTEXTCONT(&This->textcont);
|
*ppv = HTMLTEXTCONT(&This->textcont);
|
||||||
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
|
|
||||||
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
|
|
||||||
*ppv = CONPTCONT(&This->cp_container);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*ppv) {
|
if(*ppv) {
|
||||||
|
@ -481,7 +477,6 @@ static void HTMLBodyElement_destructor(HTMLDOMNode *iface)
|
||||||
{
|
{
|
||||||
HTMLBodyElement *This = HTMLBODY_NODE_THIS(iface);
|
HTMLBodyElement *This = HTMLBODY_NODE_THIS(iface);
|
||||||
|
|
||||||
ConnectionPointContainer_Destroy(&This->cp_container);
|
|
||||||
nsIDOMHTMLBodyElement_Release(This->nsbody);
|
nsIDOMHTMLBodyElement_Release(This->nsbody);
|
||||||
|
|
||||||
HTMLElement_destructor(&This->textcont.element.node);
|
HTMLElement_destructor(&This->textcont.element.node);
|
||||||
|
@ -506,9 +501,9 @@ HTMLElement *HTMLBodyElement_Create(nsIDOMHTMLElement *nselem)
|
||||||
ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl;
|
ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl;
|
||||||
ret->textcont.element.node.vtbl = &HTMLBodyElementImplVtbl;
|
ret->textcont.element.node.vtbl = &HTMLBodyElementImplVtbl;
|
||||||
|
|
||||||
ConnectionPointContainer_Init(&ret->cp_container, (IUnknown*)HTMLBODY(ret));
|
ConnectionPoint_Init(&ret->cp_propnotif, &ret->textcont.element.cp_container, &IID_IPropertyNotifySink);
|
||||||
ConnectionPoint_Init(&ret->cp_propnotif, &ret->cp_container, &IID_IPropertyNotifySink);
|
ConnectionPoint_Init(&ret->cp_txtcontevents, &ret->textcont.element.cp_container,
|
||||||
ConnectionPoint_Init(&ret->cp_txtcontevents, &ret->cp_container, &DIID_HTMLTextContainerEvents);
|
&DIID_HTMLTextContainerEvents);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLBodyElement,
|
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLBodyElement,
|
||||||
(void**)&ret->nsbody);
|
(void**)&ret->nsbody);
|
||||||
|
|
|
@ -1255,6 +1255,9 @@ HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
||||||
}else if(IsEqualGUID(&IID_IHTMLElement2, riid)) {
|
}else if(IsEqualGUID(&IID_IHTMLElement2, riid)) {
|
||||||
TRACE("(%p)->(IID_IHTMLElement2 %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IHTMLElement2 %p)\n", This, ppv);
|
||||||
*ppv = HTMLELEM2(This);
|
*ppv = HTMLELEM2(This);
|
||||||
|
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
|
||||||
|
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
|
||||||
|
*ppv = CONPTCONT(&This->cp_container);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*ppv) {
|
if(*ppv) {
|
||||||
|
@ -1269,6 +1272,8 @@ void HTMLElement_destructor(HTMLDOMNode *iface)
|
||||||
{
|
{
|
||||||
HTMLElement *This = HTMLELEM_NODE_THIS(iface);
|
HTMLElement *This = HTMLELEM_NODE_THIS(iface);
|
||||||
|
|
||||||
|
ConnectionPointContainer_Destroy(&This->cp_container);
|
||||||
|
|
||||||
if(This->nselem)
|
if(This->nselem)
|
||||||
nsIDOMHTMLElement_Release(This->nselem);
|
nsIDOMHTMLElement_Release(This->nselem);
|
||||||
|
|
||||||
|
@ -1285,6 +1290,8 @@ void HTMLElement_Init(HTMLElement *This)
|
||||||
This->node.vtbl = &HTMLElementImplVtbl;
|
This->node.vtbl = &HTMLElementImplVtbl;
|
||||||
This->lpHTMLElementVtbl = &HTMLElementVtbl;
|
This->lpHTMLElementVtbl = &HTMLElementVtbl;
|
||||||
|
|
||||||
|
ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)HTMLELEM(This));
|
||||||
|
|
||||||
HTMLElement2_Init(This);
|
HTMLElement2_Init(This);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,6 +285,7 @@ struct HTMLDOMNode {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
HTMLDOMNode node;
|
HTMLDOMNode node;
|
||||||
|
ConnectionPointContainer cp_container;
|
||||||
|
|
||||||
const IHTMLElementVtbl *lpHTMLElementVtbl;
|
const IHTMLElementVtbl *lpHTMLElementVtbl;
|
||||||
const IHTMLElement2Vtbl *lpHTMLElement2Vtbl;
|
const IHTMLElement2Vtbl *lpHTMLElement2Vtbl;
|
||||||
|
|
Loading…
Reference in New Issue