1302 Commits

Author SHA1 Message Date
Matt Carroll
cfa524fcdf
New Plugin API PR4: Adds Lifecycle support to the new plugin system. (#9049) 2019-05-24 19:28:49 -07:00
stuartmorgan
11408effda
Update macOS podspec version requirement (#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
ee6a9c4049
Fix unchecked operation warnings in FlutterMain (#9073)
Also remove trailing whitespace on some lines
2019-05-23 15:30:08 -07:00
stuartmorgan
9d2d58a3c7
Add mouse button support to the macOS shell (#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
b17c0c6e6f
Add a podspec for FlutterMacOS.framework (#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
4dbb9ba388
Expose pointer type and buttons in embedder.h (#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
ee5915fbb0 Avoid unnecessary copying of vectors in AccessibilityBridge (#9033) 2019-05-21 12:39:11 -07:00
Matthew Dempsky
e40768c63a
Initialize next_pointer_flow_id_ to 0 (#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
e1599ccd3f
Fix horizontal scroll direction for macOS (#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
dbf083bda1
Macos systemnavigator pop (#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
760fea25cf
remove m prefix from fields in the Android PlatformViews code (#9020) 2019-05-20 12:38:23 -07:00
stuartmorgan
75678602b4
Minor fixes/adjustments to the GLFW shell (#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
20f5000bc5
Add mode to load AOT snapshots as a native lib (#8979) 2019-05-20 10:08:50 -07:00
Chris Bracken
d946e3e893
Rename Fuchsia Dart and Flutter runners (#9003)
four_gate -> flutter_runner
dt_rush -> dart_runner
2019-05-17 17:04:40 -07:00
Adam Barth
197feb5119
[fuchsia] Update zx_clock_get callers (#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
c181972a40
New Plugin API PR3: Introduces Service, BroadcastReceiver, and ContentProvider awareness, control surfaces, and plugin bindings. (#8962) 2019-05-17 14:25:05 -07:00
stuartmorgan
b6981a38b9
Enable hover by default for desktop shells (#8991)
Fixes flutter/flutter#32835
2019-05-16 20:12:03 -04:00
Dan Field
9d7cd70ce5
add observatoryUrl property to FlutterEngine (#8987) 2019-05-16 13:14:34 -07:00
Matthew Dempsky
3cdfa807fa Replace ararysize macro with fml::size function (#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
f5fa03b5eb
Use Android text selection shifting API to handle keyboard backspace (#8956) 2019-05-15 10:44:23 +08:00
liyuqian
d0dc9b94d4
Rename frame_time and engine_time (#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
66087301cd Roll tonic and update #includes (#8950) 2019-05-14 11:57:09 -07:00
Chinmay Garde
5ac2d02645
Avoid disabling sources assignment filters are these have been removed. (#8954) 2019-05-13 18:38:28 -07:00
Matt Carroll
51486a5494
New Plugin API PR2: Introduces ActivityAware, ActivityControlSurface, and ActivityPluginBinding. (#8943) 2019-05-13 17:07:29 -07:00
Jason Simmons
b3b817a9b3
Add a minimal set of symbols to the dynamic symbol table for Linux executables (#8937)
This will reduce executable size.
2019-05-13 16:12:58 -07:00
Chinmay Garde
96ffc893ec
Copy the Dart Runner from //topaz into the engine. (#8949) 2019-05-13 14:48:20 -07:00
Matt Carroll
904cfc4fe3
Add @UiThread to MethodChannel and related classes/calls (#32642). (#8947) 2019-05-13 13:26:31 -07:00
stupidfive
47fd66c89b Terminate debug background task on expiry (#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
816d3fc586
New Plugin API PR1: Introduces PluginRegistry and FlutterPlugin, adds support for plugin registration to FlutterEngine. (#8826) 2019-05-12 16:58:38 -07:00
Chinmay Garde
21ad7f051c
Move the Fuchsia Flutter Runner to //flutter/shell/platform/fuchsia/flutter (#8939)
This makes room for the Dart runner at //flutter/shell/platform/fuchsia/dart.
2019-05-12 14:29:34 -07:00
Chinmay Garde
5526884e78
Wire up the Skia Metal backend on iOS. (#8936) 2019-05-11 15:21:26 -07:00
Tong Mu
6e3c043141
Synthesize buttons for embedders (#8873)
* Synthesize a buttons = kPrimaryButton for events of down and move
* Add PointerEventButtons
2019-05-10 12:12:51 -07:00
Chris Yang
0bc6dc9746
Platform_views gesture: let flutter view controller be the media to pass the touches. (#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
d8646ed07c
Fix the iOS accessibility tree structure of platform views. (#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
27409dc1ce
[fuchsia] Guard out-of-tree Fuchsia targets to fix in-tree build (#8923) 2019-05-09 14:14:52 -07:00
stuartmorgan
892b505d0a
Provide a resource context in the GLFW shell (#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
5d1c1a027e
Remove more asserts and fix a11y check (#8896) 2019-05-08 01:19:24 -07:00
Dan Field
ac4f3c9945
Prevent iOS from autofilling password into wrong text box (#8894) 2019-05-08 01:00:05 -07:00
Chinmay Garde
93d1c37946
Remove absolute path in new Fuchsia SDK based runner target dependency. (#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
0b406c3de3
Copy the Flutter Runner from //topaz into the 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
2b1f9925e4
new lints (#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
0c7a3f25f5
Copy //dart-pkg/zircon|fuchsia from Topaz into the engine. (#8884)
Build rules and include paths have been updated as necessary. No other functional change.
2019-05-07 15:06:15 -07:00
Chinmay Garde
d71704488e
Copy //runtime/dart/utils from Topaz into the engine. (#8871)
Build rules and include paths have been updated as necessary. No other functional change.
2019-05-07 13:59:43 -07:00
Dan Field
5a045dd1f7
Log instead of throwing (#8881) 2019-05-07 11:08:38 -07:00
Chinmay Garde
f6e6d39860
Wire up Fuchsia SDK related updated for shell dependencies. #8869
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
2019-05-06 18:01:59 -07:00
stuartmorgan
10cbdd49d1
Add resize functions to GLFW shell (#8864)
Adds methods to get and set the window size, as well as to query the
window's scale factor. This is useful both for custom clients, and for
building a window resize plugin to prototype what will eventually likely
be a system channel.
2019-05-06 16:22:40 -04:00
stuartmorgan
62ab9c7b81
Provide access to GLFW window in plugins (#8806)
Plugins may need to be able to access functions affecting the GLFW
window (e.g., a plugin to resize the window). This restructures the API
to create a distinction at both the C and C++ level between the window
controller, which provides access to high-level behaviors driving the
Flutter application, and the window, which provides access to functions
to affect the UI state of the window (i.e., wrapped GLFWwindow
functions).

Also provides a PluginRegistrar extension for plugins that need access
to GLFW-specific functionality.
2019-05-06 15:37:02 -04:00
Dan Field
88e82d371a
Remove static leaks (#8825) 2019-05-03 16:57:04 -07:00
Matt Carroll
2c9e37c34e
Cause crash in FlutterJNI if invoked on non-main thread (#31263). (#8830) 2019-05-03 14:55:28 -07:00
Dan Field
7ce2666e54
Guard Android logs (#8824) 2019-05-03 14:32:29 -07:00