Hi Alistair,
Alistair Leslie-Hughes wrote:
Hi,
Changelog: mshtml: Pass IID_IHTMLBodyElement to the IDispatchEx interface
Look at other elements implementation how to do it properly. Your patch will break scripts that use body element.
+static const tid_t HTMLBodyElement_iface_tids[] = {
- IHTMLBodyElement_tid,
- 0
+};
You should add IHTMLDOMNode_tid, IHTMLDOMNode2_tid, IHTMLElement_tid, IHTMLElement2_tid, here.
+static dispex_static_data_t HTMLBodyElement_dispex = {
- NULL,
- IHTMLBodyElement_tid,
You should use DispHTMLBodyElement here.
@@ -601,6 +613,7 @@ HTMLElement *HTMLBodyElement_Create(nsIDOMHTMLElement *nselem) HTMLTextContainer_Init(&ret->textcont);
ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl;
- ret->textcont.element.node.dispex.data = &HTMLBodyElement_dispex;
You should call init_dispex here.
Jacek
Hi Jacek, Thanks for you feedback.
Jacek Caban wrote:
Hi Alistair,
You should add IHTMLDOMNode_tid, IHTMLDOMNode2_tid, IHTMLElement_tid, IHTMLElement2_tid,
Can you tell me what this list is for?
here.
+static dispex_static_data_t HTMLBodyElement_dispex = {
- NULL,
- IHTMLBodyElement_tid,
You should use DispHTMLBodyElement here.
I assumed the DispHTMLBodyElement_tid == DIID_IHTMLBodyElement, based off the current implementation, but DIID_IHTMLBodyElement doesn't exist in the mshtml.h file (Microsoft one). This is why I used IHTMLBodyElement_tid. So make DispHTMLBodyElement_tid = IID_IHTMLBodyElement?
Best Regards Alistair Leslie-Hughes
Alistair Leslie-Hughes wrote:
Hi Jacek, Thanks for you feedback.
Jacek Caban wrote:
Hi Alistair,
You should add IHTMLDOMNode_tid, IHTMLDOMNode2_tid, IHTMLElement_tid, IHTMLElement2_tid,
Can you tell me what this list is for?
We need to support functions that are in different dual interfaces. There is one interface (usually called Disp*) that contains all object's methods, but, as it's dispinterface, we can't use it in ITypeInfo::Invoke call. That's why we also need a list of dual interfaces to build a list of methods containing all info we need. Let me know if you need more explanation.
here.
+static dispex_static_data_t HTMLBodyElement_dispex = {
- NULL,
- IHTMLBodyElement_tid,
You should use DispHTMLBodyElement here.
I assumed the DispHTMLBodyElement_tid == DIID_IHTMLBodyElement, based off the current implementation, but DIID_IHTMLBodyElement doesn't exist in the mshtml.h file (Microsoft one). This is why I used IHTMLBodyElement_tid. So make DispHTMLBodyElement_tid = IID_IHTMLBodyElement?
It looks like body element breaks the naming convention of other element's interfaces and it's called DispHTMLBody (its iid is DIID_DispHTMLBody).
Jacek