24#define CONTENT_LENGTH "Content-Length"
25#define UTF8_STR "utf-8"
26#define UTF16_STR "utf-16"
61 nsIInputStream_AddRef(&
This->nsIInputStream_iface);
113 TRACE(
"(%p)->(%p %d %p)\n",
This, aBuf, aCount, _retval);
120 if(read < This->buf_size)
137 TRACE(
"(%p)->(%p %p %d %p)\n",
This, aWriter, aClousure, aCount, _retval);
142 if(aCount >
This->buf_size)
143 aCount =
This->buf_size;
145 nsres = aWriter(&
This->nsIInputStream_iface, aClousure,
This->buf, 0, aCount, &written);
147 TRACE(
"aWriter failed: %08x\n", nsres);
148 else if(written !=
This->buf_size)
149 FIXME(
"written %d != buf_size %d\n", written,
This->buf_size);
151 This->buf_size -= written;
212 *
ppv = &
This->IBindStatusCallback_iface;
214 TRACE(
"(%p)->(IID_IBindStatusCallback, %p)\n",
This,
ppv);
215 *
ppv = &
This->IBindStatusCallback_iface;
218 *
ppv = &
This->IServiceProvider_iface;
221 *
ppv = &
This->IHttpNegotiate2_iface;
224 *
ppv = &
This->IHttpNegotiate2_iface;
227 *
ppv = &
This->IInternetBindInfo_iface;
231 IBindStatusCallback_AddRef(&
This->IBindStatusCallback_iface);
259 IMoniker_Release(
This->mon);
261 IBinding_Release(
This->binding);
278 IBinding_AddRef(pbind);
279 This->binding = pbind;
284 return This->vtbl->start_binding(
This);
306 TRACE(
"%p)->(%u %u %u %s)\n",
This, ulProgress, ulProgressMax, ulStatusCode,
309 return This->vtbl->on_progress(
This, ulStatusCode, szStatusText);
325 IBinding_Release(
This->binding);
330 IMoniker_Release(
This->mon);
342 DWORD *grfBINDF, BINDINFO *pbindinfo)
347 TRACE(
"(%p)->(%p %p)\n",
This, grfBINDF, pbindinfo);
349 if(!
This->bindinfo_ready) {
359 *grfBINDF =
This->bindf;
361 size = pbindinfo->cbSize;
363 pbindinfo->cbSize =
size;
365 pbindinfo->cbstgmedData =
This->request_data.post_data_len;
366 pbindinfo->dwCodePage =
CP_UTF8;
367 pbindinfo->dwOptions = 0x80000;
369 if(
This->request_data.post_data_len) {
370 pbindinfo->dwBindVerb = BINDVERB_POST;
372 pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;
373 pbindinfo->stgmedData.u.hGlobal =
This->request_data.post_data;
374 pbindinfo->stgmedData.pUnkForRelease = (
IUnknown*)&
This->IBindStatusCallback_iface;
375 IBindStatusCallback_AddRef(&
This->IBindStatusCallback_iface);
386 TRACE(
"(%p)->(%08x %d %p %p)\n",
This, grfBSCF,
dwSize, pformatetc, pstgmed);
388 return This->vtbl->read_data(
This, pstgmed->u.pstm);
422 return IBindStatusCallback_QueryInterface(&
This->IBindStatusCallback_iface,
riid,
ppv);
428 return IBindStatusCallback_AddRef(&
This->IBindStatusCallback_iface);
434 return IBindStatusCallback_Release(&
This->IBindStatusCallback_iface);
446 *pszAdditionalHeaders =
NULL;
448 hres =
This->vtbl->beginning_transaction(
This, pszAdditionalHeaders);
452 if(
This->request_data.headers) {
457 if(!*pszAdditionalHeaders)
471 debugstr_w(szRequestHeaders), pszAdditionalRequestHeaders);
473 return This->vtbl->on_response(
This, dwResponseCode, szResponseHeaders);
502 return IBindStatusCallback_QueryInterface(&
This->IBindStatusCallback_iface,
riid,
ppv);
508 return IBindStatusCallback_AddRef(&
This->IBindStatusCallback_iface);
514 return IBindStatusCallback_Release(&
This->IBindStatusCallback_iface);
518 DWORD *grfBINDF, BINDINFO *pbindinfo)
521 FIXME(
"(%p)->(%p %p)\n",
This, grfBINDF, pbindinfo);
529 FIXME(
"(%p)->(%u %p %u %p)\n",
This, ulStringType, ppwzStr, cEl, pcElFetched);
550 return IBindStatusCallback_QueryInterface(&
This->IBindStatusCallback_iface,
riid,
ppv);
556 return IBindStatusCallback_AddRef(&
This->IBindStatusCallback_iface);
562 return IBindStatusCallback_Release(&
This->IBindStatusCallback_iface);
573 return IServiceProvider_QueryService(&
This->window->base.IServiceProvider_iface, guidService,
riid,
ppv);
598 IMoniker_AddRef(mon);
611 if(read_size >= 2 &&
data[0] == 0xff &&
data[1] == 0xfe) {
614 }
else if(read_size >= 3 &&
data[0] == 0xef &&
data[1] == 0xbb &&
data[2] == 0xbf) {
625 This->readed += read_size;
626 *ret_size = read_size;
635 static const WCHAR charsetW[] = {
'c',
'h',
'a',
'r',
's',
'e',
't',
'='};
647 size_t charset_len, lena;
655 FIXME(
"Quoted value\n");
659 while(*
ptr && *
ptr !=
',')
673 nsIHttpChannel_SetContentCharset(&
This->nschannel->nsIHttpChannel_iface, &charset_str);
690 for(colon =
header; *colon && *colon !=
':' && *colon !=
'\r'; colon++);
700 for(header_end =
value+1; *header_end && *header_end !=
'\r'; header_end++);
719 static const WCHAR content_typeW[] = {
'c',
'o',
'n',
't',
'e',
'n',
't',
'-',
't',
'y',
'p',
'e',0};
754 if(
ptr &&
ptr[1] ==
'\n') {
767 TRACE(
"(%p %p %p)\n", inner_window, bscallback, bctx);
769 bscallback->
window = inner_window;
776 IBindCtx_AddRef(bctx);
786 hres = IMoniker_BindToStorage(bscallback->
mon, bctx,
NULL, &IID_IStream, (
void**)&
str);
787 IBindCtx_Release(bctx);
789 WARN(
"BindToStorage failed: %08x\n",
hres);
795 IStream_Release(
str);
827 if(contains_headers) {
828 if(data_len >= 2 &&
data[0] ==
'\r' &&
data[1] ==
'\n') {
889 nsres = nsIInputStream_QueryInterface(
stream, &IID_nsISeekableStream, (
void**)&seekable_stream);
892 nsres = nsISeekableStream_Seek(seekable_stream, NS_SEEK_SET, 0);
895 nsISeekableStream_Release(seekable_stream);
897 nsIInputStream_AddRef(
stream);
908 if(!
This->nschannel->response_status)
909 This->nschannel->response_status = 200;
911 nsres = nsIStreamListener_OnStartRequest(
This->nslistener,
914 FIXME(
"OnStartRequest failed: %08x\n", nsres);
918 if(
This->is_doc_channel) {
919 if(!
This->bsc.window)
922 if(
This->bsc.window->base.outer_window->readystate != READYSTATE_LOADING)
935 request_result =
NS_OK;
944 if(
This->nslistener) {
945 nsres = nsIStreamListener_OnStopRequest(
This->nslistener,
949 WARN(
"OnStopRequest failed: %08x\n", nsres);
952 if(
This->nschannel &&
This->nschannel->load_group) {
953 nsres = nsILoadGroup_RemoveRequest(
This->nschannel->load_group,
956 ERR(
"RemoveRequest failed: %08x\n", nsres);
966 if(!
This->response_processed) {
970 if(
This->bsc.binding) {
971 hres = IBinding_QueryInterface(
This->bsc.binding, &IID_IWinInetHttpInfo, (
void**)&wininet_info);
974 IWinInetHttpInfo_Release(wininet_info);
982 if(!
This->nslistener) {
992 if(!
This->nsstream) {
999 BOOL first_read = !
This->bsc.readed;
1002 sizeof(
This->nsstream->buf)-
This->nsstream->buf_size, &
read);
1009 switch(
This->bsc.bom) {
1019 if(!
This->nschannel->content_type) {
1031 if(!
This->nschannel->content_type)
1040 nsres = nsIStreamListener_OnDataAvailable(
This->nslistener,
1042 &
This->nsstream->nsIInputStream_iface,
This->bsc.readed-
This->nsstream->buf_size,
1043 This->nsstream->buf_size);
1045 ERR(
"OnDataAvailable failed: %08x\n", nsres);
1047 if(
This->nsstream->buf_size ==
sizeof(
This->nsstream->buf)) {
1048 ERR(
"buffer is full\n");
1077 *
result = &
This->nsIAsyncVerifyRedirectCallback_iface;
1079 TRACE(
"(%p)->(IID_nsIAsyncVerifyRedirectCallback %p)\n",
This,
result);
1080 *
result = &
This->nsIAsyncVerifyRedirectCallback_iface;
1109 IBindStatusCallback_Release(&
This->bsc->bsc.IBindStatusCallback_iface);
1110 nsIHttpChannel_Release(&
This->nschannel->nsIHttpChannel_iface);
1125 old_nschannel =
This->bsc->nschannel;
1126 nsIHttpChannel_AddRef(&
This->nschannel->nsIHttpChannel_iface);
1127 This->bsc->nschannel =
This->nschannel;
1129 if(
This->nschannel->load_group) {
1130 nsres = nsILoadGroup_AddRequest(
This->nschannel->load_group, (
nsIRequest*)&
This->nschannel->nsIHttpChannel_iface,
1133 ERR(
"AddRequest failed: %08x\n", nsres);
1136 if(
This->bsc->is_doc_channel) {
1143 WARN(
"Could not get IUri from nsWineURI\n");
1149 nsres = nsILoadGroup_RemoveRequest(old_nschannel->
load_group,
1152 ERR(
"RemoveRequest failed: %08x\n", nsres);
1181 IBindStatusCallback_AddRef(&
bsc->bsc.IBindStatusCallback_iface);
1198 nsIHttpChannel_Release(&
This->nschannel->nsIHttpChannel_iface);
1199 if(
This->nslistener)
1200 nsIStreamListener_Release(
This->nslistener);
1202 nsISupports_Release(
This->nscontext);
1204 nsIInputStream_Release(&
This->nsstream->nsIInputStream_iface);
1212 if(
This->is_doc_channel)
1213 This->bsc.window->base.outer_window->base.inner_window->doc->skip_mutation_notif =
FALSE;
1262 if(!
This->bsc.readed) {
1263 TRACE(
"No data read, calling OnStartRequest\n");
1271 IBindStatusCallback_AddRef(&
This->bsc.IBindStatusCallback_iface);
1289 if(!
This->is_doc_channel || !
This->bsc.window)
1292 outer_window =
This->bsc.window->base.outer_window;
1299 outer_window->
url, &is_error_url);
1357 V_BOOL(&varOut) = VARIANT_TRUE;
1371 else if(
This->is_doc_channel &&
This->nschannel) {
1399 if(!
This->nschannel || !
This->nschannel->notif_callback)
1402 nsres = nsIInterfaceRequestor_GetInterface(
This->nschannel->notif_callback, &IID_nsIChannelEventSink, (
void**)&
sink);
1415 nsres = nsIChannelEventSink_AsyncOnChannelRedirect(
sink, (
nsIChannel*)&
This->nschannel->nsIHttpChannel_iface,
1417 &
callback->nsIAsyncVerifyRedirectCallback_iface);
1420 FIXME(
"AsyncOnChannelRedirect failed: %08x\n",
hres);
1422 FIXME(
"nschannel not updated\n");
1424 nsIAsyncVerifyRedirectCallback_Release(&
callback->nsIAsyncVerifyRedirectCallback_iface);
1427 nsIChannelEventSink_Release(
sink);
1433 char *nscat, *mimea;
1442 ret = nscat !=
NULL && !
strcmp(nscat,
"@mozilla.org/content/document-loader-factory;1");
1455 hres = IMoniker_QueryInterface(mon, &IID_IUriContainer, (
void**)&uri_container);
1457 hres = IUriContainer_GetIUri(uri_container, &
ret);
1458 IUriContainer_Release(uri_container);
1462 FIXME(
"No IUriContainer\n");
1478 if(!
This->bsc.window || !
This->bsc.window->base.outer_window || !
This->bsc.window->base.outer_window->doc_obj)
1481 doc_obj =
This->bsc.window->base.outer_window->doc_obj;
1483 hres = IOleClientSite_QueryInterface(doc_obj->
client, &IID_IOleCommandTarget, (
void**)&cmdtrg);
1485 IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 62, 0,
NULL,
NULL);
1486 IOleCommandTarget_Release(cmdtrg);
1492 FIXME(
"unimplemented in non-webbrowser mode\n");
1509 hres = IUnknown_QueryInterface(doc_obj->
webbrowser, &IID_IWebBrowserPriv2IE8, (
void**)&webbrowser_priv);
1512 IWebBrowserPriv2IE9_Release(webbrowser_priv);
1517 hres = IUnknown_QueryInterface(doc_obj->
webbrowser, &IID_IWebBrowserPriv, (
void**)&webbrowser_priv_old);
1520 IUri_GetDisplayUri(
uri, &
V_BSTR(&uriv));
1525 IWebBrowserPriv_Release(webbrowser_priv_old);
1537 case BINDSTATUS_MIMETYPEAVAILABLE:
1546 if(!
This->nschannel)
1552 case BINDSTATUS_REDIRECTING:
1554 case BINDSTATUS_BEGINDOWNLOADDATA: {
1559 if(!
This->bsc.binding)
1562 hres = IBinding_QueryInterface(
This->bsc.binding, &IID_IWinInetHttpInfo, (
void**)&http_info);
1566 hres = IWinInetHttpInfo_QueryInfo(http_info,
1568 IWinInetHttpInfo_Release(http_info);
1605 This->nschannel->response_status = response_code;
1607 if(response_headers) {
1613 WARN(
"parsing headers failed: %08x\n",
hres);
1618 This->nschannel->response_status_text =
str;
1624 WARN(
"parsing headers failed: %08x\n",
hres);
1640 static const WCHAR content_lengthW[] =
1641 {
'C',
'o',
'n',
't',
'e',
'n',
't',
'-',
'L',
'e',
'n',
'g',
't',
'h',0};
1643 if(!
This->nschannel)
1699 ret = heap_alloc_zero(
sizeof(*
ret));
1703 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
1705 bindf |= BINDF_FORMS_SUBMIT | BINDF_PRAGMA_NO_CACHE | BINDF_HYPERLINK | BINDF_GETNEWESTVERSION;
1708 ret->is_doc_channel = is_doc_binding;
1712 if(!
ret->bsc.request_data.headers) {
1713 IBindStatusCallback_Release(&
ret->bsc.IBindStatusCallback_iface);
1719 ret->bsc.request_data.post_data =
GlobalAlloc(0, post_data_size+1);
1720 if(!
ret->bsc.request_data.post_data) {
1722 IBindStatusCallback_Release(&
ret->bsc.IBindStatusCallback_iface);
1727 ((
BYTE*)
ret->bsc.request_data.post_data)[post_data_size] = 0;
1728 ret->bsc.request_data.post_data_len = post_data_size;
1762 TRACE(
"%p\n", pending_window);
1784 TRACE(
"Aborting %p\n", iter);
1789 IBinding_Abort(iter->
binding);
1801 IBindStatusCallback_Release(&
window->bscallback->bsc.IBindStatusCallback_iface);
1806 IMoniker_Release(
window->mon);
1817 ERR(
"NULL nschannel\n");
1827 bscallback->
bsc.
window = pending_window;
1842 This->nschannel = channel;
1844 nsIStreamListener_AddRef(listener);
1845 This->nslistener = listener;
1852 if(
This->bsc.request_data.headers) {
1857 This->bsc.request_data.headers =
NULL;
1859 WARN(
"parse_headers failed: %08x\n",
hres);
1877 static const WCHAR jscriptW[] = {
'j',
's',
'c',
'r',
'i',
'p',
't',0};
1901 if(
window->doc_obj->view_sink)
1902 IAdviseSink_OnViewChange(
window->doc_obj->view_sink, DVASPECT_CONTENT, -1);
1911 IUri_Release(task->
uri);
1942 IMoniker_Release(task->
mon);
1943 IUri_Release(task->
uri);
1956 const WCHAR selector_formatW[] = {
'a',
'[',
'i',
'd',
'=',
'"',
'%',
's',
'"',
']',0};
1960 nsres = nsIDOMWindow_GetLocation(
window->nswindow, &nslocation);
1961 if(
FAILED(nsres) || !nslocation)
1964 hres = IUri_GetFragment(
uri, &frag);
1966 nsIDOMLocation_Release(nslocation);
1971 nsres = nsIDOMLocation_SetHash(nslocation, &nsfrag_str);
1973 nsIDOMLocation_Release(nslocation);
1975 ERR(
"SetHash failed: %08x\n", nsres);
1987 sprintfW(selector, selector_formatW, frag);
1990 nsres = nsIDOMHTMLDocument_QuerySelector(
window->base.inner_window->doc->nsdoc, &selector_str, &nselem);
1996 nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLElement, (
void**)&html_elem);
1997 nsIDOMElement_Release(nselem);
1999 nsIDOMHTMLElement_ScrollIntoView(html_elem,
TRUE, 1);
2000 nsIDOMHTMLElement_Release(html_elem);
2007 if(
window->doc_obj->doc_object_service) {
2008 IDocObjectService_FireNavigateComplete2(
window->doc_obj->doc_object_service, &
window->base.IHTMLWindow2_iface, 0x10);
2009 IDocObjectService_FireDocumentComplete(
window->doc_obj->doc_object_service, &
window->base.IHTMLWindow2_iface, 0);
2031 hres = IOleClientSite_QueryInterface(
window->doc_obj->client, &IID_IOleCommandTarget, (
void**)&cmdtrg);
2036 hres = IUri_GetDisplayUri(uri_nofrag, &url_str);
2042 hres = IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 67, 0, &
in, &
out);
2043 IOleCommandTarget_Release(cmdtrg);
2054 hres = IUri_IsEqual(uri_nofrag,
window->uri_nofrag, &
eq);
2056 IUri_Release(uri_nofrag);
2057 TRACE(
"fragment navigate\n");
2063 IUri_Release(uri_nofrag);
2068 window->readystate = READYSTATE_UNINITIALIZED;
2072 IMoniker_Release(mon);
2082 IBindStatusCallback_Release(&
bsc->bsc.IBindStatusCallback_iface);
2083 IMoniker_Release(mon);
2090 window->readystate = READYSTATE_COMPLETE;
2102 IBindStatusCallback_Release(&
bsc->bsc.IBindStatusCallback_iface);
2103 IMoniker_Release(mon);
2109 IBindStatusCallback_Release(&
bsc->bsc.IBindStatusCallback_iface);
2110 IMoniker_Release(mon);
2115 window->readystate = READYSTATE_LOADING;
2134 IWebBrowser2 *web_browser;
2151 IBindStatusCallback_Release(&
bsc->bsc.IBindStatusCallback_iface);
2156 &IID_IWebBrowser2, (
void**)&web_browser);
2160 hres = IWebBrowser2_QueryInterface(web_browser, &IID_ITargetFramePriv2, (
void**)&target_frame_priv);
2162 hres = ITargetFramePriv2_AggregatedNavigation2(target_frame_priv,
2163 HLNF_DISABLEWINDOWRESTRICTIONS|HLNF_OPENINNEWWINDOW, bind_ctx, &
bsc->bsc.IBindStatusCallback_iface,
2165 ITargetFramePriv2_Release(target_frame_priv);
2171 IWebBrowser2_Quit(web_browser);
2172 IWebBrowser2_Release(web_browser);
2175 WARN(
"Could not create InternetExplorer instance: %08x\n",
hres);
2178 IBindStatusCallback_Release(&
bsc->bsc.IBindStatusCallback_iface);
2179 IBindCtx_Release(bind_ctx);
2183 IWebBrowser2_put_Visible(web_browser, VARIANT_TRUE);
2184 IWebBrowser2_Release(web_browser);
2205 (
void**)&hlink_frame);
2211 IHlinkFrame_Release(hlink_frame);
2222 &IID_IHlink, (
LPVOID*)&hlink);
2228 IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET, mon,
NULL);
2230 if(hlnf & HLNF_OPENINNEWWINDOW) {
2231 static const WCHAR wszBlank[] = {
'_',
'b',
'l',
'a',
'n',
'k',0};
2232 IHlink_SetTargetFrameName(hlink, wszBlank);
2235 hres = IHlinkFrame_Navigate(hlink_frame, hlnf, bindctx,
2236 &
callback->bsc.IBindStatusCallback_iface, hlink);
2237 IMoniker_Release(mon);
2242 IHlinkFrame_Release(hlink_frame);
2243 IBindCtx_Release(bindctx);
2244 IBindStatusCallback_Release(&
callback->bsc.IBindStatusCallback_iface);
2266 hres = IHTMLWindow2_get_name(&
window->base.IHTMLWindow2_iface, &frame_name);
2271 hres = IDocObjectService_FireBeforeNavigate2(
window->doc_obj->doc_object_service,
NULL, display_uri, 0x40,
2275 TRACE(
"Navigation canceled\n");
2292 TRACE(
"Navigation handled by hlink frame\n");
2311 hres = IUri_GetDisplayUri(
uri, &display_uri);
2326 hres = IUri_GetDisplayUri(orig_uri, &display_uri);
2333 hres = IDocHostUIHandler_TranslateUrl(
window->doc_obj->hostui, 0, display_uri,
2335 if(
hres ==
S_OK && translated_url) {
2343 hres = IUri_GetDisplayUri(
uri, &display_uri);
2352 IUri_AddRef(orig_uri);
2356 *ret_display_uri = display_uri;
2374 window->readystate_locked++;
2383 window->readystate_locked--;
2397 if(new_url && base_uri)
2406 IUri_Release(nav_uri);
unsigned long long UINT64
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static struct sockaddr_in sa
static char * heap_strdupWtoA(const WCHAR *str)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
#define BINDING_NAVIGATED
void set_current_mon(HTMLOuterWindow *, IMoniker *, DWORD) DECLSPEC_HIDDEN
IUri * nsuri_get_uri(nsWineURI *) DECLSPEC_HIDDEN
IUri * get_uri_nofrag(IUri *) DECLSPEC_HIDDEN
HRESULT set_http_header(struct list *, const WCHAR *, int, const WCHAR *, int) DECLSPEC_HIDDEN
void prepare_for_binding(HTMLDocument *, IMoniker *, DWORD) DECLSPEC_HIDDEN
HRESULT set_moniker(HTMLOuterWindow *, IMoniker *, IUri *, IBindCtx *, nsChannelBSC *, BOOL) DECLSPEC_HIDDEN
HRESULT load_nsuri(HTMLOuterWindow *, nsWineURI *, nsIInputStream *, nsChannelBSC *, DWORD) DECLSPEC_HIDDEN
HRESULT create_uri(const WCHAR *, DWORD, IUri **) DECLSPEC_HIDDEN
void set_current_uri(HTMLOuterWindow *, IUri *) DECLSPEC_HIDDEN
HRESULT create_redirect_nschannel(const WCHAR *, nsChannel *, nsChannel **) DECLSPEC_HIDDEN
HRESULT create_doc_uri(HTMLOuterWindow *, IUri *, nsWineURI **) DECLSPEC_HIDDEN
static WCHAR * heap_strdupW(const WCHAR *str)
static WCHAR available[MAX_STRING_RESOURCE_LEN]
static __inline const char * debugstr_an(const char *s, int n)
#define WideCharToMultiByte
#define MultiByteToWideChar
HRESULT do_query_service(IUnknown *unk, REFGUID guid_service, REFIID riid, void **ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
HRESULT WINAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags)
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum GLboolean sink
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
HRESULT exec_script(HTMLInnerWindow *, const WCHAR *, const WCHAR *, VARIANT *) DECLSPEC_HIDDEN
HRESULT update_window_doc(HTMLInnerWindow *window)
HRESULT navigate_url(DocHost *This, LPCWSTR url, const VARIANT *Flags, const VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface)
static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
void handle_navigation_error(DocHost *doc_host, HRESULT hres, BSTR url, IHTMLWindow2 *win2)
static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate *iface)
static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
static const IBindStatusCallbackVtbl BindStatusCallbackVtbl
static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority)
static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate *iface, LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders)
static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate *iface)
static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
static const WCHAR emptyW[]
static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate *iface, DWORD dwResponseCode, LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders)
static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv)
static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
static BindStatusCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pbind)
static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer, DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags, LPWSTR *ppwzMimeOut, DWORD dwReserved)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static IPrintDialogCallback callback
static const char * debugstr_variant(const VARIANT *var)
#define eq(received, expected, label, type)
static IHTMLWindow2 * window
static HWND new_window(LPCSTR lpClassName, DWORD dwStyle, HWND parent)
static const CHAR post_data[]
static IBindStatusCallbackEx bsc
interface IHTMLWindow2 IHTMLWindow2
static HRESULT WINAPI InternetBindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, LPOLESTR *ppwzStr, ULONG cEl, ULONG *pcElFetched)
static nsresult NSAPI nsInputStream_Close(nsIInputStream *iface)
static HRESULT create_redirect_callback(nsChannel *nschannel, nsChannelBSC *bsc, nsRedirectCallback **ret)
static HRESULT nsChannelBSC_read_data(BSCallback *bsc, IStream *stream)
static IUri * get_moniker_uri(IMoniker *mon)
static nsrefcnt NSAPI nsAsyncVerifyRedirectCallback_Release(nsIAsyncVerifyRedirectCallback *iface)
HRESULT read_stream(BSCallback *This, IStream *stream, void *buf, DWORD size, DWORD *ret_size)
static nsresult NSAPI nsInputStream_Read(nsIInputStream *iface, char *aBuf, UINT32 aCount, UINT32 *_retval)
static void navigate_task_destr(task_t *_task)
static const IInternetBindInfoVtbl InternetBindInfoVtbl
static nsrefcnt NSAPI nsInputStream_Release(nsIInputStream *iface)
static ULONG WINAPI InternetBindInfo_Release(IInternetBindInfo *iface)
HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url, nsChannel *nschannel, DWORD hlnf, BOOL *cancel)
static HRESULT nsChannelBSC_beginning_transaction(BSCallback *bsc, WCHAR **additional_headers)
static ULONG WINAPI BSCServiceProvider_AddRef(IServiceProvider *iface)
static nsresult NSAPI nsInputStream_ReadSegments(nsIInputStream *iface, nsresult(WINAPI *aWriter)(nsIInputStream *, void *, const char *, UINT32, UINT32, UINT32 *), void *aClousure, UINT32 aCount, UINT32 *_retval)
static void stop_request_proc(task_t *_task)
static void navigate_javascript_task_destr(task_t *_task)
static void navigate_proc(task_t *_task)
void abort_window_bindings(HTMLInnerWindow *window)
static nsresult NSAPI nsInputStream_QueryInterface(nsIInputStream *iface, nsIIDRef riid, void **result)
static const WCHAR text_htmlW[]
static const BSCallbackVtbl nsChannelBSCVtbl
HRESULT load_uri(HTMLOuterWindow *window, IUri *uri, DWORD flags)
static nsresult NSAPI nsAsyncVerifyRedirectCallback_OnRedirectVerifyCallback(nsIAsyncVerifyRedirectCallback *iface, nsresult result)
static ULONG WINAPI InternetBindInfo_AddRef(IInternetBindInfo *iface)
void channelbsc_set_channel(nsChannelBSC *This, nsChannel *channel, nsIStreamListener *listener, nsISupports *context)
static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *display_uri, const request_data_t *request_data, DWORD flags)
static HRESULT parse_headers(const WCHAR *headers, struct list *headers_list)
static HRESULT nsChannelBSC_start_binding(BSCallback *bsc)
static nsChannelBSC * nsChannelBSC_from_BSCallback(BSCallback *iface)
static void navigate_javascript_proc(task_t *_task)
static BSCallback * impl_from_IServiceProvider(IServiceProvider *iface)
static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG status_code, LPCWSTR status_text)
static nsrefcnt NSAPI nsAsyncVerifyRedirectCallback_AddRef(nsIAsyncVerifyRedirectCallback *iface)
HRESULT submit_form(HTMLOuterWindow *window, const WCHAR *target, IUri *submit_uri, nsIInputStream *post_stream)
static HRESULT WINAPI BSCServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
static BOOL is_supported_doc_mime(const WCHAR *mime)
static HRESULT on_start_nsrequest(nsChannelBSC *This)
static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WCHAR *headers, BYTE *post_data, DWORD post_data_size)
static nsProtocolStream * create_nsprotocol_stream(void)
static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri)
static void start_doc_binding_task_destr(task_t *_task)
static ULONG WINAPI BSCServiceProvider_Release(IServiceProvider *iface)
static nsresult NSAPI nsAsyncVerifyRedirectCallback_QueryInterface(nsIAsyncVerifyRedirectCallback *iface, nsIIDRef riid, void **result)
static HRESULT WINAPI InternetBindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv)
static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
static const IHttpNegotiate2Vtbl HttpNegotiate2Vtbl
static void nsChannelBSC_destroy(BSCallback *bsc)
HRESULT channelbsc_load_stream(HTMLInnerWindow *pending_window, IMoniker *mon, IStream *stream)
static nsresult NSAPI nsInputStream_IsNonBlocking(nsIInputStream *iface, cpp_bool *_retval)
static nsresult NSAPI nsInputStream_Available(nsIInputStream *iface, UINT64 *_retval)
static const nsIAsyncVerifyRedirectCallbackVtbl nsAsyncVerifyRedirectCallbackVtbl
static void stop_request_task_destr(task_t *_task)
static void on_stop_nsrequest(nsChannelBSC *This, HRESULT result)
static const nsIInputStreamVtbl nsInputStreamVtbl
static HRESULT process_response_status_text(const WCHAR *header, const WCHAR *header_end, char **status_text)
static BSCallback * impl_from_IHttpNegotiate2(IHttpNegotiate2 *iface)
static HRESULT read_post_data_stream(nsIInputStream *stream, BOOL contains_headers, struct list *headers_list, request_data_t *request_data)
static nsrefcnt NSAPI nsInputStream_AddRef(nsIInputStream *iface)
static HRESULT WINAPI BSCServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static HRESULT nsChannelBSC_stop_binding(BSCallback *bsc, HRESULT result)
static nsProtocolStream * impl_from_nsIInputStream(nsIInputStream *iface)
static void start_doc_binding_proc(task_t *_task)
static BSCallback * impl_from_IInternetBindInfo(IInternetBindInfo *iface)
static HRESULT handle_redirect(nsChannelBSC *This, const WCHAR *new_url)
static void parse_content_type(nsChannelBSC *This, const WCHAR *value)
static void release_request_data(request_data_t *request_data)
static HRESULT nsChannelBSC_on_response(BSCallback *bsc, DWORD response_code, LPCWSTR response_headers)
HRESULT navigate_new_window(HTMLOuterWindow *window, IUri *uri, const WCHAR *name, request_data_t *request_data, IHTMLWindow2 **ret)
static nsRedirectCallback * impl_from_nsIAsyncVerifyRedirectCallback(nsIAsyncVerifyRedirectCallback *iface)
static const IServiceProviderVtbl ServiceProviderVtbl
static void query_http_info(nsChannelBSC *This, IWinInetHttpInfo *wininet_info)
static HRESULT nsChannelBSC_init_bindinfo(BSCallback *bsc)
static HRESULT async_stop_request(nsChannelBSC *This)
HRESULT start_binding(HTMLInnerWindow *inner_window, BSCallback *bscallback, IBindCtx *bctx)
static HRESULT translate_uri(HTMLOuterWindow *window, IUri *orig_uri, BSTR *ret_display_uri, IUri **ret_uri)
HRESULT create_channelbsc(IMoniker *mon, const WCHAR *headers, BYTE *post_data, DWORD post_data_size, BOOL is_doc_binding, nsChannelBSC **retval)
HRESULT async_start_doc_binding(HTMLOuterWindow *window, HTMLInnerWindow *pending_window)
void init_bscallback(BSCallback *This, const BSCallbackVtbl *vtbl, IMoniker *mon, DWORD bindf)
static HRESULT process_response_headers(nsChannelBSC *This, const WCHAR *headers)
static HRESULT WINAPI InternetBindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
static void handle_extern_mime_navigation(nsChannelBSC *This)
void nsfree(void *) DECLSPEC_HIDDEN
static char * heap_strdupA(const char *str)
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
#define NS_ERROR_NOT_IMPLEMENTED
char * get_nscategory_entry(const char *, const char *) DECLSPEC_HIDDEN
void set_document_navigation(HTMLDocumentObj *, BOOL) DECLSPEC_HIDDEN
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
static char * heap_strndupWtoU(LPCWSTR str, unsigned len)
void nsACString_Finish(nsACString *) DECLSPEC_HIDDEN
void nsACString_InitDepend(nsACString *, const char *) DECLSPEC_HIDDEN
void call_docview_84(HTMLDocumentObj *) DECLSPEC_HIDDEN
#define NS_BINDING_ABORTED
void set_download_state(HTMLDocumentObj *, int) DECLSPEC_HIDDEN
#define NS_SUCCEEDED(res)
void set_ready_state(HTMLOuterWindow *, READYSTATE) DECLSPEC_HIDDEN
HRESULT push_task(task_t *, task_proc_t, task_proc_t, LONG) DECLSPEC_HIDDEN
void remove_target_tasks(LONG) DECLSPEC_HIDDEN
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
BSTR WINAPI SysAllocString(LPCOLESTR str)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define IsEqualGUID(rguid1, rguid2)
#define memicmpW(s1, s2, n)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
vector< Header * > headers
#define URL_DONT_ESCAPE_EXTRA_INFO
#define URL_ESCAPE_SPACES_ONLY
#define URL_UNESCAPE_INPLACE
HRESULT(* stop_binding)(BSCallback *, HRESULT)
IBindStatusCallback IBindStatusCallback_iface
const BSCallbackVtbl * vtbl
IDocObjectService * doc_object_service
IOleCommandTarget * client_cmdtrg
HTMLDocumentObj * doc_obj
nsChannelBSC * bscallback
HTMLInnerWindow * pending_window
HTMLDocumentObj * doc_obj
HTMLOuterWindow * outer_window
IHTMLWindow2 IHTMLWindow2_iface
nsChannelBSC * bscallback
struct list request_headers
nsILoadGroup * load_group
nsIInputStream * post_data_stream
nsIHttpChannel nsIHttpChannel_iface
BOOL post_data_contains_headers
nsIInputStream nsIInputStream_iface
nsIAsyncVerifyRedirectCallback nsIAsyncVerifyRedirectCallback_iface
nsIInputStream * post_stream
HTMLInnerWindow * pending_window
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **ppmk, DWORD dwFlags)
HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbscPrevious, DWORD dwReserved)
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
#define HTTP_QUERY_RAW_HEADERS_CRLF
#define HTTP_QUERY_FLAG_NUMBER
#define HTTP_QUERY_STATUS_CODE