diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h
index 87dd797f0f..55bf86fac9 100755
--- a/include/wx/html/webkit.h
+++ b/include/wx/html/webkit.h
@@ -67,7 +67,7 @@ public:
bool CanGetPageSource();
wxString GetPageSource();
void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString);
-
+
//we need to resize the webview when the control size changes
void OnSize(wxSizeEvent &event);
protected:
@@ -79,7 +79,7 @@ private:
wxWindowID m_windowID;
wxString m_currentURL;
wxString m_pageTitle;
- void* m_webView;
+ objc_object* m_webView;
//It should be WebView, but WebView is Cocoa only, so any class which included
//this header would have to link to Cocoa, so for now use void* instead.
};
diff --git a/src/html/htmlctrl/webkit/webkit.mm b/src/html/htmlctrl/webkit/webkit.mm
index 1b6155d173..cb85a483a4 100755
--- a/src/html/htmlctrl/webkit/webkit.mm
+++ b/src/html/htmlctrl/webkit/webkit.mm
@@ -200,17 +200,17 @@ bool wxWebKitCtrl::CanGoForward(){
bool wxWebKitCtrl::GoBack(){
if ( !m_webView )
return false;
-
- [m_webView goBack];
- return true;
+
+ bool result = [(WebView*)m_webView goBack];
+ return result;
}
bool wxWebKitCtrl::GoForward(){
if ( !m_webView )
return false;
- [m_webView goForward];
- return true;
+ bool result = [(WebView*)m_webView goForward];
+ return result;
}
void wxWebKitCtrl::Reload(){
@@ -236,14 +236,13 @@ bool wxWebKitCtrl::CanGetPageSource(){
}
wxString wxWebKitCtrl::GetPageSource(){
- if ( !m_webView )
- return wxT("");
if (CanGetPageSource()){
WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
return wxStringWithNSString( [[dataSource representation] documentSource] );
}
+ return wxT("");
}
void wxWebKitCtrl::SetPageSource(wxString& source, const wxString& baseUrl){
@@ -263,7 +262,7 @@ void wxWebKitCtrl::OnSize(wxSizeEvent &event){
wxWindow* parent = GetParent();
bool inNotebook = false;
int x = 0;
- int y = 18;
+ int y = 18;
while(parent != NULL)
{
// keep adding the position until we hit the notebook