[IEFRAME] Sync with Wine Staging 3.17. CORE-15127
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 1 Oct 2018 11:52:10 +0000 (12:52 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 1 Oct 2018 11:52:10 +0000 (12:52 +0100)
dll/win32/ieframe/dochost.c
dll/win32/ieframe/ieframe_main.c
dll/win32/ieframe/iexplore.c
dll/win32/ieframe/intshcut.c
dll/win32/ieframe/navigate.c
dll/win32/ieframe/oleobject.c
dll/win32/ieframe/shellbrowser.c
media/doc/README.WINE

index 424868d..d22ad3d 100644 (file)
@@ -428,7 +428,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, sizeof(about_schemeW)/sizeof(*about_schemeW))) {
+    if(This->url && !strncmpiW(This->url, about_schemeW, ARRAY_SIZE(about_schemeW))) {
         TRACE("Skipping about URL\n");
         return;
     }
index a862f9a..e207ce0 100644 (file)
@@ -91,7 +91,7 @@ static void release_typelib(void)
     if(!typelib)
         return;
 
-    for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) {
+    for(i=0; i < ARRAY_SIZE(typeinfos); i++) {
         if(typeinfos[i])
             ITypeInfo_Release(typeinfos[i]);
     }
index 8362e80..477d58f 100644 (file)
@@ -263,7 +263,7 @@ static void add_tbs_to_menu(HMENU menu)
         WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\',
                                'C','l','a','s','s','e','s','\\','C','L','S','I','D',0};
         WCHAR guid[39];
-        DWORD value_len = sizeof(guid)/sizeof(guid[0]);
+        DWORD value_len = ARRAY_SIZE(guid);
         int i;
 
         if(SHRegOpenUSKeyW(classes_key, KEY_READ, NULL, &classes_handle, TRUE) != ERROR_SUCCESS)
@@ -276,11 +276,11 @@ static void add_tbs_to_menu(HMENU menu)
         for(i = 0; SHRegEnumUSValueW(toolbar_handle, i, guid, &value_len, NULL, NULL, NULL, SHREGENUM_HKLM) == ERROR_SUCCESS; i++)
         {
             WCHAR tb_name[100];
-            DWORD tb_name_len = sizeof(tb_name)/sizeof(tb_name[0]);
+            DWORD tb_name_len = ARRAY_SIZE(tb_name);
             HUSKEY tb_class_handle;
             MENUITEMINFOW item;
             LSTATUS ret;
-            value_len = sizeof(guid)/sizeof(guid[0]);
+            value_len = ARRAY_SIZE(guid);
 
             if(lstrlenW(guid) != 38)
             {
@@ -425,7 +425,7 @@ static void add_tb_button(InternetExplorer *ie, int bmp, int cmd, int strId)
     TBBUTTON btn;
     WCHAR buf[30];
 
-    LoadStringW(ieframe_instance, strId, buf, sizeof(buf)/sizeof(buf[0]));
+    LoadStringW(ieframe_instance, strId, buf, ARRAY_SIZE(buf));
 
     btn.iBitmap = bmp;
     btn.idCommand = cmd;
@@ -452,7 +452,7 @@ static void create_rebar(InternetExplorer *ie)
     HIMAGELIST imagelist;
     SIZE toolbar_size;
 
-    LoadStringW(ieframe_instance, IDS_ADDRESS, addr, sizeof(addr)/sizeof(addr[0]));
+    LoadStringW(ieframe_instance, IDS_ADDRESS, addr, ARRAY_SIZE(addr));
 
     hwndRebar = CreateWindowExW(WS_EX_TOOLWINDOW, REBARCLASSNAMEW, NULL,
             WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|RBS_VARHEIGHT|CCS_TOP|CCS_NODIVIDER, 0, 0, 0, 0,
index 2376b1b..4331bb9 100644 (file)
@@ -93,7 +93,7 @@ static BOOL run_winemenubuilder( const WCHAR *args )
     WCHAR app[MAX_PATH];
     void *redir;
 
-    GetSystemDirectoryW( app, MAX_PATH - sizeof(menubuilder)/sizeof(WCHAR) );
+    GetSystemDirectoryW( app, MAX_PATH - ARRAY_SIZE( menubuilder ));
     strcatW( app, menubuilder );
 
     len = (strlenW( app ) + strlenW( args ) + 1) * sizeof(WCHAR);
@@ -278,7 +278,7 @@ static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLoca
         return E_NOTIMPL;
     }
 
-    hres = CoInternetParseUrl(This->url, PARSE_SCHEMA, 0, app, sizeof(app)/sizeof(WCHAR), NULL, 0);
+    hres = CoInternetParseUrl(This->url, PARSE_SCHEMA, 0, app, ARRAY_SIZE(app), NULL, 0);
     if(FAILED(hres))
         return E_FAIL;
 
index 658857f..96fb083 100644 (file)
@@ -111,7 +111,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, sizeof(buffer)/sizeof(WCHAR), fmt, str);
+        snprintfW(buffer, ARRAY_SIZE(buffer), fmt, str);
     }
 
     V_VT(&arg) = VT_BSTR;
