814 Commits

Author SHA1 Message Date
gaaclarke
d318cbd7da Resize channel buffers (flutter/engine#12402)
Made it so you can resize channel buffers by sending messages to them.
2019-10-01 10:31:25 -07:00
Mouad Debbar
621420b491 Set transparent background in textarea elements (flutter/engine#12710) 2019-09-30 21:12:51 -07:00
Nurhan Turgut
bc9501eace [web_ui] Fixing invalid state bug for text editing (flutter/engine#12698)
* Fixing invalid state bug for text editing. Flutter Framework was sending editing state selection base and extent as -1. Since -1 is an invalid value for a dom element selection it was not applied to the last editing state. Now if the base or offset is sent as negative value, web engine will set 0 to the selection range.

* Addressing PR comments.
2019-09-30 12:31:17 -07:00
Greg Spencer
b174801460 Add isFocusable to SemanticsFlag (flutter/engine#12618)
This adds an isFocusable to SemanticsFlag so that the framework can tell the engine what semantics nodes are allowed to be focused, which will affect what platform flags are applied to the semantics information.

This flag is not yet in use by the frame
2019-09-30 09:46:48 -07:00
Nurhan Turgut
ae6eda42d1 Refactoring text_editing.dart (flutter/engine#12479)
* Refacting text_editing.dart to use EditingState more efficiently and removing unused/unimplemented code.

* Addressing PR comments. Comment changes. Removing unused methods. Method renaming.

* commiting text_editing_test.dart changes.
2019-09-30 08:26:28 -07:00
liyuqian
2778d3bb20 Revert "[fuchsia] Wire up OpacityLayer to Scenic (#11322)" (flutter/engine#12610)
This reverts commit 639cc113f0b2ccf9fcf69ded7960d41d0b611f80.

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
c341326d6a Add support for JIT release mode (flutter/engine#12446) 2019-09-27 11:20:54 -07:00
tauu
b1f058d83d [web_ui] add missing dispose handler for MethodCalls to flutter/platform_view (flutter/engine#12226)
* added dispose handler for calls to flutter/platform_view

* improved comment
2019-09-26 16:48:57 -07:00
tauu
89971abacd [web_ui] PersistedPlatformView attribute update handling to enable resizing (flutter/engine#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
3795f9fb98 Reflect selection changes in Firefox for text editing (flutter/engine#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
2109f77212 Make kDoNotResizeDimension public so framework can use it directly (flutter/engine#12448) 2019-09-26 17:07:16 -04:00
Chinmay Garde
46f4c5229f Revert "Support accessibility labels on iOS switches. (#12404)" (flutter/engine#12466)
This reverts commit 4a14828c0bd942baa3b012b20d2593f02c47264f.
2019-09-26 12:52:52 -07:00
brandondiamond
4a14828c0b Support accessibility labels on iOS switches. (flutter/engine#12404) 2019-09-26 11:14:44 -07:00
Yegor
24e60804fa [web] filter test targets; cache host.dart compilation (flutter/engine#12445)
* filter test targets; cache host.dart compilation
2019-09-25 13:51:00 -07:00
Yegor
f24162c6bf Force exit felt tool on sigint, sigterm (flutter/engine#12443) 2019-09-25 10:02:32 -07:00
David Worsham
639cc113f0 [fuchsia] Wire up OpacityLayer to Scenic (flutter/engine#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
bcfe5948b1 delete golden files; switch to flutter/goldens (flutter/engine#12434)
Delete golden files from flutter/engine; switch to flutter/goldens
2019-09-25 09:08:44 -07:00
David Iglesias
34a8ee65d9 Interpret negative radii as 0 in recording_canvas drawDRRect (flutter/engine#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
2d475a6fca Don't send pointer events when the framework isn't ready yet (flutter/engine#12403) 2019-09-23 15:43:49 -07:00
Nurhan Turgut
4ecc884e50 Updating text field location in IOS as a pre-work for spellcheck (flutter/engine#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
06914655b3 [Web] Implement dark mode support for web (flutter/engine#12335) 2019-09-23 09:42:20 -07:00
Yegor
064ca6bfb5 Add macOS testing support (flutter/engine#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
e08ce018a4 Store screenshot test output as Cirrus artifacts; do fuzzy comparison of non-matching screenshot pixels (flutter/engine#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
0c2c7cfd15 Add web engine screenshot (scuba) tests (flutter/engine#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
c5ac59ebee  Roll src/third_party/dart 7c1821c4aa...ea969c358e (flutter/engine#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
2c1b30a4f2 [flutter_runner] Do not use prebuilts just yet (flutter/engine#12340) 2019-09-18 15:31:57 -07:00
David Iglesias
25d2d2a47a More controls for Screenshot tests (for web) (flutter/engine#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
c9f422f6eb Ensure DRRects without corners also draw. (flutter/engine#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
c8ecb03fa8 Account for root surface transformation on the surfaces managed by the external view embedder. (flutter/engine#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
e6d5c594ec Update canvaskit backend (flutter/engine#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
b4aae10f0d README for the felt tool (flutter/engine#12323) 2019-09-17 14:03:31 -07:00
David Iglesias
0d2e83cde2 Improve check to render (or not) a DRRect when inner falls outside of outer on RecordingCanvas (flutter/engine#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
402a8a452e Channel buffers (flutter/engine#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
bb1ec63121 Add a build command to felt (flutter/engine#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
a94cccbeee Cleanup in web_ui (flutter/engine#12307) 2019-09-16 16:04:12 -07:00
Jonah Williams
ba1ef5f758 Include firefox in check to quote font families (flutter/engine#12288) 2019-09-16 14:17:17 -07:00
Mouad Debbar
8a818032d0 Refactor and polish the 'felt' tool (flutter/engine#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
bffaa526a2 a11y: expose max character count for text fields (flutter/engine#12269) 2019-09-16 09:37:25 -07:00
Kaushik Iska
d413a493d6 Fix flutter runner paths (flutter/engine#12289) 2019-09-15 16:22:35 -07:00
Kaushik Iska
8bdeed3670 [flutter_runner] Change the path to artifacts (flutter/engine#12282)
This is to account for fxb/36483
2019-09-13 16:18:03 -07:00
Nurhan Turgut
9d793c6959 Editable text fix (flutter/engine#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
eb965c8465 pin and auto-install chrome version (flutter/engine#12228)
pin and auto-install chrome version
2019-09-12 10:25:37 -07:00
Kaushik Iska
71429d47c1 Do not generate kernel platform files on topaz tree (flutter/engine#12222) 2019-09-11 12:42:27 -07:00
Harry Terkelsen
21f124118f Don't disable toString in release mode for dart:ui classes (flutter/engine#12204) 2019-09-11 10:26:15 -07:00
Kaushik Iska
f4ecd9c175 Namespace patched SDK names to not conflict with Topaz (flutter/engine#12218) 2019-09-11 08:19:58 -07:00
Harry Terkelsen
bcad5fd2d7 Don't load Roboto by default (flutter/engine#12205)
Fixes https://github.com/flutter/flutter/issues/39260
2019-09-10 16:40:41 -07:00
Yegor
51e48deb34 add a convenience CLI tool for building and testing web engine (flutter/engine#12197) 2019-09-10 14:52:57 -07:00
Yegor
0a3bdb877f Add custom test plugin that supports screenshot tests (flutter/engine#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
e412093624 Make ImageShader implement Shader for web ui (flutter/engine#12161) 2019-09-10 10:15:32 -07:00
Ferhat
173674166f Add GradientRadial paintStyle implementation (flutter/engine#12081) 2019-09-09 14:13:10 -07:00