X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d2f31db0c8c611af9f80efa5237f5479388350b..cceffa9e86569facf9dd06d98e88960432139d13:/src/osx/webview_webkit.mm diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index 74e23a63cc..883fba00f2 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -557,7 +557,7 @@ void wxWebViewWebKit::Print() { [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]; } @@ -648,7 +648,7 @@ void wxWebViewWebKit::RunScript(const wxString& javascript) 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 @@ -694,7 +694,7 @@ void wxWebViewWebKit::OnSize(wxSizeEvent &event) // we want is the root view, because we need to make the y origin relative // to the very top of the window, not its contents, since we later flip // the y coordinate for Cocoa. - HIViewConvertRect (&rect, m_peer->GetControlRef(), + HIViewConvertRect (&rect, GetPeer()->GetControlRef(), HIViewGetRoot( (WindowRef) MacGetTopLevelWindowRef() )); @@ -1086,7 +1086,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) *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: @@ -1182,7 +1182,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) webKitWindow->GetId(), webKitWindow->GetCurrentURL(), target); - + event.SetString(wxStringWithNSString(title)); if (webKitWindow && webKitWindow->GetEventHandler()) @@ -1228,7 +1228,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) } } -- (void)webView:(WebView *)sender +- (void)webView:(WebView *)sender decidePolicyForNewWindowAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request newFrameName:(NSString *)frameName @@ -1285,18 +1285,18 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) 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 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