X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3225a4b8b8656f25dac6cb20684a3c2c273cf796..d5363c04ac7bfd5409b369746a67b83fd10cfdbc:/src/osx/webview_webkit.mm?ds=inline diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index f0175d48ab..74e23a63cc 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -14,8 +14,8 @@ #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" @@ -1062,7 +1062,9 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) case NSURLErrorResourceUnavailable: case NSURLErrorHTTPTooManyRedirects: +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 case NSURLErrorDataLengthExceedsMaximum: +#endif case NSURLErrorBadURL: case NSURLErrorFileIsDirectory: *out = wxWEB_NAV_ERR_REQUEST; @@ -1084,16 +1086,20 @@ 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 case NSURLErrorCannotDecodeRawData: case NSURLErrorCannotDecodeContentData: - case NSURLErrorBadServerResponse: case NSURLErrorCannotParseResponse: +#endif + case NSURLErrorBadServerResponse: *out = wxWEB_NAV_ERR_REQUEST; break; case NSURLErrorUserAuthenticationRequired: case NSURLErrorSecureConnectionFailed: +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 case NSURLErrorClientCertificateRequired: +#endif *out = wxWEB_NAV_ERR_AUTH; break; @@ -1309,4 +1315,4 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) @end -#endif //wxUSE_WEBVIEW_WEBKIT +#endif //wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT