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
7a0363cd
Commit
7a0363cd
authored
Jun 23, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use IUri instead of wine_url in before_async_open.
parent
f7b8eccd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
17 deletions
+34
-17
nsio.c
dlls/mshtml/nsio.c
+34
-17
No files found.
dlls/mshtml/nsio.c
View file @
7a0363cd
...
...
@@ -126,7 +126,7 @@ HRESULT nsuri_to_url(LPCWSTR nsuri, BOOL ret_empty, BSTR *ret)
return
S_OK
;
}
static
BOOL
exec_shldocvw_67
(
HTMLDocumentObj
*
doc
,
LPCW
STR
url
)
static
BOOL
exec_shldocvw_67
(
HTMLDocumentObj
*
doc
,
B
STR
url
)
{
IOleCommandTarget
*
cmdtrg
=
NULL
;
HRESULT
hres
;
...
...
@@ -136,13 +136,12 @@ static BOOL exec_shldocvw_67(HTMLDocumentObj *doc, LPCWSTR url)
VARIANT
varUrl
,
varRes
;
V_VT
(
&
varUrl
)
=
VT_BSTR
;
V_BSTR
(
&
varUrl
)
=
SysAllocString
(
url
)
;
V_BSTR
(
&
varUrl
)
=
url
;
V_VT
(
&
varRes
)
=
VT_BOOL
;
hres
=
IOleCommandTarget_Exec
(
cmdtrg
,
&
CGID_ShellDocView
,
67
,
0
,
&
varUrl
,
&
varRes
);
IOleCommandTarget_Release
(
cmdtrg
);
SysFreeString
(
V_BSTR
(
&
varUrl
));
if
(
SUCCEEDED
(
hres
)
&&
!
V_BOOL
(
&
varRes
))
{
TRACE
(
"got VARIANT_FALSE, do not load
\n
"
);
...
...
@@ -153,11 +152,10 @@ static BOOL exec_shldocvw_67(HTMLDocumentObj *doc, LPCWSTR url)
return
TRUE
;
}
static
BOOL
before_async_open
(
nsChannel
*
channel
,
NSContainer
*
container
)
static
nsresult
before_async_open
(
nsChannel
*
channel
,
NSContainer
*
container
,
BOOL
*
cancel
)
{
HTMLDocumentObj
*
doc
=
container
->
doc
;
DWORD
hlnf
=
0
;
BOOL
cancel
;
HRESULT
hres
;
if
(
!
doc
)
{
...
...
@@ -169,14 +167,31 @@ static BOOL before_async_open(nsChannel *channel, NSContainer *container)
doc
=
container_iter
->
doc
;
}
if
(
!
doc
->
client
)
return
TRUE
;
if
(
!
doc
->
client
)
{
*
cancel
=
TRUE
;
return
NS_OK
;
}
if
(
!
hlnf
&&
!
exec_shldocvw_67
(
doc
,
channel
->
uri
->
wine_url
))
return
FALSE
;
if
(
!
hlnf
)
{
BSTR
display_uri
;
BOOL
b
;
hres
=
IUri_GetDisplayUri
(
channel
->
uri
->
uri
,
&
display_uri
);
if
(
FAILED
(
hres
))
return
NS_ERROR_FAILURE
;
hres
=
hlink_frame_navigate
(
&
doc
->
basedoc
,
channel
->
uri
->
wine_url
,
channel
,
hlnf
,
&
cancel
);
return
FAILED
(
hres
)
||
cancel
;
b
=
!
exec_shldocvw_67
(
doc
,
display_uri
);
SysFreeString
(
display_uri
);
if
(
b
)
{
*
cancel
=
FALSE
;
return
NS_OK
;
}
}
hres
=
hlink_frame_navigate
(
&
doc
->
basedoc
,
channel
->
uri
->
wine_url
,
channel
,
hlnf
,
cancel
);
if
(
FAILED
(
hres
))
*
cancel
=
TRUE
;
return
NS_OK
;
}
HRESULT
load_nsuri
(
HTMLWindow
*
window
,
nsWineURI
*
uri
,
nsChannelBSC
*
channelbsc
,
DWORD
flags
)
...
...
@@ -948,7 +963,7 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
{
nsChannel
*
This
=
impl_from_nsIHttpChannel
(
iface
);
HTMLWindow
*
window
=
NULL
;
BOOL
open
=
TRU
E
;
BOOL
cancel
=
FALS
E
;
nsresult
nsres
=
NS_OK
;
TRACE
(
"(%p)->(%p %p) opening %s
\n
"
,
This
,
aListener
,
aContext
,
debugstr_w
(
This
->
uri
->
wine_url
));
...
...
@@ -967,7 +982,9 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
if
(
This
->
uri
->
container
->
doc
)
FIXME
(
"nscontainer->doc = %p
\n
"
,
This
->
uri
->
container
->
doc
);
b
=
before_async_open
(
This
,
This
->
uri
->
container
);
nsres
=
before_async_open
(
This
,
This
->
uri
->
container
,
&
b
);
if
(
NS_FAILED
(
nsres
))
return
nsres
;
if
(
b
)
FIXME
(
"Navigation not cancelled
\n
"
);
return
NS_ERROR_UNEXPECTED
;
...
...
@@ -1003,17 +1020,17 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
This
->
content_type
=
heap_strdupWtoA
(
window
->
doc_obj
->
mime
);
}
open
=
FALS
E
;
cancel
=
TRU
E
;
}
else
{
open
=
!
before_async_open
(
This
,
window
->
doc_obj
->
nscontainer
);
if
(
!
open
)
{
nsres
=
before_async_open
(
This
,
window
->
doc_obj
->
nscontainer
,
&
cancel
);
if
(
NS_SUCCEEDED
(
nsres
)
&&
cancel
)
{
TRACE
(
"canceled
\n
"
);
nsres
=
NS_ERROR_UNEXPECTED
;
}
}
}
if
(
open
)
if
(
!
cancel
)
nsres
=
async_open
(
This
,
window
,
This
->
uri
->
is_doc_uri
,
aListener
,
aContext
);
if
(
NS_SUCCEEDED
(
nsres
)
&&
This
->
load_group
)
{
...
...
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