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
beb5366e
Commit
beb5366e
authored
Jun 03, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move some code from before_async_open to AsyncOpen.
parent
08ae32e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
nsio.c
dlls/mshtml/nsio.c
+23
-22
No files found.
dlls/mshtml/nsio.c
View file @
beb5366e
...
@@ -143,40 +143,24 @@ static BOOL handle_uri(NSContainer *container, nsChannel *channel, LPCWSTR uri)
...
@@ -143,40 +143,24 @@ static BOOL handle_uri(NSContainer *container, nsChannel *channel, LPCWSTR uri)
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
before_async_open
(
nsChannel
*
This
)
static
BOOL
before_async_open
(
nsChannel
*
channel
,
NSContainer
*
container
)
{
{
nsACString
uri_str
;
nsACString
uri_str
;
NSContainer
*
container
;
const
char
*
uria
;
const
char
*
uria
;
LPWSTR
uri
;
LPWSTR
uri
;
DWORD
len
;
DWORD
len
;
BOOL
ret
;
BOOL
ret
;
if
(
!
(
This
->
load_flags
&
LOAD_INITIAL_DOCUMENT_URI
))
return
TRUE
;
nsIWineURI_GetNSContainer
(
This
->
uri
,
&
container
);
if
(
!
container
)
{
WARN
(
"container = NULL
\n
"
);
return
TRUE
;
}
if
(
container
->
load_call
)
{
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
container
));
return
TRUE
;
}
nsACString_Init
(
&
uri_str
,
NULL
);
nsACString_Init
(
&
uri_str
,
NULL
);
nsIWineURI_GetSpec
(
This
->
uri
,
&
uri_str
);
nsIWineURI_GetSpec
(
channel
->
uri
,
&
uri_str
);
nsACString_GetData
(
&
uri_str
,
&
uria
,
NULL
);
nsACString_GetData
(
&
uri_str
,
&
uria
,
NULL
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
uria
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
uria
,
-
1
,
NULL
,
0
);
uri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
uri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
uria
,
-
1
,
uri
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
uria
,
-
1
,
uri
,
len
);
nsACString_Finish
(
&
uri_str
);
nsACString_Finish
(
&
uri_str
);
ret
=
handle_uri
(
container
,
This
,
uri
);
ret
=
handle_uri
(
container
,
channel
,
uri
);
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
container
));
HeapFree
(
GetProcessHeap
(),
0
,
uri
);
HeapFree
(
GetProcessHeap
(),
0
,
uri
);
return
ret
;
return
ret
;
...
@@ -596,9 +580,26 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
...
@@ -596,9 +580,26 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
aListener
,
aContext
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
aListener
,
aContext
);
if
(
!
before_async_open
(
This
))
{
if
(
This
->
load_flags
&
LOAD_INITIAL_DOCUMENT_URI
)
{
TRACE
(
"canceled
\n
"
);
NSContainer
*
container
;
return
NS_ERROR_UNEXPECTED
;
nsIWineURI_GetNSContainer
(
This
->
uri
,
&
container
);
if
(
!
container
)
{
ERR
(
"container = NULL
\n
"
);
return
NS_ERROR_UNEXPECTED
;
}
if
(
container
->
load_call
)
{
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
container
));
}
else
{
BOOL
cont
=
before_async_open
(
This
,
container
);
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
container
));
if
(
!
cont
)
{
TRACE
(
"canceled
\n
"
);
return
NS_ERROR_UNEXPECTED
;
}
}
}
}
if
(
!
This
->
channel
)
{
if
(
!
This
->
channel
)
{
...
...
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