Ensure that both self.text and self.selectedTextRange are updated before
triggering textDidChange: or selectionDidChange: on the input delegate
(which then re-computes positions). This prevents inconsistencies in
selection vs text position/offset lookups triggered by didChange
notifications.
Ensure that rangeOfComposedCharacterSequenceAtIndex: is only ever called
for index values > 0 && < self.text.length. This prevents such calls for
position with index == self.text.length.
Also reduces unnecessary textDidChange/selectionDidChange notifications:
replaceRange:withText: and setMarkedText:selectedRange: are only ever
called by UIKit and methods called by UIKit (insertText,
deleteBackward), so notification is unnecessary.
textContentType was added in iOS 10, and we target iOS 8. Either way the
framework doesn't (yet) include support for this; keyboard type covers
most bases.
Supports:
* autocorrect, suggestions view/selection.
* Support for Chinese, Japanese, Korean and other languages using
multi-stage input with candidate selection.
* styling the composing (mark) region for multi-stage input
* key-repeat when backspace held down
* physical and soft keyboard support for arrow key cursor movement and
selection.
* improved third-party keyboard support
Does not yet support:
* force-touch drag cursor positioning
* auto-positioning the candidates view for multi-stage input methods
when used with a physical keyboard (e.g., iPad Pro) currently
positioned at 0,0.
* voice dictation
Ensure selection base is updated when deleting surrogates
This fixes a bug in which the selection base was not updated when
deleting at index of the trailing char of a Unicode surrogate,
introduced in d3149a5875404a4dacc7e4dde9c96045e2cbe6e5.
Minor refactor to consolidate logic around NSRange.
* Maintain FlutterTextInputView text in NSMutableString
We were converting from/to NSString at the interface of
FlutterTextInputView; instead use NSMutableString to maintain the
internal buffer.
Eliminates nsstring_utils.{h,mm} which no longer has any users.
* Name the platform thread in the timeline. This does not affect (nor is it affected by) the pthread name set by the embedder.
* Make it easier in the timeline to see not only when the frame was request, but also when that frame request was fulfilled.
* Trace message loop wakes.
FragmentActivity is required for plugins that use auto managed Google APIs, such as Google Sign-In. Requires flutter/flutter#9036 to land so that gradle builds include FragmentActivity.
The Android and iOS versions of this function had diverged. This patch
makes the iOS version match the Android version (and what the framework
expects).
Fixes https://github.com/flutter/flutter/issues/8878
Breaking change: removed facilities for JSON and string messaging from FlutterView/FlutterViewController, leaving only binary messaging there. All other use of flutter communication now goes through FlutterMessageChannel and FlutterMethodChannels. Retained use of String and JSON codecs for now.
Companion flutter PR: flutter/flutter#8837
* Perform all iOS logging through ASL
As of iOS 10, ASL is deprecated and replaced with os_log. ASL calls
continue to result in logging but as of iOS 10.3, only ASL_LOG_NOTICE
level and above are logged.
This change partially reverts d67972d649157582358876f90a99577cb3708e82,
adding back stdout and stderr redirection, which resulted in loss of
some direct writes to stdout that were necessary for debugging.
This change replaces the direct use of syslog with ASL on iOS, which
Apple has stated will continue to log on iOS >= 10. This eliminates the
need for the previous fwd-declaration of syslog.
ASL is deprecated and replaced by os_log() on iOS. As of iOS 10.3,
calling this function breaks our logging altogether. os_log isn't
available pre-iOS 10.0. Rather than implement version checks and
conditional logic, this change eliminates the existing redirection
altogether. All engine code should be logging via the syslog redirection
implemented in Logger_PrintString in dart_runtime_hooks.cc.
Since stdio redirection is eliminated, we eliminate the flag that
controls whether such redirection is enabled.