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"
39 #include "htmlevent.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
47 } download_proc_task_t;
49 static BOOL use_gecko_script(LPCWSTR url)
51 static const WCHAR fileW[] = {'f','i','l','e',':'};
52 static const WCHAR aboutW[] = {'a','b','o','u','t',':'};
53 static const WCHAR resW[] = {'r','e','s',':'};
55 return strncmpiW(fileW, url, sizeof(fileW)/sizeof(WCHAR))
56 && strncmpiW(aboutW, url, sizeof(aboutW)/sizeof(WCHAR))
57 && strncmpiW(resW, url, sizeof(resW)/sizeof(WCHAR));
60 void set_current_mon(HTMLWindow *This, IMoniker *mon)
65 IMoniker_Release(This->mon);
70 CoTaskMemFree(This->url);
80 hres = IMoniker_GetDisplayName(mon, NULL, NULL, &This->url);
82 WARN("GetDisplayName failed: %08x\n", hres);
84 set_script_mode(This, use_gecko_script(This->url) ? SCRIPTMODE_GECKO : SCRIPTMODE_ACTIVESCRIPT);
87 static void set_progress_proc(task_t *_task)
89 docobj_task_t *task = (docobj_task_t*)_task;
90 IOleCommandTarget *olecmd = NULL;
91 HTMLDocumentObj *doc = task->doc;
97 IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
100 VARIANT progress_max, progress;
102 V_VT(&progress_max) = VT_I4;
103 V_I4(&progress_max) = 0; /* FIXME */
104 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSMAX, OLECMDEXECOPT_DONTPROMPTUSER,
105 &progress_max, NULL);
107 V_VT(&progress) = VT_I4;
108 V_I4(&progress) = 0; /* FIXME */
109 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, OLECMDEXECOPT_DONTPROMPTUSER,
113 if(doc->usermode == EDITMODE && doc->hostui) {
114 DOCHOSTUIINFO hostinfo;
116 memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO));
117 hostinfo.cbSize = sizeof(DOCHOSTUIINFO);
118 hres = IDocHostUIHandler_GetHostInfo(doc->hostui, &hostinfo);
120 /* FIXME: use hostinfo */
121 TRACE("hostinfo = {%u %08x %08x %s %s}\n",
122 hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
123 debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
127 static void set_downloading_proc(task_t *_task)
129 download_proc_task_t *task = (download_proc_task_t*)_task;
130 HTMLDocumentObj *doc = task->doc;
131 IOleCommandTarget *olecmd;
134 TRACE("(%p)\n", doc);
137 IOleInPlaceFrame_SetStatusText(doc->frame, NULL /* FIXME */);
142 if(task->set_download) {
143 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
144 if(SUCCEEDED(hres)) {
150 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE,
151 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
152 IOleCommandTarget_Release(olecmd);
155 doc->download_state = 1;
159 IDropTarget *drop_target = NULL;
161 hres = IDocHostUIHandler_GetDropTarget(doc->hostui, NULL /* FIXME */, &drop_target);
163 FIXME("Use IDropTarget\n");
164 IDropTarget_Release(drop_target);
169 static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BOOL set_download)
171 nsChannelBSC *bscallback;
174 download_proc_task_t *download_task;
179 IUnknown *unk = NULL;
183 * "__PrecreatedObject"
184 * "BIND_CONTEXT_PARAM"
185 * "__HTMLLOADOPTIONS"
189 * "_ITransData_Object_"
193 IBindCtx_GetObjectParam(pibc, (LPOLESTR)SZ_HTML_CLIENTSITE_OBJECTPARAM, &unk);
195 IOleClientSite *client = NULL;
197 hres = IUnknown_QueryInterface(unk, &IID_IOleClientSite, (void**)&client);
198 if(SUCCEEDED(hres)) {
199 TRACE("Got client site %p\n", client);
200 IOleObject_SetClientSite(OLEOBJ(This), client);
201 IOleClientSite_Release(client);
204 IUnknown_Release(unk);
208 set_ready_state(This->window, READYSTATE_LOADING);
209 update_doc(This, UPDATE_TITLE);
211 HTMLDocument_LockContainer(This->doc_obj, TRUE);
213 hres = IMoniker_GetDisplayName(mon, pibc, NULL, &url);
215 WARN("GetDiaplayName failed: %08x\n", hres);
219 TRACE("got url: %s\n", debugstr_w(url));
221 set_current_mon(This->window, mon);
223 if(This->doc_obj->client) {
224 VARIANT silent, offline;
225 IOleCommandTarget *cmdtrg = NULL;
227 hres = get_client_disp_property(This->doc_obj->client, DISPID_AMBIENT_SILENT, &silent);
228 if(SUCCEEDED(hres)) {
229 if(V_VT(&silent) != VT_BOOL)
230 WARN("V_VT(silent) = %d\n", V_VT(&silent));
231 else if(V_BOOL(&silent))
232 FIXME("silent == true\n");
235 hres = get_client_disp_property(This->doc_obj->client,
236 DISPID_AMBIENT_OFFLINEIFNOTCONNECTED, &offline);
237 if(SUCCEEDED(hres)) {
238 if(V_VT(&silent) != VT_BOOL)
239 WARN("V_VT(offline) = %d\n", V_VT(&silent));
240 else if(V_BOOL(&silent))
241 FIXME("offline == true\n");
244 hres = IOleClientSite_QueryInterface(This->doc_obj->client, &IID_IOleCommandTarget,
246 if(SUCCEEDED(hres)) {
251 IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL);
253 IOleCommandTarget_Release(cmdtrg);
257 bscallback = create_channelbsc(mon);
259 if(This->doc_obj->frame) {
260 task = heap_alloc(sizeof(docobj_task_t));
261 task->doc = This->doc_obj;
262 push_task(&task->header, set_progress_proc, This->doc_obj->basedoc.task_magic);
265 download_task = heap_alloc(sizeof(download_proc_task_t));
266 download_task->doc = This->doc_obj;
267 download_task->set_download = set_download;
268 push_task(&download_task->header, set_downloading_proc, This->doc_obj->basedoc.task_magic);
270 if(This->doc_obj->nscontainer) {
271 This->doc_obj->nscontainer->bscallback = bscallback;
272 nsres = nsIWebNavigation_LoadURI(This->doc_obj->nscontainer->navigation, url,
273 LOAD_FLAGS_NONE, NULL, NULL, NULL);
274 This->doc_obj->nscontainer->bscallback = NULL;
275 if(NS_FAILED(nsres)) {
276 WARN("LoadURI failed: %08x\n", nsres);
277 IUnknown_Release((IUnknown*)bscallback);
283 set_window_bscallback(This->window, bscallback);
284 IUnknown_Release((IUnknown*)bscallback);
290 void set_ready_state(HTMLWindow *window, READYSTATE readystate)
292 window->readystate = readystate;
293 if(window->doc_obj && window->doc_obj->basedoc.window == window)
294 call_property_onchanged(&window->doc_obj->basedoc.cp_propnotif, DISPID_READYSTATE);
295 if(window->frame_element)
296 fire_event(window->frame_element->element.node.doc, EVENTID_READYSTATECHANGE,
297 window->frame_element->element.node.nsnode, NULL);
300 static HRESULT get_doc_string(HTMLDocumentNode *This, char **str)
308 WARN("NULL nsdoc\n");
312 nsres = nsIDOMHTMLDocument_QueryInterface(This->nsdoc, &IID_nsIDOMNode, (void**)&nsnode);
313 if(NS_FAILED(nsres)) {
314 ERR("Could not get nsIDOMNode failed: %08x\n", nsres);
318 nsAString_Init(&nsstr, NULL);
319 nsnode_to_nsstring(nsnode, &nsstr);
320 nsIDOMNode_Release(nsnode);
322 nsAString_GetData(&nsstr, &strw);
323 TRACE("%s\n", debugstr_w(strw));
325 *str = heap_strdupWtoA(strw);
327 nsAString_Finish(&nsstr);
333 /**********************************************************
334 * IPersistMoniker implementation
337 #define PERSISTMON_THIS(iface) DEFINE_THIS(HTMLDocument, PersistMoniker, iface)
339 static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid,
342 HTMLDocument *This = PERSISTMON_THIS(iface);
343 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
346 static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface)
348 HTMLDocument *This = PERSISTMON_THIS(iface);
349 return IHTMLDocument2_AddRef(HTMLDOC(This));
352 static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface)
354 HTMLDocument *This = PERSISTMON_THIS(iface);
355 return IHTMLDocument2_Release(HTMLDOC(This));
358 static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID)
360 HTMLDocument *This = PERSISTMON_THIS(iface);
361 return IPersist_GetClassID(PERSIST(This), pClassID);
364 static HRESULT WINAPI PersistMoniker_IsDirty(IPersistMoniker *iface)
366 HTMLDocument *This = PERSISTMON_THIS(iface);
368 TRACE("(%p)\n", This);
370 return IPersistStreamInit_IsDirty(PERSTRINIT(This));
373 static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAvailable,
374 IMoniker *pimkName, LPBC pibc, DWORD grfMode)
376 HTMLDocument *This = PERSISTMON_THIS(iface);
379 TRACE("(%p)->(%x %p %p %08x)\n", This, fFullyAvailable, pimkName, pibc, grfMode);
381 hres = set_moniker(This, pimkName, pibc, TRUE);
385 return start_binding(This->window, NULL, (BSCallback*)This->window->bscallback, pibc);
388 static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName,
389 LPBC pbc, BOOL fRemember)
391 HTMLDocument *This = PERSISTMON_THIS(iface);
392 FIXME("(%p)->(%p %p %x)\n", This, pimkName, pbc, fRemember);
396 static HRESULT WINAPI PersistMoniker_SaveCompleted(IPersistMoniker *iface, IMoniker *pimkName, LPBC pibc)
398 HTMLDocument *This = PERSISTMON_THIS(iface);
399 FIXME("(%p)->(%p %p)\n", This, pimkName, pibc);
403 static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoniker **ppimkName)
405 HTMLDocument *This = PERSISTMON_THIS(iface);
407 TRACE("(%p)->(%p)\n", This, ppimkName);
409 if(!This->window || !This->window->mon)
412 IMoniker_AddRef(This->window->mon);
413 *ppimkName = This->window->mon;
417 static const IPersistMonikerVtbl PersistMonikerVtbl = {
418 PersistMoniker_QueryInterface,
419 PersistMoniker_AddRef,
420 PersistMoniker_Release,
421 PersistMoniker_GetClassID,
422 PersistMoniker_IsDirty,
425 PersistMoniker_SaveCompleted,
426 PersistMoniker_GetCurMoniker
429 /**********************************************************
430 * IMonikerProp implementation
433 #define MONPROP_THIS(iface) DEFINE_THIS(HTMLDocument, MonikerProp, iface)
435 static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppvObject)
437 HTMLDocument *This = MONPROP_THIS(iface);
438 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
441 static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface)
443 HTMLDocument *This = MONPROP_THIS(iface);
444 return IHTMLDocument2_AddRef(HTMLDOC(This));
447 static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
449 HTMLDocument *This = MONPROP_THIS(iface);
450 return IHTMLDocument_Release(HTMLDOC(This));
453 static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
455 HTMLDocument *This = MONPROP_THIS(iface);
457 TRACE("(%p)->(%d %s)\n", This, mkp, debugstr_w(val));
461 heap_free(This->doc_obj->mime);
462 This->doc_obj->mime = heap_strdupW(val);
469 FIXME("mkp %d\n", mkp);
476 static const IMonikerPropVtbl MonikerPropVtbl = {
477 MonikerProp_QueryInterface,
480 MonikerProp_PutProperty
483 /**********************************************************
484 * IPersistFile implementation
487 #define PERSISTFILE_THIS(iface) DEFINE_THIS(HTMLDocument, PersistFile, iface)
489 static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *iface, REFIID riid, void **ppvObject)
491 HTMLDocument *This = PERSISTFILE_THIS(iface);
492 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
495 static ULONG WINAPI PersistFile_AddRef(IPersistFile *iface)
497 HTMLDocument *This = PERSISTFILE_THIS(iface);
498 return IHTMLDocument2_AddRef(HTMLDOC(This));
501 static ULONG WINAPI PersistFile_Release(IPersistFile *iface)
503 HTMLDocument *This = PERSISTFILE_THIS(iface);
504 return IHTMLDocument2_Release(HTMLDOC(This));
507 static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *iface, CLSID *pClassID)
509 HTMLDocument *This = PERSISTFILE_THIS(iface);
511 TRACE("(%p)->(%p)\n", This, pClassID);
516 *pClassID = CLSID_HTMLDocument;
520 static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *iface)
522 HTMLDocument *This = PERSISTFILE_THIS(iface);
524 TRACE("(%p)\n", This);
526 return IPersistStreamInit_IsDirty(PERSTRINIT(This));
529 static HRESULT WINAPI PersistFile_Load(IPersistFile *iface, LPCOLESTR pszFileName, DWORD dwMode)
531 HTMLDocument *This = PERSISTFILE_THIS(iface);
532 FIXME("(%p)->(%s %08x)\n", This, debugstr_w(pszFileName), dwMode);
536 static HRESULT WINAPI PersistFile_Save(IPersistFile *iface, LPCOLESTR pszFileName, BOOL fRemember)
538 HTMLDocument *This = PERSISTFILE_THIS(iface);
544 TRACE("(%p)->(%s %x)\n", This, debugstr_w(pszFileName), fRemember);
546 file = CreateFileW(pszFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
547 FILE_ATTRIBUTE_NORMAL, NULL);
548 if(file == INVALID_HANDLE_VALUE) {
549 WARN("Could not create file: %u\n", GetLastError());
553 hres = get_doc_string(This->doc_node, &str);
555 WriteFile(file, str, strlen(str), &written, NULL);
561 static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *iface, LPCOLESTR pszFileName)
563 HTMLDocument *This = PERSISTFILE_THIS(iface);
564 FIXME("(%p)->(%s)\n", This, debugstr_w(pszFileName));
568 static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *iface, LPOLESTR *pszFileName)
570 HTMLDocument *This = PERSISTFILE_THIS(iface);
571 FIXME("(%p)->(%p)\n", This, pszFileName);
575 static const IPersistFileVtbl PersistFileVtbl = {
576 PersistFile_QueryInterface,
579 PersistFile_GetClassID,
583 PersistFile_SaveCompleted,
584 PersistFile_GetCurFile
587 #define PERSTRINIT_THIS(iface) DEFINE_THIS(HTMLDocument, PersistStreamInit, iface)
589 static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface,
590 REFIID riid, void **ppv)
592 HTMLDocument *This = PERSTRINIT_THIS(iface);
593 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
596 static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface)
598 HTMLDocument *This = PERSTRINIT_THIS(iface);
599 return IHTMLDocument2_AddRef(HTMLDOC(This));
602 static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface)
604 HTMLDocument *This = PERSTRINIT_THIS(iface);
605 return IHTMLDocument2_Release(HTMLDOC(This));
608 static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID)
610 HTMLDocument *This = PERSTRINIT_THIS(iface);
611 return IPersist_GetClassID(PERSIST(This), pClassID);
614 static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface)
616 HTMLDocument *This = PERSTRINIT_THIS(iface);
618 TRACE("(%p)\n", This);
620 if(This->doc_obj->usermode == EDITMODE)
621 return editor_is_dirty(This);
626 static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM pStm)
628 HTMLDocument *This = PERSTRINIT_THIS(iface);
632 static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
634 TRACE("(%p)->(%p)\n", This, pStm);
636 hres = CreateURLMoniker(NULL, about_blankW, &mon);
638 WARN("CreateURLMoniker failed: %08x\n", hres);
642 hres = set_moniker(This, mon, NULL, TRUE);
643 IMoniker_Release(mon);
647 return channelbsc_load_stream(This->window->bscallback, pStm);
650 static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm,
653 HTMLDocument *This = PERSTRINIT_THIS(iface);
658 TRACE("(%p)->(%p %x)\n", This, pStm, fClearDirty);
660 hres = get_doc_string(This->doc_node, &str);
664 hres = IStream_Write(pStm, str, strlen(str), &written);
666 FIXME("Write failed: %08x\n", hres);
671 set_dirty(This, VARIANT_FALSE);
676 static HRESULT WINAPI PersistStreamInit_GetSizeMax(IPersistStreamInit *iface,
677 ULARGE_INTEGER *pcbSize)
679 HTMLDocument *This = PERSTRINIT_THIS(iface);
680 FIXME("(%p)->(%p)\n", This, pcbSize);
684 static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface)
686 HTMLDocument *This = PERSTRINIT_THIS(iface);
692 static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
693 static const WCHAR html_bodyW[] = {'<','H','T','M','L','>','<','/','H','T','M','L','>',0};
695 TRACE("(%p)\n", This);
697 body = GlobalAlloc(0, sizeof(html_bodyW));
699 return E_OUTOFMEMORY;
700 memcpy(body, html_bodyW, sizeof(html_bodyW));
702 hres = CreateURLMoniker(NULL, about_blankW, &mon);
704 WARN("CreateURLMoniker failed: %08x\n", hres);
709 hres = set_moniker(This, mon, NULL, FALSE);
710 IMoniker_Release(mon);
716 hres = CreateStreamOnHGlobal(body, TRUE, &stream);
722 hres = channelbsc_load_stream(This->window->bscallback, stream);
724 IStream_Release(stream);
728 #undef PERSTRINIT_THIS
730 static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
731 PersistStreamInit_QueryInterface,
732 PersistStreamInit_AddRef,
733 PersistStreamInit_Release,
734 PersistStreamInit_GetClassID,
735 PersistStreamInit_IsDirty,
736 PersistStreamInit_Load,
737 PersistStreamInit_Save,
738 PersistStreamInit_GetSizeMax,
739 PersistStreamInit_InitNew
742 /**********************************************************
743 * IPersistHistory implementation
746 #define PERSISTHIST_THIS(iface) DEFINE_THIS(HTMLDocument, PersistHistory, iface)
748 static HRESULT WINAPI PersistHistory_QueryInterface(IPersistHistory *iface, REFIID riid, void **ppvObject)
750 HTMLDocument *This = PERSISTHIST_THIS(iface);
751 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
754 static ULONG WINAPI PersistHistory_AddRef(IPersistHistory *iface)
756 HTMLDocument *This = PERSISTHIST_THIS(iface);
757 return IHTMLDocument2_AddRef(HTMLDOC(This));
760 static ULONG WINAPI PersistHistory_Release(IPersistHistory *iface)
762 HTMLDocument *This = PERSISTHIST_THIS(iface);
763 return IHTMLDocument2_Release(HTMLDOC(This));
766 static HRESULT WINAPI PersistHistory_GetClassID(IPersistHistory *iface, CLSID *pClassID)
768 HTMLDocument *This = PERSISTHIST_THIS(iface);
769 return IPersist_GetClassID(PERSIST(This), pClassID);
772 static HRESULT WINAPI PersistHistory_LoadHistory(IPersistHistory *iface, IStream *pStream, IBindCtx *pbc)
774 HTMLDocument *This = PERSISTHIST_THIS(iface);
775 FIXME("(%p)->(%p %p)\n", This, pStream, pbc);
779 static HRESULT WINAPI PersistHistory_SaveHistory(IPersistHistory *iface, IStream *pStream)
781 HTMLDocument *This = PERSISTHIST_THIS(iface);
782 FIXME("(%p)->(%p)\n", This, pStream);
786 static HRESULT WINAPI PersistHistory_SetPositionCookie(IPersistHistory *iface, DWORD dwPositioncookie)
788 HTMLDocument *This = PERSISTHIST_THIS(iface);
789 FIXME("(%p)->(%x)\n", This, dwPositioncookie);
793 static HRESULT WINAPI PersistHistory_GetPositionCookie(IPersistHistory *iface, DWORD *pdwPositioncookie)
795 HTMLDocument *This = PERSISTHIST_THIS(iface);
796 FIXME("(%p)->(%p)\n", This, pdwPositioncookie);
800 #undef PERSISTHIST_THIS
802 static const IPersistHistoryVtbl PersistHistoryVtbl = {
803 PersistHistory_QueryInterface,
804 PersistHistory_AddRef,
805 PersistHistory_Release,
806 PersistHistory_GetClassID,
807 PersistHistory_LoadHistory,
808 PersistHistory_SaveHistory,
809 PersistHistory_SetPositionCookie,
810 PersistHistory_GetPositionCookie
813 void HTMLDocument_Persist_Init(HTMLDocument *This)
815 This->lpPersistMonikerVtbl = &PersistMonikerVtbl;
816 This->lpPersistFileVtbl = &PersistFileVtbl;
817 This->lpMonikerPropVtbl = &MonikerPropVtbl;
818 This->lpPersistStreamInitVtbl = &PersistStreamInitVtbl;
819 This->lpPersistHistoryVtbl = &PersistHistoryVtbl;