250 Commits

Author SHA1 Message Date
Chris Bracken
bd09286e4a Improve auto-correct disabling on Android when obscureText is true (#3731)
Some keyboards (e.g., on some Samsung devices, SwiftKey) ignore
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS and require
InputType.TYPE_TEXT_VARIATION_PASSWORD.
2017-06-02 15:50:23 -07:00
Michael Goderbauer
28e50a6291 Fix crash when iOS accessibility is turned off and then on again (#3732) 2017-06-02 15:50:12 -07:00
Chris Bracken
5cd58ba4fa Add support for TextInputType.url (#3730)
Adds support for requesting a platform keyboard optimised for entering
URLs.
2017-06-02 15:13:37 -07:00
Chris Bracken
f990f8b0d3 Add support for TextInputType.emailAddress (#3729)
Adds support for requesting a platform keyboard optimised for entering
email addresses.
2017-06-02 15:04:35 -07:00
Gary Qian
09de6f79da Add software as fallback if Vulkan and OpenGL fails (#3725) 2017-06-01 17:50:03 -07:00
Gary Qian
1f2aa07571 Add flags for enabling software rendering in FlutterActivity (#3724) 2017-06-01 13:53:12 -07:00
Gary Qian
796259c089 Allow switching to the software rendering backend on Android. (#3719)
* Enable software rendering backend on android. Add "enable-software-rendering" flag.

* Fix variable naming and threading.
2017-05-31 17:27:47 -07:00
Michael Goderbauer
249fab6b10 [iOS accessibility] Dispatch taps to selected element (#3718)
Previously, taps were sent to the topmost tap handler in the center of the accessibility frame of the selected element nd therefore might have been handled by a different element than the desired one.
2017-05-30 16:53:10 -07:00
Chris Bracken
75c74dc463 Add inactive, suspending ApplicationLifecycleState values (#3713)
**This is a breaking change on iOS**

Previously, the `paused` state was entered when the application resigned
active status. `inactive` now maps to this status. `paused` now maps to
an app that has been backgrounded.

`inactive` is currently emitted on iOS only and corresponds to iOS's
foreground inactive state.

Current state transitions are:
`resumed` <--> `inactive` <--> `paused`

suspending is currently emitted on Android only and corresponds to the
transition to Android's stopped state.

Current state transitions are:
`resumed` <--> `paused` --> `suspending` --> `resumed`

These transitions may change in future.
2017-05-24 16:34:34 -07:00
xster
acb3816ed1 Fix a typo (#3710)
I weaksauced
2017-05-23 18:12:02 -07:00
Michael Goderbauer
6187779e9c Use children's labels if element doesn't have one (#3709)
Android seems to do this by default. This way, if you select a table cell it will read the content of that cell.
2017-05-23 14:50:26 -07:00
Michael Goderbauer
69b75b5810 Fix crash in iOS accessibility (#3706)
* Fix crash in iOS accessbility

Previously, whenever an action would remove the focused element from the screen the app would crash. This change tells iOS to focus the first on-screen element after every change to the semantics tree. This avoids the crash.

In a future iteration, we should tell iOS which element it needs to focus by looking at the sematnics tree (instead of leaving it up to the iOS).

* Better handle the case were the focused element stays on the screen

* review comments
2017-05-23 13:14:56 -07:00
Chris Bracken
5a7e862cbe Update iOS HapticFeedback.vibrate implementation (#3702)
Use AudioServicesPlaySystemSound instead of AudioServicesPlayAlertSound.
This avoids the potential of a system beep on devices without support
for haptic feedback.
2017-05-19 17:01:36 -07:00
Michael Goderbauer
dac0841394 AX fixes for scrolling on iOS (#3701)
Scrollable elements can now be scrolled in accessibility mode and they scroll in the right direction.

Note: App crashes right after scroll finishes (that's a separate problem as the app currently crashes after every action performed in accessibility mode).
2017-05-19 15:08:08 -07:00
Michael Goderbauer
9db5ebee2c AX fixes for iOS (#3700)
* AX fixes for iOS

With this, the accessibility frame (for VoiceOver, etc.) is drawn at the right position around a widget.

* review comments
2017-05-19 10:22:56 -07:00
Chris Bracken
82815836eb Smarter text/selection will/didChange events (#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
0d94214df4 Fix a11y an Android (#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
87398c9c77 Move the test runner to a higher DPI screen. (#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
f99d3ef108 Adjust bottom padding correctly on iOS keyboard hide (#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
f2581c9bcc32f9e2e7372eb7e94a8aa9f5aab0b2 due to didChangeFrame
notification firing after willBeHidden on keyboard dismissal.
2017-05-11 10:07:37 -07:00
Chris Bracken
f2581c9bcc Update view padding on iOS keyboard frame change (#3681) 2017-05-10 16:35:58 -07:00
Mikkel Nygaard Ravn
006ae2fef4 Forward openURL requests to plugins (#3679) 2017-05-10 23:51:13 +02:00
Chris Bracken
813623a3f8 Set Android keyboard actionLabel only if non-null (#3677) 2017-05-10 12:20:03 -07:00
Sarah Zakarias
d51126b56b Remove urlLauncher and pathProvider from FlutterPlatformPlugin (#3673) 2017-05-10 13:42:13 +02:00
Mikkel Nygaard Ravn
cb5a86a1dc Fix iOS plugin reg docs (#3672) 2017-05-10 08:40:14 +02:00
Chris Bracken
ce14f6907b Disable auto-correct for text editing when obscureText is set (#3661) 2017-05-09 14:55:58 -07:00
Mikkel Nygaard Ravn
cbbf956fcb Add documentation to iOS plugin registry (#3665) 2017-05-09 11:26:02 +02:00
Mikkel Nygaard Ravn
432fc1db4c Use older openURL signature (#3660) 2017-05-08 23:29:59 +02:00
Mikkel Nygaard Ravn
5e6bd48aa5 Add uikit import (#3659) 2017-05-08 22:53:04 +02:00
Mikkel Nygaard Ravn
bf2166b659 iOS plugin registry (#3645) 2017-05-08 21:45:23 +02:00
Mikkel Nygaard Ravn
b273d1ad04 Android plugin registry (#3641) 2017-05-08 21:44:49 +02:00
Chris Bracken
1b01211ee6 Default return key behaviour to 'done' on iOS (#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
9cfc67ef57 Retrieve the last error from the proper thread (#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
f5d92bee15 Add ipv6 flag to shell. (#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
da0b1f5a36 Make microtask queue be per thread (#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
0ae7e47e7e Add missing Skia includes (#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
ffabe5ac10 When pasting an item of type kTextPlainFormat from the pasteboard, ensure there actually is a string in the pasteboard. (#3638) 2017-04-28 15:02:22 -07:00
Mikkel Nygaard Ravn
da8ebf40bd Document channel message value conversions (#3633) 2017-04-28 23:31:11 +02:00
Chris Bracken
7c699ce772 Clamp iOS selection to 0 < pos < length (#3636) 2017-04-27 16:04:30 -07:00
Mikkel Nygaard Ravn
3211d2fca2 Fix corner case errors in platform channels (#3631) 2017-04-27 07:52:56 +02:00
P.Y. Laligand
faa4aba80f Don't build the full FlutterTester bundle on Fuchsia. (#3629)
The flutter_tester executable works just fine.
2017-04-26 10:37:28 -07:00
Chinmay Garde
cfcf10bb41 Call SkGraphics::Init on shell initialization. (#3628)
This ensures SkOpts are initialized before we start using Skia.
2017-04-25 21:47:09 -07:00
P.Y. Laligand
4f8a92ae40 Allow Flutter shell to build for a Mac Fuchsia host. (#3625) 2017-04-25 07:38:08 -07:00
P.Y. Laligand
2e7e40c5a7 Fix -Wmissing-field-initializer warning on Fuchsia. (#3624) 2017-04-24 14:06:37 -07:00
Chinmay Garde
5757991fe9 Remove fml::ThreadChecker and use the one in ftl. (#3623) 2017-04-24 12:22:10 -07:00
Mikkel Nygaard Ravn
264b7a6dd5 Add hasArgument convenience to MethodCall (#3612) 2017-04-22 14:04:03 +02:00
xster
a5b64899c9 Keep resident runner connected on iOS when screen locks in debug mode (#3610)
* Add debug mode background

* Review notes
2017-04-19 18:00:06 -07:00
Mikkel Nygaard Ravn
4eed7d2732 Clarify semantics of channel-related errors (#3607)
Mainly improvements to javadoc and error logging. A bit of refactoring.
2017-04-19 21:53:46 +02:00
Chinmay Garde
6b2bc8cf2b Fix Android Vulkan build. (#3606) 2017-04-18 16:26:37 -07:00
Mikkel Nygaard Ravn
2a4434a058 Make naming consistent across channel APIs (#3574) 2017-04-18 14:30:31 +02:00
Chinmay Garde
b4a02debaa Update Skia to 30229ac6282981c28ced8f513c8d09684d9d0581 and fix build. (#3602)
* Update Skia to 30229ac6282981c28ced8f513c8d09684d9d0581 and fix build.
* Update licenses.
2017-04-17 17:27:26 -07:00