Title: [276852] trunk/Source/WebKit
- Revision
- 276852
- Author
- [email protected]
- Date
- 2021-04-30 14:04:17 -0700 (Fri, 30 Apr 2021)
Log Message
prefers-reduced-motion is not reactive on iOS
https://bugs.webkit.org/show_bug.cgi?id=222381
<rdar://75933915>
Reviewed by Brent Fulgham.
With CFPrefs direct mode, there is a race between the notification that an accessibility preference has been changed
by the user, and the the in-memory Accessibility preference cache in the WebContent process. We resolve this by using
new SPI to clear the cached Accessibility settings when we are notified of an accessibility change so they always
reflect the user's most recent setting.
* Platform/spi/Cocoa/AccessibilitySupportSPI.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::setPreferenceValue):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (276851 => 276852)
--- trunk/Source/WebKit/ChangeLog 2021-04-30 20:17:02 UTC (rev 276851)
+++ trunk/Source/WebKit/ChangeLog 2021-04-30 21:04:17 UTC (rev 276852)
@@ -1,3 +1,20 @@
+2021-04-30 Per Arne Vollan <[email protected]>
+
+ prefers-reduced-motion is not reactive on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=222381
+ <rdar://75933915>
+
+ Reviewed by Brent Fulgham.
+
+ With CFPrefs direct mode, there is a race between the notification that an accessibility preference has been changed
+ by the user, and the the in-memory Accessibility preference cache in the WebContent process. We resolve this by using
+ new SPI to clear the cached Accessibility settings when we are notified of an accessibility change so they always
+ reflect the user's most recent setting.
+
+ * Platform/spi/Cocoa/AccessibilitySupportSPI.h:
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::setPreferenceValue):
+
2021-04-30 Jiewen Tan <[email protected]>
_WKWebAuthenticationPanelDelegate registration and assertion SPI doesn't work without an LAContext
Modified: trunk/Source/WebKit/Platform/spi/Cocoa/AccessibilitySupportSPI.h (276851 => 276852)
--- trunk/Source/WebKit/Platform/spi/Cocoa/AccessibilitySupportSPI.h 2021-04-30 20:17:02 UTC (rev 276851)
+++ trunk/Source/WebKit/Platform/spi/Cocoa/AccessibilitySupportSPI.h 2021-04-30 21:04:17 UTC (rev 276852)
@@ -45,6 +45,8 @@
extern Boolean _AXSFullKeyboardAccessEnabled();
#endif
+extern CFStringRef kAXSAccessibilityPreferenceDomain;
+
WTF_EXTERN_C_END
#endif
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (276851 => 276852)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-04-30 20:17:02 UTC (rev 276851)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-04-30 21:04:17 UTC (rev 276852)
@@ -167,6 +167,11 @@
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebKit, HIServices, _AXSetAuditTokenIsAuthenticatedCallback, void, (AXAuditTokenIsAuthenticatedCallback callback), (callback))
#endif
+#if PLATFORM(IOS_FAMILY)
+SOFT_LINK_LIBRARY(libAccessibility)
+SOFT_LINK_OPTIONAL(libAccessibility, _AXSUpdateWebAccessibilitySettings, void, (), ());
+#endif
+
namespace WebKit {
using namespace WebCore;
@@ -1115,6 +1120,13 @@
WTF::languageDidChange();
}
+
+#if PLATFORM(IOS_FAMILY)
+ if (domain == String(kAXSAccessibilityPreferenceDomain)) {
+ if (_AXSUpdateWebAccessibilitySettingsPtr())
+ _AXSUpdateWebAccessibilitySettingsPtr()();
+ }
+#endif
}
void WebProcess::notifyPreferencesChanged(const String& domain, const String& key, const Optional<String>& encodedValue)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes