-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UIAsyncTextInput] Adopt APIs to delete, move and extend the selection
https://bugs.webkit.org/show_bug.cgi?id=264711 rdar://118304457 Reviewed by Aditya Keerthi. Adopt the following methods for moving or extending the selection, or deleting text: ``` @protocol UIAsyncTextInput - (void)deleteInDirection:(UITextStorageDirection)direction toGranularity:(UITextGranularity)granularity; - (void)moveInDirection:(UITextStorageDirection)direction byGranularity:(UITextGranularity)granularity; - (void)extendInDirection:(UITextStorageDirection)direction byGranularity:(UITextGranularity)granularity; - (void)moveInLayoutDirection:(UITextLayoutDirection)direction; - (void)extendInLayoutDirection:(UITextLayoutDirection)direction; @EnD ``` This takes the place of the following SPI and IPI selectors in UIKit: ``` -_deleteByWord -_deleteForwardByWord -_deleteToStartOfLine -_deleteToEndOfLine -_deleteToEndOfParagraph -_deleteForwardAndNotify: -_moveUp:withHistory: -_moveDown:withHistory: -_moveLeft:withHistory: -_moveRight:withHistory: -_moveToStartOfWord:withHistory: -_moveToStartOfParagraph:withHistory: -_moveToStartOfLine:withHistory: -_moveToStartOfDocument:withHistory: -_moveToEndOfWord:withHistory: -_moveToEndOfParagraph:withHistory: -_moveToEndOfLine:withHistory: -_moveToEndOfDocument:withHistory: ``` * Source/WebKit/Platform/spi/ios/UIKitSPI.h: Add staging declarations for the new API methods. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView canPerformAction:withSender:]): (-[WKContentView cutForWebView:]): (-[WKContentView toggleBoldfaceForWebView:]): (-[WKContentView toggleItalicsForWebView:]): (-[WKContentView toggleUnderlineForWebView:]): (-[WKContentView _executeEditCommand:]): Rename `-executeEditCommandWithCallback:` to `-_executeEditCommand:`; the existing name is a bit misleading, since it doesn't take a callback. (-[WKContentView _deleteByWord]): (-[WKContentView _deleteForwardByWord]): (-[WKContentView _deleteToStartOfLine]): (-[WKContentView _deleteToEndOfLine]): (-[WKContentView _deleteForwardAndNotify:]): (-[WKContentView _deleteToEndOfParagraph]): (-[WKContentView _transpose]): (-[WKContentView _moveUp:withHistory:]): (-[WKContentView _moveDown:withHistory:]): (-[WKContentView _moveLeft:withHistory:]): (-[WKContentView _moveRight:withHistory:]): (-[WKContentView _moveToStartOfWord:withHistory:]): (-[WKContentView _moveToStartOfParagraph:withHistory:]): (-[WKContentView _moveToStartOfLine:withHistory:]): (-[WKContentView _moveToStartOfDocument:withHistory:]): (-[WKContentView _moveToEndOfWord:withHistory:]): (-[WKContentView _moveToEndOfParagraph:withHistory:]): (-[WKContentView _moveToEndOfLine:withHistory:]): (-[WKContentView _moveToEndOfDocument:withHistory:]): (moveSelectionCommand): (extendSelectionCommand): Add helper methods to return a command (or list of commands) to execute, given `UITextGranularity`, `UITextStorageDirection` and `UITextLayoutDirection`. (-[WKContentView deleteInDirection:toGranularity:]): (-[WKContentView moveInDirection:byGranularity:]): (-[WKContentView moveInLayoutDirection:]): (-[WKContentView extendInDirection:byGranularity:]): (-[WKContentView extendInLayoutDirection:]): (-[WKContentView executeEditCommandWithCallback:]): Deleted. Canonical link: https://commits.webkit.org/270671@main
- Loading branch information
Showing
2 changed files
with
215 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters