<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[176904] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/176904">176904</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2014-12-05 21:44:10 -0800 (Fri, 05 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjecth">trunk/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlerh">trunk/Source/WebCore/page/EventHandler.h</a></li>
<li><a href="#trunkSourceWebCorepageiosEventHandlerIOSmm">trunk/Source/WebCore/page/ios/EventHandlerIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformiosPlatformEventFactoryIOSh">trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.h</a></li>
<li><a href="#trunkSourceWebCoreplatformiosPlatformEventFactoryIOSmm">trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm">trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/ios-simulator/ios-accessibility/</li>
<li><a href="#trunkLayoutTestsplatformiossimulatoriosaccessibilitypressfirestoucheventsexpectedtxt">trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoriosaccessibilitypressfirestoucheventshtml">trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/LayoutTests/ChangeLog        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-12-05  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        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.
+
+        * 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.
+
</ins><span class="cx"> 2014-12-05  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Directional single quotation marks are not rotated in vertical text
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoriosaccessibilitypressfirestoucheventsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt (0 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Received touch start [object TouchEvent]
+Received touch ended [object TouchEvent]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoriosaccessibilitypressfirestoucheventshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html (0 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var successfullyParsed = false;
+if (window.testRunner)
+   testRunner.dumpAsText();
+
+function touchEnd(event) {
+    debug(&quot;Received touch ended &quot; + event);
+    event.stopPropagation(); 
+    event.preventDefault();
+}
+
+function touchStart(event) {
+    debug(&quot;Received touch start &quot; + event);
+    event.stopPropagation(); 
+    event.preventDefault();
+}
+
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div role=&quot;button&quot; id=&quot;button&quot; ontouchstart=&quot;touchStart(event);&quot; ontouchend=&quot;touchEnd(event);&quot;&gt;button&lt;/div&gt;
+
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;Ensure that if an element on handles touch events, the simulated accessibility press will still activate those elements.&quot;);
+
+    if (window.accessibilityController) {
+        var button = accessibilityController.accessibleElementById(&quot;button&quot;);
+        button.press();
+    }
+
+    successfullyParsed = true;
+&lt;/script&gt;
+
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Source/WebCore/ChangeLog        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2014-12-05  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        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.
+
+        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):
+
</ins><span class="cx"> 2014-12-05  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Directional single quotation marks are not rotated in vertical text
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;AccessibilityTable.h&quot;
</span><span class="cx"> #include &quot;DOMTokenList.h&quot;
</span><span class="cx"> #include &quot;Editor.h&quot;
</span><ins>+#include &quot;EventHandler.h&quot;
</ins><span class="cx"> #include &quot;FloatRect.h&quot;
</span><span class="cx"> #include &quot;FocusController.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="lines">@@ -869,10 +870,27 @@
</span><span class="cx">         pressElement = hitTestElement;
</span><span class="cx">     
</span><span class="cx">     UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, document);
</span><del>-    pressElement-&gt;accessKeyAction(true);
</del><ins>+    
+    bool dispatchedTouchEvent = dispatchTouchEvent();
+    if (!dispatchedTouchEvent)
+        pressElement-&gt;accessKeyAction(true);
+    
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><ins>+    
+bool AccessibilityObject::dispatchTouchEvent()
+{
+    bool handled = false;
+#if ENABLE(IOS_TOUCH_EVENTS)
+    MainFrame* frame = mainFrame();
+    if (!frame)
+        return false;
</ins><span class="cx"> 
</span><ins>+    frame-&gt;eventHandler().dispatchSimulatedTouchEvent(clickPoint());
+#endif
+    return handled;
+}
+
</ins><span class="cx"> Frame* AccessibilityObject::frame() const
</span><span class="cx"> {
</span><span class="cx">     Node* node = this-&gt;node();
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -984,7 +984,8 @@
</span><span class="cx">     static bool objectMatchesSearchCriteriaWithResultLimit(AccessibilityObject*, AccessibilitySearchCriteria*, AccessibilityChildrenVector&amp;);
</span><span class="cx">     virtual AccessibilityRole buttonRoleType() const;
</span><span class="cx">     bool isOnscreen() const;
</span><del>-    
</del><ins>+    bool dispatchTouchEvent();
+
</ins><span class="cx"> #if (PLATFORM(GTK) || PLATFORM(EFL)) &amp;&amp; HAVE(ACCESSIBILITY)
</span><span class="cx">     bool allowsTextRanges() const;
</span><span class="cx">     unsigned getLengthForTextRange() const;
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.h (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.h        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Source/WebCore/page/EventHandler.h        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -210,6 +210,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx">     bool dispatchTouchEvent(const PlatformTouchEvent&amp;, const AtomicString&amp;, const EventTargetTouchMap&amp;, float, float);
</span><ins>+    bool dispatchSimulatedTouchEvent(IntPoint location);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(IOS_GESTURE_EVENTS)
</span></span></pre></div>
<a id="trunkSourceWebCorepageiosEventHandlerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ios/EventHandlerIOS.mm (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ios/EventHandlerIOS.mm        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Source/WebCore/page/ios/EventHandlerIOS.mm        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -104,6 +104,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><ins>+
+bool EventHandler::dispatchSimulatedTouchEvent(IntPoint location)
+{
+    bool handled = handleTouchEvent(PlatformEventFactory::createPlatformSimulatedTouchEvent(PlatformEvent::TouchStart, location));
+    if (handled)
+        handleTouchEvent(PlatformEventFactory::createPlatformSimulatedTouchEvent(PlatformEvent::TouchEnd, location));
+    return handled;
+}
+    
</ins><span class="cx"> void EventHandler::touchEvent(WebEvent *event)
</span><span class="cx"> {
</span><span class="cx">     CurrentEventScope scope(event);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosPlatformEventFactoryIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.h (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.h        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.h        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx">     WEBCORE_EXPORT static PlatformKeyboardEvent createPlatformKeyboardEvent(WebEvent *);
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS) || ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx">     static PlatformTouchEvent createPlatformTouchEvent(WebEvent *);
</span><ins>+    static PlatformTouchEvent createPlatformSimulatedTouchEvent(PlatformEvent::Type, IntPoint location);
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosPlatformEventFactoryIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -214,6 +214,21 @@
</span><span class="cx">         return PlatformEvent::TouchCancel;
</span><span class="cx">     }
</span><span class="cx"> }
</span><ins>+    
+static PlatformTouchPoint::TouchPhaseType touchPhaseFromPlatformEventType(PlatformEvent::Type type)
+{
+    switch (type) {
+    case PlatformEvent::TouchStart:
+        return PlatformTouchPoint::TouchPhaseBegan;
+    case PlatformEvent::TouchMove:
+        return PlatformTouchPoint::TouchPhaseMoved;
+    case PlatformEvent::TouchEnd:
+        return PlatformTouchPoint::TouchPhaseEnded;
+    default:
+        ASSERT_NOT_REACHED();
+        return PlatformTouchPoint::TouchPhaseCancelled;
+    }
+}
</ins><span class="cx"> 
</span><span class="cx"> class PlatformTouchPointBuilder : public PlatformTouchPoint {
</span><span class="cx"> public:
</span><span class="lines">@@ -246,12 +261,35 @@
</span><span class="cx">             m_touchPoints.uncheckedAppend(PlatformTouchPointBuilder(identifier, location, touchPhase));
</span><span class="cx">         }
</span><span class="cx">     }
</span><ins>+    
+    PlatformTouchEventBuilder(PlatformEvent::Type type, IntPoint location)
+    {
+        m_type = type;
+        m_timestamp = currentTime();
+        
+        m_gestureScale = 1;
+        m_gestureRotation = 0;
+        m_isGesture = 0;
+        m_position = location;
+        m_globalPosition = location;
+        
+        unsigned touchCount = 1;
+        m_touchPoints.reserveInitialCapacity(touchCount);
+        for (unsigned i = 0; i &lt; touchCount; ++i)
+            m_touchPoints.uncheckedAppend(PlatformTouchPointBuilder(1, location, touchPhaseFromPlatformEventType(type)));
+    }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> PlatformTouchEvent PlatformEventFactory::createPlatformTouchEvent(WebEvent *event)
</span><span class="cx"> {
</span><span class="cx">     return PlatformTouchEventBuilder(event);
</span><span class="cx"> }
</span><ins>+    
+PlatformTouchEvent PlatformEventFactory::createPlatformSimulatedTouchEvent(PlatformEvent::Type type, IntPoint location)
+{
+    return PlatformTouchEventBuilder(type, location);
+}
+
</ins><span class="cx"> #endif // ENABLE(TOUCH_EVENTS)
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Tools/ChangeLog        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-12-05  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        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.
+
+        Implement press for iOS.
+
+        * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+        (AccessibilityUIElement::press):
+
</ins><span class="cx"> 2014-12-05  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Query -[WAKWindow screenScale] instead of using WKGetScreenScaleFactor()
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (176903 => 176904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2014-12-06 05:14:12 UTC (rev 176903)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2014-12-06 05:44:10 UTC (rev 176904)
</span><span class="lines">@@ -77,6 +77,7 @@
</span><span class="cx"> - (CGFloat)_accessibilityMinValue;
</span><span class="cx"> - (CGFloat)_accessibilityMaxValue;
</span><span class="cx"> - (void)_accessibilitySetValue:(NSString *)value;
</span><ins>+- (void)_accessibilityActivate;
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> @interface NSObject (WebAccessibilityObjectWrapperPrivate)
</span><span class="lines">@@ -704,6 +705,7 @@
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityUIElement::press()
</span><span class="cx"> {
</span><ins>+    [m_element _accessibilityActivate];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSStringRef AccessibilityUIElement::accessibilityValue() const
</span></span></pre>
</div>
</div>

</body>
</html>