793 Commits

Author SHA1 Message Date
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
Harry Terkelsen
c314ab5b5b Don't quote generic font families (flutter/engine#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
ed39cbade1 [flutter_runner] Kernel platform files can now be built in topaz (flutter/engine#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
d01050e5fc Fix multi span text ruler cache lookup failure. (flutter/engine#12023) 2019-09-06 14:05:52 -07:00
liyuqian
df4c16f947 Revert "Add a BroadcastStream to FrameTiming (#11041)" (flutter/engine#11841)
This reverts commit 226c44ba3c24cd89b4e47d0ce59b21ac7af6946e.

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
04095305ed Handle new navigation platform messages (flutter/engine#11880) 2019-09-04 15:13:24 -07:00
Harry Terkelsen
21a7659d61 Provide a hook for a plugin handler to receive messages on the web (flutter/engine#11796)
* WIP on web plugin registry

* WIP on web plugins

* More WIP on registering web plugins

* remove flutter_web_plugins

* add license header

* Update year of license header to 2013

* Update the license goldens file
2019-08-30 17:08:31 -07:00
gaaclarke
3aaf1637b7 Started logging warnings if we drop platform messages. (flutter/engine#11792) 2019-08-30 12:48:03 -07:00
Yegor
457198bd53 last flutter web sync: cc38319841 (flutter/engine#11732)
* last flutter web sync: cc38319841

* revert text.dart changes

* revert paragraph.dart

* link to issue
2019-08-29 18:50:50 -07:00
Harry Terkelsen
922255f860 Quote the font family name whenever setting the font-family property. (flutter/engine#11722)
Browsers will only allow font names with spaces or '/' if they are
in quotes.

Fixes https://github.com/flutter/flutter/issues/39486
2019-08-29 15:58:32 -07:00
Martin Kustermann
442d4de7a2 Roll src/third_party/dart 35382f9b14..05c28c6115 (flutter/engine#11702)
* Roll src/third_party/dart 35382f9b14..05c28c6115

dart-lang/sdk@05c28c6115 Reland "Scaffolding for dart:wasm"
dart-lang/sdk@d57a8f7451 [vm/bytecode] Remove DebugCheck in synthetic non-local transfer (no source pos).
dart-lang/sdk@b565c8c20f Don't serialize not serializable constant variable initializers.
dart-lang/sdk@ce12a2722d Migration: handle named parameters in _substituteFunctionAfterFormals.
dart-lang/sdk@a290271dea [vm/bytecode] Throw should be 'debug checked', but not ReThrow.
dart-lang/sdk@63133a2a8c [cfe] Handle extension instance method tearoff
dart-lang/sdk@a147d4e8d2 [cfe] Handle simple use of extension instance members
dart-lang/sdk@e9fdeb2db8 Migration: add support for creating instances without supplying type arguments.
dart-lang/sdk@66e349da9c Migration: Clean up substitution logic in getOrComputeElementType
dart-lang/sdk@e9a44ba6a8 fix extension instance field error
dart-lang/sdk@15a7b57d8e split endFields into endClass/Mixin/ExtensionFields events
dart-lang/sdk@ed1b4ffba1 Add tests of extensions of mixins
dart-lang/sdk@ef36f1ba0d [vm/fuzzer] Reduce limit on methods and classes
dart-lang/sdk@7b17602c74 [vm/bytecode] Include function name into source fingerprints
dart-lang/sdk@851701d2a4 add BREAK suggestions to switch cases
dart-lang/sdk@57f7941eef [cfe] Remove 'functionNestingLevel' for VariableDeclaration.forValue
2019-08-29 22:06:42 +02:00
David Iglesias
6792c2ceae Don't crash while loading improperly formatted fonts on Safari (flutter/engine#11655)
(cl/265763028)

Fixes https://github.com/flutter/flutter/issues/39259
2019-08-29 09:03:14 -07:00
Yegor
cf1da7b72c remove Web test blacklist; all tests should pass now (flutter/engine#11640)
* copy ahem.ttf where web_ui can find it
* remove Web test blacklist; all tests should pass now
2019-08-28 12:37:34 -07:00
Gary Qian
1a646c18bb Update the ui.LineMetrics.height metric to be more useful to external users (flutter/engine#11456) 2019-08-28 12:26:42 -07:00
Chris Bracken
4336d71016 Add missing newline at EOF (flutter/engine#11473)
This was required by the C++ spec pre-C++11 and still gets picked up in
the Fuchsia tree due to -Wnewline-eof. It fixes:

    ../../third_party/flutter/lib/ui/text/line_metrics.h:75:47: error: no newline at end of file [-Werror,-Wnewline-eof]
    #endif  // FLUTTER_LIB_UI_TEXT_LINE_METRICS_H_
2019-08-26 21:11:57 -07:00
Gary Qian
5a4bdf5ef6 Expose LineMetrics in dart:ui (flutter/engine#10670) 2019-08-26 13:40:22 -07:00
Yegor
a5db220340 sync Flutter Web engine to the latest (flutter/engine#11421)
* sync Flutter Web engine to the latest
2019-08-26 08:16:09 -07:00
Chinmay Garde
05d4ab774d Remove deprecated ThreadTest::GetThreadTaskRunner and use the newer CreateNewThread API. (flutter/engine#11395)
We will end up creating fewer threads in tests.
2019-08-23 12:21:46 -07:00
Yegor
2a764289e5 preventDefault on touchend to show iOS keyboard (flutter/engine#11390) 2019-08-22 17:35:07 -07:00
Yegor
3c08ceeae6 sync web engine; run web engine tests (flutter/engine#11031)
sync web engine; run web engine tests
2019-08-22 16:38:03 -07:00
liyuqian
226c44ba3c Add a BroadcastStream to FrameTiming (flutter/engine#11041)
Without this, developers have to override `onReportTimings` to listen for `FrameTiming`.
That can potentially break previous `onReportTimings` listeners if they forget to call
the old listener in their new callback.

This PR replaces the similar RP in the framework: https://github.com/flutter/flutter/pull/38574

Once this PR landed, we'll have to create another framework PR to use the stream to replace
`onReportTimings` usages.

Once that's done, we can then propose the breaking change of removing the deprecated
`onReportTimings`.
2019-08-19 10:52:16 -07:00
Shi-Hao Hong
cb707fb34a Pass Android Q insets.systemGestureInsets to Window (flutter/engine#10413)
* Pass Android Q system gesture inset information from insets.systemGestureInsets to Window.systemGestureInsets
2019-08-16 13:42:56 -04:00