869 Commits

Author SHA1 Message Date
谢然
3f6afa9c58 fix ResourceExtractor npe. (flutter/engine#6461) 2018-10-12 09:56:00 -07:00
James D. Lin
aaf6f652b4 Add a callback for iOS when the first Flutter frame is rendered (flutter/engine#6135)
Add a `-[FlutterViewController setFlutterViewDidRenderCallback:]`
method on iOS so client applications can be notified when the Flutter
view has rendered.  This can be used for add2app cases to determine
when to take an initial screenshot for comparisons in automated
tests.

The callback is expected to be an Objective-C block (or Swift
closure).  I chose to support only a single callback because it's
much simpler (especially since it does not require a separate method
to unregister the callback), and it's not clear that there are use
cases that would justify additional complexity.  Clients have the
flexibility to make their callback invoke other callbacks anyway.

I alternatively considered adding a `-[FlutterViewController
viewDidRenderFirstFlutterFrame]` method that clients could override
in a subclass, but using an Objective-C block seems more flexible and
less of a burden.

Fixes https://github.com/flutter/flutter/issues/20665
2018-10-11 20:21:13 -07:00
Gary Qian
45577f1f07 Pass scriptcode and variantcode to dart:ui Window. (flutter/engine#6493) 2018-10-10 17:22:59 -07:00
Jason Simmons
065769e2e5 Use an older version of SurfaceTexture.setOnFrameAvailableListener when running on pre-Lollipop devices (flutter/engine#6489)
Fixes https://github.com/flutter/flutter/issues/21730
2018-10-10 15:01:48 -07:00
Jidong Chen
92ae80259c Missing dealloc method in FlutterEventChannel (flutter/engine#6464)
* Missing dealloc method in FlutterEventChannel
2018-10-09 11:50:00 -07:00
Jonah Williams
c0edacaa1b Correct issues in visible children determination (flutter/engine#6455)
* fix off by one

* add documentation on counting for setToIndex
2018-10-08 11:05:09 -07:00
liyuqian
1d2c3ec0a4 Remove unused imports and variables (flutter/engine#6437)
This is discovered in the new Google3 checks. It should not block our
roll but it's nice to fix them.
2018-10-04 16:01:49 -07:00
Chinmay Garde
97c1c2c302 Remove touch mapper and respect the UITouch phase when calculating the pointer data change type. (flutter/engine#6430)
The touch mapper was a relic of a time when the pointer IDs had to be less
than 16. Not respecting the touch phase is getting in the way of clients that
fake their own touches. Turns out the AppDelegate also like to fake touches to
simulate status bar events. Now, except in cases where there is a specific
override in place, the UI touch phase is respected.
2018-10-04 14:33:58 -07:00
nathanrogersgoogle
c9e98490c8 Add deadline_now_delta argument to Engine::NotifyIdle's trace (flutter/engine#6419)
This allows us to figure out from looking at a trace if an
|Engine::NotifyIdle| call went beyond its deadline
2018-10-03 19:55:57 -07:00
Jonah Williams
ad889d5cec Ensure setViewIdResourceName has the correct version guard (flutter/engine#6404) 2018-10-03 17:44:32 -07:00
Zachary Bush
ae7481fbe2 [rapidjson] Fix import statements (flutter/engine#6418) 2018-10-03 17:33:45 -07:00
Chinmay Garde
6e666dadf8 Create a benchmarking target for the shell. (flutter/engine#6420)
Also adds //flutter/benchmarking which, similar to //flutter/testing, allows for the creation of a benchmarking executable. This is also the target that contains benchmarking utilities.
2018-10-03 17:22:33 -07:00
Kirill Nikolaev
aee6ec23f9 Add nullability annotations to MethodChannel/MethodCall. (flutter/engine#6393)
This works towards resolving https://github.com/flutter/flutter/issues/19888.
2018-10-02 15:02:16 -07:00
Jonah Williams
fad67c5eca do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) 2018-10-01 11:15:22 -07:00
Ben Konyi
af54a8129e Dart SDK roll for 2018-09-28 (flutter/engine#6388) 2018-09-28 18:02:04 -07:00
Jonah Williams
12981679ba make sure we dont set live regionin api level < 18 (flutter/engine#6375) 2018-09-27 23:24:54 -07:00
Chinmay Garde
2c9de2127a Update observatory-port default behavior description. (flutter/engine#6365) 2018-09-27 17:18:11 -07:00
Kirill Nikolaev
9d6b7c41e3 Document that all MethodChannel callbacks must be called on the main thread. (flutter/engine#6245)
This further addresses https://github.com/flutter/flutter/issues/14568.
2018-09-27 15:48:29 -07:00
liyuqian
54d47ebc1d Change log level from ERROR to WARNING (flutter/engine#6361)
So tool_tests-windows won't fail.
2018-09-27 11:28:58 -07:00
Dan Field
db97bea01f SystemNavigator.pop can pop w/o UINavigationController (flutter/engine#6341)
* SystemNavigator.pop can pop w/o UINavigationController
2018-09-27 08:57:30 -07:00
Dan Field
045a313d33 Expose push/popRoute on FlutterViewController (flutter/engine#6347) 2018-09-26 22:14:04 -07:00
KyleWong
716cb093b5 V0.8.2 fix compile problem with xcode10 (flutter/engine#6339)
* Fix a compilation problem when  using iPhoneOS12.0sdk(Xcode10).
2018-09-26 17:00:28 -07:00
Chinmay Garde
bbce11388f Perform persistent cache stores on the IO thread outside the frame workload. (flutter/engine#6350) 2018-09-26 16:33:30 -07:00
Chinmay Garde
74c44fa72a Wire up the Skia persistent GPU related artifacts cache. (flutter/engine#6278)
Also teaches FML to create files and directories.
2018-09-26 14:54:09 -07:00
Gary Qian
c9592ddb8c Implement restore functions on Android and iOS (flutter/engine#6322)
This will not be active on the Framework until https://github.com/flutter/flutter/pull/22221 lands.
2018-09-25 13:46:38 -07:00
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