Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2f5123cb
Commit
2f5123cb
authored
Nov 21, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added nsIURI::GetOriginCharset implementation.
parent
d202daa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
+25
-9
nsio.c
dlls/mshtml/nsio.c
+25
-9
No files found.
dlls/mshtml/nsio.c
View file @
2f5123cb
...
...
@@ -63,6 +63,7 @@ struct nsWineURI {
nsChannelBSC
*
channel_bsc
;
IUri
*
uri
;
IUriBuilder
*
uri_builder
;
char
*
origin_charset
;
BOOL
is_doc_uri
;
BOOL
is_mutable
;
DWORD
scheme
;
...
...
@@ -140,7 +141,7 @@ static BOOL compare_ignoring_frag(IUri *uri1, IUri *uri2)
return
ret
;
}
static
nsresult
create_nsuri
(
IUri
*
,
HTMLOuterWindow
*
,
NSContainer
*
,
nsWineURI
**
);
static
nsresult
create_nsuri
(
IUri
*
,
HTMLOuterWindow
*
,
NSContainer
*
,
const
char
*
,
nsWineURI
**
);
static
const
char
*
debugstr_nsacstr
(
const
nsACString
*
nsstr
)
{
...
...
@@ -1847,6 +1848,7 @@ static nsrefcnt NSAPI nsURI_Release(nsIFileURL *iface)
nsIWebBrowserChrome_Release
(
&
This
->
container
->
nsIWebBrowserChrome_iface
);
if
(
This
->
uri
)
IUri_Release
(
This
->
uri
);
heap_free
(
This
->
origin_charset
);
heap_free
(
This
);
}
...
...
@@ -2309,7 +2311,8 @@ static nsresult NSAPI nsURI_Clone(nsIFileURL *iface, nsIURI **_retval)
if
(
!
ensure_uri
(
This
))
return
NS_ERROR_UNEXPECTED
;
nsres
=
create_nsuri
(
This
->
uri
,
This
->
window_ref
?
This
->
window_ref
->
window
:
NULL
,
This
->
container
,
&
wine_uri
);
nsres
=
create_nsuri
(
This
->
uri
,
This
->
window_ref
?
This
->
window_ref
->
window
:
NULL
,
This
->
container
,
This
->
origin_charset
,
&
wine_uri
);
if
(
NS_FAILED
(
nsres
))
{
WARN
(
"create_nsuri failed: %08x
\n
"
,
nsres
);
return
nsres
;
...
...
@@ -2384,8 +2387,11 @@ static nsresult NSAPI nsURI_GetAsciiHost(nsIFileURL *iface, nsACString *aAsciiHo
static
nsresult
NSAPI
nsURI_GetOriginCharset
(
nsIFileURL
*
iface
,
nsACString
*
aOriginCharset
)
{
nsWineURI
*
This
=
impl_from_nsIFileURL
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
aOriginCharset
);
return
NS_ERROR_NOT_IMPLEMENTED
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aOriginCharset
);
nsACString_SetData
(
aOriginCharset
,
This
->
origin_charset
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsURL_GetRef
(
nsIFileURL
*
iface
,
nsACString
*
aRef
)
...
...
@@ -2481,7 +2487,8 @@ static nsresult NSAPI nsURI_CloneIgnoreRef(nsIFileURL *iface, nsIURI **_retval)
if
(
!
uri
)
return
NS_ERROR_FAILURE
;
nsres
=
create_nsuri
(
uri
,
This
->
window_ref
?
This
->
window_ref
->
window
:
NULL
,
This
->
container
,
&
wine_uri
);
nsres
=
create_nsuri
(
uri
,
This
->
window_ref
?
This
->
window_ref
->
window
:
NULL
,
This
->
container
,
This
->
origin_charset
,
&
wine_uri
);
IUri_Release
(
uri
);
if
(
NS_FAILED
(
nsres
))
{
WARN
(
"create_nsuri failed: %08x
\n
"
,
nsres
);
...
...
@@ -2850,7 +2857,8 @@ static const nsIStandardURLVtbl nsStandardURLVtbl = {
nsStandardURL_Init
};
static
nsresult
create_nsuri
(
IUri
*
iuri
,
HTMLOuterWindow
*
window
,
NSContainer
*
container
,
nsWineURI
**
_retval
)
static
nsresult
create_nsuri
(
IUri
*
iuri
,
HTMLOuterWindow
*
window
,
NSContainer
*
container
,
const
char
*
origin_charset
,
nsWineURI
**
_retval
)
{
nsWineURI
*
ret
;
HRESULT
hres
;
...
...
@@ -2874,6 +2882,14 @@ static nsresult create_nsuri(IUri *iuri, HTMLOuterWindow *window, NSContainer *c
if
(
FAILED
(
hres
))
ret
->
scheme
=
URL_SCHEME_UNKNOWN
;
if
(
origin_charset
&&
*
origin_charset
&&
strcmp
(
origin_charset
,
"UTF-8"
))
{
ret
->
origin_charset
=
heap_strdupA
(
origin_charset
);
if
(
!
ret
->
origin_charset
)
{
nsIFileURL_Release
(
&
ret
->
nsIFileURL_iface
);
return
NS_ERROR_OUT_OF_MEMORY
;
}
}
TRACE
(
"retval=%p
\n
"
,
ret
);
*
_retval
=
ret
;
return
NS_OK
;
...
...
@@ -2890,7 +2906,7 @@ HRESULT create_doc_uri(HTMLOuterWindow *window, const WCHAR *url, nsWineURI **re
if
(
FAILED
(
hres
))
return
hres
;
nsres
=
create_nsuri
(
iuri
,
window
,
window
->
doc_obj
->
nscontainer
,
&
uri
);
nsres
=
create_nsuri
(
iuri
,
window
,
window
->
doc_obj
->
nscontainer
,
NULL
,
&
uri
);
IUri_Release
(
iuri
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
...
...
@@ -2942,7 +2958,7 @@ HRESULT create_redirect_nschannel(const WCHAR *url, nsChannel *orig_channel, nsC
if
(
orig_channel
->
uri
->
window_ref
)
window
=
orig_channel
->
uri
->
window_ref
->
window
;
nsres
=
create_nsuri
(
iuri
,
window
,
NULL
,
&
uri
);
nsres
=
create_nsuri
(
iuri
,
window
,
NULL
,
NULL
,
&
uri
);
IUri_Release
(
iuri
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
...
...
@@ -3257,7 +3273,7 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString *
if
(
FAILED
(
hres
))
return
nsIIOService_NewURI
(
nsio
,
aSpec
,
aOriginCharset
,
aBaseURI
,
_retval
);
nsres
=
create_nsuri
(
urlmon_uri
,
window
,
NULL
,
&
wine_uri
);
nsres
=
create_nsuri
(
urlmon_uri
,
window
,
NULL
,
NULL
,
&
wine_uri
);
IUri_Release
(
urlmon_uri
);
if
(
base_wine_uri
)
nsIFileURL_Release
(
&
base_wine_uri
->
nsIFileURL_iface
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment