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
29 #include "shdeprecated.h"
34 #include "wine/debug.h"
36 #include "mshtml_private.h"
37 #include "htmlevent.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
42 #define DOCHOST_DOCCANNAVIGATE 0
45 IEnumUnknown IEnumUnknown_iface
;
49 static inline EnumUnknown
*impl_from_IEnumUnknown(IEnumUnknown
*iface
)
51 return CONTAINING_RECORD(iface
, EnumUnknown
, IEnumUnknown_iface
);
54 static HRESULT WINAPI
EnumUnknown_QueryInterface(IEnumUnknown
*iface
, REFIID riid
, void **ppv
)
56 EnumUnknown
*This
= impl_from_IEnumUnknown(iface
);
58 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
59 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
60 *ppv
= &This
->IEnumUnknown_iface
;
61 }else if(IsEqualGUID(&IID_IEnumUnknown
, riid
)) {
62 TRACE("(%p)->(IID_IEnumUnknown %p)\n", This
, ppv
);
63 *ppv
= &This
->IEnumUnknown_iface
;
65 WARN("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppv
);
70 IUnknown_AddRef((IUnknown
*)*ppv
);
74 static ULONG WINAPI
EnumUnknown_AddRef(IEnumUnknown
*iface
)
76 EnumUnknown
*This
= impl_from_IEnumUnknown(iface
);
77 LONG ref
= InterlockedIncrement(&This
->ref
);
79 TRACE("(%p) ref=%ld\n", This
, ref
);
84 static ULONG WINAPI
EnumUnknown_Release(IEnumUnknown
*iface
)
86 EnumUnknown
*This
= impl_from_IEnumUnknown(iface
);
87 LONG ref
= InterlockedDecrement(&This
->ref
);
89 TRACE("(%p) ref=%ld\n", This
, ref
);
97 static HRESULT WINAPI
EnumUnknown_Next(IEnumUnknown
*iface
, ULONG celt
, IUnknown
**rgelt
, ULONG
*pceltFetched
)
99 EnumUnknown
*This
= impl_from_IEnumUnknown(iface
);
101 TRACE("(%p)->(%lu %p %p)\n", This
, celt
, rgelt
, pceltFetched
);
103 /* FIXME: It's not clear if we should ever return something here */
109 static HRESULT WINAPI
EnumUnknown_Skip(IEnumUnknown
*iface
, ULONG celt
)
111 EnumUnknown
*This
= impl_from_IEnumUnknown(iface
);
112 FIXME("(%p)->(%lu)\n", This
, celt
);
116 static HRESULT WINAPI
EnumUnknown_Reset(IEnumUnknown
*iface
)
118 EnumUnknown
*This
= impl_from_IEnumUnknown(iface
);
119 FIXME("(%p)\n", This
);
123 static HRESULT WINAPI
EnumUnknown_Clone(IEnumUnknown
*iface
, IEnumUnknown
**ppenum
)
125 EnumUnknown
*This
= impl_from_IEnumUnknown(iface
);
126 FIXME("(%p)->(%p)\n", This
, ppenum
);
130 static const IEnumUnknownVtbl EnumUnknownVtbl
= {
131 EnumUnknown_QueryInterface
,
140 /**********************************************************
141 * IOleObject implementation
144 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IOleObject(IOleObject
*iface
)
146 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IOleObject_iface
);
149 static HRESULT WINAPI
DocNodeOleObject_QueryInterface(IOleObject
*iface
, REFIID riid
, void **ppv
)
151 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
152 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
155 static ULONG WINAPI
DocNodeOleObject_AddRef(IOleObject
*iface
)
157 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
158 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
161 static ULONG WINAPI
DocNodeOleObject_Release(IOleObject
*iface
)
163 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
164 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
167 static HRESULT WINAPI
DocNodeOleObject_SetClientSite(IOleObject
*iface
, IOleClientSite
*pClientSite
)
169 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
170 return IOleObject_SetClientSite(&This
->doc_obj
->IOleObject_iface
, pClientSite
);
173 static HRESULT WINAPI
DocNodeOleObject_GetClientSite(IOleObject
*iface
, IOleClientSite
**ppClientSite
)
175 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
176 return IOleObject_GetClientSite(&This
->doc_obj
->IOleObject_iface
, ppClientSite
);
179 static HRESULT WINAPI
DocNodeOleObject_SetHostNames(IOleObject
*iface
, LPCOLESTR szContainerApp
, LPCOLESTR szContainerObj
)
181 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
182 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szContainerApp
), debugstr_w(szContainerObj
));
186 static HRESULT WINAPI
DocNodeOleObject_Close(IOleObject
*iface
, DWORD dwSaveOption
)
188 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
189 return IOleObject_Close(&This
->doc_obj
->IOleObject_iface
, dwSaveOption
);
192 static HRESULT WINAPI
DocNodeOleObject_SetMoniker(IOleObject
*iface
, DWORD dwWhichMoniker
, IMoniker
*pmk
)
194 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
195 FIXME("(%p %ld %p)->()\n", This
, dwWhichMoniker
, pmk
);
199 static HRESULT WINAPI
DocNodeOleObject_GetMoniker(IOleObject
*iface
, DWORD dwAssign
, DWORD dwWhichMoniker
, IMoniker
**ppmk
)
201 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
202 FIXME("(%p)->(%ld %ld %p)\n", This
, dwAssign
, dwWhichMoniker
, ppmk
);
206 static HRESULT WINAPI
DocNodeOleObject_InitFromData(IOleObject
*iface
, IDataObject
*pDataObject
, BOOL fCreation
,
209 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
210 FIXME("(%p)->(%p %x %ld)\n", This
, pDataObject
, fCreation
, dwReserved
);
214 static HRESULT WINAPI
DocNodeOleObject_GetClipboardData(IOleObject
*iface
, DWORD dwReserved
, IDataObject
**ppDataObject
)
216 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
217 FIXME("(%p)->(%ld %p)\n", This
, dwReserved
, ppDataObject
);
221 static HRESULT WINAPI
DocNodeOleObject_DoVerb(IOleObject
*iface
, LONG iVerb
, LPMSG lpmsg
, IOleClientSite
*pActiveSite
,
222 LONG lindex
, HWND hwndParent
, LPCRECT lprcPosRect
)
224 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
225 return IOleObject_DoVerb(&This
->doc_obj
->IOleObject_iface
, iVerb
, lpmsg
, pActiveSite
, lindex
, hwndParent
, lprcPosRect
);
228 static HRESULT WINAPI
DocNodeOleObject_EnumVerbs(IOleObject
*iface
, IEnumOLEVERB
**ppEnumOleVerb
)
230 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
231 FIXME("(%p)->(%p)\n", This
, ppEnumOleVerb
);
235 static HRESULT WINAPI
DocNodeOleObject_Update(IOleObject
*iface
)
237 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
238 FIXME("(%p)\n", This
);
242 static HRESULT WINAPI
DocNodeOleObject_IsUpToDate(IOleObject
*iface
)
244 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
245 FIXME("(%p)\n", This
);
249 static HRESULT WINAPI
DocNodeOleObject_GetUserClassID(IOleObject
*iface
, CLSID
*pClsid
)
251 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
252 return IOleObject_GetUserClassID(&This
->doc_obj
->IOleObject_iface
, pClsid
);
255 static HRESULT WINAPI
DocNodeOleObject_GetUserType(IOleObject
*iface
, DWORD dwFormOfType
, LPOLESTR
*pszUserType
)
257 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
258 FIXME("(%p)->(%ld %p)\n", This
, dwFormOfType
, pszUserType
);
262 static HRESULT WINAPI
DocNodeOleObject_SetExtent(IOleObject
*iface
, DWORD dwDrawAspect
, SIZEL
*psizel
)
264 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
265 return IOleObject_SetExtent(&This
->doc_obj
->IOleObject_iface
, dwDrawAspect
, psizel
);
268 static HRESULT WINAPI
DocNodeOleObject_GetExtent(IOleObject
*iface
, DWORD dwDrawAspect
, SIZEL
*psizel
)
270 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
271 return IOleObject_GetExtent(&This
->doc_obj
->IOleObject_iface
, dwDrawAspect
, psizel
);
274 static HRESULT WINAPI
DocNodeOleObject_Advise(IOleObject
*iface
, IAdviseSink
*pAdvSink
, DWORD
*pdwConnection
)
276 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
277 return IOleObject_Advise(&This
->doc_obj
->IOleObject_iface
, pAdvSink
, pdwConnection
);
280 static HRESULT WINAPI
DocNodeOleObject_Unadvise(IOleObject
*iface
, DWORD dwConnection
)
282 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
283 return IOleObject_Unadvise(&This
->doc_obj
->IOleObject_iface
, dwConnection
);
286 static HRESULT WINAPI
DocNodeOleObject_EnumAdvise(IOleObject
*iface
, IEnumSTATDATA
**ppenumAdvise
)
288 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
289 return IOleObject_EnumAdvise(&This
->doc_obj
->IOleObject_iface
, ppenumAdvise
);
292 static HRESULT WINAPI
DocNodeOleObject_GetMiscStatus(IOleObject
*iface
, DWORD dwAspect
, DWORD
*pdwStatus
)
294 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
295 FIXME("(%p)->(%ld %p)\n", This
, dwAspect
, pdwStatus
);
299 static HRESULT WINAPI
DocNodeOleObject_SetColorScheme(IOleObject
*iface
, LOGPALETTE
*pLogpal
)
301 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleObject(iface
);
302 FIXME("(%p)->(%p)\n", This
, pLogpal
);
306 static const IOleObjectVtbl DocNodeOleObjectVtbl
= {
307 DocNodeOleObject_QueryInterface
,
308 DocNodeOleObject_AddRef
,
309 DocNodeOleObject_Release
,
310 DocNodeOleObject_SetClientSite
,
311 DocNodeOleObject_GetClientSite
,
312 DocNodeOleObject_SetHostNames
,
313 DocNodeOleObject_Close
,
314 DocNodeOleObject_SetMoniker
,
315 DocNodeOleObject_GetMoniker
,
316 DocNodeOleObject_InitFromData
,
317 DocNodeOleObject_GetClipboardData
,
318 DocNodeOleObject_DoVerb
,
319 DocNodeOleObject_EnumVerbs
,
320 DocNodeOleObject_Update
,
321 DocNodeOleObject_IsUpToDate
,
322 DocNodeOleObject_GetUserClassID
,
323 DocNodeOleObject_GetUserType
,
324 DocNodeOleObject_SetExtent
,
325 DocNodeOleObject_GetExtent
,
326 DocNodeOleObject_Advise
,
327 DocNodeOleObject_Unadvise
,
328 DocNodeOleObject_EnumAdvise
,
329 DocNodeOleObject_GetMiscStatus
,
330 DocNodeOleObject_SetColorScheme
333 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IOleObject(IOleObject
*iface
)
335 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IOleObject_iface
);
338 static HRESULT WINAPI
DocObjOleObject_QueryInterface(IOleObject
*iface
, REFIID riid
, void **ppv
)
340 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
341 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
344 static ULONG WINAPI
DocObjOleObject_AddRef(IOleObject
*iface
)
346 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
347 return IUnknown_AddRef(This
->outer_unk
);
350 static ULONG WINAPI
DocObjOleObject_Release(IOleObject
*iface
)
352 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
353 return IUnknown_Release(This
->outer_unk
);
356 static void update_hostinfo(HTMLDocumentObj
*This
, DOCHOSTUIINFO
*hostinfo
)
358 nsIScrollable
*scrollable
;
361 if(!This
->nscontainer
)
364 nsres
= nsIWebBrowser_QueryInterface(This
->nscontainer
->webbrowser
, &IID_nsIScrollable
, (void**)&scrollable
);
365 if(NS_SUCCEEDED(nsres
)) {
366 nsres
= nsIScrollable_SetDefaultScrollbarPreferences(scrollable
, ScrollOrientation_Y
,
367 (hostinfo
->dwFlags
& DOCHOSTUIFLAG_SCROLL_NO
) ? Scrollbar_Never
: Scrollbar_Auto
);
369 ERR("Could not set default Y scrollbar prefs: %08lx\n", nsres
);
371 nsres
= nsIScrollable_SetDefaultScrollbarPreferences(scrollable
, ScrollOrientation_X
,
372 hostinfo
->dwFlags
& DOCHOSTUIFLAG_SCROLL_NO
? Scrollbar_Never
: Scrollbar_Auto
);
374 ERR("Could not set default X scrollbar prefs: %08lx\n", nsres
);
376 nsIScrollable_Release(scrollable
);
378 ERR("Could not get nsIScrollable: %08lx\n", nsres
);
382 /* Calls undocumented 84 cmd of CGID_ShellDocView */
383 void call_docview_84(HTMLDocumentObj
*doc
)
385 IOleCommandTarget
*olecmd
;
392 hres
= IOleClientSite_QueryInterface(doc
->client
, &IID_IOleCommandTarget
, (void**)&olecmd
);
397 hres
= IOleCommandTarget_Exec(olecmd
, &CGID_ShellDocView
, 84, 0, NULL
, &var
);
398 IOleCommandTarget_Release(olecmd
);
399 if(SUCCEEDED(hres
) && V_VT(&var
) != VT_NULL
)
400 FIXME("handle result\n");
403 void set_document_navigation(HTMLDocumentObj
*doc
, BOOL doc_can_navigate
)
407 if(!doc
->client_cmdtrg
)
410 if(doc_can_navigate
) {
411 V_VT(&var
) = VT_UNKNOWN
;
412 V_UNKNOWN(&var
) = (IUnknown
*)&doc
->window
->base
.IHTMLWindow2_iface
;
415 IOleCommandTarget_Exec(doc
->client_cmdtrg
, &CGID_DocHostCmdPriv
, DOCHOST_DOCCANNAVIGATE
, 0,
416 doc_can_navigate
? &var
: NULL
, NULL
);
419 static void load_settings(HTMLDocumentObj
*doc
)
425 res
= RegOpenKeyW(HKEY_CURRENT_USER
, L
"SOFTWARE\\Microsoft\\Internet Explorer", &settings_key
);
426 if(res
!= ERROR_SUCCESS
)
430 res
= RegGetValueW(settings_key
, L
"Zoom", L
"ZoomFactor", RRF_RT_REG_DWORD
, NULL
, &val
, &size
);
431 RegCloseKey(settings_key
);
432 if(res
== ERROR_SUCCESS
)
433 set_viewer_zoom(doc
->nscontainer
, (float)val
/100000);
436 static HRESULT WINAPI
DocObjOleObject_SetClientSite(IOleObject
*iface
, IOleClientSite
*pClientSite
)
438 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
439 IBrowserService
*browser_service
;
440 IOleCommandTarget
*cmdtrg
= NULL
;
441 IOleWindow
*ole_window
;
447 TRACE("(%p)->(%p)\n", This
, pClientSite
);
449 if(pClientSite
== This
->client
)
453 This
->nscontainer
->usermode
= UNKNOWN_USERMODE
;
455 unlink_ref(&This
->client
);
456 unlink_ref(&This
->client_cmdtrg
);
457 if(!This
->custom_hostui
)
458 unlink_ref(&This
->hostui
);
459 unlink_ref(&This
->doc_object_service
);
460 unlink_ref(&This
->webbrowser
);
461 unlink_ref(&This
->browser_service
);
462 unlink_ref(&This
->travel_log
);
464 memset(&This
->hostinfo
, 0, sizeof(DOCHOSTUIINFO
));
469 IOleClientSite_AddRef(pClientSite
);
470 This
->client
= pClientSite
;
472 hostui_setup
= This
->hostui_setup
;
475 IDocHostUIHandler
*uihandler
;
477 This
->custom_hostui
= FALSE
;
479 hres
= IOleClientSite_QueryInterface(pClientSite
, &IID_IDocHostUIHandler
, (void**)&uihandler
);
481 This
->hostui
= uihandler
;
485 DOCHOSTUIINFO hostinfo
;
486 LPOLESTR key_path
= NULL
, override_key_path
= NULL
;
487 IDocHostUIHandler2
*uihandler2
;
489 memset(&hostinfo
, 0, sizeof(DOCHOSTUIINFO
));
490 hostinfo
.cbSize
= sizeof(DOCHOSTUIINFO
);
491 hres
= IDocHostUIHandler_GetHostInfo(This
->hostui
, &hostinfo
);
492 if(SUCCEEDED(hres
)) {
493 TRACE("hostinfo = {%lu %08lx %08lx %s %s}\n",
494 hostinfo
.cbSize
, hostinfo
.dwFlags
, hostinfo
.dwDoubleClick
,
495 debugstr_w(hostinfo
.pchHostCss
), debugstr_w(hostinfo
.pchHostNS
));
496 update_hostinfo(This
, &hostinfo
);
497 This
->hostinfo
= hostinfo
;
501 hres
= IDocHostUIHandler_GetOptionKeyPath(This
->hostui
, &key_path
, 0);
502 if(hres
== S_OK
&& key_path
) {
504 /* FIXME: use key_path */
505 FIXME("key_path = %s\n", debugstr_w(key_path
));
507 CoTaskMemFree(key_path
);
510 hres
= IDocHostUIHandler_QueryInterface(This
->hostui
, &IID_IDocHostUIHandler2
,
511 (void**)&uihandler2
);
512 if(SUCCEEDED(hres
)) {
513 hres
= IDocHostUIHandler2_GetOverrideKeyPath(uihandler2
, &override_key_path
, 0);
514 if(hres
== S_OK
&& override_key_path
) {
515 if(override_key_path
[0]) {
516 /*FIXME: use override_key_path */
517 FIXME("override_key_path = %s\n", debugstr_w(override_key_path
));
519 CoTaskMemFree(override_key_path
);
521 IDocHostUIHandler2_Release(uihandler2
);
524 This
->hostui_setup
= TRUE
;
530 /* Native calls here GetWindow. What is it for?
531 * We don't have anything to do with it here (yet). */
532 hres
= IOleClientSite_QueryInterface(pClientSite
, &IID_IOleWindow
, (void**)&ole_window
);
533 if(SUCCEEDED(hres
)) {
534 IOleWindow_GetWindow(ole_window
, &hwnd
);
535 IOleWindow_Release(ole_window
);
538 hres
= do_query_service((IUnknown
*)pClientSite
, &IID_IShellBrowser
,
539 &IID_IBrowserService
, (void**)&browser_service
);
540 if(SUCCEEDED(hres
)) {
541 ITravelLog
*travel_log
;
543 This
->browser_service
= (IUnknown
*)browser_service
;
545 hres
= IBrowserService_GetTravelLog(browser_service
, &travel_log
);
547 This
->travel_log
= travel_log
;
549 browser_service
= NULL
;
552 hres
= IOleClientSite_QueryInterface(pClientSite
, &IID_IOleCommandTarget
, (void**)&cmdtrg
);
553 if(SUCCEEDED(hres
)) {
555 OLECMD cmd
= {OLECMDID_SETPROGRESSTEXT
, 0};
557 This
->client_cmdtrg
= cmdtrg
;
560 IDocObjectService
*doc_object_service
;
563 set_document_navigation(This
, TRUE
);
565 if(browser_service
) {
566 hres
= IBrowserService_QueryInterface(browser_service
,
567 &IID_IDocObjectService
, (void**)&doc_object_service
);
568 if(SUCCEEDED(hres
)) {
569 This
->doc_object_service
= doc_object_service
;
572 * Some embedding routines, esp. in regards to use of IDocObjectService, differ if
573 * embedder supports IWebBrowserApp.
575 hres
= do_query_service((IUnknown
*)pClientSite
, &IID_IWebBrowserApp
, &IID_IWebBrowser2
, (void**)&wb
);
577 This
->webbrowser
= (IUnknown
*)wb
;
582 call_docview_84(This
);
584 IOleCommandTarget_QueryStatus(cmdtrg
, NULL
, 1, &cmd
, NULL
);
588 IOleCommandTarget_Exec(cmdtrg
, NULL
, OLECMDID_SETPROGRESSMAX
,
589 OLECMDEXECOPT_DONTPROMPTUSER
, &var
, NULL
);
590 IOleCommandTarget_Exec(cmdtrg
, NULL
, OLECMDID_SETPROGRESSPOS
,
591 OLECMDEXECOPT_DONTPROMPTUSER
, &var
, NULL
);
594 if(This
->nscontainer
->usermode
== UNKNOWN_USERMODE
)
595 IOleControl_OnAmbientPropertyChange(&This
->IOleControl_iface
, DISPID_AMBIENT_USERMODE
);
597 IOleControl_OnAmbientPropertyChange(&This
->IOleControl_iface
,
598 DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
);
600 hres
= get_client_disp_property(This
->client
, DISPID_AMBIENT_SILENT
, &silent
);
601 if(SUCCEEDED(hres
)) {
602 if(V_VT(&silent
) != VT_BOOL
)
603 WARN("silent = %s\n", debugstr_variant(&silent
));
604 else if(V_BOOL(&silent
))
605 FIXME("silent == true\n");
608 IOleControl_OnAmbientPropertyChange(&This
->IOleControl_iface
, DISPID_AMBIENT_USERAGENT
);
609 IOleControl_OnAmbientPropertyChange(&This
->IOleControl_iface
, DISPID_AMBIENT_PALETTE
);
614 static HRESULT WINAPI
DocObjOleObject_GetClientSite(IOleObject
*iface
, IOleClientSite
**ppClientSite
)
616 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
618 TRACE("(%p)->(%p)\n", This
, ppClientSite
);
624 IOleClientSite_AddRef(This
->client
);
625 *ppClientSite
= This
->client
;
630 static HRESULT WINAPI
DocObjOleObject_SetHostNames(IOleObject
*iface
, LPCOLESTR szContainerApp
, LPCOLESTR szContainerObj
)
632 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
633 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szContainerApp
), debugstr_w(szContainerObj
));
637 static HRESULT WINAPI
DocObjOleObject_Close(IOleObject
*iface
, DWORD dwSaveOption
)
639 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
641 TRACE("(%p)->(%08lx)\n", This
, dwSaveOption
);
643 if(dwSaveOption
== OLECLOSE_PROMPTSAVE
)
644 FIXME("OLECLOSE_PROMPTSAVE not implemented\n");
646 if(This
->in_place_active
)
647 IOleInPlaceObjectWindowless_InPlaceDeactivate(&This
->IOleInPlaceObjectWindowless_iface
);
649 HTMLDocument_LockContainer(This
, FALSE
);
651 if(This
->advise_holder
)
652 IOleAdviseHolder_SendOnClose(This
->advise_holder
);
657 static HRESULT WINAPI
DocObjOleObject_SetMoniker(IOleObject
*iface
, DWORD dwWhichMoniker
, IMoniker
*pmk
)
659 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
660 FIXME("(%p %ld %p)->()\n", This
, dwWhichMoniker
, pmk
);
664 static HRESULT WINAPI
DocObjOleObject_GetMoniker(IOleObject
*iface
, DWORD dwAssign
, DWORD dwWhichMoniker
, IMoniker
**ppmk
)
666 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
667 FIXME("(%p)->(%ld %ld %p)\n", This
, dwAssign
, dwWhichMoniker
, ppmk
);
671 static HRESULT WINAPI
DocObjOleObject_InitFromData(IOleObject
*iface
, IDataObject
*pDataObject
, BOOL fCreation
,
674 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
675 FIXME("(%p)->(%p %x %ld)\n", This
, pDataObject
, fCreation
, dwReserved
);
679 static HRESULT WINAPI
DocObjOleObject_GetClipboardData(IOleObject
*iface
, DWORD dwReserved
, IDataObject
**ppDataObject
)
681 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
682 FIXME("(%p)->(%ld %p)\n", This
, dwReserved
, ppDataObject
);
686 static HRESULT WINAPI
DocObjOleObject_DoVerb(IOleObject
*iface
, LONG iVerb
, LPMSG lpmsg
, IOleClientSite
*pActiveSite
,
687 LONG lindex
, HWND hwndParent
, LPCRECT lprcPosRect
)
689 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
690 IOleDocumentSite
*pDocSite
;
693 TRACE("(%p)->(%ld %p %p %ld %p %p)\n", This
, iVerb
, lpmsg
, pActiveSite
, lindex
, hwndParent
, lprcPosRect
);
695 if(iVerb
!= OLEIVERB_SHOW
&& iVerb
!= OLEIVERB_UIACTIVATE
&& iVerb
!= OLEIVERB_INPLACEACTIVATE
) {
696 FIXME("iVerb = %ld not supported\n", iVerb
);
701 pActiveSite
= This
->client
;
703 hres
= IOleClientSite_QueryInterface(pActiveSite
, &IID_IOleDocumentSite
, (void**)&pDocSite
);
704 if(SUCCEEDED(hres
)) {
705 HTMLDocument_LockContainer(This
, TRUE
);
707 /* FIXME: Create new IOleDocumentView. See CreateView for more info. */
708 hres
= IOleDocumentSite_ActivateMe(pDocSite
, &This
->IOleDocumentView_iface
);
709 IOleDocumentSite_Release(pDocSite
);
711 hres
= IOleDocumentView_UIActivate(&This
->IOleDocumentView_iface
, TRUE
);
712 if(SUCCEEDED(hres
)) {
714 RECT rect
; /* We need to pass rect as not const pointer */
716 IOleDocumentView_SetRect(&This
->IOleDocumentView_iface
, &rect
);
718 IOleDocumentView_Show(&This
->IOleDocumentView_iface
, TRUE
);
725 static HRESULT WINAPI
DocObjOleObject_EnumVerbs(IOleObject
*iface
, IEnumOLEVERB
**ppEnumOleVerb
)
727 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
728 FIXME("(%p)->(%p)\n", This
, ppEnumOleVerb
);
732 static HRESULT WINAPI
DocObjOleObject_Update(IOleObject
*iface
)
734 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
735 FIXME("(%p)\n", This
);
739 static HRESULT WINAPI
DocObjOleObject_IsUpToDate(IOleObject
*iface
)
741 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
742 FIXME("(%p)\n", This
);
746 static HRESULT WINAPI
DocObjOleObject_GetUserClassID(IOleObject
*iface
, CLSID
*pClsid
)
748 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
750 TRACE("(%p)->(%p)\n", This
, pClsid
);
755 *pClsid
= CLSID_HTMLDocument
;
759 static HRESULT WINAPI
DocObjOleObject_GetUserType(IOleObject
*iface
, DWORD dwFormOfType
, LPOLESTR
*pszUserType
)
761 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
762 FIXME("(%p)->(%ld %p)\n", This
, dwFormOfType
, pszUserType
);
766 static HRESULT WINAPI
DocObjOleObject_SetExtent(IOleObject
*iface
, DWORD dwDrawAspect
, SIZEL
*psizel
)
768 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
770 TRACE("(%p)->(%ld %p)\n", This
, dwDrawAspect
, psizel
);
772 if (dwDrawAspect
!= DVASPECT_CONTENT
)
775 This
->extent
= *psizel
;
779 static HRESULT WINAPI
DocObjOleObject_GetExtent(IOleObject
*iface
, DWORD dwDrawAspect
, SIZEL
*psizel
)
781 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
783 TRACE("(%p)->(%ld %p)\n", This
, dwDrawAspect
, psizel
);
785 if (dwDrawAspect
!= DVASPECT_CONTENT
)
788 *psizel
= This
->extent
;
792 static HRESULT WINAPI
DocObjOleObject_Advise(IOleObject
*iface
, IAdviseSink
*pAdvSink
, DWORD
*pdwConnection
)
794 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
795 TRACE("(%p)->(%p %p)\n", This
, pAdvSink
, pdwConnection
);
805 if(!This
->advise_holder
) {
806 CreateOleAdviseHolder(&This
->advise_holder
);
807 if(!This
->advise_holder
)
808 return E_OUTOFMEMORY
;
811 return IOleAdviseHolder_Advise(This
->advise_holder
, pAdvSink
, pdwConnection
);
814 static HRESULT WINAPI
DocObjOleObject_Unadvise(IOleObject
*iface
, DWORD dwConnection
)
816 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
817 TRACE("(%p)->(%ld)\n", This
, dwConnection
);
819 if(!This
->advise_holder
)
820 return OLE_E_NOCONNECTION
;
822 return IOleAdviseHolder_Unadvise(This
->advise_holder
, dwConnection
);
825 static HRESULT WINAPI
DocObjOleObject_EnumAdvise(IOleObject
*iface
, IEnumSTATDATA
**ppenumAdvise
)
827 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
829 if(!This
->advise_holder
) {
830 *ppenumAdvise
= NULL
;
834 return IOleAdviseHolder_EnumAdvise(This
->advise_holder
, ppenumAdvise
);
837 static HRESULT WINAPI
DocObjOleObject_GetMiscStatus(IOleObject
*iface
, DWORD dwAspect
, DWORD
*pdwStatus
)
839 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
840 FIXME("(%p)->(%ld %p)\n", This
, dwAspect
, pdwStatus
);
844 static HRESULT WINAPI
DocObjOleObject_SetColorScheme(IOleObject
*iface
, LOGPALETTE
*pLogpal
)
846 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleObject(iface
);
847 FIXME("(%p)->(%p)\n", This
, pLogpal
);
851 static const IOleObjectVtbl DocObjOleObjectVtbl
= {
852 DocObjOleObject_QueryInterface
,
853 DocObjOleObject_AddRef
,
854 DocObjOleObject_Release
,
855 DocObjOleObject_SetClientSite
,
856 DocObjOleObject_GetClientSite
,
857 DocObjOleObject_SetHostNames
,
858 DocObjOleObject_Close
,
859 DocObjOleObject_SetMoniker
,
860 DocObjOleObject_GetMoniker
,
861 DocObjOleObject_InitFromData
,
862 DocObjOleObject_GetClipboardData
,
863 DocObjOleObject_DoVerb
,
864 DocObjOleObject_EnumVerbs
,
865 DocObjOleObject_Update
,
866 DocObjOleObject_IsUpToDate
,
867 DocObjOleObject_GetUserClassID
,
868 DocObjOleObject_GetUserType
,
869 DocObjOleObject_SetExtent
,
870 DocObjOleObject_GetExtent
,
871 DocObjOleObject_Advise
,
872 DocObjOleObject_Unadvise
,
873 DocObjOleObject_EnumAdvise
,
874 DocObjOleObject_GetMiscStatus
,
875 DocObjOleObject_SetColorScheme
878 /**********************************************************
879 * IOleDocument implementation
882 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IOleDocument(IOleDocument
*iface
)
884 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IOleDocument_iface
);
887 static HRESULT WINAPI
DocNodeOleDocument_QueryInterface(IOleDocument
*iface
, REFIID riid
, void **ppv
)
889 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleDocument(iface
);
890 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
893 static ULONG WINAPI
DocNodeOleDocument_AddRef(IOleDocument
*iface
)
895 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleDocument(iface
);
896 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
899 static ULONG WINAPI
DocNodeOleDocument_Release(IOleDocument
*iface
)
901 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleDocument(iface
);
902 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
905 static HRESULT WINAPI
DocNodeOleDocument_CreateView(IOleDocument
*iface
, IOleInPlaceSite
*pIPSite
, IStream
*pstm
,
906 DWORD dwReserved
, IOleDocumentView
**ppView
)
908 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleDocument(iface
);
909 return IOleDocument_CreateView(&This
->doc_obj
->IOleDocument_iface
, pIPSite
, pstm
, dwReserved
, ppView
);
912 static HRESULT WINAPI
DocNodeOleDocument_GetDocMiscStatus(IOleDocument
*iface
, DWORD
*pdwStatus
)
914 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleDocument(iface
);
915 FIXME("(%p)->(%p)\n", This
, pdwStatus
);
919 static HRESULT WINAPI
DocNodeOleDocument_EnumViews(IOleDocument
*iface
, IEnumOleDocumentViews
**ppEnum
,
920 IOleDocumentView
**ppView
)
922 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleDocument(iface
);
923 FIXME("(%p)->(%p %p)\n", This
, ppEnum
, ppView
);
927 static const IOleDocumentVtbl DocNodeOleDocumentVtbl
= {
928 DocNodeOleDocument_QueryInterface
,
929 DocNodeOleDocument_AddRef
,
930 DocNodeOleDocument_Release
,
931 DocNodeOleDocument_CreateView
,
932 DocNodeOleDocument_GetDocMiscStatus
,
933 DocNodeOleDocument_EnumViews
936 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IOleDocument(IOleDocument
*iface
)
938 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IOleDocument_iface
);
941 static HRESULT WINAPI
DocObjOleDocument_QueryInterface(IOleDocument
*iface
, REFIID riid
, void **ppv
)
943 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleDocument(iface
);
944 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
947 static ULONG WINAPI
DocObjOleDocument_AddRef(IOleDocument
*iface
)
949 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleDocument(iface
);
950 return IUnknown_AddRef(This
->outer_unk
);
953 static ULONG WINAPI
DocObjOleDocument_Release(IOleDocument
*iface
)
955 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleDocument(iface
);
956 return IUnknown_Release(This
->outer_unk
);
959 static HRESULT WINAPI
DocObjOleDocument_CreateView(IOleDocument
*iface
, IOleInPlaceSite
*pIPSite
, IStream
*pstm
,
960 DWORD dwReserved
, IOleDocumentView
**ppView
)
962 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleDocument(iface
);
965 TRACE("(%p)->(%p %p %ld %p)\n", This
, pIPSite
, pstm
, dwReserved
, ppView
);
971 * Windows implementation creates new IOleDocumentView when function is called for the
972 * first time and returns E_FAIL when it is called for the second time, but it doesn't matter
973 * if the application uses returned interfaces, passed to ActivateMe or returned by
974 * QueryInterface, so there is no reason to create new interface. This needs more testing.
978 hres
= IOleDocumentView_SetInPlaceSite(&This
->IOleDocumentView_iface
, pIPSite
);
984 FIXME("pstm is not supported\n");
986 IOleDocumentView_AddRef(&This
->IOleDocumentView_iface
);
987 *ppView
= &This
->IOleDocumentView_iface
;
991 static HRESULT WINAPI
DocObjOleDocument_GetDocMiscStatus(IOleDocument
*iface
, DWORD
*pdwStatus
)
993 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleDocument(iface
);
994 FIXME("(%p)->(%p)\n", This
, pdwStatus
);
998 static HRESULT WINAPI
DocObjOleDocument_EnumViews(IOleDocument
*iface
, IEnumOleDocumentViews
**ppEnum
,
999 IOleDocumentView
**ppView
)
1001 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleDocument(iface
);
1002 FIXME("(%p)->(%p %p)\n", This
, ppEnum
, ppView
);
1006 static const IOleDocumentVtbl DocObjOleDocumentVtbl
= {
1007 DocObjOleDocument_QueryInterface
,
1008 DocObjOleDocument_AddRef
,
1009 DocObjOleDocument_Release
,
1010 DocObjOleDocument_CreateView
,
1011 DocObjOleDocument_GetDocMiscStatus
,
1012 DocObjOleDocument_EnumViews
1015 /**********************************************************
1016 * IOleControl implementation
1019 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IOleControl(IOleControl
*iface
)
1021 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IOleControl_iface
);
1024 static HRESULT WINAPI
DocNodeOleControl_QueryInterface(IOleControl
*iface
, REFIID riid
, void **ppv
)
1026 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleControl(iface
);
1027 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
1030 static ULONG WINAPI
DocNodeOleControl_AddRef(IOleControl
*iface
)
1032 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleControl(iface
);
1033 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
1036 static ULONG WINAPI
DocNodeOleControl_Release(IOleControl
*iface
)
1038 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleControl(iface
);
1039 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
1042 static HRESULT WINAPI
DocNodeOleControl_GetControlInfo(IOleControl
*iface
, CONTROLINFO
*pCI
)
1044 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleControl(iface
);
1045 FIXME("(%p)->(%p)\n", This
, pCI
);
1049 static HRESULT WINAPI
DocNodeOleControl_OnMnemonic(IOleControl
*iface
, MSG
*pMsg
)
1051 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleControl(iface
);
1052 FIXME("(%p)->(%p)\n", This
, pMsg
);
1056 static HRESULT WINAPI
DocNodeOleControl_OnAmbientPropertyChange(IOleControl
*iface
, DISPID dispID
)
1058 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleControl(iface
);
1059 return IOleControl_OnAmbientPropertyChange(&This
->doc_obj
->IOleControl_iface
, dispID
);
1062 static HRESULT WINAPI
DocNodeOleControl_FreezeEvents(IOleControl
*iface
, BOOL bFreeze
)
1064 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleControl(iface
);
1065 FIXME("(%p)->(%x)\n", This
, bFreeze
);
1069 static const IOleControlVtbl DocNodeOleControlVtbl
= {
1070 DocNodeOleControl_QueryInterface
,
1071 DocNodeOleControl_AddRef
,
1072 DocNodeOleControl_Release
,
1073 DocNodeOleControl_GetControlInfo
,
1074 DocNodeOleControl_OnMnemonic
,
1075 DocNodeOleControl_OnAmbientPropertyChange
,
1076 DocNodeOleControl_FreezeEvents
1079 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IOleControl(IOleControl
*iface
)
1081 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IOleControl_iface
);
1084 static HRESULT WINAPI
DocObjOleControl_QueryInterface(IOleControl
*iface
, REFIID riid
, void **ppv
)
1086 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleControl(iface
);
1087 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
1090 static ULONG WINAPI
DocObjOleControl_AddRef(IOleControl
*iface
)
1092 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleControl(iface
);
1093 return IUnknown_AddRef(This
->outer_unk
);
1096 static ULONG WINAPI
DocObjOleControl_Release(IOleControl
*iface
)
1098 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleControl(iface
);
1099 return IUnknown_Release(This
->outer_unk
);
1102 static HRESULT WINAPI
DocObjOleControl_GetControlInfo(IOleControl
*iface
, CONTROLINFO
*pCI
)
1104 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleControl(iface
);
1105 FIXME("(%p)->(%p)\n", This
, pCI
);
1109 static HRESULT WINAPI
DocObjOleControl_OnMnemonic(IOleControl
*iface
, MSG
*pMsg
)
1111 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleControl(iface
);
1112 FIXME("(%p)->(%p)\n", This
, pMsg
);
1116 HRESULT
get_client_disp_property(IOleClientSite
*client
, DISPID dispid
, VARIANT
*res
)
1118 IDispatch
*disp
= NULL
;
1119 DISPPARAMS dispparams
= {NULL
, 0};
1123 hres
= IOleClientSite_QueryInterface(client
, &IID_IDispatch
, (void**)&disp
);
1125 TRACE("Could not get IDispatch\n");
1131 hres
= IDispatch_Invoke(disp
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
1132 DISPATCH_PROPERTYGET
, &dispparams
, res
, NULL
, &err
);
1134 IDispatch_Release(disp
);
1139 static HRESULT
on_change_dlcontrol(HTMLDocumentObj
*This
)
1144 hres
= get_client_disp_property(This
->client
, DISPID_AMBIENT_DLCONTROL
, &res
);
1146 FIXME("unsupported dlcontrol %08lx\n", V_I4(&res
));
1151 static HRESULT WINAPI
DocObjOleControl_OnAmbientPropertyChange(IOleControl
*iface
, DISPID dispID
)
1153 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleControl(iface
);
1154 IOleClientSite
*client
;
1158 client
= This
->client
;
1160 TRACE("client = NULL\n");
1165 case DISPID_AMBIENT_USERMODE
:
1166 TRACE("(%p)->(DISPID_AMBIENT_USERMODE)\n", This
);
1167 hres
= get_client_disp_property(client
, DISPID_AMBIENT_USERMODE
, &res
);
1171 if(V_VT(&res
) == VT_BOOL
) {
1173 This
->nscontainer
->usermode
= BROWSEMODE
;
1175 FIXME("edit mode is not supported\n");
1176 This
->nscontainer
->usermode
= EDITMODE
;
1179 FIXME("usermode=%s\n", debugstr_variant(&res
));
1182 case DISPID_AMBIENT_DLCONTROL
:
1183 TRACE("(%p)->(DISPID_AMBIENT_DLCONTROL)\n", This
);
1184 return on_change_dlcontrol(This
);
1185 case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
:
1186 TRACE("(%p)->(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED)\n", This
);
1187 on_change_dlcontrol(This
);
1188 hres
= get_client_disp_property(client
, DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
, &res
);
1192 if(V_VT(&res
) == VT_BOOL
) {
1194 FIXME("offline connection is not supported\n");
1198 FIXME("offlineconnected=%s\n", debugstr_variant(&res
));
1201 case DISPID_AMBIENT_SILENT
:
1202 TRACE("(%p)->(DISPID_AMBIENT_SILENT)\n", This
);
1203 on_change_dlcontrol(This
);
1204 hres
= get_client_disp_property(client
, DISPID_AMBIENT_SILENT
, &res
);
1208 if(V_VT(&res
) == VT_BOOL
) {
1210 FIXME("silent mode is not supported\n");
1213 FIXME("silent=%s\n", debugstr_variant(&res
));
1216 case DISPID_AMBIENT_USERAGENT
:
1217 TRACE("(%p)->(DISPID_AMBIENT_USERAGENT)\n", This
);
1218 hres
= get_client_disp_property(client
, DISPID_AMBIENT_USERAGENT
, &res
);
1222 FIXME("not supported AMBIENT_USERAGENT\n");
1224 case DISPID_AMBIENT_PALETTE
:
1225 TRACE("(%p)->(DISPID_AMBIENT_PALETTE)\n", This
);
1226 hres
= get_client_disp_property(client
, DISPID_AMBIENT_PALETTE
, &res
);
1230 FIXME("not supported AMBIENT_PALETTE\n");
1234 FIXME("(%p) unsupported dispID=%ld\n", This
, dispID
);
1238 static HRESULT WINAPI
DocObjOleControl_FreezeEvents(IOleControl
*iface
, BOOL bFreeze
)
1240 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleControl(iface
);
1241 FIXME("(%p)->(%x)\n", This
, bFreeze
);
1245 static const IOleControlVtbl DocObjOleControlVtbl
= {
1246 DocObjOleControl_QueryInterface
,
1247 DocObjOleControl_AddRef
,
1248 DocObjOleControl_Release
,
1249 DocObjOleControl_GetControlInfo
,
1250 DocObjOleControl_OnMnemonic
,
1251 DocObjOleControl_OnAmbientPropertyChange
,
1252 DocObjOleControl_FreezeEvents
1255 /**********************************************************
1256 * IOleInPlaceActiveObject implementation
1259 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IOleInPlaceActiveObject(IOleInPlaceActiveObject
*iface
)
1261 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IOleInPlaceActiveObject_iface
);
1264 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject
*iface
, REFIID riid
, void **ppv
)
1266 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1267 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
1270 static ULONG WINAPI
DocNodeOleInPlaceActiveObject_AddRef(IOleInPlaceActiveObject
*iface
)
1272 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1273 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
1276 static ULONG WINAPI
DocNodeOleInPlaceActiveObject_Release(IOleInPlaceActiveObject
*iface
)
1278 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1279 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
1282 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject
*iface
, HWND
*phwnd
)
1284 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1285 return IOleInPlaceActiveObject_GetWindow(&This
->doc_obj
->IOleInPlaceActiveObject_iface
, phwnd
);
1288 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject
*iface
, BOOL fEnterMode
)
1290 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1291 FIXME("(%p)->(%x)\n", This
, fEnterMode
);
1295 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject
*iface
, LPMSG lpmsg
)
1297 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1298 FIXME("(%p)->(%p)\n", This
, lpmsg
);
1302 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject
*iface
,
1305 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1306 return IOleInPlaceActiveObject_OnFrameWindowActivate(&This
->doc_obj
->IOleInPlaceActiveObject_iface
, fActivate
);
1309 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject
*iface
, BOOL fActivate
)
1311 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1312 FIXME("(%p)->(%x)\n", This
, fActivate
);
1316 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject
*iface
, LPCRECT prcBorder
,
1317 IOleInPlaceUIWindow
*pUIWindow
, BOOL fFrameWindow
)
1319 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1320 FIXME("(%p)->(%p %p %x)\n", This
, prcBorder
, pUIWindow
, fFrameWindow
);
1324 static HRESULT WINAPI
DocNodeOleInPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject
*iface
, BOOL fEnable
)
1326 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceActiveObject(iface
);
1327 FIXME("(%p)->(%x)\n", This
, fEnable
);
1331 static const IOleInPlaceActiveObjectVtbl DocNodeOleInPlaceActiveObjectVtbl
= {
1332 DocNodeOleInPlaceActiveObject_QueryInterface
,
1333 DocNodeOleInPlaceActiveObject_AddRef
,
1334 DocNodeOleInPlaceActiveObject_Release
,
1335 DocNodeOleInPlaceActiveObject_GetWindow
,
1336 DocNodeOleInPlaceActiveObject_ContextSensitiveHelp
,
1337 DocNodeOleInPlaceActiveObject_TranslateAccelerator
,
1338 DocNodeOleInPlaceActiveObject_OnFrameWindowActivate
,
1339 DocNodeOleInPlaceActiveObject_OnDocWindowActivate
,
1340 DocNodeOleInPlaceActiveObject_ResizeBorder
,
1341 DocNodeOleInPlaceActiveObject_EnableModeless
1344 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IOleInPlaceActiveObject(IOleInPlaceActiveObject
*iface
)
1346 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IOleInPlaceActiveObject_iface
);
1349 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject
*iface
, REFIID riid
, void **ppv
)
1351 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1352 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
1355 static ULONG WINAPI
DocObjOleInPlaceActiveObject_AddRef(IOleInPlaceActiveObject
*iface
)
1357 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1358 return IUnknown_AddRef(This
->outer_unk
);
1361 static ULONG WINAPI
DocObjOleInPlaceActiveObject_Release(IOleInPlaceActiveObject
*iface
)
1363 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1364 return IUnknown_Release(This
->outer_unk
);
1367 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject
*iface
, HWND
*phwnd
)
1369 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1371 TRACE("(%p)->(%p)\n", This
, phwnd
);
1374 return E_INVALIDARG
;
1376 if(!This
->in_place_active
) {
1381 *phwnd
= This
->hwnd
;
1385 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject
*iface
, BOOL fEnterMode
)
1387 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1388 FIXME("(%p)->(%x)\n", This
, fEnterMode
);
1392 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject
*iface
, LPMSG lpmsg
)
1394 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1395 FIXME("(%p)->(%p)\n", This
, lpmsg
);
1399 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject
*iface
,
1402 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1404 TRACE("(%p)->(%x)\n", This
, fActivate
);
1407 IDocHostUIHandler_OnFrameWindowActivate(This
->hostui
, fActivate
);
1412 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject
*iface
, BOOL fActivate
)
1414 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1415 FIXME("(%p)->(%x)\n", This
, fActivate
);
1419 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject
*iface
, LPCRECT prcBorder
,
1420 IOleInPlaceUIWindow
*pUIWindow
, BOOL fFrameWindow
)
1422 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1423 FIXME("(%p)->(%p %p %x)\n", This
, prcBorder
, pUIWindow
, fFrameWindow
);
1427 static HRESULT WINAPI
DocObjOleInPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject
*iface
, BOOL fEnable
)
1429 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceActiveObject(iface
);
1430 FIXME("(%p)->(%x)\n", This
, fEnable
);
1434 static const IOleInPlaceActiveObjectVtbl DocObjOleInPlaceActiveObjectVtbl
= {
1435 DocObjOleInPlaceActiveObject_QueryInterface
,
1436 DocObjOleInPlaceActiveObject_AddRef
,
1437 DocObjOleInPlaceActiveObject_Release
,
1438 DocObjOleInPlaceActiveObject_GetWindow
,
1439 DocObjOleInPlaceActiveObject_ContextSensitiveHelp
,
1440 DocObjOleInPlaceActiveObject_TranslateAccelerator
,
1441 DocObjOleInPlaceActiveObject_OnFrameWindowActivate
,
1442 DocObjOleInPlaceActiveObject_OnDocWindowActivate
,
1443 DocObjOleInPlaceActiveObject_ResizeBorder
,
1444 DocObjOleInPlaceActiveObject_EnableModeless
1447 /**********************************************************
1448 * IOleInPlaceObjectWindowless implementation
1451 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IOleInPlaceObjectWindowless(IOleInPlaceObjectWindowless
*iface
)
1453 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IOleInPlaceObjectWindowless_iface
);
1456 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless
*iface
,
1457 REFIID riid
, void **ppv
)
1459 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1460 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
1463 static ULONG WINAPI
DocNodeOleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless
*iface
)
1465 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1466 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
1469 static ULONG WINAPI
DocNodeOleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless
*iface
)
1471 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1472 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
1475 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless
*iface
,
1478 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1479 return IOleInPlaceActiveObject_GetWindow(&This
->IOleInPlaceActiveObject_iface
, phwnd
);
1482 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless
*iface
,
1485 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1486 return IOleInPlaceActiveObject_ContextSensitiveHelp(&This
->IOleInPlaceActiveObject_iface
, fEnterMode
);
1489 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless
*iface
)
1491 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1492 return IOleInPlaceObjectWindowless_InPlaceDeactivate(&This
->doc_obj
->IOleInPlaceObjectWindowless_iface
);
1495 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless
*iface
)
1497 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1498 FIXME("(%p)\n", This
);
1502 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless
*iface
,
1503 const RECT
*pos
, const RECT
*clip
)
1505 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1506 return IOleInPlaceObjectWindowless_SetObjectRects(&This
->doc_obj
->IOleInPlaceObjectWindowless_iface
, pos
, clip
);
1509 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless
*iface
)
1511 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1512 FIXME("(%p)\n", This
);
1516 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless
*iface
,
1517 UINT msg
, WPARAM wParam
, LPARAM lParam
, LRESULT
*lpResult
)
1519 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1520 FIXME("(%p)->(%u %Iu %Iu %p)\n", This
, msg
, wParam
, lParam
, lpResult
);
1524 static HRESULT WINAPI
DocNodeOleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless
*iface
,
1525 IDropTarget
**ppDropTarget
)
1527 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface
);
1528 FIXME("(%p)->(%p)\n", This
, ppDropTarget
);
1532 static const IOleInPlaceObjectWindowlessVtbl DocNodeOleInPlaceObjectWindowlessVtbl
= {
1533 DocNodeOleInPlaceObjectWindowless_QueryInterface
,
1534 DocNodeOleInPlaceObjectWindowless_AddRef
,
1535 DocNodeOleInPlaceObjectWindowless_Release
,
1536 DocNodeOleInPlaceObjectWindowless_GetWindow
,
1537 DocNodeOleInPlaceObjectWindowless_ContextSensitiveHelp
,
1538 DocNodeOleInPlaceObjectWindowless_InPlaceDeactivate
,
1539 DocNodeOleInPlaceObjectWindowless_UIDeactivate
,
1540 DocNodeOleInPlaceObjectWindowless_SetObjectRects
,
1541 DocNodeOleInPlaceObjectWindowless_ReactivateAndUndo
,
1542 DocNodeOleInPlaceObjectWindowless_OnWindowMessage
,
1543 DocNodeOleInPlaceObjectWindowless_GetDropTarget
1546 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IOleInPlaceObjectWindowless(IOleInPlaceObjectWindowless
*iface
)
1548 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IOleInPlaceObjectWindowless_iface
);
1551 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless
*iface
,
1552 REFIID riid
, void **ppv
)
1554 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1555 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
1558 static ULONG WINAPI
DocObjOleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless
*iface
)
1560 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1561 return IUnknown_AddRef(This
->outer_unk
);
1564 static ULONG WINAPI
DocObjOleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless
*iface
)
1566 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1567 return IUnknown_Release(This
->outer_unk
);
1570 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless
*iface
,
1573 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1574 return IOleInPlaceActiveObject_GetWindow(&This
->IOleInPlaceActiveObject_iface
, phwnd
);
1577 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless
*iface
,
1580 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1581 return IOleInPlaceActiveObject_ContextSensitiveHelp(&This
->IOleInPlaceActiveObject_iface
, fEnterMode
);
1584 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless
*iface
)
1586 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1588 TRACE("(%p)\n", This
);
1591 IOleDocumentView_UIActivate(&This
->IOleDocumentView_iface
, FALSE
);
1592 This
->window_active
= FALSE
;
1594 if(!This
->in_place_active
)
1597 unlink_ref(&This
->frame
);
1599 ShowWindow(This
->hwnd
, SW_HIDE
);
1600 SetWindowPos(This
->hwnd
, HWND_TOPMOST
, 0, 0, 0, 0, SWP_NOSIZE
| SWP_NOMOVE
| SWP_NOACTIVATE
);
1603 This
->focus
= FALSE
;
1606 This
->in_place_active
= FALSE
;
1608 IOleInPlaceSiteEx
*ipsiteex
;
1611 hres
= IOleInPlaceSite_QueryInterface(This
->ipsite
, &IID_IOleInPlaceSiteEx
, (void**)&ipsiteex
);
1612 if(SUCCEEDED(hres
)) {
1613 IOleInPlaceSiteEx_OnInPlaceDeactivateEx(ipsiteex
, TRUE
);
1614 IOleInPlaceSiteEx_Release(ipsiteex
);
1616 IOleInPlaceSite_OnInPlaceDeactivate(This
->ipsite
);
1623 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless
*iface
)
1625 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1626 FIXME("(%p)\n", This
);
1630 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless
*iface
,
1631 const RECT
*pos
, const RECT
*clip
)
1633 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1636 TRACE("(%p)->(%s %s)\n", This
, wine_dbgstr_rect(pos
), wine_dbgstr_rect(clip
));
1638 if(clip
&& !EqualRect(clip
, pos
))
1639 FIXME("Ignoring clip rect %s\n", wine_dbgstr_rect(clip
));
1642 return IOleDocumentView_SetRect(&This
->IOleDocumentView_iface
, &r
);
1645 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless
*iface
)
1647 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1648 FIXME("(%p)\n", This
);
1652 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless
*iface
,
1653 UINT msg
, WPARAM wParam
, LPARAM lParam
, LRESULT
*lpResult
)
1655 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1656 FIXME("(%p)->(%u %Iu %Iu %p)\n", This
, msg
, wParam
, lParam
, lpResult
);
1660 static HRESULT WINAPI
DocObjOleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless
*iface
,
1661 IDropTarget
**ppDropTarget
)
1663 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleInPlaceObjectWindowless(iface
);
1664 FIXME("(%p)->(%p)\n", This
, ppDropTarget
);
1668 static const IOleInPlaceObjectWindowlessVtbl DocObjOleInPlaceObjectWindowlessVtbl
= {
1669 DocObjOleInPlaceObjectWindowless_QueryInterface
,
1670 DocObjOleInPlaceObjectWindowless_AddRef
,
1671 DocObjOleInPlaceObjectWindowless_Release
,
1672 DocObjOleInPlaceObjectWindowless_GetWindow
,
1673 DocObjOleInPlaceObjectWindowless_ContextSensitiveHelp
,
1674 DocObjOleInPlaceObjectWindowless_InPlaceDeactivate
,
1675 DocObjOleInPlaceObjectWindowless_UIDeactivate
,
1676 DocObjOleInPlaceObjectWindowless_SetObjectRects
,
1677 DocObjOleInPlaceObjectWindowless_ReactivateAndUndo
,
1678 DocObjOleInPlaceObjectWindowless_OnWindowMessage
,
1679 DocObjOleInPlaceObjectWindowless_GetDropTarget
1682 /**********************************************************
1683 * IObjectWithSite implementation
1686 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IObjectWithSite(IObjectWithSite
*iface
)
1688 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IObjectWithSite_iface
);
1691 static HRESULT WINAPI
DocNodeObjectWithSite_QueryInterface(IObjectWithSite
*iface
, REFIID riid
, void **ppv
)
1693 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectWithSite(iface
);
1694 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
1697 static ULONG WINAPI
DocNodeObjectWithSite_AddRef(IObjectWithSite
*iface
)
1699 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectWithSite(iface
);
1700 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
1703 static ULONG WINAPI
DocNodeObjectWithSite_Release(IObjectWithSite
*iface
)
1705 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectWithSite(iface
);
1706 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
1709 static HRESULT WINAPI
DocNodeObjectWithSite_SetSite(IObjectWithSite
*iface
, IUnknown
*pUnkSite
)
1711 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectWithSite(iface
);
1712 FIXME("(%p)->(%p)\n", This
, pUnkSite
);
1716 static HRESULT WINAPI
DocNodeObjectWithSite_GetSite(IObjectWithSite
* iface
, REFIID riid
, PVOID
*ppvSite
)
1718 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectWithSite(iface
);
1719 FIXME("(%p)->(%p)\n", This
, ppvSite
);
1723 static const IObjectWithSiteVtbl DocNodeObjectWithSiteVtbl
= {
1724 DocNodeObjectWithSite_QueryInterface
,
1725 DocNodeObjectWithSite_AddRef
,
1726 DocNodeObjectWithSite_Release
,
1727 DocNodeObjectWithSite_SetSite
,
1728 DocNodeObjectWithSite_GetSite
1731 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IObjectWithSite(IObjectWithSite
*iface
)
1733 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IObjectWithSite_iface
);
1736 static HRESULT WINAPI
DocObjObjectWithSite_QueryInterface(IObjectWithSite
*iface
, REFIID riid
, void **ppv
)
1738 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectWithSite(iface
);
1739 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
1742 static ULONG WINAPI
DocObjObjectWithSite_AddRef(IObjectWithSite
*iface
)
1744 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectWithSite(iface
);
1745 return IUnknown_AddRef(This
->outer_unk
);
1748 static ULONG WINAPI
DocObjObjectWithSite_Release(IObjectWithSite
*iface
)
1750 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectWithSite(iface
);
1751 return IUnknown_Release(This
->outer_unk
);
1754 static HRESULT WINAPI
DocObjObjectWithSite_SetSite(IObjectWithSite
*iface
, IUnknown
*pUnkSite
)
1756 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectWithSite(iface
);
1757 FIXME("(%p)->(%p)\n", This
, pUnkSite
);
1761 static HRESULT WINAPI
DocObjObjectWithSite_GetSite(IObjectWithSite
* iface
, REFIID riid
, PVOID
*ppvSite
)
1763 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectWithSite(iface
);
1764 FIXME("(%p)->(%p)\n", This
, ppvSite
);
1768 static const IObjectWithSiteVtbl DocObjObjectWithSiteVtbl
= {
1769 DocObjObjectWithSite_QueryInterface
,
1770 DocObjObjectWithSite_AddRef
,
1771 DocObjObjectWithSite_Release
,
1772 DocObjObjectWithSite_SetSite
,
1773 DocObjObjectWithSite_GetSite
1776 /**********************************************************
1777 * IOleContainer implementation
1780 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IOleContainer(IOleContainer
*iface
)
1782 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IOleContainer_iface
);
1785 static HRESULT WINAPI
DocNodeOleContainer_QueryInterface(IOleContainer
*iface
, REFIID riid
, void **ppv
)
1787 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleContainer(iface
);
1788 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
1791 static ULONG WINAPI
DocNodeOleContainer_AddRef(IOleContainer
*iface
)
1793 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleContainer(iface
);
1794 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
1797 static ULONG WINAPI
DocNodeOleContainer_Release(IOleContainer
*iface
)
1799 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleContainer(iface
);
1800 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
1803 static HRESULT WINAPI
DocNodeOleContainer_ParseDisplayName(IOleContainer
*iface
, IBindCtx
*pbc
, LPOLESTR pszDisplayName
,
1804 ULONG
*pchEaten
, IMoniker
**ppmkOut
)
1806 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleContainer(iface
);
1807 FIXME("(%p)->(%p %s %p %p)\n", This
, pbc
, debugstr_w(pszDisplayName
), pchEaten
, ppmkOut
);
1811 static HRESULT WINAPI
DocNodeOleContainer_EnumObjects(IOleContainer
*iface
, DWORD grfFlags
, IEnumUnknown
**ppenum
)
1813 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleContainer(iface
);
1814 return IOleContainer_EnumObjects(&This
->doc_obj
->IOleContainer_iface
, grfFlags
, ppenum
);
1817 static HRESULT WINAPI
DocNodeOleContainer_LockContainer(IOleContainer
*iface
, BOOL fLock
)
1819 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IOleContainer(iface
);
1820 FIXME("(%p)->(%x)\n", This
, fLock
);
1824 static const IOleContainerVtbl DocNodeOleContainerVtbl
= {
1825 DocNodeOleContainer_QueryInterface
,
1826 DocNodeOleContainer_AddRef
,
1827 DocNodeOleContainer_Release
,
1828 DocNodeOleContainer_ParseDisplayName
,
1829 DocNodeOleContainer_EnumObjects
,
1830 DocNodeOleContainer_LockContainer
1833 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IOleContainer(IOleContainer
*iface
)
1835 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IOleContainer_iface
);
1838 static HRESULT WINAPI
DocObjOleContainer_QueryInterface(IOleContainer
*iface
, REFIID riid
, void **ppv
)
1840 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleContainer(iface
);
1841 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
1844 static ULONG WINAPI
DocObjOleContainer_AddRef(IOleContainer
*iface
)
1846 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleContainer(iface
);
1847 return IUnknown_AddRef(This
->outer_unk
);
1850 static ULONG WINAPI
DocObjOleContainer_Release(IOleContainer
*iface
)
1852 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleContainer(iface
);
1853 return IUnknown_Release(This
->outer_unk
);
1856 static HRESULT WINAPI
DocObjOleContainer_ParseDisplayName(IOleContainer
*iface
, IBindCtx
*pbc
, LPOLESTR pszDisplayName
,
1857 ULONG
*pchEaten
, IMoniker
**ppmkOut
)
1859 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleContainer(iface
);
1860 FIXME("(%p)->(%p %s %p %p)\n", This
, pbc
, debugstr_w(pszDisplayName
), pchEaten
, ppmkOut
);
1864 static HRESULT WINAPI
DocObjOleContainer_EnumObjects(IOleContainer
*iface
, DWORD grfFlags
, IEnumUnknown
**ppenum
)
1866 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleContainer(iface
);
1869 TRACE("(%p)->(%lx %p)\n", This
, grfFlags
, ppenum
);
1871 ret
= malloc(sizeof(*ret
));
1873 return E_OUTOFMEMORY
;
1875 ret
->IEnumUnknown_iface
.lpVtbl
= &EnumUnknownVtbl
;
1878 *ppenum
= &ret
->IEnumUnknown_iface
;
1882 static HRESULT WINAPI
DocObjOleContainer_LockContainer(IOleContainer
*iface
, BOOL fLock
)
1884 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IOleContainer(iface
);
1885 FIXME("(%p)->(%x)\n", This
, fLock
);
1889 static const IOleContainerVtbl DocObjOleContainerVtbl
= {
1890 DocObjOleContainer_QueryInterface
,
1891 DocObjOleContainer_AddRef
,
1892 DocObjOleContainer_Release
,
1893 DocObjOleContainer_ParseDisplayName
,
1894 DocObjOleContainer_EnumObjects
,
1895 DocObjOleContainer_LockContainer
1898 static inline HTMLDocumentObj
*impl_from_ITargetContainer(ITargetContainer
*iface
)
1900 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, ITargetContainer_iface
);
1903 static HRESULT WINAPI
TargetContainer_QueryInterface(ITargetContainer
*iface
, REFIID riid
, void **ppv
)
1905 HTMLDocumentObj
*This
= impl_from_ITargetContainer(iface
);
1906 return ICustomDoc_QueryInterface(&This
->ICustomDoc_iface
, riid
, ppv
);
1909 static ULONG WINAPI
TargetContainer_AddRef(ITargetContainer
*iface
)
1911 HTMLDocumentObj
*This
= impl_from_ITargetContainer(iface
);
1912 return ICustomDoc_AddRef(&This
->ICustomDoc_iface
);
1915 static ULONG WINAPI
TargetContainer_Release(ITargetContainer
*iface
)
1917 HTMLDocumentObj
*This
= impl_from_ITargetContainer(iface
);
1918 return ICustomDoc_Release(&This
->ICustomDoc_iface
);
1921 static HRESULT WINAPI
TargetContainer_GetFrameUrl(ITargetContainer
*iface
, LPWSTR
*ppszFrameSrc
)
1923 HTMLDocumentObj
*This
= impl_from_ITargetContainer(iface
);
1924 FIXME("(%p)->(%p)\n", This
, ppszFrameSrc
);
1928 static HRESULT WINAPI
TargetContainer_GetFramesContainer(ITargetContainer
*iface
, IOleContainer
**ppContainer
)
1930 HTMLDocumentObj
*This
= impl_from_ITargetContainer(iface
);
1932 TRACE("(%p)->(%p)\n", This
, ppContainer
);
1934 /* NOTE: we should return wrapped interface here */
1935 IOleContainer_AddRef(&This
->IOleContainer_iface
);
1936 *ppContainer
= &This
->IOleContainer_iface
;
1940 static const ITargetContainerVtbl TargetContainerVtbl
= {
1941 TargetContainer_QueryInterface
,
1942 TargetContainer_AddRef
,
1943 TargetContainer_Release
,
1944 TargetContainer_GetFrameUrl
,
1945 TargetContainer_GetFramesContainer
1948 void TargetContainer_Init(HTMLDocumentObj
*This
)
1950 This
->ITargetContainer_iface
.lpVtbl
= &TargetContainerVtbl
;
1953 /**********************************************************
1954 * IObjectSafety implementation
1957 static inline HTMLDocumentNode
*HTMLDocumentNode_from_IObjectSafety(IObjectSafety
*iface
)
1959 return CONTAINING_RECORD(iface
, HTMLDocumentNode
, IObjectSafety_iface
);
1962 static HRESULT WINAPI
DocNodeObjectSafety_QueryInterface(IObjectSafety
*iface
, REFIID riid
, void **ppv
)
1964 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectSafety(iface
);
1965 return IHTMLDOMNode_QueryInterface(&This
->node
.IHTMLDOMNode_iface
, riid
, ppv
);
1968 static ULONG WINAPI
DocNodeObjectSafety_AddRef(IObjectSafety
*iface
)
1970 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectSafety(iface
);
1971 return IHTMLDOMNode_AddRef(&This
->node
.IHTMLDOMNode_iface
);
1974 static ULONG WINAPI
DocNodeObjectSafety_Release(IObjectSafety
*iface
)
1976 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectSafety(iface
);
1977 return IHTMLDOMNode_Release(&This
->node
.IHTMLDOMNode_iface
);
1980 static HRESULT WINAPI
DocNodeObjectSafety_GetInterfaceSafetyOptions(IObjectSafety
*iface
,
1981 REFIID riid
, DWORD
*pdwSupportedOptions
, DWORD
*pdwEnabledOptions
)
1983 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectSafety(iface
);
1984 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_guid(riid
), pdwSupportedOptions
, pdwEnabledOptions
);
1988 static HRESULT WINAPI
DocNodeObjectSafety_SetInterfaceSafetyOptions(IObjectSafety
*iface
,
1989 REFIID riid
, DWORD dwOptionSetMask
, DWORD dwEnabledOptions
)
1991 HTMLDocumentNode
*This
= HTMLDocumentNode_from_IObjectSafety(iface
);
1992 return IObjectSafety_SetInterfaceSafetyOptions(&This
->doc_obj
->IObjectSafety_iface
,
1993 riid
, dwOptionSetMask
, dwEnabledOptions
);
1996 static const IObjectSafetyVtbl DocNodeObjectSafetyVtbl
= {
1997 DocNodeObjectSafety_QueryInterface
,
1998 DocNodeObjectSafety_AddRef
,
1999 DocNodeObjectSafety_Release
,
2000 DocNodeObjectSafety_GetInterfaceSafetyOptions
,
2001 DocNodeObjectSafety_SetInterfaceSafetyOptions
2004 static inline HTMLDocumentObj
*HTMLDocumentObj_from_IObjectSafety(IObjectSafety
*iface
)
2006 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IObjectSafety_iface
);
2009 static HRESULT WINAPI
DocObjObjectSafety_QueryInterface(IObjectSafety
*iface
, REFIID riid
, void **ppv
)
2011 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectSafety(iface
);
2012 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
2015 static ULONG WINAPI
DocObjObjectSafety_AddRef(IObjectSafety
*iface
)
2017 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectSafety(iface
);
2018 return IUnknown_AddRef(This
->outer_unk
);
2021 static ULONG WINAPI
DocObjObjectSafety_Release(IObjectSafety
*iface
)
2023 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectSafety(iface
);
2024 return IUnknown_Release(This
->outer_unk
);
2027 static HRESULT WINAPI
DocObjObjectSafety_GetInterfaceSafetyOptions(IObjectSafety
*iface
,
2028 REFIID riid
, DWORD
*pdwSupportedOptions
, DWORD
*pdwEnabledOptions
)
2030 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectSafety(iface
);
2031 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_guid(riid
), pdwSupportedOptions
, pdwEnabledOptions
);
2035 static HRESULT WINAPI
DocObjObjectSafety_SetInterfaceSafetyOptions(IObjectSafety
*iface
,
2036 REFIID riid
, DWORD dwOptionSetMask
, DWORD dwEnabledOptions
)
2038 HTMLDocumentObj
*This
= HTMLDocumentObj_from_IObjectSafety(iface
);
2039 FIXME("(%p)->(%s %lx %lx)\n", This
, debugstr_guid(riid
), dwOptionSetMask
, dwEnabledOptions
);
2041 if(IsEqualGUID(&IID_IPersistMoniker
, riid
) &&
2042 dwOptionSetMask
==INTERFACESAFE_FOR_UNTRUSTED_DATA
&&
2043 dwEnabledOptions
==INTERFACESAFE_FOR_UNTRUSTED_DATA
)
2049 static const IObjectSafetyVtbl DocObjObjectSafetyVtbl
= {
2050 DocObjObjectSafety_QueryInterface
,
2051 DocObjObjectSafety_AddRef
,
2052 DocObjObjectSafety_Release
,
2053 DocObjObjectSafety_GetInterfaceSafetyOptions
,
2054 DocObjObjectSafety_SetInterfaceSafetyOptions
2057 void HTMLDocument_LockContainer(HTMLDocumentObj
*This
, BOOL fLock
)
2059 IOleContainer
*container
;
2062 if(!This
->client
|| This
->container_locked
== fLock
)
2065 hres
= IOleClientSite_GetContainer(This
->client
, &container
);
2066 if(SUCCEEDED(hres
)) {
2067 IOleContainer_LockContainer(container
, fLock
);
2068 This
->container_locked
= fLock
;
2069 IOleContainer_Release(container
);
2073 void HTMLDocumentNode_OleObj_Init(HTMLDocumentNode
*This
)
2075 This
->IOleObject_iface
.lpVtbl
= &DocNodeOleObjectVtbl
;
2076 This
->IOleDocument_iface
.lpVtbl
= &DocNodeOleDocumentVtbl
;
2077 This
->IOleControl_iface
.lpVtbl
= &DocNodeOleControlVtbl
;
2078 This
->IOleInPlaceActiveObject_iface
.lpVtbl
= &DocNodeOleInPlaceActiveObjectVtbl
;
2079 This
->IOleInPlaceObjectWindowless_iface
.lpVtbl
= &DocNodeOleInPlaceObjectWindowlessVtbl
;
2080 This
->IObjectWithSite_iface
.lpVtbl
= &DocNodeObjectWithSiteVtbl
;
2081 This
->IOleContainer_iface
.lpVtbl
= &DocNodeOleContainerVtbl
;
2082 This
->IObjectSafety_iface
.lpVtbl
= &DocNodeObjectSafetyVtbl
;
2084 This
->doc_obj
->extent
.cx
= 1;
2085 This
->doc_obj
->extent
.cy
= 1;
2089 static void HTMLDocumentObj_OleObj_Init(HTMLDocumentObj
*This
)
2091 This
->IOleObject_iface
.lpVtbl
= &DocObjOleObjectVtbl
;
2092 This
->IOleDocument_iface
.lpVtbl
= &DocObjOleDocumentVtbl
;
2093 This
->IOleControl_iface
.lpVtbl
= &DocObjOleControlVtbl
;
2094 This
->IOleInPlaceActiveObject_iface
.lpVtbl
= &DocObjOleInPlaceActiveObjectVtbl
;
2095 This
->IOleInPlaceObjectWindowless_iface
.lpVtbl
= &DocObjOleInPlaceObjectWindowlessVtbl
;
2096 This
->IObjectWithSite_iface
.lpVtbl
= &DocObjObjectWithSiteVtbl
;
2097 This
->IOleContainer_iface
.lpVtbl
= &DocObjOleContainerVtbl
;
2098 This
->IObjectSafety_iface
.lpVtbl
= &DocObjObjectSafetyVtbl
;
2099 This
->extent
.cx
= 1;
2100 This
->extent
.cy
= 1;
2103 #define HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(iface) \
2104 static HRESULT WINAPI DocObj##iface##_QueryInterface(I##iface *_0, REFIID riid, void **ppv) \
2106 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2107 return IUnknown_QueryInterface(This->outer_unk, riid, ppv); \
2109 static ULONG WINAPI DocObj##iface##_AddRef(I##iface *_0) \
2111 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2112 return IUnknown_AddRef(This->outer_unk); \
2114 static ULONG WINAPI DocObj##iface##_Release(I##iface *_0) \
2116 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2117 return IUnknown_Release(This->outer_unk); \
2120 #define HTMLDOCUMENTOBJ_IDISPATCH_METHODS(iface) HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(iface) \
2121 static HRESULT WINAPI DocObj##iface##_GetTypeInfoCount(I##iface *_0, UINT *pctinfo) \
2123 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2124 return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); \
2126 static HRESULT WINAPI DocObj##iface##_GetTypeInfo(I##iface *_0, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) \
2128 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2129 return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); \
2131 static HRESULT WINAPI DocObj##iface##_GetIDsOfNames(I##iface *_0, REFIID riid, LPOLESTR *rgszNames, UINT cNames, \
2132 LCID lcid, DISPID *rgDispId) \
2134 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2135 return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); \
2137 static HRESULT WINAPI DocObj##iface##_Invoke(I##iface *_0, DISPID dispIdMember, REFIID riid, LCID lcid, \
2138 WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) \
2140 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2141 return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); \
2144 #define HTMLDOCUMENTOBJ_FWD_TO_NODE_0(iface, method) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0) \
2146 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2147 return This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface); \
2150 #define HTMLDOCUMENTOBJ_FWD_TO_NODE_1(iface, method, a) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1) \
2152 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2153 return This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1); \
2156 #define HTMLDOCUMENTOBJ_FWD_TO_NODE_2(iface, method, a,b) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2) \
2158 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2159 return This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2); \
2162 #define HTMLDOCUMENTOBJ_FWD_TO_NODE_3(iface, method, a,b,c) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3) \
2164 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2165 return This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3); \
2168 #define HTMLDOCUMENTOBJ_FWD_TO_NODE_4(iface, method, a,b,c,d) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3, d _4) \
2170 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2171 return This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4); \
2174 #define HTMLDOCUMENTOBJ_FWD_TO_NODE_5(iface, method, a,b,c,d,e) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3, d _4, e _5) \
2176 HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
2177 return This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4, _5); \
2180 /**********************************************************
2181 * IHTMLDocument2 implementation
2183 static inline HTMLDocumentObj
*impl_from_IHTMLDocument2(IHTMLDocument2
*iface
)
2185 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IHTMLDocument2_iface
);
2188 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument2
)
2190 static HRESULT WINAPI
DocObjHTMLDocument2_get_Script(IHTMLDocument2
*iface
, IDispatch
**p
)
2192 HTMLDocumentObj
*This
= impl_from_IHTMLDocument2(iface
);
2195 TRACE("(%p)->(%p)\n", This
, p
);
2197 hres
= IHTMLDocument7_get_parentWindow(&This
->IHTMLDocument7_iface
, (IHTMLWindow2
**)p
);
2198 return hres
== S_OK
&& !*p
? E_PENDING
: hres
;
2201 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_all
, IHTMLElementCollection
**)
2202 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_body
, IHTMLElement
**)
2203 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_activeElement
, IHTMLElement
**)
2204 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_images
, IHTMLElementCollection
**)
2205 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_applets
, IHTMLElementCollection
**)
2206 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_links
, IHTMLElementCollection
**)
2207 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_forms
, IHTMLElementCollection
**)
2208 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_anchors
, IHTMLElementCollection
**)
2209 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_title
, BSTR
)
2210 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_title
, BSTR
*)
2211 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_scripts
, IHTMLElementCollection
**)
2213 static HRESULT WINAPI
DocObjHTMLDocument2_put_designMode(IHTMLDocument2
*iface
, BSTR v
)
2215 HTMLDocumentObj
*This
= impl_from_IHTMLDocument2(iface
);
2218 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2220 if(wcsicmp(v
, L
"on")) {
2221 FIXME("Unsupported arg %s\n", debugstr_w(v
));
2225 hres
= setup_edit_mode(This
);
2229 call_property_onchanged(&This
->cp_container
, DISPID_IHTMLDOCUMENT2_DESIGNMODE
);
2233 static HRESULT WINAPI
DocObjHTMLDocument2_get_designMode(IHTMLDocument2
*iface
, BSTR
*p
)
2235 HTMLDocumentObj
*This
= impl_from_IHTMLDocument2(iface
);
2237 FIXME("(%p)->(%p) always returning Off\n", This
, p
);
2240 return E_INVALIDARG
;
2242 *p
= SysAllocString(L
"Off");
2246 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_selection
, IHTMLSelectionObject
**)
2247 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_readyState
, BSTR
*)
2249 static HRESULT WINAPI
DocObjHTMLDocument2_get_frames(IHTMLDocument2
*iface
, IHTMLFramesCollection2
**p
)
2251 HTMLDocumentObj
*This
= impl_from_IHTMLDocument2(iface
);
2253 TRACE("(%p)->(%p)\n", This
, p
);
2256 /* Not implemented by IE */
2259 return IHTMLWindow2_get_frames(&This
->window
->base
.IHTMLWindow2_iface
, p
);
2262 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_embeds
, IHTMLElementCollection
**)
2263 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_plugins
, IHTMLElementCollection
**)
2264 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_alinkColor
, VARIANT
)
2265 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_alinkColor
, VARIANT
*)
2266 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_bgColor
, VARIANT
)
2267 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_bgColor
, VARIANT
*)
2268 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_fgColor
, VARIANT
)
2269 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_fgColor
, VARIANT
*)
2270 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_linkColor
, VARIANT
)
2271 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_linkColor
, VARIANT
*)
2272 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_vlinkColor
, VARIANT
)
2273 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_vlinkColor
, VARIANT
*)
2274 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_referrer
, BSTR
*)
2275 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_location
, IHTMLLocation
**)
2276 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_lastModified
, BSTR
*)
2277 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_URL
, BSTR
)
2278 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_URL
, BSTR
*)
2279 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_domain
, BSTR
)
2280 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_domain
, BSTR
*)
2281 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_cookie
, BSTR
)
2282 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_cookie
, BSTR
*)
2283 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_expando
, VARIANT_BOOL
)
2284 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_expando
, VARIANT_BOOL
*)
2285 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_charset
, BSTR
)
2286 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_charset
, BSTR
*)
2287 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_defaultCharset
, BSTR
)
2288 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_defaultCharset
, BSTR
*)
2289 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_mimeType
, BSTR
*)
2290 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_fileSize
, BSTR
*)
2291 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_fileCreatedDate
, BSTR
*)
2292 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_fileModifiedDate
, BSTR
*)
2293 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_fileUpdatedDate
, BSTR
*)
2294 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_security
, BSTR
*)
2295 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_protocol
, BSTR
*)
2296 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_nameProp
, BSTR
*)
2297 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, write
, SAFEARRAY
*)
2298 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, writeln
, SAFEARRAY
*)
2299 HTMLDOCUMENTOBJ_FWD_TO_NODE_5(HTMLDocument2
, open
, BSTR
,VARIANT
,VARIANT
,VARIANT
,IDispatch
**)
2300 HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument2
, close
)
2301 HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument2
, clear
)
2302 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, queryCommandSupported
, BSTR
,VARIANT_BOOL
*)
2303 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, queryCommandEnabled
, BSTR
,VARIANT_BOOL
*)
2304 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, queryCommandState
, BSTR
,VARIANT_BOOL
*)
2305 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, queryCommandIndeterm
, BSTR
,VARIANT_BOOL
*)
2306 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, queryCommandText
, BSTR
,BSTR
*)
2307 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, queryCommandValue
, BSTR
,VARIANT
*)
2308 HTMLDOCUMENTOBJ_FWD_TO_NODE_4(HTMLDocument2
, execCommand
, BSTR
,VARIANT_BOOL
,VARIANT
,VARIANT_BOOL
*)
2309 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, execCommandShowHelp
, BSTR
,VARIANT_BOOL
*)
2310 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2
, createElement
, BSTR
,IHTMLElement
**)
2311 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onhelp
, VARIANT
)
2312 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onhelp
, VARIANT
*)
2313 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onclick
, VARIANT
)
2314 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onclick
, VARIANT
*)
2315 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_ondblclick
, VARIANT
)
2316 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_ondblclick
, VARIANT
*)
2317 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onkeyup
, VARIANT
)
2318 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onkeyup
, VARIANT
*)
2319 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onkeydown
, VARIANT
)
2320 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onkeydown
, VARIANT
*)
2321 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onkeypress
, VARIANT
)
2322 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onkeypress
, VARIANT
*)
2323 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onmouseup
, VARIANT
)
2324 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onmouseup
, VARIANT
*)
2325 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onmousedown
, VARIANT
)
2326 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onmousedown
, VARIANT
*)
2327 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onmousemove
, VARIANT
)
2328 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onmousemove
, VARIANT
*)
2329 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onmouseout
, VARIANT
)
2330 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onmouseout
, VARIANT
*)
2331 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onmouseover
, VARIANT
)
2332 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onmouseover
, VARIANT
*)
2333 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onreadystatechange
, VARIANT
)
2334 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onreadystatechange
, VARIANT
*)
2335 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onafterupdate
, VARIANT
)
2336 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onafterupdate
, VARIANT
*)
2337 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onrowexit
, VARIANT
)
2338 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onrowexit
, VARIANT
*)
2339 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onrowenter
, VARIANT
)
2340 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onrowenter
, VARIANT
*)
2341 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_ondragstart
, VARIANT
)
2342 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_ondragstart
, VARIANT
*)
2343 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onselectstart
, VARIANT
)
2344 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onselectstart
, VARIANT
*)
2345 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument2
, elementFromPoint
, LONG
,LONG
,IHTMLElement
**)
2347 static HRESULT WINAPI
DocObjHTMLDocument2_get_parentWindow(IHTMLDocument2
*iface
, IHTMLWindow2
**p
)
2349 HTMLDocumentObj
*This
= impl_from_IHTMLDocument2(iface
);
2352 TRACE("(%p)->(%p)\n", This
, p
);
2354 hres
= IHTMLDocument7_get_defaultView(&This
->IHTMLDocument7_iface
, p
);
2355 return hres
== S_OK
&& !*p
? E_FAIL
: hres
;
2358 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_styleSheets
, IHTMLStyleSheetsCollection
**)
2359 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onbeforeupdate
, VARIANT
)
2360 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onbeforeupdate
, VARIANT
*)
2361 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, put_onerrorupdate
, VARIANT
)
2362 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, get_onerrorupdate
, VARIANT
*)
2363 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2
, toString
, BSTR
*)
2364 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument2
, createStyleSheet
, BSTR
,LONG
,IHTMLStyleSheet
**)
2366 static const IHTMLDocument2Vtbl DocObjHTMLDocument2Vtbl
= {
2367 DocObjHTMLDocument2_QueryInterface
,
2368 DocObjHTMLDocument2_AddRef
,
2369 DocObjHTMLDocument2_Release
,
2370 DocObjHTMLDocument2_GetTypeInfoCount
,
2371 DocObjHTMLDocument2_GetTypeInfo
,
2372 DocObjHTMLDocument2_GetIDsOfNames
,
2373 DocObjHTMLDocument2_Invoke
,
2374 DocObjHTMLDocument2_get_Script
,
2375 DocObjHTMLDocument2_get_all
,
2376 DocObjHTMLDocument2_get_body
,
2377 DocObjHTMLDocument2_get_activeElement
,
2378 DocObjHTMLDocument2_get_images
,
2379 DocObjHTMLDocument2_get_applets
,
2380 DocObjHTMLDocument2_get_links
,
2381 DocObjHTMLDocument2_get_forms
,
2382 DocObjHTMLDocument2_get_anchors
,
2383 DocObjHTMLDocument2_put_title
,
2384 DocObjHTMLDocument2_get_title
,
2385 DocObjHTMLDocument2_get_scripts
,
2386 DocObjHTMLDocument2_put_designMode
,
2387 DocObjHTMLDocument2_get_designMode
,
2388 DocObjHTMLDocument2_get_selection
,
2389 DocObjHTMLDocument2_get_readyState
,
2390 DocObjHTMLDocument2_get_frames
,
2391 DocObjHTMLDocument2_get_embeds
,
2392 DocObjHTMLDocument2_get_plugins
,
2393 DocObjHTMLDocument2_put_alinkColor
,
2394 DocObjHTMLDocument2_get_alinkColor
,
2395 DocObjHTMLDocument2_put_bgColor
,
2396 DocObjHTMLDocument2_get_bgColor
,
2397 DocObjHTMLDocument2_put_fgColor
,
2398 DocObjHTMLDocument2_get_fgColor
,
2399 DocObjHTMLDocument2_put_linkColor
,
2400 DocObjHTMLDocument2_get_linkColor
,
2401 DocObjHTMLDocument2_put_vlinkColor
,
2402 DocObjHTMLDocument2_get_vlinkColor
,
2403 DocObjHTMLDocument2_get_referrer
,
2404 DocObjHTMLDocument2_get_location
,
2405 DocObjHTMLDocument2_get_lastModified
,
2406 DocObjHTMLDocument2_put_URL
,
2407 DocObjHTMLDocument2_get_URL
,
2408 DocObjHTMLDocument2_put_domain
,
2409 DocObjHTMLDocument2_get_domain
,
2410 DocObjHTMLDocument2_put_cookie
,
2411 DocObjHTMLDocument2_get_cookie
,
2412 DocObjHTMLDocument2_put_expando
,
2413 DocObjHTMLDocument2_get_expando
,
2414 DocObjHTMLDocument2_put_charset
,
2415 DocObjHTMLDocument2_get_charset
,
2416 DocObjHTMLDocument2_put_defaultCharset
,
2417 DocObjHTMLDocument2_get_defaultCharset
,
2418 DocObjHTMLDocument2_get_mimeType
,
2419 DocObjHTMLDocument2_get_fileSize
,
2420 DocObjHTMLDocument2_get_fileCreatedDate
,
2421 DocObjHTMLDocument2_get_fileModifiedDate
,
2422 DocObjHTMLDocument2_get_fileUpdatedDate
,
2423 DocObjHTMLDocument2_get_security
,
2424 DocObjHTMLDocument2_get_protocol
,
2425 DocObjHTMLDocument2_get_nameProp
,
2426 DocObjHTMLDocument2_write
,
2427 DocObjHTMLDocument2_writeln
,
2428 DocObjHTMLDocument2_open
,
2429 DocObjHTMLDocument2_close
,
2430 DocObjHTMLDocument2_clear
,
2431 DocObjHTMLDocument2_queryCommandSupported
,
2432 DocObjHTMLDocument2_queryCommandEnabled
,
2433 DocObjHTMLDocument2_queryCommandState
,
2434 DocObjHTMLDocument2_queryCommandIndeterm
,
2435 DocObjHTMLDocument2_queryCommandText
,
2436 DocObjHTMLDocument2_queryCommandValue
,
2437 DocObjHTMLDocument2_execCommand
,
2438 DocObjHTMLDocument2_execCommandShowHelp
,
2439 DocObjHTMLDocument2_createElement
,
2440 DocObjHTMLDocument2_put_onhelp
,
2441 DocObjHTMLDocument2_get_onhelp
,
2442 DocObjHTMLDocument2_put_onclick
,
2443 DocObjHTMLDocument2_get_onclick
,
2444 DocObjHTMLDocument2_put_ondblclick
,
2445 DocObjHTMLDocument2_get_ondblclick
,
2446 DocObjHTMLDocument2_put_onkeyup
,
2447 DocObjHTMLDocument2_get_onkeyup
,
2448 DocObjHTMLDocument2_put_onkeydown
,
2449 DocObjHTMLDocument2_get_onkeydown
,
2450 DocObjHTMLDocument2_put_onkeypress
,
2451 DocObjHTMLDocument2_get_onkeypress
,
2452 DocObjHTMLDocument2_put_onmouseup
,
2453 DocObjHTMLDocument2_get_onmouseup
,
2454 DocObjHTMLDocument2_put_onmousedown
,
2455 DocObjHTMLDocument2_get_onmousedown
,
2456 DocObjHTMLDocument2_put_onmousemove
,
2457 DocObjHTMLDocument2_get_onmousemove
,
2458 DocObjHTMLDocument2_put_onmouseout
,
2459 DocObjHTMLDocument2_get_onmouseout
,
2460 DocObjHTMLDocument2_put_onmouseover
,
2461 DocObjHTMLDocument2_get_onmouseover
,
2462 DocObjHTMLDocument2_put_onreadystatechange
,
2463 DocObjHTMLDocument2_get_onreadystatechange
,
2464 DocObjHTMLDocument2_put_onafterupdate
,
2465 DocObjHTMLDocument2_get_onafterupdate
,
2466 DocObjHTMLDocument2_put_onrowexit
,
2467 DocObjHTMLDocument2_get_onrowexit
,
2468 DocObjHTMLDocument2_put_onrowenter
,
2469 DocObjHTMLDocument2_get_onrowenter
,
2470 DocObjHTMLDocument2_put_ondragstart
,
2471 DocObjHTMLDocument2_get_ondragstart
,
2472 DocObjHTMLDocument2_put_onselectstart
,
2473 DocObjHTMLDocument2_get_onselectstart
,
2474 DocObjHTMLDocument2_elementFromPoint
,
2475 DocObjHTMLDocument2_get_parentWindow
,
2476 DocObjHTMLDocument2_get_styleSheets
,
2477 DocObjHTMLDocument2_put_onbeforeupdate
,
2478 DocObjHTMLDocument2_get_onbeforeupdate
,
2479 DocObjHTMLDocument2_put_onerrorupdate
,
2480 DocObjHTMLDocument2_get_onerrorupdate
,
2481 DocObjHTMLDocument2_toString
,
2482 DocObjHTMLDocument2_createStyleSheet
2485 /**********************************************************
2486 * IHTMLDocument3 implementation
2488 static inline HTMLDocumentObj
*impl_from_IHTMLDocument3(IHTMLDocument3
*iface
)
2490 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IHTMLDocument3_iface
);
2493 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument3
)
2494 HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument3
, releaseCapture
)
2495 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, recalc
, VARIANT_BOOL
)
2496 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3
, createTextNode
, BSTR
,IHTMLDOMNode
**)
2497 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_documentElement
, IHTMLElement
**)
2498 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_uniqueID
, BSTR
*)
2499 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument3
, attachEvent
, BSTR
,IDispatch
*,VARIANT_BOOL
*)
2500 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3
, detachEvent
, BSTR
,IDispatch
*)
2501 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_onrowsdelete
, VARIANT
)
2502 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_onrowsdelete
, VARIANT
*)
2503 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_onrowsinserted
, VARIANT
)
2504 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_onrowsinserted
, VARIANT
*)
2505 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_oncellchange
, VARIANT
)
2506 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_oncellchange
, VARIANT
*)
2507 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_ondatasetchanged
, VARIANT
)
2508 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_ondatasetchanged
, VARIANT
*)
2509 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_ondataavailable
, VARIANT
)
2510 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_ondataavailable
, VARIANT
*)
2511 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_ondatasetcomplete
, VARIANT
)
2512 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_ondatasetcomplete
, VARIANT
*)
2513 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_onpropertychange
, VARIANT
)
2514 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_onpropertychange
, VARIANT
*)
2515 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_dir
, BSTR
)
2516 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_dir
, BSTR
*)
2517 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_oncontextmenu
, VARIANT
)
2518 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_oncontextmenu
, VARIANT
*)
2519 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_onstop
, VARIANT
)
2520 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_onstop
, VARIANT
*)
2521 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, createDocumentFragment
, IHTMLDocument2
**)
2523 static HRESULT WINAPI
DocObjHTMLDocument3_get_parentDocument(IHTMLDocument3
*iface
, IHTMLDocument2
**p
)
2525 HTMLDocumentObj
*This
= impl_from_IHTMLDocument3(iface
);
2526 FIXME("(%p)->(%p)\n", This
, p
);
2530 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_enableDownload
, VARIANT_BOOL
)
2531 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_enableDownload
, VARIANT_BOOL
*)
2532 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_baseUrl
, BSTR
)
2533 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_baseUrl
, BSTR
*)
2534 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_childNodes
, IDispatch
**)
2535 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_inheritStyleSheets
, VARIANT_BOOL
)
2536 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_inheritStyleSheets
, VARIANT_BOOL
*)
2537 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, put_onbeforeeditfocus
, VARIANT
)
2538 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3
, get_onbeforeeditfocus
, VARIANT
*)
2539 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3
, getElementsByName
, BSTR
,IHTMLElementCollection
**)
2540 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3
, getElementById
, BSTR
,IHTMLElement
**)
2541 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3
, getElementsByTagName
, BSTR
,IHTMLElementCollection
**)
2543 static const IHTMLDocument3Vtbl DocObjHTMLDocument3Vtbl
= {
2544 DocObjHTMLDocument3_QueryInterface
,
2545 DocObjHTMLDocument3_AddRef
,
2546 DocObjHTMLDocument3_Release
,
2547 DocObjHTMLDocument3_GetTypeInfoCount
,
2548 DocObjHTMLDocument3_GetTypeInfo
,
2549 DocObjHTMLDocument3_GetIDsOfNames
,
2550 DocObjHTMLDocument3_Invoke
,
2551 DocObjHTMLDocument3_releaseCapture
,
2552 DocObjHTMLDocument3_recalc
,
2553 DocObjHTMLDocument3_createTextNode
,
2554 DocObjHTMLDocument3_get_documentElement
,
2555 DocObjHTMLDocument3_get_uniqueID
,
2556 DocObjHTMLDocument3_attachEvent
,
2557 DocObjHTMLDocument3_detachEvent
,
2558 DocObjHTMLDocument3_put_onrowsdelete
,
2559 DocObjHTMLDocument3_get_onrowsdelete
,
2560 DocObjHTMLDocument3_put_onrowsinserted
,
2561 DocObjHTMLDocument3_get_onrowsinserted
,
2562 DocObjHTMLDocument3_put_oncellchange
,
2563 DocObjHTMLDocument3_get_oncellchange
,
2564 DocObjHTMLDocument3_put_ondatasetchanged
,
2565 DocObjHTMLDocument3_get_ondatasetchanged
,
2566 DocObjHTMLDocument3_put_ondataavailable
,
2567 DocObjHTMLDocument3_get_ondataavailable
,
2568 DocObjHTMLDocument3_put_ondatasetcomplete
,
2569 DocObjHTMLDocument3_get_ondatasetcomplete
,
2570 DocObjHTMLDocument3_put_onpropertychange
,
2571 DocObjHTMLDocument3_get_onpropertychange
,
2572 DocObjHTMLDocument3_put_dir
,
2573 DocObjHTMLDocument3_get_dir
,
2574 DocObjHTMLDocument3_put_oncontextmenu
,
2575 DocObjHTMLDocument3_get_oncontextmenu
,
2576 DocObjHTMLDocument3_put_onstop
,
2577 DocObjHTMLDocument3_get_onstop
,
2578 DocObjHTMLDocument3_createDocumentFragment
,
2579 DocObjHTMLDocument3_get_parentDocument
,
2580 DocObjHTMLDocument3_put_enableDownload
,
2581 DocObjHTMLDocument3_get_enableDownload
,
2582 DocObjHTMLDocument3_put_baseUrl
,
2583 DocObjHTMLDocument3_get_baseUrl
,
2584 DocObjHTMLDocument3_get_childNodes
,
2585 DocObjHTMLDocument3_put_inheritStyleSheets
,
2586 DocObjHTMLDocument3_get_inheritStyleSheets
,
2587 DocObjHTMLDocument3_put_onbeforeeditfocus
,
2588 DocObjHTMLDocument3_get_onbeforeeditfocus
,
2589 DocObjHTMLDocument3_getElementsByName
,
2590 DocObjHTMLDocument3_getElementById
,
2591 DocObjHTMLDocument3_getElementsByTagName
2594 /**********************************************************
2595 * IHTMLDocument4 implementation
2597 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument4
)
2598 HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument4
, focus
)
2599 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, hasFocus
, VARIANT_BOOL
*)
2600 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, put_onselectionchange
, VARIANT
)
2601 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, get_onselectionchange
, VARIANT
*)
2602 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, get_namespaces
, IDispatch
**)
2603 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument4
, createDocumentFromUrl
, BSTR
,BSTR
,IHTMLDocument2
**)
2604 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, put_media
, BSTR
)
2605 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, get_media
, BSTR
*)
2606 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument4
, createEventObject
, VARIANT
*,IHTMLEventObj
**)
2607 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument4
, fireEvent
, BSTR
,VARIANT
*,VARIANT_BOOL
*)
2608 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument4
, createRenderStyle
, BSTR
,IHTMLRenderStyle
**)
2609 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, put_oncontrolselect
, VARIANT
)
2610 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, get_oncontrolselect
, VARIANT
*)
2611 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4
, get_URLUnencoded
, BSTR
*)
2613 static const IHTMLDocument4Vtbl DocObjHTMLDocument4Vtbl
= {
2614 DocObjHTMLDocument4_QueryInterface
,
2615 DocObjHTMLDocument4_AddRef
,
2616 DocObjHTMLDocument4_Release
,
2617 DocObjHTMLDocument4_GetTypeInfoCount
,
2618 DocObjHTMLDocument4_GetTypeInfo
,
2619 DocObjHTMLDocument4_GetIDsOfNames
,
2620 DocObjHTMLDocument4_Invoke
,
2621 DocObjHTMLDocument4_focus
,
2622 DocObjHTMLDocument4_hasFocus
,
2623 DocObjHTMLDocument4_put_onselectionchange
,
2624 DocObjHTMLDocument4_get_onselectionchange
,
2625 DocObjHTMLDocument4_get_namespaces
,
2626 DocObjHTMLDocument4_createDocumentFromUrl
,
2627 DocObjHTMLDocument4_put_media
,
2628 DocObjHTMLDocument4_get_media
,
2629 DocObjHTMLDocument4_createEventObject
,
2630 DocObjHTMLDocument4_fireEvent
,
2631 DocObjHTMLDocument4_createRenderStyle
,
2632 DocObjHTMLDocument4_put_oncontrolselect
,
2633 DocObjHTMLDocument4_get_oncontrolselect
,
2634 DocObjHTMLDocument4_get_URLUnencoded
2637 /**********************************************************
2638 * IHTMLDocument5 implementation
2640 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument5
)
2641 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, put_onmousewheel
, VARIANT
)
2642 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_onmousewheel
, VARIANT
*)
2643 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_doctype
, IHTMLDOMNode
**)
2644 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_implementation
, IHTMLDOMImplementation
**)
2645 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument5
, createAttribute
, BSTR
,IHTMLDOMAttribute
**)
2646 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument5
, createComment
, BSTR
,IHTMLDOMNode
**)
2647 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, put_onfocusin
, VARIANT
)
2648 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_onfocusin
, VARIANT
*)
2649 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, put_onfocusout
, VARIANT
)
2650 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_onfocusout
, VARIANT
*)
2651 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, put_onactivate
, VARIANT
)
2652 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_onactivate
, VARIANT
*)
2653 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, put_ondeactivate
, VARIANT
)
2654 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_ondeactivate
, VARIANT
*)
2655 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, put_onbeforeactivate
, VARIANT
)
2656 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_onbeforeactivate
, VARIANT
*)
2657 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, put_onbeforedeactivate
, VARIANT
)
2658 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_onbeforedeactivate
, VARIANT
*)
2659 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5
, get_compatMode
, BSTR
*)
2661 static const IHTMLDocument5Vtbl DocObjHTMLDocument5Vtbl
= {
2662 DocObjHTMLDocument5_QueryInterface
,
2663 DocObjHTMLDocument5_AddRef
,
2664 DocObjHTMLDocument5_Release
,
2665 DocObjHTMLDocument5_GetTypeInfoCount
,
2666 DocObjHTMLDocument5_GetTypeInfo
,
2667 DocObjHTMLDocument5_GetIDsOfNames
,
2668 DocObjHTMLDocument5_Invoke
,
2669 DocObjHTMLDocument5_put_onmousewheel
,
2670 DocObjHTMLDocument5_get_onmousewheel
,
2671 DocObjHTMLDocument5_get_doctype
,
2672 DocObjHTMLDocument5_get_implementation
,
2673 DocObjHTMLDocument5_createAttribute
,
2674 DocObjHTMLDocument5_createComment
,
2675 DocObjHTMLDocument5_put_onfocusin
,
2676 DocObjHTMLDocument5_get_onfocusin
,
2677 DocObjHTMLDocument5_put_onfocusout
,
2678 DocObjHTMLDocument5_get_onfocusout
,
2679 DocObjHTMLDocument5_put_onactivate
,
2680 DocObjHTMLDocument5_get_onactivate
,
2681 DocObjHTMLDocument5_put_ondeactivate
,
2682 DocObjHTMLDocument5_get_ondeactivate
,
2683 DocObjHTMLDocument5_put_onbeforeactivate
,
2684 DocObjHTMLDocument5_get_onbeforeactivate
,
2685 DocObjHTMLDocument5_put_onbeforedeactivate
,
2686 DocObjHTMLDocument5_get_onbeforedeactivate
,
2687 DocObjHTMLDocument5_get_compatMode
2690 /**********************************************************
2691 * IHTMLDocument6 implementation
2693 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument6
)
2694 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6
, get_compatible
, IHTMLDocumentCompatibleInfoCollection
**)
2695 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6
, get_documentMode
, VARIANT
*)
2696 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6
, put_onstorage
, VARIANT
)
2697 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6
, get_onstorage
, VARIANT
*)
2698 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6
, put_onstoragecommit
, VARIANT
)
2699 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6
, get_onstoragecommit
, VARIANT
*)
2700 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument6
, getElementById
, BSTR
,IHTMLElement2
**)
2701 HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument6
, updateSettings
)
2703 static const IHTMLDocument6Vtbl DocObjHTMLDocument6Vtbl
= {
2704 DocObjHTMLDocument6_QueryInterface
,
2705 DocObjHTMLDocument6_AddRef
,
2706 DocObjHTMLDocument6_Release
,
2707 DocObjHTMLDocument6_GetTypeInfoCount
,
2708 DocObjHTMLDocument6_GetTypeInfo
,
2709 DocObjHTMLDocument6_GetIDsOfNames
,
2710 DocObjHTMLDocument6_Invoke
,
2711 DocObjHTMLDocument6_get_compatible
,
2712 DocObjHTMLDocument6_get_documentMode
,
2713 DocObjHTMLDocument6_put_onstorage
,
2714 DocObjHTMLDocument6_get_onstorage
,
2715 DocObjHTMLDocument6_put_onstoragecommit
,
2716 DocObjHTMLDocument6_get_onstoragecommit
,
2717 DocObjHTMLDocument6_getElementById
,
2718 DocObjHTMLDocument6_updateSettings
2721 /**********************************************************
2722 * IHTMLDocument7 implementation
2724 static inline HTMLDocumentObj
*impl_from_IHTMLDocument7(IHTMLDocument7
*iface
)
2726 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IHTMLDocument7_iface
);
2729 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument7
)
2731 static HRESULT WINAPI
DocObjHTMLDocument7_get_defaultView(IHTMLDocument7
*iface
, IHTMLWindow2
**p
)
2733 HTMLDocumentObj
*This
= impl_from_IHTMLDocument7(iface
);
2735 TRACE("(%p)->(%p)\n", This
, p
);
2738 *p
= &This
->window
->base
.IHTMLWindow2_iface
;
2739 IHTMLWindow2_AddRef(*p
);
2746 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7
, createCDATASection
, BSTR
,IHTMLDOMNode
**)
2747 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, getSelection
, IHTMLSelection
**)
2748 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7
, getElementsByTagNameNS
, VARIANT
*,BSTR
,IHTMLElementCollection
**)
2749 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7
, createElementNS
, VARIANT
*,BSTR
,IHTMLElement
**)
2750 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7
, createAttributeNS
, VARIANT
*,BSTR
,IHTMLDOMAttribute
**)
2751 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onmsthumbnailclick
, VARIANT
)
2752 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onmsthumbnailclick
, VARIANT
*)
2753 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_characterSet
, BSTR
*)
2754 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7
, createElement
, BSTR
,IHTMLElement
**)
2755 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7
, createAttribute
, BSTR
,IHTMLDOMAttribute
**)
2756 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7
, getElementsByClassName
, BSTR
,IHTMLElementCollection
**)
2757 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7
, createProcessingInstruction
, BSTR
,BSTR
,IDOMProcessingInstruction
**)
2758 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7
, adoptNode
, IHTMLDOMNode
*,IHTMLDOMNode3
**)
2759 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onmssitemodejumplistitemremoved
, VARIANT
)
2760 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onmssitemodejumplistitemremoved
, VARIANT
*)
2761 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_all
, IHTMLElementCollection
**)
2762 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_inputEncoding
, BSTR
*)
2763 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_xmlEncoding
, BSTR
*)
2764 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_xmlStandalone
, VARIANT_BOOL
)
2765 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_xmlStandalone
, VARIANT_BOOL
*)
2766 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_xmlVersion
, BSTR
)
2767 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_xmlVersion
, BSTR
*)
2768 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, hasAttributes
, VARIANT_BOOL
*)
2769 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onabort
, VARIANT
)
2770 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onabort
, VARIANT
*)
2771 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onblur
, VARIANT
)
2772 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onblur
, VARIANT
*)
2773 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_oncanplay
, VARIANT
)
2774 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_oncanplay
, VARIANT
*)
2775 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_oncanplaythrough
, VARIANT
)
2776 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_oncanplaythrough
, VARIANT
*)
2777 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onchange
, VARIANT
)
2778 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onchange
, VARIANT
*)
2779 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ondrag
, VARIANT
)
2780 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ondrag
, VARIANT
*)
2781 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ondragend
, VARIANT
)
2782 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ondragend
, VARIANT
*)
2783 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ondragenter
, VARIANT
)
2784 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ondragenter
, VARIANT
*)
2785 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ondragleave
, VARIANT
)
2786 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ondragleave
, VARIANT
*)
2787 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ondragover
, VARIANT
)
2788 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ondragover
, VARIANT
*)
2789 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ondrop
, VARIANT
)
2790 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ondrop
, VARIANT
*)
2791 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ondurationchange
, VARIANT
)
2792 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ondurationchange
, VARIANT
*)
2793 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onemptied
, VARIANT
)
2794 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onemptied
, VARIANT
*)
2795 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onended
, VARIANT
)
2796 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onended
, VARIANT
*)
2797 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onerror
, VARIANT
)
2798 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onerror
, VARIANT
*)
2799 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onfocus
, VARIANT
)
2800 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onfocus
, VARIANT
*)
2801 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_oninput
, VARIANT
)
2802 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_oninput
, VARIANT
*)
2803 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onload
, VARIANT
)
2804 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onload
, VARIANT
*)
2805 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onloadeddata
, VARIANT
)
2806 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onloadeddata
, VARIANT
*)
2807 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onloadedmetadata
, VARIANT
)
2808 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onloadedmetadata
, VARIANT
*)
2809 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onloadstart
, VARIANT
)
2810 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onloadstart
, VARIANT
*)
2811 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onpause
, VARIANT
)
2812 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onpause
, VARIANT
*)
2813 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onplay
, VARIANT
)
2814 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onplay
, VARIANT
*)
2815 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onplaying
, VARIANT
)
2816 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onplaying
, VARIANT
*)
2817 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onprogress
, VARIANT
)
2818 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onprogress
, VARIANT
*)
2819 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onratechange
, VARIANT
)
2820 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onratechange
, VARIANT
*)
2821 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onreset
, VARIANT
)
2822 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onreset
, VARIANT
*)
2823 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onscroll
, VARIANT
)
2824 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onscroll
, VARIANT
*)
2825 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onseeked
, VARIANT
)
2826 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onseeked
, VARIANT
*)
2827 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onseeking
, VARIANT
)
2828 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onseeking
, VARIANT
*)
2829 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onselect
, VARIANT
)
2830 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onselect
, VARIANT
*)
2831 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onstalled
, VARIANT
)
2832 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onstalled
, VARIANT
*)
2833 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onsubmit
, VARIANT
)
2834 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onsubmit
, VARIANT
*)
2835 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onsuspend
, VARIANT
)
2836 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onsuspend
, VARIANT
*)
2837 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_ontimeupdate
, VARIANT
)
2838 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_ontimeupdate
, VARIANT
*)
2839 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onvolumechange
, VARIANT
)
2840 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onvolumechange
, VARIANT
*)
2841 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, put_onwaiting
, VARIANT
)
2842 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_onwaiting
, VARIANT
*)
2843 HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument7
, normalize
)
2844 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7
, importNode
, IHTMLDOMNode
*,VARIANT_BOOL
,IHTMLDOMNode3
**)
2846 static HRESULT WINAPI
DocObjHTMLDocument7_get_parentWindow(IHTMLDocument7
*iface
, IHTMLWindow2
**p
)
2848 HTMLDocumentObj
*This
= impl_from_IHTMLDocument7(iface
);
2850 TRACE("(%p)->(%p)\n", This
, p
);
2852 return IHTMLDocument7_get_defaultView(&This
->IHTMLDocument7_iface
, p
);
2855 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, putref_body
, IHTMLElement
*)
2856 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_body
, IHTMLElement
**)
2857 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7
, get_head
, IHTMLElement
**)
2859 static const IHTMLDocument7Vtbl DocObjHTMLDocument7Vtbl
= {
2860 DocObjHTMLDocument7_QueryInterface
,
2861 DocObjHTMLDocument7_AddRef
,
2862 DocObjHTMLDocument7_Release
,
2863 DocObjHTMLDocument7_GetTypeInfoCount
,
2864 DocObjHTMLDocument7_GetTypeInfo
,
2865 DocObjHTMLDocument7_GetIDsOfNames
,
2866 DocObjHTMLDocument7_Invoke
,
2867 DocObjHTMLDocument7_get_defaultView
,
2868 DocObjHTMLDocument7_createCDATASection
,
2869 DocObjHTMLDocument7_getSelection
,
2870 DocObjHTMLDocument7_getElementsByTagNameNS
,
2871 DocObjHTMLDocument7_createElementNS
,
2872 DocObjHTMLDocument7_createAttributeNS
,
2873 DocObjHTMLDocument7_put_onmsthumbnailclick
,
2874 DocObjHTMLDocument7_get_onmsthumbnailclick
,
2875 DocObjHTMLDocument7_get_characterSet
,
2876 DocObjHTMLDocument7_createElement
,
2877 DocObjHTMLDocument7_createAttribute
,
2878 DocObjHTMLDocument7_getElementsByClassName
,
2879 DocObjHTMLDocument7_createProcessingInstruction
,
2880 DocObjHTMLDocument7_adoptNode
,
2881 DocObjHTMLDocument7_put_onmssitemodejumplistitemremoved
,
2882 DocObjHTMLDocument7_get_onmssitemodejumplistitemremoved
,
2883 DocObjHTMLDocument7_get_all
,
2884 DocObjHTMLDocument7_get_inputEncoding
,
2885 DocObjHTMLDocument7_get_xmlEncoding
,
2886 DocObjHTMLDocument7_put_xmlStandalone
,
2887 DocObjHTMLDocument7_get_xmlStandalone
,
2888 DocObjHTMLDocument7_put_xmlVersion
,
2889 DocObjHTMLDocument7_get_xmlVersion
,
2890 DocObjHTMLDocument7_hasAttributes
,
2891 DocObjHTMLDocument7_put_onabort
,
2892 DocObjHTMLDocument7_get_onabort
,
2893 DocObjHTMLDocument7_put_onblur
,
2894 DocObjHTMLDocument7_get_onblur
,
2895 DocObjHTMLDocument7_put_oncanplay
,
2896 DocObjHTMLDocument7_get_oncanplay
,
2897 DocObjHTMLDocument7_put_oncanplaythrough
,
2898 DocObjHTMLDocument7_get_oncanplaythrough
,
2899 DocObjHTMLDocument7_put_onchange
,
2900 DocObjHTMLDocument7_get_onchange
,
2901 DocObjHTMLDocument7_put_ondrag
,
2902 DocObjHTMLDocument7_get_ondrag
,
2903 DocObjHTMLDocument7_put_ondragend
,
2904 DocObjHTMLDocument7_get_ondragend
,
2905 DocObjHTMLDocument7_put_ondragenter
,
2906 DocObjHTMLDocument7_get_ondragenter
,
2907 DocObjHTMLDocument7_put_ondragleave
,
2908 DocObjHTMLDocument7_get_ondragleave
,
2909 DocObjHTMLDocument7_put_ondragover
,
2910 DocObjHTMLDocument7_get_ondragover
,
2911 DocObjHTMLDocument7_put_ondrop
,
2912 DocObjHTMLDocument7_get_ondrop
,
2913 DocObjHTMLDocument7_put_ondurationchange
,
2914 DocObjHTMLDocument7_get_ondurationchange
,
2915 DocObjHTMLDocument7_put_onemptied
,
2916 DocObjHTMLDocument7_get_onemptied
,
2917 DocObjHTMLDocument7_put_onended
,
2918 DocObjHTMLDocument7_get_onended
,
2919 DocObjHTMLDocument7_put_onerror
,
2920 DocObjHTMLDocument7_get_onerror
,
2921 DocObjHTMLDocument7_put_onfocus
,
2922 DocObjHTMLDocument7_get_onfocus
,
2923 DocObjHTMLDocument7_put_oninput
,
2924 DocObjHTMLDocument7_get_oninput
,
2925 DocObjHTMLDocument7_put_onload
,
2926 DocObjHTMLDocument7_get_onload
,
2927 DocObjHTMLDocument7_put_onloadeddata
,
2928 DocObjHTMLDocument7_get_onloadeddata
,
2929 DocObjHTMLDocument7_put_onloadedmetadata
,
2930 DocObjHTMLDocument7_get_onloadedmetadata
,
2931 DocObjHTMLDocument7_put_onloadstart
,
2932 DocObjHTMLDocument7_get_onloadstart
,
2933 DocObjHTMLDocument7_put_onpause
,
2934 DocObjHTMLDocument7_get_onpause
,
2935 DocObjHTMLDocument7_put_onplay
,
2936 DocObjHTMLDocument7_get_onplay
,
2937 DocObjHTMLDocument7_put_onplaying
,
2938 DocObjHTMLDocument7_get_onplaying
,
2939 DocObjHTMLDocument7_put_onprogress
,
2940 DocObjHTMLDocument7_get_onprogress
,
2941 DocObjHTMLDocument7_put_onratechange
,
2942 DocObjHTMLDocument7_get_onratechange
,
2943 DocObjHTMLDocument7_put_onreset
,
2944 DocObjHTMLDocument7_get_onreset
,
2945 DocObjHTMLDocument7_put_onscroll
,
2946 DocObjHTMLDocument7_get_onscroll
,
2947 DocObjHTMLDocument7_put_onseeked
,
2948 DocObjHTMLDocument7_get_onseeked
,
2949 DocObjHTMLDocument7_put_onseeking
,
2950 DocObjHTMLDocument7_get_onseeking
,
2951 DocObjHTMLDocument7_put_onselect
,
2952 DocObjHTMLDocument7_get_onselect
,
2953 DocObjHTMLDocument7_put_onstalled
,
2954 DocObjHTMLDocument7_get_onstalled
,
2955 DocObjHTMLDocument7_put_onsubmit
,
2956 DocObjHTMLDocument7_get_onsubmit
,
2957 DocObjHTMLDocument7_put_onsuspend
,
2958 DocObjHTMLDocument7_get_onsuspend
,
2959 DocObjHTMLDocument7_put_ontimeupdate
,
2960 DocObjHTMLDocument7_get_ontimeupdate
,
2961 DocObjHTMLDocument7_put_onvolumechange
,
2962 DocObjHTMLDocument7_get_onvolumechange
,
2963 DocObjHTMLDocument7_put_onwaiting
,
2964 DocObjHTMLDocument7_get_onwaiting
,
2965 DocObjHTMLDocument7_normalize
,
2966 DocObjHTMLDocument7_importNode
,
2967 DocObjHTMLDocument7_get_parentWindow
,
2968 DocObjHTMLDocument7_putref_body
,
2969 DocObjHTMLDocument7_get_body
,
2970 DocObjHTMLDocument7_get_head
2973 /**********************************************************
2974 * ISupportErrorInfo implementation
2976 HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(SupportErrorInfo
)
2978 static HRESULT WINAPI
DocObjSupportErrorInfo_InterfaceSupportsErrorInfo(ISupportErrorInfo
*iface
, REFIID riid
)
2980 FIXME("(%p)->(%s)\n", iface
, debugstr_mshtml_guid(riid
));
2984 static const ISupportErrorInfoVtbl DocObjSupportErrorInfoVtbl
= {
2985 DocObjSupportErrorInfo_QueryInterface
,
2986 DocObjSupportErrorInfo_AddRef
,
2987 DocObjSupportErrorInfo_Release
,
2988 DocObjSupportErrorInfo_InterfaceSupportsErrorInfo
2991 /**********************************************************
2992 * IProvideMultipleClassInfo implementation
2994 static inline HTMLDocumentObj
*impl_from_IProvideMultipleClassInfo(IProvideMultipleClassInfo
*iface
)
2996 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IProvideMultipleClassInfo_iface
);
2999 HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(ProvideMultipleClassInfo
)
3001 static HRESULT WINAPI
DocObjProvideMultipleClassInfo_GetClassInfo(IProvideMultipleClassInfo
*iface
, ITypeInfo
**ppTI
)
3003 HTMLDocumentObj
*This
= impl_from_IProvideMultipleClassInfo(iface
);
3004 TRACE("(%p)->(%p)\n", This
, ppTI
);
3005 return get_class_typeinfo(&CLSID_HTMLDocument
, ppTI
);
3008 static HRESULT WINAPI
DocObjProvideMultipleClassInfo_GetGUID(IProvideMultipleClassInfo
*iface
, DWORD dwGuidKind
, GUID
*pGUID
)
3010 HTMLDocumentObj
*This
= impl_from_IProvideMultipleClassInfo(iface
);
3011 FIXME("(%p)->(%lu %p)\n", This
, dwGuidKind
, pGUID
);
3015 static HRESULT WINAPI
DocObjProvideMultipleClassInfo_GetMultiTypeInfoCount(IProvideMultipleClassInfo
*iface
, ULONG
*pcti
)
3017 HTMLDocumentObj
*This
= impl_from_IProvideMultipleClassInfo(iface
);
3018 FIXME("(%p)->(%p)\n", This
, pcti
);
3023 static HRESULT WINAPI
DocObjProvideMultipleClassInfo_GetInfoOfIndex(IProvideMultipleClassInfo
*iface
, ULONG iti
,
3024 DWORD dwFlags
, ITypeInfo
**pptiCoClass
, DWORD
*pdwTIFlags
, ULONG
*pcdispidReserved
, IID
*piidPrimary
, IID
*piidSource
)
3026 HTMLDocumentObj
*This
= impl_from_IProvideMultipleClassInfo(iface
);
3027 FIXME("(%p)->(%lu %lx %p %p %p %p %p)\n", This
, iti
, dwFlags
, pptiCoClass
, pdwTIFlags
, pcdispidReserved
, piidPrimary
, piidSource
);
3031 static const IProvideMultipleClassInfoVtbl DocObjProvideMultipleClassInfoVtbl
= {
3032 DocObjProvideMultipleClassInfo_QueryInterface
,
3033 DocObjProvideMultipleClassInfo_AddRef
,
3034 DocObjProvideMultipleClassInfo_Release
,
3035 DocObjProvideMultipleClassInfo_GetClassInfo
,
3036 DocObjProvideMultipleClassInfo_GetGUID
,
3037 DocObjProvideMultipleClassInfo_GetMultiTypeInfoCount
,
3038 DocObjProvideMultipleClassInfo_GetInfoOfIndex
3041 /**********************************************************
3042 * IMarkupServices implementation
3044 static inline HTMLDocumentObj
*impl_from_IMarkupServices(IMarkupServices
*iface
)
3046 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IMarkupServices_iface
);
3049 HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(MarkupServices
)
3051 static HRESULT WINAPI
DocObjMarkupServices_CreateMarkupPointer(IMarkupServices
*iface
, IMarkupPointer
**ppPointer
)
3053 HTMLDocumentObj
*This
= impl_from_IMarkupServices(iface
);
3055 TRACE("(%p)->(%p)\n", This
, ppPointer
);
3057 return create_markup_pointer(ppPointer
);
3060 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(MarkupServices
, CreateMarkupContainer
, IMarkupContainer
**)
3061 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(MarkupServices
, CreateElement
, ELEMENT_TAG_ID
,OLECHAR
*,IHTMLElement
**)
3062 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(MarkupServices
, CloneElement
, IHTMLElement
*,IHTMLElement
**)
3063 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(MarkupServices
, InsertElement
, IHTMLElement
*,IMarkupPointer
*,IMarkupPointer
*)
3064 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(MarkupServices
, RemoveElement
, IHTMLElement
*)
3065 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(MarkupServices
, Remove
, IMarkupPointer
*,IMarkupPointer
*)
3066 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(MarkupServices
, Copy
, IMarkupPointer
*,IMarkupPointer
*,IMarkupPointer
*)
3067 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(MarkupServices
, Move
, IMarkupPointer
*,IMarkupPointer
*,IMarkupPointer
*)
3068 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(MarkupServices
, InsertText
, OLECHAR
*,LONG
,IMarkupPointer
*)
3069 HTMLDOCUMENTOBJ_FWD_TO_NODE_5(MarkupServices
, ParseString
, OLECHAR
*,DWORD
,IMarkupContainer
**,IMarkupPointer
*,IMarkupPointer
*)
3070 HTMLDOCUMENTOBJ_FWD_TO_NODE_5(MarkupServices
, ParseGlobal
, HGLOBAL
,DWORD
,IMarkupContainer
**,IMarkupPointer
*,IMarkupPointer
*)
3071 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(MarkupServices
, IsScopedElement
, IHTMLElement
*,BOOL
*)
3072 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(MarkupServices
, GetElementTagId
, IHTMLElement
*,ELEMENT_TAG_ID
*)
3073 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(MarkupServices
, GetTagIDForName
, BSTR
,ELEMENT_TAG_ID
*)
3074 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(MarkupServices
, GetNameForTagID
, ELEMENT_TAG_ID
,BSTR
*)
3075 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(MarkupServices
, MovePointersToRange
, IHTMLTxtRange
*,IMarkupPointer
*,IMarkupPointer
*)
3076 HTMLDOCUMENTOBJ_FWD_TO_NODE_3(MarkupServices
, MoveRangeToPointers
, IMarkupPointer
*,IMarkupPointer
*,IHTMLTxtRange
*)
3077 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(MarkupServices
, BeginUndoUnit
, OLECHAR
*)
3078 HTMLDOCUMENTOBJ_FWD_TO_NODE_0(MarkupServices
, EndUndoUnit
)
3080 static const IMarkupServicesVtbl DocObjMarkupServicesVtbl
= {
3081 DocObjMarkupServices_QueryInterface
,
3082 DocObjMarkupServices_AddRef
,
3083 DocObjMarkupServices_Release
,
3084 DocObjMarkupServices_CreateMarkupPointer
,
3085 DocObjMarkupServices_CreateMarkupContainer
,
3086 DocObjMarkupServices_CreateElement
,
3087 DocObjMarkupServices_CloneElement
,
3088 DocObjMarkupServices_InsertElement
,
3089 DocObjMarkupServices_RemoveElement
,
3090 DocObjMarkupServices_Remove
,
3091 DocObjMarkupServices_Copy
,
3092 DocObjMarkupServices_Move
,
3093 DocObjMarkupServices_InsertText
,
3094 DocObjMarkupServices_ParseString
,
3095 DocObjMarkupServices_ParseGlobal
,
3096 DocObjMarkupServices_IsScopedElement
,
3097 DocObjMarkupServices_GetElementTagId
,
3098 DocObjMarkupServices_GetTagIDForName
,
3099 DocObjMarkupServices_GetNameForTagID
,
3100 DocObjMarkupServices_MovePointersToRange
,
3101 DocObjMarkupServices_MoveRangeToPointers
,
3102 DocObjMarkupServices_BeginUndoUnit
,
3103 DocObjMarkupServices_EndUndoUnit
3106 /**********************************************************
3107 * IMarkupContainer implementation
3109 static inline HTMLDocumentObj
*impl_from_IMarkupContainer(IMarkupContainer
*iface
)
3111 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IMarkupContainer_iface
);
3114 HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(MarkupContainer
)
3116 static HRESULT WINAPI
DocObjMarkupContainer_OwningDoc(IMarkupContainer
*iface
, IHTMLDocument2
**ppDoc
)
3118 HTMLDocumentObj
*This
= impl_from_IMarkupContainer(iface
);
3119 FIXME("(%p)->(%p)\n", This
, ppDoc
);
3123 static const IMarkupContainerVtbl DocObjMarkupContainerVtbl
= {
3124 DocObjMarkupContainer_QueryInterface
,
3125 DocObjMarkupContainer_AddRef
,
3126 DocObjMarkupContainer_Release
,
3127 DocObjMarkupContainer_OwningDoc
3130 /**********************************************************
3131 * IDisplayServices implementation
3133 HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(DisplayServices
)
3134 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(DisplayServices
, CreateDisplayPointer
, IDisplayPointer
**)
3135 HTMLDOCUMENTOBJ_FWD_TO_NODE_4(DisplayServices
, TransformRect
, RECT
*,COORD_SYSTEM
,COORD_SYSTEM
,IHTMLElement
*)
3136 HTMLDOCUMENTOBJ_FWD_TO_NODE_4(DisplayServices
, TransformPoint
, POINT
*,COORD_SYSTEM
,COORD_SYSTEM
,IHTMLElement
*)
3137 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(DisplayServices
, GetCaret
, IHTMLCaret
**)
3138 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DisplayServices
, GetComputedStyle
, IMarkupPointer
*,IHTMLComputedStyle
**)
3139 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DisplayServices
, ScrollRectIntoView
, IHTMLElement
*,RECT
)
3140 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DisplayServices
, HasFlowLayout
, IHTMLElement
*,BOOL
*)
3142 static const IDisplayServicesVtbl DocObjDisplayServicesVtbl
= {
3143 DocObjDisplayServices_QueryInterface
,
3144 DocObjDisplayServices_AddRef
,
3145 DocObjDisplayServices_Release
,
3146 DocObjDisplayServices_CreateDisplayPointer
,
3147 DocObjDisplayServices_TransformRect
,
3148 DocObjDisplayServices_TransformPoint
,
3149 DocObjDisplayServices_GetCaret
,
3150 DocObjDisplayServices_GetComputedStyle
,
3151 DocObjDisplayServices_ScrollRectIntoView
,
3152 DocObjDisplayServices_HasFlowLayout
3155 /**********************************************************
3156 * IDocumentSelector implementation
3158 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(DocumentSelector
)
3159 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DocumentSelector
, querySelector
, BSTR
,IHTMLElement
**)
3160 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DocumentSelector
, querySelectorAll
, BSTR
,IHTMLDOMChildrenCollection
**)
3162 static const IDocumentSelectorVtbl DocObjDocumentSelectorVtbl
= {
3163 DocObjDocumentSelector_QueryInterface
,
3164 DocObjDocumentSelector_AddRef
,
3165 DocObjDocumentSelector_Release
,
3166 DocObjDocumentSelector_GetTypeInfoCount
,
3167 DocObjDocumentSelector_GetTypeInfo
,
3168 DocObjDocumentSelector_GetIDsOfNames
,
3169 DocObjDocumentSelector_Invoke
,
3170 DocObjDocumentSelector_querySelector
,
3171 DocObjDocumentSelector_querySelectorAll
3174 /**********************************************************
3175 * IDocumentEvent implementation
3177 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(DocumentEvent
)
3178 HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DocumentEvent
, createEvent
, BSTR
,IDOMEvent
**)
3180 static const IDocumentEventVtbl DocObjDocumentEventVtbl
= {
3181 DocObjDocumentEvent_QueryInterface
,
3182 DocObjDocumentEvent_AddRef
,
3183 DocObjDocumentEvent_Release
,
3184 DocObjDocumentEvent_GetTypeInfoCount
,
3185 DocObjDocumentEvent_GetTypeInfo
,
3186 DocObjDocumentEvent_GetIDsOfNames
,
3187 DocObjDocumentEvent_Invoke
,
3188 DocObjDocumentEvent_createEvent
3191 /**********************************************************
3192 * IDocumentRange implementation
3194 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(DocumentRange
)
3195 HTMLDOCUMENTOBJ_FWD_TO_NODE_1(DocumentRange
, createRange
, IHTMLDOMRange
**)
3197 static const IDocumentRangeVtbl DocObjDocumentRangeVtbl
= {
3198 DocObjDocumentRange_QueryInterface
,
3199 DocObjDocumentRange_AddRef
,
3200 DocObjDocumentRange_Release
,
3201 DocObjDocumentRange_GetTypeInfoCount
,
3202 DocObjDocumentRange_GetTypeInfo
,
3203 DocObjDocumentRange_GetIDsOfNames
,
3204 DocObjDocumentRange_Invoke
,
3205 DocObjDocumentRange_createRange
3208 /**********************************************************
3209 * IEventTarget implementation
3211 static inline HTMLDocumentObj
*impl_from_IEventTarget(IEventTarget
*iface
)
3213 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IEventTarget_iface
);
3216 HTMLDOCUMENTOBJ_IDISPATCH_METHODS(EventTarget
)
3218 static HRESULT WINAPI
DocObjEventTarget_addEventListener(IEventTarget
*iface
, BSTR type
, IDispatch
*listener
,
3219 VARIANT_BOOL capture
)
3221 HTMLDocumentObj
*This
= impl_from_IEventTarget(iface
);
3223 return IEventTarget_addEventListener(&This
->doc_node
->node
.event_target
.IEventTarget_iface
, type
, listener
, capture
);
3226 static HRESULT WINAPI
DocObjEventTarget_removeEventListener(IEventTarget
*iface
, BSTR type
, IDispatch
*listener
,
3227 VARIANT_BOOL capture
)
3229 HTMLDocumentObj
*This
= impl_from_IEventTarget(iface
);
3231 return IEventTarget_removeEventListener(&This
->doc_node
->node
.event_target
.IEventTarget_iface
, type
, listener
, capture
);
3234 static HRESULT WINAPI
DocObjEventTarget_dispatchEvent(IEventTarget
*iface
, IDOMEvent
*event_iface
, VARIANT_BOOL
*result
)
3236 HTMLDocumentObj
*This
= impl_from_IEventTarget(iface
);
3238 return IEventTarget_dispatchEvent(&This
->doc_node
->node
.event_target
.IEventTarget_iface
, event_iface
, result
);
3241 static const IEventTargetVtbl DocObjEventTargetVtbl
= {
3242 DocObjEventTarget_QueryInterface
,
3243 DocObjEventTarget_AddRef
,
3244 DocObjEventTarget_Release
,
3245 DocObjEventTarget_GetTypeInfoCount
,
3246 DocObjEventTarget_GetTypeInfo
,
3247 DocObjEventTarget_GetIDsOfNames
,
3248 DocObjEventTarget_Invoke
,
3249 DocObjEventTarget_addEventListener
,
3250 DocObjEventTarget_removeEventListener
,
3251 DocObjEventTarget_dispatchEvent
3254 static inline HTMLDocumentObj
*impl_from_IUnknown(IUnknown
*iface
)
3256 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IUnknown_inner
);
3259 static HRESULT WINAPI
HTMLDocumentObj_QueryInterface(IUnknown
*iface
, REFIID riid
, void **ppv
)
3261 HTMLDocumentObj
*This
= impl_from_IUnknown(iface
);
3263 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
3265 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
3266 *ppv
= &This
->IUnknown_inner
;
3267 }else if(IsEqualGUID(&IID_IDispatch
, riid
) || IsEqualGUID(&IID_IDispatchEx
, riid
)) {
3268 *ppv
= &This
->IDispatchEx_iface
;
3269 }else if(IsEqualGUID(&IID_IHTMLDocument
, riid
) || IsEqualGUID(&IID_IHTMLDocument2
, riid
)) {
3270 *ppv
= &This
->IHTMLDocument2_iface
;
3271 }else if(IsEqualGUID(&IID_IHTMLDocument3
, riid
)) {
3272 *ppv
= &This
->IHTMLDocument3_iface
;
3273 }else if(IsEqualGUID(&IID_IHTMLDocument4
, riid
)) {
3274 *ppv
= &This
->IHTMLDocument4_iface
;
3275 }else if(IsEqualGUID(&IID_IHTMLDocument5
, riid
)) {
3276 *ppv
= &This
->IHTMLDocument5_iface
;
3277 }else if(IsEqualGUID(&IID_IHTMLDocument6
, riid
)) {
3278 *ppv
= &This
->IHTMLDocument6_iface
;
3279 }else if(IsEqualGUID(&IID_IHTMLDocument7
, riid
)) {
3280 *ppv
= &This
->IHTMLDocument7_iface
;
3281 }else if(IsEqualGUID(&IID_ICustomDoc
, riid
)) {
3282 *ppv
= &This
->ICustomDoc_iface
;
3283 }else if(IsEqualGUID(&IID_IDocumentSelector
, riid
)) {
3284 *ppv
= &This
->IDocumentSelector_iface
;
3285 }else if(IsEqualGUID(&IID_IDocumentEvent
, riid
)) {
3286 *ppv
= &This
->IDocumentEvent_iface
;
3287 }else if(IsEqualGUID(&DIID_DispHTMLDocument
, riid
)) {
3288 *ppv
= &This
->IHTMLDocument2_iface
;
3289 }else if(IsEqualGUID(&IID_ISupportErrorInfo
, riid
)) {
3290 *ppv
= &This
->ISupportErrorInfo_iface
;
3291 }else if(IsEqualGUID(&IID_IProvideClassInfo
, riid
)) {
3292 *ppv
= &This
->IProvideMultipleClassInfo_iface
;
3293 }else if(IsEqualGUID(&IID_IProvideClassInfo2
, riid
)) {
3294 *ppv
= &This
->IProvideMultipleClassInfo_iface
;
3295 }else if(IsEqualGUID(&IID_IProvideMultipleClassInfo
, riid
)) {
3296 *ppv
= &This
->IProvideMultipleClassInfo_iface
;
3297 }else if(IsEqualGUID(&IID_IMarkupServices
, riid
)) {
3298 *ppv
= &This
->IMarkupServices_iface
;
3299 }else if(IsEqualGUID(&IID_IMarkupContainer
, riid
)) {
3300 *ppv
= &This
->IMarkupContainer_iface
;
3301 }else if(IsEqualGUID(&IID_IDisplayServices
, riid
)) {
3302 *ppv
= &This
->IDisplayServices_iface
;
3303 }else if(IsEqualGUID(&IID_IDocumentRange
, riid
)) {
3304 *ppv
= &This
->IDocumentRange_iface
;
3305 }else if(IsEqualGUID(&IID_IOleDocumentView
, riid
)) {
3306 *ppv
= &This
->IOleDocumentView_iface
;
3307 }else if(IsEqualGUID(&IID_IViewObject
, riid
)) {
3308 *ppv
= &This
->IViewObjectEx_iface
;
3309 }else if(IsEqualGUID(&IID_IViewObject2
, riid
)) {
3310 *ppv
= &This
->IViewObjectEx_iface
;
3311 }else if(IsEqualGUID(&IID_IViewObjectEx
, riid
)) {
3312 *ppv
= &This
->IViewObjectEx_iface
;
3313 }else if(IsEqualGUID(&IID_IPersist
, riid
)) {
3314 *ppv
= &This
->IPersistFile_iface
;
3315 }else if(IsEqualGUID(&IID_IPersistMoniker
, riid
)) {
3316 *ppv
= &This
->IPersistMoniker_iface
;
3317 }else if(IsEqualGUID(&IID_IPersistFile
, riid
)) {
3318 *ppv
= &This
->IPersistFile_iface
;
3319 }else if(IsEqualGUID(&IID_IMonikerProp
, riid
)) {
3320 *ppv
= &This
->IMonikerProp_iface
;
3321 }else if(IsEqualGUID(&IID_IPersistStreamInit
, riid
)) {
3322 *ppv
= &This
->IPersistStreamInit_iface
;
3323 }else if(IsEqualGUID(&IID_IPersistHistory
, riid
)) {
3324 *ppv
= &This
->IPersistHistory_iface
;
3325 }else if(IsEqualGUID(&IID_IHlinkTarget
, riid
)) {
3326 *ppv
= &This
->IHlinkTarget_iface
;
3327 }else if(IsEqualGUID(&IID_IOleCommandTarget
, riid
)) {
3328 *ppv
= &This
->IOleCommandTarget_iface
;
3329 }else if(IsEqualGUID(&IID_IOleObject
, riid
)) {
3330 *ppv
= &This
->IOleObject_iface
;
3331 }else if(IsEqualGUID(&IID_IOleDocument
, riid
)) {
3332 *ppv
= &This
->IOleDocument_iface
;
3333 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject
, riid
)) {
3334 *ppv
= &This
->IOleInPlaceActiveObject_iface
;
3335 }else if(IsEqualGUID(&IID_IOleWindow
, riid
)) {
3336 *ppv
= &This
->IOleInPlaceActiveObject_iface
;
3337 }else if(IsEqualGUID(&IID_IOleInPlaceObject
, riid
)) {
3338 *ppv
= &This
->IOleInPlaceObjectWindowless_iface
;
3339 }else if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless
, riid
)) {
3340 *ppv
= &This
->IOleInPlaceObjectWindowless_iface
;
3341 }else if(IsEqualGUID(&IID_IOleControl
, riid
)) {
3342 *ppv
= &This
->IOleControl_iface
;
3343 }else if(IsEqualGUID(&IID_IObjectWithSite
, riid
)) {
3344 *ppv
= &This
->IObjectWithSite_iface
;
3345 }else if(IsEqualGUID(&IID_IOleContainer
, riid
)) {
3346 *ppv
= &This
->IOleContainer_iface
;
3347 }else if(IsEqualGUID(&IID_IObjectSafety
, riid
)) {
3348 *ppv
= &This
->IObjectSafety_iface
;
3349 }else if(IsEqualGUID(&IID_IServiceProvider
, riid
)) {
3350 *ppv
= &This
->IServiceProvider_iface
;
3351 }else if(IsEqualGUID(&IID_ITargetContainer
, riid
)) {
3352 *ppv
= &This
->ITargetContainer_iface
;
3353 }else if(IsEqualGUID(&IID_IConnectionPointContainer
, riid
)) {
3354 *ppv
= &This
->cp_container
.IConnectionPointContainer_iface
;
3355 }else if(IsEqualGUID(&IID_IEventTarget
, riid
)) {
3356 /* IEventTarget is conditionally exposed. This breaks COM rules when
3357 it changes its compat mode, but it is how native works (see tests). */
3358 if(!This
->doc_node
|| This
->doc_node
->document_mode
< COMPAT_MODE_IE9
) {
3360 return E_NOINTERFACE
;
3362 *ppv
= &This
->IEventTarget_iface
;
3363 }else if(IsEqualGUID(&CLSID_CMarkup
, riid
)) {
3364 FIXME("(%p)->(CLSID_CMarkup %p)\n", This
, ppv
);
3366 return E_NOINTERFACE
;
3367 }else if(IsEqualGUID(&IID_IRunnableObject
, riid
)) {
3368 TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This
, ppv
);
3370 return E_NOINTERFACE
;
3371 }else if(IsEqualGUID(&IID_IPersistPropertyBag
, riid
)) {
3372 TRACE("(%p)->(IID_IPersistPropertyBag %p) returning NULL\n", This
, ppv
);
3374 return E_NOINTERFACE
;
3375 }else if(IsEqualGUID(&IID_IExternalConnection
, riid
)) {
3376 TRACE("(%p)->(IID_IExternalConnection %p) returning NULL\n", This
, ppv
);
3378 return E_NOINTERFACE
;
3379 }else if(IsEqualGUID(&IID_IStdMarshalInfo
, riid
)) {
3380 TRACE("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This
, ppv
);
3382 return E_NOINTERFACE
;
3383 }else if(IsEqualGUID(&IID_IDispatchJS
, riid
) ||
3384 IsEqualGUID(&IID_UndocumentedScriptIface
, riid
) ||
3385 IsEqualGUID(&IID_IMarshal
, riid
) ||
3386 IsEqualGUID(&IID_IManagedObject
, riid
)) {
3388 return E_NOINTERFACE
;
3390 FIXME("Unimplemented interface %s\n", debugstr_mshtml_guid(riid
));
3392 return E_NOINTERFACE
;
3395 IUnknown_AddRef((IUnknown
*)*ppv
);
3399 static ULONG WINAPI
HTMLDocumentObj_AddRef(IUnknown
*iface
)
3401 HTMLDocumentObj
*This
= impl_from_IUnknown(iface
);
3402 ULONG ref
= InterlockedIncrement(&This
->ref
);
3404 TRACE("(%p) ref = %lu\n", This
, ref
);
3409 static void set_window_uninitialized(HTMLOuterWindow
*window
)
3411 nsChannelBSC
*channelbsc
;
3417 window
->readystate
= READYSTATE_UNINITIALIZED
;
3418 set_current_uri(window
, NULL
);
3420 IMoniker_Release(window
->mon
);
3424 if(!window
->base
.inner_window
)
3427 hres
= create_uri(L
"about:blank", 0, &uri
);
3431 hres
= create_doc_uri(uri
, &nsuri
);
3436 hres
= CreateURLMoniker(NULL
, L
"about:blank", &mon
);
3437 if(SUCCEEDED(hres
)) {
3438 hres
= create_channelbsc(mon
, NULL
, NULL
, 0, TRUE
, &channelbsc
);
3439 IMoniker_Release(mon
);
3441 if(SUCCEEDED(hres
)) {
3442 channelbsc
->bsc
.bindf
= 0; /* synchronous binding */
3444 if(window
->base
.inner_window
->doc
)
3445 remove_target_tasks(window
->base
.inner_window
->task_magic
);
3446 abort_window_bindings(window
->base
.inner_window
);
3447 window
->base
.inner_window
->doc
->unload_sent
= TRUE
;
3449 hres
= load_nsuri(window
, nsuri
, NULL
, channelbsc
, LOAD_FLAGS_BYPASS_CACHE
);
3451 hres
= create_pending_window(window
, channelbsc
);
3452 IBindStatusCallback_Release(&channelbsc
->bsc
.IBindStatusCallback_iface
);
3455 nsISupports_Release((nsISupports
*)nsuri
);
3459 window
->load_flags
|= BINDING_REPLACE
;
3460 start_binding(window
->pending_window
, &window
->pending_window
->bscallback
->bsc
, NULL
);
3463 static ULONG WINAPI
HTMLDocumentObj_Release(IUnknown
*iface
)
3465 HTMLDocumentObj
*This
= impl_from_IUnknown(iface
);
3466 ULONG ref
= InterlockedDecrement(&This
->ref
);
3468 TRACE("(%p) ref = %lu\n", This
, ref
);
3471 if(This
->doc_node
) {
3472 HTMLDocumentNode
*doc_node
= This
->doc_node
;
3474 if(This
->nscontainer
)
3475 This
->nscontainer
->doc
= NULL
;
3476 This
->doc_node
= NULL
;
3477 doc_node
->doc_obj
= NULL
;
3479 set_window_uninitialized(This
->window
);
3480 IHTMLDOMNode_Release(&doc_node
->node
.IHTMLDOMNode_iface
);
3483 IHTMLWindow2_Release(&This
->window
->base
.IHTMLWindow2_iface
);
3484 if(This
->advise_holder
)
3485 IOleAdviseHolder_Release(This
->advise_holder
);
3488 IAdviseSink_Release(This
->view_sink
);
3490 IOleObject_SetClientSite(&This
->IOleObject_iface
, NULL
);
3492 ICustomDoc_SetUIHandler(&This
->ICustomDoc_iface
, NULL
);
3493 if(This
->in_place_active
)
3494 IOleInPlaceObjectWindowless_InPlaceDeactivate(&This
->IOleInPlaceObjectWindowless_iface
);
3496 IOleDocumentView_SetInPlaceSite(&This
->IOleDocumentView_iface
, NULL
);
3498 IOleUndoManager_Release(This
->undomgr
);
3500 IHTMLEditServices_Release(This
->editsvcs
);
3501 if(This
->tooltips_hwnd
)
3502 DestroyWindow(This
->tooltips_hwnd
);
3505 DestroyWindow(This
->hwnd
);
3508 remove_target_tasks(This
->task_magic
);
3509 ConnectionPointContainer_Destroy(&This
->cp_container
);
3511 if(This
->nscontainer
)
3512 detach_gecko_browser(This
->nscontainer
);
3519 static const IUnknownVtbl HTMLDocumentObjVtbl
= {
3520 HTMLDocumentObj_QueryInterface
,
3521 HTMLDocumentObj_AddRef
,
3522 HTMLDocumentObj_Release
3525 /**********************************************************
3526 * IDispatchEx implementation
3528 * Forwarding this breaks Dispatch rules by potentially retrieving
3529 * a different DISPID for the same name, if the node was changed
3530 * while using the same doc obj, but it is how native works.
3532 static inline HTMLDocumentObj
*impl_from_IDispatchEx(IDispatchEx
*iface
)
3534 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, IDispatchEx_iface
);
3537 HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(DispatchEx
)
3538 DISPEX_IDISPATCH_NOUNK_IMPL(DocObjDispatchEx
, IDispatchEx
,
3539 impl_from_IDispatchEx(iface
)->doc_node
->node
.event_target
.dispex
)
3541 static HRESULT WINAPI
DocObjDispatchEx_GetDispID(IDispatchEx
*iface
, BSTR name
, DWORD grfdex
, DISPID
*pid
)
3543 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3545 return IDispatchEx_GetDispID(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, name
, grfdex
, pid
);
3548 static HRESULT WINAPI
DocObjDispatchEx_InvokeEx(IDispatchEx
*iface
, DISPID id
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pdp
,
3549 VARIANT
*pvarRes
, EXCEPINFO
*pei
, IServiceProvider
*pspCaller
)
3551 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3553 return IDispatchEx_InvokeEx(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, id
, lcid
,
3554 wFlags
, pdp
, pvarRes
, pei
, pspCaller
);
3557 static HRESULT WINAPI
DocObjDispatchEx_DeleteMemberByName(IDispatchEx
*iface
, BSTR bstrName
, DWORD grfdex
)
3559 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3561 return IDispatchEx_DeleteMemberByName(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, bstrName
, grfdex
);
3564 static HRESULT WINAPI
DocObjDispatchEx_DeleteMemberByDispID(IDispatchEx
*iface
, DISPID id
)
3566 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3568 return IDispatchEx_DeleteMemberByDispID(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, id
);
3571 static HRESULT WINAPI
DocObjDispatchEx_GetMemberProperties(IDispatchEx
*iface
, DISPID id
, DWORD grfdexFetch
, DWORD
*pgrfdex
)
3573 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3575 return IDispatchEx_GetMemberProperties(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, id
, grfdexFetch
,
3579 static HRESULT WINAPI
DocObjDispatchEx_GetMemberName(IDispatchEx
*iface
, DISPID id
, BSTR
*name
)
3581 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3583 return IDispatchEx_GetMemberName(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, id
, name
);
3586 static HRESULT WINAPI
DocObjDispatchEx_GetNextDispID(IDispatchEx
*iface
, DWORD grfdex
, DISPID id
, DISPID
*pid
)
3588 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3590 return IDispatchEx_GetNextDispID(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, grfdex
, id
, pid
);
3593 static HRESULT WINAPI
DocObjDispatchEx_GetNameSpaceParent(IDispatchEx
*iface
, IUnknown
**ppunk
)
3595 HTMLDocumentObj
*This
= impl_from_IDispatchEx(iface
);
3597 return IDispatchEx_GetNameSpaceParent(&This
->doc_node
->node
.event_target
.dispex
.IDispatchEx_iface
, ppunk
);
3600 static const IDispatchExVtbl DocObjDispatchExVtbl
= {
3601 DocObjDispatchEx_QueryInterface
,
3602 DocObjDispatchEx_AddRef
,
3603 DocObjDispatchEx_Release
,
3604 DocObjDispatchEx_GetTypeInfoCount
,
3605 DocObjDispatchEx_GetTypeInfo
,
3606 DocObjDispatchEx_GetIDsOfNames
,
3607 DocObjDispatchEx_Invoke
,
3608 DocObjDispatchEx_GetDispID
,
3609 DocObjDispatchEx_InvokeEx
,
3610 DocObjDispatchEx_DeleteMemberByName
,
3611 DocObjDispatchEx_DeleteMemberByDispID
,
3612 DocObjDispatchEx_GetMemberProperties
,
3613 DocObjDispatchEx_GetMemberName
,
3614 DocObjDispatchEx_GetNextDispID
,
3615 DocObjDispatchEx_GetNameSpaceParent
3618 /**********************************************************
3619 * ICustomDoc implementation
3622 static inline HTMLDocumentObj
*impl_from_ICustomDoc(ICustomDoc
*iface
)
3624 return CONTAINING_RECORD(iface
, HTMLDocumentObj
, ICustomDoc_iface
);
3627 static HRESULT WINAPI
CustomDoc_QueryInterface(ICustomDoc
*iface
, REFIID riid
, void **ppv
)
3629 HTMLDocumentObj
*This
= impl_from_ICustomDoc(iface
);
3631 return IUnknown_QueryInterface(This
->outer_unk
, riid
, ppv
);
3634 static ULONG WINAPI
CustomDoc_AddRef(ICustomDoc
*iface
)
3636 HTMLDocumentObj
*This
= impl_from_ICustomDoc(iface
);
3638 return IUnknown_AddRef(This
->outer_unk
);
3641 static ULONG WINAPI
CustomDoc_Release(ICustomDoc
*iface
)
3643 HTMLDocumentObj
*This
= impl_from_ICustomDoc(iface
);
3645 return IUnknown_Release(This
->outer_unk
);
3648 static HRESULT WINAPI
CustomDoc_SetUIHandler(ICustomDoc
*iface
, IDocHostUIHandler
*pUIHandler
)
3650 HTMLDocumentObj
*This
= impl_from_ICustomDoc(iface
);
3651 IOleCommandTarget
*cmdtrg
;
3654 TRACE("(%p)->(%p)\n", This
, pUIHandler
);
3656 if(This
->custom_hostui
&& This
->hostui
== pUIHandler
)
3659 This
->custom_hostui
= TRUE
;
3662 IDocHostUIHandler_Release(This
->hostui
);
3664 IDocHostUIHandler_AddRef(pUIHandler
);
3665 This
->hostui
= pUIHandler
;
3669 hres
= IDocHostUIHandler_QueryInterface(pUIHandler
, &IID_IOleCommandTarget
, (void**)&cmdtrg
);
3670 if(SUCCEEDED(hres
)) {
3671 FIXME("custom UI handler supports IOleCommandTarget\n");
3672 IOleCommandTarget_Release(cmdtrg
);
3678 static const ICustomDocVtbl CustomDocVtbl
= {
3679 CustomDoc_QueryInterface
,
3682 CustomDoc_SetUIHandler
3685 static void HTMLDocumentObj_on_advise(IUnknown
*iface
, cp_static_data_t
*cp
)
3687 HTMLDocumentObj
*This
= impl_from_IUnknown(iface
);
3690 update_doc_cp_events(This
->doc_node
, cp
);
3693 static cp_static_data_t HTMLDocumentObjEvents_data
= { HTMLDocumentEvents_tid
, HTMLDocumentObj_on_advise
};
3694 static cp_static_data_t HTMLDocumentObjEvents2_data
= { HTMLDocumentEvents2_tid
, HTMLDocumentObj_on_advise
, TRUE
};
3696 static const cpc_entry_t HTMLDocumentObj_cpc
[] = {
3697 {&IID_IDispatch
, &HTMLDocumentObjEvents_data
},
3698 {&IID_IPropertyNotifySink
},
3699 {&DIID_HTMLDocumentEvents
, &HTMLDocumentObjEvents_data
},
3700 {&DIID_HTMLDocumentEvents2
, &HTMLDocumentObjEvents2_data
},
3704 static HRESULT
create_document_object(BOOL is_mhtml
, IUnknown
*outer
, REFIID riid
, void **ppv
)
3706 HTMLDocumentObj
*doc
;
3709 if(outer
&& !IsEqualGUID(&IID_IUnknown
, riid
)) {
3711 return E_INVALIDARG
;
3714 /* ensure that security manager is initialized */
3715 if(!get_security_manager())
3716 return E_OUTOFMEMORY
;
3718 doc
= calloc(1, sizeof(HTMLDocumentObj
));
3720 return E_OUTOFMEMORY
;
3723 doc
->IUnknown_inner
.lpVtbl
= &HTMLDocumentObjVtbl
;
3724 doc
->IDispatchEx_iface
.lpVtbl
= &DocObjDispatchExVtbl
;
3725 doc
->ICustomDoc_iface
.lpVtbl
= &CustomDocVtbl
;
3726 doc
->IHTMLDocument2_iface
.lpVtbl
= &DocObjHTMLDocument2Vtbl
;
3727 doc
->IHTMLDocument3_iface
.lpVtbl
= &DocObjHTMLDocument3Vtbl
;
3728 doc
->IHTMLDocument4_iface
.lpVtbl
= &DocObjHTMLDocument4Vtbl
;
3729 doc
->IHTMLDocument5_iface
.lpVtbl
= &DocObjHTMLDocument5Vtbl
;
3730 doc
->IHTMLDocument6_iface
.lpVtbl
= &DocObjHTMLDocument6Vtbl
;
3731 doc
->IHTMLDocument7_iface
.lpVtbl
= &DocObjHTMLDocument7Vtbl
;
3732 doc
->IDocumentSelector_iface
.lpVtbl
= &DocObjDocumentSelectorVtbl
;
3733 doc
->IDocumentEvent_iface
.lpVtbl
= &DocObjDocumentEventVtbl
;
3734 doc
->ISupportErrorInfo_iface
.lpVtbl
= &DocObjSupportErrorInfoVtbl
;
3735 doc
->IProvideMultipleClassInfo_iface
.lpVtbl
= &DocObjProvideMultipleClassInfoVtbl
;
3736 doc
->IMarkupServices_iface
.lpVtbl
= &DocObjMarkupServicesVtbl
;
3737 doc
->IMarkupContainer_iface
.lpVtbl
= &DocObjMarkupContainerVtbl
;
3738 doc
->IDisplayServices_iface
.lpVtbl
= &DocObjDisplayServicesVtbl
;
3739 doc
->IDocumentRange_iface
.lpVtbl
= &DocObjDocumentRangeVtbl
;
3740 doc
->IEventTarget_iface
.lpVtbl
= &DocObjEventTargetVtbl
;
3742 doc
->outer_unk
= outer
? outer
: &doc
->IUnknown_inner
;
3744 ConnectionPointContainer_Init(&doc
->cp_container
, &doc
->IUnknown_inner
, HTMLDocumentObj_cpc
);
3745 HTMLDocumentObj_Persist_Init(doc
);
3746 HTMLDocumentObj_Service_Init(doc
);
3747 HTMLDocumentObj_OleCmd_Init(doc
);
3748 HTMLDocumentObj_OleObj_Init(doc
);
3749 TargetContainer_Init(doc
);
3750 doc
->is_mhtml
= is_mhtml
;
3752 doc
->task_magic
= get_task_target_magic();
3754 HTMLDocument_View_Init(doc
);
3756 hres
= create_gecko_browser(doc
, &doc
->nscontainer
);
3758 ERR("Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE\n");
3759 IUnknown_Release(&doc
->IUnknown_inner
);
3763 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
3764 *ppv
= &doc
->IUnknown_inner
;
3766 hres
= IUnknown_QueryInterface(doc
->outer_unk
, riid
, ppv
);
3767 IUnknown_Release(doc
->outer_unk
);
3772 doc
->window
= doc
->nscontainer
->content_window
;
3773 IHTMLWindow2_AddRef(&doc
->window
->base
.IHTMLWindow2_iface
);
3775 if(!doc
->doc_node
) {
3776 doc
->doc_node
= doc
->window
->base
.inner_window
->doc
;
3777 IHTMLDOMNode_AddRef(&doc
->doc_node
->node
.IHTMLDOMNode_iface
);
3785 HRESULT
HTMLDocument_Create(IUnknown
*outer
, REFIID riid
, void **ppv
)
3787 TRACE("(%p %s %p)\n", outer
, debugstr_mshtml_guid(riid
), ppv
);
3788 return create_document_object(FALSE
, outer
, riid
, ppv
);
3791 HRESULT
MHTMLDocument_Create(IUnknown
*outer
, REFIID riid
, void **ppv
)
3793 TRACE("(%p %s %p)\n", outer
, debugstr_mshtml_guid(riid
), ppv
);
3794 return create_document_object(TRUE
, outer
, riid
, ppv
);