Jacek Caban : mshtml: Added nsIFileURL::GetFile implementation.
Alexandre Julliard
julliard at winehq.org
Fri Jul 20 15:29:59 CDT 2012
Module: wine
Branch: master
Commit: 5e5129935fdbb486fbe3a47ffb231a13fabfcf8a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5e5129935fdbb486fbe3a47ffb231a13fabfcf8a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jul 20 12:36:50 2012 +0200
mshtml: Added nsIFileURL::GetFile implementation.
---
dlls/mshtml/mshtml_private.h | 1 +
dlls/mshtml/nsembed.c | 2 +-
dlls/mshtml/nsio.c | 15 +++++++++++++--
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index f006176..04b5b1e 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -781,6 +781,7 @@ HRESULT nsnode_to_nsstring(nsIDOMNode*,nsAString*) DECLSPEC_HIDDEN;
void get_editor_controller(NSContainer*) DECLSPEC_HIDDEN;
nsresult get_nsinterface(nsISupports*,REFIID,void**) DECLSPEC_HIDDEN;
nsIWritableVariant *create_nsvariant(void) DECLSPEC_HIDDEN;
+nsresult create_nsfile(const PRUnichar*,nsIFile**) DECLSPEC_HIDDEN;
HRESULT create_pending_window(HTMLOuterWindow*,nsChannelBSC*) DECLSPEC_HIDDEN;
void set_current_mon(HTMLOuterWindow*,IMoniker*) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index 5ae78d5..9ab0a9b 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -79,7 +79,7 @@ static ATOM nscontainer_class;
static WCHAR gecko_path[MAX_PATH];
static unsigned gecko_path_len;
-static nsresult create_nsfile(const PRUnichar *path, nsIFile **ret)
+nsresult create_nsfile(const PRUnichar *path, nsIFile **ret)
{
nsAString str;
nsresult nsres;
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index c0b04d1..4c07706 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -2705,8 +2705,19 @@ static nsresult NSAPI nsURL_GetRelativeSpec(nsIFileURL *iface, nsIURI *aURIToCom
static nsresult NSAPI nsFileURL_GetFile(nsIFileURL *iface, nsIFile **aFile)
{
nsWineURI *This = impl_from_nsIFileURL(iface);
- FIXME("(%p)->(%p)\n", This, aFile);
- return NS_ERROR_NOT_IMPLEMENTED;
+ WCHAR path[MAX_PATH];
+ DWORD size;
+ HRESULT hres;
+
+ TRACE("(%p)->(%p)\n", This, aFile);
+
+ hres = CoInternetParseIUri(This->uri, PARSE_PATH_FROM_URL, 0, path, sizeof(path)/sizeof(WCHAR), &size, 0);
+ if(FAILED(hres)) {
+ WARN("CoInternetParseIUri failed: %08x\n", hres);
+ return NS_ERROR_FAILURE;
+ }
+
+ return create_nsfile(path, aFile);
}
static nsresult NSAPI nsFileURL_SetFile(nsIFileURL *iface, nsIFile *aFile)
More information about the wine-cvs
mailing list