d3d9/tests: Give add_dirty_rect_test() its own device.
[wine/wine-gecko.git] / dlls / mshtml / htmldoc3.c
blobbe164edbcfe504d5479c0cfccd116d06e96cef85
1 /*
2 * Copyright 2005 Jacek Caban for CodeWeavers
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
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
23 #include <assert.h>
25 #define COBJMACROS
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winuser.h"
30 #include "ole2.h"
32 #include "wine/debug.h"
34 #include "mshtml_private.h"
35 #include "htmlevent.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
39 HRESULT get_doc_elem_by_id(HTMLDocumentNode *doc, const WCHAR *id, HTMLElement **ret)
41 nsIDOMNodeList *nsnode_list;
42 nsIDOMElement *nselem;
43 nsIDOMNode *nsnode;
44 nsAString id_str;
45 nsresult nsres;
46 HRESULT hres;
48 if(!doc->nsdoc) {
49 WARN("NULL nsdoc\n");
50 return E_UNEXPECTED;
53 nsAString_InitDepend(&id_str, id);
54 /* get element by id attribute */
55 nsres = nsIDOMHTMLDocument_GetElementById(doc->nsdoc, &id_str, &nselem);
56 if(FAILED(nsres)) {
57 ERR("GetElementById failed: %08x\n", nsres);
58 nsAString_Finish(&id_str);
59 return E_FAIL;
62 /* get first element by name attribute */
63 nsres = nsIDOMHTMLDocument_GetElementsByName(doc->nsdoc, &id_str, &nsnode_list);
64 nsAString_Finish(&id_str);
65 if(FAILED(nsres)) {
66 ERR("getElementsByName failed: %08x\n", nsres);
67 if(nselem)
68 nsIDOMElement_Release(nselem);
69 return E_FAIL;
72 nsres = nsIDOMNodeList_Item(nsnode_list, 0, &nsnode);
73 nsIDOMNodeList_Release(nsnode_list);
74 assert(nsres == NS_OK);
76 if(nsnode && nselem) {
77 UINT16 pos;
79 nsres = nsIDOMNode_CompareDocumentPosition(nsnode, (nsIDOMNode*)nselem, &pos);
80 if(NS_FAILED(nsres)) {
81 FIXME("CompareDocumentPosition failed: 0x%08x\n", nsres);
82 nsIDOMNode_Release(nsnode);
83 nsIDOMElement_Release(nselem);
84 return E_FAIL;
87 TRACE("CompareDocumentPosition gave: 0x%x\n", pos);
88 if(!(pos & (DOCUMENT_POSITION_PRECEDING | DOCUMENT_POSITION_CONTAINS))) {
89 nsIDOMElement_Release(nselem);
90 nselem = NULL;
94 if(nsnode) {
95 if(!nselem) {
96 nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMElement, (void**)&nselem);
97 assert(nsres == NS_OK);
99 nsIDOMNode_Release(nsnode);
102 if(!nselem) {
103 *ret = NULL;
104 return S_OK;
107 hres = get_elem(doc, nselem, ret);
108 nsIDOMElement_Release(nselem);
109 return hres;
112 static inline HTMLDocument *impl_from_IHTMLDocument3(IHTMLDocument3 *iface)
114 return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument3_iface);
117 static HRESULT WINAPI HTMLDocument3_QueryInterface(IHTMLDocument3 *iface,
118 REFIID riid, void **ppv)
120 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
121 return htmldoc_query_interface(This, riid, ppv);
124 static ULONG WINAPI HTMLDocument3_AddRef(IHTMLDocument3 *iface)
126 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
127 return htmldoc_addref(This);
130 static ULONG WINAPI HTMLDocument3_Release(IHTMLDocument3 *iface)
132 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
133 return htmldoc_release(This);
136 static HRESULT WINAPI HTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo)
138 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
139 return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
142 static HRESULT WINAPI HTMLDocument3_GetTypeInfo(IHTMLDocument3 *iface, UINT iTInfo,
143 LCID lcid, ITypeInfo **ppTInfo)
145 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
146 return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
149 static HRESULT WINAPI HTMLDocument3_GetIDsOfNames(IHTMLDocument3 *iface, REFIID riid,
150 LPOLESTR *rgszNames, UINT cNames,
151 LCID lcid, DISPID *rgDispId)
153 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
154 return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
155 rgDispId);
158 static HRESULT WINAPI HTMLDocument3_Invoke(IHTMLDocument3 *iface, DISPID dispIdMember,
159 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
160 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
162 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
163 return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
164 pDispParams, pVarResult, pExcepInfo, puArgErr);
167 static HRESULT WINAPI HTMLDocument3_releaseCapture(IHTMLDocument3 *iface)
169 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
170 FIXME("(%p)\n", This);
171 return E_NOTIMPL;
174 static HRESULT WINAPI HTMLDocument3_recalc(IHTMLDocument3 *iface, VARIANT_BOOL fForce)
176 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
177 FIXME("(%p)->(%x)\n", This, fForce);
178 return E_NOTIMPL;
181 static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR text,
182 IHTMLDOMNode **newTextNode)
184 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
185 nsIDOMText *nstext;
186 HTMLDOMNode *node;
187 nsAString text_str;
188 nsresult nsres;
189 HRESULT hres;
191 TRACE("(%p)->(%s %p)\n", This, debugstr_w(text), newTextNode);
193 if(!This->doc_node->nsdoc) {
194 WARN("NULL nsdoc\n");
195 return E_UNEXPECTED;
198 nsAString_InitDepend(&text_str, text);
199 nsres = nsIDOMHTMLDocument_CreateTextNode(This->doc_node->nsdoc, &text_str, &nstext);
200 nsAString_Finish(&text_str);
201 if(NS_FAILED(nsres)) {
202 ERR("CreateTextNode failed: %08x\n", nsres);
203 return E_FAIL;
206 hres = HTMLDOMTextNode_Create(This->doc_node, (nsIDOMNode*)nstext, &node);
207 nsIDOMText_Release(nstext);
208 if(FAILED(hres))
209 return hres;
211 *newTextNode = &node->IHTMLDOMNode_iface;
212 return S_OK;
215 static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, IHTMLElement **p)
217 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
218 nsIDOMElement *nselem = NULL;
219 HTMLDOMNode *node;
220 nsresult nsres;
221 HRESULT hres;
223 TRACE("(%p)->(%p)\n", This, p);
225 if(This->window->readystate == READYSTATE_UNINITIALIZED) {
226 *p = NULL;
227 return S_OK;
230 if(!This->doc_node->nsdoc) {
231 WARN("NULL nsdoc\n");
232 return E_UNEXPECTED;
235 nsres = nsIDOMHTMLDocument_GetDocumentElement(This->doc_node->nsdoc, &nselem);
236 if(NS_FAILED(nsres)) {
237 ERR("GetDocumentElement failed: %08x\n", nsres);
238 return E_FAIL;
241 if(!nselem) {
242 *p = NULL;
243 return S_OK;
246 hres = get_node(This->doc_node, (nsIDOMNode *)nselem, TRUE, &node);
247 nsIDOMElement_Release(nselem);
248 if(FAILED(hres))
249 return hres;
251 hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
252 node_release(node);
253 return hres;
256 static HRESULT WINAPI HTMLDocument3_uniqueID(IHTMLDocument3 *iface, BSTR *p)
258 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
259 FIXME("(%p)->(%p)\n", This, p);
260 return E_NOTIMPL;
263 static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event,
264 IDispatch* pDisp, VARIANT_BOOL *pfResult)
266 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
268 TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
270 return attach_event(&This->doc_node->node.event_target, This, event, pDisp, pfResult);
273 static HRESULT WINAPI HTMLDocument3_detachEvent(IHTMLDocument3 *iface, BSTR event,
274 IDispatch *pDisp)
276 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
278 TRACE("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
280 return detach_event(This->doc_node->node.event_target, This, event, pDisp);
283 static HRESULT WINAPI HTMLDocument3_put_onrowsdelete(IHTMLDocument3 *iface, VARIANT v)
285 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
286 FIXME("(%p)->()\n", This);
287 return E_NOTIMPL;
290 static HRESULT WINAPI HTMLDocument3_get_onrowsdelete(IHTMLDocument3 *iface, VARIANT *p)
292 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
293 FIXME("(%p)->(%p)\n", This, p);
294 return E_NOTIMPL;
297 static HRESULT WINAPI HTMLDocument3_put_onrowsinserted(IHTMLDocument3 *iface, VARIANT v)
299 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
300 FIXME("(%p)->()\n", This);
301 return E_NOTIMPL;
304 static HRESULT WINAPI HTMLDocument3_get_onrowsinserted(IHTMLDocument3 *iface, VARIANT *p)
306 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
307 FIXME("(%p)->(%p)\n", This, p);
308 return E_NOTIMPL;
311 static HRESULT WINAPI HTMLDocument3_put_oncellchange(IHTMLDocument3 *iface, VARIANT v)
313 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
314 FIXME("(%p)->()\n", This);
315 return E_NOTIMPL;
318 static HRESULT WINAPI HTMLDocument3_get_oncellchange(IHTMLDocument3 *iface, VARIANT *p)
320 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
321 FIXME("(%p)->(%p)\n", This, p);
322 return E_NOTIMPL;
325 static HRESULT WINAPI HTMLDocument3_put_ondatasetchanged(IHTMLDocument3 *iface, VARIANT v)
327 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
328 FIXME("(%p)->()\n", This);
329 return E_NOTIMPL;
332 static HRESULT WINAPI HTMLDocument3_get_ondatasetchanged(IHTMLDocument3 *iface, VARIANT *p)
334 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
335 FIXME("(%p)->(%p)\n", This, p);
336 return E_NOTIMPL;
339 static HRESULT WINAPI HTMLDocument3_put_ondataavailable(IHTMLDocument3 *iface, VARIANT v)
341 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
342 FIXME("(%p)->()\n", This);
343 return E_NOTIMPL;
346 static HRESULT WINAPI HTMLDocument3_get_ondataavailable(IHTMLDocument3 *iface, VARIANT *p)
348 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
349 FIXME("(%p)->(%p)\n", This, p);
350 return E_NOTIMPL;
353 static HRESULT WINAPI HTMLDocument3_put_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT v)
355 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
356 FIXME("(%p)->()\n", This);
357 return E_NOTIMPL;
360 static HRESULT WINAPI HTMLDocument3_get_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT *p)
362 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
363 FIXME("(%p)->(%p)\n", This, p);
364 return E_NOTIMPL;
367 static HRESULT WINAPI HTMLDocument3_put_onpropertychange(IHTMLDocument3 *iface, VARIANT v)
369 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
370 FIXME("(%p)->()\n", This);
371 return E_NOTIMPL;
374 static HRESULT WINAPI HTMLDocument3_get_onpropertychange(IHTMLDocument3 *iface, VARIANT *p)
376 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
377 FIXME("(%p)->(%p)\n", This, p);
378 return E_NOTIMPL;
381 static HRESULT WINAPI HTMLDocument3_put_dir(IHTMLDocument3 *iface, BSTR v)
383 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
384 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
385 return E_NOTIMPL;
388 static HRESULT WINAPI HTMLDocument3_get_dir(IHTMLDocument3 *iface, BSTR *p)
390 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
391 FIXME("(%p)->(%p)\n", This, p);
392 return E_NOTIMPL;
395 static HRESULT WINAPI HTMLDocument3_put_oncontextmenu(IHTMLDocument3 *iface, VARIANT v)
397 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
399 TRACE("(%p)->()\n", This);
401 return set_doc_event(This, EVENTID_CONTEXTMENU, &v);
404 static HRESULT WINAPI HTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p)
406 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
408 TRACE("(%p)->(%p)\n", This, p);
410 return get_doc_event(This, EVENTID_CONTEXTMENU, p);
413 static HRESULT WINAPI HTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v)
415 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
416 FIXME("(%p)->()\n", This);
417 return E_NOTIMPL;
420 static HRESULT WINAPI HTMLDocument3_get_onstop(IHTMLDocument3 *iface, VARIANT *p)
422 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
423 FIXME("(%p)->(%p)\n", This, p);
424 return E_NOTIMPL;
427 static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface,
428 IHTMLDocument2 **ppNewDoc)
430 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
431 nsIDOMDocumentFragment *doc_frag;
432 HTMLDocumentNode *docnode;
433 nsresult nsres;
434 HRESULT hres;
436 TRACE("(%p)->(%p)\n", This, ppNewDoc);
438 if(!This->doc_node->nsdoc) {
439 FIXME("NULL nsdoc\n");
440 return E_NOTIMPL;
443 nsres = nsIDOMHTMLDocument_CreateDocumentFragment(This->doc_node->nsdoc, &doc_frag);
444 if(NS_FAILED(nsres)) {
445 ERR("CreateDocumentFragment failed: %08x\n", nsres);
446 return E_FAIL;
449 hres = create_document_fragment((nsIDOMNode*)doc_frag, This->doc_node, &docnode);
450 nsIDOMDocumentFragment_Release(doc_frag);
451 if(FAILED(hres))
452 return hres;
454 *ppNewDoc = &docnode->basedoc.IHTMLDocument2_iface;
455 return S_OK;
458 static HRESULT WINAPI HTMLDocument3_get_parentDocument(IHTMLDocument3 *iface,
459 IHTMLDocument2 **p)
461 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
462 FIXME("(%p)->(%p)\n", This, p);
463 return E_NOTIMPL;
466 static HRESULT WINAPI HTMLDocument3_put_enableDownload(IHTMLDocument3 *iface,
467 VARIANT_BOOL v)
469 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
470 FIXME("(%p)->(%x)\n", This, v);
471 return E_NOTIMPL;
474 static HRESULT WINAPI HTMLDocument3_get_enableDownload(IHTMLDocument3 *iface,
475 VARIANT_BOOL *p)
477 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
478 FIXME("(%p)->(%p)\n", This, p);
479 return E_NOTIMPL;
482 static HRESULT WINAPI HTMLDocument3_put_baseUrl(IHTMLDocument3 *iface, BSTR v)
484 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
485 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
486 return E_NOTIMPL;
489 static HRESULT WINAPI HTMLDocument3_get_baseUrl(IHTMLDocument3 *iface, BSTR *p)
491 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
492 FIXME("(%p)->(%p)\n", This, p);
493 return E_NOTIMPL;
496 static HRESULT WINAPI HTMLDocument3_get_childNodes(IHTMLDocument3 *iface, IDispatch **p)
498 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
500 TRACE("(%p)->(%p)\n", This, p);
502 return IHTMLDOMNode_get_childNodes(&This->doc_node->node.IHTMLDOMNode_iface, p);
505 static HRESULT WINAPI HTMLDocument3_put_inheritStyleSheets(IHTMLDocument3 *iface,
506 VARIANT_BOOL v)
508 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
509 FIXME("(%p)->()\n", This);
510 return E_NOTIMPL;
513 static HRESULT WINAPI HTMLDocument3_get_inheritStyleSheets(IHTMLDocument3 *iface,
514 VARIANT_BOOL *p)
516 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
517 FIXME("(%p)->(%p)\n", This, p);
518 return E_NOTIMPL;
521 static HRESULT WINAPI HTMLDocument3_put_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT v)
523 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
524 FIXME("(%p)->()\n", This);
525 return E_NOTIMPL;
528 static HRESULT WINAPI HTMLDocument3_get_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT *p)
530 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
531 FIXME("(%p)->(%p)\n", This, p);
532 return E_NOTIMPL;
535 static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BSTR v,
536 IHTMLElementCollection **ppelColl)
538 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
539 nsIDOMNodeList *node_list;
540 nsAString selector_str;
541 WCHAR *selector;
542 nsresult nsres;
544 static const WCHAR formatW[] = {'*','[','i','d','=','%','s',']',',','*','[','n','a','m','e','=','%','s',']',0};
546 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), ppelColl);
548 if(!This->doc_node || !This->doc_node->nsdoc) {
549 /* We should probably return an empty collection. */
550 FIXME("No nsdoc\n");
551 return E_NOTIMPL;
554 selector = heap_alloc(2*SysStringLen(v)*sizeof(WCHAR) + sizeof(formatW));
555 if(!selector)
556 return E_OUTOFMEMORY;
557 sprintfW(selector, formatW, v, v);
560 * NOTE: IE getElementsByName implementation differs from Gecko. It searches both name and id attributes.
561 * That's why we use CSS selector instead. We should also use name only when it applies to given element
562 * types and search should be case insensitive. Those are currently not supported properly.
564 nsAString_InitDepend(&selector_str, selector);
565 nsres = nsIDOMNodeSelector_QuerySelectorAll(This->doc_node->nsnode_selector, &selector_str, &node_list);
566 nsAString_Finish(&selector_str);
567 heap_free(selector);
568 if(NS_FAILED(nsres)) {
569 ERR("QuerySelectorAll failed: %08x\n", nsres);
570 return E_FAIL;
573 *ppelColl = create_collection_from_nodelist(This->doc_node, node_list);
574 nsIDOMNodeList_Release(node_list);
575 return S_OK;
579 static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v,
580 IHTMLElement **pel)
582 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
583 HTMLElement *elem;
584 HRESULT hres;
586 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
588 hres = get_doc_elem_by_id(This->doc_node, v, &elem);
589 if(FAILED(hres) || !elem) {
590 *pel = NULL;
591 return hres;
594 *pel = &elem->IHTMLElement_iface;
595 return S_OK;
599 static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, BSTR v,
600 IHTMLElementCollection **pelColl)
602 HTMLDocument *This = impl_from_IHTMLDocument3(iface);
603 nsIDOMNodeList *nslist;
604 nsAString id_str;
605 nsresult nsres;
607 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
609 if(!This->doc_node->nsdoc) {
610 WARN("NULL nsdoc\n");
611 return E_UNEXPECTED;
614 nsAString_InitDepend(&id_str, v);
615 nsres = nsIDOMHTMLDocument_GetElementsByTagName(This->doc_node->nsdoc, &id_str, &nslist);
616 nsAString_Finish(&id_str);
617 if(FAILED(nsres)) {
618 ERR("GetElementByName failed: %08x\n", nsres);
619 return E_FAIL;
622 *pelColl = create_collection_from_nodelist(This->doc_node, nslist);
623 nsIDOMNodeList_Release(nslist);
625 return S_OK;
628 static const IHTMLDocument3Vtbl HTMLDocument3Vtbl = {
629 HTMLDocument3_QueryInterface,
630 HTMLDocument3_AddRef,
631 HTMLDocument3_Release,
632 HTMLDocument3_GetTypeInfoCount,
633 HTMLDocument3_GetTypeInfo,
634 HTMLDocument3_GetIDsOfNames,
635 HTMLDocument3_Invoke,
636 HTMLDocument3_releaseCapture,
637 HTMLDocument3_recalc,
638 HTMLDocument3_createTextNode,
639 HTMLDocument3_get_documentElement,
640 HTMLDocument3_uniqueID,
641 HTMLDocument3_attachEvent,
642 HTMLDocument3_detachEvent,
643 HTMLDocument3_put_onrowsdelete,
644 HTMLDocument3_get_onrowsdelete,
645 HTMLDocument3_put_onrowsinserted,
646 HTMLDocument3_get_onrowsinserted,
647 HTMLDocument3_put_oncellchange,
648 HTMLDocument3_get_oncellchange,
649 HTMLDocument3_put_ondatasetchanged,
650 HTMLDocument3_get_ondatasetchanged,
651 HTMLDocument3_put_ondataavailable,
652 HTMLDocument3_get_ondataavailable,
653 HTMLDocument3_put_ondatasetcomplete,
654 HTMLDocument3_get_ondatasetcomplete,
655 HTMLDocument3_put_onpropertychange,
656 HTMLDocument3_get_onpropertychange,
657 HTMLDocument3_put_dir,
658 HTMLDocument3_get_dir,
659 HTMLDocument3_put_oncontextmenu,
660 HTMLDocument3_get_oncontextmenu,
661 HTMLDocument3_put_onstop,
662 HTMLDocument3_get_onstop,
663 HTMLDocument3_createDocumentFragment,
664 HTMLDocument3_get_parentDocument,
665 HTMLDocument3_put_enableDownload,
666 HTMLDocument3_get_enableDownload,
667 HTMLDocument3_put_baseUrl,
668 HTMLDocument3_get_baseUrl,
669 HTMLDocument3_get_childNodes,
670 HTMLDocument3_put_inheritStyleSheets,
671 HTMLDocument3_get_inheritStyleSheets,
672 HTMLDocument3_put_onbeforeeditfocus,
673 HTMLDocument3_get_onbeforeeditfocus,
674 HTMLDocument3_getElementsByName,
675 HTMLDocument3_getElementById,
676 HTMLDocument3_getElementsByTagName
679 static inline HTMLDocument *impl_from_IHTMLDocument4(IHTMLDocument4 *iface)
681 return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument4_iface);
684 static HRESULT WINAPI HTMLDocument4_QueryInterface(IHTMLDocument4 *iface,
685 REFIID riid, void **ppv)
687 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
688 return htmldoc_query_interface(This, riid, ppv);
691 static ULONG WINAPI HTMLDocument4_AddRef(IHTMLDocument4 *iface)
693 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
694 return htmldoc_addref(This);
697 static ULONG WINAPI HTMLDocument4_Release(IHTMLDocument4 *iface)
699 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
700 return htmldoc_release(This);
703 static HRESULT WINAPI HTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo)
705 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
706 return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
709 static HRESULT WINAPI HTMLDocument4_GetTypeInfo(IHTMLDocument4 *iface, UINT iTInfo,
710 LCID lcid, ITypeInfo **ppTInfo)
712 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
713 return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
716 static HRESULT WINAPI HTMLDocument4_GetIDsOfNames(IHTMLDocument4 *iface, REFIID riid,
717 LPOLESTR *rgszNames, UINT cNames,
718 LCID lcid, DISPID *rgDispId)
720 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
721 return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
722 rgDispId);
725 static HRESULT WINAPI HTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdMember,
726 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
727 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
729 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
730 return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
731 pDispParams, pVarResult, pExcepInfo, puArgErr);
734 static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface)
736 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
737 nsIDOMHTMLElement *nsbody;
738 nsresult nsres;
740 TRACE("(%p)->()\n", This);
742 nsres = nsIDOMHTMLDocument_GetBody(This->doc_node->nsdoc, &nsbody);
743 if(NS_FAILED(nsres) || !nsbody) {
744 ERR("GetBody failed: %08x\n", nsres);
745 return E_FAIL;
748 nsres = nsIDOMHTMLElement_Focus(nsbody);
749 nsIDOMHTMLElement_Release(nsbody);
750 if(NS_FAILED(nsres)) {
751 ERR("Focus failed: %08x\n", nsres);
752 return E_FAIL;
755 return S_OK;
758 static HRESULT WINAPI HTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL *pfFocus)
760 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
761 FIXME("(%p)->(%p)\n", This, pfFocus);
762 return E_NOTIMPL;
765 static HRESULT WINAPI HTMLDocument4_put_onselectionchange(IHTMLDocument4 *iface, VARIANT v)
767 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
768 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
769 return E_NOTIMPL;
772 static HRESULT WINAPI HTMLDocument4_get_onselectionchange(IHTMLDocument4 *iface, VARIANT *p)
774 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
775 FIXME("(%p)->(%p)\n", This, p);
776 return E_NOTIMPL;
779 static HRESULT WINAPI HTMLDocument4_get_namespace(IHTMLDocument4 *iface, IDispatch **p)
781 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
782 FIXME("(%p)->(%p)\n", This, p);
783 return E_NOTIMPL;
786 static HRESULT WINAPI HTMLDocument4_createDocumentFromUrl(IHTMLDocument4 *iface, BSTR bstrUrl,
787 BSTR bstrOptions, IHTMLDocument2 **newDoc)
789 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
790 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrUrl), debugstr_w(bstrOptions), newDoc);
791 return E_NOTIMPL;
794 static HRESULT WINAPI HTMLDocument4_put_media(IHTMLDocument4 *iface, BSTR v)
796 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
797 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
798 return E_NOTIMPL;
801 static HRESULT WINAPI HTMLDocument4_get_media(IHTMLDocument4 *iface, BSTR *p)
803 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
804 FIXME("(%p)->(%p)\n", This, p);
805 return E_NOTIMPL;
808 static HRESULT WINAPI HTMLDocument4_createEventObject(IHTMLDocument4 *iface,
809 VARIANT *pvarEventObject, IHTMLEventObj **ppEventObj)
811 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
813 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(pvarEventObject), ppEventObj);
815 if(pvarEventObject && V_VT(pvarEventObject) != VT_ERROR && V_VT(pvarEventObject) != VT_EMPTY) {
816 FIXME("unsupported pvarEventObject %s\n", debugstr_variant(pvarEventObject));
817 return E_NOTIMPL;
820 return create_event_obj(ppEventObj);
823 static HRESULT WINAPI HTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEventName,
824 VARIANT *pvarEventObject, VARIANT_BOOL *pfCanceled)
826 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
828 TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCanceled);
830 return dispatch_event(&This->doc_node->node, bstrEventName, pvarEventObject, pfCanceled);
833 static HRESULT WINAPI HTMLDocument4_createRenderStyle(IHTMLDocument4 *iface, BSTR v,
834 IHTMLRenderStyle **ppIHTMLRenderStyle)
836 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
837 FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppIHTMLRenderStyle);
838 return E_NOTIMPL;
841 static HRESULT WINAPI HTMLDocument4_put_oncontrolselect(IHTMLDocument4 *iface, VARIANT v)
843 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
844 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
845 return E_NOTIMPL;
848 static HRESULT WINAPI HTMLDocument4_get_oncontrolselect(IHTMLDocument4 *iface, VARIANT *p)
850 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
851 FIXME("(%p)->(%p)\n", This, p);
852 return E_NOTIMPL;
855 static HRESULT WINAPI HTMLDocument4_get_URLEncoded(IHTMLDocument4 *iface, BSTR *p)
857 HTMLDocument *This = impl_from_IHTMLDocument4(iface);
858 FIXME("(%p)->(%p)\n", This, p);
859 return E_NOTIMPL;
862 static const IHTMLDocument4Vtbl HTMLDocument4Vtbl = {
863 HTMLDocument4_QueryInterface,
864 HTMLDocument4_AddRef,
865 HTMLDocument4_Release,
866 HTMLDocument4_GetTypeInfoCount,
867 HTMLDocument4_GetTypeInfo,
868 HTMLDocument4_GetIDsOfNames,
869 HTMLDocument4_Invoke,
870 HTMLDocument4_focus,
871 HTMLDocument4_hasFocus,
872 HTMLDocument4_put_onselectionchange,
873 HTMLDocument4_get_onselectionchange,
874 HTMLDocument4_get_namespace,
875 HTMLDocument4_createDocumentFromUrl,
876 HTMLDocument4_put_media,
877 HTMLDocument4_get_media,
878 HTMLDocument4_createEventObject,
879 HTMLDocument4_fireEvent,
880 HTMLDocument4_createRenderStyle,
881 HTMLDocument4_put_oncontrolselect,
882 HTMLDocument4_get_oncontrolselect,
883 HTMLDocument4_get_URLEncoded
886 static inline HTMLDocument *impl_from_IHTMLDocument5(IHTMLDocument5 *iface)
888 return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument5_iface);
891 static HRESULT WINAPI HTMLDocument5_QueryInterface(IHTMLDocument5 *iface,
892 REFIID riid, void **ppv)
894 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
895 return htmldoc_query_interface(This, riid, ppv);
898 static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface)
900 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
901 return htmldoc_addref(This);
904 static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface)
906 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
907 return htmldoc_release(This);
910 static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo)
912 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
913 return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
916 static HRESULT WINAPI HTMLDocument5_GetTypeInfo(IHTMLDocument5 *iface, UINT iTInfo,
917 LCID lcid, ITypeInfo **ppTInfo)
919 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
920 return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
923 static HRESULT WINAPI HTMLDocument5_GetIDsOfNames(IHTMLDocument5 *iface, REFIID riid,
924 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
926 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
927 return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
928 rgDispId);
931 static HRESULT WINAPI HTMLDocument5_Invoke(IHTMLDocument5 *iface, DISPID dispIdMember,
932 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
933 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
935 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
936 return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
937 pDispParams, pVarResult, pExcepInfo, puArgErr);
940 static HRESULT WINAPI HTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v)
942 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
943 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
944 return E_NOTIMPL;
947 static HRESULT WINAPI HTMLDocument5_get_onmousewheel(IHTMLDocument5 *iface, VARIANT *p)
949 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
950 FIXME("(%p)->(%p)\n", This, p);
951 return E_NOTIMPL;
954 static HRESULT WINAPI HTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMNode **p)
956 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
957 FIXME("(%p)->(%p)\n", This, p);
958 return E_NOTIMPL;
961 static HRESULT WINAPI HTMLDocument5_get_implementation(IHTMLDocument5 *iface, IHTMLDOMImplementation **p)
963 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
964 FIXME("(%p)->(%p)\n", This, p);
965 return E_NOTIMPL;
968 static HRESULT WINAPI HTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR bstrattrName,
969 IHTMLDOMAttribute **ppattribute)
971 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
972 HTMLDOMAttribute *attr;
973 HRESULT hres;
975 TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrattrName), ppattribute);
977 hres = HTMLDOMAttribute_Create(bstrattrName, NULL, 0, &attr);
978 if(FAILED(hres))
979 return hres;
981 *ppattribute = &attr->IHTMLDOMAttribute_iface;
982 return S_OK;
985 static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bstrdata,
986 IHTMLDOMNode **ppRetNode)
988 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
989 nsIDOMComment *nscomment;
990 HTMLElement *elem;
991 nsAString str;
992 nsresult nsres;
993 HRESULT hres;
995 TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrdata), ppRetNode);
997 if(!This->doc_node->nsdoc) {
998 WARN("NULL nsdoc\n");
999 return E_UNEXPECTED;
1002 nsAString_InitDepend(&str, bstrdata);
1003 nsres = nsIDOMHTMLDocument_CreateComment(This->doc_node->nsdoc, &str, &nscomment);
1004 nsAString_Finish(&str);
1005 if(NS_FAILED(nsres)) {
1006 ERR("CreateTextNode failed: %08x\n", nsres);
1007 return E_FAIL;
1010 hres = HTMLCommentElement_Create(This->doc_node, (nsIDOMNode*)nscomment, &elem);
1011 nsIDOMComment_Release(nscomment);
1012 if(FAILED(hres))
1013 return hres;
1015 *ppRetNode = &elem->node.IHTMLDOMNode_iface;
1016 return S_OK;
1019 static HRESULT WINAPI HTMLDocument5_put_onfocusin(IHTMLDocument5 *iface, VARIANT v)
1021 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1022 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1023 return E_NOTIMPL;
1026 static HRESULT WINAPI HTMLDocument5_get_onfocusin(IHTMLDocument5 *iface, VARIANT *p)
1028 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1029 FIXME("(%p)->(%p)\n", This, p);
1030 return E_NOTIMPL;
1033 static HRESULT WINAPI HTMLDocument5_put_onfocusout(IHTMLDocument5 *iface, VARIANT v)
1035 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1036 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1037 return E_NOTIMPL;
1040 static HRESULT WINAPI HTMLDocument5_get_onfocusout(IHTMLDocument5 *iface, VARIANT *p)
1042 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1043 FIXME("(%p)->(%p)\n", This, p);
1044 return E_NOTIMPL;
1047 static HRESULT WINAPI HTMLDocument5_put_onactivate(IHTMLDocument5 *iface, VARIANT v)
1049 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1050 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1051 return E_NOTIMPL;
1054 static HRESULT WINAPI HTMLDocument5_get_onactivate(IHTMLDocument5 *iface, VARIANT *p)
1056 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1057 FIXME("(%p)->(%p)\n", This, p);
1058 return E_NOTIMPL;
1061 static HRESULT WINAPI HTMLDocument5_put_ondeactivate(IHTMLDocument5 *iface, VARIANT v)
1063 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1064 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1065 return E_NOTIMPL;
1068 static HRESULT WINAPI HTMLDocument5_get_ondeactivate(IHTMLDocument5 *iface, VARIANT *p)
1070 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1071 FIXME("(%p)->(%p)\n", This, p);
1072 return E_NOTIMPL;
1075 static HRESULT WINAPI HTMLDocument5_put_onbeforeactivate(IHTMLDocument5 *iface, VARIANT v)
1077 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1078 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1079 return E_NOTIMPL;
1082 static HRESULT WINAPI HTMLDocument5_get_onbeforeactivate(IHTMLDocument5 *iface, VARIANT *p)
1084 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1085 FIXME("(%p)->(%p)\n", This, p);
1086 return E_NOTIMPL;
1089 static HRESULT WINAPI HTMLDocument5_put_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT v)
1091 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1092 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1093 return E_NOTIMPL;
1096 static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT *p)
1098 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1099 FIXME("(%p)->(%p)\n", This, p);
1100 return E_NOTIMPL;
1103 static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p)
1105 HTMLDocument *This = impl_from_IHTMLDocument5(iface);
1106 nsAString mode_str;
1107 const PRUnichar *mode;
1109 TRACE("(%p)->(%p)\n", This, p);
1111 if(!This->doc_node->nsdoc) {
1112 WARN("NULL nsdoc\n");
1113 return E_UNEXPECTED;
1116 nsAString_Init(&mode_str, NULL);
1117 nsIDOMHTMLDocument_GetCompatMode(This->doc_node->nsdoc, &mode_str);
1119 nsAString_GetData(&mode_str, &mode);
1120 *p = SysAllocString(mode);
1121 nsAString_Finish(&mode_str);
1123 return S_OK;
1126 static const IHTMLDocument5Vtbl HTMLDocument5Vtbl = {
1127 HTMLDocument5_QueryInterface,
1128 HTMLDocument5_AddRef,
1129 HTMLDocument5_Release,
1130 HTMLDocument5_GetTypeInfoCount,
1131 HTMLDocument5_GetTypeInfo,
1132 HTMLDocument5_GetIDsOfNames,
1133 HTMLDocument5_Invoke,
1134 HTMLDocument5_put_onmousewheel,
1135 HTMLDocument5_get_onmousewheel,
1136 HTMLDocument5_get_doctype,
1137 HTMLDocument5_get_implementation,
1138 HTMLDocument5_createAttribute,
1139 HTMLDocument5_createComment,
1140 HTMLDocument5_put_onfocusin,
1141 HTMLDocument5_get_onfocusin,
1142 HTMLDocument5_put_onfocusout,
1143 HTMLDocument5_get_onfocusout,
1144 HTMLDocument5_put_onactivate,
1145 HTMLDocument5_get_onactivate,
1146 HTMLDocument5_put_ondeactivate,
1147 HTMLDocument5_get_ondeactivate,
1148 HTMLDocument5_put_onbeforeactivate,
1149 HTMLDocument5_get_onbeforeactivate,
1150 HTMLDocument5_put_onbeforedeactivate,
1151 HTMLDocument5_get_onbeforedeactivate,
1152 HTMLDocument5_get_compatMode
1155 static inline HTMLDocument *impl_from_IHTMLDocument6(IHTMLDocument6 *iface)
1157 return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument6_iface);
1160 static HRESULT WINAPI HTMLDocument6_QueryInterface(IHTMLDocument6 *iface,
1161 REFIID riid, void **ppv)
1163 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1164 return htmldoc_query_interface(This, riid, ppv);
1167 static ULONG WINAPI HTMLDocument6_AddRef(IHTMLDocument6 *iface)
1169 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1170 return htmldoc_addref(This);
1173 static ULONG WINAPI HTMLDocument6_Release(IHTMLDocument6 *iface)
1175 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1176 return htmldoc_release(This);
1179 static HRESULT WINAPI HTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo)
1181 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1182 return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
1185 static HRESULT WINAPI HTMLDocument6_GetTypeInfo(IHTMLDocument6 *iface, UINT iTInfo,
1186 LCID lcid, ITypeInfo **ppTInfo)
1188 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1189 return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1192 static HRESULT WINAPI HTMLDocument6_GetIDsOfNames(IHTMLDocument6 *iface, REFIID riid,
1193 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1195 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1196 return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
1197 rgDispId);
1200 static HRESULT WINAPI HTMLDocument6_Invoke(IHTMLDocument6 *iface, DISPID dispIdMember,
1201 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1202 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1204 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1205 return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
1206 pDispParams, pVarResult, pExcepInfo, puArgErr);
1209 static HRESULT WINAPI HTMLDocument6_get_compatible(IHTMLDocument6 *iface,
1210 IHTMLDocumentCompatibleInfoCollection **p)
1212 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1213 FIXME("(%p)->(%p)\n", This, p);
1214 return E_NOTIMPL;
1217 static HRESULT WINAPI HTMLDocument6_get_documentMode(IHTMLDocument6 *iface,
1218 VARIANT *p)
1220 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1221 FIXME("(%p)->(%p)\n", This, p);
1222 return E_NOTIMPL;
1225 static HRESULT WINAPI HTMLDocument6_get_onstorage(IHTMLDocument6 *iface,
1226 VARIANT *p)
1228 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1229 FIXME("(%p)->(%p)\n", This, p);
1230 return E_NOTIMPL;
1233 static HRESULT WINAPI HTMLDocument6_put_onstorage(IHTMLDocument6 *iface, VARIANT v)
1235 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1236 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1237 return E_NOTIMPL;
1240 static HRESULT WINAPI HTMLDocument6_get_onstoragecommit(IHTMLDocument6 *iface,
1241 VARIANT *p)
1243 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1244 FIXME("(%p)->(%p)\n", This, p);
1245 return E_NOTIMPL;
1248 static HRESULT WINAPI HTMLDocument6_put_onstoragecommit(IHTMLDocument6 *iface, VARIANT v)
1250 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1251 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1252 return E_NOTIMPL;
1255 static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface,
1256 BSTR bstrId, IHTMLElement2 **p)
1258 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1259 FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrId), p);
1260 return E_NOTIMPL;
1263 static HRESULT WINAPI HTMLDocument6_updateSettings(IHTMLDocument6 *iface)
1265 HTMLDocument *This = impl_from_IHTMLDocument6(iface);
1266 FIXME("(%p)->()\n", This);
1267 return E_NOTIMPL;
1270 static const IHTMLDocument6Vtbl HTMLDocument6Vtbl = {
1271 HTMLDocument6_QueryInterface,
1272 HTMLDocument6_AddRef,
1273 HTMLDocument6_Release,
1274 HTMLDocument6_GetTypeInfoCount,
1275 HTMLDocument6_GetTypeInfo,
1276 HTMLDocument6_GetIDsOfNames,
1277 HTMLDocument6_Invoke,
1278 HTMLDocument6_get_compatible,
1279 HTMLDocument6_get_documentMode,
1280 HTMLDocument6_put_onstorage,
1281 HTMLDocument6_get_onstorage,
1282 HTMLDocument6_put_onstoragecommit,
1283 HTMLDocument6_get_onstoragecommit,
1284 HTMLDocument6_getElementById,
1285 HTMLDocument6_updateSettings
1288 void HTMLDocument_HTMLDocument3_Init(HTMLDocument *This)
1290 This->IHTMLDocument3_iface.lpVtbl = &HTMLDocument3Vtbl;
1291 This->IHTMLDocument4_iface.lpVtbl = &HTMLDocument4Vtbl;
1292 This->IHTMLDocument5_iface.lpVtbl = &HTMLDocument5Vtbl;
1293 This->IHTMLDocument6_iface.lpVtbl = &HTMLDocument6Vtbl;