]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove old WXCOCOA code.
authorSteve Lamerton <steve.lamerton@gmail.com>
Sat, 6 Aug 2011 13:55:15 +0000 (13:55 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sat, 6 Aug 2011 13:55:15 +0000 (13:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/webview_webkit.mm

index 2285278f6a7d3d9fa52ec9de58100045c02c820f..ac2838319c118ad4fe92d1e864e3b4a19ab4b170 100644 (file)
     #include "wx/wx.h"
 #endif
 
-#ifdef __WXCOCOA__
-#include "wx/cocoa/autorelease.h"
-#else
 #include "wx/osx/private.h"
 #include "wx/cocoa/string.h"
 
 #include <WebKit/WebKit.h>
 #include <WebKit/HIWebView.h>
 #include <WebKit/CarbonUtils.h>
-#endif
 
 #include <Foundation/NSURLError.h>
 
@@ -334,43 +330,6 @@ bool wxWebViewWebKit::Create(wxWindow *parent,
 {
     m_busy = false;
 
- //still needed for wxCocoa??
-/*
-    int width, height;
-    wxSize sizeInstance;
-    if (size.x == wxDefaultCoord || size.y == wxDefaultCoord)
-    {
-        m_parent->GetClientSize(&width, &height);
-        sizeInstance.x = width;
-        sizeInstance.y = height;
-    }
-    else
-    {
-        sizeInstance.x = size.x;
-        sizeInstance.y = size.y;
-    }
-*/
-    // now create and attach WebKit view...
-#ifdef __WXCOCOA__
-    wxControl::Create(parent, m_windowID, pos, sizeInstance, style, name);
-    SetSize(pos.x, pos.y, sizeInstance.x, sizeInstance.y);
-
-    wxTopLevelWindowCocoa *topWin = wxDynamicCast(this, wxTopLevelWindowCocoa);
-    NSWindow* nsWin = topWin->GetNSWindow();
-    NSRect rect;
-    rect.origin.x = pos.x;
-    rect.origin.y = pos.y;
-    rect.size.width = sizeInstance.x;
-    rect.size.height = sizeInstance.y;
-    m_webView = (WebView*)[[WebView alloc] initWithFrame:rect
-                                               frameName:@"webkitFrame"
-                                               groupName:@"webkitGroup"];
-    SetNSView(m_webView);
-    [m_cocoaNSView release];
-
-    if(m_parent) m_parent->CocoaAddChild(this);
-    SetInitialFrameRect(pos,sizeInstance);
-#else
     wxControl::Create(parent, winID, pos, size, style, wxDefaultValidator, name);
 
 #if wxOSX_USE_CARBON
@@ -405,7 +364,7 @@ bool wxWebViewWebKit::Create(wxWindow *parent,
 #endif
     [m_webView setHidden:false];
 
-#endif
+
 
     // Register event listener interfaces
     MyFrameLoadMonitor* myFrameLoadMonitor =