Title: [171782] trunk/Source/WebKit2
Revision
171782
Author
enr...@apple.com
Date
2014-07-29 17:17:45 -0700 (Tue, 29 Jul 2014)

Log Message

REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
https://bugs.webkit.org/show_bug.cgi?id=135392
<rdar://problem/17760073>

Reviewed by Benjamin Poulain.

Adding a shortcut to the user dictionary needs to be available in non editable content too.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (171781 => 171782)


--- trunk/Source/WebKit2/ChangeLog	2014-07-30 00:15:06 UTC (rev 171781)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-30 00:17:45 UTC (rev 171782)
@@ -1,3 +1,16 @@
+2014-07-29  Enrica Casucci  <enr...@apple.com>
+
+        REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
+        https://bugs.webkit.org/show_bug.cgi?id=135392
+        <rdar://problem/17760073>
+
+        Reviewed by Benjamin Poulain.
+
+        Adding a shortcut to the user dictionary needs to be available in non editable content too.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _addShortcut:]):
+
 2014-07-29  Tim Horton  <timothy_hor...@apple.com>
 
         WKPDFView paints rotated pages squished

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (171781 => 171782)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-07-30 00:15:06 UTC (rev 171781)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-07-30 00:17:45 UTC (rev 171782)
@@ -136,6 +136,10 @@
 - (void)scheduleChineseTransliterationForText:(NSString *)text;
 @end
 
+@interface UIWKSelectionAssistant (StagingToRemove)
+- (void)showTextServiceFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect;
+@end
+
 @interface UIKeyboardImpl (StagingToRemove)
 - (void)didHandleWebKeyEvent;
 @end
@@ -1174,6 +1178,8 @@
 {
     if (_textSelectionAssistant && [_textSelectionAssistant respondsToSelector:@selector(showTextServiceFor:fromRect:)])
         [_textSelectionAssistant showTextServiceFor:[self selectedText] fromRect:_page->editorState().selectionRects[0].rect()];
+    else if (_webSelectionAssistant && [_webSelectionAssistant respondsToSelector:@selector(showTextServiceFor:fromRect:)])
+        [_webSelectionAssistant showTextServiceFor:[self selectedText] fromRect:_page->editorState().selectionRects[0].rect()];
 }
 
 - (NSString *)selectedText
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to