[IEFRAME] Sync with Wine Staging 4.18. CORE-16441

This commit is contained in:
Amine Khaldi 2019-11-02 18:32:59 +01:00
parent ebcc4c6109
commit c3cabdbf31
9 changed files with 73 additions and 39 deletions

View file

@ -136,7 +136,6 @@ static void notif_complete(DocHost *This, DISPID dispid)
TRACE("%d <<<\n", dispid);
SysFreeString(V_BSTR(&url));
This->busy = VARIANT_FALSE;
}
static void object_available(DocHost *This)
@ -428,7 +427,7 @@ static void update_travellog(DocHost *This)
static const WCHAR about_schemeW[] = {'a','b','o','u','t',':'};
if(This->url && !strncmpiW(This->url, about_schemeW, ARRAY_SIZE(about_schemeW))) {
if(This->url && !_wcsnicmp(This->url, about_schemeW, ARRAY_SIZE(about_schemeW))) {
TRACE("Skipping about URL\n");
return;
}
@ -681,6 +680,8 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
return E_NOTIMPL;
return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
case OLECMDID_SETDOWNLOADSTATE:
if(pvaIn && V_VT(pvaIn) == VT_I4)
This->busy = V_I4(pvaIn) ? VARIANT_TRUE : VARIANT_FALSE;
if(This->olecmd)
return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);

View file

