mshtml: Added PutProperty implementation.
This commit is contained in:
parent
1f26b146d1
commit
7514283d73
|
@ -185,6 +185,7 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
|
|||
if(This->window)
|
||||
IHTMLWindow2_Release(HTMLWINDOW2(This->window));
|
||||
|
||||
heap_free(This->mime);
|
||||
detach_selection(This);
|
||||
detach_ranges(This);
|
||||
release_nodes(This);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "hlink.h"
|
||||
|
||||
#include "wine/list.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#ifdef INIT_GUID
|
||||
#include "initguid.h"
|
||||
|
@ -155,6 +156,7 @@ struct HTMLDocument {
|
|||
BOOL has_key_path;
|
||||
BOOL container_locked;
|
||||
BOOL focus;
|
||||
LPWSTR mime;
|
||||
|
||||
DWORD update;
|
||||
|
||||
|
@ -561,6 +563,22 @@ static inline BOOL heap_free(void *mem)
|
|||
return HeapFree(GetProcessHeap(), 0, mem);
|
||||
}
|
||||
|
||||
static inline LPWSTR heap_strdupW(LPCWSTR str)
|
||||
{
|
||||
LPWSTR ret = NULL;
|
||||
|
||||
if(str) {
|
||||
DWORD size;
|
||||
|
||||
size = (strlenW(str)+1)*sizeof(WCHAR);
|
||||
ret = heap_alloc(size);
|
||||
memcpy(ret, str, size);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
HINSTANCE get_shdoclc(void);
|
||||
|
||||
extern HINSTANCE hInst;
|
||||
|
|
|
@ -212,8 +212,8 @@ static HRESULT read_stream_data(BSCallback *This, IStream *stream)
|
|||
break;
|
||||
|
||||
if(!This->readed && This->nsstream->buf_size >= 2 && *(WORD*)This->nsstream->buf == 0xfeff) {
|
||||
This->nschannel->charset = heap_alloc(sizeof(UTF16_STR));
|
||||
memcpy(This->nschannel->charset, UTF16_STR, sizeof(UTF16_STR));
|
||||
This->nschannel->charset = heap_alloc(sizeof(UTF16_STR));
|
||||
memcpy(This->nschannel->charset, UTF16_STR, sizeof(UTF16_STR));
|
||||
}
|
||||
|
||||
if(!This->readed) {
|
||||
|
@ -887,6 +887,16 @@ void set_document_bscallback(HTMLDocument *doc, BSCallback *callback)
|
|||
if(callback) {
|
||||
IBindStatusCallback_AddRef(STATUSCLB(callback));
|
||||
callback->doc = doc;
|
||||
|
||||
if(doc->mime) {
|
||||
DWORD len;
|
||||
|
||||
heap_free(callback->nschannel->content);
|
||||
|
||||
len = WideCharToMultiByte(CP_ACP, 0, doc->mime, -1, NULL, 0, NULL, NULL);
|
||||
callback->nschannel->content = heap_alloc(len);
|
||||
WideCharToMultiByte(CP_ACP, 0, doc->mime, -1, callback->nschannel->content, -1, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -502,8 +502,24 @@ static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
|
|||
static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
|
||||
{
|
||||
HTMLDocument *This = MONPROP_THIS(iface);
|
||||
FIXME("(%p)->(%d %s)\n", This, mkp, debugstr_w(val));
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%d %s)\n", This, mkp, debugstr_w(val));
|
||||
|
||||
switch(mkp) {
|
||||
case MIMETYPEPROP:
|
||||
heap_free(This->mime);
|
||||
This->mime = heap_strdupW(val);
|
||||
break;
|
||||
|
||||
case CLASSIDPROP:
|
||||
break;
|
||||
|
||||
default:
|
||||
FIXME("mkp %d\n", mkp);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IMonikerPropVtbl MonikerPropVtbl = {
|
||||
|
@ -743,4 +759,5 @@ void HTMLDocument_Persist_Init(HTMLDocument *This)
|
|||
This->bscallback = NULL;
|
||||
This->mon = NULL;
|
||||
This->url = NULL;
|
||||
This->mime = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue