From 2fc598ddb0f16852db5ed65d793df3afbb61000a Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 12 Sep 2017 13:14:19 +0200 Subject: [PATCH] mshtml: Added IHTMLDocument7::get_characterSet implementation and use it in get_charset. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmldoc.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 418e152e7c6..f9775f83a1c 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -918,19 +918,10 @@ static HRESULT WINAPI HTMLDocument_put_charset(IHTMLDocument2 *iface, BSTR v) static HRESULT WINAPI HTMLDocument_get_charset(IHTMLDocument2 *iface, BSTR *p) { HTMLDocument *This = impl_from_IHTMLDocument2(iface); - nsAString charset_str; - 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); + return IHTMLDocument7_get_characterSet(&This->IHTMLDocument7_iface, p); } static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BSTR v) @@ -3321,8 +3312,19 @@ static HRESULT WINAPI HTMLDocument7_get_onmsthumbnailclick(IHTMLDocument7 *iface static HRESULT WINAPI HTMLDocument7_get_characterSet(IHTMLDocument7 *iface, BSTR *p) { HTMLDocument *This = impl_from_IHTMLDocument7(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString charset_str; + 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 HTMLDocument7_createElement(IHTMLDocument7 *iface, BSTR bstrTag, IHTMLElement **newElem)