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
01b2388c
Commit
01b2388c
authored
Mar 03, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Allow post data and headers to be passed to create_channelbsc.
parent
0bccfa87
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
15 deletions
+47
-15
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
navigate.c
dlls/mshtml/navigate.c
+40
-12
nsio.c
dlls/mshtml/nsio.c
+3
-1
persist.c
dlls/mshtml/persist.c
+3
-1
No files found.
dlls/mshtml/mshtml_private.h
View file @
01b2388c
...
...
@@ -745,7 +745,7 @@ void abort_document_bindings(HTMLDocumentNode*);
HRESULT
bind_mon_to_buffer
(
HTMLDocumentNode
*
,
IMoniker
*
,
void
**
,
DWORD
*
);
nsChannelBSC
*
create_channelbsc
(
IMoniker
*
);
HRESULT
create_channelbsc
(
IMoniker
*
,
WCHAR
*
,
BYTE
*
,
DWORD
,
nsChannelBSC
*
*
);
HRESULT
channelbsc_load_stream
(
nsChannelBSC
*
,
IStream
*
);
void
channelbsc_set_channel
(
nsChannelBSC
*
,
nsChannel
*
,
nsIStreamListener
*
,
nsISupports
*
);
IMoniker
*
get_channelbsc_mon
(
nsChannelBSC
*
);
...
...
dlls/mshtml/navigate.c
View file @
01b2388c
...
...
@@ -1113,13 +1113,37 @@ static const BSCallbackVtbl nsChannelBSCVtbl = {
nsChannelBSC_on_response
};
nsChannelBSC
*
create_channelbsc
(
IMoniker
*
mon
)
HRESULT
create_channelbsc
(
IMoniker
*
mon
,
WCHAR
*
headers
,
BYTE
*
post_data
,
DWORD
post_data_size
,
nsChannelBSC
**
retval
)
{
nsChannelBSC
*
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
nsChannelBSC
*
ret
;
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
init_bscallback
(
&
ret
->
bsc
,
&
nsChannelBSCVtbl
,
mon
,
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
);
return
ret
;
if
(
headers
)
{
ret
->
bsc
.
headers
=
heap_strdupW
(
headers
);
if
(
!
ret
->
bsc
.
headers
)
{
IBindStatusCallback_Release
(
STATUSCLB
(
&
ret
->
bsc
));
return
E_OUTOFMEMORY
;
}
}
if
(
post_data
)
{
ret
->
bsc
.
post_data
=
GlobalAlloc
(
0
,
post_data_size
);
if
(
!
ret
->
bsc
.
headers
)
{
IBindStatusCallback_Release
(
STATUSCLB
(
&
ret
->
bsc
));
return
E_OUTOFMEMORY
;
}
memcpy
(
ret
->
bsc
.
post_data
,
post_data
,
post_data_size
);
ret
->
bsc
.
post_data_len
=
post_data_size
;
}
*
retval
=
ret
;
return
S_OK
;
}
IMoniker
*
get_channelbsc_mon
(
nsChannelBSC
*
This
)
...
...
@@ -1229,8 +1253,8 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url,
nsIInputStream
*
post_data_stream
,
DWORD
hlnf
)
{
IHlinkFrame
*
hlink_frame
;
nsChannelBSC
*
callback
;
IServiceProvider
*
sp
;
BSCallback
*
callback
;
IBindCtx
*
bindctx
;
IMoniker
*
mon
;
IHlink
*
hlink
;
...
...
@@ -1247,16 +1271,20 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url,
if
(
FAILED
(
hres
))
return
hres
;
callback
=
&
create_channelbsc
(
NULL
)
->
bsc
;
hres
=
create_channelbsc
(
NULL
,
NULL
,
NULL
,
0
,
&
callback
);
if
(
FAILED
(
hres
))
{
IHlinkFrame_Release
(
hlink_frame
);
return
hres
;
}
if
(
post_data_stream
)
{
parse_post_data
(
post_data_stream
,
&
callback
->
headers
,
&
callback
->
post_data
,
&
callback
->
post_data_len
);
TRACE
(
"headers = %s post_data = %s
\n
"
,
debugstr_w
(
callback
->
headers
),
debugstr_an
(
callback
->
post_data
,
callback
->
post_data_len
));
parse_post_data
(
post_data_stream
,
&
callback
->
bsc
.
headers
,
&
callback
->
bsc
.
post_data
,
&
callback
->
bsc
.
post_data_len
);
TRACE
(
"headers = %s post_data = %s
\n
"
,
debugstr_w
(
callback
->
bsc
.
headers
),
debugstr_an
(
callback
->
bsc
.
post_data
,
callback
->
bsc
.
post_data_len
));
}
hres
=
CreateAsyncBindCtx
(
0
,
STATUSCLB
(
callback
),
NULL
,
&
bindctx
);
hres
=
CreateAsyncBindCtx
(
0
,
STATUSCLB
(
&
callback
->
bsc
),
NULL
,
&
bindctx
);
if
(
SUCCEEDED
(
hres
))
hres
=
CoCreateInstance
(
&
CLSID_StdHlink
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IHlink
,
(
LPVOID
*
)
&
hlink
);
...
...
@@ -1272,14 +1300,14 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url,
IHlink_SetTargetFrameName
(
hlink
,
wszBlank
);
/* FIXME */
}
hres
=
IHlinkFrame_Navigate
(
hlink_frame
,
hlnf
,
bindctx
,
STATUSCLB
(
callback
),
hlink
);
hres
=
IHlinkFrame_Navigate
(
hlink_frame
,
hlnf
,
bindctx
,
STATUSCLB
(
&
callback
->
bsc
),
hlink
);
IMoniker_Release
(
mon
);
}
IHlinkFrame_Release
(
hlink_frame
);
IBindCtx_Release
(
bindctx
);
IBindStatusCallback_Release
(
STATUSCLB
(
callback
));
IBindStatusCallback_Release
(
STATUSCLB
(
&
callback
->
bsc
));
return
hres
;
}
...
...
dlls/mshtml/nsio.c
View file @
01b2388c
...
...
@@ -826,8 +826,10 @@ static nsresult async_open(nsChannel *This, HTMLWindow *window, BOOL is_doc_chan
if
(
is_doc_channel
)
set_current_mon
(
window
,
mon
);
bscallback
=
create_channelbsc
(
mon
);
hres
=
create_channelbsc
(
mon
,
NULL
,
NULL
,
0
,
&
bscallback
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hres
))
return
NS_ERROR_UNEXPECTED
;
channelbsc_set_channel
(
bscallback
,
This
,
listener
,
context
);
...
...
dlls/mshtml/persist.c
View file @
01b2388c
...
...
@@ -259,7 +259,9 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
if
(
FAILED
(
hres
))
return
hres
;
bscallback
=
create_channelbsc
(
mon
);
hres
=
create_channelbsc
(
mon
,
NULL
,
NULL
,
0
,
&
bscallback
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
load_nsuri
(
This
->
window
,
nsuri
,
bscallback
,
LOAD_INITIAL_DOCUMENT_URI
);
nsISupports_Release
((
nsISupports
*
)
nsuri
);
/* FIXME */
...
...
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