Jacek Caban : ieframe: Added GoForward implementation.

Alexandre Julliard julliard at winehq.org
Tue Apr 2 13:38:37 CDT 2013


Module: wine
Branch: master
Commit: 0d30e51084afa88e25dad2ef59a7acf82f33cfee
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0d30e51084afa88e25dad2ef59a7acf82f33cfee

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Apr  2 17:40:14 2013 +0200

ieframe: Added GoForward implementation.

---

 dlls/ieframe/ie.c         |    4 ++--
 dlls/ieframe/ieframe.h    |    1 +
 dlls/ieframe/navigate.c   |   10 ++++++++++
 dlls/ieframe/webbrowser.c |    4 ++--
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/dlls/ieframe/ie.c b/dlls/ieframe/ie.c
index da0e99c..afbd2e9 100644
--- a/dlls/ieframe/ie.c
+++ b/dlls/ieframe/ie.c
@@ -149,8 +149,8 @@ static HRESULT WINAPI InternetExplorer_GoBack(IWebBrowser2 *iface)
 static HRESULT WINAPI InternetExplorer_GoForward(IWebBrowser2 *iface)
 {
     InternetExplorer *This = impl_from_IWebBrowser2(iface);
-    FIXME("(%p)\n", This);
-    return E_NOTIMPL;
+    TRACE("(%p)\n", This);
+    return go_forward(&This->doc_host->doc_host);
 }
 
 static HRESULT WINAPI InternetExplorer_GoHome(IWebBrowser2 *iface)
diff --git a/dlls/ieframe/ieframe.h b/dlls/ieframe/ieframe.h
index 4140e05..bbb3e4c 100644
--- a/dlls/ieframe/ieframe.h
+++ b/dlls/ieframe/ieframe.h
@@ -269,6 +269,7 @@ void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*) DECLSPEC_HIDDEN;
 HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*) DECLSPEC_HIDDEN;
 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 get_location_url(DocHost*,BSTR*) DECLSPEC_HIDDEN;
 HRESULT set_dochost_url(DocHost*,const WCHAR*) DECLSPEC_HIDDEN;
diff --git a/dlls/ieframe/navigate.c b/dlls/ieframe/navigate.c
index 703e32c..d730b10 100644
--- a/dlls/ieframe/navigate.c
+++ b/dlls/ieframe/navigate.c
@@ -1099,6 +1099,16 @@ HRESULT go_back(DocHost *This)
     return navigate_history(This, This->travellog.position-1);
 }
 
+HRESULT go_forward(DocHost *This)
+{
+    if(This->travellog.position >= This->travellog.length) {
+        WARN("No history available\n");
+        return E_FAIL;
+    }
+
+    return navigate_history(This, This->travellog.position+1);
+}
+
 HRESULT get_location_url(DocHost *This, BSTR *ret)
 {
     FIXME("semi-stub\n");
diff --git a/dlls/ieframe/webbrowser.c b/dlls/ieframe/webbrowser.c
index 0a9f2a5..02edfd7 100644
--- a/dlls/ieframe/webbrowser.c
+++ b/dlls/ieframe/webbrowser.c
@@ -259,8 +259,8 @@ static HRESULT WINAPI WebBrowser_GoBack(IWebBrowser2 *iface)
 static HRESULT WINAPI WebBrowser_GoForward(IWebBrowser2 *iface)
 {
     WebBrowser *This = impl_from_IWebBrowser2(iface);
-    FIXME("(%p)\n", This);
-    return E_NOTIMPL;
+    TRACE("(%p)\n", This);
+    return go_forward(&This->doc_host);
 }
 
 static HRESULT WINAPI WebBrowser_GoHome(IWebBrowser2 *iface)




More information about the wine-cvs mailing list