WebEditorClient should properly write to m_rangeForCandidates
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2016 23:34:06 +0000 (23:34 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2016 23:34:06 +0000 (23:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157003
-and corresponding-
rdar://problem/25910418

Reviewed by Tim Horton.

Actually write to m_rangeForCandidates instead of declaring a local variable
of the same name. :-/
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::requestCandidatesForSelection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm

index b3ee31e..620a8d8 100644 (file)
@@ -1,3 +1,17 @@
+2016-04-25  Beth Dakin  <bdakin@apple.com>
+
+        WebEditorClient should properly write to m_rangeForCandidates
+        https://bugs.webkit.org/show_bug.cgi?id=157003
+        -and corresponding-
+        rdar://problem/25910418
+
+        Reviewed by Tim Horton.
+
+        Actually write to m_rangeForCandidates instead of declaring a local variable 
+        of the same name. :-/
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::requestCandidatesForSelection):
+
 2016-04-23  Andy Estes  <aestes@apple.com>
 
         Fix issues found by the clang static analyzer
index 32123ce..854d97d 100644 (file)
@@ -1153,7 +1153,7 @@ void WebEditorClient::requestCandidatesForSelection(const VisibleSelection& sele
 
     int lengthToSelectionStart = TextIterator::rangeLength(makeRange(paragraphStart, selectionStart).get());
     int lengthToSelectionEnd = TextIterator::rangeLength(makeRange(paragraphStart, selectionEnd).get());
-    NSRange m_rangeForCandidates = NSMakeRange(lengthToSelectionStart, lengthToSelectionEnd - lengthToSelectionStart);
+    m_rangeForCandidates = NSMakeRange(lengthToSelectionStart, lengthToSelectionEnd - lengthToSelectionStart);
     m_paragraphContextForCandidateRequest = plainText(makeRange(paragraphStart, paragraphEnd).get());
 
     NSTextCheckingTypes checkingTypes = NSTextCheckingTypeSpelling | NSTextCheckingTypeReplacement | NSTextCheckingTypeCorrection;