mshtml: Added IHTMLScriptElement::get_scr implementation.
This commit is contained in:
parent
f01d831b9b
commit
96efe799c1
|
@ -106,8 +106,14 @@ static HRESULT WINAPI HTMLScriptElement_put_src(IHTMLScriptElement *iface, BSTR
|
|||
static HRESULT WINAPI HTMLScriptElement_get_src(IHTMLScriptElement *iface, BSTR *p)
|
||||
{
|
||||
HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
nsAString src_str;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
nsAString_Init(&src_str, NULL);
|
||||
nsres = nsIDOMHTMLScriptElement_GetSrc(This->nsscript, &src_str);
|
||||
return return_nsstr(nsres, &src_str, p);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLScriptElement_put_htmlFor(IHTMLScriptElement *iface, BSTR v)
|
||||
|
|
|
@ -781,6 +781,7 @@ void nsAString_InitDepend(nsAString*,const PRUnichar*);
|
|||
void nsAString_SetData(nsAString*,const PRUnichar*);
|
||||
PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**);
|
||||
void nsAString_Finish(nsAString*);
|
||||
HRESULT return_nsstr(nsresult,nsAString*,BSTR*);
|
||||
|
||||
nsICommandParams *create_nscommand_params(void);
|
||||
HRESULT nsnode_to_nsstring(nsIDOMNode*,nsAString*);
|
||||
|
|
|
@ -733,6 +733,30 @@ void nsAString_Finish(nsAString *str)
|
|||
NS_StringContainerFinish(str);
|
||||
}
|
||||
|
||||
HRESULT return_nsstr(nsresult nsres, nsAString *nsstr, BSTR *p)
|
||||
{
|
||||
const PRUnichar *str;
|
||||
|
||||
if(NS_FAILED(nsres)) {
|
||||
ERR("failed: %08x\n", nsres);
|
||||
nsAString_Finish(nsstr);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
nsAString_GetData(nsstr, &str);
|
||||
TRACE("ret %s\n", debugstr_w(str));
|
||||
if(*str) {
|
||||
*p = SysAllocString(str);
|
||||
if(!*p)
|
||||
return E_OUTOFMEMORY;
|
||||
}else {
|
||||
*p = NULL;
|
||||
}
|
||||
|
||||
nsAString_Finish(nsstr);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
nsICommandParams *create_nscommand_params(void)
|
||||
{
|
||||
nsICommandParams *ret = NULL;
|
||||
|
|
|
@ -6211,6 +6211,11 @@ static void test_elems(IHTMLDocument2 *doc)
|
|||
|
||||
hres = IHTMLScriptElement_put_defer(script, VARIANT_FALSE);
|
||||
ok(hres == S_OK, "put_defer failed: %08x\n", hres);
|
||||
|
||||
str = (BSTR)0xdeadbeef;
|
||||
hres = IHTMLScriptElement_get_src(script, &str);
|
||||
ok(hres == S_OK, "get_src failed: %08x\n", hres);
|
||||
ok(!str, "src = %s\n", wine_dbgstr_w(str));
|
||||
}
|
||||
|
||||
IHTMLScriptElement_Release(script);
|
||||
|
|
Loading…
Reference in New Issue