428 Commits

Author SHA1 Message Date
Alexander Aprelev
cdf869bcd7
When running on iOS deduce bundle path during engine initialization. (#4532) 2018-01-10 17:40:47 -08:00
Mikkel Nygaard Ravn
84fc920fde
Deprecate support for big integers in standard message codec (#4528) 2018-01-09 23:58:45 +01:00
Mehmet Fidanboylu
9b98d194f2
Fix build break caused by https://github.com/flutter/engine/pull/4491 (#4524) 2018-01-07 07:51:46 -08:00
Mehmet Fidanboylu
d43ae0b41b
Add unwrap to JSONUtil (#4491)
We have a use for this for the internal messaging plugin. Instead of rolling our own, it made sense to add it here especially since it has the mirror functionality (wrap).
2018-01-06 14:32:00 -08:00
Jason Simmons
e1b01d7d7b
API version check for AccessibilityNodeInfo.setEditable call (#4522)
Fixes https://github.com/flutter/flutter/issues/13896
2018-01-05 14:45:35 -08:00
Michael Goderbauer
12e0e38a8b
Split SemanticsFlags.isDisabled into two (#4517) 2018-01-04 15:15:54 -08:00
Alexander Aprelev
6bacf4522e
This adds RPC call to set asset path. (#4323)
* This adds rpc call to simply set asset path.

This is needed when doing hot reload to pick up updated assets.

* Move asset_directory fetch for after view_id. Clean up return. Fix formatting.

* Add SetAssetBundlePath methods implementations for mac and ios

* Fix mac mm

* Fix formatting

* Merge and use nullptr
2018-01-04 09:48:01 -08:00
Sigurd Meldgaard
9efcd5371a
Apply texture transform on Android (#4513)
* Apply transform to textures on android
2018-01-04 16:04:30 +01:00
Siva
0f0b144b03
Add support for --strong option in the engine, create a strong mode version of the platform file (#4504)
* Add a --strong option to the front end server so we can use strong mode with preview-dart-2.

* Plumb the --strong option through the dart controller into the VM.

* - Build a strong version of platform.dill for use with the engine.
- Fix a strong mode static error in the assert statement

* Enable asserts when running debug version even in strong mode.

* Use the correct platform dill file for linking when doing the aot builds.

* Fix formatting issue.
2018-01-03 16:52:24 -08:00
Alexander Aprelev
b6c9ca5552
Revert "Apply transform to textures on android (#4486) (#4507)" (#4510)
This reverts commit 368380cfe1ddcfb8e884b411050bbe6f8d5eb8a5.

This breaks Flutter external_ui test.
2018-01-03 12:37:39 -08:00
Sigurd Meldgaard
368380cfe1
Apply transform to textures on android (#4486) (#4507)
* Apply transform to textures on android
2018-01-03 11:45:28 +01:00
Michael Goderbauer
26010cf483
Add SemanticsFlag.isDisabled (#4503) 2018-01-02 15:57:52 -08:00
Alexander Aprelev
0a93f9ffbf
Revert "Apply transform to textures on android (#4486)" (#4502)
This reverts commit eee4a1ed821e98922476f2ce0b1e99ce1a606704.

Original commit caused external_ui integration test failure on Android.
2018-01-02 13:40:27 -08:00
Mikkel Nygaard Ravn
288897bb46
Fix API typo (#4487) 2018-01-02 15:32:53 +01:00
Sigurd Meldgaard
eee4a1ed82
Apply transform to textures on android (#4486)
* Apply transform to textures on android

* Use RAII canvas save
2017-12-22 11:15:32 +01:00
Sarah Zakarias
00e9b362d5
Read FlutterAssetsDir from the Android manifest XML file (#4485) 2017-12-21 09:26:16 +01:00
Michael Goderbauer
937bde8f98
A11y nodes with only value or hint are focusable (#4481) 2017-12-20 11:15:10 -08:00
Sarah Zakarias
4cbe26dd37
Handle Flutter assets outside FLX (#4343) 2017-12-13 10:55:24 +01:00
Michael Goderbauer
e07eafae1d
Roll forward: Parameters for SemanticActions; a11y text selection (#4452)
Reverts the revert in #4448 with fixes to pass on the bot.

This change will require framework changes in flutter/flutter#13490.
2017-12-12 14:25:45 -08:00
najeira
4ea7075c1d Map iOS touches to Flutter view coordinate system (#4425)
This change ensures that touches are mapped to the Flutter view
co-ordinate system. In the case of a Flutter view that doesn't share the
same origin and orientation as the screen co-ordinate system, touches
were appled in the wrong location. This bug affected Flutter views whose
origin was not the screen origin and Flutter apps running with the
in-call status bar on iPhones other than the iPhone X.
2017-12-12 13:22:53 -08:00
Chris Bracken
6c6b709b2c
Model Android keyboard height as view inset (#4447)
Model top and side system insets as padding and bottom (keyboard) as a
view inset. This avoids applying system insets twice (once as an inset,
once as padding).
2017-12-12 11:04:42 -08:00
Michael Goderbauer
056fd4597f
Revert " Add parameters to SemanticActions; implement extend selection for a11y (#4444)" (#4448)
This reverts commit 59c3a37e6436d60381d9708113228c83ccc6b7f9.
2017-12-12 10:53:15 -08:00
Michael Goderbauer
59c3a37e64
Add parameters to SemanticActions; implement extend selection for a11y (#4444) 2017-12-12 10:06:04 -08:00
Jason Simmons
aaa758d619
Check for a detached FlutterNativeView before sending messages (#4445)
Fixes https://github.com/flutter/flutter/issues/13481
2017-12-11 17:15:21 -08:00
Chris Bracken
edb0201fa2
Support iOS scroll-to-top tap on iPhone X (#4436)
This adds support for scrolling the primary scroll view to the top on
status bar touches, on the iPhone X.

Notes:
1. The iPhone X status bar doesn't change height when in in-call/etc.
   mode, and unlike other iPhones, does scroll to top when in in-call mode.
2. No matter which model of iOS device, the top safe area inset doesn't
   change when in in-call mode. In in-call mode, the OS reduces the app
   view height by 20px off the top, and the double-height 'in-call' status
   bar covers this new inset (outside the view) and there continues to be a
   20px safe area in the app.

On iOS 11, rather than comparing status bar height to a hardcoded 20px
'standard height' we now compare to the top safe area inset (which is
always the standard status bar height, regardless of device). On iOS
versions prior to iOS 11, we use the previous logic.

Fixes flutter/flutter#13439
2017-12-08 19:36:53 -08:00
Chinmay Garde
e8526e6fd3
Add macros to mark APIs as being deprecated or unavailable. (#4401) 2017-12-08 13:30:45 -08:00
Chris Bracken
8e39760168
Expose keyboard height as view inset on iOS (#4428)
Keyboard height is now treated as a view inset, which could be used to
shrink the content area of the app as is done in the Material Scaffold,
rather than padding, which is used to indicate content areas where user
interaction should be avoided.
2017-12-07 18:37:46 -08:00
Jason Simmons
a2f488ac7f
Do not report a cursor location if there is no active selection (#4427)
Fixes https://github.com/flutter/flutter/issues/13398
2017-12-07 17:43:51 -08:00
Michael Goderbauer
fb44dce8c2
A11y cursor movements for text fields on Android (#4419)
* a11y cursor movement by character

* focus fixes

* doc fixes
2017-12-06 15:46:35 -08:00
Chris Bracken
a94e88200a
Set window.viewInsets.bottom to keyboard height on iOS (#4420)
This allows for us to start migrating framework classes (notably
Scaffold) to use window.viewInsets.bottom to get the keyboard height.
Once framework updates have landed, we will land an engine patch to
expose the iOS bottom safe area inset as padding.

This change is already landed for Android.

Related issue: flutter/flutter#12098
2017-12-06 15:06:12 -08:00
Chris Bracken
033daf152d
Update the iOS mark region on setTextInputState (#4418)
Previously, we failed to clear/update the mark text range on updates
from the framework. This resulted in a crash if the incoming text value
was shorter than the current mark range when iOS attempts to extract the
mark range substring from the text.

Fixes flutter/flutter#12585
2017-12-06 11:30:14 -08:00
Brian Osman
443c5e4c5b
Disable linear blending on iOS simulator (#4413)
Fixes flutter/flutter#13308

Overlooked this case when I previously removed linear blending. MakeS32 creates a surface with a color space attached (triggering the linear blending behavior). MakeN32 creates a legacy surface (no color space), which matches what the other backend bindings do (including the GL surface factory, and the raster cache).
2017-12-05 08:38:53 -05:00
xster
22e63c3d05
Block image decoding on iOS in the background (#4384)
* Add synchronization to ResourceContext usage

* debug

* Use unique ptr factory

* formatting

* left more notes for future readers
2017-12-01 12:09:00 -08:00
Ben Konyi
74a2d90530
Changes to assets/ build/ flow/ runtime/ and shell/ to allow for compilation on Windows (#4407)
Made changes to assets/ build/ flow/ runtime/ and shell/ to allow for
compilation on Windows.
2017-11-30 19:47:20 -05:00
Zachary Anderson
619f452ece
[Android] Extract the PluginRegistry from the FlutterActivity (#4393) 2017-11-30 11:05:55 -08:00
Chris Bracken
93648ef0ed
Expose Window.viewInsets in dart:ui (#4403)
Window.viewInsets is the set of window-relative insets that describe the
area of the window that an application may want to treat as effectively
reducing the size of the content. Typically this is due to system UI
that fully obscures underlying content, such as the keyboard.

This area differs from padding in that padding is the set of insets that
describe the area of the window that may be partially (or fully)
obscured by system UI or physical intrusions into the view area (e.g.
iPhone X sensor housing, status bar, or the iPhone X home indicator
widget).

This patch does not yet enable the iOS bottom edge safe area. Once the
framework has been updated to use viewInsets for bottom-edge occlusions
(today, the keyboard), the bottom safe area will be enabled and
framework patches that depend on it, landed.
2017-11-29 16:27:15 -08:00
ethanblake4
3f3d174963 Fix: use firstRequestedOrientation in fallthrough case (#4392) 2017-11-27 00:09:56 -08:00
Martin Kustermann
5c6ebf7994
Enable flutter engine to also work with .*so files on android (#4298)
* Enable flutter engine to also work with .*so files on android

We would like to be able to use native tools (e.g. simpleperf, gdb) with
precompiled flutter apps.  The native tools work much better with *.so
files instead of the custom formats the Dart VM uses by default.

This CL adds support for being able to load the flutter app from an *.so
file on Android.

* Add sanity check to ensure we have either shared library or instruction snapshot (but not both)
2017-11-21 13:14:50 +01:00
Chris Bracken
82cd793ee5
Use iOS scale when computing render buffer size (#4171) (#4373)
When checking whether render buffer size has changed, apply the device
scale factor used to convert points to pixels to ensure we're not
needlessly re-allocating render buffer storage.

Adds trace + debug log to make this easier to detect in future.

Originally introduced in 2d530daeca438ca24562d290616c0aec5ab76b88, but
rolled back in 0a6e415b60581ef7934032df20401da1fae9ea9f to test whether
it was responsible for regressions to
flutter_gallery_ios__transition_perf benchmarks:
  * average_frame_build_time_millis
  * missed_frame_build_budget_count

Re-landed in d43d35347594c893687dec7402a525d83f57db10, and reverted in
459f722b86415da01386fe41f37bafa842f11ae8 after it appeared to regress
the above two benchmarks. After recent changes to microtask execution
order which fixed https://github.com/flutter/flutter/issues/9998,
re-introducing this fix results in benchmark improvements to the above
two benchmarks in local testing.
2017-11-20 14:15:26 -08:00
Sigurd Meldgaard
9b31717923
Avoid double retain of Texture on ios. (#4354)
The "raw" pointer is already managed by ARC.
2017-11-17 13:49:57 +01:00
Chinmay Garde
bedba1267f
Allow embedders to respond to platform messages from the Dart application. (#4361)
This updated the native embedder API in a non-ABI breaking way.
2017-11-14 15:51:19 -08:00
Brian Osman
0a7155d4e1
Disable linear blending, use SkColorSpaceXformCanvas instead (#4355)
This retains gamut correction (adjusting colors for screens with different capabilities), but does all blending and interpolation with sRGB-encoded values. That matches the behavior expected by most users, as well as the behavior of nearly all other systems. It also greatly simplifies the EGL code.

A future Skia change will make this behavior more of a first-class citizen, so some of these implementation details will change again, but the behavior will not. The bulk of this change (elimination of complication from the GL surface code) is permanent - it's just the SkColorSpaceXformCanvas that will be replaced.
2017-11-14 13:33:26 -05:00
Zachary Anderson
242ce44af5
[Android] Cleanup in FlutterActivityDelegate (#4357) 2017-11-13 14:13:04 -08:00
Zachary Anderson
7804e8588a
View destroy listener (#4347)
[Android] Allow persisting a FlutterNativeView across activities.
2017-11-13 13:56:48 -08:00
Jason Simmons
bb55d65085
Delete the native view when destroying the FlutterView (#4356)
Fixes https://github.com/flutter/flutter/issues/12996
2017-11-13 13:16:48 -08:00
Mikkel Nygaard Ravn
1f0c959189
Align iOS event channel semantics to Android counterpart (#4353) 2017-11-13 15:34:29 +01:00
Mikkel Nygaard Ravn
bc3ac074d2
Make EventChannel survive hot restart on Android (#4350) 2017-11-13 07:47:36 +01:00
Jason Simmons
fb6f3e0734
Log stack traces from exceptions thrown by calls from native into Java (#4346) 2017-11-09 13:04:12 -08:00
Zachary Anderson
f5bdf9b0fc
[Android] Pulls the native platform view out of FlutterView (#4338) 2017-11-09 12:10:00 -08:00
Chris Bracken
bc2acf7bdd
Revert "Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5 (#4331)" (#4340)
With the update to HEAD of the Fuchsia buildtools repo, the new clang
toolchain picked up caused link-time breakage in android x86_64
libFlutter.so builds.

Sample log:
https://build.chromium.org/p/client.flutter/builders/Linux%20Engine/builds/1974/steps/build%20android_debug_x64/logs/stdio

Sample failure:
FAILED: libflutter.so libflutter.so.TOC lib.stripped/libflutter.so
../../third_party/android_tools/ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: error: obj/flutter/shell/platform/android/libflutter/android_context_gl.o: unsupported reloc 42 against global symbol std::__ndk1::num_put<char, std::__ndk1::ostreambuf_iterator<char, std::__ndk1::char_traits<char> > >::id

This reverts commit 8ad42f0dae3cb1267c2b9ab99db80e4696ddbc3d.
2017-11-08 16:48:00 -08:00