Skip to content

Commit d7338aa

Browse files
[BrowserEngineKit] Update to Xcode 26 beta 1-5. (#23570)
--------- Co-authored-by: Alex Soto <alex@soto.dev>
1 parent 4932429 commit d7338aa

File tree

6 files changed

+85
-32
lines changed

6 files changed

+85
-32
lines changed

src/browserenginekit.cs

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,20 @@ interface BELayerHierarchyHandle : NSSecureCoding {
6161

6262
[Export ("createXPCRepresentation")]
6363
OS_xpc_object CreateXpcRepresentation ();
64+
65+
[MacCatalyst (26, 0), NoTV, NoMac, iOS (26, 0)]
66+
[Static]
67+
[Export ("handleWithPort:data:error:")]
68+
[return: NullAllowed]
69+
BELayerHierarchyHandle Create (uint port, NSData data, [NullAllowed] out NSError error);
70+
71+
[MacCatalyst (26, 0), NoTV, NoMac, iOS (26, 0)]
72+
[Export ("encodeWithBlock:")]
73+
void Encode (BELayerHierarchyHandleEncodeCallback callback);
6474
}
6575

76+
delegate void BELayerHierarchyHandleEncodeCallback (uint copiedPort, NSData data);
77+
6678
[NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)]
6779
[BaseType (typeof (NSObject))]
6880
[DisableDefaultCtor]
@@ -115,8 +127,20 @@ interface BELayerHierarchyHostingTransactionCoordinator : NSSecureCoding {
115127

116128
[Export ("commit")]
117129
void Commit ();
130+
131+
[MacCatalyst (26, 0), NoTV, NoMac, iOS (26, 0)]
132+
[Static]
133+
[Export ("coordinatorWithPort:data:error:")]
134+
[return: NullAllowed]
135+
BELayerHierarchyHostingTransactionCoordinator Create (uint port, NSData data, [NullAllowed] out NSError error);
136+
137+
[MacCatalyst (26, 0), NoTV, NoMac, iOS (26, 0)]
138+
[Export ("encodeWithBlock:")]
139+
void Encode (BELayerHierarchyHostingTransactionCoordinatorEncodeCallback handler);
118140
}
119141

