Module: wine Branch: master Commit: 2fc598ddb0f16852db5ed65d793df3afbb61000a URL: http://source.winehq.org/git/wine.git/?a=commit;h=2fc598ddb0f16852db5ed65d79...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Sep 12 13:14:19 2017 +0200
mshtml: Added IHTMLDocument7::get_characterSet implementation and use it in get_charset.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 418e152..f9775f8 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)