mshtml: Added nsIURI::SetSpec implementation.

This commit is contained in:
Jacek Caban 2011-02-03 20:47:58 +01:00 committed by Alexandre Julliard
parent 680f251220
commit a1205c6adc
1 changed files with 24 additions and 6 deletions

View File

@ -1654,16 +1654,34 @@ static nsresult NSAPI nsURI_GetSpec(nsIURL *iface, nsACString *aSpec)
static nsresult NSAPI nsURI_SetSpec(nsIURL *iface, const nsACString *aSpec)
{
nsWineURI *This = impl_from_nsIURL(iface);
const char *speca;
WCHAR *spec;
IUri *uri;
HRESULT hres;
TRACE("(%p)->(%p)\n", This, debugstr_nsacstr(aSpec));
TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aSpec));
if(This->nsuri) {
invalidate_uri(This);
return nsIURI_SetSpec(This->nsuri, aSpec);
nsACString_GetData(aSpec, &speca);
spec = heap_strdupAtoW(speca);
if(!spec)
return NS_ERROR_OUT_OF_MEMORY;
hres = CreateUri(spec, 0, 0, &uri);
heap_free(spec);
if(FAILED(hres)) {
WARN("CreateUri failed: %08x\n", hres);
return NS_ERROR_FAILURE;
}
FIXME("default action not implemented\n");
return NS_ERROR_NOT_IMPLEMENTED;
invalidate_uri(This);
if(This->uri_builder) {
IUriBuilder_Release(This->uri_builder);
This->uri_builder = NULL;
}
This->uri = uri;
sync_wine_url(This);
return NS_OK;
}
static nsresult NSAPI nsURI_GetPrePath(nsIURL *iface, nsACString *aPrePath)