From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/range.c | 14 +++++++------- dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index e022874ff42..ed713473065 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -486,6 +486,7 @@ typedef struct { X(StyleSheet) \ X(StyleSheetList) \ X(Text) \ + X(TextRange) \ X(UIEvent) \ X(Window) \ X(XMLHttpRequest) diff --git a/dlls/mshtml/range.c b/dlls/mshtml/range.c index 4129834b9b7..ecbd16edb99 100644 --- a/dlls/mshtml/range.c +++ b/dlls/mshtml/range.c @@ -1680,15 +1680,15 @@ static const dispex_static_data_vtbl_t HTMLTxtRange_dispex_vtbl = { .unlink = HTMLTxtRange_unlink };
-static const tid_t HTMLTxtRange_iface_tids[] = { +static const tid_t TextRange_iface_tids[] = { IHTMLTxtRange_tid, 0 }; -static dispex_static_data_t HTMLTxtRange_dispex = { - "TextRange", - &HTMLTxtRange_dispex_vtbl, - IHTMLTxtRange_tid, - HTMLTxtRange_iface_tids +dispex_static_data_t TextRange_dispex = { + .id = PROT_TextRange, + .vtbl = &HTMLTxtRange_dispex_vtbl, + .disp_tid = IHTMLTxtRange_tid, + .iface_tids = TextRange_iface_tids, };
HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTxtRange **p) @@ -1699,7 +1699,7 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTx if(!ret) return E_OUTOFMEMORY;
- init_dispatch(&ret->dispex, &HTMLTxtRange_dispex, doc->script_global, + init_dispatch(&ret->dispex, &TextRange_dispex, doc->script_global, dispex_compat_mode(&doc->node.event_target.dispex));
ret->IHTMLTxtRange_iface.lpVtbl = &HTMLTxtRangeVtbl; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 90a3f6c642c..cfa99f6b728 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3311,4 +3311,6 @@ sync_test("prototypes", function() { check(HTMLCollection.prototype, Object.prototype, "elem collection prototype"); check(document.body.childNodes, NodeList.prototype, "node list"); check(NodeList.prototype, Object.prototype, "node list prototype"); + check(document.body.createTextRange(), TextRange.prototype, "text range"); + check(TextRange.prototype, Object.prototype, "text range prototype"); });