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
d98bb11f
Commit
d98bb11f
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: Get rid of use_wine_url.
parent
e58f9df6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
52 deletions
+12
-52
nsio.c
dlls/mshtml/nsio.c
+12
-52
No files found.
dlls/mshtml/nsio.c
View file @
d98bb11f
...
...
@@ -66,7 +66,6 @@ struct nsWineURI {
LPWSTR
wine_url
;
IUri
*
uri
;
BOOL
is_doc_uri
;
BOOL
use_wine_url
;
};
#define NSURI(x) ((nsIURI*) &(x)->lpIURLVtbl)
...
...
@@ -246,10 +245,6 @@ nsresult on_start_uri_open(NSContainer *nscontainer, nsIURI *uri, PRBool *_retva
HRESULT
set_wine_url
(
nsWineURI
*
This
,
LPCWSTR
url
)
{
static
const
WCHAR
wszFtp
[]
=
{
'f'
,
't'
,
'p'
,
':'
};
static
const
WCHAR
wszHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
};
static
const
WCHAR
wszHttps
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
's'
,
':'
};
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
url
));
if
(
url
)
{
...
...
@@ -260,20 +255,9 @@ HRESULT set_wine_url(nsWineURI *This, LPCWSTR url)
return
E_OUTOFMEMORY
;
heap_free
(
This
->
wine_url
);
This
->
wine_url
=
new_url
;
if
(
This
->
nsuri
)
{
/* FIXME: Always use wine url */
This
->
use_wine_url
=
strncmpW
(
url
,
wszFtp
,
sizeof
(
wszFtp
)
/
sizeof
(
WCHAR
))
&&
strncmpW
(
url
,
wszHttp
,
sizeof
(
wszHttp
)
/
sizeof
(
WCHAR
))
&&
strncmpW
(
url
,
wszHttps
,
sizeof
(
wszHttps
)
/
sizeof
(
WCHAR
));
}
else
{
This
->
use_wine_url
=
TRUE
;
}
}
else
{
heap_free
(
This
->
wine_url
);
This
->
wine_url
=
NULL
;
This
->
use_wine_url
=
FALSE
;
}
return
S_OK
;
...
...
@@ -1657,23 +1641,13 @@ static nsrefcnt NSAPI nsURI_Release(nsIURL *iface)
static
nsresult
NSAPI
nsURI_GetSpec
(
nsIURL
*
iface
,
nsACString
*
aSpec
)
{
nsWineURI
*
This
=
NSURI_THIS
(
iface
);
char
speca
[
INTERNET_MAX_URL_LENGTH
];
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aSpec
);
if
(
This
->
use_wine_url
)
{
char
speca
[
INTERNET_MAX_URL_LENGTH
];
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
wine_url
,
-
1
,
speca
,
sizeof
(
speca
),
NULL
,
NULL
);
nsACString_SetData
(
aSpec
,
speca
);
return
NS_OK
;
}
if
(
This
->
nsuri
)
return
nsIURI_GetSpec
(
This
->
nsuri
,
aSpec
);
TRACE
(
"returning error
\n
"
);
return
NS_ERROR_NOT_IMPLEMENTED
;
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
wine_url
,
-
1
,
speca
,
sizeof
(
speca
),
NULL
,
NULL
);
nsACString_SetData
(
aSpec
,
speca
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsURI_SetSpec
(
nsIURL
*
iface
,
const
nsACString
*
aSpec
)
...
...
@@ -2016,24 +1990,17 @@ static nsresult NSAPI nsURI_Equals(nsIURL *iface, nsIURI *other, PRBool *_retval
static
nsresult
NSAPI
nsURI_SchemeIs
(
nsIURL
*
iface
,
const
char
*
scheme
,
PRBool
*
_retval
)
{
nsWineURI
*
This
=
NSURI_THIS
(
iface
);
WCHAR
buf
[
INTERNET_MAX_SCHEME_LENGTH
];
int
len
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_a
(
scheme
),
_retval
);
if
(
This
->
use_wine_url
)
{
WCHAR
buf
[
INTERNET_MAX_SCHEME_LENGTH
];
int
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
scheme
,
-
1
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
))
-
1
;
*
_retval
=
lstrlenW
(
This
->
wine_url
)
>
len
&&
This
->
wine_url
[
len
]
==
':'
&&
!
memcmp
(
buf
,
This
->
wine_url
,
len
*
sizeof
(
WCHAR
));
return
NS_OK
;
}
if
(
This
->
nsuri
)
return
nsIURI_SchemeIs
(
This
->
nsuri
,
scheme
,
_retval
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
scheme
,
-
1
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
))
-
1
;
TRACE
(
"returning error
\n
"
);
return
NS_ERROR_NOT_IMPLEMENTED
;
*
_retval
=
lstrlenW
(
This
->
wine_url
)
>
len
&&
This
->
wine_url
[
len
]
==
':'
&&
!
memcmp
(
buf
,
This
->
wine_url
,
len
*
sizeof
(
WCHAR
));
return
NS_OK
;
}
static
nsresult
NSAPI
nsURI_Clone
(
nsIURL
*
iface
,
nsIURI
**
_retval
)
...
...
@@ -2116,14 +2083,7 @@ static nsresult NSAPI nsURI_GetAsciiSpec(nsIURL *iface, nsACString *aAsciiSpec)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aAsciiSpec
);
if
(
This
->
use_wine_url
)
return
nsIURI_GetSpec
(
NSURI
(
This
),
aAsciiSpec
);
if
(
This
->
nsuri
)
return
nsIURI_GetAsciiSpec
(
This
->
nsuri
,
aAsciiSpec
);
TRACE
(
"returning error
\n
"
);
return
NS_ERROR_NOT_IMPLEMENTED
;
return
nsIURI_GetSpec
(
NSURI
(
This
),
aAsciiSpec
);
}
static
nsresult
NSAPI
nsURI_GetAsciiHost
(
nsIURL
*
iface
,
nsACString
*
aAsciiHost
)
...
...
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