<!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>[183783] 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/183783">183783</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-05-04 17:16:01 -0700 (Mon, 04 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
https://bugs.webkit.org/show_bug.cgi?id=144489

Patch by Doug Russell &lt;d_russell@apple.com&gt; on 2015-05-04
Reviewed by Chris Fleizach.

Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
on the returned control.
Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
Add support for setSelectedVisibleTextRange() in accessibility tests.

Source/WebCore:

Test: platform/mac/accessibility/selection-sync.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::showIntent):
(WebCore::AXObjectCache::setTextSelectionIntent):
(WebCore::AXObjectCache::setIsSynchronizingSelection):
(WebCore::AXObjectCache::postTextStateChangeNotification):
* accessibility/AXObjectCache.h:
* accessibility/AXTextStateChangeIntent.h:
(WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::setTextSelectionIntent):
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::setFocused):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
(WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): Deleted.
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(setSelectedVisibleTextRangeCallback):
(AccessibilityUIElement::setSelectedVisibleTextRange):
(AccessibilityUIElement::getJSClass):
(AccessibilityUIElement::textMarkerForIndex): Deleted.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setSelectedVisibleTextRange):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange):
(WTR::AccessibilityUIElement::setSelectedTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange):

LayoutTests:

* platform/mac/accessibility/selection-sync-expected.txt: Added.
* platform/mac/accessibility/selection-sync.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="#trunkSourceWebCoreaccessibilityAXObjectCachecpp">trunk/Source/WebCore/accessibility/AXObjectCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAXObjectCacheh">trunk/Source/WebCore/accessibility/AXObjectCache.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAXTextStateChangeIntenth">trunk/Source/WebCore/accessibility/AXTextStateChangeIntent.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacAXObjectCacheMacmm">trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</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="#trunkToolsDumpRenderTreemacAccessibilityUIElementMacmm">trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm</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="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm">trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm">trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityselectionsyncexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/selection-sync-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityselectionsynchtml">trunk/LayoutTests/platform/mac/accessibility/selection-sync.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/LayoutTests/ChangeLog        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-05-04  Doug Russell  &lt;d_russell@apple.com&gt;
+
+        AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
+        https://bugs.webkit.org/show_bug.cgi?id=144489
+
+        Reviewed by Chris Fleizach.
+
+        Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
+        on the returned control.
+        Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
+        Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
+        Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
+        Add support for setSelectedVisibleTextRange() in accessibility tests.
+
+        * platform/mac/accessibility/selection-sync-expected.txt: Added.
+        * platform/mac/accessibility/selection-sync.html: Added.
+
</ins><span class="cx"> 2015-05-04  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Crash at com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::createWindow + 185
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityselectionsyncexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/selection-sync-expected.txt (0 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/selection-sync-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/selection-sync-expected.txt        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+one two three. four five six.
+
+This tests that selection changes originating from accessibility API include AXTextStateSync=true.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS addedNotification is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS results[resultIndex][&quot;AXTextStateChangeType&quot;] is AXTextStateChangeTypeSelectionMove
+PASS results[resultIndex][&quot;AXTextSelectionDirection&quot;] is AXTextSelectionDirectionDiscontiguous
+PASS results[resultIndex][&quot;AXTextStateSync&quot;] is true
+PASS results[resultIndex][&quot;AXTextStateChangeType&quot;] is AXTextStateChangeTypeSelectionMove
+PASS results[resultIndex][&quot;AXTextSelectionDirection&quot;] is AXTextSelectionDirectionDiscontiguous
+PASS results[resultIndex][&quot;AXTextStateSync&quot;] is true
+PASS results[resultIndex][&quot;AXTextStateChangeType&quot;] is AXTextStateChangeTypeSelectionExtend
+PASS results[resultIndex][&quot;AXTextSelectionDirection&quot;] is AXTextSelectionDirectionDiscontiguous
+PASS results[resultIndex][&quot;AXTextStateSync&quot;] is true
+PASS results[resultIndex][&quot;AXTextStateChangeType&quot;] is AXTextStateChangeTypeSelectionMove
+PASS results[resultIndex][&quot;AXTextSelectionDirection&quot;] is AXTextSelectionDirectionDiscontiguous
+PASS results[resultIndex][&quot;AXTextStateSync&quot;] is true
+PASS results[resultIndex][&quot;AXTextStateChangeType&quot;] is AXTextStateChangeTypeSelectionExtend
+PASS results[resultIndex][&quot;AXTextSelectionDirection&quot;] is AXTextSelectionDirectionDiscontiguous
+PASS results[resultIndex][&quot;AXTextStateSync&quot;] is true
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityselectionsynchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/selection-sync.html (0 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/selection-sync.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/selection-sync.html        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -0,0 +1,92 @@
</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;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+&lt;div role=&quot;textbox&quot; tabindex=0 id=&quot;textbox&quot; contenteditable=true&gt;
+&lt;p&gt;one two three. four five six.&lt;/p&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;div id=&quot;notifications&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;This tests that selection changes originating from accessibility API include AXTextStateSync=true.&quot;);
+
+    var AXTextStateChangeTypeSelectionMove = 2;
+    var AXTextStateChangeTypeSelectionExtend = AXTextStateChangeTypeSelectionMove + 1;
+
+    var AXTextSelectionDirectionDiscontiguous = 5;
+
+    var webArea = 0;
+    var count = 0;
+    var results = [];
+    var resultIndex = 0;
+    function notificationCallback(notification, userInfo) {
+        if (notification == &quot;AXSelectedTextChanged&quot;) {
+            count++;
+            if (userInfo)
+                results.push(userInfo);
+            if (count == 5) {
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateChangeType\&quot;]&quot;, &quot;AXTextStateChangeTypeSelectionMove&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextSelectionDirection\&quot;]&quot;, &quot;AXTextSelectionDirectionDiscontiguous&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateSync\&quot;]&quot;, &quot;true&quot;);
+
+                resultIndex++;
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateChangeType\&quot;]&quot;, &quot;AXTextStateChangeTypeSelectionMove&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextSelectionDirection\&quot;]&quot;, &quot;AXTextSelectionDirectionDiscontiguous&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateSync\&quot;]&quot;, &quot;true&quot;);
+
+                resultIndex++;
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateChangeType\&quot;]&quot;, &quot;AXTextStateChangeTypeSelectionExtend&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextSelectionDirection\&quot;]&quot;, &quot;AXTextSelectionDirectionDiscontiguous&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateSync\&quot;]&quot;, &quot;true&quot;);
+
+                resultIndex++;
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateChangeType\&quot;]&quot;, &quot;AXTextStateChangeTypeSelectionMove&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextSelectionDirection\&quot;]&quot;, &quot;AXTextSelectionDirectionDiscontiguous&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateSync\&quot;]&quot;, &quot;true&quot;);
+
+                resultIndex++;
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateChangeType\&quot;]&quot;, &quot;AXTextStateChangeTypeSelectionExtend&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextSelectionDirection\&quot;]&quot;, &quot;AXTextSelectionDirectionDiscontiguous&quot;);
+                shouldBe(&quot;results[resultIndex][\&quot;AXTextStateSync\&quot;]&quot;, &quot;true&quot;);
+
+                webArea.removeNotificationListener();
+                window.testRunner.notifyDone();
+            }
+        }
+    }
+
+    if (window.accessibilityController) {
+        window.testRunner.waitUntilDone();
+
+        accessibilityController.enableEnhancedAccessibility(true);
+
+        webArea = accessibilityController.rootElement.childAtIndex(0);
+        var addedNotification = webArea.addNotificationListener(notificationCallback);
+        shouldBe(&quot;addedNotification&quot;, &quot;true&quot;);
+
+        textbox = document.getElementById(&quot;textbox&quot;);
+        var axTextbox = accessibilityController.accessibleElementById(&quot;textbox&quot;);
+        axTextbox.takeFocus();
+        axTextbox.setSelectedTextRange(4,0);
+        axTextbox.setSelectedTextRange(0,3);
+
+        var markerThree = axTextbox.textMarkerForIndex(3);
+        var markerFour = axTextbox.textMarkerForIndex(4);
+        var moveRange = axTextbox.textMarkerRangeForMarkers(markerThree, markerThree);
+        var extendRange = axTextbox.textMarkerRangeForMarkers(markerThree, markerFour);
+        webArea.setSelectedVisibleTextRange(moveRange);
+        webArea.setSelectedVisibleTextRange(extendRange);
+    }
+
+&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 (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Source/WebCore/ChangeLog        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-05-04  Doug Russell  &lt;d_russell@apple.com&gt;
+
+        AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
+        https://bugs.webkit.org/show_bug.cgi?id=144489
+
+        Reviewed by Chris Fleizach.
+
+        Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
+        on the returned control.
+        Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
+        Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
+        Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
+        Add support for setSelectedVisibleTextRange() in accessibility tests.
+
+        Test: platform/mac/accessibility/selection-sync.html
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::showIntent):
+        (WebCore::AXObjectCache::setTextSelectionIntent):
+        (WebCore::AXObjectCache::setIsSynchronizingSelection):
+        (WebCore::AXObjectCache::postTextStateChangeNotification):
+        * accessibility/AXObjectCache.h:
+        * accessibility/AXTextStateChangeIntent.h:
+        (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::setTextSelectionIntent):
+        (WebCore::AccessibilityRenderObject::setSelectedTextRange):
+        (WebCore::AccessibilityRenderObject::setFocused):
+        (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
+        (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): Deleted.
+        * accessibility/mac/AXObjectCacheMac.mm:
+        (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
+
</ins><span class="cx"> 2015-05-04  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] Audio-only files should not have a device picker
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -984,16 +984,19 @@
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    if (intent.isSynchronizing)
-        dataLog(&quot;-Sync&quot;);
</del><span class="cx">     dataLog(&quot;\n&quot;);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void AXObjectCache::setTextSelectionIntent(AXTextStateChangeIntent intent)
</del><ins>+void AXObjectCache::setTextSelectionIntent(const AXTextStateChangeIntent&amp; intent)
</ins><span class="cx"> {
</span><span class="cx">     m_textSelectionIntent = intent;
</span><span class="cx"> }
</span><ins>+    
+void AXObjectCache::setIsSynchronizingSelection(bool isSynchronizing)
+{
+    m_isSynchronizingSelection = isSynchronizing;
+}
</ins><span class="cx"> 
</span><span class="cx"> static bool isPasswordFieldOrContainedByPasswordField(AccessibilityObject* object)
</span><span class="cx"> {
</span><span class="lines">@@ -1015,7 +1018,7 @@
</span><span class="cx">         object = object-&gt;observableObject();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    postTextStateChangePlatformNotification(object, (intent.type == AXTextStateChangeTypeUnknown) ? m_textSelectionIntent : intent, selection);
</del><ins>+    postTextStateChangePlatformNotification(object, (intent.type == AXTextStateChangeTypeUnknown || m_isSynchronizingSelection) ? m_textSelectionIntent : intent, selection);
</ins><span class="cx"> #else
</span><span class="cx">     postNotification(node-&gt;renderer(), AXObjectCache::AXSelectedTextChanged, TargetObservableParent);
</span><span class="cx">     UNUSED_PARAM(intent);
</span><span class="lines">@@ -1023,6 +1026,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     setTextSelectionIntent(AXTextStateChangeIntent());
</span><ins>+    setIsSynchronizingSelection(false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AXObjectCache::postTextStateChangeNotification(Node* node, AXTextEditType type, const String&amp; text, const VisiblePosition&amp; position)
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.h        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -199,7 +199,8 @@
</span><span class="cx">     void showIntent(const AXTextStateChangeIntent&amp;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void setTextSelectionIntent(AXTextStateChangeIntent);
</del><ins>+    void setTextSelectionIntent(const AXTextStateChangeIntent&amp;);
+    void setIsSynchronizingSelection(bool);
</ins><span class="cx"> 
</span><span class="cx">     void postTextStateChangeNotification(Node*, AXTextEditType, const String&amp;, const VisiblePosition&amp;);
</span><span class="cx">     void postTextReplacementNotification(Node*, AXTextEditType deletionType, const String&amp; deletedText, AXTextEditType insertionType, const String&amp; insertedText, const VisiblePosition&amp;);
</span><span class="lines">@@ -285,6 +286,7 @@
</span><span class="cx">     ListHashSet&lt;RefPtr&lt;AccessibilityObject&gt;&gt; m_passwordNotificationsToPost;
</span><span class="cx"> 
</span><span class="cx">     AXTextStateChangeIntent m_textSelectionIntent;
</span><ins>+    bool m_isSynchronizingSelection { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class AXAttributeCacheEnabler
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXTextStateChangeIntenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXTextStateChangeIntent.h (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXTextStateChangeIntent.h        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Source/WebCore/accessibility/AXTextStateChangeIntent.h        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -78,7 +78,6 @@
</span><span class="cx">         AXTextSelection selection;
</span><span class="cx">         AXTextEditType change;
</span><span class="cx">     };
</span><del>-    bool isSynchronizing { false };
</del><span class="cx"> 
</span><span class="cx">     AXTextStateChangeIntent(AXTextStateChangeType type = AXTextStateChangeTypeUnknown, AXTextSelection selection = AXTextSelection())
</span><span class="cx">         : type(type)
</span><span class="lines">@@ -89,14 +88,6 @@
</span><span class="cx">         : type(AXTextStateChangeTypeEdit)
</span><span class="cx">         , change(change)
</span><span class="cx">     { }
</span><del>-
-    AXTextStateChangeIntent(AXTextStateChangeType type, bool isSynchronizing)
-        : type(type)
-        , selection()
-        , isSynchronizing(isSynchronizing)
-    {
-        ASSERT(type == AXTextStateChangeTypeSelectionMove || type == AXTextStateChangeTypeSelectionExtend);
-    }
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -1488,11 +1488,20 @@
</span><span class="cx">     return documentBasedSelectedTextRange();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void setTextSelectionIntent(const AccessibilityRenderObject&amp; renderObject, AXTextStateChangeType type)
+{
+    AXObjectCache* cache = renderObject.axObjectCache();
+    if (!cache)
+        return;
+    AXTextStateChangeIntent intent(type, AXTextSelection { AXTextSelectionDirectionDiscontiguous, AXTextSelectionGranularityUnknown });
+    cache-&gt;setTextSelectionIntent(intent);
+    cache-&gt;setIsSynchronizingSelection(true);
+}
+
</ins><span class="cx"> void AccessibilityRenderObject::setSelectedTextRange(const PlainTextRange&amp; range)
</span><span class="cx"> {
</span><span class="cx">     if (isNativeTextControl()) {
</span><del>-        if (AXObjectCache* cache = axObjectCache())
-            cache-&gt;setTextSelectionIntent(AXTextStateChangeIntent(range.length ? AXTextStateChangeTypeSelectionExtend : AXTextStateChangeTypeSelectionMove, true));
</del><ins>+        setTextSelectionIntent(*this, range.length ? AXTextStateChangeTypeSelectionExtend : AXTextStateChangeTypeSelectionMove);
</ins><span class="cx">         HTMLTextFormControlElement&amp; textControl = downcast&lt;RenderTextControl&gt;(*m_renderer).textFormControlElement();
</span><span class="cx">         textControl.setSelectionRange(range.start, range.start + range.length);
</span><span class="cx">         return;
</span><span class="lines">@@ -1500,8 +1509,8 @@
</span><span class="cx"> 
</span><span class="cx">     Node* node = m_renderer-&gt;node();
</span><span class="cx">     VisibleSelection newSelection(Position(node, range.start, Position::PositionIsOffsetInAnchor), Position(node, range.start + range.length, Position::PositionIsOffsetInAnchor), DOWNSTREAM);
</span><del>-    AXTextStateChangeIntent newIntent(range.length ? AXTextStateChangeTypeSelectionExtend : AXTextStateChangeTypeSelectionMove, true);
-    m_renderer-&gt;frame().selection().setSelection(newSelection, FrameSelection::defaultSetSelectionOptions(), newIntent);
</del><ins>+    setTextSelectionIntent(*this, range.length ? AXTextStateChangeTypeSelectionExtend : AXTextStateChangeTypeSelectionMove);
+    m_renderer-&gt;frame().selection().setSelection(newSelection, FrameSelection::defaultSetSelectionOptions());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> URL AccessibilityRenderObject::url() const
</span><span class="lines">@@ -1655,6 +1664,7 @@
</span><span class="cx">     if (document-&gt;focusedElement() == node)
</span><span class="cx">         document-&gt;setFocusedElement(nullptr);
</span><span class="cx"> 
</span><ins>+    setTextSelectionIntent(*this, AXTextStateChangeTypeSelectionMove);
</ins><span class="cx">     downcast&lt;Element&gt;(*node).focus();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1969,13 +1979,13 @@
</span><span class="cx"> 
</span><span class="cx">     // make selection and tell the document to use it. if it's zero length, then move to that position
</span><span class="cx">     if (range.start == range.end) {
</span><del>-        if (AXObjectCache* cache = axObjectCache())
-            cache-&gt;setTextSelectionIntent(AXTextStateChangeIntent(AXTextStateChangeTypeSelectionMove, true));
</del><ins>+        setTextSelectionIntent(*this, AXTextStateChangeTypeSelectionMove);
</ins><span class="cx">         m_renderer-&gt;frame().selection().moveTo(range.start, UserTriggered);
</span><span class="cx">     }
</span><span class="cx">     else {
</span><ins>+        setTextSelectionIntent(*this, AXTextStateChangeTypeSelectionExtend);
</ins><span class="cx">         VisibleSelection newSelection = VisibleSelection(range.start, range.end);
</span><del>-        m_renderer-&gt;frame().selection().setSelection(newSelection, FrameSelection::defaultSetSelectionOptions(), AXTextStateChangeIntent(AXTextStateChangeTypeSelectionExtend, true));
</del><ins>+        m_renderer-&gt;frame().selection().setSelection(newSelection, FrameSelection::defaultSetSelectionOptions());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacAXObjectCacheMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] initWithCapacity:5];
</span><del>-    if (intent.isSynchronizing)
</del><ins>+    if (m_isSynchronizingSelection)
</ins><span class="cx">         [userInfo setObject:[NSNumber numberWithBool:YES] forKey:NSAccessibilityTextStateSyncKey];
</span><span class="cx">     if (intent.type != AXTextStateChangeTypeUnknown) {
</span><span class="cx">         [userInfo setObject:[NSNumber numberWithInt:intent.type] forKey:NSAccessibilityTextStateChangeTypeKey];
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/ChangeLog        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2015-05-04  Doug Russell  &lt;d_russell@apple.com&gt;
+
+        AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
+        https://bugs.webkit.org/show_bug.cgi?id=144489
+
+        Reviewed by Chris Fleizach.
+
+        Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
+        on the returned control.
+        Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
+        Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
+        Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
+        Add support for setSelectedVisibleTextRange() in accessibility tests.
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        (setSelectedVisibleTextRangeCallback):
+        (AccessibilityUIElement::setSelectedVisibleTextRange):
+        (AccessibilityUIElement::getJSClass):
+        (AccessibilityUIElement::textMarkerForIndex): Deleted.
+        * DumpRenderTree/AccessibilityUIElement.h:
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        (AccessibilityUIElement::setSelectedVisibleTextRange):
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange):
+        (WTR::AccessibilityUIElement::setSelectedTextRange): Deleted.
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange):
+        * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange):
+        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+        (WTR::AccessibilityUIElement::setSelectedVisibleTextRange):
+
</ins><span class="cx"> 2015-05-04  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Implement the &quot;--show-webview&quot; option for Windows
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -901,6 +901,19 @@
</span><span class="cx">     return AccessibilityTextMarker::makeJSAccessibilityTextMarker(context, toAXElement(thisObject)-&gt;endTextMarker());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSValueRef setSelectedVisibleTextRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    AccessibilityUIElement* uiElement = toAXElement(thisObject);
+    AccessibilityTextMarkerRange* textMarkerRange = nullptr;
+    if (argumentCount == 1)
+        textMarkerRange = toTextMarkerRange(JSValueToObject(context, arguments[0], exception));
+
+    if (uiElement)
+        return JSValueMakeBoolean(context, uiElement-&gt;setSelectedVisibleTextRange(textMarkerRange));
+
+    return JSValueMakeBoolean(context, false);
+}
+
</ins><span class="cx"> // Static Value Getters
</span><span class="cx"> 
</span><span class="cx"> static JSValueRef getARIADropEffectsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
</span><span class="lines">@@ -1501,6 +1514,11 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+{
+    return false;
+}
+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> // Destruction
</span><span class="lines">@@ -1684,6 +1702,7 @@
</span><span class="cx">         { &quot;stringForTextMarkerRange&quot;, stringForTextMarkerRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;setSelectedChild&quot;, setSelectedChildCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;setValue&quot;, setValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+        { &quot;setSelectedVisibleTextRange&quot;, setSelectedVisibleTextRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx">         { &quot;selectedChildAtIndex&quot;, selectedChildAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;scrollToMakeVisible&quot;, scrollToMakeVisibleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(EFL)
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -254,6 +254,7 @@
</span><span class="cx">     AccessibilityTextMarker endTextMarker();
</span><span class="cx">     AccessibilityTextMarkerRange selectedTextMarkerRange();
</span><span class="cx">     void resetSelectedTextMarkerRange();
</span><ins>+    bool setSelectedVisibleTextRange(AccessibilityTextMarkerRange*);
</ins><span class="cx">     
</span><span class="cx">     JSStringRef stringForTextMarkerRange(AccessibilityTextMarkerRange*);
</span><span class="cx">     int textMarkerRangeLength(AccessibilityTextMarkerRange*);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -1775,6 +1775,15 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange* markerRange)
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    [m_element accessibilitySetValue:(id)markerRange-&gt;platformTextMarkerRange() forAttribute:NSAccessibilitySelectedTextMarkerRangeAttribute];
+    END_AX_OBJC_EXCEPTIONS
+    
+    return true;
+}
+
</ins><span class="cx"> #endif // SUPPORTS_AX_TEXTMARKERS
</span><span class="cx"> 
</span><span class="cx"> JSStringRef AccessibilityUIElement::supportedActions()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -173,6 +173,7 @@
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::rangeForPosition(int, int) { return 0; }
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::boundsForRange(unsigned, unsigned) { return 0; }
</span><span class="cx"> bool AccessibilityUIElement::setSelectedTextRange(unsigned, unsigned) { return false; }
</span><ins>+bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*) { return false; }
</ins><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::stringForRange(unsigned, unsigned) { return 0; }
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::attributedStringForRange(unsigned, unsigned) { return 0; }
</span><span class="cx"> bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned, unsigned) { return false; }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -248,6 +248,7 @@
</span><span class="cx">     PassRefPtr&lt;AccessibilityTextMarker&gt; textMarkerForIndex(int);
</span><span class="cx">     PassRefPtr&lt;AccessibilityTextMarker&gt; startTextMarker();
</span><span class="cx">     PassRefPtr&lt;AccessibilityTextMarker&gt; endTextMarker();
</span><ins>+    bool setSelectedVisibleTextRange(AccessibilityTextMarkerRange*);
</ins><span class="cx"> 
</span><span class="cx">     // Returns an ordered list of supported actions for an element.
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; supportedActions() const;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -193,6 +193,7 @@
</span><span class="cx">     AccessibilityTextMarker textMarkerForIndex(int textIndex);
</span><span class="cx">     readonly attribute AccessibilityTextMarker startTextMarker;
</span><span class="cx">     readonly attribute AccessibilityTextMarker endTextMarker;
</span><ins>+    boolean setSelectedVisibleTextRange(AccessibilityTextMarkerRange range);
</ins><span class="cx"> 
</span><span class="cx">     // Returns an ordered list of supported actions for an element.
</span><span class="cx">     readonly attribute DOMString supportedActions;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -1912,6 +1912,11 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+{
+    return nullptr;
+}
+
</ins><span class="cx"> void AccessibilityUIElement::scrollToMakeVisible()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: implement
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -562,6 +562,11 @@
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*)
+{
+    return false;
+}
+
</ins><span class="cx"> bool AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
</span><span class="cx"> {
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (183782 => 183783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2015-05-05 00:08:28 UTC (rev 183782)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2015-05-05 00:16:01 UTC (rev 183783)
</span><span class="lines">@@ -1392,6 +1392,15 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange* markerRange)
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    [m_element accessibilitySetValue:(id)markerRange-&gt;platformTextMarkerRange() forAttribute:NSAccessibilitySelectedTextMarkerRangeAttribute];
+    END_AX_OBJC_EXCEPTIONS
+
+    return true;
+}
+
</ins><span class="cx"> void AccessibilityUIElement::increment()
</span><span class="cx"> {
</span><span class="cx">     BEGIN_AX_OBJC_EXCEPTIONS
</span></span></pre>
</div>
</div>

</body>
</html>