Title: [204072] branches/safari-602-branch

Diff

Modified: branches/safari-602-branch/LayoutTests/ChangeLog (204071 => 204072)


--- branches/safari-602-branch/LayoutTests/ChangeLog	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/LayoutTests/ChangeLog	2016-08-03 06:16:10 UTC (rev 204072)
@@ -1,5 +1,23 @@
 2016-08-02  Babak Shafiei  <[email protected]>
 
+        Merge r204062. rdar://problem/27592936
+
+    2016-08-02  Nan Wang  <[email protected]>
+
+            AX: Simulated touch events are not working on iOS
+            https://bugs.webkit.org/show_bug.cgi?id=160395
+            <rdar://problem/27633597>
+
+            Reviewed by Chris Fleizach.
+
+            * accessibility/ios-simulator/press-fires-touch-events-expected.txt: Added.
+            * accessibility/ios-simulator/press-fires-touch-events.html: Added.
+            * platform/ios-simulator-wk2/TestExpectations:
+            * platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt: Removed.
+            * platform/ios-simulator/ios/accessibility/press-fires-touch-events.html: Removed.
+
+2016-08-02  Babak Shafiei  <[email protected]>
+
         Merge r203955. rdar://problem/27629346
 
     2016-07-31  Nan Wang  <[email protected]>

Copied: branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/press-fires-touch-events-expected.txt (from rev 204071, branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt) (0 => 204072)


--- branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/press-fires-touch-events-expected.txt	                        (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/press-fires-touch-events-expected.txt	2016-08-03 06:16:10 UTC (rev 204072)
@@ -0,0 +1,12 @@
+button
+Ensure that if an element on handles touch events, the simulated accessibility press will still activate those elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Received touch start [object TouchEvent]
+Received touch ended [object TouchEvent]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/press-fires-touch-events.html (from rev 204071, branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events.html) (0 => 204072)


--- branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/press-fires-touch-events.html	                        (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/press-fires-touch-events.html	2016-08-03 06:16:10 UTC (rev 204072)
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script>
+var successfullyParsed = false;
+if (window.testRunner)
+   testRunner.dumpAsText();
+
+function touchEnd(event) {
+    debug("Received touch ended " + event);
+    event.stopPropagation(); 
+    event.preventDefault();
+}
+
+function touchStart(event) {
+    debug("Received touch start " + event);
+    event.stopPropagation(); 
+    event.preventDefault();
+}
+
+</script>
+</head>
+<body>
+
+<div role="button" id="button" _ontouchstart_="touchStart(event);" _ontouchend_="touchEnd(event);">button</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("Ensure that if an element on handles touch events, the simulated accessibility press will still activate those elements.");
+
+    if (window.accessibilityController) {
+        var button = accessibilityController.accessibleElementById("button");
+        button.press();
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src=""
+
+</body>
+</html>
+

Deleted: branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt (204071 => 204072)


--- branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt	2016-08-03 06:16:10 UTC (rev 204072)
@@ -1,12 +0,0 @@
-button
-Ensure that if an element on handles touch events, the simulated accessibility press will still activate those elements.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Received touch start [object TouchEvent]
-Received touch ended [object TouchEvent]
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events.html (204071 => 204072)


--- branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events.html	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events.html	2016-08-03 06:16:10 UTC (rev 204072)
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-<script>
-var successfullyParsed = false;
-if (window.testRunner)
-   testRunner.dumpAsText();
-
-function touchEnd(event) {
-    debug("Received touch ended " + event);
-    event.stopPropagation(); 
-    event.preventDefault();
-}
-
-function touchStart(event) {
-    debug("Received touch start " + event);
-    event.stopPropagation(); 
-    event.preventDefault();
-}
-
-</script>
-</head>
-<body>
-
-<div role="button" id="button" _ontouchstart_="touchStart(event);" _ontouchend_="touchEnd(event);">button</div>
-
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-
-    description("Ensure that if an element on handles touch events, the simulated accessibility press will still activate those elements.");
-
-    if (window.accessibilityController) {
-        var button = accessibilityController.accessibleElementById("button");
-        button.press();
-    }
-
-    successfullyParsed = true;
-</script>
-
-<script src=""
-
-</body>
-</html>
-

Modified: branches/safari-602-branch/LayoutTests/platform/ios-simulator-wk2/TestExpectations (204071 => 204072)


--- branches/safari-602-branch/LayoutTests/platform/ios-simulator-wk2/TestExpectations	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/LayoutTests/platform/ios-simulator-wk2/TestExpectations	2016-08-03 06:16:10 UTC (rev 204072)
@@ -1810,7 +1810,7 @@
 fast/replaced/border-radius-clip.html [ Failure ]
 fast/writing-mode/japanese-lr-selection.html [ Failure ]
 fast/writing-mode/japanese-rl-selection.html [ Failure ]
-platform/ios-simulator/ios/accessibility/press-fires-touch-events.html [ Failure ]
+accessibility/ios-simulator/press-fires-touch-events.html [ Skip ]
 
 fast/text/combining-character-sequence-vertical.html [ ImageOnlyFailure ]
 fast/text/vertical-quotation-marks.html [ ImageOnlyFailure ]

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (204071 => 204072)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-08-03 06:16:10 UTC (rev 204072)
@@ -1,5 +1,33 @@
 2016-08-02  Babak Shafiei  <[email protected]>
 
+        Merge r204062. rdar://problem/27592936
+
+    2016-08-02  Nan Wang  <[email protected]>
+
+            AX: Simulated touch events are not working on iOS
+            https://bugs.webkit.org/show_bug.cgi?id=160395
+            <rdar://problem/27633597>
+
+            Reviewed by Chris Fleizach.
+
+            We should mark the simulated touch as a potential tap otherwise it won't
+            be handled on iOS. Also, we need to dispatch both touch start and touch end
+            to mimic the real touch events. Last, added a has event listeners check,
+            because iOS is dispatching mouse click events for elements without touch event
+            listeners.
+
+            Test: accessibility/ios-simulator/press-fires-touch-events.html
+
+            * accessibility/AccessibilityObject.cpp:
+            (WebCore::AccessibilityObject::press):
+            (WebCore::AccessibilityObject::dispatchTouchEvent):
+            * page/ios/EventHandlerIOS.mm:
+            (WebCore::EventHandler::dispatchSimulatedTouchEvent):
+            * platform/ios/PlatformEventFactoryIOS.mm:
+            (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
+
+2016-08-02  Babak Shafiei  <[email protected]>
+
         Merge r203955. rdar://problem/27629346
 
     2016-07-31  Nan Wang  <[email protected]>

Modified: branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.cpp (204071 => 204072)


--- branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.cpp	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.cpp	2016-08-03 06:16:10 UTC (rev 204072)
@@ -922,8 +922,11 @@
     
     UserGestureIndicator gestureIndicator(ProcessingUserGesture, document);
     
-    // FIXME: dispatchTouchEvent() is not dispatching the touch event correctly.
-    bool dispatchedTouchEvent = dispatchTouchEvent();
+    bool dispatchedTouchEvent = false;
+#if PLATFORM(IOS)
+    if (hasTouchEventListener())
+        dispatchedTouchEvent = dispatchTouchEvent();
+#endif
     if (!dispatchedTouchEvent)
         pressElement->accessKeyAction(true);
     
@@ -938,7 +941,7 @@
     if (!frame)
         return false;
 
-    frame->eventHandler().dispatchSimulatedTouchEvent(clickPoint());
+    handled = frame->eventHandler().dispatchSimulatedTouchEvent(clickPoint());
 #endif
     return handled;
 }

Modified: branches/safari-602-branch/Source/WebCore/page/ios/EventHandlerIOS.mm (204071 => 204072)


--- branches/safari-602-branch/Source/WebCore/page/ios/EventHandlerIOS.mm	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/Source/WebCore/page/ios/EventHandlerIOS.mm	2016-08-03 06:16:10 UTC (rev 204072)
@@ -108,8 +108,7 @@
 bool EventHandler::dispatchSimulatedTouchEvent(IntPoint location)
 {
     bool handled = handleTouchEvent(PlatformEventFactory::createPlatformSimulatedTouchEvent(PlatformEvent::TouchStart, location));
-    if (handled)
-        handleTouchEvent(PlatformEventFactory::createPlatformSimulatedTouchEvent(PlatformEvent::TouchEnd, location));
+    handled |= handleTouchEvent(PlatformEventFactory::createPlatformSimulatedTouchEvent(PlatformEvent::TouchEnd, location));
     return handled;
 }
     

Modified: branches/safari-602-branch/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm (204071 => 204072)


--- branches/safari-602-branch/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm	2016-08-03 06:16:10 UTC (rev 204072)
@@ -272,6 +272,7 @@
         m_isGesture = 0;
         m_position = location;
         m_globalPosition = location;
+        m_isPotentialTap = true;
         
         unsigned touchCount = 1;
         m_touchPoints.reserveInitialCapacity(touchCount);

Modified: branches/safari-602-branch/Tools/ChangeLog (204071 => 204072)


--- branches/safari-602-branch/Tools/ChangeLog	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/Tools/ChangeLog	2016-08-03 06:16:10 UTC (rev 204072)
@@ -1,5 +1,21 @@
 2016-08-02  Babak Shafiei  <[email protected]>
 
+        Merge r204062. rdar://problem/27592936
+
+    2016-08-02  Nan Wang  <[email protected]>
+
+            AX: Simulated touch events are not working on iOS
+            https://bugs.webkit.org/show_bug.cgi?id=160395
+            <rdar://problem/27633597>
+
+            Reviewed by Chris Fleizach.
+
+            * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+            (WTR::AccessibilityUIElement::press):
+            (WTR::AccessibilityUIElement::setSelectedChild):
+
+2016-08-02  Babak Shafiei  <[email protected]>
+
         Merge r203955. rdar://problem/27629346
 
     2016-07-31  Nan Wang  <[email protected]>

Modified: branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (204071 => 204072)


--- branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2016-08-03 06:16:04 UTC (rev 204071)
+++ branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2016-08-03 06:16:10 UTC (rev 204072)
@@ -806,6 +806,7 @@
 
 void AccessibilityUIElement::press()
 {
+    [m_element _accessibilityActivate];
 }
 
 void AccessibilityUIElement::setSelectedChild(AccessibilityUIElement* element) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to