From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmldoc.c | 12 +++++++++++- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 3f74dbd2826..260264642b2 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -5823,6 +5823,15 @@ HRESULT create_document_node(nsIDOMDocument *nsdoc, GeckoBrowser *browser, HTMLI return S_OK; }
+dispex_static_data_t DocumentFragment_dispex = { + .id = PROT_DocumentFragment, + .prototype_id = PROT_Node, + .vtbl = &HTMLDocument_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLDocument_tid, + .iface_tids = HTMLDocumentNode_iface_tids, + .init_info = HTMLDocumentNode_init_dispex_info, +}; + static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node, HTMLDocumentNode **ret) { HTMLDocumentNode *doc_frag; @@ -5831,9 +5840,10 @@ static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *do if(!doc_frag) return E_OUTOFMEMORY;
- HTMLDOMNode_Init(doc_node, &doc_frag->node, nsnode, &HTMLDocument_dispex); + HTMLDOMNode_Init(doc_node, &doc_frag->node, nsnode, &DocumentFragment_dispex); doc_frag->node.vtbl = &HTMLDocumentFragmentImplVtbl; doc_frag->document_mode = lock_document_mode(doc_node); + dispex_compat_mode(&doc_frag->node.event_target.dispex); /* make sure the object is fully initialized */
*ret = doc_frag; return S_OK; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 463e486366c..e63a05f4314 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -421,6 +421,7 @@ typedef struct { X(DOMImplementation) \ X(DOMTokenList) \ X(Document) \ + X(DocumentFragment) \ X(DocumentType) \ X(Element) \ X(Event) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index fe82105ea8c..97941bb81c2 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3327,4 +3327,6 @@ sync_test("prototypes", function() { check(Comment.prototype, CharacterData.prototype, "comment prototype"); check(document.createAttribute("test"), Attr.prototype, "attr"); check(Attr.prototype, Node.prototype, "attr prototype"); + check(document.createDocumentFragment(), DocumentFragment.prototype, "fragment"); + check(DocumentFragment.prototype, Node.prototype, "fragment prototype"); });