mshtml: Added IPersistStreamInit::Load implementation.
This commit is contained in:
parent
09adb8cf05
commit
920f628c6e
|
@ -347,6 +347,7 @@ void nsnode_to_nsstring(nsIDOMNode*,nsAString*);
|
||||||
|
|
||||||
BSCallback *create_bscallback(IMoniker*);
|
BSCallback *create_bscallback(IMoniker*);
|
||||||
HRESULT start_binding(BSCallback*);
|
HRESULT start_binding(BSCallback*);
|
||||||
|
HRESULT load_stream(BSCallback*,IStream*);
|
||||||
void set_document_bscallback(HTMLDocument*,BSCallback*);
|
void set_document_bscallback(HTMLDocument*,BSCallback*);
|
||||||
|
|
||||||
IHlink *Hlink_Create(void);
|
IHlink *Hlink_Create(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2006 Jacek Caban for CodeWeavers
|
* Copyright 2006-2007 Jacek Caban for CodeWeavers
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -817,3 +817,20 @@ void set_document_bscallback(HTMLDocument *doc, BSCallback *callback)
|
||||||
callback->doc = doc;
|
callback->doc = doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT load_stream(BSCallback *bscallback, IStream *stream)
|
||||||
|
{
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
const char text_html[] = "text/html";
|
||||||
|
|
||||||
|
add_nsrequest(bscallback);
|
||||||
|
|
||||||
|
bscallback->nschannel->content = mshtml_alloc(sizeof(text_html));
|
||||||
|
memcpy(bscallback->nschannel->content, text_html, sizeof(text_html));
|
||||||
|
|
||||||
|
hres = read_stream_data(bscallback, stream);
|
||||||
|
IBindStatusCallback_OnStopBinding(STATUSCLB(bscallback), hres, ERROR_SUCCESS);
|
||||||
|
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
|
@ -558,8 +558,25 @@ static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface)
|
||||||
static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM pStm)
|
static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM pStm)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = PERSTRINIT_THIS(iface);
|
HTMLDocument *This = PERSTRINIT_THIS(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, pStm);
|
IMoniker *mon;
|
||||||
return E_NOTIMPL;
|
HRESULT hres;
|
||||||
|
|
||||||
|
static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, pStm);
|
||||||
|
|
||||||
|
hres = CreateURLMoniker(NULL, about_blankW, &mon);
|
||||||
|
if(FAILED(hres)) {
|
||||||
|
WARN("CreateURLMoniker failed: %08x\n", hres);
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
hres = set_moniker(This, mon, NULL);
|
||||||
|
IMoniker_Release(mon);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
|
||||||
|
return load_stream(This->bscallback, pStm);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm,
|
static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm,
|
||||||
|
|
Loading…
Reference in New Issue