Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wkwebkit] Update for Xcode 12 beta 3 #9178

Merged
merged 1 commit into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/WKWebKit/Defs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public enum WKErrorCode : long {
// Xcode 11
AttributedStringContentFailedToLoad,
AttributedStringContentLoadTimedOut,
// Xcode 12
JavaScriptInvalidFrameTarget,
NavigationAppBoundDomain,
JavaScriptAppBoundDomain,
}

#if !MONOMAC || !XAMCORE_4_0
Expand Down
46 changes: 25 additions & 21 deletions src/wkwebkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ interface WKNavigationDelegate {
[Export ("webViewWebContentProcessDidTerminate:")]
void ContentProcessDidTerminate (WKWebView webView);

[Mac (10,16)][iOS (14,0)]
[Mac (11,0)][iOS (14,0)]
[Export ("webView:authenticationChallenge:shouldAllowDeprecatedTLS:")]
void ShouldAllowDeprecatedTls (WKWebView webView, NSUrlAuthenticationChallenge challenge, Action<bool> decisionHandler);
}
Expand All @@ -254,7 +254,7 @@ interface WKPreferences : NSSecureCoding {
[Export ("minimumFontSize")]
nfloat MinimumFontSize { get; set; }

[Deprecated (PlatformName.MacOSX, 10,16, message: "Use 'WKWebPagePreferences.AllowsContentJavaScript' instead.")]
[Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'WKWebPagePreferences.AllowsContentJavaScript' instead.")]
[Deprecated (PlatformName.iOS, 14,0, message: "Use 'WKWebPagePreferences.AllowsContentJavaScript' instead.")]
[Export ("javaScriptEnabled")]
bool JavaScriptEnabled { get; set; }
Expand Down Expand Up @@ -300,7 +300,7 @@ interface WKScriptMessage {
[Export ("frameInfo", ArgumentSemantic.Copy)]
WKFrameInfo FrameInfo { get; }

[Mac (10,16)][iOS (14,0)]
[Mac (11,0)][iOS (14,0)]
[Export ("world")]
WKContentWorld World { get; }
}
Expand Down Expand Up @@ -561,18 +561,18 @@ interface WKUserContentController : NSSecureCoding {
[Export ("addScriptMessageHandler:name:")]
void AddScriptMessageHandler ([Protocolize] WKScriptMessageHandler scriptMessageHandler, string name);

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Export ("addScriptMessageHandler:contentWorld:name:")]
void AddScriptMessageHandler (IWKScriptMessageHandler scriptMessageHandler, WKContentWorld world, string name);

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Export ("addScriptMessageHandlerWithReply:contentWorld:name:")]
void AddScriptMessageHandler (IWKScriptMessageHandlerWithReply scriptMessageHandlerWithReply, WKContentWorld contentWorld, string name);

[Export ("removeScriptMessageHandlerForName:")]
void RemoveScriptMessageHandler (string name);

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Export ("removeScriptMessageHandlerForName:contentWorld:")]
void RemoveScriptMessageHandler (string name, WKContentWorld contentWorld);

Expand All @@ -588,11 +588,11 @@ interface WKUserContentController : NSSecureCoding {
[Export ("removeAllContentRuleLists")]
void RemoveAllContentRuleLists ();

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Export ("removeAllScriptMessageHandlersFromContentWorld:")]
void RemoveAllScriptMessageHandlers (WKContentWorld contentWorld);

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Export ("removeAllScriptMessageHandlers")]
void RemoveAllScriptMessageHandlers ();
}
Expand All @@ -605,6 +605,10 @@ interface WKUserScript : NSCopying {
[Export ("initWithSource:injectionTime:forMainFrameOnly:")]
IntPtr Constructor (NSString source, WKUserScriptInjectionTime injectionTime, bool isForMainFrameOnly);

[Mac (11,0), iOS (14,0)]
[Export ("initWithSource:injectionTime:forMainFrameOnly:inContentWorld:")]
IntPtr Constructor (NSString source, WKUserScriptInjectionTime injectionTime, bool isForMainFrameOnly, WKContentWorld contentWorld);

[Export ("source", ArgumentSemantic.Copy)]
NSString Source { get; }

Expand Down Expand Up @@ -792,31 +796,31 @@ interface WKWebView
[Export ("callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:")]
void CallAsyncJavaScript (string functionBody, [NullAllowed] NSDictionary<NSString, NSObject> arguments, [NullAllowed] WKFrameInfo frame, WKContentWorld contentWorld, [NullAllowed] Action<NSObject, NSError> completionHandler);

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Async]
[Export ("createPDFWithConfiguration:completionHandler:")]
void CreatePdf ([NullAllowed] WKPdfConfiguration pdfConfiguration, Action<NSData, NSError> completionHandler);

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Async]
[Export ("createWebArchiveDataWithCompletionHandler:")]
void CreateWebArchive (Action<NSData, NSError> completionHandler);

[Mac (10,16), iOS (14,0)]
[Mac (11,0), iOS (14,0)]
[Async]
[Export ("findString:withConfiguration:completionHandler:")]
void Find (string @string, [NullAllowed] WKFindConfiguration configuration, Action<WKFindResult> completionHandler);

[Mac (10, 16), iOS (14, 0)]
[Mac (11,0), iOS (14,0)]
[NullAllowed, Export ("mediaType")]
string MediaType { get; set; }

[Mac (10, 16), iOS (14, 0)]
[Mac (11,0), iOS (14,0)]
[Export ("pageZoom")]
nfloat PageZoom { get; set; }

[NoiOS]
[Mac (10,16)]
[Mac (11,0)]
[Export ("printOperationWithPrintInfo:")]
NSPrintOperation GetPrintOperation (NSPrintInfo printInfo);
}
Expand Down Expand Up @@ -901,7 +905,7 @@ interface WKWebViewConfiguration : NSCopying, NSSecureCoding {
[Export ("defaultWebpagePreferences", ArgumentSemantic.Copy)]
WKWebpagePreferences DefaultWebpagePreferences { get; set; }

[Mac (10,16)]
[Mac (11,0)]
[iOS (14,0)]
[Export ("limitsNavigationsToAppBoundDomains")]
bool LimitsNavigationsToAppBoundDomains { get; set; }
Expand Down Expand Up @@ -999,7 +1003,7 @@ interface WKWebpagePreferences {
[Export ("preferredContentMode", ArgumentSemantic.Assign)]
WKContentMode PreferredContentMode { get; set; }

[Mac (10,16)]
[Mac (11,0)]
[iOS (14,0)]
[Export ("allowsContentJavaScript")]
bool AllowsContentJavaScript { get; set; }
Expand All @@ -1014,7 +1018,7 @@ interface WKContextMenuElementInfo {
NSUrl LinkUrl { get; }
}

[Mac (10,16)][iOS (14,0)]
[Mac (11,0)][iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface WKContentWorld {
Expand All @@ -1035,7 +1039,7 @@ interface WKContentWorld {
string Name { get; }
}

[Mac (10,16)][iOS (14,0)]
[Mac (11,0)][iOS (14,0)]
[BaseType (typeof (NSObject))]
interface WKFindConfiguration : NSCopying {

Expand All @@ -1049,7 +1053,7 @@ interface WKFindConfiguration : NSCopying {
bool Wraps { get; set; }
}

[Mac (10,16)][iOS (14,0)]
[Mac (11,0)][iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface WKFindResult : NSCopying {
Expand All @@ -1058,7 +1062,7 @@ interface WKFindResult : NSCopying {
bool MatchFound { get; }
}

[Mac (10,16)][iOS (14,0)]
[Mac (11,0)][iOS (14,0)]
[BaseType (typeof (NSObject), Name = "WKPDFConfiguration")]
interface WKPdfConfiguration : NSCopying {

Expand All @@ -1068,7 +1072,7 @@ interface WKPdfConfiguration : NSCopying {

interface IWKScriptMessageHandlerWithReply {}

[Mac (10,16)][iOS (14,0)]
[Mac (11,0)][iOS (14,0)]
[Protocol]
interface WKScriptMessageHandlerWithReply {

Expand Down
1 change: 0 additions & 1 deletion tests/xtro-sharpie/iOS-WebKit.todo

This file was deleted.

1 change: 0 additions & 1 deletion tests/xtro-sharpie/macOS-WebKit.todo

This file was deleted.