AX: AOM: respect the accessibility setting for dispatching the accessible events
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2018 17:36:40 +0000 (17:36 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2018 17:36:40 +0000 (17:36 +0000)
commit9a2b56b9c7171f69d1ef614e0a8702a21be632e0
tree58d156f6447187648ab6610fc130f145e1a753f0
parent555d3c6c1eda801a99a18e52e44b3d91cdcc432d
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/ios-simulator/accessibility-events-setting-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/ios-simulator/accessibility-events-setting.html [new file with mode: 0644]
LayoutTests/platform/ios-wk1/TestExpectations
LayoutTests/platform/ios-wk2/TestExpectations
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/page/Settings.yaml
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/ChangeLog
Source/WebKit/Configurations/WebKit.xcconfig
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in