Changeset 230808 in webkit
- Timestamp:
- Apr 19, 2018 10:36:40 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r230806 r230808 1 2018-04-19 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: respect the accessibility setting for dispatching the accessible events 4 https://bugs.webkit.org/show_bug.cgi?id=184619 5 6 Reviewed by Ryosuke Niwa. 7 8 * accessibility/ios-simulator/accessibility-events-setting-expected.txt: Added. 9 * accessibility/ios-simulator/accessibility-events-setting.html: Added. 10 * platform/ios-wk1/TestExpectations: 11 * platform/ios-wk2/TestExpectations: 12 1 13 2018-04-19 Tadeu Zagallo <tzagallo@apple.com> 2 14 -
trunk/LayoutTests/platform/ios-wk1/TestExpectations
r230531 r230808 105 105 # Not supported on WK1 106 106 accessibility/ios-simulator/speak-selection-content.html [ Skip ] 107 accessibility/ios-simulator/accessibility-events-setting.html [ Skip ] 107 108 108 109 # FIXME: Tests that fail due to lack of textInputController <rdar://problem/5106287> -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r230703 r230808 1129 1129 webkit.org/b/155056 fast/viewport/ios/force-always-user-scalable.html [ Skip ] 1130 1130 1131 # Setting accessibility events enabled is not supported on certain OS version. 1132 webkit.org/b/184619 accessibility/ios-simulator/accessibility-events-setting.html [ Skip ] 1131 1133 1132 1134 webkit.org/b/155495 compositing/visible-rect/animated-from-none.html [ Pass Failure ] -
trunk/Source/WTF/ChangeLog
r230774 r230808 1 2018-04-19 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: respect the accessibility setting for dispatching the accessible events 4 https://bugs.webkit.org/show_bug.cgi?id=184619 5 6 Reviewed by Ryosuke Niwa. 7 8 * wtf/Platform.h: 9 1 10 2018-04-18 Ross Kirsling <ross.kirsling@sony.com> 2 11 -
trunk/Source/WTF/wtf/Platform.h
r229990 r230808 1330 1330 #endif 1331 1331 1332 #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) 1333 #define ENABLE_ACCESSIBILITY_EVENTS 1 1334 #endif 1335 1332 1336 #endif /* WTF_Platform_h */ -
trunk/Source/WebCore/ChangeLog
r230807 r230808 1 2018-04-19 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: respect the accessibility setting for dispatching the accessible events 4 https://bugs.webkit.org/show_bug.cgi?id=184619 5 6 Reviewed by Ryosuke Niwa. 7 8 Added accessibilityEventsEnabled as a setting on the page. 9 10 Test: accessibility/ios-simulator/accessibility-events-setting.html 11 12 * accessibility/AccessibilityObject.cpp: 13 (WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const): 14 * page/Settings.yaml: 15 * testing/InternalSettings.cpp: 16 (WebCore::InternalSettings::Backup::Backup): 17 (WebCore::InternalSettings::Backup::restoreTo): 18 (WebCore::InternalSettings::setAccessibilityEventsEnabled): 19 * testing/InternalSettings.h: 20 * testing/InternalSettings.idl: 21 1 22 2018-04-18 Jer Noble <jer.noble@apple.com> 2 23 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r230211 r230808 2158 2158 bool AccessibilityObject::shouldDispatchAccessibilityEvent() const 2159 2159 { 2160 return RuntimeEnabledFeatures::sharedFeatures().accessibilityObjectModelEnabled(); 2160 bool shouldDispatch = RuntimeEnabledFeatures::sharedFeatures().accessibilityObjectModelEnabled(); 2161 #if ENABLE(ACCESSIBILITY_EVENTS) 2162 return shouldDispatch &= this->page()->settings().accessibilityEventsEnabled(); 2163 #endif 2164 return shouldDispatch; 2161 2165 } 2162 2166 -
trunk/Source/WebCore/page/Settings.yaml
r230039 r230808 731 731 initial: false 732 732 onChange: setNeedsRecalcStyleInAllFrames 733 734 accessibilityEventsEnabled: 735 initial: true 736 conditional: ACCESSIBILITY_EVENTS -
trunk/Source/WebCore/testing/InternalSettings.cpp
r230211 r230808 94 94 , m_deferredCSSParserEnabled(settings.deferredCSSParserEnabled()) 95 95 , m_inputEventsEnabled(settings.inputEventsEnabled()) 96 #if ENABLE(ACCESSIBILITY_EVENTS) 97 , m_accessibilityEventsEnabled(settings.accessibilityEventsEnabled()) 98 #endif 96 99 , m_userInterfaceDirectionPolicy(settings.userInterfaceDirectionPolicy()) 97 100 , m_systemLayoutDirection(settings.systemLayoutDirection()) … … 201 204 FontCache::singleton().setShouldMockBoldSystemFontForAccessibility(m_shouldMockBoldSystemFontForAccessibility); 202 205 settings.setFrameFlattening(m_frameFlattening); 206 #if ENABLE(ACCESSIBILITY_EVENTS) 207 settings.setAccessibilityEventsEnabled(m_accessibilityEventsEnabled); 208 #endif 203 209 204 210 #if ENABLE(INDEXED_DATABASE_IN_WORKERS) … … 877 883 } 878 884 885 ExceptionOr<void> InternalSettings::setAccessibilityEventsEnabled(bool enabled) 886 { 887 if (!m_page) 888 return Exception { InvalidAccessError }; 889 #if ENABLE(ACCESSIBILITY_EVENTS) 890 settings().setAccessibilityEventsEnabled(enabled); 891 #else 892 UNUSED_PARAM(enabled); 893 #endif 894 return { }; 895 } 896 879 897 static InternalSettings::ForcedAccessibilityValue settingsToInternalSettingsValue(Settings::ForcedAccessibilityValue value) 880 898 { -
trunk/Source/WebCore/testing/InternalSettings.h
r230000 r230808 101 101 ExceptionOr<void> setShouldManageAudioSessionCategory(bool); 102 102 ExceptionOr<void> setCustomPasteboardDataEnabled(bool); 103 ExceptionOr<void> setAccessibilityEventsEnabled(bool); 103 104 104 105 using FrameFlatteningValue = FrameFlattening; … … 190 191 bool m_deferredCSSParserEnabled; 191 192 bool m_inputEventsEnabled; 192 193 #if ENABLE(ACCESSIBILITY_EVENTS) 194 bool m_accessibilityEventsEnabled; 195 #endif 193 196 UserInterfaceDirectionPolicy m_userInterfaceDirectionPolicy; 194 197 TextDirection m_systemLayoutDirection; -
trunk/Source/WebCore/testing/InternalSettings.idl
r230000 r230808 112 112 113 113 [EnabledAtRuntime=WebAnimations] boolean cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(); 114 115 [MayThrowException] void setAccessibilityEventsEnabled(boolean enabled); 114 116 }; 115 117 -
trunk/Source/WebKit/ChangeLog
r230794 r230808 1 2018-04-19 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: respect the accessibility setting for dispatching the accessible events 4 https://bugs.webkit.org/show_bug.cgi?id=184619 5 6 Reviewed by Ryosuke Niwa. 7 8 Linked libAccessibility on iOS and macOS to use the platform accessibility settings 9 for allowing dispatching the accessibility events. 10 11 * Configurations/WebKit.xcconfig: 12 * UIProcess/API/Cocoa/WKWebView.mm: 13 (-[WKWebView _initializeWithConfiguration:]): 14 (accessibilityEventsEnabledChangedCallback): 15 (-[WKWebView _updateAccessibilityEventsEnabled]): 16 * UIProcess/API/Cocoa/WKWebViewInternal.h: 17 * UIProcess/WebPageProxy.cpp: 18 (WebKit::WebPageProxy::updateAccessibilityEventsEnabled): 19 * UIProcess/WebPageProxy.h: 20 * WebProcess/WebPage/WebPage.cpp: 21 (WebKit::WebPage::updateAccessibilityEventsEnabled): 22 * WebProcess/WebPage/WebPage.h: 23 * WebProcess/WebPage/WebPage.messages.in: 24 1 25 2018-04-18 Chris Dumez <cdumez@apple.com> 2 26 -
trunk/Source/WebKit/Configurations/WebKit.xcconfig
r230606 r230808 40 40 LIBRARY_SEARCH_PATHS = $(inherited) "$(LIBWEBRTC_LIBRARY_DIR)"; 41 41 42 WK_ACCESSIBILITY_LDFLAGS = $(WK_ACCESSIBILITY_LDFLAGS_$(WK_COCOA_TOUCH)); 43 WK_ACCESSIBILITY_LDFLAGS_cocoatouch = -lAccessibility; 42 WK_ACCESSIBILITY_LDFLAGS = $(WK_ACCESSIBILITY_LDFLAGS_$(WK_PLATFORM_NAME)); 43 WK_ACCESSIBILITY_LDFLAGS_iphoneos = -lAccessibility; 44 WK_ACCESSIBILITY_LDFLAGS_iphonesimulator = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos); 45 WK_ACCESSIBILITY_LDFLAGS_watchos = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos); 46 WK_ACCESSIBILITY_LDFLAGS_appletvos = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos); 47 WK_ACCESSIBILITY_LDFLAGS_macosx = $(WK_ACCESSIBILITY_LDFLAGS$(WK_MACOS_1014)); 48 WK_ACCESSIBILITY_LDFLAGS_MACOS_SINCE_1014 = -lAccessibility; 44 49 45 50 WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME)); -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r230527 r230808 151 151 #import <pal/spi/cocoa/QuartzCoreSPI.h> 152 152 153 #if __has_include(<AccessibilitySupport.h>)154 #include <AccessibilitySupport.h>155 #else156 extern "C" {157 CFStringRef kAXSAllowForceWebScalingEnabledNotification;158 }159 #endif160 161 153 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(_page && _page->isAlwaysOnLoggingAllowed(), ViewState, __VA_ARGS__) 162 154 … … 214 206 #endif // HAVE(TOUCH_BAR) 215 207 #endif // PLATFORM(MAC) 208 209 #if ENABLE(ACCESSIBILITY_EVENTS) 210 #if __has_include(<AccessibilitySupport.h>) 211 #include <AccessibilitySupport.h> 212 #else 213 extern "C" { 214 CFStringRef kAXSWebAccessibilityEventsEnabledNotification; 215 Boolean _AXSWebAccessibilityEventsEnabled(); 216 } 217 #endif 218 #endif 216 219 217 220 static HashMap<WebKit::WebPageProxy*, WKWebView *>& pageToViewMap() … … 696 699 #endif 697 700 701 #if ENABLE(ACCESSIBILITY_EVENTS) 702 CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), accessibilityEventsEnabledChangedCallback, kAXSWebAccessibilityEventsEnabledNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately); 703 [self _updateAccessibilityEventsEnabled]; 704 #endif 705 698 706 _page->setBackgroundExtendsBeyondPage(true); 699 707 … … 3053 3061 3054 3062 #endif // PLATFORM(IOS) 3063 3064 #if ENABLE(ACCESSIBILITY_EVENTS) 3065 static void accessibilityEventsEnabledChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef) 3066 { 3067 ASSERT(observer); 3068 WKWebView* webview = static_cast<WKWebView*>(observer); 3069 [webview _updateAccessibilityEventsEnabled]; 3070 } 3071 3072 - (void)_updateAccessibilityEventsEnabled 3073 { 3074 _page->updateAccessibilityEventsEnabled(_AXSWebAccessibilityEventsEnabled()); 3075 } 3076 #endif 3055 3077 3056 3078 #pragma mark OS X-specific methods -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
r230268 r230808 150 150 #endif 151 151 152 #if ENABLE(ACCESSIBILITY_EVENTS) 153 - (void)_updateAccessibilityEventsEnabled; 154 #endif 155 152 156 #if ENABLE(ATTACHMENT_ELEMENT) 153 157 - (void)_didRemoveAttachment:(NSString *)identifier; -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r230773 r230808 2755 2755 } 2756 2756 2757 #if ENABLE(ACCESSIBILITY_EVENTS) 2758 void WebPageProxy::updateAccessibilityEventsEnabled(bool enabled) 2759 { 2760 if (!isValid()) 2761 return; 2762 2763 m_process->send(Messages::WebPage::UpdateAccessibilityEventsEnabled(enabled), m_pageID); 2764 } 2765 #endif 2766 2757 2767 void WebPageProxy::setUseFixedLayout(bool fixed) 2758 2768 { -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r230773 r230808 746 746 void windowScreenDidChange(WebCore::PlatformDisplayID); 747 747 void accessibilitySettingsDidChange(); 748 #if ENABLE(ACCESSIBILITY_EVENTS) 749 void updateAccessibilityEventsEnabled(bool); 750 #endif 748 751 749 752 void setUseFixedLayout(bool); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r230794 r230808 1734 1734 } 1735 1735 1736 #if ENABLE(ACCESSIBILITY_EVENTS) 1737 void WebPage::updateAccessibilityEventsEnabled(bool enabled) 1738 { 1739 m_page->settings().setAccessibilityEventsEnabled(enabled); 1740 } 1741 #endif 1742 1736 1743 void WebPage::setUseFixedLayout(bool fixed) 1737 1744 { -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r230764 r230808 430 430 431 431 void accessibilitySettingsDidChange(); 432 #if ENABLE(ACCESSIBILITY_EVENTS) 433 void updateAccessibilityEventsEnabled(bool); 434 #endif 432 435 433 436 void scalePage(double scale, const WebCore::IntPoint& origin); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
r230764 r230808 209 209 210 210 AccessibilitySettingsDidChange() 211 #if ENABLE(ACCESSIBILITY_EVENTS) 212 UpdateAccessibilityEventsEnabled(bool enabled) 213 #endif 211 214 212 215 ScalePage(double scale, WebCore::IntPoint origin)
Note: See TracChangeset
for help on using the changeset viewer.