828 Commits

Author SHA1 Message Date
liyuqian
7c3dcee2e9
Revert "[fuchsia] Wire up OpacityLayer to Scenic (#11322)" (#12610)
This reverts commit fcc4ab32301396986dd5103d6d444bff35fe0f63.

Fixes https://github.com/flutter/flutter/issues/41394 and other
related correctness issues.

TBR: @arbreng @jason-simmons @mehmetf
2019-09-27 16:50:43 -07:00
Jonah Williams
6f5eb1332f
Add support for JIT release mode (#12446) 2019-09-27 11:20:54 -07:00
tauu
84c167d8ed [web_ui] add missing dispose handler for MethodCalls to flutter/platform_view (#12226)
* added dispose handler for calls to flutter/platform_view

* improved comment
2019-09-26 16:48:57 -07:00
tauu
92d020f23f [web_ui] PersistedPlatformView attribute update handling to enable resizing (#12227)
* add PersistedPlatformView attribute update handling to enable resizing

* update size of root element created by a PlatformView

* improved comments

* enforce effective size of PlatformView surface

* updated formating of platform_view.dart

* stop storing root element of PlatformView in its Surface

When the PlatformViemSurface adopts the DOM elements from a previous PlatformViewSurface the the stored value will lost.

* move setting overflow property to createElement
2019-09-26 16:48:27 -07:00
Nurhan Turgut
d8d0d3f104
Reflect selection changes in Firefox for text editing (#12447)
* reflect selection changes in Firefox. With this change if the keyboard arrow keys to move the cursor the selection change is synced to Flutter Framework

* Addresing PR comments. Renaming. Adding the domelement to SelectionChangeDetection constructor.

* add initial value to selection start/end

add initial value to selection start/end
2019-09-26 15:24:10 -07:00
Gary Qian
0018135a1c
Make kDoNotResizeDimension public so framework can use it directly (#12448) 2019-09-26 17:07:16 -04:00
Chinmay Garde
5b5fd7508c
Revert "Support accessibility labels on iOS switches. (#12404)" (#12466)
This reverts commit 147d0c3805499f5302f763da01fc40259b1a22ee.
2019-09-26 12:52:52 -07:00
brandondiamond
147d0c3805 Support accessibility labels on iOS switches. (#12404) 2019-09-26 11:14:44 -07:00
Yegor
3360d861e5
[web] filter test targets; cache host.dart compilation (#12445)
* filter test targets; cache host.dart compilation
2019-09-25 13:51:00 -07:00
Yegor
0bfca375b3
Force exit felt tool on sigint, sigterm (#12443) 2019-09-25 10:02:32 -07:00
David Worsham
fcc4ab3230
[fuchsia] Wire up OpacityLayer to Scenic (#11322)
On Fuchsia, add a build flag for compositing OpacityLayers using the system
compositor vs Skia, which exposes a fastpath for opacity via Scenic.
This will only work under certain circumstances, in particular nested
OpacityLayers will not render correctly!

On Fuchsia, add a build flag for compositing PhysicalShapeLayers using
the system compositor vs Skia. Set to off by default, which restores
performant shadows on Fuchsia.

Remove the opacity exposed from ChildView, as that was added mistakenly.

Finally, we centralize the logic for switching between the
system-composited and in-process-composited paths inside of
ContainerLayer. We also centralize the logic for computing elevation
there. This allows the removal of many OS_FUCHSIA-specific code-paths.

Test: Ran workstation on Fuchsia; benchmarked before and after
Bug: 23711
Bug: 24163

* Fix broken tests
2019-09-25 12:48:42 -04:00
Yegor
c3bfbec9de
delete golden files; switch to flutter/goldens (#12434)
Delete golden files from flutter/engine; switch to flutter/goldens
2019-09-25 09:08:44 -07:00
David Iglesias
44279e27c9
Interpret negative radii as 0 in recording_canvas drawDRRect (#12431)
* Interpret negative radii as 0 in recording_canvas drawDRRect

This allows drawing DRRects that may have some negative values on
its corners (caused by deflating a RRect with some non-round corners,
for example)

See added unit test for an example of the above.

Fixes https://github.com/flutter/flutter/issues/40728
2019-09-24 17:55:45 -07:00
Mouad Debbar
fdff0787ed
Don't send pointer events when the framework isn't ready yet (#12403) 2019-09-23 15:43:49 -07:00
Nurhan Turgut
e822414322
Updating text field location in IOS as a pre-work for spellcheck (#12192)
* enabling spellcheck for text editing

* Finalize location changes in IOS. IOS is ready for spellcheck now. Disable spellcheck since we realized some tag/autocomplete transfer from Framework is necessary for complete spellcheck implementation.

* Remove todo since this PR fixes the updated location issue for IOS too. All browsers are supported now.

* Adding boolean flags to make conditions more readable. Fixing typos.

* Fixing unit tests. Addressing github PR comments.
2019-09-23 12:36:39 -07:00
Jaime Blasco
111a340b93 [Web] Implement dark mode support for web (#12335) 2019-09-23 09:42:20 -07:00
Yegor
94368ac0ec
Add macOS testing support (#12383)
- Add support for macOS in `felt test`
- Set viewport so it does not depend on real device pixel density
2019-09-22 11:49:44 -07:00
Yegor
d5820e956e
Store screenshot test output as Cirrus artifacts; do fuzzy comparison of non-matching screenshot pixels (#12274)
- Store screenshot test output as Cirrus artifacts
- Do fuzzy comparison of non-matching screenshot pixels
- Make screenshot tests fail on Cirrus
2019-09-20 14:46:00 -07:00
David Iglesias
b875c7a5ff
Add web engine screenshot (scuba) tests (#12353)
* Import all golden files and tests from internal repo.
* Adapt test files to new screenshot API, and tweak some settings.

(Check PR to see individual changes to each file)

Fixes https://github.com/flutter/flutter/issues/40975
2019-09-20 09:00:55 -07:00
Siva
50b3538399
 Roll src/third_party/dart 7c1821c4aa...ea969c358e (#12339)
* Roll src/third_party/dart 7c1821c4aa...ea969c358e (6 commits)

dart-lang/sdk@7c1821c4aa [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split
dart-lang/sdk@0c23664c8f [vm/fuzzer] Reduce number of methods per class
dart-lang/sdk@3135eb569d [vm/bytecode] Fix initial scope in field initializers
dart-lang/sdk@1345fb80ac Use TypeParameterElement instead of TypeParameterType in inference.
dart-lang/sdk@430ff6d649 Migration: fix "matching" functionality of edge testing infrastructure.
dart-lang/sdk@f1bff1b512 Add option to run ddb with observatory
2019-09-19 16:07:34 -07:00
Kaushik Iska
7f7250f476
[flutter_runner] Do not use prebuilts just yet (#12340) 2019-09-18 15:31:57 -07:00
David Iglesias
d3c60acef8
More controls for Screenshot tests (for web) (#12284)
New features for golden tests (for web):

* Height/width of headless browser instance extracted to constants
* Remove border from the host iframe
* Added 'region' to matchGoldenFile, so screenshots can capture only
a subset of the viewport
* Added image-format-awareness (png) to screenshot comparison, so it
doesn't only look at raw bytes
* When a test fails, output a diff image alongside the unexpected
output.
2019-09-18 14:58:30 -07:00
David Iglesias
8814f6865c
Ensure DRRects without corners also draw. (#12330)
Uncovered this bug running some additional engine tests. Backported the
test here, and fixed the recording_canvas code.
2019-09-18 10:45:43 -07:00
Chinmay Garde
1c7300ed1e
Account for root surface transformation on the surfaces managed by the external view embedder. (#11384)
The earlier design speculated that embedders could affect the same
transformations on the layers post engine compositor presentation but before
final composition.

However, the linked issue points out that this design is not suitable for use
with hardware overlay planes. When rendering to the same, to affect the
transformation before composition, embedders would have to render to an
off-screen render target and then apply the transformation before presentation.
This patch negates the need for that off-screen render pass.

To be clear, the previous architecture is still fully viable. Embedders still
have full control over layer transformations before composition. This is an
optimization for the hardware overlay planes use-case.

Fixes b/139758641
2019-09-17 15:16:59 -07:00
Harry Terkelsen
d1692d4cc7
Update canvaskit backend (#12318)
* Improve the CanvasKit backend for Flutter Web

- Improve font handling by trying to load a "normal" font face
  instead of using the first face matching the family.
- Implement Vertices and drawVertices

* Add license header to vertices.dart

* Remove unused 'encodedPositions'

* Delete commented old code. Don't use Skia by default

* Add `vertices.dart` to licenses file
2019-09-17 14:42:18 -07:00
Mouad Debbar
b790d48ebc
README for the felt tool (#12323) 2019-09-17 14:03:31 -07:00
David Iglesias
851f4606f1
Improve check to render (or not) a DRRect when inner falls outside of outer on RecordingCanvas (#12229)
* Improve check to determine if a rrect is fully contained within another in RecordingCanvas.
* Add unit tests.

Fixes https://github.com/flutter/flutter/issues/37772 (and others)
2019-09-17 13:27:44 -07:00
gaaclarke
0a455a8207
Channel buffers (#12167)
Added channel buffers to 'ui' so that messages have a place to
go until message handling is setup.
2019-09-17 12:22:00 -07:00
Mouad Debbar
7ab695618e
Add a build command to felt (#12303)
- The build command supports a `--watch` or `-w` flag to watch for
changes and rebuild.

Fixes https://github.com/flutter/flutter/issues/40392
2019-09-17 10:31:13 -07:00
Michael Goderbauer
d5139465f6
Cleanup in web_ui (#12307) 2019-09-16 16:04:12 -07:00
Jonah Williams
11bb2bffeb
Include firefox in check to quote font families (#12288) 2019-09-16 14:17:17 -07:00
Mouad Debbar
968c3aa169
Refactor and polish the 'felt' tool (#12258)
1. Various functionalities offered by this tool are now organized into commands (e.g. `felt test`, `felt check-licenses`).
2. The felt tool can now be invoked from anywhere, not necessarily from the web_ui directory.
3. This new structure helps us scale better as we add more commands (e.g. soon a `build/watch` command is coming).
2019-09-16 10:41:34 -07:00
Michael Goderbauer
ef7bcafd5c
a11y: expose max character count for text fields (#12269) 2019-09-16 09:37:25 -07:00
Kaushik Iska
6fbbfe18e8
Fix flutter runner paths (#12289) 2019-09-15 16:22:35 -07:00
Kaushik Iska
00c8941dae [flutter_runner] Change the path to artifacts (#12282)
This is to account for fxb/36483
2019-09-13 16:18:03 -07:00
Nurhan Turgut
9c8465927e
Editable text fix (#12249)
* enabling spellcheck for text editing

* Fixing errors in the input box, which arrises when the fontweight is null.

* Rollback the spellcheck change. Still not tested in safari mobile.

* Carrying the assignment of fontweight from index to EditingStyle constructor. This reduce # of null checks to one.
2019-09-12 13:41:14 -07:00
Yegor
d6f0b64d06
pin and auto-install chrome version (#12228)
pin and auto-install chrome version
2019-09-12 10:25:37 -07:00
Kaushik Iska
988efe376a
Do not generate kernel platform files on topaz tree (#12222) 2019-09-11 12:42:27 -07:00
Harry Terkelsen
6c46a173e3
Don't disable toString in release mode for dart:ui classes (#12204) 2019-09-11 10:26:15 -07:00
Kaushik Iska
2bdfb61a04
Namespace patched SDK names to not conflict with Topaz (#12218) 2019-09-11 08:19:58 -07:00
Harry Terkelsen
e174b4b9b0
Don't load Roboto by default (#12205)
Fixes https://github.com/flutter/flutter/issues/39260
2019-09-10 16:40:41 -07:00
Yegor
e9c998468e
add a convenience CLI tool for building and testing web engine (#12197) 2019-09-10 14:52:57 -07:00
Yegor
954f1988c5
Add custom test plugin that supports screenshot tests (#12079)
- Add a custom `PlatformPlugin` that spins up a server waiting for test to request a screenshot.
  - When a screenshot is requested the plugin talks to Chrome via the debug port, captures a screenshot, and compares it with a golden file
- This PR also adds proper CLI for `dev/test.dart` with an `ArgParser` for future extension into a proper developer tool for the team.
  - As a first couple of features, it adds `--debug` option to launch Chrome in debug mode, a `--target` option to choose a single test to run rather than all tests, and `--shard` option to choose a subset of tests to run.

Limitations:
 - While screenshot test will run on Cirrus, they are configured to not fail on Cirrus. Need to solve Chrome version skew.
 - Stack maps do not work yet (you get stacks, but they are nonsensical)
 - When requesting a single test, build_runner builds all tests anyway
 - Nothing but desktop Chrome is supported
 - Nothing but Linux is supported
 - There's no Chrome version pinning; currently assumed stable Chrome channel
2019-09-10 13:53:47 -07:00
Jonah Williams
2438798147
Make ImageShader implement Shader for web ui (#12161) 2019-09-10 10:15:32 -07:00
Ferhat
c2e82892aa
Add GradientRadial paintStyle implementation (#12081) 2019-09-09 14:13:10 -07:00
Harry Terkelsen
c3eea0ac28
Don't quote generic font families (#12080)
* Don't quote generic font families

This is a change that should have been upstreamed before.

* Change generic family List to a Set

* Add test
2019-09-09 14:05:40 -07:00
Kaushik Iska
7ea9884ab0
[flutter_runner] Kernel platform files can now be built in topaz (#12016)
- Tested this compatibility in topaz repo. The build rules can now be
used to build kernel_platform_files in topaz tree, after this change we
can migrate the platform*dill and vm*snapshot files in topaz to use the
engine built artifacts.

- Also removes some namespace conflicts for dart configuration.
2019-09-06 14:34:26 -07:00
Ferhat
e50bfbe9f7
Fix multi span text ruler cache lookup failure. (#12023) 2019-09-06 14:05:52 -07:00
liyuqian
4243324a03
Revert "Add a BroadcastStream to FrameTiming (#11041)" (#11841)
This reverts commit e97ed36e580c9b4c4a3d768cfe1a520f7bf8161d.

Reason for revert: Stream is considered a bad API: https://github.com/flutter/engine/pull/11041#issuecomment-526892247
2019-09-05 10:41:55 -07:00
Mouad Debbar
cd920398e4
Handle new navigation platform messages (#11880) 2019-09-04 15:13:24 -07:00