Title: [291062] trunk/Source/WebKit
Revision
291062
Author
pvol...@apple.com
Date
2022-03-09 12:59:08 -0800 (Wed, 09 Mar 2022)

Log Message

The accessibility library should be soft linked optionally
https://bugs.webkit.org/show_bug.cgi?id=236513

Reviewed by Geoffrey Garen.

The accessibility library should be soft linked optionally, since it is not always present.

* Shared/Cocoa/AuxiliaryProcessCocoa.mm:
(WebKit::handleAXPreferenceChange):
(WebKit::AuxiliaryProcess::handlePreferenceChange):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (291061 => 291062)


--- trunk/Source/WebKit/ChangeLog	2022-03-09 20:44:41 UTC (rev 291061)
+++ trunk/Source/WebKit/ChangeLog	2022-03-09 20:59:08 UTC (rev 291062)
@@ -1,3 +1,16 @@
+2022-03-09  Per Arne Vollan  <pvol...@apple.com>
+
+        The accessibility library should be soft linked optionally
+        https://bugs.webkit.org/show_bug.cgi?id=236513
+
+        Reviewed by Geoffrey Garen.
+
+        The accessibility library should be soft linked optionally, since it is not always present.
+
+        * Shared/Cocoa/AuxiliaryProcessCocoa.mm:
+        (WebKit::handleAXPreferenceChange):
+        (WebKit::AuxiliaryProcess::handlePreferenceChange):
+
 2022-03-09  Don Olmstead  <don.olmst...@sony.com>
 
         [CMake] Associate platform specific configuration with WinCairo

Modified: trunk/Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm (291061 => 291062)


--- trunk/Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm	2022-03-09 20:44:41 UTC (rev 291061)
+++ trunk/Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm	2022-03-09 20:59:08 UTC (rev 291062)
@@ -46,7 +46,7 @@
 #endif
 
 #if HAVE(UPDATE_WEB_ACCESSIBILITY_SETTINGS) && ENABLE(CFPREFS_DIRECT_MODE)
-SOFT_LINK_LIBRARY(libAccessibility)
+SOFT_LINK_LIBRARY_OPTIONAL(libAccessibility)
 SOFT_LINK_OPTIONAL(libAccessibility, _AXSUpdateWebAccessibilitySettings, void, (), ());
 #endif
 
@@ -197,8 +197,13 @@
 }
 #endif
 
-void AuxiliaryProcess::handlePreferenceChange(const String& domain, const String& key, id value)
+static void handleAXPreferenceChange(const String& domain, const String& key, id value)
 {
+#if HAVE(UPDATE_WEB_ACCESSIBILITY_SETTINGS)
+    if (!libAccessibilityLibrary())
+        return;
+#endif
+
     if (domain == String(kAXSAccessibilityPreferenceDomain)) {
 #if HAVE(UPDATE_WEB_ACCESSIBILITY_SETTINGS)
         if (_AXSUpdateWebAccessibilitySettingsPtr())
@@ -212,7 +217,11 @@
             _AXSSetDarkenSystemColors([(NSNumber *)value boolValue]);
 #endif
     }
+}
 
+void AuxiliaryProcess::handlePreferenceChange(const String& domain, const String& key, id value)
+{
+    handleAXPreferenceChange(domain, key, value);
     dispatchSimulatedNotificationsForPreferenceChange(key);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to