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
25 #define NONAMELESSUNION
26 #define NONAMELESSSTRUCT
35 #include "wine/debug.h"
36 #include "wine/unicode.h"
38 #include "mshtml_private.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
42 static BOOL
use_gecko_script(LPCWSTR url
)
44 static const WCHAR fileW
[] = {'f','i','l','e',':'};
45 static const WCHAR aboutW
[] = {'a','b','o','u','t',':'};
47 return strncmpiW(fileW
, url
, sizeof(fileW
)/sizeof(WCHAR
))
48 && strncmpiW(aboutW
, url
, sizeof(aboutW
)/sizeof(WCHAR
));
51 void set_current_mon(HTMLWindow
*This
, IMoniker
*mon
)
56 IMoniker_Release(This
->mon
);
61 CoTaskMemFree(This
->url
);
71 hres
= IMoniker_GetDisplayName(mon
, NULL
, NULL
, &This
->url
);
73 WARN("GetDisplayName failed: %08x\n", hres
);
75 set_script_mode(This
, use_gecko_script(This
->url
) ? SCRIPTMODE_GECKO
: SCRIPTMODE_ACTIVESCRIPT
);
78 static void set_progress_proc(task_t
*_task
)
80 docobj_task_t
*task
= (docobj_task_t
*)_task
;
81 IOleCommandTarget
*olecmd
= NULL
;
82 HTMLDocumentObj
*doc
= task
->doc
;
88 IOleClientSite_QueryInterface(doc
->client
, &IID_IOleCommandTarget
, (void**)&olecmd
);
91 VARIANT progress_max
, progress
;
93 V_VT(&progress_max
) = VT_I4
;
94 V_I4(&progress_max
) = 0; /* FIXME */
95 IOleCommandTarget_Exec(olecmd
, NULL
, OLECMDID_SETPROGRESSMAX
, OLECMDEXECOPT_DONTPROMPTUSER
,
98 V_VT(&progress
) = VT_I4
;
99 V_I4(&progress
) = 0; /* FIXME */
100 IOleCommandTarget_Exec(olecmd
, NULL
, OLECMDID_SETPROGRESSPOS
, OLECMDEXECOPT_DONTPROMPTUSER
,
104 if(doc
->usermode
== EDITMODE
&& doc
->hostui
) {
105 DOCHOSTUIINFO hostinfo
;
107 memset(&hostinfo
, 0, sizeof(DOCHOSTUIINFO
));
108 hostinfo
.cbSize
= sizeof(DOCHOSTUIINFO
);
109 hres
= IDocHostUIHandler_GetHostInfo(doc
->hostui
, &hostinfo
);
111 /* FIXME: use hostinfo */
112 TRACE("hostinfo = {%u %08x %08x %s %s}\n",
113 hostinfo
.cbSize
, hostinfo
.dwFlags
, hostinfo
.dwDoubleClick
,
114 debugstr_w(hostinfo
.pchHostCss
), debugstr_w(hostinfo
.pchHostNS
));
118 static void set_downloading_proc(task_t
*_task
)
120 HTMLDocumentObj
*doc
= ((docobj_task_t
*)_task
)->doc
;
121 IOleCommandTarget
*olecmd
;
124 TRACE("(%p)\n", doc
);
127 IOleInPlaceFrame_SetStatusText(doc
->frame
, NULL
/* FIXME */);
132 hres
= IOleClientSite_QueryInterface(doc
->client
, &IID_IOleCommandTarget
, (void**)&olecmd
);
133 if(SUCCEEDED(hres
)) {
139 IOleCommandTarget_Exec(olecmd
, NULL
, OLECMDID_SETDOWNLOADSTATE
, OLECMDEXECOPT_DONTPROMPTUSER
,
141 IOleCommandTarget_Release(olecmd
);
145 IDropTarget
*drop_target
= NULL
;
147 hres
= IDocHostUIHandler_GetDropTarget(doc
->hostui
, NULL
/* FIXME */, &drop_target
);
149 FIXME("Use IDropTarget\n");
150 IDropTarget_Release(drop_target
);
155 static HRESULT
set_moniker(HTMLDocument
*This
, IMoniker
*mon
, IBindCtx
*pibc
)
157 nsChannelBSC
*bscallback
;
164 IUnknown
*unk
= NULL
;
168 * "__PrecreatedObject"
169 * "BIND_CONTEXT_PARAM"
170 * "__HTMLLOADOPTIONS"
174 * "_ITransData_Object_"
178 IBindCtx_GetObjectParam(pibc
, (LPOLESTR
)SZ_HTML_CLIENTSITE_OBJECTPARAM
, &unk
);
180 IOleClientSite
*client
= NULL
;
182 hres
= IUnknown_QueryInterface(unk
, &IID_IOleClientSite
, (void**)&client
);
183 if(SUCCEEDED(hres
)) {
184 TRACE("Got client site %p\n", client
);
185 IOleObject_SetClientSite(OLEOBJ(This
), client
);
186 IOleClientSite_Release(client
);
189 IUnknown_Release(unk
);
193 set_ready_state(This
->window
, READYSTATE_LOADING
);
194 update_doc(This
, UPDATE_TITLE
);
196 HTMLDocument_LockContainer(This
->doc_obj
, TRUE
);
198 hres
= IMoniker_GetDisplayName(mon
, pibc
, NULL
, &url
);
200 WARN("GetDiaplayName failed: %08x\n", hres
);
204 TRACE("got url: %s\n", debugstr_w(url
));
206 set_current_mon(This
->window
, mon
);
208 if(This
->doc_obj
->client
) {
209 VARIANT silent
, offline
;
210 IOleCommandTarget
*cmdtrg
= NULL
;
212 hres
= get_client_disp_property(This
->doc_obj
->client
, DISPID_AMBIENT_SILENT
, &silent
);
213 if(SUCCEEDED(hres
)) {
214 if(V_VT(&silent
) != VT_BOOL
)
215 WARN("V_VT(silent) = %d\n", V_VT(&silent
));
216 else if(V_BOOL(&silent
))
217 FIXME("silent == true\n");
220 hres
= get_client_disp_property(This
->doc_obj
->client
,
221 DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
, &offline
);
222 if(SUCCEEDED(hres
)) {
223 if(V_VT(&silent
) != VT_BOOL
)
224 WARN("V_VT(offline) = %d\n", V_VT(&silent
));
225 else if(V_BOOL(&silent
))
226 FIXME("offline == true\n");
229 hres
= IOleClientSite_QueryInterface(This
->doc_obj
->client
, &IID_IOleCommandTarget
,
231 if(SUCCEEDED(hres
)) {
236 IOleCommandTarget_Exec(cmdtrg
, &CGID_ShellDocView
, 37, 0, &var
, NULL
);
238 IOleCommandTarget_Release(cmdtrg
);
242 bscallback
= create_channelbsc(mon
);
244 if(This
->doc_obj
->frame
) {
245 task
= heap_alloc(sizeof(docobj_task_t
));
246 task
->doc
= This
->doc_obj
;
247 push_task(&task
->header
, set_progress_proc
, This
->doc_obj
->basedoc
.task_magic
);
250 task
= heap_alloc(sizeof(docobj_task_t
));
251 task
->doc
= This
->doc_obj
;
252 push_task(&task
->header
, set_downloading_proc
, This
->doc_obj
->basedoc
.task_magic
);
254 if(This
->doc_obj
->nscontainer
) {
255 This
->doc_obj
->nscontainer
->bscallback
= bscallback
;
256 nsres
= nsIWebNavigation_LoadURI(This
->doc_obj
->nscontainer
->navigation
, url
,
257 LOAD_FLAGS_NONE
, NULL
, NULL
, NULL
);
258 This
->doc_obj
->nscontainer
->bscallback
= NULL
;
259 if(NS_FAILED(nsres
)) {
260 WARN("LoadURI failed: %08x\n", nsres
);
261 IUnknown_Release((IUnknown
*)bscallback
);
267 set_window_bscallback(This
->window
, bscallback
);
268 IUnknown_Release((IUnknown
*)bscallback
);
274 void set_ready_state(HTMLWindow
*window
, READYSTATE readystate
)
276 window
->readystate
= readystate
;
277 if(window
->doc_obj
->basedoc
.window
== window
)
278 call_property_onchanged(&window
->doc_obj
->basedoc
.cp_propnotif
, DISPID_READYSTATE
);
281 static HRESULT
get_doc_string(HTMLDocumentNode
*This
, char **str
)
289 WARN("NULL nsdoc\n");
293 nsres
= nsIDOMHTMLDocument_QueryInterface(This
->nsdoc
, &IID_nsIDOMNode
, (void**)&nsnode
);
294 if(NS_FAILED(nsres
)) {
295 ERR("Could not get nsIDOMNode failed: %08x\n", nsres
);
299 nsAString_Init(&nsstr
, NULL
);
300 nsnode_to_nsstring(nsnode
, &nsstr
);
301 nsIDOMNode_Release(nsnode
);
303 nsAString_GetData(&nsstr
, &strw
);
304 TRACE("%s\n", debugstr_w(strw
));
306 *str
= heap_strdupWtoA(strw
);
308 nsAString_Finish(&nsstr
);
314 /**********************************************************
315 * IPersistMoniker implementation
318 #define PERSISTMON_THIS(iface) DEFINE_THIS(HTMLDocument, PersistMoniker, iface)
320 static HRESULT WINAPI
PersistMoniker_QueryInterface(IPersistMoniker
*iface
, REFIID riid
,
323 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
324 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
327 static ULONG WINAPI
PersistMoniker_AddRef(IPersistMoniker
*iface
)
329 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
330 return IHTMLDocument2_AddRef(HTMLDOC(This
));
333 static ULONG WINAPI
PersistMoniker_Release(IPersistMoniker
*iface
)
335 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
336 return IHTMLDocument2_Release(HTMLDOC(This
));
339 static HRESULT WINAPI
PersistMoniker_GetClassID(IPersistMoniker
*iface
, CLSID
*pClassID
)
341 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
342 return IPersist_GetClassID(PERSIST(This
), pClassID
);
345 static HRESULT WINAPI
PersistMoniker_IsDirty(IPersistMoniker
*iface
)
347 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
349 TRACE("(%p)\n", This
);
351 return IPersistStreamInit_IsDirty(PERSTRINIT(This
));
354 static HRESULT WINAPI
PersistMoniker_Load(IPersistMoniker
*iface
, BOOL fFullyAvailable
,
355 IMoniker
*pimkName
, LPBC pibc
, DWORD grfMode
)
357 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
360 TRACE("(%p)->(%x %p %p %08x)\n", This
, fFullyAvailable
, pimkName
, pibc
, grfMode
);
362 hres
= set_moniker(This
, pimkName
, pibc
);
366 return start_binding(This
->window
, NULL
, (BSCallback
*)This
->window
->bscallback
, pibc
);
369 static HRESULT WINAPI
PersistMoniker_Save(IPersistMoniker
*iface
, IMoniker
*pimkName
,
370 LPBC pbc
, BOOL fRemember
)
372 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
373 FIXME("(%p)->(%p %p %x)\n", This
, pimkName
, pbc
, fRemember
);
377 static HRESULT WINAPI
PersistMoniker_SaveCompleted(IPersistMoniker
*iface
, IMoniker
*pimkName
, LPBC pibc
)
379 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
380 FIXME("(%p)->(%p %p)\n", This
, pimkName
, pibc
);
384 static HRESULT WINAPI
PersistMoniker_GetCurMoniker(IPersistMoniker
*iface
, IMoniker
**ppimkName
)
386 HTMLDocument
*This
= PERSISTMON_THIS(iface
);
388 TRACE("(%p)->(%p)\n", This
, ppimkName
);
390 if(!This
->window
|| !This
->window
->mon
)
393 IMoniker_AddRef(This
->window
->mon
);
394 *ppimkName
= This
->window
->mon
;
398 static const IPersistMonikerVtbl PersistMonikerVtbl
= {
399 PersistMoniker_QueryInterface
,
400 PersistMoniker_AddRef
,
401 PersistMoniker_Release
,
402 PersistMoniker_GetClassID
,
403 PersistMoniker_IsDirty
,
406 PersistMoniker_SaveCompleted
,
407 PersistMoniker_GetCurMoniker
410 /**********************************************************
411 * IMonikerProp implementation
414 #define MONPROP_THIS(iface) DEFINE_THIS(HTMLDocument, MonikerProp, iface)
416 static HRESULT WINAPI
MonikerProp_QueryInterface(IMonikerProp
*iface
, REFIID riid
, void **ppvObject
)
418 HTMLDocument
*This
= MONPROP_THIS(iface
);
419 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
422 static ULONG WINAPI
MonikerProp_AddRef(IMonikerProp
*iface
)
424 HTMLDocument
*This
= MONPROP_THIS(iface
);
425 return IHTMLDocument2_AddRef(HTMLDOC(This
));
428 static ULONG WINAPI
MonikerProp_Release(IMonikerProp
*iface
)
430 HTMLDocument
*This
= MONPROP_THIS(iface
);
431 return IHTMLDocument_Release(HTMLDOC(This
));
434 static HRESULT WINAPI
MonikerProp_PutProperty(IMonikerProp
*iface
, MONIKERPROPERTY mkp
, LPCWSTR val
)
436 HTMLDocument
*This
= MONPROP_THIS(iface
);
438 TRACE("(%p)->(%d %s)\n", This
, mkp
, debugstr_w(val
));
442 heap_free(This
->doc_obj
->mime
);
443 This
->doc_obj
->mime
= heap_strdupW(val
);
450 FIXME("mkp %d\n", mkp
);
457 static const IMonikerPropVtbl MonikerPropVtbl
= {
458 MonikerProp_QueryInterface
,
461 MonikerProp_PutProperty
464 /**********************************************************
465 * IPersistFile implementation
468 #define PERSISTFILE_THIS(iface) DEFINE_THIS(HTMLDocument, PersistFile, iface)
470 static HRESULT WINAPI
PersistFile_QueryInterface(IPersistFile
*iface
, REFIID riid
, void **ppvObject
)
472 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
473 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
476 static ULONG WINAPI
PersistFile_AddRef(IPersistFile
*iface
)
478 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
479 return IHTMLDocument2_AddRef(HTMLDOC(This
));
482 static ULONG WINAPI
PersistFile_Release(IPersistFile
*iface
)
484 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
485 return IHTMLDocument2_Release(HTMLDOC(This
));
488 static HRESULT WINAPI
PersistFile_GetClassID(IPersistFile
*iface
, CLSID
*pClassID
)
490 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
492 TRACE("(%p)->(%p)\n", This
, pClassID
);
497 *pClassID
= CLSID_HTMLDocument
;
501 static HRESULT WINAPI
PersistFile_IsDirty(IPersistFile
*iface
)
503 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
505 TRACE("(%p)\n", This
);
507 return IPersistStreamInit_IsDirty(PERSTRINIT(This
));
510 static HRESULT WINAPI
PersistFile_Load(IPersistFile
*iface
, LPCOLESTR pszFileName
, DWORD dwMode
)
512 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
513 FIXME("(%p)->(%s %08x)\n", This
, debugstr_w(pszFileName
), dwMode
);
517 static HRESULT WINAPI
PersistFile_Save(IPersistFile
*iface
, LPCOLESTR pszFileName
, BOOL fRemember
)
519 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
525 TRACE("(%p)->(%s %x)\n", This
, debugstr_w(pszFileName
), fRemember
);
527 file
= CreateFileW(pszFileName
, GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
,
528 FILE_ATTRIBUTE_NORMAL
, NULL
);
529 if(file
== INVALID_HANDLE_VALUE
) {
530 WARN("Could not create file: %u\n", GetLastError());
534 hres
= get_doc_string(This
->doc_node
, &str
);
536 WriteFile(file
, str
, strlen(str
), &written
, NULL
);
542 static HRESULT WINAPI
PersistFile_SaveCompleted(IPersistFile
*iface
, LPCOLESTR pszFileName
)
544 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
545 FIXME("(%p)->(%s)\n", This
, debugstr_w(pszFileName
));
549 static HRESULT WINAPI
PersistFile_GetCurFile(IPersistFile
*iface
, LPOLESTR
*pszFileName
)
551 HTMLDocument
*This
= PERSISTFILE_THIS(iface
);
552 FIXME("(%p)->(%p)\n", This
, pszFileName
);
556 static const IPersistFileVtbl PersistFileVtbl
= {
557 PersistFile_QueryInterface
,
560 PersistFile_GetClassID
,
564 PersistFile_SaveCompleted
,
565 PersistFile_GetCurFile
568 #define PERSTRINIT_THIS(iface) DEFINE_THIS(HTMLDocument, PersistStreamInit, iface)
570 static HRESULT WINAPI
PersistStreamInit_QueryInterface(IPersistStreamInit
*iface
,
571 REFIID riid
, void **ppv
)
573 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
574 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppv
);
577 static ULONG WINAPI
PersistStreamInit_AddRef(IPersistStreamInit
*iface
)
579 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
580 return IHTMLDocument2_AddRef(HTMLDOC(This
));
583 static ULONG WINAPI
PersistStreamInit_Release(IPersistStreamInit
*iface
)
585 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
586 return IHTMLDocument2_Release(HTMLDOC(This
));
589 static HRESULT WINAPI
PersistStreamInit_GetClassID(IPersistStreamInit
*iface
, CLSID
*pClassID
)
591 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
592 return IPersist_GetClassID(PERSIST(This
), pClassID
);
595 static HRESULT WINAPI
PersistStreamInit_IsDirty(IPersistStreamInit
*iface
)
597 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
599 TRACE("(%p)\n", This
);
601 if(This
->doc_obj
->usermode
== EDITMODE
)
602 return editor_is_dirty(This
);
607 static HRESULT WINAPI
PersistStreamInit_Load(IPersistStreamInit
*iface
, LPSTREAM pStm
)
609 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
613 static const WCHAR about_blankW
[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
615 TRACE("(%p)->(%p)\n", This
, pStm
);
617 hres
= CreateURLMoniker(NULL
, about_blankW
, &mon
);
619 WARN("CreateURLMoniker failed: %08x\n", hres
);
623 hres
= set_moniker(This
, mon
, NULL
);
624 IMoniker_Release(mon
);
628 return channelbsc_load_stream(This
->window
->bscallback
, pStm
);
631 static HRESULT WINAPI
PersistStreamInit_Save(IPersistStreamInit
*iface
, LPSTREAM pStm
,
634 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
639 TRACE("(%p)->(%p %x)\n", This
, pStm
, fClearDirty
);
641 hres
= get_doc_string(This
->doc_node
, &str
);
645 hres
= IStream_Write(pStm
, str
, strlen(str
), &written
);
647 FIXME("Write failed: %08x\n", hres
);
652 set_dirty(This
, VARIANT_FALSE
);
657 static HRESULT WINAPI
PersistStreamInit_GetSizeMax(IPersistStreamInit
*iface
,
658 ULARGE_INTEGER
*pcbSize
)
660 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
661 FIXME("(%p)->(%p)\n", This
, pcbSize
);
665 static HRESULT WINAPI
PersistStreamInit_InitNew(IPersistStreamInit
*iface
)
667 HTMLDocument
*This
= PERSTRINIT_THIS(iface
);
668 FIXME("(%p)\n", This
);
672 #undef PERSTRINIT_THIS
674 static const IPersistStreamInitVtbl PersistStreamInitVtbl
= {
675 PersistStreamInit_QueryInterface
,
676 PersistStreamInit_AddRef
,
677 PersistStreamInit_Release
,
678 PersistStreamInit_GetClassID
,
679 PersistStreamInit_IsDirty
,
680 PersistStreamInit_Load
,
681 PersistStreamInit_Save
,
682 PersistStreamInit_GetSizeMax
,
683 PersistStreamInit_InitNew
686 /**********************************************************
687 * IPersistHistory implementation
690 #define PERSISTHIST_THIS(iface) DEFINE_THIS(HTMLDocument, PersistHistory, iface)
692 static HRESULT WINAPI
PersistHistory_QueryInterface(IPersistHistory
*iface
, REFIID riid
, void **ppvObject
)
694 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
695 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
698 static ULONG WINAPI
PersistHistory_AddRef(IPersistHistory
*iface
)
700 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
701 return IHTMLDocument2_AddRef(HTMLDOC(This
));
704 static ULONG WINAPI
PersistHistory_Release(IPersistHistory
*iface
)
706 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
707 return IHTMLDocument2_Release(HTMLDOC(This
));
710 static HRESULT WINAPI
PersistHistory_GetClassID(IPersistHistory
*iface
, CLSID
*pClassID
)
712 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
713 return IPersist_GetClassID(PERSIST(This
), pClassID
);
716 static HRESULT WINAPI
PersistHistory_LoadHistory(IPersistHistory
*iface
, IStream
*pStream
, IBindCtx
*pbc
)
718 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
719 FIXME("(%p)->(%p %p)\n", This
, pStream
, pbc
);
723 static HRESULT WINAPI
PersistHistory_SaveHistory(IPersistHistory
*iface
, IStream
*pStream
)
725 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
726 FIXME("(%p)->(%p)\n", This
, pStream
);
730 static HRESULT WINAPI
PersistHistory_SetPositionCookie(IPersistHistory
*iface
, DWORD dwPositioncookie
)
732 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
733 FIXME("(%p)->(%x)\n", This
, dwPositioncookie
);
737 static HRESULT WINAPI
PersistHistory_GetPositionCookie(IPersistHistory
*iface
, DWORD
*pdwPositioncookie
)
739 HTMLDocument
*This
= PERSISTHIST_THIS(iface
);
740 FIXME("(%p)->(%p)\n", This
, pdwPositioncookie
);
744 #undef PERSISTHIST_THIS
746 static const IPersistHistoryVtbl PersistHistoryVtbl
= {
747 PersistHistory_QueryInterface
,
748 PersistHistory_AddRef
,
749 PersistHistory_Release
,
750 PersistHistory_GetClassID
,
751 PersistHistory_LoadHistory
,
752 PersistHistory_SaveHistory
,
753 PersistHistory_SetPositionCookie
,
754 PersistHistory_GetPositionCookie
757 void HTMLDocument_Persist_Init(HTMLDocument
*This
)
759 This
->lpPersistMonikerVtbl
= &PersistMonikerVtbl
;
760 This
->lpPersistFileVtbl
= &PersistFileVtbl
;
761 This
->lpMonikerPropVtbl
= &MonikerPropVtbl
;
762 This
->lpPersistStreamInitVtbl
= &PersistStreamInitVtbl
;
763 This
->lpPersistHistoryVtbl
= &PersistHistoryVtbl
;