Jacek Caban : mshtml: Use IUri for IHTMLLocation::get_search implementation .
Alexandre Julliard
julliard at winehq.org
Tue Jan 3 12:52:53 CST 2012
Module: wine
Branch: master
Commit: 4d4955f248e1e1cf23d1fba96ef1c0dc9ec3cec9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4d4955f248e1e1cf23d1fba96ef1c0dc9ec3cec9
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Jan 2 17:04:09 2012 +0100
mshtml: Use IUri for IHTMLLocation::get_search implementation.
---
dlls/mshtml/htmllocation.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c
index e386d17..ffe72a0 100644
--- a/dlls/mshtml/htmllocation.c
+++ b/dlls/mshtml/htmllocation.c
@@ -478,31 +478,29 @@ static HRESULT WINAPI HTMLLocation_put_search(IHTMLLocation *iface, BSTR v)
static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
{
HTMLLocation *This = impl_from_IHTMLLocation(iface);
- URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
+ BSTR query;
HRESULT hres;
- const WCHAR hash[] = {'#',0};
TRACE("(%p)->(%p)\n", This, p);
if(!p)
return E_POINTER;
- url.dwExtraInfoLength = 1;
- hres = get_url_components(This, &url);
- if(FAILED(hres))
- return hres;
+ if(!This->window || !This->window->uri) {
+ FIXME("No current URI\n");
+ return E_NOTIMPL;
+ }
- if(!url.dwExtraInfoLength){
+ hres = IUri_GetQuery(This->window->uri, &query);
+ if(hres == S_OK) {
+ *p = query;
+ }else if(hres == S_FALSE) {
+ SysFreeString(query);
*p = NULL;
- return S_OK;
+ }else {
+ return hres;
}
- url.dwExtraInfoLength = strcspnW(url.lpszExtraInfo, hash);
-
- *p = SysAllocStringLen(url.lpszExtraInfo, url.dwExtraInfoLength);
-
- if(!*p)
- return E_OUTOFMEMORY;
return S_OK;
}
More information about the wine-cvs
mailing list