mshtml: Added IHTMLDocument::get_charset implementation.
This commit is contained in:
parent
514e65c1e9
commit
efb08f261d
|
@ -729,8 +729,19 @@ static HRESULT WINAPI HTMLDocument_put_charset(IHTMLDocument2 *iface, BSTR v)
|
||||||
static HRESULT WINAPI HTMLDocument_get_charset(IHTMLDocument2 *iface, BSTR *p)
|
static HRESULT WINAPI HTMLDocument_get_charset(IHTMLDocument2 *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
nsAString charset_str;
|
||||||
return E_NOTIMPL;
|
nsresult nsres;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
if(!This->doc_node->nsdoc) {
|
||||||
|
FIXME("NULL nsdoc\n");
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsAString_Init(&charset_str, NULL);
|
||||||
|
nsres = nsIDOMHTMLDocument_GetCharacterSet(This->doc_node->nsdoc, &charset_str);
|
||||||
|
return return_nsstr(nsres, &charset_str, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BSTR v)
|
static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BSTR v)
|
||||||
|
|
|
@ -4745,6 +4745,7 @@ static void test_defaults(IHTMLDocument2 *doc)
|
||||||
IHTMLElement2 *elem2;
|
IHTMLElement2 *elem2;
|
||||||
IHTMLElement *elem;
|
IHTMLElement *elem;
|
||||||
IHTMLStyle *style;
|
IHTMLStyle *style;
|
||||||
|
BSTR str;
|
||||||
LONG l;
|
LONG l;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
IHTMLElementCollection *collection;
|
IHTMLElementCollection *collection;
|
||||||
|
@ -4819,6 +4820,12 @@ static void test_defaults(IHTMLDocument2 *doc)
|
||||||
test_ifaces((IUnknown*)style, style_iids);
|
test_ifaces((IUnknown*)style, style_iids);
|
||||||
IHTMLStyle_Release(style);
|
IHTMLStyle_Release(style);
|
||||||
|
|
||||||
|
str = NULL;
|
||||||
|
hres = IHTMLDocument2_get_charset(doc, &str);
|
||||||
|
ok(hres == S_OK, "get_charset failed: %08x\n", hres);
|
||||||
|
ok(str && *str, "charset is empty"); /* FIXME: better tests */
|
||||||
|
SysFreeString(str);
|
||||||
|
|
||||||
test_window(doc);
|
test_window(doc);
|
||||||
test_compatmode(doc);
|
test_compatmode(doc);
|
||||||
test_location(doc);
|
test_location(doc);
|
||||||
|
|
Loading…
Reference in New Issue