From 8f3c3ca35c795c3ed708cac87c936f14840e6bf1 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sat, 25 Jun 2011 19:03:51 +0200 Subject: [PATCH] mshtml: Added IUri-based nsIURI::SetPort implementation. --- dlls/mshtml/nsio.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index c87f8e2bd6a..875abe9ddb7 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1925,9 +1925,6 @@ static nsresult NSAPI nsURI_GetPort(nsIURL *iface, PRInt32 *aPort) TRACE("(%p)->(%p)\n", This, aPort); - if(This->nsuri) - return nsIURI_GetPort(This->nsuri, aPort); - if(!ensure_uri(This)) return NS_ERROR_UNEXPECTED; @@ -1944,16 +1941,15 @@ static nsresult NSAPI nsURI_GetPort(nsIURL *iface, PRInt32 *aPort) static nsresult NSAPI nsURI_SetPort(nsIURL *iface, PRInt32 aPort) { nsWineURI *This = impl_from_nsIURL(iface); + HRESULT hres; TRACE("(%p)->(%d)\n", This, aPort); - if(This->nsuri) { - invalidate_uri(This); - return nsIURI_SetPort(This->nsuri, aPort); - } + if(!ensure_uri_builder(This)) + return NS_ERROR_UNEXPECTED; - FIXME("default action not implemented\n"); - return NS_ERROR_NOT_IMPLEMENTED; + hres = IUriBuilder_SetPort(This->uri_builder, aPort != -1, aPort); + return SUCCEEDED(hres) ? NS_OK : NS_ERROR_FAILURE; } static nsresult NSAPI nsURI_GetPath(nsIURL *iface, nsACString *aPath)