235 Commits

Author SHA1 Message Date
Chris Bracken
819a40bc22 Smarter text/selection will/didChange events (flutter/engine#3699)
Check incoming text editing state and only fire textWillChange:,
textDidChange:, selectionWillChange:, selectionDidChange: when the text
or selection actually changes.

On selectionWillChange: in a text field where auto-correct is enabled,
iOS will attempt to auto-correct the word preceding the cursor. This
change also updates the text before calling selectionWillChange: to
prevent auto-correction on the preceding value of the text field.
2017-05-17 19:36:27 -07:00
Ian Hickson
ef706ef6f7 Fix a11y an Android (flutter/engine#3694)
The core problem was multiplying matrices the wrong way around.

While I was there I did some minor cleanup. I think that may have
fixed another bug relating to A11Y turning on or off improperly, but
since I never figured out the steps to reproduce, it's hard to tell.

Fixes https://github.com/flutter/flutter/issues/7205
Fixes https://github.com/flutter/flutter/issues/10059 (maybe)
2017-05-16 10:31:53 -07:00
Ian Hickson
cf8689ffa2 Move the test runner to a higher DPI screen. (flutter/engine#3688)
Having the device pixel ratio of the test shell be 1.0x makes it
unlikely that we will catch errors relating to mishandling of the
device pixel ratio in the test shell.

This patch arbitrarily increases the device pixel resolution while
keeping the logical resolution the same.
2017-05-15 13:18:56 -07:00
Chris Bracken
074cca0906 Adjust bottom padding correctly on iOS keyboard hide (flutter/engine#3684)
Handle willChangeFrame to handle keyboard show, resize, reposition
(split, move floating keyboard) events. Handle willBeHidden events for
keyboard dismissal.

Fixes incorrect bottom padding introduced in
4103fe7a4006409bbf7e1ad1b06c1f6fbdd12632 due to didChangeFrame
notification firing after willBeHidden on keyboard dismissal.
2017-05-11 10:07:37 -07:00
Chris Bracken
4103fe7a40 Update view padding on iOS keyboard frame change (flutter/engine#3681) 2017-05-10 16:35:58 -07:00
Mikkel Nygaard Ravn
27fcb31df5 Forward openURL requests to plugins (flutter/engine#3679) 2017-05-10 23:51:13 +02:00
Chris Bracken
3701c34de0 Set Android keyboard actionLabel only if non-null (flutter/engine#3677) 2017-05-10 12:20:03 -07:00
Sarah Zakarias
dfa8cc86a4 Remove urlLauncher and pathProvider from FlutterPlatformPlugin (flutter/engine#3673) 2017-05-10 13:42:13 +02:00
Mikkel Nygaard Ravn
6d6e19b682 Fix iOS plugin reg docs (flutter/engine#3672) 2017-05-10 08:40:14 +02:00
Chris Bracken
08bbbdfe3f Disable auto-correct for text editing when obscureText is set (flutter/engine#3661) 2017-05-09 14:55:58 -07:00
Mikkel Nygaard Ravn
55e8e08e75 Add documentation to iOS plugin registry (flutter/engine#3665) 2017-05-09 11:26:02 +02:00
Mikkel Nygaard Ravn
536aa72373 Use older openURL signature (flutter/engine#3660) 2017-05-08 23:29:59 +02:00
Mikkel Nygaard Ravn
4ae1c00a9e Add uikit import (flutter/engine#3659) 2017-05-08 22:53:04 +02:00
Mikkel Nygaard Ravn
53e3237cfb iOS plugin registry (flutter/engine#3645) 2017-05-08 21:45:23 +02:00
Mikkel Nygaard Ravn
d0fb164548 Android plugin registry (flutter/engine#3641) 2017-05-08 21:44:49 +02:00
Chris Bracken
6010385a81 Default return key behaviour to 'done' on iOS (flutter/engine#3655)
This change brings iOS return key behaviour in line with current behaviour on
Android.

* Implements TextInputClient.performAction for iOS Adds FlutterTextInputAction
* enum Defaults return key to 'Done' Ends editing and hides the keyboard if
* 'Done' is pressed

Future work is planned to support configurable return/action key behaviour.
See: #9573, #9210, #8028.
2017-05-05 17:40:52 -07:00
Adam Barth
394d367b3f Retrieve the last error from the proper thread (flutter/engine#3649)
Previously, the last error was a global static. Now it is a thread-specific
value, which means we need to visit the UI thread to read the value.
2017-05-04 21:30:39 -07:00
Todd Volkert
855f18ecc1 Add ipv6 flag to shell. (flutter/engine#3646)
It controls whether the observatory and diagnostic server will
bind to the IPv6 loopback address rather than the IPv4.

Fixes https://github.com/flutter/flutter/issues/9813
2017-05-04 19:35:59 -07:00
Adam Barth
52247beb87 Make microtask queue be per thread (flutter/engine#3644)
Previously, it was a static. Doesn't have much effect in practice because we
only use this microtask queue for main isolates, which exist on a single
thread.
2017-05-04 15:06:43 -07:00
Florin Malita
f96707733a Add missing Skia includes (flutter/engine#3642)
We are removing some indirect includes from SkCanvas.h.

Updating clients to pull required headers explicitly.
2017-05-02 10:17:11 -07:00
Chinmay Garde
e9fc94b879 When pasting an item of type kTextPlainFormat from the pasteboard, ensure there actually is a string in the pasteboard. (flutter/engine#3638) 2017-04-28 15:02:22 -07:00
Mikkel Nygaard Ravn
77454f6ebf Document channel message value conversions (flutter/engine#3633) 2017-04-28 23:31:11 +02:00
Chris Bracken
f0f09665d3 Clamp iOS selection to 0 < pos < length (flutter/engine#3636) 2017-04-27 16:04:30 -07:00
Mikkel Nygaard Ravn
a20aac4525 Fix corner case errors in platform channels (flutter/engine#3631) 2017-04-27 07:52:56 +02:00
P.Y. Laligand
47e891cc1d Don't build the full FlutterTester bundle on Fuchsia. (flutter/engine#3629)
The flutter_tester executable works just fine.
2017-04-26 10:37:28 -07:00
Chinmay Garde
b313dac389 Call SkGraphics::Init on shell initialization. (flutter/engine#3628)
This ensures SkOpts are initialized before we start using Skia.
2017-04-25 21:47:09 -07:00
P.Y. Laligand
8e74a31abd Allow Flutter shell to build for a Mac Fuchsia host. (flutter/engine#3625) 2017-04-25 07:38:08 -07:00
P.Y. Laligand
3e74263ff6 Fix -Wmissing-field-initializer warning on Fuchsia. (flutter/engine#3624) 2017-04-24 14:06:37 -07:00
Chinmay Garde
b1c35cc789 Remove fml::ThreadChecker and use the one in ftl. (flutter/engine#3623) 2017-04-24 12:22:10 -07:00
Mikkel Nygaard Ravn
9d88b0af24 Add hasArgument convenience to MethodCall (flutter/engine#3612) 2017-04-22 14:04:03 +02:00
xster
7900afc2fa Keep resident runner connected on iOS when screen locks in debug mode (flutter/engine#3610)
* Add debug mode background

* Review notes
2017-04-19 18:00:06 -07:00
Mikkel Nygaard Ravn
ffa3154595 Clarify semantics of channel-related errors (flutter/engine#3607)
Mainly improvements to javadoc and error logging. A bit of refactoring.
2017-04-19 21:53:46 +02:00
Chinmay Garde
18bfdff87e Fix Android Vulkan build. (flutter/engine#3606) 2017-04-18 16:26:37 -07:00
Mikkel Nygaard Ravn
4c457165be Make naming consistent across channel APIs (flutter/engine#3574) 2017-04-18 14:30:31 +02:00
Chinmay Garde
926c6c3794 Update Skia to 30229ac6282981c28ced8f513c8d09684d9d0581 and fix build. (flutter/engine#3602)
* Update Skia to 30229ac6282981c28ced8f513c8d09684d9d0581 and fix build.
* Update licenses.
2017-04-17 17:27:26 -07:00
Chinmay Garde
54d846b871 Only log about resource context setup failures on debug builds. (flutter/engine#3601)
We were unnecessarily alarming users when they used the software backend. Fixes https://github.com/flutter/flutter/issues/9394
2017-04-17 14:26:51 -07:00
Chinmay Garde
97af2def3e Add support for scaling the GPUSurfaceSoftware. (flutter/engine#3600) 2017-04-17 14:07:22 -07:00
Chinmay Garde
6ca8610bc4 Avoid creating a CGContextRef when generating a CGImageRef from a Skia pixmap. (flutter/engine#3599)
Also, adds trace events so profiling the software backend is easier.
2017-04-17 13:00:58 -07:00
Chris Bracken
cb02ed2518 Correct handling for composed character ranges at text.length (flutter/engine#3590)
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.
2017-04-13 11:48:59 -07:00
Chris Bracken
fc2bbd7124 Eliminate UITextInput.textContentType (flutter/engine#3587)
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.
2017-04-12 11:37:54 -07:00
Chris Bracken
e0d4f1305b Initial implementation of UITextInput protocol (flutter/engine#3586)
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
2017-04-12 11:04:26 -07:00
Chris Bracken
409824cedc Update Objective-C column limit to 100 (flutter/engine#3585)
The Google style guide specifies a limit of 100 columns.
https://google.github.io/styleguide/objcguide.xml?showone=Line_Length#Line_Length

The Chromium style guide specifies 80.
https://chromium.googlesource.com/chromium/src/+/master/styleguide/objective-c/objective-c.md
2017-04-11 15:14:00 -07:00
Ryan Macnak
32cd986649 AOT for Fuchsia. (flutter/engine#3570) 2017-04-11 14:53:14 -07:00
Ryan Macnak
ec2be075b2 Adjust GN for removal of libdart, take two. (flutter/engine#3584)
Update targets only included in host_debug_unopt.
2017-04-11 09:52:54 -07:00
Ryan Macnak
e869784502 Revert "Adjust GN for removal of libdart. (#3583)"
This reverts commit bb091fd4558c3807e86fe518d036504ebc37bb72.
2017-04-10 17:07:28 -07:00
Ryan Macnak
bb091fd455 Adjust GN for removal of libdart. (flutter/engine#3583) 2017-04-10 16:42:27 -07:00
Chinmay Garde
d73e56bff3 Package test fonts on the debug runtime mode. (flutter/engine#3582) 2017-04-10 15:41:09 -07:00
Mikkel Nygaard Ravn
f3459f540e Add convenience accessors to get arguments from MethodCall w/o unchecked warnings (flutter/engine#3559) 2017-04-09 17:36:05 +02:00
Mikkel Nygaard Ravn
eb4cc7f8e9 Update unit test to also handle null and zero-byte message differently (flutter/engine#3579) 2017-04-09 00:34:43 +02:00
Mikkel Nygaard Ravn
12745a7b02 Distinguish between null platform message and one with zero-byte payload (flutter/engine#3577) 2017-04-09 00:07:28 +02:00