Title: [276917] branches/safari-611.2.7.0-branch/Source/WebKit
- Revision
- 276917
- Author
- repst...@apple.com
- Date
- 2021-05-03 12:56:18 -0700 (Mon, 03 May 2021)
Log Message
Cherry-pick r276852. rdar://problem/77468295
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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-611.2.7.0-branch/Source/WebKit/ChangeLog (276916 => 276917)
--- branches/safari-611.2.7.0-branch/Source/WebKit/ChangeLog 2021-05-03 19:53:43 UTC (rev 276916)
+++ branches/safari-611.2.7.0-branch/Source/WebKit/ChangeLog 2021-05-03 19:56:18 UTC (rev 276917)
@@ -1,3 +1,41 @@
+2021-05-03 Russell Epstein <repst...@apple.com>
+
+ Cherry-pick r276852. rdar://problem/77468295
+
+ 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):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-04-30 Per Arne Vollan <pvol...@apple.com>
+
+ 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-29 Russell Epstein <repst...@apple.com>
Cherry-pick r276742. rdar://problem/77326513
Modified: branches/safari-611.2.7.0-branch/Source/WebKit/Platform/spi/Cocoa/AccessibilitySupportSPI.h (276916 => 276917)
--- branches/safari-611.2.7.0-branch/Source/WebKit/Platform/spi/Cocoa/AccessibilitySupportSPI.h 2021-05-03 19:53:43 UTC (rev 276916)
+++ branches/safari-611.2.7.0-branch/Source/WebKit/Platform/spi/Cocoa/AccessibilitySupportSPI.h 2021-05-03 19:56:18 UTC (rev 276917)
@@ -45,6 +45,8 @@
extern Boolean _AXSFullKeyboardAccessEnabled();
#endif
+extern CFStringRef kAXSAccessibilityPreferenceDomain;
+
WTF_EXTERN_C_END
#endif
Modified: branches/safari-611.2.7.0-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (276916 => 276917)
--- branches/safari-611.2.7.0-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-05-03 19:53:43 UTC (rev 276916)
+++ branches/safari-611.2.7.0-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-05-03 19:56:18 UTC (rev 276917)
@@ -162,6 +162,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;
@@ -1067,6 +1072,13 @@
#endif
} else
CFPreferencesSetValue(key.createCFString().get(), (__bridge CFPropertyListRef)value, domain.createCFString().get(), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+
+#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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes