Title: [230808] trunk
Revision
230808
Author
n_w...@apple.com
Date
2018-04-19 10:36:40 -0700 (Thu, 19 Apr 2018)

Log Message

AX: AOM: respect the accessibility setting for dispatching the accessible events
https://bugs.webkit.org/show_bug.cgi?id=184619

Reviewed by Ryosuke Niwa.

Source/WebCore:

Added accessibilityEventsEnabled as a setting on the page.

Test: accessibility/ios-simulator/accessibility-events-setting.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const):
* page/Settings.yaml:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setAccessibilityEventsEnabled):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit:

Linked libAccessibility on iOS and macOS to use the platform accessibility settings
for allowing dispatching the accessibility events.

* Configurations/WebKit.xcconfig:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(accessibilityEventsEnabledChangedCallback):
(-[WKWebView _updateAccessibilityEventsEnabled]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateAccessibilityEventsEnabled):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateAccessibilityEventsEnabled):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Source/WTF:

* wtf/Platform.h:

LayoutTests:

* accessibility/ios-simulator/accessibility-events-setting-expected.txt: Added.
* accessibility/ios-simulator/accessibility-events-setting.html: Added.
* platform/ios-wk1/TestExpectations:
* platform/ios-wk2/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (230807 => 230808)


--- trunk/LayoutTests/ChangeLog	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/LayoutTests/ChangeLog	2018-04-19 17:36:40 UTC (rev 230808)
@@ -1,3 +1,15 @@
+2018-04-19  Nan Wang  <n_w...@apple.com>
+
+        AX: AOM: respect the accessibility setting for dispatching the accessible events
+        https://bugs.webkit.org/show_bug.cgi?id=184619
+
+        Reviewed by Ryosuke Niwa.
+
+        * accessibility/ios-simulator/accessibility-events-setting-expected.txt: Added.
+        * accessibility/ios-simulator/accessibility-events-setting.html: Added.
+        * platform/ios-wk1/TestExpectations:
+        * platform/ios-wk2/TestExpectations:
+
 2018-04-19  Tadeu Zagallo  <tzaga...@apple.com>
 
         Fix flakiness in worker-to-worker test

Added: trunk/LayoutTests/accessibility/ios-simulator/accessibility-events-setting-expected.txt (0 => 230808)


--- trunk/LayoutTests/accessibility/ios-simulator/accessibility-events-setting-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/accessibility-events-setting-expected.txt	2018-04-19 17:36:40 UTC (rev 230808)
@@ -0,0 +1,13 @@
+Click
+This tests that dispatching accessibility events is controled by iOS settings.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS receivedAXEvent is true
+PASS receivedAXEvent is false
+PASS receivedAXEvent is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/ios-simulator/accessibility-events-setting.html (0 => 230808)


--- trunk/LayoutTests/accessibility/ios-simulator/accessibility-events-setting.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/accessibility-events-setting.html	2018-04-19 17:36:40 UTC (rev 230808)
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+
+<button id="button">Click</button>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+    description("This tests that dispatching accessibility events is controled by iOS settings.");
+    if (window.accessibilityController) {
+        jsTestIsAsync = true;
+        var node = document.getElementById("button");
+        var axNode = accessibilityController.accessibleElementById("button");
+        var receivedAXEvent;
+        node._onaccessibleclick_ = function() {
+            receivedAXEvent = true;
+        };
+
+        // By default, accessibility events setting is enabled.
+        receivedAXEvent = false;
+        axNode.syncPress();
+        shouldBeTrue("receivedAXEvent");
+
+        // Disable the setting.
+        window.internals.settings.setAccessibilityEventsEnabled(false);
+        setTimeout(function() {
+            receivedAXEvent = false;
+            axNode.syncPress();
+            shouldBeFalse("receivedAXEvent");
+
+            // Re-enable the setting.
+            window.internals.settings.setAccessibilityEventsEnabled(true);
+            setTimeout(function() {
+                receivedAXEvent = false;
+                axNode.syncPress();
+                shouldBeTrue("receivedAXEvent");
+                finishJSTest();
+            }, 30);
+
+        }, 30);
+    }
+
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios-wk1/TestExpectations (230807 => 230808)


--- trunk/LayoutTests/platform/ios-wk1/TestExpectations	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/LayoutTests/platform/ios-wk1/TestExpectations	2018-04-19 17:36:40 UTC (rev 230808)
@@ -104,6 +104,7 @@
 
 # Not supported on WK1
 accessibility/ios-simulator/speak-selection-content.html [ Skip ]
+accessibility/ios-simulator/accessibility-events-setting.html [ Skip ]
 
 # FIXME: Tests that fail due to lack of textInputController <rdar://problem/5106287>
 editing/inserting/insert-composition-whitespace.html [ Failure ]

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (230807 => 230808)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-04-19 17:36:40 UTC (rev 230808)
@@ -1128,6 +1128,8 @@
 # Forcing always allow user scalable is not supported on certain OS version.
 webkit.org/b/155056 fast/viewport/ios/force-always-user-scalable.html [ Skip ]
 
+# Setting accessibility events enabled is not supported on certain OS version.
+webkit.org/b/184619 accessibility/ios-simulator/accessibility-events-setting.html [ Skip ]
 
 webkit.org/b/155495 compositing/visible-rect/animated-from-none.html [ Pass Failure ]
 webkit.org/b/155495 legacy-animation-engine/compositing/visible-rect/animated-from-none.html [ Pass Failure ]

Modified: trunk/Source/WTF/ChangeLog (230807 => 230808)


--- trunk/Source/WTF/ChangeLog	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WTF/ChangeLog	2018-04-19 17:36:40 UTC (rev 230808)
@@ -1,3 +1,12 @@
+2018-04-19  Nan Wang  <n_w...@apple.com>
+
+        AX: AOM: respect the accessibility setting for dispatching the accessible events
+        https://bugs.webkit.org/show_bug.cgi?id=184619
+
+        Reviewed by Ryosuke Niwa.
+
+        * wtf/Platform.h:
+
 2018-04-18  Ross Kirsling  <ross.kirsl...@sony.com>
 
         [Win] Layout Test js/date-constructor.html is failing

Modified: trunk/Source/WTF/wtf/Platform.h (230807 => 230808)


--- trunk/Source/WTF/wtf/Platform.h	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WTF/wtf/Platform.h	2018-04-19 17:36:40 UTC (rev 230808)
@@ -1329,4 +1329,8 @@
 #define HAVE_AVCONTENTKEYSESSION 1
 #endif
 
+#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400)
+#define ENABLE_ACCESSIBILITY_EVENTS 1
+#endif
+
 #endif /* WTF_Platform_h */

Modified: trunk/Source/WebCore/ChangeLog (230807 => 230808)


--- trunk/Source/WebCore/ChangeLog	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebCore/ChangeLog	2018-04-19 17:36:40 UTC (rev 230808)
@@ -1,3 +1,24 @@
+2018-04-19  Nan Wang  <n_w...@apple.com>
+
+        AX: AOM: respect the accessibility setting for dispatching the accessible events
+        https://bugs.webkit.org/show_bug.cgi?id=184619
+
+        Reviewed by Ryosuke Niwa.
+
+        Added accessibilityEventsEnabled as a setting on the page.
+
+        Test: accessibility/ios-simulator/accessibility-events-setting.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const):
+        * page/Settings.yaml:
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::setAccessibilityEventsEnabled):
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
 2018-04-18  Jer Noble  <jer.no...@apple.com>
 
         Fix build when WK_ALTERNATE_FRAMEWORKS_DIR is set to non-empty value

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (230807 => 230808)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2018-04-19 17:36:40 UTC (rev 230808)
@@ -2157,7 +2157,11 @@
 
 bool AccessibilityObject::shouldDispatchAccessibilityEvent() const
 {
-    return RuntimeEnabledFeatures::sharedFeatures().accessibilityObjectModelEnabled();
+    bool shouldDispatch = RuntimeEnabledFeatures::sharedFeatures().accessibilityObjectModelEnabled();
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    return shouldDispatch &= this->page()->settings().accessibilityEventsEnabled();
+#endif
+    return shouldDispatch;
 }
 
 bool AccessibilityObject::dispatchAccessibilityEvent(Event& event) const

