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"
42 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
49 } download_proc_task_t;
51 static BOOL use_gecko_script(LPCWSTR url)
53 static const WCHAR fileW[] = {'f','i','l','e',':'};
54 static const WCHAR aboutW[] = {'a','b','o','u','t',':'};
55 static const WCHAR resW[] = {'r','e','s',':'};
57 return strncmpiW(fileW, url, sizeof(fileW)/sizeof(WCHAR))
58 && strncmpiW(aboutW, url, sizeof(aboutW)/sizeof(WCHAR))
59 && strncmpiW(resW, url, sizeof(resW)/sizeof(WCHAR));
62 void set_current_mon(HTMLWindow *This, IMoniker *mon)
67 IMoniker_Release(This->mon);
72 CoTaskMemFree(This->url);
82 hres = IMoniker_GetDisplayName(mon, NULL, NULL, &This->url);
84 WARN("GetDisplayName failed: %08x\n", hres);
86 set_script_mode(This, use_gecko_script(This->url) ? SCRIPTMODE_GECKO : SCRIPTMODE_ACTIVESCRIPT);
89 static void set_progress_proc(task_t *_task)
91 docobj_task_t *task = (docobj_task_t*)_task;
92 IOleCommandTarget *olecmd = NULL;
93 HTMLDocumentObj *doc = task->doc;
99 IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
102 VARIANT progress_max, progress;
104 V_VT(&progress_max) = VT_I4;
105 V_I4(&progress_max) = 0; /* FIXME */
106 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSMAX, OLECMDEXECOPT_DONTPROMPTUSER,
107 &progress_max, NULL);
109 V_VT(&progress) = VT_I4;
110 V_I4(&progress) = 0; /* FIXME */
111 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, OLECMDEXECOPT_DONTPROMPTUSER,
113 IOleCommandTarget_Release(olecmd);
116 if(doc->usermode == EDITMODE && doc->hostui) {
117 DOCHOSTUIINFO hostinfo;
119 memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO));
120 hostinfo.cbSize = sizeof(DOCHOSTUIINFO);
121 hres = IDocHostUIHandler_GetHostInfo(doc->hostui, &hostinfo);
123 /* FIXME: use hostinfo */
124 TRACE("hostinfo = {%u %08x %08x %s %s}\n",
125 hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
126 debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
130 static void set_downloading_proc(task_t *_task)
132 download_proc_task_t *task = (download_proc_task_t*)_task;
133 HTMLDocumentObj *doc = task->doc;
134 IOleCommandTarget *olecmd;
137 TRACE("(%p)\n", doc);
139 set_statustext(doc, IDS_STATUS_DOWNLOADINGFROM, task->url);
140 CoTaskMemFree(task->url);
145 if(task->set_download) {
146 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
147 if(SUCCEEDED(hres)) {
153 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE,
154 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
155 IOleCommandTarget_Release(olecmd);
158 doc->download_state = 1;
162 IAdviseSink_OnViewChange(doc->view_sink, DVASPECT_CONTENT, -1);
165 IDropTarget *drop_target = NULL;
167 hres = IDocHostUIHandler_GetDropTarget(doc->hostui, NULL /* FIXME */, &drop_target);
169 FIXME("Use IDropTarget\n");
170 IDropTarget_Release(drop_target);
175 HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannelBSC *async_bsc, BOOL set_download)
177 nsChannelBSC *bscallback;
179 download_proc_task_t *download_task;
184 hres = IMoniker_GetDisplayName(mon, pibc, NULL, &url);
186 WARN("GetDiaplayName failed: %08x\n", hres);
190 TRACE("got url: %s\n", debugstr_w(url));
192 if(This->doc_obj->client) {
193 VARIANT silent, offline;
195 hres = get_client_disp_property(This->doc_obj->client, DISPID_AMBIENT_SILENT, &silent);
196 if(SUCCEEDED(hres)) {
197 if(V_VT(&silent) != VT_BOOL)
198 WARN("V_VT(silent) = %d\n", V_VT(&silent));
199 else if(V_BOOL(&silent))
200 FIXME("silent == true\n");
203 hres = get_client_disp_property(This->doc_obj->client,
204 DISPID_AMBIENT_OFFLINEIFNOTCONNECTED, &offline);
205 if(SUCCEEDED(hres)) {
206 if(V_VT(&offline) != VT_BOOL)
207 WARN("V_VT(offline) = %d\n", V_VT(&offline));
208 else if(V_BOOL(&offline))
209 FIXME("offline == true\n");
213 if(This->window->mon) {
214 update_doc(This, UPDATE_TITLE|UPDATE_UI);
216 update_doc(This, UPDATE_TITLE);
217 set_current_mon(This->window, mon);
220 set_ready_state(This->window, READYSTATE_LOADING);
222 if(This->doc_obj->client) {
223 IOleCommandTarget *cmdtrg = NULL;
225 hres = IOleClientSite_QueryInterface(This->doc_obj->client, &IID_IOleCommandTarget,
227 if(SUCCEEDED(hres)) {
233 IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL);
235 V_VT(&var) = VT_UNKNOWN;
236 V_UNKNOWN(&var) = (IUnknown*)&This->window->IHTMLWindow2_iface;
237 V_VT(&out) = VT_EMPTY;
238 hres = IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 63, 0, &var, &out);
243 IOleCommandTarget_Release(cmdtrg);
247 hres = create_doc_uri(This->window, url, &nsuri);
252 bscallback = async_bsc;
254 hres = create_channelbsc(mon, NULL, NULL, 0, &bscallback);
260 remove_target_tasks(This->task_magic);
261 abort_document_bindings(This->doc_node);
263 hres = load_nsuri(This->window, nsuri, bscallback, LOAD_INITIAL_DOCUMENT_URI);
264 nsISupports_Release((nsISupports*)nsuri); /* FIXME */
266 set_window_bscallback(This->window, bscallback);
267 if(bscallback != async_bsc)
268 IUnknown_Release((IUnknown*)bscallback);
277 HTMLDocument_LockContainer(This->doc_obj, TRUE);
279 if(This->doc_obj->frame) {
280 task = heap_alloc(sizeof(docobj_task_t));
281 task->doc = This->doc_obj;
282 push_task(&task->header, set_progress_proc, This->doc_obj->basedoc.task_magic);
285 download_task = heap_alloc(sizeof(download_proc_task_t));
286 download_task->doc = This->doc_obj;
287 download_task->set_download = set_download;
288 download_task->url = url;
289 push_task(&download_task->header, set_downloading_proc, This->doc_obj->basedoc.task_magic);
294 void set_ready_state(HTMLWindow *window, READYSTATE readystate)
296 window->readystate = readystate;
298 if(window->doc_obj && window->doc_obj->basedoc.window == window)
299 call_property_onchanged(&window->doc_obj->basedoc.cp_propnotif, DISPID_READYSTATE);
301 fire_event(window->doc, EVENTID_READYSTATECHANGE, FALSE, window->doc->node.nsnode, NULL);
303 if(window->frame_element)
304 fire_event(window->frame_element->element.node.doc, EVENTID_READYSTATECHANGE,
305 TRUE, window->frame_element->element.node.nsnode, NULL);
308 static HRESULT get_doc_string(HTMLDocumentNode *This, char **str)
316 WARN("NULL nsdoc\n");
320 nsres = nsIDOMHTMLDocument_QueryInterface(This->nsdoc, &IID_nsIDOMNode, (void**)&nsnode);
321 if(NS_FAILED(nsres)) {
322 ERR("Could not get nsIDOMNode failed: %08x\n", nsres);
326 nsAString_Init(&nsstr, NULL);
327 nsnode_to_nsstring(nsnode, &nsstr);
328 nsIDOMNode_Release(nsnode);
330 nsAString_GetData(&nsstr, &strw);
331 TRACE("%s\n", debugstr_w(strw));
333 *str = heap_strdupWtoA(strw);
335 nsAString_Finish(&nsstr);
341 /**********************************************************
342 * IPersistMoniker implementation
345 static inline HTMLDocument *impl_from_IPersistMoniker(IPersistMoniker *iface)
347 return CONTAINING_RECORD(iface, HTMLDocument, IPersistMoniker_iface);
350 static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid, void **ppv)
352 HTMLDocument *This = impl_from_IPersistMoniker(iface);
353 return htmldoc_query_interface(This, riid, ppv);
356 static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface)
358 HTMLDocument *This = impl_from_IPersistMoniker(iface);
359 return htmldoc_addref(This);
362 static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface)
364 HTMLDocument *This = impl_from_IPersistMoniker(iface);
365 return htmldoc_release(This);
368 static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID)
370 HTMLDocument *This = impl_from_IPersistMoniker(iface);
371 return IPersist_GetClassID(&This->IPersistFile_iface, pClassID);
374 static HRESULT WINAPI PersistMoniker_IsDirty(IPersistMoniker *iface)
376 HTMLDocument *This = impl_from_IPersistMoniker(iface);
378 TRACE("(%p)\n", This);
380 return IPersistStreamInit_IsDirty(&This->IPersistStreamInit_iface);
383 static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAvailable,
384 IMoniker *pimkName, LPBC pibc, DWORD grfMode)
386 HTMLDocument *This = impl_from_IPersistMoniker(iface);
389 TRACE("(%p)->(%x %p %p %08x)\n", This, fFullyAvailable, pimkName, pibc, grfMode);
392 IUnknown *unk = NULL;
396 * "__PrecreatedObject"
397 * "BIND_CONTEXT_PARAM"
398 * "__HTMLLOADOPTIONS"
401 * "_ITransData_Object_"
405 IBindCtx_GetObjectParam(pibc, (LPOLESTR)SZ_HTML_CLIENTSITE_OBJECTPARAM, &unk);
407 IOleClientSite *client = NULL;
409 hres = IUnknown_QueryInterface(unk, &IID_IOleClientSite, (void**)&client);
410 if(SUCCEEDED(hres)) {
411 TRACE("Got client site %p\n", client);
412 IOleObject_SetClientSite(&This->IOleObject_iface, client);
413 IOleClientSite_Release(client);
416 IUnknown_Release(unk);
420 hres = set_moniker(This, pimkName, pibc, NULL, TRUE);
424 return start_binding(This->window, NULL, (BSCallback*)This->window->bscallback, pibc);
427 static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName,
428 LPBC pbc, BOOL fRemember)
430 HTMLDocument *This = impl_from_IPersistMoniker(iface);
431 FIXME("(%p)->(%p %p %x)\n", This, pimkName, pbc, fRemember);
435 static HRESULT WINAPI PersistMoniker_SaveCompleted(IPersistMoniker *iface, IMoniker *pimkName, LPBC pibc)
437 HTMLDocument *This = impl_from_IPersistMoniker(iface);
438 FIXME("(%p)->(%p %p)\n", This, pimkName, pibc);
442 static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoniker **ppimkName)
444 HTMLDocument *This = impl_from_IPersistMoniker(iface);
446 TRACE("(%p)->(%p)\n", This, ppimkName);
448 if(!This->window || !This->window->mon)
451 IMoniker_AddRef(This->window->mon);
452 *ppimkName = This->window->mon;
456 static const IPersistMonikerVtbl PersistMonikerVtbl = {
457 PersistMoniker_QueryInterface,
458 PersistMoniker_AddRef,
459 PersistMoniker_Release,
460 PersistMoniker_GetClassID,
461 PersistMoniker_IsDirty,
464 PersistMoniker_SaveCompleted,
465 PersistMoniker_GetCurMoniker
468 /**********************************************************
469 * IMonikerProp implementation
472 static inline HTMLDocument *impl_from_IMonikerProp(IMonikerProp *iface)
474 return CONTAINING_RECORD(iface, HTMLDocument, IMonikerProp_iface);
477 static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv)
479 HTMLDocument *This = impl_from_IMonikerProp(iface);
480 return htmldoc_query_interface(This, riid, ppv);
483 static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface)
485 HTMLDocument *This = impl_from_IMonikerProp(iface);
486 return htmldoc_addref(This);
489 static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
491 HTMLDocument *This = impl_from_IMonikerProp(iface);
492 return htmldoc_release(This);
495 static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
497 HTMLDocument *This = impl_from_IMonikerProp(iface);
499 TRACE("(%p)->(%d %s)\n", This, mkp, debugstr_w(val));
503 heap_free(This->doc_obj->mime);
504 This->doc_obj->mime = heap_strdupW(val);
511 FIXME("mkp %d\n", mkp);
518 static const IMonikerPropVtbl MonikerPropVtbl = {
519 MonikerProp_QueryInterface,
522 MonikerProp_PutProperty
525 /**********************************************************
526 * IPersistFile implementation
529 static inline HTMLDocument *impl_from_IPersistFile(IPersistFile *iface)
531 return CONTAINING_RECORD(iface, HTMLDocument, IPersistFile_iface);
534 static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *iface, REFIID riid, void **ppv)
536 HTMLDocument *This = impl_from_IPersistFile(iface);
537 return htmldoc_query_interface(This, riid, ppv);
540 static ULONG WINAPI PersistFile_AddRef(IPersistFile *iface)
542 HTMLDocument *This = impl_from_IPersistFile(iface);
543 return htmldoc_addref(This);
546 static ULONG WINAPI PersistFile_Release(IPersistFile *iface)
548 HTMLDocument *This = impl_from_IPersistFile(iface);
549 return htmldoc_release(This);
552 static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *iface, CLSID *pClassID)
554 HTMLDocument *This = impl_from_IPersistFile(iface);
556 TRACE("(%p)->(%p)\n", This, pClassID);
561 *pClassID = CLSID_HTMLDocument;
565 static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *iface)
567 HTMLDocument *This = impl_from_IPersistFile(iface);
569 TRACE("(%p)\n", This);
571 return IPersistStreamInit_IsDirty(&This->IPersistStreamInit_iface);
574 static HRESULT WINAPI PersistFile_Load(IPersistFile *iface, LPCOLESTR pszFileName, DWORD dwMode)
576 HTMLDocument *This = impl_from_IPersistFile(iface);
577 FIXME("(%p)->(%s %08x)\n", This, debugstr_w(pszFileName), dwMode);
581 static HRESULT WINAPI PersistFile_Save(IPersistFile *iface, LPCOLESTR pszFileName, BOOL fRemember)
583 HTMLDocument *This = impl_from_IPersistFile(iface);
589 TRACE("(%p)->(%s %x)\n", This, debugstr_w(pszFileName), fRemember);
591 file = CreateFileW(pszFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
592 FILE_ATTRIBUTE_NORMAL, NULL);
593 if(file == INVALID_HANDLE_VALUE) {
594 WARN("Could not create file: %u\n", GetLastError());
598 hres = get_doc_string(This->doc_node, &str);
600 WriteFile(file, str, strlen(str), &written, NULL);
606 static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *iface, LPCOLESTR pszFileName)
608 HTMLDocument *This = impl_from_IPersistFile(iface);
609 FIXME("(%p)->(%s)\n", This, debugstr_w(pszFileName));
613 static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *iface, LPOLESTR *pszFileName)
615 HTMLDocument *This = impl_from_IPersistFile(iface);
616 FIXME("(%p)->(%p)\n", This, pszFileName);
620 static const IPersistFileVtbl PersistFileVtbl = {
621 PersistFile_QueryInterface,
624 PersistFile_GetClassID,
628 PersistFile_SaveCompleted,
629 PersistFile_GetCurFile
632 static inline HTMLDocument *impl_from_IPersistStreamInit(IPersistStreamInit *iface)
634 return CONTAINING_RECORD(iface, HTMLDocument, IPersistStreamInit_iface);
637 static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface,
638 REFIID riid, void **ppv)
640 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
641 return htmldoc_query_interface(This, riid, ppv);
644 static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface)
646 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
647 return htmldoc_addref(This);
650 static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface)
652 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
653 return htmldoc_release(This);
656 static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID)
658 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
659 return IPersist_GetClassID(&This->IPersistFile_iface, pClassID);
662 static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface)
664 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
666 TRACE("(%p)\n", This);
668 if(This->doc_obj->usermode == EDITMODE)
669 return editor_is_dirty(This);
674 static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM pStm)
676 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
680 static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
682 TRACE("(%p)->(%p)\n", This, pStm);
684 hres = CreateURLMoniker(NULL, about_blankW, &mon);
686 WARN("CreateURLMoniker failed: %08x\n", hres);
690 hres = set_moniker(This, mon, NULL, NULL, TRUE);
691 IMoniker_Release(mon);
695 return channelbsc_load_stream(This->window->bscallback, pStm);
698 static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm,
701 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
706 TRACE("(%p)->(%p %x)\n", This, pStm, fClearDirty);
708 hres = get_doc_string(This->doc_node, &str);
712 hres = IStream_Write(pStm, str, strlen(str), &written);
714 FIXME("Write failed: %08x\n", hres);
719 set_dirty(This, VARIANT_FALSE);
724 static HRESULT WINAPI PersistStreamInit_GetSizeMax(IPersistStreamInit *iface,
725 ULARGE_INTEGER *pcbSize)
727 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
728 FIXME("(%p)->(%p)\n", This, pcbSize);
732 static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface)
734 HTMLDocument *This = impl_from_IPersistStreamInit(iface);
738 static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
740 TRACE("(%p)\n", This);
742 hres = CreateURLMoniker(NULL, about_blankW, &mon);
744 WARN("CreateURLMoniker failed: %08x\n", hres);
748 hres = set_moniker(This, mon, NULL, NULL, FALSE);
749 IMoniker_Release(mon);
753 return channelbsc_load_stream(This->window->bscallback, NULL);
756 static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
757 PersistStreamInit_QueryInterface,
758 PersistStreamInit_AddRef,
759 PersistStreamInit_Release,
760 PersistStreamInit_GetClassID,
761 PersistStreamInit_IsDirty,
762 PersistStreamInit_Load,
763 PersistStreamInit_Save,
764 PersistStreamInit_GetSizeMax,
765 PersistStreamInit_InitNew
768 /**********************************************************
769 * IPersistHistory implementation
772 static inline HTMLDocument *impl_from_IPersistHistory(IPersistHistory *iface)
774 return CONTAINING_RECORD(iface, HTMLDocument, IPersistHistory_iface);
777 static HRESULT WINAPI PersistHistory_QueryInterface(IPersistHistory *iface, REFIID riid, void **ppv)
779 HTMLDocument *This = impl_from_IPersistHistory(iface);
780 return htmldoc_query_interface(This, riid, ppv);
783 static ULONG WINAPI PersistHistory_AddRef(IPersistHistory *iface)
785 HTMLDocument *This = impl_from_IPersistHistory(iface);
786 return htmldoc_addref(This);
789 static ULONG WINAPI PersistHistory_Release(IPersistHistory *iface)
791 HTMLDocument *This = impl_from_IPersistHistory(iface);
792 return htmldoc_release(This);
795 static HRESULT WINAPI PersistHistory_GetClassID(IPersistHistory *iface, CLSID *pClassID)
797 HTMLDocument *This = impl_from_IPersistHistory(iface);
798 return IPersist_GetClassID(&This->IPersistFile_iface, pClassID);
801 static HRESULT WINAPI PersistHistory_LoadHistory(IPersistHistory *iface, IStream *pStream, IBindCtx *pbc)
803 HTMLDocument *This = impl_from_IPersistHistory(iface);
804 FIXME("(%p)->(%p %p)\n", This, pStream, pbc);
808 static HRESULT WINAPI PersistHistory_SaveHistory(IPersistHistory *iface, IStream *pStream)
810 HTMLDocument *This = impl_from_IPersistHistory(iface);
811 FIXME("(%p)->(%p)\n", This, pStream);
815 static HRESULT WINAPI PersistHistory_SetPositionCookie(IPersistHistory *iface, DWORD dwPositioncookie)
817 HTMLDocument *This = impl_from_IPersistHistory(iface);
818 FIXME("(%p)->(%x)\n", This, dwPositioncookie);
822 static HRESULT WINAPI PersistHistory_GetPositionCookie(IPersistHistory *iface, DWORD *pdwPositioncookie)
824 HTMLDocument *This = impl_from_IPersistHistory(iface);
825 FIXME("(%p)->(%p)\n", This, pdwPositioncookie);
829 static const IPersistHistoryVtbl PersistHistoryVtbl = {
830 PersistHistory_QueryInterface,
831 PersistHistory_AddRef,
832 PersistHistory_Release,
833 PersistHistory_GetClassID,
834 PersistHistory_LoadHistory,
835 PersistHistory_SaveHistory,
836 PersistHistory_SetPositionCookie,
837 PersistHistory_GetPositionCookie
840 void HTMLDocument_Persist_Init(HTMLDocument *This)
842 This->IPersistMoniker_iface.lpVtbl = &PersistMonikerVtbl;
843 This->IPersistFile_iface.lpVtbl = &PersistFileVtbl;
844 This->IMonikerProp_iface.lpVtbl = &MonikerPropVtbl;
845 This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
846 This->IPersistHistory_iface.lpVtbl = &PersistHistoryVtbl;