Skip to content

Commit

Permalink
Forward AX notifications to the WebContent process
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=274182
rdar://127776677

Reviewed by Sihui Liu.

Telemetry is showing more AX notifications that needs to be forwarded to the WebContent process.

* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
* Source/WebKit/Scripts/process-entitlements.sh:
* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
* Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:

Canonical link: https://commits.webkit.org/278788@main
  • Loading branch information
pvollan committed May 15, 2024
1 parent 03d9366 commit 1cdc97a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,9 @@
"com.apple.accessibility.cache.ax"
"com.apple.accessibility.cache.enhance.text.legibility"
"com.apple.accessibility.cache.enhance.text.legibilitycom.apple.WebKit.WebContent"
"com.apple.accessibility.cache.guided.access.via.mdm"
"com.apple.accessibility.cache.invert.colors"
"com.apple.accessibility.cache.invert.colorscom.apple.WebKit.WebContent"
"com.apple.accessibility.cache.vot"
"com.apple.accessibility.cache.zoom"
"com.apple.language.changed"
Expand Down
36 changes: 19 additions & 17 deletions Source/WebKit/Scripts/process-entitlements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,26 +207,28 @@ function notify_entitlements()
plistbuddy Add :com.apple.private.darwin-notification.introspect:5 string com.apple.accessibility.cache.ax
plistbuddy Add :com.apple.private.darwin-notification.introspect:6 string com.apple.accessibility.cache.enhance.text.legibility
plistbuddy Add :com.apple.private.darwin-notification.introspect:7 string com.apple.accessibility.cache.enhance.text.legibilitycom.apple.WebKit.WebContent
plistbuddy Add :com.apple.private.darwin-notification.introspect:8 string com.apple.accessibility.cache.invert.colors
plistbuddy Add :com.apple.private.darwin-notification.introspect:9 string com.apple.accessibility.cache.vot
plistbuddy Add :com.apple.private.darwin-notification.introspect:10 string com.apple.accessibility.cache.zoom
plistbuddy Add :com.apple.private.darwin-notification.introspect:11 string com.apple.language.changed
plistbuddy Add :com.apple.private.darwin-notification.introspect:12 string com.apple.mediaaccessibility.captionAppearanceSettingsChanged
plistbuddy Add :com.apple.private.darwin-notification.introspect:13 string com.apple.powerlog.state_changed
plistbuddy Add :com.apple.private.darwin-notification.introspect:14 string com.apple.system.logging.prefschanged
plistbuddy Add :com.apple.private.darwin-notification.introspect:15 string com.apple.system.lowpowermode
plistbuddy Add :com.apple.private.darwin-notification.introspect:16 string com.apple.system.timezone
plistbuddy Add :com.apple.private.darwin-notification.introspect:17 string com.apple.zoomwindow
plistbuddy Add :com.apple.private.darwin-notification.introspect:8 string com.apple.accessibility.cache.guided.access.via.mdm
plistbuddy Add :com.apple.private.darwin-notification.introspect:9 string com.apple.accessibility.cache.invert.colors
plistbuddy Add :com.apple.private.darwin-notification.introspect:10 string com.apple.accessibility.cache.invert.colorscom.apple.WebKit.WebContent
plistbuddy Add :com.apple.private.darwin-notification.introspect:11 string com.apple.accessibility.cache.vot
plistbuddy Add :com.apple.private.darwin-notification.introspect:12 string com.apple.accessibility.cache.zoom
plistbuddy Add :com.apple.private.darwin-notification.introspect:13 string com.apple.language.changed
plistbuddy Add :com.apple.private.darwin-notification.introspect:14 string com.apple.mediaaccessibility.captionAppearanceSettingsChanged
plistbuddy Add :com.apple.private.darwin-notification.introspect:15 string com.apple.powerlog.state_changed
plistbuddy Add :com.apple.private.darwin-notification.introspect:16 string com.apple.system.logging.prefschanged
plistbuddy Add :com.apple.private.darwin-notification.introspect:17 string com.apple.system.lowpowermode
plistbuddy Add :com.apple.private.darwin-notification.introspect:18 string com.apple.system.timezone
plistbuddy Add :com.apple.private.darwin-notification.introspect:19 string com.apple.zoomwindow
if [[ "${WK_PLATFORM_NAME}" == macosx ]]
then
plistbuddy Add :com.apple.private.darwin-notification.introspect:18 string com.apple.system.DirectoryService.InvalidateCache
plistbuddy Add :com.apple.private.darwin-notification.introspect:19 string com.apple.system.DirectoryService.InvalidateCache.group
plistbuddy Add :com.apple.private.darwin-notification.introspect:20 string com.apple.system.DirectoryService.InvalidateCache.host
plistbuddy Add :com.apple.private.darwin-notification.introspect:21 string com.apple.system.DirectoryService.InvalidateCache.service
plistbuddy Add :com.apple.private.darwin-notification.introspect:22 string com.apple.system.DirectoryService.InvalidateCache.user
plistbuddy Add :com.apple.private.darwin-notification.introspect:20 string com.apple.system.DirectoryService.InvalidateCache
plistbuddy Add :com.apple.private.darwin-notification.introspect:21 string com.apple.system.DirectoryService.InvalidateCache.group
plistbuddy Add :com.apple.private.darwin-notification.introspect:22 string com.apple.system.DirectoryService.InvalidateCache.host
plistbuddy Add :com.apple.private.darwin-notification.introspect:23 string com.apple.system.DirectoryService.InvalidateCache.service
plistbuddy Add :com.apple.private.darwin-notification.introspect:24 string com.apple.system.DirectoryService.InvalidateCache.user
else
plistbuddy Add :com.apple.private.darwin-notification.introspect:18 string com.apple.mobile.usermanagerd.foregrounduser_changed
plistbuddy Add :com.apple.private.darwin-notification.introspect:19 string com.apple.mobile.keybagd.user_changed
plistbuddy Add :com.apple.private.darwin-notification.introspect:20 string com.apple.mobile.usermanagerd.foregrounduser_changed
plistbuddy Add :com.apple.private.darwin-notification.introspect:21 string com.apple.mobile.keybagd.user_changed
fi
}

Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ static void logProcessPoolState(const WebProcessPool& pool)
"com.apple.accessibility.cache.ax"_s,
"com.apple.accessibility.cache.enhance.text.legibility"_s,
"com.apple.accessibility.cache.enhance.text.legibilitycom.apple.WebKit.WebContent"_s,
"com.apple.accessibility.cache.guided.access.via.mdm"_s,
"com.apple.accessibility.cache.invert.colors"_s,
"com.apple.accessibility.cache.invert.colorscom.apple.WebKit.WebContent"_s,
"com.apple.accessibility.cache.vot"_s,
"com.apple.accessibility.cache.zoom"_s,
"com.apple.language.changed"_s,
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,9 @@
"com.apple.accessibility.cache.ax"
"com.apple.accessibility.cache.enhance.text.legibility"
"com.apple.accessibility.cache.enhance.text.legibilitycom.apple.WebKit.WebContent"
"com.apple.accessibility.cache.guided.access.via.mdm"
"com.apple.accessibility.cache.invert.colors"
"com.apple.accessibility.cache.invert.colorscom.apple.WebKit.WebContent"
"com.apple.accessibility.cache.vot"
"com.apple.accessibility.cache.zoom"
"com.apple.language.changed"
Expand Down

0 comments on commit 1cdc97a

Please sign in to comment.