Modified: trunk/Source/WebCore/page/Settings.yaml (230807 => 230808)


--- trunk/Source/WebCore/page/Settings.yaml	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebCore/page/Settings.yaml	2018-04-19 17:36:40 UTC (rev 230808)
@@ -730,3 +730,7 @@
 clientCoordinatesRelativeToLayoutViewport:
   initial: false
   onChange: setNeedsRecalcStyleInAllFrames
+
+accessibilityEventsEnabled:
+  initial: true
+  conditional: ACCESSIBILITY_EVENTS

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (230807 => 230808)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2018-04-19 17:36:40 UTC (rev 230808)
@@ -93,6 +93,9 @@
     , m_inlineMediaPlaybackRequiresPlaysInlineAttribute(settings.inlineMediaPlaybackRequiresPlaysInlineAttribute())
     , m_deferredCSSParserEnabled(settings.deferredCSSParserEnabled())
     , m_inputEventsEnabled(settings.inputEventsEnabled())
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    , m_accessibilityEventsEnabled(settings.accessibilityEventsEnabled())
+#endif
     , m_userInterfaceDirectionPolicy(settings.userInterfaceDirectionPolicy())
     , m_systemLayoutDirection(settings.systemLayoutDirection())
     , m_pdfImageCachingPolicy(settings.pdfImageCachingPolicy())
@@ -200,6 +203,9 @@
     RenderTheme::singleton().setShouldMockBoldSystemFontForAccessibility(m_shouldMockBoldSystemFontForAccessibility);
     FontCache::singleton().setShouldMockBoldSystemFontForAccessibility(m_shouldMockBoldSystemFontForAccessibility);
     settings.setFrameFlattening(m_frameFlattening);
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    settings.setAccessibilityEventsEnabled(m_accessibilityEventsEnabled);
+#endif
 
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
     RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(m_indexedDBWorkersEnabled);
@@ -876,6 +882,18 @@
     return { };
 }
 
+ExceptionOr<void> InternalSettings::setAccessibilityEventsEnabled(bool enabled)
+{
+    if (!m_page)
+        return Exception { InvalidAccessError };
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    settings().setAccessibilityEventsEnabled(enabled);
+#else
+    UNUSED_PARAM(enabled);
+#endif
+    return { };
+}
+
 static InternalSettings::ForcedAccessibilityValue settingsToInternalSettingsValue(Settings::ForcedAccessibilityValue value)
 {
     switch (value) {

Modified: trunk/Source/WebCore/testing/InternalSettings.h (230807 => 230808)


--- trunk/Source/WebCore/testing/InternalSettings.h	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2018-04-19 17:36:40 UTC (rev 230808)
@@ -100,6 +100,7 @@
     ExceptionOr<void> setShouldMockBoldSystemFontForAccessibility(bool);
     ExceptionOr<void> setShouldManageAudioSessionCategory(bool);
     ExceptionOr<void> setCustomPasteboardDataEnabled(bool);
+    ExceptionOr<void> setAccessibilityEventsEnabled(bool);
 
     using FrameFlatteningValue = FrameFlattening;
     ExceptionOr<void> setFrameFlattening(FrameFlatteningValue);
@@ -189,7 +190,9 @@
         bool m_inlineMediaPlaybackRequiresPlaysInlineAttribute;
         bool m_deferredCSSParserEnabled;
         bool m_inputEventsEnabled;
-
+#if ENABLE(ACCESSIBILITY_EVENTS)
+        bool m_accessibilityEventsEnabled;
+#endif
         UserInterfaceDirectionPolicy m_userInterfaceDirectionPolicy;
         TextDirection m_systemLayoutDirection;
         PDFImageCachingPolicy m_pdfImageCachingPolicy;

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (230807 => 230808)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2018-04-19 17:36:40 UTC (rev 230808)
@@ -111,5 +111,7 @@
     [MayThrowException] void setCustomPasteboardDataEnabled(boolean enabled);
 
     [EnabledAtRuntime=WebAnimations] boolean cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled();
+
+    [MayThrowException] void setAccessibilityEventsEnabled(boolean enabled);
 };
 

Modified: trunk/Source/WebKit/ChangeLog (230807 => 230808)


--- trunk/Source/WebKit/ChangeLog	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/ChangeLog	2018-04-19 17:36:40 UTC (rev 230808)
@@ -1,3 +1,27 @@
+2018-04-19  Nan Wang  <n_w...@apple.com>
+
+        AX: AOM: respect the accessibility setting for dispatching the accessible events
+        https://bugs.webkit.org/show_bug.cgi?id=184619
+
+        Reviewed by Ryosuke Niwa.
+
+        Linked libAccessibility on iOS and macOS to use the platform accessibility settings
+        for allowing dispatching the accessibility events.
+
+        * Configurations/WebKit.xcconfig:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _initializeWithConfiguration:]):
+        (accessibilityEventsEnabledChangedCallback):
+        (-[WKWebView _updateAccessibilityEventsEnabled]):
+        * UIProcess/API/Cocoa/WKWebViewInternal.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::updateAccessibilityEventsEnabled):
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updateAccessibilityEventsEnabled):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+
 2018-04-18  Chris Dumez  <cdu...@apple.com>
 
         Rename WindowProxyController to WindowProxy

