<!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>[204071] branches/safari-602-branch</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/204071">204071</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2016-08-02 23:16:04 -0700 (Tue, 02 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/203955">r203955</a>. rdar://problem/27629346</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari602branchLayoutTestsChangeLog">branches/safari-602-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari602branchSourceWebCoreChangeLog">branches/safari-602-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari602branchSourceWebCoreaccessibilityAccessibilityObjectcpp">branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#branchessafari602branchSourceWebCoreaccessibilityAccessibilityObjecth">branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#branchessafari602branchSourceWebCoreaccessibilityiosAccessibilityObjectIOSmm">branches/safari-602-branch/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm</a></li>
<li><a href="#branchessafari602branchSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#branchessafari602branchToolsChangeLog">branches/safari-602-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari602branchToolsDumpRenderTreeiosAccessibilityUIElementIOSmm">branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm</a></li>
<li><a href="#branchessafari602branchToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm">branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari602branchLayoutTestsaccessibilityiossimulatorhastoucheventlistenerexpectedtxt">branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-expected.txt</a></li>
<li><a href="#branchessafari602branchLayoutTestsaccessibilityiossimulatorhastoucheventlistenerhtml">branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari602branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/ChangeLog (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/ChangeLog        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/LayoutTests/ChangeLog        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2016-08-02 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><ins>+ Merge r203955. rdar://problem/27629346
+
+ 2016-07-31 Nan Wang <n_wang@apple.com>
+
+ AX: Add a check for touch event listener on iOS accessibility object
+ https://bugs.webkit.org/show_bug.cgi?id=160388
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/ios-simulator/has-touch-event-listener-expected.txt: Added.
+ * accessibility/ios-simulator/has-touch-event-listener.html: Added.
+
+2016-08-02 Babak Shafiei <bshafiei@apple.com>
+
</ins><span class="cx"> Merge r203982. rdar://problem/27547583
</span><span class="cx">
</span><span class="cx"> 2016-08-01 Eric Carlson <eric.carlson@apple.com>
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsaccessibilityiossimulatorhastoucheventlistenerexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-expected.txt (0 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-expected.txt         (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-expected.txt        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+button
+link
+Makes sure that we can check if an AXObject has touch event listener.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS button.boolAttributeValue('AXHasTouchEventListener') is true
+PASS link.boolAttributeValue('AXHasTouchEventListener') is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="branchessafari602branchLayoutTestsaccessibilityiossimulatorhastoucheventlistenerhtml"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener.html (0 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener.html         (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener.html        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script>
+var successfullyParsed = false;
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function click() {}
+
+</script>
+</head>
+<body>
+
+<div role="button" id="button" ontouchstart="chick();"">button</div>
+<div role="link" ontouchend="chick();"><div id="link">link</div></div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("Makes sure that we can check if an AXObject has touch event listener.");
+
+ if (window.accessibilityController) {
+ var button = accessibilityController.accessibleElementById("button");
+ var link = accessibilityController.accessibleElementById("link");
+ shouldBeTrue("button.boolAttributeValue('AXHasTouchEventListener')");
+ shouldBeTrue("link.boolAttributeValue('AXHasTouchEventListener')");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
</ins></span></pre></div>
<a id="branchessafari602branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/ChangeLog        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2016-08-02 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><ins>+ Merge r203955. rdar://problem/27629346
+
+ 2016-07-31 Nan Wang <n_wang@apple.com>
+
+ AX: Add a check for touch event listener on iOS accessibility object
+ https://bugs.webkit.org/show_bug.cgi?id=160388
+
+ Reviewed by Chris Fleizach.
+
+ dispatchTouchEvent() is not working correctly within AXPress() sometimes. Need to
+ investigate it more in the future. Now, adding a check for the touch event listener
+ on the object's node so that iOS can handle dispatching the touch event instead.
+
+ Test: accessibility/ios-simulator/has-touch-event-listener.html
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/ios/AccessibilityObjectIOS.mm:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ (WebCore::AccessibilityObject::hasTouchEventListener):
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (appendStringToResult):
+ (-[WebAccessibilityObjectWrapper _accessibilityHasTouchEventListener]):
+ (-[WebAccessibilityObjectWrapper _accessibilityValueIsAutofilled]):
+
+2016-08-02 Babak Shafiei <bshafiei@apple.com>
+
</ins><span class="cx"> Merge r203984. rdar://problem/27409854
</span><span class="cx">
</span><span class="cx"> 2016-08-01 Eric Carlson <eric.carlson@apple.com>
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.cpp (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -922,6 +922,7 @@
</span><span class="cx">
</span><span class="cx"> UserGestureIndicator gestureIndicator(ProcessingUserGesture, document);
</span><span class="cx">
</span><ins>+ // FIXME: dispatchTouchEvent() is not dispatching the touch event correctly.
</ins><span class="cx"> bool dispatchedTouchEvent = dispatchTouchEvent();
</span><span class="cx"> if (!dispatchedTouchEvent)
</span><span class="cx"> pressElement->accessKeyAction(true);
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.h (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.h        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityObject.h        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -1040,6 +1040,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> int accessibilityPasswordFieldLength();
</span><ins>+ bool hasTouchEventListener() const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // allows for an AccessibilityObject to update its render tree or perform
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCoreaccessibilityiosAccessibilityObjectIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "AccessibilityObject.h"
</span><span class="cx"> #import "AccessibilityRenderObject.h"
</span><ins>+#import "EventNames.h"
</ins><span class="cx"> #import "HTMLInputElement.h"
</span><span class="cx"> #import "RenderObject.h"
</span><span class="cx"> #import "WAKView.h"
</span><span class="lines">@@ -80,7 +81,16 @@
</span><span class="cx"> {
</span><span class="cx"> return DefaultBehavior;
</span><span class="cx"> }
</span><del>-
</del><ins>+
+bool AccessibilityObject::hasTouchEventListener() const
+{
+ for (Node* node = this->node(); node; node = node->parentNode()) {
+ if (node->hasEventListeners(eventNames().touchstartEvent) || node->hasEventListeners(eventNames().touchendEvent))
+ return true;
+ }
+ return false;
+}
+
</ins><span class="cx"> } // WebCore
</span><span class="cx">
</span><span class="cx"> #endif // HAVE(ACCESSIBILITY) && PLATFORM(IOS)
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -949,6 +949,14 @@
</span><span class="cx"> [result appendString:string];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)_accessibilityHasTouchEventListener
+{
+ if (![self _prepareAccessibilityCall])
+ return NO;
+
+ return m_object->hasTouchEventListener();
+}
+
</ins><span class="cx"> - (BOOL)_accessibilityValueIsAutofilled
</span><span class="cx"> {
</span><span class="cx"> if (![self _prepareAccessibilityCall])
</span></span></pre></div>
<a id="branchessafari602branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Tools/ChangeLog (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Tools/ChangeLog        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Tools/ChangeLog        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-08-02 Babak Shafiei <bshafiei@apple.com>
+
+ Merge r203955. rdar://problem/27629346
+
+ 2016-07-31 Nan Wang <n_wang@apple.com>
+
+ AX: Add a check for touch event listener on iOS accessibility object
+ https://bugs.webkit.org/show_bug.cgi?id=160388
+
+ Reviewed by Chris Fleizach.
+
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::boolAttributeValue):
+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+ (WTR::AccessibilityUIElement::boolAttributeValue):
+
</ins><span class="cx"> 2016-07-31 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r203842. rdar://problem/27553464
</span></span></pre></div>
<a id="branchessafari602branchToolsDumpRenderTreeiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -95,6 +95,7 @@
</span><span class="cx"> - (NSUInteger)accessibilityARIAColumnIndex;
</span><span class="cx"> - (UIAccessibilityTraits)_axContainedByFieldsetTrait;
</span><span class="cx"> - (id)_accessibilityFieldsetAncestor;
</span><ins>+- (BOOL)_accessibilityHasTouchEventListener;
</ins><span class="cx">
</span><span class="cx"> // TextMarker related
</span><span class="cx"> - (NSArray *)textMarkerRange;
</span><span class="lines">@@ -667,6 +668,8 @@
</span><span class="cx">
</span><span class="cx"> bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
</span><span class="cx"> {
</span><ins>+ if (JSStringIsEqualToUTF8CString(attribute, "AXHasTouchEventListener"))
+ return [m_element _accessibilityHasTouchEventListener];
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari602branchToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (204070 => 204071)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2016-08-03 06:15:59 UTC (rev 204070)
+++ branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2016-08-03 06:16:04 UTC (rev 204071)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx"> - (NSUInteger)accessibilityARIAColumnIndex;
</span><span class="cx"> - (UIAccessibilityTraits)_axContainedByFieldsetTrait;
</span><span class="cx"> - (id)_accessibilityFieldsetAncestor;
</span><ins>+- (BOOL)_accessibilityHasTouchEventListener;
</ins><span class="cx">
</span><span class="cx"> // TextMarker related
</span><span class="cx"> - (NSArray *)textMarkerRange;
</span><span class="lines">@@ -379,6 +380,8 @@
</span><span class="cx">
</span><span class="cx"> bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
</span><span class="cx"> {
</span><ins>+ if (JSStringIsEqualToUTF8CString(attribute, "AXHasTouchEventListener"))
+ return [m_element _accessibilityHasTouchEventListener];
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>