@@ -576,7 +576,7 @@ static void on_before_navigate2(DocHost *This, LPCWSTR url, SAFEARRAY *post_data
     DISPPARAMS dispparams;
     VARIANTARG params[7];
     WCHAR file_path[MAX_PATH];
-    DWORD file_path_len = sizeof(file_path) / sizeof(*file_path);
+    DWORD file_path_len = ARRAY_SIZE(file_path);
 
     dispparams.cArgs = 7;
     dispparams.cNamedArgs = 0;
@@ -642,7 +642,7 @@ static BOOL try_application_url(LPCWSTR url)
 
     static const WCHAR wszURLProtocol[] = {'U','R','L',' ','P','r','o','t','o','c','o','l',0};
 
-    hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, app, sizeof(app)/sizeof(WCHAR), NULL, 0);
+    hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, app, ARRAY_SIZE(app), NULL, 0);
     if(FAILED(hres))
         return FALSE;
 
@@ -674,7 +674,7 @@ static HRESULT create_moniker(LPCWSTR url, IMoniker **mon)
     if(PathIsURLW(url))
         return CreateURLMoniker(NULL, url, mon);
 
-    size = sizeof(new_url)/sizeof(WCHAR);
+    size = ARRAY_SIZE(new_url);
     hres = UrlApplySchemeW(url, new_url, &size, URL_APPLY_GUESSSCHEME | URL_APPLY_GUESSFILE | URL_APPLY_DEFAULT);
     TRACE("was %s got %s\n", debugstr_w(url), debugstr_w(new_url));
     if(FAILED(hres)) {
@@ -978,7 +978,7 @@ HRESULT navigate_url(DocHost *This, LPCWSTR url, const VARIANT *Flags,
         }else {
             DWORD size;
 
-            size = sizeof(new_url)/sizeof(WCHAR);
+            size = ARRAY_SIZE(new_url);
             hres = UrlApplySchemeW(url, new_url, &size,
                     URL_APPLY_GUESSSCHEME | URL_APPLY_GUESSFILE | URL_APPLY_DEFAULT);
             if(FAILED(hres)) {
index 1ff9a92..22fe4b1 100644 (file)
@@ -385,7 +385,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(IEnumOLEVERB *iface, ULONG celt, OLEVERB
     if(pceltFetched)
         *pceltFetched = 0;
 
-    if(This->iter == sizeof(verbs)/sizeof(*verbs))
+    if(This->iter == ARRAY_SIZE(verbs))
         return S_FALSE;
 
     if(celt)
index f75689e..78e0e85 100644 (file)
@@ -658,7 +658,7 @@ static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(
     VARIANT_BOOL cancel = VARIANT_FALSE;
     SAFEARRAY *post_data;
     WCHAR file_path[MAX_PATH];
-    DWORD file_path_len = sizeof(file_path) / sizeof(*file_path);
+    DWORD file_path_len = ARRAY_SIZE(file_path);
 
     TRACE("%p %p %s %x %s %p %d %s %d %p\n", This, pDispatch, debugstr_w(lpszUrl),
             dwFlags, debugstr_w(lpszFrameName), pPostData, cbPostData,
index e74dc1f..5ab6bf3 100644 (file)
@@ -74,7 +74,7 @@ reactos/dll/win32/hlink               # Synced to WineStaging-3.3
 reactos/dll/win32/hnetcfg             # Synced to WineStaging-3.9
 reactos/dll/win32/httpapi             # Synced to WineStaging-3.3
 reactos/dll/win32/iccvid              # Synced to WineStaging-3.3
-reactos/dll/win32/ieframe             # Synced to WineStaging-3.9
+reactos/dll/win32/ieframe             # Synced to WineStaging-3.17
 reactos/dll/win32/imaadp32.acm        # Synced to WineStaging-3.3
 reactos/dll/win32/imagehlp            # Synced to WineStaging-3.3
 reactos/dll/win32/imm32               # Synced to WineStaging-3.9