Jacek Caban : mshtml: Added nsIChannel::SetContentCharset implementation.

Alexandre Julliard julliard at winehq.org
Wed Nov 23 13:40:07 CST 2011


Module: wine
Branch: master
Commit: 3a3daead74927c1871d0dac4bf1df75a8d1ea4dc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3a3daead74927c1871d0dac4bf1df75a8d1ea4dc

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Nov 23 16:18:53 2011 +0100

mshtml: Added nsIChannel::SetContentCharset implementation.

---

 dlls/mshtml/nsio.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 59f9c2f..faf40ed 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -802,10 +802,19 @@ static nsresult NSAPI nsChannel_SetContentCharset(nsIHttpChannel *iface,
                                                   const nsACString *aContentCharset)
 {
     nsChannel *This = impl_from_nsIHttpChannel(iface);
+    const char *data;
+    char *charset;
 
-    FIXME("(%p)->(%s)\n", This, debugstr_nsacstr(aContentCharset));
+    TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aContentCharset));
 
-    return NS_ERROR_NOT_IMPLEMENTED;
+    nsACString_GetData(aContentCharset, &data);
+    charset = heap_strdupA(data);
+    if(!charset)
+        return NS_ERROR_OUT_OF_MEMORY;
+
+    heap_free(This->charset);
+    This->charset = charset;
+    return NS_OK;
 }
 
 static nsresult NSAPI nsChannel_GetContentLength(nsIHttpChannel *iface, PRInt32 *aContentLength)




More information about the wine-cvs mailing list