From 0fbb175d64da106bcc8d7c92e745bee4d518854d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 3 Aug 2006 21:38:08 +0200 Subject: [PATCH] mshtml: Added nsInputStream::Read implementation. --- dlls/mshtml/navigate.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 8dc4a14916f..ecd83333ee7 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -108,8 +108,19 @@ static nsresult NSAPI nsInputStream_Read(nsIInputStream *iface, char *aBuf, PRUi PRUint32 *_retval) { nsProtocolStream *This = NSINSTREAM_THIS(iface); - FIXME("(%p)->(%p %ld %p)\n", This, aBuf, aCount, _retval); - return NS_ERROR_NOT_IMPLEMENTED; + + TRACE("(%p)->(%p %ld %p)\n", This, aBuf, aCount, _retval); + + /* Gecko always calls Read with big enough buffer */ + if(aCount < This->buf_size) + FIXME("aCount < This->buf_size\n"); + + *_retval = This->buf_size; + if(This->buf_size) + memcpy(aBuf, This->buf, This->buf_size); + This->buf_size = 0; + + return NS_OK; } static nsresult NSAPI nsInputStream_ReadSegments(nsIInputStream *iface,