<!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>[187371] 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/187371">187371</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2015-07-24 16:26:34 -0700 (Fri, 24 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>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.</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="#trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeAccessibilityControllerh">trunk/Tools/DumpRenderTree/AccessibilityController.h</a></li>
<li><a href="#trunkToolsDumpRenderTreeAccessibilityUIElementcpp">trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreeAccessibilityUIElementh">trunk/Tools/DumpRenderTree/AccessibilityUIElement.h</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosAccessibilityControllerIOSmm">trunk/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm">trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacAccessibilityNotificationHandlermm">trunk/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleAccessibilityControllerh">trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh">trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityControllerIOSmm">trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm">trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformiossimulatoraccessibilityscrollinoverflowdivexpectedtxt">trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatoraccessibilityscrollinoverflowdivhtml">trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/LayoutTests/ChangeLog        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-07-24  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: scrollable elements do not allow 3-finger swipe
+        https://bugs.webkit.org/show_bug.cgi?id=141893
+
+        Reviewed by Mario Sanchez Prada.
+
+        * platform/ios-simulator/accessibility/scroll-in-overflow-div-expected.txt: Added.
+        * platform/ios-simulator/accessibility/scroll-in-overflow-div.html: Added.
+
</ins><span class="cx"> 2015-07-24  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Object.getOwnPropertySymbols on large list takes very long
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoraccessibilityscrollinoverflowdivexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div-expected.txt (0 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div-expected.txt        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+This makes sure that we can perform accessibility scroll actions inside overflow divs
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+AXScrollByPage received: data: AXScroll [position: 0.00 224.00]
+scroll down 0 : success true
+AXScrollByPage received: data: AXScroll [position: 0.00 448.00]
+scroll down 1 : success true
+AXScrollByPage received: data: AXScroll [position: 0.00 672.00]
+scroll down 2 : success true
+AXScrollByPage received: data: AXScroll [position: 0.00 712.00]
+scroll down 3 : success true
+scroll down 4 : success false
+AXScrollByPage received: data: AXScroll [position: 0.00 488.00]
+scroll up 0 : success true
+AXScrollByPage received: data: AXScroll [position: 0.00 264.00]
+scroll up 1 : success true
+AXScrollByPage received: data: AXScroll [position: 0.00 40.00]
+scroll up 2 : success true
+AXScrollByPage received: data: AXScroll [position: 0.00 0.00]
+scroll up 3 : success true
+scroll up 4 : success false
+AXScrollByPage received: data: AXScroll [position: 424.00 0.00]
+scroll left 0 : success true
+AXScrollByPage received: data: AXScroll [position: 848.00 0.00]
+scroll left 1 : success true
+AXScrollByPage received: data: AXScroll [position: 1272.00 0.00]
+scroll left 2 : success true
+AXScrollByPage received: data: AXScroll [position: 1696.00 0.00]
+scroll left 3 : success true
+AXScrollByPage received: data: AXScroll [position: 2120.00 0.00]
+scroll left 4 : success true
+AXScrollByPage received: data: AXScroll [position: 1696.00 0.00]
+scroll right 0 : success true
+AXScrollByPage received: data: AXScroll [position: 1272.00 0.00]
+scroll right 1 : success true
+AXScrollByPage received: data: AXScroll [position: 848.00 0.00]
+scroll right 2 : success true
+AXScrollByPage received: data: AXScroll [position: 424.00 0.00]
+scroll right 3 : success true
+AXScrollByPage received: data: AXScroll [position: 0.00 0.00]
+scroll right 4 : success true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoraccessibilityscrollinoverflowdivhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div.html (0 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div.html                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/accessibility/scroll-in-overflow-div.html        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -0,0 +1,125 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+        body {
+            height: 2000px;
+        }
+        .container {
+            position: absolute;
+            top: 200px;
+            width: 500px;
+            height: 300px;
+            border: 2px solid black;
+            padding: 10px;
+        }
+        
+        .overflow {
+
+            white-space: nowrap;
+            width: 400px;
+            height: 200px;
+            padding: 10px;
+            border: 2px solid blue;
+            overflow: scroll;
+            -webkit-overflow-scrolling: touch;
+        }
+&lt;/style&gt;
+
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var successfullyParsed = false;
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+   &lt;div id=&quot;container&quot; class=&quot;container&quot; role=&quot;group&quot;&gt;
+        &lt;div class=&quot;overflow&quot;&gt;
+            &lt;p id=&quot;text1&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p id=&quot;text2&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+            &lt;/p&gt;&lt;p id=&quot;text3&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+        &lt;/p&gt;&lt;/div&gt;
+    &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;This makes sure that we can perform accessibility scroll actions inside overflow divs&quot;);
+
+    var count = 0;
+    window.jsTestIsAsync = true;
+    function focusCallback(element, notification, info) {
+
+        if (notification == &quot;AXScrollByPage&quot;) {
+            debug(notification + &quot; received: data: &quot; + info.status);
+        }
+
+        // We should have 18 successful scrolls (2 will fail because we'll be at the border).
+        count++;
+        if (count == 18) {
+            finish();
+        }
+    }
+
+    if (window.accessibilityController) {
+
+        var content = accessibilityController.accessibleElementById(&quot;text1&quot;);
+        accessibilityController.addNotificationListener(focusCallback);
+
+        for (var k = 0; k &lt; 5; k++) {
+           var success = content.scrollPageDown();
+           debug(&quot;scroll down &quot; + k + &quot; : success &quot; + success);
+        }
+
+        for (var k = 0; k &lt; 5; k++) {
+           var success = content.scrollPageUp();
+           debug(&quot;scroll up &quot; + k + &quot; : success &quot; + success);
+        }
+
+        for (var k = 0; k &lt; 5; k++) {
+           var success = content.scrollPageLeft();
+           debug(&quot;scroll left &quot; + k + &quot; : success &quot; + success);
+        }
+
+        for (var k = 0; k &lt; 5; k++) {
+           var success = content.scrollPageRight();
+           debug(&quot;scroll right &quot; + k + &quot; : success &quot; + success);
+        }
+    }
+
+    function finish() {
+        document.getElementById(&quot;container&quot;).style.visibility = &quot;hidden&quot;;
+        finishJSTest();
+    }
+
+    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 (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Source/WebCore/ChangeLog        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-07-24  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: scrollable elements do not allow 3-finger swipe
+        https://bugs.webkit.org/show_bug.cgi?id=141893
+
+        Reviewed by Mario Sanchez Prada.
+
+        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]):
+
</ins><span class="cx"> 2015-07-24  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Connect UserScript and UserStyleSheet through WebView.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -2529,7 +2529,103 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><ins>+    
+void AccessibilityObject::scrollAreaAndAncestor(std::pair&lt;ScrollableArea*, AccessibilityObject*&gt;&amp; scrollers) const
+{
+    // Search up the parent chain until we find the first one that's scrollable.
+    scrollers.first = nullptr;
+    for (scrollers.second = parentObject(); scrollers.second; scrollers.second = scrollers.second-&gt;parentObject()) {
+        if ((scrollers.first = scrollers.second-&gt;getScrollableAreaIfScrollable()))
+            break;
+    }
+}
+    
+ScrollableArea* AccessibilityObject::scrollableAreaAncestor() const
+{
+    std::pair&lt;ScrollableArea*, AccessibilityObject*&gt; scrollers;
+    scrollAreaAndAncestor(scrollers);
+    return scrollers.first;
+}
+    
+IntPoint AccessibilityObject::scrollPosition() const
+{
+    if (auto scroller = scrollableAreaAncestor())
+        return scroller-&gt;scrollPosition();
</ins><span class="cx"> 
</span><ins>+    return IntPoint();
+}
+
+IntRect AccessibilityObject::scrollVisibleContentRect() const
+{
+    if (auto scroller = scrollableAreaAncestor())
+        return scroller-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
+    
+    return IntRect();
+}
+    
+IntSize AccessibilityObject::scrollContentsSize() const
+{
+    if (auto scroller = scrollableAreaAncestor())
+        return scroller-&gt;contentsSize();
+
+    return IntSize();
+}
+    
+bool AccessibilityObject::scrollByPage(ScrollByPageDirection direction) const
+{
+    std::pair&lt;ScrollableArea*, AccessibilityObject*&gt; scrollers;
+    scrollAreaAndAncestor(scrollers);
+    ScrollableArea* scrollableArea = scrollers.first;
+    AccessibilityObject* scrollParent = scrollers.second;
+    
+    if (!scrollableArea)
+        return false;
+    
+    IntPoint scrollPosition = scrollableArea-&gt;scrollPosition();
+    IntPoint newScrollPosition = scrollPosition;
+    IntSize scrollSize = scrollableArea-&gt;contentsSize();
+    IntRect scrollVisibleRect = scrollableArea-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
+    switch (direction) {
+    case Right: {
+        int scrollAmount = scrollVisibleRect.size().width();
+        int newX = scrollPosition.x() - scrollAmount;
+        newScrollPosition.setX(std::max(newX, 0));
+        break;
+    }
+    case Left: {
+        int scrollAmount = scrollVisibleRect.size().width();
+        int newX = scrollAmount + scrollPosition.x();
+        int maxX = scrollSize.width() - scrollAmount;
+        newScrollPosition.setX(std::min(newX, maxX));
+        break;
+    }
+    case Up: {
+        int scrollAmount = scrollVisibleRect.size().height();
+        int newY = scrollPosition.y() - scrollAmount;
+        newScrollPosition.setY(std::max(newY, 0));
+        break;
+    }
+    case Down: {
+        int scrollAmount = scrollVisibleRect.size().height();
+        int newY = scrollAmount + scrollPosition.y();
+        int maxY = scrollSize.height() - scrollAmount;
+        newScrollPosition.setY(std::min(newY, maxY));
+        break;
+    }
+    default:
+        break;
+    }
+    
+    if (newScrollPosition != scrollPosition) {
+        scrollParent-&gt;scrollTo(newScrollPosition);
+        document()-&gt;updateLayoutIgnorePendingStylesheets();
+        return true;
+    }
+    
+    return false;
+}
+
+
</ins><span class="cx"> bool AccessibilityObject::lastKnownIsIgnoredValue()
</span><span class="cx"> {
</span><span class="cx">     if (m_lastKnownIsIgnoredValue == DefaultBehavior)
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -895,7 +895,13 @@
</span><span class="cx">     virtual void scrollToMakeVisibleWithSubFocus(const IntRect&amp;) const;
</span><span class="cx">     // Scroll this object to a given point in global coordinates of the top-level window.
</span><span class="cx">     virtual void scrollToGlobalPoint(const IntPoint&amp;) const;
</span><del>-
</del><ins>+    
+    enum ScrollByPageDirection { Up, Down, Left, Right };
+    bool scrollByPage(ScrollByPageDirection) const;
+    IntPoint scrollPosition() const;
+    IntSize scrollContentsSize() const;    
+    IntRect scrollVisibleContentRect() const;
+    
</ins><span class="cx">     bool lastKnownIsIgnoredValue();
</span><span class="cx">     void setLastKnownIsIgnoredValue(bool);
</span><span class="cx"> 
</span><span class="lines">@@ -1016,7 +1022,9 @@
</span><span class="cx">     // If this object itself scrolls, return its ScrollableArea.
</span><span class="cx">     virtual ScrollableArea* getScrollableAreaIfScrollable() const { return nullptr; }
</span><span class="cx">     virtual void scrollTo(const IntPoint&amp;) const { }
</span><del>-
</del><ins>+    ScrollableArea* scrollableAreaAncestor() const;
+    void scrollAreaAndAncestor(std::pair&lt;ScrollableArea*, AccessibilityObject*&gt;&amp;) const;
+    
</ins><span class="cx">     static bool isAccessibilityObjectSearchMatchAtIndex(AccessibilityObject*, AccessibilitySearchCriteria*, size_t);
</span><span class="cx">     static bool isAccessibilityObjectSearchMatch(AccessibilityObject*, AccessibilitySearchCriteria*);
</span><span class="cx">     static bool isAccessibilityTextSearchMatch(AccessibilityObject*, AccessibilitySearchCriteria*);
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -1149,54 +1149,36 @@
</span><span class="cx">     if (![self _prepareAccessibilityCall])
</span><span class="cx">         return NO;
</span><span class="cx">     
</span><del>-    ScrollView* scrollView = m_object-&gt;scrollViewAncestor();
-    if (!scrollView)
-        return NO;
-    
-    IntPoint scrollPosition = scrollView-&gt;scrollPosition();
-    IntPoint newScrollPosition = scrollPosition;
-    IntSize scrollSize = scrollView-&gt;contentsSize();
-    IntRect scrollVisibleRect = scrollView-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</del><ins>+    AccessibilityObject::ScrollByPageDirection scrollDirection;
</ins><span class="cx">     switch (direction) {
</span><del>-    case UIAccessibilityScrollDirectionRight: {
-        int scrollAmount = scrollVisibleRect.size().width();
-        int newX = scrollPosition.x() - scrollAmount;
-        newScrollPosition.setX(std::max(newX, 0));
</del><ins>+    case UIAccessibilityScrollDirectionRight:
+        scrollDirection = AccessibilityObject::ScrollByPageDirection::Right;
</ins><span class="cx">         break;
</span><del>-    }
-    case UIAccessibilityScrollDirectionLeft: {
-        int scrollAmount = scrollVisibleRect.size().width();
-        int newX = scrollAmount + scrollPosition.x();
-        int maxX = scrollSize.width() - scrollAmount;
-        newScrollPosition.setX(std::min(newX, maxX));
</del><ins>+    case UIAccessibilityScrollDirectionLeft:
+        scrollDirection = AccessibilityObject::ScrollByPageDirection::Left;
</ins><span class="cx">         break;
</span><del>-    }
-    case UIAccessibilityScrollDirectionUp: {
-        int scrollAmount = scrollVisibleRect.size().height();
-        int newY = scrollPosition.y() - scrollAmount;
-        newScrollPosition.setY(std::max(newY, 0));
</del><ins>+    case UIAccessibilityScrollDirectionUp:
+        scrollDirection = AccessibilityObject::ScrollByPageDirection::Up;
</ins><span class="cx">         break;
</span><del>-    }
-    case UIAccessibilityScrollDirectionDown: {
-        int scrollAmount = scrollVisibleRect.size().height();
-        int newY = scrollAmount + scrollPosition.y();
-        int maxY = scrollSize.height() - scrollAmount;
-        newScrollPosition.setY(std::min(newY, maxY));
</del><ins>+    case UIAccessibilityScrollDirectionDown:
+        scrollDirection = AccessibilityObject::ScrollByPageDirection::Down;
</ins><span class="cx">         break;
</span><del>-    }
</del><span class="cx">     default:
</span><del>-        break;
</del><ins>+        return NO;
</ins><span class="cx">     }
</span><ins>+
+    BOOL result = m_object-&gt;scrollByPage(scrollDirection);
</ins><span class="cx">     
</span><del>-    if (newScrollPosition != scrollPosition) {
-        scrollView-&gt;setScrollPosition(newScrollPosition);
-        m_object-&gt;document()-&gt;updateLayoutIgnorePendingStylesheets();
</del><ins>+    if (result) {
+        [self postScrollStatusChangeNotification];
+
+        CGPoint scrollPos = [self _accessibilityScrollPosition];
+        NSString *testString = [NSString stringWithFormat:@&quot;AXScroll [position: %.2f %.2f]&quot;, scrollPos.x, scrollPos.y];
+        [self accessibilityPostedNotification:@&quot;AXScrollByPage&quot; userInfo:@{ @&quot;status&quot; : testString }];
</ins><span class="cx">     }
</span><span class="cx">     
</span><del>-    [self postScrollStatusChangeNotification];
-    
</del><span class="cx">     // This means that this object handled the scroll and no other ancestor should attempt scrolling.
</span><del>-    return YES;
</del><ins>+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (CGPoint)convertPointToScreenSpace:(FloatPoint &amp;)point
</span><span class="lines">@@ -1625,10 +1607,7 @@
</span><span class="cx">     if (![self _prepareAccessibilityCall])
</span><span class="cx">         return CGPointZero;
</span><span class="cx">     
</span><del>-    ScrollView* scrollView = m_object-&gt;scrollViewAncestor();
-    if (!scrollView)
-        return CGPointZero;
-    return scrollView-&gt;scrollPosition();
</del><ins>+    return m_object-&gt;scrollPosition();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (CGSize)_accessibilityScrollSize
</span><span class="lines">@@ -1636,10 +1615,7 @@
</span><span class="cx">     if (![self _prepareAccessibilityCall])
</span><span class="cx">         return CGSizeZero;
</span><span class="cx">     
</span><del>-    ScrollView* scrollView = m_object-&gt;scrollViewAncestor();
-    if (!scrollView)
-        return CGSizeZero;
-    return scrollView-&gt;contentsSize();
</del><ins>+    return m_object-&gt;scrollContentsSize();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (CGRect)_accessibilityScrollVisibleRect
</span><span class="lines">@@ -1647,10 +1623,7 @@
</span><span class="cx">     if (![self _prepareAccessibilityCall])
</span><span class="cx">         return CGRectZero;
</span><span class="cx">     
</span><del>-    ScrollView* scrollView = m_object-&gt;scrollViewAncestor();
-    if (!scrollView)
-        return CGRectZero;
-    return scrollView-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</del><ins>+    return m_object-&gt;scrollVisibleContentRect();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)accessibilityElementDidBecomeFocused
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/ChangeLog        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2015-07-24  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: scrollable elements do not allow 3-finger swipe
+        https://bugs.webkit.org/show_bug.cgi?id=141893
+
+        Reviewed by Mario Sanchez Prada.
+
+        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):
+
</ins><span class="cx"> 2015-07-24  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Activate CSP_NEXT and Connect UserScript and UserStyleSheet through WebView.
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityController.h (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityController.h        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/DumpRenderTree/AccessibilityController.h        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     HashMap&lt;PlatformUIElement, JSObjectRef&gt; m_notificationListeners;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) || PLATFORM(IOS)
</ins><span class="cx">     RetainPtr&lt;NotificationHandler&gt; m_globalNotificationHandler;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -332,6 +332,26 @@
</span><span class="cx">     return JSValueMakeUndefined(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSValueRef scrollPageUpCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    return JSValueMakeBoolean(context, toAXElement(thisObject)-&gt;scrollPageUp());
+}
+
+static JSValueRef scrollPageDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    return JSValueMakeBoolean(context, toAXElement(thisObject)-&gt;scrollPageDown());
+}
+
+static JSValueRef scrollPageLeftCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    return JSValueMakeBoolean(context, toAXElement(thisObject)-&gt;scrollPageLeft());
+}
+
+static JSValueRef scrollPageRightCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    return JSValueMakeBoolean(context, toAXElement(thisObject)-&gt;scrollPageRight());
+}
+
</ins><span class="cx"> static JSValueRef decreaseTextSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
</span><span class="cx"> {
</span><span class="cx">     toAXElement(thisObject)-&gt;decreaseTextSelection();
</span><span class="lines">@@ -1327,6 +1347,8 @@
</span><span class="cx">     return JSValueMakeNumber(context, toAXElement(thisObject)-&gt;elementTextLength());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</span><span class="lines">@@ -1691,6 +1713,10 @@
</span><span class="cx">         { &quot;elementsForRange&quot;, elementsForRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;increaseTextSelection&quot;, increaseTextSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;decreaseTextSelection&quot;, decreaseTextSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+        { &quot;scrollPageUp&quot;, scrollPageUpCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { &quot;scrollPageDown&quot;, scrollPageDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { &quot;scrollPageLeft&quot;, scrollPageLeftCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { &quot;scrollPageRight&quot;, scrollPageRightCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx">         { &quot;assistiveTechnologySimulatedFocus&quot;, assistiveTechnologySimulatedFocusCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> #endif
</span><span class="cx">         { 0, 0, 0 }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -221,6 +221,11 @@
</span><span class="cx">     void increaseTextSelection();
</span><span class="cx">     void decreaseTextSelection();
</span><span class="cx">     AccessibilityUIElement linkedElement();
</span><ins>+    
+    bool scrollPageUp();
+    bool scrollPageDown();
+    bool scrollPageLeft();
+    bool scrollPageRight();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(EFL)
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosAccessibilityControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #import &quot;AccessibilityController.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #import &quot;AccessibilityCommonMac.h&quot;
</span><ins>+#import &quot;AccessibilityNotificationHandler.h&quot;
</ins><span class="cx"> #import &quot;AccessibilityUIElement.h&quot;
</span><span class="cx"> #import &lt;Foundation/Foundation.h&gt;
</span><span class="cx"> #import &lt;WebKit/WebFramePrivate.h&gt;
</span><span class="lines">@@ -43,6 +44,8 @@
</span><span class="cx"> 
</span><span class="cx"> AccessibilityController::~AccessibilityController()
</span><span class="cx"> {
</span><ins>+    // ResetToConsistentState should have cleared this already.
+    ASSERT(!m_globalNotificationHandler);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
</span><span class="lines">@@ -116,11 +119,23 @@
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityController::addNotificationListener(JSObjectRef functionCallback)
</span><span class="cx"> {
</span><del>-    return false;
</del><ins>+    if (!functionCallback)
+        return false;
+    
+    // Mac programmers should not be adding more than one global notification listener.
+    // Other platforms may be different.
+    if (m_globalNotificationHandler)
+        return false;
+    m_globalNotificationHandler = [[AccessibilityNotificationHandler alloc] init];
+    [m_globalNotificationHandler.get() setCallback:functionCallback];
+    [m_globalNotificationHandler.get() startObserving];
+    
+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityController::platformResetToConsistentState()
</span><span class="cx"> {
</span><ins>+    m_globalNotificationHandler.clear();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityController::removeNotificationListener()
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -45,12 +45,15 @@
</span><span class="cx"> 
</span><span class="cx"> AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
</span><span class="cx">     : m_element(element)
</span><ins>+    , m_notificationHandler(0)
</ins><span class="cx"> {
</span><span class="cx">     [m_element retain];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement&amp; other)
</span><span class="cx">     : m_element(other.m_element)
</span><ins>+    , m_notificationHandler(0)
+
</ins><span class="cx"> {
</span><span class="cx">     [m_element retain];
</span><span class="cx"> }
</span><span class="lines">@@ -454,6 +457,25 @@
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool AccessibilityUIElement::scrollPageUp()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionUp];
+}
+
+bool AccessibilityUIElement::scrollPageDown()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionDown];
+}
+bool AccessibilityUIElement::scrollPageLeft()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionLeft];
+}
+
+bool AccessibilityUIElement::scrollPageRight()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionRight];
+}
+
</ins><span class="cx"> JSStringRef AccessibilityUIElement::roleDescription()
</span><span class="cx"> {
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacAccessibilityNotificationHandlermm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -166,7 +166,6 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     NSDictionary *userInfo = [[notification userInfo] objectForKey:@&quot;userInfo&quot;];
</span><del>-
</del><span class="cx">     JSValueRef notificationNameArgument = JSValueMakeString([mainFrame globalContext], adopt([notificationName createJSStringRef]).get());
</span><span class="cx">     JSValueRef userInfoArgument = makeObjectRefForDictionary([mainFrame globalContext], userInfo);
</span><span class="cx">     if (m_platformElement) {
</span><span class="lines">@@ -181,7 +180,7 @@
</span><span class="cx">         arguments[0] = AccessibilityUIElement::makeJSAccessibilityUIElement([mainFrame globalContext], AccessibilityUIElement([notification object]));
</span><span class="cx">         arguments[1] = notificationNameArgument;
</span><span class="cx">         arguments[2] = userInfoArgument;
</span><del>-        JSObjectCallAsFunction([mainFrame globalContext], m_notificationFunctionCallback, 0, 2, arguments, 0);
</del><ins>+        JSObjectCallAsFunction([mainFrame globalContext], m_notificationFunctionCallback, 0, 3, arguments, 0);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> private:
</span><span class="cx">     AccessibilityController();
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) || PLATFORM(IOS)
</ins><span class="cx">     RetainPtr&lt;NotificationHandler&gt; m_globalNotificationHandler;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -66,6 +66,10 @@
</span><span class="cx"> PassRefPtr&lt;AccessibilityUIElement&gt; AccessibilityUIElement::linkedElement() { return nullptr; }
</span><span class="cx"> PassRefPtr&lt;AccessibilityUIElement&gt; AccessibilityUIElement::headerElementAtIndex(unsigned) { return nullptr; }
</span><span class="cx"> void AccessibilityUIElement::assistiveTechnologySimulatedFocus() { return; }
</span><ins>+bool AccessibilityUIElement::scrollPageUp() { return false; }
+bool AccessibilityUIElement::scrollPageDown() { return false; }
+bool AccessibilityUIElement::scrollPageLeft() { return false; }
+bool AccessibilityUIElement::scrollPageRight() { return false; }
</ins><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx"> // Unsupported methods on various platforms. As they're implemented on other platforms this list should be modified.
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -275,6 +275,11 @@
</span><span class="cx">     PassRefPtr&lt;AccessibilityUIElement&gt; headerElementAtIndex(unsigned index);
</span><span class="cx">     void assistiveTechnologySimulatedFocus();
</span><span class="cx">     
</span><ins>+    bool scrollPageUp();
+    bool scrollPageDown();
+    bool scrollPageLeft();
+    bool scrollPageRight();
+    
</ins><span class="cx"> private:
</span><span class="cx">     AccessibilityUIElement(PlatformUIElement);
</span><span class="cx">     AccessibilityUIElement(const AccessibilityUIElement&amp;);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -170,6 +170,10 @@
</span><span class="cx"> 
</span><span class="cx">     void scrollToMakeVisible();
</span><span class="cx">     void takeFocus();
</span><ins>+    boolean scrollPageDown();
+    boolean scrollPageUp();
+    boolean scrollPageLeft();
+    boolean scrollPageRight();
</ins><span class="cx"> 
</span><span class="cx">     // Text markers.
</span><span class="cx">     AccessibilityTextMarkerRange lineTextMarkerRangeForTextMarker(AccessibilityTextMarker textMarker);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -41,7 +41,18 @@
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityController::addNotificationListener(JSValueRef functionCallback)
</span><span class="cx"> {
</span><del>-    return false;
</del><ins>+    if (!functionCallback)
+        return false;
+    
+    // Mac programmers should not be adding more than one global notification listener.
+    // Other platforms may be different.
+    if (m_globalNotificationHandler)
+        return false;
+    m_globalNotificationHandler = [[AccessibilityNotificationHandler alloc] init];
+    [m_globalNotificationHandler.get() setCallback:functionCallback];
+    [m_globalNotificationHandler.get() startObserving];
+    
+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityController::removeNotificationListener()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (187370 => 187371)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2015-07-24 23:24:38 UTC (rev 187370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2015-07-24 23:26:34 UTC (rev 187371)
</span><span class="lines">@@ -109,6 +109,7 @@
</span><span class="cx">     
</span><span class="cx"> AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
</span><span class="cx">     : m_element(element)
</span><ins>+    , m_notificationHandler(0)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: ap@webkit.org says ObjC objects need to be CFRetained/CFRelease to be GC-compliant on the mac.
</span><span class="cx">     [m_element retain];
</span><span class="lines">@@ -117,6 +118,7 @@
</span><span class="cx"> AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement&amp; other)
</span><span class="cx">     : JSWrappable()
</span><span class="cx">     , m_element(other.m_element)
</span><ins>+    , m_notificationHandler(0)
</ins><span class="cx"> {
</span><span class="cx">     [m_element retain];
</span><span class="cx"> }
</span><span class="lines">@@ -755,7 +757,26 @@
</span><span class="cx"> {
</span><span class="cx">     [m_element accessibilityElementDidBecomeFocused];
</span><span class="cx"> }
</span><ins>+    
+bool AccessibilityUIElement::scrollPageUp()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionUp];
+}
</ins><span class="cx"> 
</span><ins>+bool AccessibilityUIElement::scrollPageDown()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionDown];
+}
+bool AccessibilityUIElement::scrollPageLeft()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionLeft];
+}
+
+bool AccessibilityUIElement::scrollPageRight()
+{
+    return [m_element accessibilityScroll:UIAccessibilityScrollDirectionRight];
+}
+
</ins><span class="cx"> void AccessibilityUIElement::increaseTextSelection()
</span><span class="cx"> {
</span><span class="cx">     [m_element accessibilityModifySelection:WebCore::CharacterGranularity increase:YES];
</span></span></pre>
</div>
</div>

</body>
</html>