Hi,
I've just sent a test showing that native doesn't implement these interfaces so we shouldn't either. It's strange because IDL declaration says something else. And BTW. your patch violates COM QueryInterface rules (not that MS always respects these rules...).
Thanks, Jacek
Jacek Caban wrote:
Hi,
I've just sent a test showing that native doesn't implement these interfaces so we shouldn't either. It's strange because IDL declaration says something else.
All of the interfaces that the patch implements or just IHTMLDOMNode that your tests show isn't implemented?
And BTW. your patch violates COM QueryInterface rules (not that MS always respects these rules...).
Well spotted. I'll fix that.
Robert Shearman wrote:
Jacek Caban wrote:
Hi,
I've just sent a test showing that native doesn't implement these interfaces so we shouldn't either. It's strange because IDL declaration says something else.
All of the interfaces that the patch implements or just IHTMLDOMNode that your tests show isn't implemented?
All of these interfaces are not supported by HTMLDocument. I've included only IHTMLDOMNode in the patch as it's what IDL definition includes.
Thanks, Jacek
Jacek Caban wrote:
Robert Shearman wrote:
Jacek Caban wrote:
Hi,
I've just sent a test showing that native doesn't implement these interfaces so we shouldn't either. It's strange because IDL declaration says something else.
All of the interfaces that the patch implements or just IHTMLDOMNode that your tests show isn't implemented?
All of these interfaces are not supported by HTMLDocument. I've included only IHTMLDOMNode in the patch as it's what IDL definition includes.
I suspect that you'll get different results when you do the same test on a loaded HTML document, even though this violates COM rules.
Robert Shearman wrote:
I suspect that you'll get different results when you do the same test on a loaded HTML document, even though this violates COM rules.
No, load state doesn't change anything. I've attached a test.
Jacek
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 09f905a..44c98c2 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -74,6 +74,27 @@ static void test_node_name(IUnknown *unk, const char *exname) SysFreeString(name); }
+static void test_QueryInterface(IUnknown *unk) +{ + IUnknown *qi; + HRESULT hres; + + qi = (void*)0xdeadbeef; + hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&qi); + ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); + ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi); + + qi = (void*)0xdeadbeef; + hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode, (void**)&qi); + ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); + ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi); + + qi = (void*)0xdeadbeef; + hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode2, (void**)&qi); + ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); + ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi); +} + static void test_doc_elem(IHTMLDocument2 *doc) { IHTMLElement *elem; @@ -90,6 +111,8 @@ static void test_doc_elem(IHTMLDocument2 *doc) test_node_name((IUnknown*)elem, "HTML");
IHTMLElement_Release(elem); + + test_QueryInterface((IUnknown*)doc); }
static IHTMLDocument2 *notif_doc;