AX: web process should load correct bundle path for MACCATALYST
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jul 2019 17:18:31 +0000 (17:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jul 2019 17:18:31 +0000 (17:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200122

Patch by Eric Liang <ericliang@apple.com> on 2019-07-26
Reviewed by Brent Fulgham.

Added the path to accessibility bundle for Mac Catalyst.
Added sandbox profile to read accessibility settings.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::registerWithAccessibility):
* WebProcess/com.apple.WebProcess.sb.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@247864 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
Source/WebKit/WebProcess/com.apple.WebProcess.sb.in

index 60deadbf4f56a458262dc4d0741177569ad854a7..8495f396d18ff49138b4ff3381349bd7056dbcc1 100644 (file)
@@ -1,3 +1,17 @@
+2019-07-26  Eric Liang  <ericliang@apple.com>
+
+        AX: web process should load correct bundle path for MACCATALYST
+        https://bugs.webkit.org/show_bug.cgi?id=200122
+
+        Reviewed by Brent Fulgham.
+
+        Added the path to accessibility bundle for Mac Catalyst.
+        Added sandbox profile to read accessibility settings.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::registerWithAccessibility):
+        * WebProcess/com.apple.WebProcess.sb.in:
+
 2019-07-26  Alexander Mikhaylenko  <exalm7659@gmail.com>
 
         REGRESSION(r246496): [GTK] Tapping the web view scrolls up a bit
index 3d5dfb4e78a66604eabe2fddd369d94244c95c88..b47d1d8afa03fed36decad989d72dbc418487f59 100644 (file)
@@ -321,7 +321,11 @@ static void registerWithAccessibility()
     [NSAccessibilityRemoteUIElement setRemoteUIApp:YES];
 #endif
 #if PLATFORM(IOS_FAMILY)
-    NSString *accessibilityBundlePath = [(NSString *)GSSystemRootDirectory() stringByAppendingString:@"/System/Library/AccessibilityBundles/WebProcessLoader.axbundle"];
+    NSString *accessibilityBundlePath = (NSString *)GSSystemRootDirectory();
+#if PLATFORM(MACCATALYST)
+    accessibilityBundlePath = [accessibilityBundlePath stringByAppendingString:@"System/iOSSupport"];
+#endif
+    accessibilityBundlePath = [accessibilityBundlePath stringByAppendingString:@"System/Library/AccessibilityBundles/WebProcessLoader.axbundle"];
     NSError *error = nil;
     if (![[NSBundle bundleWithPath:accessibilityBundlePath] loadAndReturnError:&error])
         LOG_ERROR("Failed to load accessibility bundle at %@: %@", accessibilityBundlePath, error);
index da7c39c4fceb3ce113045b49e75408ca1675dbc1..e6afffda9fe2e39b76420e3b4e529355e7f32d00 100644 (file)
 (allow user-preference-read
     (preference-domain
         "kCFPreferencesAnyApplication"
+        "com.apple.Accessibility"
         "com.apple.ATS"
         "com.apple.CoreGraphics"
         "com.apple.DownloadAssessment"