Changeset 272067 in webkit
- Timestamp:
- Jan 29, 2021 11:07:57 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r272063 r272067 1 2021-01-29 Andres Gonzalez <andresg_22@apple.com> 2 3 Support for aria-current state changed notifications. 4 https://bugs.webkit.org/show_bug.cgi?id=221074 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/aria-current-state-changed-notification-expected.txt: Added. 9 * accessibility/aria-current-state-changed-notification.html: Added. 10 * accessibility/aria-current.html: 11 Use AccessibilityUIElement::currentStateValue for consistency and to 12 match closely how actual clients will invoke this functionality. 13 * platform/gtk/TestExpectations: 14 * platform/ios-wk1/TestExpectations: 15 * platform/ios/TestExpectations: 16 * platform/mac-wk1/TestExpectations: 17 * platform/win/TestExpectations: 18 1 19 2021-01-29 Amir Mark Jr <amir_mark@apple.com> 2 20 -
trunk/LayoutTests/accessibility/aria-current.html
r189642 r272067 35 35 36 36 <script> 37 38 37 description("This tests that aria-current causes the right attribute to be returned."); 39 38 … … 51 50 el.focus(); 52 51 var expectation = el.getAttribute("data-expected"); 53 var value = accessibilityController.focusedElement. stringAttributeValue('AXARIACurrent');52 var value = accessibilityController.focusedElement.currentStateValue; 54 53 verify(value, expectation, el); 55 54 } 56 55 } 57 58 56 </script> 59 60 57 <script src="../resources/js-test-post.js"></script> 61 58 </body> -
trunk/LayoutTests/platform/gtk/TestExpectations
r272051 r272067 1332 1332 1333 1333 webkit.org/b/182761 accessibility/gtk/aria-busy-changed-notification.html [ Pass Failure ] 1334 accessibility/aria-current-state-changed-notification.html [ Skip ] 1334 1335 webkit.org/b/182761 accessibility/gtk/aria-current-changed-notification.html [ Pass Failure ] 1335 1336 webkit.org/b/182761 accessibility/gtk/aria-disabled-changed-notification.html [ Pass Failure ] -
trunk/LayoutTests/platform/ios-wk1/TestExpectations
r269226 r272067 127 127 128 128 # Not supported on WK1 129 accessibility/aria-current-state-changed-notification.html [ Skip ] 129 130 accessibility/ios-simulator/speak-selection-content.html [ Skip ] 130 131 accessibility/ios-simulator/accessibility-events-setting.html [ Skip ] -
trunk/LayoutTests/platform/ios/TestExpectations
r272007 r272067 2163 2163 fast/dom/linkify-phone-numbers.html [ Pass ] 2164 2164 2165 # Enable "aria-current" test for iOS2165 # Enable "aria-current" tests for iOS. 2166 2166 webkit.org/b/149297 accessibility/aria-current.html [ Pass ] 2167 accessibility/aria-current-state-changed-notification.html [ Pass ] 2167 2168 2168 2169 # Enable "aria-table-attributes" test for iOS -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r272063 r272067 967 967 webkit.org/b/208477 accessibility/mac/text-marker-for-index.html [ Skip ] 968 968 accessibility/mac/isolated-tree-mode-on-off.html [ Skip ] 969 accessibility/aria-current-state-changed-notification.html [ Skip ] 970 accessibility/aria-current.html [ Skip ] 969 971 970 972 # <rdar://problem/61066929> [ Stress GC ] flaky JSC::ExceptionScope::assertNoException crash under WebCore::ReadableStreamDefaultController -
trunk/LayoutTests/platform/win/TestExpectations
r271760 r272067 675 675 # TODO aria-current is not supported 676 676 webkit.org/b/149018 accessibility/aria-current.html [ Skip ] 677 accessibility/aria-current-state-changed-notification.html [ Skip ] 677 678 678 679 # TODO ARIA 1.1 table related attributes are not supported -
trunk/Source/WebCore/ChangeLog
r272066 r272067 1 2021-01-29 Andres Gonzalez <andresg_22@apple.com> 2 3 Support for aria-current state changed notifications. 4 https://bugs.webkit.org/show_bug.cgi?id=221074 5 6 Reviewed by Chris Fleizach. 7 8 Test: accessibility/aria-current-state-changed-notification.html 9 10 Added handling of the AXCurrentStateChanged notification for Mac and iOS 11 ports. This notification is fired when the aria-current attribute 12 changes. 13 Handling of this notification is required to properly update the 14 accessibility properties of the target object and convey them to 15 assistive technology clients. 16 17 * accessibility/AXLogger.cpp: 18 (WebCore::operator<<): Renamed notification anumerand. 19 * accessibility/AXObjectCache.cpp: 20 (WebCore::AXObjectCache::handleAttributeChange): 21 * accessibility/AXObjectCache.h: 22 * accessibility/atk/AXObjectCacheAtk.cpp: 23 (WebCore::AXObjectCache::postPlatformNotification): 24 * accessibility/ios/AXObjectCacheIOS.mm: 25 (WebCore::AXObjectCache::postPlatformNotification): 26 * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: 27 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 28 (-[WebAccessibilityObjectWrapper accessibilityDOMIdentifier]): 29 (-[WebAccessibilityObjectWrapper postCurrentStateChangedNotification]): 30 (-[WebAccessibilityObjectWrapper accessibilityCurrentState]): 31 (-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]): Renamed to accessibilityCurrentState. 32 * accessibility/mac/AXObjectCacheMac.mm: 33 (WebCore::AXObjectCache::postPlatformNotification): 34 1 35 2021-01-29 Sam Weinig <weinig@apple.com> 2 36 -
trunk/Source/WebCore/accessibility/AXLogger.cpp
r271587 r272067 358 358 stream << "AXChildrenChanged"; 359 359 break; 360 case AXObjectCache::AXNotification::AXCurrent Changed:361 stream << "AXCurrent Changed";360 case AXObjectCache::AXNotification::AXCurrentStateChanged: 361 stream << "AXCurrentStateChanged"; 362 362 break; 363 363 case AXObjectCache::AXNotification::AXDisabledStateChanged: -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r271587 r272067 1774 1774 deferModalChange(element); 1775 1775 else if (attrName == aria_currentAttr) 1776 postNotification(element, AXObjectCache::AXCurrent Changed);1776 postNotification(element, AXObjectCache::AXCurrentStateChanged); 1777 1777 else if (attrName == aria_disabledAttr) 1778 1778 postNotification(element, AXObjectCache::AXDisabledStateChanged); -
trunk/Source/WebCore/accessibility/AXObjectCache.h
r271587 r272067 278 278 AXCheckedStateChanged, 279 279 AXChildrenChanged, 280 AXCurrent Changed,280 AXCurrentStateChanged, 281 281 AXDisabledStateChanged, 282 282 AXFocusedUIElementChanged, -
trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
r265176 r272067 263 263 break; 264 264 265 case AXCurrent Changed:265 case AXCurrentStateChanged: 266 266 atk_object_notify_state_change(axObject, ATK_STATE_ACTIVE, coreObject->currentState() != AccessibilityCurrentState::False); 267 267 break; -
trunk/Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm
r270333 r272067 50 50 NSString *notificationString = nil; 51 51 switch (notification) { 52 case AXActiveDescendantChanged: 53 case AXFocusedUIElementChanged: 54 [obj->wrapper() postFocusChangeNotification]; 55 notificationString = @"AXFocusChanged"; 56 break; 57 case AXSelectedTextChanged: 58 [obj->wrapper() postSelectedTextChangeNotification]; 59 break; 60 case AXLayoutComplete: 61 [obj->wrapper() postLayoutChangeNotification]; 62 break; 63 case AXLiveRegionChanged: 64 [obj->wrapper() postLiveRegionChangeNotification]; 65 break; 66 case AXLiveRegionCreated: 67 [obj->wrapper() postLiveRegionCreatedNotification]; 68 break; 69 case AXChildrenChanged: 70 [obj->wrapper() postChildrenChangedNotification]; 71 break; 72 case AXLoadComplete: 73 [obj->wrapper() postLoadCompleteNotification]; 74 break; 75 case AXInvalidStatusChanged: 76 [obj->wrapper() postInvalidStatusChangedNotification]; 77 break; 78 case AXCheckedStateChanged: 79 case AXValueChanged: 80 [obj->wrapper() postValueChangedNotification]; 81 notificationString = @"AXValueChanged"; 82 break; 83 case AXExpandedChanged: 84 [obj->wrapper() postExpandedChangedNotification]; 85 break; 86 case AXSelectedChildrenChanged: 87 default: 88 break; 52 case AXActiveDescendantChanged: 53 case AXFocusedUIElementChanged: 54 [obj->wrapper() postFocusChangeNotification]; 55 notificationString = @"AXFocusChanged"; 56 break; 57 case AXSelectedTextChanged: 58 [obj->wrapper() postSelectedTextChangeNotification]; 59 break; 60 case AXLayoutComplete: 61 [obj->wrapper() postLayoutChangeNotification]; 62 break; 63 case AXLiveRegionChanged: 64 [obj->wrapper() postLiveRegionChangeNotification]; 65 break; 66 case AXLiveRegionCreated: 67 [obj->wrapper() postLiveRegionCreatedNotification]; 68 break; 69 case AXChildrenChanged: 70 [obj->wrapper() postChildrenChangedNotification]; 71 break; 72 case AXLoadComplete: 73 [obj->wrapper() postLoadCompleteNotification]; 74 break; 75 case AXInvalidStatusChanged: 76 [obj->wrapper() postInvalidStatusChangedNotification]; 77 break; 78 case AXCheckedStateChanged: 79 case AXValueChanged: 80 [obj->wrapper() postValueChangedNotification]; 81 notificationString = @"AXValueChanged"; 82 break; 83 case AXExpandedChanged: 84 [obj->wrapper() postExpandedChangedNotification]; 85 break; 86 case AXCurrentStateChanged: 87 [obj->wrapper() postCurrentStateChangedNotification]; 88 notificationString = @"AXCurrentStateChanged"; 89 break; 90 default: 91 break; 89 92 } 90 93 91 94 // Used by DRT to know when notifications are posted. 92 95 if (notificationString) -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.h
r260366 r272067 67 67 - (void)postValueChangedNotification; 68 68 - (void)postExpandedChangedNotification; 69 - (void)postCurrentStateChangedNotification; 69 70 70 71 @end -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r271790 r272067 335 335 - (uint64_t)_axTextAreaTrait { return (1 << 24); } 336 336 - (uint64_t)_axUpdatesFrequentlyTrait { return (1 << 25); } 337 338 - (NSString *)accessibilityDOMIdentifier 339 { 340 if (![self _prepareAccessibilityCall]) 341 return nil; 342 343 return self.axBackingObject->identifierAttribute(); 344 } 337 345 338 346 - (BOOL)accessibilityCanFuzzyHitTest … … 2005 2013 } 2006 2014 2015 - (void)postCurrentStateChangedNotification 2016 { 2017 // The UIKit accessibility wrapper will override and post appropriate notification. 2018 } 2019 2007 2020 // These will be used by the UIKit wrapper to calculate an appropriate description of scroll status. 2008 2021 - (CGPoint)_accessibilityScrollPosition … … 3032 3045 } 3033 3046 3034 - (NSString *)accessibilityARIACurrentStatus 3035 { 3036 if (![self _prepareAccessibilityCall]) 3037 return nil; 3038 3039 switch (self.axBackingObject->currentState()) { 3040 case AccessibilityCurrentState::False: 3041 return @"false"; 3042 case AccessibilityCurrentState::Page: 3043 return @"page"; 3044 case AccessibilityCurrentState::Step: 3045 return @"step"; 3046 case AccessibilityCurrentState::Location: 3047 return @"location"; 3048 case AccessibilityCurrentState::Time: 3049 return @"time"; 3050 case AccessibilityCurrentState::Date: 3051 return @"date"; 3052 case AccessibilityCurrentState::True: 3053 return @"true"; 3054 } 3047 - (NSString *)accessibilityCurrentState 3048 { 3049 if (![self _prepareAccessibilityCall]) 3050 return nil; 3051 3052 return self.axBackingObject->currentValue(); 3055 3053 } 3056 3054 -
trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
r270523 r272067 41 41 #endif 42 42 43 #ifndef NSAccessibilityCurrentStateChangedNotification 44 #define NSAccessibilityCurrentStateChangedNotification @"AXCurrentStateChanged" 45 #endif 46 43 47 #ifndef NSAccessibilityLiveRegionChangedNotification 44 48 #define NSAccessibilityLiveRegionChangedNotification @"AXLiveRegionChanged" … … 294 298 NSString *macNotification; 295 299 switch (notification) { 296 case AXActiveDescendantChanged: 297 // An active descendant change for trees means a selected rows change. 298 if (obj->isTree() || obj->isTable()) 299 macNotification = NSAccessibilitySelectedRowsChangedNotification; 300 301 // When a combobox uses active descendant, it means the selected item in its associated 302 // list has changed. In these cases we should use selected children changed, because 303 // we don't want the focus to change away from the combobox where the user is typing. 304 else if (obj->isComboBox() || obj->isList() || obj->isListBox()) 305 macNotification = NSAccessibilitySelectedChildrenChangedNotification; 306 else 307 macNotification = NSAccessibilityFocusedUIElementChangedNotification; 308 break; 309 case AXAutocorrectionOccured: 310 macNotification = @"AXAutocorrectionOccurred"; 311 break; 312 case AXFocusedUIElementChanged: 300 case AXActiveDescendantChanged: 301 // An active descendant change for trees means a selected rows change. 302 if (obj->isTree() || obj->isTable()) 303 macNotification = NSAccessibilitySelectedRowsChangedNotification; 304 305 // When a combobox uses active descendant, it means the selected item in its associated 306 // list has changed. In these cases we should use selected children changed, because 307 // we don't want the focus to change away from the combobox where the user is typing. 308 else if (obj->isComboBox() || obj->isList() || obj->isListBox()) 309 macNotification = NSAccessibilitySelectedChildrenChangedNotification; 310 else 313 311 macNotification = NSAccessibilityFocusedUIElementChangedNotification; 314 break; 315 case AXLayoutComplete: 316 macNotification = @"AXLayoutComplete"; 317 break; 318 case AXLoadComplete: 319 case AXFrameLoadComplete: 320 macNotification = @"AXLoadComplete"; 321 // Frame loading events are handled by the UIProcess on macOS to improve reliability. 322 // On macOS, before notifications are allowed by AppKit to be sent to clients, you need to have a client (e.g. VoiceOver) 323 // register for that notification. Because these new processes appear before VO has a chance to register, it will often 324 // miss AXLoadComplete notifications. By moving them to the UIProcess, we can eliminate that issue. 325 skipSystemNotification = true; 326 break; 327 case AXInvalidStatusChanged: 328 macNotification = @"AXInvalidStatusChanged"; 329 break; 330 case AXSelectedChildrenChanged: 331 if (obj->isTable() && obj->isExposable()) 332 macNotification = NSAccessibilitySelectedRowsChangedNotification; 333 else 334 macNotification = NSAccessibilitySelectedChildrenChangedNotification; 335 break; 336 case AXSelectedTextChanged: 337 macNotification = NSAccessibilitySelectedTextChangedNotification; 338 break; 339 case AXCheckedStateChanged: 340 case AXValueChanged: 341 macNotification = NSAccessibilityValueChangedNotification; 342 break; 343 case AXLiveRegionCreated: 344 macNotification = NSAccessibilityLiveRegionCreatedNotification; 345 break; 346 case AXLiveRegionChanged: 347 macNotification = NSAccessibilityLiveRegionChangedNotification; 348 break; 349 case AXRowCountChanged: 350 macNotification = NSAccessibilityRowCountChangedNotification; 351 break; 352 case AXRowExpanded: 353 macNotification = NSAccessibilityRowExpandedNotification; 354 break; 355 case AXRowCollapsed: 356 macNotification = NSAccessibilityRowCollapsedNotification; 357 break; 358 case AXElementBusyChanged: 359 macNotification = @"AXElementBusyChanged"; 360 break; 361 case AXExpandedChanged: 362 macNotification = @"AXExpandedChanged"; 363 break; 364 case AXMenuClosed: 365 macNotification = (id)kAXMenuClosedNotification; 366 break; 367 case AXMenuListItemSelected: 368 case AXMenuListValueChanged: 369 macNotification = (id)kAXMenuItemSelectedNotification; 370 break; 371 case AXPressDidSucceed: 372 macNotification = @"AXPressDidSucceed"; 373 break; 374 case AXPressDidFail: 375 macNotification = @"AXPressDidFail"; 376 break; 377 case AXMenuOpened: 378 macNotification = (id)kAXMenuOpenedNotification; 379 break; 380 case AXDraggingStarted: 381 macNotification = (id)kAXDraggingSourceDragBeganNotification; 382 break; 383 case AXDraggingEnded: 384 macNotification = (id)kAXDraggingSourceDragEndedNotification; 385 break; 386 case AXDraggingEnteredDropZone: 387 macNotification = (id)kAXDraggingDestinationDropAllowedNotification; 388 break; 389 case AXDraggingDropped: 390 macNotification = (id)kAXDraggingDestinationDragAcceptedNotification; 391 break; 392 case AXDraggingExitedDropZone: 393 macNotification = (id)kAXDraggingDestinationDragNotAcceptedNotification; 394 break; 395 default: 396 return; 397 } 398 312 break; 313 case AXAutocorrectionOccured: 314 macNotification = @"AXAutocorrectionOccurred"; 315 break; 316 case AXCurrentStateChanged: 317 macNotification = NSAccessibilityCurrentStateChangedNotification; 318 break; 319 case AXFocusedUIElementChanged: 320 macNotification = NSAccessibilityFocusedUIElementChangedNotification; 321 break; 322 case AXLayoutComplete: 323 macNotification = @"AXLayoutComplete"; 324 break; 325 case AXLoadComplete: 326 case AXFrameLoadComplete: 327 macNotification = @"AXLoadComplete"; 328 // Frame loading events are handled by the UIProcess on macOS to improve reliability. 329 // On macOS, before notifications are allowed by AppKit to be sent to clients, you need to have a client (e.g. VoiceOver) 330 // register for that notification. Because these new processes appear before VO has a chance to register, it will often 331 // miss AXLoadComplete notifications. By moving them to the UIProcess, we can eliminate that issue. 332 skipSystemNotification = true; 333 break; 334 case AXInvalidStatusChanged: 335 macNotification = @"AXInvalidStatusChanged"; 336 break; 337 case AXSelectedChildrenChanged: 338 if (obj->isTable() && obj->isExposable()) 339 macNotification = NSAccessibilitySelectedRowsChangedNotification; 340 else 341 macNotification = NSAccessibilitySelectedChildrenChangedNotification; 342 break; 343 case AXSelectedTextChanged: 344 macNotification = NSAccessibilitySelectedTextChangedNotification; 345 break; 346 case AXCheckedStateChanged: 347 case AXValueChanged: 348 macNotification = NSAccessibilityValueChangedNotification; 349 break; 350 case AXLiveRegionCreated: 351 macNotification = NSAccessibilityLiveRegionCreatedNotification; 352 break; 353 case AXLiveRegionChanged: 354 macNotification = NSAccessibilityLiveRegionChangedNotification; 355 break; 356 case AXRowCountChanged: 357 macNotification = NSAccessibilityRowCountChangedNotification; 358 break; 359 case AXRowExpanded: 360 macNotification = NSAccessibilityRowExpandedNotification; 361 break; 362 case AXRowCollapsed: 363 macNotification = NSAccessibilityRowCollapsedNotification; 364 break; 365 case AXElementBusyChanged: 366 macNotification = @"AXElementBusyChanged"; 367 break; 368 case AXExpandedChanged: 369 macNotification = @"AXExpandedChanged"; 370 break; 371 case AXMenuClosed: 372 macNotification = (id)kAXMenuClosedNotification; 373 break; 374 case AXMenuListItemSelected: 375 case AXMenuListValueChanged: 376 macNotification = (id)kAXMenuItemSelectedNotification; 377 break; 378 case AXPressDidSucceed: 379 macNotification = @"AXPressDidSucceed"; 380 break; 381 case AXPressDidFail: 382 macNotification = @"AXPressDidFail"; 383 break; 384 case AXMenuOpened: 385 macNotification = (id)kAXMenuOpenedNotification; 386 break; 387 case AXDraggingStarted: 388 macNotification = (id)kAXDraggingSourceDragBeganNotification; 389 break; 390 case AXDraggingEnded: 391 macNotification = (id)kAXDraggingSourceDragEndedNotification; 392 break; 393 case AXDraggingEnteredDropZone: 394 macNotification = (id)kAXDraggingDestinationDropAllowedNotification; 395 break; 396 case AXDraggingDropped: 397 macNotification = (id)kAXDraggingDestinationDragAcceptedNotification; 398 break; 399 case AXDraggingExitedDropZone: 400 macNotification = (id)kAXDraggingDestinationDragNotAcceptedNotification; 401 break; 402 default: 403 return; 404 } 405 399 406 // NSAccessibilityPostNotification will call this method, (but not when running DRT), so ASSERT here to make sure it does not crash. 400 407 // https://bugs.webkit.org/show_bug.cgi?id=46662 -
trunk/Tools/ChangeLog
r272064 r272067 1 2021-01-29 Andres Gonzalez <andresg_22@apple.com> 2 3 Support for aria-current state changed notifications. 4 https://bugs.webkit.org/show_bug.cgi?id=221074 5 6 Reviewed by Chris Fleizach. 7 8 Added AccessibilityUIElement::domIdentifier and currentStateValue used 9 in LayoutTests/accessibility/aria-current-state-changed-notification.html. 10 11 * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: 12 (WTR::AccessibilityUIElement::domIdentifier const): Non-Cocoa implementation. 13 (WTR::AccessibilityUIElement::currentStateValue const): Non-Cocoa implementation. 14 * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: 15 * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: 16 * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: 17 (WTR::AccessibilityUIElement::domIdentifier const): 18 (WTR::AccessibilityUIElement::stringAttributeValue): 19 (WTR::AccessibilityUIElement::currentStateValue const): 20 * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: 21 (WTR::AccessibilityUIElement::domIdentifier const): 22 (WTR::AccessibilityUIElement::currentStateValue const): 23 1 24 2021-01-29 David Kilzer <ddkilzer@apple.com> 2 25 -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
r271790 r272067 112 112 113 113 #if !PLATFORM(COCOA) || !HAVE(ACCESSIBILITY) 114 JSRetainPtr<JSStringRef> AccessibilityUIElement::domIdentifier() const { return nullptr; } 115 JSRetainPtr<JSStringRef> AccessibilityUIElement::currentStateValue() const { return nullptr; } 114 116 RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker(AccessibilityTextMarker*) { return nullptr; } 115 117 RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker(AccessibilityTextMarker*) { return nullptr; } -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
r271790 r272067 69 69 #if PLATFORM(COCOA) 70 70 id platformUIElement() { return m_element.get(); } 71 #endif 72 #if !PLATFORM(COCOA) 71 #else 73 72 PlatformUIElement platformUIElement() { return m_element; } 74 73 #endif … … 79 78 80 79 bool isEqual(AccessibilityUIElement* otherElement); 81 80 JSRetainPtr<JSStringRef> domIdentifier() const; 81 82 82 RefPtr<AccessibilityUIElement> elementAtPoint(int x, int y); 83 83 RefPtr<AccessibilityUIElement> childAtIndex(unsigned); … … 174 174 bool isExpanded() const; 175 175 bool isChecked() const; 176 JSRetainPtr<JSStringRef> currentStateValue() const; 176 177 bool isIndeterminate() const; 177 178 bool isVisible() const; -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
r271790 r272067 28 28 ] interface AccessibilityUIElement { 29 29 boolean isEqual(AccessibilityUIElement otherElement); 30 readonly attribute DOMString domIdentifier; 30 31 readonly attribute boolean isIsolatedObject; 31 32 … … 92 93 readonly attribute boolean isExpanded; 93 94 readonly attribute boolean isChecked; 95 readonly attribute DOMString currentStateValue; 94 96 readonly attribute boolean isIndeterminate; 95 97 readonly attribute boolean isVisible; -
trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm
r271790 r272067 71 71 - (UIAccessibilityTraits)_axTextAreaTrait; 72 72 - (UIAccessibilityTraits)_axSearchFieldTrait; 73 - (NSString *)accessibility ARIACurrentStatus;73 - (NSString *)accessibilityCurrentState; 74 74 - (NSUInteger)accessibilityRowCount; 75 75 - (NSUInteger)accessibilityColumnCount; … … 118 118 119 119 @interface NSObject (WebAccessibilityObjectWrapperPrivate) 120 - (NSString *)accessibilityDOMIdentifier; 120 121 - (CGPathRef)_accessibilityPath; 121 122 @end … … 174 175 return false; 175 176 return platformUIElement() == otherElement->platformUIElement(); 177 } 178 179 JSRetainPtr<JSStringRef> AccessibilityUIElement::domIdentifier() const 180 { 181 id value = [m_element accessibilityDOMIdentifier]; 182 if ([value isKindOfClass:[NSString class]]) 183 return [value createJSStringRef]; 184 return nullptr; 176 185 } 177 186 … … 364 373 365 374 if (JSStringIsEqualToUTF8CString(attribute, "AXARIACurrent")) 366 return [[m_element accessibility ARIACurrentStatus] createJSStringRef];375 return [[m_element accessibilityCurrentState] createJSStringRef]; 367 376 368 377 if (JSStringIsEqualToUTF8CString(attribute, "AXExpandedTextValue")) … … 609 618 { 610 619 return false; 620 } 621 622 JSRetainPtr<JSStringRef> AccessibilityUIElement::currentStateValue() const 623 { 624 id value = [m_element accessibilityCurrentState]; 625 if ([value isKindOfClass:[NSString class]]) 626 return [value createJSStringRef]; 627 return nullptr; 611 628 } 612 629 -
trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
r269635 r272067 43 43 #import <wtf/cocoa/VectorCocoa.h> 44 44 45 #define NSAccessibilityDOMIdentifierAttribute @"AXDOMIdentifier" 46 45 47 #ifndef NSAccessibilityOwnsAttribute 46 48 #define NSAccessibilityOwnsAttribute @"AXOwns" … … 57 59 #ifndef NSAccessibilityPathAttribute 58 60 #define NSAccessibilityPathAttribute @"AXPath" 61 #endif 62 63 #ifndef NSAccessibilityARIACurrentAttribute 64 #define NSAccessibilityARIACurrentAttribute @"AXARIACurrent" 59 65 #endif 60 66 … … 328 334 } 329 335 336 JSRetainPtr<JSStringRef> AccessibilityUIElement::domIdentifier() const 337 { 338 id value = attributeValue(m_element.get(), NSAccessibilityDOMIdentifierAttribute); 339 if ([value isKindOfClass:[NSString class]]) 340 return [value createJSStringRef]; 341 return nullptr; 342 } 343 330 344 void AccessibilityUIElement::getLinkedUIElements(Vector<RefPtr<AccessibilityUIElement>>& elementVector) 331 345 { … … 975 989 // On the Mac, intValue()==1 if a a checkable control is checked. 976 990 return intValue() == 1; 991 } 992 993 JSRetainPtr<JSStringRef> AccessibilityUIElement::currentStateValue() const 994 { 995 id value = attributeValue(m_element.get(), NSAccessibilityARIACurrentAttribute); 996 if ([value isKindOfClass:[NSString class]]) 997 return [value createJSStringRef]; 998 return nullptr; 977 999 } 978 1000
Note: See TracChangeset
for help on using the changeset viewer.