AX: scrollable elements do not allow 3-finger swipe
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jul 2015 23:26:34 +0000 (23:26 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jul 2015 23:26:34 +0000 (23:26 +0000)
commit99638837f813763a1020a1569b84eeba31b6bf93
tree2fa105e2fb14f9d398261748ece92ac57c8000c6
parent19f4e683efa2ce1a5a572c6cf1166dd89e2c3377
AX: scrollable elements do not allow 3-finger swipe
https://bugs.webkit.org/show_bug.cgi?id=141893

Reviewed by Mario Sanchez Prada.

Source/WebCore:

To allow iOS Accessibility to perform by-page scrolling in overflow areas, we move
that scrolling code into AccessibilityObject and then iterate all the possible ScrollableAreas,
rather than just finding the parents that are ScrollViews.

Test: platform/ios-simulator/accessibility/scroll-in-overflow-div.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::scrollAreaAndAncestor):
(WebCore::AccessibilityObject::scrollPosition):
(WebCore::AccessibilityObject::scrollVisibleContentRect):
(WebCore::AccessibilityObject::scrollContentsSize):
(WebCore::AccessibilityObject::scrollByPage):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityScroll:]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollPosition]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollSize]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollVisibleRect]):
(-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):

Tools:

Support global notification listeners for iOS code.
Fix an issue in DRT where the dictionary of data was not being passed back to the layout test for the notication callback.
Implement scrollUp/Down/Left/Right.

* DumpRenderTree/AccessibilityController.h:
* DumpRenderTree/AccessibilityUIElement.cpp:
(increaseTextSelectionCallback):
(scrollPageUpCallback):
(scrollPageDownCallback):
(scrollPageLeftCallback):
(scrollPageRightCallback):
(decreaseTextSelectionCallback):
(getElementTextLengthCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityControllerIOS.mm:
(AccessibilityController::~AccessibilityController):
(AccessibilityController::elementAtPoint):
(AccessibilityController::addNotificationListener):
(AccessibilityController::platformResetToConsistentState):
(AccessibilityController::removeNotificationListener):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::AccessibilityUIElement):
(AccessibilityUIElement::subrole):
(AccessibilityUIElement::scrollPageUp):
(AccessibilityUIElement::scrollPageDown):
(AccessibilityUIElement::scrollPageLeft):
(AccessibilityUIElement::scrollPageRight):
(AccessibilityUIElement::roleDescription):
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler _notificationReceived:]):
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::linkedElement):
(WTR::AccessibilityUIElement::headerElementAtIndex):
(WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
(WTR::AccessibilityUIElement::scrollPageUp):
(WTR::AccessibilityUIElement::scrollPageDown):
(WTR::AccessibilityUIElement::scrollPageLeft):
(WTR::AccessibilityUIElement::scrollPageRight):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
(WTR::AccessibilityController::addNotificationListener):
(WTR::AccessibilityController::removeNotificationListener):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement):
(WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
(WTR::AccessibilityUIElement::scrollPageUp):
(WTR::AccessibilityUIElement::scrollPageDown):
(WTR::AccessibilityUIElement::scrollPageLeft):
(WTR::AccessibilityUIElement::scrollPageRight):
(WTR::AccessibilityUIElement::increaseTextSelection):

LayoutTests:

* platform/ios-simulator/accessibility/scroll-in-overflow-div-expected.txt: Added.
* platform/ios-simulator/accessibility/scroll-in-overflow-div.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityController.h
Tools/DumpRenderTree/AccessibilityUIElement.cpp
Tools/DumpRenderTree/AccessibilityUIElement.h
Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm
Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm
Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm
Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm