2 * Copyright 2005 Jacek Caban
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
37 #define HTMLDOC_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument2, iface)
39 static HRESULT WINAPI
HTMLDocument_QueryInterface(IHTMLDocument2
*iface
, REFIID riid
, void **ppvObject
)
41 HTMLDocument
*This
= HTMLDOC_THIS(iface
);
44 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
45 TRACE("(%p)->(IID_IUnknown, %p)\n", This
, ppvObject
);
46 *ppvObject
= HTMLDOC(This
);
47 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
48 TRACE("(%p)->(IID_IDispatch, %p)\n", This
, ppvObject
);
49 *ppvObject
= HTMLDOC(This
);
50 }else if(IsEqualGUID(&IID_IHTMLDocument
, riid
)) {
51 TRACE("(%p)->(IID_IHTMLDocument, %p)\n", This
, ppvObject
);
52 *ppvObject
= HTMLDOC(This
);
53 }else if(IsEqualGUID(&IID_IHTMLDocument2
, riid
)) {
54 TRACE("(%p)->(IID_IHTMLDocument2, %p)\n", This
, ppvObject
);
55 *ppvObject
= HTMLDOC(This
);
56 }else if(IsEqualGUID(&IID_IHTMLDocument3
, riid
)) {
57 TRACE("(%p)->(IID_IHTMLDocument3, %p)\n", This
, ppvObject
);
58 *ppvObject
= HTMLDOC3(This
);
59 }else if(IsEqualGUID(&IID_IPersist
, riid
)) {
60 TRACE("(%p)->(IID_IPersist, %p)\n", This
, ppvObject
);
61 *ppvObject
= PERSIST(This
);
62 }else if(IsEqualGUID(&IID_IPersistMoniker
, riid
)) {
63 TRACE("(%p)->(IID_IPersistMoniker, %p)\n", This
, ppvObject
);
64 *ppvObject
= PERSISTMON(This
);
65 }else if(IsEqualGUID(&IID_IPersistFile
, riid
)) {
66 TRACE("(%p)->(IID_IPersistFile, %p)\n", This
, ppvObject
);
67 *ppvObject
= PERSISTFILE(This
);
68 }else if(IsEqualGUID(&IID_IMonikerProp
, riid
)) {
69 TRACE("(%p)->(IID_IMonikerProp, %p)\n", This
, ppvObject
);
70 *ppvObject
= MONPROP(This
);
71 }else if(IsEqualGUID(&IID_IOleObject
, riid
)) {
72 TRACE("(%p)->(IID_IOleObject, %p)\n", This
, ppvObject
);
73 *ppvObject
= OLEOBJ(This
);
74 }else if(IsEqualGUID(&IID_IOleDocument
, riid
)) {
75 TRACE("(%p)->(IID_IOleDocument, %p)\n", This
, ppvObject
);
76 *ppvObject
= OLEDOC(This
);
77 }else if(IsEqualGUID(&IID_IOleDocumentView
, riid
)) {
78 TRACE("(%p)->(IID_IOleDocumentView, %p)\n", This
, ppvObject
);
79 *ppvObject
= DOCVIEW(This
);
80 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject
, riid
)) {
81 TRACE("(%p)->(IID_IOleInPlaceActiveObject, %p)\n", This
, ppvObject
);
82 *ppvObject
= ACTOBJ(This
);
83 }else if(IsEqualGUID(&IID_IViewObject
, riid
)) {
84 TRACE("(%p)->(IID_IViewObject, %p)\n", This
, ppvObject
);
85 *ppvObject
= VIEWOBJ(This
);
86 }else if(IsEqualGUID(&IID_IViewObject2
, riid
)) {
87 TRACE("(%p)->(IID_IViewObject2, %p)\n", This
, ppvObject
);
88 *ppvObject
= VIEWOBJ2(This
);
89 }else if(IsEqualGUID(&IID_IOleWindow
, riid
)) {
90 TRACE("(%p)->(IID_IOleWindow, %p)\n", This
, ppvObject
);
91 *ppvObject
= OLEWIN(This
);
92 }else if(IsEqualGUID(&IID_IOleInPlaceObject
, riid
)) {
93 TRACE("(%p)->(IID_IOleInPlaceObject, %p)\n", This
, ppvObject
);
94 *ppvObject
= INPLACEOBJ(This
);
95 }else if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless
, riid
)) {
96 TRACE("(%p)->(IID_IOleInPlaceObjectWindowless, %p)\n", This
, ppvObject
);
97 *ppvObject
= INPLACEWIN(This
);
98 }else if(IsEqualGUID(&IID_IServiceProvider
, riid
)) {
99 TRACE("(%p)->(IID_IServiceProvider, %p)\n", This
, ppvObject
);
100 *ppvObject
= SERVPROV(This
);
101 }else if(IsEqualGUID(&IID_IOleCommandTarget
, riid
)) {
102 TRACE("(%p)->(IID_IOleCommandTarget, %p)\n", This
, ppvObject
);
103 *ppvObject
= CMDTARGET(This
);
104 }else if(IsEqualGUID(&IID_IOleControl
, riid
)) {
105 TRACE("(%p)->(IID_IOleControl, %p)\n", This
, ppvObject
);
106 *ppvObject
= CONTROL(This
);
107 }else if(IsEqualGUID(&IID_IHlinkTarget
, riid
)) {
108 TRACE("(%p)->(IID_IHlinkTarget, %p)\n", This
, ppvObject
);
109 *ppvObject
= HLNKTARGET(This
);
110 }else if(IsEqualGUID(&IID_IConnectionPointContainer
, riid
)) {
111 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This
, ppvObject
);
112 *ppvObject
= CONPTCONT(This
);
113 }else if(IsEqualGUID(&IID_IPersistStreamInit
, riid
)) {
114 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This
, ppvObject
);
115 *ppvObject
= PERSTRINIT(This
);
119 IHTMLDocument2_AddRef(iface
);
123 FIXME("(%p)->(%s %p) interface not supported\n", This
, debugstr_guid(riid
), ppvObject
);
124 return E_NOINTERFACE
;
127 static ULONG WINAPI
HTMLDocument_AddRef(IHTMLDocument2
*iface
)
129 HTMLDocument
*This
= HTMLDOC_THIS(iface
);
130 ULONG ref
= InterlockedIncrement(&This
->ref
);
131 TRACE("(%p) ref = %lu\n", This
, ref
);
135 static ULONG WINAPI
HTMLDocument_Release(IHTMLDocument2
*iface
)
137 HTMLDocument
*This
= HTMLDOC_THIS(iface
);
138 ULONG ref
= InterlockedDecrement(&This
->ref
);
140 TRACE("(%p) ref = %lu\n", This
, ref
);
144 IOleObject_SetClientSite(OLEOBJ(This
), NULL
);
145 if(This
->in_place_active
)
146 IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(This
));
148 IOleDocumentView_SetInPlaceSite(DOCVIEW(This
), NULL
);
150 if(This
->tooltips_hwnd
)
151 DestroyWindow(This
->tooltips_hwnd
);
153 DestroyWindow(This
->hwnd
);
157 if(This
->nscontainer
)
158 NSContainer_Release(This
->nscontainer
);
160 HeapFree(GetProcessHeap(), 0, This
);
168 static HRESULT WINAPI
HTMLDocument_GetTypeInfoCount(IHTMLDocument2
*iface
, UINT
*pctinfo
)
170 FIXME("(%p)->(%p)\n", iface
, pctinfo
);
174 static HRESULT WINAPI
HTMLDocument_GetTypeInfo(IHTMLDocument2
*iface
, UINT iTInfo
,
175 LCID lcid
, ITypeInfo
**ppTInfo
)
177 FIXME("(%p)->(%u %lu %p)\n", iface
, iTInfo
, lcid
, ppTInfo
);
181 static HRESULT WINAPI
HTMLDocument_GetIDsOfNames(IHTMLDocument2
*iface
, REFIID riid
,
182 LPOLESTR
*rgszNames
, UINT cNames
,
183 LCID lcid
, DISPID
*rgDispId
)
185 FIXME("(%p)->(%s %p %u %lu %p)\n", iface
, debugstr_guid(riid
), rgszNames
, cNames
,
190 static HRESULT WINAPI
HTMLDocument_Invoke(IHTMLDocument2
*iface
, DISPID dispIdMember
,
191 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
192 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
194 FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", iface
, dispIdMember
, debugstr_guid(riid
),
195 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
199 static HRESULT WINAPI
HTMLDocument_get_Script(IHTMLDocument2
*iface
, IDispatch
**p
)
201 FIXME("(%p)->(%p)\n", iface
, p
);
205 static HRESULT WINAPI
HTMLDocument_get_all(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
207 FIXME("(%p)->(%p)\n", iface
, p
);
211 static HRESULT WINAPI
HTMLDocument_get_body(IHTMLDocument2
*iface
, IHTMLElement
**p
)
213 HTMLDocument
*This
= HTMLDOC_THIS(iface
);
214 nsIDOMDocument
*nsdoc
;
215 nsIDOMHTMLDocument
*nshtmldoc
;
216 nsIDOMHTMLElement
*nsbody
= NULL
;
220 TRACE("(%p)->(%p)\n", This
, p
);
224 if(!This
->nscontainer
)
227 nsres
= nsIWebNavigation_GetDocument(This
->nscontainer
->navigation
, &nsdoc
);
228 if(NS_FAILED(nsres
)) {
229 ERR("GetDocument failed: %08lx\n", nsres
);
233 if(NS_FAILED(nsres
) || !nsdoc
)
236 nsIDOMDocument_QueryInterface(nsdoc
, &IID_nsIDOMHTMLDocument
, (void**)&nshtmldoc
);
237 nsIDOMDocument_Release(nsdoc
);
239 nsres
= nsIDOMHTMLDocument_GetBody(nshtmldoc
, &nsbody
);
240 nsIDOMHTMLDocument_Release(nshtmldoc
);
242 if(NS_FAILED(nsres
) || !nsbody
) {
243 TRACE("Could not get body: %08lx\n", nsres
);
247 node
= get_node(This
, (nsIDOMNode
*)nsbody
);
248 nsIDOMHTMLElement_Release(nsbody
);
250 IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node
), &IID_IHTMLElement
, (void**)p
);
252 TRACE("*p = %p\n", *p
);
256 static HRESULT WINAPI
HTMLDocument_get_activeElement(IHTMLDocument2
*iface
, IHTMLElement
**p
)
258 FIXME("(%p)->(%p)\n", iface
, p
);
262 static HRESULT WINAPI
HTMLDocument_get_images(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
264 FIXME("(%p)->(%p)\n", iface
, p
);
268 static HRESULT WINAPI
HTMLDocument_get_applets(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
270 FIXME("(%p)->(%p)\n", iface
, p
);
274 static HRESULT WINAPI
HTMLDocument_get_links(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
276 FIXME("(%p)->(%p)\n", iface
, p
);
280 static HRESULT WINAPI
HTMLDocument_get_forms(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
282 FIXME("(%p)->(%p)\n", iface
, p
);
286 static HRESULT WINAPI
HTMLDocument_get_anchors(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
288 FIXME("(%p)->(%p)\n", iface
, p
);
292 static HRESULT WINAPI
HTMLDocument_put_title(IHTMLDocument2
*iface
, BSTR v
)
294 FIXME("(%p)->(%s)\n", iface
, debugstr_w(v
));
298 static HRESULT WINAPI
HTMLDocument_get_title(IHTMLDocument2
*iface
, BSTR
*p
)
300 FIXME("(%p)->(%p)\n", iface
, p
);
304 static HRESULT WINAPI
HTMLDocument_get_scripts(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
306 FIXME("(%p)->(%p)\n", iface
, p
);
310 static HRESULT WINAPI
HTMLDocument_put_designMode(IHTMLDocument2
*iface
, BSTR v
)
312 FIXME("(%p)->(%s)\n", iface
, debugstr_w(v
));
316 static HRESULT WINAPI
HTMLDocument_get_designMode(IHTMLDocument2
*iface
, BSTR
*p
)
318 FIXME("(%p)->(%p)\n", iface
, p
);
322 static HRESULT WINAPI
HTMLDocument_get_selection(IHTMLDocument2
*iface
, IHTMLSelectionObject
**p
)
324 FIXME("(%p)->(%p)\n", iface
, p
);
328 static HRESULT WINAPI
HTMLDocument_get_readyState(IHTMLDocument2
*iface
, BSTR
*p
)
330 FIXME("(%p)->(%p)\n", iface
, p
);
334 static HRESULT WINAPI
HTMLDocument_get_frames(IHTMLDocument2
*iface
, IHTMLFramesCollection2
**p
)
336 FIXME("(%p)->(%p)\n", iface
, p
);
340 static HRESULT WINAPI
HTMLDocument_get_embeds(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
342 FIXME("(%p)->(%p)\n", iface
, p
);
346 static HRESULT WINAPI
HTMLDocument_get_plugins(IHTMLDocument2
*iface
, IHTMLElementCollection
**p
)
348 FIXME("(%p)->(%p)\n", iface
, p
);
352 static HRESULT WINAPI
HTMLDocument_put_alinkColor(IHTMLDocument2
*iface
, VARIANT v
)
354 FIXME("(%p)\n", iface
);
358 static HRESULT WINAPI
HTMLDocument_get_alinkColor(IHTMLDocument2
*iface
, VARIANT
*p
)
360 FIXME("(%p)->(%p)\n", iface
, p
);
364 static HRESULT WINAPI
HTMLDocument_put_bgColor(IHTMLDocument2
*iface
, VARIANT v
)
366 FIXME("(%p)\n", iface
);
370 static HRESULT WINAPI
HTMLDocument_get_bgColor(IHTMLDocument2
*iface
, VARIANT
*p
)
372 FIXME("(%p)->(%p)\n", iface
, p
);
376 static HRESULT WINAPI
HTMLDocument_put_fgColor(IHTMLDocument2
*iface
, VARIANT v
)
378 FIXME("(%p)\n", iface
);
382 static HRESULT WINAPI
HTMLDocument_get_fgColor(IHTMLDocument2
*iface
, VARIANT
*p
)
384 FIXME("(%p)->(%p)\n", iface
, p
);
388 static HRESULT WINAPI
HTMLDocument_put_linkColor(IHTMLDocument2
*iface
, VARIANT v
)
390 FIXME("(%p)->()\n", iface
);
394 static HRESULT WINAPI
HTMLDocument_get_linkColor(IHTMLDocument2
*iface
, VARIANT
*p
)
396 FIXME("(%p)->(%p)\n", iface
, p
);
400 static HRESULT WINAPI
HTMLDocument_put_vlinkColor(IHTMLDocument2
*iface
, VARIANT v
)
402 FIXME("(%p)\n", iface
);
406 static HRESULT WINAPI
HTMLDocument_get_vlinkColor(IHTMLDocument2
*iface
, VARIANT
*p
)
408 FIXME("(%p)->(%p)\n", iface
, p
);
412 static HRESULT WINAPI
HTMLDocument_get_referrer(IHTMLDocument2
*iface
, BSTR
*p
)
414 FIXME("(%p)->(%p)\n", iface
, p
);
418 static HRESULT WINAPI
HTMLDocument_get_location(IHTMLDocument2
*iface
, IHTMLLocation
**p
)
420 FIXME("(%p)->(%p)\n", iface
, p
);
424 static HRESULT WINAPI
HTMLDocument_get_lastModified(IHTMLDocument2
*iface
, BSTR
*p
)
426 FIXME("(%p)->(%p)\n", iface
, p
);
430 static HRESULT WINAPI
HTMLDocument_put_URL(IHTMLDocument2
*iface
, BSTR v
)
432 FIXME("(%p)->(%s)\n", iface
, debugstr_w(v
));
436 static HRESULT WINAPI
HTMLDocument_get_URL(IHTMLDocument2
*iface
, BSTR
*p
)
438 FIXME("(%p)->(%p)\n", iface
, p
);
442 static HRESULT WINAPI
HTMLDocument_put_domain(IHTMLDocument2
*iface
, BSTR v
)
444 FIXME("(%p)->(%s)\n", iface
, debugstr_w(v
));
448 static HRESULT WINAPI
HTMLDocument_get_domain(IHTMLDocument2
*iface
, BSTR
*p
)
450 FIXME("(%p)->(%p)\n", iface
, p
);
454 static HRESULT WINAPI
HTMLDocument_put_cookie(IHTMLDocument2
*iface
, BSTR v
)
456 FIXME("(%p)->(%s)\n", iface
, debugstr_w(v
));
460 static HRESULT WINAPI
HTMLDocument_get_cookie(IHTMLDocument2
*iface
, BSTR
*p
)
462 FIXME("(%p)->(%p)\n", iface
, p
);
466 static HRESULT WINAPI
HTMLDocument_put_expando(IHTMLDocument2
*iface
, VARIANT_BOOL v
)
468 FIXME("(%p)->(%x)\n", iface
, v
);
472 static HRESULT WINAPI
HTMLDocument_get_expando(IHTMLDocument2
*iface
, VARIANT_BOOL
*p
)
474 FIXME("(%p)->(%p)\n", iface
, p
);
478 static HRESULT WINAPI
HTMLDocument_put_charset(IHTMLDocument2
*iface
, BSTR v
)
480 FIXME("(%p)->(%s)\n", iface
, debugstr_w(v
));
484 static HRESULT WINAPI
HTMLDocument_get_charset(IHTMLDocument2
*iface
, BSTR
*p
)
486 FIXME("(%p)->(%p)\n", iface
, p
);
490 static HRESULT WINAPI
HTMLDocument_put_defaultCharset(IHTMLDocument2
*iface
, BSTR v
)
492 FIXME("(%p)->(%s)\n", iface
, debugstr_w(v
));
496 static HRESULT WINAPI
HTMLDocument_get_defaultCharset(IHTMLDocument2
*iface
, BSTR
*p
)
498 FIXME("(%p)->(%p)\n", iface
, p
);
502 static HRESULT WINAPI
HTMLDocument_get_mimeType(IHTMLDocument2
*iface
, BSTR
*p
)
504 FIXME("(%p)->(%p)\n", iface
, p
);
508 static HRESULT WINAPI
HTMLDocument_get_fileSize(IHTMLDocument2
*iface
, BSTR
*p
)
510 FIXME("(%p)->(%p)\n", iface
, p
);
514 static HRESULT WINAPI
HTMLDocument_get_fileCreatedDate(IHTMLDocument2
*iface
, BSTR
*p
)
516 FIXME("(%p)->(%p)\n", iface
, p
);
520 static HRESULT WINAPI
HTMLDocument_get_fileModifiedDate(IHTMLDocument2
*iface
, BSTR
*p
)
522 FIXME("(%p)->(%p)\n", iface
, p
);
526 static HRESULT WINAPI
HTMLDocument_get_fileUpdatedDate(IHTMLDocument2
*iface
, BSTR
*p
)
528 FIXME("(%p)->(%p)\n", iface
, p
);
532 static HRESULT WINAPI
HTMLDocument_get_security(IHTMLDocument2
*iface
, BSTR
*p
)
534 FIXME("(%p)->(%p)\n", iface
, p
);
538 static HRESULT WINAPI
HTMLDocument_get_protocol(IHTMLDocument2
*iface
, BSTR
*p
)
540 FIXME("(%p)->(%p)\n", iface
, p
);
544 static HRESULT WINAPI
HTMLDocument_get_nameProp(IHTMLDocument2
*iface
, BSTR
*p
)
546 FIXME("(%p)->(%p)\n", iface
, p
);
550 static HRESULT WINAPI
HTMLDocument_write(IHTMLDocument2
*iface
, SAFEARRAY
*psarray
)
552 FIXME("(%p)->(%p)\n", iface
, psarray
);
556 static HRESULT WINAPI
HTMLDocument_writeln(IHTMLDocument2
*iface
, SAFEARRAY
*psarray
)
558 FIXME("(%p)->(%p)\n", iface
, psarray
);
562 static HRESULT WINAPI
HTMLDocument_open(IHTMLDocument2
*iface
, BSTR url
, VARIANT name
,
563 VARIANT features
, VARIANT replace
, IDispatch
**pomWindowResult
)
565 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(url
), pomWindowResult
);
569 static HRESULT WINAPI
HTMLDocument_close(IHTMLDocument2
*iface
)
571 FIXME("(%p)\n", iface
);
575 static HRESULT WINAPI
HTMLDocument_clear(IHTMLDocument2
*iface
)
577 FIXME("(%p)\n", iface
);
581 static HRESULT WINAPI
HTMLDocument_queryCommandSupported(IHTMLDocument2
*iface
, BSTR cmdID
,
584 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(cmdID
), pfRet
);
588 static HRESULT WINAPI
HTMLDocument_queryCommandEnabled(IHTMLDocument2
*iface
, BSTR cmdID
,
591 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(cmdID
), pfRet
);
595 static HRESULT WINAPI
HTMLDocument_queryCommandState(IHTMLDocument2
*iface
, BSTR cmdID
,
598 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(cmdID
), pfRet
);
602 static HRESULT WINAPI
HTMLDocument_queryCommandIndeterm(IHTMLDocument2
*iface
, BSTR cmdID
,
605 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(cmdID
), pfRet
);
609 static HRESULT WINAPI
HTMLDocument_queryCommandText(IHTMLDocument2
*iface
, BSTR cmdID
,
612 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(cmdID
), pfRet
);
616 static HRESULT WINAPI
HTMLDocument_queryCommandValue(IHTMLDocument2
*iface
, BSTR cmdID
,
619 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(cmdID
), pfRet
);
623 static HRESULT WINAPI
HTMLDocument_execCommand(IHTMLDocument2
*iface
, BSTR cmdID
,
624 VARIANT_BOOL showUI
, VARIANT value
, VARIANT_BOOL
*pfRet
)
626 FIXME("(%p)->(%s %x %p)\n", iface
, debugstr_w(cmdID
), showUI
, pfRet
);
630 static HRESULT WINAPI
HTMLDocument_execCommandShowHelp(IHTMLDocument2
*iface
, BSTR cmdID
,
633 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(cmdID
), pfRet
);
637 static HRESULT WINAPI
HTMLDocument_createElement(IHTMLDocument2
*iface
, BSTR eTag
,
638 IHTMLElement
**newElem
)
640 FIXME("(%p)->(%s %p)\n", iface
, debugstr_w(eTag
), newElem
);
644 static HRESULT WINAPI
HTMLDocument_put_onhelp(IHTMLDocument2
*iface
, VARIANT v
)
646 FIXME("(%p)\n", iface
);
650 static HRESULT WINAPI
HTMLDocument_get_onhelp(IHTMLDocument2
*iface
, VARIANT
*p
)
652 FIXME("(%p)->(%p)\n", iface
, p
);
656 static HRESULT WINAPI
HTMLDocument_put_onclick(IHTMLDocument2
*iface
, VARIANT v
)
658 FIXME("(%p)\n", iface
);
662 static HRESULT WINAPI
HTMLDocument_get_onclick(IHTMLDocument2
*iface
, VARIANT
*p
)
664 FIXME("(%p)->(%p)\n", iface
, p
);
668 static HRESULT WINAPI
HTMLDocument_put_ondblclick(IHTMLDocument2
*iface
, VARIANT v
)
670 FIXME("(%p)\n", iface
);
674 static HRESULT WINAPI
HTMLDocument_get_ondblclick(IHTMLDocument2
*iface
, VARIANT
*p
)
676 FIXME("(%p)->(%p)\n", iface
, p
);
680 static HRESULT WINAPI
HTMLDocument_put_onkeyup(IHTMLDocument2
*iface
, VARIANT v
)
682 FIXME("(%p)\n", iface
);
686 static HRESULT WINAPI
HTMLDocument_get_onkeyup(IHTMLDocument2
*iface
, VARIANT
*p
)
688 FIXME("(%p)->(%p)\n", iface
, p
);
692 static HRESULT WINAPI
HTMLDocument_put_onkeydown(IHTMLDocument2
*iface
, VARIANT v
)
694 FIXME("(%p)\n", iface
);
698 static HRESULT WINAPI
HTMLDocument_get_onkeydown(IHTMLDocument2
*iface
, VARIANT
*p
)
700 FIXME("(%p)->(%p)\n", iface
, p
);
704 static HRESULT WINAPI
HTMLDocument_put_onkeypress(IHTMLDocument2
*iface
, VARIANT v
)
706 FIXME("(%p)\n", iface
);
710 static HRESULT WINAPI
HTMLDocument_get_onkeypress(IHTMLDocument2
*iface
, VARIANT
*p
)
712 FIXME("(%p)->(%p)\n", iface
, p
);
716 static HRESULT WINAPI
HTMLDocument_put_onmouseup(IHTMLDocument2
*iface
, VARIANT v
)
718 FIXME("(%p)\n", iface
);
722 static HRESULT WINAPI
HTMLDocument_get_onmouseup(IHTMLDocument2
*iface
, VARIANT
*p
)
724 FIXME("(%p)->(%p)\n", iface
, p
);
728 static HRESULT WINAPI
HTMLDocument_put_onmousedown(IHTMLDocument2
*iface
, VARIANT v
)
730 FIXME("(%p)\n", iface
);
734 static HRESULT WINAPI
HTMLDocument_get_onmousedown(IHTMLDocument2
*iface
, VARIANT
*p
)
736 FIXME("(%p)->(%p)\n", iface
, p
);
740 static HRESULT WINAPI
HTMLDocument_put_onmousemove(IHTMLDocument2
*iface
, VARIANT v
)
742 FIXME("(%p)\n", iface
);
746 static HRESULT WINAPI
HTMLDocument_get_onmousemove(IHTMLDocument2
*iface
, VARIANT
*p
)
748 FIXME("(%p)->(%p)\n", iface
, p
);
752 static HRESULT WINAPI
HTMLDocument_put_onmouseout(IHTMLDocument2
*iface
, VARIANT v
)
754 FIXME("(%p)\n", iface
);
758 static HRESULT WINAPI
HTMLDocument_get_onmouseout(IHTMLDocument2
*iface
, VARIANT
*p
)
760 FIXME("(%p)->(%p)\n", iface
, p
);
764 static HRESULT WINAPI
HTMLDocument_put_onmouseover(IHTMLDocument2
*iface
, VARIANT v
)
766 FIXME("(%p)\n", iface
);
770 static HRESULT WINAPI
HTMLDocument_get_onmouseover(IHTMLDocument2
*iface
, VARIANT
*p
)
772 FIXME("(%p)->(%p)\n", iface
, p
);
776 static HRESULT WINAPI
HTMLDocument_put_onreadystatechange(IHTMLDocument2
*iface
, VARIANT v
)
778 FIXME("(%p)\n", iface
);
782 static HRESULT WINAPI
HTMLDocument_get_onreadystatechange(IHTMLDocument2
*iface
, VARIANT
*p
)
784 FIXME("(%p)->(%p)\n", iface
, p
);
788 static HRESULT WINAPI
HTMLDocument_put_onafterupdate(IHTMLDocument2
*iface
, VARIANT v
)
790 FIXME("(%p)\n", iface
);
794 static HRESULT WINAPI
HTMLDocument_get_onafterupdate(IHTMLDocument2
*iface
, VARIANT
*p
)
796 FIXME("(%p)->(%p)\n", iface
, p
);
800 static HRESULT WINAPI
HTMLDocument_put_onrowexit(IHTMLDocument2
*iface
, VARIANT v
)
802 FIXME("(%p)\n", iface
);
806 static HRESULT WINAPI
HTMLDocument_get_onrowexit(IHTMLDocument2
*iface
, VARIANT
*p
)
808 FIXME("(%p)->(%p)\n", iface
, p
);
812 static HRESULT WINAPI
HTMLDocument_put_onrowenter(IHTMLDocument2
*iface
, VARIANT v
)
814 FIXME("(%p)\n", iface
);
818 static HRESULT WINAPI
HTMLDocument_get_onrowenter(IHTMLDocument2
*iface
, VARIANT
*p
)
820 FIXME("(%p)->(%p)\n", iface
, p
);
824 static HRESULT WINAPI
HTMLDocument_put_ondragstart(IHTMLDocument2
*iface
, VARIANT v
)
826 FIXME("(%p)\n", iface
);
830 static HRESULT WINAPI
HTMLDocument_get_ondragstart(IHTMLDocument2
*iface
, VARIANT
*p
)
832 FIXME("(%p)->(%p)\n", iface
, p
);
836 static HRESULT WINAPI
HTMLDocument_put_onselectstart(IHTMLDocument2
*iface
, VARIANT v
)
838 FIXME("(%p)\n", iface
);
842 static HRESULT WINAPI
HTMLDocument_get_onselectstart(IHTMLDocument2
*iface
, VARIANT
*p
)
844 FIXME("(%p)->(%p)\n", iface
, p
);
848 static HRESULT WINAPI
HTMLDocument_elementFromPoint(IHTMLDocument2
*iface
, long x
, long y
,
849 IHTMLElement
**elementHit
)
851 FIXME("(%p)->(%ld %ld %p)\n", iface
, x
, y
, elementHit
);
855 static HRESULT WINAPI
HTMLDocument_get_parentWindow(IHTMLDocument2
*iface
, IHTMLWindow2
**p
)
857 FIXME("(%p)->(%p)\n", iface
, p
);
861 static HRESULT WINAPI
HTMLDocument_get_styleSheets(IHTMLDocument2
*iface
,
862 IHTMLStyleSheetsCollection
**p
)
864 FIXME("(%p)->(%p)\n", iface
, p
);
868 static HRESULT WINAPI
HTMLDocument_put_onbeforeupdate(IHTMLDocument2
*iface
, VARIANT v
)
870 FIXME("(%p)\n", iface
);
874 static HRESULT WINAPI
HTMLDocument_get_onbeforeupdate(IHTMLDocument2
*iface
, VARIANT
*p
)
876 FIXME("(%p)->(%p)\n", iface
, p
);
880 static HRESULT WINAPI
HTMLDocument_put_onerrorupdate(IHTMLDocument2
*iface
, VARIANT v
)
882 FIXME("(%p)\n", iface
);
886 static HRESULT WINAPI
HTMLDocument_get_onerrorupdate(IHTMLDocument2
*iface
, VARIANT
*p
)
888 FIXME("(%p)->(%p)\n", iface
, p
);
892 static HRESULT WINAPI
HTMLDocument_toString(IHTMLDocument2
*iface
, BSTR
*String
)
894 FIXME("(%p)->(%p)\n", iface
, String
);
898 static HRESULT WINAPI
HTMLDocument_createStyleSheet(IHTMLDocument2
*iface
, BSTR bstrHref
,
899 long lIndex
, IHTMLStyleSheet
**ppnewStyleSheet
)
901 FIXME("(%p)->(%s %ld %p)\n", iface
, debugstr_w(bstrHref
), lIndex
, ppnewStyleSheet
);
905 static const IHTMLDocument2Vtbl HTMLDocumentVtbl
= {
906 HTMLDocument_QueryInterface
,
908 HTMLDocument_Release
,
909 HTMLDocument_GetTypeInfoCount
,
910 HTMLDocument_GetTypeInfo
,
911 HTMLDocument_GetIDsOfNames
,
913 HTMLDocument_get_Script
,
914 HTMLDocument_get_all
,
915 HTMLDocument_get_body
,
916 HTMLDocument_get_activeElement
,
917 HTMLDocument_get_images
,
918 HTMLDocument_get_applets
,
919 HTMLDocument_get_links
,
920 HTMLDocument_get_forms
,
921 HTMLDocument_get_anchors
,
922 HTMLDocument_put_title
,
923 HTMLDocument_get_title
,
924 HTMLDocument_get_scripts
,
925 HTMLDocument_put_designMode
,
926 HTMLDocument_get_designMode
,
927 HTMLDocument_get_selection
,
928 HTMLDocument_get_readyState
,
929 HTMLDocument_get_frames
,
930 HTMLDocument_get_embeds
,
931 HTMLDocument_get_plugins
,
932 HTMLDocument_put_alinkColor
,
933 HTMLDocument_get_alinkColor
,
934 HTMLDocument_put_bgColor
,
935 HTMLDocument_get_bgColor
,
936 HTMLDocument_put_fgColor
,
937 HTMLDocument_get_fgColor
,
938 HTMLDocument_put_linkColor
,
939 HTMLDocument_get_linkColor
,
940 HTMLDocument_put_vlinkColor
,
941 HTMLDocument_get_vlinkColor
,
942 HTMLDocument_get_referrer
,
943 HTMLDocument_get_location
,
944 HTMLDocument_get_lastModified
,
945 HTMLDocument_put_URL
,
946 HTMLDocument_get_URL
,
947 HTMLDocument_put_domain
,
948 HTMLDocument_get_domain
,
949 HTMLDocument_put_cookie
,
950 HTMLDocument_get_cookie
,
951 HTMLDocument_put_expando
,
952 HTMLDocument_get_expando
,
953 HTMLDocument_put_charset
,
954 HTMLDocument_get_charset
,
955 HTMLDocument_put_defaultCharset
,
956 HTMLDocument_get_defaultCharset
,
957 HTMLDocument_get_mimeType
,
958 HTMLDocument_get_fileSize
,
959 HTMLDocument_get_fileCreatedDate
,
960 HTMLDocument_get_fileModifiedDate
,
961 HTMLDocument_get_fileUpdatedDate
,
962 HTMLDocument_get_security
,
963 HTMLDocument_get_protocol
,
964 HTMLDocument_get_nameProp
,
966 HTMLDocument_writeln
,
970 HTMLDocument_queryCommandSupported
,
971 HTMLDocument_queryCommandEnabled
,
972 HTMLDocument_queryCommandState
,
973 HTMLDocument_queryCommandIndeterm
,
974 HTMLDocument_queryCommandText
,
975 HTMLDocument_queryCommandValue
,
976 HTMLDocument_execCommand
,
977 HTMLDocument_execCommandShowHelp
,
978 HTMLDocument_createElement
,
979 HTMLDocument_put_onhelp
,
980 HTMLDocument_get_onhelp
,
981 HTMLDocument_put_onclick
,
982 HTMLDocument_get_onclick
,
983 HTMLDocument_put_ondblclick
,
984 HTMLDocument_get_ondblclick
,
985 HTMLDocument_put_onkeyup
,
986 HTMLDocument_get_onkeyup
,
987 HTMLDocument_put_onkeydown
,
988 HTMLDocument_get_onkeydown
,
989 HTMLDocument_put_onkeypress
,
990 HTMLDocument_get_onkeypress
,
991 HTMLDocument_put_onmouseup
,
992 HTMLDocument_get_onmouseup
,
993 HTMLDocument_put_onmousedown
,
994 HTMLDocument_get_onmousedown
,
995 HTMLDocument_put_onmousemove
,
996 HTMLDocument_get_onmousemove
,
997 HTMLDocument_put_onmouseout
,
998 HTMLDocument_get_onmouseout
,
999 HTMLDocument_put_onmouseover
,
1000 HTMLDocument_get_onmouseover
,
1001 HTMLDocument_put_onreadystatechange
,
1002 HTMLDocument_get_onreadystatechange
,
1003 HTMLDocument_put_onafterupdate
,
1004 HTMLDocument_get_onafterupdate
,
1005 HTMLDocument_put_onrowexit
,
1006 HTMLDocument_get_onrowexit
,
1007 HTMLDocument_put_onrowenter
,
1008 HTMLDocument_get_onrowenter
,
1009 HTMLDocument_put_ondragstart
,
1010 HTMLDocument_get_ondragstart
,
1011 HTMLDocument_put_onselectstart
,
1012 HTMLDocument_get_onselectstart
,
1013 HTMLDocument_elementFromPoint
,
1014 HTMLDocument_get_parentWindow
,
1015 HTMLDocument_get_styleSheets
,
1016 HTMLDocument_put_onbeforeupdate
,
1017 HTMLDocument_get_onbeforeupdate
,
1018 HTMLDocument_put_onerrorupdate
,
1019 HTMLDocument_get_onerrorupdate
,
1020 HTMLDocument_toString
,
1021 HTMLDocument_createStyleSheet
1024 HRESULT
HTMLDocument_Create(IUnknown
*pUnkOuter
, REFIID riid
, void** ppvObject
)
1029 TRACE("(%p %s %p)\n", pUnkOuter
, debugstr_guid(riid
), ppvObject
);
1031 ret
= HeapAlloc(GetProcessHeap(), 0, sizeof(HTMLDocument
));
1032 ret
->lpHTMLDocument2Vtbl
= &HTMLDocumentVtbl
;
1034 ret
->nscontainer
= NULL
;
1037 hres
= IHTMLDocument_QueryInterface(HTMLDOC(ret
), riid
, ppvObject
);
1039 HeapFree(GetProcessHeap(), 0, ret
);
1045 HTMLDocument_HTMLDocument3_Init(ret
);
1046 HTMLDocument_Persist_Init(ret
);
1047 HTMLDocument_OleObj_Init(ret
);
1048 HTMLDocument_View_Init(ret
);
1049 HTMLDocument_Window_Init(ret
);
1050 HTMLDocument_Service_Init(ret
);
1051 HTMLDocument_Hlink_Init(ret
);
1052 HTMLDocument_ConnectionPoints_Init(ret
);
1054 ret
->nscontainer
= NSContainer_Create(ret
, NULL
);