Hi, Can I get some feedback on please?
Best Regards Alistair Leslie-Hughes "Alistair Leslie-Hughes" <leslie_alist...@hotmail.com> wrote in message news:49a7af90.8000...@hotmail.com... > Hi, > Moved forward declare to private header. > > Changelog: > mshtml: Implement IHTMLElement2_insertAdjecentElement > > Best Regards > Alistair Leslie-Hughes > > > > -------------------------------------------------------------------------------- > >From afef95a87e49096a1fb26cb85a73463fcf5e5560 Mon Sep 17 00:00:00 2001 > From: Alistair Leslie-Hughes <leslie_alist...@hotmail.com> > Date: Thu, 19 Feb 2009 20:30:21 +1100 > Subject: [PATCH] Implement IHTMLElement2_insertAdjecentElement > To: wine-patches <wine-patc...@winehq.org> > > --- > dlls/mshtml/htmlelem.c | 2 +- > dlls/mshtml/htmlelem2.c | 13 +++++++++++-- > dlls/mshtml/htmlnode.c | 3 +-- > dlls/mshtml/mshtml_private.h | 3 +++ > 4 files changed, 16 insertions(+), 5 deletions(-) > > diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c > index 7d9a244..0b5cff7 100644 > --- a/dlls/mshtml/htmlelem.c > +++ b/dlls/mshtml/htmlelem.c > @@ -920,7 +920,7 @@ static HRESULT WINAPI > HTMLElement_get_outerText(IHTMLElement *iface, BSTR *p) > return E_NOTIMPL; > } > > -static HRESULT HTMLElement_InsertAdjacentNode(HTMLElement *This, BSTR > where, nsIDOMNode *nsnode, > +HRESULT HTMLElement_InsertAdjacentNode(HTMLElement *This, BSTR where, > nsIDOMNode *nsnode, > IHTMLElement **inserted) > { > static const WCHAR wszBeforeBegin[] = > {'b','e','f','o','r','e','B','e','g','i','n',0}; > diff --git a/dlls/mshtml/htmlelem2.c b/dlls/mshtml/htmlelem2.c > index 3e22155..8007dc0 100644 > --- a/dlls/mshtml/htmlelem2.c > +++ b/dlls/mshtml/htmlelem2.c > @@ -912,8 +912,17 @@ static HRESULT WINAPI > HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, B > IHTMLElement *insertedElement, IHTMLElement **inserted) > { > HTMLElement *This = HTMLELEM2_THIS(iface); > - FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, > inserted); > - return E_NOTIMPL; > + HTMLDOMNode *node_ins; > + > + TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, > inserted); > + > + node_ins = get_node_obj(This->node.doc, (IUnknown*)insertedElement); > + if(!node_ins) { > + ERR("invalid insertedElement\n"); > + return E_INVALIDARG; > + } > + > + return HTMLElement_InsertAdjacentNode(This, where, node_ins->nsnode, > inserted); > } > > static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, > IHTMLElement *apply, > diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c > index bee0376..7d5ccb7 100644 > --- a/dlls/mshtml/htmlnode.c > +++ b/dlls/mshtml/htmlnode.c > @@ -32,7 +32,6 @@ > > WINE_DEFAULT_DEBUG_CHANNEL(mshtml); > > -static HTMLDOMNode *get_node_obj(HTMLDocument*,IUnknown*); > > typedef struct { > DispatchEx dispex; > @@ -937,7 +936,7 @@ HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode > *nsnode, BOOL create) > * We should use better way for getting node object (like private > interface) > * or avoid it at all. > */ > -static HTMLDOMNode *get_node_obj(HTMLDocument *This, IUnknown *iface) > +HTMLDOMNode *get_node_obj(HTMLDocument *This, IUnknown *iface) > { > HTMLDOMNode *iter = This->nodes; > IHTMLDOMNode *node; > diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h > index b67c485..37c3fcc 100644 > --- a/dlls/mshtml/mshtml_private.h > +++ b/dlls/mshtml/mshtml_private.h > @@ -777,3 +777,6 @@ static inline char *heap_strdupWtoA(LPCWSTR str) > HINSTANCE get_shdoclc(void); > > extern HINSTANCE hInst; > +HTMLDOMNode *get_node_obj(HTMLDocument*,IUnknown*); > +HRESULT HTMLElement_InsertAdjacentNode(HTMLElement *This, BSTR where, > nsIDOMNode *nsnode, > + IHTMLElement **inserted); > -- > 1.5.4.3 > > -------------------------------------------------------------------------------- > >