AX: I cannot activate links on the mobile version of news.google.com
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Dec 2014 05:44:10 +0000 (05:44 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Dec 2014 05:44:10 +0000 (05:44 +0000)
commit5ee1286dc9193a008217cd6e0ba08eece24e20ab
tree00e4874853ad29bf94abb39b818adeca9e30248c
parentb5f96a29643b353f53a483cf6ab98e56ddd59bd8
AX: I cannot activate links on the mobile version of news.google.com
https://bugs.webkit.org/show_bug.cgi?id=139330

Reviewed by Simon Fraser.

Source/WebCore:

This website only listens for touch events. VoiceOver normally dispatches click and mouse events,
so on iOS this falls and VoiceOver is not able to activate anything.

The solution here is to dispatch simulated touch down/up events.

Test: platform/ios-simulator/ios-accessibility/press-fires-touch-events.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
(WebCore::AccessibilityObject::dispatchTouchEvent):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isDetachedFromParent):
* page/EventHandler.h:
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::dispatchSimulatedTouchEvent):
* platform/ios/PlatformEventFactoryIOS.h:
* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
(WebCore::PlatformEventFactory::createPlatformSimulatedTouchEvent):

Tools:

Implement press for iOS.

* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::press):

LayoutTests:

* platform/ios-simulator/ios-accessibility: Added.
* platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt: Added.
* platform/ios-simulator/ios-accessibility/press-fires-touch-events.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/page/EventHandler.h
Source/WebCore/page/ios/EventHandlerIOS.mm
Source/WebCore/platform/ios/PlatformEventFactoryIOS.h
Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm
Tools/ChangeLog
Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm