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
e58f9df6
Commit
e58f9df6
authored
Sep 29, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use IUri for nsIURI::GetScheme implementation.
parent
d1e9a093
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
nsio.c
dlls/mshtml/nsio.c
+11
-17
No files found.
dlls/mshtml/nsio.c
View file @
e58f9df6
...
...
@@ -1707,32 +1707,26 @@ static nsresult NSAPI nsURI_GetPrePath(nsIURL *iface, nsACString *aPrePath)
static
nsresult
NSAPI
nsURI_GetScheme
(
nsIURL
*
iface
,
nsACString
*
aScheme
)
{
nsWineURI
*
This
=
NSURI_THIS
(
iface
);
DWORD
scheme
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aScheme
);
if
(
This
->
use_wine_url
)
{
char
scheme
[
INTERNET_MAX_SCHEME_LENGTH
+
1
];
WCHAR
*
ptr
;
int
len
;
if
(
!
ensure_uri
(
This
))
return
NS_ERROR_UNEXPECTED
;
ptr
=
strchrW
(
This
->
wine_url
,
':'
);
if
(
!
ptr
)
{
nsACString_SetData
(
aScheme
,
"wine"
);
return
NS_OK
;
hres
=
IUri_GetScheme
(
This
->
uri
,
&
scheme
);
if
(
FAILED
(
hres
)
)
{
WARN
(
"GetScheme failed: %08x
\n
"
,
hres
);
return
NS_ERROR_UNEXPECTED
;
}
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
wine_url
,
ptr
-
This
->
wine_url
,
scheme
,
sizeof
(
scheme
),
NULL
,
NULL
);
scheme
[
min
(
len
,
sizeof
(
scheme
)
-
1
)]
=
0
;
nsACString_SetData
(
aScheme
,
strcmp
(
scheme
,
"about"
)
?
scheme
:
"wine"
);
if
(
scheme
==
URL_SCHEME_ABOUT
)
{
nsACString_SetData
(
aScheme
,
"wine"
);
return
NS_OK
;
}
if
(
This
->
nsuri
)
return
nsIURI_GetScheme
(
This
->
nsuri
,
aScheme
);
TRACE
(
"returning error
\n
"
);
return
NS_ERROR_NOT_IMPLEMENTED
;
return
get_uri_string
(
This
,
Uri_PROPERTY_SCHEME_NAME
,
aScheme
);
}
static
nsresult
NSAPI
nsURI_SetScheme
(
nsIURL
*
iface
,
const
nsACString
*
aScheme
)
...
...
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