Modified: trunk/Source/WebKit/Configurations/WebKit.xcconfig (230807 => 230808)


--- trunk/Source/WebKit/Configurations/WebKit.xcconfig	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/Configurations/WebKit.xcconfig	2018-04-19 17:36:40 UTC (rev 230808)
@@ -39,8 +39,13 @@
 
 LIBRARY_SEARCH_PATHS = $(inherited) "$(LIBWEBRTC_LIBRARY_DIR)";
 
-WK_ACCESSIBILITY_LDFLAGS = $(WK_ACCESSIBILITY_LDFLAGS_$(WK_COCOA_TOUCH));
-WK_ACCESSIBILITY_LDFLAGS_cocoatouch = -lAccessibility;
+WK_ACCESSIBILITY_LDFLAGS = $(WK_ACCESSIBILITY_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_ACCESSIBILITY_LDFLAGS_iphoneos = -lAccessibility;
+WK_ACCESSIBILITY_LDFLAGS_iphonesimulator = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos);
+WK_ACCESSIBILITY_LDFLAGS_watchos = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos);
+WK_ACCESSIBILITY_LDFLAGS_appletvos = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos);
+WK_ACCESSIBILITY_LDFLAGS_macosx = $(WK_ACCESSIBILITY_LDFLAGS$(WK_MACOS_1014));
+WK_ACCESSIBILITY_LDFLAGS_MACOS_SINCE_1014 = -lAccessibility;
 
 WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_APPKIT_LDFLAGS_macosx = -framework AppKit;

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (230807 => 230808)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-04-19 17:36:40 UTC (rev 230808)
@@ -150,14 +150,6 @@
 #import <pal/spi/cg/CoreGraphicsSPI.h>
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
 
-#if __has_include(<AccessibilitySupport.h>)
-#include <AccessibilitySupport.h>
-#else
-extern "C" {
-CFStringRef kAXSAllowForceWebScalingEnabledNotification;
-}
-#endif
-
 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(_page && _page->isAlwaysOnLoggingAllowed(), ViewState, __VA_ARGS__)
 
 @interface UIScrollView (UIScrollViewInternal)
@@ -214,6 +206,17 @@
 #endif // HAVE(TOUCH_BAR)
 #endif // PLATFORM(MAC)
 
+#if ENABLE(ACCESSIBILITY_EVENTS)
+#if __has_include(<AccessibilitySupport.h>)
+#include <AccessibilitySupport.h>
+#else
+extern "C" {
+CFStringRef kAXSWebAccessibilityEventsEnabledNotification;
+Boolean _AXSWebAccessibilityEventsEnabled();
+}
+#endif
+#endif
+
 static HashMap<WebKit::WebPageProxy*, WKWebView *>& pageToViewMap()
 {
     static NeverDestroyed<HashMap<WebKit::WebPageProxy*, WKWebView *>> map;
@@ -695,6 +698,11 @@
     _impl->setRequiresUserActionForEditingControlsManager([configuration _requiresUserActionForEditingControlsManager]);
 #endif
 
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), accessibilityEventsEnabledChangedCallback, kAXSWebAccessibilityEventsEnabledNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
+    [self _updateAccessibilityEventsEnabled];
+#endif
+
     _page->setBackgroundExtendsBeyondPage(true);
 
     if (NSString *applicationNameForUserAgent = configuration.applicationNameForUserAgent)
