Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
24603b01
Commit
24603b01
authored
Mar 08, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move TranslateUrl call to before_async_open.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
73cca44b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
34 deletions
+15
-34
nsio.c
dlls/mshtml/nsio.c
+15
-34
No files found.
dlls/mshtml/nsio.c
View file @
24603b01
...
...
@@ -252,6 +252,20 @@ static nsresult before_async_open(nsChannel *channel, NSContainer *container, BO
if
(
FAILED
(
hres
))
return
NS_ERROR_FAILURE
;
if
(
doc
->
hostui
)
{
OLECHAR
*
new_url
;
hres
=
IDocHostUIHandler_TranslateUrl
(
doc
->
hostui
,
0
,
display_uri
,
&
new_url
);
if
(
hres
==
S_OK
&&
new_url
)
{
if
(
strcmpW
(
display_uri
,
new_url
))
{
FIXME
(
"TranslateUrl returned new URL %s -> %s
\n
"
,
debugstr_w
(
display_uri
),
debugstr_w
(
new_url
));
CoTaskMemFree
(
new_url
);
*
cancel
=
TRUE
;
return
NS_OK
;
}
CoTaskMemFree
(
new_url
);
}
}
if
(
!
exec_shldocvw_67
(
doc
,
display_uri
))
{
SysFreeString
(
display_uri
);
*
cancel
=
FALSE
;
...
...
@@ -3859,33 +3873,6 @@ static const nsIIOServiceHookVtbl nsIOServiceHookVtbl = {
static
nsIIOServiceHook
nsIOServiceHook
=
{
&
nsIOServiceHookVtbl
};
static
BOOL
translate_url
(
HTMLDocumentObj
*
doc
,
nsWineURI
*
uri
)
{
OLECHAR
*
new_url
=
NULL
;
WCHAR
*
url
;
BOOL
ret
=
FALSE
;
HRESULT
hres
;
if
(
!
doc
->
hostui
||
!
ensure_uri
(
uri
))
return
FALSE
;
hres
=
IUri_GetDisplayUri
(
uri
->
uri
,
&
url
);
if
(
FAILED
(
hres
))
return
FALSE
;
hres
=
IDocHostUIHandler_TranslateUrl
(
doc
->
hostui
,
0
,
url
,
&
new_url
);
if
(
hres
==
S_OK
&&
new_url
)
{
if
(
strcmpW
(
url
,
new_url
))
{
FIXME
(
"TranslateUrl returned new URL %s -> %s
\n
"
,
debugstr_w
(
url
),
debugstr_w
(
new_url
));
ret
=
TRUE
;
}
CoTaskMemFree
(
new_url
);
}
SysFreeString
(
url
);
return
ret
;
}
nsresult
on_start_uri_open
(
NSContainer
*
nscontainer
,
nsIURI
*
uri
,
cpp_bool
*
_retval
)
{
nsWineURI
*
wine_uri
;
...
...
@@ -3899,13 +3886,7 @@ nsresult on_start_uri_open(NSContainer *nscontainer, nsIURI *uri, cpp_bool *_ret
return
NS_ERROR_NOT_IMPLEMENTED
;
}
if
(
!
wine_uri
->
is_doc_uri
)
{
wine_uri
->
is_doc_uri
=
TRUE
;
if
(
nscontainer
->
doc
)
*
_retval
=
translate_url
(
nscontainer
->
doc
,
wine_uri
);
}
wine_uri
->
is_doc_uri
=
TRUE
;
nsIFileURL_Release
(
&
wine_uri
->
nsIFileURL_iface
);
return
NS_OK
;
}
...
...
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