#include "wx/osx/webview_webkit.h"
-#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
- || defined(__WXOSX_CARBON__))
+#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
+ || defined(__WXOSX_CARBON__))
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
{
[op setShowsPrintPanel: showPrompt];
// in my tests, the progress bar always freezes and it stops the whole
- // print operation. do not turn this to true unless there is a
+ // print operation. do not turn this to true unless there is a
// workaround for the bug.
[op setShowsProgressPanel: false];
}
void wxWebViewWebKit::OnSize(wxSizeEvent &event)
{
-#if defined(__WXMAC_) && wxOSX_USE_CARBON
+#if defined(__WXMAC__) && wxOSX_USE_CARBON
// This is a nasty hack because WebKit seems to lose its position when it is
// embedded in a control that is not itself the content view for a TLW.
// I put it in OnSize because these calcs are not perfect, and in fact are
*out = wxWEB_NAV_ERR_USER_CANCELLED;
break;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
case NSURLErrorCannotDecodeRawData:
case NSURLErrorCannotDecodeContentData:
case NSURLErrorCannotParseResponse:
webKitWindow->GetId(),
webKitWindow->GetCurrentURL(),
target);
-
+
event.SetString(wxStringWithNSString(title));
if (webKitWindow && webKitWindow->GetEventHandler())
}
}
-- (void)webView:(WebView *)sender
+- (void)webView:(WebView *)sender
decidePolicyForNewWindowAction:(NSDictionary *)actionInformation
request:(NSURLRequest *)request
newFrameName:(NSString *)frameName
NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[request URL]
MIMEType:wxNSStringWithWxString(file->GetMimeType())
- expectedContentLength:length
+ expectedContentLength:length
textEncodingName:nil];
-
+
//Load the data, we malloc it so it is tidied up properly
void* buffer = malloc(length);
file->GetStream()->Read(buffer, length);
NSData *data = [[NSData alloc] initWithBytesNoCopy:buffer length:length];
-
+
id<NSURLProtocolClient> client = [self client];
//We do not support caching anything yet
- [client URLProtocol:self didReceiveResponse:response
+ [client URLProtocol:self didReceiveResponse:response
cacheStoragePolicy:NSURLCacheStorageNotAllowed];
//Set the data
@end
-#endif //wxUSE_WEBVIEW_WEBKIT
+#endif //wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT