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
e081b65a
Commit
e081b65a
authored
Sep 17, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Try getting window from notification callback if load group is not available in AsyncOpen.
parent
d4071b56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
nsio.c
dlls/mshtml/nsio.c
+27
-16
No files found.
dlls/mshtml/nsio.c
View file @
e081b65a
...
...
@@ -882,27 +882,34 @@ static HTMLWindow *get_window_from_load_group(nsChannel *This)
static
HTMLWindow
*
get_channel_window
(
nsChannel
*
This
)
{
nsIRequestObserver
*
req_observer
;
nsIWebProgress
*
web_progress
;
nsIDOMWindow
*
nswindow
;
HTMLWindow
*
window
;
nsresult
nsres
;
if
(
!
This
->
load_group
)
{
ERR
(
"NULL load_group
\n
"
);
return
NULL
;
}
if
(
This
->
load_group
)
{
nsIRequestObserver
*
req_observer
;
nsres
=
nsILoadGroup_GetGroupObserver
(
This
->
load_group
,
&
req_observer
);
if
(
NS_FAILED
(
nsres
)
||
!
req_observer
)
{
ERR
(
"GetGroupObserver failed: %08x
\n
"
,
nsres
);
return
NULL
;
}
nsres
=
nsILoadGroup_GetGroupObserver
(
This
->
load_group
,
&
req_observer
);
if
(
NS_FAILED
(
nsres
)
||
!
req_observer
)
{
ERR
(
"GetGroupObserver failed: %08x
\n
"
,
nsres
);
return
NULL
;
}
nsres
=
nsIRequestObserver_QueryInterface
(
req_observer
,
&
IID_nsIWebProgress
,
(
void
**
)
&
web_progress
);
nsIRequestObserver_Release
(
req_observer
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIWebProgress iface: %08x
\n
"
,
nsres
);
nsres
=
nsIRequestObserver_QueryInterface
(
req_observer
,
&
IID_nsIWebProgress
,
(
void
**
)
&
web_progress
);
nsIRequestObserver_Release
(
req_observer
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIWebProgress iface: %08x
\n
"
,
nsres
);
return
NULL
;
}
}
else
if
(
This
->
notif_callback
)
{
nsres
=
nsIInterfaceRequestor_GetInterface
(
This
->
notif_callback
,
&
IID_nsIWebProgress
,
(
void
**
)
&
web_progress
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetInterface(IID_nsIWebProgress failed: %08x
\n
"
,
nsres
);
return
NULL
;
}
}
else
{
ERR
(
"no load group nor notif callback
\n
"
);
return
NULL
;
}
...
...
@@ -1008,8 +1015,12 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
if
(
This
->
uri
->
window_ref
&&
This
->
uri
->
window_ref
->
window
)
{
window
=
This
->
uri
->
window_ref
->
window
;
IHTMLWindow2_AddRef
(
HTMLWINDOW2
(
window
));
}
else
if
(
This
->
load_group
)
{
window
=
get_window_from_load_group
(
This
);
}
else
{
/* FIXME: Analyze removing get_window_from_load_group call */
if
(
This
->
load_group
)
window
=
get_window_from_load_group
(
This
);
if
(
!
window
)
window
=
get_channel_window
(
This
);
if
(
window
)
set_uri_window
(
This
->
uri
,
window
);
}
...
...
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