844 Commits

Author SHA1 Message Date
Dan Field
1df2685196 Format for #6324 (flutter/engine#6326)
Format code from previous patch
2018-09-24 18:42:04 -04:00
Dan Field
89eeaf461e Engine::Run returns enum: success, failure, or isolate already running (flutter/engine#6324)
* If isolate is already running, return true

* Use shell::Engine::RunStatus as result of Engine::Run
2018-09-24 18:01:22 -04:00
Gary Qian
633695dadf Keyboard padding detection heuristic to distringuish when to include bottom inset. (flutter/engine#6288)
Use a screen height ratio to determine if the keyboard is onscreen or not. This is used because Android does not provide a deterministic API to detect this.

We remove the padding when the keyboard is closed and the inset is due to the hidden navigation bar, otherwise, we apply the full keyboard inset.
2018-09-24 11:38:13 -07:00
Rafael Ring
f74596d2b3 Change FlutterDartProject to keep precedence when looking for the ass… (flutter/engine#6305)
* Change FlutterDartProject to keep precedence when looking for the assets bundle

* Change assetsPath to fallback to mainBundle when the defined bundle does not contain assets
2018-09-24 09:26:43 -07:00
Chinmay Garde
0745ce5fa9 Remove the unused Mac Desktop shell. (flutter/engine#6314)
This shell used to serve the dual purpose of running Flutter tests as
well as optionally being able to run Flutter applications on a Mac
desktop. After all the test runner targets were consolidated
(flutter_tester), this target was no longer used to run the tests. This
target is currently only used by engine developers to test changes
quickly on the host. Even for this purpose, the Desktop embedders are
more full featured and use the stable embedder API. The presence of a
cross-platform tester target, alternatives for Desktop targets that use
the stable embedder API and the fact that this target is no longer
tested, makes having this code in the source entirely redundant.
2018-09-22 15:56:50 -07:00
James D. Lin
af03555a34 Make FlutterStandardCodec handle writing NSData (flutter/engine#6207)
* Make FlutterStandardCodec handle writing NSData

iOS developers can accidentally pass an `NSData` object directly to
`FlutterStandardCodec` and forget to wrap it in
`FlutterStandardTypedData`.  This failure won't be caught until
runtime.

Let's make `FlutterStandardCodec` more tolerant by making it assume
that `NSData` should be treated as a binary blob and by wrapping it
automatically.

Fixes https://github.com/flutter/flutter/issues/17449

Testing Done:
* Made a sample Flutter iOS application that created a
  `FlutterMethodChannel` and invoked a method using an `NSData*`
  argument.  Verified that the Flutter method handler received the
  message and that the `MethodCall.arguments` was a `UInt8Array` that
  preserved the original byte order.
* Verified that without this change, the same sample application
  crashed when run in debug mode.

* Add a unit test for encoding raw NSData

* Formatting adjustments
2018-09-21 15:46:40 -07:00
Amir Hardon
881edf98a4 Decouple PlatformViewsController from FlutterView. (flutter/engine#6303)
Decouple PlatformViewsController from FlutterView.

Instead of getting a FlutterView instance, depend on the specific interfaces required by
PlatformViewsController (BinaryMessenger, TextureRegistry, and Context).

This allows using PlatformViewsControlling in the flutter/embedding
code.
2018-09-21 15:40:17 -07:00
Amir Hardon
4fabc88cc2 Revert "Fix a compilation problem when using iPhoneOS12.0sdk(Xcode10) && clang version 7.0.0." (flutter/engine#6307)
* Revert "Add logging if FlutterDartProject fails to load the application kernel snapshot (#6257)"

This reverts commit 18ec58629e7d90c89ea98a82f669eaccd5f82bb3.

* Revert "Update deprecated subtags from language subtag registry. (#6280)"

This reverts commit 6e159af6f2875f517aa8734538652fe9c20f1f21.

* Revert "Add Xib splashscreen support (#6289)"

This reverts commit 9c2a3826c70f726c2fbfb2ca6a51aa8826cece30.

* Revert "Fix a compilation problem when using iPhoneOS12.0sdk(Xcode10) && clang version 7.0.0. (#6279)"

This reverts commit 911b381f71ebeab7c1099b9aacf7f1dec3022229.
2018-09-21 15:17:45 -07:00
James D. Lin
18ec58629e Add logging if FlutterDartProject fails to load the application kernel snapshot (flutter/engine#6257)
To make "Engine run configuration was invalid." failures (e.g.
https://github.com/flutter/flutter/issues/20777) a bit easier to
diagnose, add some more logging to `FlutterDartProject` to verify
that snapshot assets were properly bundled.
2018-09-21 14:05:30 -07:00
kzietek
9c2a3826c7 Add Xib splashscreen support (flutter/engine#6289) 2018-09-21 12:20:18 -07:00
KyleWong
911b381f71 Fix a compilation problem when using iPhoneOS12.0sdk(Xcode10) && clang version 7.0.0. (flutter/engine#6279) 2018-09-21 12:17:00 -07:00
Chris Bracken
54eb983db6 Remove bottom safe-area padding when keyboard up (flutter/engine#6297)
On the iPhone X, raising the keyboard sets a bottom physical inset equal
to the keyboard height, however we previously did not zero out the bottom
physical padding. This was incorrect; when a soft keyboard is present,
it 'consumes' the safe area inset for the home indicator widget,
eliminating the need for the app to handle this at all.
2018-09-20 18:28:05 -07:00
Gary Qian
fb290c3f7a Fix Top, Left, and Right padding for fullscreen android apps. (flutter/engine#6282)
* Fix Top, Left, and Right padding for fullscreen apps.

* Fix minor nits and comments, simple logic inversion
2018-09-19 18:09:10 -07:00
Ryan Macnak
a6d25b895c Reapply "Some cleanups enabled by removing support for Dart 1" (flutter/engine#6250)
Following fixes in dart-lang/sdk@91cbb57cd5
2018-09-14 09:36:13 -07:00
Jonah Williams
b4198127e3 update live region to trigger on label change, remove manual trigger (flutter/engine#6248) 2018-09-14 09:10:59 -07:00
Jonah Williams
b258e126f3 Add scrollIndex and scrollChildren to semantics, add Android implementation (flutter/engine#6239) 2018-09-13 10:28:27 -07:00
KyleWong
60ac4f0fe3 Fix a crash when UILaunchStoryboardName is not specified in Info.plist (flutter/engine#6234)
Some developers might prefer launch images.
2018-09-12 21:08:01 -07:00
Michael Goderbauer
d6ba11b0c1 Revert "Reapply "Some cleanups enabled by removing support for Dart 1" (#6216)" (flutter/engine#6232)
This reverts commit 88aac222998fac4a7c0e57e99c48feacefc92aa6.
2018-09-12 12:07:20 +02:00
Ryan Macnak
88aac22299 Reapply "Some cleanups enabled by removing support for Dart 1." (flutter/engine#6216)
- Add missing Dart 2 flags to gen_snapshot invocation.
 - Disable brittle service test.
2018-09-10 17:03:54 -07:00
Chinmay Garde
a5b08f7295 Allow embedders to specify a custom GL proc address resolver. (flutter/engine#6204)
This updates the embedder API but introduces no breaking ABI/API
changes.
2018-09-07 18:25:38 -07:00
Ryan Macnak
75e10e3845 Revert "Some cleanups enabled by removing support for Dart. (#5621)" (flutter/engine#6205)
This reverts commit e05d573589bded526e9acf44128e35151d142b7e.
2018-09-07 17:39:51 -07:00
Ryan Macnak
e05d573589 Some cleanups enabled by removing support for Dart. (flutter/engine#5621)
- Switch core snapshot to Dart 2 and remove support for loading platform.dill.
 - Remove support for loading script snapshots.
 - Remove support for loading source.
 - Remove settings and fix names to reflect the above.
 - Remove support for loading the service isolate from source.
2018-09-07 15:44:46 -07:00
Jonah Williams
e6f0842c50 Don't map iOS reduce motion to disabled animations (flutter/engine#6194) 2018-09-07 11:20:44 -07:00
Jason Simmons
5ecda4b710 Accept file URIs as parameters in the RunInView service RPC (flutter/engine#6191)
See https://github.com/flutter/flutter/issues/21348
2018-09-07 09:34:45 -07:00
Michael Goderbauer
441b84f24c Update to latest clang (flutter/engine#6174)
* Roll buildroot to be483cb1cd3a9c4313b2e534034d23a05c3d849e
* Rolls buildtools to c1408453246f0475547b6fe634c2f3dad71c6457
2018-09-06 15:29:04 -07:00
liyuqian
f3cef49ab7 Always serialize fonts during skp capturing (flutter/engine#6160)
This fixes flutter/flutter#20788
2018-09-06 13:44:47 -07:00
Zachary Anderson
36f54c75cc Pull $flutter_root:config into shell/engine/version:version (flutter/engine#6186)
To fix the Fuchsia build.
2018-09-06 12:26:20 -07:00
Chinmay Garde
046847225c Remove unused file picture_serializer. (flutter/engine#6179) 2018-09-05 19:45:55 -07:00
Michael Klimushyn
0282e85726 Add transparency helpers to FlutterView.java (flutter/engine#6172)
Fixes #9627
2018-09-05 16:47:02 -07:00
Jason Simmons
8b341d2363 Remove the old location of the ICU data asset (flutter/engine#6170)
The tools are now placing icudtl.dat in the flutter_shared directory.
It is no longer necessary to check for this asset at its previous path.
2018-09-05 12:22:27 -07:00
Simon Lightfoot
7ccb33b1c0 Fixes negative end selection offset. (flutter/engine#6171) 2018-09-05 12:12:21 -07:00
Michael Klimushyn
605c146d02 Enable transparent FlutterViews (flutter/engine#6163)
- Changes rasterizer to clear the canvas with `SkColor_TRANSPARENT`
- Removes the unused `backgroundColor` param from `FlutterView.java`
2018-09-05 10:44:02 -07:00
Jason Simmons
2e2d63b213 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157) 2018-09-05 10:01:33 -07:00
Chinmay Garde
e226cce0b6 Fix windows build. (flutter/engine#6162) 2018-09-04 18:23:29 -07:00
Jason Simmons
c8316af625 Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
Fixes https://github.com/flutter/flutter/issues/21228
2018-09-04 14:38:10 -07:00
Kirill Nikolaev
fe8d1b47e2 Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
Otherwise the callbacks may be called after FlutterNativeView is destroyed and is null.

Also defensively check for whether the texture is already released in the callback because the callback may be called from another thread by a stale reference (see the comment).

This closes https://github.com/flutter/flutter/issues/20951.
2018-09-04 06:31:01 -07:00
Chinmay Garde
7be525a816 Fix windows embedder builds. (flutter/engine#6137) 2018-08-31 20:23:53 -07:00
Chinmay Garde
f2049c7687 Allow embedders to specify software renderer configs. (flutter/engine#6133) 2018-08-31 20:03:06 -07:00
James D. Lin
81ba4c9458 Mark deprecated Flutter iOS APIs as unavailable (flutter/engine#6124)
The following were previously marked as deprecated over a month ago:
* `FlutterStandardBigInteger`
* `-[FlutterDartProject initFromDefaultSourceForConfiguration]`

Remove their implementations and mark them as unavailable.
2018-08-31 12:33:57 -07:00
James D. Lin
d65c8d71d9 Add a -[FlutterViewController splashScreenView] property (flutter/engine#6112)
Add a `-[FlutterViewController splashScreenView]` property

Add a `-[FlutterViewController splashScreenView]` property that
clients can use to customize the launch view (issue #17140).
2018-08-30 15:13:28 -07:00
jslavitz
6638f518c6 entering a character with a selection deletes the selection (flutter/engine#6113) 2018-08-30 10:29:04 -07:00
Chinmay Garde
1fcba44904 Allow embedders to set the root surface transformation. (flutter/engine#6085) 2018-08-28 14:13:49 -07:00
Jonah Williams
cce79157ff expose bold text flag in accessibility features for iOS (flutter/engine#6072) 2018-08-28 12:38:54 -07:00
Amir Hardon
dc470dc12a Convert synthesized Android motion events to long and not to int. (flutter/engine#6103) 2018-08-28 12:12:47 -07:00
Jonah Williams
02d928b047 Unconditionally set resource id to empty string (flutter/engine#6096) 2018-08-27 10:54:07 -07:00
Chinmay Garde
366a898572 Allow embedders to invalidate FBO bindings after present. (flutter/engine#6084) 2018-08-24 16:53:13 -07:00
amirh
00c385f497 Allow passing extra creation parameters for embedded Android views. (flutter/engine#6081)
This allows plugins to pass extra parameters from the Dart side to the
platform view constructor.
2018-08-24 11:15:14 -07:00
Chinmay Garde
20b525fc88 Allow building the embedder API for the target toolchains. (flutter/engine#6069) 2018-08-22 16:42:47 -07:00
Chinmay Garde
86e253fadd Alllow access to Flutter engine, Dart & Skia versions in the Shell API. (flutter/engine#6060) 2018-08-21 08:52:24 -07:00
amirh
eb77c3044d Support LTR/RTL layout directions for embedded Android views. (flutter/engine#6057) 2018-08-20 16:22:38 -07:00