REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 21:49:36 +0000 (21:49 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 21:49:36 +0000 (21:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133237
<rdar://problem/16655776>

Reviewed by Ryosuke Niwa.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView beginSelectionChange]):
(-[WKContentView endSelectionChange]):

When the selection is changed with a gesture in an editable element,
we must notify the keyboard to make sure the autocorrection engine
updates its typing context. WKContentView must implement
beginSelectionChange and endSelectionChange to call into
the keyboard layer.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm

index 25da927..3ea4b9d 100644 (file)
@@ -1,3 +1,21 @@
+2014-05-23  Enrica Casucci  <enrica@apple.com>
+
+        REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
+        https://bugs.webkit.org/show_bug.cgi?id=133237
+        <rdar://problem/16655776>
+
+        Reviewed by Ryosuke Niwa.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView beginSelectionChange]):
+        (-[WKContentView endSelectionChange]):
+
+        When the selection is changed with a gesture in an editable element,
+        we must notify the keyboard to make sure the autocorrection engine 
+        updates its typing context. WKContentView must implement
+        beginSelectionChange and endSelectionChange to call into
+        the keyboard layer.
+
 2014-05-22  Brent Fulgham  <bfulgham@apple.com>
 
         [iOS] WK2: Provide implementation for windowFrame
index aa66c5e..ec3227f 100644 (file)
@@ -1597,6 +1597,16 @@ static void selectionChangedWithTouch(bool error, WKContentView *view, const Web
 // Keyboard interaction
 // UITextInput protocol implementation
 
+- (void)beginSelectionChange
+{
+    [self.inputDelegate selectionWillChange:self];
+}
+
+- (void)endSelectionChange
+{
+    [self.inputDelegate selectionDidChange:self];
+}
+
 - (NSString *)textInRange:(UITextRange *)range
 {
     return nil;