Module: wine Branch: master Commit: d4be45fc9ab663aaa40be16566da1b68ee1b0ed8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d4be45fc9ab663aaa40be16566...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Jul 19 20:32:55 2017 +0200
mshtml: Expose IHTMLDOMNode3 interface to scripts.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/htmlelem.c | 2 ++ dlls/mshtml/htmlnode.c | 9 ++++++++- dlls/mshtml/htmltextnode.c | 7 ++++--- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/documentmode.js | 2 ++ 5 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 4f7a383..dd23517 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -5176,6 +5176,8 @@ void HTMLElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode) { static const DISPID elem2_ie11_blacklist[] = {DISPID_IHTMLELEMENT2_DOSCROLL, DISPID_UNKNOWN};
+ HTMLDOMNode_init_dispex_info(info, mode); + dispex_info_add_interface(info, IHTMLElement2_tid, mode >= COMPAT_MODE_IE11 ? elem2_ie11_blacklist : NULL);
if(mode >= COMPAT_MODE_IE8) diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index d3c1473..8202803 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -436,7 +436,8 @@ static const tid_t HTMLDOMChildrenCollection_iface_tids[] = { static dispex_static_data_t HTMLDOMChildrenCollection_dispex = { &HTMLDOMChildrenCollection_dispex_vtbl, DispDOMChildrenCollection_tid, - HTMLDOMChildrenCollection_iface_tids + HTMLDOMChildrenCollection_iface_tids, + HTMLDOMNode_init_dispex_info };
IHTMLDOMChildrenCollection *create_child_collection(HTMLDocumentNode *doc, nsIDOMNodeList *nslist) @@ -1401,6 +1402,12 @@ static HRESULT HTMLDOMNode_clone(HTMLDOMNode *This, nsIDOMNode *nsnode, HTMLDOMN return create_node(This->doc, nsnode, ret); }
+void HTMLDOMNode_init_dispex_info(dispex_data_t *info, compat_mode_t mode) +{ + if(mode >= COMPAT_MODE_IE9) + dispex_info_add_interface(info, IHTMLDOMNode3_tid, NULL); +} + static const cpc_entry_t HTMLDOMNode_cpc[] = {{NULL}};
static const NodeImplVtbl HTMLDOMNodeImplVtbl = { diff --git a/dlls/mshtml/htmltextnode.c b/dlls/mshtml/htmltextnode.c index edf8efd..a5587c1 100644 --- a/dlls/mshtml/htmltextnode.c +++ b/dlls/mshtml/htmltextnode.c @@ -361,7 +361,8 @@ static const tid_t HTMLDOMTextNode_iface_tids[] = { static dispex_static_data_t HTMLDOMTextNode_dispex = { NULL, DispHTMLDOMTextNode_tid, - HTMLDOMTextNode_iface_tids + HTMLDOMTextNode_iface_tids, + HTMLDOMNode_init_dispex_info };
HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDOMNode **node) @@ -377,8 +378,8 @@ HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDO ret->IHTMLDOMTextNode_iface.lpVtbl = &HTMLDOMTextNodeVtbl; ret->IHTMLDOMTextNode2_iface.lpVtbl = &HTMLDOMTextNode2Vtbl;
- init_dispex(&ret->node.event_target.dispex, (IUnknown*)&ret->IHTMLDOMTextNode_iface, - &HTMLDOMTextNode_dispex); + init_dispex_with_compat_mode(&ret->node.event_target.dispex, (IUnknown*)&ret->IHTMLDOMTextNode_iface, + &HTMLDOMTextNode_dispex, doc->document_mode);
HTMLDOMNode_Init(doc, &ret->node, nsnode);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 3c32ffe..9bdb0844 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -151,6 +151,7 @@ typedef struct EventTarget EventTarget; XIID(IHTMLDOMImplementation) \ XIID(IHTMLDOMNode) \ XIID(IHTMLDOMNode2) \ + XIID(IHTMLDOMNode3) \ XIID(IHTMLDOMTextNode) \ XIID(IHTMLDOMTextNode2) \ XIID(IHTMLElement) \ @@ -1039,6 +1040,7 @@ void HTMLFrameBase_Init(HTMLFrameBase*,HTMLDocumentNode*,nsIDOMHTMLElement*,disp
HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**) DECLSPEC_HIDDEN; void HTMLDOMNode_destructor(HTMLDOMNode*) DECLSPEC_HIDDEN; +void HTMLDOMNode_init_dispex_info(dispex_data_t*,compat_mode_t) DECLSPEC_HIDDEN;
HRESULT HTMLElement_QI(HTMLDOMNode*,REFIID,void**) DECLSPEC_HIDDEN; void HTMLElement_destructor(HTMLDOMNode*) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index a7340e2..84138e7 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -32,6 +32,8 @@ function test_elem_props() {
test_exposed("doScroll", v < 11); test_exposed("querySelectorAll", v >= 8); + test_exposed("textContent", v >= 9); + test_exposed("prefix", v >= 9);
next_test(); }