142+
delegate void BELayerHierarchyHostingTransactionCoordinatorEncodeCallback (uint copiedPort, NSData data);
143+
120144
[NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)]
121145
[BaseType (typeof (UIContextMenuConfiguration))]
122146
[DisableDefaultCtor]
@@ -215,7 +239,7 @@ interface BEScrollViewScrollUpdate {
215239
[NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)]
216240
[BaseType (typeof (NSObject))]
217241
[DisableDefaultCtor]
218-
interface BEWebContentProcess {
242+
interface BEWebContentProcess : BEExtensionProcess {
219243
[Static]
220244
[Export ("webContentProcessWithInterruptionHandler:completion:")]
221245
[Async]
@@ -227,11 +251,11 @@ interface BEWebContentProcess {
227251
void Create (string bundleId, Action interruptionHandler, BEWebContentProcessCreateCallback completion);
228252

229253
[Export ("invalidate")]
230-
void Invalidate ();
254+
new void Invalidate ();
231255

232256
[Export ("makeLibXPCConnectionError:")]
233257
[return: NullAllowed]
234-
OS_xpc_object MakeLibXpcConnection ([NullAllowed] out NSError error);
258+
new OS_xpc_object MakeLibXpcConnection ([NullAllowed] out NSError error);
235259

236260
[NoMac]
237261
[Export ("createVisibilityPropagationInteraction")]
@@ -254,7 +278,7 @@ interface BEWebContentProcess {
254278
[NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)]
255279
[BaseType (typeof (NSObject))]
256280
[DisableDefaultCtor]
257-
interface BENetworkingProcess {
281+
interface BENetworkingProcess : BEExtensionProcess {
258282
[Static]
259283
[Export ("networkProcessWithInterruptionHandler:completion:")]
260284
[Async]
@@ -266,11 +290,11 @@ interface BENetworkingProcess {
266290
void Create (string bundleId, Action interruptionHandler, BENetworkingProcessCreateCallback completion);
267291

268292
[Export ("invalidate")]
269-
void Invalidate ();
293+
new void Invalidate ();
270294

271295
[Export ("makeLibXPCConnectionError:")]
272296
[return: NullAllowed]
273-
OS_xpc_object MakeLibXpcConnection ([NullAllowed] out NSError error);
297+
new OS_xpc_object MakeLibXpcConnection ([NullAllowed] out NSError error);
274298

275299

276300
// Inlined from the Capability (BENetworkingProcess) category
@@ -290,7 +314,7 @@ interface BENetworkingProcess {
290314
[NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)]
291315
[BaseType (typeof (NSObject))]
292316
[DisableDefaultCtor]
293-
interface BERenderingProcess {
317+
interface BERenderingProcess : BEExtensionProcess {
294318
[Static]
295319
[Export ("renderingProcessWithInterruptionHandler:completion:")]
296320
[Async]
@@ -302,11 +326,11 @@ interface BERenderingProcess {
302326
void Create (string bundleId, Action interruptionHandler, BERenderingProcessCreateCallback completion);
303327

304328
[Export ("invalidate")]
305-
void Invalidate ();
329+
new void Invalidate ();
306330

307331
[Export ("makeLibXPCConnectionError:")]
308332
[return: NullAllowed]
309-
OS_xpc_object MakeLibXpcConnection ([NullAllowed] out NSError error);
333+
new OS_xpc_object MakeLibXpcConnection ([NullAllowed] out NSError error);
310334

311335
[NoMac]
312336
[Export ("createVisibilityPropagationInteraction")]
@@ -798,6 +822,14 @@ interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BERespon
798822
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0)]
799823
[Export ("keyboardWillDismiss")]
800824
void KeyboardWillDismiss ();
825+
826+
[iOS (26, 0), TV (26, 0), NoMacCatalyst]
827+
[Export ("selectionContainerViewBelowText")]
828+
UIView SelectionContainerViewBelowText { get; }
829+
830+
[iOS (26, 0), TV (26, 0), NoMacCatalyst]
831+
[Export ("selectionContainerViewAboveText")]
832+
UIView SelectionContainerViewAboveText { get; }
801833
}
802834

803835
interface IBETextInput { }
@@ -1302,4 +1334,36 @@ interface BEDownloadMonitor {
13021334
[Export ("createAccessToken")]
13031335
NSData CreateAccessToken ();
13041336
}
1337+
1338+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
1339+
[Protocol (BackwardsCompatibleCodeGeneration = false)]
1340+
interface BEExtensionProcess {
1341+
[Abstract]
1342+
[Export ("invalidate")]
1343+
void Invalidate ();
1344+
1345+
[Abstract]
1346+
[Export ("makeLibXPCConnectionError:")]
1347+
[return: NullAllowed]
1348+
OS_xpc_object MakeLibXpcConnection ([NullAllowed] out NSError error);
1349+
}
1350+
1351+
[iOS (26, 0), MacCatalyst (26, 0), NoTV, NoMac]
1352+
[BaseType (typeof (NSObject))]
1353+
[DisableDefaultCtor]
1354+
interface BEAccessibilityRemoteHostElement {
1355+
[Export ("initWithIdentifier:remotePid:")]
1356+
NativeHandle Constructor (string identifier, int remotePid);
1357+
1358+
[NullAllowed, Export ("accessibilityContainer", ArgumentSemantic.Weak)]
1359+
NSObject AccessibilityContainer { get; set; }
1360+
}
1361+
1362+
[iOS (26, 0), MacCatalyst (26, 0), NoTV, NoMac]
1363+
[BaseType (typeof (NSObject))]
1364+
[DisableDefaultCtor]
1365+
interface BEAccessibilityRemoteElement {
1366+
[Export ("initWithIdentifier:hostPid:")]
1367+
NativeHandle Constructor (string identifier, int hostPid);
1368+
}
13051369
}

tests/introspection/ApiProtocolTest.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,14 @@ protected virtual bool Skip (Type type, string protocolName)
889889
return true;
890890
}
891891
break;
892+
case "BEExtensionProcess":
893+
switch (type.Name) {
894+
case "BENetworkingProcess": // conforming using a categeory in headers
895+
case "BERenderingProcess": // conforming using a categeory in headers
896+
case "BEWebContentProcess": // conforming using a categeory in headers
897+
return true;
898+
}
899+
break;
892900
}
893901
return false;
894902
}
@@ -1121,7 +1129,7 @@ public void GeneralCase ()
11211129

11221130
if (t.IsPublic && !ConformTo (klass.Handle, protocol)) {
11231131
// note: some internal types, e.g. like UIAppearance subclasses, return false (and there's not much value in changing this)
1124-
var msg = $"Type {t.FullName} (native: {klass.Name}) does not conform {protocolName}";
1132+
var msg = $"Type {t.FullName} (native: {klass.Name}) does not conform to {protocolName}";
11251133
list.Add (msg);
11261134
ReportError (msg);
11271135
}

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-BrowserEngineKit.todo renamed to tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-BrowserEngineKit.ignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# We're not exposing BrowserEngineKit on Mac Catalyst for now, because introspection complains
2+
# about pretty much everything, which makes me question whether it's supposed to be available
3+
# on Mac Catalyst or not. So for now leave it out of Mac Catalyst.
14
!missing-enum! BEGestureType not bound
25
!missing-enum! BEKeyModifierFlags not bound
36
!missing-enum! BEKeyPressState not bound

tests/xtro-sharpie/api-annotations-dotnet/iOS-BrowserEngineKit.todo

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/macOS-BrowserEngineKit.todo

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/tvOS-BrowserEngineKit.todo

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)