1310 Commits

Author SHA1 Message Date
Chinmay Garde
cb00aac583 Allow specifying both Dart and non-Dart fixtures in engine unit-tests. (flutter/engine#9113)
* Allow specifying both Dart and non-Dart fixtures in engine unittests.

This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.

* Instead of only being able to specify Dart fixtures, unit-tests may specify
  non-Dart fixtures as well. These are simply copied over to the fixtures
  directory known to the unit-test at runtime.
* An issue where numerous Dart files could be given to the kernel snapshotter
  has been addressed. It was anticipated that such a (legal) invocation to the
  kernel snapshotter would produce a snapshot with the contents of all the Dart
  files added to the root library. This is incorrect and the behavior in this
  case is undefined.
* Dart files referenced by the main Dart file are correctly tracked via a
  depfile.
* The snapshotter arguments have been cleaned up to get rid of unused
  arguments (`—strong`) and  the use of the VM product mode argument has been
  corrected to no longer depend on the Flutter product mode.
2019-05-28 19:11:47 -07:00
Kate Lovett
e94a3d9d2e Removing unused imports (flutter/engine#9108) 2019-05-28 15:16:33 -07:00
Mehmet Fidanboylu
d0b8eba0af Fix internal break since listing contents can return null (flutter/engine#9078) 2019-05-26 20:07:13 -07:00
stuartmorgan
f0c950fb04 Rename macOS FLEPlugin* to FlutterPlugin* (flutter/engine#9074)
As another step toward aligning the macOS plugin API with the iOS plugin
API, and with its final form, rename the plugin-related classes from
FLEPlugin* to FlutterPlugin*. This makes the names of the clasess the
same between iOS and macOS. Eventually they should actually merge, with
annotations/ifdefs for platform differences, but for now since the macOS
version uses the same method names and is simply a subset of the iOS
APIs (with one to-be-stabilized method that is macOS-specific) doing the
merge later won't be a breaking change.

Doing this now allows for building out plugin tooling and plugin
implementations on macOS without creating a growing body of code that
will experience a breaking change later.

See:
https://github.com/flutter/flutter/issues/31735
https://github.com/flutter/flutter/issues/32718
2019-05-25 20:45:00 -04:00
Chris Bracken
8150bff997 Apply minor cleanups to Android embedding (flutter/engine#9088)
Eliminate an unused import, add missing @Override annotations, and
eliminate an unused logger.
2019-05-25 15:45:14 -07:00
Chris Bracken
7cdc09e0b2 Removed outdated deprecation comments (flutter/engine#9087)
In breaking change flutter/engine#4487, a typo was fixed in our Android
APIs correcting RequestPermissionResult to RequestPermissionsResult
(note the 's' on Permissions) for consistency with the Android SDK.

Various tombstone comments were left to help guide developers in the
right direction. These comments were slated for removal in March of
2018; at over a year later, we can probably safely remove them.
2019-05-25 15:02:52 -07:00
Chris Bracken
f7fe97bf24 Delete BSDiff sources (flutter/engine#9086)
BSDiff is no longer used as of flutter/engine#8663. This removes the
unused Java import and sources.
2019-05-25 13:49:28 -07:00
Chris Bracken
21fd6fb32a Correct typos, adopt US spellings (flutter/engine#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Matt Carroll
82b9848101 New Plugin API PR4: Adds Lifecycle support to the new plugin system. (flutter/engine#9049) 2019-05-24 19:28:49 -07:00
stuartmorgan
d1a7209236 Update macOS podspec version requirement (flutter/engine#9077)
The framework is currently built with a 10.12 deployment target, so the
podspec can be at 10.12 rather than 10.13.

The TODO is left because this is an update to the current reality rather
than a final decision about what should be supported.
2019-05-24 21:29:37 -04:00
Jason Simmons
4b5ce6b3ae Fix unchecked operation warnings in FlutterMain (flutter/engine#9073)
Also remove trailing whitespace on some lines
2019-05-23 15:30:08 -07:00
stuartmorgan
8eaa8b8a87 Add mouse button support to the macOS shell (flutter/engine#9054)
Uses the new embedding API support for device type and buttons to pass
appropriate mouse button events, allowing for right click, middle click,
etc.

Also fixes some edge cases where macOS event delivery violated Flutter
requirements by tracking more data about the mouse event stream and
adjusting the sent events as necessary.
2019-05-22 17:51:17 -04:00
stuartmorgan
cca1b1bf43 Add a podspec for FlutterMacOS.framework (flutter/engine#9062)
Based on the iOS Flutter.podspec. This will be used for plugin
management via CocoaPods, as on iOS.

Part of https://github.com/flutter/flutter/issues/32718
2019-05-22 17:48:41 -04:00
stuartmorgan
2b6a8b2d4c Expose pointer type and buttons in embedder.h (flutter/engine#9034)
Rather than hard-coding the type of incoming events to mouse, and
synthesizing a primary button press for kDown/kUp, expose device kind
and buttons in the API.

For backwards compatibility, if the type is not set, the old behavior is
used. If an embedder sets the type to mouse explicitly, however, they
must also set correct button information.

For the touch type, the API abstracts away the framework's internal
expectation that a button is set for touch down/move for simplicity.

Fixes flutter/flutter#32854
2019-05-22 11:30:32 -04:00
Matthew Dempsky
e59951fa15 Avoid unnecessary copying of vectors in AccessibilityBridge (flutter/engine#9033) 2019-05-21 12:39:11 -07:00
Matthew Dempsky
ca6d80857f Initialize next_pointer_flow_id_ to 0 (flutter/engine#9026)
This member variable was added to three classes in #7807, but only
initialized to 0 in one of them. Initialize to 0 in the other two.
2019-05-20 16:52:16 -07:00
stuartmorgan
7092aaf246 Fix horizontal scroll direction for macOS (flutter/engine#9022)
macOS uses negative values to represent scrolls to the right, while
Flutter expects the opposite, so flip X deltas.
2019-05-20 17:01:29 -04:00
stuartmorgan
1cf094e38b Macos systemnavigator pop (flutter/engine#9019)
Adds the flutter/platform channel to the macOS shell, and implements
SystemNavigator.pop.

Other methods from this channel will be implement in the future.

macOS part of flutter/flutter#30713
2019-05-20 16:15:58 -04:00
Amir Hardon
8ab4eb57a0 remove m prefix from fields in the Android PlatformViews code (flutter/engine#9020) 2019-05-20 12:38:23 -07:00
stuartmorgan
f0ab13a0bb Minor fixes/adjustments to the GLFW shell (flutter/engine#8990)
- Makes json_method_codec.cc compatible with the last stable RapidJSON release.
- Allows removing the GTK dependency with a compile flag.
- Fixes a missing break in a switch flagged by some toolchains.
2019-05-20 14:36:59 -04:00
Emmanuel Garcia
a2b0765104 Add mode to load AOT snapshots as a native lib (flutter/engine#8979) 2019-05-20 10:08:50 -07:00
Chris Bracken
963c943a12 Rename Fuchsia Dart and Flutter runners (flutter/engine#9003)
four_gate -> flutter_runner
dt_rush -> dart_runner
2019-05-17 17:04:40 -07:00
Adam Barth
e1c043fe58 [fuchsia] Update zx_clock_get callers (flutter/engine#8998)
Fuchsia is changing zx_clock_get to return a zx_status_t. This change
prepares us for that change.
2019-05-17 16:37:28 -07:00
Matt Carroll
443edceabb New Plugin API PR3: Introduces Service, BroadcastReceiver, and ContentProvider awareness, control surfaces, and plugin bindings. (flutter/engine#8962) 2019-05-17 14:25:05 -07:00
stuartmorgan
5c4c8d9f27 Enable hover by default for desktop shells (flutter/engine#8991)
Fixes flutter/flutter#32835
2019-05-16 20:12:03 -04:00
Dan Field
6037f82d66 add observatoryUrl property to FlutterEngine (flutter/engine#8987) 2019-05-16 13:14:34 -07:00
Matthew Dempsky
0bca459e28 Replace ararysize macro with fml::size function (flutter/engine#8975)
This is forward compatible with std::size and similar to how Chromium
removed use of the arraysize macro.
2019-05-15 12:43:47 -07:00
Gary Qian
04e41a7e6d Use Android text selection shifting API to handle keyboard backspace (flutter/engine#8956) 2019-05-15 10:44:23 +08:00
liyuqian
b000f9830c Rename frame_time and engine_time (flutter/engine#8952)
At a quick glance, one could easily think of the "engine_time" as the
GPU thread time and the "frame_time" as the UI thread time because the
GPU thread time is mainly spent on the engine while the UI thread time
is mainly spent on the Dart framework to generate the frame.

But it's actually the other way. The "engine_time" is UI thread time and
the "frame_time" is the GPU thread time.

To avoid the confusion, rename them to "ui_time" and "raster_time"
respectively. I avoided the "gpu_time" because the rasterization may be
purely on a CPU backed software Skia backend.
2019-05-14 14:29:27 -07:00
Matthew Dempsky
8b4a5398ae Roll tonic and update #includes (flutter/engine#8950) 2019-05-14 11:57:09 -07:00
Chinmay Garde
74f9cc79b3 Avoid disabling sources assignment filters are these have been removed. (flutter/engine#8954) 2019-05-13 18:38:28 -07:00
Matt Carroll
170f789067 New Plugin API PR2: Introduces ActivityAware, ActivityControlSurface, and ActivityPluginBinding. (flutter/engine#8943) 2019-05-13 17:07:29 -07:00
Jason Simmons
f1ef8c2748 Add a minimal set of symbols to the dynamic symbol table for Linux executables (flutter/engine#8937)
This will reduce executable size.
2019-05-13 16:12:58 -07:00
Chinmay Garde
1285f72fc5 Copy the Dart Runner from //topaz into the engine. (flutter/engine#8949) 2019-05-13 14:48:20 -07:00
Matt Carroll
965d20ae44 Add @UiThread to MethodChannel and related classes/calls (#32642). (flutter/engine#8947) 2019-05-13 13:26:31 -07:00
stupidfive
50c82c816b Terminate debug background task on expiry (flutter/engine#8930)
When backgrounding an app in debug mode, we make a request for
additional background time for the app with a background task. This
prevents us from losing the devfs session used for hot reload. In the
case where the app is backgrounded beyond the additional time provided
by iOS, it's required that we end the background task or the app will
be terminated by the OS.

We previously ended the background task only on foregrounding, but
failed to do so on expiry of the task.
2019-05-13 11:29:05 -07:00
Matt Carroll
845bd91111 New Plugin API PR1: Introduces PluginRegistry and FlutterPlugin, adds support for plugin registration to FlutterEngine. (flutter/engine#8826) 2019-05-12 16:58:38 -07:00
Chinmay Garde
37fb8bb68d Move the Fuchsia Flutter Runner to //flutter/shell/platform/fuchsia/flutter (flutter/engine#8939)
This makes room for the Dart runner at //flutter/shell/platform/fuchsia/dart.
2019-05-12 14:29:34 -07:00
Chinmay Garde
879711b321 Wire up the Skia Metal backend on iOS. (flutter/engine#8936) 2019-05-11 15:21:26 -07:00
Tong Mu
fa9dec68eb Synthesize buttons for embedders (flutter/engine#8873)
* Synthesize a buttons = kPrimaryButton for events of down and move
* Add PointerEventButtons
2019-05-10 12:12:51 -07:00
Chris Yang
909ba9c7ba Platform_views gesture: let flutter view controller be the media to pass the touches. (flutter/engine#8685)
This PR updated the forwarding gesture recognizer to pass the touch events directly to the FlutterViewContoller instead of FlutterView which ensures the touches events are passed to the framework.
2019-05-10 09:58:33 -07:00
Chris Yang
00297d8ace Fix the iOS accessibility tree structure of platform views. (flutter/engine#8731)
Partially fix the issue in flutter/flutter#30804. This only fixes the focus issue for other platform views (Google maps and other custom platform views), but the same issue on WebView is not fixed.

Before the change, the a11y tree with platform view looks like

```
<some parent a11y container>
     <SemanticsObject for platform view>
     <FlutterPlatformViewSemanticsContainer>
          <platform view>
```
After the change, it looks like

```
<some parent a11y container>
     <FlutterPlatformViewSemanticsContainer>
          <SemanticsObject>
          <platform view>
```

This PR also updated the implementation of FlutterPlatformViewSemanticsContainer to use A11yContainer protocol to implement the details on various a11y attribute including the accessibilityFrame and accessibilityScroll.
2019-05-09 16:52:46 -07:00
Zachary Anderson
d7525a5efc [fuchsia] Guard out-of-tree Fuchsia targets to fix in-tree build (flutter/engine#8923) 2019-05-09 14:14:52 -07:00
stuartmorgan
fea4724762 Provide a resource context in the GLFW shell (flutter/engine#8895)
Uses an invisible GLFW window to provide a background resource context
for the Flutter engine to upload textures.

Fixes #31941
2019-05-08 10:36:14 -04:00
Dan Field
e1a78133f8 Remove more asserts and fix a11y check (flutter/engine#8896) 2019-05-08 01:19:24 -07:00
Dan Field
68a0dbe78b Prevent iOS from autofilling password into wrong text box (flutter/engine#8894) 2019-05-08 01:00:05 -07:00
Chinmay Garde
0dfd3c2144 Remove absolute path in new Fuchsia SDK based runner target dependency. (flutter/engine#8888)
Only ran into this as I was wiring up the bots to build the new targets.
2019-05-07 17:26:45 -07:00
Chinmay Garde
8ef9d87c66 Copy the Flutter Runner from //topaz into the engine. (flutter/engine#8886)
Build rules and include paths have been updated as necessary.
No other functional change.
2019-05-07 17:24:18 -07:00
Dan Field
c96714ac5d new lints (flutter/engine#8849)
Dart lints added:
* Avoid optional new
* Avoid optional const
* Prefer single quotes
* Prefer default assignment `=`
2019-05-07 16:10:21 -07:00
Chinmay Garde
8462054c5b Copy //dart-pkg/zircon|fuchsia from Topaz into the engine. (flutter/engine#8884)
Build rules and include paths have been updated as necessary. No other functional change.
2019-05-07 15:06:15 -07:00