From 44a314945bacb36db0d7923f20138c78e3764b88 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 25 Jun 2008 19:28:53 -0500 Subject: [PATCH] mshtml: Added DOCUMENT_NODE type support. --- dlls/mshtml/htmlnode.c | 3 +++ dlls/mshtml/tests/dom.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index b802e904de1..ae2bff0a699 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -370,6 +370,9 @@ static HRESULT WINAPI HTMLDOMNode_get_nodeType(IHTMLDOMNode *iface, long *p) case COMMENT_NODE: *p = 8; break; + case DOCUMENT_NODE: + *p = 9; + break; default: /* * FIXME: diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 0748c89b405..d06ad4c6462 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2068,6 +2068,8 @@ static void test_elems(IHTMLDocument2 *doc) IHTMLDOMNode_Release(node2); ok(node != NULL, "node == NULL\n"); test_node_name((IUnknown*)node, "#document"); + type = get_node_type((IUnknown*)node); + ok(type == 9, "type=%ld, expected 9\n", type); node2 = test_node_get_parent((IUnknown*)node); IHTMLDOMNode_Release(node); ok(node2 == NULL, "node != NULL\n");