Jacek Caban : mshtml: Added IElementSelector interface stub implementation.

Alexandre Julliard julliard at winehq.org
Fri Jun 17 10:35:00 CDT 2016


Module: wine
Branch: master
Commit: ba9da24d7cff5601b6482f7dc66787ccd8297948
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ba9da24d7cff5601b6482f7dc66787ccd8297948

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Jun 16 19:29:46 2016 +0200

mshtml: Added IElementSelector interface stub implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmlelem.c       | 80 ++++++++++++++++++++++++++++++++++++++++++++
 dlls/mshtml/mshtml_private.h |  5 ++-
 2 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index 67c8460..8aac47b 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -4020,6 +4020,83 @@ static const IHTMLUniqueNameVtbl HTMLUniqueNameVtbl = {
     HTMLUniqueName_get_uniqueID
 };
 
+static inline HTMLElement *impl_from_IElementSelector(IElementSelector *iface)
+{
+    return CONTAINING_RECORD(iface, HTMLElement, IElementSelector_iface);
+}
+
+static HRESULT WINAPI ElementSelector_QueryInterface(IElementSelector *iface, REFIID riid, void **ppv)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    return IHTMLElement_QueryInterface(&This->IHTMLElement_iface, riid, ppv);
+}
+
+static ULONG WINAPI ElementSelector_AddRef(IElementSelector *iface)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    return IHTMLElement_AddRef(&This->IHTMLElement_iface);
+}
+
+static ULONG WINAPI ElementSelector_Release(IElementSelector *iface)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    return IHTMLElement_Release(&This->IHTMLElement_iface);
+}
+
+static HRESULT WINAPI ElementSelector_GetTypeInfoCount(IElementSelector *iface, UINT *pctinfo)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    return IDispatchEx_GetTypeInfoCount(&This->node.event_target.dispex.IDispatchEx_iface, pctinfo);
+}
+
+static HRESULT WINAPI ElementSelector_GetTypeInfo(IElementSelector *iface, UINT iTInfo,
+        LCID lcid, ITypeInfo **ppTInfo)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    return IDispatchEx_GetTypeInfo(&This->node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
+}
+
+static HRESULT WINAPI ElementSelector_GetIDsOfNames(IElementSelector *iface, REFIID riid,
+        LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    return IDispatchEx_GetIDsOfNames(&This->node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId);
+}
+
+static HRESULT WINAPI ElementSelector_Invoke(IElementSelector *iface, DISPID dispIdMember, REFIID riid,
+        LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    return IDispatchEx_Invoke(&This->node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
+            pDispParams, pVarResult, pExcepInfo, puArgErr);
+}
+
+static HRESULT WINAPI ElementSelector_querySelector(IElementSelector *iface, BSTR v, IHTMLElement **pel)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ElementSelector_querySelectorAll(IElementSelector *iface, BSTR v, IHTMLDOMChildrenCollection **pel)
+{
+    HTMLElement *This = impl_from_IElementSelector(iface);
+    FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
+    return E_NOTIMPL;
+}
+
+static const IElementSelectorVtbl ElementSelectorVtbl = {
+    ElementSelector_QueryInterface,
+    ElementSelector_AddRef,
+    ElementSelector_Release,
+    ElementSelector_GetTypeInfoCount,
+    ElementSelector_GetTypeInfo,
+    ElementSelector_GetIDsOfNames,
+    ElementSelector_Invoke,
+    ElementSelector_querySelector,
+    ElementSelector_querySelectorAll
+};
+
 static inline HTMLElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
 {
     return CONTAINING_RECORD(iface, HTMLElement, node);
@@ -4043,6 +4120,8 @@ HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
         *ppv = &This->IHTMLElement4_iface;
     }else if(IsEqualGUID(&IID_IHTMLUniqueName, riid)) {
         *ppv = &This->IHTMLUniqueName_iface;
+    }else if(IsEqualGUID(&IID_IElementSelector, riid)) {
+        *ppv = &This->IElementSelector_iface;
     }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
         *ppv = &This->cp_container.IConnectionPointContainer_iface;
     }else {
@@ -4313,6 +4392,7 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen
     This->IHTMLElement3_iface.lpVtbl = &HTMLElement3Vtbl;
     This->IHTMLElement4_iface.lpVtbl = &HTMLElement4Vtbl;
     This->IHTMLUniqueName_iface.lpVtbl = &HTMLUniqueNameVtbl;
+    This->IElementSelector_iface.lpVtbl = &ElementSelectorVtbl;
 
     if(dispex_data && !dispex_data->vtbl)
         dispex_data->vtbl = &HTMLElement_dispex_vtbl;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index d378bdd..9d07047 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -125,6 +125,7 @@ typedef struct event_target_t event_target_t;
     XDIID(HTMLDocumentEvents) \
     XDIID(HTMLElementEvents2) \
     XIID(IDocumentSelector) \
+    XIID(IElementSelector) \
     XIID(IHTMLAnchorElement) \
     XIID(IHTMLAreaElement) \
     XIID(IHTMLAttributeCollection) \
@@ -717,6 +718,7 @@ typedef struct {
     IHTMLElement3 IHTMLElement3_iface;
     IHTMLElement4 IHTMLElement4_iface;
     IHTMLUniqueName IHTMLUniqueName_iface;
+    IElementSelector IElementSelector_iface;
 
     nsIDOMHTMLElement *nselem;
     HTMLStyle *style;
@@ -733,7 +735,8 @@ typedef struct {
     IHTMLElement2_tid,      \
     IHTMLElement3_tid,      \
     IHTMLElement4_tid,      \
-    IHTMLUniqueName_tid
+    IHTMLUniqueName_tid,    \
+    IElementSelector_tid
 
 extern cp_static_data_t HTMLElementEvents2_data DECLSPEC_HIDDEN;
 #define HTMLELEMENT_CPC {&DIID_HTMLElementEvents2, &HTMLElementEvents2_data}




More information about the wine-cvs mailing list