From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.c | 14 +++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index fbdc739a55e..5ef5204ecf6 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1120,15 +1120,15 @@ static const dispex_static_data_vtbl_t HTMLRectCollection_dispex_vtbl = { .get_prop_desc = dispex_index_prop_desc, .invoke = HTMLRectCollection_invoke, }; -static const tid_t HTMLRectCollection_iface_tids[] = { +static const tid_t ClientRectList_iface_tids[] = { IHTMLRectCollection_tid, 0 }; -static dispex_static_data_t HTMLRectCollection_dispex = { - "ClientRectList", - &HTMLRectCollection_dispex_vtbl, - IHTMLRectCollection_tid, - HTMLRectCollection_iface_tids +dispex_static_data_t ClientRectList_dispex = { + .id = PROT_ClientRectList, + .vtbl = &HTMLRectCollection_dispex_vtbl, + .disp_tid = IHTMLRectCollection_tid, + .iface_tids = ClientRectList_iface_tids, };
DISPEX_IDISPATCH_IMPL(HTMLElement, IHTMLElement, @@ -3038,7 +3038,7 @@ static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRec
rects->IHTMLRectCollection_iface.lpVtbl = &HTMLRectCollectionVtbl; rects->rect_list = rect_list; - init_dispatch(&rects->dispex, &HTMLRectCollection_dispex, This->node.doc->script_global, + init_dispatch(&rects->dispex, &ClientRectList_dispex, This->node.doc->script_global, dispex_compat_mode(&This->node.event_target.dispex));
*pRectCol = &rects->IHTMLRectCollection_iface; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 39820527546..9e302e76bd6 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -413,6 +413,7 @@ typedef struct { X(CSSStyleSheet) \ X(CharacterData) \ X(ClientRect) \ + X(ClientRectList) \ X(Console) \ X(CustomEvent) \ X(DOMImplementation) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 7626f439d29..539fd1188d0 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3237,6 +3237,8 @@ sync_test("prototypes", function() { check(CSSRule.prototype, Object.prototype, "css rule prototype"); check(document.body.getBoundingClientRect(), ClientRect.prototype, "rect"); check(ClientRect.prototype, Object.prototype, "rect prototype"); + check(document.body.getClientRects(), ClientRectList.prototype, "rect list"); + check(ClientRectList.prototype, Object.prototype, "rect list prototype"); if(v < 11) { check(document.createEventObject(), MSEventObj.prototype, "event obj"); check(MSEventObj.prototype, Object.prototype, "event obj prototype");
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.c | 15 ++++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 6 ++++++ 3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 5ef5204ecf6..ca76f8015d2 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7121,15 +7121,16 @@ static const dispex_static_data_vtbl_t token_list_dispex_vtbl = { .invoke = token_list_invoke };
-static const tid_t token_list_iface_tids[] = { +static const tid_t DOMTokenList_tids[] = { IWineDOMTokenList_tid, 0 }; -static dispex_static_data_t token_list_dispex = { - "DOMTokenList", - &token_list_dispex_vtbl, - IWineDOMTokenList_tid, - token_list_iface_tids +dispex_static_data_t DOMTokenList_dispex = { + .id = PROT_DOMTokenList, + .vtbl = &token_list_dispex_vtbl, + .disp_tid = IWineDOMTokenList_tid, + .iface_tids = DOMTokenList_tids, + .min_compat_mode = COMPAT_MODE_IE10, };
static HRESULT create_token_list(compat_mode_t compat_mode, HTMLElement *element, IWineDOMTokenList **ret) @@ -7144,7 +7145,7 @@ static HRESULT create_token_list(compat_mode_t compat_mode, HTMLElement *element }
obj->IWineDOMTokenList_iface.lpVtbl = &WineDOMTokenListVtbl; - init_dispatch_with_owner(&obj->dispex, &token_list_dispex, &element->node.event_target.dispex); + init_dispatch_with_owner(&obj->dispex, &DOMTokenList_dispex, &element->node.event_target.dispex); obj->element = &element->IHTMLElement_iface; IHTMLElement_AddRef(obj->element);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 9e302e76bd6..ebd0b01751a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -417,6 +417,7 @@ typedef struct { X(Console) \ X(CustomEvent) \ X(DOMImplementation) \ + X(DOMTokenList) \ X(Document) \ X(DocumentType) \ X(Element) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 539fd1188d0..2e514a16f1f 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3299,4 +3299,10 @@ sync_test("prototypes", function() { }else { ok(!("MediaQueryList" in window), "MediaQueryList found in window"); } + if(v >= 10) { + check(document.body.classList, DOMTokenList.prototype, "token list"); + check(DOMTokenList.prototype, Object.prototype, "token list prototype"); + }else { + ok(!("DOMTokenList" in window), "DOMTokenList found in window"); + } });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.c | 14 +++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index ca76f8015d2..e9ecfc77a65 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -8084,18 +8084,18 @@ static const dispex_static_data_vtbl_t HTMLAttributeCollection_dispex_vtbl = { .invoke = HTMLAttributeCollection_invoke, };
-static const tid_t HTMLAttributeCollection_iface_tids[] = { +const tid_t NamedNodeMap_iface_tids[] = { IHTMLAttributeCollection_tid, IHTMLAttributeCollection2_tid, IHTMLAttributeCollection3_tid, 0 };
-static dispex_static_data_t HTMLAttributeCollection_dispex = { - "NamedNodeMap", - &HTMLAttributeCollection_dispex_vtbl, - DispHTMLAttributeCollection_tid, - HTMLAttributeCollection_iface_tids +dispex_static_data_t NamedNodeMap_dispex = { + .id = PROT_NamedNodeMap, + .vtbl = &HTMLAttributeCollection_dispex_vtbl, + .disp_tid = DispHTMLAttributeCollection_tid, + .iface_tids = NamedNodeMap_iface_tids, };
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac) @@ -8119,7 +8119,7 @@ HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **a IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); This->attrs->elem = This; list_init(&This->attrs->attrs); - init_dispatch(&This->attrs->dispex, &HTMLAttributeCollection_dispex, This->node.doc->script_global, + init_dispatch(&This->attrs->dispex, &NamedNodeMap_dispex, This->node.doc->script_global, dispex_compat_mode(&This->node.event_target.dispex));
*ac = This->attrs; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index ebd0b01751a..f6ebe212b9a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -463,6 +463,7 @@ typedef struct { X(MimeTypeArray) \ X(MouseEvent) \ X(MutationObserver) \ + X(NamedNodeMap) \ X(Navigator) \ X(Node) \ X(PageTransitionEvent) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 2e514a16f1f..ec69e021e55 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3305,4 +3305,6 @@ sync_test("prototypes", function() { }else { ok(!("DOMTokenList" in window), "DOMTokenList found in window"); } + check(document.body.attributes, NamedNodeMap.prototype, "node map"); + check(NamedNodeMap.prototype, Object.prototype, "node map prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelemcol.c | 14 +++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index 625af9781b8..dd7ffeea222 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -569,16 +569,16 @@ static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = { .invoke = HTMLElementCollection_invoke, };
-static const tid_t HTMLElementCollection_iface_tids[] = { +static const tid_t HTMLCollection_iface_tids[] = { IHTMLElementCollection_tid, 0 };
-static dispex_static_data_t HTMLElementCollection_dispex = { - "HTMLCollection", - &HTMLElementColection_dispex_vtbl, - DispHTMLElementCollection_tid, - HTMLElementCollection_iface_tids +dispex_static_data_t HTMLCollection_dispex = { + .id = PROT_HTMLCollection, + .vtbl = &HTMLElementColection_dispex_vtbl, + .disp_tid = DispHTMLElementCollection_tid, + .iface_tids = HTMLCollection_iface_tids, };
static void create_all_list(HTMLDOMNode *elem, elem_vector_t *buf) @@ -795,7 +795,7 @@ static IHTMLElementCollection *HTMLElementCollection_Create(HTMLElement **elems, ret->elems = elems; ret->len = len;
- init_dispatch_with_owner(&ret->dispex, &HTMLElementCollection_dispex, owner); + init_dispatch_with_owner(&ret->dispex, &HTMLCollection_dispex, owner);
TRACE("ret=%p len=%ld\n", ret, len);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f6ebe212b9a..f13059eba95 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -426,6 +426,7 @@ typedef struct { X(HTMLAreaElement) \ X(HTMLBodyElement) \ X(HTMLButtonElement) \ + X(HTMLCollection) \ X(HTMLDocument) \ X(HTMLElement) \ X(HTMLEmbedElement) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index ec69e021e55..fd26cddb403 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3307,4 +3307,6 @@ sync_test("prototypes", function() { } check(document.body.attributes, NamedNodeMap.prototype, "node map"); check(NamedNodeMap.prototype, Object.prototype, "node map prototype"); + check(document.getElementsByTagName("body"), HTMLCollection.prototype, "elem collection"); + check(HTMLCollection.prototype, Object.prototype, "elem collection prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlnode.c | 16 ++++++++-------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index b20fe678091..7fad8f22357 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -378,17 +378,17 @@ static const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl = { .invoke = HTMLDOMChildrenCollection_invoke, };
-static const tid_t HTMLDOMChildrenCollection_iface_tids[] = { +static const tid_t NodeList_iface_tids[] = { IHTMLDOMChildrenCollection_tid, 0 };
-static dispex_static_data_t HTMLDOMChildrenCollection_dispex = { - "NodeList", - &HTMLDOMChildrenCollection_dispex_vtbl, - DispDOMChildrenCollection_tid, - HTMLDOMChildrenCollection_iface_tids, - HTMLDOMNode_init_dispex_info +dispex_static_data_t NodeList_dispex = { + .id = PROT_NodeList, + .vtbl = &HTMLDOMChildrenCollection_dispex_vtbl, + .disp_tid = DispDOMChildrenCollection_tid, + .iface_tids = NodeList_iface_tids, + .init_info = HTMLDOMNode_init_dispex_info, };
HRESULT create_child_collection(nsIDOMNodeList *nslist, DispatchEx *owner, IHTMLDOMChildrenCollection **ret) @@ -403,7 +403,7 @@ HRESULT create_child_collection(nsIDOMNodeList *nslist, DispatchEx *owner, IHTML nsIDOMNodeList_AddRef(nslist); collection->nslist = nslist;
- init_dispatch_with_owner(&collection->dispex, &HTMLDOMChildrenCollection_dispex, owner); + init_dispatch_with_owner(&collection->dispex, &NodeList_dispex, owner);
*ret = &collection->IHTMLDOMChildrenCollection_iface; return S_OK; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f13059eba95..e022874ff42 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -467,6 +467,7 @@ typedef struct { X(NamedNodeMap) \ X(Navigator) \ X(Node) \ + X(NodeList) \ X(PageTransitionEvent) \ X(Performance) \ X(PerformanceNavigation) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index fd26cddb403..90a3f6c642c 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3309,4 +3309,6 @@ sync_test("prototypes", function() { check(NamedNodeMap.prototype, Object.prototype, "node map prototype"); check(document.getElementsByTagName("body"), HTMLCollection.prototype, "elem collection"); check(HTMLCollection.prototype, Object.prototype, "elem collection prototype"); + check(document.body.childNodes, NodeList.prototype, "node list"); + check(NodeList.prototype, Object.prototype, "node list prototype"); });
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"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/range.c | 14 +++++++------- dlls/mshtml/tests/documentmode.js | 1 + 3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index ed713473065..07ef3191c4d 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -474,6 +474,7 @@ typedef struct { X(PerformanceTiming) \ X(PluginArray) \ X(ProgressEvent) \ + X(Range) \ X(SVGCircleElement) \ X(SVGElement) \ X(SVGSVGElement) \ diff --git a/dlls/mshtml/range.c b/dlls/mshtml/range.c index ecbd16edb99..f10a42a895d 100644 --- a/dlls/mshtml/range.c +++ b/dlls/mshtml/range.c @@ -1985,16 +1985,16 @@ static const dispex_static_data_vtbl_t HTMLDOMRange_dispex_vtbl = { .unlink = HTMLDOMRange_unlink };
-static const tid_t HTMLDOMRange_iface_tids[] = { +static const tid_t Range_iface_tids[] = { IHTMLDOMRange_tid, 0 };
-static dispex_static_data_t HTMLDOMRange_dispex = { - "Range", - &HTMLDOMRange_dispex_vtbl, - DispHTMLDOMRange_tid, - HTMLDOMRange_iface_tids +dispex_static_data_t Range_dispex = { + .id = PROT_Range, + .vtbl = &HTMLDOMRange_dispex_vtbl, + .disp_tid = DispHTMLDOMRange_tid, + .iface_tids = Range_iface_tids, };
HRESULT create_dom_range(nsIDOMRange *nsrange, HTMLDocumentNode *doc, IHTMLDOMRange **p) @@ -2005,7 +2005,7 @@ HRESULT create_dom_range(nsIDOMRange *nsrange, HTMLDocumentNode *doc, IHTMLDOMRa if(!ret) return E_OUTOFMEMORY;
- init_dispatch(&ret->dispex, &HTMLDOMRange_dispex, doc->script_global, + init_dispatch(&ret->dispex, &Range_dispex, doc->script_global, dispex_compat_mode(&doc->node.event_target.dispex));
ret->IHTMLDOMRange_iface.lpVtbl = &HTMLDOMRangeVtbl; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index cfa99f6b728..f144619cb85 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3313,4 +3313,5 @@ sync_test("prototypes", function() { check(NodeList.prototype, Object.prototype, "node list prototype"); check(document.body.createTextRange(), TextRange.prototype, "text range"); check(TextRange.prototype, Object.prototype, "text range prototype"); + check(Range.prototype, Object.prototype, "range prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/selection.c | 15 ++++++++------- dlls/mshtml/tests/documentmode.js | 6 ++++++ 3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 07ef3191c4d..0220285ac8e 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -458,6 +458,7 @@ typedef struct { X(MSCurrentStyleCSSProperties) \ X(MSEventObj) \ X(MSNamespaceInfoCollection) \ + X(MSSelection) \ X(MSStyleCSSProperties) \ X(MediaQueryList) \ X(MessageEvent) \ diff --git a/dlls/mshtml/selection.c b/dlls/mshtml/selection.c index c20c24dad5f..03d269dbb0a 100644 --- a/dlls/mshtml/selection.c +++ b/dlls/mshtml/selection.c @@ -233,16 +233,17 @@ static const dispex_static_data_vtbl_t HTMLSelectionObject_dispex_vtbl = { .unlink = HTMLSelectionObject_unlink };
-static const tid_t HTMLSelectionObject_iface_tids[] = { +static const tid_t MSSelection_iface_tids[] = { IHTMLSelectionObject_tid, IHTMLSelectionObject2_tid, 0 }; -static dispex_static_data_t HTMLSelectionObject_dispex = { - "MSSelection", - &HTMLSelectionObject_dispex_vtbl, - IHTMLSelectionObject_tid, /* FIXME: We have a test for that, but it doesn't expose IHTMLSelectionObject2 iface. */ - HTMLSelectionObject_iface_tids +dispex_static_data_t MSSelection_dispex = { + .id = PROT_MSSelection, + .vtbl = &HTMLSelectionObject_dispex_vtbl, + .disp_tid = IHTMLSelectionObject_tid, + .iface_tids = MSSelection_iface_tids, + .max_compat_mode = COMPAT_MODE_IE10, };
HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselection, IHTMLSelectionObject **ret) @@ -253,7 +254,7 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect if(!selection) return E_OUTOFMEMORY;
- init_dispatch(&selection->dispex, &HTMLSelectionObject_dispex, doc->script_global, + init_dispatch(&selection->dispex, &MSSelection_dispex, doc->script_global, dispex_compat_mode(&doc->node.event_target.dispex));
selection->IHTMLSelectionObject_iface.lpVtbl = &HTMLSelectionObjectVtbl; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index f144619cb85..13cef923018 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3314,4 +3314,10 @@ sync_test("prototypes", function() { check(document.body.createTextRange(), TextRange.prototype, "text range"); check(TextRange.prototype, Object.prototype, "text range prototype"); check(Range.prototype, Object.prototype, "range prototype"); + if(v < 11) { + check(document.selection, MSSelection.prototype, "selection"); + check(MSSelection.prototype, Object.prototype, "selection prototype"); + }else { + ok(!("MSSelection" in window), "MSSelection found in window"); + } });