From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlcomment.c | 19 ++++++++++--------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlcomment.c b/dlls/mshtml/htmlcomment.c index a96915a58cc..b2507385623 100644 --- a/dlls/mshtml/htmlcomment.c +++ b/dlls/mshtml/htmlcomment.c @@ -143,17 +143,18 @@ static const event_target_vtbl_t HTMLCommentElement_event_target_vtbl = { .handle_event = HTMLElement_handle_event };
-static const tid_t HTMLCommentElement_iface_tids[] = { +static const tid_t Comment_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLCommentElement_tid, 0 }; -static dispex_static_data_t HTMLCommentElement_dispex = { - "Comment", - &HTMLCommentElement_event_target_vtbl.dispex_vtbl, - DispHTMLCommentElement_tid, - HTMLCommentElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t Comment_dispex = { + .id = PROT_Comment, + .prototype_id = PROT_CharacterData, + .vtbl = &HTMLCommentElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLCommentElement_tid, + .iface_tids = Comment_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLCommentElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLElement **elem) @@ -167,8 +168,8 @@ HRESULT HTMLCommentElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTM ret->element.node.vtbl = &HTMLCommentElementImplVtbl; ret->IHTMLCommentElement_iface.lpVtbl = &HTMLCommentElementVtbl;
- HTMLElement_Init(&ret->element, doc, NULL, &HTMLCommentElement_dispex); - HTMLDOMNode_Init(doc, &ret->element.node, nsnode, &HTMLCommentElement_dispex); + HTMLElement_Init(&ret->element, doc, NULL, &Comment_dispex); + HTMLDOMNode_Init(doc, &ret->element.node, nsnode, &Comment_dispex);
*elem = &ret->element; return S_OK; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index ff9335be2fe..ddedf8a4035 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -414,6 +414,7 @@ typedef struct { X(CharacterData) \ X(ClientRect) \ X(ClientRectList) \ + X(Comment) \ X(Console) \ X(CustomEvent) \ X(DOMImplementation) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 459ac523239..612bfe02d75 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3323,4 +3323,6 @@ sync_test("prototypes", function() { }else { ok(!("MSSelection" in window), "MSSelection found in window"); } + check(document.createComment(""), Comment.prototype, "comment"); + check(Comment.prototype, CharacterData.prototype, "comment prototype"); });