@ -103,16 +103,29 @@ static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface)
static HRESULT WINAPI InternetExplorer_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
{
InternetExplorer *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)->(%p)\n", This, pctinfo);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, pctinfo);
*pctinfo = 1;
return S_OK;
}
static HRESULT WINAPI InternetExplorer_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid,
LPTYPEINFO *ppTInfo)
{
InternetExplorer *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
return E_NOTIMPL;
ITypeInfo *typeinfo;
HRESULT hres;
TRACE("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
if(FAILED(hres))
return hres;
ITypeInfo_AddRef(typeinfo);
*ppTInfo = typeinfo;
return S_OK;
}
static HRESULT WINAPI InternetExplorer_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid,
@ -120,9 +133,17 @@ static HRESULT WINAPI InternetExplorer_GetIDsOfNames(IWebBrowser2 *iface, REFIID
LCID lcid, DISPID *rgDispId)
{
InternetExplorer *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
return E_NOTIMPL;
ITypeInfo *typeinfo;
HRESULT hres;
TRACE("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
if(FAILED(hres))
return hres;
return ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
}
static HRESULT WINAPI InternetExplorer_Invoke(IWebBrowser2 *iface, DISPID dispIdMember,
@ -131,9 +152,18 @@ static HRESULT WINAPI InternetExplorer_Invoke(IWebBrowser2 *iface, DISPID dispId
EXCEPINFO *pExepInfo, UINT *puArgErr)
{
InternetExplorer *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
ITypeInfo *typeinfo;
HRESULT hres;
TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
return E_NOTIMPL;
hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
if(FAILED(hres))
return hres;
return ITypeInfo_Invoke(typeinfo, &This->IWebBrowser2_iface, dispIdMember, wFlags, pDispParams,
pVarResult, pExepInfo, puArgErr);
}
static HRESULT WINAPI InternetExplorer_GoBack(IWebBrowser2 *iface)
@ -318,8 +348,11 @@ static HRESULT WINAPI InternetExplorer_get_LocationURL(IWebBrowser2 *iface, BSTR
static HRESULT WINAPI InternetExplorer_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
{
InternetExplorer *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)->(%p)\n", This, pBool);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, pBool);
*pBool = This->doc_host.busy;
return S_OK;
}
static HRESULT WINAPI InternetExplorer_Quit(IWebBrowser2 *iface)

View file

@ -29,6 +29,7 @@
#include "wingdi.h"
#include "winuser.h"
#ifdef __REACTOS__
#include <winnls.h>
#include <wincon.h>
#endif
@ -42,7 +43,6 @@
#include "shdeprecated.h"
#include "docobjectservice.h"
#include "wine/unicode.h"
#include "wine/heap.h"
#include "wine/list.h"
@ -347,7 +347,7 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
if(str) {
DWORD size;
size = (strlenW(str)+1)*sizeof(WCHAR);
size = (lstrlenW(str)+1)*sizeof(WCHAR);
ret = heap_alloc(size);
if(ret)
memcpy(ret, str, size);
@ -358,7 +358,7 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
static inline LPWSTR co_strdupW(LPCWSTR str)
{
WCHAR *ret = CoTaskMemAlloc((strlenW(str) + 1)*sizeof(WCHAR));
WCHAR *ret = CoTaskMemAlloc((lstrlenW(str) + 1)*sizeof(WCHAR));
if (ret)
lstrcpyW(ret, str);
return ret;

View file

@ -187,8 +187,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
switch(fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
ieframe_instance = hInstDLL;
register_iewindow_class();

View file

@ -970,7 +970,7 @@ static BOOL create_ie_window(BOOL nohome, const WCHAR *cmdline)
VARIANT var_url;
int cmdlen;
cmdlen = strlenW(cmdline);
cmdlen = lstrlenW(cmdline);
if(cmdlen > 2 && cmdline[0] == '"' && cmdline[cmdlen-1] == '"') {
cmdline++;
cmdlen -= 2;
@ -1001,18 +1001,18 @@ static HDDEDATA open_dde_url(WCHAR *dde_url)
url = dde_url;
if(*url == '"') {
url++;
url_end = strchrW(url, '"');
url_end = wcschr(url, '"');
if(!url_end) {
FIXME("missing string terminator\n");
return 0;
}
*url_end = 0;
}else {
url_end = strchrW(url, ',');
url_end = wcschr(url, ',');
if(url_end)
*url_end = 0;
else
url_end = url + strlenW(url);
url_end = url + lstrlenW(url);
}
LIST_FOR_EACH_ENTRY(iter, &ie_list, InternetExplorer, entry) {
@ -1162,11 +1162,11 @@ DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
while (cmdline[length] && cmdline[length] != ' ' && cmdline[length] != '\t') length++;
if (!strncmpiW(cmdline, embeddingW, length))
if (!_wcsnicmp(cmdline, embeddingW, length))
embedding = TRUE;
else if (!strncmpiW(cmdline, nohomeW, length))
else if (!_wcsnicmp(cmdline, nohomeW, length))
nohome = TRUE;
else if (!strncmpiW(cmdline, startmanagerW, length))
else if (!_wcsnicmp(cmdline, startmanagerW, length))
manager = TRUE;
else
break;

View file

@ -94,15 +94,15 @@ static BOOL run_winemenubuilder( const WCHAR *args )
void *redir;
GetSystemDirectoryW( app, MAX_PATH - ARRAY_SIZE( menubuilder ));
strcatW( app, menubuilder );
lstrcatW( app, menubuilder );
len = (strlenW( app ) + strlenW( args ) + 1) * sizeof(WCHAR);
len = (lstrlenW( app ) + lstrlenW( args ) + 1) * sizeof(WCHAR);
buffer = heap_alloc( len );
if( !buffer )
return FALSE;
strcpyW( buffer, app );
strcatW( buffer, args );
lstrcpyW( buffer, app );
lstrcatW( buffer, args );
TRACE("starting %s\n",debugstr_w(buffer));
@ -136,7 +136,7 @@ static BOOL StartLinkProcessor( LPCOLESTR szLink )
if( !buffer )
return FALSE;
sprintfW( buffer, szFormat, szLink );
swprintf( buffer, szFormat, szLink );
ret = run_winemenubuilder( buffer );
heap_free( buffer );
return ret;
@ -521,7 +521,7 @@ static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileNam
int iconindex;
PROPSPEC ps;
PROPVARIANT pv;
iconindex = strtolW(iconindexstring, NULL, 10);
iconindex = wcstol(iconindexstring, NULL, 10);
ps.ulKind = PRSPEC_PROPID;
ps.u.propid = PID_IS_ICONINDEX;
pv.vt = VT_I4;

View file

@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __REACTOS__
#include <wchar.h>
#endif
#define NONAMELESSUNION
#include "ieframe.h"
@ -111,7 +115,7 @@ static void set_status_text(BindStatusCallback *This, ULONG statuscode, LPCWSTR
fmt[0] = 0;
/* the format string must have one "%s" for the str */
LoadStringW(ieframe_instance, IDS_STATUSFMT_FIRST + statuscode, fmt, IDS_STATUSFMT_MAXLEN);
snprintfW(buffer, ARRAY_SIZE(buffer), fmt, str);
swprintf(buffer, fmt, str);
}
V_VT(&arg) = VT_BSTR;
@ -150,6 +154,7 @@ void notify_download_state(DocHost *dochost, BOOL is_downloading)
{
DISPPARAMS dwl_dp = {NULL};
TRACE("(%x)\n", is_downloading);
dochost->busy = is_downloading ? VARIANT_TRUE : VARIANT_FALSE;
call_sink(dochost->cps.wbe2, is_downloading ? DISPID_DOWNLOADBEGIN : DISPID_DOWNLOADCOMPLETE, &dwl_dp);
}
@ -465,7 +470,7 @@ static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate *iface,
dwReserved, pszAdditionalHeaders);
if(This->headers) {
int size = (strlenW(This->headers)+1)*sizeof(WCHAR);
int size = (lstrlenW(This->headers)+1)*sizeof(WCHAR);
*pszAdditionalHeaders = CoTaskMemAlloc(size);
memcpy(*pszAdditionalHeaders, This->headers, size);
}
@ -583,8 +588,6 @@ static void on_before_navigate2(DocHost *This, LPCWSTR url, SAFEARRAY *post_data
dispparams.rgdispidNamedArgs = NULL;
dispparams.rgvarg = params;
This->busy = VARIANT_TRUE;
V_VT(params) = VT_BOOL|VT_BYREF;
V_BOOLREF(params) = cancel;
@ -888,6 +891,8 @@ static HRESULT navigate_bsc(DocHost *This, BindStatusCallback *bsc, IMoniker *mo
}
notify_download_state(This, TRUE);
This->busy = VARIANT_FALSE;
on_commandstate_change(This, CSC_NAVIGATEBACK, FALSE);
on_commandstate_change(This, CSC_NAVIGATEFORWARD, FALSE);

View file

@ -786,7 +786,6 @@ static HRESULT WINAPI DocObjectService_FireNavigateComplete2(
SysFreeString(url);
This->doc_host->busy = VARIANT_FALSE;
IShellBrowser_Release(&This->IShellBrowser_iface);
return S_OK;
}
@ -850,8 +849,6 @@ static HRESULT WINAPI DocObjectService_FireDocumentComplete(
TRACE("<<<\n");
SysFreeString(url);
if(This->doc_host)
This->doc_host->busy = VARIANT_FALSE;
IShellBrowser_Release(&This->IShellBrowser_iface);
return S_OK;

View file

@ -75,7 +75,7 @@ dll/win32/hlink # Synced to WineStaging-4.18
dll/win32/hnetcfg # Synced to WineStaging-4.18
dll/win32/httpapi # Synced to WineStaging-4.18
dll/win32/iccvid # Synced to WineStaging-4.0
dll/win32/ieframe # Synced to WineStaging-4.0
dll/win32/ieframe # Synced to WineStaging-4.18
dll/win32/imaadp32.acm # Synced to WineStaging-4.0
dll/win32/imagehlp # Synced to WineStaging-3.3
dll/win32/imm32 # Synced to WineStaging-4.0