<!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>[200876] 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/200876">200876</a></dd>
<dt>Author</dt> <dd>d_russell@apple.com</dd>
<dt>Date</dt> <dd>2016-05-13 12:34:48 -0700 (Fri, 13 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Regressions in undo/redo accessibility from Bug 153361
https://bugs.webkit.org/show_bug.cgi?id=157652

Reviewed by Darin Adler.

Use indexForVisiblePosition &amp; visiblePositionForIndex to store selection data
so that AccessibilityUndoReplacedText can build valid selection ranges and
retrieve strings for AT notifications.

Source/WebCore:

Tests: accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt:
       accessibility/mac/value-change/value-change-user-info-contenteditable.html:
       accessibility/mac/value-change/value-change-user-info-textarea-expected.txt:
       accessibility/mac/value-change/value-change-user-info-textarea.html:
       accessibility/mac/value-change/value-change-user-info-textfield-expected.txt:
       accessibility/mac/value-change/value-change-user-info-textfield.html:

* accessibility/AXObjectCache.cpp:
(WebCore::AccessibilityReplacedText::AccessibilityReplacedText):
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
* editing/CompositeEditCommand.cpp:
(WebCore::AccessibilityUndoReplacedText::configureRangeDeletedByReapplyWithEndingSelection):
(WebCore::AccessibilityUndoReplacedText::configureRangeDeletedByReapplyWithStartingSelection):
(WebCore::AccessibilityUndoReplacedText::setRangeDeletedByUnapply):
(WebCore::AccessibilityUndoReplacedText::captureTextForUnapply):
(WebCore::AccessibilityUndoReplacedText::captureTextForReapply):
(WebCore::AccessibilityUndoReplacedText::textDeletedByUnapply):
(WebCore::AccessibilityUndoReplacedText::textDeletedByReapply):
(WebCore::AccessibilityUndoReplacedText::postTextStateChangeNotificationForUnapply):
(WebCore::AccessibilityUndoReplacedText::postTextStateChangeNotificationForReapply):
(WebCore::EditCommandComposition::EditCommandComposition):
(WebCore::EditCommandComposition::unapply):
(WebCore::EditCommandComposition::reapply):
(WebCore::EditCommandComposition::setStartingSelection):
(WebCore::EditCommandComposition::setEndingSelection):
(WebCore::EditCommandComposition::setRangeDeletedByUnapply):
(WebCore::AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyIndexesWithEditCommandEndingSelection): Deleted.
(WebCore::AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyStartIndexWithEditCommandStartingSelection): Deleted.
(WebCore::AccessibilityUndoReplacedText::setTextInsertedByUnapplyRange): Deleted.
(WebCore::AccessibilityUndoReplacedText::captureTextToBeDeletedByUnapply): Deleted.
(WebCore::AccessibilityUndoReplacedText::captureTextToBeDeletedByReapply): Deleted.
(WebCore::AccessibilityUndoReplacedText::textInsertedByUnapply): Deleted.
(WebCore::AccessibilityUndoReplacedText::textInsertedByReapply): Deleted.
(WebCore::EditCommandComposition::setTextInsertedByUnapplyRange): Deleted.
* editing/CompositeEditCommand.h:
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::postTextStateChangeNotificationForDeletion):
(WebCore::TypingCommand::insertTextAndNotifyAccessibility):
(WebCore::TypingCommand::insertLineBreakAndNotifyAccessibility):
(WebCore::TypingCommand::insertParagraphSeparatorAndNotifyAccessibility):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContentAndNotifyAccessibility):

LayoutTests:

* accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt:
* accessibility/mac/value-change/value-change-user-info-contenteditable.html:
* accessibility/mac/value-change/value-change-user-info-textarea-expected.txt:
* accessibility/mac/value-change/value-change-user-info-textarea.html:
* accessibility/mac/value-change/value-change-user-info-textfield-expected.txt:
* accessibility/mac/value-change/value-change-user-info-textfield.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfocontenteditableexpectedtxt">trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfocontenteditablehtml">trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextareaexpectedtxt">trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextareahtml">trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextfieldexpectedtxt">trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextfieldhtml">trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html</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="#trunkSourceWebCoreeditingCompositeEditCommandcpp">trunk/Source/WebCore/editing/CompositeEditCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingCompositeEditCommandh">trunk/Source/WebCore/editing/CompositeEditCommand.h</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTypingCommandcpp">trunk/Source/WebCore/editing/TypingCommand.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/LayoutTests/ChangeLog        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-05-13  Doug Russell  &lt;d_russell@apple.com&gt;
+
+        AX: Regressions in undo/redo accessibility from Bug 153361
+        https://bugs.webkit.org/show_bug.cgi?id=157652
+
+        Reviewed by Darin Adler.
+        
+        Use indexForVisiblePosition &amp; visiblePositionForIndex to store selection data
+        so that AccessibilityUndoReplacedText can build valid selection ranges and
+        retrieve strings for AT notifications.
+
+        * accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt:
+        * accessibility/mac/value-change/value-change-user-info-contenteditable.html:
+        * accessibility/mac/value-change/value-change-user-info-textarea-expected.txt:
+        * accessibility/mac/value-change/value-change-user-info-textarea.html:
+        * accessibility/mac/value-change/value-change-user-info-textfield-expected.txt:
+        * accessibility/mac/value-change/value-change-user-info-textfield.html:
+
</ins><span class="cx"> 2016-05-13  Nan Wang  &lt;n_wang@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Wrong CharacterOffset from an upstream VisiblePosition
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfocontenteditableexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -38,6 +38,16 @@
</span><span class="cx"> PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
</span><span class="cx"> PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
</span><span class="cx"> PASS actualEditTypes[resultIndex][1] is &quot;Typing&quot;
</span><ins>+PASS actualChangeTypes[resultIndex] is AXTextStateChangeTypeEdit
+PASS actualChangeValues[resultIndex][0] is expectedValues[resultIndex][0]
+PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
+PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
+PASS actualEditTypes[resultIndex][1] is &quot;Insert&quot;
+PASS actualChangeTypes[resultIndex] is AXTextStateChangeTypeEdit
+PASS actualChangeValues[resultIndex][0] is expectedValues[resultIndex][0]
+PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
+PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
+PASS actualEditTypes[resultIndex][1] is &quot;Insert&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfocontenteditablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 count++;
</span><del>-                if (count == 9) {
</del><ins>+                if (count == 11) {
</ins><span class="cx"> 
</span><span class="cx">                     shouldBeTyping(&quot;1&quot;);
</span><span class="cx">                     shouldBeDelete(&quot;1&quot;);
</span><span class="lines">@@ -56,6 +56,8 @@
</span><span class="cx">                     shouldBePaste(&quot;2&quot;);
</span><span class="cx">                     shouldBePasteReplace(&quot;3&quot;, &quot;2&quot;);
</span><span class="cx">                     shouldBeTypingReplace(&quot;2&quot;, &quot;3&quot;);
</span><ins>+                    shouldBeInsertReplace(&quot;3&quot;, &quot;2&quot;);
+                    shouldBeInsertReplace(&quot;2&quot;, &quot;3&quot;);
</ins><span class="cx"> 
</span><span class="cx">                     webArea.removeNotificationListener();
</span><span class="cx">                     window.testRunner.notifyDone();
</span><span class="lines">@@ -94,6 +96,10 @@
</span><span class="cx"> 
</span><span class="cx">             execExtendSelectionLeftByCharacterCommand();
</span><span class="cx">             eventSender.keyDown(&quot;3&quot;);
</span><ins>+
+            execUndoCommand();
+
+            execRedoCommand();
</ins><span class="cx">         }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextareaexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea-expected.txt (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea-expected.txt        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea-expected.txt        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -38,6 +38,16 @@
</span><span class="cx"> PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
</span><span class="cx"> PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
</span><span class="cx"> PASS actualEditTypes[resultIndex][1] is &quot;Typing&quot;
</span><ins>+PASS actualChangeTypes[resultIndex] is AXTextStateChangeTypeEdit
+PASS actualChangeValues[resultIndex][0] is expectedValues[resultIndex][0]
+PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
+PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
+PASS actualEditTypes[resultIndex][1] is &quot;Insert&quot;
+PASS actualChangeTypes[resultIndex] is AXTextStateChangeTypeEdit
+PASS actualChangeValues[resultIndex][0] is expectedValues[resultIndex][0]
+PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
+PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
+PASS actualEditTypes[resultIndex][1] is &quot;Insert&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextareahtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textarea.html        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">                 count++;
</span><span class="cx"> 
</span><del>-                var expectedCount = 9;
</del><ins>+                var expectedCount = 11;
</ins><span class="cx">                 if (count == expectedCount) {
</span><span class="cx"> 
</span><span class="cx">                     shouldBeTyping(&quot;3&quot;);
</span><span class="lines">@@ -58,6 +58,8 @@
</span><span class="cx">                     shouldBePaste(&quot;5&quot;);
</span><span class="cx">                     shouldBePasteReplace(&quot;6&quot;, &quot;5&quot;);
</span><span class="cx">                     shouldBeTypingReplace(&quot;5&quot;, &quot;6&quot;);
</span><ins>+                    shouldBeInsertReplace(&quot;6&quot;, &quot;5&quot;);
+                    shouldBeInsertReplace(&quot;5&quot;, &quot;6&quot;);
</ins><span class="cx"> 
</span><span class="cx">                     webArea.removeNotificationListener();
</span><span class="cx">                     window.testRunner.notifyDone();
</span><span class="lines">@@ -96,6 +98,10 @@
</span><span class="cx"> 
</span><span class="cx">             execExtendSelectionLeftByCharacterCommand();
</span><span class="cx">             eventSender.keyDown(&quot;6&quot;);
</span><ins>+
+            execUndoCommand();
+
+            execRedoCommand();
</ins><span class="cx">         }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextfieldexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield-expected.txt (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield-expected.txt        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield-expected.txt        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -32,6 +32,16 @@
</span><span class="cx"> PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
</span><span class="cx"> PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
</span><span class="cx"> PASS actualEditTypes[resultIndex][1] is &quot;Typing&quot;
</span><ins>+PASS actualChangeTypes[resultIndex] is AXTextStateChangeTypeEdit
+PASS actualChangeValues[resultIndex][0] is expectedValues[resultIndex][0]
+PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
+PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
+PASS actualEditTypes[resultIndex][1] is &quot;Insert&quot;
+PASS actualChangeTypes[resultIndex] is AXTextStateChangeTypeEdit
+PASS actualChangeValues[resultIndex][0] is expectedValues[resultIndex][0]
+PASS actualEditTypes[resultIndex][0] is &quot;Delete&quot;
+PASS actualChangeValues[resultIndex][1] is expectedValues[resultIndex][1]
+PASS actualEditTypes[resultIndex][1] is &quot;Insert&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacvaluechangevaluechangeuserinfotextfieldhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/LayoutTests/accessibility/mac/value-change/value-change-user-info-textfield.html        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">                 count++;
</span><span class="cx"> 
</span><del>-                var expectedCount = 7;
</del><ins>+                var expectedCount = 9;
</ins><span class="cx">                 if (count == expectedCount) {
</span><span class="cx"> 
</span><span class="cx">                     shouldBeTyping(&quot;6&quot;);
</span><span class="lines">@@ -56,6 +56,8 @@
</span><span class="cx">                     shouldBePaste(&quot;8&quot;);
</span><span class="cx">                     shouldBePasteReplace(&quot;9&quot;, &quot;8&quot;);
</span><span class="cx">                     shouldBeTypingReplace(&quot;8&quot;, &quot;9&quot;);
</span><ins>+                    shouldBeInsertReplace(&quot;9&quot;, &quot;8&quot;);
+                    shouldBeInsertReplace(&quot;8&quot;, &quot;9&quot;);
</ins><span class="cx"> 
</span><span class="cx">                     webArea.removeNotificationListener();
</span><span class="cx">                     window.testRunner.notifyDone();
</span><span class="lines">@@ -92,6 +94,10 @@
</span><span class="cx"> 
</span><span class="cx">             execExtendSelectionLeftByCharacterCommand();
</span><span class="cx">             eventSender.keyDown(&quot;9&quot;);
</span><ins>+
+            execUndoCommand();
+
+            execRedoCommand();
</ins><span class="cx">         }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/Source/WebCore/ChangeLog        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2016-05-13  Doug Russell  &lt;d_russell@apple.com&gt;
+
+        AX: Regressions in undo/redo accessibility from Bug 153361
+        https://bugs.webkit.org/show_bug.cgi?id=157652
+
+        Reviewed by Darin Adler.
+        
+        Use indexForVisiblePosition &amp; visiblePositionForIndex to store selection data
+        so that AccessibilityUndoReplacedText can build valid selection ranges and
+        retrieve strings for AT notifications.
+
+        Tests: accessibility/mac/value-change/value-change-user-info-contenteditable-expected.txt:
+               accessibility/mac/value-change/value-change-user-info-contenteditable.html:
+               accessibility/mac/value-change/value-change-user-info-textarea-expected.txt:
+               accessibility/mac/value-change/value-change-user-info-textarea.html:
+               accessibility/mac/value-change/value-change-user-info-textfield-expected.txt:
+               accessibility/mac/value-change/value-change-user-info-textfield.html:
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AccessibilityReplacedText::AccessibilityReplacedText):
+        (WebCore::AXObjectCache::postTextStateChangeNotification):
+        (WebCore::AXObjectCache::postTextReplacementNotification):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::AccessibilityUndoReplacedText::configureRangeDeletedByReapplyWithEndingSelection):
+        (WebCore::AccessibilityUndoReplacedText::configureRangeDeletedByReapplyWithStartingSelection):
+        (WebCore::AccessibilityUndoReplacedText::setRangeDeletedByUnapply):
+        (WebCore::AccessibilityUndoReplacedText::captureTextForUnapply):
+        (WebCore::AccessibilityUndoReplacedText::captureTextForReapply):
+        (WebCore::AccessibilityUndoReplacedText::textDeletedByUnapply):
+        (WebCore::AccessibilityUndoReplacedText::textDeletedByReapply):
+        (WebCore::AccessibilityUndoReplacedText::postTextStateChangeNotificationForUnapply):
+        (WebCore::AccessibilityUndoReplacedText::postTextStateChangeNotificationForReapply):
+        (WebCore::EditCommandComposition::EditCommandComposition):
+        (WebCore::EditCommandComposition::unapply):
+        (WebCore::EditCommandComposition::reapply):
+        (WebCore::EditCommandComposition::setStartingSelection):
+        (WebCore::EditCommandComposition::setEndingSelection):
+        (WebCore::EditCommandComposition::setRangeDeletedByUnapply):
+        (WebCore::AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyIndexesWithEditCommandEndingSelection): Deleted.
+        (WebCore::AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyStartIndexWithEditCommandStartingSelection): Deleted.
+        (WebCore::AccessibilityUndoReplacedText::setTextInsertedByUnapplyRange): Deleted.
+        (WebCore::AccessibilityUndoReplacedText::captureTextToBeDeletedByUnapply): Deleted.
+        (WebCore::AccessibilityUndoReplacedText::captureTextToBeDeletedByReapply): Deleted.
+        (WebCore::AccessibilityUndoReplacedText::textInsertedByUnapply): Deleted.
+        (WebCore::AccessibilityUndoReplacedText::textInsertedByReapply): Deleted.
+        (WebCore::EditCommandComposition::setTextInsertedByUnapplyRange): Deleted.
+        * editing/CompositeEditCommand.h:
+        * editing/Editor.cpp:
+        (WebCore::Editor::replaceSelectionWithFragment):
+        * editing/TypingCommand.cpp:
+        (WebCore::TypingCommand::postTextStateChangeNotificationForDeletion):
+        (WebCore::TypingCommand::insertTextAndNotifyAccessibility):
+        (WebCore::TypingCommand::insertLineBreakAndNotifyAccessibility):
+        (WebCore::TypingCommand::insertParagraphSeparatorAndNotifyAccessibility):
+        (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContentAndNotifyAccessibility):
+
</ins><span class="cx"> 2016-05-13  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r200837.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -124,10 +124,13 @@
</span><span class="cx"> 
</span><span class="cx"> AccessibilityReplacedText::AccessibilityReplacedText(const VisibleSelection&amp; selection)
</span><span class="cx"> {
</span><del>-    if (AXObjectCache::accessibilityEnabled() &amp;&amp; selection.isRange()) {
-        m_replacedText = AccessibilityObject::stringForVisiblePositionRange(selection);
</del><ins>+    if (AXObjectCache::accessibilityEnabled()) {
</ins><span class="cx">         m_replacedRange.startIndex.value = indexForVisiblePosition(selection.start(), m_replacedRange.startIndex.scope);
</span><del>-        m_replacedRange.endIndex.value = indexForVisiblePosition(selection.end(), m_replacedRange.endIndex.scope);
</del><ins>+        if (selection.isRange()) {
+            m_replacedText = AccessibilityObject::stringForVisiblePositionRange(selection);
+            m_replacedRange.endIndex.value = indexForVisiblePosition(selection.end(), m_replacedRange.endIndex.scope);
+        } else
+            m_replacedRange.endIndex = m_replacedRange.startIndex;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingCompositeEditCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -85,43 +85,43 @@
</span><span class="cx">     return WebCore::indexForVisiblePosition(position, scope);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyIndexesWithEditCommandEndingSelection(const VisibleSelection&amp; selection)
</del><ins>+void AccessibilityUndoReplacedText::configureRangeDeletedByReapplyWithEndingSelection(const VisibleSelection&amp; selection)
</ins><span class="cx"> {
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return;
</span><del>-    if (selection.isRange() &amp;&amp; m_textDeletedByUnapplyRange.startIndex.value == -1)
-        m_textDeletedByUnapplyRange.startIndex.value = indexForVisiblePosition(selection.start(), m_textDeletedByUnapplyRange.startIndex.scope);
-    if (m_textDeletedByUnapplyRange.endIndex.value == -1)
-        m_textDeletedByUnapplyRange.endIndex.value = indexForVisiblePosition(selection.start(), m_textDeletedByUnapplyRange.endIndex.scope);
</del><ins>+    if (selection.isNone())
+        return;
+    m_rangeDeletedByReapply.endIndex.value = indexForVisiblePosition(selection.end(), m_rangeDeletedByReapply.endIndex.scope);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyStartIndexWithEditCommandStartingSelection(const VisibleSelection&amp; selection)
</del><ins>+void AccessibilityUndoReplacedText::configureRangeDeletedByReapplyWithStartingSelection(const VisibleSelection&amp; selection)
</ins><span class="cx"> {
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return;
</span><del>-    if (m_textDeletedByUnapplyRange.startIndex.value == -1)
-        m_textDeletedByUnapplyRange.startIndex.value = indexForVisiblePosition(selection.start(), m_textDeletedByUnapplyRange.startIndex.scope);
-    if (selection.isRange() &amp;&amp; m_textDeletedByUnapplyRange.endIndex.value == -1)
-        m_textDeletedByUnapplyRange.endIndex.value = indexForVisiblePosition(selection.end(), m_textDeletedByUnapplyRange.endIndex.scope);
</del><ins>+    if (selection.isNone())
+        return;
+    if (m_rangeDeletedByReapply.startIndex.value == -1)
+        m_rangeDeletedByReapply.startIndex.value = indexForVisiblePosition(selection.start(), m_rangeDeletedByReapply.startIndex.scope);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AccessibilityUndoReplacedText::setTextInsertedByUnapplyRange(const VisiblePositionIndexRange&amp; range)
</del><ins>+void AccessibilityUndoReplacedText::setRangeDeletedByUnapply(const VisiblePositionIndexRange&amp; range)
</ins><span class="cx"> {
</span><del>-    m_textInsertedByUnapplyRange = range;
</del><ins>+    if (m_rangeDeletedByUnapply.isNull())
+        m_rangeDeletedByUnapply = range;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AccessibilityUndoReplacedText::captureTextToBeDeletedByUnapply()
</del><ins>+void AccessibilityUndoReplacedText::captureTextForUnapply()
</ins><span class="cx"> {
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return;
</span><del>-    m_replacedText = textInsertedByReapply();
</del><ins>+    m_replacedText = textDeletedByReapply();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AccessibilityUndoReplacedText::captureTextToBeDeletedByReapply()
</del><ins>+void AccessibilityUndoReplacedText::captureTextForReapply()
</ins><span class="cx"> {
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return;
</span><del>-    m_replacedText = textInsertedByUnapply();
</del><ins>+    m_replacedText = textDeletedByUnapply();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static String stringForVisiblePositionIndexRange(const VisiblePositionIndexRange&amp; range)
</span><span class="lines">@@ -133,18 +133,18 @@
</span><span class="cx">     return AccessibilityObject::stringForVisiblePositionRange(VisiblePositionRange(start, end));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String AccessibilityUndoReplacedText::textInsertedByUnapply()
</del><ins>+String AccessibilityUndoReplacedText::textDeletedByUnapply()
</ins><span class="cx"> {
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return String();
</span><del>-    return stringForVisiblePositionIndexRange(m_textInsertedByUnapplyRange);
</del><ins>+    return stringForVisiblePositionIndexRange(m_rangeDeletedByUnapply);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String AccessibilityUndoReplacedText::textInsertedByReapply()
</del><ins>+String AccessibilityUndoReplacedText::textDeletedByReapply()
</ins><span class="cx"> {
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return String();
</span><del>-    return stringForVisiblePositionIndexRange(m_textDeletedByUnapplyRange);
</del><ins>+    return stringForVisiblePositionIndexRange(m_rangeDeletedByReapply);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void postTextStateChangeNotification(AXObjectCache* cache, const VisiblePosition&amp; position, const String&amp; deletedText, const String&amp; insertedText)
</span><span class="lines">@@ -167,12 +167,12 @@
</span><span class="cx">         return;
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return;
</span><del>-    if (m_textInsertedByUnapplyRange.isNull())
</del><ins>+    if (m_rangeDeletedByUnapply.isNull())
</ins><span class="cx">         return;
</span><del>-    VisiblePosition position = visiblePositionForIndex(m_textInsertedByUnapplyRange.endIndex.value, m_textInsertedByUnapplyRange.endIndex.scope.get());
</del><ins>+    VisiblePosition position = visiblePositionForIndex(m_rangeDeletedByUnapply.endIndex.value, m_rangeDeletedByUnapply.endIndex.scope.get());
</ins><span class="cx">     if (position.isNull())
</span><span class="cx">         return;
</span><del>-    postTextStateChangeNotification(cache, position, textInsertedByUnapply(), m_replacedText);
</del><ins>+    postTextStateChangeNotification(cache, position, textDeletedByUnapply(), m_replacedText);
</ins><span class="cx">     m_replacedText = String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -182,12 +182,12 @@
</span><span class="cx">         return;
</span><span class="cx">     if (!AXObjectCache::accessibilityEnabled())
</span><span class="cx">         return;
</span><del>-    if (m_textDeletedByUnapplyRange.isNull())
</del><ins>+    if (m_rangeDeletedByReapply.isNull())
</ins><span class="cx">         return;
</span><del>-    VisiblePosition position = visiblePositionForIndex(m_textDeletedByUnapplyRange.startIndex.value, m_textDeletedByUnapplyRange.startIndex.scope.get());
</del><ins>+    VisiblePosition position = visiblePositionForIndex(m_rangeDeletedByReapply.startIndex.value, m_rangeDeletedByReapply.startIndex.scope.get());
</ins><span class="cx">     if (position.isNull())
</span><span class="cx">         return;
</span><del>-    postTextStateChangeNotification(cache, position, m_replacedText, textInsertedByReapply());
</del><ins>+    postTextStateChangeNotification(cache, position, textDeletedByReapply(), m_replacedText);
</ins><span class="cx">     m_replacedText = String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx">     , m_endingRootEditableElement(endingSelection.rootEditableElement())
</span><span class="cx">     , m_editAction(editAction)
</span><span class="cx"> {
</span><del>-    m_replacedText.confgureTextToBeDeletedByUnapplyStartIndexWithEditCommandStartingSelection(startingSelection);
</del><ins>+    m_replacedText.configureRangeDeletedByReapplyWithStartingSelection(startingSelection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void EditCommandComposition::unapply()
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">     if (!frame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_replacedText.captureTextToBeDeletedByUnapply();
</del><ins>+    m_replacedText.captureTextForUnapply();
</ins><span class="cx"> 
</span><span class="cx">     // Changes to the document may have been made since the last editing operation that require a layout, as in &lt;rdar://problem/5658603&gt;.
</span><span class="cx">     // Low level operations, like RemoveNodeCommand, don't require a layout because the high level operations that use them perform one
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx">     if (!frame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_replacedText.captureTextToBeDeletedByReapply();
</del><ins>+    m_replacedText.captureTextForReapply();
</ins><span class="cx"> 
</span><span class="cx">     // Changes to the document may have been made since the last editing operation that require a layout, as in &lt;rdar://problem/5658603&gt;.
</span><span class="cx">     // Low level operations, like RemoveNodeCommand, don't require a layout because the high level operations that use them perform one
</span><span class="lines">@@ -272,19 +272,19 @@
</span><span class="cx"> {
</span><span class="cx">     m_startingSelection = selection;
</span><span class="cx">     m_startingRootEditableElement = selection.rootEditableElement();
</span><del>-    m_replacedText.confgureTextToBeDeletedByUnapplyStartIndexWithEditCommandStartingSelection(selection);
</del><ins>+    m_replacedText.configureRangeDeletedByReapplyWithStartingSelection(selection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void EditCommandComposition::setEndingSelection(const VisibleSelection&amp; selection)
</span><span class="cx"> {
</span><span class="cx">     m_endingSelection = selection;
</span><span class="cx">     m_endingRootEditableElement = selection.rootEditableElement();
</span><del>-    m_replacedText.confgureTextToBeDeletedByUnapplyIndexesWithEditCommandEndingSelection(selection);
</del><ins>+    m_replacedText.configureRangeDeletedByReapplyWithEndingSelection(selection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void EditCommandComposition::setTextInsertedByUnapplyRange(const VisiblePositionIndexRange&amp; range)
</del><ins>+void EditCommandComposition::setRangeDeletedByUnapply(const VisiblePositionIndexRange&amp; range)
</ins><span class="cx"> {
</span><del>-    m_replacedText.setTextInsertedByUnapplyRange(range);
</del><ins>+    m_replacedText.setRangeDeletedByUnapply(range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingCompositeEditCommandh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/CompositeEditCommand.h (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/CompositeEditCommand.h        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.h        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -42,24 +42,24 @@
</span><span class="cx"> class AccessibilityUndoReplacedText {
</span><span class="cx"> public:
</span><span class="cx">     AccessibilityUndoReplacedText() { }
</span><del>-    void confgureTextToBeDeletedByUnapplyStartIndexWithEditCommandStartingSelection(const VisibleSelection&amp;);
-    void confgureTextToBeDeletedByUnapplyIndexesWithEditCommandEndingSelection(const VisibleSelection&amp;);
-    void setTextInsertedByUnapplyRange(const VisiblePositionIndexRange&amp;);
</del><ins>+    void configureRangeDeletedByReapplyWithStartingSelection(const VisibleSelection&amp;);
+    void configureRangeDeletedByReapplyWithEndingSelection(const VisibleSelection&amp;);
+    void setRangeDeletedByUnapply(const VisiblePositionIndexRange&amp;);
</ins><span class="cx"> 
</span><del>-    void captureTextToBeDeletedByUnapply();
-    void captureTextToBeDeletedByReapply();
</del><ins>+    void captureTextForUnapply();
+    void captureTextForReapply();
</ins><span class="cx"> 
</span><span class="cx">     void postTextStateChangeNotificationForUnapply(AXObjectCache*);
</span><span class="cx">     void postTextStateChangeNotificationForReapply(AXObjectCache*);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     int indexForVisiblePosition(const VisiblePosition&amp;, RefPtr&lt;ContainerNode&gt;&amp;) const;
</span><del>-    String textInsertedByUnapply();
-    String textInsertedByReapply();
</del><ins>+    String textDeletedByUnapply();
+    String textDeletedByReapply();
</ins><span class="cx"> 
</span><span class="cx">     String m_replacedText;
</span><del>-    VisiblePositionIndexRange m_textDeletedByUnapplyRange;
-    VisiblePositionIndexRange m_textInsertedByUnapplyRange;
</del><ins>+    VisiblePositionIndexRange m_rangeDeletedByUnapply;
+    VisiblePositionIndexRange m_rangeDeletedByReapply;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class EditCommandComposition : public UndoStep {
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">     void setEndingSelection(const VisibleSelection&amp;);
</span><span class="cx">     Element* startingRootEditableElement() const { return m_startingRootEditableElement.get(); }
</span><span class="cx">     Element* endingRootEditableElement() const { return m_endingRootEditableElement.get(); }
</span><del>-    void setTextInsertedByUnapplyRange(const VisiblePositionIndexRange&amp;);
</del><ins>+    void setRangeDeletedByUnapply(const VisiblePositionIndexRange&amp;);
</ins><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     virtual void getNodesInCommand(HashSet&lt;Node*&gt;&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/Source/WebCore/editing/Editor.cpp        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -550,7 +550,7 @@
</span><span class="cx">     if (AXObjectCache::accessibilityEnabled() &amp;&amp; editingAction == EditActionPaste) {
</span><span class="cx">         String text = AccessibilityObject::stringForVisiblePositionRange(command-&gt;visibleSelectionForInsertedText());
</span><span class="cx">         replacedText.postTextStateChangeNotification(document().existingAXObjectCache(), AXTextEditTypePaste, text, m_frame.selection().selection());
</span><del>-        command-&gt;composition()-&gt;setTextInsertedByUnapplyRange(replacedText.replacedRange());
</del><ins>+        command-&gt;composition()-&gt;setRangeDeletedByUnapply(replacedText.replacedRange());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!isContinuousSpellCheckingEnabled())
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTypingCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TypingCommand.cpp (200875 => 200876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TypingCommand.cpp        2016-05-13 19:19:01 UTC (rev 200875)
+++ trunk/Source/WebCore/editing/TypingCommand.cpp        2016-05-13 19:34:48 UTC (rev 200876)
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx">     VisiblePositionIndexRange range;
</span><span class="cx">     range.startIndex.value = indexForVisiblePosition(selection.start(), range.startIndex.scope);
</span><span class="cx">     range.endIndex.value = indexForVisiblePosition(selection.end(), range.endIndex.scope);
</span><del>-    composition()-&gt;setTextInsertedByUnapplyRange(range);
</del><ins>+    composition()-&gt;setRangeDeletedByUnapply(range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TypingCommand::doApply()
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx">     AccessibilityReplacedText replacedText(frame().selection().selection());
</span><span class="cx">     insertText(text, selectInsertedText);
</span><span class="cx">     replacedText.postTextStateChangeNotification(document().existingAXObjectCache(), AXTextEditTypeTyping, text, frame().selection().selection());
</span><del>-    composition()-&gt;setTextInsertedByUnapplyRange(replacedText.replacedRange());
</del><ins>+    composition()-&gt;setRangeDeletedByUnapply(replacedText.replacedRange());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TypingCommand::insertTextRunWithoutNewlines(const String &amp;text, bool selectInsertedText)
</span><span class="lines">@@ -410,7 +410,7 @@
</span><span class="cx">     AccessibilityReplacedText replacedText(frame().selection().selection());
</span><span class="cx">     insertLineBreak();
</span><span class="cx">     replacedText.postTextStateChangeNotification(document().existingAXObjectCache(), AXTextEditTypeTyping, &quot;\n&quot;, frame().selection().selection());
</span><del>-    composition()-&gt;setTextInsertedByUnapplyRange(replacedText.replacedRange());
</del><ins>+    composition()-&gt;setRangeDeletedByUnapply(replacedText.replacedRange());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TypingCommand::insertParagraphSeparator()
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">     AccessibilityReplacedText replacedText(frame().selection().selection());
</span><span class="cx">     insertParagraphSeparator();
</span><span class="cx">     replacedText.postTextStateChangeNotification(document().existingAXObjectCache(), AXTextEditTypeTyping, &quot;\n&quot;, frame().selection().selection());
</span><del>-    composition()-&gt;setTextInsertedByUnapplyRange(replacedText.replacedRange());
</del><ins>+    composition()-&gt;setRangeDeletedByUnapply(replacedText.replacedRange());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TypingCommand::insertParagraphSeparatorInQuotedContent()
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx">     AccessibilityReplacedText replacedText(frame().selection().selection());
</span><span class="cx">     insertParagraphSeparatorInQuotedContent();
</span><span class="cx">     replacedText.postTextStateChangeNotification(document().existingAXObjectCache(), AXTextEditTypeTyping, &quot;\n&quot;, frame().selection().selection());
</span><del>-    composition()-&gt;setTextInsertedByUnapplyRange(replacedText.replacedRange());
</del><ins>+    composition()-&gt;setRangeDeletedByUnapply(replacedText.replacedRange());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool TypingCommand::makeEditableRootEmpty()
</span></span></pre>
</div>
</div>

</body>
</html>