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
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
34 #include "htmlevent.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
38 #define HTMLDOC3_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument3, iface)
40 static HRESULT WINAPI
HTMLDocument3_QueryInterface(IHTMLDocument3
*iface
,
41 REFIID riid
, void **ppv
)
43 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
44 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppv
);
47 static ULONG WINAPI
HTMLDocument3_AddRef(IHTMLDocument3
*iface
)
49 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
50 return IHTMLDocument2_AddRef(HTMLDOC(This
));
53 static ULONG WINAPI
HTMLDocument3_Release(IHTMLDocument3
*iface
)
55 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
56 return IHTMLDocument2_Release(HTMLDOC(This
));
59 static HRESULT WINAPI
HTMLDocument3_GetTypeInfoCount(IHTMLDocument3
*iface
, UINT
*pctinfo
)
61 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
62 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(This
), pctinfo
);
65 static HRESULT WINAPI
HTMLDocument3_GetTypeInfo(IHTMLDocument3
*iface
, UINT iTInfo
,
66 LCID lcid
, ITypeInfo
**ppTInfo
)
68 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
69 return IDispatchEx_GetTypeInfo(DISPATCHEX(This
), iTInfo
, lcid
, ppTInfo
);
72 static HRESULT WINAPI
HTMLDocument3_GetIDsOfNames(IHTMLDocument3
*iface
, REFIID riid
,
73 LPOLESTR
*rgszNames
, UINT cNames
,
74 LCID lcid
, DISPID
*rgDispId
)
76 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
77 return IDispatchEx_GetIDsOfNames(DISPATCHEX(This
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
80 static HRESULT WINAPI
HTMLDocument3_Invoke(IHTMLDocument3
*iface
, DISPID dispIdMember
,
81 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
82 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
84 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
85 return IDispatchEx_Invoke(DISPATCHEX(This
), dispIdMember
, riid
, lcid
, wFlags
, pDispParams
,
86 pVarResult
, pExcepInfo
, puArgErr
);
89 static HRESULT WINAPI
HTMLDocument3_releaseCapture(IHTMLDocument3
*iface
)
91 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
92 FIXME("(%p)\n", This
);
96 static HRESULT WINAPI
HTMLDocument3_recalc(IHTMLDocument3
*iface
, VARIANT_BOOL fForce
)
98 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
99 FIXME("(%p)->(%x)\n", This
, fForce
);
103 static HRESULT WINAPI
HTMLDocument3_createTextNode(IHTMLDocument3
*iface
, BSTR text
,
104 IHTMLDOMNode
**newTextNode
)
106 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
112 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(text
), newTextNode
);
114 if(!This
->doc_node
->nsdoc
) {
115 WARN("NULL nsdoc\n");
119 nsAString_Init(&text_str
, text
);
120 nsres
= nsIDOMHTMLDocument_CreateTextNode(This
->doc_node
->nsdoc
, &text_str
, &nstext
);
121 nsAString_Finish(&text_str
);
122 if(NS_FAILED(nsres
)) {
123 ERR("CreateTextNode failed: %08x\n", nsres
);
127 node
= HTMLDOMTextNode_Create(This
->doc_node
, (nsIDOMNode
*)nstext
);
128 nsIDOMElement_Release(nstext
);
130 *newTextNode
= HTMLDOMNODE(node
);
131 IHTMLDOMNode_AddRef(HTMLDOMNODE(node
));
135 static HRESULT WINAPI
HTMLDocument3_get_documentElement(IHTMLDocument3
*iface
, IHTMLElement
**p
)
137 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
138 nsIDOMElement
*nselem
= NULL
;
142 TRACE("(%p)->(%p)\n", This
, p
);
144 if(This
->window
->readystate
== READYSTATE_UNINITIALIZED
) {
149 if(!This
->doc_node
->nsdoc
) {
150 WARN("NULL nsdoc\n");
154 nsres
= nsIDOMHTMLDocument_GetDocumentElement(This
->doc_node
->nsdoc
, &nselem
);
155 if(NS_FAILED(nsres
)) {
156 ERR("GetDocumentElement failed: %08x\n", nsres
);
161 node
= get_node(This
->doc_node
, (nsIDOMNode
*)nselem
, TRUE
);
162 nsIDOMElement_Release(nselem
);
163 IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node
), &IID_IHTMLElement
, (void**)p
);
171 static HRESULT WINAPI
HTMLDocument3_uniqueID(IHTMLDocument3
*iface
, BSTR
*p
)
173 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
174 FIXME("(%p)->(%p)\n", This
, p
);
178 static HRESULT WINAPI
HTMLDocument3_attachEvent(IHTMLDocument3
*iface
, BSTR event
,
179 IDispatch
* pDisp
, VARIANT_BOOL
*pfResult
)
181 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
183 TRACE("(%p)->(%s %p %p)\n", This
, debugstr_w(event
), pDisp
, pfResult
);
185 return attach_event(&This
->doc_node
->node
.event_target
, This
, event
, pDisp
, pfResult
);
188 static HRESULT WINAPI
HTMLDocument3_detachEvent(IHTMLDocument3
*iface
, BSTR event
,
191 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
192 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(event
), pDisp
);
196 static HRESULT WINAPI
HTMLDocument3_put_onrowsdelete(IHTMLDocument3
*iface
, VARIANT v
)
198 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
199 FIXME("(%p)->()\n", This
);
203 static HRESULT WINAPI
HTMLDocument3_get_onrowsdelete(IHTMLDocument3
*iface
, VARIANT
*p
)
205 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
206 FIXME("(%p)->(%p)\n", This
, p
);
210 static HRESULT WINAPI
HTMLDocument3_put_onrowsinserted(IHTMLDocument3
*iface
, VARIANT v
)
212 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
213 FIXME("(%p)->()\n", This
);
217 static HRESULT WINAPI
HTMLDocument3_get_onrowsinserted(IHTMLDocument3
*iface
, VARIANT
*p
)
219 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
220 FIXME("(%p)->(%p)\n", This
, p
);
224 static HRESULT WINAPI
HTMLDocument3_put_oncellchange(IHTMLDocument3
*iface
, VARIANT v
)
226 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
227 FIXME("(%p)->()\n", This
);
231 static HRESULT WINAPI
HTMLDocument3_get_oncellchange(IHTMLDocument3
*iface
, VARIANT
*p
)
233 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
234 FIXME("(%p)->(%p)\n", This
, p
);
238 static HRESULT WINAPI
HTMLDocument3_put_ondatasetchanged(IHTMLDocument3
*iface
, VARIANT v
)
240 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
241 FIXME("(%p)->()\n", This
);
245 static HRESULT WINAPI
HTMLDocument3_get_ondatasetchanged(IHTMLDocument3
*iface
, VARIANT
*p
)
247 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
248 FIXME("(%p)->(%p)\n", This
, p
);
252 static HRESULT WINAPI
HTMLDocument3_put_ondataavailable(IHTMLDocument3
*iface
, VARIANT v
)
254 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
255 FIXME("(%p)->()\n", This
);
259 static HRESULT WINAPI
HTMLDocument3_get_ondataavailable(IHTMLDocument3
*iface
, VARIANT
*p
)
261 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
262 FIXME("(%p)->(%p)\n", This
, p
);
266 static HRESULT WINAPI
HTMLDocument3_put_ondatasetcomplete(IHTMLDocument3
*iface
, VARIANT v
)
268 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
269 FIXME("(%p)->()\n", This
);
273 static HRESULT WINAPI
HTMLDocument3_get_ondatasetcomplete(IHTMLDocument3
*iface
, VARIANT
*p
)
275 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
276 FIXME("(%p)->(%p)\n", This
, p
);
280 static HRESULT WINAPI
HTMLDocument3_put_onpropertychange(IHTMLDocument3
*iface
, VARIANT v
)
282 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
283 FIXME("(%p)->()\n", This
);
287 static HRESULT WINAPI
HTMLDocument3_get_onpropertychange(IHTMLDocument3
*iface
, VARIANT
*p
)
289 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
290 FIXME("(%p)->(%p)\n", This
, p
);
294 static HRESULT WINAPI
HTMLDocument3_put_dir(IHTMLDocument3
*iface
, BSTR v
)
296 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
297 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
301 static HRESULT WINAPI
HTMLDocument3_get_dir(IHTMLDocument3
*iface
, BSTR
*p
)
303 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
304 FIXME("(%p)->(%p)\n", This
, p
);
308 static HRESULT WINAPI
HTMLDocument3_put_oncontextmenu(IHTMLDocument3
*iface
, VARIANT v
)
310 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
311 FIXME("(%p)->()\n", This
);
315 static HRESULT WINAPI
HTMLDocument3_get_oncontextmenu(IHTMLDocument3
*iface
, VARIANT
*p
)
317 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
318 FIXME("(%p)->(%p)\n", This
, p
);
322 static HRESULT WINAPI
HTMLDocument3_put_onstop(IHTMLDocument3
*iface
, VARIANT v
)
324 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
325 FIXME("(%p)->()\n", This
);
329 static HRESULT WINAPI
HTMLDocument3_get_onstop(IHTMLDocument3
*iface
, VARIANT
*p
)
331 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
332 FIXME("(%p)->(%p)\n", This
, p
);
336 static HRESULT WINAPI
HTMLDocument3_createDocumentFragment(IHTMLDocument3
*iface
,
337 IHTMLDocument2
**ppNewDoc
)
339 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
340 FIXME("(%p)->(%p)\n", This
, ppNewDoc
);
344 static HRESULT WINAPI
HTMLDocument3_get_parentDocument(IHTMLDocument3
*iface
,
347 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
348 FIXME("(%p)->(%p)\n", This
, p
);
352 static HRESULT WINAPI
HTMLDocument3_put_enableDownload(IHTMLDocument3
*iface
,
355 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
356 FIXME("(%p)->(%x)\n", This
, v
);
360 static HRESULT WINAPI
HTMLDocument3_get_enableDownload(IHTMLDocument3
*iface
,
363 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
364 FIXME("(%p)->(%p)\n", This
, p
);
368 static HRESULT WINAPI
HTMLDocument3_put_baseUrl(IHTMLDocument3
*iface
, BSTR v
)
370 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
371 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
375 static HRESULT WINAPI
HTMLDocument3_get_baseUrl(IHTMLDocument3
*iface
, BSTR
*p
)
377 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
378 FIXME("(%p)->(%p)\n", This
, p
);
382 static HRESULT WINAPI
HTMLDocument3_get_childNodes(IHTMLDocument3
*iface
, IDispatch
**p
)
384 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
385 FIXME("(%p)->(%p)\n", This
, p
);
389 static HRESULT WINAPI
HTMLDocument3_put_inheritStyleSheets(IHTMLDocument3
*iface
,
392 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
393 FIXME("(%p)->()\n", This
);
397 static HRESULT WINAPI
HTMLDocument3_get_inheritStyleSheets(IHTMLDocument3
*iface
,
400 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
401 FIXME("(%p)->(%p)\n", This
, p
);
405 static HRESULT WINAPI
HTMLDocument3_put_onbeforeeditfocus(IHTMLDocument3
*iface
, VARIANT v
)
407 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
408 FIXME("(%p)->()\n", This
);
412 static HRESULT WINAPI
HTMLDocument3_get_onbeforeeditfocus(IHTMLDocument3
*iface
, VARIANT
*p
)
414 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
415 FIXME("(%p)->(%p)\n", This
, p
);
419 static HRESULT WINAPI
HTMLDocument3_getElementsByName(IHTMLDocument3
*iface
, BSTR v
,
420 IHTMLElementCollection
**ppelColl
)
422 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
423 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(v
), ppelColl
);
428 static HRESULT WINAPI
HTMLDocument3_getElementById(IHTMLDocument3
*iface
, BSTR v
,
431 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
432 nsIDOMElement
*nselem
;
437 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(v
), pel
);
439 if(!This
->doc_node
->nsdoc
) {
440 WARN("NULL nsdoc\n");
444 nsAString_Init(&id_str
, v
);
445 nsres
= nsIDOMHTMLDocument_GetElementById(This
->doc_node
->nsdoc
, &id_str
, &nselem
);
446 nsAString_Finish(&id_str
);
448 ERR("GetElementById failed: %08x\n", nsres
);
453 node
= get_node(This
->doc_node
, (nsIDOMNode
*)nselem
, TRUE
);
454 nsIDOMElement_Release(nselem
);
456 IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node
), &IID_IHTMLElement
, (void**)pel
);
465 static HRESULT WINAPI
HTMLDocument3_getElementsByTagName(IHTMLDocument3
*iface
, BSTR v
,
466 IHTMLElementCollection
**pelColl
)
468 HTMLDocument
*This
= HTMLDOC3_THIS(iface
);
469 nsIDOMNodeList
*nslist
;
470 nsAString id_str
, ns_str
;
472 static const WCHAR str
[] = {'*',0};
474 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(v
), pelColl
);
476 if(!This
->doc_node
->nsdoc
) {
477 WARN("NULL nsdoc\n");
481 nsAString_Init(&id_str
, v
);
482 nsAString_Init(&ns_str
, str
);
483 nsres
= nsIDOMHTMLDocument_GetElementsByTagNameNS(This
->doc_node
->nsdoc
, &ns_str
, &id_str
, &nslist
);
484 nsAString_Finish(&id_str
);
485 nsAString_Finish(&ns_str
);
487 ERR("GetElementByName failed: %08x\n", nsres
);
491 *pelColl
= (IHTMLElementCollection
*)create_collection_from_nodelist(This
->doc_node
, (IUnknown
*)HTMLDOC3(This
), nslist
);
492 nsIDOMNodeList_Release(nslist
);
499 static const IHTMLDocument3Vtbl HTMLDocument3Vtbl
= {
500 HTMLDocument3_QueryInterface
,
501 HTMLDocument3_AddRef
,
502 HTMLDocument3_Release
,
503 HTMLDocument3_GetTypeInfoCount
,
504 HTMLDocument3_GetTypeInfo
,
505 HTMLDocument3_GetIDsOfNames
,
506 HTMLDocument3_Invoke
,
507 HTMLDocument3_releaseCapture
,
508 HTMLDocument3_recalc
,
509 HTMLDocument3_createTextNode
,
510 HTMLDocument3_get_documentElement
,
511 HTMLDocument3_uniqueID
,
512 HTMLDocument3_attachEvent
,
513 HTMLDocument3_detachEvent
,
514 HTMLDocument3_put_onrowsdelete
,
515 HTMLDocument3_get_onrowsdelete
,
516 HTMLDocument3_put_onrowsinserted
,
517 HTMLDocument3_get_onrowsinserted
,
518 HTMLDocument3_put_oncellchange
,
519 HTMLDocument3_get_oncellchange
,
520 HTMLDocument3_put_ondatasetchanged
,
521 HTMLDocument3_get_ondatasetchanged
,
522 HTMLDocument3_put_ondataavailable
,
523 HTMLDocument3_get_ondataavailable
,
524 HTMLDocument3_put_ondatasetcomplete
,
525 HTMLDocument3_get_ondatasetcomplete
,
526 HTMLDocument3_put_onpropertychange
,
527 HTMLDocument3_get_onpropertychange
,
528 HTMLDocument3_put_dir
,
529 HTMLDocument3_get_dir
,
530 HTMLDocument3_put_oncontextmenu
,
531 HTMLDocument3_get_oncontextmenu
,
532 HTMLDocument3_put_onstop
,
533 HTMLDocument3_get_onstop
,
534 HTMLDocument3_createDocumentFragment
,
535 HTMLDocument3_get_parentDocument
,
536 HTMLDocument3_put_enableDownload
,
537 HTMLDocument3_get_enableDownload
,
538 HTMLDocument3_put_baseUrl
,
539 HTMLDocument3_get_baseUrl
,
540 HTMLDocument3_get_childNodes
,
541 HTMLDocument3_put_inheritStyleSheets
,
542 HTMLDocument3_get_inheritStyleSheets
,
543 HTMLDocument3_put_onbeforeeditfocus
,
544 HTMLDocument3_get_onbeforeeditfocus
,
545 HTMLDocument3_getElementsByName
,
546 HTMLDocument3_getElementById
,
547 HTMLDocument3_getElementsByTagName
550 #define HTMLDOC4_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument4, iface)
552 static HRESULT WINAPI
HTMLDocument4_QueryInterface(IHTMLDocument4
*iface
,
553 REFIID riid
, void **ppv
)
555 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
556 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppv
);
559 static ULONG WINAPI
HTMLDocument4_AddRef(IHTMLDocument4
*iface
)
561 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
562 return IHTMLDocument2_AddRef(HTMLDOC(This
));
565 static ULONG WINAPI
HTMLDocument4_Release(IHTMLDocument4
*iface
)
567 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
568 return IHTMLDocument2_Release(HTMLDOC(This
));
571 static HRESULT WINAPI
HTMLDocument4_GetTypeInfoCount(IHTMLDocument4
*iface
, UINT
*pctinfo
)
573 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
574 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(This
), pctinfo
);
577 static HRESULT WINAPI
HTMLDocument4_GetTypeInfo(IHTMLDocument4
*iface
, UINT iTInfo
,
578 LCID lcid
, ITypeInfo
**ppTInfo
)
580 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
581 return IDispatchEx_GetTypeInfo(DISPATCHEX(This
), iTInfo
, lcid
, ppTInfo
);
584 static HRESULT WINAPI
HTMLDocument4_GetIDsOfNames(IHTMLDocument4
*iface
, REFIID riid
,
585 LPOLESTR
*rgszNames
, UINT cNames
,
586 LCID lcid
, DISPID
*rgDispId
)
588 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
589 return IDispatchEx_GetIDsOfNames(DISPATCHEX(This
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
592 static HRESULT WINAPI
HTMLDocument4_Invoke(IHTMLDocument4
*iface
, DISPID dispIdMember
,
593 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
594 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
596 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
597 return IDispatchEx_Invoke(DISPATCHEX(This
), dispIdMember
, riid
, lcid
, wFlags
, pDispParams
,
598 pVarResult
, pExcepInfo
, puArgErr
);
601 static HRESULT WINAPI
HTMLDocument4_focus(IHTMLDocument4
*iface
)
603 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
604 nsIDOMNSHTMLElement
*nselem
;
605 nsIDOMHTMLElement
*nsbody
;
608 TRACE("(%p)->()\n", This
);
610 nsres
= nsIDOMHTMLDocument_GetBody(This
->doc_node
->nsdoc
, &nsbody
);
611 if(NS_FAILED(nsres
) || !nsbody
) {
612 ERR("GetBody failed: %08x\n", nsres
);
616 nsres
= nsIDOMHTMLElement_QueryInterface(nsbody
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
617 nsIDOMHTMLElement_Release(nsbody
);
618 if(NS_FAILED(nsres
)) {
619 ERR("Could not get nsIDOMNSHTMLElement: %08x\n", nsres
);
623 nsres
= nsIDOMNSHTMLElement_focus(nselem
);
624 nsIDOMNSHTMLElement_Release(nselem
);
625 if(NS_FAILED(nsres
)) {
626 ERR("Focus failed: %08x\n", nsres
);
633 static HRESULT WINAPI
HTMLDocument4_hasFocus(IHTMLDocument4
*iface
, VARIANT_BOOL
*pfFocus
)
635 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
636 FIXME("(%p)->(%p)\n", This
, pfFocus
);
640 static HRESULT WINAPI
HTMLDocument4_put_onselectionchange(IHTMLDocument4
*iface
, VARIANT v
)
642 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
643 FIXME("(%p)->(v)\n", This
);
647 static HRESULT WINAPI
HTMLDocument4_get_onselectionchange(IHTMLDocument4
*iface
, VARIANT
*p
)
649 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
650 FIXME("(%p)->(%p)\n", This
, p
);
654 static HRESULT WINAPI
HTMLDocument4_get_namespace(IHTMLDocument4
*iface
, IDispatch
**p
)
656 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
657 FIXME("(%p)->(%p)\n", This
, p
);
661 static HRESULT WINAPI
HTMLDocument4_createDocumentFromUrl(IHTMLDocument4
*iface
, BSTR bstrUrl
,
662 BSTR bstrOptions
, IHTMLDocument2
**newDoc
)
664 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
665 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(bstrUrl
), debugstr_w(bstrOptions
), newDoc
);
669 static HRESULT WINAPI
HTMLDocument4_put_media(IHTMLDocument4
*iface
, BSTR v
)
671 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
672 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
676 static HRESULT WINAPI
HTMLDocument4_get_media(IHTMLDocument4
*iface
, BSTR
*p
)
678 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
679 FIXME("(%p)->(%p)\n", This
, p
);
683 static HRESULT WINAPI
HTMLDocument4_createEventObject(IHTMLDocument4
*iface
,
684 VARIANT
*pvarEventObject
, IHTMLEventObj
**ppEventObj
)
686 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
687 FIXME("(%p)->(%p %p)\n", This
, pvarEventObject
, ppEventObj
);
691 static HRESULT WINAPI
HTMLDocument4_fireEvent(IHTMLDocument4
*iface
, BSTR bstrEventName
,
692 VARIANT
*pvarEventObject
, VARIANT_BOOL
*pfCanceled
)
694 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
695 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(bstrEventName
), pvarEventObject
, pfCanceled
);
699 static HRESULT WINAPI
HTMLDocument4_createRenderStyle(IHTMLDocument4
*iface
, BSTR v
,
700 IHTMLRenderStyle
**ppIHTMLRenderStyle
)
702 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
703 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(v
), ppIHTMLRenderStyle
);
707 static HRESULT WINAPI
HTMLDocument4_put_oncontrolselect(IHTMLDocument4
*iface
, VARIANT v
)
709 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
710 FIXME("(%p)->(v)\n", This
);
714 static HRESULT WINAPI
HTMLDocument4_get_oncontrolselect(IHTMLDocument4
*iface
, VARIANT
*p
)
716 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
717 FIXME("(%p)->(%p)\n", This
, p
);
721 static HRESULT WINAPI
HTMLDocument4_get_URLEncoded(IHTMLDocument4
*iface
, BSTR
*p
)
723 HTMLDocument
*This
= HTMLDOC4_THIS(iface
);
724 FIXME("(%p)->(%p)\n", This
, p
);
730 static const IHTMLDocument4Vtbl HTMLDocument4Vtbl
= {
731 HTMLDocument4_QueryInterface
,
732 HTMLDocument4_AddRef
,
733 HTMLDocument4_Release
,
734 HTMLDocument4_GetTypeInfoCount
,
735 HTMLDocument4_GetTypeInfo
,
736 HTMLDocument4_GetIDsOfNames
,
737 HTMLDocument4_Invoke
,
739 HTMLDocument4_hasFocus
,
740 HTMLDocument4_put_onselectionchange
,
741 HTMLDocument4_get_onselectionchange
,
742 HTMLDocument4_get_namespace
,
743 HTMLDocument4_createDocumentFromUrl
,
744 HTMLDocument4_put_media
,
745 HTMLDocument4_get_media
,
746 HTMLDocument4_createEventObject
,
747 HTMLDocument4_fireEvent
,
748 HTMLDocument4_createRenderStyle
,
749 HTMLDocument4_put_oncontrolselect
,
750 HTMLDocument4_get_oncontrolselect
,
751 HTMLDocument4_get_URLEncoded
754 void HTMLDocument_HTMLDocument3_Init(HTMLDocument
*This
)
756 This
->lpHTMLDocument3Vtbl
= &HTMLDocument3Vtbl
;
757 This
->lpHTMLDocument4Vtbl
= &HTMLDocument4Vtbl
;