@@ -3053,6 +3061,20 @@
 
 #endif // PLATFORM(IOS)
 
+#if ENABLE(ACCESSIBILITY_EVENTS)
+static void accessibilityEventsEnabledChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)
+{
+    ASSERT(observer);
+    WKWebView* webview = static_cast<WKWebView*>(observer);
+    [webview _updateAccessibilityEventsEnabled];
+}
+
+- (void)_updateAccessibilityEventsEnabled
+{
+    _page->updateAccessibilityEventsEnabled(_AXSWebAccessibilityEventsEnabled());
+}
+#endif
+
 #pragma mark OS X-specific methods
 
 #if PLATFORM(MAC)

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h (230807 => 230808)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h	2018-04-19 17:36:40 UTC (rev 230808)
@@ -149,6 +149,10 @@
 @property (nonatomic, readonly) UIEdgeInsets _computedUnobscuredSafeAreaInset;
 #endif
 
+#if ENABLE(ACCESSIBILITY_EVENTS)
+- (void)_updateAccessibilityEventsEnabled;
+#endif
+
 #if ENABLE(ATTACHMENT_ELEMENT)
 - (void)_didRemoveAttachment:(NSString *)identifier;
 - (void)_didInsertAttachment:(NSString *)identifier withSource:(NSString *)source;

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (230807 => 230808)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-04-19 17:36:40 UTC (rev 230808)
@@ -2754,6 +2754,16 @@
     m_process->send(Messages::WebPage::AccessibilitySettingsDidChange(), m_pageID);
 }
 
+#if ENABLE(ACCESSIBILITY_EVENTS)
+void WebPageProxy::updateAccessibilityEventsEnabled(bool enabled)
+{
+    if (!isValid())
+        return;
+
+    m_process->send(Messages::WebPage::UpdateAccessibilityEventsEnabled(enabled), m_pageID);
+}
+#endif
+
 void WebPageProxy::setUseFixedLayout(bool fixed)
 {
     if (!isValid())

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (230807 => 230808)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2018-04-19 17:36:40 UTC (rev 230808)
@@ -745,6 +745,9 @@
     void setCustomDeviceScaleFactor(float);
     void windowScreenDidChange(WebCore::PlatformDisplayID);
     void accessibilitySettingsDidChange();
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    void updateAccessibilityEventsEnabled(bool);
+#endif
 
     void setUseFixedLayout(bool);
     void setFixedLayoutSize(const WebCore::IntSize&);

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (230807 => 230808)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-04-19 17:36:40 UTC (rev 230808)
@@ -1733,6 +1733,13 @@
     m_page->accessibilitySettingsDidChange();
 }
 
+#if ENABLE(ACCESSIBILITY_EVENTS)
+void WebPage::updateAccessibilityEventsEnabled(bool enabled)
+{
+    m_page->settings().setAccessibilityEventsEnabled(enabled);
+}
+#endif
+
 void WebPage::setUseFixedLayout(bool fixed)
 {
     // Do not overwrite current settings if initially setting it to false.

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (230807 => 230808)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2018-04-19 17:36:40 UTC (rev 230808)
@@ -429,6 +429,9 @@
     void windowScreenDidChange(uint32_t);
 
     void accessibilitySettingsDidChange();
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    void updateAccessibilityEventsEnabled(bool);
+#endif
 
     void scalePage(double scale, const WebCore::IntPoint& origin);
     void scalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates);

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (230807 => 230808)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in	2018-04-19 17:14:19 UTC (rev 230807)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in	2018-04-19 17:36:40 UTC (rev 230808)
@@ -208,6 +208,9 @@
     WindowScreenDidChange(uint32_t displayID)
 
     AccessibilitySettingsDidChange()
+#if ENABLE(ACCESSIBILITY_EVENTS)
+    UpdateAccessibilityEventsEnabled(bool enabled)
+#endif
 
     ScalePage(double scale, WebCore::IntPoint origin)
     ScalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to