Author: akhaldi
Date: Wed Mar 25 11:56:14 2015
New Revision: 66872

URL: http://svn.reactos.org/svn/reactos?rev=66872&view=rev
Log:
[IEFRAME] Sync with Wine Staging 1.7.37. CORE-9246

Modified:
    trunk/reactos/dll/win32/ieframe/client.c
    trunk/reactos/dll/win32/ieframe/dochost.c
    trunk/reactos/dll/win32/ieframe/ie.c
    trunk/reactos/dll/win32/ieframe/ieframe.h
    trunk/reactos/dll/win32/ieframe/iexplore.c
    trunk/reactos/dll/win32/ieframe/navigate.c
    trunk/reactos/dll/win32/ieframe/oleobject.c
    trunk/reactos/dll/win32/ieframe/shellbrowser.c
    trunk/reactos/dll/win32/ieframe/webbrowser.c
    trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/ieframe/client.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/client.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/client.c    [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/client.c    [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -288,7 +288,7 @@
     TRACE("(%p)->(%p, %x)\n", This, pfNoRedraw, dwFlags);
 
     /* FIXME: Avoid redraw, when possible */
-    pfNoRedraw = FALSE;
+    *pfNoRedraw = FALSE;
 
     if (dwFlags) {
         FIXME("dwFlags not supported (%x)\n", dwFlags);

Modified: trunk/reactos/dll/win32/ieframe/dochost.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/dochost.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/dochost.c   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/dochost.c   [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -525,11 +525,14 @@
     This->document = NULL;
 }
 
-HRESULT refresh_document(DocHost *This)
+HRESULT refresh_document(DocHost *This, const VARIANT *level)
 {
     IOleCommandTarget *cmdtrg;
     VARIANT vin, vout;
     HRESULT hres;
+
+    if(level && (V_VT(level) != VT_I4 || V_I4(level) != REFRESH_NORMAL))
+        FIXME("Unsupported refresh level %s\n", debugstr_variant(level));
 
     if(!This->document) {
         FIXME("no document\n");

Modified: trunk/reactos/dll/win32/ieframe/ie.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/ie.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/ie.c        [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/ie.c        [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -178,14 +178,16 @@
 
     TRACE("(%p)\n", This);
 
-    return refresh_document(&This->doc_host);
+    return refresh_document(&This->doc_host, NULL);
 }
 
 static HRESULT WINAPI InternetExplorer_Refresh2(IWebBrowser2 *iface, VARIANT 
*Level)
 {
     InternetExplorer *This = impl_from_IWebBrowser2(iface);
-    FIXME("(%p)->(%p)\n", This, Level);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, Level);
+
+    return refresh_document(&This->doc_host, Level);
 }
 
 static HRESULT WINAPI InternetExplorer_Stop(IWebBrowser2 *iface)

Modified: trunk/reactos/dll/win32/ieframe/ieframe.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/ieframe.h?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/ieframe.h   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/ieframe.h   [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -281,7 +281,7 @@
 HRESULT go_home(DocHost*) DECLSPEC_HIDDEN;
 HRESULT go_back(DocHost*) DECLSPEC_HIDDEN;
 HRESULT go_forward(DocHost*) DECLSPEC_HIDDEN;
-HRESULT refresh_document(DocHost*) DECLSPEC_HIDDEN;
+HRESULT refresh_document(DocHost*,const VARIANT*) DECLSPEC_HIDDEN;
 HRESULT get_location_url(DocHost*,BSTR*) DECLSPEC_HIDDEN;
 HRESULT set_dochost_url(DocHost*,const WCHAR*) DECLSPEC_HIDDEN;
 void handle_navigation_error(DocHost*,HRESULT,BSTR,IHTMLWindow2*) 
DECLSPEC_HIDDEN;
@@ -289,6 +289,7 @@
 void set_doc_state(DocHost*,READYSTATE) DECLSPEC_HIDDEN;
 void deactivate_document(DocHost*) DECLSPEC_HIDDEN;
 void create_doc_view_hwnd(DocHost*) DECLSPEC_HIDDEN;
+void on_commandstate_change(DocHost*,LONG,VARIANT_BOOL) DECLSPEC_HIDDEN;
 
 #define WM_DOCHOSTTASK (WM_USER+0x300)
 void push_dochost_task(DocHost*,task_header_t*,task_proc_t,task_destr_t,BOOL) 
DECLSPEC_HIDDEN;

Modified: trunk/reactos/dll/win32/ieframe/iexplore.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/iexplore.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/iexplore.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/iexplore.c  [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -700,7 +700,7 @@
     wc.hIcon = LoadIconW(GetModuleHandleW(0), MAKEINTRESOURCEW(IDI_APPICON));
     wc.hIconSm = LoadImageW(GetModuleHandleW(0), 
MAKEINTRESOURCEW(IDI_APPICON), IMAGE_ICON,
                             GetSystemMetrics(SM_CXSMICON), 
GetSystemMetrics(SM_CYSMICON), LR_SHARED);
-    wc.hCursor = LoadCursorW(0, MAKEINTRESOURCEW(IDC_ARROW));
+    wc.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
     wc.hbrBackground = 0;
     wc.lpszClassName = szIEWinFrame;
     wc.lpszMenuName = NULL;

Modified: trunk/reactos/dll/win32/ieframe/navigate.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/navigate.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/navigate.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/navigate.c  [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -759,6 +759,27 @@
     heap_free(task);
 }
 
+void on_commandstate_change(DocHost *doc_host, LONG command, VARIANT_BOOL 
enable)
+{
+    DISPPARAMS dispparams;
+    VARIANTARG params[2];
+
+    TRACE("command=%d enable=%d\n", command, enable);
+
+    dispparams.cArgs = 2;
+    dispparams.cNamedArgs = 0;
+    dispparams.rgdispidNamedArgs = NULL;
+    dispparams.rgvarg = params;
+
+    V_VT(params) = VT_BOOL;
+    V_BOOL(params) = enable;
+
+    V_VT(params+1) = VT_I4;
+    V_I4(params+1) = command;
+
+    call_sink(doc_host->cps.wbe2, DISPID_COMMANDSTATECHANGE, &dispparams);
+}
+
 static void doc_navigate_proc(DocHost *This, task_header_t *t)
 {
     task_doc_navigate_t *task = (task_doc_navigate_t*)t;
@@ -861,6 +882,9 @@
         FIXME("Navigation canceled\n");
         return S_OK;
     }
+
+    on_commandstate_change(This, CSC_NAVIGATEBACK, VARIANT_FALSE);
+    on_commandstate_change(This, CSC_NAVIGATEFORWARD, VARIANT_FALSE);
 
     if(This->document)
         deactivate_document(This);
@@ -1053,6 +1077,17 @@
     if(!This->doc_navigate) {
         FIXME("unsupported doc_navigate FALSE\n");
         return E_NOTIMPL;
+    }
+
+    if (travellog_pos < This->travellog.position)
+    {
+        on_commandstate_change(This, CSC_NAVIGATEBACK, VARIANT_FALSE);
+        on_commandstate_change(This, CSC_NAVIGATEFORWARD, VARIANT_TRUE);
+    }
+    else if (travellog_pos > This->travellog.position)
+    {
+        on_commandstate_change(This, CSC_NAVIGATEBACK, VARIANT_TRUE);
+        on_commandstate_change(This, CSC_NAVIGATEFORWARD, VARIANT_FALSE);
     }
 
     This->travellog.loading_pos = travellog_pos;

Modified: trunk/reactos/dll/win32/ieframe/oleobject.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/oleobject.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/oleobject.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/oleobject.c [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -282,8 +282,8 @@
 
 typedef struct {
     IEnumOLEVERB IEnumOLEVERB_iface;
-
     LONG ref;
+    LONG iter;
 } EnumOLEVERB;
 
 static inline EnumOLEVERB *impl_from_IEnumOLEVERB(IEnumOLEVERB *iface)
@@ -338,10 +338,20 @@
 {
     EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
 
+    static const OLEVERB verbs[] =
+        
{{OLEIVERB_PRIMARY},{OLEIVERB_INPLACEACTIVATE},{OLEIVERB_UIACTIVATE},{OLEIVERB_SHOW},{OLEIVERB_HIDE}};
+
     TRACE("(%p)->(%u %p %p)\n", This, celt, rgelt, pceltFetched);
 
+    /* There are a few problems with this implementation, but that's how it 
seems to work in native. See tests. */
     if(pceltFetched)
         *pceltFetched = 0;
+
+    if(This->iter == sizeof(verbs)/sizeof(*verbs))
+        return S_FALSE;
+
+    if(celt)
+        *rgelt = verbs[This->iter++];
     return S_OK;
 }
 
@@ -355,7 +365,10 @@
 static HRESULT WINAPI EnumOLEVERB_Reset(IEnumOLEVERB *iface)
 {
     EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
+
     TRACE("(%p)\n", This);
+
+    This->iter = 0;
     return S_OK;
 }
 
@@ -419,6 +432,9 @@
     release_client_site(This);
 
     if(!pClientSite) {
+        on_commandstate_change(&This->doc_host, CSC_NAVIGATEBACK, 
VARIANT_FALSE);
+        on_commandstate_change(&This->doc_host, CSC_NAVIGATEFORWARD, 
VARIANT_FALSE);
+
         if(This->doc_host.document)
             deactivate_document(&This->doc_host);
         return S_OK;
@@ -589,6 +605,7 @@
 
     ret->IEnumOLEVERB_iface.lpVtbl = &EnumOLEVERBVtbl;
     ret->ref = 1;
+    ret->iter = 0;
 
     *ppEnumOleVerb = &ret->IEnumOLEVERB_iface;
     return S_OK;

Modified: trunk/reactos/dll/win32/ieframe/shellbrowser.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/shellbrowser.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/shellbrowser.c      [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/shellbrowser.c      [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -703,9 +703,14 @@
     V_VT(params+6) = (VT_DISPATCH);
     V_DISPATCH(params+6) = (IDispatch*)This->doc_host->wb;
 
+    /* Keep reference to This. It may be released in event handler. */
+    IShellBrowser_AddRef(&This->IShellBrowser_iface);
+
     TRACE(">>>\n");
     call_sink(This->doc_host->cps.wbe2, DISPID_BEFORENAVIGATE2, &dp);
     TRACE("<<<\n");
+
+    IShellBrowser_Release(&This->IShellBrowser_iface);
 
     SysFreeString(V_BSTR(&var_url));
     SysFreeString(V_BSTR(&var_headers));
@@ -759,6 +764,9 @@
     V_VT(&url_var) = VT_BSTR;
     V_BSTR(&url_var) = url;
 
+    /* Keep reference to This. It may be released in event handler. */
+    IShellBrowser_AddRef(&This->IShellBrowser_iface);
+
     TRACE(">>>\n");
     call_sink(This->doc_host->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dp);
     TRACE("<<<\n");
@@ -766,6 +774,7 @@
     SysFreeString(url);
 
     This->doc_host->busy = VARIANT_FALSE;
+    IShellBrowser_Release(&This->IShellBrowser_iface);
     return S_OK;
 }
 

Modified: trunk/reactos/dll/win32/ieframe/webbrowser.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/webbrowser.c?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ieframe/webbrowser.c        [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/webbrowser.c        [iso-8859-1] Wed Mar 25 
11:56:14 2015
@@ -289,14 +289,16 @@
 
     TRACE("(%p)\n", This);
 
-    return refresh_document(&This->doc_host);
+    return refresh_document(&This->doc_host, NULL);
 }
 
 static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
 {
     WebBrowser *This = impl_from_IWebBrowser2(iface);
-    FIXME("(%p)->(%s)\n", This, debugstr_variant(Level));
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%s)\n", This, debugstr_variant(Level));
+
+    return refresh_document(&This->doc_host, Level);
 }
 
 static HRESULT WINAPI WebBrowser_Stop(IWebBrowser2 *iface)
@@ -934,7 +936,12 @@
         VARIANT_BOOL *pbRegister)
 {
     WebBrowser *This = impl_from_IWebBrowser2(iface);
+
     FIXME("(%p)->(%p)\n", This, pbRegister);
+
+    if(!pbRegister)
+        return E_INVALIDARG;
+
     *pbRegister=0;
     return S_OK;
 }

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=66872&r1=66871&r2=66872&view=diff
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Mar 25 11:56:14 2015
@@ -83,7 +83,7 @@
 reactos/dll/win32/httpapi             # Synced to Wine-1.7.27
 reactos/dll/win32/iccvid              # Synced to WineStaging-1.7.37
 reactos/dll/win32/icmp                # Out of sync
-reactos/dll/win32/ieframe             # Synced to Wine-1.7.27
+reactos/dll/win32/ieframe             # Synced to WineStaging-1.7.37
 reactos/dll/win32/imaadp32.acm        # Synced to Wine-1.7.27
 reactos/dll/win32/imagehlp            # Synced to Wine-1.7.27
 reactos/dll/win32/imm32               # Synced to Wine-1.7.27


Reply via email to